From b2bebba0c9f74592f4608126f910a96c28a19d84 Mon Sep 17 00:00:00 2001 From: Matthew Wall Date: Thu, 21 Mar 2024 15:53:43 -0600 Subject: [PATCH 01/44] [SWAPS V2]: Adjust asset types + utils to match BX (#5538) * adjust currencies to match bx * bring over bx swaps asset types + utils * bring over bx swaps asset types + utils * break out uniqueId into a shared helper function * lint * revert url change to github raw link --- .../screens/Swap/components/CoinRowButton.tsx | 2 +- .../Swap/components/ExchangeRateBubble.tsx | 2 +- .../screens/Swap/components/FlipButton.tsx | 2 +- .../screens/Swap/components/SearchInput.tsx | 2 +- .../Swap/components/SwapBackground.tsx | 2 +- .../screens/Swap/components/SwapNavbar.tsx | 2 +- .../screens/Swap/components/SwapNumberPad.tsx | 2 +- .../screens/Swap/components/SwapSlider.tsx | 2 +- .../screens/Swap/components/TokenList.tsx | 2 +- .../Swap/components/controls/SwapActions.tsx | 2 +- .../screens/Swap/hooks/useSwapInputStyles.ts | 2 +- .../Swap/hooks/useSwapInputsController.ts | 4 +- .../screens/Swap/hooks/useSwapTextStyles.ts | 4 +- .../screens/Swap/providers/swap-provider.tsx | 2 +- src/__swaps__/screens/Swap/types/assets.ts | 177 +++++++++ src/__swaps__/screens/Swap/types/chains.ts | 232 ++++++++++++ src/__swaps__/screens/Swap/types/search.ts | 33 ++ .../screens/Swap/{types.ts => types/swap.ts} | 0 src/__swaps__/screens/Swap/utils/assets.ts | 340 ++++++++++++++++++ src/__swaps__/screens/Swap/utils/chains.ts | 175 +++++++++ src/__swaps__/screens/Swap/utils/hex.ts | 30 ++ src/__swaps__/screens/Swap/utils/numbers.ts | 309 ++++++++++++++++ src/__swaps__/screens/Swap/utils/strings.ts | 7 + .../screens/Swap/{utils.ts => utils/swaps.ts} | 2 +- src/components/DappBrowser/WebViewBorder.tsx | 2 +- .../DappBrowser/address-bar/AddressInput.tsx | 2 +- .../DappBrowser/address-bar/TabButton.tsx | 2 +- 27 files changed, 1323 insertions(+), 20 deletions(-) create mode 100644 src/__swaps__/screens/Swap/types/assets.ts create mode 100644 src/__swaps__/screens/Swap/types/chains.ts create mode 100644 src/__swaps__/screens/Swap/types/search.ts rename src/__swaps__/screens/Swap/{types.ts => types/swap.ts} (100%) create mode 100644 src/__swaps__/screens/Swap/utils/assets.ts create mode 100644 src/__swaps__/screens/Swap/utils/chains.ts create mode 100644 src/__swaps__/screens/Swap/utils/hex.ts create mode 100644 src/__swaps__/screens/Swap/utils/numbers.ts create mode 100644 src/__swaps__/screens/Swap/utils/strings.ts rename src/__swaps__/screens/Swap/{utils.ts => utils/swaps.ts} (99%) diff --git a/src/__swaps__/screens/Swap/components/CoinRowButton.tsx b/src/__swaps__/screens/Swap/components/CoinRowButton.tsx index 5c486b7842b..d39aea4437b 100644 --- a/src/__swaps__/screens/Swap/components/CoinRowButton.tsx +++ b/src/__swaps__/screens/Swap/components/CoinRowButton.tsx @@ -5,7 +5,7 @@ import { Box, TextIcon, useColorMode, useForegroundColor } from '@/design-system import { TextWeight } from '@/design-system/components/Text/Text'; import { TextSize } from '@/design-system/typography/typeHierarchy'; import { LIGHT_SEPARATOR_COLOR, SEPARATOR_COLOR, THICK_BORDER_WIDTH } from '../constants'; -import { opacity } from '../utils'; +import { opacity } from '../utils/swaps'; export const CoinRowButton = ({ icon, diff --git a/src/__swaps__/screens/Swap/components/ExchangeRateBubble.tsx b/src/__swaps__/screens/Swap/components/ExchangeRateBubble.tsx index 3e9308e2c11..5c595bd6ab1 100644 --- a/src/__swaps__/screens/Swap/components/ExchangeRateBubble.tsx +++ b/src/__swaps__/screens/Swap/components/ExchangeRateBubble.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { Box, Inline, Text, TextIcon, useColorMode, useForegroundColor } from '@/design-system'; import { LIGHT_SEPARATOR_COLOR, SEPARATOR_COLOR, THICK_BORDER_WIDTH } from '../constants'; -import { opacity } from '../utils'; +import { opacity } from '../utils/swaps'; import { ButtonPressAnimation } from '@/components/animations'; import Animated from 'react-native-reanimated'; import { useSwapContext } from '../providers/swap-provider'; diff --git a/src/__swaps__/screens/Swap/components/FlipButton.tsx b/src/__swaps__/screens/Swap/components/FlipButton.tsx index 80ca54167c6..a9408ddbb86 100644 --- a/src/__swaps__/screens/Swap/components/FlipButton.tsx +++ b/src/__swaps__/screens/Swap/components/FlipButton.tsx @@ -8,7 +8,7 @@ import { AnimatedSpinner, spinnerExitConfig } from '@/__swaps__/components/anima import { Bleed, Box, IconContainer, Text, globalColors, useColorMode } from '@/design-system'; import { colors } from '@/styles'; import { SEPARATOR_COLOR, THICK_BORDER_WIDTH } from '../constants'; -import { opacity } from '../utils'; +import { opacity } from '../utils/swaps'; import { IS_ANDROID, IS_IOS } from '@/env'; import { AnimatedBlurView } from './AnimatedBlurView'; import { useSwapContext } from '../providers/swap-provider'; diff --git a/src/__swaps__/screens/Swap/components/SearchInput.tsx b/src/__swaps__/screens/Swap/components/SearchInput.tsx index 6cd4bcde738..6ad9dc704b5 100644 --- a/src/__swaps__/screens/Swap/components/SearchInput.tsx +++ b/src/__swaps__/screens/Swap/components/SearchInput.tsx @@ -4,7 +4,7 @@ import { ButtonPressAnimation } from '@/components/animations'; import { Input } from '@/components/inputs'; import { Bleed, Box, Column, Columns, Text, useColorMode, useForegroundColor } from '@/design-system'; import { LIGHT_SEPARATOR_COLOR, SEPARATOR_COLOR, THICK_BORDER_WIDTH } from '../constants'; -import { opacity } from '../utils'; +import { opacity } from '../utils/swaps'; export const SearchInput = ({ color, diff --git a/src/__swaps__/screens/Swap/components/SwapBackground.tsx b/src/__swaps__/screens/Swap/components/SwapBackground.tsx index 48116215e14..fcf029a7331 100644 --- a/src/__swaps__/screens/Swap/components/SwapBackground.tsx +++ b/src/__swaps__/screens/Swap/components/SwapBackground.tsx @@ -3,7 +3,7 @@ import { useColorMode, Box } from '@/design-system'; import LinearGradient from 'react-native-linear-gradient'; import { useDimensions } from '@/hooks'; import { ETH_COLOR, ETH_COLOR_DARK } from '../constants'; -import { getTintedBackgroundColor } from '../utils'; +import { getTintedBackgroundColor } from '../utils/swaps'; import { IS_ANDROID } from '@/env'; import { ScreenCornerRadius } from 'react-native-screen-corner-radius'; import { navbarHeight } from '@/components/navbar/Navbar'; diff --git a/src/__swaps__/screens/Swap/components/SwapNavbar.tsx b/src/__swaps__/screens/Swap/components/SwapNavbar.tsx index f484bc1f82f..370bd55231f 100644 --- a/src/__swaps__/screens/Swap/components/SwapNavbar.tsx +++ b/src/__swaps__/screens/Swap/components/SwapNavbar.tsx @@ -17,7 +17,7 @@ import { safeAreaInsetValues } from '@/utils'; import { ETH_COLOR, ETH_COLOR_DARK, THICK_BORDER_WIDTH } from '../constants'; import { OUTPUT_COLOR } from '../dummyValues'; -import { getHighContrastColor, opacity } from '../utils'; +import { getHighContrastColor, opacity } from '../utils/swaps'; import { IS_ANDROID, IS_IOS } from '@/env'; import { useSwapContext } from '../providers/swap-provider'; diff --git a/src/__swaps__/screens/Swap/components/SwapNumberPad.tsx b/src/__swaps__/screens/Swap/components/SwapNumberPad.tsx index 1097f449184..c23521668fa 100644 --- a/src/__swaps__/screens/Swap/components/SwapNumberPad.tsx +++ b/src/__swaps__/screens/Swap/components/SwapNumberPad.tsx @@ -12,7 +12,7 @@ import Animated, { } from 'react-native-reanimated'; import { Box, Columns, HitSlop, Separator, Text, useColorMode, useForegroundColor } from '@/design-system'; -import { stripCommas } from '../utils'; +import { stripCommas } from '../utils/swaps'; import { CUSTOM_KEYBOARD_HEIGHT, LIGHT_SEPARATOR_COLOR, diff --git a/src/__swaps__/screens/Swap/components/SwapSlider.tsx b/src/__swaps__/screens/Swap/components/SwapSlider.tsx index 1a68b3e4be8..4b9e712e2a5 100644 --- a/src/__swaps__/screens/Swap/components/SwapSlider.tsx +++ b/src/__swaps__/screens/Swap/components/SwapSlider.tsx @@ -33,7 +33,7 @@ import { snappySpringConfig, springConfig, } from '../constants'; -import { clamp, opacity } from '../utils'; +import { clamp, opacity } from '../utils/swaps'; import { useSwapContext } from '../providers/swap-provider'; import { SwapCoinIcon } from './SwapCoinIcon'; import { INPUT_ADDRESS, INPUT_NETWORK, INPUT_SYMBOL } from '../dummyValues'; diff --git a/src/__swaps__/screens/Swap/components/TokenList.tsx b/src/__swaps__/screens/Swap/components/TokenList.tsx index b24a9822d45..ce940948ca1 100644 --- a/src/__swaps__/screens/Swap/components/TokenList.tsx +++ b/src/__swaps__/screens/Swap/components/TokenList.tsx @@ -9,7 +9,7 @@ import { useTheme } from '@/theme'; import { SwapCoinIcon } from './SwapCoinIcon'; import { EXPANDED_INPUT_HEIGHT, FOCUSED_INPUT_HEIGHT } from '../constants'; import { DAI_ADDRESS, ETH_ADDRESS, USDC_ADDRESS } from '../dummyValues'; -import { opacity } from '../utils'; +import { opacity } from '../utils/swaps'; import { CoinRow } from './CoinRow'; import { SearchInput } from './SearchInput'; diff --git a/src/__swaps__/screens/Swap/components/controls/SwapActions.tsx b/src/__swaps__/screens/Swap/components/controls/SwapActions.tsx index f57511e7d4c..820eb332078 100644 --- a/src/__swaps__/screens/Swap/components/controls/SwapActions.tsx +++ b/src/__swaps__/screens/Swap/components/controls/SwapActions.tsx @@ -7,7 +7,7 @@ import { safeAreaInsetValues } from '@/utils'; import { SwapActionButton } from '../../components/SwapActionButton'; import { GasButton } from '../../components/GasButton'; import { LIGHT_SEPARATOR_COLOR, SEPARATOR_COLOR, THICK_BORDER_WIDTH } from '../../constants'; -import { opacity } from '../../utils'; +import { opacity } from '../../utils/swaps'; import { IS_ANDROID } from '@/env'; import { useSwapContext } from '../../providers/swap-provider'; diff --git a/src/__swaps__/screens/Swap/hooks/useSwapInputStyles.ts b/src/__swaps__/screens/Swap/hooks/useSwapInputStyles.ts index ade91228f1e..155e20bc2bf 100644 --- a/src/__swaps__/screens/Swap/hooks/useSwapInputStyles.ts +++ b/src/__swaps__/screens/Swap/hooks/useSwapInputStyles.ts @@ -13,7 +13,7 @@ import { fadeConfig, springConfig, } from '../constants'; -import { opacity } from '../utils'; +import { opacity } from '../utils/swaps'; export const useSwapInputStyles = ({ bottomInput, diff --git a/src/__swaps__/screens/Swap/hooks/useSwapInputsController.ts b/src/__swaps__/screens/Swap/hooks/useSwapInputsController.ts index 5176a2d73e3..b17ff010666 100644 --- a/src/__swaps__/screens/Swap/hooks/useSwapInputsController.ts +++ b/src/__swaps__/screens/Swap/hooks/useSwapInputsController.ts @@ -12,7 +12,7 @@ import { useDebouncedCallback } from 'use-debounce'; import { SCRUBBER_WIDTH, SLIDER_WIDTH, snappySpringConfig } from '../constants'; import { IS_INPUT_STABLECOIN, IS_OUTPUT_STABLECOIN, SWAP_FEE } from '../dummyValues'; -import { inputKeys, inputMethods } from '../types'; +import { inputKeys, inputMethods } from '../types/swap'; import { addCommasToNumber, clamp, @@ -22,7 +22,7 @@ import { niceIncrementFormatter, trimTrailingZeros, valueBasedDecimalFormatter, -} from '../utils'; +} from '../utils/swaps'; export function useSwapInputsController({ focusedInput, diff --git a/src/__swaps__/screens/Swap/hooks/useSwapTextStyles.ts b/src/__swaps__/screens/Swap/hooks/useSwapTextStyles.ts index a4ef7835d4a..36bc871bfa9 100644 --- a/src/__swaps__/screens/Swap/hooks/useSwapTextStyles.ts +++ b/src/__swaps__/screens/Swap/hooks/useSwapTextStyles.ts @@ -21,8 +21,8 @@ import { sliderConfig, slowFadeConfig, } from '../constants'; -import { inputKeys, inputMethods } from '../types'; -import { opacity } from '../utils'; +import { inputKeys, inputMethods } from '../types/swap'; +import { opacity } from '../utils/swaps'; export function useSwapTextStyles({ bottomColor, diff --git a/src/__swaps__/screens/Swap/providers/swap-provider.tsx b/src/__swaps__/screens/Swap/providers/swap-provider.tsx index a35bdff8c30..a0cc3f94055 100644 --- a/src/__swaps__/screens/Swap/providers/swap-provider.tsx +++ b/src/__swaps__/screens/Swap/providers/swap-provider.tsx @@ -1,6 +1,6 @@ import React, { createContext, useContext, ReactNode, SetStateAction, Dispatch, useState } from 'react'; import { SharedValue, useAnimatedStyle, useDerivedValue, useSharedValue } from 'react-native-reanimated'; -import { inputKeys } from '../types'; +import { inputKeys } from '../types/swap'; import { INITIAL_SLIDER_POSITION, SLIDER_COLLAPSED_HEIGHT, SLIDER_HEIGHT, SLIDER_WIDTH, ETH_COLOR_DARK, ETH_COLOR } from '../constants'; import { INPUT_ASSET_BALANCE, INPUT_ASSET_USD_PRICE, OUTPUT_ASSET_USD_PRICE, OUTPUT_COLOR } from '../dummyValues'; import { useColorMode } from '@/design-system'; diff --git a/src/__swaps__/screens/Swap/types/assets.ts b/src/__swaps__/screens/Swap/types/assets.ts new file mode 100644 index 00000000000..b4c78ea6e1c --- /dev/null +++ b/src/__swaps__/screens/Swap/types/assets.ts @@ -0,0 +1,177 @@ +import { Address } from 'viem'; + +import { ChainId, ChainName } from '@/__swaps__/screens/Swap/types/chains'; + +import { ETH_ADDRESS } from '@/references'; + +import { SearchAsset } from './search'; + +export type AddressOrEth = Address | typeof ETH_ADDRESS; + +export interface ParsedAsset { + address: AddressOrEth; + chainId: ChainId; + chainName: ChainName; + colors?: { + primary?: string; + fallback?: string; + shadow?: string; + }; + isNativeAsset: boolean; + name: string; + native: { + price?: { + change: string; + amount: number; + display: string; + }; + }; + mainnetAddress?: AddressOrEth; + price?: ZerionAssetPrice; + symbol: string; + uniqueId: UniqueId; + decimals: number; + icon_url?: string; + type?: AssetType; + smallBalance?: boolean; + standard?: 'erc-721' | 'erc-1155'; + networks?: AssetApiResponse['networks']; + bridging?: { + isBridgeable: boolean; + networks: { [id in ChainId]?: { bridgeable: boolean } }; + }; +} + +export interface ParsedUserAsset extends ParsedAsset { + balance: { + amount: string; + display: string; + }; + native: { + balance: { + amount: string; + display: string; + }; + price?: { + change: string; + amount: number; + display: string; + }; + }; +} + +export type SearchAssetWithPrice = SearchAsset & ParsedAsset; +export type ParsedSearchAsset = SearchAsset & ParsedUserAsset; + +export type ParsedAssetsDict = Record; + +export type ParsedAssetsDictByChain = Record; + +export interface ZerionAssetPrice { + value: number; + relative_change_24h?: number; +} + +export type AssetApiResponse = { + asset_code: AddressOrEth; + decimals: number; + icon_url: string; + name: string; + chain_id?: number; + price?: { + value: number; + changed_at: number; + relative_change_24h: number; + }; + symbol: string; + colors?: { primary?: string; fallback?: string; shadow?: string }; + network?: ChainName; + networks?: { + [chainId in ChainId]?: { + address: chainId extends ChainId.mainnet ? AddressOrEth : Address; + decimals: number; + }; + }; + type?: AssetType; + interface?: 'erc-721' | 'erc-1155'; +}; + +type AssetType = ProtocolType | 'nft'; + +export interface ZerionAsset { + asset_code: AddressOrEth; + colors?: { + primary: string; + fallback: string; + }; + implementations?: Record; + mainnet_address?: AddressOrEth; + name: string; + symbol: string; + decimals: number; + type?: AssetType; + icon_url?: string; + is_displayable?: boolean; + is_verified?: boolean; + price?: ZerionAssetPrice; + network?: ChainName; + bridging: { + bridgeable: boolean; + networks: { [id in ChainId]?: { bridgeable: boolean } }; + }; +} + +// protocols https://github.com/rainbow-me/go-utils-lib/blob/master/pkg/enums/token_type.go#L44 +export type ProtocolType = + | 'aave-v2' + | 'balancer' + | 'curve' + | 'compound' + | 'compound-v3' + | 'maker' + | 'one-inch' + | 'piedao-pool' + | 'yearn' + | 'yearn-v2' + | 'uniswap-v2' + | 'aave-v3' + | 'harvest' + | 'lido' + | 'uniswap-v3' + | 'convex' + | 'convex-frax' + | 'pancake-swap' + | 'balancer-v2' + | 'frax' + | 'gmx' + | 'aura' + | 'pickle' + | 'yearn-v3' + | 'venus' + | 'sushiswap'; + +export type AssetMetadata = { + circulatingSupply: number; + colors?: { primary: string; fallback?: string; shadow?: string }; + decimals: number; + description: string; + fullyDilutedValuation: number; + iconUrl: string; + marketCap: number; + name: string; + networks?: { + [chainId in ChainId]?: { + address: chainId extends ChainId.mainnet ? AddressOrEth : Address; + decimals: number; + }; + }; + price: { + value: number; + relativeChange24h: number; + }; + symbol: string; + totalSupply: number; + volume1d: number; +}; + +export type UniqueId = `${Address}_${ChainId}`; diff --git a/src/__swaps__/screens/Swap/types/chains.ts b/src/__swaps__/screens/Swap/types/chains.ts new file mode 100644 index 00000000000..bb8480a686e --- /dev/null +++ b/src/__swaps__/screens/Swap/types/chains.ts @@ -0,0 +1,232 @@ +import * as chain from 'viem/chains'; +import type { Chain as _Chain } from 'viem/chains'; + +export type Chain = _Chain & { + network: string; +}; + +const HARDHAT_CHAIN_ID = 1337; +const BLAST_CHAIN_ID = 81457; +const HARDHAT_OP_CHAIN_ID = 1338; + +export const chainHardhat: Chain = { + id: HARDHAT_CHAIN_ID, + name: 'Hardhat', + network: 'hardhat', + nativeCurrency: { + decimals: 18, + name: 'Hardhat', + symbol: 'ETH', + }, + rpcUrls: { + public: { http: ['http://127.0.0.1:8545'] }, + default: { http: ['http://127.0.0.1:8545'] }, + }, + testnet: true, +}; + +export const chainBlast: Chain = { + id: BLAST_CHAIN_ID, + name: 'Blast', + network: 'blast', + rpcUrls: { + public: { http: [process.env.BLAST_MAINNET_RPC as string] }, + default: { + http: [process.env.BLAST_MAINNET_RPC as string], + }, + }, + blockExplorers: { + default: { name: 'Blastscan', url: 'https://blastscan.io/' }, + }, + nativeCurrency: { + name: 'Blast', + symbol: 'BLAST', + decimals: 18, + }, +}; + +export const chainHardhatOptimism: Chain = { + id: HARDHAT_OP_CHAIN_ID, + name: 'Hardhat OP', + network: 'hardhat-optimism', + nativeCurrency: { + decimals: 18, + name: 'Hardhat OP', + symbol: 'ETH', + }, + rpcUrls: { + public: { http: ['http://127.0.0.1:8545'] }, + default: { http: ['http://127.0.0.1:8545'] }, + }, + testnet: true, +}; + +export enum ChainName { + arbitrum = 'arbitrum', + arbitrumNova = 'arbitrum-nova', + arbitrumSepolia = 'arbitrum-sepolia', + avalanche = 'avalanche', + avalancheFuji = 'avalanche-fuji', + base = 'base', + blast = 'blast', + bsc = 'bsc', + celo = 'celo', + gnosis = 'gnosis', + linea = 'linea', + manta = 'manta', + optimism = 'optimism', + polygon = 'polygon', + polygonZkEvm = 'polygon-zkevm', + rari = 'rari', + scroll = 'scroll', + zora = 'zora', + mainnet = 'mainnet', + holesky = 'holesky', + hardhat = 'hardhat', + hardhatOptimism = 'hardhat-optimism', + goerli = 'goerli', + sepolia = 'sepolia', + optimismSepolia = 'optimism-sepolia', + bscTestnet = 'bsc-testnet', + polygonMumbai = 'polygon-mumbai', + arbitrumGoerli = 'arbitrum-goerli', + baseSepolia = 'base-sepolia', + zoraSepolia = 'zora-sepolia', +} + +export enum ChainId { + arbitrum = chain.arbitrum.id, + arbitrumNova = chain.arbitrumNova.id, + avalanche = chain.avalanche.id, + avalancheFuji = chain.avalancheFuji.id, + base = chain.base.id, + blast = BLAST_CHAIN_ID, + bsc = chain.bsc.id, + celo = chain.celo.id, + gnosis = chain.gnosis.id, + linea = chain.linea.id, + manta = chain.manta.id, + optimism = chain.optimism.id, + mainnet = chain.mainnet.id, + polygon = chain.polygon.id, + polygonZkEvm = chain.polygonZkEvm.id, + rari = 1380012617, + zora = chain.zora.id, + hardhat = HARDHAT_CHAIN_ID, + hardhatOptimism = chainHardhatOptimism.id, + goerli = chain.goerli.id, + sepolia = chain.sepolia.id, + scroll = chain.scroll.id, + holesky = chain.holesky.id, + optimismSepolia = chain.optimismSepolia.id, + bscTestnet = chain.bscTestnet.id, + polygonMumbai = chain.polygonMumbai.id, + arbitrumGoerli = chain.arbitrumGoerli.id, + arbitrumSepolia = chain.arbitrumSepolia.id, + baseSepolia = chain.baseSepolia.id, + zoraSepolia = chain.zoraSepolia.id, +} + +export const chainNameToIdMapping: { + [key in ChainName | 'ethereum' | 'ethereum-sepolia']: ChainId; +} = { + ['ethereum']: ChainId.mainnet, + [ChainName.arbitrum]: ChainId.arbitrum, + [ChainName.arbitrumNova]: ChainId.arbitrumNova, + [ChainName.arbitrumSepolia]: ChainId.arbitrumSepolia, + [ChainName.avalanche]: ChainId.avalanche, + [ChainName.avalancheFuji]: ChainId.avalancheFuji, + [ChainName.base]: ChainId.base, + [ChainName.bsc]: ChainId.bsc, + [ChainName.celo]: ChainId.celo, + [ChainName.gnosis]: ChainId.gnosis, + [ChainName.linea]: ChainId.linea, + [ChainName.manta]: ChainId.manta, + [ChainName.optimism]: ChainId.optimism, + [ChainName.polygon]: ChainId.polygon, + [ChainName.polygonZkEvm]: ChainId.polygonZkEvm, + [ChainName.rari]: ChainId.rari, + [ChainName.scroll]: ChainId.scroll, + [ChainName.zora]: ChainId.zora, + [ChainName.mainnet]: ChainId.mainnet, + [ChainName.holesky]: ChainId.holesky, + [ChainName.hardhat]: ChainId.hardhat, + [ChainName.hardhatOptimism]: ChainId.hardhatOptimism, + [ChainName.goerli]: ChainId.goerli, + ['ethereum-sepolia']: ChainId.sepolia, + [ChainName.sepolia]: ChainId.sepolia, + [ChainName.optimismSepolia]: ChainId.optimismSepolia, + [ChainName.bscTestnet]: ChainId.bscTestnet, + [ChainName.polygonMumbai]: ChainId.polygonMumbai, + [ChainName.arbitrumGoerli]: ChainId.arbitrumGoerli, + [ChainName.baseSepolia]: ChainId.baseSepolia, + [ChainName.zoraSepolia]: ChainId.zoraSepolia, + [ChainName.blast]: ChainId.blast, +}; + +export const chainIdToNameMapping: { + [key in ChainId]: ChainName; +} = { + [ChainId.arbitrum]: ChainName.arbitrum, + [ChainId.arbitrumNova]: ChainName.arbitrumNova, + [ChainId.arbitrumSepolia]: ChainName.arbitrumSepolia, + [ChainId.avalanche]: ChainName.avalanche, + [ChainId.avalancheFuji]: ChainName.avalancheFuji, + [ChainId.base]: ChainName.base, + [ChainId.blast]: ChainName.blast, + [ChainId.bsc]: ChainName.bsc, + [ChainId.celo]: ChainName.celo, + [ChainId.gnosis]: ChainName.gnosis, + [ChainId.linea]: ChainName.linea, + [ChainId.manta]: ChainName.manta, + [ChainId.optimism]: ChainName.optimism, + [ChainId.polygon]: ChainName.polygon, + [ChainId.polygonZkEvm]: ChainName.polygonZkEvm, + [ChainId.rari]: ChainName.rari, + [ChainId.scroll]: ChainName.scroll, + [ChainId.zora]: ChainName.zora, + [ChainId.mainnet]: ChainName.mainnet, + [ChainId.holesky]: ChainName.holesky, + [ChainId.hardhat]: ChainName.hardhat, + [ChainId.hardhatOptimism]: ChainName.hardhatOptimism, + [ChainId.goerli]: ChainName.goerli, + [ChainId.sepolia]: ChainName.sepolia, + [ChainId.optimismSepolia]: ChainName.optimismSepolia, + [ChainId.bscTestnet]: ChainName.bscTestnet, + [ChainId.polygonMumbai]: ChainName.polygonMumbai, + [ChainId.arbitrumGoerli]: ChainName.arbitrumGoerli, + [ChainId.baseSepolia]: ChainName.baseSepolia, + [ChainId.zoraSepolia]: ChainName.zoraSepolia, +}; + +export const ChainNameDisplay = { + [ChainId.arbitrum]: 'Arbitrum', + [ChainId.arbitrumNova]: chain.arbitrumNova.name, + [ChainId.avalanche]: 'Avalanche', + [ChainId.avalancheFuji]: 'Avalanche Fuji', + [ChainId.base]: 'Base', + [ChainId.blast]: 'Blast', + [ChainId.bsc]: 'BSC', + [ChainId.celo]: chain.celo.name, + [ChainId.linea]: 'Linea', + [ChainId.manta]: 'Manta', + [ChainId.optimism]: 'Optimism', + [ChainId.polygon]: 'Polygon', + [ChainId.polygonZkEvm]: chain.polygonZkEvm.name, + [ChainId.rari]: 'RARI Chain', + [ChainId.scroll]: chain.scroll.name, + [ChainId.zora]: 'Zora', + [ChainId.mainnet]: 'Ethereum', + [ChainId.hardhat]: 'Hardhat', + [ChainId.hardhatOptimism]: chainHardhatOptimism.name, + [ChainId.goerli]: chain.goerli.name, + [ChainId.sepolia]: chain.sepolia.name, + [ChainId.holesky]: chain.holesky.name, + [ChainId.optimismSepolia]: chain.optimismSepolia.name, + [ChainId.bscTestnet]: 'BSC Testnet', + [ChainId.polygonMumbai]: chain.polygonMumbai.name, + [ChainId.arbitrumGoerli]: chain.arbitrumGoerli.name, + [ChainId.arbitrumSepolia]: chain.arbitrumSepolia.name, + [ChainId.baseSepolia]: chain.baseSepolia.name, + [ChainId.zoraSepolia]: 'Zora Sepolia', +} as const; diff --git a/src/__swaps__/screens/Swap/types/search.ts b/src/__swaps__/screens/Swap/types/search.ts new file mode 100644 index 00000000000..1b340ebcbe7 --- /dev/null +++ b/src/__swaps__/screens/Swap/types/search.ts @@ -0,0 +1,33 @@ +import { Address } from 'viem'; + +import { AddressOrEth, ParsedAsset, UniqueId } from '@/__swaps__/screens/Swap/types/assets'; +import { ChainId } from '@/__swaps__/screens/Swap/types/chains'; + +export type TokenSearchAssetKey = keyof ParsedAsset; + +export type TokenSearchThreshold = 'CONTAINS' | 'CASE_SENSITIVE_EQUAL'; + +export type TokenSearchListId = 'highLiquidityAssets' | 'lowLiquidityAssets' | 'verifiedAssets'; + +export type SearchAsset = { + address: AddressOrEth; + chainId: ChainId; + colors?: { primary?: string; fallback?: string }; + decimals: number; + highLiquidity: boolean; + icon_url: string; + isRainbowCurated: boolean; + isNativeAsset: boolean; + isVerified: boolean; + mainnetAddress: AddressOrEth; + name: string; + networks: { + [chainId in ChainId]?: { + address: chainId extends ChainId.mainnet ? AddressOrEth : Address; + decimals: number; + }; + }; + rainbowMetadataId: number; + symbol: string; + uniqueId: UniqueId; +}; diff --git a/src/__swaps__/screens/Swap/types.ts b/src/__swaps__/screens/Swap/types/swap.ts similarity index 100% rename from src/__swaps__/screens/Swap/types.ts rename to src/__swaps__/screens/Swap/types/swap.ts diff --git a/src/__swaps__/screens/Swap/utils/assets.ts b/src/__swaps__/screens/Swap/utils/assets.ts new file mode 100644 index 00000000000..ed3d9c685db --- /dev/null +++ b/src/__swaps__/screens/Swap/utils/assets.ts @@ -0,0 +1,340 @@ +import { AddressZero } from '@ethersproject/constants'; +import isValidDomain from 'is-valid-domain'; + +import { ETH_ADDRESS, SupportedCurrencyKey } from '@/references'; +import { + AddressOrEth, + AssetApiResponse, + AssetMetadata, + ParsedAsset, + ParsedSearchAsset, + ParsedUserAsset, + UniqueId, + ZerionAsset, + ZerionAssetPrice, +} from '@/__swaps__/screens/Swap/types/assets'; +import { ChainId, ChainName } from '@/__swaps__/screens/Swap/types/chains'; + +import * as i18n from '@/languages'; +import { SearchAsset } from '../types/search'; + +import { chainIdFromChainName, chainNameFromChainId, customChainIdsToAssetNames, isNativeAsset } from './chains'; +import { + convertAmountAndPriceToNativeDisplay, + convertAmountToBalanceDisplay, + convertAmountToNativeDisplay, + convertAmountToPercentageDisplay, + convertRawAmountToDecimalFormat, +} from './numbers'; + +const get24HrChange = (priceData?: ZerionAssetPrice) => { + const twentyFourHrChange = priceData?.relative_change_24h; + return twentyFourHrChange ? convertAmountToPercentageDisplay(twentyFourHrChange) : ''; +}; + +export const getCustomChainIconUrl = (chainId: ChainId, address: AddressOrEth) => { + if (!chainId || !customChainIdsToAssetNames[chainId]) return ''; + const baseUrl = 'https://raw.githubusercontent.com/rainbow-me/assets/master/blockchains/'; + + if (address === AddressZero || address === ETH_ADDRESS) { + return `${baseUrl}${customChainIdsToAssetNames[chainId]}/info/logo.png`; + } else { + return `${baseUrl}${customChainIdsToAssetNames[chainId]}/assets/${address}/logo.png`; + } +}; + +export const getNativeAssetPrice = ({ priceData, currency }: { priceData?: ZerionAssetPrice; currency: SupportedCurrencyKey }) => { + const priceUnit = priceData?.value; + return { + change: get24HrChange(priceData), + amount: priceUnit || 0, + display: convertAmountToNativeDisplay(priceUnit || 0, currency), + }; +}; + +export const getNativeAssetBalance = ({ + currency, + priceUnit, + value, +}: { + currency: SupportedCurrencyKey; + decimals: number; + priceUnit: number; + value: string | number; +}) => { + return convertAmountAndPriceToNativeDisplay(value, priceUnit, currency); +}; + +const isZerionAsset = (asset: ZerionAsset | AssetApiResponse): asset is ZerionAsset => 'implementations' in asset || !('networks' in asset); + +const getUniqueIdForAsset = ({ asset }: { asset: ZerionAsset | AssetApiResponse }): UniqueId => { + const address = asset.asset_code; + const chainName = asset.network ?? ChainName.mainnet; + const networks = 'networks' in asset ? asset.networks || {} : {}; + const chainId = ('chain_id' in asset && asset.chain_id) || chainIdFromChainName(chainName) || Number(Object.keys(networks)[0]); + + // ZerionAsset should be removed when we move fully away from websckets/refraction api + const mainnetAddress = isZerionAsset(asset) + ? asset.mainnet_address || asset.implementations?.[ChainName.mainnet]?.address || undefined + : networks[ChainId.mainnet]?.address; + + return `${mainnetAddress || address}_${chainId}`; +}; + +export function parseAsset({ asset, currency }: { asset: ZerionAsset | AssetApiResponse; currency: SupportedCurrencyKey }): ParsedAsset { + const address = asset.asset_code; + const chainName = asset.network ?? ChainName.mainnet; + const networks = 'networks' in asset ? asset.networks || {} : {}; + const chainId = ('chain_id' in asset && asset.chain_id) || chainIdFromChainName(chainName) || Number(Object.keys(networks)[0]); + + // ZerionAsset should be removed when we move fully away from websckets/refraction api + const mainnetAddress = isZerionAsset(asset) + ? asset.mainnet_address || asset.implementations?.[ChainName.mainnet]?.address || undefined + : networks[ChainId.mainnet]?.address; + + const standard = 'interface' in asset ? asset.interface : undefined; + const uniqueId = getUniqueIdForAsset({ asset }); + const parsedAsset = { + address, + uniqueId, + chainId, + chainName, + mainnetAddress, + isNativeAsset: isNativeAsset(address, chainId), + native: { + price: getNativeAssetPrice({ + currency, + priceData: asset?.price, + }), + }, + name: asset.name || i18n.t('tokens_tab.unknown_token'), + price: asset.price, + symbol: asset.symbol, + type: asset.type, + decimals: asset.decimals, + icon_url: asset.icon_url || getCustomChainIconUrl(chainId, address), + colors: asset.colors, + standard, + ...('networks' in asset && { networks: asset.networks }), + ...('bridging' in asset && { + bridging: { + isBridgeable: asset.bridging.bridgeable, + networks: asset.bridging.networks, + }, + }), + }; + + return parsedAsset; +} + +export function parseAssetMetadata({ + address, + asset, + chainId, + currency, +}: { + address: AddressOrEth; + asset: AssetMetadata; + chainId: ChainId; + currency: SupportedCurrencyKey; +}): ParsedAsset { + const mainnetAddress = asset.networks?.[ChainId.mainnet]?.address || address; + const uniqueId = getUniqueIdForAsset({ + asset: { + ...asset, + asset_code: address, + chain_id: chainId, + icon_url: '', + price: { + changed_at: -1, + relative_change_24h: asset.price.relativeChange24h, + value: asset.price.value, + }, + } as AssetApiResponse, + }); + const priceData = { + relative_change_24h: asset?.price?.relativeChange24h, + value: asset?.price?.value, + }; + const parsedAsset = { + address, + chainId, + chainName: chainNameFromChainId(chainId), + colors: asset?.colors, + decimals: asset?.decimals, + icon_url: asset?.iconUrl, + isNativeAsset: isNativeAsset(address, chainId), + mainnetAddress, + name: asset?.name || i18n.t('tokens_tab.unknown_token'), + native: { + price: getNativeAssetPrice({ + currency, + priceData, + }), + }, + price: priceData, + symbol: asset?.symbol, + uniqueId, + networks: asset?.networks, + } satisfies ParsedAsset; + return parsedAsset; +} + +export function parseUserAsset({ + asset, + currency, + balance, + smallBalance, +}: { + asset: ZerionAsset | AssetApiResponse; + currency: SupportedCurrencyKey; + balance: string; + smallBalance?: boolean; +}) { + const parsedAsset = parseAsset({ asset, currency }); + return parseUserAssetBalances({ + asset: parsedAsset, + currency, + balance, + smallBalance, + }); +} + +export function parseUserAssetBalances({ + asset, + currency, + balance, + smallBalance = false, +}: { + asset: ParsedAsset; + currency: SupportedCurrencyKey; + balance: string; + smallBalance?: boolean; +}) { + const { decimals, symbol, price } = asset; + const amount = convertRawAmountToDecimalFormat(balance, decimals); + + return { + ...asset, + balance: { + amount, + display: convertAmountToBalanceDisplay(amount, { decimals, symbol }), + }, + native: { + ...asset.native, + balance: getNativeAssetBalance({ + currency, + decimals, + priceUnit: price?.value || 0, + value: amount, + }), + }, + smallBalance, + }; +} + +export function parseParsedUserAsset({ + parsedAsset, + currency, + quantity, +}: { + parsedAsset: ParsedUserAsset; + currency: SupportedCurrencyKey; + quantity: string; +}): ParsedUserAsset { + const amount = convertRawAmountToDecimalFormat(quantity, parsedAsset?.decimals); + return { + ...parsedAsset, + balance: { + amount, + display: convertAmountToBalanceDisplay(amount, { + decimals: parsedAsset?.decimals, + symbol: parsedAsset?.symbol, + }), + }, + native: { + ...parsedAsset.native, + balance: getNativeAssetBalance({ + currency, + decimals: parsedAsset?.decimals, + priceUnit: parsedAsset?.price?.value || 0, + value: amount, + }), + }, + }; +} + +export const parseSearchAsset = ({ + assetWithPrice, + searchAsset, + userAsset, +}: { + assetWithPrice?: ParsedAsset; + searchAsset: ParsedSearchAsset | SearchAsset; + userAsset?: ParsedUserAsset; +}): ParsedSearchAsset => ({ + ...searchAsset, + address: searchAsset.address, + chainId: searchAsset.chainId, + chainName: chainNameFromChainId(searchAsset.chainId), + native: { + balance: userAsset?.native.balance || { + amount: '0', + display: '0.00', + }, + price: assetWithPrice?.native.price || userAsset?.native?.price, + }, + price: assetWithPrice?.price || userAsset?.price, + balance: userAsset?.balance || { amount: '0', display: '0.00' }, + icon_url: userAsset?.icon_url || assetWithPrice?.icon_url || searchAsset?.icon_url, + colors: userAsset?.colors || assetWithPrice?.colors || searchAsset?.colors, + type: userAsset?.type || assetWithPrice?.type, +}); + +export function filterAsset(asset: ZerionAsset) { + const nameFragments = asset?.name?.split(' '); + const nameContainsURL = nameFragments.some(f => isValidDomain(f)); + const symbolFragments = asset?.symbol?.split(' '); + const symbolContainsURL = symbolFragments.some(f => isValidDomain(f)); + const shouldFilter = nameContainsURL || symbolContainsURL; + return shouldFilter; +} + +const assetQueryFragment = ( + address: AddressOrEth, + chainId: ChainId, + currency: SupportedCurrencyKey, + index: number, + withPrice?: boolean +) => { + const priceQuery = withPrice ? 'price { value relativeChange24h }' : ''; + return `Q${index}: token(address: "${address}", chainID: ${chainId}, currency: "${currency}") { + colors { + primary + fallback + shadow + } + decimals + iconUrl + name + networks + symbol + ${priceQuery} + }`; +}; + +export const chunkArray = (arr: TItem[], chunkSize: number) => { + const result = []; + + for (let i = 0; i < arr.length; i += chunkSize) { + result.push(arr.slice(i, i + chunkSize)); + } + + return result; +}; + +export const createAssetQuery = (addresses: AddressOrEth[], chainId: ChainId, currency: SupportedCurrencyKey, withPrice?: boolean) => { + return `{ + ${addresses.map((a, i) => assetQueryFragment(a, chainId, currency, i, withPrice)).join(',')} + }`; +}; diff --git a/src/__swaps__/screens/Swap/utils/chains.ts b/src/__swaps__/screens/Swap/utils/chains.ts new file mode 100644 index 00000000000..e726a3b4327 --- /dev/null +++ b/src/__swaps__/screens/Swap/utils/chains.ts @@ -0,0 +1,175 @@ +import { AddressZero } from '@ethersproject/constants'; +import { celo, fantom, harmonyOne, moonbeam } from 'viem/chains'; + +import { ChainId, ChainName, ChainNameDisplay, chainIdToNameMapping, chainNameToIdMapping } from '@/__swaps__/screens/Swap/types/chains'; + +import { AddressOrEth } from '../types/assets'; + +import { isLowerCaseMatch } from './strings'; +import { ETH_ADDRESS } from '@/references'; +import { Address } from 'viem'; +import { getNetworkFromChainId } from '@/utils/ethereumUtils'; + +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore +export const customChainIdsToAssetNames: Record = { + 42170: 'arbitrumnova', + 1313161554: 'aurora', + 43114: 'avalanchex', + 81457: 'blast', + 168587773: 'blastsepolia', + 288: 'boba', + 42220: 'celo', + 61: 'classic', + 25: 'cronos', + 2000: 'dogechain', + 250: 'fantom', + 314: 'filecoin', + 1666600000: 'harmony', + 13371: 'immutablezkevm', + 2222: 'kavaevm', + 8217: 'klaytn', + 59144: 'linea', + 957: 'lyra', + 169: 'manta', + 5000: 'mantle', + 1088: 'metis', + 34443: 'mode', + 1284: 'moonbeam', + 7700: 'nativecanto', + 204: 'opbnb', + 11297108109: 'palm', + 424: 'pgn', + 1101: 'polygonzkevm', + 369: 'pulsechain', + 1380012617: 'rari', + 1918988905: 'raritestnet', + 17001: 'redstoneholesky', + 534352: 'scroll', + 100: 'xdai', + 324: 'zksync', +}; + +export const NATIVE_ASSETS_PER_CHAIN: Record = { + [ChainId.mainnet]: ETH_ADDRESS as Address, + [ChainId.hardhat]: AddressZero as Address, + [ChainId.goerli]: AddressZero as Address, + [ChainId.sepolia]: AddressZero as Address, + [ChainId.holesky]: AddressZero as Address, + [ChainId.arbitrum]: AddressZero as Address, + [ChainId.arbitrumGoerli]: AddressZero as Address, + [ChainId.arbitrumSepolia]: AddressZero as Address, + [ChainId.bsc]: AddressZero as Address, + [ChainId.bscTestnet]: AddressZero as Address, + [ChainId.optimism]: AddressZero as Address, + [ChainId.hardhatOptimism]: AddressZero as Address, + [ChainId.optimismSepolia]: AddressZero as Address, + [ChainId.rari]: AddressZero as Address, + [ChainId.base]: AddressZero as Address, + [ChainId.baseSepolia]: AddressZero as Address, + [ChainId.zora]: AddressZero as Address, + [ChainId.zoraSepolia]: AddressZero as Address, + [ChainId.polygon]: AddressZero as Address, + [ChainId.polygonMumbai]: AddressZero as Address, + [ChainId.avalanche]: AddressZero as Address, + [ChainId.avalancheFuji]: AddressZero as Address, + [ChainId.blast]: AddressZero as Address, +}; + +export const getChainName = ({ chainId }: { chainId: number }) => { + const network = getNetworkFromChainId(chainId); + return ChainNameDisplay[chainId] || network; +}; + +/** + * @desc Checks if the given chain is a Layer 2. + * @param chain The chain name to check. + * @return Whether or not the chain is an L2 network. + */ +export const isL2Chain = (chain: ChainName | ChainId): boolean => { + switch (chain) { + case ChainName.arbitrum: + case ChainName.base: + case ChainName.bsc: + case ChainName.optimism: + case ChainName.polygon: + case ChainName.zora: + case ChainName.avalanche: + case ChainId.arbitrum: + case ChainId.base: + case ChainId.bsc: + case ChainId.optimism: + case ChainId.polygon: + case ChainId.zora: + case ChainId.avalanche: + return true; + default: + return false; + } +}; + +export function isNativeAsset(address: AddressOrEth, chainId: ChainId) { + return isLowerCaseMatch(NATIVE_ASSETS_PER_CHAIN[chainId], address); +} + +export function chainIdFromChainName(chainName: ChainName) { + return chainNameToIdMapping[chainName]; +} + +export function chainNameFromChainId(chainId: ChainId): ChainName { + return chainIdToNameMapping[chainId]; +} + +export const chainIdToUse = (connectedToHardhat: boolean, connectedToHardhatOp: boolean, activeSessionChainId: number) => { + if (connectedToHardhat) { + return ChainId.hardhat; + } + if (connectedToHardhatOp) { + return ChainId.hardhatOptimism; + } + return activeSessionChainId; +}; + +export const deriveChainIdByHostname = (hostname: string) => { + switch (hostname) { + case 'etherscan.io': + return ChainId.mainnet; + case 'goerli.etherscan.io': + return ChainId.goerli; + case 'arbiscan.io': + return ChainId.arbitrum; + case 'explorer-mumbai.maticvigil.com': + case 'explorer-mumbai.matic.today': + case 'mumbai.polygonscan.com': + return ChainId.polygonMumbai; + case 'polygonscan.com': + return ChainId.polygon; + case 'optimistic.etherscan.io': + return ChainId.optimism; + case 'bscscan.com': + return ChainId.bsc; + case 'ftmscan.com': + return fantom.id; + case 'explorer.celo.org': + return celo.id; + case 'explorer.harmony.one': + return harmonyOne.id; + case 'explorer.avax.network': + case 'subnets.avax.network': + case 'snowtrace.io': + return ChainId.avalanche; + case 'subnets-test.avax.network': + case 'testnet.snowtrace.io': + return ChainId.avalancheFuji; + case 'moonscan.io': + return moonbeam.id; + case 'explorer.holesky.redstone.xyz': + return 17001; + case 'blastscan.io': + return ChainId.blast; + case 'testnet.blastscan.io': + return 168587773; + default: + return ChainId.mainnet; + } +}; diff --git a/src/__swaps__/screens/Swap/utils/hex.ts b/src/__swaps__/screens/Swap/utils/hex.ts new file mode 100644 index 00000000000..7e540be352c --- /dev/null +++ b/src/__swaps__/screens/Swap/utils/hex.ts @@ -0,0 +1,30 @@ +import { isHexString } from '@ethersproject/bytes'; +import BigNumber from 'bignumber.js'; +import { startsWith } from 'lodash'; + +export type BigNumberish = number | string | BigNumber; + +/** + * @desc Checks if a hex string, ignoring prefixes and suffixes. + * @param value The string. + * @return Whether or not the string is a hex string. + */ +export const isHexStringIgnorePrefix = (value: string): boolean => { + if (!value) return false; + const trimmedValue = value.trim(); + const updatedValue = addHexPrefix(trimmedValue); + return isHexString(updatedValue); +}; + +/** + * @desc Adds an "0x" prefix to a string if one is not present. + * @param value The starting string. + * @return The prefixed string. + */ +export const addHexPrefix = (value: string): string => (startsWith(value, '0x') ? value : `0x${value}`); + +export const convertStringToHex = (stringToConvert: string): string => new BigNumber(stringToConvert).toString(16); + +export const toHex = (stringToConvert: string): string => addHexPrefix(convertStringToHex(stringToConvert)); + +export const toHexNoLeadingZeros = (value: string): string => toHex(value).replace(/^0x0*/, '0x'); diff --git a/src/__swaps__/screens/Swap/utils/numbers.ts b/src/__swaps__/screens/Swap/utils/numbers.ts new file mode 100644 index 00000000000..42f7ba22704 --- /dev/null +++ b/src/__swaps__/screens/Swap/utils/numbers.ts @@ -0,0 +1,309 @@ +import { BigNumber as EthersBigNumber } from '@ethersproject/bignumber'; +import BigNumber from 'bignumber.js'; +import currency from 'currency.js'; +import { isNil } from 'lodash'; + +import { supportedNativeCurrencies } from '@/references'; +import { BigNumberish } from '@/__swaps__/screens/Swap/utils/hex'; + +type nativeCurrencyType = typeof supportedNativeCurrencies; + +export const toBigNumber = (v?: string | number | BigNumber) => (v ? EthersBigNumber.from(v) : undefined); + +export const abs = (value: BigNumberish): string => new BigNumber(value).abs().toFixed(); + +export const isPositive = (value: BigNumberish): boolean => new BigNumber(value).isPositive(); + +export const subtract = (numberOne: BigNumberish, numberTwo: BigNumberish): string => + new BigNumber(numberOne).minus(new BigNumber(numberTwo)).toFixed(); + +export const convertAmountToRawAmount = (value: BigNumberish, decimals: number | string): string => + new BigNumber(value).times(new BigNumber(10).pow(decimals)).toFixed(); + +export const isZero = (value: BigNumberish): boolean => new BigNumber(value).isZero(); + +export const toFixedDecimals = (value: BigNumberish, decimals: number): string => new BigNumber(value).toFixed(decimals); + +export const convertNumberToString = (value: BigNumberish): string => new BigNumber(value).toFixed(); + +export const greaterThan = (numberOne: BigNumberish, numberTwo: BigNumberish): boolean => new BigNumber(numberOne).gt(numberTwo); + +export const greaterThanOrEqualTo = (numberOne: BigNumberish, numberTwo: BigNumberish): boolean => new BigNumber(numberOne).gte(numberTwo); + +export const isEqual = (numberOne: BigNumberish, numberTwo: BigNumberish): boolean => new BigNumber(numberOne).eq(numberTwo); + +export const formatFixedDecimals = (value: BigNumberish, decimals: number): string => { + const _value = convertNumberToString(value); + const _decimals = convertStringToNumber(decimals); + return new BigNumber(new BigNumber(_value).toFixed(_decimals)).toFixed(); +}; + +export const mod = (numberOne: BigNumberish, numberTwo: BigNumberish): string => + new BigNumber(numberOne).mod(new BigNumber(numberTwo)).toFixed(); + +/** + * @desc real floor divides two numbers + * @param {Number} numberOne + * @param {Number} numberTwo + * @return {String} + */ +export const floorDivide = (numberOne: BigNumberish, numberTwo: BigNumberish): string => + new BigNumber(numberOne).dividedToIntegerBy(new BigNumber(numberTwo)).toFixed(); + +/** + * @desc count value's number of decimals places + * @param {String} value + * @return {String} + */ +export const countDecimalPlaces = (value: BigNumberish): number => new BigNumber(value).dp(); + +/** + * @desc update the amount to display precision + * equivalent to ~0.01 of the native price + * or use most significant decimal + * if the updated precision amounts to zero + * @param {String} amount + * @param {String} nativePrice + * @param {Boolean} use rounding up mode + * @return {String} updated amount + */ +export const updatePrecisionToDisplay = (amount: BigNumberish, nativePrice?: BigNumberish, roundUp = false): string => { + if (!amount) return '0'; + const roundingMode = roundUp ? BigNumber.ROUND_UP : BigNumber.ROUND_DOWN; + if (!nativePrice) return new BigNumber(amount).decimalPlaces(6, roundingMode).toFixed(); + const bnAmount = new BigNumber(amount); + const significantDigitsOfNativePriceInteger = new BigNumber(nativePrice).decimalPlaces(0, BigNumber.ROUND_DOWN).sd(true); + const truncatedPrecision = new BigNumber(significantDigitsOfNativePriceInteger).plus(2, 10).toNumber(); + const truncatedAmount = bnAmount.decimalPlaces(truncatedPrecision, BigNumber.ROUND_DOWN); + return truncatedAmount.isZero() + ? new BigNumber(bnAmount.toPrecision(1, roundingMode)).toFixed() + : bnAmount.decimalPlaces(truncatedPrecision, roundingMode).toFixed(); +}; + +/** + * @desc format inputOne value to signficant decimals given inputTwo + * @param {String} inputOne + * @param {String} inputTwo + * @return {String} + */ +// TODO revisit logic, at least rename so it is not native amount dp +export const formatInputDecimals = (inputOne: BigNumberish, inputTwo: BigNumberish): string => { + const _nativeAmountDecimalPlaces = countDecimalPlaces(inputTwo); + const decimals = _nativeAmountDecimalPlaces > 8 ? _nativeAmountDecimalPlaces : 8; + const result = new BigNumber(formatFixedDecimals(inputOne, decimals)).toFormat().replace(/,/g, ''); + return result; +}; + +export const add = (numberOne: BigNumberish, numberTwo: BigNumberish): string => new BigNumber(numberOne).plus(numberTwo).toFixed(); + +export const minus = (numberOne: BigNumberish, numberTwo: BigNumberish): string => new BigNumber(numberOne).minus(numberTwo).toFixed(); + +export const addDisplay = (numberOne: string, numberTwo: string): string => { + const unit = numberOne.replace(/[\d.-]/g, ''); + const leftAlignedUnit = numberOne.indexOf(unit) === 0; + return currency(0, { symbol: unit, pattern: leftAlignedUnit ? '!#' : '#!' }) + .add(numberOne) + .add(numberTwo) + .format(); +}; + +export const multiply = (numberOne: BigNumberish, numberTwo: BigNumberish): string => new BigNumber(numberOne).times(numberTwo).toFixed(); + +export const addBuffer = (numberOne: BigNumberish, buffer: BigNumberish = '1.2'): string => + new BigNumber(numberOne).times(buffer).toFixed(0); + +export const divide = (numberOne: BigNumberish, numberTwo: BigNumberish): string => { + if (!(numberOne || numberTwo)) return '0'; + return new BigNumber(numberOne).dividedBy(numberTwo).toFixed(); +}; + +export const fraction = (target: BigNumberish, numerator: BigNumberish, denominator: BigNumberish): string => { + if (!target || !numerator || !denominator) return '0'; + return new BigNumber(target).times(numerator).dividedBy(denominator).toFixed(0); +}; + +/** + * @desc convert to asset amount units from native price value units + * @param {String} value + * @param {Object} asset + * @param {Number} priceUnit + * @return {String} + */ +export const convertAmountFromNativeValue = (value: BigNumberish, priceUnit: BigNumberish, decimals = 18): string => { + if (isNil(priceUnit) || isZero(priceUnit)) return '0'; + return new BigNumber(new BigNumber(value).dividedBy(priceUnit).toFixed(decimals, BigNumber.ROUND_DOWN)).toFixed(); +}; + +export const convertStringToNumber = (value: BigNumberish) => new BigNumber(value).toNumber(); + +export const lessThan = (numberOne: BigNumberish, numberTwo: BigNumberish): boolean => new BigNumber(numberOne).lt(numberTwo); + +export const lessOrEqualThan = (numberOne: BigNumberish, numberTwo: BigNumberish): boolean => + new BigNumber(numberOne).lt(numberTwo) || new BigNumber(numberOne).eq(numberTwo); + +export const handleSignificantDecimalsWithThreshold = (value: BigNumberish, decimals: number, threshold = '0.0001') => { + const result = toFixedDecimals(value, decimals); + return lessThan(result, threshold) ? `< ${threshold}` : result; +}; + +export const handleSignificantDecimals = (value: BigNumberish, decimals: number, buffer = 3, skipDecimals = false): string => { + let dec; + if (lessThan(new BigNumber(value).abs(), 1)) { + dec = new BigNumber(value).toFixed()?.slice?.(2).search(/[^0]/g) + buffer; + dec = Math.min(decimals, 8); + } else { + dec = Math.min(decimals, buffer); + } + const result = new BigNumber(new BigNumber(value).toFixed(dec)).toFixed(); + const resultBN = new BigNumber(result); + return resultBN.dp() <= 2 ? resultBN.toFormat(skipDecimals ? 0 : 2) : resultBN.toFormat(); +}; + +export const handleSignificantDecimalsAsNumber = (value: BigNumberish, decimals: number): string => { + return new BigNumber(new BigNumber(multiply(value, new BigNumber(10).pow(decimals))).toFixed(0)) + .dividedBy(new BigNumber(10).pow(decimals)) + .toFixed(); +}; + +/** + * @desc convert from asset BigNumber amount to native price BigNumber amount + */ +export const convertAmountToNativeAmount = (amount: BigNumberish, priceUnit: BigNumberish): string => multiply(amount, priceUnit); + +/** + * @desc convert from amount to display formatted string + */ +export const convertAmountAndPriceToNativeDisplay = ( + amount: BigNumberish, + priceUnit: BigNumberish, + nativeCurrency: keyof nativeCurrencyType, + buffer?: number, + skipDecimals = false +): { amount: string; display: string } => { + const nativeBalanceRaw = convertAmountToNativeAmount(amount, priceUnit); + const nativeDisplay = convertAmountToNativeDisplay(nativeBalanceRaw, nativeCurrency, buffer, skipDecimals); + return { + amount: nativeBalanceRaw, + display: nativeDisplay, + }; +}; + +export const convertAmountAndPriceToNativeDisplayWithThreshold = ( + amount: BigNumberish, + priceUnit: BigNumberish, + nativeCurrency: keyof nativeCurrencyType +): { amount: string; display: string } => { + const nativeBalanceRaw = convertAmountToNativeAmount(amount, priceUnit); + const nativeDisplay = convertAmountToNativeDisplayWithThreshold(nativeBalanceRaw, nativeCurrency); + return { + amount: nativeBalanceRaw, + display: nativeDisplay, + }; +}; + +/** + * @desc convert from raw amount to display formatted string + */ +export const convertRawAmountToNativeDisplay = ( + rawAmount: BigNumberish, + assetDecimals: number, + priceUnit: BigNumberish, + nativeCurrency: keyof nativeCurrencyType, + buffer?: number +) => { + const assetBalance = convertRawAmountToDecimalFormat(rawAmount, assetDecimals); + const ret = convertAmountAndPriceToNativeDisplay(assetBalance, priceUnit, nativeCurrency, buffer); + return ret; +}; + +/** + * @desc convert from raw amount to balance object + */ +export const convertRawAmountToBalance = (value: BigNumberish, asset: { decimals: number; symbol?: string }, buffer?: number) => { + const decimals = asset?.decimals ?? 18; + const assetBalance = convertRawAmountToDecimalFormat(value, decimals); + + return { + amount: assetBalance, + display: convertAmountToBalanceDisplay(assetBalance, asset, buffer), + }; +}; + +/** + * @desc convert from amount value to display formatted string + */ +export const convertAmountToBalanceDisplay = (value: BigNumberish, asset: { decimals: number; symbol?: string }, buffer?: number) => { + const decimals = asset?.decimals ?? 18; + const display = handleSignificantDecimals(value, decimals, buffer); + return `${display} ${asset?.symbol || ''}`; +}; + +/** + * @desc convert from amount to display formatted string + */ +export const convertAmountToPercentageDisplay = (value: BigNumberish, buffer?: number, skipDecimals?: boolean, decimals = 2): string => { + const display = handleSignificantDecimals(value, decimals, buffer, skipDecimals); + return `${display}%`; +}; + +/** + * @desc convert from amount to display formatted string + * with a threshold percent + */ +export const convertAmountToPercentageDisplayWithThreshold = (value: BigNumberish, decimals = 2, threshold = '0.0001'): string => { + if (lessThan(value, threshold)) { + return '< 0.01%'; + } else { + const display = new BigNumber(value).times(100).toFixed(decimals); + return `${display}%`; + } +}; + +/** + * @desc convert from bips amount to percentage format + */ +export const convertBipsToPercentage = (value: BigNumberish, decimals = 2): string => { + if (value === null) return '0'; + return new BigNumber(value || 0).shiftedBy(-2).toFixed(decimals); +}; + +/** + * @desc convert from amount value to display formatted string + */ +export const convertAmountToNativeDisplay = ( + value: BigNumberish, + nativeCurrency: keyof nativeCurrencyType, + buffer?: number, + skipDecimals?: boolean +) => { + const nativeSelected = supportedNativeCurrencies?.[nativeCurrency]; + const { decimals } = nativeSelected; + const display = handleSignificantDecimals(value, decimals, buffer, skipDecimals); + if (nativeSelected.alignment === 'left') { + return `${nativeSelected.symbol}${display}`; + } + return `${display} ${nativeSelected.symbol}`; +}; + +export const convertAmountToNativeDisplayWithThreshold = (value: BigNumberish, nativeCurrency: keyof nativeCurrencyType) => { + const nativeSelected = supportedNativeCurrencies?.[nativeCurrency]; + const display = handleSignificantDecimalsWithThreshold(value, nativeSelected.decimals, nativeSelected.decimals < 4 ? '0.01' : '0.0001'); + if (nativeSelected.alignment === 'left') { + return `${nativeSelected.symbol}${display}`; + } + return `${display} ${nativeSelected.symbol}`; +}; + +/** + * @desc convert from raw amount to decimal format + */ +export const convertRawAmountToDecimalFormat = (value: BigNumberish, decimals = 18): string => + new BigNumber(value).dividedBy(new BigNumber(10).pow(decimals)).toFixed(); + +/** + * @desc convert from decimal format to raw amount + */ +export const convertDecimalFormatToRawAmount = (value: string, decimals = 18): string => + new BigNumber(value).multipliedBy(new BigNumber(10).pow(decimals)).toFixed(0); + +export const fromWei = (number: BigNumberish): string => convertRawAmountToDecimalFormat(number, 18); diff --git a/src/__swaps__/screens/Swap/utils/strings.ts b/src/__swaps__/screens/Swap/utils/strings.ts new file mode 100644 index 00000000000..7462c0946df --- /dev/null +++ b/src/__swaps__/screens/Swap/utils/strings.ts @@ -0,0 +1,7 @@ +export const isLowerCaseMatch = (a?: string, b?: string) => a?.toLowerCase() === b?.toLowerCase(); + +export const capitalize = (s = '') => s.charAt(0).toUpperCase() + s.slice(1); + +export const truncateString = (txt = '', maxLength = 22) => { + return `${txt?.slice(0, maxLength)}${txt.length > maxLength ? '…' : ''}`; +}; diff --git a/src/__swaps__/screens/Swap/utils.ts b/src/__swaps__/screens/Swap/utils/swaps.ts similarity index 99% rename from src/__swaps__/screens/Swap/utils.ts rename to src/__swaps__/screens/Swap/utils/swaps.ts index a13acc6030b..171458fd743 100644 --- a/src/__swaps__/screens/Swap/utils.ts +++ b/src/__swaps__/screens/Swap/utils/swaps.ts @@ -1,6 +1,6 @@ import c from 'chroma-js'; import { globalColors } from '@/design-system'; -import { SCRUBBER_WIDTH, SLIDER_WIDTH } from './constants'; +import { SCRUBBER_WIDTH, SLIDER_WIDTH } from '../constants'; // /---- 🎨 Color functions 🎨 ----/ // // diff --git a/src/components/DappBrowser/WebViewBorder.tsx b/src/components/DappBrowser/WebViewBorder.tsx index 1dea4f5723d..8fcbab87274 100644 --- a/src/components/DappBrowser/WebViewBorder.tsx +++ b/src/components/DappBrowser/WebViewBorder.tsx @@ -4,7 +4,7 @@ import Animated, { interpolate, useAnimatedStyle } from 'react-native-reanimated import { Box, Cover, globalColors } from '@/design-system'; import { IS_ANDROID } from '@/env'; import { THICK_BORDER_WIDTH } from '@/__swaps__/screens/Swap/constants'; -import { opacity } from '@/__swaps__/screens/Swap/utils'; +import { opacity } from '@/__swaps__/screens/Swap/utils/swaps'; import { useBrowserContext } from './BrowserContext'; export const WebViewBorder = ({ enabled, isActiveTab }: { enabled?: boolean; isActiveTab: boolean }) => { diff --git a/src/components/DappBrowser/address-bar/AddressInput.tsx b/src/components/DappBrowser/address-bar/AddressInput.tsx index 0975bb292f5..da9e1c49949 100644 --- a/src/components/DappBrowser/address-bar/AddressInput.tsx +++ b/src/components/DappBrowser/address-bar/AddressInput.tsx @@ -11,7 +11,7 @@ import { ToolbarIcon } from '../BrowserToolbar'; import { IS_IOS } from '@/env'; import { FadeMask } from '@/__swaps__/screens/Swap/components/FadeMask'; import { THICK_BORDER_WIDTH } from '@/__swaps__/screens/Swap/constants'; -import { opacity } from '@/__swaps__/screens/Swap/utils'; +import { opacity } from '@/__swaps__/screens/Swap/utils/swaps'; import { DappBrowserShadows } from '../DappBrowserShadows'; const AnimatedBlurView = Animated.createAnimatedComponent(BlurView); diff --git a/src/components/DappBrowser/address-bar/TabButton.tsx b/src/components/DappBrowser/address-bar/TabButton.tsx index 531b5382019..985324f1056 100644 --- a/src/components/DappBrowser/address-bar/TabButton.tsx +++ b/src/components/DappBrowser/address-bar/TabButton.tsx @@ -1,5 +1,5 @@ import { THICK_BORDER_WIDTH } from '@/__swaps__/screens/Swap/constants'; -import { opacity } from '@/__swaps__/screens/Swap/utils'; +import { opacity } from '@/__swaps__/screens/Swap/utils/swaps'; import ButtonPressAnimation from '@/components/animations/ButtonPressAnimation'; import { Box, Text, globalColors, useColorMode, useForegroundColor } from '@/design-system'; import { IS_IOS } from '@/env'; From 9560f51d2488f1e2a7ba9a335368d628dca86ff9 Mon Sep 17 00:00:00 2001 From: Matthew Wall Date: Thu, 21 Mar 2024 16:16:30 -0600 Subject: [PATCH 02/44] fix crash (#5544) * fix crash * typo --- src/screens/SettingsSheet/SettingsPages.ts | 18 ++--- .../components/CurrencySection.tsx | 69 ++++++++----------- .../components/SettingsSection.tsx | 36 +++++----- 3 files changed, 53 insertions(+), 70 deletions(-) diff --git a/src/screens/SettingsSheet/SettingsPages.ts b/src/screens/SettingsSheet/SettingsPages.ts index e8c593746ca..45f9ef8956e 100644 --- a/src/screens/SettingsSheet/SettingsPages.ts +++ b/src/screens/SettingsSheet/SettingsPages.ts @@ -1,4 +1,4 @@ -import lang from 'i18n-js'; +import * as lang from '@/languages'; import Routes from '@/navigation/routesNames'; @@ -14,7 +14,7 @@ import NotificationsSection from './components/NotificationsSection'; export const SettingsPages = { appIcon: { component: AppIconSection, - getTitle: () => lang.t('settings.app_icon'), + getTitle: () => lang.t(lang.l.settings.app_icon), key: Routes.SETTINGS_SECTION_APP_ICON, }, backup: { @@ -24,37 +24,37 @@ export const SettingsPages = { }, currency: { component: CurrencySection, - getTitle: () => lang.t('settings.currency.title'), + getTitle: () => lang.t(lang.l.settings.currency.title), key: Routes.SETTINGS_SECTION_CURRENCY, }, default: { component: null, - getTitle: () => lang.t('settings.label'), + getTitle: () => lang.t(lang.l.settings.label), key: Routes.SETTINGS_SECTION, }, dev: { component: DevSection, - getTitle: () => lang.t('settings.dev'), + getTitle: () => lang.t(lang.l.settings.developer), key: Routes.SETTINGS_SECTION_DEV, }, language: { component: LanguageSection, - getTitle: () => lang.t('settings.language'), + getTitle: () => lang.t(lang.l.settings.language), key: Routes.SETTINGS_SECTION_LANGUAGE, }, network: { component: NetworkSection, - getTitle: () => lang.t('settings.network'), + getTitle: () => lang.t(lang.l.settings.network), key: Routes.SETTINGS_SECTION_NETWORK, }, notifications: { component: NotificationsSection, - getTitle: () => lang.t('settings.notifications'), + getTitle: () => lang.t(lang.l.settings.notifications), key: Routes.SETTINGS_SECTION_NOTIFICATIONS, }, privacy: { component: PrivacySection, - getTitle: () => lang.t('settings.privacy'), + getTitle: () => lang.t(lang.l.settings.privacy), key: Routes.SETTINGS_SECTION_PRIVACY, }, }; diff --git a/src/screens/SettingsSheet/components/CurrencySection.tsx b/src/screens/SettingsSheet/components/CurrencySection.tsx index f59b014b12a..ec28bed05a5 100644 --- a/src/screens/SettingsSheet/components/CurrencySection.tsx +++ b/src/screens/SettingsSheet/components/CurrencySection.tsx @@ -43,49 +43,34 @@ const CurrencySection = () => { ); return ( - - {({ backgroundColor }) => ( - - - - - - {i18n.t(i18n.l.settings.currency.title)} - - - - - - {currencyListItems.map(({ label, emojiName, currency }: any) => ( - - ) : ( - - - - ) - } - onPress={() => onSelectCurrency(currency)} - rightComponent={currency === nativeCurrency && } - size={52} - titleComponent={} + + + {currencyListItems.map(({ label, emojiName, currency }: any) => ( + + ) : ( + + - ))} - - - - - )} - + + ) + } + onPress={() => onSelectCurrency(currency)} + rightComponent={currency === nativeCurrency && } + size={52} + titleComponent={} + /> + ))} + + ); }; diff --git a/src/screens/SettingsSheet/components/SettingsSection.tsx b/src/screens/SettingsSheet/components/SettingsSection.tsx index 27325051dfa..cf45fdfca57 100644 --- a/src/screens/SettingsSheet/components/SettingsSection.tsx +++ b/src/screens/SettingsSheet/components/SettingsSection.tsx @@ -1,8 +1,7 @@ -import lang from 'i18n-js'; +import * as lang from '@/languages'; import React, { useCallback, useMemo } from 'react'; import { Linking, Share } from 'react-native'; import { ContextMenuButton, MenuActionConfig } from 'react-native-ios-context-menu'; -import { supportedLanguages } from '../../../languages'; import { AppVersionStamp } from '@/components/AppVersionStamp'; import Menu from './Menu'; import MenuContainer from './MenuContainer'; @@ -17,8 +16,6 @@ import DarkModeIcon from '@/assets/settingsDarkMode.png'; import DarkModeIconDark from '@/assets/settingsDarkModeDark.png'; import LanguageIcon from '@/assets/settingsLanguage.png'; import LanguageIconDark from '@/assets/settingsLanguageDark.png'; -import NetworkIcon from '@/assets/settingsNetwork.png'; -import NetworkIconDark from '@/assets/settingsNetworkDark.png'; import NotificationsIcon from '@/assets/settingsNotifications.png'; import NotificationsIconDark from '@/assets/settingsNotificationsDark.png'; import PrivacyIcon from '@/assets/settingsPrivacy.png'; @@ -29,7 +26,6 @@ import { useAccountSettings, useSendFeedback, useWallets } from '@/hooks'; import { Themes, useTheme } from '@/theme'; import { showActionSheetWithOptions } from '@/utils'; import { buildRainbowLearnUrl, LearnUTMCampaign } from '@/utils/buildRainbowUrl'; -import { getNetworkObj } from '@/networks'; import { handleReviewPromptAction } from '@/utils/reviewAlert'; import { ReviewPromptAction } from '@/storage/schema'; @@ -207,7 +203,7 @@ const SettingsSection = ({ rightComponent={} size={60} testID="backup-section" - titleComponent={} + titleComponent={} /> )} {isNotificationsEnabled && ( @@ -216,7 +212,7 @@ const SettingsSection = ({ leftComponent={} onPress={onPressNotifications} size={60} - titleComponent={} + titleComponent={} /> )} {nativeCurrency || ''}} size={60} testID="currency-section" - titleComponent={} + titleComponent={} /> {/* {(testnetsEnabled || IS_DEV) && ( {colorScheme ? capitalizeFirstLetter(colorScheme) : ''}} size={60} testID={`theme-section-${isDarkMode ? 'dark' : 'light'}`} - titleComponent={} + titleComponent={} /> @@ -275,7 +271,7 @@ const SettingsSection = ({ onPress={onPressPrivacy} size={60} testID="privacy" - titleComponent={} + titleComponent={} /> )} {isLanguageSelectionEnabled && ( @@ -283,9 +279,9 @@ const SettingsSection = ({ hasRightArrow leftComponent={} onPress={onPressLanguage} - rightComponent={{(supportedLanguages as any)[language].label || ''}} + rightComponent={{(lang.supportedLanguages as any)[language].label || ''}} size={60} - titleComponent={} + titleComponent={} /> )} } + titleComponent={} /> @@ -303,42 +299,44 @@ const SettingsSection = ({ onPress={onPressShare} size={52} testID="share-section" - titleComponent={} + titleComponent={} /> } onPress={onPressLearn} size={52} testID="learn-section" - titleComponent={} + titleComponent={} /> } onPress={onPressTwitter} size={52} testID="twitter-section" - titleComponent={} + titleComponent={} /> } onPress={onSendFeedback} size={52} testID="feedback-section" - titleComponent={} + titleComponent={ + + } /> } onPress={onPressReview} size={52} testID="review-section" - titleComponent={} + titleComponent={} /> } onPress={onPressDev} size={52} testID="developer-section" - titleComponent={} + titleComponent={} /> From 824c2100254c3b64fe5befaa137448f1a9c2f758 Mon Sep 17 00:00:00 2001 From: Ben Goldberg Date: Thu, 21 Mar 2024 15:47:53 -0700 Subject: [PATCH 03/44] State dump modifications (#5382) --- package.json | 1 - .../helpers/createAndShareStateDumpFile.ts | 51 +++++++++++++++++-- yarn.lock | 5 -- 3 files changed, 48 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index ace80317ef9..a02882c1570 100644 --- a/package.json +++ b/package.json @@ -169,7 +169,6 @@ "ethereumjs-wallet": "1.0.1", "events": "3.3.0", "fast-text-encoding": "1.0.4", - "flatted": "3.2.7", "global": "4.4.0", "grapheme-splitter": "1.0.4", "graphql-request": "5.0.0", diff --git a/src/screens/Diagnostics/helpers/createAndShareStateDumpFile.ts b/src/screens/Diagnostics/helpers/createAndShareStateDumpFile.ts index 1d6f1d57d00..60abfb63ea0 100644 --- a/src/screens/Diagnostics/helpers/createAndShareStateDumpFile.ts +++ b/src/screens/Diagnostics/helpers/createAndShareStateDumpFile.ts @@ -4,11 +4,56 @@ import { APP_STATE_DUMP_FILE_NAME } from '@/screens/Diagnostics/constants'; import RNShare from 'react-native-share'; import { IS_ANDROID } from '@/env'; import { logger, RainbowError } from '@/logger'; -import { stringify } from 'flatted'; +import { getAllActiveSessions } from '@/walletConnect'; + +// function partially developed by ChatGPT that helps remove and trace cyclic references in javascript objects +function cyclicReplacer() { + const seenObjects = new Map(); // Tracks objects and their paths + + function replacer(key: string | undefined, value: any, path: string[] = []): any { + if (typeof value === 'object' && value !== null) { + // Determine the new path + const newPath = key !== undefined ? path.concat(key) : path; + + if (seenObjects.has(value)) { + // Construct a string representation of the path to the cyclic reference + const keys = seenObjects.get(value)?.filter(key => !!key); + let path = keys?.shift(); + keys?.forEach(key => { + if (key) { + if (!isNaN(Number(key))) { + path += `[${key}]`; + } else { + path += `.${key}`; + } + } + }); + return `Cyclic reference to ${path}`; + } + + seenObjects.set(value, newPath); + + // Recursively handle nested objects and arrays + const valueCopy: { [key: string]: any } = Array.isArray(value) ? [] : {}; + for (const k of Object.keys(value)) { + valueCopy[k] = replacer(k, value[k], newPath); + } + return valueCopy; + } + return value; + } + + return (key: string, value: any): any => replacer(key, value); +} export async function createAndShareStateDumpFile() { - const appState = store.getState(); - const stringifiedState = stringify(appState); + const reduxState = store.getState(); + const walletConnectV2Sessions = await getAllActiveSessions(); + const state = { + reduxState, + walletConnectV2: { sessions: walletConnectV2Sessions }, + }; + const stringifiedState = JSON.stringify(state, cyclicReplacer()); const documentsFilePath = `${RNFS.DocumentDirectoryPath}/${APP_STATE_DUMP_FILE_NAME}`; try { diff --git a/yarn.lock b/yarn.lock index 481a41bd7e1..fba5cec2a53 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10547,11 +10547,6 @@ flat@^5.0.2: resolved "https://registry.yarnpkg.com/flat/-/flat-5.0.2.tgz#8ca6fe332069ffa9d324c327198c598259ceb241" integrity sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ== -flatted@3.2.7: - version "3.2.7" - resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.7.tgz#609f39207cb614b89d0765b477cb2d437fbf9787" - integrity sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ== - flatted@^3.2.9: version "3.3.1" resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.3.1.tgz#21db470729a6734d4997002f439cb308987f567a" From c5ce968f4ebc285f4a7aef720a1eaf05f7dd176f Mon Sep 17 00:00:00 2001 From: Ben Goldberg Date: Thu, 21 Mar 2024 15:48:14 -0700 Subject: [PATCH 04/44] NFT offers/mints gas estimation improvements (#5448) --- src/components/gas/GasSpeedButton.js | 9 +- src/graphql/queries/metadata.graphql | 11 +- src/handlers/nftOffers.ts | 110 -------------------- src/references/ethereum-units.json | 2 +- src/screens/NFTSingleOfferSheet/index.tsx | 118 +++++++++++++--------- src/screens/mints/MintSheet.tsx | 52 +++++----- 6 files changed, 111 insertions(+), 191 deletions(-) delete mode 100644 src/handlers/nftOffers.ts diff --git a/src/components/gas/GasSpeedButton.js b/src/components/gas/GasSpeedButton.js index 5bdf2bb63a2..9c6de6271cb 100644 --- a/src/components/gas/GasSpeedButton.js +++ b/src/components/gas/GasSpeedButton.js @@ -137,6 +137,7 @@ const GasSpeedButton = ({ validateGasParams, flashbotTransaction = false, crossChainServiceTime, + loading = false, }) => { const { colors } = useTheme(); const { navigate, goBack } = useNavigation(); @@ -178,7 +179,7 @@ const GasSpeedButton = ({ const formatGasPrice = useCallback( animatedValue => { - if (animatedValue === null || isNaN(animatedValue)) { + if (animatedValue === null || loading || isNaN(animatedValue)) { return 0; } !gasPriceReady && setGasPriceReady(true); @@ -199,7 +200,7 @@ const GasSpeedButton = ({ }`; } }, - [gasPriceReady, isLegacyGasNetwork, nativeCurrencySymbol, nativeCurrency] + [loading, gasPriceReady, isLegacyGasNetwork, nativeCurrencySymbol, nativeCurrency] ); const openCustomOptionsRef = useRef(); @@ -232,7 +233,7 @@ const GasSpeedButton = ({ const renderGasPriceText = useCallback( animatedNumber => { - const priceText = animatedNumber === 0 ? lang.t('swap.loading') : animatedNumber; + const priceText = animatedNumber === 0 || loading ? lang.t('swap.loading') : animatedNumber; return ( ); }, - [theme, colors] + [loading, theme, colors] ); // I'M SHITTY CODE BUT GOT THINGS DONE REFACTOR ME ASAP diff --git a/src/graphql/queries/metadata.graphql b/src/graphql/queries/metadata.graphql index 6b335ac8252..ed9dd5de131 100644 --- a/src/graphql/queries/metadata.graphql +++ b/src/graphql/queries/metadata.graphql @@ -157,8 +157,8 @@ fragment simulationError on TransactionError { type } -query simulateTransactions($chainId: Int!, $transactions: [Transaction!], $domain: String!) { - simulateTransactions(chainID: $chainId, transactions: $transactions, domain: $domain) { +query simulateTransactions($chainId: Int!, $transactions: [Transaction!], $domain: String, $currency: String) { + simulateTransactions(chainID: $chainId, transactions: $transactions, domain: $domain, currency: $currency) { error { ...simulationError } @@ -166,6 +166,13 @@ query simulateTransactions($chainId: Int!, $transactions: [Transaction!], $domai result description } + gas { + used + estimate + } + report { + url + } simulation { in { ...change diff --git a/src/handlers/nftOffers.ts b/src/handlers/nftOffers.ts deleted file mode 100644 index b96b4bebc84..00000000000 --- a/src/handlers/nftOffers.ts +++ /dev/null @@ -1,110 +0,0 @@ -import { Block, StaticJsonRpcProvider } from '@ethersproject/providers'; -import { estimateGasWithPadding, getProviderForNetwork, toHexNoLeadingZeros } from './web3'; -import { getRemoteConfig } from '@/model/remoteConfig'; -import { MaxUint256 } from '@ethersproject/constants'; -import { RainbowError, logger } from '@/logger'; -import { Network } from '@/helpers'; -import { getClosestGasEstimate } from './swap'; -import { ethUnits } from '@/references'; -import { NftOffer } from '@/graphql/__generated__/arc'; - -type TxData = { - to: string; - from: string; - data: string; -}; - -const getStateDiff = async (provider: StaticJsonRpcProvider, approval: TxData): Promise => { - const { number: blockNumber } = await (provider.getBlock as () => Promise)(); - const { trace_call_block_number_offset } = getRemoteConfig(); - - // trace_call default params - const callParams = [ - { - data: approval.data, - from: approval.from, - to: approval.to, - }, - ['stateDiff'], - toHexNoLeadingZeros(blockNumber - Number(trace_call_block_number_offset || 20)), - ]; - - const trace = await provider.send('trace_call', callParams); - - if (trace.stateDiff) { - const slotAddress = Object.keys(trace.stateDiff[approval.to]?.storage)?.[0]; - if (slotAddress) { - const formattedStateDiff = { - [approval.to]: { - stateDiff: { - [slotAddress]: MaxUint256.toHexString(), - }, - }, - }; - return formattedStateDiff; - } - } - logger.warn('Failed to get stateDiff for NFT Offer', { - trace: JSON.stringify(trace, null, 2), - }); -}; - -export const estimateNFTOfferGas = async ( - offer: NftOffer, - approval: TxData | undefined, - sale: TxData | undefined -): Promise => { - // rough gas estimate - const fallbackGas = - offer.network === Network.mainnet - ? ethUnits.mainnet_nft_offer_gas_fee_fallback.toString() - : ethUnits.l2_nft_offer_gas_fee_fallback.toString(); - const provider = await getProviderForNetwork(offer.network); - if (!sale) { - if (offer.marketplace.name !== 'Blur') { - // expecting sale tx data for all marketplaces except Blur - logger.warn('No sale tx data for NFT Offer'); - } - return fallbackGas; - } - if (!approval) { - return await estimateGasWithPadding(sale, null, null, provider); - } - if (offer.network !== Network.mainnet) { - return fallbackGas; - } - try { - const stateDiff = await getStateDiff(provider, approval); - - const gasLimit = await getClosestGasEstimate(async (gas: number) => { - const callParams = [ - { - data: sale.data, - from: sale.from, - gas: toHexNoLeadingZeros(gas), - gasPrice: toHexNoLeadingZeros(`100000000000`), - to: sale.to, - }, - 'latest', - ]; - - try { - await provider.send('eth_call', [...callParams, stateDiff]); - logger.info(`Estimate worked with gasLimit: ${gas}`); - return true; - } catch (e) { - logger.info(`Estimate failed with gasLimit: ${gas}. Trying with different amounts...`); - return false; - } - }); - - if (gasLimit && gasLimit >= ethUnits.basic_swap) { - return gasLimit.toString(); - } else { - logger.error(new RainbowError('Could not find a gas estimate for NFT Offer')); - } - } catch (e) { - logger.error(new RainbowError(`Blew up trying to get state diff for NFT Offer.\nerror: ${e}`)); - } - return fallbackGas; -}; diff --git a/src/references/ethereum-units.json b/src/references/ethereum-units.json index b417239b39f..56409c4e4ae 100644 --- a/src/references/ethereum-units.json +++ b/src/references/ethereum-units.json @@ -45,6 +45,6 @@ "mether": 1000000000000000000000000, "gether": 1000000000000000000000000000, "tether": 1000000000000000000000000000000, - "mainnet_nft_offer_gas_fee_fallback": 600000, + "mainnet_nft_offer_gas_fee_fallback": 300000, "l2_nft_offer_gas_fee_fallback": 2000000 } diff --git a/src/screens/NFTSingleOfferSheet/index.tsx b/src/screens/NFTSingleOfferSheet/index.tsx index 70596d13ea1..05cce58e4f8 100644 --- a/src/screens/NFTSingleOfferSheet/index.tsx +++ b/src/screens/NFTSingleOfferSheet/index.tsx @@ -38,7 +38,6 @@ import { privateKeyToAccount } from 'viem/accounts'; import { createWalletClient, http } from 'viem'; import { RainbowError, logger } from '@/logger'; -import { estimateNFTOfferGas } from '@/handlers/nftOffers'; import { useTheme } from '@/theme'; import { Network } from '@/helpers'; import { getNetworkObj } from '@/networks'; @@ -51,6 +50,9 @@ import RainbowCoinIcon from '@/components/coin-icon/RainbowCoinIcon'; import { addNewTransaction } from '@/state/pendingTransactions'; import { getUniqueId } from '@/utils/ethereumUtils'; import { getNextNonce } from '@/state/nonces'; +import { metadataPOSTClient } from '@/graphql'; +import { ethUnits } from '@/references'; +import { Transaction } from '@/graphql/__generated__/metadataPOST'; const NFT_IMAGE_HEIGHT = 160; const TWO_HOURS_MS = 2 * 60 * 60 * 1000; @@ -99,6 +101,7 @@ export function NFTSingleOfferSheet() { currency: nativeCurrency, }); + const [isGasReady, setIsGasReady] = useState(false); const [height, setHeight] = useState(0); const [isAccepting, setIsAccepting] = useState(false); const txsRef = useRef([]); @@ -176,68 +179,82 @@ export function NFTSingleOfferSheet() { }, [offer.validUntil]); const estimateGas = useCallback(() => { - const networkObj = getNetworkObj(network); - const signer = createWalletClient({ - // @ts-ignore - account: accountAddress, - chain: networkObj, - transport: http(networkObj.rpc), - }); - getClient()?.actions.acceptOffer({ - items: [ - { - token: `${offer.nft.contractAddress}:${offer.nft.tokenId}`, - quantity: 1, - }, - ], - options: feeParam - ? { - feesOnTop: [feeParam], - } - : undefined, - chainId: networkObj.id, - precheck: true, - wallet: signer, - onProgress: async (steps: Execute['steps']) => { - let sale; - let approval; - steps.forEach(step => - step.items?.forEach(async item => { - if (item.data?.data && item.data?.to && item.data?.from) { - if (step.id === 'sale') { - sale = { - to: item.data.to, - from: item.data.from, - data: item.data.data, - }; - } else if (step.id === 'nft-approval') { - approval = { + try { + const networkObj = getNetworkObj(network); + const signer = createWalletClient({ + // @ts-ignore + account: accountAddress, + chain: networkObj, + transport: http(networkObj.rpc), + }); + getClient()?.actions.acceptOffer({ + items: [ + { + token: `${offer.nft.contractAddress}:${offer.nft.tokenId}`, + quantity: 1, + }, + ], + options: feeParam + ? { + feesOnTop: [feeParam], + } + : undefined, + chainId: networkObj.id, + precheck: true, + wallet: signer, + onProgress: async (steps: Execute['steps']) => { + let reservoirEstimate = 0; + const txs: Transaction[] = []; + const fallbackEstimate = + offer.network === Network.mainnet ? ethUnits.mainnet_nft_offer_gas_fee_fallback : ethUnits.l2_nft_offer_gas_fee_fallback; + steps.forEach(step => + step.items?.forEach(item => { + if (item?.data?.to && item?.data?.from && item?.data?.data) { + txs.push({ to: item.data.to, from: item.data.from, data: item.data.data, - }; + value: item.data.value ?? '0x0', + }); } - } - }) - ); - const gas = await estimateNFTOfferGas(offer, approval, sale); - if (gas) { - updateTxFee(gas, null); - startPollingGasFees(network); - } - }, - }); - }, [accountAddress, feeParam, network, offer, startPollingGasFees, updateTxFee]); + // @ts-ignore missing from reservoir type + const txEstimate = item.gasEstimate; + if (typeof txEstimate === 'number') { + reservoirEstimate += txEstimate; + } + }) + ); + const txSimEstimate = parseInt( + ( + await metadataPOSTClient.simulateTransactions({ + chainId: networkObj.id, + transactions: txs, + }) + )?.simulateTransactions?.[0]?.gas?.estimate ?? '0x0', + 16 + ); + const estimate = txSimEstimate || reservoirEstimate || fallbackEstimate; + if (estimate) { + updateTxFee(estimate, null); + setIsGasReady(true); + } + }, + }); + } catch { + logger.error(new RainbowError('NFT Offer: Failed to estimate gas')); + } + }, [accountAddress, feeParam, network, offer, updateTxFee]); // estimate gas useEffect(() => { if (!isReadOnlyWallet && !isExpired) { + startPollingGasFees(network); estimateGas(); } return () => { stopPollingGasFees(); }; - }, [estimateGas, isExpired, isReadOnlyWallet, stopPollingGasFees]); + }, [estimateGas, isExpired, isReadOnlyWallet, network, startPollingGasFees, stopPollingGasFees, updateTxFee]); const acceptOffer = useCallback(async () => { logger.info(`Initiating sale of NFT ${offer.nft.contractAddress}:${offer.nft.tokenId}`); @@ -706,6 +723,7 @@ export function NFTSingleOfferSheet() { asset={{ color: offer.nft.predominantColor || buttonColorFallback, }} + loading={!isGasReady} horizontalPadding={0} currentNetwork={offer.network} theme={theme.isDarkMode ? 'dark' : 'light'} diff --git a/src/screens/mints/MintSheet.tsx b/src/screens/mints/MintSheet.tsx index 52a4e5effc3..f3f473b2d6f 100644 --- a/src/screens/mints/MintSheet.tsx +++ b/src/screens/mints/MintSheet.tsx @@ -26,7 +26,7 @@ import { ButtonPressAnimation } from '@/components/animations'; import { useFocusEffect, useRoute } from '@react-navigation/native'; import { ReservoirCollection } from '@/graphql/__generated__/arcDev'; import { format } from 'date-fns'; -import { NewTransaction, RainbowTransaction } from '@/entities'; +import { NewTransaction } from '@/entities'; import * as i18n from '@/languages'; import { analyticsV2 } from '@/analytics'; import { event } from '@/analytics/event'; @@ -49,13 +49,14 @@ import { } from '@/helpers/utilities'; import { RainbowError, logger } from '@/logger'; import { QuantityButton } from './components/QuantityButton'; -import { estimateGas, getProviderForNetwork } from '@/handlers/web3'; import { getRainbowFeeAddress } from '@/resources/reservoir/utils'; import { IS_ANDROID, IS_IOS } from '@/env'; import { EthCoinIcon } from '@/components/coin-icon/EthCoinIcon'; import { addNewTransaction } from '@/state/pendingTransactions'; import { getUniqueId } from '@/utils/ethereumUtils'; import { getNextNonce } from '@/state/nonces'; +import { metadataPOSTClient } from '@/graphql'; +import { Transaction } from '@/graphql/__generated__/metadataPOST'; const NFT_IMAGE_HEIGHT = 250; // inset * 2 -> 28 *2 @@ -138,6 +139,7 @@ const MintSheet = () => { const [ensName, setENSName] = useState(''); const [mintStatus, setMintStatus] = useState<'none' | 'minting' | 'minted' | 'error'>('none'); const txRef = useRef(); + const [isGasReady, setIsGasReady] = useState(false); const { data: ensAvatar } = useENSAvatar(ensName, { enabled: Boolean(ensName), @@ -245,7 +247,6 @@ const MintSheet = () => { useEffect(() => { const estimateMintGas = async () => { const networkObj = getNetworkObj(currentNetwork); - const provider = await getProviderForNetwork(currentNetwork); const signer = createWalletClient({ account: accountAddress, chain: networkObj, @@ -258,35 +259,37 @@ const MintSheet = () => { chainId: networkObj.id, precheck: true, onProgress: async (steps: Execute['steps']) => { + const txs: Transaction[] = []; steps.forEach(step => { if (step.error) { logger.error(new RainbowError(`NFT Mints: Gas Step Error: ${step.error}`)); return; } - step.items?.forEach(async item => { - // could add safety here if unable to calc gas limit - const tx = { - to: item.data?.to, - from: item.data?.from, - data: item.data?.data, - value: item.data?.value, - }; - const gas = await estimateGas(tx, provider); - let l1GasFeeOptimism = null; - // add l1Fee for OP Chains - if (getNetworkObj(currentNetwork).gas.OptimismTxFee) { - l1GasFeeOptimism = await ethereumUtils.calculateL1FeeOptimism(tx as RainbowTransaction, provider); - } - if (gas) { - setGasError(false); - if (l1GasFeeOptimism) { - updateTxFee(gas, null, l1GasFeeOptimism); - } else { - updateTxFee(gas, null); - } + step.items?.forEach(item => { + if (item?.data?.to && item?.data?.from && item?.data?.data) { + txs.push({ + to: item.data?.to, + from: item.data?.from, + data: item.data?.data, + value: item.data?.value ?? '0x0', + }); } }); }); + const txSimEstimate = parseInt( + ( + await metadataPOSTClient.simulateTransactions({ + chainId: networkObj.id, + transactions: txs, + }) + )?.simulateTransactions?.[0]?.gas?.estimate ?? '0x0', + 16 + ); + if (txSimEstimate) { + setGasError(false); + updateTxFee(txSimEstimate, null); + setIsGasReady(true); + } }, }); } catch (e) { @@ -629,6 +632,7 @@ const MintSheet = () => { horizontalPadding={0} currentNetwork={currentNetwork} theme={'dark'} + loading={!isGasReady} marginBottom={0} /> From f678d8f200af0d77a1124136d9ccb7b25b5f47ff Mon Sep 17 00:00:00 2001 From: Bruno Barbieri <1247834+brunobar79@users.noreply.github.com> Date: Thu, 21 Mar 2024 19:50:56 -0400 Subject: [PATCH 05/44] Dapp Browser + provider (#5543) * provider integration * more fixes * connection working * werk werk werk * working * clean up * console.log * more clean up --- .gitignore | 2 +- InjectedJSBundle.js | 46430 +--------------- .../src/main/res/raw/injected_js_bundle.js | 46430 +--------------- package.json | 5 +- src/browserMessaging/AppMessenger.ts | 16 +- src/components/DappBrowser/BrowserTab.tsx | 92 +- .../DappBrowser/handleProviderRequest.ts | 342 + src/navigation/config.tsx | 2 +- src/utils/requestNavigationHandlers.ts | 6 +- yarn.lock | 90 +- 10 files changed, 479 insertions(+), 92936 deletions(-) create mode 100644 src/components/DappBrowser/handleProviderRequest.ts diff --git a/.gitignore b/.gitignore index 72e45be35a0..9c7115fcc81 100644 --- a/.gitignore +++ b/.gitignore @@ -119,4 +119,4 @@ coverage .zed/ # Webpack -src/browser/InjectedJSBundle.js.LICENSE.txt +InjectedJSBundle.js.LICENSE.txt diff --git a/InjectedJSBundle.js b/InjectedJSBundle.js index 1b2d2cc727d..ab9407bccab 100644 --- a/InjectedJSBundle.js +++ b/InjectedJSBundle.js @@ -1,46430 +1,2 @@ /*! For license information please see InjectedJSBundle.js.LICENSE.txt */ -(() => { - var t = { - 9840: (t, e, r) => { - 'use strict'; - const i = e; - (i.bignum = r(5911)), - (i.define = r(9234).define), - (i.base = r(9913)), - (i.constants = r(7624)), - (i.decoders = r(4823)), - (i.encoders = r(3886)); - }, - 9234: (t, e, r) => { - 'use strict'; - const i = r(3886), - n = r(4823), - o = r(87); - function s(t, e) { - (this.name = t), (this.body = e), (this.decoders = {}), (this.encoders = {}); - } - (e.define = function (t, e) { - return new s(t, e); - }), - (s.prototype._createNamed = function (t) { - const e = this.name; - function r(t) { - this._initNamed(t, e); - } - return ( - o(r, t), - (r.prototype._initNamed = function (e, r) { - t.call(this, e, r); - }), - new r(this) - ); - }), - (s.prototype._getDecoder = function (t) { - return (t = t || 'der'), this.decoders.hasOwnProperty(t) || (this.decoders[t] = this._createNamed(n[t])), this.decoders[t]; - }), - (s.prototype.decode = function (t, e, r) { - return this._getDecoder(e).decode(t, r); - }), - (s.prototype._getEncoder = function (t) { - return (t = t || 'der'), this.encoders.hasOwnProperty(t) || (this.encoders[t] = this._createNamed(i[t])), this.encoders[t]; - }), - (s.prototype.encode = function (t, e, r) { - return this._getEncoder(e).encode(t, r); - }); - }, - 3370: (t, e, r) => { - 'use strict'; - const i = r(87), - n = r(7298).b, - o = r(1788).Buffer; - function s(t, e) { - n.call(this, e), o.isBuffer(t) ? ((this.base = t), (this.offset = 0), (this.length = t.length)) : this.error('Input not Buffer'); - } - function a(t, e) { - if (Array.isArray(t)) - (this.length = 0), - (this.value = t.map(function (t) { - return a.isEncoderBuffer(t) || (t = new a(t, e)), (this.length += t.length), t; - }, this)); - else if ('number' == typeof t) { - if (!(0 <= t && t <= 255)) return e.error('non-byte EncoderBuffer value'); - (this.value = t), (this.length = 1); - } else if ('string' == typeof t) (this.value = t), (this.length = o.byteLength(t)); - else { - if (!o.isBuffer(t)) return e.error('Unsupported type: ' + typeof t); - (this.value = t), (this.length = t.length); - } - } - i(s, n), - (e.C = s), - (s.isDecoderBuffer = function (t) { - return ( - t instanceof s || - ('object' == typeof t && - o.isBuffer(t.base) && - 'DecoderBuffer' === t.constructor.name && - 'number' == typeof t.offset && - 'number' == typeof t.length && - 'function' == typeof t.save && - 'function' == typeof t.restore && - 'function' == typeof t.isEmpty && - 'function' == typeof t.readUInt8 && - 'function' == typeof t.skip && - 'function' == typeof t.raw) - ); - }), - (s.prototype.save = function () { - return { offset: this.offset, reporter: n.prototype.save.call(this) }; - }), - (s.prototype.restore = function (t) { - const e = new s(this.base); - return (e.offset = t.offset), (e.length = this.offset), (this.offset = t.offset), n.prototype.restore.call(this, t.reporter), e; - }), - (s.prototype.isEmpty = function () { - return this.offset === this.length; - }), - (s.prototype.readUInt8 = function (t) { - return this.offset + 1 <= this.length ? this.base.readUInt8(this.offset++, !0) : this.error(t || 'DecoderBuffer overrun'); - }), - (s.prototype.skip = function (t, e) { - if (!(this.offset + t <= this.length)) return this.error(e || 'DecoderBuffer overrun'); - const r = new s(this.base); - return (r._reporterState = this._reporterState), (r.offset = this.offset), (r.length = this.offset + t), (this.offset += t), r; - }), - (s.prototype.raw = function (t) { - return this.base.slice(t ? t.offset : this.offset, this.length); - }), - (e.R = a), - (a.isEncoderBuffer = function (t) { - return ( - t instanceof a || - ('object' == typeof t && 'EncoderBuffer' === t.constructor.name && 'number' == typeof t.length && 'function' == typeof t.join) - ); - }), - (a.prototype.join = function (t, e) { - return ( - t || (t = o.alloc(this.length)), - e || (e = 0), - 0 === this.length || - (Array.isArray(this.value) - ? this.value.forEach(function (r) { - r.join(t, e), (e += r.length); - }) - : ('number' == typeof this.value - ? (t[e] = this.value) - : 'string' == typeof this.value - ? t.write(this.value, e) - : o.isBuffer(this.value) && this.value.copy(t, e), - (e += this.length))), - t - ); - }); - }, - 9913: (t, e, r) => { - 'use strict'; - const i = e; - (i.Reporter = r(7298).b), (i.DecoderBuffer = r(3370).C), (i.EncoderBuffer = r(3370).R), (i.Node = r(1388)); - }, - 1388: (t, e, r) => { - 'use strict'; - const i = r(7298).b, - n = r(3370).R, - o = r(3370).C, - s = r(7859), - a = [ - 'seq', - 'seqof', - 'set', - 'setof', - 'objid', - 'bool', - 'gentime', - 'utctime', - 'null_', - 'enum', - 'int', - 'objDesc', - 'bitstr', - 'bmpstr', - 'charstr', - 'genstr', - 'graphstr', - 'ia5str', - 'iso646str', - 'numstr', - 'octstr', - 'printstr', - 't61str', - 'unistr', - 'utf8str', - 'videostr', - ], - h = ['key', 'obj', 'use', 'optional', 'explicit', 'implicit', 'def', 'choice', 'any', 'contains'].concat(a); - function u(t, e, r) { - const i = {}; - (this._baseState = i), - (i.name = r), - (i.enc = t), - (i.parent = e || null), - (i.children = null), - (i.tag = null), - (i.args = null), - (i.reverseArgs = null), - (i.choice = null), - (i.optional = !1), - (i.any = !1), - (i.obj = !1), - (i.use = null), - (i.useDecoder = null), - (i.key = null), - (i.default = null), - (i.explicit = null), - (i.implicit = null), - (i.contains = null), - i.parent || ((i.children = []), this._wrap()); - } - t.exports = u; - const f = [ - 'enc', - 'parent', - 'children', - 'tag', - 'args', - 'reverseArgs', - 'choice', - 'optional', - 'any', - 'obj', - 'use', - 'alteredUse', - 'key', - 'default', - 'explicit', - 'implicit', - 'contains', - ]; - (u.prototype.clone = function () { - const t = this._baseState, - e = {}; - f.forEach(function (r) { - e[r] = t[r]; - }); - const r = new this.constructor(e.parent); - return (r._baseState = e), r; - }), - (u.prototype._wrap = function () { - const t = this._baseState; - h.forEach(function (e) { - this[e] = function () { - const r = new this.constructor(this); - return t.children.push(r), r[e].apply(r, arguments); - }; - }, this); - }), - (u.prototype._init = function (t) { - const e = this._baseState; - s(null === e.parent), - t.call(this), - (e.children = e.children.filter(function (t) { - return t._baseState.parent === this; - }, this)), - s.equal(e.children.length, 1, 'Root node can have only one child'); - }), - (u.prototype._useArgs = function (t) { - const e = this._baseState, - r = t.filter(function (t) { - return t instanceof this.constructor; - }, this); - (t = t.filter(function (t) { - return !(t instanceof this.constructor); - }, this)), - 0 !== r.length && - (s(null === e.children), - (e.children = r), - r.forEach(function (t) { - t._baseState.parent = this; - }, this)), - 0 !== t.length && - (s(null === e.args), - (e.args = t), - (e.reverseArgs = t.map(function (t) { - if ('object' != typeof t || t.constructor !== Object) return t; - const e = {}; - return ( - Object.keys(t).forEach(function (r) { - r == (0 | r) && (r |= 0); - const i = t[r]; - e[i] = r; - }), - e - ); - }))); - }), - [ - '_peekTag', - '_decodeTag', - '_use', - '_decodeStr', - '_decodeObjid', - '_decodeTime', - '_decodeNull', - '_decodeInt', - '_decodeBool', - '_decodeList', - '_encodeComposite', - '_encodeStr', - '_encodeObjid', - '_encodeTime', - '_encodeNull', - '_encodeInt', - '_encodeBool', - ].forEach(function (t) { - u.prototype[t] = function () { - const e = this._baseState; - throw new Error(t + ' not implemented for encoding: ' + e.enc); - }; - }), - a.forEach(function (t) { - u.prototype[t] = function () { - const e = this._baseState, - r = Array.prototype.slice.call(arguments); - return s(null === e.tag), (e.tag = t), this._useArgs(r), this; - }; - }), - (u.prototype.use = function (t) { - s(t); - const e = this._baseState; - return s(null === e.use), (e.use = t), this; - }), - (u.prototype.optional = function () { - return (this._baseState.optional = !0), this; - }), - (u.prototype.def = function (t) { - const e = this._baseState; - return s(null === e.default), (e.default = t), (e.optional = !0), this; - }), - (u.prototype.explicit = function (t) { - const e = this._baseState; - return s(null === e.explicit && null === e.implicit), (e.explicit = t), this; - }), - (u.prototype.implicit = function (t) { - const e = this._baseState; - return s(null === e.explicit && null === e.implicit), (e.implicit = t), this; - }), - (u.prototype.obj = function () { - const t = this._baseState, - e = Array.prototype.slice.call(arguments); - return (t.obj = !0), 0 !== e.length && this._useArgs(e), this; - }), - (u.prototype.key = function (t) { - const e = this._baseState; - return s(null === e.key), (e.key = t), this; - }), - (u.prototype.any = function () { - return (this._baseState.any = !0), this; - }), - (u.prototype.choice = function (t) { - const e = this._baseState; - return ( - s(null === e.choice), - (e.choice = t), - this._useArgs( - Object.keys(t).map(function (e) { - return t[e]; - }) - ), - this - ); - }), - (u.prototype.contains = function (t) { - const e = this._baseState; - return s(null === e.use), (e.contains = t), this; - }), - (u.prototype._decode = function (t, e) { - const r = this._baseState; - if (null === r.parent) return t.wrapResult(r.children[0]._decode(t, e)); - let i, - n = r.default, - s = !0, - a = null; - if ((null !== r.key && (a = t.enterKey(r.key)), r.optional)) { - let i = null; - if ( - (null !== r.explicit ? (i = r.explicit) : null !== r.implicit ? (i = r.implicit) : null !== r.tag && (i = r.tag), - null !== i || r.any) - ) { - if (((s = this._peekTag(t, i, r.any)), t.isError(s))) return s; - } else { - const i = t.save(); - try { - null === r.choice ? this._decodeGeneric(r.tag, t, e) : this._decodeChoice(t, e), (s = !0); - } catch (t) { - s = !1; - } - t.restore(i); - } - } - if ((r.obj && s && (i = t.enterObject()), s)) { - if (null !== r.explicit) { - const e = this._decodeTag(t, r.explicit); - if (t.isError(e)) return e; - t = e; - } - const i = t.offset; - if (null === r.use && null === r.choice) { - let e; - r.any && (e = t.save()); - const i = this._decodeTag(t, null !== r.implicit ? r.implicit : r.tag, r.any); - if (t.isError(i)) return i; - r.any ? (n = t.raw(e)) : (t = i); - } - if ( - (e && e.track && null !== r.tag && e.track(t.path(), i, t.length, 'tagged'), - e && e.track && null !== r.tag && e.track(t.path(), t.offset, t.length, 'content'), - r.any || (n = null === r.choice ? this._decodeGeneric(r.tag, t, e) : this._decodeChoice(t, e)), - t.isError(n)) - ) - return n; - if ( - (r.any || - null !== r.choice || - null === r.children || - r.children.forEach(function (r) { - r._decode(t, e); - }), - r.contains && ('octstr' === r.tag || 'bitstr' === r.tag)) - ) { - const i = new o(n); - n = this._getUse(r.contains, t._reporterState.obj)._decode(i, e); - } - } - return ( - r.obj && s && (n = t.leaveObject(i)), - null === r.key || (null === n && !0 !== s) ? null !== a && t.exitKey(a) : t.leaveKey(a, r.key, n), - n - ); - }), - (u.prototype._decodeGeneric = function (t, e, r) { - const i = this._baseState; - return 'seq' === t || 'set' === t - ? null - : 'seqof' === t || 'setof' === t - ? this._decodeList(e, t, i.args[0], r) - : /str$/.test(t) - ? this._decodeStr(e, t, r) - : 'objid' === t && i.args - ? this._decodeObjid(e, i.args[0], i.args[1], r) - : 'objid' === t - ? this._decodeObjid(e, null, null, r) - : 'gentime' === t || 'utctime' === t - ? this._decodeTime(e, t, r) - : 'null_' === t - ? this._decodeNull(e, r) - : 'bool' === t - ? this._decodeBool(e, r) - : 'objDesc' === t - ? this._decodeStr(e, t, r) - : 'int' === t || 'enum' === t - ? this._decodeInt(e, i.args && i.args[0], r) - : null !== i.use - ? this._getUse(i.use, e._reporterState.obj)._decode(e, r) - : e.error('unknown tag: ' + t); - }), - (u.prototype._getUse = function (t, e) { - const r = this._baseState; - return ( - (r.useDecoder = this._use(t, e)), - s(null === r.useDecoder._baseState.parent), - (r.useDecoder = r.useDecoder._baseState.children[0]), - r.implicit !== r.useDecoder._baseState.implicit && - ((r.useDecoder = r.useDecoder.clone()), (r.useDecoder._baseState.implicit = r.implicit)), - r.useDecoder - ); - }), - (u.prototype._decodeChoice = function (t, e) { - const r = this._baseState; - let i = null, - n = !1; - return ( - Object.keys(r.choice).some(function (o) { - const s = t.save(), - a = r.choice[o]; - try { - const r = a._decode(t, e); - if (t.isError(r)) return !1; - (i = { type: o, value: r }), (n = !0); - } catch (e) { - return t.restore(s), !1; - } - return !0; - }, this), - n ? i : t.error('Choice not matched') - ); - }), - (u.prototype._createEncoderBuffer = function (t) { - return new n(t, this.reporter); - }), - (u.prototype._encode = function (t, e, r) { - const i = this._baseState; - if (null !== i.default && i.default === t) return; - const n = this._encodeValue(t, e, r); - return void 0 === n || this._skipDefault(n, e, r) ? void 0 : n; - }), - (u.prototype._encodeValue = function (t, e, r) { - const n = this._baseState; - if (null === n.parent) return n.children[0]._encode(t, e || new i()); - let o = null; - if (((this.reporter = e), n.optional && void 0 === t)) { - if (null === n.default) return; - t = n.default; - } - let s = null, - a = !1; - if (n.any) o = this._createEncoderBuffer(t); - else if (n.choice) o = this._encodeChoice(t, e); - else if (n.contains) (s = this._getUse(n.contains, r)._encode(t, e)), (a = !0); - else if (n.children) - (s = n.children - .map(function (r) { - if ('null_' === r._baseState.tag) return r._encode(null, e, t); - if (null === r._baseState.key) return e.error('Child should have a key'); - const i = e.enterKey(r._baseState.key); - if ('object' != typeof t) return e.error('Child expected, but input is not object'); - const n = r._encode(t[r._baseState.key], e, t); - return e.leaveKey(i), n; - }, this) - .filter(function (t) { - return t; - })), - (s = this._createEncoderBuffer(s)); - else if ('seqof' === n.tag || 'setof' === n.tag) { - if (!n.args || 1 !== n.args.length) return e.error('Too many args for : ' + n.tag); - if (!Array.isArray(t)) return e.error('seqof/setof, but data is not Array'); - const r = this.clone(); - (r._baseState.implicit = null), - (s = this._createEncoderBuffer( - t.map(function (r) { - const i = this._baseState; - return this._getUse(i.args[0], t)._encode(r, e); - }, r) - )); - } else null !== n.use ? (o = this._getUse(n.use, r)._encode(t, e)) : ((s = this._encodePrimitive(n.tag, t)), (a = !0)); - if (!n.any && null === n.choice) { - const t = null !== n.implicit ? n.implicit : n.tag, - r = null === n.implicit ? 'universal' : 'context'; - null === t - ? null === n.use && e.error('Tag could be omitted only for .use()') - : null === n.use && (o = this._encodeComposite(t, a, r, s)); - } - return null !== n.explicit && (o = this._encodeComposite(n.explicit, !1, 'context', o)), o; - }), - (u.prototype._encodeChoice = function (t, e) { - const r = this._baseState, - i = r.choice[t.type]; - return i || s(!1, t.type + ' not found in ' + JSON.stringify(Object.keys(r.choice))), i._encode(t.value, e); - }), - (u.prototype._encodePrimitive = function (t, e) { - const r = this._baseState; - if (/str$/.test(t)) return this._encodeStr(e, t); - if ('objid' === t && r.args) return this._encodeObjid(e, r.reverseArgs[0], r.args[1]); - if ('objid' === t) return this._encodeObjid(e, null, null); - if ('gentime' === t || 'utctime' === t) return this._encodeTime(e, t); - if ('null_' === t) return this._encodeNull(); - if ('int' === t || 'enum' === t) return this._encodeInt(e, r.args && r.reverseArgs[0]); - if ('bool' === t) return this._encodeBool(e); - if ('objDesc' === t) return this._encodeStr(e, t); - throw new Error('Unsupported tag: ' + t); - }), - (u.prototype._isNumstr = function (t) { - return /^[0-9 ]*$/.test(t); - }), - (u.prototype._isPrintstr = function (t) { - return /^[A-Za-z0-9 '()+,-./:=?]*$/.test(t); - }); - }, - 7298: (t, e, r) => { - 'use strict'; - const i = r(87); - function n(t) { - this._reporterState = { obj: null, path: [], options: t || {}, errors: [] }; - } - function o(t, e) { - (this.path = t), this.rethrow(e); - } - (e.b = n), - (n.prototype.isError = function (t) { - return t instanceof o; - }), - (n.prototype.save = function () { - const t = this._reporterState; - return { obj: t.obj, pathLen: t.path.length }; - }), - (n.prototype.restore = function (t) { - const e = this._reporterState; - (e.obj = t.obj), (e.path = e.path.slice(0, t.pathLen)); - }), - (n.prototype.enterKey = function (t) { - return this._reporterState.path.push(t); - }), - (n.prototype.exitKey = function (t) { - const e = this._reporterState; - e.path = e.path.slice(0, t - 1); - }), - (n.prototype.leaveKey = function (t, e, r) { - const i = this._reporterState; - this.exitKey(t), null !== i.obj && (i.obj[e] = r); - }), - (n.prototype.path = function () { - return this._reporterState.path.join('/'); - }), - (n.prototype.enterObject = function () { - const t = this._reporterState, - e = t.obj; - return (t.obj = {}), e; - }), - (n.prototype.leaveObject = function (t) { - const e = this._reporterState, - r = e.obj; - return (e.obj = t), r; - }), - (n.prototype.error = function (t) { - let e; - const r = this._reporterState, - i = t instanceof o; - if ( - ((e = i - ? t - : new o( - r.path - .map(function (t) { - return '[' + JSON.stringify(t) + ']'; - }) - .join(''), - t.message || t, - t.stack - )), - !r.options.partial) - ) - throw e; - return i || r.errors.push(e), e; - }), - (n.prototype.wrapResult = function (t) { - const e = this._reporterState; - return e.options.partial ? { result: this.isError(t) ? null : t, errors: e.errors } : t; - }), - i(o, Error), - (o.prototype.rethrow = function (t) { - if ( - ((this.message = t + ' at: ' + (this.path || '(shallow)')), - Error.captureStackTrace && Error.captureStackTrace(this, o), - !this.stack) - ) - try { - throw new Error(this.message); - } catch (t) { - this.stack = t.stack; - } - return this; - }); - }, - 643: (t, e) => { - 'use strict'; - function r(t) { - const e = {}; - return ( - Object.keys(t).forEach(function (r) { - (0 | r) == r && (r |= 0); - const i = t[r]; - e[i] = r; - }), - e - ); - } - (e.tagClass = { 0: 'universal', 1: 'application', 2: 'context', 3: 'private' }), - (e.tagClassByName = r(e.tagClass)), - (e.tag = { - 0: 'end', - 1: 'bool', - 2: 'int', - 3: 'bitstr', - 4: 'octstr', - 5: 'null_', - 6: 'objid', - 7: 'objDesc', - 8: 'external', - 9: 'real', - 10: 'enum', - 11: 'embed', - 12: 'utf8str', - 13: 'relativeOid', - 16: 'seq', - 17: 'set', - 18: 'numstr', - 19: 'printstr', - 20: 't61str', - 21: 'videostr', - 22: 'ia5str', - 23: 'utctime', - 24: 'gentime', - 25: 'graphstr', - 26: 'iso646str', - 27: 'genstr', - 28: 'unistr', - 29: 'charstr', - 30: 'bmpstr', - }), - (e.tagByName = r(e.tag)); - }, - 7624: (t, e, r) => { - 'use strict'; - const i = e; - (i._reverse = function (t) { - const e = {}; - return ( - Object.keys(t).forEach(function (r) { - (0 | r) == r && (r |= 0); - const i = t[r]; - e[i] = r; - }), - e - ); - }), - (i.der = r(643)); - }, - 8306: (t, e, r) => { - 'use strict'; - const i = r(87), - n = r(5911), - o = r(3370).C, - s = r(1388), - a = r(643); - function h(t) { - (this.enc = 'der'), (this.name = t.name), (this.entity = t), (this.tree = new u()), this.tree._init(t.body); - } - function u(t) { - s.call(this, 'der', t); - } - function f(t, e) { - let r = t.readUInt8(e); - if (t.isError(r)) return r; - const i = a.tagClass[r >> 6], - n = 0 == (32 & r); - if (31 == (31 & r)) { - let i = r; - for (r = 0; 128 == (128 & i); ) { - if (((i = t.readUInt8(e)), t.isError(i))) return i; - (r <<= 7), (r |= 127 & i); - } - } else r &= 31; - return { cls: i, primitive: n, tag: r, tagStr: a.tag[r] }; - } - function c(t, e, r) { - let i = t.readUInt8(r); - if (t.isError(i)) return i; - if (!e && 128 === i) return null; - if (0 == (128 & i)) return i; - const n = 127 & i; - if (n > 4) return t.error('length octect is too long'); - i = 0; - for (let e = 0; e < n; e++) { - i <<= 8; - const e = t.readUInt8(r); - if (t.isError(e)) return e; - i |= e; - } - return i; - } - (t.exports = h), - (h.prototype.decode = function (t, e) { - return o.isDecoderBuffer(t) || (t = new o(t, e)), this.tree._decode(t, e); - }), - i(u, s), - (u.prototype._peekTag = function (t, e, r) { - if (t.isEmpty()) return !1; - const i = t.save(), - n = f(t, 'Failed to peek tag: "' + e + '"'); - return t.isError(n) ? n : (t.restore(i), n.tag === e || n.tagStr === e || n.tagStr + 'of' === e || r); - }), - (u.prototype._decodeTag = function (t, e, r) { - const i = f(t, 'Failed to decode tag of "' + e + '"'); - if (t.isError(i)) return i; - let n = c(t, i.primitive, 'Failed to get length of "' + e + '"'); - if (t.isError(n)) return n; - if (!r && i.tag !== e && i.tagStr !== e && i.tagStr + 'of' !== e) return t.error('Failed to match tag: "' + e + '"'); - if (i.primitive || null !== n) return t.skip(n, 'Failed to match body of: "' + e + '"'); - const o = t.save(), - s = this._skipUntilEnd(t, 'Failed to skip indefinite length body: "' + this.tag + '"'); - return t.isError(s) ? s : ((n = t.offset - o.offset), t.restore(o), t.skip(n, 'Failed to match body of: "' + e + '"')); - }), - (u.prototype._skipUntilEnd = function (t, e) { - for (;;) { - const r = f(t, e); - if (t.isError(r)) return r; - const i = c(t, r.primitive, e); - if (t.isError(i)) return i; - let n; - if (((n = r.primitive || null !== i ? t.skip(i) : this._skipUntilEnd(t, e)), t.isError(n))) return n; - if ('end' === r.tagStr) break; - } - }), - (u.prototype._decodeList = function (t, e, r, i) { - const n = []; - for (; !t.isEmpty(); ) { - const e = this._peekTag(t, 'end'); - if (t.isError(e)) return e; - const o = r.decode(t, 'der', i); - if (t.isError(o) && e) break; - n.push(o); - } - return n; - }), - (u.prototype._decodeStr = function (t, e) { - if ('bitstr' === e) { - const e = t.readUInt8(); - return t.isError(e) ? e : { unused: e, data: t.raw() }; - } - if ('bmpstr' === e) { - const e = t.raw(); - if (e.length % 2 == 1) return t.error('Decoding of string type: bmpstr length mismatch'); - let r = ''; - for (let t = 0; t < e.length / 2; t++) r += String.fromCharCode(e.readUInt16BE(2 * t)); - return r; - } - if ('numstr' === e) { - const e = t.raw().toString('ascii'); - return this._isNumstr(e) ? e : t.error('Decoding of string type: numstr unsupported characters'); - } - if ('octstr' === e) return t.raw(); - if ('objDesc' === e) return t.raw(); - if ('printstr' === e) { - const e = t.raw().toString('ascii'); - return this._isPrintstr(e) ? e : t.error('Decoding of string type: printstr unsupported characters'); - } - return /str$/.test(e) ? t.raw().toString() : t.error('Decoding of string type: ' + e + ' unsupported'); - }), - (u.prototype._decodeObjid = function (t, e, r) { - let i; - const n = []; - let o = 0, - s = 0; - for (; !t.isEmpty(); ) (s = t.readUInt8()), (o <<= 7), (o |= 127 & s), 0 == (128 & s) && (n.push(o), (o = 0)); - 128 & s && n.push(o); - const a = (n[0] / 40) | 0, - h = n[0] % 40; - if (((i = r ? n : [a, h].concat(n.slice(1))), e)) { - let t = e[i.join(' ')]; - void 0 === t && (t = e[i.join('.')]), void 0 !== t && (i = t); - } - return i; - }), - (u.prototype._decodeTime = function (t, e) { - const r = t.raw().toString(); - let i, n, o, s, a, h; - if ('gentime' === e) - (i = 0 | r.slice(0, 4)), - (n = 0 | r.slice(4, 6)), - (o = 0 | r.slice(6, 8)), - (s = 0 | r.slice(8, 10)), - (a = 0 | r.slice(10, 12)), - (h = 0 | r.slice(12, 14)); - else { - if ('utctime' !== e) return t.error('Decoding ' + e + ' time is not supported yet'); - (i = 0 | r.slice(0, 2)), - (n = 0 | r.slice(2, 4)), - (o = 0 | r.slice(4, 6)), - (s = 0 | r.slice(6, 8)), - (a = 0 | r.slice(8, 10)), - (h = 0 | r.slice(10, 12)), - (i = i < 70 ? 2e3 + i : 1900 + i); - } - return Date.UTC(i, n - 1, o, s, a, h, 0); - }), - (u.prototype._decodeNull = function () { - return null; - }), - (u.prototype._decodeBool = function (t) { - const e = t.readUInt8(); - return t.isError(e) ? e : 0 !== e; - }), - (u.prototype._decodeInt = function (t, e) { - const r = t.raw(); - let i = new n(r); - return e && (i = e[i.toString(10)] || i), i; - }), - (u.prototype._use = function (t, e) { - return 'function' == typeof t && (t = t(e)), t._getDecoder('der').tree; - }); - }, - 4823: (t, e, r) => { - 'use strict'; - const i = e; - (i.der = r(8306)), (i.pem = r(8033)); - }, - 8033: (t, e, r) => { - 'use strict'; - const i = r(87), - n = r(1788).Buffer, - o = r(8306); - function s(t) { - o.call(this, t), (this.enc = 'pem'); - } - i(s, o), - (t.exports = s), - (s.prototype.decode = function (t, e) { - const r = t.toString().split(/[\r\n]+/g), - i = e.label.toUpperCase(), - s = /^-----(BEGIN|END) ([^-]+)-----$/; - let a = -1, - h = -1; - for (let t = 0; t < r.length; t++) { - const e = r[t].match(s); - if (null !== e && e[2] === i) { - if (-1 !== a) { - if ('END' !== e[1]) break; - h = t; - break; - } - if ('BEGIN' !== e[1]) break; - a = t; - } - } - if (-1 === a || -1 === h) throw new Error('PEM section not found for: ' + i); - const u = r.slice(a + 1, h).join(''); - u.replace(/[^a-z0-9+/=]+/gi, ''); - const f = n.from(u, 'base64'); - return o.prototype.decode.call(this, f, e); - }); - }, - 1584: (t, e, r) => { - 'use strict'; - const i = r(87), - n = r(1788).Buffer, - o = r(1388), - s = r(643); - function a(t) { - (this.enc = 'der'), (this.name = t.name), (this.entity = t), (this.tree = new h()), this.tree._init(t.body); - } - function h(t) { - o.call(this, 'der', t); - } - function u(t) { - return t < 10 ? '0' + t : t; - } - (t.exports = a), - (a.prototype.encode = function (t, e) { - return this.tree._encode(t, e).join(); - }), - i(h, o), - (h.prototype._encodeComposite = function (t, e, r, i) { - const o = (function (t, e, r, i) { - let n; - if (('seqof' === t ? (t = 'seq') : 'setof' === t && (t = 'set'), s.tagByName.hasOwnProperty(t))) n = s.tagByName[t]; - else { - if ('number' != typeof t || (0 | t) !== t) return i.error('Unknown tag: ' + t); - n = t; - } - return n >= 31 - ? i.error('Multi-octet tag encoding unsupported') - : (e || (n |= 32), (n |= s.tagClassByName[r || 'universal'] << 6), n); - })(t, e, r, this.reporter); - if (i.length < 128) { - const t = n.alloc(2); - return (t[0] = o), (t[1] = i.length), this._createEncoderBuffer([t, i]); - } - let a = 1; - for (let t = i.length; t >= 256; t >>= 8) a++; - const h = n.alloc(2 + a); - (h[0] = o), (h[1] = 128 | a); - for (let t = 1 + a, e = i.length; e > 0; t--, e >>= 8) h[t] = 255 & e; - return this._createEncoderBuffer([h, i]); - }), - (h.prototype._encodeStr = function (t, e) { - if ('bitstr' === e) return this._createEncoderBuffer([0 | t.unused, t.data]); - if ('bmpstr' === e) { - const e = n.alloc(2 * t.length); - for (let r = 0; r < t.length; r++) e.writeUInt16BE(t.charCodeAt(r), 2 * r); - return this._createEncoderBuffer(e); - } - return 'numstr' === e - ? this._isNumstr(t) - ? this._createEncoderBuffer(t) - : this.reporter.error('Encoding of string type: numstr supports only digits and space') - : 'printstr' === e - ? this._isPrintstr(t) - ? this._createEncoderBuffer(t) - : this.reporter.error( - 'Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark' - ) - : /str$/.test(e) || 'objDesc' === e - ? this._createEncoderBuffer(t) - : this.reporter.error('Encoding of string type: ' + e + ' unsupported'); - }), - (h.prototype._encodeObjid = function (t, e, r) { - if ('string' == typeof t) { - if (!e) return this.reporter.error('string objid given, but no values map found'); - if (!e.hasOwnProperty(t)) return this.reporter.error('objid not found in values map'); - t = e[t].split(/[\s.]+/g); - for (let e = 0; e < t.length; e++) t[e] |= 0; - } else if (Array.isArray(t)) { - t = t.slice(); - for (let e = 0; e < t.length; e++) t[e] |= 0; - } - if (!Array.isArray(t)) return this.reporter.error('objid() should be either array or string, got: ' + JSON.stringify(t)); - if (!r) { - if (t[1] >= 40) return this.reporter.error('Second objid identifier OOB'); - t.splice(0, 2, 40 * t[0] + t[1]); - } - let i = 0; - for (let e = 0; e < t.length; e++) { - let r = t[e]; - for (i++; r >= 128; r >>= 7) i++; - } - const o = n.alloc(i); - let s = o.length - 1; - for (let e = t.length - 1; e >= 0; e--) { - let r = t[e]; - for (o[s--] = 127 & r; (r >>= 7) > 0; ) o[s--] = 128 | (127 & r); - } - return this._createEncoderBuffer(o); - }), - (h.prototype._encodeTime = function (t, e) { - let r; - const i = new Date(t); - return ( - 'gentime' === e - ? (r = [ - u(i.getUTCFullYear()), - u(i.getUTCMonth() + 1), - u(i.getUTCDate()), - u(i.getUTCHours()), - u(i.getUTCMinutes()), - u(i.getUTCSeconds()), - 'Z', - ].join('')) - : 'utctime' === e - ? (r = [ - u(i.getUTCFullYear() % 100), - u(i.getUTCMonth() + 1), - u(i.getUTCDate()), - u(i.getUTCHours()), - u(i.getUTCMinutes()), - u(i.getUTCSeconds()), - 'Z', - ].join('')) - : this.reporter.error('Encoding ' + e + ' time is not supported yet'), - this._encodeStr(r, 'octstr') - ); - }), - (h.prototype._encodeNull = function () { - return this._createEncoderBuffer(''); - }), - (h.prototype._encodeInt = function (t, e) { - if ('string' == typeof t) { - if (!e) return this.reporter.error('String int or enum given, but no values map'); - if (!e.hasOwnProperty(t)) return this.reporter.error("Values map doesn't contain: " + JSON.stringify(t)); - t = e[t]; - } - if ('number' != typeof t && !n.isBuffer(t)) { - const e = t.toArray(); - !t.sign && 128 & e[0] && e.unshift(0), (t = n.from(e)); - } - if (n.isBuffer(t)) { - let e = t.length; - 0 === t.length && e++; - const r = n.alloc(e); - return t.copy(r), 0 === t.length && (r[0] = 0), this._createEncoderBuffer(r); - } - if (t < 128) return this._createEncoderBuffer(t); - if (t < 256) return this._createEncoderBuffer([0, t]); - let r = 1; - for (let e = t; e >= 256; e >>= 8) r++; - const i = new Array(r); - for (let e = i.length - 1; e >= 0; e--) (i[e] = 255 & t), (t >>= 8); - return 128 & i[0] && i.unshift(0), this._createEncoderBuffer(n.from(i)); - }), - (h.prototype._encodeBool = function (t) { - return this._createEncoderBuffer(t ? 255 : 0); - }), - (h.prototype._use = function (t, e) { - return 'function' == typeof t && (t = t(e)), t._getEncoder('der').tree; - }), - (h.prototype._skipDefault = function (t, e, r) { - const i = this._baseState; - let n; - if (null === i.default) return !1; - const o = t.join(); - if ( - (void 0 === i.defaultBuffer && (i.defaultBuffer = this._encodeValue(i.default, e, r).join()), - o.length !== i.defaultBuffer.length) - ) - return !1; - for (n = 0; n < o.length; n++) if (o[n] !== i.defaultBuffer[n]) return !1; - return !0; - }); - }, - 3886: (t, e, r) => { - 'use strict'; - const i = e; - (i.der = r(1584)), (i.pem = r(6927)); - }, - 6927: (t, e, r) => { - 'use strict'; - const i = r(87), - n = r(1584); - function o(t) { - n.call(this, t), (this.enc = 'pem'); - } - i(o, n), - (t.exports = o), - (o.prototype.encode = function (t, e) { - const r = n.prototype.encode.call(this, t).toString('base64'), - i = ['-----BEGIN ' + e.label + '-----']; - for (let t = 0; t < r.length; t += 64) i.push(r.slice(t, t + 64)); - return i.push('-----END ' + e.label + '-----'), i.join('\n'); - }); - }, - 5911: function (t, e, r) { - !(function (t, e) { - 'use strict'; - function i(t, e) { - if (!t) throw new Error(e || 'Assertion failed'); - } - function n(t, e) { - t.super_ = e; - var r = function () {}; - (r.prototype = e.prototype), (t.prototype = new r()), (t.prototype.constructor = t); - } - function o(t, e, r) { - if (o.isBN(t)) return t; - (this.negative = 0), - (this.words = null), - (this.length = 0), - (this.red = null), - null !== t && (('le' !== e && 'be' !== e) || ((r = e), (e = 10)), this._init(t || 0, e || 10, r || 'be')); - } - var s; - 'object' == typeof t ? (t.exports = o) : (e.BN = o), (o.BN = o), (o.wordSize = 26); - try { - s = 'undefined' != typeof window && void 0 !== window.Buffer ? window.Buffer : r(2909).Buffer; - } catch (t) {} - function a(t, e) { - var r = t.charCodeAt(e); - return r >= 65 && r <= 70 ? r - 55 : r >= 97 && r <= 102 ? r - 87 : (r - 48) & 15; - } - function h(t, e, r) { - var i = a(t, r); - return r - 1 >= e && (i |= a(t, r - 1) << 4), i; - } - function u(t, e, r, i) { - for (var n = 0, o = Math.min(t.length, r), s = e; s < o; s++) { - var a = t.charCodeAt(s) - 48; - (n *= i), (n += a >= 49 ? a - 49 + 10 : a >= 17 ? a - 17 + 10 : a); - } - return n; - } - (o.isBN = function (t) { - return ( - t instanceof o || (null !== t && 'object' == typeof t && t.constructor.wordSize === o.wordSize && Array.isArray(t.words)) - ); - }), - (o.max = function (t, e) { - return t.cmp(e) > 0 ? t : e; - }), - (o.min = function (t, e) { - return t.cmp(e) < 0 ? t : e; - }), - (o.prototype._init = function (t, e, r) { - if ('number' == typeof t) return this._initNumber(t, e, r); - if ('object' == typeof t) return this._initArray(t, e, r); - 'hex' === e && (e = 16), i(e === (0 | e) && e >= 2 && e <= 36); - var n = 0; - '-' === (t = t.toString().replace(/\s+/g, ''))[0] && (n++, (this.negative = 1)), - n < t.length && - (16 === e ? this._parseHex(t, n, r) : (this._parseBase(t, e, n), 'le' === r && this._initArray(this.toArray(), e, r))); - }), - (o.prototype._initNumber = function (t, e, r) { - t < 0 && ((this.negative = 1), (t = -t)), - t < 67108864 - ? ((this.words = [67108863 & t]), (this.length = 1)) - : t < 4503599627370496 - ? ((this.words = [67108863 & t, (t / 67108864) & 67108863]), (this.length = 2)) - : (i(t < 9007199254740992), (this.words = [67108863 & t, (t / 67108864) & 67108863, 1]), (this.length = 3)), - 'le' === r && this._initArray(this.toArray(), e, r); - }), - (o.prototype._initArray = function (t, e, r) { - if ((i('number' == typeof t.length), t.length <= 0)) return (this.words = [0]), (this.length = 1), this; - (this.length = Math.ceil(t.length / 3)), (this.words = new Array(this.length)); - for (var n = 0; n < this.length; n++) this.words[n] = 0; - var o, - s, - a = 0; - if ('be' === r) - for (n = t.length - 1, o = 0; n >= 0; n -= 3) - (s = t[n] | (t[n - 1] << 8) | (t[n - 2] << 16)), - (this.words[o] |= (s << a) & 67108863), - (this.words[o + 1] = (s >>> (26 - a)) & 67108863), - (a += 24) >= 26 && ((a -= 26), o++); - else if ('le' === r) - for (n = 0, o = 0; n < t.length; n += 3) - (s = t[n] | (t[n + 1] << 8) | (t[n + 2] << 16)), - (this.words[o] |= (s << a) & 67108863), - (this.words[o + 1] = (s >>> (26 - a)) & 67108863), - (a += 24) >= 26 && ((a -= 26), o++); - return this.strip(); - }), - (o.prototype._parseHex = function (t, e, r) { - (this.length = Math.ceil((t.length - e) / 6)), (this.words = new Array(this.length)); - for (var i = 0; i < this.length; i++) this.words[i] = 0; - var n, - o = 0, - s = 0; - if ('be' === r) - for (i = t.length - 1; i >= e; i -= 2) - (n = h(t, e, i) << o), - (this.words[s] |= 67108863 & n), - o >= 18 ? ((o -= 18), (s += 1), (this.words[s] |= n >>> 26)) : (o += 8); - else - for (i = (t.length - e) % 2 == 0 ? e + 1 : e; i < t.length; i += 2) - (n = h(t, e, i) << o), - (this.words[s] |= 67108863 & n), - o >= 18 ? ((o -= 18), (s += 1), (this.words[s] |= n >>> 26)) : (o += 8); - this.strip(); - }), - (o.prototype._parseBase = function (t, e, r) { - (this.words = [0]), (this.length = 1); - for (var i = 0, n = 1; n <= 67108863; n *= e) i++; - i--, (n = (n / e) | 0); - for (var o = t.length - r, s = o % i, a = Math.min(o, o - s) + r, h = 0, f = r; f < a; f += i) - (h = u(t, f, f + i, e)), this.imuln(n), this.words[0] + h < 67108864 ? (this.words[0] += h) : this._iaddn(h); - if (0 !== s) { - var c = 1; - for (h = u(t, f, t.length, e), f = 0; f < s; f++) c *= e; - this.imuln(c), this.words[0] + h < 67108864 ? (this.words[0] += h) : this._iaddn(h); - } - this.strip(); - }), - (o.prototype.copy = function (t) { - t.words = new Array(this.length); - for (var e = 0; e < this.length; e++) t.words[e] = this.words[e]; - (t.length = this.length), (t.negative = this.negative), (t.red = this.red); - }), - (o.prototype.clone = function () { - var t = new o(null); - return this.copy(t), t; - }), - (o.prototype._expand = function (t) { - for (; this.length < t; ) this.words[this.length++] = 0; - return this; - }), - (o.prototype.strip = function () { - for (; this.length > 1 && 0 === this.words[this.length - 1]; ) this.length--; - return this._normSign(); - }), - (o.prototype._normSign = function () { - return 1 === this.length && 0 === this.words[0] && (this.negative = 0), this; - }), - (o.prototype.inspect = function () { - return (this.red ? ''; - }); - var f = [ - '', - '0', - '00', - '000', - '0000', - '00000', - '000000', - '0000000', - '00000000', - '000000000', - '0000000000', - '00000000000', - '000000000000', - '0000000000000', - '00000000000000', - '000000000000000', - '0000000000000000', - '00000000000000000', - '000000000000000000', - '0000000000000000000', - '00000000000000000000', - '000000000000000000000', - '0000000000000000000000', - '00000000000000000000000', - '000000000000000000000000', - '0000000000000000000000000', - ], - c = [0, 0, 25, 16, 12, 11, 10, 9, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5], - l = [ - 0, 0, 33554432, 43046721, 16777216, 48828125, 60466176, 40353607, 16777216, 43046721, 1e7, 19487171, 35831808, 62748517, - 7529536, 11390625, 16777216, 24137569, 34012224, 47045881, 64e6, 4084101, 5153632, 6436343, 7962624, 9765625, 11881376, - 14348907, 17210368, 20511149, 243e5, 28629151, 33554432, 39135393, 45435424, 52521875, 60466176, - ]; - function d(t, e, r) { - r.negative = e.negative ^ t.negative; - var i = (t.length + e.length) | 0; - (r.length = i), (i = (i - 1) | 0); - var n = 0 | t.words[0], - o = 0 | e.words[0], - s = n * o, - a = 67108863 & s, - h = (s / 67108864) | 0; - r.words[0] = a; - for (var u = 1; u < i; u++) { - for (var f = h >>> 26, c = 67108863 & h, l = Math.min(u, e.length - 1), d = Math.max(0, u - t.length + 1); d <= l; d++) { - var p = (u - d) | 0; - (f += ((s = (n = 0 | t.words[p]) * (o = 0 | e.words[d]) + c) / 67108864) | 0), (c = 67108863 & s); - } - (r.words[u] = 0 | c), (h = 0 | f); - } - return 0 !== h ? (r.words[u] = 0 | h) : r.length--, r.strip(); - } - (o.prototype.toString = function (t, e) { - var r; - if (((e = 0 | e || 1), 16 === (t = t || 10) || 'hex' === t)) { - r = ''; - for (var n = 0, o = 0, s = 0; s < this.length; s++) { - var a = this.words[s], - h = (16777215 & ((a << n) | o)).toString(16); - (r = 0 != (o = (a >>> (24 - n)) & 16777215) || s !== this.length - 1 ? f[6 - h.length] + h + r : h + r), - (n += 2) >= 26 && ((n -= 26), s--); - } - for (0 !== o && (r = o.toString(16) + r); r.length % e != 0; ) r = '0' + r; - return 0 !== this.negative && (r = '-' + r), r; - } - if (t === (0 | t) && t >= 2 && t <= 36) { - var u = c[t], - d = l[t]; - r = ''; - var p = this.clone(); - for (p.negative = 0; !p.isZero(); ) { - var m = p.modn(d).toString(t); - r = (p = p.idivn(d)).isZero() ? m + r : f[u - m.length] + m + r; - } - for (this.isZero() && (r = '0' + r); r.length % e != 0; ) r = '0' + r; - return 0 !== this.negative && (r = '-' + r), r; - } - i(!1, 'Base should be between 2 and 36'); - }), - (o.prototype.toNumber = function () { - var t = this.words[0]; - return ( - 2 === this.length - ? (t += 67108864 * this.words[1]) - : 3 === this.length && 1 === this.words[2] - ? (t += 4503599627370496 + 67108864 * this.words[1]) - : this.length > 2 && i(!1, 'Number can only safely store up to 53 bits'), - 0 !== this.negative ? -t : t - ); - }), - (o.prototype.toJSON = function () { - return this.toString(16); - }), - (o.prototype.toBuffer = function (t, e) { - return i(void 0 !== s), this.toArrayLike(s, t, e); - }), - (o.prototype.toArray = function (t, e) { - return this.toArrayLike(Array, t, e); - }), - (o.prototype.toArrayLike = function (t, e, r) { - var n = this.byteLength(), - o = r || Math.max(1, n); - i(n <= o, 'byte array longer than desired length'), i(o > 0, 'Requested array length <= 0'), this.strip(); - var s, - a, - h = 'le' === e, - u = new t(o), - f = this.clone(); - if (h) { - for (a = 0; !f.isZero(); a++) (s = f.andln(255)), f.iushrn(8), (u[a] = s); - for (; a < o; a++) u[a] = 0; - } else { - for (a = 0; a < o - n; a++) u[a] = 0; - for (a = 0; !f.isZero(); a++) (s = f.andln(255)), f.iushrn(8), (u[o - a - 1] = s); - } - return u; - }), - Math.clz32 - ? (o.prototype._countBits = function (t) { - return 32 - Math.clz32(t); - }) - : (o.prototype._countBits = function (t) { - var e = t, - r = 0; - return ( - e >= 4096 && ((r += 13), (e >>>= 13)), - e >= 64 && ((r += 7), (e >>>= 7)), - e >= 8 && ((r += 4), (e >>>= 4)), - e >= 2 && ((r += 2), (e >>>= 2)), - r + e - ); - }), - (o.prototype._zeroBits = function (t) { - if (0 === t) return 26; - var e = t, - r = 0; - return ( - 0 == (8191 & e) && ((r += 13), (e >>>= 13)), - 0 == (127 & e) && ((r += 7), (e >>>= 7)), - 0 == (15 & e) && ((r += 4), (e >>>= 4)), - 0 == (3 & e) && ((r += 2), (e >>>= 2)), - 0 == (1 & e) && r++, - r - ); - }), - (o.prototype.bitLength = function () { - var t = this.words[this.length - 1], - e = this._countBits(t); - return 26 * (this.length - 1) + e; - }), - (o.prototype.zeroBits = function () { - if (this.isZero()) return 0; - for (var t = 0, e = 0; e < this.length; e++) { - var r = this._zeroBits(this.words[e]); - if (((t += r), 26 !== r)) break; - } - return t; - }), - (o.prototype.byteLength = function () { - return Math.ceil(this.bitLength() / 8); - }), - (o.prototype.toTwos = function (t) { - return 0 !== this.negative ? this.abs().inotn(t).iaddn(1) : this.clone(); - }), - (o.prototype.fromTwos = function (t) { - return this.testn(t - 1) ? this.notn(t).iaddn(1).ineg() : this.clone(); - }), - (o.prototype.isNeg = function () { - return 0 !== this.negative; - }), - (o.prototype.neg = function () { - return this.clone().ineg(); - }), - (o.prototype.ineg = function () { - return this.isZero() || (this.negative ^= 1), this; - }), - (o.prototype.iuor = function (t) { - for (; this.length < t.length; ) this.words[this.length++] = 0; - for (var e = 0; e < t.length; e++) this.words[e] = this.words[e] | t.words[e]; - return this.strip(); - }), - (o.prototype.ior = function (t) { - return i(0 == (this.negative | t.negative)), this.iuor(t); - }), - (o.prototype.or = function (t) { - return this.length > t.length ? this.clone().ior(t) : t.clone().ior(this); - }), - (o.prototype.uor = function (t) { - return this.length > t.length ? this.clone().iuor(t) : t.clone().iuor(this); - }), - (o.prototype.iuand = function (t) { - var e; - e = this.length > t.length ? t : this; - for (var r = 0; r < e.length; r++) this.words[r] = this.words[r] & t.words[r]; - return (this.length = e.length), this.strip(); - }), - (o.prototype.iand = function (t) { - return i(0 == (this.negative | t.negative)), this.iuand(t); - }), - (o.prototype.and = function (t) { - return this.length > t.length ? this.clone().iand(t) : t.clone().iand(this); - }), - (o.prototype.uand = function (t) { - return this.length > t.length ? this.clone().iuand(t) : t.clone().iuand(this); - }), - (o.prototype.iuxor = function (t) { - var e, r; - this.length > t.length ? ((e = this), (r = t)) : ((e = t), (r = this)); - for (var i = 0; i < r.length; i++) this.words[i] = e.words[i] ^ r.words[i]; - if (this !== e) for (; i < e.length; i++) this.words[i] = e.words[i]; - return (this.length = e.length), this.strip(); - }), - (o.prototype.ixor = function (t) { - return i(0 == (this.negative | t.negative)), this.iuxor(t); - }), - (o.prototype.xor = function (t) { - return this.length > t.length ? this.clone().ixor(t) : t.clone().ixor(this); - }), - (o.prototype.uxor = function (t) { - return this.length > t.length ? this.clone().iuxor(t) : t.clone().iuxor(this); - }), - (o.prototype.inotn = function (t) { - i('number' == typeof t && t >= 0); - var e = 0 | Math.ceil(t / 26), - r = t % 26; - this._expand(e), r > 0 && e--; - for (var n = 0; n < e; n++) this.words[n] = 67108863 & ~this.words[n]; - return r > 0 && (this.words[n] = ~this.words[n] & (67108863 >> (26 - r))), this.strip(); - }), - (o.prototype.notn = function (t) { - return this.clone().inotn(t); - }), - (o.prototype.setn = function (t, e) { - i('number' == typeof t && t >= 0); - var r = (t / 26) | 0, - n = t % 26; - return this._expand(r + 1), (this.words[r] = e ? this.words[r] | (1 << n) : this.words[r] & ~(1 << n)), this.strip(); - }), - (o.prototype.iadd = function (t) { - var e, r, i; - if (0 !== this.negative && 0 === t.negative) - return (this.negative = 0), (e = this.isub(t)), (this.negative ^= 1), this._normSign(); - if (0 === this.negative && 0 !== t.negative) return (t.negative = 0), (e = this.isub(t)), (t.negative = 1), e._normSign(); - this.length > t.length ? ((r = this), (i = t)) : ((r = t), (i = this)); - for (var n = 0, o = 0; o < i.length; o++) - (e = (0 | r.words[o]) + (0 | i.words[o]) + n), (this.words[o] = 67108863 & e), (n = e >>> 26); - for (; 0 !== n && o < r.length; o++) (e = (0 | r.words[o]) + n), (this.words[o] = 67108863 & e), (n = e >>> 26); - if (((this.length = r.length), 0 !== n)) (this.words[this.length] = n), this.length++; - else if (r !== this) for (; o < r.length; o++) this.words[o] = r.words[o]; - return this; - }), - (o.prototype.add = function (t) { - var e; - return 0 !== t.negative && 0 === this.negative - ? ((t.negative = 0), (e = this.sub(t)), (t.negative ^= 1), e) - : 0 === t.negative && 0 !== this.negative - ? ((this.negative = 0), (e = t.sub(this)), (this.negative = 1), e) - : this.length > t.length - ? this.clone().iadd(t) - : t.clone().iadd(this); - }), - (o.prototype.isub = function (t) { - if (0 !== t.negative) { - t.negative = 0; - var e = this.iadd(t); - return (t.negative = 1), e._normSign(); - } - if (0 !== this.negative) return (this.negative = 0), this.iadd(t), (this.negative = 1), this._normSign(); - var r, - i, - n = this.cmp(t); - if (0 === n) return (this.negative = 0), (this.length = 1), (this.words[0] = 0), this; - n > 0 ? ((r = this), (i = t)) : ((r = t), (i = this)); - for (var o = 0, s = 0; s < i.length; s++) - (o = (e = (0 | r.words[s]) - (0 | i.words[s]) + o) >> 26), (this.words[s] = 67108863 & e); - for (; 0 !== o && s < r.length; s++) (o = (e = (0 | r.words[s]) + o) >> 26), (this.words[s] = 67108863 & e); - if (0 === o && s < r.length && r !== this) for (; s < r.length; s++) this.words[s] = r.words[s]; - return (this.length = Math.max(this.length, s)), r !== this && (this.negative = 1), this.strip(); - }), - (o.prototype.sub = function (t) { - return this.clone().isub(t); - }); - var p = function (t, e, r) { - var i, - n, - o, - s = t.words, - a = e.words, - h = r.words, - u = 0, - f = 0 | s[0], - c = 8191 & f, - l = f >>> 13, - d = 0 | s[1], - p = 8191 & d, - m = d >>> 13, - g = 0 | s[2], - b = 8191 & g, - y = g >>> 13, - v = 0 | s[3], - w = 8191 & v, - _ = v >>> 13, - M = 0 | s[4], - E = 8191 & M, - S = M >>> 13, - x = 0 | s[5], - A = 8191 & x, - k = x >>> 13, - R = 0 | s[6], - B = 8191 & R, - I = R >>> 13, - T = 0 | s[7], - P = 8191 & T, - O = T >>> 13, - L = 0 | s[8], - C = 8191 & L, - N = L >>> 13, - j = 0 | s[9], - U = 8191 & j, - D = j >>> 13, - z = 0 | a[0], - F = 8191 & z, - q = z >>> 13, - H = 0 | a[1], - $ = 8191 & H, - Z = H >>> 13, - G = 0 | a[2], - V = 8191 & G, - W = G >>> 13, - K = 0 | a[3], - Y = 8191 & K, - J = K >>> 13, - X = 0 | a[4], - Q = 8191 & X, - tt = X >>> 13, - et = 0 | a[5], - rt = 8191 & et, - it = et >>> 13, - nt = 0 | a[6], - ot = 8191 & nt, - st = nt >>> 13, - at = 0 | a[7], - ht = 8191 & at, - ut = at >>> 13, - ft = 0 | a[8], - ct = 8191 & ft, - lt = ft >>> 13, - dt = 0 | a[9], - pt = 8191 & dt, - mt = dt >>> 13; - (r.negative = t.negative ^ e.negative), (r.length = 19); - var gt = (((u + (i = Math.imul(c, F))) | 0) + ((8191 & (n = ((n = Math.imul(c, q)) + Math.imul(l, F)) | 0)) << 13)) | 0; - (u = ((((o = Math.imul(l, q)) + (n >>> 13)) | 0) + (gt >>> 26)) | 0), - (gt &= 67108863), - (i = Math.imul(p, F)), - (n = ((n = Math.imul(p, q)) + Math.imul(m, F)) | 0), - (o = Math.imul(m, q)); - var bt = - (((u + (i = (i + Math.imul(c, $)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, Z)) | 0) + Math.imul(l, $)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, Z)) | 0) + (n >>> 13)) | 0) + (bt >>> 26)) | 0), - (bt &= 67108863), - (i = Math.imul(b, F)), - (n = ((n = Math.imul(b, q)) + Math.imul(y, F)) | 0), - (o = Math.imul(y, q)), - (i = (i + Math.imul(p, $)) | 0), - (n = ((n = (n + Math.imul(p, Z)) | 0) + Math.imul(m, $)) | 0), - (o = (o + Math.imul(m, Z)) | 0); - var yt = - (((u + (i = (i + Math.imul(c, V)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, W)) | 0) + Math.imul(l, V)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, W)) | 0) + (n >>> 13)) | 0) + (yt >>> 26)) | 0), - (yt &= 67108863), - (i = Math.imul(w, F)), - (n = ((n = Math.imul(w, q)) + Math.imul(_, F)) | 0), - (o = Math.imul(_, q)), - (i = (i + Math.imul(b, $)) | 0), - (n = ((n = (n + Math.imul(b, Z)) | 0) + Math.imul(y, $)) | 0), - (o = (o + Math.imul(y, Z)) | 0), - (i = (i + Math.imul(p, V)) | 0), - (n = ((n = (n + Math.imul(p, W)) | 0) + Math.imul(m, V)) | 0), - (o = (o + Math.imul(m, W)) | 0); - var vt = - (((u + (i = (i + Math.imul(c, Y)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, J)) | 0) + Math.imul(l, Y)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, J)) | 0) + (n >>> 13)) | 0) + (vt >>> 26)) | 0), - (vt &= 67108863), - (i = Math.imul(E, F)), - (n = ((n = Math.imul(E, q)) + Math.imul(S, F)) | 0), - (o = Math.imul(S, q)), - (i = (i + Math.imul(w, $)) | 0), - (n = ((n = (n + Math.imul(w, Z)) | 0) + Math.imul(_, $)) | 0), - (o = (o + Math.imul(_, Z)) | 0), - (i = (i + Math.imul(b, V)) | 0), - (n = ((n = (n + Math.imul(b, W)) | 0) + Math.imul(y, V)) | 0), - (o = (o + Math.imul(y, W)) | 0), - (i = (i + Math.imul(p, Y)) | 0), - (n = ((n = (n + Math.imul(p, J)) | 0) + Math.imul(m, Y)) | 0), - (o = (o + Math.imul(m, J)) | 0); - var wt = - (((u + (i = (i + Math.imul(c, Q)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, tt)) | 0) + Math.imul(l, Q)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, tt)) | 0) + (n >>> 13)) | 0) + (wt >>> 26)) | 0), - (wt &= 67108863), - (i = Math.imul(A, F)), - (n = ((n = Math.imul(A, q)) + Math.imul(k, F)) | 0), - (o = Math.imul(k, q)), - (i = (i + Math.imul(E, $)) | 0), - (n = ((n = (n + Math.imul(E, Z)) | 0) + Math.imul(S, $)) | 0), - (o = (o + Math.imul(S, Z)) | 0), - (i = (i + Math.imul(w, V)) | 0), - (n = ((n = (n + Math.imul(w, W)) | 0) + Math.imul(_, V)) | 0), - (o = (o + Math.imul(_, W)) | 0), - (i = (i + Math.imul(b, Y)) | 0), - (n = ((n = (n + Math.imul(b, J)) | 0) + Math.imul(y, Y)) | 0), - (o = (o + Math.imul(y, J)) | 0), - (i = (i + Math.imul(p, Q)) | 0), - (n = ((n = (n + Math.imul(p, tt)) | 0) + Math.imul(m, Q)) | 0), - (o = (o + Math.imul(m, tt)) | 0); - var _t = - (((u + (i = (i + Math.imul(c, rt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, it)) | 0) + Math.imul(l, rt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, it)) | 0) + (n >>> 13)) | 0) + (_t >>> 26)) | 0), - (_t &= 67108863), - (i = Math.imul(B, F)), - (n = ((n = Math.imul(B, q)) + Math.imul(I, F)) | 0), - (o = Math.imul(I, q)), - (i = (i + Math.imul(A, $)) | 0), - (n = ((n = (n + Math.imul(A, Z)) | 0) + Math.imul(k, $)) | 0), - (o = (o + Math.imul(k, Z)) | 0), - (i = (i + Math.imul(E, V)) | 0), - (n = ((n = (n + Math.imul(E, W)) | 0) + Math.imul(S, V)) | 0), - (o = (o + Math.imul(S, W)) | 0), - (i = (i + Math.imul(w, Y)) | 0), - (n = ((n = (n + Math.imul(w, J)) | 0) + Math.imul(_, Y)) | 0), - (o = (o + Math.imul(_, J)) | 0), - (i = (i + Math.imul(b, Q)) | 0), - (n = ((n = (n + Math.imul(b, tt)) | 0) + Math.imul(y, Q)) | 0), - (o = (o + Math.imul(y, tt)) | 0), - (i = (i + Math.imul(p, rt)) | 0), - (n = ((n = (n + Math.imul(p, it)) | 0) + Math.imul(m, rt)) | 0), - (o = (o + Math.imul(m, it)) | 0); - var Mt = - (((u + (i = (i + Math.imul(c, ot)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, st)) | 0) + Math.imul(l, ot)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, st)) | 0) + (n >>> 13)) | 0) + (Mt >>> 26)) | 0), - (Mt &= 67108863), - (i = Math.imul(P, F)), - (n = ((n = Math.imul(P, q)) + Math.imul(O, F)) | 0), - (o = Math.imul(O, q)), - (i = (i + Math.imul(B, $)) | 0), - (n = ((n = (n + Math.imul(B, Z)) | 0) + Math.imul(I, $)) | 0), - (o = (o + Math.imul(I, Z)) | 0), - (i = (i + Math.imul(A, V)) | 0), - (n = ((n = (n + Math.imul(A, W)) | 0) + Math.imul(k, V)) | 0), - (o = (o + Math.imul(k, W)) | 0), - (i = (i + Math.imul(E, Y)) | 0), - (n = ((n = (n + Math.imul(E, J)) | 0) + Math.imul(S, Y)) | 0), - (o = (o + Math.imul(S, J)) | 0), - (i = (i + Math.imul(w, Q)) | 0), - (n = ((n = (n + Math.imul(w, tt)) | 0) + Math.imul(_, Q)) | 0), - (o = (o + Math.imul(_, tt)) | 0), - (i = (i + Math.imul(b, rt)) | 0), - (n = ((n = (n + Math.imul(b, it)) | 0) + Math.imul(y, rt)) | 0), - (o = (o + Math.imul(y, it)) | 0), - (i = (i + Math.imul(p, ot)) | 0), - (n = ((n = (n + Math.imul(p, st)) | 0) + Math.imul(m, ot)) | 0), - (o = (o + Math.imul(m, st)) | 0); - var Et = - (((u + (i = (i + Math.imul(c, ht)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, ut)) | 0) + Math.imul(l, ht)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, ut)) | 0) + (n >>> 13)) | 0) + (Et >>> 26)) | 0), - (Et &= 67108863), - (i = Math.imul(C, F)), - (n = ((n = Math.imul(C, q)) + Math.imul(N, F)) | 0), - (o = Math.imul(N, q)), - (i = (i + Math.imul(P, $)) | 0), - (n = ((n = (n + Math.imul(P, Z)) | 0) + Math.imul(O, $)) | 0), - (o = (o + Math.imul(O, Z)) | 0), - (i = (i + Math.imul(B, V)) | 0), - (n = ((n = (n + Math.imul(B, W)) | 0) + Math.imul(I, V)) | 0), - (o = (o + Math.imul(I, W)) | 0), - (i = (i + Math.imul(A, Y)) | 0), - (n = ((n = (n + Math.imul(A, J)) | 0) + Math.imul(k, Y)) | 0), - (o = (o + Math.imul(k, J)) | 0), - (i = (i + Math.imul(E, Q)) | 0), - (n = ((n = (n + Math.imul(E, tt)) | 0) + Math.imul(S, Q)) | 0), - (o = (o + Math.imul(S, tt)) | 0), - (i = (i + Math.imul(w, rt)) | 0), - (n = ((n = (n + Math.imul(w, it)) | 0) + Math.imul(_, rt)) | 0), - (o = (o + Math.imul(_, it)) | 0), - (i = (i + Math.imul(b, ot)) | 0), - (n = ((n = (n + Math.imul(b, st)) | 0) + Math.imul(y, ot)) | 0), - (o = (o + Math.imul(y, st)) | 0), - (i = (i + Math.imul(p, ht)) | 0), - (n = ((n = (n + Math.imul(p, ut)) | 0) + Math.imul(m, ht)) | 0), - (o = (o + Math.imul(m, ut)) | 0); - var St = - (((u + (i = (i + Math.imul(c, ct)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, lt)) | 0) + Math.imul(l, ct)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, lt)) | 0) + (n >>> 13)) | 0) + (St >>> 26)) | 0), - (St &= 67108863), - (i = Math.imul(U, F)), - (n = ((n = Math.imul(U, q)) + Math.imul(D, F)) | 0), - (o = Math.imul(D, q)), - (i = (i + Math.imul(C, $)) | 0), - (n = ((n = (n + Math.imul(C, Z)) | 0) + Math.imul(N, $)) | 0), - (o = (o + Math.imul(N, Z)) | 0), - (i = (i + Math.imul(P, V)) | 0), - (n = ((n = (n + Math.imul(P, W)) | 0) + Math.imul(O, V)) | 0), - (o = (o + Math.imul(O, W)) | 0), - (i = (i + Math.imul(B, Y)) | 0), - (n = ((n = (n + Math.imul(B, J)) | 0) + Math.imul(I, Y)) | 0), - (o = (o + Math.imul(I, J)) | 0), - (i = (i + Math.imul(A, Q)) | 0), - (n = ((n = (n + Math.imul(A, tt)) | 0) + Math.imul(k, Q)) | 0), - (o = (o + Math.imul(k, tt)) | 0), - (i = (i + Math.imul(E, rt)) | 0), - (n = ((n = (n + Math.imul(E, it)) | 0) + Math.imul(S, rt)) | 0), - (o = (o + Math.imul(S, it)) | 0), - (i = (i + Math.imul(w, ot)) | 0), - (n = ((n = (n + Math.imul(w, st)) | 0) + Math.imul(_, ot)) | 0), - (o = (o + Math.imul(_, st)) | 0), - (i = (i + Math.imul(b, ht)) | 0), - (n = ((n = (n + Math.imul(b, ut)) | 0) + Math.imul(y, ht)) | 0), - (o = (o + Math.imul(y, ut)) | 0), - (i = (i + Math.imul(p, ct)) | 0), - (n = ((n = (n + Math.imul(p, lt)) | 0) + Math.imul(m, ct)) | 0), - (o = (o + Math.imul(m, lt)) | 0); - var xt = - (((u + (i = (i + Math.imul(c, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, mt)) | 0) + Math.imul(l, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, mt)) | 0) + (n >>> 13)) | 0) + (xt >>> 26)) | 0), - (xt &= 67108863), - (i = Math.imul(U, $)), - (n = ((n = Math.imul(U, Z)) + Math.imul(D, $)) | 0), - (o = Math.imul(D, Z)), - (i = (i + Math.imul(C, V)) | 0), - (n = ((n = (n + Math.imul(C, W)) | 0) + Math.imul(N, V)) | 0), - (o = (o + Math.imul(N, W)) | 0), - (i = (i + Math.imul(P, Y)) | 0), - (n = ((n = (n + Math.imul(P, J)) | 0) + Math.imul(O, Y)) | 0), - (o = (o + Math.imul(O, J)) | 0), - (i = (i + Math.imul(B, Q)) | 0), - (n = ((n = (n + Math.imul(B, tt)) | 0) + Math.imul(I, Q)) | 0), - (o = (o + Math.imul(I, tt)) | 0), - (i = (i + Math.imul(A, rt)) | 0), - (n = ((n = (n + Math.imul(A, it)) | 0) + Math.imul(k, rt)) | 0), - (o = (o + Math.imul(k, it)) | 0), - (i = (i + Math.imul(E, ot)) | 0), - (n = ((n = (n + Math.imul(E, st)) | 0) + Math.imul(S, ot)) | 0), - (o = (o + Math.imul(S, st)) | 0), - (i = (i + Math.imul(w, ht)) | 0), - (n = ((n = (n + Math.imul(w, ut)) | 0) + Math.imul(_, ht)) | 0), - (o = (o + Math.imul(_, ut)) | 0), - (i = (i + Math.imul(b, ct)) | 0), - (n = ((n = (n + Math.imul(b, lt)) | 0) + Math.imul(y, ct)) | 0), - (o = (o + Math.imul(y, lt)) | 0); - var At = - (((u + (i = (i + Math.imul(p, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(p, mt)) | 0) + Math.imul(m, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(m, mt)) | 0) + (n >>> 13)) | 0) + (At >>> 26)) | 0), - (At &= 67108863), - (i = Math.imul(U, V)), - (n = ((n = Math.imul(U, W)) + Math.imul(D, V)) | 0), - (o = Math.imul(D, W)), - (i = (i + Math.imul(C, Y)) | 0), - (n = ((n = (n + Math.imul(C, J)) | 0) + Math.imul(N, Y)) | 0), - (o = (o + Math.imul(N, J)) | 0), - (i = (i + Math.imul(P, Q)) | 0), - (n = ((n = (n + Math.imul(P, tt)) | 0) + Math.imul(O, Q)) | 0), - (o = (o + Math.imul(O, tt)) | 0), - (i = (i + Math.imul(B, rt)) | 0), - (n = ((n = (n + Math.imul(B, it)) | 0) + Math.imul(I, rt)) | 0), - (o = (o + Math.imul(I, it)) | 0), - (i = (i + Math.imul(A, ot)) | 0), - (n = ((n = (n + Math.imul(A, st)) | 0) + Math.imul(k, ot)) | 0), - (o = (o + Math.imul(k, st)) | 0), - (i = (i + Math.imul(E, ht)) | 0), - (n = ((n = (n + Math.imul(E, ut)) | 0) + Math.imul(S, ht)) | 0), - (o = (o + Math.imul(S, ut)) | 0), - (i = (i + Math.imul(w, ct)) | 0), - (n = ((n = (n + Math.imul(w, lt)) | 0) + Math.imul(_, ct)) | 0), - (o = (o + Math.imul(_, lt)) | 0); - var kt = - (((u + (i = (i + Math.imul(b, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(b, mt)) | 0) + Math.imul(y, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(y, mt)) | 0) + (n >>> 13)) | 0) + (kt >>> 26)) | 0), - (kt &= 67108863), - (i = Math.imul(U, Y)), - (n = ((n = Math.imul(U, J)) + Math.imul(D, Y)) | 0), - (o = Math.imul(D, J)), - (i = (i + Math.imul(C, Q)) | 0), - (n = ((n = (n + Math.imul(C, tt)) | 0) + Math.imul(N, Q)) | 0), - (o = (o + Math.imul(N, tt)) | 0), - (i = (i + Math.imul(P, rt)) | 0), - (n = ((n = (n + Math.imul(P, it)) | 0) + Math.imul(O, rt)) | 0), - (o = (o + Math.imul(O, it)) | 0), - (i = (i + Math.imul(B, ot)) | 0), - (n = ((n = (n + Math.imul(B, st)) | 0) + Math.imul(I, ot)) | 0), - (o = (o + Math.imul(I, st)) | 0), - (i = (i + Math.imul(A, ht)) | 0), - (n = ((n = (n + Math.imul(A, ut)) | 0) + Math.imul(k, ht)) | 0), - (o = (o + Math.imul(k, ut)) | 0), - (i = (i + Math.imul(E, ct)) | 0), - (n = ((n = (n + Math.imul(E, lt)) | 0) + Math.imul(S, ct)) | 0), - (o = (o + Math.imul(S, lt)) | 0); - var Rt = - (((u + (i = (i + Math.imul(w, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(w, mt)) | 0) + Math.imul(_, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(_, mt)) | 0) + (n >>> 13)) | 0) + (Rt >>> 26)) | 0), - (Rt &= 67108863), - (i = Math.imul(U, Q)), - (n = ((n = Math.imul(U, tt)) + Math.imul(D, Q)) | 0), - (o = Math.imul(D, tt)), - (i = (i + Math.imul(C, rt)) | 0), - (n = ((n = (n + Math.imul(C, it)) | 0) + Math.imul(N, rt)) | 0), - (o = (o + Math.imul(N, it)) | 0), - (i = (i + Math.imul(P, ot)) | 0), - (n = ((n = (n + Math.imul(P, st)) | 0) + Math.imul(O, ot)) | 0), - (o = (o + Math.imul(O, st)) | 0), - (i = (i + Math.imul(B, ht)) | 0), - (n = ((n = (n + Math.imul(B, ut)) | 0) + Math.imul(I, ht)) | 0), - (o = (o + Math.imul(I, ut)) | 0), - (i = (i + Math.imul(A, ct)) | 0), - (n = ((n = (n + Math.imul(A, lt)) | 0) + Math.imul(k, ct)) | 0), - (o = (o + Math.imul(k, lt)) | 0); - var Bt = - (((u + (i = (i + Math.imul(E, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(E, mt)) | 0) + Math.imul(S, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(S, mt)) | 0) + (n >>> 13)) | 0) + (Bt >>> 26)) | 0), - (Bt &= 67108863), - (i = Math.imul(U, rt)), - (n = ((n = Math.imul(U, it)) + Math.imul(D, rt)) | 0), - (o = Math.imul(D, it)), - (i = (i + Math.imul(C, ot)) | 0), - (n = ((n = (n + Math.imul(C, st)) | 0) + Math.imul(N, ot)) | 0), - (o = (o + Math.imul(N, st)) | 0), - (i = (i + Math.imul(P, ht)) | 0), - (n = ((n = (n + Math.imul(P, ut)) | 0) + Math.imul(O, ht)) | 0), - (o = (o + Math.imul(O, ut)) | 0), - (i = (i + Math.imul(B, ct)) | 0), - (n = ((n = (n + Math.imul(B, lt)) | 0) + Math.imul(I, ct)) | 0), - (o = (o + Math.imul(I, lt)) | 0); - var It = - (((u + (i = (i + Math.imul(A, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(A, mt)) | 0) + Math.imul(k, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(k, mt)) | 0) + (n >>> 13)) | 0) + (It >>> 26)) | 0), - (It &= 67108863), - (i = Math.imul(U, ot)), - (n = ((n = Math.imul(U, st)) + Math.imul(D, ot)) | 0), - (o = Math.imul(D, st)), - (i = (i + Math.imul(C, ht)) | 0), - (n = ((n = (n + Math.imul(C, ut)) | 0) + Math.imul(N, ht)) | 0), - (o = (o + Math.imul(N, ut)) | 0), - (i = (i + Math.imul(P, ct)) | 0), - (n = ((n = (n + Math.imul(P, lt)) | 0) + Math.imul(O, ct)) | 0), - (o = (o + Math.imul(O, lt)) | 0); - var Tt = - (((u + (i = (i + Math.imul(B, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(B, mt)) | 0) + Math.imul(I, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(I, mt)) | 0) + (n >>> 13)) | 0) + (Tt >>> 26)) | 0), - (Tt &= 67108863), - (i = Math.imul(U, ht)), - (n = ((n = Math.imul(U, ut)) + Math.imul(D, ht)) | 0), - (o = Math.imul(D, ut)), - (i = (i + Math.imul(C, ct)) | 0), - (n = ((n = (n + Math.imul(C, lt)) | 0) + Math.imul(N, ct)) | 0), - (o = (o + Math.imul(N, lt)) | 0); - var Pt = - (((u + (i = (i + Math.imul(P, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(P, mt)) | 0) + Math.imul(O, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(O, mt)) | 0) + (n >>> 13)) | 0) + (Pt >>> 26)) | 0), - (Pt &= 67108863), - (i = Math.imul(U, ct)), - (n = ((n = Math.imul(U, lt)) + Math.imul(D, ct)) | 0), - (o = Math.imul(D, lt)); - var Ot = - (((u + (i = (i + Math.imul(C, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(C, mt)) | 0) + Math.imul(N, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(N, mt)) | 0) + (n >>> 13)) | 0) + (Ot >>> 26)) | 0), (Ot &= 67108863); - var Lt = (((u + (i = Math.imul(U, pt))) | 0) + ((8191 & (n = ((n = Math.imul(U, mt)) + Math.imul(D, pt)) | 0)) << 13)) | 0; - return ( - (u = ((((o = Math.imul(D, mt)) + (n >>> 13)) | 0) + (Lt >>> 26)) | 0), - (Lt &= 67108863), - (h[0] = gt), - (h[1] = bt), - (h[2] = yt), - (h[3] = vt), - (h[4] = wt), - (h[5] = _t), - (h[6] = Mt), - (h[7] = Et), - (h[8] = St), - (h[9] = xt), - (h[10] = At), - (h[11] = kt), - (h[12] = Rt), - (h[13] = Bt), - (h[14] = It), - (h[15] = Tt), - (h[16] = Pt), - (h[17] = Ot), - (h[18] = Lt), - 0 !== u && ((h[19] = u), r.length++), - r - ); - }; - function m(t, e, r) { - return new g().mulp(t, e, r); - } - function g(t, e) { - (this.x = t), (this.y = e); - } - Math.imul || (p = d), - (o.prototype.mulTo = function (t, e) { - var r, - i = this.length + t.length; - return ( - (r = - 10 === this.length && 10 === t.length - ? p(this, t, e) - : i < 63 - ? d(this, t, e) - : i < 1024 - ? (function (t, e, r) { - (r.negative = e.negative ^ t.negative), (r.length = t.length + e.length); - for (var i = 0, n = 0, o = 0; o < r.length - 1; o++) { - var s = n; - n = 0; - for (var a = 67108863 & i, h = Math.min(o, e.length - 1), u = Math.max(0, o - t.length + 1); u <= h; u++) { - var f = o - u, - c = (0 | t.words[f]) * (0 | e.words[u]), - l = 67108863 & c; - (a = 67108863 & (l = (l + a) | 0)), - (n += (s = ((s = (s + ((c / 67108864) | 0)) | 0) + (l >>> 26)) | 0) >>> 26), - (s &= 67108863); - } - (r.words[o] = a), (i = s), (s = n); - } - return 0 !== i ? (r.words[o] = i) : r.length--, r.strip(); - })(this, t, e) - : m(this, t, e)), - r - ); - }), - (g.prototype.makeRBT = function (t) { - for (var e = new Array(t), r = o.prototype._countBits(t) - 1, i = 0; i < t; i++) e[i] = this.revBin(i, r, t); - return e; - }), - (g.prototype.revBin = function (t, e, r) { - if (0 === t || t === r - 1) return t; - for (var i = 0, n = 0; n < e; n++) (i |= (1 & t) << (e - n - 1)), (t >>= 1); - return i; - }), - (g.prototype.permute = function (t, e, r, i, n, o) { - for (var s = 0; s < o; s++) (i[s] = e[t[s]]), (n[s] = r[t[s]]); - }), - (g.prototype.transform = function (t, e, r, i, n, o) { - this.permute(o, t, e, r, i, n); - for (var s = 1; s < n; s <<= 1) - for (var a = s << 1, h = Math.cos((2 * Math.PI) / a), u = Math.sin((2 * Math.PI) / a), f = 0; f < n; f += a) - for (var c = h, l = u, d = 0; d < s; d++) { - var p = r[f + d], - m = i[f + d], - g = r[f + d + s], - b = i[f + d + s], - y = c * g - l * b; - (b = c * b + l * g), - (g = y), - (r[f + d] = p + g), - (i[f + d] = m + b), - (r[f + d + s] = p - g), - (i[f + d + s] = m - b), - d !== a && ((y = h * c - u * l), (l = h * l + u * c), (c = y)); - } - }), - (g.prototype.guessLen13b = function (t, e) { - var r = 1 | Math.max(e, t), - i = 1 & r, - n = 0; - for (r = (r / 2) | 0; r; r >>>= 1) n++; - return 1 << (n + 1 + i); - }), - (g.prototype.conjugate = function (t, e, r) { - if (!(r <= 1)) - for (var i = 0; i < r / 2; i++) { - var n = t[i]; - (t[i] = t[r - i - 1]), (t[r - i - 1] = n), (n = e[i]), (e[i] = -e[r - i - 1]), (e[r - i - 1] = -n); - } - }), - (g.prototype.normalize13b = function (t, e) { - for (var r = 0, i = 0; i < e / 2; i++) { - var n = 8192 * Math.round(t[2 * i + 1] / e) + Math.round(t[2 * i] / e) + r; - (t[i] = 67108863 & n), (r = n < 67108864 ? 0 : (n / 67108864) | 0); - } - return t; - }), - (g.prototype.convert13b = function (t, e, r, n) { - for (var o = 0, s = 0; s < e; s++) - (o += 0 | t[s]), (r[2 * s] = 8191 & o), (o >>>= 13), (r[2 * s + 1] = 8191 & o), (o >>>= 13); - for (s = 2 * e; s < n; ++s) r[s] = 0; - i(0 === o), i(0 == (-8192 & o)); - }), - (g.prototype.stub = function (t) { - for (var e = new Array(t), r = 0; r < t; r++) e[r] = 0; - return e; - }), - (g.prototype.mulp = function (t, e, r) { - var i = 2 * this.guessLen13b(t.length, e.length), - n = this.makeRBT(i), - o = this.stub(i), - s = new Array(i), - a = new Array(i), - h = new Array(i), - u = new Array(i), - f = new Array(i), - c = new Array(i), - l = r.words; - (l.length = i), - this.convert13b(t.words, t.length, s, i), - this.convert13b(e.words, e.length, u, i), - this.transform(s, o, a, h, i, n), - this.transform(u, o, f, c, i, n); - for (var d = 0; d < i; d++) { - var p = a[d] * f[d] - h[d] * c[d]; - (h[d] = a[d] * c[d] + h[d] * f[d]), (a[d] = p); - } - return ( - this.conjugate(a, h, i), - this.transform(a, h, l, o, i, n), - this.conjugate(l, o, i), - this.normalize13b(l, i), - (r.negative = t.negative ^ e.negative), - (r.length = t.length + e.length), - r.strip() - ); - }), - (o.prototype.mul = function (t) { - var e = new o(null); - return (e.words = new Array(this.length + t.length)), this.mulTo(t, e); - }), - (o.prototype.mulf = function (t) { - var e = new o(null); - return (e.words = new Array(this.length + t.length)), m(this, t, e); - }), - (o.prototype.imul = function (t) { - return this.clone().mulTo(t, this); - }), - (o.prototype.imuln = function (t) { - i('number' == typeof t), i(t < 67108864); - for (var e = 0, r = 0; r < this.length; r++) { - var n = (0 | this.words[r]) * t, - o = (67108863 & n) + (67108863 & e); - (e >>= 26), (e += (n / 67108864) | 0), (e += o >>> 26), (this.words[r] = 67108863 & o); - } - return 0 !== e && ((this.words[r] = e), this.length++), this; - }), - (o.prototype.muln = function (t) { - return this.clone().imuln(t); - }), - (o.prototype.sqr = function () { - return this.mul(this); - }), - (o.prototype.isqr = function () { - return this.imul(this.clone()); - }), - (o.prototype.pow = function (t) { - var e = (function (t) { - for (var e = new Array(t.bitLength()), r = 0; r < e.length; r++) { - var i = (r / 26) | 0, - n = r % 26; - e[r] = (t.words[i] & (1 << n)) >>> n; - } - return e; - })(t); - if (0 === e.length) return new o(1); - for (var r = this, i = 0; i < e.length && 0 === e[i]; i++, r = r.sqr()); - if (++i < e.length) for (var n = r.sqr(); i < e.length; i++, n = n.sqr()) 0 !== e[i] && (r = r.mul(n)); - return r; - }), - (o.prototype.iushln = function (t) { - i('number' == typeof t && t >= 0); - var e, - r = t % 26, - n = (t - r) / 26, - o = (67108863 >>> (26 - r)) << (26 - r); - if (0 !== r) { - var s = 0; - for (e = 0; e < this.length; e++) { - var a = this.words[e] & o, - h = ((0 | this.words[e]) - a) << r; - (this.words[e] = h | s), (s = a >>> (26 - r)); - } - s && ((this.words[e] = s), this.length++); - } - if (0 !== n) { - for (e = this.length - 1; e >= 0; e--) this.words[e + n] = this.words[e]; - for (e = 0; e < n; e++) this.words[e] = 0; - this.length += n; - } - return this.strip(); - }), - (o.prototype.ishln = function (t) { - return i(0 === this.negative), this.iushln(t); - }), - (o.prototype.iushrn = function (t, e, r) { - var n; - i('number' == typeof t && t >= 0), (n = e ? (e - (e % 26)) / 26 : 0); - var o = t % 26, - s = Math.min((t - o) / 26, this.length), - a = 67108863 ^ ((67108863 >>> o) << o), - h = r; - if (((n -= s), (n = Math.max(0, n)), h)) { - for (var u = 0; u < s; u++) h.words[u] = this.words[u]; - h.length = s; - } - if (0 === s); - else if (this.length > s) for (this.length -= s, u = 0; u < this.length; u++) this.words[u] = this.words[u + s]; - else (this.words[0] = 0), (this.length = 1); - var f = 0; - for (u = this.length - 1; u >= 0 && (0 !== f || u >= n); u--) { - var c = 0 | this.words[u]; - (this.words[u] = (f << (26 - o)) | (c >>> o)), (f = c & a); - } - return h && 0 !== f && (h.words[h.length++] = f), 0 === this.length && ((this.words[0] = 0), (this.length = 1)), this.strip(); - }), - (o.prototype.ishrn = function (t, e, r) { - return i(0 === this.negative), this.iushrn(t, e, r); - }), - (o.prototype.shln = function (t) { - return this.clone().ishln(t); - }), - (o.prototype.ushln = function (t) { - return this.clone().iushln(t); - }), - (o.prototype.shrn = function (t) { - return this.clone().ishrn(t); - }), - (o.prototype.ushrn = function (t) { - return this.clone().iushrn(t); - }), - (o.prototype.testn = function (t) { - i('number' == typeof t && t >= 0); - var e = t % 26, - r = (t - e) / 26, - n = 1 << e; - return !(this.length <= r || !(this.words[r] & n)); - }), - (o.prototype.imaskn = function (t) { - i('number' == typeof t && t >= 0); - var e = t % 26, - r = (t - e) / 26; - if ((i(0 === this.negative, 'imaskn works only with positive numbers'), this.length <= r)) return this; - if ((0 !== e && r++, (this.length = Math.min(r, this.length)), 0 !== e)) { - var n = 67108863 ^ ((67108863 >>> e) << e); - this.words[this.length - 1] &= n; - } - return this.strip(); - }), - (o.prototype.maskn = function (t) { - return this.clone().imaskn(t); - }), - (o.prototype.iaddn = function (t) { - return ( - i('number' == typeof t), - i(t < 67108864), - t < 0 - ? this.isubn(-t) - : 0 !== this.negative - ? 1 === this.length && (0 | this.words[0]) < t - ? ((this.words[0] = t - (0 | this.words[0])), (this.negative = 0), this) - : ((this.negative = 0), this.isubn(t), (this.negative = 1), this) - : this._iaddn(t) - ); - }), - (o.prototype._iaddn = function (t) { - this.words[0] += t; - for (var e = 0; e < this.length && this.words[e] >= 67108864; e++) - (this.words[e] -= 67108864), e === this.length - 1 ? (this.words[e + 1] = 1) : this.words[e + 1]++; - return (this.length = Math.max(this.length, e + 1)), this; - }), - (o.prototype.isubn = function (t) { - if ((i('number' == typeof t), i(t < 67108864), t < 0)) return this.iaddn(-t); - if (0 !== this.negative) return (this.negative = 0), this.iaddn(t), (this.negative = 1), this; - if (((this.words[0] -= t), 1 === this.length && this.words[0] < 0)) (this.words[0] = -this.words[0]), (this.negative = 1); - else for (var e = 0; e < this.length && this.words[e] < 0; e++) (this.words[e] += 67108864), (this.words[e + 1] -= 1); - return this.strip(); - }), - (o.prototype.addn = function (t) { - return this.clone().iaddn(t); - }), - (o.prototype.subn = function (t) { - return this.clone().isubn(t); - }), - (o.prototype.iabs = function () { - return (this.negative = 0), this; - }), - (o.prototype.abs = function () { - return this.clone().iabs(); - }), - (o.prototype._ishlnsubmul = function (t, e, r) { - var n, - o, - s = t.length + r; - this._expand(s); - var a = 0; - for (n = 0; n < t.length; n++) { - o = (0 | this.words[n + r]) + a; - var h = (0 | t.words[n]) * e; - (a = ((o -= 67108863 & h) >> 26) - ((h / 67108864) | 0)), (this.words[n + r] = 67108863 & o); - } - for (; n < this.length - r; n++) (a = (o = (0 | this.words[n + r]) + a) >> 26), (this.words[n + r] = 67108863 & o); - if (0 === a) return this.strip(); - for (i(-1 === a), a = 0, n = 0; n < this.length; n++) - (a = (o = -(0 | this.words[n]) + a) >> 26), (this.words[n] = 67108863 & o); - return (this.negative = 1), this.strip(); - }), - (o.prototype._wordDiv = function (t, e) { - var r = (this.length, t.length), - i = this.clone(), - n = t, - s = 0 | n.words[n.length - 1]; - 0 != (r = 26 - this._countBits(s)) && ((n = n.ushln(r)), i.iushln(r), (s = 0 | n.words[n.length - 1])); - var a, - h = i.length - n.length; - if ('mod' !== e) { - ((a = new o(null)).length = h + 1), (a.words = new Array(a.length)); - for (var u = 0; u < a.length; u++) a.words[u] = 0; - } - var f = i.clone()._ishlnsubmul(n, 1, h); - 0 === f.negative && ((i = f), a && (a.words[h] = 1)); - for (var c = h - 1; c >= 0; c--) { - var l = 67108864 * (0 | i.words[n.length + c]) + (0 | i.words[n.length + c - 1]); - for (l = Math.min((l / s) | 0, 67108863), i._ishlnsubmul(n, l, c); 0 !== i.negative; ) - l--, (i.negative = 0), i._ishlnsubmul(n, 1, c), i.isZero() || (i.negative ^= 1); - a && (a.words[c] = l); - } - return a && a.strip(), i.strip(), 'div' !== e && 0 !== r && i.iushrn(r), { div: a || null, mod: i }; - }), - (o.prototype.divmod = function (t, e, r) { - return ( - i(!t.isZero()), - this.isZero() - ? { div: new o(0), mod: new o(0) } - : 0 !== this.negative && 0 === t.negative - ? ((a = this.neg().divmod(t, e)), - 'mod' !== e && (n = a.div.neg()), - 'div' !== e && ((s = a.mod.neg()), r && 0 !== s.negative && s.iadd(t)), - { div: n, mod: s }) - : 0 === this.negative && 0 !== t.negative - ? ((a = this.divmod(t.neg(), e)), 'mod' !== e && (n = a.div.neg()), { div: n, mod: a.mod }) - : 0 != (this.negative & t.negative) - ? ((a = this.neg().divmod(t.neg(), e)), - 'div' !== e && ((s = a.mod.neg()), r && 0 !== s.negative && s.isub(t)), - { div: a.div, mod: s }) - : t.length > this.length || this.cmp(t) < 0 - ? { div: new o(0), mod: this } - : 1 === t.length - ? 'div' === e - ? { div: this.divn(t.words[0]), mod: null } - : 'mod' === e - ? { div: null, mod: new o(this.modn(t.words[0])) } - : { div: this.divn(t.words[0]), mod: new o(this.modn(t.words[0])) } - : this._wordDiv(t, e) - ); - var n, s, a; - }), - (o.prototype.div = function (t) { - return this.divmod(t, 'div', !1).div; - }), - (o.prototype.mod = function (t) { - return this.divmod(t, 'mod', !1).mod; - }), - (o.prototype.umod = function (t) { - return this.divmod(t, 'mod', !0).mod; - }), - (o.prototype.divRound = function (t) { - var e = this.divmod(t); - if (e.mod.isZero()) return e.div; - var r = 0 !== e.div.negative ? e.mod.isub(t) : e.mod, - i = t.ushrn(1), - n = t.andln(1), - o = r.cmp(i); - return o < 0 || (1 === n && 0 === o) ? e.div : 0 !== e.div.negative ? e.div.isubn(1) : e.div.iaddn(1); - }), - (o.prototype.modn = function (t) { - i(t <= 67108863); - for (var e = (1 << 26) % t, r = 0, n = this.length - 1; n >= 0; n--) r = (e * r + (0 | this.words[n])) % t; - return r; - }), - (o.prototype.idivn = function (t) { - i(t <= 67108863); - for (var e = 0, r = this.length - 1; r >= 0; r--) { - var n = (0 | this.words[r]) + 67108864 * e; - (this.words[r] = (n / t) | 0), (e = n % t); - } - return this.strip(); - }), - (o.prototype.divn = function (t) { - return this.clone().idivn(t); - }), - (o.prototype.egcd = function (t) { - i(0 === t.negative), i(!t.isZero()); - var e = this, - r = t.clone(); - e = 0 !== e.negative ? e.umod(t) : e.clone(); - for (var n = new o(1), s = new o(0), a = new o(0), h = new o(1), u = 0; e.isEven() && r.isEven(); ) - e.iushrn(1), r.iushrn(1), ++u; - for (var f = r.clone(), c = e.clone(); !e.isZero(); ) { - for (var l = 0, d = 1; 0 == (e.words[0] & d) && l < 26; ++l, d <<= 1); - if (l > 0) for (e.iushrn(l); l-- > 0; ) (n.isOdd() || s.isOdd()) && (n.iadd(f), s.isub(c)), n.iushrn(1), s.iushrn(1); - for (var p = 0, m = 1; 0 == (r.words[0] & m) && p < 26; ++p, m <<= 1); - if (p > 0) for (r.iushrn(p); p-- > 0; ) (a.isOdd() || h.isOdd()) && (a.iadd(f), h.isub(c)), a.iushrn(1), h.iushrn(1); - e.cmp(r) >= 0 ? (e.isub(r), n.isub(a), s.isub(h)) : (r.isub(e), a.isub(n), h.isub(s)); - } - return { a, b: h, gcd: r.iushln(u) }; - }), - (o.prototype._invmp = function (t) { - i(0 === t.negative), i(!t.isZero()); - var e = this, - r = t.clone(); - e = 0 !== e.negative ? e.umod(t) : e.clone(); - for (var n, s = new o(1), a = new o(0), h = r.clone(); e.cmpn(1) > 0 && r.cmpn(1) > 0; ) { - for (var u = 0, f = 1; 0 == (e.words[0] & f) && u < 26; ++u, f <<= 1); - if (u > 0) for (e.iushrn(u); u-- > 0; ) s.isOdd() && s.iadd(h), s.iushrn(1); - for (var c = 0, l = 1; 0 == (r.words[0] & l) && c < 26; ++c, l <<= 1); - if (c > 0) for (r.iushrn(c); c-- > 0; ) a.isOdd() && a.iadd(h), a.iushrn(1); - e.cmp(r) >= 0 ? (e.isub(r), s.isub(a)) : (r.isub(e), a.isub(s)); - } - return (n = 0 === e.cmpn(1) ? s : a).cmpn(0) < 0 && n.iadd(t), n; - }), - (o.prototype.gcd = function (t) { - if (this.isZero()) return t.abs(); - if (t.isZero()) return this.abs(); - var e = this.clone(), - r = t.clone(); - (e.negative = 0), (r.negative = 0); - for (var i = 0; e.isEven() && r.isEven(); i++) e.iushrn(1), r.iushrn(1); - for (;;) { - for (; e.isEven(); ) e.iushrn(1); - for (; r.isEven(); ) r.iushrn(1); - var n = e.cmp(r); - if (n < 0) { - var o = e; - (e = r), (r = o); - } else if (0 === n || 0 === r.cmpn(1)) break; - e.isub(r); - } - return r.iushln(i); - }), - (o.prototype.invm = function (t) { - return this.egcd(t).a.umod(t); - }), - (o.prototype.isEven = function () { - return 0 == (1 & this.words[0]); - }), - (o.prototype.isOdd = function () { - return 1 == (1 & this.words[0]); - }), - (o.prototype.andln = function (t) { - return this.words[0] & t; - }), - (o.prototype.bincn = function (t) { - i('number' == typeof t); - var e = t % 26, - r = (t - e) / 26, - n = 1 << e; - if (this.length <= r) return this._expand(r + 1), (this.words[r] |= n), this; - for (var o = n, s = r; 0 !== o && s < this.length; s++) { - var a = 0 | this.words[s]; - (o = (a += o) >>> 26), (a &= 67108863), (this.words[s] = a); - } - return 0 !== o && ((this.words[s] = o), this.length++), this; - }), - (o.prototype.isZero = function () { - return 1 === this.length && 0 === this.words[0]; - }), - (o.prototype.cmpn = function (t) { - var e, - r = t < 0; - if (0 !== this.negative && !r) return -1; - if (0 === this.negative && r) return 1; - if ((this.strip(), this.length > 1)) e = 1; - else { - r && (t = -t), i(t <= 67108863, 'Number is too big'); - var n = 0 | this.words[0]; - e = n === t ? 0 : n < t ? -1 : 1; - } - return 0 !== this.negative ? 0 | -e : e; - }), - (o.prototype.cmp = function (t) { - if (0 !== this.negative && 0 === t.negative) return -1; - if (0 === this.negative && 0 !== t.negative) return 1; - var e = this.ucmp(t); - return 0 !== this.negative ? 0 | -e : e; - }), - (o.prototype.ucmp = function (t) { - if (this.length > t.length) return 1; - if (this.length < t.length) return -1; - for (var e = 0, r = this.length - 1; r >= 0; r--) { - var i = 0 | this.words[r], - n = 0 | t.words[r]; - if (i !== n) { - i < n ? (e = -1) : i > n && (e = 1); - break; - } - } - return e; - }), - (o.prototype.gtn = function (t) { - return 1 === this.cmpn(t); - }), - (o.prototype.gt = function (t) { - return 1 === this.cmp(t); - }), - (o.prototype.gten = function (t) { - return this.cmpn(t) >= 0; - }), - (o.prototype.gte = function (t) { - return this.cmp(t) >= 0; - }), - (o.prototype.ltn = function (t) { - return -1 === this.cmpn(t); - }), - (o.prototype.lt = function (t) { - return -1 === this.cmp(t); - }), - (o.prototype.lten = function (t) { - return this.cmpn(t) <= 0; - }), - (o.prototype.lte = function (t) { - return this.cmp(t) <= 0; - }), - (o.prototype.eqn = function (t) { - return 0 === this.cmpn(t); - }), - (o.prototype.eq = function (t) { - return 0 === this.cmp(t); - }), - (o.red = function (t) { - return new E(t); - }), - (o.prototype.toRed = function (t) { - return ( - i(!this.red, 'Already a number in reduction context'), - i(0 === this.negative, 'red works only with positives'), - t.convertTo(this)._forceRed(t) - ); - }), - (o.prototype.fromRed = function () { - return i(this.red, 'fromRed works only with numbers in reduction context'), this.red.convertFrom(this); - }), - (o.prototype._forceRed = function (t) { - return (this.red = t), this; - }), - (o.prototype.forceRed = function (t) { - return i(!this.red, 'Already a number in reduction context'), this._forceRed(t); - }), - (o.prototype.redAdd = function (t) { - return i(this.red, 'redAdd works only with red numbers'), this.red.add(this, t); - }), - (o.prototype.redIAdd = function (t) { - return i(this.red, 'redIAdd works only with red numbers'), this.red.iadd(this, t); - }), - (o.prototype.redSub = function (t) { - return i(this.red, 'redSub works only with red numbers'), this.red.sub(this, t); - }), - (o.prototype.redISub = function (t) { - return i(this.red, 'redISub works only with red numbers'), this.red.isub(this, t); - }), - (o.prototype.redShl = function (t) { - return i(this.red, 'redShl works only with red numbers'), this.red.shl(this, t); - }), - (o.prototype.redMul = function (t) { - return i(this.red, 'redMul works only with red numbers'), this.red._verify2(this, t), this.red.mul(this, t); - }), - (o.prototype.redIMul = function (t) { - return i(this.red, 'redMul works only with red numbers'), this.red._verify2(this, t), this.red.imul(this, t); - }), - (o.prototype.redSqr = function () { - return i(this.red, 'redSqr works only with red numbers'), this.red._verify1(this), this.red.sqr(this); - }), - (o.prototype.redISqr = function () { - return i(this.red, 'redISqr works only with red numbers'), this.red._verify1(this), this.red.isqr(this); - }), - (o.prototype.redSqrt = function () { - return i(this.red, 'redSqrt works only with red numbers'), this.red._verify1(this), this.red.sqrt(this); - }), - (o.prototype.redInvm = function () { - return i(this.red, 'redInvm works only with red numbers'), this.red._verify1(this), this.red.invm(this); - }), - (o.prototype.redNeg = function () { - return i(this.red, 'redNeg works only with red numbers'), this.red._verify1(this), this.red.neg(this); - }), - (o.prototype.redPow = function (t) { - return i(this.red && !t.red, 'redPow(normalNum)'), this.red._verify1(this), this.red.pow(this, t); - }); - var b = { k256: null, p224: null, p192: null, p25519: null }; - function y(t, e) { - (this.name = t), - (this.p = new o(e, 16)), - (this.n = this.p.bitLength()), - (this.k = new o(1).iushln(this.n).isub(this.p)), - (this.tmp = this._tmp()); - } - function v() { - y.call(this, 'k256', 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f'); - } - function w() { - y.call(this, 'p224', 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001'); - } - function _() { - y.call(this, 'p192', 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff'); - } - function M() { - y.call(this, '25519', '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed'); - } - function E(t) { - if ('string' == typeof t) { - var e = o._prime(t); - (this.m = e.p), (this.prime = e); - } else i(t.gtn(1), 'modulus must be greater than 1'), (this.m = t), (this.prime = null); - } - function S(t) { - E.call(this, t), - (this.shift = this.m.bitLength()), - this.shift % 26 != 0 && (this.shift += 26 - (this.shift % 26)), - (this.r = new o(1).iushln(this.shift)), - (this.r2 = this.imod(this.r.sqr())), - (this.rinv = this.r._invmp(this.m)), - (this.minv = this.rinv.mul(this.r).isubn(1).div(this.m)), - (this.minv = this.minv.umod(this.r)), - (this.minv = this.r.sub(this.minv)); - } - (y.prototype._tmp = function () { - var t = new o(null); - return (t.words = new Array(Math.ceil(this.n / 13))), t; - }), - (y.prototype.ireduce = function (t) { - var e, - r = t; - do { - this.split(r, this.tmp), (e = (r = (r = this.imulK(r)).iadd(this.tmp)).bitLength()); - } while (e > this.n); - var i = e < this.n ? -1 : r.ucmp(this.p); - return 0 === i ? ((r.words[0] = 0), (r.length = 1)) : i > 0 ? r.isub(this.p) : void 0 !== r.strip ? r.strip() : r._strip(), r; - }), - (y.prototype.split = function (t, e) { - t.iushrn(this.n, 0, e); - }), - (y.prototype.imulK = function (t) { - return t.imul(this.k); - }), - n(v, y), - (v.prototype.split = function (t, e) { - for (var r = 4194303, i = Math.min(t.length, 9), n = 0; n < i; n++) e.words[n] = t.words[n]; - if (((e.length = i), t.length <= 9)) return (t.words[0] = 0), void (t.length = 1); - var o = t.words[9]; - for (e.words[e.length++] = o & r, n = 10; n < t.length; n++) { - var s = 0 | t.words[n]; - (t.words[n - 10] = ((s & r) << 4) | (o >>> 22)), (o = s); - } - (o >>>= 22), (t.words[n - 10] = o), 0 === o && t.length > 10 ? (t.length -= 10) : (t.length -= 9); - }), - (v.prototype.imulK = function (t) { - (t.words[t.length] = 0), (t.words[t.length + 1] = 0), (t.length += 2); - for (var e = 0, r = 0; r < t.length; r++) { - var i = 0 | t.words[r]; - (e += 977 * i), (t.words[r] = 67108863 & e), (e = 64 * i + ((e / 67108864) | 0)); - } - return 0 === t.words[t.length - 1] && (t.length--, 0 === t.words[t.length - 1] && t.length--), t; - }), - n(w, y), - n(_, y), - n(M, y), - (M.prototype.imulK = function (t) { - for (var e = 0, r = 0; r < t.length; r++) { - var i = 19 * (0 | t.words[r]) + e, - n = 67108863 & i; - (i >>>= 26), (t.words[r] = n), (e = i); - } - return 0 !== e && (t.words[t.length++] = e), t; - }), - (o._prime = function (t) { - if (b[t]) return b[t]; - var e; - if ('k256' === t) e = new v(); - else if ('p224' === t) e = new w(); - else if ('p192' === t) e = new _(); - else { - if ('p25519' !== t) throw new Error('Unknown prime ' + t); - e = new M(); - } - return (b[t] = e), e; - }), - (E.prototype._verify1 = function (t) { - i(0 === t.negative, 'red works only with positives'), i(t.red, 'red works only with red numbers'); - }), - (E.prototype._verify2 = function (t, e) { - i(0 == (t.negative | e.negative), 'red works only with positives'), - i(t.red && t.red === e.red, 'red works only with red numbers'); - }), - (E.prototype.imod = function (t) { - return this.prime ? this.prime.ireduce(t)._forceRed(this) : t.umod(this.m)._forceRed(this); - }), - (E.prototype.neg = function (t) { - return t.isZero() ? t.clone() : this.m.sub(t)._forceRed(this); - }), - (E.prototype.add = function (t, e) { - this._verify2(t, e); - var r = t.add(e); - return r.cmp(this.m) >= 0 && r.isub(this.m), r._forceRed(this); - }), - (E.prototype.iadd = function (t, e) { - this._verify2(t, e); - var r = t.iadd(e); - return r.cmp(this.m) >= 0 && r.isub(this.m), r; - }), - (E.prototype.sub = function (t, e) { - this._verify2(t, e); - var r = t.sub(e); - return r.cmpn(0) < 0 && r.iadd(this.m), r._forceRed(this); - }), - (E.prototype.isub = function (t, e) { - this._verify2(t, e); - var r = t.isub(e); - return r.cmpn(0) < 0 && r.iadd(this.m), r; - }), - (E.prototype.shl = function (t, e) { - return this._verify1(t), this.imod(t.ushln(e)); - }), - (E.prototype.imul = function (t, e) { - return this._verify2(t, e), this.imod(t.imul(e)); - }), - (E.prototype.mul = function (t, e) { - return this._verify2(t, e), this.imod(t.mul(e)); - }), - (E.prototype.isqr = function (t) { - return this.imul(t, t.clone()); - }), - (E.prototype.sqr = function (t) { - return this.mul(t, t); - }), - (E.prototype.sqrt = function (t) { - if (t.isZero()) return t.clone(); - var e = this.m.andln(3); - if ((i(e % 2 == 1), 3 === e)) { - var r = this.m.add(new o(1)).iushrn(2); - return this.pow(t, r); - } - for (var n = this.m.subn(1), s = 0; !n.isZero() && 0 === n.andln(1); ) s++, n.iushrn(1); - i(!n.isZero()); - var a = new o(1).toRed(this), - h = a.redNeg(), - u = this.m.subn(1).iushrn(1), - f = this.m.bitLength(); - for (f = new o(2 * f * f).toRed(this); 0 !== this.pow(f, u).cmp(h); ) f.redIAdd(h); - for (var c = this.pow(f, n), l = this.pow(t, n.addn(1).iushrn(1)), d = this.pow(t, n), p = s; 0 !== d.cmp(a); ) { - for (var m = d, g = 0; 0 !== m.cmp(a); g++) m = m.redSqr(); - i(g < p); - var b = this.pow(c, new o(1).iushln(p - g - 1)); - (l = l.redMul(b)), (c = b.redSqr()), (d = d.redMul(c)), (p = g); - } - return l; - }), - (E.prototype.invm = function (t) { - var e = t._invmp(this.m); - return 0 !== e.negative ? ((e.negative = 0), this.imod(e).redNeg()) : this.imod(e); - }), - (E.prototype.pow = function (t, e) { - if (e.isZero()) return new o(1).toRed(this); - if (0 === e.cmpn(1)) return t.clone(); - var r = new Array(16); - (r[0] = new o(1).toRed(this)), (r[1] = t); - for (var i = 2; i < r.length; i++) r[i] = this.mul(r[i - 1], t); - var n = r[0], - s = 0, - a = 0, - h = e.bitLength() % 26; - for (0 === h && (h = 26), i = e.length - 1; i >= 0; i--) { - for (var u = e.words[i], f = h - 1; f >= 0; f--) { - var c = (u >> f) & 1; - n !== r[0] && (n = this.sqr(n)), - 0 !== c || 0 !== s - ? ((s <<= 1), (s |= c), (4 == ++a || (0 === i && 0 === f)) && ((n = this.mul(n, r[s])), (a = 0), (s = 0))) - : (a = 0); - } - h = 26; - } - return n; - }), - (E.prototype.convertTo = function (t) { - var e = t.umod(this.m); - return e === t ? e.clone() : e; - }), - (E.prototype.convertFrom = function (t) { - var e = t.clone(); - return (e.red = null), e; - }), - (o.mont = function (t) { - return new S(t); - }), - n(S, E), - (S.prototype.convertTo = function (t) { - return this.imod(t.ushln(this.shift)); - }), - (S.prototype.convertFrom = function (t) { - var e = this.imod(t.mul(this.rinv)); - return (e.red = null), e; - }), - (S.prototype.imul = function (t, e) { - if (t.isZero() || e.isZero()) return (t.words[0] = 0), (t.length = 1), t; - var r = t.imul(e), - i = r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m), - n = r.isub(i).iushrn(this.shift), - o = n; - return n.cmp(this.m) >= 0 ? (o = n.isub(this.m)) : n.cmpn(0) < 0 && (o = n.iadd(this.m)), o._forceRed(this); - }), - (S.prototype.mul = function (t, e) { - if (t.isZero() || e.isZero()) return new o(0)._forceRed(this); - var r = t.mul(e), - i = r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m), - n = r.isub(i).iushrn(this.shift), - s = n; - return n.cmp(this.m) >= 0 ? (s = n.isub(this.m)) : n.cmpn(0) < 0 && (s = n.iadd(this.m)), s._forceRed(this); - }), - (S.prototype.invm = function (t) { - return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this); - }); - })((t = r.nmd(t)), this); - }, - 4782: (t, e) => { - 'use strict'; - (e.byteLength = function (t) { - var e = a(t), - r = e[0], - i = e[1]; - return (3 * (r + i)) / 4 - i; - }), - (e.toByteArray = function (t) { - var e, - r, - o = a(t), - s = o[0], - h = o[1], - u = new n( - (function (t, e, r) { - return (3 * (e + r)) / 4 - r; - })(0, s, h) - ), - f = 0, - c = h > 0 ? s - 4 : s; - for (r = 0; r < c; r += 4) - (e = (i[t.charCodeAt(r)] << 18) | (i[t.charCodeAt(r + 1)] << 12) | (i[t.charCodeAt(r + 2)] << 6) | i[t.charCodeAt(r + 3)]), - (u[f++] = (e >> 16) & 255), - (u[f++] = (e >> 8) & 255), - (u[f++] = 255 & e); - return ( - 2 === h && ((e = (i[t.charCodeAt(r)] << 2) | (i[t.charCodeAt(r + 1)] >> 4)), (u[f++] = 255 & e)), - 1 === h && - ((e = (i[t.charCodeAt(r)] << 10) | (i[t.charCodeAt(r + 1)] << 4) | (i[t.charCodeAt(r + 2)] >> 2)), - (u[f++] = (e >> 8) & 255), - (u[f++] = 255 & e)), - u - ); - }), - (e.fromByteArray = function (t) { - for (var e, i = t.length, n = i % 3, o = [], s = 16383, a = 0, u = i - n; a < u; a += s) o.push(h(t, a, a + s > u ? u : a + s)); - return ( - 1 === n - ? ((e = t[i - 1]), o.push(r[e >> 2] + r[(e << 4) & 63] + '==')) - : 2 === n && ((e = (t[i - 2] << 8) + t[i - 1]), o.push(r[e >> 10] + r[(e >> 4) & 63] + r[(e << 2) & 63] + '=')), - o.join('') - ); - }); - for ( - var r = [], - i = [], - n = 'undefined' != typeof Uint8Array ? Uint8Array : Array, - o = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/', - s = 0; - s < 64; - ++s - ) - (r[s] = o[s]), (i[o.charCodeAt(s)] = s); - function a(t) { - var e = t.length; - if (e % 4 > 0) throw new Error('Invalid string. Length must be a multiple of 4'); - var r = t.indexOf('='); - return -1 === r && (r = e), [r, r === e ? 0 : 4 - (r % 4)]; - } - function h(t, e, i) { - for (var n, o, s = [], a = e; a < i; a += 3) - (n = ((t[a] << 16) & 16711680) + ((t[a + 1] << 8) & 65280) + (255 & t[a + 2])), - s.push(r[((o = n) >> 18) & 63] + r[(o >> 12) & 63] + r[(o >> 6) & 63] + r[63 & o]); - return s.join(''); - } - (i['-'.charCodeAt(0)] = 62), (i['_'.charCodeAt(0)] = 63); - }, - 3785: function (t, e, r) { - !(function (t, e) { - 'use strict'; - function i(t, e) { - if (!t) throw new Error(e || 'Assertion failed'); - } - function n(t, e) { - t.super_ = e; - var r = function () {}; - (r.prototype = e.prototype), (t.prototype = new r()), (t.prototype.constructor = t); - } - function o(t, e, r) { - if (o.isBN(t)) return t; - (this.negative = 0), - (this.words = null), - (this.length = 0), - (this.red = null), - null !== t && (('le' !== e && 'be' !== e) || ((r = e), (e = 10)), this._init(t || 0, e || 10, r || 'be')); - } - var s; - 'object' == typeof t ? (t.exports = o) : (e.BN = o), (o.BN = o), (o.wordSize = 26); - try { - s = 'undefined' != typeof window && void 0 !== window.Buffer ? window.Buffer : r(5545).Buffer; - } catch (t) {} - function a(t, e) { - var r = t.charCodeAt(e); - return r >= 48 && r <= 57 - ? r - 48 - : r >= 65 && r <= 70 - ? r - 55 - : r >= 97 && r <= 102 - ? r - 87 - : void i(!1, 'Invalid character in ' + t); - } - function h(t, e, r) { - var i = a(t, r); - return r - 1 >= e && (i |= a(t, r - 1) << 4), i; - } - function u(t, e, r, n) { - for (var o = 0, s = 0, a = Math.min(t.length, r), h = e; h < a; h++) { - var u = t.charCodeAt(h) - 48; - (o *= n), (s = u >= 49 ? u - 49 + 10 : u >= 17 ? u - 17 + 10 : u), i(u >= 0 && s < n, 'Invalid character'), (o += s); - } - return o; - } - function f(t, e) { - (t.words = e.words), (t.length = e.length), (t.negative = e.negative), (t.red = e.red); - } - if ( - ((o.isBN = function (t) { - return ( - t instanceof o || (null !== t && 'object' == typeof t && t.constructor.wordSize === o.wordSize && Array.isArray(t.words)) - ); - }), - (o.max = function (t, e) { - return t.cmp(e) > 0 ? t : e; - }), - (o.min = function (t, e) { - return t.cmp(e) < 0 ? t : e; - }), - (o.prototype._init = function (t, e, r) { - if ('number' == typeof t) return this._initNumber(t, e, r); - if ('object' == typeof t) return this._initArray(t, e, r); - 'hex' === e && (e = 16), i(e === (0 | e) && e >= 2 && e <= 36); - var n = 0; - '-' === (t = t.toString().replace(/\s+/g, ''))[0] && (n++, (this.negative = 1)), - n < t.length && - (16 === e ? this._parseHex(t, n, r) : (this._parseBase(t, e, n), 'le' === r && this._initArray(this.toArray(), e, r))); - }), - (o.prototype._initNumber = function (t, e, r) { - t < 0 && ((this.negative = 1), (t = -t)), - t < 67108864 - ? ((this.words = [67108863 & t]), (this.length = 1)) - : t < 4503599627370496 - ? ((this.words = [67108863 & t, (t / 67108864) & 67108863]), (this.length = 2)) - : (i(t < 9007199254740992), (this.words = [67108863 & t, (t / 67108864) & 67108863, 1]), (this.length = 3)), - 'le' === r && this._initArray(this.toArray(), e, r); - }), - (o.prototype._initArray = function (t, e, r) { - if ((i('number' == typeof t.length), t.length <= 0)) return (this.words = [0]), (this.length = 1), this; - (this.length = Math.ceil(t.length / 3)), (this.words = new Array(this.length)); - for (var n = 0; n < this.length; n++) this.words[n] = 0; - var o, - s, - a = 0; - if ('be' === r) - for (n = t.length - 1, o = 0; n >= 0; n -= 3) - (s = t[n] | (t[n - 1] << 8) | (t[n - 2] << 16)), - (this.words[o] |= (s << a) & 67108863), - (this.words[o + 1] = (s >>> (26 - a)) & 67108863), - (a += 24) >= 26 && ((a -= 26), o++); - else if ('le' === r) - for (n = 0, o = 0; n < t.length; n += 3) - (s = t[n] | (t[n + 1] << 8) | (t[n + 2] << 16)), - (this.words[o] |= (s << a) & 67108863), - (this.words[o + 1] = (s >>> (26 - a)) & 67108863), - (a += 24) >= 26 && ((a -= 26), o++); - return this._strip(); - }), - (o.prototype._parseHex = function (t, e, r) { - (this.length = Math.ceil((t.length - e) / 6)), (this.words = new Array(this.length)); - for (var i = 0; i < this.length; i++) this.words[i] = 0; - var n, - o = 0, - s = 0; - if ('be' === r) - for (i = t.length - 1; i >= e; i -= 2) - (n = h(t, e, i) << o), - (this.words[s] |= 67108863 & n), - o >= 18 ? ((o -= 18), (s += 1), (this.words[s] |= n >>> 26)) : (o += 8); - else - for (i = (t.length - e) % 2 == 0 ? e + 1 : e; i < t.length; i += 2) - (n = h(t, e, i) << o), - (this.words[s] |= 67108863 & n), - o >= 18 ? ((o -= 18), (s += 1), (this.words[s] |= n >>> 26)) : (o += 8); - this._strip(); - }), - (o.prototype._parseBase = function (t, e, r) { - (this.words = [0]), (this.length = 1); - for (var i = 0, n = 1; n <= 67108863; n *= e) i++; - i--, (n = (n / e) | 0); - for (var o = t.length - r, s = o % i, a = Math.min(o, o - s) + r, h = 0, f = r; f < a; f += i) - (h = u(t, f, f + i, e)), this.imuln(n), this.words[0] + h < 67108864 ? (this.words[0] += h) : this._iaddn(h); - if (0 !== s) { - var c = 1; - for (h = u(t, f, t.length, e), f = 0; f < s; f++) c *= e; - this.imuln(c), this.words[0] + h < 67108864 ? (this.words[0] += h) : this._iaddn(h); - } - this._strip(); - }), - (o.prototype.copy = function (t) { - t.words = new Array(this.length); - for (var e = 0; e < this.length; e++) t.words[e] = this.words[e]; - (t.length = this.length), (t.negative = this.negative), (t.red = this.red); - }), - (o.prototype._move = function (t) { - f(t, this); - }), - (o.prototype.clone = function () { - var t = new o(null); - return this.copy(t), t; - }), - (o.prototype._expand = function (t) { - for (; this.length < t; ) this.words[this.length++] = 0; - return this; - }), - (o.prototype._strip = function () { - for (; this.length > 1 && 0 === this.words[this.length - 1]; ) this.length--; - return this._normSign(); - }), - (o.prototype._normSign = function () { - return 1 === this.length && 0 === this.words[0] && (this.negative = 0), this; - }), - 'undefined' != typeof Symbol && 'function' == typeof Symbol.for) - ) - try { - o.prototype[Symbol.for('nodejs.util.inspect.custom')] = c; - } catch (t) { - o.prototype.inspect = c; - } - else o.prototype.inspect = c; - function c() { - return (this.red ? ''; - } - var l = [ - '', - '0', - '00', - '000', - '0000', - '00000', - '000000', - '0000000', - '00000000', - '000000000', - '0000000000', - '00000000000', - '000000000000', - '0000000000000', - '00000000000000', - '000000000000000', - '0000000000000000', - '00000000000000000', - '000000000000000000', - '0000000000000000000', - '00000000000000000000', - '000000000000000000000', - '0000000000000000000000', - '00000000000000000000000', - '000000000000000000000000', - '0000000000000000000000000', - ], - d = [0, 0, 25, 16, 12, 11, 10, 9, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5], - p = [ - 0, 0, 33554432, 43046721, 16777216, 48828125, 60466176, 40353607, 16777216, 43046721, 1e7, 19487171, 35831808, 62748517, - 7529536, 11390625, 16777216, 24137569, 34012224, 47045881, 64e6, 4084101, 5153632, 6436343, 7962624, 9765625, 11881376, - 14348907, 17210368, 20511149, 243e5, 28629151, 33554432, 39135393, 45435424, 52521875, 60466176, - ]; - function m(t, e, r) { - r.negative = e.negative ^ t.negative; - var i = (t.length + e.length) | 0; - (r.length = i), (i = (i - 1) | 0); - var n = 0 | t.words[0], - o = 0 | e.words[0], - s = n * o, - a = 67108863 & s, - h = (s / 67108864) | 0; - r.words[0] = a; - for (var u = 1; u < i; u++) { - for (var f = h >>> 26, c = 67108863 & h, l = Math.min(u, e.length - 1), d = Math.max(0, u - t.length + 1); d <= l; d++) { - var p = (u - d) | 0; - (f += ((s = (n = 0 | t.words[p]) * (o = 0 | e.words[d]) + c) / 67108864) | 0), (c = 67108863 & s); - } - (r.words[u] = 0 | c), (h = 0 | f); - } - return 0 !== h ? (r.words[u] = 0 | h) : r.length--, r._strip(); - } - (o.prototype.toString = function (t, e) { - var r; - if (((e = 0 | e || 1), 16 === (t = t || 10) || 'hex' === t)) { - r = ''; - for (var n = 0, o = 0, s = 0; s < this.length; s++) { - var a = this.words[s], - h = (16777215 & ((a << n) | o)).toString(16); - (o = (a >>> (24 - n)) & 16777215), - (n += 2) >= 26 && ((n -= 26), s--), - (r = 0 !== o || s !== this.length - 1 ? l[6 - h.length] + h + r : h + r); - } - for (0 !== o && (r = o.toString(16) + r); r.length % e != 0; ) r = '0' + r; - return 0 !== this.negative && (r = '-' + r), r; - } - if (t === (0 | t) && t >= 2 && t <= 36) { - var u = d[t], - f = p[t]; - r = ''; - var c = this.clone(); - for (c.negative = 0; !c.isZero(); ) { - var m = c.modrn(f).toString(t); - r = (c = c.idivn(f)).isZero() ? m + r : l[u - m.length] + m + r; - } - for (this.isZero() && (r = '0' + r); r.length % e != 0; ) r = '0' + r; - return 0 !== this.negative && (r = '-' + r), r; - } - i(!1, 'Base should be between 2 and 36'); - }), - (o.prototype.toNumber = function () { - var t = this.words[0]; - return ( - 2 === this.length - ? (t += 67108864 * this.words[1]) - : 3 === this.length && 1 === this.words[2] - ? (t += 4503599627370496 + 67108864 * this.words[1]) - : this.length > 2 && i(!1, 'Number can only safely store up to 53 bits'), - 0 !== this.negative ? -t : t - ); - }), - (o.prototype.toJSON = function () { - return this.toString(16, 2); - }), - s && - (o.prototype.toBuffer = function (t, e) { - return this.toArrayLike(s, t, e); - }), - (o.prototype.toArray = function (t, e) { - return this.toArrayLike(Array, t, e); - }), - (o.prototype.toArrayLike = function (t, e, r) { - this._strip(); - var n = this.byteLength(), - o = r || Math.max(1, n); - i(n <= o, 'byte array longer than desired length'), i(o > 0, 'Requested array length <= 0'); - var s = (function (t, e) { - return t.allocUnsafe ? t.allocUnsafe(e) : new t(e); - })(t, o); - return this['_toArrayLike' + ('le' === e ? 'LE' : 'BE')](s, n), s; - }), - (o.prototype._toArrayLikeLE = function (t, e) { - for (var r = 0, i = 0, n = 0, o = 0; n < this.length; n++) { - var s = (this.words[n] << o) | i; - (t[r++] = 255 & s), - r < t.length && (t[r++] = (s >> 8) & 255), - r < t.length && (t[r++] = (s >> 16) & 255), - 6 === o ? (r < t.length && (t[r++] = (s >> 24) & 255), (i = 0), (o = 0)) : ((i = s >>> 24), (o += 2)); - } - if (r < t.length) for (t[r++] = i; r < t.length; ) t[r++] = 0; - }), - (o.prototype._toArrayLikeBE = function (t, e) { - for (var r = t.length - 1, i = 0, n = 0, o = 0; n < this.length; n++) { - var s = (this.words[n] << o) | i; - (t[r--] = 255 & s), - r >= 0 && (t[r--] = (s >> 8) & 255), - r >= 0 && (t[r--] = (s >> 16) & 255), - 6 === o ? (r >= 0 && (t[r--] = (s >> 24) & 255), (i = 0), (o = 0)) : ((i = s >>> 24), (o += 2)); - } - if (r >= 0) for (t[r--] = i; r >= 0; ) t[r--] = 0; - }), - Math.clz32 - ? (o.prototype._countBits = function (t) { - return 32 - Math.clz32(t); - }) - : (o.prototype._countBits = function (t) { - var e = t, - r = 0; - return ( - e >= 4096 && ((r += 13), (e >>>= 13)), - e >= 64 && ((r += 7), (e >>>= 7)), - e >= 8 && ((r += 4), (e >>>= 4)), - e >= 2 && ((r += 2), (e >>>= 2)), - r + e - ); - }), - (o.prototype._zeroBits = function (t) { - if (0 === t) return 26; - var e = t, - r = 0; - return ( - 0 == (8191 & e) && ((r += 13), (e >>>= 13)), - 0 == (127 & e) && ((r += 7), (e >>>= 7)), - 0 == (15 & e) && ((r += 4), (e >>>= 4)), - 0 == (3 & e) && ((r += 2), (e >>>= 2)), - 0 == (1 & e) && r++, - r - ); - }), - (o.prototype.bitLength = function () { - var t = this.words[this.length - 1], - e = this._countBits(t); - return 26 * (this.length - 1) + e; - }), - (o.prototype.zeroBits = function () { - if (this.isZero()) return 0; - for (var t = 0, e = 0; e < this.length; e++) { - var r = this._zeroBits(this.words[e]); - if (((t += r), 26 !== r)) break; - } - return t; - }), - (o.prototype.byteLength = function () { - return Math.ceil(this.bitLength() / 8); - }), - (o.prototype.toTwos = function (t) { - return 0 !== this.negative ? this.abs().inotn(t).iaddn(1) : this.clone(); - }), - (o.prototype.fromTwos = function (t) { - return this.testn(t - 1) ? this.notn(t).iaddn(1).ineg() : this.clone(); - }), - (o.prototype.isNeg = function () { - return 0 !== this.negative; - }), - (o.prototype.neg = function () { - return this.clone().ineg(); - }), - (o.prototype.ineg = function () { - return this.isZero() || (this.negative ^= 1), this; - }), - (o.prototype.iuor = function (t) { - for (; this.length < t.length; ) this.words[this.length++] = 0; - for (var e = 0; e < t.length; e++) this.words[e] = this.words[e] | t.words[e]; - return this._strip(); - }), - (o.prototype.ior = function (t) { - return i(0 == (this.negative | t.negative)), this.iuor(t); - }), - (o.prototype.or = function (t) { - return this.length > t.length ? this.clone().ior(t) : t.clone().ior(this); - }), - (o.prototype.uor = function (t) { - return this.length > t.length ? this.clone().iuor(t) : t.clone().iuor(this); - }), - (o.prototype.iuand = function (t) { - var e; - e = this.length > t.length ? t : this; - for (var r = 0; r < e.length; r++) this.words[r] = this.words[r] & t.words[r]; - return (this.length = e.length), this._strip(); - }), - (o.prototype.iand = function (t) { - return i(0 == (this.negative | t.negative)), this.iuand(t); - }), - (o.prototype.and = function (t) { - return this.length > t.length ? this.clone().iand(t) : t.clone().iand(this); - }), - (o.prototype.uand = function (t) { - return this.length > t.length ? this.clone().iuand(t) : t.clone().iuand(this); - }), - (o.prototype.iuxor = function (t) { - var e, r; - this.length > t.length ? ((e = this), (r = t)) : ((e = t), (r = this)); - for (var i = 0; i < r.length; i++) this.words[i] = e.words[i] ^ r.words[i]; - if (this !== e) for (; i < e.length; i++) this.words[i] = e.words[i]; - return (this.length = e.length), this._strip(); - }), - (o.prototype.ixor = function (t) { - return i(0 == (this.negative | t.negative)), this.iuxor(t); - }), - (o.prototype.xor = function (t) { - return this.length > t.length ? this.clone().ixor(t) : t.clone().ixor(this); - }), - (o.prototype.uxor = function (t) { - return this.length > t.length ? this.clone().iuxor(t) : t.clone().iuxor(this); - }), - (o.prototype.inotn = function (t) { - i('number' == typeof t && t >= 0); - var e = 0 | Math.ceil(t / 26), - r = t % 26; - this._expand(e), r > 0 && e--; - for (var n = 0; n < e; n++) this.words[n] = 67108863 & ~this.words[n]; - return r > 0 && (this.words[n] = ~this.words[n] & (67108863 >> (26 - r))), this._strip(); - }), - (o.prototype.notn = function (t) { - return this.clone().inotn(t); - }), - (o.prototype.setn = function (t, e) { - i('number' == typeof t && t >= 0); - var r = (t / 26) | 0, - n = t % 26; - return this._expand(r + 1), (this.words[r] = e ? this.words[r] | (1 << n) : this.words[r] & ~(1 << n)), this._strip(); - }), - (o.prototype.iadd = function (t) { - var e, r, i; - if (0 !== this.negative && 0 === t.negative) - return (this.negative = 0), (e = this.isub(t)), (this.negative ^= 1), this._normSign(); - if (0 === this.negative && 0 !== t.negative) return (t.negative = 0), (e = this.isub(t)), (t.negative = 1), e._normSign(); - this.length > t.length ? ((r = this), (i = t)) : ((r = t), (i = this)); - for (var n = 0, o = 0; o < i.length; o++) - (e = (0 | r.words[o]) + (0 | i.words[o]) + n), (this.words[o] = 67108863 & e), (n = e >>> 26); - for (; 0 !== n && o < r.length; o++) (e = (0 | r.words[o]) + n), (this.words[o] = 67108863 & e), (n = e >>> 26); - if (((this.length = r.length), 0 !== n)) (this.words[this.length] = n), this.length++; - else if (r !== this) for (; o < r.length; o++) this.words[o] = r.words[o]; - return this; - }), - (o.prototype.add = function (t) { - var e; - return 0 !== t.negative && 0 === this.negative - ? ((t.negative = 0), (e = this.sub(t)), (t.negative ^= 1), e) - : 0 === t.negative && 0 !== this.negative - ? ((this.negative = 0), (e = t.sub(this)), (this.negative = 1), e) - : this.length > t.length - ? this.clone().iadd(t) - : t.clone().iadd(this); - }), - (o.prototype.isub = function (t) { - if (0 !== t.negative) { - t.negative = 0; - var e = this.iadd(t); - return (t.negative = 1), e._normSign(); - } - if (0 !== this.negative) return (this.negative = 0), this.iadd(t), (this.negative = 1), this._normSign(); - var r, - i, - n = this.cmp(t); - if (0 === n) return (this.negative = 0), (this.length = 1), (this.words[0] = 0), this; - n > 0 ? ((r = this), (i = t)) : ((r = t), (i = this)); - for (var o = 0, s = 0; s < i.length; s++) - (o = (e = (0 | r.words[s]) - (0 | i.words[s]) + o) >> 26), (this.words[s] = 67108863 & e); - for (; 0 !== o && s < r.length; s++) (o = (e = (0 | r.words[s]) + o) >> 26), (this.words[s] = 67108863 & e); - if (0 === o && s < r.length && r !== this) for (; s < r.length; s++) this.words[s] = r.words[s]; - return (this.length = Math.max(this.length, s)), r !== this && (this.negative = 1), this._strip(); - }), - (o.prototype.sub = function (t) { - return this.clone().isub(t); - }); - var g = function (t, e, r) { - var i, - n, - o, - s = t.words, - a = e.words, - h = r.words, - u = 0, - f = 0 | s[0], - c = 8191 & f, - l = f >>> 13, - d = 0 | s[1], - p = 8191 & d, - m = d >>> 13, - g = 0 | s[2], - b = 8191 & g, - y = g >>> 13, - v = 0 | s[3], - w = 8191 & v, - _ = v >>> 13, - M = 0 | s[4], - E = 8191 & M, - S = M >>> 13, - x = 0 | s[5], - A = 8191 & x, - k = x >>> 13, - R = 0 | s[6], - B = 8191 & R, - I = R >>> 13, - T = 0 | s[7], - P = 8191 & T, - O = T >>> 13, - L = 0 | s[8], - C = 8191 & L, - N = L >>> 13, - j = 0 | s[9], - U = 8191 & j, - D = j >>> 13, - z = 0 | a[0], - F = 8191 & z, - q = z >>> 13, - H = 0 | a[1], - $ = 8191 & H, - Z = H >>> 13, - G = 0 | a[2], - V = 8191 & G, - W = G >>> 13, - K = 0 | a[3], - Y = 8191 & K, - J = K >>> 13, - X = 0 | a[4], - Q = 8191 & X, - tt = X >>> 13, - et = 0 | a[5], - rt = 8191 & et, - it = et >>> 13, - nt = 0 | a[6], - ot = 8191 & nt, - st = nt >>> 13, - at = 0 | a[7], - ht = 8191 & at, - ut = at >>> 13, - ft = 0 | a[8], - ct = 8191 & ft, - lt = ft >>> 13, - dt = 0 | a[9], - pt = 8191 & dt, - mt = dt >>> 13; - (r.negative = t.negative ^ e.negative), (r.length = 19); - var gt = (((u + (i = Math.imul(c, F))) | 0) + ((8191 & (n = ((n = Math.imul(c, q)) + Math.imul(l, F)) | 0)) << 13)) | 0; - (u = ((((o = Math.imul(l, q)) + (n >>> 13)) | 0) + (gt >>> 26)) | 0), - (gt &= 67108863), - (i = Math.imul(p, F)), - (n = ((n = Math.imul(p, q)) + Math.imul(m, F)) | 0), - (o = Math.imul(m, q)); - var bt = - (((u + (i = (i + Math.imul(c, $)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, Z)) | 0) + Math.imul(l, $)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, Z)) | 0) + (n >>> 13)) | 0) + (bt >>> 26)) | 0), - (bt &= 67108863), - (i = Math.imul(b, F)), - (n = ((n = Math.imul(b, q)) + Math.imul(y, F)) | 0), - (o = Math.imul(y, q)), - (i = (i + Math.imul(p, $)) | 0), - (n = ((n = (n + Math.imul(p, Z)) | 0) + Math.imul(m, $)) | 0), - (o = (o + Math.imul(m, Z)) | 0); - var yt = - (((u + (i = (i + Math.imul(c, V)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, W)) | 0) + Math.imul(l, V)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, W)) | 0) + (n >>> 13)) | 0) + (yt >>> 26)) | 0), - (yt &= 67108863), - (i = Math.imul(w, F)), - (n = ((n = Math.imul(w, q)) + Math.imul(_, F)) | 0), - (o = Math.imul(_, q)), - (i = (i + Math.imul(b, $)) | 0), - (n = ((n = (n + Math.imul(b, Z)) | 0) + Math.imul(y, $)) | 0), - (o = (o + Math.imul(y, Z)) | 0), - (i = (i + Math.imul(p, V)) | 0), - (n = ((n = (n + Math.imul(p, W)) | 0) + Math.imul(m, V)) | 0), - (o = (o + Math.imul(m, W)) | 0); - var vt = - (((u + (i = (i + Math.imul(c, Y)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, J)) | 0) + Math.imul(l, Y)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, J)) | 0) + (n >>> 13)) | 0) + (vt >>> 26)) | 0), - (vt &= 67108863), - (i = Math.imul(E, F)), - (n = ((n = Math.imul(E, q)) + Math.imul(S, F)) | 0), - (o = Math.imul(S, q)), - (i = (i + Math.imul(w, $)) | 0), - (n = ((n = (n + Math.imul(w, Z)) | 0) + Math.imul(_, $)) | 0), - (o = (o + Math.imul(_, Z)) | 0), - (i = (i + Math.imul(b, V)) | 0), - (n = ((n = (n + Math.imul(b, W)) | 0) + Math.imul(y, V)) | 0), - (o = (o + Math.imul(y, W)) | 0), - (i = (i + Math.imul(p, Y)) | 0), - (n = ((n = (n + Math.imul(p, J)) | 0) + Math.imul(m, Y)) | 0), - (o = (o + Math.imul(m, J)) | 0); - var wt = - (((u + (i = (i + Math.imul(c, Q)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, tt)) | 0) + Math.imul(l, Q)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, tt)) | 0) + (n >>> 13)) | 0) + (wt >>> 26)) | 0), - (wt &= 67108863), - (i = Math.imul(A, F)), - (n = ((n = Math.imul(A, q)) + Math.imul(k, F)) | 0), - (o = Math.imul(k, q)), - (i = (i + Math.imul(E, $)) | 0), - (n = ((n = (n + Math.imul(E, Z)) | 0) + Math.imul(S, $)) | 0), - (o = (o + Math.imul(S, Z)) | 0), - (i = (i + Math.imul(w, V)) | 0), - (n = ((n = (n + Math.imul(w, W)) | 0) + Math.imul(_, V)) | 0), - (o = (o + Math.imul(_, W)) | 0), - (i = (i + Math.imul(b, Y)) | 0), - (n = ((n = (n + Math.imul(b, J)) | 0) + Math.imul(y, Y)) | 0), - (o = (o + Math.imul(y, J)) | 0), - (i = (i + Math.imul(p, Q)) | 0), - (n = ((n = (n + Math.imul(p, tt)) | 0) + Math.imul(m, Q)) | 0), - (o = (o + Math.imul(m, tt)) | 0); - var _t = - (((u + (i = (i + Math.imul(c, rt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, it)) | 0) + Math.imul(l, rt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, it)) | 0) + (n >>> 13)) | 0) + (_t >>> 26)) | 0), - (_t &= 67108863), - (i = Math.imul(B, F)), - (n = ((n = Math.imul(B, q)) + Math.imul(I, F)) | 0), - (o = Math.imul(I, q)), - (i = (i + Math.imul(A, $)) | 0), - (n = ((n = (n + Math.imul(A, Z)) | 0) + Math.imul(k, $)) | 0), - (o = (o + Math.imul(k, Z)) | 0), - (i = (i + Math.imul(E, V)) | 0), - (n = ((n = (n + Math.imul(E, W)) | 0) + Math.imul(S, V)) | 0), - (o = (o + Math.imul(S, W)) | 0), - (i = (i + Math.imul(w, Y)) | 0), - (n = ((n = (n + Math.imul(w, J)) | 0) + Math.imul(_, Y)) | 0), - (o = (o + Math.imul(_, J)) | 0), - (i = (i + Math.imul(b, Q)) | 0), - (n = ((n = (n + Math.imul(b, tt)) | 0) + Math.imul(y, Q)) | 0), - (o = (o + Math.imul(y, tt)) | 0), - (i = (i + Math.imul(p, rt)) | 0), - (n = ((n = (n + Math.imul(p, it)) | 0) + Math.imul(m, rt)) | 0), - (o = (o + Math.imul(m, it)) | 0); - var Mt = - (((u + (i = (i + Math.imul(c, ot)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, st)) | 0) + Math.imul(l, ot)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, st)) | 0) + (n >>> 13)) | 0) + (Mt >>> 26)) | 0), - (Mt &= 67108863), - (i = Math.imul(P, F)), - (n = ((n = Math.imul(P, q)) + Math.imul(O, F)) | 0), - (o = Math.imul(O, q)), - (i = (i + Math.imul(B, $)) | 0), - (n = ((n = (n + Math.imul(B, Z)) | 0) + Math.imul(I, $)) | 0), - (o = (o + Math.imul(I, Z)) | 0), - (i = (i + Math.imul(A, V)) | 0), - (n = ((n = (n + Math.imul(A, W)) | 0) + Math.imul(k, V)) | 0), - (o = (o + Math.imul(k, W)) | 0), - (i = (i + Math.imul(E, Y)) | 0), - (n = ((n = (n + Math.imul(E, J)) | 0) + Math.imul(S, Y)) | 0), - (o = (o + Math.imul(S, J)) | 0), - (i = (i + Math.imul(w, Q)) | 0), - (n = ((n = (n + Math.imul(w, tt)) | 0) + Math.imul(_, Q)) | 0), - (o = (o + Math.imul(_, tt)) | 0), - (i = (i + Math.imul(b, rt)) | 0), - (n = ((n = (n + Math.imul(b, it)) | 0) + Math.imul(y, rt)) | 0), - (o = (o + Math.imul(y, it)) | 0), - (i = (i + Math.imul(p, ot)) | 0), - (n = ((n = (n + Math.imul(p, st)) | 0) + Math.imul(m, ot)) | 0), - (o = (o + Math.imul(m, st)) | 0); - var Et = - (((u + (i = (i + Math.imul(c, ht)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, ut)) | 0) + Math.imul(l, ht)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, ut)) | 0) + (n >>> 13)) | 0) + (Et >>> 26)) | 0), - (Et &= 67108863), - (i = Math.imul(C, F)), - (n = ((n = Math.imul(C, q)) + Math.imul(N, F)) | 0), - (o = Math.imul(N, q)), - (i = (i + Math.imul(P, $)) | 0), - (n = ((n = (n + Math.imul(P, Z)) | 0) + Math.imul(O, $)) | 0), - (o = (o + Math.imul(O, Z)) | 0), - (i = (i + Math.imul(B, V)) | 0), - (n = ((n = (n + Math.imul(B, W)) | 0) + Math.imul(I, V)) | 0), - (o = (o + Math.imul(I, W)) | 0), - (i = (i + Math.imul(A, Y)) | 0), - (n = ((n = (n + Math.imul(A, J)) | 0) + Math.imul(k, Y)) | 0), - (o = (o + Math.imul(k, J)) | 0), - (i = (i + Math.imul(E, Q)) | 0), - (n = ((n = (n + Math.imul(E, tt)) | 0) + Math.imul(S, Q)) | 0), - (o = (o + Math.imul(S, tt)) | 0), - (i = (i + Math.imul(w, rt)) | 0), - (n = ((n = (n + Math.imul(w, it)) | 0) + Math.imul(_, rt)) | 0), - (o = (o + Math.imul(_, it)) | 0), - (i = (i + Math.imul(b, ot)) | 0), - (n = ((n = (n + Math.imul(b, st)) | 0) + Math.imul(y, ot)) | 0), - (o = (o + Math.imul(y, st)) | 0), - (i = (i + Math.imul(p, ht)) | 0), - (n = ((n = (n + Math.imul(p, ut)) | 0) + Math.imul(m, ht)) | 0), - (o = (o + Math.imul(m, ut)) | 0); - var St = - (((u + (i = (i + Math.imul(c, ct)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, lt)) | 0) + Math.imul(l, ct)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, lt)) | 0) + (n >>> 13)) | 0) + (St >>> 26)) | 0), - (St &= 67108863), - (i = Math.imul(U, F)), - (n = ((n = Math.imul(U, q)) + Math.imul(D, F)) | 0), - (o = Math.imul(D, q)), - (i = (i + Math.imul(C, $)) | 0), - (n = ((n = (n + Math.imul(C, Z)) | 0) + Math.imul(N, $)) | 0), - (o = (o + Math.imul(N, Z)) | 0), - (i = (i + Math.imul(P, V)) | 0), - (n = ((n = (n + Math.imul(P, W)) | 0) + Math.imul(O, V)) | 0), - (o = (o + Math.imul(O, W)) | 0), - (i = (i + Math.imul(B, Y)) | 0), - (n = ((n = (n + Math.imul(B, J)) | 0) + Math.imul(I, Y)) | 0), - (o = (o + Math.imul(I, J)) | 0), - (i = (i + Math.imul(A, Q)) | 0), - (n = ((n = (n + Math.imul(A, tt)) | 0) + Math.imul(k, Q)) | 0), - (o = (o + Math.imul(k, tt)) | 0), - (i = (i + Math.imul(E, rt)) | 0), - (n = ((n = (n + Math.imul(E, it)) | 0) + Math.imul(S, rt)) | 0), - (o = (o + Math.imul(S, it)) | 0), - (i = (i + Math.imul(w, ot)) | 0), - (n = ((n = (n + Math.imul(w, st)) | 0) + Math.imul(_, ot)) | 0), - (o = (o + Math.imul(_, st)) | 0), - (i = (i + Math.imul(b, ht)) | 0), - (n = ((n = (n + Math.imul(b, ut)) | 0) + Math.imul(y, ht)) | 0), - (o = (o + Math.imul(y, ut)) | 0), - (i = (i + Math.imul(p, ct)) | 0), - (n = ((n = (n + Math.imul(p, lt)) | 0) + Math.imul(m, ct)) | 0), - (o = (o + Math.imul(m, lt)) | 0); - var xt = - (((u + (i = (i + Math.imul(c, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, mt)) | 0) + Math.imul(l, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, mt)) | 0) + (n >>> 13)) | 0) + (xt >>> 26)) | 0), - (xt &= 67108863), - (i = Math.imul(U, $)), - (n = ((n = Math.imul(U, Z)) + Math.imul(D, $)) | 0), - (o = Math.imul(D, Z)), - (i = (i + Math.imul(C, V)) | 0), - (n = ((n = (n + Math.imul(C, W)) | 0) + Math.imul(N, V)) | 0), - (o = (o + Math.imul(N, W)) | 0), - (i = (i + Math.imul(P, Y)) | 0), - (n = ((n = (n + Math.imul(P, J)) | 0) + Math.imul(O, Y)) | 0), - (o = (o + Math.imul(O, J)) | 0), - (i = (i + Math.imul(B, Q)) | 0), - (n = ((n = (n + Math.imul(B, tt)) | 0) + Math.imul(I, Q)) | 0), - (o = (o + Math.imul(I, tt)) | 0), - (i = (i + Math.imul(A, rt)) | 0), - (n = ((n = (n + Math.imul(A, it)) | 0) + Math.imul(k, rt)) | 0), - (o = (o + Math.imul(k, it)) | 0), - (i = (i + Math.imul(E, ot)) | 0), - (n = ((n = (n + Math.imul(E, st)) | 0) + Math.imul(S, ot)) | 0), - (o = (o + Math.imul(S, st)) | 0), - (i = (i + Math.imul(w, ht)) | 0), - (n = ((n = (n + Math.imul(w, ut)) | 0) + Math.imul(_, ht)) | 0), - (o = (o + Math.imul(_, ut)) | 0), - (i = (i + Math.imul(b, ct)) | 0), - (n = ((n = (n + Math.imul(b, lt)) | 0) + Math.imul(y, ct)) | 0), - (o = (o + Math.imul(y, lt)) | 0); - var At = - (((u + (i = (i + Math.imul(p, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(p, mt)) | 0) + Math.imul(m, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(m, mt)) | 0) + (n >>> 13)) | 0) + (At >>> 26)) | 0), - (At &= 67108863), - (i = Math.imul(U, V)), - (n = ((n = Math.imul(U, W)) + Math.imul(D, V)) | 0), - (o = Math.imul(D, W)), - (i = (i + Math.imul(C, Y)) | 0), - (n = ((n = (n + Math.imul(C, J)) | 0) + Math.imul(N, Y)) | 0), - (o = (o + Math.imul(N, J)) | 0), - (i = (i + Math.imul(P, Q)) | 0), - (n = ((n = (n + Math.imul(P, tt)) | 0) + Math.imul(O, Q)) | 0), - (o = (o + Math.imul(O, tt)) | 0), - (i = (i + Math.imul(B, rt)) | 0), - (n = ((n = (n + Math.imul(B, it)) | 0) + Math.imul(I, rt)) | 0), - (o = (o + Math.imul(I, it)) | 0), - (i = (i + Math.imul(A, ot)) | 0), - (n = ((n = (n + Math.imul(A, st)) | 0) + Math.imul(k, ot)) | 0), - (o = (o + Math.imul(k, st)) | 0), - (i = (i + Math.imul(E, ht)) | 0), - (n = ((n = (n + Math.imul(E, ut)) | 0) + Math.imul(S, ht)) | 0), - (o = (o + Math.imul(S, ut)) | 0), - (i = (i + Math.imul(w, ct)) | 0), - (n = ((n = (n + Math.imul(w, lt)) | 0) + Math.imul(_, ct)) | 0), - (o = (o + Math.imul(_, lt)) | 0); - var kt = - (((u + (i = (i + Math.imul(b, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(b, mt)) | 0) + Math.imul(y, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(y, mt)) | 0) + (n >>> 13)) | 0) + (kt >>> 26)) | 0), - (kt &= 67108863), - (i = Math.imul(U, Y)), - (n = ((n = Math.imul(U, J)) + Math.imul(D, Y)) | 0), - (o = Math.imul(D, J)), - (i = (i + Math.imul(C, Q)) | 0), - (n = ((n = (n + Math.imul(C, tt)) | 0) + Math.imul(N, Q)) | 0), - (o = (o + Math.imul(N, tt)) | 0), - (i = (i + Math.imul(P, rt)) | 0), - (n = ((n = (n + Math.imul(P, it)) | 0) + Math.imul(O, rt)) | 0), - (o = (o + Math.imul(O, it)) | 0), - (i = (i + Math.imul(B, ot)) | 0), - (n = ((n = (n + Math.imul(B, st)) | 0) + Math.imul(I, ot)) | 0), - (o = (o + Math.imul(I, st)) | 0), - (i = (i + Math.imul(A, ht)) | 0), - (n = ((n = (n + Math.imul(A, ut)) | 0) + Math.imul(k, ht)) | 0), - (o = (o + Math.imul(k, ut)) | 0), - (i = (i + Math.imul(E, ct)) | 0), - (n = ((n = (n + Math.imul(E, lt)) | 0) + Math.imul(S, ct)) | 0), - (o = (o + Math.imul(S, lt)) | 0); - var Rt = - (((u + (i = (i + Math.imul(w, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(w, mt)) | 0) + Math.imul(_, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(_, mt)) | 0) + (n >>> 13)) | 0) + (Rt >>> 26)) | 0), - (Rt &= 67108863), - (i = Math.imul(U, Q)), - (n = ((n = Math.imul(U, tt)) + Math.imul(D, Q)) | 0), - (o = Math.imul(D, tt)), - (i = (i + Math.imul(C, rt)) | 0), - (n = ((n = (n + Math.imul(C, it)) | 0) + Math.imul(N, rt)) | 0), - (o = (o + Math.imul(N, it)) | 0), - (i = (i + Math.imul(P, ot)) | 0), - (n = ((n = (n + Math.imul(P, st)) | 0) + Math.imul(O, ot)) | 0), - (o = (o + Math.imul(O, st)) | 0), - (i = (i + Math.imul(B, ht)) | 0), - (n = ((n = (n + Math.imul(B, ut)) | 0) + Math.imul(I, ht)) | 0), - (o = (o + Math.imul(I, ut)) | 0), - (i = (i + Math.imul(A, ct)) | 0), - (n = ((n = (n + Math.imul(A, lt)) | 0) + Math.imul(k, ct)) | 0), - (o = (o + Math.imul(k, lt)) | 0); - var Bt = - (((u + (i = (i + Math.imul(E, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(E, mt)) | 0) + Math.imul(S, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(S, mt)) | 0) + (n >>> 13)) | 0) + (Bt >>> 26)) | 0), - (Bt &= 67108863), - (i = Math.imul(U, rt)), - (n = ((n = Math.imul(U, it)) + Math.imul(D, rt)) | 0), - (o = Math.imul(D, it)), - (i = (i + Math.imul(C, ot)) | 0), - (n = ((n = (n + Math.imul(C, st)) | 0) + Math.imul(N, ot)) | 0), - (o = (o + Math.imul(N, st)) | 0), - (i = (i + Math.imul(P, ht)) | 0), - (n = ((n = (n + Math.imul(P, ut)) | 0) + Math.imul(O, ht)) | 0), - (o = (o + Math.imul(O, ut)) | 0), - (i = (i + Math.imul(B, ct)) | 0), - (n = ((n = (n + Math.imul(B, lt)) | 0) + Math.imul(I, ct)) | 0), - (o = (o + Math.imul(I, lt)) | 0); - var It = - (((u + (i = (i + Math.imul(A, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(A, mt)) | 0) + Math.imul(k, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(k, mt)) | 0) + (n >>> 13)) | 0) + (It >>> 26)) | 0), - (It &= 67108863), - (i = Math.imul(U, ot)), - (n = ((n = Math.imul(U, st)) + Math.imul(D, ot)) | 0), - (o = Math.imul(D, st)), - (i = (i + Math.imul(C, ht)) | 0), - (n = ((n = (n + Math.imul(C, ut)) | 0) + Math.imul(N, ht)) | 0), - (o = (o + Math.imul(N, ut)) | 0), - (i = (i + Math.imul(P, ct)) | 0), - (n = ((n = (n + Math.imul(P, lt)) | 0) + Math.imul(O, ct)) | 0), - (o = (o + Math.imul(O, lt)) | 0); - var Tt = - (((u + (i = (i + Math.imul(B, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(B, mt)) | 0) + Math.imul(I, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(I, mt)) | 0) + (n >>> 13)) | 0) + (Tt >>> 26)) | 0), - (Tt &= 67108863), - (i = Math.imul(U, ht)), - (n = ((n = Math.imul(U, ut)) + Math.imul(D, ht)) | 0), - (o = Math.imul(D, ut)), - (i = (i + Math.imul(C, ct)) | 0), - (n = ((n = (n + Math.imul(C, lt)) | 0) + Math.imul(N, ct)) | 0), - (o = (o + Math.imul(N, lt)) | 0); - var Pt = - (((u + (i = (i + Math.imul(P, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(P, mt)) | 0) + Math.imul(O, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(O, mt)) | 0) + (n >>> 13)) | 0) + (Pt >>> 26)) | 0), - (Pt &= 67108863), - (i = Math.imul(U, ct)), - (n = ((n = Math.imul(U, lt)) + Math.imul(D, ct)) | 0), - (o = Math.imul(D, lt)); - var Ot = - (((u + (i = (i + Math.imul(C, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(C, mt)) | 0) + Math.imul(N, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(N, mt)) | 0) + (n >>> 13)) | 0) + (Ot >>> 26)) | 0), (Ot &= 67108863); - var Lt = (((u + (i = Math.imul(U, pt))) | 0) + ((8191 & (n = ((n = Math.imul(U, mt)) + Math.imul(D, pt)) | 0)) << 13)) | 0; - return ( - (u = ((((o = Math.imul(D, mt)) + (n >>> 13)) | 0) + (Lt >>> 26)) | 0), - (Lt &= 67108863), - (h[0] = gt), - (h[1] = bt), - (h[2] = yt), - (h[3] = vt), - (h[4] = wt), - (h[5] = _t), - (h[6] = Mt), - (h[7] = Et), - (h[8] = St), - (h[9] = xt), - (h[10] = At), - (h[11] = kt), - (h[12] = Rt), - (h[13] = Bt), - (h[14] = It), - (h[15] = Tt), - (h[16] = Pt), - (h[17] = Ot), - (h[18] = Lt), - 0 !== u && ((h[19] = u), r.length++), - r - ); - }; - function b(t, e, r) { - (r.negative = e.negative ^ t.negative), (r.length = t.length + e.length); - for (var i = 0, n = 0, o = 0; o < r.length - 1; o++) { - var s = n; - n = 0; - for (var a = 67108863 & i, h = Math.min(o, e.length - 1), u = Math.max(0, o - t.length + 1); u <= h; u++) { - var f = o - u, - c = (0 | t.words[f]) * (0 | e.words[u]), - l = 67108863 & c; - (a = 67108863 & (l = (l + a) | 0)), - (n += (s = ((s = (s + ((c / 67108864) | 0)) | 0) + (l >>> 26)) | 0) >>> 26), - (s &= 67108863); - } - (r.words[o] = a), (i = s), (s = n); - } - return 0 !== i ? (r.words[o] = i) : r.length--, r._strip(); - } - function y(t, e, r) { - return b(t, e, r); - } - function v(t, e) { - (this.x = t), (this.y = e); - } - Math.imul || (g = m), - (o.prototype.mulTo = function (t, e) { - var r = this.length + t.length; - return 10 === this.length && 10 === t.length - ? g(this, t, e) - : r < 63 - ? m(this, t, e) - : r < 1024 - ? b(this, t, e) - : y(this, t, e); - }), - (v.prototype.makeRBT = function (t) { - for (var e = new Array(t), r = o.prototype._countBits(t) - 1, i = 0; i < t; i++) e[i] = this.revBin(i, r, t); - return e; - }), - (v.prototype.revBin = function (t, e, r) { - if (0 === t || t === r - 1) return t; - for (var i = 0, n = 0; n < e; n++) (i |= (1 & t) << (e - n - 1)), (t >>= 1); - return i; - }), - (v.prototype.permute = function (t, e, r, i, n, o) { - for (var s = 0; s < o; s++) (i[s] = e[t[s]]), (n[s] = r[t[s]]); - }), - (v.prototype.transform = function (t, e, r, i, n, o) { - this.permute(o, t, e, r, i, n); - for (var s = 1; s < n; s <<= 1) - for (var a = s << 1, h = Math.cos((2 * Math.PI) / a), u = Math.sin((2 * Math.PI) / a), f = 0; f < n; f += a) - for (var c = h, l = u, d = 0; d < s; d++) { - var p = r[f + d], - m = i[f + d], - g = r[f + d + s], - b = i[f + d + s], - y = c * g - l * b; - (b = c * b + l * g), - (g = y), - (r[f + d] = p + g), - (i[f + d] = m + b), - (r[f + d + s] = p - g), - (i[f + d + s] = m - b), - d !== a && ((y = h * c - u * l), (l = h * l + u * c), (c = y)); - } - }), - (v.prototype.guessLen13b = function (t, e) { - var r = 1 | Math.max(e, t), - i = 1 & r, - n = 0; - for (r = (r / 2) | 0; r; r >>>= 1) n++; - return 1 << (n + 1 + i); - }), - (v.prototype.conjugate = function (t, e, r) { - if (!(r <= 1)) - for (var i = 0; i < r / 2; i++) { - var n = t[i]; - (t[i] = t[r - i - 1]), (t[r - i - 1] = n), (n = e[i]), (e[i] = -e[r - i - 1]), (e[r - i - 1] = -n); - } - }), - (v.prototype.normalize13b = function (t, e) { - for (var r = 0, i = 0; i < e / 2; i++) { - var n = 8192 * Math.round(t[2 * i + 1] / e) + Math.round(t[2 * i] / e) + r; - (t[i] = 67108863 & n), (r = n < 67108864 ? 0 : (n / 67108864) | 0); - } - return t; - }), - (v.prototype.convert13b = function (t, e, r, n) { - for (var o = 0, s = 0; s < e; s++) - (o += 0 | t[s]), (r[2 * s] = 8191 & o), (o >>>= 13), (r[2 * s + 1] = 8191 & o), (o >>>= 13); - for (s = 2 * e; s < n; ++s) r[s] = 0; - i(0 === o), i(0 == (-8192 & o)); - }), - (v.prototype.stub = function (t) { - for (var e = new Array(t), r = 0; r < t; r++) e[r] = 0; - return e; - }), - (v.prototype.mulp = function (t, e, r) { - var i = 2 * this.guessLen13b(t.length, e.length), - n = this.makeRBT(i), - o = this.stub(i), - s = new Array(i), - a = new Array(i), - h = new Array(i), - u = new Array(i), - f = new Array(i), - c = new Array(i), - l = r.words; - (l.length = i), - this.convert13b(t.words, t.length, s, i), - this.convert13b(e.words, e.length, u, i), - this.transform(s, o, a, h, i, n), - this.transform(u, o, f, c, i, n); - for (var d = 0; d < i; d++) { - var p = a[d] * f[d] - h[d] * c[d]; - (h[d] = a[d] * c[d] + h[d] * f[d]), (a[d] = p); - } - return ( - this.conjugate(a, h, i), - this.transform(a, h, l, o, i, n), - this.conjugate(l, o, i), - this.normalize13b(l, i), - (r.negative = t.negative ^ e.negative), - (r.length = t.length + e.length), - r._strip() - ); - }), - (o.prototype.mul = function (t) { - var e = new o(null); - return (e.words = new Array(this.length + t.length)), this.mulTo(t, e); - }), - (o.prototype.mulf = function (t) { - var e = new o(null); - return (e.words = new Array(this.length + t.length)), y(this, t, e); - }), - (o.prototype.imul = function (t) { - return this.clone().mulTo(t, this); - }), - (o.prototype.imuln = function (t) { - var e = t < 0; - e && (t = -t), i('number' == typeof t), i(t < 67108864); - for (var r = 0, n = 0; n < this.length; n++) { - var o = (0 | this.words[n]) * t, - s = (67108863 & o) + (67108863 & r); - (r >>= 26), (r += (o / 67108864) | 0), (r += s >>> 26), (this.words[n] = 67108863 & s); - } - return 0 !== r && ((this.words[n] = r), this.length++), e ? this.ineg() : this; - }), - (o.prototype.muln = function (t) { - return this.clone().imuln(t); - }), - (o.prototype.sqr = function () { - return this.mul(this); - }), - (o.prototype.isqr = function () { - return this.imul(this.clone()); - }), - (o.prototype.pow = function (t) { - var e = (function (t) { - for (var e = new Array(t.bitLength()), r = 0; r < e.length; r++) { - var i = (r / 26) | 0, - n = r % 26; - e[r] = (t.words[i] >>> n) & 1; - } - return e; - })(t); - if (0 === e.length) return new o(1); - for (var r = this, i = 0; i < e.length && 0 === e[i]; i++, r = r.sqr()); - if (++i < e.length) for (var n = r.sqr(); i < e.length; i++, n = n.sqr()) 0 !== e[i] && (r = r.mul(n)); - return r; - }), - (o.prototype.iushln = function (t) { - i('number' == typeof t && t >= 0); - var e, - r = t % 26, - n = (t - r) / 26, - o = (67108863 >>> (26 - r)) << (26 - r); - if (0 !== r) { - var s = 0; - for (e = 0; e < this.length; e++) { - var a = this.words[e] & o, - h = ((0 | this.words[e]) - a) << r; - (this.words[e] = h | s), (s = a >>> (26 - r)); - } - s && ((this.words[e] = s), this.length++); - } - if (0 !== n) { - for (e = this.length - 1; e >= 0; e--) this.words[e + n] = this.words[e]; - for (e = 0; e < n; e++) this.words[e] = 0; - this.length += n; - } - return this._strip(); - }), - (o.prototype.ishln = function (t) { - return i(0 === this.negative), this.iushln(t); - }), - (o.prototype.iushrn = function (t, e, r) { - var n; - i('number' == typeof t && t >= 0), (n = e ? (e - (e % 26)) / 26 : 0); - var o = t % 26, - s = Math.min((t - o) / 26, this.length), - a = 67108863 ^ ((67108863 >>> o) << o), - h = r; - if (((n -= s), (n = Math.max(0, n)), h)) { - for (var u = 0; u < s; u++) h.words[u] = this.words[u]; - h.length = s; - } - if (0 === s); - else if (this.length > s) for (this.length -= s, u = 0; u < this.length; u++) this.words[u] = this.words[u + s]; - else (this.words[0] = 0), (this.length = 1); - var f = 0; - for (u = this.length - 1; u >= 0 && (0 !== f || u >= n); u--) { - var c = 0 | this.words[u]; - (this.words[u] = (f << (26 - o)) | (c >>> o)), (f = c & a); - } - return ( - h && 0 !== f && (h.words[h.length++] = f), 0 === this.length && ((this.words[0] = 0), (this.length = 1)), this._strip() - ); - }), - (o.prototype.ishrn = function (t, e, r) { - return i(0 === this.negative), this.iushrn(t, e, r); - }), - (o.prototype.shln = function (t) { - return this.clone().ishln(t); - }), - (o.prototype.ushln = function (t) { - return this.clone().iushln(t); - }), - (o.prototype.shrn = function (t) { - return this.clone().ishrn(t); - }), - (o.prototype.ushrn = function (t) { - return this.clone().iushrn(t); - }), - (o.prototype.testn = function (t) { - i('number' == typeof t && t >= 0); - var e = t % 26, - r = (t - e) / 26, - n = 1 << e; - return !(this.length <= r || !(this.words[r] & n)); - }), - (o.prototype.imaskn = function (t) { - i('number' == typeof t && t >= 0); - var e = t % 26, - r = (t - e) / 26; - if ((i(0 === this.negative, 'imaskn works only with positive numbers'), this.length <= r)) return this; - if ((0 !== e && r++, (this.length = Math.min(r, this.length)), 0 !== e)) { - var n = 67108863 ^ ((67108863 >>> e) << e); - this.words[this.length - 1] &= n; - } - return this._strip(); - }), - (o.prototype.maskn = function (t) { - return this.clone().imaskn(t); - }), - (o.prototype.iaddn = function (t) { - return ( - i('number' == typeof t), - i(t < 67108864), - t < 0 - ? this.isubn(-t) - : 0 !== this.negative - ? 1 === this.length && (0 | this.words[0]) <= t - ? ((this.words[0] = t - (0 | this.words[0])), (this.negative = 0), this) - : ((this.negative = 0), this.isubn(t), (this.negative = 1), this) - : this._iaddn(t) - ); - }), - (o.prototype._iaddn = function (t) { - this.words[0] += t; - for (var e = 0; e < this.length && this.words[e] >= 67108864; e++) - (this.words[e] -= 67108864), e === this.length - 1 ? (this.words[e + 1] = 1) : this.words[e + 1]++; - return (this.length = Math.max(this.length, e + 1)), this; - }), - (o.prototype.isubn = function (t) { - if ((i('number' == typeof t), i(t < 67108864), t < 0)) return this.iaddn(-t); - if (0 !== this.negative) return (this.negative = 0), this.iaddn(t), (this.negative = 1), this; - if (((this.words[0] -= t), 1 === this.length && this.words[0] < 0)) (this.words[0] = -this.words[0]), (this.negative = 1); - else for (var e = 0; e < this.length && this.words[e] < 0; e++) (this.words[e] += 67108864), (this.words[e + 1] -= 1); - return this._strip(); - }), - (o.prototype.addn = function (t) { - return this.clone().iaddn(t); - }), - (o.prototype.subn = function (t) { - return this.clone().isubn(t); - }), - (o.prototype.iabs = function () { - return (this.negative = 0), this; - }), - (o.prototype.abs = function () { - return this.clone().iabs(); - }), - (o.prototype._ishlnsubmul = function (t, e, r) { - var n, - o, - s = t.length + r; - this._expand(s); - var a = 0; - for (n = 0; n < t.length; n++) { - o = (0 | this.words[n + r]) + a; - var h = (0 | t.words[n]) * e; - (a = ((o -= 67108863 & h) >> 26) - ((h / 67108864) | 0)), (this.words[n + r] = 67108863 & o); - } - for (; n < this.length - r; n++) (a = (o = (0 | this.words[n + r]) + a) >> 26), (this.words[n + r] = 67108863 & o); - if (0 === a) return this._strip(); - for (i(-1 === a), a = 0, n = 0; n < this.length; n++) - (a = (o = -(0 | this.words[n]) + a) >> 26), (this.words[n] = 67108863 & o); - return (this.negative = 1), this._strip(); - }), - (o.prototype._wordDiv = function (t, e) { - var r = (this.length, t.length), - i = this.clone(), - n = t, - s = 0 | n.words[n.length - 1]; - 0 != (r = 26 - this._countBits(s)) && ((n = n.ushln(r)), i.iushln(r), (s = 0 | n.words[n.length - 1])); - var a, - h = i.length - n.length; - if ('mod' !== e) { - ((a = new o(null)).length = h + 1), (a.words = new Array(a.length)); - for (var u = 0; u < a.length; u++) a.words[u] = 0; - } - var f = i.clone()._ishlnsubmul(n, 1, h); - 0 === f.negative && ((i = f), a && (a.words[h] = 1)); - for (var c = h - 1; c >= 0; c--) { - var l = 67108864 * (0 | i.words[n.length + c]) + (0 | i.words[n.length + c - 1]); - for (l = Math.min((l / s) | 0, 67108863), i._ishlnsubmul(n, l, c); 0 !== i.negative; ) - l--, (i.negative = 0), i._ishlnsubmul(n, 1, c), i.isZero() || (i.negative ^= 1); - a && (a.words[c] = l); - } - return a && a._strip(), i._strip(), 'div' !== e && 0 !== r && i.iushrn(r), { div: a || null, mod: i }; - }), - (o.prototype.divmod = function (t, e, r) { - return ( - i(!t.isZero()), - this.isZero() - ? { div: new o(0), mod: new o(0) } - : 0 !== this.negative && 0 === t.negative - ? ((a = this.neg().divmod(t, e)), - 'mod' !== e && (n = a.div.neg()), - 'div' !== e && ((s = a.mod.neg()), r && 0 !== s.negative && s.iadd(t)), - { div: n, mod: s }) - : 0 === this.negative && 0 !== t.negative - ? ((a = this.divmod(t.neg(), e)), 'mod' !== e && (n = a.div.neg()), { div: n, mod: a.mod }) - : 0 != (this.negative & t.negative) - ? ((a = this.neg().divmod(t.neg(), e)), - 'div' !== e && ((s = a.mod.neg()), r && 0 !== s.negative && s.isub(t)), - { div: a.div, mod: s }) - : t.length > this.length || this.cmp(t) < 0 - ? { div: new o(0), mod: this } - : 1 === t.length - ? 'div' === e - ? { div: this.divn(t.words[0]), mod: null } - : 'mod' === e - ? { div: null, mod: new o(this.modrn(t.words[0])) } - : { div: this.divn(t.words[0]), mod: new o(this.modrn(t.words[0])) } - : this._wordDiv(t, e) - ); - var n, s, a; - }), - (o.prototype.div = function (t) { - return this.divmod(t, 'div', !1).div; - }), - (o.prototype.mod = function (t) { - return this.divmod(t, 'mod', !1).mod; - }), - (o.prototype.umod = function (t) { - return this.divmod(t, 'mod', !0).mod; - }), - (o.prototype.divRound = function (t) { - var e = this.divmod(t); - if (e.mod.isZero()) return e.div; - var r = 0 !== e.div.negative ? e.mod.isub(t) : e.mod, - i = t.ushrn(1), - n = t.andln(1), - o = r.cmp(i); - return o < 0 || (1 === n && 0 === o) ? e.div : 0 !== e.div.negative ? e.div.isubn(1) : e.div.iaddn(1); - }), - (o.prototype.modrn = function (t) { - var e = t < 0; - e && (t = -t), i(t <= 67108863); - for (var r = (1 << 26) % t, n = 0, o = this.length - 1; o >= 0; o--) n = (r * n + (0 | this.words[o])) % t; - return e ? -n : n; - }), - (o.prototype.modn = function (t) { - return this.modrn(t); - }), - (o.prototype.idivn = function (t) { - var e = t < 0; - e && (t = -t), i(t <= 67108863); - for (var r = 0, n = this.length - 1; n >= 0; n--) { - var o = (0 | this.words[n]) + 67108864 * r; - (this.words[n] = (o / t) | 0), (r = o % t); - } - return this._strip(), e ? this.ineg() : this; - }), - (o.prototype.divn = function (t) { - return this.clone().idivn(t); - }), - (o.prototype.egcd = function (t) { - i(0 === t.negative), i(!t.isZero()); - var e = this, - r = t.clone(); - e = 0 !== e.negative ? e.umod(t) : e.clone(); - for (var n = new o(1), s = new o(0), a = new o(0), h = new o(1), u = 0; e.isEven() && r.isEven(); ) - e.iushrn(1), r.iushrn(1), ++u; - for (var f = r.clone(), c = e.clone(); !e.isZero(); ) { - for (var l = 0, d = 1; 0 == (e.words[0] & d) && l < 26; ++l, d <<= 1); - if (l > 0) for (e.iushrn(l); l-- > 0; ) (n.isOdd() || s.isOdd()) && (n.iadd(f), s.isub(c)), n.iushrn(1), s.iushrn(1); - for (var p = 0, m = 1; 0 == (r.words[0] & m) && p < 26; ++p, m <<= 1); - if (p > 0) for (r.iushrn(p); p-- > 0; ) (a.isOdd() || h.isOdd()) && (a.iadd(f), h.isub(c)), a.iushrn(1), h.iushrn(1); - e.cmp(r) >= 0 ? (e.isub(r), n.isub(a), s.isub(h)) : (r.isub(e), a.isub(n), h.isub(s)); - } - return { a, b: h, gcd: r.iushln(u) }; - }), - (o.prototype._invmp = function (t) { - i(0 === t.negative), i(!t.isZero()); - var e = this, - r = t.clone(); - e = 0 !== e.negative ? e.umod(t) : e.clone(); - for (var n, s = new o(1), a = new o(0), h = r.clone(); e.cmpn(1) > 0 && r.cmpn(1) > 0; ) { - for (var u = 0, f = 1; 0 == (e.words[0] & f) && u < 26; ++u, f <<= 1); - if (u > 0) for (e.iushrn(u); u-- > 0; ) s.isOdd() && s.iadd(h), s.iushrn(1); - for (var c = 0, l = 1; 0 == (r.words[0] & l) && c < 26; ++c, l <<= 1); - if (c > 0) for (r.iushrn(c); c-- > 0; ) a.isOdd() && a.iadd(h), a.iushrn(1); - e.cmp(r) >= 0 ? (e.isub(r), s.isub(a)) : (r.isub(e), a.isub(s)); - } - return (n = 0 === e.cmpn(1) ? s : a).cmpn(0) < 0 && n.iadd(t), n; - }), - (o.prototype.gcd = function (t) { - if (this.isZero()) return t.abs(); - if (t.isZero()) return this.abs(); - var e = this.clone(), - r = t.clone(); - (e.negative = 0), (r.negative = 0); - for (var i = 0; e.isEven() && r.isEven(); i++) e.iushrn(1), r.iushrn(1); - for (;;) { - for (; e.isEven(); ) e.iushrn(1); - for (; r.isEven(); ) r.iushrn(1); - var n = e.cmp(r); - if (n < 0) { - var o = e; - (e = r), (r = o); - } else if (0 === n || 0 === r.cmpn(1)) break; - e.isub(r); - } - return r.iushln(i); - }), - (o.prototype.invm = function (t) { - return this.egcd(t).a.umod(t); - }), - (o.prototype.isEven = function () { - return 0 == (1 & this.words[0]); - }), - (o.prototype.isOdd = function () { - return 1 == (1 & this.words[0]); - }), - (o.prototype.andln = function (t) { - return this.words[0] & t; - }), - (o.prototype.bincn = function (t) { - i('number' == typeof t); - var e = t % 26, - r = (t - e) / 26, - n = 1 << e; - if (this.length <= r) return this._expand(r + 1), (this.words[r] |= n), this; - for (var o = n, s = r; 0 !== o && s < this.length; s++) { - var a = 0 | this.words[s]; - (o = (a += o) >>> 26), (a &= 67108863), (this.words[s] = a); - } - return 0 !== o && ((this.words[s] = o), this.length++), this; - }), - (o.prototype.isZero = function () { - return 1 === this.length && 0 === this.words[0]; - }), - (o.prototype.cmpn = function (t) { - var e, - r = t < 0; - if (0 !== this.negative && !r) return -1; - if (0 === this.negative && r) return 1; - if ((this._strip(), this.length > 1)) e = 1; - else { - r && (t = -t), i(t <= 67108863, 'Number is too big'); - var n = 0 | this.words[0]; - e = n === t ? 0 : n < t ? -1 : 1; - } - return 0 !== this.negative ? 0 | -e : e; - }), - (o.prototype.cmp = function (t) { - if (0 !== this.negative && 0 === t.negative) return -1; - if (0 === this.negative && 0 !== t.negative) return 1; - var e = this.ucmp(t); - return 0 !== this.negative ? 0 | -e : e; - }), - (o.prototype.ucmp = function (t) { - if (this.length > t.length) return 1; - if (this.length < t.length) return -1; - for (var e = 0, r = this.length - 1; r >= 0; r--) { - var i = 0 | this.words[r], - n = 0 | t.words[r]; - if (i !== n) { - i < n ? (e = -1) : i > n && (e = 1); - break; - } - } - return e; - }), - (o.prototype.gtn = function (t) { - return 1 === this.cmpn(t); - }), - (o.prototype.gt = function (t) { - return 1 === this.cmp(t); - }), - (o.prototype.gten = function (t) { - return this.cmpn(t) >= 0; - }), - (o.prototype.gte = function (t) { - return this.cmp(t) >= 0; - }), - (o.prototype.ltn = function (t) { - return -1 === this.cmpn(t); - }), - (o.prototype.lt = function (t) { - return -1 === this.cmp(t); - }), - (o.prototype.lten = function (t) { - return this.cmpn(t) <= 0; - }), - (o.prototype.lte = function (t) { - return this.cmp(t) <= 0; - }), - (o.prototype.eqn = function (t) { - return 0 === this.cmpn(t); - }), - (o.prototype.eq = function (t) { - return 0 === this.cmp(t); - }), - (o.red = function (t) { - return new A(t); - }), - (o.prototype.toRed = function (t) { - return ( - i(!this.red, 'Already a number in reduction context'), - i(0 === this.negative, 'red works only with positives'), - t.convertTo(this)._forceRed(t) - ); - }), - (o.prototype.fromRed = function () { - return i(this.red, 'fromRed works only with numbers in reduction context'), this.red.convertFrom(this); - }), - (o.prototype._forceRed = function (t) { - return (this.red = t), this; - }), - (o.prototype.forceRed = function (t) { - return i(!this.red, 'Already a number in reduction context'), this._forceRed(t); - }), - (o.prototype.redAdd = function (t) { - return i(this.red, 'redAdd works only with red numbers'), this.red.add(this, t); - }), - (o.prototype.redIAdd = function (t) { - return i(this.red, 'redIAdd works only with red numbers'), this.red.iadd(this, t); - }), - (o.prototype.redSub = function (t) { - return i(this.red, 'redSub works only with red numbers'), this.red.sub(this, t); - }), - (o.prototype.redISub = function (t) { - return i(this.red, 'redISub works only with red numbers'), this.red.isub(this, t); - }), - (o.prototype.redShl = function (t) { - return i(this.red, 'redShl works only with red numbers'), this.red.shl(this, t); - }), - (o.prototype.redMul = function (t) { - return i(this.red, 'redMul works only with red numbers'), this.red._verify2(this, t), this.red.mul(this, t); - }), - (o.prototype.redIMul = function (t) { - return i(this.red, 'redMul works only with red numbers'), this.red._verify2(this, t), this.red.imul(this, t); - }), - (o.prototype.redSqr = function () { - return i(this.red, 'redSqr works only with red numbers'), this.red._verify1(this), this.red.sqr(this); - }), - (o.prototype.redISqr = function () { - return i(this.red, 'redISqr works only with red numbers'), this.red._verify1(this), this.red.isqr(this); - }), - (o.prototype.redSqrt = function () { - return i(this.red, 'redSqrt works only with red numbers'), this.red._verify1(this), this.red.sqrt(this); - }), - (o.prototype.redInvm = function () { - return i(this.red, 'redInvm works only with red numbers'), this.red._verify1(this), this.red.invm(this); - }), - (o.prototype.redNeg = function () { - return i(this.red, 'redNeg works only with red numbers'), this.red._verify1(this), this.red.neg(this); - }), - (o.prototype.redPow = function (t) { - return i(this.red && !t.red, 'redPow(normalNum)'), this.red._verify1(this), this.red.pow(this, t); - }); - var w = { k256: null, p224: null, p192: null, p25519: null }; - function _(t, e) { - (this.name = t), - (this.p = new o(e, 16)), - (this.n = this.p.bitLength()), - (this.k = new o(1).iushln(this.n).isub(this.p)), - (this.tmp = this._tmp()); - } - function M() { - _.call(this, 'k256', 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f'); - } - function E() { - _.call(this, 'p224', 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001'); - } - function S() { - _.call(this, 'p192', 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff'); - } - function x() { - _.call(this, '25519', '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed'); - } - function A(t) { - if ('string' == typeof t) { - var e = o._prime(t); - (this.m = e.p), (this.prime = e); - } else i(t.gtn(1), 'modulus must be greater than 1'), (this.m = t), (this.prime = null); - } - function k(t) { - A.call(this, t), - (this.shift = this.m.bitLength()), - this.shift % 26 != 0 && (this.shift += 26 - (this.shift % 26)), - (this.r = new o(1).iushln(this.shift)), - (this.r2 = this.imod(this.r.sqr())), - (this.rinv = this.r._invmp(this.m)), - (this.minv = this.rinv.mul(this.r).isubn(1).div(this.m)), - (this.minv = this.minv.umod(this.r)), - (this.minv = this.r.sub(this.minv)); - } - (_.prototype._tmp = function () { - var t = new o(null); - return (t.words = new Array(Math.ceil(this.n / 13))), t; - }), - (_.prototype.ireduce = function (t) { - var e, - r = t; - do { - this.split(r, this.tmp), (e = (r = (r = this.imulK(r)).iadd(this.tmp)).bitLength()); - } while (e > this.n); - var i = e < this.n ? -1 : r.ucmp(this.p); - return 0 === i ? ((r.words[0] = 0), (r.length = 1)) : i > 0 ? r.isub(this.p) : void 0 !== r.strip ? r.strip() : r._strip(), r; - }), - (_.prototype.split = function (t, e) { - t.iushrn(this.n, 0, e); - }), - (_.prototype.imulK = function (t) { - return t.imul(this.k); - }), - n(M, _), - (M.prototype.split = function (t, e) { - for (var r = 4194303, i = Math.min(t.length, 9), n = 0; n < i; n++) e.words[n] = t.words[n]; - if (((e.length = i), t.length <= 9)) return (t.words[0] = 0), void (t.length = 1); - var o = t.words[9]; - for (e.words[e.length++] = o & r, n = 10; n < t.length; n++) { - var s = 0 | t.words[n]; - (t.words[n - 10] = ((s & r) << 4) | (o >>> 22)), (o = s); - } - (o >>>= 22), (t.words[n - 10] = o), 0 === o && t.length > 10 ? (t.length -= 10) : (t.length -= 9); - }), - (M.prototype.imulK = function (t) { - (t.words[t.length] = 0), (t.words[t.length + 1] = 0), (t.length += 2); - for (var e = 0, r = 0; r < t.length; r++) { - var i = 0 | t.words[r]; - (e += 977 * i), (t.words[r] = 67108863 & e), (e = 64 * i + ((e / 67108864) | 0)); - } - return 0 === t.words[t.length - 1] && (t.length--, 0 === t.words[t.length - 1] && t.length--), t; - }), - n(E, _), - n(S, _), - n(x, _), - (x.prototype.imulK = function (t) { - for (var e = 0, r = 0; r < t.length; r++) { - var i = 19 * (0 | t.words[r]) + e, - n = 67108863 & i; - (i >>>= 26), (t.words[r] = n), (e = i); - } - return 0 !== e && (t.words[t.length++] = e), t; - }), - (o._prime = function (t) { - if (w[t]) return w[t]; - var e; - if ('k256' === t) e = new M(); - else if ('p224' === t) e = new E(); - else if ('p192' === t) e = new S(); - else { - if ('p25519' !== t) throw new Error('Unknown prime ' + t); - e = new x(); - } - return (w[t] = e), e; - }), - (A.prototype._verify1 = function (t) { - i(0 === t.negative, 'red works only with positives'), i(t.red, 'red works only with red numbers'); - }), - (A.prototype._verify2 = function (t, e) { - i(0 == (t.negative | e.negative), 'red works only with positives'), - i(t.red && t.red === e.red, 'red works only with red numbers'); - }), - (A.prototype.imod = function (t) { - return this.prime ? this.prime.ireduce(t)._forceRed(this) : (f(t, t.umod(this.m)._forceRed(this)), t); - }), - (A.prototype.neg = function (t) { - return t.isZero() ? t.clone() : this.m.sub(t)._forceRed(this); - }), - (A.prototype.add = function (t, e) { - this._verify2(t, e); - var r = t.add(e); - return r.cmp(this.m) >= 0 && r.isub(this.m), r._forceRed(this); - }), - (A.prototype.iadd = function (t, e) { - this._verify2(t, e); - var r = t.iadd(e); - return r.cmp(this.m) >= 0 && r.isub(this.m), r; - }), - (A.prototype.sub = function (t, e) { - this._verify2(t, e); - var r = t.sub(e); - return r.cmpn(0) < 0 && r.iadd(this.m), r._forceRed(this); - }), - (A.prototype.isub = function (t, e) { - this._verify2(t, e); - var r = t.isub(e); - return r.cmpn(0) < 0 && r.iadd(this.m), r; - }), - (A.prototype.shl = function (t, e) { - return this._verify1(t), this.imod(t.ushln(e)); - }), - (A.prototype.imul = function (t, e) { - return this._verify2(t, e), this.imod(t.imul(e)); - }), - (A.prototype.mul = function (t, e) { - return this._verify2(t, e), this.imod(t.mul(e)); - }), - (A.prototype.isqr = function (t) { - return this.imul(t, t.clone()); - }), - (A.prototype.sqr = function (t) { - return this.mul(t, t); - }), - (A.prototype.sqrt = function (t) { - if (t.isZero()) return t.clone(); - var e = this.m.andln(3); - if ((i(e % 2 == 1), 3 === e)) { - var r = this.m.add(new o(1)).iushrn(2); - return this.pow(t, r); - } - for (var n = this.m.subn(1), s = 0; !n.isZero() && 0 === n.andln(1); ) s++, n.iushrn(1); - i(!n.isZero()); - var a = new o(1).toRed(this), - h = a.redNeg(), - u = this.m.subn(1).iushrn(1), - f = this.m.bitLength(); - for (f = new o(2 * f * f).toRed(this); 0 !== this.pow(f, u).cmp(h); ) f.redIAdd(h); - for (var c = this.pow(f, n), l = this.pow(t, n.addn(1).iushrn(1)), d = this.pow(t, n), p = s; 0 !== d.cmp(a); ) { - for (var m = d, g = 0; 0 !== m.cmp(a); g++) m = m.redSqr(); - i(g < p); - var b = this.pow(c, new o(1).iushln(p - g - 1)); - (l = l.redMul(b)), (c = b.redSqr()), (d = d.redMul(c)), (p = g); - } - return l; - }), - (A.prototype.invm = function (t) { - var e = t._invmp(this.m); - return 0 !== e.negative ? ((e.negative = 0), this.imod(e).redNeg()) : this.imod(e); - }), - (A.prototype.pow = function (t, e) { - if (e.isZero()) return new o(1).toRed(this); - if (0 === e.cmpn(1)) return t.clone(); - var r = new Array(16); - (r[0] = new o(1).toRed(this)), (r[1] = t); - for (var i = 2; i < r.length; i++) r[i] = this.mul(r[i - 1], t); - var n = r[0], - s = 0, - a = 0, - h = e.bitLength() % 26; - for (0 === h && (h = 26), i = e.length - 1; i >= 0; i--) { - for (var u = e.words[i], f = h - 1; f >= 0; f--) { - var c = (u >> f) & 1; - n !== r[0] && (n = this.sqr(n)), - 0 !== c || 0 !== s - ? ((s <<= 1), (s |= c), (4 == ++a || (0 === i && 0 === f)) && ((n = this.mul(n, r[s])), (a = 0), (s = 0))) - : (a = 0); - } - h = 26; - } - return n; - }), - (A.prototype.convertTo = function (t) { - var e = t.umod(this.m); - return e === t ? e.clone() : e; - }), - (A.prototype.convertFrom = function (t) { - var e = t.clone(); - return (e.red = null), e; - }), - (o.mont = function (t) { - return new k(t); - }), - n(k, A), - (k.prototype.convertTo = function (t) { - return this.imod(t.ushln(this.shift)); - }), - (k.prototype.convertFrom = function (t) { - var e = this.imod(t.mul(this.rinv)); - return (e.red = null), e; - }), - (k.prototype.imul = function (t, e) { - if (t.isZero() || e.isZero()) return (t.words[0] = 0), (t.length = 1), t; - var r = t.imul(e), - i = r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m), - n = r.isub(i).iushrn(this.shift), - o = n; - return n.cmp(this.m) >= 0 ? (o = n.isub(this.m)) : n.cmpn(0) < 0 && (o = n.iadd(this.m)), o._forceRed(this); - }), - (k.prototype.mul = function (t, e) { - if (t.isZero() || e.isZero()) return new o(0)._forceRed(this); - var r = t.mul(e), - i = r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m), - n = r.isub(i).iushrn(this.shift), - s = n; - return n.cmp(this.m) >= 0 ? (s = n.isub(this.m)) : n.cmpn(0) < 0 && (s = n.iadd(this.m)), s._forceRed(this); - }), - (k.prototype.invm = function (t) { - return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this); - }); - })((t = r.nmd(t)), this); - }, - 9154: (t, e, r) => { - var i; - function n(t) { - this.rand = t; - } - if ( - ((t.exports = function (t) { - return i || (i = new n(null)), i.generate(t); - }), - (t.exports.Rand = n), - (n.prototype.generate = function (t) { - return this._rand(t); - }), - (n.prototype._rand = function (t) { - if (this.rand.getBytes) return this.rand.getBytes(t); - for (var e = new Uint8Array(t), r = 0; r < e.length; r++) e[r] = this.rand.getByte(); - return e; - }), - 'object' == typeof self) - ) - self.crypto && self.crypto.getRandomValues - ? (n.prototype._rand = function (t) { - var e = new Uint8Array(t); - return self.crypto.getRandomValues(e), e; - }) - : self.msCrypto && self.msCrypto.getRandomValues - ? (n.prototype._rand = function (t) { - var e = new Uint8Array(t); - return self.msCrypto.getRandomValues(e), e; - }) - : 'object' == typeof window && - (n.prototype._rand = function () { - throw new Error('Not implemented yet'); - }); - else - try { - var o = r(6047); - if ('function' != typeof o.randomBytes) throw new Error('Not supported'); - n.prototype._rand = function (t) { - return o.randomBytes(t); - }; - } catch (t) {} - }, - 238: (t, e, r) => { - var i = r(7172).Buffer; - function n(t) { - i.isBuffer(t) || (t = i.from(t)); - for (var e = (t.length / 4) | 0, r = new Array(e), n = 0; n < e; n++) r[n] = t.readUInt32BE(4 * n); - return r; - } - function o(t) { - for (; 0 < t.length; t++) t[0] = 0; - } - function s(t, e, r, i, n) { - for ( - var o, - s, - a, - h, - u = r[0], - f = r[1], - c = r[2], - l = r[3], - d = t[0] ^ e[0], - p = t[1] ^ e[1], - m = t[2] ^ e[2], - g = t[3] ^ e[3], - b = 4, - y = 1; - y < n; - y++ - ) - (o = u[d >>> 24] ^ f[(p >>> 16) & 255] ^ c[(m >>> 8) & 255] ^ l[255 & g] ^ e[b++]), - (s = u[p >>> 24] ^ f[(m >>> 16) & 255] ^ c[(g >>> 8) & 255] ^ l[255 & d] ^ e[b++]), - (a = u[m >>> 24] ^ f[(g >>> 16) & 255] ^ c[(d >>> 8) & 255] ^ l[255 & p] ^ e[b++]), - (h = u[g >>> 24] ^ f[(d >>> 16) & 255] ^ c[(p >>> 8) & 255] ^ l[255 & m] ^ e[b++]), - (d = o), - (p = s), - (m = a), - (g = h); - return ( - (o = ((i[d >>> 24] << 24) | (i[(p >>> 16) & 255] << 16) | (i[(m >>> 8) & 255] << 8) | i[255 & g]) ^ e[b++]), - (s = ((i[p >>> 24] << 24) | (i[(m >>> 16) & 255] << 16) | (i[(g >>> 8) & 255] << 8) | i[255 & d]) ^ e[b++]), - (a = ((i[m >>> 24] << 24) | (i[(g >>> 16) & 255] << 16) | (i[(d >>> 8) & 255] << 8) | i[255 & p]) ^ e[b++]), - (h = ((i[g >>> 24] << 24) | (i[(d >>> 16) & 255] << 16) | (i[(p >>> 8) & 255] << 8) | i[255 & m]) ^ e[b++]), - [(o >>>= 0), (s >>>= 0), (a >>>= 0), (h >>>= 0)] - ); - } - var a = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54], - h = (function () { - for (var t = new Array(256), e = 0; e < 256; e++) t[e] = e < 128 ? e << 1 : (e << 1) ^ 283; - for (var r = [], i = [], n = [[], [], [], []], o = [[], [], [], []], s = 0, a = 0, h = 0; h < 256; ++h) { - var u = a ^ (a << 1) ^ (a << 2) ^ (a << 3) ^ (a << 4); - (u = (u >>> 8) ^ (255 & u) ^ 99), (r[s] = u), (i[u] = s); - var f = t[s], - c = t[f], - l = t[c], - d = (257 * t[u]) ^ (16843008 * u); - (n[0][s] = (d << 24) | (d >>> 8)), - (n[1][s] = (d << 16) | (d >>> 16)), - (n[2][s] = (d << 8) | (d >>> 24)), - (n[3][s] = d), - (d = (16843009 * l) ^ (65537 * c) ^ (257 * f) ^ (16843008 * s)), - (o[0][u] = (d << 24) | (d >>> 8)), - (o[1][u] = (d << 16) | (d >>> 16)), - (o[2][u] = (d << 8) | (d >>> 24)), - (o[3][u] = d), - 0 === s ? (s = a = 1) : ((s = f ^ t[t[t[l ^ f]]]), (a ^= t[t[a]])); - } - return { SBOX: r, INV_SBOX: i, SUB_MIX: n, INV_SUB_MIX: o }; - })(); - function u(t) { - (this._key = n(t)), this._reset(); - } - (u.blockSize = 16), - (u.keySize = 32), - (u.prototype.blockSize = u.blockSize), - (u.prototype.keySize = u.keySize), - (u.prototype._reset = function () { - for (var t = this._key, e = t.length, r = e + 6, i = 4 * (r + 1), n = [], o = 0; o < e; o++) n[o] = t[o]; - for (o = e; o < i; o++) { - var s = n[o - 1]; - o % e == 0 - ? ((s = (s << 8) | (s >>> 24)), - (s = (h.SBOX[s >>> 24] << 24) | (h.SBOX[(s >>> 16) & 255] << 16) | (h.SBOX[(s >>> 8) & 255] << 8) | h.SBOX[255 & s]), - (s ^= a[(o / e) | 0] << 24)) - : e > 6 && - o % e == 4 && - (s = (h.SBOX[s >>> 24] << 24) | (h.SBOX[(s >>> 16) & 255] << 16) | (h.SBOX[(s >>> 8) & 255] << 8) | h.SBOX[255 & s]), - (n[o] = n[o - e] ^ s); - } - for (var u = [], f = 0; f < i; f++) { - var c = i - f, - l = n[c - (f % 4 ? 0 : 4)]; - u[f] = - f < 4 || c <= 4 - ? l - : h.INV_SUB_MIX[0][h.SBOX[l >>> 24]] ^ - h.INV_SUB_MIX[1][h.SBOX[(l >>> 16) & 255]] ^ - h.INV_SUB_MIX[2][h.SBOX[(l >>> 8) & 255]] ^ - h.INV_SUB_MIX[3][h.SBOX[255 & l]]; - } - (this._nRounds = r), (this._keySchedule = n), (this._invKeySchedule = u); - }), - (u.prototype.encryptBlockRaw = function (t) { - return s((t = n(t)), this._keySchedule, h.SUB_MIX, h.SBOX, this._nRounds); - }), - (u.prototype.encryptBlock = function (t) { - var e = this.encryptBlockRaw(t), - r = i.allocUnsafe(16); - return r.writeUInt32BE(e[0], 0), r.writeUInt32BE(e[1], 4), r.writeUInt32BE(e[2], 8), r.writeUInt32BE(e[3], 12), r; - }), - (u.prototype.decryptBlock = function (t) { - var e = (t = n(t))[1]; - (t[1] = t[3]), (t[3] = e); - var r = s(t, this._invKeySchedule, h.INV_SUB_MIX, h.INV_SBOX, this._nRounds), - o = i.allocUnsafe(16); - return o.writeUInt32BE(r[0], 0), o.writeUInt32BE(r[3], 4), o.writeUInt32BE(r[2], 8), o.writeUInt32BE(r[1], 12), o; - }), - (u.prototype.scrub = function () { - o(this._keySchedule), o(this._invKeySchedule), o(this._key); - }), - (t.exports.AES = u); - }, - 8587: (t, e, r) => { - var i = r(238), - n = r(7172).Buffer, - o = r(3081), - s = r(87), - a = r(1219), - h = r(7752), - u = r(3480); - function f(t, e, r, s) { - o.call(this); - var h = n.alloc(4, 0); - this._cipher = new i.AES(e); - var f = this._cipher.encryptBlock(h); - (this._ghash = new a(f)), - (r = (function (t, e, r) { - if (12 === e.length) return (t._finID = n.concat([e, n.from([0, 0, 0, 1])])), n.concat([e, n.from([0, 0, 0, 2])]); - var i = new a(r), - o = e.length, - s = o % 16; - i.update(e), s && ((s = 16 - s), i.update(n.alloc(s, 0))), i.update(n.alloc(8, 0)); - var h = 8 * o, - f = n.alloc(8); - f.writeUIntBE(h, 0, 8), i.update(f), (t._finID = i.state); - var c = n.from(t._finID); - return u(c), c; - })(this, r, f)), - (this._prev = n.from(r)), - (this._cache = n.allocUnsafe(0)), - (this._secCache = n.allocUnsafe(0)), - (this._decrypt = s), - (this._alen = 0), - (this._len = 0), - (this._mode = t), - (this._authTag = null), - (this._called = !1); - } - s(f, o), - (f.prototype._update = function (t) { - if (!this._called && this._alen) { - var e = 16 - (this._alen % 16); - e < 16 && ((e = n.alloc(e, 0)), this._ghash.update(e)); - } - this._called = !0; - var r = this._mode.encrypt(this, t); - return this._decrypt ? this._ghash.update(t) : this._ghash.update(r), (this._len += t.length), r; - }), - (f.prototype._final = function () { - if (this._decrypt && !this._authTag) throw new Error('Unsupported state or unable to authenticate data'); - var t = h(this._ghash.final(8 * this._alen, 8 * this._len), this._cipher.encryptBlock(this._finID)); - if ( - this._decrypt && - (function (t, e) { - var r = 0; - t.length !== e.length && r++; - for (var i = Math.min(t.length, e.length), n = 0; n < i; ++n) r += t[n] ^ e[n]; - return r; - })(t, this._authTag) - ) - throw new Error('Unsupported state or unable to authenticate data'); - (this._authTag = t), this._cipher.scrub(); - }), - (f.prototype.getAuthTag = function () { - if (this._decrypt || !n.isBuffer(this._authTag)) throw new Error('Attempting to get auth tag in unsupported state'); - return this._authTag; - }), - (f.prototype.setAuthTag = function (t) { - if (!this._decrypt) throw new Error('Attempting to set auth tag in unsupported state'); - this._authTag = t; - }), - (f.prototype.setAAD = function (t) { - if (this._called) throw new Error('Attempting to set AAD in unsupported state'); - this._ghash.update(t), (this._alen += t.length); - }), - (t.exports = f); - }, - 8901: (t, e, r) => { - var i = r(3615), - n = r(2576), - o = r(4636); - (e.createCipher = e.Cipher = i.createCipher), - (e.createCipheriv = e.Cipheriv = i.createCipheriv), - (e.createDecipher = e.Decipher = n.createDecipher), - (e.createDecipheriv = e.Decipheriv = n.createDecipheriv), - (e.listCiphers = e.getCiphers = - function () { - return Object.keys(o); - }); - }, - 2576: (t, e, r) => { - var i = r(8587), - n = r(7172).Buffer, - o = r(3834), - s = r(2385), - a = r(3081), - h = r(238), - u = r(5883); - function f(t, e, r) { - a.call(this), - (this._cache = new c()), - (this._last = void 0), - (this._cipher = new h.AES(e)), - (this._prev = n.from(r)), - (this._mode = t), - (this._autopadding = !0); - } - function c() { - this.cache = n.allocUnsafe(0); - } - function l(t, e, r) { - var a = o[t.toLowerCase()]; - if (!a) throw new TypeError('invalid suite type'); - if (('string' == typeof r && (r = n.from(r)), 'GCM' !== a.mode && r.length !== a.iv)) - throw new TypeError('invalid iv length ' + r.length); - if (('string' == typeof e && (e = n.from(e)), e.length !== a.key / 8)) throw new TypeError('invalid key length ' + e.length); - return 'stream' === a.type ? new s(a.module, e, r, !0) : 'auth' === a.type ? new i(a.module, e, r, !0) : new f(a.module, e, r); - } - r(87)(f, a), - (f.prototype._update = function (t) { - var e, r; - this._cache.add(t); - for (var i = []; (e = this._cache.get(this._autopadding)); ) (r = this._mode.decrypt(this, e)), i.push(r); - return n.concat(i); - }), - (f.prototype._final = function () { - var t = this._cache.flush(); - if (this._autopadding) - return (function (t) { - var e = t[15]; - if (e < 1 || e > 16) throw new Error('unable to decrypt data'); - for (var r = -1; ++r < e; ) if (t[r + (16 - e)] !== e) throw new Error('unable to decrypt data'); - if (16 !== e) return t.slice(0, 16 - e); - })(this._mode.decrypt(this, t)); - if (t) throw new Error('data not multiple of block length'); - }), - (f.prototype.setAutoPadding = function (t) { - return (this._autopadding = !!t), this; - }), - (c.prototype.add = function (t) { - this.cache = n.concat([this.cache, t]); - }), - (c.prototype.get = function (t) { - var e; - if (t) { - if (this.cache.length > 16) return (e = this.cache.slice(0, 16)), (this.cache = this.cache.slice(16)), e; - } else if (this.cache.length >= 16) return (e = this.cache.slice(0, 16)), (this.cache = this.cache.slice(16)), e; - return null; - }), - (c.prototype.flush = function () { - if (this.cache.length) return this.cache; - }), - (e.createDecipher = function (t, e) { - var r = o[t.toLowerCase()]; - if (!r) throw new TypeError('invalid suite type'); - var i = u(e, !1, r.key, r.iv); - return l(t, i.key, i.iv); - }), - (e.createDecipheriv = l); - }, - 3615: (t, e, r) => { - var i = r(3834), - n = r(8587), - o = r(7172).Buffer, - s = r(2385), - a = r(3081), - h = r(238), - u = r(5883); - function f(t, e, r) { - a.call(this), - (this._cache = new l()), - (this._cipher = new h.AES(e)), - (this._prev = o.from(r)), - (this._mode = t), - (this._autopadding = !0); - } - r(87)(f, a), - (f.prototype._update = function (t) { - var e, r; - this._cache.add(t); - for (var i = []; (e = this._cache.get()); ) (r = this._mode.encrypt(this, e)), i.push(r); - return o.concat(i); - }); - var c = o.alloc(16, 16); - function l() { - this.cache = o.allocUnsafe(0); - } - function d(t, e, r) { - var a = i[t.toLowerCase()]; - if (!a) throw new TypeError('invalid suite type'); - if (('string' == typeof e && (e = o.from(e)), e.length !== a.key / 8)) throw new TypeError('invalid key length ' + e.length); - if (('string' == typeof r && (r = o.from(r)), 'GCM' !== a.mode && r.length !== a.iv)) - throw new TypeError('invalid iv length ' + r.length); - return 'stream' === a.type ? new s(a.module, e, r) : 'auth' === a.type ? new n(a.module, e, r) : new f(a.module, e, r); - } - (f.prototype._final = function () { - var t = this._cache.flush(); - if (this._autopadding) return (t = this._mode.encrypt(this, t)), this._cipher.scrub(), t; - if (!t.equals(c)) throw (this._cipher.scrub(), new Error('data not multiple of block length')); - }), - (f.prototype.setAutoPadding = function (t) { - return (this._autopadding = !!t), this; - }), - (l.prototype.add = function (t) { - this.cache = o.concat([this.cache, t]); - }), - (l.prototype.get = function () { - if (this.cache.length > 15) { - var t = this.cache.slice(0, 16); - return (this.cache = this.cache.slice(16)), t; - } - return null; - }), - (l.prototype.flush = function () { - for (var t = 16 - this.cache.length, e = o.allocUnsafe(t), r = -1; ++r < t; ) e.writeUInt8(t, r); - return o.concat([this.cache, e]); - }), - (e.createCipheriv = d), - (e.createCipher = function (t, e) { - var r = i[t.toLowerCase()]; - if (!r) throw new TypeError('invalid suite type'); - var n = u(e, !1, r.key, r.iv); - return d(t, n.key, n.iv); - }); - }, - 1219: (t, e, r) => { - var i = r(7172).Buffer, - n = i.alloc(16, 0); - function o(t) { - var e = i.allocUnsafe(16); - return ( - e.writeUInt32BE(t[0] >>> 0, 0), - e.writeUInt32BE(t[1] >>> 0, 4), - e.writeUInt32BE(t[2] >>> 0, 8), - e.writeUInt32BE(t[3] >>> 0, 12), - e - ); - } - function s(t) { - (this.h = t), (this.state = i.alloc(16, 0)), (this.cache = i.allocUnsafe(0)); - } - (s.prototype.ghash = function (t) { - for (var e = -1; ++e < t.length; ) this.state[e] ^= t[e]; - this._multiply(); - }), - (s.prototype._multiply = function () { - for ( - var t, - e, - r, - i = [(t = this.h).readUInt32BE(0), t.readUInt32BE(4), t.readUInt32BE(8), t.readUInt32BE(12)], - n = [0, 0, 0, 0], - s = -1; - ++s < 128; - - ) { - for ( - 0 != (this.state[~~(s / 8)] & (1 << (7 - (s % 8)))) && ((n[0] ^= i[0]), (n[1] ^= i[1]), (n[2] ^= i[2]), (n[3] ^= i[3])), - r = 0 != (1 & i[3]), - e = 3; - e > 0; - e-- - ) - i[e] = (i[e] >>> 1) | ((1 & i[e - 1]) << 31); - (i[0] = i[0] >>> 1), r && (i[0] = i[0] ^ (225 << 24)); - } - this.state = o(n); - }), - (s.prototype.update = function (t) { - var e; - for (this.cache = i.concat([this.cache, t]); this.cache.length >= 16; ) - (e = this.cache.slice(0, 16)), (this.cache = this.cache.slice(16)), this.ghash(e); - }), - (s.prototype.final = function (t, e) { - return this.cache.length && this.ghash(i.concat([this.cache, n], 16)), this.ghash(o([0, t, 0, e])), this.state; - }), - (t.exports = s); - }, - 3480: t => { - t.exports = function (t) { - for (var e, r = t.length; r--; ) { - if (255 !== (e = t.readUInt8(r))) { - e++, t.writeUInt8(e, r); - break; - } - t.writeUInt8(0, r); - } - }; - }, - 6280: (t, e, r) => { - var i = r(7752); - (e.encrypt = function (t, e) { - var r = i(e, t._prev); - return (t._prev = t._cipher.encryptBlock(r)), t._prev; - }), - (e.decrypt = function (t, e) { - var r = t._prev; - t._prev = e; - var n = t._cipher.decryptBlock(e); - return i(n, r); - }); - }, - 392: (t, e, r) => { - var i = r(7172).Buffer, - n = r(7752); - function o(t, e, r) { - var o = e.length, - s = n(e, t._cache); - return (t._cache = t._cache.slice(o)), (t._prev = i.concat([t._prev, r ? e : s])), s; - } - e.encrypt = function (t, e, r) { - for (var n, s = i.allocUnsafe(0); e.length; ) { - if ( - (0 === t._cache.length && ((t._cache = t._cipher.encryptBlock(t._prev)), (t._prev = i.allocUnsafe(0))), - !(t._cache.length <= e.length)) - ) { - s = i.concat([s, o(t, e, r)]); - break; - } - (n = t._cache.length), (s = i.concat([s, o(t, e.slice(0, n), r)])), (e = e.slice(n)); - } - return s; - }; - }, - 5739: (t, e, r) => { - var i = r(7172).Buffer; - function n(t, e, r) { - for (var i, n, s = -1, a = 0; ++s < 8; ) - (i = e & (1 << (7 - s)) ? 128 : 0), - (a += (128 & (n = t._cipher.encryptBlock(t._prev)[0] ^ i)) >> s % 8), - (t._prev = o(t._prev, r ? i : n)); - return a; - } - function o(t, e) { - var r = t.length, - n = -1, - o = i.allocUnsafe(t.length); - for (t = i.concat([t, i.from([e])]); ++n < r; ) o[n] = (t[n] << 1) | (t[n + 1] >> 7); - return o; - } - e.encrypt = function (t, e, r) { - for (var o = e.length, s = i.allocUnsafe(o), a = -1; ++a < o; ) s[a] = n(t, e[a], r); - return s; - }; - }, - 2228: (t, e, r) => { - var i = r(7172).Buffer; - function n(t, e, r) { - var n = t._cipher.encryptBlock(t._prev)[0] ^ e; - return (t._prev = i.concat([t._prev.slice(1), i.from([r ? e : n])])), n; - } - e.encrypt = function (t, e, r) { - for (var o = e.length, s = i.allocUnsafe(o), a = -1; ++a < o; ) s[a] = n(t, e[a], r); - return s; - }; - }, - 2751: (t, e, r) => { - var i = r(7752), - n = r(7172).Buffer, - o = r(3480); - function s(t) { - var e = t._cipher.encryptBlockRaw(t._prev); - return o(t._prev), e; - } - e.encrypt = function (t, e) { - var r = Math.ceil(e.length / 16), - o = t._cache.length; - t._cache = n.concat([t._cache, n.allocUnsafe(16 * r)]); - for (var a = 0; a < r; a++) { - var h = s(t), - u = o + 16 * a; - t._cache.writeUInt32BE(h[0], u + 0), - t._cache.writeUInt32BE(h[1], u + 4), - t._cache.writeUInt32BE(h[2], u + 8), - t._cache.writeUInt32BE(h[3], u + 12); - } - var f = t._cache.slice(0, e.length); - return (t._cache = t._cache.slice(e.length)), i(e, f); - }; - }, - 2437: (t, e) => { - (e.encrypt = function (t, e) { - return t._cipher.encryptBlock(e); - }), - (e.decrypt = function (t, e) { - return t._cipher.decryptBlock(e); - }); - }, - 3834: (t, e, r) => { - var i = { ECB: r(2437), CBC: r(6280), CFB: r(392), CFB8: r(2228), CFB1: r(5739), OFB: r(8494), CTR: r(2751), GCM: r(2751) }, - n = r(4636); - for (var o in n) n[o].module = i[n[o].mode]; - t.exports = n; - }, - 8494: (t, e, r) => { - var i = r(7752); - function n(t) { - return (t._prev = t._cipher.encryptBlock(t._prev)), t._prev; - } - e.encrypt = function (t, e) { - for (; t._cache.length < e.length; ) t._cache = Buffer.concat([t._cache, n(t)]); - var r = t._cache.slice(0, e.length); - return (t._cache = t._cache.slice(e.length)), i(e, r); - }; - }, - 2385: (t, e, r) => { - var i = r(238), - n = r(7172).Buffer, - o = r(3081); - function s(t, e, r, s) { - o.call(this), - (this._cipher = new i.AES(e)), - (this._prev = n.from(r)), - (this._cache = n.allocUnsafe(0)), - (this._secCache = n.allocUnsafe(0)), - (this._decrypt = s), - (this._mode = t); - } - r(87)(s, o), - (s.prototype._update = function (t) { - return this._mode.encrypt(this, t, this._decrypt); - }), - (s.prototype._final = function () { - this._cipher.scrub(); - }), - (t.exports = s); - }, - 1240: (t, e, r) => { - var i = r(5681), - n = r(8901), - o = r(3834), - s = r(1035), - a = r(5883); - function h(t, e, r) { - if (((t = t.toLowerCase()), o[t])) return n.createCipheriv(t, e, r); - if (s[t]) return new i({ key: e, iv: r, mode: t }); - throw new TypeError('invalid suite type'); - } - function u(t, e, r) { - if (((t = t.toLowerCase()), o[t])) return n.createDecipheriv(t, e, r); - if (s[t]) return new i({ key: e, iv: r, mode: t, decrypt: !0 }); - throw new TypeError('invalid suite type'); - } - (e.createCipher = e.Cipher = - function (t, e) { - var r, i; - if (((t = t.toLowerCase()), o[t])) (r = o[t].key), (i = o[t].iv); - else { - if (!s[t]) throw new TypeError('invalid suite type'); - (r = 8 * s[t].key), (i = s[t].iv); - } - var n = a(e, !1, r, i); - return h(t, n.key, n.iv); - }), - (e.createCipheriv = e.Cipheriv = h), - (e.createDecipher = e.Decipher = - function (t, e) { - var r, i; - if (((t = t.toLowerCase()), o[t])) (r = o[t].key), (i = o[t].iv); - else { - if (!s[t]) throw new TypeError('invalid suite type'); - (r = 8 * s[t].key), (i = s[t].iv); - } - var n = a(e, !1, r, i); - return u(t, n.key, n.iv); - }), - (e.createDecipheriv = e.Decipheriv = u), - (e.listCiphers = e.getCiphers = - function () { - return Object.keys(s).concat(n.getCiphers()); - }); - }, - 5681: (t, e, r) => { - var i = r(3081), - n = r(7191), - o = r(87), - s = r(7172).Buffer, - a = { - 'des-ede3-cbc': n.CBC.instantiate(n.EDE), - 'des-ede3': n.EDE, - 'des-ede-cbc': n.CBC.instantiate(n.EDE), - 'des-ede': n.EDE, - 'des-cbc': n.CBC.instantiate(n.DES), - 'des-ecb': n.DES, - }; - function h(t) { - i.call(this); - var e, - r = t.mode.toLowerCase(), - n = a[r]; - e = t.decrypt ? 'decrypt' : 'encrypt'; - var o = t.key; - s.isBuffer(o) || (o = s.from(o)), ('des-ede' !== r && 'des-ede-cbc' !== r) || (o = s.concat([o, o.slice(0, 8)])); - var h = t.iv; - s.isBuffer(h) || (h = s.from(h)), (this._des = n.create({ key: o, iv: h, type: e })); - } - (a.des = a['des-cbc']), - (a.des3 = a['des-ede3-cbc']), - (t.exports = h), - o(h, i), - (h.prototype._update = function (t) { - return s.from(this._des.update(t)); - }), - (h.prototype._final = function () { - return s.from(this._des.final()); - }); - }, - 1035: (t, e) => { - (e['des-ecb'] = { key: 8, iv: 0 }), - (e['des-cbc'] = e.des = { key: 8, iv: 8 }), - (e['des-ede3-cbc'] = e.des3 = { key: 24, iv: 8 }), - (e['des-ede3'] = { key: 24, iv: 0 }), - (e['des-ede-cbc'] = { key: 16, iv: 8 }), - (e['des-ede'] = { key: 16, iv: 0 }); - }, - 7354: (t, e, r) => { - var i = r(3785), - n = r(4198); - function o(t) { - var e, - r = t.modulus.byteLength(); - do { - e = new i(n(r)); - } while (e.cmp(t.modulus) >= 0 || !e.umod(t.prime1) || !e.umod(t.prime2)); - return e; - } - function s(t, e) { - var r = (function (t) { - var e = o(t); - return { blinder: e.toRed(i.mont(t.modulus)).redPow(new i(t.publicExponent)).fromRed(), unblinder: e.invm(t.modulus) }; - })(e), - n = e.modulus.byteLength(), - s = new i(t).mul(r.blinder).umod(e.modulus), - a = s.toRed(i.mont(e.prime1)), - h = s.toRed(i.mont(e.prime2)), - u = e.coefficient, - f = e.prime1, - c = e.prime2, - l = a.redPow(e.exponent1).fromRed(), - d = h.redPow(e.exponent2).fromRed(), - p = l.isub(d).imul(u).umod(f).imul(c); - return d.iadd(p).imul(r.unblinder).umod(e.modulus).toArrayLike(Buffer, 'be', n); - } - (s.getr = o), (t.exports = s); - }, - 4905: (t, e, r) => { - t.exports = r(7536); - }, - 7545: (t, e, r) => { - var i = r(7172).Buffer, - n = r(7266), - o = r(9649), - s = r(87), - a = r(1528), - h = r(1566), - u = r(7536); - function f(t) { - o.Writable.call(this); - var e = u[t]; - if (!e) throw new Error('Unknown message digest'); - (this._hashType = e.hash), (this._hash = n(e.hash)), (this._tag = e.id), (this._signType = e.sign); - } - function c(t) { - o.Writable.call(this); - var e = u[t]; - if (!e) throw new Error('Unknown message digest'); - (this._hash = n(e.hash)), (this._tag = e.id), (this._signType = e.sign); - } - function l(t) { - return new f(t); - } - function d(t) { - return new c(t); - } - Object.keys(u).forEach(function (t) { - (u[t].id = i.from(u[t].id, 'hex')), (u[t.toLowerCase()] = u[t]); - }), - s(f, o.Writable), - (f.prototype._write = function (t, e, r) { - this._hash.update(t), r(); - }), - (f.prototype.update = function (t, e) { - return 'string' == typeof t && (t = i.from(t, e)), this._hash.update(t), this; - }), - (f.prototype.sign = function (t, e) { - this.end(); - var r = this._hash.digest(), - i = a(r, t, this._hashType, this._signType, this._tag); - return e ? i.toString(e) : i; - }), - s(c, o.Writable), - (c.prototype._write = function (t, e, r) { - this._hash.update(t), r(); - }), - (c.prototype.update = function (t, e) { - return 'string' == typeof t && (t = i.from(t, e)), this._hash.update(t), this; - }), - (c.prototype.verify = function (t, e, r) { - 'string' == typeof e && (e = i.from(e, r)), this.end(); - var n = this._hash.digest(); - return h(e, n, t, this._signType, this._tag); - }), - (t.exports = { Sign: l, Verify: d, createSign: l, createVerify: d }); - }, - 1528: (t, e, r) => { - var i = r(7172).Buffer, - n = r(2873), - o = r(7354), - s = r(9749).ec, - a = r(3785), - h = r(1463), - u = r(7330); - function f(t, e, r, o) { - if ((t = i.from(t.toArray())).length < e.byteLength()) { - var s = i.alloc(e.byteLength() - t.length); - t = i.concat([s, t]); - } - var a = r.length, - h = (function (t, e) { - t = (t = c(t, e)).mod(e); - var r = i.from(t.toArray()); - if (r.length < e.byteLength()) { - var n = i.alloc(e.byteLength() - r.length); - r = i.concat([n, r]); - } - return r; - })(r, e), - u = i.alloc(a); - u.fill(1); - var f = i.alloc(a); - return ( - (f = n(o, f) - .update(u) - .update(i.from([0])) - .update(t) - .update(h) - .digest()), - (u = n(o, f).update(u).digest()), - { - k: (f = n(o, f) - .update(u) - .update(i.from([1])) - .update(t) - .update(h) - .digest()), - v: (u = n(o, f).update(u).digest()), - } - ); - } - function c(t, e) { - var r = new a(t), - i = (t.length << 3) - e.bitLength(); - return i > 0 && r.ishrn(i), r; - } - function l(t, e, r) { - var o, s; - do { - for (o = i.alloc(0); 8 * o.length < t.bitLength(); ) (e.v = n(r, e.k).update(e.v).digest()), (o = i.concat([o, e.v])); - (s = c(o, t)), - (e.k = n(r, e.k) - .update(e.v) - .update(i.from([0])) - .digest()), - (e.v = n(r, e.k).update(e.v).digest()); - } while (-1 !== s.cmp(t)); - return s; - } - function d(t, e, r, i) { - return t.toRed(a.mont(r)).redPow(e).fromRed().mod(i); - } - (t.exports = function (t, e, r, n, p) { - var m = h(e); - if (m.curve) { - if ('ecdsa' !== n && 'ecdsa/rsa' !== n) throw new Error('wrong private key type'); - return (function (t, e) { - var r = u[e.curve.join('.')]; - if (!r) throw new Error('unknown curve ' + e.curve.join('.')); - var n = new s(r).keyFromPrivate(e.privateKey).sign(t); - return i.from(n.toDER()); - })(t, m); - } - if ('dsa' === m.type) { - if ('dsa' !== n) throw new Error('wrong private key type'); - return (function (t, e, r) { - for ( - var n, - o = e.params.priv_key, - s = e.params.p, - h = e.params.q, - u = e.params.g, - p = new a(0), - m = c(t, h).mod(h), - g = !1, - b = f(o, h, t, r); - !1 === g; - - ) - (p = d(u, (n = l(h, b, r)), s, h)), - 0 === - (g = n - .invm(h) - .imul(m.add(o.mul(p))) - .mod(h)).cmpn(0) && ((g = !1), (p = new a(0))); - return (function (t, e) { - (t = t.toArray()), (e = e.toArray()), 128 & t[0] && (t = [0].concat(t)), 128 & e[0] && (e = [0].concat(e)); - var r = [48, t.length + e.length + 4, 2, t.length]; - return (r = r.concat(t, [2, e.length], e)), i.from(r); - })(p, g); - })(t, m, r); - } - if ('rsa' !== n && 'ecdsa/rsa' !== n) throw new Error('wrong private key type'); - t = i.concat([p, t]); - for (var g = m.modulus.byteLength(), b = [0, 1]; t.length + b.length + 1 < g; ) b.push(255); - b.push(0); - for (var y = -1; ++y < t.length; ) b.push(t[y]); - return o(b, m); - }), - (t.exports.getKey = f), - (t.exports.makeKey = l); - }, - 1566: (t, e, r) => { - var i = r(7172).Buffer, - n = r(3785), - o = r(9749).ec, - s = r(1463), - a = r(7330); - function h(t, e) { - if (t.cmpn(0) <= 0) throw new Error('invalid sig'); - if (t.cmp(e) >= e) throw new Error('invalid sig'); - } - t.exports = function (t, e, r, u, f) { - var c = s(r); - if ('ec' === c.type) { - if ('ecdsa' !== u && 'ecdsa/rsa' !== u) throw new Error('wrong public key type'); - return (function (t, e, r) { - var i = a[r.data.algorithm.curve.join('.')]; - if (!i) throw new Error('unknown curve ' + r.data.algorithm.curve.join('.')); - var n = new o(i), - s = r.data.subjectPrivateKey.data; - return n.verify(e, t, s); - })(t, e, c); - } - if ('dsa' === c.type) { - if ('dsa' !== u) throw new Error('wrong public key type'); - return (function (t, e, r) { - var i = r.data.p, - o = r.data.q, - a = r.data.g, - u = r.data.pub_key, - f = s.signature.decode(t, 'der'), - c = f.s, - l = f.r; - h(c, o), h(l, o); - var d = n.mont(i), - p = c.invm(o); - return ( - 0 === - a - .toRed(d) - .redPow(new n(e).mul(p).mod(o)) - .fromRed() - .mul(u.toRed(d).redPow(l.mul(p).mod(o)).fromRed()) - .mod(i) - .mod(o) - .cmp(l) - ); - })(t, e, c); - } - if ('rsa' !== u && 'ecdsa/rsa' !== u) throw new Error('wrong public key type'); - e = i.concat([f, e]); - for (var l = c.modulus.byteLength(), d = [1], p = 0; e.length + d.length + 2 < l; ) d.push(255), p++; - d.push(0); - for (var m = -1; ++m < e.length; ) d.push(e[m]); - d = i.from(d); - var g = n.mont(c.modulus); - (t = (t = new n(t).toRed(g)).redPow(new n(c.publicExponent))), (t = i.from(t.fromRed().toArray())); - var b = p < 8 ? 1 : 0; - for (l = Math.min(t.length, d.length), t.length !== d.length && (b = 1), m = -1; ++m < l; ) b |= t[m] ^ d[m]; - return 0 === b; - }; - }, - 6244: t => { - 'use strict'; - var e = {}; - function r(t, r, i) { - i || (i = Error); - var n = (function (t) { - var e, i; - function n(e, i, n) { - return ( - t.call( - this, - (function (t, e, i) { - return 'string' == typeof r ? r : r(t, e, i); - })(e, i, n) - ) || this - ); - } - return (i = t), ((e = n).prototype = Object.create(i.prototype)), (e.prototype.constructor = e), (e.__proto__ = i), n; - })(i); - (n.prototype.name = i.name), (n.prototype.code = t), (e[t] = n); - } - function i(t, e) { - if (Array.isArray(t)) { - var r = t.length; - return ( - (t = t.map(function (t) { - return String(t); - })), - r > 2 - ? 'one of '.concat(e, ' ').concat(t.slice(0, r - 1).join(', '), ', or ') + t[r - 1] - : 2 === r - ? 'one of '.concat(e, ' ').concat(t[0], ' or ').concat(t[1]) - : 'of '.concat(e, ' ').concat(t[0]) - ); - } - return 'of '.concat(e, ' ').concat(String(t)); - } - r( - 'ERR_INVALID_OPT_VALUE', - function (t, e) { - return 'The value "' + e + '" is invalid for option "' + t + '"'; - }, - TypeError - ), - r( - 'ERR_INVALID_ARG_TYPE', - function (t, e, r) { - var n, o, s, a, h; - if ( - ('string' == typeof e && ((o = 'not '), e.substr(0, 4) === o) - ? ((n = 'must not be'), (e = e.replace(/^not /, ''))) - : (n = 'must be'), - (function (t, e, r) { - return (void 0 === r || r > t.length) && (r = t.length), t.substring(r - 9, r) === e; - })(t, ' argument')) - ) - s = 'The '.concat(t, ' ').concat(n, ' ').concat(i(e, 'type')); - else { - var u = ('number' != typeof h && (h = 0), h + 1 > (a = t).length || -1 === a.indexOf('.', h) ? 'argument' : 'property'); - s = 'The "'.concat(t, '" ').concat(u, ' ').concat(n, ' ').concat(i(e, 'type')); - } - return s + '. Received type '.concat(typeof r); - }, - TypeError - ), - r('ERR_STREAM_PUSH_AFTER_EOF', 'stream.push() after EOF'), - r('ERR_METHOD_NOT_IMPLEMENTED', function (t) { - return 'The ' + t + ' method is not implemented'; - }), - r('ERR_STREAM_PREMATURE_CLOSE', 'Premature close'), - r('ERR_STREAM_DESTROYED', function (t) { - return 'Cannot call ' + t + ' after a stream was destroyed'; - }), - r('ERR_MULTIPLE_CALLBACK', 'Callback called multiple times'), - r('ERR_STREAM_CANNOT_PIPE', 'Cannot pipe, not readable'), - r('ERR_STREAM_WRITE_AFTER_END', 'write after end'), - r('ERR_STREAM_NULL_VALUES', 'May not write null values to stream', TypeError), - r( - 'ERR_UNKNOWN_ENCODING', - function (t) { - return 'Unknown encoding: ' + t; - }, - TypeError - ), - r('ERR_STREAM_UNSHIFT_AFTER_END_EVENT', 'stream.unshift() after end event'), - (t.exports.q = e); - }, - 1278: (t, e, r) => { - 'use strict'; - var i = - Object.keys || - function (t) { - var e = []; - for (var r in t) e.push(r); - return e; - }; - t.exports = u; - var n = r(4581), - o = r(3); - r(87)(u, n); - for (var s = i(o.prototype), a = 0; a < s.length; a++) { - var h = s[a]; - u.prototype[h] || (u.prototype[h] = o.prototype[h]); - } - function u(t) { - if (!(this instanceof u)) return new u(t); - n.call(this, t), - o.call(this, t), - (this.allowHalfOpen = !0), - t && - (!1 === t.readable && (this.readable = !1), - !1 === t.writable && (this.writable = !1), - !1 === t.allowHalfOpen && ((this.allowHalfOpen = !1), this.once('end', f))); - } - function f() { - this._writableState.ended || process.nextTick(c, this); - } - function c(t) { - t.end(); - } - Object.defineProperty(u.prototype, 'writableHighWaterMark', { - enumerable: !1, - get: function () { - return this._writableState.highWaterMark; - }, - }), - Object.defineProperty(u.prototype, 'writableBuffer', { - enumerable: !1, - get: function () { - return this._writableState && this._writableState.getBuffer(); - }, - }), - Object.defineProperty(u.prototype, 'writableLength', { - enumerable: !1, - get: function () { - return this._writableState.length; - }, - }), - Object.defineProperty(u.prototype, 'destroyed', { - enumerable: !1, - get: function () { - return ( - void 0 !== this._readableState && - void 0 !== this._writableState && - this._readableState.destroyed && - this._writableState.destroyed - ); - }, - set: function (t) { - void 0 !== this._readableState && - void 0 !== this._writableState && - ((this._readableState.destroyed = t), (this._writableState.destroyed = t)); - }, - }); - }, - 8825: (t, e, r) => { - 'use strict'; - t.exports = n; - var i = r(8133); - function n(t) { - if (!(this instanceof n)) return new n(t); - i.call(this, t); - } - r(87)(n, i), - (n.prototype._transform = function (t, e, r) { - r(null, t); - }); - }, - 4581: (t, e, r) => { - 'use strict'; - var i; - (t.exports = S), (S.ReadableState = E), r(343).EventEmitter; - var n, - o = function (t, e) { - return t.listeners(e).length; - }, - s = r(6284), - a = r(816).Buffer, - h = r.g.Uint8Array || function () {}, - u = r(7021); - n = u && u.debuglog ? u.debuglog('stream') : function () {}; - var f, - c, - l, - d = r(77), - p = r(4602), - m = r(3189).getHighWaterMark, - g = r(6244).q, - b = g.ERR_INVALID_ARG_TYPE, - y = g.ERR_STREAM_PUSH_AFTER_EOF, - v = g.ERR_METHOD_NOT_IMPLEMENTED, - w = g.ERR_STREAM_UNSHIFT_AFTER_END_EVENT; - r(87)(S, s); - var _ = p.errorOrDestroy, - M = ['error', 'close', 'destroy', 'pause', 'resume']; - function E(t, e, n) { - (i = i || r(1278)), - (t = t || {}), - 'boolean' != typeof n && (n = e instanceof i), - (this.objectMode = !!t.objectMode), - n && (this.objectMode = this.objectMode || !!t.readableObjectMode), - (this.highWaterMark = m(this, t, 'readableHighWaterMark', n)), - (this.buffer = new d()), - (this.length = 0), - (this.pipes = null), - (this.pipesCount = 0), - (this.flowing = null), - (this.ended = !1), - (this.endEmitted = !1), - (this.reading = !1), - (this.sync = !0), - (this.needReadable = !1), - (this.emittedReadable = !1), - (this.readableListening = !1), - (this.resumeScheduled = !1), - (this.paused = !0), - (this.emitClose = !1 !== t.emitClose), - (this.autoDestroy = !!t.autoDestroy), - (this.destroyed = !1), - (this.defaultEncoding = t.defaultEncoding || 'utf8'), - (this.awaitDrain = 0), - (this.readingMore = !1), - (this.decoder = null), - (this.encoding = null), - t.encoding && (f || (f = r(4361).s), (this.decoder = new f(t.encoding)), (this.encoding = t.encoding)); - } - function S(t) { - if (((i = i || r(1278)), !(this instanceof S))) return new S(t); - var e = this instanceof i; - (this._readableState = new E(t, this, e)), - (this.readable = !0), - t && ('function' == typeof t.read && (this._read = t.read), 'function' == typeof t.destroy && (this._destroy = t.destroy)), - s.call(this); - } - function x(t, e, r, i, o) { - n('readableAddChunk', e); - var s, - u = t._readableState; - if (null === e) - (u.reading = !1), - (function (t, e) { - if ((n('onEofChunk'), !e.ended)) { - if (e.decoder) { - var r = e.decoder.end(); - r && r.length && (e.buffer.push(r), (e.length += e.objectMode ? 1 : r.length)); - } - (e.ended = !0), e.sync ? B(t) : ((e.needReadable = !1), e.emittedReadable || ((e.emittedReadable = !0), I(t))); - } - })(t, u); - else if ( - (o || - (s = (function (t, e) { - var r, i; - return ( - (i = e), - a.isBuffer(i) || - i instanceof h || - 'string' == typeof e || - void 0 === e || - t.objectMode || - (r = new b('chunk', ['string', 'Buffer', 'Uint8Array'], e)), - r - ); - })(u, e)), - s) - ) - _(t, s); - else if (u.objectMode || (e && e.length > 0)) - if ( - ('string' == typeof e || - u.objectMode || - Object.getPrototypeOf(e) === a.prototype || - (e = (function (t) { - return a.from(t); - })(e)), - i) - ) - u.endEmitted ? _(t, new w()) : A(t, u, e, !0); - else if (u.ended) _(t, new y()); - else { - if (u.destroyed) return !1; - (u.reading = !1), - u.decoder && !r ? ((e = u.decoder.write(e)), u.objectMode || 0 !== e.length ? A(t, u, e, !1) : T(t, u)) : A(t, u, e, !1); - } - else i || ((u.reading = !1), T(t, u)); - return !u.ended && (u.length < u.highWaterMark || 0 === u.length); - } - function A(t, e, r, i) { - e.flowing && 0 === e.length && !e.sync - ? ((e.awaitDrain = 0), t.emit('data', r)) - : ((e.length += e.objectMode ? 1 : r.length), i ? e.buffer.unshift(r) : e.buffer.push(r), e.needReadable && B(t)), - T(t, e); - } - Object.defineProperty(S.prototype, 'destroyed', { - enumerable: !1, - get: function () { - return void 0 !== this._readableState && this._readableState.destroyed; - }, - set: function (t) { - this._readableState && (this._readableState.destroyed = t); - }, - }), - (S.prototype.destroy = p.destroy), - (S.prototype._undestroy = p.undestroy), - (S.prototype._destroy = function (t, e) { - e(t); - }), - (S.prototype.push = function (t, e) { - var r, - i = this._readableState; - return ( - i.objectMode - ? (r = !0) - : 'string' == typeof t && ((e = e || i.defaultEncoding) !== i.encoding && ((t = a.from(t, e)), (e = '')), (r = !0)), - x(this, t, e, !1, r) - ); - }), - (S.prototype.unshift = function (t) { - return x(this, t, null, !0, !1); - }), - (S.prototype.isPaused = function () { - return !1 === this._readableState.flowing; - }), - (S.prototype.setEncoding = function (t) { - f || (f = r(4361).s); - var e = new f(t); - (this._readableState.decoder = e), (this._readableState.encoding = this._readableState.decoder.encoding); - for (var i = this._readableState.buffer.head, n = ''; null !== i; ) (n += e.write(i.data)), (i = i.next); - return ( - this._readableState.buffer.clear(), - '' !== n && this._readableState.buffer.push(n), - (this._readableState.length = n.length), - this - ); - }); - var k = 1073741824; - function R(t, e) { - return t <= 0 || (0 === e.length && e.ended) - ? 0 - : e.objectMode - ? 1 - : t != t - ? e.flowing && e.length - ? e.buffer.head.data.length - : e.length - : (t > e.highWaterMark && - (e.highWaterMark = (function (t) { - return ( - t >= k ? (t = k) : (t--, (t |= t >>> 1), (t |= t >>> 2), (t |= t >>> 4), (t |= t >>> 8), (t |= t >>> 16), t++), t - ); - })(t)), - t <= e.length ? t : e.ended ? e.length : ((e.needReadable = !0), 0)); - } - function B(t) { - var e = t._readableState; - n('emitReadable', e.needReadable, e.emittedReadable), - (e.needReadable = !1), - e.emittedReadable || (n('emitReadable', e.flowing), (e.emittedReadable = !0), process.nextTick(I, t)); - } - function I(t) { - var e = t._readableState; - n('emitReadable_', e.destroyed, e.length, e.ended), - e.destroyed || (!e.length && !e.ended) || (t.emit('readable'), (e.emittedReadable = !1)), - (e.needReadable = !e.flowing && !e.ended && e.length <= e.highWaterMark), - N(t); - } - function T(t, e) { - e.readingMore || ((e.readingMore = !0), process.nextTick(P, t, e)); - } - function P(t, e) { - for (; !e.reading && !e.ended && (e.length < e.highWaterMark || (e.flowing && 0 === e.length)); ) { - var r = e.length; - if ((n('maybeReadMore read 0'), t.read(0), r === e.length)) break; - } - e.readingMore = !1; - } - function O(t) { - var e = t._readableState; - (e.readableListening = t.listenerCount('readable') > 0), - e.resumeScheduled && !e.paused ? (e.flowing = !0) : t.listenerCount('data') > 0 && t.resume(); - } - function L(t) { - n('readable nexttick read 0'), t.read(0); - } - function C(t, e) { - n('resume', e.reading), - e.reading || t.read(0), - (e.resumeScheduled = !1), - t.emit('resume'), - N(t), - e.flowing && !e.reading && t.read(0); - } - function N(t) { - var e = t._readableState; - for (n('flow', e.flowing); e.flowing && null !== t.read(); ); - } - function j(t, e) { - return 0 === e.length - ? null - : (e.objectMode - ? (r = e.buffer.shift()) - : !t || t >= e.length - ? ((r = e.decoder ? e.buffer.join('') : 1 === e.buffer.length ? e.buffer.first() : e.buffer.concat(e.length)), - e.buffer.clear()) - : (r = e.buffer.consume(t, e.decoder)), - r); - var r; - } - function U(t) { - var e = t._readableState; - n('endReadable', e.endEmitted), e.endEmitted || ((e.ended = !0), process.nextTick(D, e, t)); - } - function D(t, e) { - if ( - (n('endReadableNT', t.endEmitted, t.length), - !t.endEmitted && 0 === t.length && ((t.endEmitted = !0), (e.readable = !1), e.emit('end'), t.autoDestroy)) - ) { - var r = e._writableState; - (!r || (r.autoDestroy && r.finished)) && e.destroy(); - } - } - function z(t, e) { - for (var r = 0, i = t.length; r < i; r++) if (t[r] === e) return r; - return -1; - } - (S.prototype.read = function (t) { - n('read', t), (t = parseInt(t, 10)); - var e = this._readableState, - r = t; - if ( - (0 !== t && (e.emittedReadable = !1), - 0 === t && e.needReadable && ((0 !== e.highWaterMark ? e.length >= e.highWaterMark : e.length > 0) || e.ended)) - ) - return n('read: emitReadable', e.length, e.ended), 0 === e.length && e.ended ? U(this) : B(this), null; - if (0 === (t = R(t, e)) && e.ended) return 0 === e.length && U(this), null; - var i, - o = e.needReadable; - return ( - n('need readable', o), - (0 === e.length || e.length - t < e.highWaterMark) && n('length less than watermark', (o = !0)), - e.ended || e.reading - ? n('reading or ended', (o = !1)) - : o && - (n('do read'), - (e.reading = !0), - (e.sync = !0), - 0 === e.length && (e.needReadable = !0), - this._read(e.highWaterMark), - (e.sync = !1), - e.reading || (t = R(r, e))), - null === (i = t > 0 ? j(t, e) : null) - ? ((e.needReadable = e.length <= e.highWaterMark), (t = 0)) - : ((e.length -= t), (e.awaitDrain = 0)), - 0 === e.length && (e.ended || (e.needReadable = !0), r !== t && e.ended && U(this)), - null !== i && this.emit('data', i), - i - ); - }), - (S.prototype._read = function (t) { - _(this, new v('_read()')); - }), - (S.prototype.pipe = function (t, e) { - var r = this, - i = this._readableState; - switch (i.pipesCount) { - case 0: - i.pipes = t; - break; - case 1: - i.pipes = [i.pipes, t]; - break; - default: - i.pipes.push(t); - } - (i.pipesCount += 1), n('pipe count=%d opts=%j', i.pipesCount, e); - var s = (e && !1 === e.end) || t === process.stdout || t === process.stderr ? p : a; - function a() { - n('onend'), t.end(); - } - i.endEmitted ? process.nextTick(s) : r.once('end', s), - t.on('unpipe', function e(o, s) { - n('onunpipe'), - o === r && - s && - !1 === s.hasUnpiped && - ((s.hasUnpiped = !0), - n('cleanup'), - t.removeListener('close', l), - t.removeListener('finish', d), - t.removeListener('drain', h), - t.removeListener('error', c), - t.removeListener('unpipe', e), - r.removeListener('end', a), - r.removeListener('end', p), - r.removeListener('data', f), - (u = !0), - !i.awaitDrain || (t._writableState && !t._writableState.needDrain) || h()); - }); - var h = (function (t) { - return function () { - var e = t._readableState; - n('pipeOnDrain', e.awaitDrain), - e.awaitDrain && e.awaitDrain--, - 0 === e.awaitDrain && o(t, 'data') && ((e.flowing = !0), N(t)); - }; - })(r); - t.on('drain', h); - var u = !1; - function f(e) { - n('ondata'); - var o = t.write(e); - n('dest.write', o), - !1 === o && - (((1 === i.pipesCount && i.pipes === t) || (i.pipesCount > 1 && -1 !== z(i.pipes, t))) && - !u && - (n('false write response, pause', i.awaitDrain), i.awaitDrain++), - r.pause()); - } - function c(e) { - n('onerror', e), p(), t.removeListener('error', c), 0 === o(t, 'error') && _(t, e); - } - function l() { - t.removeListener('finish', d), p(); - } - function d() { - n('onfinish'), t.removeListener('close', l), p(); - } - function p() { - n('unpipe'), r.unpipe(t); - } - return ( - r.on('data', f), - (function (t, e, r) { - if ('function' == typeof t.prependListener) return t.prependListener(e, r); - t._events && t._events[e] - ? Array.isArray(t._events[e]) - ? t._events[e].unshift(r) - : (t._events[e] = [r, t._events[e]]) - : t.on(e, r); - })(t, 'error', c), - t.once('close', l), - t.once('finish', d), - t.emit('pipe', r), - i.flowing || (n('pipe resume'), r.resume()), - t - ); - }), - (S.prototype.unpipe = function (t) { - var e = this._readableState, - r = { hasUnpiped: !1 }; - if (0 === e.pipesCount) return this; - if (1 === e.pipesCount) - return ( - (t && t !== e.pipes) || - (t || (t = e.pipes), (e.pipes = null), (e.pipesCount = 0), (e.flowing = !1), t && t.emit('unpipe', this, r)), - this - ); - if (!t) { - var i = e.pipes, - n = e.pipesCount; - (e.pipes = null), (e.pipesCount = 0), (e.flowing = !1); - for (var o = 0; o < n; o++) i[o].emit('unpipe', this, { hasUnpiped: !1 }); - return this; - } - var s = z(e.pipes, t); - return ( - -1 === s || - (e.pipes.splice(s, 1), (e.pipesCount -= 1), 1 === e.pipesCount && (e.pipes = e.pipes[0]), t.emit('unpipe', this, r)), - this - ); - }), - (S.prototype.on = function (t, e) { - var r = s.prototype.on.call(this, t, e), - i = this._readableState; - return ( - 'data' === t - ? ((i.readableListening = this.listenerCount('readable') > 0), !1 !== i.flowing && this.resume()) - : 'readable' === t && - (i.endEmitted || - i.readableListening || - ((i.readableListening = i.needReadable = !0), - (i.flowing = !1), - (i.emittedReadable = !1), - n('on readable', i.length, i.reading), - i.length ? B(this) : i.reading || process.nextTick(L, this))), - r - ); - }), - (S.prototype.addListener = S.prototype.on), - (S.prototype.removeListener = function (t, e) { - var r = s.prototype.removeListener.call(this, t, e); - return 'readable' === t && process.nextTick(O, this), r; - }), - (S.prototype.removeAllListeners = function (t) { - var e = s.prototype.removeAllListeners.apply(this, arguments); - return ('readable' !== t && void 0 !== t) || process.nextTick(O, this), e; - }), - (S.prototype.resume = function () { - var t = this._readableState; - return ( - t.flowing || - (n('resume'), - (t.flowing = !t.readableListening), - (function (t, e) { - e.resumeScheduled || ((e.resumeScheduled = !0), process.nextTick(C, t, e)); - })(this, t)), - (t.paused = !1), - this - ); - }), - (S.prototype.pause = function () { - return ( - n('call pause flowing=%j', this._readableState.flowing), - !1 !== this._readableState.flowing && (n('pause'), (this._readableState.flowing = !1), this.emit('pause')), - (this._readableState.paused = !0), - this - ); - }), - (S.prototype.wrap = function (t) { - var e = this, - r = this._readableState, - i = !1; - for (var o in (t.on('end', function () { - if ((n('wrapped end'), r.decoder && !r.ended)) { - var t = r.decoder.end(); - t && t.length && e.push(t); - } - e.push(null); - }), - t.on('data', function (o) { - n('wrapped data'), - r.decoder && (o = r.decoder.write(o)), - (r.objectMode && null == o) || ((r.objectMode || (o && o.length)) && (e.push(o) || ((i = !0), t.pause()))); - }), - t)) - void 0 === this[o] && - 'function' == typeof t[o] && - (this[o] = (function (e) { - return function () { - return t[e].apply(t, arguments); - }; - })(o)); - for (var s = 0; s < M.length; s++) t.on(M[s], this.emit.bind(this, M[s])); - return ( - (this._read = function (e) { - n('wrapped _read', e), i && ((i = !1), t.resume()); - }), - this - ); - }), - 'function' == typeof Symbol && - (S.prototype[Symbol.asyncIterator] = function () { - return void 0 === c && (c = r(2349)), c(this); - }), - Object.defineProperty(S.prototype, 'readableHighWaterMark', { - enumerable: !1, - get: function () { - return this._readableState.highWaterMark; - }, - }), - Object.defineProperty(S.prototype, 'readableBuffer', { - enumerable: !1, - get: function () { - return this._readableState && this._readableState.buffer; - }, - }), - Object.defineProperty(S.prototype, 'readableFlowing', { - enumerable: !1, - get: function () { - return this._readableState.flowing; - }, - set: function (t) { - this._readableState && (this._readableState.flowing = t); - }, - }), - (S._fromList = j), - Object.defineProperty(S.prototype, 'readableLength', { - enumerable: !1, - get: function () { - return this._readableState.length; - }, - }), - 'function' == typeof Symbol && - (S.from = function (t, e) { - return void 0 === l && (l = r(5677)), l(S, t, e); - }); - }, - 8133: (t, e, r) => { - 'use strict'; - t.exports = f; - var i = r(6244).q, - n = i.ERR_METHOD_NOT_IMPLEMENTED, - o = i.ERR_MULTIPLE_CALLBACK, - s = i.ERR_TRANSFORM_ALREADY_TRANSFORMING, - a = i.ERR_TRANSFORM_WITH_LENGTH_0, - h = r(1278); - function u(t, e) { - var r = this._transformState; - r.transforming = !1; - var i = r.writecb; - if (null === i) return this.emit('error', new o()); - (r.writechunk = null), (r.writecb = null), null != e && this.push(e), i(t); - var n = this._readableState; - (n.reading = !1), (n.needReadable || n.length < n.highWaterMark) && this._read(n.highWaterMark); - } - function f(t) { - if (!(this instanceof f)) return new f(t); - h.call(this, t), - (this._transformState = { - afterTransform: u.bind(this), - needTransform: !1, - transforming: !1, - writecb: null, - writechunk: null, - writeencoding: null, - }), - (this._readableState.needReadable = !0), - (this._readableState.sync = !1), - t && - ('function' == typeof t.transform && (this._transform = t.transform), - 'function' == typeof t.flush && (this._flush = t.flush)), - this.on('prefinish', c); - } - function c() { - var t = this; - 'function' != typeof this._flush || this._readableState.destroyed - ? l(this, null, null) - : this._flush(function (e, r) { - l(t, e, r); - }); - } - function l(t, e, r) { - if (e) return t.emit('error', e); - if ((null != r && t.push(r), t._writableState.length)) throw new a(); - if (t._transformState.transforming) throw new s(); - return t.push(null); - } - r(87)(f, h), - (f.prototype.push = function (t, e) { - return (this._transformState.needTransform = !1), h.prototype.push.call(this, t, e); - }), - (f.prototype._transform = function (t, e, r) { - r(new n('_transform()')); - }), - (f.prototype._write = function (t, e, r) { - var i = this._transformState; - if (((i.writecb = r), (i.writechunk = t), (i.writeencoding = e), !i.transforming)) { - var n = this._readableState; - (i.needTransform || n.needReadable || n.length < n.highWaterMark) && this._read(n.highWaterMark); - } - }), - (f.prototype._read = function (t) { - var e = this._transformState; - null === e.writechunk || e.transforming - ? (e.needTransform = !0) - : ((e.transforming = !0), this._transform(e.writechunk, e.writeencoding, e.afterTransform)); - }), - (f.prototype._destroy = function (t, e) { - h.prototype._destroy.call(this, t, function (t) { - e(t); - }); - }); - }, - 3: (t, e, r) => { - 'use strict'; - function i(t) { - var e = this; - (this.next = null), - (this.entry = null), - (this.finish = function () { - !(function (t, e, r) { - var i = t.entry; - for (t.entry = null; i; ) { - var n = i.callback; - e.pendingcb--, n(undefined), (i = i.next); - } - e.corkedRequestsFree.next = t; - })(e, t); - }); - } - var n; - (t.exports = S), (S.WritableState = E); - var o, - s = { deprecate: r(7451) }, - a = r(6284), - h = r(816).Buffer, - u = r.g.Uint8Array || function () {}, - f = r(4602), - c = r(3189).getHighWaterMark, - l = r(6244).q, - d = l.ERR_INVALID_ARG_TYPE, - p = l.ERR_METHOD_NOT_IMPLEMENTED, - m = l.ERR_MULTIPLE_CALLBACK, - g = l.ERR_STREAM_CANNOT_PIPE, - b = l.ERR_STREAM_DESTROYED, - y = l.ERR_STREAM_NULL_VALUES, - v = l.ERR_STREAM_WRITE_AFTER_END, - w = l.ERR_UNKNOWN_ENCODING, - _ = f.errorOrDestroy; - function M() {} - function E(t, e, o) { - (n = n || r(1278)), - (t = t || {}), - 'boolean' != typeof o && (o = e instanceof n), - (this.objectMode = !!t.objectMode), - o && (this.objectMode = this.objectMode || !!t.writableObjectMode), - (this.highWaterMark = c(this, t, 'writableHighWaterMark', o)), - (this.finalCalled = !1), - (this.needDrain = !1), - (this.ending = !1), - (this.ended = !1), - (this.finished = !1), - (this.destroyed = !1); - var s = !1 === t.decodeStrings; - (this.decodeStrings = !s), - (this.defaultEncoding = t.defaultEncoding || 'utf8'), - (this.length = 0), - (this.writing = !1), - (this.corked = 0), - (this.sync = !0), - (this.bufferProcessing = !1), - (this.onwrite = function (t) { - !(function (t, e) { - var r = t._writableState, - i = r.sync, - n = r.writecb; - if ('function' != typeof n) throw new m(); - if ( - ((function (t) { - (t.writing = !1), (t.writecb = null), (t.length -= t.writelen), (t.writelen = 0); - })(r), - e) - ) - !(function (t, e, r, i, n) { - --e.pendingcb, - r - ? (process.nextTick(n, i), process.nextTick(I, t, e), (t._writableState.errorEmitted = !0), _(t, i)) - : (n(i), (t._writableState.errorEmitted = !0), _(t, i), I(t, e)); - })(t, r, i, e, n); - else { - var o = R(r) || t.destroyed; - o || r.corked || r.bufferProcessing || !r.bufferedRequest || k(t, r), i ? process.nextTick(A, t, r, o, n) : A(t, r, o, n); - } - })(e, t); - }), - (this.writecb = null), - (this.writelen = 0), - (this.bufferedRequest = null), - (this.lastBufferedRequest = null), - (this.pendingcb = 0), - (this.prefinished = !1), - (this.errorEmitted = !1), - (this.emitClose = !1 !== t.emitClose), - (this.autoDestroy = !!t.autoDestroy), - (this.bufferedRequestCount = 0), - (this.corkedRequestsFree = new i(this)); - } - function S(t) { - var e = this instanceof (n = n || r(1278)); - if (!e && !o.call(S, this)) return new S(t); - (this._writableState = new E(t, this, e)), - (this.writable = !0), - t && - ('function' == typeof t.write && (this._write = t.write), - 'function' == typeof t.writev && (this._writev = t.writev), - 'function' == typeof t.destroy && (this._destroy = t.destroy), - 'function' == typeof t.final && (this._final = t.final)), - a.call(this); - } - function x(t, e, r, i, n, o, s) { - (e.writelen = i), - (e.writecb = s), - (e.writing = !0), - (e.sync = !0), - e.destroyed ? e.onwrite(new b('write')) : r ? t._writev(n, e.onwrite) : t._write(n, o, e.onwrite), - (e.sync = !1); - } - function A(t, e, r, i) { - r || - (function (t, e) { - 0 === e.length && e.needDrain && ((e.needDrain = !1), t.emit('drain')); - })(t, e), - e.pendingcb--, - i(), - I(t, e); - } - function k(t, e) { - e.bufferProcessing = !0; - var r = e.bufferedRequest; - if (t._writev && r && r.next) { - var n = e.bufferedRequestCount, - o = new Array(n), - s = e.corkedRequestsFree; - s.entry = r; - for (var a = 0, h = !0; r; ) (o[a] = r), r.isBuf || (h = !1), (r = r.next), (a += 1); - (o.allBuffers = h), - x(t, e, !0, e.length, o, '', s.finish), - e.pendingcb++, - (e.lastBufferedRequest = null), - s.next ? ((e.corkedRequestsFree = s.next), (s.next = null)) : (e.corkedRequestsFree = new i(e)), - (e.bufferedRequestCount = 0); - } else { - for (; r; ) { - var u = r.chunk, - f = r.encoding, - c = r.callback; - if ((x(t, e, !1, e.objectMode ? 1 : u.length, u, f, c), (r = r.next), e.bufferedRequestCount--, e.writing)) break; - } - null === r && (e.lastBufferedRequest = null); - } - (e.bufferedRequest = r), (e.bufferProcessing = !1); - } - function R(t) { - return t.ending && 0 === t.length && null === t.bufferedRequest && !t.finished && !t.writing; - } - function B(t, e) { - t._final(function (r) { - e.pendingcb--, r && _(t, r), (e.prefinished = !0), t.emit('prefinish'), I(t, e); - }); - } - function I(t, e) { - var r = R(e); - if ( - r && - ((function (t, e) { - e.prefinished || - e.finalCalled || - ('function' != typeof t._final || e.destroyed - ? ((e.prefinished = !0), t.emit('prefinish')) - : (e.pendingcb++, (e.finalCalled = !0), process.nextTick(B, t, e))); - })(t, e), - 0 === e.pendingcb && ((e.finished = !0), t.emit('finish'), e.autoDestroy)) - ) { - var i = t._readableState; - (!i || (i.autoDestroy && i.endEmitted)) && t.destroy(); - } - return r; - } - r(87)(S, a), - (E.prototype.getBuffer = function () { - for (var t = this.bufferedRequest, e = []; t; ) e.push(t), (t = t.next); - return e; - }), - (function () { - try { - Object.defineProperty(E.prototype, 'buffer', { - get: s.deprecate( - function () { - return this.getBuffer(); - }, - '_writableState.buffer is deprecated. Use _writableState.getBuffer instead.', - 'DEP0003' - ), - }); - } catch (t) {} - })(), - 'function' == typeof Symbol && Symbol.hasInstance && 'function' == typeof Function.prototype[Symbol.hasInstance] - ? ((o = Function.prototype[Symbol.hasInstance]), - Object.defineProperty(S, Symbol.hasInstance, { - value: function (t) { - return !!o.call(this, t) || (this === S && t && t._writableState instanceof E); - }, - })) - : (o = function (t) { - return t instanceof this; - }), - (S.prototype.pipe = function () { - _(this, new g()); - }), - (S.prototype.write = function (t, e, r) { - var i, - n = this._writableState, - o = !1, - s = !n.objectMode && ((i = t), h.isBuffer(i) || i instanceof u); - return ( - s && - !h.isBuffer(t) && - (t = (function (t) { - return h.from(t); - })(t)), - 'function' == typeof e && ((r = e), (e = null)), - s ? (e = 'buffer') : e || (e = n.defaultEncoding), - 'function' != typeof r && (r = M), - n.ending - ? (function (t, e) { - var r = new v(); - _(t, r), process.nextTick(e, r); - })(this, r) - : (s || - (function (t, e, r, i) { - var n; - return ( - null === r ? (n = new y()) : 'string' == typeof r || e.objectMode || (n = new d('chunk', ['string', 'Buffer'], r)), - !n || (_(t, n), process.nextTick(i, n), !1) - ); - })(this, n, t, r)) && - (n.pendingcb++, - (o = (function (t, e, r, i, n, o) { - if (!r) { - var s = (function (t, e, r) { - return t.objectMode || !1 === t.decodeStrings || 'string' != typeof e || (e = h.from(e, r)), e; - })(e, i, n); - i !== s && ((r = !0), (n = 'buffer'), (i = s)); - } - var a = e.objectMode ? 1 : i.length; - e.length += a; - var u = e.length < e.highWaterMark; - if ((u || (e.needDrain = !0), e.writing || e.corked)) { - var f = e.lastBufferedRequest; - (e.lastBufferedRequest = { chunk: i, encoding: n, isBuf: r, callback: o, next: null }), - f ? (f.next = e.lastBufferedRequest) : (e.bufferedRequest = e.lastBufferedRequest), - (e.bufferedRequestCount += 1); - } else x(t, e, !1, a, i, n, o); - return u; - })(this, n, s, t, e, r))), - o - ); - }), - (S.prototype.cork = function () { - this._writableState.corked++; - }), - (S.prototype.uncork = function () { - var t = this._writableState; - t.corked && (t.corked--, t.writing || t.corked || t.bufferProcessing || !t.bufferedRequest || k(this, t)); - }), - (S.prototype.setDefaultEncoding = function (t) { - if ( - ('string' == typeof t && (t = t.toLowerCase()), - !( - ['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf( - (t + '').toLowerCase() - ) > -1 - )) - ) - throw new w(t); - return (this._writableState.defaultEncoding = t), this; - }), - Object.defineProperty(S.prototype, 'writableBuffer', { - enumerable: !1, - get: function () { - return this._writableState && this._writableState.getBuffer(); - }, - }), - Object.defineProperty(S.prototype, 'writableHighWaterMark', { - enumerable: !1, - get: function () { - return this._writableState.highWaterMark; - }, - }), - (S.prototype._write = function (t, e, r) { - r(new p('_write()')); - }), - (S.prototype._writev = null), - (S.prototype.end = function (t, e, r) { - var i = this._writableState; - return ( - 'function' == typeof t ? ((r = t), (t = null), (e = null)) : 'function' == typeof e && ((r = e), (e = null)), - null != t && this.write(t, e), - i.corked && ((i.corked = 1), this.uncork()), - i.ending || - (function (t, e, r) { - (e.ending = !0), - I(t, e), - r && (e.finished ? process.nextTick(r) : t.once('finish', r)), - (e.ended = !0), - (t.writable = !1); - })(this, i, r), - this - ); - }), - Object.defineProperty(S.prototype, 'writableLength', { - enumerable: !1, - get: function () { - return this._writableState.length; - }, - }), - Object.defineProperty(S.prototype, 'destroyed', { - enumerable: !1, - get: function () { - return void 0 !== this._writableState && this._writableState.destroyed; - }, - set: function (t) { - this._writableState && (this._writableState.destroyed = t); - }, - }), - (S.prototype.destroy = f.destroy), - (S.prototype._undestroy = f.undestroy), - (S.prototype._destroy = function (t, e) { - e(t); - }); - }, - 2349: (t, e, r) => { - 'use strict'; - var i; - function n(t, e, r) { - return e in t ? Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : (t[e] = r), t; - } - var o = r(3311), - s = Symbol('lastResolve'), - a = Symbol('lastReject'), - h = Symbol('error'), - u = Symbol('ended'), - f = Symbol('lastPromise'), - c = Symbol('handlePromise'), - l = Symbol('stream'); - function d(t, e) { - return { value: t, done: e }; - } - function p(t) { - var e = t[s]; - if (null !== e) { - var r = t[l].read(); - null !== r && ((t[f] = null), (t[s] = null), (t[a] = null), e(d(r, !1))); - } - } - function m(t) { - process.nextTick(p, t); - } - var g = Object.getPrototypeOf(function () {}), - b = Object.setPrototypeOf( - (n( - (i = { - get stream() { - return this[l]; - }, - next: function () { - var t = this, - e = this[h]; - if (null !== e) return Promise.reject(e); - if (this[u]) return Promise.resolve(d(void 0, !0)); - if (this[l].destroyed) - return new Promise(function (e, r) { - process.nextTick(function () { - t[h] ? r(t[h]) : e(d(void 0, !0)); - }); - }); - var r, - i = this[f]; - if (i) - r = new Promise( - (function (t, e) { - return function (r, i) { - t.then(function () { - e[u] ? r(d(void 0, !0)) : e[c](r, i); - }, i); - }; - })(i, this) - ); - else { - var n = this[l].read(); - if (null !== n) return Promise.resolve(d(n, !1)); - r = new Promise(this[c]); - } - return (this[f] = r), r; - }, - }), - Symbol.asyncIterator, - function () { - return this; - } - ), - n(i, 'return', function () { - var t = this; - return new Promise(function (e, r) { - t[l].destroy(null, function (t) { - t ? r(t) : e(d(void 0, !0)); - }); - }); - }), - i), - g - ); - t.exports = function (t) { - var e, - r = Object.create( - b, - (n((e = {}), l, { value: t, writable: !0 }), - n(e, s, { value: null, writable: !0 }), - n(e, a, { value: null, writable: !0 }), - n(e, h, { value: null, writable: !0 }), - n(e, u, { value: t._readableState.endEmitted, writable: !0 }), - n(e, c, { - value: function (t, e) { - var i = r[l].read(); - i ? ((r[f] = null), (r[s] = null), (r[a] = null), t(d(i, !1))) : ((r[s] = t), (r[a] = e)); - }, - writable: !0, - }), - e) - ); - return ( - (r[f] = null), - o(t, function (t) { - if (t && 'ERR_STREAM_PREMATURE_CLOSE' !== t.code) { - var e = r[a]; - return null !== e && ((r[f] = null), (r[s] = null), (r[a] = null), e(t)), void (r[h] = t); - } - var i = r[s]; - null !== i && ((r[f] = null), (r[s] = null), (r[a] = null), i(d(void 0, !0))), (r[u] = !0); - }), - t.on('readable', m.bind(null, r)), - r - ); - }; - }, - 77: (t, e, r) => { - 'use strict'; - function i(t, e) { - var r = Object.keys(t); - if (Object.getOwnPropertySymbols) { - var i = Object.getOwnPropertySymbols(t); - e && - (i = i.filter(function (e) { - return Object.getOwnPropertyDescriptor(t, e).enumerable; - })), - r.push.apply(r, i); - } - return r; - } - function n(t, e, r) { - return e in t ? Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : (t[e] = r), t; - } - function o(t, e) { - for (var r = 0; r < e.length; r++) { - var i = e[r]; - (i.enumerable = i.enumerable || !1), - (i.configurable = !0), - 'value' in i && (i.writable = !0), - Object.defineProperty(t, i.key, i); - } - } - var s = r(816).Buffer, - a = r(4215).inspect, - h = (a && a.custom) || 'inspect'; - t.exports = (function () { - function t() { - !(function (t, e) { - if (!(t instanceof e)) throw new TypeError('Cannot call a class as a function'); - })(this, t), - (this.head = null), - (this.tail = null), - (this.length = 0); - } - var e, r; - return ( - (e = t), - (r = [ - { - key: 'push', - value: function (t) { - var e = { data: t, next: null }; - this.length > 0 ? (this.tail.next = e) : (this.head = e), (this.tail = e), ++this.length; - }, - }, - { - key: 'unshift', - value: function (t) { - var e = { data: t, next: this.head }; - 0 === this.length && (this.tail = e), (this.head = e), ++this.length; - }, - }, - { - key: 'shift', - value: function () { - if (0 !== this.length) { - var t = this.head.data; - return 1 === this.length ? (this.head = this.tail = null) : (this.head = this.head.next), --this.length, t; - } - }, - }, - { - key: 'clear', - value: function () { - (this.head = this.tail = null), (this.length = 0); - }, - }, - { - key: 'join', - value: function (t) { - if (0 === this.length) return ''; - for (var e = this.head, r = '' + e.data; (e = e.next); ) r += t + e.data; - return r; - }, - }, - { - key: 'concat', - value: function (t) { - if (0 === this.length) return s.alloc(0); - for (var e, r, i, n = s.allocUnsafe(t >>> 0), o = this.head, a = 0; o; ) - (e = o.data), (r = n), (i = a), s.prototype.copy.call(e, r, i), (a += o.data.length), (o = o.next); - return n; - }, - }, - { - key: 'consume', - value: function (t, e) { - var r; - return ( - t < this.head.data.length - ? ((r = this.head.data.slice(0, t)), (this.head.data = this.head.data.slice(t))) - : (r = t === this.head.data.length ? this.shift() : e ? this._getString(t) : this._getBuffer(t)), - r - ); - }, - }, - { - key: 'first', - value: function () { - return this.head.data; - }, - }, - { - key: '_getString', - value: function (t) { - var e = this.head, - r = 1, - i = e.data; - for (t -= i.length; (e = e.next); ) { - var n = e.data, - o = t > n.length ? n.length : t; - if ((o === n.length ? (i += n) : (i += n.slice(0, t)), 0 == (t -= o))) { - o === n.length - ? (++r, e.next ? (this.head = e.next) : (this.head = this.tail = null)) - : ((this.head = e), (e.data = n.slice(o))); - break; - } - ++r; - } - return (this.length -= r), i; - }, - }, - { - key: '_getBuffer', - value: function (t) { - var e = s.allocUnsafe(t), - r = this.head, - i = 1; - for (r.data.copy(e), t -= r.data.length; (r = r.next); ) { - var n = r.data, - o = t > n.length ? n.length : t; - if ((n.copy(e, e.length - t, 0, o), 0 == (t -= o))) { - o === n.length - ? (++i, r.next ? (this.head = r.next) : (this.head = this.tail = null)) - : ((this.head = r), (r.data = n.slice(o))); - break; - } - ++i; - } - return (this.length -= i), e; - }, - }, - { - key: h, - value: function (t, e) { - return a( - this, - (function (t) { - for (var e = 1; e < arguments.length; e++) { - var r = null != arguments[e] ? arguments[e] : {}; - e % 2 - ? i(Object(r), !0).forEach(function (e) { - n(t, e, r[e]); - }) - : Object.getOwnPropertyDescriptors - ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) - : i(Object(r)).forEach(function (e) { - Object.defineProperty(t, e, Object.getOwnPropertyDescriptor(r, e)); - }); - } - return t; - })({}, e, { depth: 0, customInspect: !1 }) - ); - }, - }, - ]), - r && o(e.prototype, r), - t - ); - })(); - }, - 4602: t => { - 'use strict'; - function e(t, e) { - i(t, e), r(t); - } - function r(t) { - (t._writableState && !t._writableState.emitClose) || (t._readableState && !t._readableState.emitClose) || t.emit('close'); - } - function i(t, e) { - t.emit('error', e); - } - t.exports = { - destroy: function (t, n) { - var o = this, - s = this._readableState && this._readableState.destroyed, - a = this._writableState && this._writableState.destroyed; - return s || a - ? (n - ? n(t) - : t && - (this._writableState - ? this._writableState.errorEmitted || ((this._writableState.errorEmitted = !0), process.nextTick(i, this, t)) - : process.nextTick(i, this, t)), - this) - : (this._readableState && (this._readableState.destroyed = !0), - this._writableState && (this._writableState.destroyed = !0), - this._destroy(t || null, function (t) { - !n && t - ? o._writableState - ? o._writableState.errorEmitted - ? process.nextTick(r, o) - : ((o._writableState.errorEmitted = !0), process.nextTick(e, o, t)) - : process.nextTick(e, o, t) - : n - ? (process.nextTick(r, o), n(t)) - : process.nextTick(r, o); - }), - this); - }, - undestroy: function () { - this._readableState && - ((this._readableState.destroyed = !1), - (this._readableState.reading = !1), - (this._readableState.ended = !1), - (this._readableState.endEmitted = !1)), - this._writableState && - ((this._writableState.destroyed = !1), - (this._writableState.ended = !1), - (this._writableState.ending = !1), - (this._writableState.finalCalled = !1), - (this._writableState.prefinished = !1), - (this._writableState.finished = !1), - (this._writableState.errorEmitted = !1)); - }, - errorOrDestroy: function (t, e) { - var r = t._readableState, - i = t._writableState; - (r && r.autoDestroy) || (i && i.autoDestroy) ? t.destroy(e) : t.emit('error', e); - }, - }; - }, - 3311: (t, e, r) => { - 'use strict'; - var i = r(6244).q.ERR_STREAM_PREMATURE_CLOSE; - function n() {} - t.exports = function t(e, r, o) { - if ('function' == typeof r) return t(e, null, r); - r || (r = {}), - (o = (function (t) { - var e = !1; - return function () { - if (!e) { - e = !0; - for (var r = arguments.length, i = new Array(r), n = 0; n < r; n++) i[n] = arguments[n]; - t.apply(this, i); - } - }; - })(o || n)); - var s = r.readable || (!1 !== r.readable && e.readable), - a = r.writable || (!1 !== r.writable && e.writable), - h = function () { - e.writable || f(); - }, - u = e._writableState && e._writableState.finished, - f = function () { - (a = !1), (u = !0), s || o.call(e); - }, - c = e._readableState && e._readableState.endEmitted, - l = function () { - (s = !1), (c = !0), a || o.call(e); - }, - d = function (t) { - o.call(e, t); - }, - p = function () { - var t; - return s && !c - ? ((e._readableState && e._readableState.ended) || (t = new i()), o.call(e, t)) - : a && !u - ? ((e._writableState && e._writableState.ended) || (t = new i()), o.call(e, t)) - : void 0; - }, - m = function () { - e.req.on('finish', f); - }; - return ( - (function (t) { - return t.setHeader && 'function' == typeof t.abort; - })(e) - ? (e.on('complete', f), e.on('abort', p), e.req ? m() : e.on('request', m)) - : a && !e._writableState && (e.on('end', h), e.on('close', h)), - e.on('end', l), - e.on('finish', f), - !1 !== r.error && e.on('error', d), - e.on('close', p), - function () { - e.removeListener('complete', f), - e.removeListener('abort', p), - e.removeListener('request', m), - e.req && e.req.removeListener('finish', f), - e.removeListener('end', h), - e.removeListener('close', h), - e.removeListener('finish', f), - e.removeListener('end', l), - e.removeListener('error', d), - e.removeListener('close', p); - } - ); - }; - }, - 5677: t => { - t.exports = function () { - throw new Error('Readable.from is not available in the browser'); - }; - }, - 6192: (t, e, r) => { - 'use strict'; - var i, - n = r(6244).q, - o = n.ERR_MISSING_ARGS, - s = n.ERR_STREAM_DESTROYED; - function a(t) { - if (t) throw t; - } - function h(t) { - t(); - } - function u(t, e) { - return t.pipe(e); - } - t.exports = function () { - for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++) e[n] = arguments[n]; - var f, - c = (function (t) { - return t.length ? ('function' != typeof t[t.length - 1] ? a : t.pop()) : a; - })(e); - if ((Array.isArray(e[0]) && (e = e[0]), e.length < 2)) throw new o('streams'); - var l = e.map(function (t, n) { - var o = n < e.length - 1; - return (function (t, e, n, o) { - o = (function (t) { - var e = !1; - return function () { - e || ((e = !0), t.apply(void 0, arguments)); - }; - })(o); - var a = !1; - t.on('close', function () { - a = !0; - }), - void 0 === i && (i = r(3311)), - i(t, { readable: e, writable: n }, function (t) { - if (t) return o(t); - (a = !0), o(); - }); - var h = !1; - return function (e) { - if (!a && !h) - return ( - (h = !0), - (function (t) { - return t.setHeader && 'function' == typeof t.abort; - })(t) - ? t.abort() - : 'function' == typeof t.destroy - ? t.destroy() - : void o(e || new s('pipe')) - ); - }; - })(t, o, n > 0, function (t) { - f || (f = t), t && l.forEach(h), o || (l.forEach(h), c(f)); - }); - }); - return e.reduce(u); - }; - }, - 3189: (t, e, r) => { - 'use strict'; - var i = r(6244).q.ERR_INVALID_OPT_VALUE; - t.exports = { - getHighWaterMark: function (t, e, r, n) { - var o = (function (t, e, r) { - return null != t.highWaterMark ? t.highWaterMark : e ? t[r] : null; - })(e, n, r); - if (null != o) { - if (!isFinite(o) || Math.floor(o) !== o || o < 0) throw new i(n ? r : 'highWaterMark', o); - return Math.floor(o); - } - return t.objectMode ? 16 : 16384; - }, - }; - }, - 6284: (t, e, r) => { - t.exports = r(343).EventEmitter; - }, - 9649: (t, e, r) => { - ((e = t.exports = r(4581)).Stream = e), - (e.Readable = e), - (e.Writable = r(3)), - (e.Duplex = r(1278)), - (e.Transform = r(8133)), - (e.PassThrough = r(8825)), - (e.finished = r(3311)), - (e.pipeline = r(6192)); - }, - 7752: t => { - t.exports = function (t, e) { - for (var r = Math.min(t.length, e.length), i = new Buffer(r), n = 0; n < r; ++n) i[n] = t[n] ^ e[n]; - return i; - }; - }, - 816: (t, e, r) => { - 'use strict'; - const i = r(4782), - n = r(8898), - o = 'function' == typeof Symbol && 'function' == typeof Symbol.for ? Symbol.for('nodejs.util.inspect.custom') : null; - (e.Buffer = h), - (e.SlowBuffer = function (t) { - return +t != t && (t = 0), h.alloc(+t); - }), - (e.INSPECT_MAX_BYTES = 50); - const s = 2147483647; - function a(t) { - if (t > s) throw new RangeError('The value "' + t + '" is invalid for option "size"'); - const e = new Uint8Array(t); - return Object.setPrototypeOf(e, h.prototype), e; - } - function h(t, e, r) { - if ('number' == typeof t) { - if ('string' == typeof e) throw new TypeError('The "string" argument must be of type string. Received type number'); - return c(t); - } - return u(t, e, r); - } - function u(t, e, r) { - if ('string' == typeof t) - return (function (t, e) { - if ((('string' == typeof e && '' !== e) || (e = 'utf8'), !h.isEncoding(e))) throw new TypeError('Unknown encoding: ' + e); - const r = 0 | m(t, e); - let i = a(r); - const n = i.write(t, e); - return n !== r && (i = i.slice(0, n)), i; - })(t, e); - if (ArrayBuffer.isView(t)) - return (function (t) { - if (K(t, Uint8Array)) { - const e = new Uint8Array(t); - return d(e.buffer, e.byteOffset, e.byteLength); - } - return l(t); - })(t); - if (null == t) - throw new TypeError( - 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type ' + typeof t - ); - if (K(t, ArrayBuffer) || (t && K(t.buffer, ArrayBuffer))) return d(t, e, r); - if ('undefined' != typeof SharedArrayBuffer && (K(t, SharedArrayBuffer) || (t && K(t.buffer, SharedArrayBuffer)))) - return d(t, e, r); - if ('number' == typeof t) throw new TypeError('The "value" argument must not be of type number. Received type number'); - const i = t.valueOf && t.valueOf(); - if (null != i && i !== t) return h.from(i, e, r); - const n = (function (t) { - if (h.isBuffer(t)) { - const e = 0 | p(t.length), - r = a(e); - return 0 === r.length || t.copy(r, 0, 0, e), r; - } - return void 0 !== t.length - ? 'number' != typeof t.length || Y(t.length) - ? a(0) - : l(t) - : 'Buffer' === t.type && Array.isArray(t.data) - ? l(t.data) - : void 0; - })(t); - if (n) return n; - if ('undefined' != typeof Symbol && null != Symbol.toPrimitive && 'function' == typeof t[Symbol.toPrimitive]) - return h.from(t[Symbol.toPrimitive]('string'), e, r); - throw new TypeError( - 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type ' + typeof t - ); - } - function f(t) { - if ('number' != typeof t) throw new TypeError('"size" argument must be of type number'); - if (t < 0) throw new RangeError('The value "' + t + '" is invalid for option "size"'); - } - function c(t) { - return f(t), a(t < 0 ? 0 : 0 | p(t)); - } - function l(t) { - const e = t.length < 0 ? 0 : 0 | p(t.length), - r = a(e); - for (let i = 0; i < e; i += 1) r[i] = 255 & t[i]; - return r; - } - function d(t, e, r) { - if (e < 0 || t.byteLength < e) throw new RangeError('"offset" is outside of buffer bounds'); - if (t.byteLength < e + (r || 0)) throw new RangeError('"length" is outside of buffer bounds'); - let i; - return ( - (i = void 0 === e && void 0 === r ? new Uint8Array(t) : void 0 === r ? new Uint8Array(t, e) : new Uint8Array(t, e, r)), - Object.setPrototypeOf(i, h.prototype), - i - ); - } - function p(t) { - if (t >= s) throw new RangeError('Attempt to allocate Buffer larger than maximum size: 0x' + s.toString(16) + ' bytes'); - return 0 | t; - } - function m(t, e) { - if (h.isBuffer(t)) return t.length; - if (ArrayBuffer.isView(t) || K(t, ArrayBuffer)) return t.byteLength; - if ('string' != typeof t) - throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + typeof t); - const r = t.length, - i = arguments.length > 2 && !0 === arguments[2]; - if (!i && 0 === r) return 0; - let n = !1; - for (;;) - switch (e) { - case 'ascii': - case 'latin1': - case 'binary': - return r; - case 'utf8': - case 'utf-8': - return G(t).length; - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return 2 * r; - case 'hex': - return r >>> 1; - case 'base64': - return V(t).length; - default: - if (n) return i ? -1 : G(t).length; - (e = ('' + e).toLowerCase()), (n = !0); - } - } - function g(t, e, r) { - let i = !1; - if (((void 0 === e || e < 0) && (e = 0), e > this.length)) return ''; - if (((void 0 === r || r > this.length) && (r = this.length), r <= 0)) return ''; - if ((r >>>= 0) <= (e >>>= 0)) return ''; - for (t || (t = 'utf8'); ; ) - switch (t) { - case 'hex': - return I(this, e, r); - case 'utf8': - case 'utf-8': - return A(this, e, r); - case 'ascii': - return R(this, e, r); - case 'latin1': - case 'binary': - return B(this, e, r); - case 'base64': - return x(this, e, r); - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return T(this, e, r); - default: - if (i) throw new TypeError('Unknown encoding: ' + t); - (t = (t + '').toLowerCase()), (i = !0); - } - } - function b(t, e, r) { - const i = t[e]; - (t[e] = t[r]), (t[r] = i); - } - function y(t, e, r, i, n) { - if (0 === t.length) return -1; - if ( - ('string' == typeof r ? ((i = r), (r = 0)) : r > 2147483647 ? (r = 2147483647) : r < -2147483648 && (r = -2147483648), - Y((r = +r)) && (r = n ? 0 : t.length - 1), - r < 0 && (r = t.length + r), - r >= t.length) - ) { - if (n) return -1; - r = t.length - 1; - } else if (r < 0) { - if (!n) return -1; - r = 0; - } - if (('string' == typeof e && (e = h.from(e, i)), h.isBuffer(e))) return 0 === e.length ? -1 : v(t, e, r, i, n); - if ('number' == typeof e) - return ( - (e &= 255), - 'function' == typeof Uint8Array.prototype.indexOf - ? n - ? Uint8Array.prototype.indexOf.call(t, e, r) - : Uint8Array.prototype.lastIndexOf.call(t, e, r) - : v(t, [e], r, i, n) - ); - throw new TypeError('val must be string, number or Buffer'); - } - function v(t, e, r, i, n) { - let o, - s = 1, - a = t.length, - h = e.length; - if (void 0 !== i && ('ucs2' === (i = String(i).toLowerCase()) || 'ucs-2' === i || 'utf16le' === i || 'utf-16le' === i)) { - if (t.length < 2 || e.length < 2) return -1; - (s = 2), (a /= 2), (h /= 2), (r /= 2); - } - function u(t, e) { - return 1 === s ? t[e] : t.readUInt16BE(e * s); - } - if (n) { - let i = -1; - for (o = r; o < a; o++) - if (u(t, o) === u(e, -1 === i ? 0 : o - i)) { - if ((-1 === i && (i = o), o - i + 1 === h)) return i * s; - } else -1 !== i && (o -= o - i), (i = -1); - } else - for (r + h > a && (r = a - h), o = r; o >= 0; o--) { - let r = !0; - for (let i = 0; i < h; i++) - if (u(t, o + i) !== u(e, i)) { - r = !1; - break; - } - if (r) return o; - } - return -1; - } - function w(t, e, r, i) { - r = Number(r) || 0; - const n = t.length - r; - i ? (i = Number(i)) > n && (i = n) : (i = n); - const o = e.length; - let s; - for (i > o / 2 && (i = o / 2), s = 0; s < i; ++s) { - const i = parseInt(e.substr(2 * s, 2), 16); - if (Y(i)) return s; - t[r + s] = i; - } - return s; - } - function _(t, e, r, i) { - return W(G(e, t.length - r), t, r, i); - } - function M(t, e, r, i) { - return W( - (function (t) { - const e = []; - for (let r = 0; r < t.length; ++r) e.push(255 & t.charCodeAt(r)); - return e; - })(e), - t, - r, - i - ); - } - function E(t, e, r, i) { - return W(V(e), t, r, i); - } - function S(t, e, r, i) { - return W( - (function (t, e) { - let r, i, n; - const o = []; - for (let s = 0; s < t.length && !((e -= 2) < 0); ++s) - (r = t.charCodeAt(s)), (i = r >> 8), (n = r % 256), o.push(n), o.push(i); - return o; - })(e, t.length - r), - t, - r, - i - ); - } - function x(t, e, r) { - return 0 === e && r === t.length ? i.fromByteArray(t) : i.fromByteArray(t.slice(e, r)); - } - function A(t, e, r) { - r = Math.min(t.length, r); - const i = []; - let n = e; - for (; n < r; ) { - const e = t[n]; - let o = null, - s = e > 239 ? 4 : e > 223 ? 3 : e > 191 ? 2 : 1; - if (n + s <= r) { - let r, i, a, h; - switch (s) { - case 1: - e < 128 && (o = e); - break; - case 2: - (r = t[n + 1]), 128 == (192 & r) && ((h = ((31 & e) << 6) | (63 & r)), h > 127 && (o = h)); - break; - case 3: - (r = t[n + 1]), - (i = t[n + 2]), - 128 == (192 & r) && - 128 == (192 & i) && - ((h = ((15 & e) << 12) | ((63 & r) << 6) | (63 & i)), h > 2047 && (h < 55296 || h > 57343) && (o = h)); - break; - case 4: - (r = t[n + 1]), - (i = t[n + 2]), - (a = t[n + 3]), - 128 == (192 & r) && - 128 == (192 & i) && - 128 == (192 & a) && - ((h = ((15 & e) << 18) | ((63 & r) << 12) | ((63 & i) << 6) | (63 & a)), h > 65535 && h < 1114112 && (o = h)); - } - } - null === o - ? ((o = 65533), (s = 1)) - : o > 65535 && ((o -= 65536), i.push(((o >>> 10) & 1023) | 55296), (o = 56320 | (1023 & o))), - i.push(o), - (n += s); - } - return (function (t) { - const e = t.length; - if (e <= k) return String.fromCharCode.apply(String, t); - let r = '', - i = 0; - for (; i < e; ) r += String.fromCharCode.apply(String, t.slice(i, (i += k))); - return r; - })(i); - } - (e.kMaxLength = s), - (h.TYPED_ARRAY_SUPPORT = (function () { - try { - const t = new Uint8Array(1), - e = { - foo: function () { - return 42; - }, - }; - return Object.setPrototypeOf(e, Uint8Array.prototype), Object.setPrototypeOf(t, e), 42 === t.foo(); - } catch (t) { - return !1; - } - })()), - h.TYPED_ARRAY_SUPPORT || - 'undefined' == typeof console || - 'function' != typeof console.error || - console.error( - 'This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.' - ), - Object.defineProperty(h.prototype, 'parent', { - enumerable: !0, - get: function () { - if (h.isBuffer(this)) return this.buffer; - }, - }), - Object.defineProperty(h.prototype, 'offset', { - enumerable: !0, - get: function () { - if (h.isBuffer(this)) return this.byteOffset; - }, - }), - (h.poolSize = 8192), - (h.from = function (t, e, r) { - return u(t, e, r); - }), - Object.setPrototypeOf(h.prototype, Uint8Array.prototype), - Object.setPrototypeOf(h, Uint8Array), - (h.alloc = function (t, e, r) { - return (function (t, e, r) { - return f(t), t <= 0 ? a(t) : void 0 !== e ? ('string' == typeof r ? a(t).fill(e, r) : a(t).fill(e)) : a(t); - })(t, e, r); - }), - (h.allocUnsafe = function (t) { - return c(t); - }), - (h.allocUnsafeSlow = function (t) { - return c(t); - }), - (h.isBuffer = function (t) { - return null != t && !0 === t._isBuffer && t !== h.prototype; - }), - (h.compare = function (t, e) { - if ( - (K(t, Uint8Array) && (t = h.from(t, t.offset, t.byteLength)), - K(e, Uint8Array) && (e = h.from(e, e.offset, e.byteLength)), - !h.isBuffer(t) || !h.isBuffer(e)) - ) - throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array'); - if (t === e) return 0; - let r = t.length, - i = e.length; - for (let n = 0, o = Math.min(r, i); n < o; ++n) - if (t[n] !== e[n]) { - (r = t[n]), (i = e[n]); - break; - } - return r < i ? -1 : i < r ? 1 : 0; - }), - (h.isEncoding = function (t) { - switch (String(t).toLowerCase()) { - case 'hex': - case 'utf8': - case 'utf-8': - case 'ascii': - case 'latin1': - case 'binary': - case 'base64': - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return !0; - default: - return !1; - } - }), - (h.concat = function (t, e) { - if (!Array.isArray(t)) throw new TypeError('"list" argument must be an Array of Buffers'); - if (0 === t.length) return h.alloc(0); - let r; - if (void 0 === e) for (e = 0, r = 0; r < t.length; ++r) e += t[r].length; - const i = h.allocUnsafe(e); - let n = 0; - for (r = 0; r < t.length; ++r) { - let e = t[r]; - if (K(e, Uint8Array)) - n + e.length > i.length ? (h.isBuffer(e) || (e = h.from(e)), e.copy(i, n)) : Uint8Array.prototype.set.call(i, e, n); - else { - if (!h.isBuffer(e)) throw new TypeError('"list" argument must be an Array of Buffers'); - e.copy(i, n); - } - n += e.length; - } - return i; - }), - (h.byteLength = m), - (h.prototype._isBuffer = !0), - (h.prototype.swap16 = function () { - const t = this.length; - if (t % 2 != 0) throw new RangeError('Buffer size must be a multiple of 16-bits'); - for (let e = 0; e < t; e += 2) b(this, e, e + 1); - return this; - }), - (h.prototype.swap32 = function () { - const t = this.length; - if (t % 4 != 0) throw new RangeError('Buffer size must be a multiple of 32-bits'); - for (let e = 0; e < t; e += 4) b(this, e, e + 3), b(this, e + 1, e + 2); - return this; - }), - (h.prototype.swap64 = function () { - const t = this.length; - if (t % 8 != 0) throw new RangeError('Buffer size must be a multiple of 64-bits'); - for (let e = 0; e < t; e += 8) b(this, e, e + 7), b(this, e + 1, e + 6), b(this, e + 2, e + 5), b(this, e + 3, e + 4); - return this; - }), - (h.prototype.toString = function () { - const t = this.length; - return 0 === t ? '' : 0 === arguments.length ? A(this, 0, t) : g.apply(this, arguments); - }), - (h.prototype.toLocaleString = h.prototype.toString), - (h.prototype.equals = function (t) { - if (!h.isBuffer(t)) throw new TypeError('Argument must be a Buffer'); - return this === t || 0 === h.compare(this, t); - }), - (h.prototype.inspect = function () { - let t = ''; - const r = e.INSPECT_MAX_BYTES; - return ( - (t = this.toString('hex', 0, r) - .replace(/(.{2})/g, '$1 ') - .trim()), - this.length > r && (t += ' ... '), - '' - ); - }), - o && (h.prototype[o] = h.prototype.inspect), - (h.prototype.compare = function (t, e, r, i, n) { - if ((K(t, Uint8Array) && (t = h.from(t, t.offset, t.byteLength)), !h.isBuffer(t))) - throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type ' + typeof t); - if ( - (void 0 === e && (e = 0), - void 0 === r && (r = t ? t.length : 0), - void 0 === i && (i = 0), - void 0 === n && (n = this.length), - e < 0 || r > t.length || i < 0 || n > this.length) - ) - throw new RangeError('out of range index'); - if (i >= n && e >= r) return 0; - if (i >= n) return -1; - if (e >= r) return 1; - if (this === t) return 0; - let o = (n >>>= 0) - (i >>>= 0), - s = (r >>>= 0) - (e >>>= 0); - const a = Math.min(o, s), - u = this.slice(i, n), - f = t.slice(e, r); - for (let t = 0; t < a; ++t) - if (u[t] !== f[t]) { - (o = u[t]), (s = f[t]); - break; - } - return o < s ? -1 : s < o ? 1 : 0; - }), - (h.prototype.includes = function (t, e, r) { - return -1 !== this.indexOf(t, e, r); - }), - (h.prototype.indexOf = function (t, e, r) { - return y(this, t, e, r, !0); - }), - (h.prototype.lastIndexOf = function (t, e, r) { - return y(this, t, e, r, !1); - }), - (h.prototype.write = function (t, e, r, i) { - if (void 0 === e) (i = 'utf8'), (r = this.length), (e = 0); - else if (void 0 === r && 'string' == typeof e) (i = e), (r = this.length), (e = 0); - else { - if (!isFinite(e)) throw new Error('Buffer.write(string, encoding, offset[, length]) is no longer supported'); - (e >>>= 0), isFinite(r) ? ((r >>>= 0), void 0 === i && (i = 'utf8')) : ((i = r), (r = void 0)); - } - const n = this.length - e; - if (((void 0 === r || r > n) && (r = n), (t.length > 0 && (r < 0 || e < 0)) || e > this.length)) - throw new RangeError('Attempt to write outside buffer bounds'); - i || (i = 'utf8'); - let o = !1; - for (;;) - switch (i) { - case 'hex': - return w(this, t, e, r); - case 'utf8': - case 'utf-8': - return _(this, t, e, r); - case 'ascii': - case 'latin1': - case 'binary': - return M(this, t, e, r); - case 'base64': - return E(this, t, e, r); - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return S(this, t, e, r); - default: - if (o) throw new TypeError('Unknown encoding: ' + i); - (i = ('' + i).toLowerCase()), (o = !0); - } - }), - (h.prototype.toJSON = function () { - return { type: 'Buffer', data: Array.prototype.slice.call(this._arr || this, 0) }; - }); - const k = 4096; - function R(t, e, r) { - let i = ''; - r = Math.min(t.length, r); - for (let n = e; n < r; ++n) i += String.fromCharCode(127 & t[n]); - return i; - } - function B(t, e, r) { - let i = ''; - r = Math.min(t.length, r); - for (let n = e; n < r; ++n) i += String.fromCharCode(t[n]); - return i; - } - function I(t, e, r) { - const i = t.length; - (!e || e < 0) && (e = 0), (!r || r < 0 || r > i) && (r = i); - let n = ''; - for (let i = e; i < r; ++i) n += J[t[i]]; - return n; - } - function T(t, e, r) { - const i = t.slice(e, r); - let n = ''; - for (let t = 0; t < i.length - 1; t += 2) n += String.fromCharCode(i[t] + 256 * i[t + 1]); - return n; - } - function P(t, e, r) { - if (t % 1 != 0 || t < 0) throw new RangeError('offset is not uint'); - if (t + e > r) throw new RangeError('Trying to access beyond buffer length'); - } - function O(t, e, r, i, n, o) { - if (!h.isBuffer(t)) throw new TypeError('"buffer" argument must be a Buffer instance'); - if (e > n || e < o) throw new RangeError('"value" argument is out of bounds'); - if (r + i > t.length) throw new RangeError('Index out of range'); - } - function L(t, e, r, i, n) { - q(e, i, n, t, r, 7); - let o = Number(e & BigInt(4294967295)); - (t[r++] = o), (o >>= 8), (t[r++] = o), (o >>= 8), (t[r++] = o), (o >>= 8), (t[r++] = o); - let s = Number((e >> BigInt(32)) & BigInt(4294967295)); - return (t[r++] = s), (s >>= 8), (t[r++] = s), (s >>= 8), (t[r++] = s), (s >>= 8), (t[r++] = s), r; - } - function C(t, e, r, i, n) { - q(e, i, n, t, r, 7); - let o = Number(e & BigInt(4294967295)); - (t[r + 7] = o), (o >>= 8), (t[r + 6] = o), (o >>= 8), (t[r + 5] = o), (o >>= 8), (t[r + 4] = o); - let s = Number((e >> BigInt(32)) & BigInt(4294967295)); - return (t[r + 3] = s), (s >>= 8), (t[r + 2] = s), (s >>= 8), (t[r + 1] = s), (s >>= 8), (t[r] = s), r + 8; - } - function N(t, e, r, i, n, o) { - if (r + i > t.length) throw new RangeError('Index out of range'); - if (r < 0) throw new RangeError('Index out of range'); - } - function j(t, e, r, i, o) { - return (e = +e), (r >>>= 0), o || N(t, 0, r, 4), n.write(t, e, r, i, 23, 4), r + 4; - } - function U(t, e, r, i, o) { - return (e = +e), (r >>>= 0), o || N(t, 0, r, 8), n.write(t, e, r, i, 52, 8), r + 8; - } - (h.prototype.slice = function (t, e) { - const r = this.length; - (t = ~~t) < 0 ? (t += r) < 0 && (t = 0) : t > r && (t = r), - (e = void 0 === e ? r : ~~e) < 0 ? (e += r) < 0 && (e = 0) : e > r && (e = r), - e < t && (e = t); - const i = this.subarray(t, e); - return Object.setPrototypeOf(i, h.prototype), i; - }), - (h.prototype.readUintLE = h.prototype.readUIntLE = - function (t, e, r) { - (t >>>= 0), (e >>>= 0), r || P(t, e, this.length); - let i = this[t], - n = 1, - o = 0; - for (; ++o < e && (n *= 256); ) i += this[t + o] * n; - return i; - }), - (h.prototype.readUintBE = h.prototype.readUIntBE = - function (t, e, r) { - (t >>>= 0), (e >>>= 0), r || P(t, e, this.length); - let i = this[t + --e], - n = 1; - for (; e > 0 && (n *= 256); ) i += this[t + --e] * n; - return i; - }), - (h.prototype.readUint8 = h.prototype.readUInt8 = - function (t, e) { - return (t >>>= 0), e || P(t, 1, this.length), this[t]; - }), - (h.prototype.readUint16LE = h.prototype.readUInt16LE = - function (t, e) { - return (t >>>= 0), e || P(t, 2, this.length), this[t] | (this[t + 1] << 8); - }), - (h.prototype.readUint16BE = h.prototype.readUInt16BE = - function (t, e) { - return (t >>>= 0), e || P(t, 2, this.length), (this[t] << 8) | this[t + 1]; - }), - (h.prototype.readUint32LE = h.prototype.readUInt32LE = - function (t, e) { - return (t >>>= 0), e || P(t, 4, this.length), (this[t] | (this[t + 1] << 8) | (this[t + 2] << 16)) + 16777216 * this[t + 3]; - }), - (h.prototype.readUint32BE = h.prototype.readUInt32BE = - function (t, e) { - return (t >>>= 0), e || P(t, 4, this.length), 16777216 * this[t] + ((this[t + 1] << 16) | (this[t + 2] << 8) | this[t + 3]); - }), - (h.prototype.readBigUInt64LE = X(function (t) { - H((t >>>= 0), 'offset'); - const e = this[t], - r = this[t + 7]; - (void 0 !== e && void 0 !== r) || $(t, this.length - 8); - const i = e + 256 * this[++t] + 65536 * this[++t] + this[++t] * 2 ** 24, - n = this[++t] + 256 * this[++t] + 65536 * this[++t] + r * 2 ** 24; - return BigInt(i) + (BigInt(n) << BigInt(32)); - })), - (h.prototype.readBigUInt64BE = X(function (t) { - H((t >>>= 0), 'offset'); - const e = this[t], - r = this[t + 7]; - (void 0 !== e && void 0 !== r) || $(t, this.length - 8); - const i = e * 2 ** 24 + 65536 * this[++t] + 256 * this[++t] + this[++t], - n = this[++t] * 2 ** 24 + 65536 * this[++t] + 256 * this[++t] + r; - return (BigInt(i) << BigInt(32)) + BigInt(n); - })), - (h.prototype.readIntLE = function (t, e, r) { - (t >>>= 0), (e >>>= 0), r || P(t, e, this.length); - let i = this[t], - n = 1, - o = 0; - for (; ++o < e && (n *= 256); ) i += this[t + o] * n; - return (n *= 128), i >= n && (i -= Math.pow(2, 8 * e)), i; - }), - (h.prototype.readIntBE = function (t, e, r) { - (t >>>= 0), (e >>>= 0), r || P(t, e, this.length); - let i = e, - n = 1, - o = this[t + --i]; - for (; i > 0 && (n *= 256); ) o += this[t + --i] * n; - return (n *= 128), o >= n && (o -= Math.pow(2, 8 * e)), o; - }), - (h.prototype.readInt8 = function (t, e) { - return (t >>>= 0), e || P(t, 1, this.length), 128 & this[t] ? -1 * (255 - this[t] + 1) : this[t]; - }), - (h.prototype.readInt16LE = function (t, e) { - (t >>>= 0), e || P(t, 2, this.length); - const r = this[t] | (this[t + 1] << 8); - return 32768 & r ? 4294901760 | r : r; - }), - (h.prototype.readInt16BE = function (t, e) { - (t >>>= 0), e || P(t, 2, this.length); - const r = this[t + 1] | (this[t] << 8); - return 32768 & r ? 4294901760 | r : r; - }), - (h.prototype.readInt32LE = function (t, e) { - return (t >>>= 0), e || P(t, 4, this.length), this[t] | (this[t + 1] << 8) | (this[t + 2] << 16) | (this[t + 3] << 24); - }), - (h.prototype.readInt32BE = function (t, e) { - return (t >>>= 0), e || P(t, 4, this.length), (this[t] << 24) | (this[t + 1] << 16) | (this[t + 2] << 8) | this[t + 3]; - }), - (h.prototype.readBigInt64LE = X(function (t) { - H((t >>>= 0), 'offset'); - const e = this[t], - r = this[t + 7]; - (void 0 !== e && void 0 !== r) || $(t, this.length - 8); - const i = this[t + 4] + 256 * this[t + 5] + 65536 * this[t + 6] + (r << 24); - return (BigInt(i) << BigInt(32)) + BigInt(e + 256 * this[++t] + 65536 * this[++t] + this[++t] * 2 ** 24); - })), - (h.prototype.readBigInt64BE = X(function (t) { - H((t >>>= 0), 'offset'); - const e = this[t], - r = this[t + 7]; - (void 0 !== e && void 0 !== r) || $(t, this.length - 8); - const i = (e << 24) + 65536 * this[++t] + 256 * this[++t] + this[++t]; - return (BigInt(i) << BigInt(32)) + BigInt(this[++t] * 2 ** 24 + 65536 * this[++t] + 256 * this[++t] + r); - })), - (h.prototype.readFloatLE = function (t, e) { - return (t >>>= 0), e || P(t, 4, this.length), n.read(this, t, !0, 23, 4); - }), - (h.prototype.readFloatBE = function (t, e) { - return (t >>>= 0), e || P(t, 4, this.length), n.read(this, t, !1, 23, 4); - }), - (h.prototype.readDoubleLE = function (t, e) { - return (t >>>= 0), e || P(t, 8, this.length), n.read(this, t, !0, 52, 8); - }), - (h.prototype.readDoubleBE = function (t, e) { - return (t >>>= 0), e || P(t, 8, this.length), n.read(this, t, !1, 52, 8); - }), - (h.prototype.writeUintLE = h.prototype.writeUIntLE = - function (t, e, r, i) { - (t = +t), (e >>>= 0), (r >>>= 0), i || O(this, t, e, r, Math.pow(2, 8 * r) - 1, 0); - let n = 1, - o = 0; - for (this[e] = 255 & t; ++o < r && (n *= 256); ) this[e + o] = (t / n) & 255; - return e + r; - }), - (h.prototype.writeUintBE = h.prototype.writeUIntBE = - function (t, e, r, i) { - (t = +t), (e >>>= 0), (r >>>= 0), i || O(this, t, e, r, Math.pow(2, 8 * r) - 1, 0); - let n = r - 1, - o = 1; - for (this[e + n] = 255 & t; --n >= 0 && (o *= 256); ) this[e + n] = (t / o) & 255; - return e + r; - }), - (h.prototype.writeUint8 = h.prototype.writeUInt8 = - function (t, e, r) { - return (t = +t), (e >>>= 0), r || O(this, t, e, 1, 255, 0), (this[e] = 255 & t), e + 1; - }), - (h.prototype.writeUint16LE = h.prototype.writeUInt16LE = - function (t, e, r) { - return (t = +t), (e >>>= 0), r || O(this, t, e, 2, 65535, 0), (this[e] = 255 & t), (this[e + 1] = t >>> 8), e + 2; - }), - (h.prototype.writeUint16BE = h.prototype.writeUInt16BE = - function (t, e, r) { - return (t = +t), (e >>>= 0), r || O(this, t, e, 2, 65535, 0), (this[e] = t >>> 8), (this[e + 1] = 255 & t), e + 2; - }), - (h.prototype.writeUint32LE = h.prototype.writeUInt32LE = - function (t, e, r) { - return ( - (t = +t), - (e >>>= 0), - r || O(this, t, e, 4, 4294967295, 0), - (this[e + 3] = t >>> 24), - (this[e + 2] = t >>> 16), - (this[e + 1] = t >>> 8), - (this[e] = 255 & t), - e + 4 - ); - }), - (h.prototype.writeUint32BE = h.prototype.writeUInt32BE = - function (t, e, r) { - return ( - (t = +t), - (e >>>= 0), - r || O(this, t, e, 4, 4294967295, 0), - (this[e] = t >>> 24), - (this[e + 1] = t >>> 16), - (this[e + 2] = t >>> 8), - (this[e + 3] = 255 & t), - e + 4 - ); - }), - (h.prototype.writeBigUInt64LE = X(function (t, e = 0) { - return L(this, t, e, BigInt(0), BigInt('0xffffffffffffffff')); - })), - (h.prototype.writeBigUInt64BE = X(function (t, e = 0) { - return C(this, t, e, BigInt(0), BigInt('0xffffffffffffffff')); - })), - (h.prototype.writeIntLE = function (t, e, r, i) { - if (((t = +t), (e >>>= 0), !i)) { - const i = Math.pow(2, 8 * r - 1); - O(this, t, e, r, i - 1, -i); - } - let n = 0, - o = 1, - s = 0; - for (this[e] = 255 & t; ++n < r && (o *= 256); ) - t < 0 && 0 === s && 0 !== this[e + n - 1] && (s = 1), (this[e + n] = (((t / o) >> 0) - s) & 255); - return e + r; - }), - (h.prototype.writeIntBE = function (t, e, r, i) { - if (((t = +t), (e >>>= 0), !i)) { - const i = Math.pow(2, 8 * r - 1); - O(this, t, e, r, i - 1, -i); - } - let n = r - 1, - o = 1, - s = 0; - for (this[e + n] = 255 & t; --n >= 0 && (o *= 256); ) - t < 0 && 0 === s && 0 !== this[e + n + 1] && (s = 1), (this[e + n] = (((t / o) >> 0) - s) & 255); - return e + r; - }), - (h.prototype.writeInt8 = function (t, e, r) { - return (t = +t), (e >>>= 0), r || O(this, t, e, 1, 127, -128), t < 0 && (t = 255 + t + 1), (this[e] = 255 & t), e + 1; - }), - (h.prototype.writeInt16LE = function (t, e, r) { - return (t = +t), (e >>>= 0), r || O(this, t, e, 2, 32767, -32768), (this[e] = 255 & t), (this[e + 1] = t >>> 8), e + 2; - }), - (h.prototype.writeInt16BE = function (t, e, r) { - return (t = +t), (e >>>= 0), r || O(this, t, e, 2, 32767, -32768), (this[e] = t >>> 8), (this[e + 1] = 255 & t), e + 2; - }), - (h.prototype.writeInt32LE = function (t, e, r) { - return ( - (t = +t), - (e >>>= 0), - r || O(this, t, e, 4, 2147483647, -2147483648), - (this[e] = 255 & t), - (this[e + 1] = t >>> 8), - (this[e + 2] = t >>> 16), - (this[e + 3] = t >>> 24), - e + 4 - ); - }), - (h.prototype.writeInt32BE = function (t, e, r) { - return ( - (t = +t), - (e >>>= 0), - r || O(this, t, e, 4, 2147483647, -2147483648), - t < 0 && (t = 4294967295 + t + 1), - (this[e] = t >>> 24), - (this[e + 1] = t >>> 16), - (this[e + 2] = t >>> 8), - (this[e + 3] = 255 & t), - e + 4 - ); - }), - (h.prototype.writeBigInt64LE = X(function (t, e = 0) { - return L(this, t, e, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff')); - })), - (h.prototype.writeBigInt64BE = X(function (t, e = 0) { - return C(this, t, e, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff')); - })), - (h.prototype.writeFloatLE = function (t, e, r) { - return j(this, t, e, !0, r); - }), - (h.prototype.writeFloatBE = function (t, e, r) { - return j(this, t, e, !1, r); - }), - (h.prototype.writeDoubleLE = function (t, e, r) { - return U(this, t, e, !0, r); - }), - (h.prototype.writeDoubleBE = function (t, e, r) { - return U(this, t, e, !1, r); - }), - (h.prototype.copy = function (t, e, r, i) { - if (!h.isBuffer(t)) throw new TypeError('argument should be a Buffer'); - if ( - (r || (r = 0), - i || 0 === i || (i = this.length), - e >= t.length && (e = t.length), - e || (e = 0), - i > 0 && i < r && (i = r), - i === r) - ) - return 0; - if (0 === t.length || 0 === this.length) return 0; - if (e < 0) throw new RangeError('targetStart out of bounds'); - if (r < 0 || r >= this.length) throw new RangeError('Index out of range'); - if (i < 0) throw new RangeError('sourceEnd out of bounds'); - i > this.length && (i = this.length), t.length - e < i - r && (i = t.length - e + r); - const n = i - r; - return ( - this === t && 'function' == typeof Uint8Array.prototype.copyWithin - ? this.copyWithin(e, r, i) - : Uint8Array.prototype.set.call(t, this.subarray(r, i), e), - n - ); - }), - (h.prototype.fill = function (t, e, r, i) { - if ('string' == typeof t) { - if ( - ('string' == typeof e ? ((i = e), (e = 0), (r = this.length)) : 'string' == typeof r && ((i = r), (r = this.length)), - void 0 !== i && 'string' != typeof i) - ) - throw new TypeError('encoding must be a string'); - if ('string' == typeof i && !h.isEncoding(i)) throw new TypeError('Unknown encoding: ' + i); - if (1 === t.length) { - const e = t.charCodeAt(0); - (('utf8' === i && e < 128) || 'latin1' === i) && (t = e); - } - } else 'number' == typeof t ? (t &= 255) : 'boolean' == typeof t && (t = Number(t)); - if (e < 0 || this.length < e || this.length < r) throw new RangeError('Out of range index'); - if (r <= e) return this; - let n; - if (((e >>>= 0), (r = void 0 === r ? this.length : r >>> 0), t || (t = 0), 'number' == typeof t)) - for (n = e; n < r; ++n) this[n] = t; - else { - const o = h.isBuffer(t) ? t : h.from(t, i), - s = o.length; - if (0 === s) throw new TypeError('The value "' + t + '" is invalid for argument "value"'); - for (n = 0; n < r - e; ++n) this[n + e] = o[n % s]; - } - return this; - }); - const D = {}; - function z(t, e, r) { - D[t] = class extends r { - constructor() { - super(), - Object.defineProperty(this, 'message', { value: e.apply(this, arguments), writable: !0, configurable: !0 }), - (this.name = `${this.name} [${t}]`), - this.stack, - delete this.name; - } - get code() { - return t; - } - set code(t) { - Object.defineProperty(this, 'code', { configurable: !0, enumerable: !0, value: t, writable: !0 }); - } - toString() { - return `${this.name} [${t}]: ${this.message}`; - } - }; - } - function F(t) { - let e = '', - r = t.length; - const i = '-' === t[0] ? 1 : 0; - for (; r >= i + 4; r -= 3) e = `_${t.slice(r - 3, r)}${e}`; - return `${t.slice(0, r)}${e}`; - } - function q(t, e, r, i, n, o) { - if (t > r || t < e) { - const i = 'bigint' == typeof e ? 'n' : ''; - let n; - throw ( - ((n = - o > 3 - ? 0 === e || e === BigInt(0) - ? `>= 0${i} and < 2${i} ** ${8 * (o + 1)}${i}` - : `>= -(2${i} ** ${8 * (o + 1) - 1}${i}) and < 2 ** ${8 * (o + 1) - 1}${i}` - : `>= ${e}${i} and <= ${r}${i}`), - new D.ERR_OUT_OF_RANGE('value', n, t)) - ); - } - !(function (t, e, r) { - H(e, 'offset'), (void 0 !== t[e] && void 0 !== t[e + r]) || $(e, t.length - (r + 1)); - })(i, n, o); - } - function H(t, e) { - if ('number' != typeof t) throw new D.ERR_INVALID_ARG_TYPE(e, 'number', t); - } - function $(t, e, r) { - if (Math.floor(t) !== t) throw (H(t, r), new D.ERR_OUT_OF_RANGE(r || 'offset', 'an integer', t)); - if (e < 0) throw new D.ERR_BUFFER_OUT_OF_BOUNDS(); - throw new D.ERR_OUT_OF_RANGE(r || 'offset', `>= ${r ? 1 : 0} and <= ${e}`, t); - } - z( - 'ERR_BUFFER_OUT_OF_BOUNDS', - function (t) { - return t ? `${t} is outside of buffer bounds` : 'Attempt to access memory outside buffer bounds'; - }, - RangeError - ), - z( - 'ERR_INVALID_ARG_TYPE', - function (t, e) { - return `The "${t}" argument must be of type number. Received type ${typeof e}`; - }, - TypeError - ), - z( - 'ERR_OUT_OF_RANGE', - function (t, e, r) { - let i = `The value of "${t}" is out of range.`, - n = r; - return ( - Number.isInteger(r) && Math.abs(r) > 2 ** 32 - ? (n = F(String(r))) - : 'bigint' == typeof r && - ((n = String(r)), (r > BigInt(2) ** BigInt(32) || r < -(BigInt(2) ** BigInt(32))) && (n = F(n)), (n += 'n')), - (i += ` It must be ${e}. Received ${n}`), - i - ); - }, - RangeError - ); - const Z = /[^+/0-9A-Za-z-_]/g; - function G(t, e) { - let r; - e = e || 1 / 0; - const i = t.length; - let n = null; - const o = []; - for (let s = 0; s < i; ++s) { - if (((r = t.charCodeAt(s)), r > 55295 && r < 57344)) { - if (!n) { - if (r > 56319) { - (e -= 3) > -1 && o.push(239, 191, 189); - continue; - } - if (s + 1 === i) { - (e -= 3) > -1 && o.push(239, 191, 189); - continue; - } - n = r; - continue; - } - if (r < 56320) { - (e -= 3) > -1 && o.push(239, 191, 189), (n = r); - continue; - } - r = 65536 + (((n - 55296) << 10) | (r - 56320)); - } else n && (e -= 3) > -1 && o.push(239, 191, 189); - if (((n = null), r < 128)) { - if ((e -= 1) < 0) break; - o.push(r); - } else if (r < 2048) { - if ((e -= 2) < 0) break; - o.push((r >> 6) | 192, (63 & r) | 128); - } else if (r < 65536) { - if ((e -= 3) < 0) break; - o.push((r >> 12) | 224, ((r >> 6) & 63) | 128, (63 & r) | 128); - } else { - if (!(r < 1114112)) throw new Error('Invalid code point'); - if ((e -= 4) < 0) break; - o.push((r >> 18) | 240, ((r >> 12) & 63) | 128, ((r >> 6) & 63) | 128, (63 & r) | 128); - } - } - return o; - } - function V(t) { - return i.toByteArray( - (function (t) { - if ((t = (t = t.split('=')[0]).trim().replace(Z, '')).length < 2) return ''; - for (; t.length % 4 != 0; ) t += '='; - return t; - })(t) - ); - } - function W(t, e, r, i) { - let n; - for (n = 0; n < i && !(n + r >= e.length || n >= t.length); ++n) e[n + r] = t[n]; - return n; - } - function K(t, e) { - return t instanceof e || (null != t && null != t.constructor && null != t.constructor.name && t.constructor.name === e.name); - } - function Y(t) { - return t != t; - } - const J = (function () { - const t = '0123456789abcdef', - e = new Array(256); - for (let r = 0; r < 16; ++r) { - const i = 16 * r; - for (let n = 0; n < 16; ++n) e[i + n] = t[r] + t[n]; - } - return e; - })(); - function X(t) { - return 'undefined' == typeof BigInt ? Q : t; - } - function Q() { - throw new Error('BigInt not supported'); - } - }, - 3081: (t, e, r) => { - var i = r(7172).Buffer, - n = r(3424).Transform, - o = r(4361).s; - function s(t) { - n.call(this), - (this.hashMode = 'string' == typeof t), - this.hashMode ? (this[t] = this._finalOrDigest) : (this.final = this._finalOrDigest), - this._final && ((this.__final = this._final), (this._final = null)), - (this._decoder = null), - (this._encoding = null); - } - r(87)(s, n), - (s.prototype.update = function (t, e, r) { - 'string' == typeof t && (t = i.from(t, e)); - var n = this._update(t); - return this.hashMode ? this : (r && (n = this._toString(n, r)), n); - }), - (s.prototype.setAutoPadding = function () {}), - (s.prototype.getAuthTag = function () { - throw new Error('trying to get auth tag in unsupported state'); - }), - (s.prototype.setAuthTag = function () { - throw new Error('trying to set auth tag in unsupported state'); - }), - (s.prototype.setAAD = function () { - throw new Error('trying to set aad in unsupported state'); - }), - (s.prototype._transform = function (t, e, r) { - var i; - try { - this.hashMode ? this._update(t) : this.push(this._update(t)); - } catch (t) { - i = t; - } finally { - r(i); - } - }), - (s.prototype._flush = function (t) { - var e; - try { - this.push(this.__final()); - } catch (t) { - e = t; - } - t(e); - }), - (s.prototype._finalOrDigest = function (t) { - var e = this.__final() || i.alloc(0); - return t && (e = this._toString(e, t, !0)), e; - }), - (s.prototype._toString = function (t, e, r) { - if ((this._decoder || ((this._decoder = new o(e)), (this._encoding = e)), this._encoding !== e)) - throw new Error("can't switch encodings"); - var i = this._decoder.write(t); - return r && (i += this._decoder.end()), i; - }), - (t.exports = s); - }, - 2220: (t, e, r) => { - var i = r(9749), - n = r(3626); - t.exports = function (t) { - return new s(t); - }; - var o = { - secp256k1: { name: 'secp256k1', byteLength: 32 }, - secp224r1: { name: 'p224', byteLength: 28 }, - prime256v1: { name: 'p256', byteLength: 32 }, - prime192v1: { name: 'p192', byteLength: 24 }, - ed25519: { name: 'ed25519', byteLength: 32 }, - secp384r1: { name: 'p384', byteLength: 48 }, - secp521r1: { name: 'p521', byteLength: 66 }, - }; - function s(t) { - (this.curveType = o[t]), - this.curveType || (this.curveType = { name: t }), - (this.curve = new i.ec(this.curveType.name)), - (this.keys = void 0); - } - function a(t, e, r) { - Array.isArray(t) || (t = t.toArray()); - var i = new Buffer(t); - if (r && i.length < r) { - var n = new Buffer(r - i.length); - n.fill(0), (i = Buffer.concat([n, i])); - } - return e ? i.toString(e) : i; - } - (o.p224 = o.secp224r1), - (o.p256 = o.secp256r1 = o.prime256v1), - (o.p192 = o.secp192r1 = o.prime192v1), - (o.p384 = o.secp384r1), - (o.p521 = o.secp521r1), - (s.prototype.generateKeys = function (t, e) { - return (this.keys = this.curve.genKeyPair()), this.getPublicKey(t, e); - }), - (s.prototype.computeSecret = function (t, e, r) { - return ( - (e = e || 'utf8'), - Buffer.isBuffer(t) || (t = new Buffer(t, e)), - a(this.curve.keyFromPublic(t).getPublic().mul(this.keys.getPrivate()).getX(), r, this.curveType.byteLength) - ); - }), - (s.prototype.getPublicKey = function (t, e) { - var r = this.keys.getPublic('compressed' === e, !0); - return 'hybrid' === e && (r[r.length - 1] % 2 ? (r[0] = 7) : (r[0] = 6)), a(r, t); - }), - (s.prototype.getPrivateKey = function (t) { - return a(this.keys.getPrivate(), t); - }), - (s.prototype.setPublicKey = function (t, e) { - return (e = e || 'utf8'), Buffer.isBuffer(t) || (t = new Buffer(t, e)), this.keys._importPublic(t), this; - }), - (s.prototype.setPrivateKey = function (t, e) { - (e = e || 'utf8'), Buffer.isBuffer(t) || (t = new Buffer(t, e)); - var r = new n(t); - return (r = r.toString(16)), (this.keys = this.curve.genKeyPair()), this.keys._importPrivate(r), this; - }); - }, - 3626: function (t, e, r) { - !(function (t, e) { - 'use strict'; - function i(t, e) { - if (!t) throw new Error(e || 'Assertion failed'); - } - function n(t, e) { - t.super_ = e; - var r = function () {}; - (r.prototype = e.prototype), (t.prototype = new r()), (t.prototype.constructor = t); - } - function o(t, e, r) { - if (o.isBN(t)) return t; - (this.negative = 0), - (this.words = null), - (this.length = 0), - (this.red = null), - null !== t && (('le' !== e && 'be' !== e) || ((r = e), (e = 10)), this._init(t || 0, e || 10, r || 'be')); - } - var s; - 'object' == typeof t ? (t.exports = o) : (e.BN = o), (o.BN = o), (o.wordSize = 26); - try { - s = 'undefined' != typeof window && void 0 !== window.Buffer ? window.Buffer : r(6611).Buffer; - } catch (t) {} - function a(t, e) { - var r = t.charCodeAt(e); - return r >= 65 && r <= 70 ? r - 55 : r >= 97 && r <= 102 ? r - 87 : (r - 48) & 15; - } - function h(t, e, r) { - var i = a(t, r); - return r - 1 >= e && (i |= a(t, r - 1) << 4), i; - } - function u(t, e, r, i) { - for (var n = 0, o = Math.min(t.length, r), s = e; s < o; s++) { - var a = t.charCodeAt(s) - 48; - (n *= i), (n += a >= 49 ? a - 49 + 10 : a >= 17 ? a - 17 + 10 : a); - } - return n; - } - (o.isBN = function (t) { - return ( - t instanceof o || (null !== t && 'object' == typeof t && t.constructor.wordSize === o.wordSize && Array.isArray(t.words)) - ); - }), - (o.max = function (t, e) { - return t.cmp(e) > 0 ? t : e; - }), - (o.min = function (t, e) { - return t.cmp(e) < 0 ? t : e; - }), - (o.prototype._init = function (t, e, r) { - if ('number' == typeof t) return this._initNumber(t, e, r); - if ('object' == typeof t) return this._initArray(t, e, r); - 'hex' === e && (e = 16), i(e === (0 | e) && e >= 2 && e <= 36); - var n = 0; - '-' === (t = t.toString().replace(/\s+/g, ''))[0] && (n++, (this.negative = 1)), - n < t.length && - (16 === e ? this._parseHex(t, n, r) : (this._parseBase(t, e, n), 'le' === r && this._initArray(this.toArray(), e, r))); - }), - (o.prototype._initNumber = function (t, e, r) { - t < 0 && ((this.negative = 1), (t = -t)), - t < 67108864 - ? ((this.words = [67108863 & t]), (this.length = 1)) - : t < 4503599627370496 - ? ((this.words = [67108863 & t, (t / 67108864) & 67108863]), (this.length = 2)) - : (i(t < 9007199254740992), (this.words = [67108863 & t, (t / 67108864) & 67108863, 1]), (this.length = 3)), - 'le' === r && this._initArray(this.toArray(), e, r); - }), - (o.prototype._initArray = function (t, e, r) { - if ((i('number' == typeof t.length), t.length <= 0)) return (this.words = [0]), (this.length = 1), this; - (this.length = Math.ceil(t.length / 3)), (this.words = new Array(this.length)); - for (var n = 0; n < this.length; n++) this.words[n] = 0; - var o, - s, - a = 0; - if ('be' === r) - for (n = t.length - 1, o = 0; n >= 0; n -= 3) - (s = t[n] | (t[n - 1] << 8) | (t[n - 2] << 16)), - (this.words[o] |= (s << a) & 67108863), - (this.words[o + 1] = (s >>> (26 - a)) & 67108863), - (a += 24) >= 26 && ((a -= 26), o++); - else if ('le' === r) - for (n = 0, o = 0; n < t.length; n += 3) - (s = t[n] | (t[n + 1] << 8) | (t[n + 2] << 16)), - (this.words[o] |= (s << a) & 67108863), - (this.words[o + 1] = (s >>> (26 - a)) & 67108863), - (a += 24) >= 26 && ((a -= 26), o++); - return this.strip(); - }), - (o.prototype._parseHex = function (t, e, r) { - (this.length = Math.ceil((t.length - e) / 6)), (this.words = new Array(this.length)); - for (var i = 0; i < this.length; i++) this.words[i] = 0; - var n, - o = 0, - s = 0; - if ('be' === r) - for (i = t.length - 1; i >= e; i -= 2) - (n = h(t, e, i) << o), - (this.words[s] |= 67108863 & n), - o >= 18 ? ((o -= 18), (s += 1), (this.words[s] |= n >>> 26)) : (o += 8); - else - for (i = (t.length - e) % 2 == 0 ? e + 1 : e; i < t.length; i += 2) - (n = h(t, e, i) << o), - (this.words[s] |= 67108863 & n), - o >= 18 ? ((o -= 18), (s += 1), (this.words[s] |= n >>> 26)) : (o += 8); - this.strip(); - }), - (o.prototype._parseBase = function (t, e, r) { - (this.words = [0]), (this.length = 1); - for (var i = 0, n = 1; n <= 67108863; n *= e) i++; - i--, (n = (n / e) | 0); - for (var o = t.length - r, s = o % i, a = Math.min(o, o - s) + r, h = 0, f = r; f < a; f += i) - (h = u(t, f, f + i, e)), this.imuln(n), this.words[0] + h < 67108864 ? (this.words[0] += h) : this._iaddn(h); - if (0 !== s) { - var c = 1; - for (h = u(t, f, t.length, e), f = 0; f < s; f++) c *= e; - this.imuln(c), this.words[0] + h < 67108864 ? (this.words[0] += h) : this._iaddn(h); - } - this.strip(); - }), - (o.prototype.copy = function (t) { - t.words = new Array(this.length); - for (var e = 0; e < this.length; e++) t.words[e] = this.words[e]; - (t.length = this.length), (t.negative = this.negative), (t.red = this.red); - }), - (o.prototype.clone = function () { - var t = new o(null); - return this.copy(t), t; - }), - (o.prototype._expand = function (t) { - for (; this.length < t; ) this.words[this.length++] = 0; - return this; - }), - (o.prototype.strip = function () { - for (; this.length > 1 && 0 === this.words[this.length - 1]; ) this.length--; - return this._normSign(); - }), - (o.prototype._normSign = function () { - return 1 === this.length && 0 === this.words[0] && (this.negative = 0), this; - }), - (o.prototype.inspect = function () { - return (this.red ? ''; - }); - var f = [ - '', - '0', - '00', - '000', - '0000', - '00000', - '000000', - '0000000', - '00000000', - '000000000', - '0000000000', - '00000000000', - '000000000000', - '0000000000000', - '00000000000000', - '000000000000000', - '0000000000000000', - '00000000000000000', - '000000000000000000', - '0000000000000000000', - '00000000000000000000', - '000000000000000000000', - '0000000000000000000000', - '00000000000000000000000', - '000000000000000000000000', - '0000000000000000000000000', - ], - c = [0, 0, 25, 16, 12, 11, 10, 9, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5], - l = [ - 0, 0, 33554432, 43046721, 16777216, 48828125, 60466176, 40353607, 16777216, 43046721, 1e7, 19487171, 35831808, 62748517, - 7529536, 11390625, 16777216, 24137569, 34012224, 47045881, 64e6, 4084101, 5153632, 6436343, 7962624, 9765625, 11881376, - 14348907, 17210368, 20511149, 243e5, 28629151, 33554432, 39135393, 45435424, 52521875, 60466176, - ]; - function d(t, e, r) { - r.negative = e.negative ^ t.negative; - var i = (t.length + e.length) | 0; - (r.length = i), (i = (i - 1) | 0); - var n = 0 | t.words[0], - o = 0 | e.words[0], - s = n * o, - a = 67108863 & s, - h = (s / 67108864) | 0; - r.words[0] = a; - for (var u = 1; u < i; u++) { - for (var f = h >>> 26, c = 67108863 & h, l = Math.min(u, e.length - 1), d = Math.max(0, u - t.length + 1); d <= l; d++) { - var p = (u - d) | 0; - (f += ((s = (n = 0 | t.words[p]) * (o = 0 | e.words[d]) + c) / 67108864) | 0), (c = 67108863 & s); - } - (r.words[u] = 0 | c), (h = 0 | f); - } - return 0 !== h ? (r.words[u] = 0 | h) : r.length--, r.strip(); - } - (o.prototype.toString = function (t, e) { - var r; - if (((e = 0 | e || 1), 16 === (t = t || 10) || 'hex' === t)) { - r = ''; - for (var n = 0, o = 0, s = 0; s < this.length; s++) { - var a = this.words[s], - h = (16777215 & ((a << n) | o)).toString(16); - (r = 0 != (o = (a >>> (24 - n)) & 16777215) || s !== this.length - 1 ? f[6 - h.length] + h + r : h + r), - (n += 2) >= 26 && ((n -= 26), s--); - } - for (0 !== o && (r = o.toString(16) + r); r.length % e != 0; ) r = '0' + r; - return 0 !== this.negative && (r = '-' + r), r; - } - if (t === (0 | t) && t >= 2 && t <= 36) { - var u = c[t], - d = l[t]; - r = ''; - var p = this.clone(); - for (p.negative = 0; !p.isZero(); ) { - var m = p.modn(d).toString(t); - r = (p = p.idivn(d)).isZero() ? m + r : f[u - m.length] + m + r; - } - for (this.isZero() && (r = '0' + r); r.length % e != 0; ) r = '0' + r; - return 0 !== this.negative && (r = '-' + r), r; - } - i(!1, 'Base should be between 2 and 36'); - }), - (o.prototype.toNumber = function () { - var t = this.words[0]; - return ( - 2 === this.length - ? (t += 67108864 * this.words[1]) - : 3 === this.length && 1 === this.words[2] - ? (t += 4503599627370496 + 67108864 * this.words[1]) - : this.length > 2 && i(!1, 'Number can only safely store up to 53 bits'), - 0 !== this.negative ? -t : t - ); - }), - (o.prototype.toJSON = function () { - return this.toString(16); - }), - (o.prototype.toBuffer = function (t, e) { - return i(void 0 !== s), this.toArrayLike(s, t, e); - }), - (o.prototype.toArray = function (t, e) { - return this.toArrayLike(Array, t, e); - }), - (o.prototype.toArrayLike = function (t, e, r) { - var n = this.byteLength(), - o = r || Math.max(1, n); - i(n <= o, 'byte array longer than desired length'), i(o > 0, 'Requested array length <= 0'), this.strip(); - var s, - a, - h = 'le' === e, - u = new t(o), - f = this.clone(); - if (h) { - for (a = 0; !f.isZero(); a++) (s = f.andln(255)), f.iushrn(8), (u[a] = s); - for (; a < o; a++) u[a] = 0; - } else { - for (a = 0; a < o - n; a++) u[a] = 0; - for (a = 0; !f.isZero(); a++) (s = f.andln(255)), f.iushrn(8), (u[o - a - 1] = s); - } - return u; - }), - Math.clz32 - ? (o.prototype._countBits = function (t) { - return 32 - Math.clz32(t); - }) - : (o.prototype._countBits = function (t) { - var e = t, - r = 0; - return ( - e >= 4096 && ((r += 13), (e >>>= 13)), - e >= 64 && ((r += 7), (e >>>= 7)), - e >= 8 && ((r += 4), (e >>>= 4)), - e >= 2 && ((r += 2), (e >>>= 2)), - r + e - ); - }), - (o.prototype._zeroBits = function (t) { - if (0 === t) return 26; - var e = t, - r = 0; - return ( - 0 == (8191 & e) && ((r += 13), (e >>>= 13)), - 0 == (127 & e) && ((r += 7), (e >>>= 7)), - 0 == (15 & e) && ((r += 4), (e >>>= 4)), - 0 == (3 & e) && ((r += 2), (e >>>= 2)), - 0 == (1 & e) && r++, - r - ); - }), - (o.prototype.bitLength = function () { - var t = this.words[this.length - 1], - e = this._countBits(t); - return 26 * (this.length - 1) + e; - }), - (o.prototype.zeroBits = function () { - if (this.isZero()) return 0; - for (var t = 0, e = 0; e < this.length; e++) { - var r = this._zeroBits(this.words[e]); - if (((t += r), 26 !== r)) break; - } - return t; - }), - (o.prototype.byteLength = function () { - return Math.ceil(this.bitLength() / 8); - }), - (o.prototype.toTwos = function (t) { - return 0 !== this.negative ? this.abs().inotn(t).iaddn(1) : this.clone(); - }), - (o.prototype.fromTwos = function (t) { - return this.testn(t - 1) ? this.notn(t).iaddn(1).ineg() : this.clone(); - }), - (o.prototype.isNeg = function () { - return 0 !== this.negative; - }), - (o.prototype.neg = function () { - return this.clone().ineg(); - }), - (o.prototype.ineg = function () { - return this.isZero() || (this.negative ^= 1), this; - }), - (o.prototype.iuor = function (t) { - for (; this.length < t.length; ) this.words[this.length++] = 0; - for (var e = 0; e < t.length; e++) this.words[e] = this.words[e] | t.words[e]; - return this.strip(); - }), - (o.prototype.ior = function (t) { - return i(0 == (this.negative | t.negative)), this.iuor(t); - }), - (o.prototype.or = function (t) { - return this.length > t.length ? this.clone().ior(t) : t.clone().ior(this); - }), - (o.prototype.uor = function (t) { - return this.length > t.length ? this.clone().iuor(t) : t.clone().iuor(this); - }), - (o.prototype.iuand = function (t) { - var e; - e = this.length > t.length ? t : this; - for (var r = 0; r < e.length; r++) this.words[r] = this.words[r] & t.words[r]; - return (this.length = e.length), this.strip(); - }), - (o.prototype.iand = function (t) { - return i(0 == (this.negative | t.negative)), this.iuand(t); - }), - (o.prototype.and = function (t) { - return this.length > t.length ? this.clone().iand(t) : t.clone().iand(this); - }), - (o.prototype.uand = function (t) { - return this.length > t.length ? this.clone().iuand(t) : t.clone().iuand(this); - }), - (o.prototype.iuxor = function (t) { - var e, r; - this.length > t.length ? ((e = this), (r = t)) : ((e = t), (r = this)); - for (var i = 0; i < r.length; i++) this.words[i] = e.words[i] ^ r.words[i]; - if (this !== e) for (; i < e.length; i++) this.words[i] = e.words[i]; - return (this.length = e.length), this.strip(); - }), - (o.prototype.ixor = function (t) { - return i(0 == (this.negative | t.negative)), this.iuxor(t); - }), - (o.prototype.xor = function (t) { - return this.length > t.length ? this.clone().ixor(t) : t.clone().ixor(this); - }), - (o.prototype.uxor = function (t) { - return this.length > t.length ? this.clone().iuxor(t) : t.clone().iuxor(this); - }), - (o.prototype.inotn = function (t) { - i('number' == typeof t && t >= 0); - var e = 0 | Math.ceil(t / 26), - r = t % 26; - this._expand(e), r > 0 && e--; - for (var n = 0; n < e; n++) this.words[n] = 67108863 & ~this.words[n]; - return r > 0 && (this.words[n] = ~this.words[n] & (67108863 >> (26 - r))), this.strip(); - }), - (o.prototype.notn = function (t) { - return this.clone().inotn(t); - }), - (o.prototype.setn = function (t, e) { - i('number' == typeof t && t >= 0); - var r = (t / 26) | 0, - n = t % 26; - return this._expand(r + 1), (this.words[r] = e ? this.words[r] | (1 << n) : this.words[r] & ~(1 << n)), this.strip(); - }), - (o.prototype.iadd = function (t) { - var e, r, i; - if (0 !== this.negative && 0 === t.negative) - return (this.negative = 0), (e = this.isub(t)), (this.negative ^= 1), this._normSign(); - if (0 === this.negative && 0 !== t.negative) return (t.negative = 0), (e = this.isub(t)), (t.negative = 1), e._normSign(); - this.length > t.length ? ((r = this), (i = t)) : ((r = t), (i = this)); - for (var n = 0, o = 0; o < i.length; o++) - (e = (0 | r.words[o]) + (0 | i.words[o]) + n), (this.words[o] = 67108863 & e), (n = e >>> 26); - for (; 0 !== n && o < r.length; o++) (e = (0 | r.words[o]) + n), (this.words[o] = 67108863 & e), (n = e >>> 26); - if (((this.length = r.length), 0 !== n)) (this.words[this.length] = n), this.length++; - else if (r !== this) for (; o < r.length; o++) this.words[o] = r.words[o]; - return this; - }), - (o.prototype.add = function (t) { - var e; - return 0 !== t.negative && 0 === this.negative - ? ((t.negative = 0), (e = this.sub(t)), (t.negative ^= 1), e) - : 0 === t.negative && 0 !== this.negative - ? ((this.negative = 0), (e = t.sub(this)), (this.negative = 1), e) - : this.length > t.length - ? this.clone().iadd(t) - : t.clone().iadd(this); - }), - (o.prototype.isub = function (t) { - if (0 !== t.negative) { - t.negative = 0; - var e = this.iadd(t); - return (t.negative = 1), e._normSign(); - } - if (0 !== this.negative) return (this.negative = 0), this.iadd(t), (this.negative = 1), this._normSign(); - var r, - i, - n = this.cmp(t); - if (0 === n) return (this.negative = 0), (this.length = 1), (this.words[0] = 0), this; - n > 0 ? ((r = this), (i = t)) : ((r = t), (i = this)); - for (var o = 0, s = 0; s < i.length; s++) - (o = (e = (0 | r.words[s]) - (0 | i.words[s]) + o) >> 26), (this.words[s] = 67108863 & e); - for (; 0 !== o && s < r.length; s++) (o = (e = (0 | r.words[s]) + o) >> 26), (this.words[s] = 67108863 & e); - if (0 === o && s < r.length && r !== this) for (; s < r.length; s++) this.words[s] = r.words[s]; - return (this.length = Math.max(this.length, s)), r !== this && (this.negative = 1), this.strip(); - }), - (o.prototype.sub = function (t) { - return this.clone().isub(t); - }); - var p = function (t, e, r) { - var i, - n, - o, - s = t.words, - a = e.words, - h = r.words, - u = 0, - f = 0 | s[0], - c = 8191 & f, - l = f >>> 13, - d = 0 | s[1], - p = 8191 & d, - m = d >>> 13, - g = 0 | s[2], - b = 8191 & g, - y = g >>> 13, - v = 0 | s[3], - w = 8191 & v, - _ = v >>> 13, - M = 0 | s[4], - E = 8191 & M, - S = M >>> 13, - x = 0 | s[5], - A = 8191 & x, - k = x >>> 13, - R = 0 | s[6], - B = 8191 & R, - I = R >>> 13, - T = 0 | s[7], - P = 8191 & T, - O = T >>> 13, - L = 0 | s[8], - C = 8191 & L, - N = L >>> 13, - j = 0 | s[9], - U = 8191 & j, - D = j >>> 13, - z = 0 | a[0], - F = 8191 & z, - q = z >>> 13, - H = 0 | a[1], - $ = 8191 & H, - Z = H >>> 13, - G = 0 | a[2], - V = 8191 & G, - W = G >>> 13, - K = 0 | a[3], - Y = 8191 & K, - J = K >>> 13, - X = 0 | a[4], - Q = 8191 & X, - tt = X >>> 13, - et = 0 | a[5], - rt = 8191 & et, - it = et >>> 13, - nt = 0 | a[6], - ot = 8191 & nt, - st = nt >>> 13, - at = 0 | a[7], - ht = 8191 & at, - ut = at >>> 13, - ft = 0 | a[8], - ct = 8191 & ft, - lt = ft >>> 13, - dt = 0 | a[9], - pt = 8191 & dt, - mt = dt >>> 13; - (r.negative = t.negative ^ e.negative), (r.length = 19); - var gt = (((u + (i = Math.imul(c, F))) | 0) + ((8191 & (n = ((n = Math.imul(c, q)) + Math.imul(l, F)) | 0)) << 13)) | 0; - (u = ((((o = Math.imul(l, q)) + (n >>> 13)) | 0) + (gt >>> 26)) | 0), - (gt &= 67108863), - (i = Math.imul(p, F)), - (n = ((n = Math.imul(p, q)) + Math.imul(m, F)) | 0), - (o = Math.imul(m, q)); - var bt = - (((u + (i = (i + Math.imul(c, $)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, Z)) | 0) + Math.imul(l, $)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, Z)) | 0) + (n >>> 13)) | 0) + (bt >>> 26)) | 0), - (bt &= 67108863), - (i = Math.imul(b, F)), - (n = ((n = Math.imul(b, q)) + Math.imul(y, F)) | 0), - (o = Math.imul(y, q)), - (i = (i + Math.imul(p, $)) | 0), - (n = ((n = (n + Math.imul(p, Z)) | 0) + Math.imul(m, $)) | 0), - (o = (o + Math.imul(m, Z)) | 0); - var yt = - (((u + (i = (i + Math.imul(c, V)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, W)) | 0) + Math.imul(l, V)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, W)) | 0) + (n >>> 13)) | 0) + (yt >>> 26)) | 0), - (yt &= 67108863), - (i = Math.imul(w, F)), - (n = ((n = Math.imul(w, q)) + Math.imul(_, F)) | 0), - (o = Math.imul(_, q)), - (i = (i + Math.imul(b, $)) | 0), - (n = ((n = (n + Math.imul(b, Z)) | 0) + Math.imul(y, $)) | 0), - (o = (o + Math.imul(y, Z)) | 0), - (i = (i + Math.imul(p, V)) | 0), - (n = ((n = (n + Math.imul(p, W)) | 0) + Math.imul(m, V)) | 0), - (o = (o + Math.imul(m, W)) | 0); - var vt = - (((u + (i = (i + Math.imul(c, Y)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, J)) | 0) + Math.imul(l, Y)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, J)) | 0) + (n >>> 13)) | 0) + (vt >>> 26)) | 0), - (vt &= 67108863), - (i = Math.imul(E, F)), - (n = ((n = Math.imul(E, q)) + Math.imul(S, F)) | 0), - (o = Math.imul(S, q)), - (i = (i + Math.imul(w, $)) | 0), - (n = ((n = (n + Math.imul(w, Z)) | 0) + Math.imul(_, $)) | 0), - (o = (o + Math.imul(_, Z)) | 0), - (i = (i + Math.imul(b, V)) | 0), - (n = ((n = (n + Math.imul(b, W)) | 0) + Math.imul(y, V)) | 0), - (o = (o + Math.imul(y, W)) | 0), - (i = (i + Math.imul(p, Y)) | 0), - (n = ((n = (n + Math.imul(p, J)) | 0) + Math.imul(m, Y)) | 0), - (o = (o + Math.imul(m, J)) | 0); - var wt = - (((u + (i = (i + Math.imul(c, Q)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, tt)) | 0) + Math.imul(l, Q)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, tt)) | 0) + (n >>> 13)) | 0) + (wt >>> 26)) | 0), - (wt &= 67108863), - (i = Math.imul(A, F)), - (n = ((n = Math.imul(A, q)) + Math.imul(k, F)) | 0), - (o = Math.imul(k, q)), - (i = (i + Math.imul(E, $)) | 0), - (n = ((n = (n + Math.imul(E, Z)) | 0) + Math.imul(S, $)) | 0), - (o = (o + Math.imul(S, Z)) | 0), - (i = (i + Math.imul(w, V)) | 0), - (n = ((n = (n + Math.imul(w, W)) | 0) + Math.imul(_, V)) | 0), - (o = (o + Math.imul(_, W)) | 0), - (i = (i + Math.imul(b, Y)) | 0), - (n = ((n = (n + Math.imul(b, J)) | 0) + Math.imul(y, Y)) | 0), - (o = (o + Math.imul(y, J)) | 0), - (i = (i + Math.imul(p, Q)) | 0), - (n = ((n = (n + Math.imul(p, tt)) | 0) + Math.imul(m, Q)) | 0), - (o = (o + Math.imul(m, tt)) | 0); - var _t = - (((u + (i = (i + Math.imul(c, rt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, it)) | 0) + Math.imul(l, rt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, it)) | 0) + (n >>> 13)) | 0) + (_t >>> 26)) | 0), - (_t &= 67108863), - (i = Math.imul(B, F)), - (n = ((n = Math.imul(B, q)) + Math.imul(I, F)) | 0), - (o = Math.imul(I, q)), - (i = (i + Math.imul(A, $)) | 0), - (n = ((n = (n + Math.imul(A, Z)) | 0) + Math.imul(k, $)) | 0), - (o = (o + Math.imul(k, Z)) | 0), - (i = (i + Math.imul(E, V)) | 0), - (n = ((n = (n + Math.imul(E, W)) | 0) + Math.imul(S, V)) | 0), - (o = (o + Math.imul(S, W)) | 0), - (i = (i + Math.imul(w, Y)) | 0), - (n = ((n = (n + Math.imul(w, J)) | 0) + Math.imul(_, Y)) | 0), - (o = (o + Math.imul(_, J)) | 0), - (i = (i + Math.imul(b, Q)) | 0), - (n = ((n = (n + Math.imul(b, tt)) | 0) + Math.imul(y, Q)) | 0), - (o = (o + Math.imul(y, tt)) | 0), - (i = (i + Math.imul(p, rt)) | 0), - (n = ((n = (n + Math.imul(p, it)) | 0) + Math.imul(m, rt)) | 0), - (o = (o + Math.imul(m, it)) | 0); - var Mt = - (((u + (i = (i + Math.imul(c, ot)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, st)) | 0) + Math.imul(l, ot)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, st)) | 0) + (n >>> 13)) | 0) + (Mt >>> 26)) | 0), - (Mt &= 67108863), - (i = Math.imul(P, F)), - (n = ((n = Math.imul(P, q)) + Math.imul(O, F)) | 0), - (o = Math.imul(O, q)), - (i = (i + Math.imul(B, $)) | 0), - (n = ((n = (n + Math.imul(B, Z)) | 0) + Math.imul(I, $)) | 0), - (o = (o + Math.imul(I, Z)) | 0), - (i = (i + Math.imul(A, V)) | 0), - (n = ((n = (n + Math.imul(A, W)) | 0) + Math.imul(k, V)) | 0), - (o = (o + Math.imul(k, W)) | 0), - (i = (i + Math.imul(E, Y)) | 0), - (n = ((n = (n + Math.imul(E, J)) | 0) + Math.imul(S, Y)) | 0), - (o = (o + Math.imul(S, J)) | 0), - (i = (i + Math.imul(w, Q)) | 0), - (n = ((n = (n + Math.imul(w, tt)) | 0) + Math.imul(_, Q)) | 0), - (o = (o + Math.imul(_, tt)) | 0), - (i = (i + Math.imul(b, rt)) | 0), - (n = ((n = (n + Math.imul(b, it)) | 0) + Math.imul(y, rt)) | 0), - (o = (o + Math.imul(y, it)) | 0), - (i = (i + Math.imul(p, ot)) | 0), - (n = ((n = (n + Math.imul(p, st)) | 0) + Math.imul(m, ot)) | 0), - (o = (o + Math.imul(m, st)) | 0); - var Et = - (((u + (i = (i + Math.imul(c, ht)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, ut)) | 0) + Math.imul(l, ht)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, ut)) | 0) + (n >>> 13)) | 0) + (Et >>> 26)) | 0), - (Et &= 67108863), - (i = Math.imul(C, F)), - (n = ((n = Math.imul(C, q)) + Math.imul(N, F)) | 0), - (o = Math.imul(N, q)), - (i = (i + Math.imul(P, $)) | 0), - (n = ((n = (n + Math.imul(P, Z)) | 0) + Math.imul(O, $)) | 0), - (o = (o + Math.imul(O, Z)) | 0), - (i = (i + Math.imul(B, V)) | 0), - (n = ((n = (n + Math.imul(B, W)) | 0) + Math.imul(I, V)) | 0), - (o = (o + Math.imul(I, W)) | 0), - (i = (i + Math.imul(A, Y)) | 0), - (n = ((n = (n + Math.imul(A, J)) | 0) + Math.imul(k, Y)) | 0), - (o = (o + Math.imul(k, J)) | 0), - (i = (i + Math.imul(E, Q)) | 0), - (n = ((n = (n + Math.imul(E, tt)) | 0) + Math.imul(S, Q)) | 0), - (o = (o + Math.imul(S, tt)) | 0), - (i = (i + Math.imul(w, rt)) | 0), - (n = ((n = (n + Math.imul(w, it)) | 0) + Math.imul(_, rt)) | 0), - (o = (o + Math.imul(_, it)) | 0), - (i = (i + Math.imul(b, ot)) | 0), - (n = ((n = (n + Math.imul(b, st)) | 0) + Math.imul(y, ot)) | 0), - (o = (o + Math.imul(y, st)) | 0), - (i = (i + Math.imul(p, ht)) | 0), - (n = ((n = (n + Math.imul(p, ut)) | 0) + Math.imul(m, ht)) | 0), - (o = (o + Math.imul(m, ut)) | 0); - var St = - (((u + (i = (i + Math.imul(c, ct)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, lt)) | 0) + Math.imul(l, ct)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, lt)) | 0) + (n >>> 13)) | 0) + (St >>> 26)) | 0), - (St &= 67108863), - (i = Math.imul(U, F)), - (n = ((n = Math.imul(U, q)) + Math.imul(D, F)) | 0), - (o = Math.imul(D, q)), - (i = (i + Math.imul(C, $)) | 0), - (n = ((n = (n + Math.imul(C, Z)) | 0) + Math.imul(N, $)) | 0), - (o = (o + Math.imul(N, Z)) | 0), - (i = (i + Math.imul(P, V)) | 0), - (n = ((n = (n + Math.imul(P, W)) | 0) + Math.imul(O, V)) | 0), - (o = (o + Math.imul(O, W)) | 0), - (i = (i + Math.imul(B, Y)) | 0), - (n = ((n = (n + Math.imul(B, J)) | 0) + Math.imul(I, Y)) | 0), - (o = (o + Math.imul(I, J)) | 0), - (i = (i + Math.imul(A, Q)) | 0), - (n = ((n = (n + Math.imul(A, tt)) | 0) + Math.imul(k, Q)) | 0), - (o = (o + Math.imul(k, tt)) | 0), - (i = (i + Math.imul(E, rt)) | 0), - (n = ((n = (n + Math.imul(E, it)) | 0) + Math.imul(S, rt)) | 0), - (o = (o + Math.imul(S, it)) | 0), - (i = (i + Math.imul(w, ot)) | 0), - (n = ((n = (n + Math.imul(w, st)) | 0) + Math.imul(_, ot)) | 0), - (o = (o + Math.imul(_, st)) | 0), - (i = (i + Math.imul(b, ht)) | 0), - (n = ((n = (n + Math.imul(b, ut)) | 0) + Math.imul(y, ht)) | 0), - (o = (o + Math.imul(y, ut)) | 0), - (i = (i + Math.imul(p, ct)) | 0), - (n = ((n = (n + Math.imul(p, lt)) | 0) + Math.imul(m, ct)) | 0), - (o = (o + Math.imul(m, lt)) | 0); - var xt = - (((u + (i = (i + Math.imul(c, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, mt)) | 0) + Math.imul(l, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, mt)) | 0) + (n >>> 13)) | 0) + (xt >>> 26)) | 0), - (xt &= 67108863), - (i = Math.imul(U, $)), - (n = ((n = Math.imul(U, Z)) + Math.imul(D, $)) | 0), - (o = Math.imul(D, Z)), - (i = (i + Math.imul(C, V)) | 0), - (n = ((n = (n + Math.imul(C, W)) | 0) + Math.imul(N, V)) | 0), - (o = (o + Math.imul(N, W)) | 0), - (i = (i + Math.imul(P, Y)) | 0), - (n = ((n = (n + Math.imul(P, J)) | 0) + Math.imul(O, Y)) | 0), - (o = (o + Math.imul(O, J)) | 0), - (i = (i + Math.imul(B, Q)) | 0), - (n = ((n = (n + Math.imul(B, tt)) | 0) + Math.imul(I, Q)) | 0), - (o = (o + Math.imul(I, tt)) | 0), - (i = (i + Math.imul(A, rt)) | 0), - (n = ((n = (n + Math.imul(A, it)) | 0) + Math.imul(k, rt)) | 0), - (o = (o + Math.imul(k, it)) | 0), - (i = (i + Math.imul(E, ot)) | 0), - (n = ((n = (n + Math.imul(E, st)) | 0) + Math.imul(S, ot)) | 0), - (o = (o + Math.imul(S, st)) | 0), - (i = (i + Math.imul(w, ht)) | 0), - (n = ((n = (n + Math.imul(w, ut)) | 0) + Math.imul(_, ht)) | 0), - (o = (o + Math.imul(_, ut)) | 0), - (i = (i + Math.imul(b, ct)) | 0), - (n = ((n = (n + Math.imul(b, lt)) | 0) + Math.imul(y, ct)) | 0), - (o = (o + Math.imul(y, lt)) | 0); - var At = - (((u + (i = (i + Math.imul(p, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(p, mt)) | 0) + Math.imul(m, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(m, mt)) | 0) + (n >>> 13)) | 0) + (At >>> 26)) | 0), - (At &= 67108863), - (i = Math.imul(U, V)), - (n = ((n = Math.imul(U, W)) + Math.imul(D, V)) | 0), - (o = Math.imul(D, W)), - (i = (i + Math.imul(C, Y)) | 0), - (n = ((n = (n + Math.imul(C, J)) | 0) + Math.imul(N, Y)) | 0), - (o = (o + Math.imul(N, J)) | 0), - (i = (i + Math.imul(P, Q)) | 0), - (n = ((n = (n + Math.imul(P, tt)) | 0) + Math.imul(O, Q)) | 0), - (o = (o + Math.imul(O, tt)) | 0), - (i = (i + Math.imul(B, rt)) | 0), - (n = ((n = (n + Math.imul(B, it)) | 0) + Math.imul(I, rt)) | 0), - (o = (o + Math.imul(I, it)) | 0), - (i = (i + Math.imul(A, ot)) | 0), - (n = ((n = (n + Math.imul(A, st)) | 0) + Math.imul(k, ot)) | 0), - (o = (o + Math.imul(k, st)) | 0), - (i = (i + Math.imul(E, ht)) | 0), - (n = ((n = (n + Math.imul(E, ut)) | 0) + Math.imul(S, ht)) | 0), - (o = (o + Math.imul(S, ut)) | 0), - (i = (i + Math.imul(w, ct)) | 0), - (n = ((n = (n + Math.imul(w, lt)) | 0) + Math.imul(_, ct)) | 0), - (o = (o + Math.imul(_, lt)) | 0); - var kt = - (((u + (i = (i + Math.imul(b, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(b, mt)) | 0) + Math.imul(y, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(y, mt)) | 0) + (n >>> 13)) | 0) + (kt >>> 26)) | 0), - (kt &= 67108863), - (i = Math.imul(U, Y)), - (n = ((n = Math.imul(U, J)) + Math.imul(D, Y)) | 0), - (o = Math.imul(D, J)), - (i = (i + Math.imul(C, Q)) | 0), - (n = ((n = (n + Math.imul(C, tt)) | 0) + Math.imul(N, Q)) | 0), - (o = (o + Math.imul(N, tt)) | 0), - (i = (i + Math.imul(P, rt)) | 0), - (n = ((n = (n + Math.imul(P, it)) | 0) + Math.imul(O, rt)) | 0), - (o = (o + Math.imul(O, it)) | 0), - (i = (i + Math.imul(B, ot)) | 0), - (n = ((n = (n + Math.imul(B, st)) | 0) + Math.imul(I, ot)) | 0), - (o = (o + Math.imul(I, st)) | 0), - (i = (i + Math.imul(A, ht)) | 0), - (n = ((n = (n + Math.imul(A, ut)) | 0) + Math.imul(k, ht)) | 0), - (o = (o + Math.imul(k, ut)) | 0), - (i = (i + Math.imul(E, ct)) | 0), - (n = ((n = (n + Math.imul(E, lt)) | 0) + Math.imul(S, ct)) | 0), - (o = (o + Math.imul(S, lt)) | 0); - var Rt = - (((u + (i = (i + Math.imul(w, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(w, mt)) | 0) + Math.imul(_, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(_, mt)) | 0) + (n >>> 13)) | 0) + (Rt >>> 26)) | 0), - (Rt &= 67108863), - (i = Math.imul(U, Q)), - (n = ((n = Math.imul(U, tt)) + Math.imul(D, Q)) | 0), - (o = Math.imul(D, tt)), - (i = (i + Math.imul(C, rt)) | 0), - (n = ((n = (n + Math.imul(C, it)) | 0) + Math.imul(N, rt)) | 0), - (o = (o + Math.imul(N, it)) | 0), - (i = (i + Math.imul(P, ot)) | 0), - (n = ((n = (n + Math.imul(P, st)) | 0) + Math.imul(O, ot)) | 0), - (o = (o + Math.imul(O, st)) | 0), - (i = (i + Math.imul(B, ht)) | 0), - (n = ((n = (n + Math.imul(B, ut)) | 0) + Math.imul(I, ht)) | 0), - (o = (o + Math.imul(I, ut)) | 0), - (i = (i + Math.imul(A, ct)) | 0), - (n = ((n = (n + Math.imul(A, lt)) | 0) + Math.imul(k, ct)) | 0), - (o = (o + Math.imul(k, lt)) | 0); - var Bt = - (((u + (i = (i + Math.imul(E, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(E, mt)) | 0) + Math.imul(S, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(S, mt)) | 0) + (n >>> 13)) | 0) + (Bt >>> 26)) | 0), - (Bt &= 67108863), - (i = Math.imul(U, rt)), - (n = ((n = Math.imul(U, it)) + Math.imul(D, rt)) | 0), - (o = Math.imul(D, it)), - (i = (i + Math.imul(C, ot)) | 0), - (n = ((n = (n + Math.imul(C, st)) | 0) + Math.imul(N, ot)) | 0), - (o = (o + Math.imul(N, st)) | 0), - (i = (i + Math.imul(P, ht)) | 0), - (n = ((n = (n + Math.imul(P, ut)) | 0) + Math.imul(O, ht)) | 0), - (o = (o + Math.imul(O, ut)) | 0), - (i = (i + Math.imul(B, ct)) | 0), - (n = ((n = (n + Math.imul(B, lt)) | 0) + Math.imul(I, ct)) | 0), - (o = (o + Math.imul(I, lt)) | 0); - var It = - (((u + (i = (i + Math.imul(A, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(A, mt)) | 0) + Math.imul(k, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(k, mt)) | 0) + (n >>> 13)) | 0) + (It >>> 26)) | 0), - (It &= 67108863), - (i = Math.imul(U, ot)), - (n = ((n = Math.imul(U, st)) + Math.imul(D, ot)) | 0), - (o = Math.imul(D, st)), - (i = (i + Math.imul(C, ht)) | 0), - (n = ((n = (n + Math.imul(C, ut)) | 0) + Math.imul(N, ht)) | 0), - (o = (o + Math.imul(N, ut)) | 0), - (i = (i + Math.imul(P, ct)) | 0), - (n = ((n = (n + Math.imul(P, lt)) | 0) + Math.imul(O, ct)) | 0), - (o = (o + Math.imul(O, lt)) | 0); - var Tt = - (((u + (i = (i + Math.imul(B, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(B, mt)) | 0) + Math.imul(I, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(I, mt)) | 0) + (n >>> 13)) | 0) + (Tt >>> 26)) | 0), - (Tt &= 67108863), - (i = Math.imul(U, ht)), - (n = ((n = Math.imul(U, ut)) + Math.imul(D, ht)) | 0), - (o = Math.imul(D, ut)), - (i = (i + Math.imul(C, ct)) | 0), - (n = ((n = (n + Math.imul(C, lt)) | 0) + Math.imul(N, ct)) | 0), - (o = (o + Math.imul(N, lt)) | 0); - var Pt = - (((u + (i = (i + Math.imul(P, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(P, mt)) | 0) + Math.imul(O, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(O, mt)) | 0) + (n >>> 13)) | 0) + (Pt >>> 26)) | 0), - (Pt &= 67108863), - (i = Math.imul(U, ct)), - (n = ((n = Math.imul(U, lt)) + Math.imul(D, ct)) | 0), - (o = Math.imul(D, lt)); - var Ot = - (((u + (i = (i + Math.imul(C, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(C, mt)) | 0) + Math.imul(N, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(N, mt)) | 0) + (n >>> 13)) | 0) + (Ot >>> 26)) | 0), (Ot &= 67108863); - var Lt = (((u + (i = Math.imul(U, pt))) | 0) + ((8191 & (n = ((n = Math.imul(U, mt)) + Math.imul(D, pt)) | 0)) << 13)) | 0; - return ( - (u = ((((o = Math.imul(D, mt)) + (n >>> 13)) | 0) + (Lt >>> 26)) | 0), - (Lt &= 67108863), - (h[0] = gt), - (h[1] = bt), - (h[2] = yt), - (h[3] = vt), - (h[4] = wt), - (h[5] = _t), - (h[6] = Mt), - (h[7] = Et), - (h[8] = St), - (h[9] = xt), - (h[10] = At), - (h[11] = kt), - (h[12] = Rt), - (h[13] = Bt), - (h[14] = It), - (h[15] = Tt), - (h[16] = Pt), - (h[17] = Ot), - (h[18] = Lt), - 0 !== u && ((h[19] = u), r.length++), - r - ); - }; - function m(t, e, r) { - return new g().mulp(t, e, r); - } - function g(t, e) { - (this.x = t), (this.y = e); - } - Math.imul || (p = d), - (o.prototype.mulTo = function (t, e) { - var r, - i = this.length + t.length; - return ( - (r = - 10 === this.length && 10 === t.length - ? p(this, t, e) - : i < 63 - ? d(this, t, e) - : i < 1024 - ? (function (t, e, r) { - (r.negative = e.negative ^ t.negative), (r.length = t.length + e.length); - for (var i = 0, n = 0, o = 0; o < r.length - 1; o++) { - var s = n; - n = 0; - for (var a = 67108863 & i, h = Math.min(o, e.length - 1), u = Math.max(0, o - t.length + 1); u <= h; u++) { - var f = o - u, - c = (0 | t.words[f]) * (0 | e.words[u]), - l = 67108863 & c; - (a = 67108863 & (l = (l + a) | 0)), - (n += (s = ((s = (s + ((c / 67108864) | 0)) | 0) + (l >>> 26)) | 0) >>> 26), - (s &= 67108863); - } - (r.words[o] = a), (i = s), (s = n); - } - return 0 !== i ? (r.words[o] = i) : r.length--, r.strip(); - })(this, t, e) - : m(this, t, e)), - r - ); - }), - (g.prototype.makeRBT = function (t) { - for (var e = new Array(t), r = o.prototype._countBits(t) - 1, i = 0; i < t; i++) e[i] = this.revBin(i, r, t); - return e; - }), - (g.prototype.revBin = function (t, e, r) { - if (0 === t || t === r - 1) return t; - for (var i = 0, n = 0; n < e; n++) (i |= (1 & t) << (e - n - 1)), (t >>= 1); - return i; - }), - (g.prototype.permute = function (t, e, r, i, n, o) { - for (var s = 0; s < o; s++) (i[s] = e[t[s]]), (n[s] = r[t[s]]); - }), - (g.prototype.transform = function (t, e, r, i, n, o) { - this.permute(o, t, e, r, i, n); - for (var s = 1; s < n; s <<= 1) - for (var a = s << 1, h = Math.cos((2 * Math.PI) / a), u = Math.sin((2 * Math.PI) / a), f = 0; f < n; f += a) - for (var c = h, l = u, d = 0; d < s; d++) { - var p = r[f + d], - m = i[f + d], - g = r[f + d + s], - b = i[f + d + s], - y = c * g - l * b; - (b = c * b + l * g), - (g = y), - (r[f + d] = p + g), - (i[f + d] = m + b), - (r[f + d + s] = p - g), - (i[f + d + s] = m - b), - d !== a && ((y = h * c - u * l), (l = h * l + u * c), (c = y)); - } - }), - (g.prototype.guessLen13b = function (t, e) { - var r = 1 | Math.max(e, t), - i = 1 & r, - n = 0; - for (r = (r / 2) | 0; r; r >>>= 1) n++; - return 1 << (n + 1 + i); - }), - (g.prototype.conjugate = function (t, e, r) { - if (!(r <= 1)) - for (var i = 0; i < r / 2; i++) { - var n = t[i]; - (t[i] = t[r - i - 1]), (t[r - i - 1] = n), (n = e[i]), (e[i] = -e[r - i - 1]), (e[r - i - 1] = -n); - } - }), - (g.prototype.normalize13b = function (t, e) { - for (var r = 0, i = 0; i < e / 2; i++) { - var n = 8192 * Math.round(t[2 * i + 1] / e) + Math.round(t[2 * i] / e) + r; - (t[i] = 67108863 & n), (r = n < 67108864 ? 0 : (n / 67108864) | 0); - } - return t; - }), - (g.prototype.convert13b = function (t, e, r, n) { - for (var o = 0, s = 0; s < e; s++) - (o += 0 | t[s]), (r[2 * s] = 8191 & o), (o >>>= 13), (r[2 * s + 1] = 8191 & o), (o >>>= 13); - for (s = 2 * e; s < n; ++s) r[s] = 0; - i(0 === o), i(0 == (-8192 & o)); - }), - (g.prototype.stub = function (t) { - for (var e = new Array(t), r = 0; r < t; r++) e[r] = 0; - return e; - }), - (g.prototype.mulp = function (t, e, r) { - var i = 2 * this.guessLen13b(t.length, e.length), - n = this.makeRBT(i), - o = this.stub(i), - s = new Array(i), - a = new Array(i), - h = new Array(i), - u = new Array(i), - f = new Array(i), - c = new Array(i), - l = r.words; - (l.length = i), - this.convert13b(t.words, t.length, s, i), - this.convert13b(e.words, e.length, u, i), - this.transform(s, o, a, h, i, n), - this.transform(u, o, f, c, i, n); - for (var d = 0; d < i; d++) { - var p = a[d] * f[d] - h[d] * c[d]; - (h[d] = a[d] * c[d] + h[d] * f[d]), (a[d] = p); - } - return ( - this.conjugate(a, h, i), - this.transform(a, h, l, o, i, n), - this.conjugate(l, o, i), - this.normalize13b(l, i), - (r.negative = t.negative ^ e.negative), - (r.length = t.length + e.length), - r.strip() - ); - }), - (o.prototype.mul = function (t) { - var e = new o(null); - return (e.words = new Array(this.length + t.length)), this.mulTo(t, e); - }), - (o.prototype.mulf = function (t) { - var e = new o(null); - return (e.words = new Array(this.length + t.length)), m(this, t, e); - }), - (o.prototype.imul = function (t) { - return this.clone().mulTo(t, this); - }), - (o.prototype.imuln = function (t) { - i('number' == typeof t), i(t < 67108864); - for (var e = 0, r = 0; r < this.length; r++) { - var n = (0 | this.words[r]) * t, - o = (67108863 & n) + (67108863 & e); - (e >>= 26), (e += (n / 67108864) | 0), (e += o >>> 26), (this.words[r] = 67108863 & o); - } - return 0 !== e && ((this.words[r] = e), this.length++), this; - }), - (o.prototype.muln = function (t) { - return this.clone().imuln(t); - }), - (o.prototype.sqr = function () { - return this.mul(this); - }), - (o.prototype.isqr = function () { - return this.imul(this.clone()); - }), - (o.prototype.pow = function (t) { - var e = (function (t) { - for (var e = new Array(t.bitLength()), r = 0; r < e.length; r++) { - var i = (r / 26) | 0, - n = r % 26; - e[r] = (t.words[i] & (1 << n)) >>> n; - } - return e; - })(t); - if (0 === e.length) return new o(1); - for (var r = this, i = 0; i < e.length && 0 === e[i]; i++, r = r.sqr()); - if (++i < e.length) for (var n = r.sqr(); i < e.length; i++, n = n.sqr()) 0 !== e[i] && (r = r.mul(n)); - return r; - }), - (o.prototype.iushln = function (t) { - i('number' == typeof t && t >= 0); - var e, - r = t % 26, - n = (t - r) / 26, - o = (67108863 >>> (26 - r)) << (26 - r); - if (0 !== r) { - var s = 0; - for (e = 0; e < this.length; e++) { - var a = this.words[e] & o, - h = ((0 | this.words[e]) - a) << r; - (this.words[e] = h | s), (s = a >>> (26 - r)); - } - s && ((this.words[e] = s), this.length++); - } - if (0 !== n) { - for (e = this.length - 1; e >= 0; e--) this.words[e + n] = this.words[e]; - for (e = 0; e < n; e++) this.words[e] = 0; - this.length += n; - } - return this.strip(); - }), - (o.prototype.ishln = function (t) { - return i(0 === this.negative), this.iushln(t); - }), - (o.prototype.iushrn = function (t, e, r) { - var n; - i('number' == typeof t && t >= 0), (n = e ? (e - (e % 26)) / 26 : 0); - var o = t % 26, - s = Math.min((t - o) / 26, this.length), - a = 67108863 ^ ((67108863 >>> o) << o), - h = r; - if (((n -= s), (n = Math.max(0, n)), h)) { - for (var u = 0; u < s; u++) h.words[u] = this.words[u]; - h.length = s; - } - if (0 === s); - else if (this.length > s) for (this.length -= s, u = 0; u < this.length; u++) this.words[u] = this.words[u + s]; - else (this.words[0] = 0), (this.length = 1); - var f = 0; - for (u = this.length - 1; u >= 0 && (0 !== f || u >= n); u--) { - var c = 0 | this.words[u]; - (this.words[u] = (f << (26 - o)) | (c >>> o)), (f = c & a); - } - return h && 0 !== f && (h.words[h.length++] = f), 0 === this.length && ((this.words[0] = 0), (this.length = 1)), this.strip(); - }), - (o.prototype.ishrn = function (t, e, r) { - return i(0 === this.negative), this.iushrn(t, e, r); - }), - (o.prototype.shln = function (t) { - return this.clone().ishln(t); - }), - (o.prototype.ushln = function (t) { - return this.clone().iushln(t); - }), - (o.prototype.shrn = function (t) { - return this.clone().ishrn(t); - }), - (o.prototype.ushrn = function (t) { - return this.clone().iushrn(t); - }), - (o.prototype.testn = function (t) { - i('number' == typeof t && t >= 0); - var e = t % 26, - r = (t - e) / 26, - n = 1 << e; - return !(this.length <= r || !(this.words[r] & n)); - }), - (o.prototype.imaskn = function (t) { - i('number' == typeof t && t >= 0); - var e = t % 26, - r = (t - e) / 26; - if ((i(0 === this.negative, 'imaskn works only with positive numbers'), this.length <= r)) return this; - if ((0 !== e && r++, (this.length = Math.min(r, this.length)), 0 !== e)) { - var n = 67108863 ^ ((67108863 >>> e) << e); - this.words[this.length - 1] &= n; - } - return this.strip(); - }), - (o.prototype.maskn = function (t) { - return this.clone().imaskn(t); - }), - (o.prototype.iaddn = function (t) { - return ( - i('number' == typeof t), - i(t < 67108864), - t < 0 - ? this.isubn(-t) - : 0 !== this.negative - ? 1 === this.length && (0 | this.words[0]) < t - ? ((this.words[0] = t - (0 | this.words[0])), (this.negative = 0), this) - : ((this.negative = 0), this.isubn(t), (this.negative = 1), this) - : this._iaddn(t) - ); - }), - (o.prototype._iaddn = function (t) { - this.words[0] += t; - for (var e = 0; e < this.length && this.words[e] >= 67108864; e++) - (this.words[e] -= 67108864), e === this.length - 1 ? (this.words[e + 1] = 1) : this.words[e + 1]++; - return (this.length = Math.max(this.length, e + 1)), this; - }), - (o.prototype.isubn = function (t) { - if ((i('number' == typeof t), i(t < 67108864), t < 0)) return this.iaddn(-t); - if (0 !== this.negative) return (this.negative = 0), this.iaddn(t), (this.negative = 1), this; - if (((this.words[0] -= t), 1 === this.length && this.words[0] < 0)) (this.words[0] = -this.words[0]), (this.negative = 1); - else for (var e = 0; e < this.length && this.words[e] < 0; e++) (this.words[e] += 67108864), (this.words[e + 1] -= 1); - return this.strip(); - }), - (o.prototype.addn = function (t) { - return this.clone().iaddn(t); - }), - (o.prototype.subn = function (t) { - return this.clone().isubn(t); - }), - (o.prototype.iabs = function () { - return (this.negative = 0), this; - }), - (o.prototype.abs = function () { - return this.clone().iabs(); - }), - (o.prototype._ishlnsubmul = function (t, e, r) { - var n, - o, - s = t.length + r; - this._expand(s); - var a = 0; - for (n = 0; n < t.length; n++) { - o = (0 | this.words[n + r]) + a; - var h = (0 | t.words[n]) * e; - (a = ((o -= 67108863 & h) >> 26) - ((h / 67108864) | 0)), (this.words[n + r] = 67108863 & o); - } - for (; n < this.length - r; n++) (a = (o = (0 | this.words[n + r]) + a) >> 26), (this.words[n + r] = 67108863 & o); - if (0 === a) return this.strip(); - for (i(-1 === a), a = 0, n = 0; n < this.length; n++) - (a = (o = -(0 | this.words[n]) + a) >> 26), (this.words[n] = 67108863 & o); - return (this.negative = 1), this.strip(); - }), - (o.prototype._wordDiv = function (t, e) { - var r = (this.length, t.length), - i = this.clone(), - n = t, - s = 0 | n.words[n.length - 1]; - 0 != (r = 26 - this._countBits(s)) && ((n = n.ushln(r)), i.iushln(r), (s = 0 | n.words[n.length - 1])); - var a, - h = i.length - n.length; - if ('mod' !== e) { - ((a = new o(null)).length = h + 1), (a.words = new Array(a.length)); - for (var u = 0; u < a.length; u++) a.words[u] = 0; - } - var f = i.clone()._ishlnsubmul(n, 1, h); - 0 === f.negative && ((i = f), a && (a.words[h] = 1)); - for (var c = h - 1; c >= 0; c--) { - var l = 67108864 * (0 | i.words[n.length + c]) + (0 | i.words[n.length + c - 1]); - for (l = Math.min((l / s) | 0, 67108863), i._ishlnsubmul(n, l, c); 0 !== i.negative; ) - l--, (i.negative = 0), i._ishlnsubmul(n, 1, c), i.isZero() || (i.negative ^= 1); - a && (a.words[c] = l); - } - return a && a.strip(), i.strip(), 'div' !== e && 0 !== r && i.iushrn(r), { div: a || null, mod: i }; - }), - (o.prototype.divmod = function (t, e, r) { - return ( - i(!t.isZero()), - this.isZero() - ? { div: new o(0), mod: new o(0) } - : 0 !== this.negative && 0 === t.negative - ? ((a = this.neg().divmod(t, e)), - 'mod' !== e && (n = a.div.neg()), - 'div' !== e && ((s = a.mod.neg()), r && 0 !== s.negative && s.iadd(t)), - { div: n, mod: s }) - : 0 === this.negative && 0 !== t.negative - ? ((a = this.divmod(t.neg(), e)), 'mod' !== e && (n = a.div.neg()), { div: n, mod: a.mod }) - : 0 != (this.negative & t.negative) - ? ((a = this.neg().divmod(t.neg(), e)), - 'div' !== e && ((s = a.mod.neg()), r && 0 !== s.negative && s.isub(t)), - { div: a.div, mod: s }) - : t.length > this.length || this.cmp(t) < 0 - ? { div: new o(0), mod: this } - : 1 === t.length - ? 'div' === e - ? { div: this.divn(t.words[0]), mod: null } - : 'mod' === e - ? { div: null, mod: new o(this.modn(t.words[0])) } - : { div: this.divn(t.words[0]), mod: new o(this.modn(t.words[0])) } - : this._wordDiv(t, e) - ); - var n, s, a; - }), - (o.prototype.div = function (t) { - return this.divmod(t, 'div', !1).div; - }), - (o.prototype.mod = function (t) { - return this.divmod(t, 'mod', !1).mod; - }), - (o.prototype.umod = function (t) { - return this.divmod(t, 'mod', !0).mod; - }), - (o.prototype.divRound = function (t) { - var e = this.divmod(t); - if (e.mod.isZero()) return e.div; - var r = 0 !== e.div.negative ? e.mod.isub(t) : e.mod, - i = t.ushrn(1), - n = t.andln(1), - o = r.cmp(i); - return o < 0 || (1 === n && 0 === o) ? e.div : 0 !== e.div.negative ? e.div.isubn(1) : e.div.iaddn(1); - }), - (o.prototype.modn = function (t) { - i(t <= 67108863); - for (var e = (1 << 26) % t, r = 0, n = this.length - 1; n >= 0; n--) r = (e * r + (0 | this.words[n])) % t; - return r; - }), - (o.prototype.idivn = function (t) { - i(t <= 67108863); - for (var e = 0, r = this.length - 1; r >= 0; r--) { - var n = (0 | this.words[r]) + 67108864 * e; - (this.words[r] = (n / t) | 0), (e = n % t); - } - return this.strip(); - }), - (o.prototype.divn = function (t) { - return this.clone().idivn(t); - }), - (o.prototype.egcd = function (t) { - i(0 === t.negative), i(!t.isZero()); - var e = this, - r = t.clone(); - e = 0 !== e.negative ? e.umod(t) : e.clone(); - for (var n = new o(1), s = new o(0), a = new o(0), h = new o(1), u = 0; e.isEven() && r.isEven(); ) - e.iushrn(1), r.iushrn(1), ++u; - for (var f = r.clone(), c = e.clone(); !e.isZero(); ) { - for (var l = 0, d = 1; 0 == (e.words[0] & d) && l < 26; ++l, d <<= 1); - if (l > 0) for (e.iushrn(l); l-- > 0; ) (n.isOdd() || s.isOdd()) && (n.iadd(f), s.isub(c)), n.iushrn(1), s.iushrn(1); - for (var p = 0, m = 1; 0 == (r.words[0] & m) && p < 26; ++p, m <<= 1); - if (p > 0) for (r.iushrn(p); p-- > 0; ) (a.isOdd() || h.isOdd()) && (a.iadd(f), h.isub(c)), a.iushrn(1), h.iushrn(1); - e.cmp(r) >= 0 ? (e.isub(r), n.isub(a), s.isub(h)) : (r.isub(e), a.isub(n), h.isub(s)); - } - return { a, b: h, gcd: r.iushln(u) }; - }), - (o.prototype._invmp = function (t) { - i(0 === t.negative), i(!t.isZero()); - var e = this, - r = t.clone(); - e = 0 !== e.negative ? e.umod(t) : e.clone(); - for (var n, s = new o(1), a = new o(0), h = r.clone(); e.cmpn(1) > 0 && r.cmpn(1) > 0; ) { - for (var u = 0, f = 1; 0 == (e.words[0] & f) && u < 26; ++u, f <<= 1); - if (u > 0) for (e.iushrn(u); u-- > 0; ) s.isOdd() && s.iadd(h), s.iushrn(1); - for (var c = 0, l = 1; 0 == (r.words[0] & l) && c < 26; ++c, l <<= 1); - if (c > 0) for (r.iushrn(c); c-- > 0; ) a.isOdd() && a.iadd(h), a.iushrn(1); - e.cmp(r) >= 0 ? (e.isub(r), s.isub(a)) : (r.isub(e), a.isub(s)); - } - return (n = 0 === e.cmpn(1) ? s : a).cmpn(0) < 0 && n.iadd(t), n; - }), - (o.prototype.gcd = function (t) { - if (this.isZero()) return t.abs(); - if (t.isZero()) return this.abs(); - var e = this.clone(), - r = t.clone(); - (e.negative = 0), (r.negative = 0); - for (var i = 0; e.isEven() && r.isEven(); i++) e.iushrn(1), r.iushrn(1); - for (;;) { - for (; e.isEven(); ) e.iushrn(1); - for (; r.isEven(); ) r.iushrn(1); - var n = e.cmp(r); - if (n < 0) { - var o = e; - (e = r), (r = o); - } else if (0 === n || 0 === r.cmpn(1)) break; - e.isub(r); - } - return r.iushln(i); - }), - (o.prototype.invm = function (t) { - return this.egcd(t).a.umod(t); - }), - (o.prototype.isEven = function () { - return 0 == (1 & this.words[0]); - }), - (o.prototype.isOdd = function () { - return 1 == (1 & this.words[0]); - }), - (o.prototype.andln = function (t) { - return this.words[0] & t; - }), - (o.prototype.bincn = function (t) { - i('number' == typeof t); - var e = t % 26, - r = (t - e) / 26, - n = 1 << e; - if (this.length <= r) return this._expand(r + 1), (this.words[r] |= n), this; - for (var o = n, s = r; 0 !== o && s < this.length; s++) { - var a = 0 | this.words[s]; - (o = (a += o) >>> 26), (a &= 67108863), (this.words[s] = a); - } - return 0 !== o && ((this.words[s] = o), this.length++), this; - }), - (o.prototype.isZero = function () { - return 1 === this.length && 0 === this.words[0]; - }), - (o.prototype.cmpn = function (t) { - var e, - r = t < 0; - if (0 !== this.negative && !r) return -1; - if (0 === this.negative && r) return 1; - if ((this.strip(), this.length > 1)) e = 1; - else { - r && (t = -t), i(t <= 67108863, 'Number is too big'); - var n = 0 | this.words[0]; - e = n === t ? 0 : n < t ? -1 : 1; - } - return 0 !== this.negative ? 0 | -e : e; - }), - (o.prototype.cmp = function (t) { - if (0 !== this.negative && 0 === t.negative) return -1; - if (0 === this.negative && 0 !== t.negative) return 1; - var e = this.ucmp(t); - return 0 !== this.negative ? 0 | -e : e; - }), - (o.prototype.ucmp = function (t) { - if (this.length > t.length) return 1; - if (this.length < t.length) return -1; - for (var e = 0, r = this.length - 1; r >= 0; r--) { - var i = 0 | this.words[r], - n = 0 | t.words[r]; - if (i !== n) { - i < n ? (e = -1) : i > n && (e = 1); - break; - } - } - return e; - }), - (o.prototype.gtn = function (t) { - return 1 === this.cmpn(t); - }), - (o.prototype.gt = function (t) { - return 1 === this.cmp(t); - }), - (o.prototype.gten = function (t) { - return this.cmpn(t) >= 0; - }), - (o.prototype.gte = function (t) { - return this.cmp(t) >= 0; - }), - (o.prototype.ltn = function (t) { - return -1 === this.cmpn(t); - }), - (o.prototype.lt = function (t) { - return -1 === this.cmp(t); - }), - (o.prototype.lten = function (t) { - return this.cmpn(t) <= 0; - }), - (o.prototype.lte = function (t) { - return this.cmp(t) <= 0; - }), - (o.prototype.eqn = function (t) { - return 0 === this.cmpn(t); - }), - (o.prototype.eq = function (t) { - return 0 === this.cmp(t); - }), - (o.red = function (t) { - return new E(t); - }), - (o.prototype.toRed = function (t) { - return ( - i(!this.red, 'Already a number in reduction context'), - i(0 === this.negative, 'red works only with positives'), - t.convertTo(this)._forceRed(t) - ); - }), - (o.prototype.fromRed = function () { - return i(this.red, 'fromRed works only with numbers in reduction context'), this.red.convertFrom(this); - }), - (o.prototype._forceRed = function (t) { - return (this.red = t), this; - }), - (o.prototype.forceRed = function (t) { - return i(!this.red, 'Already a number in reduction context'), this._forceRed(t); - }), - (o.prototype.redAdd = function (t) { - return i(this.red, 'redAdd works only with red numbers'), this.red.add(this, t); - }), - (o.prototype.redIAdd = function (t) { - return i(this.red, 'redIAdd works only with red numbers'), this.red.iadd(this, t); - }), - (o.prototype.redSub = function (t) { - return i(this.red, 'redSub works only with red numbers'), this.red.sub(this, t); - }), - (o.prototype.redISub = function (t) { - return i(this.red, 'redISub works only with red numbers'), this.red.isub(this, t); - }), - (o.prototype.redShl = function (t) { - return i(this.red, 'redShl works only with red numbers'), this.red.shl(this, t); - }), - (o.prototype.redMul = function (t) { - return i(this.red, 'redMul works only with red numbers'), this.red._verify2(this, t), this.red.mul(this, t); - }), - (o.prototype.redIMul = function (t) { - return i(this.red, 'redMul works only with red numbers'), this.red._verify2(this, t), this.red.imul(this, t); - }), - (o.prototype.redSqr = function () { - return i(this.red, 'redSqr works only with red numbers'), this.red._verify1(this), this.red.sqr(this); - }), - (o.prototype.redISqr = function () { - return i(this.red, 'redISqr works only with red numbers'), this.red._verify1(this), this.red.isqr(this); - }), - (o.prototype.redSqrt = function () { - return i(this.red, 'redSqrt works only with red numbers'), this.red._verify1(this), this.red.sqrt(this); - }), - (o.prototype.redInvm = function () { - return i(this.red, 'redInvm works only with red numbers'), this.red._verify1(this), this.red.invm(this); - }), - (o.prototype.redNeg = function () { - return i(this.red, 'redNeg works only with red numbers'), this.red._verify1(this), this.red.neg(this); - }), - (o.prototype.redPow = function (t) { - return i(this.red && !t.red, 'redPow(normalNum)'), this.red._verify1(this), this.red.pow(this, t); - }); - var b = { k256: null, p224: null, p192: null, p25519: null }; - function y(t, e) { - (this.name = t), - (this.p = new o(e, 16)), - (this.n = this.p.bitLength()), - (this.k = new o(1).iushln(this.n).isub(this.p)), - (this.tmp = this._tmp()); - } - function v() { - y.call(this, 'k256', 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f'); - } - function w() { - y.call(this, 'p224', 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001'); - } - function _() { - y.call(this, 'p192', 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff'); - } - function M() { - y.call(this, '25519', '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed'); - } - function E(t) { - if ('string' == typeof t) { - var e = o._prime(t); - (this.m = e.p), (this.prime = e); - } else i(t.gtn(1), 'modulus must be greater than 1'), (this.m = t), (this.prime = null); - } - function S(t) { - E.call(this, t), - (this.shift = this.m.bitLength()), - this.shift % 26 != 0 && (this.shift += 26 - (this.shift % 26)), - (this.r = new o(1).iushln(this.shift)), - (this.r2 = this.imod(this.r.sqr())), - (this.rinv = this.r._invmp(this.m)), - (this.minv = this.rinv.mul(this.r).isubn(1).div(this.m)), - (this.minv = this.minv.umod(this.r)), - (this.minv = this.r.sub(this.minv)); - } - (y.prototype._tmp = function () { - var t = new o(null); - return (t.words = new Array(Math.ceil(this.n / 13))), t; - }), - (y.prototype.ireduce = function (t) { - var e, - r = t; - do { - this.split(r, this.tmp), (e = (r = (r = this.imulK(r)).iadd(this.tmp)).bitLength()); - } while (e > this.n); - var i = e < this.n ? -1 : r.ucmp(this.p); - return 0 === i ? ((r.words[0] = 0), (r.length = 1)) : i > 0 ? r.isub(this.p) : void 0 !== r.strip ? r.strip() : r._strip(), r; - }), - (y.prototype.split = function (t, e) { - t.iushrn(this.n, 0, e); - }), - (y.prototype.imulK = function (t) { - return t.imul(this.k); - }), - n(v, y), - (v.prototype.split = function (t, e) { - for (var r = 4194303, i = Math.min(t.length, 9), n = 0; n < i; n++) e.words[n] = t.words[n]; - if (((e.length = i), t.length <= 9)) return (t.words[0] = 0), void (t.length = 1); - var o = t.words[9]; - for (e.words[e.length++] = o & r, n = 10; n < t.length; n++) { - var s = 0 | t.words[n]; - (t.words[n - 10] = ((s & r) << 4) | (o >>> 22)), (o = s); - } - (o >>>= 22), (t.words[n - 10] = o), 0 === o && t.length > 10 ? (t.length -= 10) : (t.length -= 9); - }), - (v.prototype.imulK = function (t) { - (t.words[t.length] = 0), (t.words[t.length + 1] = 0), (t.length += 2); - for (var e = 0, r = 0; r < t.length; r++) { - var i = 0 | t.words[r]; - (e += 977 * i), (t.words[r] = 67108863 & e), (e = 64 * i + ((e / 67108864) | 0)); - } - return 0 === t.words[t.length - 1] && (t.length--, 0 === t.words[t.length - 1] && t.length--), t; - }), - n(w, y), - n(_, y), - n(M, y), - (M.prototype.imulK = function (t) { - for (var e = 0, r = 0; r < t.length; r++) { - var i = 19 * (0 | t.words[r]) + e, - n = 67108863 & i; - (i >>>= 26), (t.words[r] = n), (e = i); - } - return 0 !== e && (t.words[t.length++] = e), t; - }), - (o._prime = function (t) { - if (b[t]) return b[t]; - var e; - if ('k256' === t) e = new v(); - else if ('p224' === t) e = new w(); - else if ('p192' === t) e = new _(); - else { - if ('p25519' !== t) throw new Error('Unknown prime ' + t); - e = new M(); - } - return (b[t] = e), e; - }), - (E.prototype._verify1 = function (t) { - i(0 === t.negative, 'red works only with positives'), i(t.red, 'red works only with red numbers'); - }), - (E.prototype._verify2 = function (t, e) { - i(0 == (t.negative | e.negative), 'red works only with positives'), - i(t.red && t.red === e.red, 'red works only with red numbers'); - }), - (E.prototype.imod = function (t) { - return this.prime ? this.prime.ireduce(t)._forceRed(this) : t.umod(this.m)._forceRed(this); - }), - (E.prototype.neg = function (t) { - return t.isZero() ? t.clone() : this.m.sub(t)._forceRed(this); - }), - (E.prototype.add = function (t, e) { - this._verify2(t, e); - var r = t.add(e); - return r.cmp(this.m) >= 0 && r.isub(this.m), r._forceRed(this); - }), - (E.prototype.iadd = function (t, e) { - this._verify2(t, e); - var r = t.iadd(e); - return r.cmp(this.m) >= 0 && r.isub(this.m), r; - }), - (E.prototype.sub = function (t, e) { - this._verify2(t, e); - var r = t.sub(e); - return r.cmpn(0) < 0 && r.iadd(this.m), r._forceRed(this); - }), - (E.prototype.isub = function (t, e) { - this._verify2(t, e); - var r = t.isub(e); - return r.cmpn(0) < 0 && r.iadd(this.m), r; - }), - (E.prototype.shl = function (t, e) { - return this._verify1(t), this.imod(t.ushln(e)); - }), - (E.prototype.imul = function (t, e) { - return this._verify2(t, e), this.imod(t.imul(e)); - }), - (E.prototype.mul = function (t, e) { - return this._verify2(t, e), this.imod(t.mul(e)); - }), - (E.prototype.isqr = function (t) { - return this.imul(t, t.clone()); - }), - (E.prototype.sqr = function (t) { - return this.mul(t, t); - }), - (E.prototype.sqrt = function (t) { - if (t.isZero()) return t.clone(); - var e = this.m.andln(3); - if ((i(e % 2 == 1), 3 === e)) { - var r = this.m.add(new o(1)).iushrn(2); - return this.pow(t, r); - } - for (var n = this.m.subn(1), s = 0; !n.isZero() && 0 === n.andln(1); ) s++, n.iushrn(1); - i(!n.isZero()); - var a = new o(1).toRed(this), - h = a.redNeg(), - u = this.m.subn(1).iushrn(1), - f = this.m.bitLength(); - for (f = new o(2 * f * f).toRed(this); 0 !== this.pow(f, u).cmp(h); ) f.redIAdd(h); - for (var c = this.pow(f, n), l = this.pow(t, n.addn(1).iushrn(1)), d = this.pow(t, n), p = s; 0 !== d.cmp(a); ) { - for (var m = d, g = 0; 0 !== m.cmp(a); g++) m = m.redSqr(); - i(g < p); - var b = this.pow(c, new o(1).iushln(p - g - 1)); - (l = l.redMul(b)), (c = b.redSqr()), (d = d.redMul(c)), (p = g); - } - return l; - }), - (E.prototype.invm = function (t) { - var e = t._invmp(this.m); - return 0 !== e.negative ? ((e.negative = 0), this.imod(e).redNeg()) : this.imod(e); - }), - (E.prototype.pow = function (t, e) { - if (e.isZero()) return new o(1).toRed(this); - if (0 === e.cmpn(1)) return t.clone(); - var r = new Array(16); - (r[0] = new o(1).toRed(this)), (r[1] = t); - for (var i = 2; i < r.length; i++) r[i] = this.mul(r[i - 1], t); - var n = r[0], - s = 0, - a = 0, - h = e.bitLength() % 26; - for (0 === h && (h = 26), i = e.length - 1; i >= 0; i--) { - for (var u = e.words[i], f = h - 1; f >= 0; f--) { - var c = (u >> f) & 1; - n !== r[0] && (n = this.sqr(n)), - 0 !== c || 0 !== s - ? ((s <<= 1), (s |= c), (4 == ++a || (0 === i && 0 === f)) && ((n = this.mul(n, r[s])), (a = 0), (s = 0))) - : (a = 0); - } - h = 26; - } - return n; - }), - (E.prototype.convertTo = function (t) { - var e = t.umod(this.m); - return e === t ? e.clone() : e; - }), - (E.prototype.convertFrom = function (t) { - var e = t.clone(); - return (e.red = null), e; - }), - (o.mont = function (t) { - return new S(t); - }), - n(S, E), - (S.prototype.convertTo = function (t) { - return this.imod(t.ushln(this.shift)); - }), - (S.prototype.convertFrom = function (t) { - var e = this.imod(t.mul(this.rinv)); - return (e.red = null), e; - }), - (S.prototype.imul = function (t, e) { - if (t.isZero() || e.isZero()) return (t.words[0] = 0), (t.length = 1), t; - var r = t.imul(e), - i = r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m), - n = r.isub(i).iushrn(this.shift), - o = n; - return n.cmp(this.m) >= 0 ? (o = n.isub(this.m)) : n.cmpn(0) < 0 && (o = n.iadd(this.m)), o._forceRed(this); - }), - (S.prototype.mul = function (t, e) { - if (t.isZero() || e.isZero()) return new o(0)._forceRed(this); - var r = t.mul(e), - i = r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m), - n = r.isub(i).iushrn(this.shift), - s = n; - return n.cmp(this.m) >= 0 ? (s = n.isub(this.m)) : n.cmpn(0) < 0 && (s = n.iadd(this.m)), s._forceRed(this); - }), - (S.prototype.invm = function (t) { - return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this); - }); - })((t = r.nmd(t)), this); - }, - 7266: (t, e, r) => { - 'use strict'; - var i = r(87), - n = r(9500), - o = r(6558), - s = r(4458), - a = r(3081); - function h(t) { - a.call(this, 'digest'), (this._hash = t); - } - i(h, a), - (h.prototype._update = function (t) { - this._hash.update(t); - }), - (h.prototype._final = function () { - return this._hash.digest(); - }), - (t.exports = function (t) { - return 'md5' === (t = t.toLowerCase()) ? new n() : 'rmd160' === t || 'ripemd160' === t ? new o() : new h(s(t)); - }); - }, - 7401: (t, e, r) => { - var i = r(9500); - t.exports = function (t) { - return new i().update(t).digest(); - }; - }, - 2873: (t, e, r) => { - 'use strict'; - var i = r(87), - n = r(3042), - o = r(3081), - s = r(7172).Buffer, - a = r(7401), - h = r(6558), - u = r(4458), - f = s.alloc(128); - function c(t, e) { - o.call(this, 'digest'), 'string' == typeof e && (e = s.from(e)); - var r = 'sha512' === t || 'sha384' === t ? 128 : 64; - (this._alg = t), - (this._key = e), - e.length > r ? (e = ('rmd160' === t ? new h() : u(t)).update(e).digest()) : e.length < r && (e = s.concat([e, f], r)); - for (var i = (this._ipad = s.allocUnsafe(r)), n = (this._opad = s.allocUnsafe(r)), a = 0; a < r; a++) - (i[a] = 54 ^ e[a]), (n[a] = 92 ^ e[a]); - (this._hash = 'rmd160' === t ? new h() : u(t)), this._hash.update(i); - } - i(c, o), - (c.prototype._update = function (t) { - this._hash.update(t); - }), - (c.prototype._final = function () { - var t = this._hash.digest(); - return ('rmd160' === this._alg ? new h() : u(this._alg)).update(this._opad).update(t).digest(); - }), - (t.exports = function (t, e) { - return 'rmd160' === (t = t.toLowerCase()) || 'ripemd160' === t ? new c('rmd160', e) : 'md5' === t ? new n(a, e) : new c(t, e); - }); - }, - 3042: (t, e, r) => { - 'use strict'; - var i = r(87), - n = r(7172).Buffer, - o = r(3081), - s = n.alloc(128), - a = 64; - function h(t, e) { - o.call(this, 'digest'), - 'string' == typeof e && (e = n.from(e)), - (this._alg = t), - (this._key = e), - e.length > a ? (e = t(e)) : e.length < a && (e = n.concat([e, s], a)); - for (var r = (this._ipad = n.allocUnsafe(a)), i = (this._opad = n.allocUnsafe(a)), h = 0; h < a; h++) - (r[h] = 54 ^ e[h]), (i[h] = 92 ^ e[h]); - this._hash = [r]; - } - i(h, o), - (h.prototype._update = function (t) { - this._hash.push(t); - }), - (h.prototype._final = function () { - var t = this._alg(n.concat(this._hash)); - return this._alg(n.concat([this._opad, t])); - }), - (t.exports = h); - }, - 2337: (t, e, r) => { - 'use strict'; - (e.randomBytes = e.rng = e.pseudoRandomBytes = e.prng = r(4198)), - (e.createHash = e.Hash = r(7266)), - (e.createHmac = e.Hmac = r(2873)); - var i = r(4905), - n = Object.keys(i), - o = ['sha1', 'sha224', 'sha256', 'sha384', 'sha512', 'md5', 'rmd160'].concat(n); - e.getHashes = function () { - return o; - }; - var s = r(41); - (e.pbkdf2 = s.pbkdf2), (e.pbkdf2Sync = s.pbkdf2Sync); - var a = r(1240); - (e.Cipher = a.Cipher), - (e.createCipher = a.createCipher), - (e.Cipheriv = a.Cipheriv), - (e.createCipheriv = a.createCipheriv), - (e.Decipher = a.Decipher), - (e.createDecipher = a.createDecipher), - (e.Decipheriv = a.Decipheriv), - (e.createDecipheriv = a.createDecipheriv), - (e.getCiphers = a.getCiphers), - (e.listCiphers = a.listCiphers); - var h = r(2834); - (e.DiffieHellmanGroup = h.DiffieHellmanGroup), - (e.createDiffieHellmanGroup = h.createDiffieHellmanGroup), - (e.getDiffieHellman = h.getDiffieHellman), - (e.createDiffieHellman = h.createDiffieHellman), - (e.DiffieHellman = h.DiffieHellman); - var u = r(7545); - (e.createSign = u.createSign), - (e.Sign = u.Sign), - (e.createVerify = u.createVerify), - (e.Verify = u.Verify), - (e.createECDH = r(2220)); - var f = r(9639); - (e.publicEncrypt = f.publicEncrypt), - (e.privateEncrypt = f.privateEncrypt), - (e.publicDecrypt = f.publicDecrypt), - (e.privateDecrypt = f.privateDecrypt); - var c = r(8519); - (e.randomFill = c.randomFill), - (e.randomFillSync = c.randomFillSync), - (e.createCredentials = function () { - throw new Error( - [ - 'sorry, createCredentials is not implemented yet', - 'we accept pull requests', - 'https://github.com/crypto-browserify/crypto-browserify', - ].join('\n') - ); - }), - (e.constants = { - DH_CHECK_P_NOT_SAFE_PRIME: 2, - DH_CHECK_P_NOT_PRIME: 1, - DH_UNABLE_TO_CHECK_GENERATOR: 4, - DH_NOT_SUITABLE_GENERATOR: 8, - NPN_ENABLED: 1, - ALPN_ENABLED: 1, - RSA_PKCS1_PADDING: 1, - RSA_SSLV23_PADDING: 2, - RSA_NO_PADDING: 3, - RSA_PKCS1_OAEP_PADDING: 4, - RSA_X931_PADDING: 5, - RSA_PKCS1_PSS_PADDING: 6, - POINT_CONVERSION_COMPRESSED: 2, - POINT_CONVERSION_UNCOMPRESSED: 4, - POINT_CONVERSION_HYBRID: 6, - }); - }, - 7191: (t, e, r) => { - 'use strict'; - (e.utils = r(5516)), (e.Cipher = r(4923)), (e.DES = r(225)), (e.CBC = r(8701)), (e.EDE = r(6540)); - }, - 8701: (t, e, r) => { - 'use strict'; - var i = r(7859), - n = r(87), - o = {}; - function s(t) { - i.equal(t.length, 8, 'Invalid IV length'), (this.iv = new Array(8)); - for (var e = 0; e < this.iv.length; e++) this.iv[e] = t[e]; - } - (e.instantiate = function (t) { - function e(e) { - t.call(this, e), this._cbcInit(); - } - n(e, t); - for (var r = Object.keys(o), i = 0; i < r.length; i++) { - var s = r[i]; - e.prototype[s] = o[s]; - } - return ( - (e.create = function (t) { - return new e(t); - }), - e - ); - }), - (o._cbcInit = function () { - var t = new s(this.options.iv); - this._cbcState = t; - }), - (o._update = function (t, e, r, i) { - var n = this._cbcState, - o = this.constructor.super_.prototype, - s = n.iv; - if ('encrypt' === this.type) { - for (var a = 0; a < this.blockSize; a++) s[a] ^= t[e + a]; - for (o._update.call(this, s, 0, r, i), a = 0; a < this.blockSize; a++) s[a] = r[i + a]; - } else { - for (o._update.call(this, t, e, r, i), a = 0; a < this.blockSize; a++) r[i + a] ^= s[a]; - for (a = 0; a < this.blockSize; a++) s[a] = t[e + a]; - } - }); - }, - 4923: (t, e, r) => { - 'use strict'; - var i = r(7859); - function n(t) { - (this.options = t), - (this.type = this.options.type), - (this.blockSize = 8), - this._init(), - (this.buffer = new Array(this.blockSize)), - (this.bufferOff = 0); - } - (t.exports = n), - (n.prototype._init = function () {}), - (n.prototype.update = function (t) { - return 0 === t.length ? [] : 'decrypt' === this.type ? this._updateDecrypt(t) : this._updateEncrypt(t); - }), - (n.prototype._buffer = function (t, e) { - for (var r = Math.min(this.buffer.length - this.bufferOff, t.length - e), i = 0; i < r; i++) - this.buffer[this.bufferOff + i] = t[e + i]; - return (this.bufferOff += r), r; - }), - (n.prototype._flushBuffer = function (t, e) { - return this._update(this.buffer, 0, t, e), (this.bufferOff = 0), this.blockSize; - }), - (n.prototype._updateEncrypt = function (t) { - var e = 0, - r = 0, - i = ((this.bufferOff + t.length) / this.blockSize) | 0, - n = new Array(i * this.blockSize); - 0 !== this.bufferOff && ((e += this._buffer(t, e)), this.bufferOff === this.buffer.length && (r += this._flushBuffer(n, r))); - for (var o = t.length - ((t.length - e) % this.blockSize); e < o; e += this.blockSize) - this._update(t, e, n, r), (r += this.blockSize); - for (; e < t.length; e++, this.bufferOff++) this.buffer[this.bufferOff] = t[e]; - return n; - }), - (n.prototype._updateDecrypt = function (t) { - for ( - var e = 0, r = 0, i = Math.ceil((this.bufferOff + t.length) / this.blockSize) - 1, n = new Array(i * this.blockSize); - i > 0; - i-- - ) - (e += this._buffer(t, e)), (r += this._flushBuffer(n, r)); - return (e += this._buffer(t, e)), n; - }), - (n.prototype.final = function (t) { - var e, r; - return ( - t && (e = this.update(t)), (r = 'encrypt' === this.type ? this._finalEncrypt() : this._finalDecrypt()), e ? e.concat(r) : r - ); - }), - (n.prototype._pad = function (t, e) { - if (0 === e) return !1; - for (; e < t.length; ) t[e++] = 0; - return !0; - }), - (n.prototype._finalEncrypt = function () { - if (!this._pad(this.buffer, this.bufferOff)) return []; - var t = new Array(this.blockSize); - return this._update(this.buffer, 0, t, 0), t; - }), - (n.prototype._unpad = function (t) { - return t; - }), - (n.prototype._finalDecrypt = function () { - i.equal(this.bufferOff, this.blockSize, 'Not enough data to decrypt'); - var t = new Array(this.blockSize); - return this._flushBuffer(t, 0), this._unpad(t); - }); - }, - 225: (t, e, r) => { - 'use strict'; - var i = r(7859), - n = r(87), - o = r(5516), - s = r(4923); - function a() { - (this.tmp = new Array(2)), (this.keys = null); - } - function h(t) { - s.call(this, t); - var e = new a(); - (this._desState = e), this.deriveKeys(e, t.key); - } - n(h, s), - (t.exports = h), - (h.create = function (t) { - return new h(t); - }); - var u = [1, 1, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 1]; - (h.prototype.deriveKeys = function (t, e) { - (t.keys = new Array(32)), i.equal(e.length, this.blockSize, 'Invalid key length'); - var r = o.readUInt32BE(e, 0), - n = o.readUInt32BE(e, 4); - o.pc1(r, n, t.tmp, 0), (r = t.tmp[0]), (n = t.tmp[1]); - for (var s = 0; s < t.keys.length; s += 2) { - var a = u[s >>> 1]; - (r = o.r28shl(r, a)), (n = o.r28shl(n, a)), o.pc2(r, n, t.keys, s); - } - }), - (h.prototype._update = function (t, e, r, i) { - var n = this._desState, - s = o.readUInt32BE(t, e), - a = o.readUInt32BE(t, e + 4); - o.ip(s, a, n.tmp, 0), - (s = n.tmp[0]), - (a = n.tmp[1]), - 'encrypt' === this.type ? this._encrypt(n, s, a, n.tmp, 0) : this._decrypt(n, s, a, n.tmp, 0), - (s = n.tmp[0]), - (a = n.tmp[1]), - o.writeUInt32BE(r, s, i), - o.writeUInt32BE(r, a, i + 4); - }), - (h.prototype._pad = function (t, e) { - for (var r = t.length - e, i = e; i < t.length; i++) t[i] = r; - return !0; - }), - (h.prototype._unpad = function (t) { - for (var e = t[t.length - 1], r = t.length - e; r < t.length; r++) i.equal(t[r], e); - return t.slice(0, t.length - e); - }), - (h.prototype._encrypt = function (t, e, r, i, n) { - for (var s = e, a = r, h = 0; h < t.keys.length; h += 2) { - var u = t.keys[h], - f = t.keys[h + 1]; - o.expand(a, t.tmp, 0), (u ^= t.tmp[0]), (f ^= t.tmp[1]); - var c = o.substitute(u, f), - l = a; - (a = (s ^ o.permute(c)) >>> 0), (s = l); - } - o.rip(a, s, i, n); - }), - (h.prototype._decrypt = function (t, e, r, i, n) { - for (var s = r, a = e, h = t.keys.length - 2; h >= 0; h -= 2) { - var u = t.keys[h], - f = t.keys[h + 1]; - o.expand(s, t.tmp, 0), (u ^= t.tmp[0]), (f ^= t.tmp[1]); - var c = o.substitute(u, f), - l = s; - (s = (a ^ o.permute(c)) >>> 0), (a = l); - } - o.rip(s, a, i, n); - }); - }, - 6540: (t, e, r) => { - 'use strict'; - var i = r(7859), - n = r(87), - o = r(4923), - s = r(225); - function a(t, e) { - i.equal(e.length, 24, 'Invalid key length'); - var r = e.slice(0, 8), - n = e.slice(8, 16), - o = e.slice(16, 24); - this.ciphers = - 'encrypt' === t - ? [s.create({ type: 'encrypt', key: r }), s.create({ type: 'decrypt', key: n }), s.create({ type: 'encrypt', key: o })] - : [s.create({ type: 'decrypt', key: o }), s.create({ type: 'encrypt', key: n }), s.create({ type: 'decrypt', key: r })]; - } - function h(t) { - o.call(this, t); - var e = new a(this.type, this.options.key); - this._edeState = e; - } - n(h, o), - (t.exports = h), - (h.create = function (t) { - return new h(t); - }), - (h.prototype._update = function (t, e, r, i) { - var n = this._edeState; - n.ciphers[0]._update(t, e, r, i), n.ciphers[1]._update(r, i, r, i), n.ciphers[2]._update(r, i, r, i); - }), - (h.prototype._pad = s.prototype._pad), - (h.prototype._unpad = s.prototype._unpad); - }, - 5516: (t, e) => { - 'use strict'; - (e.readUInt32BE = function (t, e) { - return ((t[0 + e] << 24) | (t[1 + e] << 16) | (t[2 + e] << 8) | t[3 + e]) >>> 0; - }), - (e.writeUInt32BE = function (t, e, r) { - (t[0 + r] = e >>> 24), (t[1 + r] = (e >>> 16) & 255), (t[2 + r] = (e >>> 8) & 255), (t[3 + r] = 255 & e); - }), - (e.ip = function (t, e, r, i) { - for (var n = 0, o = 0, s = 6; s >= 0; s -= 2) { - for (var a = 0; a <= 24; a += 8) (n <<= 1), (n |= (e >>> (a + s)) & 1); - for (a = 0; a <= 24; a += 8) (n <<= 1), (n |= (t >>> (a + s)) & 1); - } - for (s = 6; s >= 0; s -= 2) { - for (a = 1; a <= 25; a += 8) (o <<= 1), (o |= (e >>> (a + s)) & 1); - for (a = 1; a <= 25; a += 8) (o <<= 1), (o |= (t >>> (a + s)) & 1); - } - (r[i + 0] = n >>> 0), (r[i + 1] = o >>> 0); - }), - (e.rip = function (t, e, r, i) { - for (var n = 0, o = 0, s = 0; s < 4; s++) - for (var a = 24; a >= 0; a -= 8) (n <<= 1), (n |= (e >>> (a + s)) & 1), (n <<= 1), (n |= (t >>> (a + s)) & 1); - for (s = 4; s < 8; s++) - for (a = 24; a >= 0; a -= 8) (o <<= 1), (o |= (e >>> (a + s)) & 1), (o <<= 1), (o |= (t >>> (a + s)) & 1); - (r[i + 0] = n >>> 0), (r[i + 1] = o >>> 0); - }), - (e.pc1 = function (t, e, r, i) { - for (var n = 0, o = 0, s = 7; s >= 5; s--) { - for (var a = 0; a <= 24; a += 8) (n <<= 1), (n |= (e >> (a + s)) & 1); - for (a = 0; a <= 24; a += 8) (n <<= 1), (n |= (t >> (a + s)) & 1); - } - for (a = 0; a <= 24; a += 8) (n <<= 1), (n |= (e >> (a + s)) & 1); - for (s = 1; s <= 3; s++) { - for (a = 0; a <= 24; a += 8) (o <<= 1), (o |= (e >> (a + s)) & 1); - for (a = 0; a <= 24; a += 8) (o <<= 1), (o |= (t >> (a + s)) & 1); - } - for (a = 0; a <= 24; a += 8) (o <<= 1), (o |= (t >> (a + s)) & 1); - (r[i + 0] = n >>> 0), (r[i + 1] = o >>> 0); - }), - (e.r28shl = function (t, e) { - return ((t << e) & 268435455) | (t >>> (28 - e)); - }); - var r = [ - 14, 11, 17, 4, 27, 23, 25, 0, 13, 22, 7, 18, 5, 9, 16, 24, 2, 20, 12, 21, 1, 8, 15, 26, 15, 4, 25, 19, 9, 1, 26, 16, 5, 11, 23, 8, - 12, 7, 17, 0, 22, 3, 10, 14, 6, 20, 27, 24, - ]; - (e.pc2 = function (t, e, i, n) { - for (var o = 0, s = 0, a = r.length >>> 1, h = 0; h < a; h++) (o <<= 1), (o |= (t >>> r[h]) & 1); - for (h = a; h < r.length; h++) (s <<= 1), (s |= (e >>> r[h]) & 1); - (i[n + 0] = o >>> 0), (i[n + 1] = s >>> 0); - }), - (e.expand = function (t, e, r) { - var i = 0, - n = 0; - i = ((1 & t) << 5) | (t >>> 27); - for (var o = 23; o >= 15; o -= 4) (i <<= 6), (i |= (t >>> o) & 63); - for (o = 11; o >= 3; o -= 4) (n |= (t >>> o) & 63), (n <<= 6); - (n |= ((31 & t) << 1) | (t >>> 31)), (e[r + 0] = i >>> 0), (e[r + 1] = n >>> 0); - }); - var i = [ - 14, 0, 4, 15, 13, 7, 1, 4, 2, 14, 15, 2, 11, 13, 8, 1, 3, 10, 10, 6, 6, 12, 12, 11, 5, 9, 9, 5, 0, 3, 7, 8, 4, 15, 1, 12, 14, 8, - 8, 2, 13, 4, 6, 9, 2, 1, 11, 7, 15, 5, 12, 11, 9, 3, 7, 14, 3, 10, 10, 0, 5, 6, 0, 13, 15, 3, 1, 13, 8, 4, 14, 7, 6, 15, 11, 2, 3, - 8, 4, 14, 9, 12, 7, 0, 2, 1, 13, 10, 12, 6, 0, 9, 5, 11, 10, 5, 0, 13, 14, 8, 7, 10, 11, 1, 10, 3, 4, 15, 13, 4, 1, 2, 5, 11, 8, - 6, 12, 7, 6, 12, 9, 0, 3, 5, 2, 14, 15, 9, 10, 13, 0, 7, 9, 0, 14, 9, 6, 3, 3, 4, 15, 6, 5, 10, 1, 2, 13, 8, 12, 5, 7, 14, 11, 12, - 4, 11, 2, 15, 8, 1, 13, 1, 6, 10, 4, 13, 9, 0, 8, 6, 15, 9, 3, 8, 0, 7, 11, 4, 1, 15, 2, 14, 12, 3, 5, 11, 10, 5, 14, 2, 7, 12, 7, - 13, 13, 8, 14, 11, 3, 5, 0, 6, 6, 15, 9, 0, 10, 3, 1, 4, 2, 7, 8, 2, 5, 12, 11, 1, 12, 10, 4, 14, 15, 9, 10, 3, 6, 15, 9, 0, 0, 6, - 12, 10, 11, 1, 7, 13, 13, 8, 15, 9, 1, 4, 3, 5, 14, 11, 5, 12, 2, 7, 8, 2, 4, 14, 2, 14, 12, 11, 4, 2, 1, 12, 7, 4, 10, 7, 11, 13, - 6, 1, 8, 5, 5, 0, 3, 15, 15, 10, 13, 3, 0, 9, 14, 8, 9, 6, 4, 11, 2, 8, 1, 12, 11, 7, 10, 1, 13, 14, 7, 2, 8, 13, 15, 6, 9, 15, - 12, 0, 5, 9, 6, 10, 3, 4, 0, 5, 14, 3, 12, 10, 1, 15, 10, 4, 15, 2, 9, 7, 2, 12, 6, 9, 8, 5, 0, 6, 13, 1, 3, 13, 4, 14, 14, 0, 7, - 11, 5, 3, 11, 8, 9, 4, 14, 3, 15, 2, 5, 12, 2, 9, 8, 5, 12, 15, 3, 10, 7, 11, 0, 14, 4, 1, 10, 7, 1, 6, 13, 0, 11, 8, 6, 13, 4, - 13, 11, 0, 2, 11, 14, 7, 15, 4, 0, 9, 8, 1, 13, 10, 3, 14, 12, 3, 9, 5, 7, 12, 5, 2, 10, 15, 6, 8, 1, 6, 1, 6, 4, 11, 11, 13, 13, - 8, 12, 1, 3, 4, 7, 10, 14, 7, 10, 9, 15, 5, 6, 0, 8, 15, 0, 14, 5, 2, 9, 3, 2, 12, 13, 1, 2, 15, 8, 13, 4, 8, 6, 10, 15, 3, 11, 7, - 1, 4, 10, 12, 9, 5, 3, 6, 14, 11, 5, 0, 0, 14, 12, 9, 7, 2, 7, 2, 11, 1, 4, 14, 1, 7, 9, 4, 12, 10, 14, 8, 2, 13, 0, 15, 6, 12, - 10, 9, 13, 0, 15, 3, 3, 5, 5, 6, 8, 11, - ]; - e.substitute = function (t, e) { - for (var r = 0, n = 0; n < 4; n++) (r <<= 4), (r |= i[64 * n + ((t >>> (18 - 6 * n)) & 63)]); - for (n = 0; n < 4; n++) (r <<= 4), (r |= i[256 + 64 * n + ((e >>> (18 - 6 * n)) & 63)]); - return r >>> 0; - }; - var n = [16, 25, 12, 11, 3, 20, 4, 15, 31, 17, 9, 6, 27, 14, 1, 22, 30, 24, 8, 18, 0, 5, 29, 23, 13, 19, 2, 26, 10, 21, 28, 7]; - (e.permute = function (t) { - for (var e = 0, r = 0; r < n.length; r++) (e <<= 1), (e |= (t >>> n[r]) & 1); - return e >>> 0; - }), - (e.padSplit = function (t, e, r) { - for (var i = t.toString(2); i.length < e; ) i = '0' + i; - for (var n = [], o = 0; o < e; o += r) n.push(i.slice(o, o + r)); - return n.join(' '); - }); - }, - 2834: (t, e, r) => { - var i = r(5757), - n = r(7064), - o = r(1554), - s = { binary: !0, hex: !0, base64: !0 }; - (e.DiffieHellmanGroup = - e.createDiffieHellmanGroup = - e.getDiffieHellman = - function (t) { - var e = new Buffer(n[t].prime, 'hex'), - r = new Buffer(n[t].gen, 'hex'); - return new o(e, r); - }), - (e.createDiffieHellman = e.DiffieHellman = - function t(e, r, n, a) { - return Buffer.isBuffer(r) || void 0 === s[r] - ? t(e, 'binary', r, n) - : ((r = r || 'binary'), - (a = a || 'binary'), - (n = n || new Buffer([2])), - Buffer.isBuffer(n) || (n = new Buffer(n, a)), - 'number' == typeof e ? new o(i(e, n), n, !0) : (Buffer.isBuffer(e) || (e = new Buffer(e, r)), new o(e, n, !0))); - }); - }, - 1554: (t, e, r) => { - var i = r(3085), - n = new (r(8773))(), - o = new i(24), - s = new i(11), - a = new i(10), - h = new i(3), - u = new i(7), - f = r(5757), - c = r(4198); - function l(t, e) { - return (e = e || 'utf8'), Buffer.isBuffer(t) || (t = new Buffer(t, e)), (this._pub = new i(t)), this; - } - function d(t, e) { - return (e = e || 'utf8'), Buffer.isBuffer(t) || (t = new Buffer(t, e)), (this._priv = new i(t)), this; - } - t.exports = m; - var p = {}; - function m(t, e, r) { - this.setGenerator(e), - (this.__prime = new i(t)), - (this._prime = i.mont(this.__prime)), - (this._primeLen = t.length), - (this._pub = void 0), - (this._priv = void 0), - (this._primeCode = void 0), - r ? ((this.setPublicKey = l), (this.setPrivateKey = d)) : (this._primeCode = 8); - } - function g(t, e) { - var r = new Buffer(t.toArray()); - return e ? r.toString(e) : r; - } - Object.defineProperty(m.prototype, 'verifyError', { - enumerable: !0, - get: function () { - return ( - 'number' != typeof this._primeCode && - (this._primeCode = (function (t, e) { - var r = e.toString('hex'), - i = [r, t.toString(16)].join('_'); - if (i in p) return p[i]; - var c, - l = 0; - if (t.isEven() || !f.simpleSieve || !f.fermatTest(t) || !n.test(t)) - return (l += 1), (l += '02' === r || '05' === r ? 8 : 4), (p[i] = l), l; - switch ((n.test(t.shrn(1)) || (l += 2), r)) { - case '02': - t.mod(o).cmp(s) && (l += 8); - break; - case '05': - (c = t.mod(a)).cmp(h) && c.cmp(u) && (l += 8); - break; - default: - l += 4; - } - return (p[i] = l), l; - })(this.__prime, this.__gen)), - this._primeCode - ); - }, - }), - (m.prototype.generateKeys = function () { - return ( - this._priv || (this._priv = new i(c(this._primeLen))), - (this._pub = this._gen.toRed(this._prime).redPow(this._priv).fromRed()), - this.getPublicKey() - ); - }), - (m.prototype.computeSecret = function (t) { - var e = (t = (t = new i(t)).toRed(this._prime)).redPow(this._priv).fromRed(), - r = new Buffer(e.toArray()), - n = this.getPrime(); - if (r.length < n.length) { - var o = new Buffer(n.length - r.length); - o.fill(0), (r = Buffer.concat([o, r])); - } - return r; - }), - (m.prototype.getPublicKey = function (t) { - return g(this._pub, t); - }), - (m.prototype.getPrivateKey = function (t) { - return g(this._priv, t); - }), - (m.prototype.getPrime = function (t) { - return g(this.__prime, t); - }), - (m.prototype.getGenerator = function (t) { - return g(this._gen, t); - }), - (m.prototype.setGenerator = function (t, e) { - return (e = e || 'utf8'), Buffer.isBuffer(t) || (t = new Buffer(t, e)), (this.__gen = t), (this._gen = new i(t)), this; - }); - }, - 5757: (t, e, r) => { - var i = r(4198); - (t.exports = y), (y.simpleSieve = g), (y.fermatTest = b); - var n = r(3085), - o = new n(24), - s = new (r(8773))(), - a = new n(1), - h = new n(2), - u = new n(5), - f = (new n(16), new n(8), new n(10)), - c = new n(3), - l = (new n(7), new n(11)), - d = new n(4), - p = (new n(12), null); - function m() { - if (null !== p) return p; - var t = []; - t[0] = 2; - for (var e = 1, r = 3; r < 1048576; r += 2) { - for (var i = Math.ceil(Math.sqrt(r)), n = 0; n < e && t[n] <= i && r % t[n] != 0; n++); - (e !== n && t[n] <= i) || (t[e++] = r); - } - return (p = t), t; - } - function g(t) { - for (var e = m(), r = 0; r < e.length; r++) if (0 === t.modn(e[r])) return 0 === t.cmpn(e[r]); - return !0; - } - function b(t) { - var e = n.mont(t); - return 0 === h.toRed(e).redPow(t.subn(1)).fromRed().cmpn(1); - } - function y(t, e) { - if (t < 16) return new n(2 === e || 5 === e ? [140, 123] : [140, 39]); - var r, p; - for (e = new n(e); ; ) { - for (r = new n(i(Math.ceil(t / 8))); r.bitLength() > t; ) r.ishrn(1); - if ((r.isEven() && r.iadd(a), r.testn(1) || r.iadd(h), e.cmp(h))) { - if (!e.cmp(u)) for (; r.mod(f).cmp(c); ) r.iadd(d); - } else for (; r.mod(o).cmp(l); ) r.iadd(d); - if (g((p = r.shrn(1))) && g(r) && b(p) && b(r) && s.test(p) && s.test(r)) return r; - } - } - }, - 3085: function (t, e, r) { - !(function (t, e) { - 'use strict'; - function i(t, e) { - if (!t) throw new Error(e || 'Assertion failed'); - } - function n(t, e) { - t.super_ = e; - var r = function () {}; - (r.prototype = e.prototype), (t.prototype = new r()), (t.prototype.constructor = t); - } - function o(t, e, r) { - if (o.isBN(t)) return t; - (this.negative = 0), - (this.words = null), - (this.length = 0), - (this.red = null), - null !== t && (('le' !== e && 'be' !== e) || ((r = e), (e = 10)), this._init(t || 0, e || 10, r || 'be')); - } - var s; - 'object' == typeof t ? (t.exports = o) : (e.BN = o), (o.BN = o), (o.wordSize = 26); - try { - s = 'undefined' != typeof window && void 0 !== window.Buffer ? window.Buffer : r(1212).Buffer; - } catch (t) {} - function a(t, e) { - var r = t.charCodeAt(e); - return r >= 65 && r <= 70 ? r - 55 : r >= 97 && r <= 102 ? r - 87 : (r - 48) & 15; - } - function h(t, e, r) { - var i = a(t, r); - return r - 1 >= e && (i |= a(t, r - 1) << 4), i; - } - function u(t, e, r, i) { - for (var n = 0, o = Math.min(t.length, r), s = e; s < o; s++) { - var a = t.charCodeAt(s) - 48; - (n *= i), (n += a >= 49 ? a - 49 + 10 : a >= 17 ? a - 17 + 10 : a); - } - return n; - } - (o.isBN = function (t) { - return ( - t instanceof o || (null !== t && 'object' == typeof t && t.constructor.wordSize === o.wordSize && Array.isArray(t.words)) - ); - }), - (o.max = function (t, e) { - return t.cmp(e) > 0 ? t : e; - }), - (o.min = function (t, e) { - return t.cmp(e) < 0 ? t : e; - }), - (o.prototype._init = function (t, e, r) { - if ('number' == typeof t) return this._initNumber(t, e, r); - if ('object' == typeof t) return this._initArray(t, e, r); - 'hex' === e && (e = 16), i(e === (0 | e) && e >= 2 && e <= 36); - var n = 0; - '-' === (t = t.toString().replace(/\s+/g, ''))[0] && (n++, (this.negative = 1)), - n < t.length && - (16 === e ? this._parseHex(t, n, r) : (this._parseBase(t, e, n), 'le' === r && this._initArray(this.toArray(), e, r))); - }), - (o.prototype._initNumber = function (t, e, r) { - t < 0 && ((this.negative = 1), (t = -t)), - t < 67108864 - ? ((this.words = [67108863 & t]), (this.length = 1)) - : t < 4503599627370496 - ? ((this.words = [67108863 & t, (t / 67108864) & 67108863]), (this.length = 2)) - : (i(t < 9007199254740992), (this.words = [67108863 & t, (t / 67108864) & 67108863, 1]), (this.length = 3)), - 'le' === r && this._initArray(this.toArray(), e, r); - }), - (o.prototype._initArray = function (t, e, r) { - if ((i('number' == typeof t.length), t.length <= 0)) return (this.words = [0]), (this.length = 1), this; - (this.length = Math.ceil(t.length / 3)), (this.words = new Array(this.length)); - for (var n = 0; n < this.length; n++) this.words[n] = 0; - var o, - s, - a = 0; - if ('be' === r) - for (n = t.length - 1, o = 0; n >= 0; n -= 3) - (s = t[n] | (t[n - 1] << 8) | (t[n - 2] << 16)), - (this.words[o] |= (s << a) & 67108863), - (this.words[o + 1] = (s >>> (26 - a)) & 67108863), - (a += 24) >= 26 && ((a -= 26), o++); - else if ('le' === r) - for (n = 0, o = 0; n < t.length; n += 3) - (s = t[n] | (t[n + 1] << 8) | (t[n + 2] << 16)), - (this.words[o] |= (s << a) & 67108863), - (this.words[o + 1] = (s >>> (26 - a)) & 67108863), - (a += 24) >= 26 && ((a -= 26), o++); - return this.strip(); - }), - (o.prototype._parseHex = function (t, e, r) { - (this.length = Math.ceil((t.length - e) / 6)), (this.words = new Array(this.length)); - for (var i = 0; i < this.length; i++) this.words[i] = 0; - var n, - o = 0, - s = 0; - if ('be' === r) - for (i = t.length - 1; i >= e; i -= 2) - (n = h(t, e, i) << o), - (this.words[s] |= 67108863 & n), - o >= 18 ? ((o -= 18), (s += 1), (this.words[s] |= n >>> 26)) : (o += 8); - else - for (i = (t.length - e) % 2 == 0 ? e + 1 : e; i < t.length; i += 2) - (n = h(t, e, i) << o), - (this.words[s] |= 67108863 & n), - o >= 18 ? ((o -= 18), (s += 1), (this.words[s] |= n >>> 26)) : (o += 8); - this.strip(); - }), - (o.prototype._parseBase = function (t, e, r) { - (this.words = [0]), (this.length = 1); - for (var i = 0, n = 1; n <= 67108863; n *= e) i++; - i--, (n = (n / e) | 0); - for (var o = t.length - r, s = o % i, a = Math.min(o, o - s) + r, h = 0, f = r; f < a; f += i) - (h = u(t, f, f + i, e)), this.imuln(n), this.words[0] + h < 67108864 ? (this.words[0] += h) : this._iaddn(h); - if (0 !== s) { - var c = 1; - for (h = u(t, f, t.length, e), f = 0; f < s; f++) c *= e; - this.imuln(c), this.words[0] + h < 67108864 ? (this.words[0] += h) : this._iaddn(h); - } - this.strip(); - }), - (o.prototype.copy = function (t) { - t.words = new Array(this.length); - for (var e = 0; e < this.length; e++) t.words[e] = this.words[e]; - (t.length = this.length), (t.negative = this.negative), (t.red = this.red); - }), - (o.prototype.clone = function () { - var t = new o(null); - return this.copy(t), t; - }), - (o.prototype._expand = function (t) { - for (; this.length < t; ) this.words[this.length++] = 0; - return this; - }), - (o.prototype.strip = function () { - for (; this.length > 1 && 0 === this.words[this.length - 1]; ) this.length--; - return this._normSign(); - }), - (o.prototype._normSign = function () { - return 1 === this.length && 0 === this.words[0] && (this.negative = 0), this; - }), - (o.prototype.inspect = function () { - return (this.red ? ''; - }); - var f = [ - '', - '0', - '00', - '000', - '0000', - '00000', - '000000', - '0000000', - '00000000', - '000000000', - '0000000000', - '00000000000', - '000000000000', - '0000000000000', - '00000000000000', - '000000000000000', - '0000000000000000', - '00000000000000000', - '000000000000000000', - '0000000000000000000', - '00000000000000000000', - '000000000000000000000', - '0000000000000000000000', - '00000000000000000000000', - '000000000000000000000000', - '0000000000000000000000000', - ], - c = [0, 0, 25, 16, 12, 11, 10, 9, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5], - l = [ - 0, 0, 33554432, 43046721, 16777216, 48828125, 60466176, 40353607, 16777216, 43046721, 1e7, 19487171, 35831808, 62748517, - 7529536, 11390625, 16777216, 24137569, 34012224, 47045881, 64e6, 4084101, 5153632, 6436343, 7962624, 9765625, 11881376, - 14348907, 17210368, 20511149, 243e5, 28629151, 33554432, 39135393, 45435424, 52521875, 60466176, - ]; - function d(t, e, r) { - r.negative = e.negative ^ t.negative; - var i = (t.length + e.length) | 0; - (r.length = i), (i = (i - 1) | 0); - var n = 0 | t.words[0], - o = 0 | e.words[0], - s = n * o, - a = 67108863 & s, - h = (s / 67108864) | 0; - r.words[0] = a; - for (var u = 1; u < i; u++) { - for (var f = h >>> 26, c = 67108863 & h, l = Math.min(u, e.length - 1), d = Math.max(0, u - t.length + 1); d <= l; d++) { - var p = (u - d) | 0; - (f += ((s = (n = 0 | t.words[p]) * (o = 0 | e.words[d]) + c) / 67108864) | 0), (c = 67108863 & s); - } - (r.words[u] = 0 | c), (h = 0 | f); - } - return 0 !== h ? (r.words[u] = 0 | h) : r.length--, r.strip(); - } - (o.prototype.toString = function (t, e) { - var r; - if (((e = 0 | e || 1), 16 === (t = t || 10) || 'hex' === t)) { - r = ''; - for (var n = 0, o = 0, s = 0; s < this.length; s++) { - var a = this.words[s], - h = (16777215 & ((a << n) | o)).toString(16); - (r = 0 != (o = (a >>> (24 - n)) & 16777215) || s !== this.length - 1 ? f[6 - h.length] + h + r : h + r), - (n += 2) >= 26 && ((n -= 26), s--); - } - for (0 !== o && (r = o.toString(16) + r); r.length % e != 0; ) r = '0' + r; - return 0 !== this.negative && (r = '-' + r), r; - } - if (t === (0 | t) && t >= 2 && t <= 36) { - var u = c[t], - d = l[t]; - r = ''; - var p = this.clone(); - for (p.negative = 0; !p.isZero(); ) { - var m = p.modn(d).toString(t); - r = (p = p.idivn(d)).isZero() ? m + r : f[u - m.length] + m + r; - } - for (this.isZero() && (r = '0' + r); r.length % e != 0; ) r = '0' + r; - return 0 !== this.negative && (r = '-' + r), r; - } - i(!1, 'Base should be between 2 and 36'); - }), - (o.prototype.toNumber = function () { - var t = this.words[0]; - return ( - 2 === this.length - ? (t += 67108864 * this.words[1]) - : 3 === this.length && 1 === this.words[2] - ? (t += 4503599627370496 + 67108864 * this.words[1]) - : this.length > 2 && i(!1, 'Number can only safely store up to 53 bits'), - 0 !== this.negative ? -t : t - ); - }), - (o.prototype.toJSON = function () { - return this.toString(16); - }), - (o.prototype.toBuffer = function (t, e) { - return i(void 0 !== s), this.toArrayLike(s, t, e); - }), - (o.prototype.toArray = function (t, e) { - return this.toArrayLike(Array, t, e); - }), - (o.prototype.toArrayLike = function (t, e, r) { - var n = this.byteLength(), - o = r || Math.max(1, n); - i(n <= o, 'byte array longer than desired length'), i(o > 0, 'Requested array length <= 0'), this.strip(); - var s, - a, - h = 'le' === e, - u = new t(o), - f = this.clone(); - if (h) { - for (a = 0; !f.isZero(); a++) (s = f.andln(255)), f.iushrn(8), (u[a] = s); - for (; a < o; a++) u[a] = 0; - } else { - for (a = 0; a < o - n; a++) u[a] = 0; - for (a = 0; !f.isZero(); a++) (s = f.andln(255)), f.iushrn(8), (u[o - a - 1] = s); - } - return u; - }), - Math.clz32 - ? (o.prototype._countBits = function (t) { - return 32 - Math.clz32(t); - }) - : (o.prototype._countBits = function (t) { - var e = t, - r = 0; - return ( - e >= 4096 && ((r += 13), (e >>>= 13)), - e >= 64 && ((r += 7), (e >>>= 7)), - e >= 8 && ((r += 4), (e >>>= 4)), - e >= 2 && ((r += 2), (e >>>= 2)), - r + e - ); - }), - (o.prototype._zeroBits = function (t) { - if (0 === t) return 26; - var e = t, - r = 0; - return ( - 0 == (8191 & e) && ((r += 13), (e >>>= 13)), - 0 == (127 & e) && ((r += 7), (e >>>= 7)), - 0 == (15 & e) && ((r += 4), (e >>>= 4)), - 0 == (3 & e) && ((r += 2), (e >>>= 2)), - 0 == (1 & e) && r++, - r - ); - }), - (o.prototype.bitLength = function () { - var t = this.words[this.length - 1], - e = this._countBits(t); - return 26 * (this.length - 1) + e; - }), - (o.prototype.zeroBits = function () { - if (this.isZero()) return 0; - for (var t = 0, e = 0; e < this.length; e++) { - var r = this._zeroBits(this.words[e]); - if (((t += r), 26 !== r)) break; - } - return t; - }), - (o.prototype.byteLength = function () { - return Math.ceil(this.bitLength() / 8); - }), - (o.prototype.toTwos = function (t) { - return 0 !== this.negative ? this.abs().inotn(t).iaddn(1) : this.clone(); - }), - (o.prototype.fromTwos = function (t) { - return this.testn(t - 1) ? this.notn(t).iaddn(1).ineg() : this.clone(); - }), - (o.prototype.isNeg = function () { - return 0 !== this.negative; - }), - (o.prototype.neg = function () { - return this.clone().ineg(); - }), - (o.prototype.ineg = function () { - return this.isZero() || (this.negative ^= 1), this; - }), - (o.prototype.iuor = function (t) { - for (; this.length < t.length; ) this.words[this.length++] = 0; - for (var e = 0; e < t.length; e++) this.words[e] = this.words[e] | t.words[e]; - return this.strip(); - }), - (o.prototype.ior = function (t) { - return i(0 == (this.negative | t.negative)), this.iuor(t); - }), - (o.prototype.or = function (t) { - return this.length > t.length ? this.clone().ior(t) : t.clone().ior(this); - }), - (o.prototype.uor = function (t) { - return this.length > t.length ? this.clone().iuor(t) : t.clone().iuor(this); - }), - (o.prototype.iuand = function (t) { - var e; - e = this.length > t.length ? t : this; - for (var r = 0; r < e.length; r++) this.words[r] = this.words[r] & t.words[r]; - return (this.length = e.length), this.strip(); - }), - (o.prototype.iand = function (t) { - return i(0 == (this.negative | t.negative)), this.iuand(t); - }), - (o.prototype.and = function (t) { - return this.length > t.length ? this.clone().iand(t) : t.clone().iand(this); - }), - (o.prototype.uand = function (t) { - return this.length > t.length ? this.clone().iuand(t) : t.clone().iuand(this); - }), - (o.prototype.iuxor = function (t) { - var e, r; - this.length > t.length ? ((e = this), (r = t)) : ((e = t), (r = this)); - for (var i = 0; i < r.length; i++) this.words[i] = e.words[i] ^ r.words[i]; - if (this !== e) for (; i < e.length; i++) this.words[i] = e.words[i]; - return (this.length = e.length), this.strip(); - }), - (o.prototype.ixor = function (t) { - return i(0 == (this.negative | t.negative)), this.iuxor(t); - }), - (o.prototype.xor = function (t) { - return this.length > t.length ? this.clone().ixor(t) : t.clone().ixor(this); - }), - (o.prototype.uxor = function (t) { - return this.length > t.length ? this.clone().iuxor(t) : t.clone().iuxor(this); - }), - (o.prototype.inotn = function (t) { - i('number' == typeof t && t >= 0); - var e = 0 | Math.ceil(t / 26), - r = t % 26; - this._expand(e), r > 0 && e--; - for (var n = 0; n < e; n++) this.words[n] = 67108863 & ~this.words[n]; - return r > 0 && (this.words[n] = ~this.words[n] & (67108863 >> (26 - r))), this.strip(); - }), - (o.prototype.notn = function (t) { - return this.clone().inotn(t); - }), - (o.prototype.setn = function (t, e) { - i('number' == typeof t && t >= 0); - var r = (t / 26) | 0, - n = t % 26; - return this._expand(r + 1), (this.words[r] = e ? this.words[r] | (1 << n) : this.words[r] & ~(1 << n)), this.strip(); - }), - (o.prototype.iadd = function (t) { - var e, r, i; - if (0 !== this.negative && 0 === t.negative) - return (this.negative = 0), (e = this.isub(t)), (this.negative ^= 1), this._normSign(); - if (0 === this.negative && 0 !== t.negative) return (t.negative = 0), (e = this.isub(t)), (t.negative = 1), e._normSign(); - this.length > t.length ? ((r = this), (i = t)) : ((r = t), (i = this)); - for (var n = 0, o = 0; o < i.length; o++) - (e = (0 | r.words[o]) + (0 | i.words[o]) + n), (this.words[o] = 67108863 & e), (n = e >>> 26); - for (; 0 !== n && o < r.length; o++) (e = (0 | r.words[o]) + n), (this.words[o] = 67108863 & e), (n = e >>> 26); - if (((this.length = r.length), 0 !== n)) (this.words[this.length] = n), this.length++; - else if (r !== this) for (; o < r.length; o++) this.words[o] = r.words[o]; - return this; - }), - (o.prototype.add = function (t) { - var e; - return 0 !== t.negative && 0 === this.negative - ? ((t.negative = 0), (e = this.sub(t)), (t.negative ^= 1), e) - : 0 === t.negative && 0 !== this.negative - ? ((this.negative = 0), (e = t.sub(this)), (this.negative = 1), e) - : this.length > t.length - ? this.clone().iadd(t) - : t.clone().iadd(this); - }), - (o.prototype.isub = function (t) { - if (0 !== t.negative) { - t.negative = 0; - var e = this.iadd(t); - return (t.negative = 1), e._normSign(); - } - if (0 !== this.negative) return (this.negative = 0), this.iadd(t), (this.negative = 1), this._normSign(); - var r, - i, - n = this.cmp(t); - if (0 === n) return (this.negative = 0), (this.length = 1), (this.words[0] = 0), this; - n > 0 ? ((r = this), (i = t)) : ((r = t), (i = this)); - for (var o = 0, s = 0; s < i.length; s++) - (o = (e = (0 | r.words[s]) - (0 | i.words[s]) + o) >> 26), (this.words[s] = 67108863 & e); - for (; 0 !== o && s < r.length; s++) (o = (e = (0 | r.words[s]) + o) >> 26), (this.words[s] = 67108863 & e); - if (0 === o && s < r.length && r !== this) for (; s < r.length; s++) this.words[s] = r.words[s]; - return (this.length = Math.max(this.length, s)), r !== this && (this.negative = 1), this.strip(); - }), - (o.prototype.sub = function (t) { - return this.clone().isub(t); - }); - var p = function (t, e, r) { - var i, - n, - o, - s = t.words, - a = e.words, - h = r.words, - u = 0, - f = 0 | s[0], - c = 8191 & f, - l = f >>> 13, - d = 0 | s[1], - p = 8191 & d, - m = d >>> 13, - g = 0 | s[2], - b = 8191 & g, - y = g >>> 13, - v = 0 | s[3], - w = 8191 & v, - _ = v >>> 13, - M = 0 | s[4], - E = 8191 & M, - S = M >>> 13, - x = 0 | s[5], - A = 8191 & x, - k = x >>> 13, - R = 0 | s[6], - B = 8191 & R, - I = R >>> 13, - T = 0 | s[7], - P = 8191 & T, - O = T >>> 13, - L = 0 | s[8], - C = 8191 & L, - N = L >>> 13, - j = 0 | s[9], - U = 8191 & j, - D = j >>> 13, - z = 0 | a[0], - F = 8191 & z, - q = z >>> 13, - H = 0 | a[1], - $ = 8191 & H, - Z = H >>> 13, - G = 0 | a[2], - V = 8191 & G, - W = G >>> 13, - K = 0 | a[3], - Y = 8191 & K, - J = K >>> 13, - X = 0 | a[4], - Q = 8191 & X, - tt = X >>> 13, - et = 0 | a[5], - rt = 8191 & et, - it = et >>> 13, - nt = 0 | a[6], - ot = 8191 & nt, - st = nt >>> 13, - at = 0 | a[7], - ht = 8191 & at, - ut = at >>> 13, - ft = 0 | a[8], - ct = 8191 & ft, - lt = ft >>> 13, - dt = 0 | a[9], - pt = 8191 & dt, - mt = dt >>> 13; - (r.negative = t.negative ^ e.negative), (r.length = 19); - var gt = (((u + (i = Math.imul(c, F))) | 0) + ((8191 & (n = ((n = Math.imul(c, q)) + Math.imul(l, F)) | 0)) << 13)) | 0; - (u = ((((o = Math.imul(l, q)) + (n >>> 13)) | 0) + (gt >>> 26)) | 0), - (gt &= 67108863), - (i = Math.imul(p, F)), - (n = ((n = Math.imul(p, q)) + Math.imul(m, F)) | 0), - (o = Math.imul(m, q)); - var bt = - (((u + (i = (i + Math.imul(c, $)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, Z)) | 0) + Math.imul(l, $)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, Z)) | 0) + (n >>> 13)) | 0) + (bt >>> 26)) | 0), - (bt &= 67108863), - (i = Math.imul(b, F)), - (n = ((n = Math.imul(b, q)) + Math.imul(y, F)) | 0), - (o = Math.imul(y, q)), - (i = (i + Math.imul(p, $)) | 0), - (n = ((n = (n + Math.imul(p, Z)) | 0) + Math.imul(m, $)) | 0), - (o = (o + Math.imul(m, Z)) | 0); - var yt = - (((u + (i = (i + Math.imul(c, V)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, W)) | 0) + Math.imul(l, V)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, W)) | 0) + (n >>> 13)) | 0) + (yt >>> 26)) | 0), - (yt &= 67108863), - (i = Math.imul(w, F)), - (n = ((n = Math.imul(w, q)) + Math.imul(_, F)) | 0), - (o = Math.imul(_, q)), - (i = (i + Math.imul(b, $)) | 0), - (n = ((n = (n + Math.imul(b, Z)) | 0) + Math.imul(y, $)) | 0), - (o = (o + Math.imul(y, Z)) | 0), - (i = (i + Math.imul(p, V)) | 0), - (n = ((n = (n + Math.imul(p, W)) | 0) + Math.imul(m, V)) | 0), - (o = (o + Math.imul(m, W)) | 0); - var vt = - (((u + (i = (i + Math.imul(c, Y)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, J)) | 0) + Math.imul(l, Y)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, J)) | 0) + (n >>> 13)) | 0) + (vt >>> 26)) | 0), - (vt &= 67108863), - (i = Math.imul(E, F)), - (n = ((n = Math.imul(E, q)) + Math.imul(S, F)) | 0), - (o = Math.imul(S, q)), - (i = (i + Math.imul(w, $)) | 0), - (n = ((n = (n + Math.imul(w, Z)) | 0) + Math.imul(_, $)) | 0), - (o = (o + Math.imul(_, Z)) | 0), - (i = (i + Math.imul(b, V)) | 0), - (n = ((n = (n + Math.imul(b, W)) | 0) + Math.imul(y, V)) | 0), - (o = (o + Math.imul(y, W)) | 0), - (i = (i + Math.imul(p, Y)) | 0), - (n = ((n = (n + Math.imul(p, J)) | 0) + Math.imul(m, Y)) | 0), - (o = (o + Math.imul(m, J)) | 0); - var wt = - (((u + (i = (i + Math.imul(c, Q)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, tt)) | 0) + Math.imul(l, Q)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, tt)) | 0) + (n >>> 13)) | 0) + (wt >>> 26)) | 0), - (wt &= 67108863), - (i = Math.imul(A, F)), - (n = ((n = Math.imul(A, q)) + Math.imul(k, F)) | 0), - (o = Math.imul(k, q)), - (i = (i + Math.imul(E, $)) | 0), - (n = ((n = (n + Math.imul(E, Z)) | 0) + Math.imul(S, $)) | 0), - (o = (o + Math.imul(S, Z)) | 0), - (i = (i + Math.imul(w, V)) | 0), - (n = ((n = (n + Math.imul(w, W)) | 0) + Math.imul(_, V)) | 0), - (o = (o + Math.imul(_, W)) | 0), - (i = (i + Math.imul(b, Y)) | 0), - (n = ((n = (n + Math.imul(b, J)) | 0) + Math.imul(y, Y)) | 0), - (o = (o + Math.imul(y, J)) | 0), - (i = (i + Math.imul(p, Q)) | 0), - (n = ((n = (n + Math.imul(p, tt)) | 0) + Math.imul(m, Q)) | 0), - (o = (o + Math.imul(m, tt)) | 0); - var _t = - (((u + (i = (i + Math.imul(c, rt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, it)) | 0) + Math.imul(l, rt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, it)) | 0) + (n >>> 13)) | 0) + (_t >>> 26)) | 0), - (_t &= 67108863), - (i = Math.imul(B, F)), - (n = ((n = Math.imul(B, q)) + Math.imul(I, F)) | 0), - (o = Math.imul(I, q)), - (i = (i + Math.imul(A, $)) | 0), - (n = ((n = (n + Math.imul(A, Z)) | 0) + Math.imul(k, $)) | 0), - (o = (o + Math.imul(k, Z)) | 0), - (i = (i + Math.imul(E, V)) | 0), - (n = ((n = (n + Math.imul(E, W)) | 0) + Math.imul(S, V)) | 0), - (o = (o + Math.imul(S, W)) | 0), - (i = (i + Math.imul(w, Y)) | 0), - (n = ((n = (n + Math.imul(w, J)) | 0) + Math.imul(_, Y)) | 0), - (o = (o + Math.imul(_, J)) | 0), - (i = (i + Math.imul(b, Q)) | 0), - (n = ((n = (n + Math.imul(b, tt)) | 0) + Math.imul(y, Q)) | 0), - (o = (o + Math.imul(y, tt)) | 0), - (i = (i + Math.imul(p, rt)) | 0), - (n = ((n = (n + Math.imul(p, it)) | 0) + Math.imul(m, rt)) | 0), - (o = (o + Math.imul(m, it)) | 0); - var Mt = - (((u + (i = (i + Math.imul(c, ot)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, st)) | 0) + Math.imul(l, ot)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, st)) | 0) + (n >>> 13)) | 0) + (Mt >>> 26)) | 0), - (Mt &= 67108863), - (i = Math.imul(P, F)), - (n = ((n = Math.imul(P, q)) + Math.imul(O, F)) | 0), - (o = Math.imul(O, q)), - (i = (i + Math.imul(B, $)) | 0), - (n = ((n = (n + Math.imul(B, Z)) | 0) + Math.imul(I, $)) | 0), - (o = (o + Math.imul(I, Z)) | 0), - (i = (i + Math.imul(A, V)) | 0), - (n = ((n = (n + Math.imul(A, W)) | 0) + Math.imul(k, V)) | 0), - (o = (o + Math.imul(k, W)) | 0), - (i = (i + Math.imul(E, Y)) | 0), - (n = ((n = (n + Math.imul(E, J)) | 0) + Math.imul(S, Y)) | 0), - (o = (o + Math.imul(S, J)) | 0), - (i = (i + Math.imul(w, Q)) | 0), - (n = ((n = (n + Math.imul(w, tt)) | 0) + Math.imul(_, Q)) | 0), - (o = (o + Math.imul(_, tt)) | 0), - (i = (i + Math.imul(b, rt)) | 0), - (n = ((n = (n + Math.imul(b, it)) | 0) + Math.imul(y, rt)) | 0), - (o = (o + Math.imul(y, it)) | 0), - (i = (i + Math.imul(p, ot)) | 0), - (n = ((n = (n + Math.imul(p, st)) | 0) + Math.imul(m, ot)) | 0), - (o = (o + Math.imul(m, st)) | 0); - var Et = - (((u + (i = (i + Math.imul(c, ht)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, ut)) | 0) + Math.imul(l, ht)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, ut)) | 0) + (n >>> 13)) | 0) + (Et >>> 26)) | 0), - (Et &= 67108863), - (i = Math.imul(C, F)), - (n = ((n = Math.imul(C, q)) + Math.imul(N, F)) | 0), - (o = Math.imul(N, q)), - (i = (i + Math.imul(P, $)) | 0), - (n = ((n = (n + Math.imul(P, Z)) | 0) + Math.imul(O, $)) | 0), - (o = (o + Math.imul(O, Z)) | 0), - (i = (i + Math.imul(B, V)) | 0), - (n = ((n = (n + Math.imul(B, W)) | 0) + Math.imul(I, V)) | 0), - (o = (o + Math.imul(I, W)) | 0), - (i = (i + Math.imul(A, Y)) | 0), - (n = ((n = (n + Math.imul(A, J)) | 0) + Math.imul(k, Y)) | 0), - (o = (o + Math.imul(k, J)) | 0), - (i = (i + Math.imul(E, Q)) | 0), - (n = ((n = (n + Math.imul(E, tt)) | 0) + Math.imul(S, Q)) | 0), - (o = (o + Math.imul(S, tt)) | 0), - (i = (i + Math.imul(w, rt)) | 0), - (n = ((n = (n + Math.imul(w, it)) | 0) + Math.imul(_, rt)) | 0), - (o = (o + Math.imul(_, it)) | 0), - (i = (i + Math.imul(b, ot)) | 0), - (n = ((n = (n + Math.imul(b, st)) | 0) + Math.imul(y, ot)) | 0), - (o = (o + Math.imul(y, st)) | 0), - (i = (i + Math.imul(p, ht)) | 0), - (n = ((n = (n + Math.imul(p, ut)) | 0) + Math.imul(m, ht)) | 0), - (o = (o + Math.imul(m, ut)) | 0); - var St = - (((u + (i = (i + Math.imul(c, ct)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, lt)) | 0) + Math.imul(l, ct)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, lt)) | 0) + (n >>> 13)) | 0) + (St >>> 26)) | 0), - (St &= 67108863), - (i = Math.imul(U, F)), - (n = ((n = Math.imul(U, q)) + Math.imul(D, F)) | 0), - (o = Math.imul(D, q)), - (i = (i + Math.imul(C, $)) | 0), - (n = ((n = (n + Math.imul(C, Z)) | 0) + Math.imul(N, $)) | 0), - (o = (o + Math.imul(N, Z)) | 0), - (i = (i + Math.imul(P, V)) | 0), - (n = ((n = (n + Math.imul(P, W)) | 0) + Math.imul(O, V)) | 0), - (o = (o + Math.imul(O, W)) | 0), - (i = (i + Math.imul(B, Y)) | 0), - (n = ((n = (n + Math.imul(B, J)) | 0) + Math.imul(I, Y)) | 0), - (o = (o + Math.imul(I, J)) | 0), - (i = (i + Math.imul(A, Q)) | 0), - (n = ((n = (n + Math.imul(A, tt)) | 0) + Math.imul(k, Q)) | 0), - (o = (o + Math.imul(k, tt)) | 0), - (i = (i + Math.imul(E, rt)) | 0), - (n = ((n = (n + Math.imul(E, it)) | 0) + Math.imul(S, rt)) | 0), - (o = (o + Math.imul(S, it)) | 0), - (i = (i + Math.imul(w, ot)) | 0), - (n = ((n = (n + Math.imul(w, st)) | 0) + Math.imul(_, ot)) | 0), - (o = (o + Math.imul(_, st)) | 0), - (i = (i + Math.imul(b, ht)) | 0), - (n = ((n = (n + Math.imul(b, ut)) | 0) + Math.imul(y, ht)) | 0), - (o = (o + Math.imul(y, ut)) | 0), - (i = (i + Math.imul(p, ct)) | 0), - (n = ((n = (n + Math.imul(p, lt)) | 0) + Math.imul(m, ct)) | 0), - (o = (o + Math.imul(m, lt)) | 0); - var xt = - (((u + (i = (i + Math.imul(c, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, mt)) | 0) + Math.imul(l, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, mt)) | 0) + (n >>> 13)) | 0) + (xt >>> 26)) | 0), - (xt &= 67108863), - (i = Math.imul(U, $)), - (n = ((n = Math.imul(U, Z)) + Math.imul(D, $)) | 0), - (o = Math.imul(D, Z)), - (i = (i + Math.imul(C, V)) | 0), - (n = ((n = (n + Math.imul(C, W)) | 0) + Math.imul(N, V)) | 0), - (o = (o + Math.imul(N, W)) | 0), - (i = (i + Math.imul(P, Y)) | 0), - (n = ((n = (n + Math.imul(P, J)) | 0) + Math.imul(O, Y)) | 0), - (o = (o + Math.imul(O, J)) | 0), - (i = (i + Math.imul(B, Q)) | 0), - (n = ((n = (n + Math.imul(B, tt)) | 0) + Math.imul(I, Q)) | 0), - (o = (o + Math.imul(I, tt)) | 0), - (i = (i + Math.imul(A, rt)) | 0), - (n = ((n = (n + Math.imul(A, it)) | 0) + Math.imul(k, rt)) | 0), - (o = (o + Math.imul(k, it)) | 0), - (i = (i + Math.imul(E, ot)) | 0), - (n = ((n = (n + Math.imul(E, st)) | 0) + Math.imul(S, ot)) | 0), - (o = (o + Math.imul(S, st)) | 0), - (i = (i + Math.imul(w, ht)) | 0), - (n = ((n = (n + Math.imul(w, ut)) | 0) + Math.imul(_, ht)) | 0), - (o = (o + Math.imul(_, ut)) | 0), - (i = (i + Math.imul(b, ct)) | 0), - (n = ((n = (n + Math.imul(b, lt)) | 0) + Math.imul(y, ct)) | 0), - (o = (o + Math.imul(y, lt)) | 0); - var At = - (((u + (i = (i + Math.imul(p, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(p, mt)) | 0) + Math.imul(m, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(m, mt)) | 0) + (n >>> 13)) | 0) + (At >>> 26)) | 0), - (At &= 67108863), - (i = Math.imul(U, V)), - (n = ((n = Math.imul(U, W)) + Math.imul(D, V)) | 0), - (o = Math.imul(D, W)), - (i = (i + Math.imul(C, Y)) | 0), - (n = ((n = (n + Math.imul(C, J)) | 0) + Math.imul(N, Y)) | 0), - (o = (o + Math.imul(N, J)) | 0), - (i = (i + Math.imul(P, Q)) | 0), - (n = ((n = (n + Math.imul(P, tt)) | 0) + Math.imul(O, Q)) | 0), - (o = (o + Math.imul(O, tt)) | 0), - (i = (i + Math.imul(B, rt)) | 0), - (n = ((n = (n + Math.imul(B, it)) | 0) + Math.imul(I, rt)) | 0), - (o = (o + Math.imul(I, it)) | 0), - (i = (i + Math.imul(A, ot)) | 0), - (n = ((n = (n + Math.imul(A, st)) | 0) + Math.imul(k, ot)) | 0), - (o = (o + Math.imul(k, st)) | 0), - (i = (i + Math.imul(E, ht)) | 0), - (n = ((n = (n + Math.imul(E, ut)) | 0) + Math.imul(S, ht)) | 0), - (o = (o + Math.imul(S, ut)) | 0), - (i = (i + Math.imul(w, ct)) | 0), - (n = ((n = (n + Math.imul(w, lt)) | 0) + Math.imul(_, ct)) | 0), - (o = (o + Math.imul(_, lt)) | 0); - var kt = - (((u + (i = (i + Math.imul(b, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(b, mt)) | 0) + Math.imul(y, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(y, mt)) | 0) + (n >>> 13)) | 0) + (kt >>> 26)) | 0), - (kt &= 67108863), - (i = Math.imul(U, Y)), - (n = ((n = Math.imul(U, J)) + Math.imul(D, Y)) | 0), - (o = Math.imul(D, J)), - (i = (i + Math.imul(C, Q)) | 0), - (n = ((n = (n + Math.imul(C, tt)) | 0) + Math.imul(N, Q)) | 0), - (o = (o + Math.imul(N, tt)) | 0), - (i = (i + Math.imul(P, rt)) | 0), - (n = ((n = (n + Math.imul(P, it)) | 0) + Math.imul(O, rt)) | 0), - (o = (o + Math.imul(O, it)) | 0), - (i = (i + Math.imul(B, ot)) | 0), - (n = ((n = (n + Math.imul(B, st)) | 0) + Math.imul(I, ot)) | 0), - (o = (o + Math.imul(I, st)) | 0), - (i = (i + Math.imul(A, ht)) | 0), - (n = ((n = (n + Math.imul(A, ut)) | 0) + Math.imul(k, ht)) | 0), - (o = (o + Math.imul(k, ut)) | 0), - (i = (i + Math.imul(E, ct)) | 0), - (n = ((n = (n + Math.imul(E, lt)) | 0) + Math.imul(S, ct)) | 0), - (o = (o + Math.imul(S, lt)) | 0); - var Rt = - (((u + (i = (i + Math.imul(w, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(w, mt)) | 0) + Math.imul(_, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(_, mt)) | 0) + (n >>> 13)) | 0) + (Rt >>> 26)) | 0), - (Rt &= 67108863), - (i = Math.imul(U, Q)), - (n = ((n = Math.imul(U, tt)) + Math.imul(D, Q)) | 0), - (o = Math.imul(D, tt)), - (i = (i + Math.imul(C, rt)) | 0), - (n = ((n = (n + Math.imul(C, it)) | 0) + Math.imul(N, rt)) | 0), - (o = (o + Math.imul(N, it)) | 0), - (i = (i + Math.imul(P, ot)) | 0), - (n = ((n = (n + Math.imul(P, st)) | 0) + Math.imul(O, ot)) | 0), - (o = (o + Math.imul(O, st)) | 0), - (i = (i + Math.imul(B, ht)) | 0), - (n = ((n = (n + Math.imul(B, ut)) | 0) + Math.imul(I, ht)) | 0), - (o = (o + Math.imul(I, ut)) | 0), - (i = (i + Math.imul(A, ct)) | 0), - (n = ((n = (n + Math.imul(A, lt)) | 0) + Math.imul(k, ct)) | 0), - (o = (o + Math.imul(k, lt)) | 0); - var Bt = - (((u + (i = (i + Math.imul(E, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(E, mt)) | 0) + Math.imul(S, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(S, mt)) | 0) + (n >>> 13)) | 0) + (Bt >>> 26)) | 0), - (Bt &= 67108863), - (i = Math.imul(U, rt)), - (n = ((n = Math.imul(U, it)) + Math.imul(D, rt)) | 0), - (o = Math.imul(D, it)), - (i = (i + Math.imul(C, ot)) | 0), - (n = ((n = (n + Math.imul(C, st)) | 0) + Math.imul(N, ot)) | 0), - (o = (o + Math.imul(N, st)) | 0), - (i = (i + Math.imul(P, ht)) | 0), - (n = ((n = (n + Math.imul(P, ut)) | 0) + Math.imul(O, ht)) | 0), - (o = (o + Math.imul(O, ut)) | 0), - (i = (i + Math.imul(B, ct)) | 0), - (n = ((n = (n + Math.imul(B, lt)) | 0) + Math.imul(I, ct)) | 0), - (o = (o + Math.imul(I, lt)) | 0); - var It = - (((u + (i = (i + Math.imul(A, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(A, mt)) | 0) + Math.imul(k, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(k, mt)) | 0) + (n >>> 13)) | 0) + (It >>> 26)) | 0), - (It &= 67108863), - (i = Math.imul(U, ot)), - (n = ((n = Math.imul(U, st)) + Math.imul(D, ot)) | 0), - (o = Math.imul(D, st)), - (i = (i + Math.imul(C, ht)) | 0), - (n = ((n = (n + Math.imul(C, ut)) | 0) + Math.imul(N, ht)) | 0), - (o = (o + Math.imul(N, ut)) | 0), - (i = (i + Math.imul(P, ct)) | 0), - (n = ((n = (n + Math.imul(P, lt)) | 0) + Math.imul(O, ct)) | 0), - (o = (o + Math.imul(O, lt)) | 0); - var Tt = - (((u + (i = (i + Math.imul(B, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(B, mt)) | 0) + Math.imul(I, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(I, mt)) | 0) + (n >>> 13)) | 0) + (Tt >>> 26)) | 0), - (Tt &= 67108863), - (i = Math.imul(U, ht)), - (n = ((n = Math.imul(U, ut)) + Math.imul(D, ht)) | 0), - (o = Math.imul(D, ut)), - (i = (i + Math.imul(C, ct)) | 0), - (n = ((n = (n + Math.imul(C, lt)) | 0) + Math.imul(N, ct)) | 0), - (o = (o + Math.imul(N, lt)) | 0); - var Pt = - (((u + (i = (i + Math.imul(P, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(P, mt)) | 0) + Math.imul(O, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(O, mt)) | 0) + (n >>> 13)) | 0) + (Pt >>> 26)) | 0), - (Pt &= 67108863), - (i = Math.imul(U, ct)), - (n = ((n = Math.imul(U, lt)) + Math.imul(D, ct)) | 0), - (o = Math.imul(D, lt)); - var Ot = - (((u + (i = (i + Math.imul(C, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(C, mt)) | 0) + Math.imul(N, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(N, mt)) | 0) + (n >>> 13)) | 0) + (Ot >>> 26)) | 0), (Ot &= 67108863); - var Lt = (((u + (i = Math.imul(U, pt))) | 0) + ((8191 & (n = ((n = Math.imul(U, mt)) + Math.imul(D, pt)) | 0)) << 13)) | 0; - return ( - (u = ((((o = Math.imul(D, mt)) + (n >>> 13)) | 0) + (Lt >>> 26)) | 0), - (Lt &= 67108863), - (h[0] = gt), - (h[1] = bt), - (h[2] = yt), - (h[3] = vt), - (h[4] = wt), - (h[5] = _t), - (h[6] = Mt), - (h[7] = Et), - (h[8] = St), - (h[9] = xt), - (h[10] = At), - (h[11] = kt), - (h[12] = Rt), - (h[13] = Bt), - (h[14] = It), - (h[15] = Tt), - (h[16] = Pt), - (h[17] = Ot), - (h[18] = Lt), - 0 !== u && ((h[19] = u), r.length++), - r - ); - }; - function m(t, e, r) { - return new g().mulp(t, e, r); - } - function g(t, e) { - (this.x = t), (this.y = e); - } - Math.imul || (p = d), - (o.prototype.mulTo = function (t, e) { - var r, - i = this.length + t.length; - return ( - (r = - 10 === this.length && 10 === t.length - ? p(this, t, e) - : i < 63 - ? d(this, t, e) - : i < 1024 - ? (function (t, e, r) { - (r.negative = e.negative ^ t.negative), (r.length = t.length + e.length); - for (var i = 0, n = 0, o = 0; o < r.length - 1; o++) { - var s = n; - n = 0; - for (var a = 67108863 & i, h = Math.min(o, e.length - 1), u = Math.max(0, o - t.length + 1); u <= h; u++) { - var f = o - u, - c = (0 | t.words[f]) * (0 | e.words[u]), - l = 67108863 & c; - (a = 67108863 & (l = (l + a) | 0)), - (n += (s = ((s = (s + ((c / 67108864) | 0)) | 0) + (l >>> 26)) | 0) >>> 26), - (s &= 67108863); - } - (r.words[o] = a), (i = s), (s = n); - } - return 0 !== i ? (r.words[o] = i) : r.length--, r.strip(); - })(this, t, e) - : m(this, t, e)), - r - ); - }), - (g.prototype.makeRBT = function (t) { - for (var e = new Array(t), r = o.prototype._countBits(t) - 1, i = 0; i < t; i++) e[i] = this.revBin(i, r, t); - return e; - }), - (g.prototype.revBin = function (t, e, r) { - if (0 === t || t === r - 1) return t; - for (var i = 0, n = 0; n < e; n++) (i |= (1 & t) << (e - n - 1)), (t >>= 1); - return i; - }), - (g.prototype.permute = function (t, e, r, i, n, o) { - for (var s = 0; s < o; s++) (i[s] = e[t[s]]), (n[s] = r[t[s]]); - }), - (g.prototype.transform = function (t, e, r, i, n, o) { - this.permute(o, t, e, r, i, n); - for (var s = 1; s < n; s <<= 1) - for (var a = s << 1, h = Math.cos((2 * Math.PI) / a), u = Math.sin((2 * Math.PI) / a), f = 0; f < n; f += a) - for (var c = h, l = u, d = 0; d < s; d++) { - var p = r[f + d], - m = i[f + d], - g = r[f + d + s], - b = i[f + d + s], - y = c * g - l * b; - (b = c * b + l * g), - (g = y), - (r[f + d] = p + g), - (i[f + d] = m + b), - (r[f + d + s] = p - g), - (i[f + d + s] = m - b), - d !== a && ((y = h * c - u * l), (l = h * l + u * c), (c = y)); - } - }), - (g.prototype.guessLen13b = function (t, e) { - var r = 1 | Math.max(e, t), - i = 1 & r, - n = 0; - for (r = (r / 2) | 0; r; r >>>= 1) n++; - return 1 << (n + 1 + i); - }), - (g.prototype.conjugate = function (t, e, r) { - if (!(r <= 1)) - for (var i = 0; i < r / 2; i++) { - var n = t[i]; - (t[i] = t[r - i - 1]), (t[r - i - 1] = n), (n = e[i]), (e[i] = -e[r - i - 1]), (e[r - i - 1] = -n); - } - }), - (g.prototype.normalize13b = function (t, e) { - for (var r = 0, i = 0; i < e / 2; i++) { - var n = 8192 * Math.round(t[2 * i + 1] / e) + Math.round(t[2 * i] / e) + r; - (t[i] = 67108863 & n), (r = n < 67108864 ? 0 : (n / 67108864) | 0); - } - return t; - }), - (g.prototype.convert13b = function (t, e, r, n) { - for (var o = 0, s = 0; s < e; s++) - (o += 0 | t[s]), (r[2 * s] = 8191 & o), (o >>>= 13), (r[2 * s + 1] = 8191 & o), (o >>>= 13); - for (s = 2 * e; s < n; ++s) r[s] = 0; - i(0 === o), i(0 == (-8192 & o)); - }), - (g.prototype.stub = function (t) { - for (var e = new Array(t), r = 0; r < t; r++) e[r] = 0; - return e; - }), - (g.prototype.mulp = function (t, e, r) { - var i = 2 * this.guessLen13b(t.length, e.length), - n = this.makeRBT(i), - o = this.stub(i), - s = new Array(i), - a = new Array(i), - h = new Array(i), - u = new Array(i), - f = new Array(i), - c = new Array(i), - l = r.words; - (l.length = i), - this.convert13b(t.words, t.length, s, i), - this.convert13b(e.words, e.length, u, i), - this.transform(s, o, a, h, i, n), - this.transform(u, o, f, c, i, n); - for (var d = 0; d < i; d++) { - var p = a[d] * f[d] - h[d] * c[d]; - (h[d] = a[d] * c[d] + h[d] * f[d]), (a[d] = p); - } - return ( - this.conjugate(a, h, i), - this.transform(a, h, l, o, i, n), - this.conjugate(l, o, i), - this.normalize13b(l, i), - (r.negative = t.negative ^ e.negative), - (r.length = t.length + e.length), - r.strip() - ); - }), - (o.prototype.mul = function (t) { - var e = new o(null); - return (e.words = new Array(this.length + t.length)), this.mulTo(t, e); - }), - (o.prototype.mulf = function (t) { - var e = new o(null); - return (e.words = new Array(this.length + t.length)), m(this, t, e); - }), - (o.prototype.imul = function (t) { - return this.clone().mulTo(t, this); - }), - (o.prototype.imuln = function (t) { - i('number' == typeof t), i(t < 67108864); - for (var e = 0, r = 0; r < this.length; r++) { - var n = (0 | this.words[r]) * t, - o = (67108863 & n) + (67108863 & e); - (e >>= 26), (e += (n / 67108864) | 0), (e += o >>> 26), (this.words[r] = 67108863 & o); - } - return 0 !== e && ((this.words[r] = e), this.length++), this; - }), - (o.prototype.muln = function (t) { - return this.clone().imuln(t); - }), - (o.prototype.sqr = function () { - return this.mul(this); - }), - (o.prototype.isqr = function () { - return this.imul(this.clone()); - }), - (o.prototype.pow = function (t) { - var e = (function (t) { - for (var e = new Array(t.bitLength()), r = 0; r < e.length; r++) { - var i = (r / 26) | 0, - n = r % 26; - e[r] = (t.words[i] & (1 << n)) >>> n; - } - return e; - })(t); - if (0 === e.length) return new o(1); - for (var r = this, i = 0; i < e.length && 0 === e[i]; i++, r = r.sqr()); - if (++i < e.length) for (var n = r.sqr(); i < e.length; i++, n = n.sqr()) 0 !== e[i] && (r = r.mul(n)); - return r; - }), - (o.prototype.iushln = function (t) { - i('number' == typeof t && t >= 0); - var e, - r = t % 26, - n = (t - r) / 26, - o = (67108863 >>> (26 - r)) << (26 - r); - if (0 !== r) { - var s = 0; - for (e = 0; e < this.length; e++) { - var a = this.words[e] & o, - h = ((0 | this.words[e]) - a) << r; - (this.words[e] = h | s), (s = a >>> (26 - r)); - } - s && ((this.words[e] = s), this.length++); - } - if (0 !== n) { - for (e = this.length - 1; e >= 0; e--) this.words[e + n] = this.words[e]; - for (e = 0; e < n; e++) this.words[e] = 0; - this.length += n; - } - return this.strip(); - }), - (o.prototype.ishln = function (t) { - return i(0 === this.negative), this.iushln(t); - }), - (o.prototype.iushrn = function (t, e, r) { - var n; - i('number' == typeof t && t >= 0), (n = e ? (e - (e % 26)) / 26 : 0); - var o = t % 26, - s = Math.min((t - o) / 26, this.length), - a = 67108863 ^ ((67108863 >>> o) << o), - h = r; - if (((n -= s), (n = Math.max(0, n)), h)) { - for (var u = 0; u < s; u++) h.words[u] = this.words[u]; - h.length = s; - } - if (0 === s); - else if (this.length > s) for (this.length -= s, u = 0; u < this.length; u++) this.words[u] = this.words[u + s]; - else (this.words[0] = 0), (this.length = 1); - var f = 0; - for (u = this.length - 1; u >= 0 && (0 !== f || u >= n); u--) { - var c = 0 | this.words[u]; - (this.words[u] = (f << (26 - o)) | (c >>> o)), (f = c & a); - } - return h && 0 !== f && (h.words[h.length++] = f), 0 === this.length && ((this.words[0] = 0), (this.length = 1)), this.strip(); - }), - (o.prototype.ishrn = function (t, e, r) { - return i(0 === this.negative), this.iushrn(t, e, r); - }), - (o.prototype.shln = function (t) { - return this.clone().ishln(t); - }), - (o.prototype.ushln = function (t) { - return this.clone().iushln(t); - }), - (o.prototype.shrn = function (t) { - return this.clone().ishrn(t); - }), - (o.prototype.ushrn = function (t) { - return this.clone().iushrn(t); - }), - (o.prototype.testn = function (t) { - i('number' == typeof t && t >= 0); - var e = t % 26, - r = (t - e) / 26, - n = 1 << e; - return !(this.length <= r || !(this.words[r] & n)); - }), - (o.prototype.imaskn = function (t) { - i('number' == typeof t && t >= 0); - var e = t % 26, - r = (t - e) / 26; - if ((i(0 === this.negative, 'imaskn works only with positive numbers'), this.length <= r)) return this; - if ((0 !== e && r++, (this.length = Math.min(r, this.length)), 0 !== e)) { - var n = 67108863 ^ ((67108863 >>> e) << e); - this.words[this.length - 1] &= n; - } - return this.strip(); - }), - (o.prototype.maskn = function (t) { - return this.clone().imaskn(t); - }), - (o.prototype.iaddn = function (t) { - return ( - i('number' == typeof t), - i(t < 67108864), - t < 0 - ? this.isubn(-t) - : 0 !== this.negative - ? 1 === this.length && (0 | this.words[0]) < t - ? ((this.words[0] = t - (0 | this.words[0])), (this.negative = 0), this) - : ((this.negative = 0), this.isubn(t), (this.negative = 1), this) - : this._iaddn(t) - ); - }), - (o.prototype._iaddn = function (t) { - this.words[0] += t; - for (var e = 0; e < this.length && this.words[e] >= 67108864; e++) - (this.words[e] -= 67108864), e === this.length - 1 ? (this.words[e + 1] = 1) : this.words[e + 1]++; - return (this.length = Math.max(this.length, e + 1)), this; - }), - (o.prototype.isubn = function (t) { - if ((i('number' == typeof t), i(t < 67108864), t < 0)) return this.iaddn(-t); - if (0 !== this.negative) return (this.negative = 0), this.iaddn(t), (this.negative = 1), this; - if (((this.words[0] -= t), 1 === this.length && this.words[0] < 0)) (this.words[0] = -this.words[0]), (this.negative = 1); - else for (var e = 0; e < this.length && this.words[e] < 0; e++) (this.words[e] += 67108864), (this.words[e + 1] -= 1); - return this.strip(); - }), - (o.prototype.addn = function (t) { - return this.clone().iaddn(t); - }), - (o.prototype.subn = function (t) { - return this.clone().isubn(t); - }), - (o.prototype.iabs = function () { - return (this.negative = 0), this; - }), - (o.prototype.abs = function () { - return this.clone().iabs(); - }), - (o.prototype._ishlnsubmul = function (t, e, r) { - var n, - o, - s = t.length + r; - this._expand(s); - var a = 0; - for (n = 0; n < t.length; n++) { - o = (0 | this.words[n + r]) + a; - var h = (0 | t.words[n]) * e; - (a = ((o -= 67108863 & h) >> 26) - ((h / 67108864) | 0)), (this.words[n + r] = 67108863 & o); - } - for (; n < this.length - r; n++) (a = (o = (0 | this.words[n + r]) + a) >> 26), (this.words[n + r] = 67108863 & o); - if (0 === a) return this.strip(); - for (i(-1 === a), a = 0, n = 0; n < this.length; n++) - (a = (o = -(0 | this.words[n]) + a) >> 26), (this.words[n] = 67108863 & o); - return (this.negative = 1), this.strip(); - }), - (o.prototype._wordDiv = function (t, e) { - var r = (this.length, t.length), - i = this.clone(), - n = t, - s = 0 | n.words[n.length - 1]; - 0 != (r = 26 - this._countBits(s)) && ((n = n.ushln(r)), i.iushln(r), (s = 0 | n.words[n.length - 1])); - var a, - h = i.length - n.length; - if ('mod' !== e) { - ((a = new o(null)).length = h + 1), (a.words = new Array(a.length)); - for (var u = 0; u < a.length; u++) a.words[u] = 0; - } - var f = i.clone()._ishlnsubmul(n, 1, h); - 0 === f.negative && ((i = f), a && (a.words[h] = 1)); - for (var c = h - 1; c >= 0; c--) { - var l = 67108864 * (0 | i.words[n.length + c]) + (0 | i.words[n.length + c - 1]); - for (l = Math.min((l / s) | 0, 67108863), i._ishlnsubmul(n, l, c); 0 !== i.negative; ) - l--, (i.negative = 0), i._ishlnsubmul(n, 1, c), i.isZero() || (i.negative ^= 1); - a && (a.words[c] = l); - } - return a && a.strip(), i.strip(), 'div' !== e && 0 !== r && i.iushrn(r), { div: a || null, mod: i }; - }), - (o.prototype.divmod = function (t, e, r) { - return ( - i(!t.isZero()), - this.isZero() - ? { div: new o(0), mod: new o(0) } - : 0 !== this.negative && 0 === t.negative - ? ((a = this.neg().divmod(t, e)), - 'mod' !== e && (n = a.div.neg()), - 'div' !== e && ((s = a.mod.neg()), r && 0 !== s.negative && s.iadd(t)), - { div: n, mod: s }) - : 0 === this.negative && 0 !== t.negative - ? ((a = this.divmod(t.neg(), e)), 'mod' !== e && (n = a.div.neg()), { div: n, mod: a.mod }) - : 0 != (this.negative & t.negative) - ? ((a = this.neg().divmod(t.neg(), e)), - 'div' !== e && ((s = a.mod.neg()), r && 0 !== s.negative && s.isub(t)), - { div: a.div, mod: s }) - : t.length > this.length || this.cmp(t) < 0 - ? { div: new o(0), mod: this } - : 1 === t.length - ? 'div' === e - ? { div: this.divn(t.words[0]), mod: null } - : 'mod' === e - ? { div: null, mod: new o(this.modn(t.words[0])) } - : { div: this.divn(t.words[0]), mod: new o(this.modn(t.words[0])) } - : this._wordDiv(t, e) - ); - var n, s, a; - }), - (o.prototype.div = function (t) { - return this.divmod(t, 'div', !1).div; - }), - (o.prototype.mod = function (t) { - return this.divmod(t, 'mod', !1).mod; - }), - (o.prototype.umod = function (t) { - return this.divmod(t, 'mod', !0).mod; - }), - (o.prototype.divRound = function (t) { - var e = this.divmod(t); - if (e.mod.isZero()) return e.div; - var r = 0 !== e.div.negative ? e.mod.isub(t) : e.mod, - i = t.ushrn(1), - n = t.andln(1), - o = r.cmp(i); - return o < 0 || (1 === n && 0 === o) ? e.div : 0 !== e.div.negative ? e.div.isubn(1) : e.div.iaddn(1); - }), - (o.prototype.modn = function (t) { - i(t <= 67108863); - for (var e = (1 << 26) % t, r = 0, n = this.length - 1; n >= 0; n--) r = (e * r + (0 | this.words[n])) % t; - return r; - }), - (o.prototype.idivn = function (t) { - i(t <= 67108863); - for (var e = 0, r = this.length - 1; r >= 0; r--) { - var n = (0 | this.words[r]) + 67108864 * e; - (this.words[r] = (n / t) | 0), (e = n % t); - } - return this.strip(); - }), - (o.prototype.divn = function (t) { - return this.clone().idivn(t); - }), - (o.prototype.egcd = function (t) { - i(0 === t.negative), i(!t.isZero()); - var e = this, - r = t.clone(); - e = 0 !== e.negative ? e.umod(t) : e.clone(); - for (var n = new o(1), s = new o(0), a = new o(0), h = new o(1), u = 0; e.isEven() && r.isEven(); ) - e.iushrn(1), r.iushrn(1), ++u; - for (var f = r.clone(), c = e.clone(); !e.isZero(); ) { - for (var l = 0, d = 1; 0 == (e.words[0] & d) && l < 26; ++l, d <<= 1); - if (l > 0) for (e.iushrn(l); l-- > 0; ) (n.isOdd() || s.isOdd()) && (n.iadd(f), s.isub(c)), n.iushrn(1), s.iushrn(1); - for (var p = 0, m = 1; 0 == (r.words[0] & m) && p < 26; ++p, m <<= 1); - if (p > 0) for (r.iushrn(p); p-- > 0; ) (a.isOdd() || h.isOdd()) && (a.iadd(f), h.isub(c)), a.iushrn(1), h.iushrn(1); - e.cmp(r) >= 0 ? (e.isub(r), n.isub(a), s.isub(h)) : (r.isub(e), a.isub(n), h.isub(s)); - } - return { a, b: h, gcd: r.iushln(u) }; - }), - (o.prototype._invmp = function (t) { - i(0 === t.negative), i(!t.isZero()); - var e = this, - r = t.clone(); - e = 0 !== e.negative ? e.umod(t) : e.clone(); - for (var n, s = new o(1), a = new o(0), h = r.clone(); e.cmpn(1) > 0 && r.cmpn(1) > 0; ) { - for (var u = 0, f = 1; 0 == (e.words[0] & f) && u < 26; ++u, f <<= 1); - if (u > 0) for (e.iushrn(u); u-- > 0; ) s.isOdd() && s.iadd(h), s.iushrn(1); - for (var c = 0, l = 1; 0 == (r.words[0] & l) && c < 26; ++c, l <<= 1); - if (c > 0) for (r.iushrn(c); c-- > 0; ) a.isOdd() && a.iadd(h), a.iushrn(1); - e.cmp(r) >= 0 ? (e.isub(r), s.isub(a)) : (r.isub(e), a.isub(s)); - } - return (n = 0 === e.cmpn(1) ? s : a).cmpn(0) < 0 && n.iadd(t), n; - }), - (o.prototype.gcd = function (t) { - if (this.isZero()) return t.abs(); - if (t.isZero()) return this.abs(); - var e = this.clone(), - r = t.clone(); - (e.negative = 0), (r.negative = 0); - for (var i = 0; e.isEven() && r.isEven(); i++) e.iushrn(1), r.iushrn(1); - for (;;) { - for (; e.isEven(); ) e.iushrn(1); - for (; r.isEven(); ) r.iushrn(1); - var n = e.cmp(r); - if (n < 0) { - var o = e; - (e = r), (r = o); - } else if (0 === n || 0 === r.cmpn(1)) break; - e.isub(r); - } - return r.iushln(i); - }), - (o.prototype.invm = function (t) { - return this.egcd(t).a.umod(t); - }), - (o.prototype.isEven = function () { - return 0 == (1 & this.words[0]); - }), - (o.prototype.isOdd = function () { - return 1 == (1 & this.words[0]); - }), - (o.prototype.andln = function (t) { - return this.words[0] & t; - }), - (o.prototype.bincn = function (t) { - i('number' == typeof t); - var e = t % 26, - r = (t - e) / 26, - n = 1 << e; - if (this.length <= r) return this._expand(r + 1), (this.words[r] |= n), this; - for (var o = n, s = r; 0 !== o && s < this.length; s++) { - var a = 0 | this.words[s]; - (o = (a += o) >>> 26), (a &= 67108863), (this.words[s] = a); - } - return 0 !== o && ((this.words[s] = o), this.length++), this; - }), - (o.prototype.isZero = function () { - return 1 === this.length && 0 === this.words[0]; - }), - (o.prototype.cmpn = function (t) { - var e, - r = t < 0; - if (0 !== this.negative && !r) return -1; - if (0 === this.negative && r) return 1; - if ((this.strip(), this.length > 1)) e = 1; - else { - r && (t = -t), i(t <= 67108863, 'Number is too big'); - var n = 0 | this.words[0]; - e = n === t ? 0 : n < t ? -1 : 1; - } - return 0 !== this.negative ? 0 | -e : e; - }), - (o.prototype.cmp = function (t) { - if (0 !== this.negative && 0 === t.negative) return -1; - if (0 === this.negative && 0 !== t.negative) return 1; - var e = this.ucmp(t); - return 0 !== this.negative ? 0 | -e : e; - }), - (o.prototype.ucmp = function (t) { - if (this.length > t.length) return 1; - if (this.length < t.length) return -1; - for (var e = 0, r = this.length - 1; r >= 0; r--) { - var i = 0 | this.words[r], - n = 0 | t.words[r]; - if (i !== n) { - i < n ? (e = -1) : i > n && (e = 1); - break; - } - } - return e; - }), - (o.prototype.gtn = function (t) { - return 1 === this.cmpn(t); - }), - (o.prototype.gt = function (t) { - return 1 === this.cmp(t); - }), - (o.prototype.gten = function (t) { - return this.cmpn(t) >= 0; - }), - (o.prototype.gte = function (t) { - return this.cmp(t) >= 0; - }), - (o.prototype.ltn = function (t) { - return -1 === this.cmpn(t); - }), - (o.prototype.lt = function (t) { - return -1 === this.cmp(t); - }), - (o.prototype.lten = function (t) { - return this.cmpn(t) <= 0; - }), - (o.prototype.lte = function (t) { - return this.cmp(t) <= 0; - }), - (o.prototype.eqn = function (t) { - return 0 === this.cmpn(t); - }), - (o.prototype.eq = function (t) { - return 0 === this.cmp(t); - }), - (o.red = function (t) { - return new E(t); - }), - (o.prototype.toRed = function (t) { - return ( - i(!this.red, 'Already a number in reduction context'), - i(0 === this.negative, 'red works only with positives'), - t.convertTo(this)._forceRed(t) - ); - }), - (o.prototype.fromRed = function () { - return i(this.red, 'fromRed works only with numbers in reduction context'), this.red.convertFrom(this); - }), - (o.prototype._forceRed = function (t) { - return (this.red = t), this; - }), - (o.prototype.forceRed = function (t) { - return i(!this.red, 'Already a number in reduction context'), this._forceRed(t); - }), - (o.prototype.redAdd = function (t) { - return i(this.red, 'redAdd works only with red numbers'), this.red.add(this, t); - }), - (o.prototype.redIAdd = function (t) { - return i(this.red, 'redIAdd works only with red numbers'), this.red.iadd(this, t); - }), - (o.prototype.redSub = function (t) { - return i(this.red, 'redSub works only with red numbers'), this.red.sub(this, t); - }), - (o.prototype.redISub = function (t) { - return i(this.red, 'redISub works only with red numbers'), this.red.isub(this, t); - }), - (o.prototype.redShl = function (t) { - return i(this.red, 'redShl works only with red numbers'), this.red.shl(this, t); - }), - (o.prototype.redMul = function (t) { - return i(this.red, 'redMul works only with red numbers'), this.red._verify2(this, t), this.red.mul(this, t); - }), - (o.prototype.redIMul = function (t) { - return i(this.red, 'redMul works only with red numbers'), this.red._verify2(this, t), this.red.imul(this, t); - }), - (o.prototype.redSqr = function () { - return i(this.red, 'redSqr works only with red numbers'), this.red._verify1(this), this.red.sqr(this); - }), - (o.prototype.redISqr = function () { - return i(this.red, 'redISqr works only with red numbers'), this.red._verify1(this), this.red.isqr(this); - }), - (o.prototype.redSqrt = function () { - return i(this.red, 'redSqrt works only with red numbers'), this.red._verify1(this), this.red.sqrt(this); - }), - (o.prototype.redInvm = function () { - return i(this.red, 'redInvm works only with red numbers'), this.red._verify1(this), this.red.invm(this); - }), - (o.prototype.redNeg = function () { - return i(this.red, 'redNeg works only with red numbers'), this.red._verify1(this), this.red.neg(this); - }), - (o.prototype.redPow = function (t) { - return i(this.red && !t.red, 'redPow(normalNum)'), this.red._verify1(this), this.red.pow(this, t); - }); - var b = { k256: null, p224: null, p192: null, p25519: null }; - function y(t, e) { - (this.name = t), - (this.p = new o(e, 16)), - (this.n = this.p.bitLength()), - (this.k = new o(1).iushln(this.n).isub(this.p)), - (this.tmp = this._tmp()); - } - function v() { - y.call(this, 'k256', 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f'); - } - function w() { - y.call(this, 'p224', 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001'); - } - function _() { - y.call(this, 'p192', 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff'); - } - function M() { - y.call(this, '25519', '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed'); - } - function E(t) { - if ('string' == typeof t) { - var e = o._prime(t); - (this.m = e.p), (this.prime = e); - } else i(t.gtn(1), 'modulus must be greater than 1'), (this.m = t), (this.prime = null); - } - function S(t) { - E.call(this, t), - (this.shift = this.m.bitLength()), - this.shift % 26 != 0 && (this.shift += 26 - (this.shift % 26)), - (this.r = new o(1).iushln(this.shift)), - (this.r2 = this.imod(this.r.sqr())), - (this.rinv = this.r._invmp(this.m)), - (this.minv = this.rinv.mul(this.r).isubn(1).div(this.m)), - (this.minv = this.minv.umod(this.r)), - (this.minv = this.r.sub(this.minv)); - } - (y.prototype._tmp = function () { - var t = new o(null); - return (t.words = new Array(Math.ceil(this.n / 13))), t; - }), - (y.prototype.ireduce = function (t) { - var e, - r = t; - do { - this.split(r, this.tmp), (e = (r = (r = this.imulK(r)).iadd(this.tmp)).bitLength()); - } while (e > this.n); - var i = e < this.n ? -1 : r.ucmp(this.p); - return 0 === i ? ((r.words[0] = 0), (r.length = 1)) : i > 0 ? r.isub(this.p) : void 0 !== r.strip ? r.strip() : r._strip(), r; - }), - (y.prototype.split = function (t, e) { - t.iushrn(this.n, 0, e); - }), - (y.prototype.imulK = function (t) { - return t.imul(this.k); - }), - n(v, y), - (v.prototype.split = function (t, e) { - for (var r = 4194303, i = Math.min(t.length, 9), n = 0; n < i; n++) e.words[n] = t.words[n]; - if (((e.length = i), t.length <= 9)) return (t.words[0] = 0), void (t.length = 1); - var o = t.words[9]; - for (e.words[e.length++] = o & r, n = 10; n < t.length; n++) { - var s = 0 | t.words[n]; - (t.words[n - 10] = ((s & r) << 4) | (o >>> 22)), (o = s); - } - (o >>>= 22), (t.words[n - 10] = o), 0 === o && t.length > 10 ? (t.length -= 10) : (t.length -= 9); - }), - (v.prototype.imulK = function (t) { - (t.words[t.length] = 0), (t.words[t.length + 1] = 0), (t.length += 2); - for (var e = 0, r = 0; r < t.length; r++) { - var i = 0 | t.words[r]; - (e += 977 * i), (t.words[r] = 67108863 & e), (e = 64 * i + ((e / 67108864) | 0)); - } - return 0 === t.words[t.length - 1] && (t.length--, 0 === t.words[t.length - 1] && t.length--), t; - }), - n(w, y), - n(_, y), - n(M, y), - (M.prototype.imulK = function (t) { - for (var e = 0, r = 0; r < t.length; r++) { - var i = 19 * (0 | t.words[r]) + e, - n = 67108863 & i; - (i >>>= 26), (t.words[r] = n), (e = i); - } - return 0 !== e && (t.words[t.length++] = e), t; - }), - (o._prime = function (t) { - if (b[t]) return b[t]; - var e; - if ('k256' === t) e = new v(); - else if ('p224' === t) e = new w(); - else if ('p192' === t) e = new _(); - else { - if ('p25519' !== t) throw new Error('Unknown prime ' + t); - e = new M(); - } - return (b[t] = e), e; - }), - (E.prototype._verify1 = function (t) { - i(0 === t.negative, 'red works only with positives'), i(t.red, 'red works only with red numbers'); - }), - (E.prototype._verify2 = function (t, e) { - i(0 == (t.negative | e.negative), 'red works only with positives'), - i(t.red && t.red === e.red, 'red works only with red numbers'); - }), - (E.prototype.imod = function (t) { - return this.prime ? this.prime.ireduce(t)._forceRed(this) : t.umod(this.m)._forceRed(this); - }), - (E.prototype.neg = function (t) { - return t.isZero() ? t.clone() : this.m.sub(t)._forceRed(this); - }), - (E.prototype.add = function (t, e) { - this._verify2(t, e); - var r = t.add(e); - return r.cmp(this.m) >= 0 && r.isub(this.m), r._forceRed(this); - }), - (E.prototype.iadd = function (t, e) { - this._verify2(t, e); - var r = t.iadd(e); - return r.cmp(this.m) >= 0 && r.isub(this.m), r; - }), - (E.prototype.sub = function (t, e) { - this._verify2(t, e); - var r = t.sub(e); - return r.cmpn(0) < 0 && r.iadd(this.m), r._forceRed(this); - }), - (E.prototype.isub = function (t, e) { - this._verify2(t, e); - var r = t.isub(e); - return r.cmpn(0) < 0 && r.iadd(this.m), r; - }), - (E.prototype.shl = function (t, e) { - return this._verify1(t), this.imod(t.ushln(e)); - }), - (E.prototype.imul = function (t, e) { - return this._verify2(t, e), this.imod(t.imul(e)); - }), - (E.prototype.mul = function (t, e) { - return this._verify2(t, e), this.imod(t.mul(e)); - }), - (E.prototype.isqr = function (t) { - return this.imul(t, t.clone()); - }), - (E.prototype.sqr = function (t) { - return this.mul(t, t); - }), - (E.prototype.sqrt = function (t) { - if (t.isZero()) return t.clone(); - var e = this.m.andln(3); - if ((i(e % 2 == 1), 3 === e)) { - var r = this.m.add(new o(1)).iushrn(2); - return this.pow(t, r); - } - for (var n = this.m.subn(1), s = 0; !n.isZero() && 0 === n.andln(1); ) s++, n.iushrn(1); - i(!n.isZero()); - var a = new o(1).toRed(this), - h = a.redNeg(), - u = this.m.subn(1).iushrn(1), - f = this.m.bitLength(); - for (f = new o(2 * f * f).toRed(this); 0 !== this.pow(f, u).cmp(h); ) f.redIAdd(h); - for (var c = this.pow(f, n), l = this.pow(t, n.addn(1).iushrn(1)), d = this.pow(t, n), p = s; 0 !== d.cmp(a); ) { - for (var m = d, g = 0; 0 !== m.cmp(a); g++) m = m.redSqr(); - i(g < p); - var b = this.pow(c, new o(1).iushln(p - g - 1)); - (l = l.redMul(b)), (c = b.redSqr()), (d = d.redMul(c)), (p = g); - } - return l; - }), - (E.prototype.invm = function (t) { - var e = t._invmp(this.m); - return 0 !== e.negative ? ((e.negative = 0), this.imod(e).redNeg()) : this.imod(e); - }), - (E.prototype.pow = function (t, e) { - if (e.isZero()) return new o(1).toRed(this); - if (0 === e.cmpn(1)) return t.clone(); - var r = new Array(16); - (r[0] = new o(1).toRed(this)), (r[1] = t); - for (var i = 2; i < r.length; i++) r[i] = this.mul(r[i - 1], t); - var n = r[0], - s = 0, - a = 0, - h = e.bitLength() % 26; - for (0 === h && (h = 26), i = e.length - 1; i >= 0; i--) { - for (var u = e.words[i], f = h - 1; f >= 0; f--) { - var c = (u >> f) & 1; - n !== r[0] && (n = this.sqr(n)), - 0 !== c || 0 !== s - ? ((s <<= 1), (s |= c), (4 == ++a || (0 === i && 0 === f)) && ((n = this.mul(n, r[s])), (a = 0), (s = 0))) - : (a = 0); - } - h = 26; - } - return n; - }), - (E.prototype.convertTo = function (t) { - var e = t.umod(this.m); - return e === t ? e.clone() : e; - }), - (E.prototype.convertFrom = function (t) { - var e = t.clone(); - return (e.red = null), e; - }), - (o.mont = function (t) { - return new S(t); - }), - n(S, E), - (S.prototype.convertTo = function (t) { - return this.imod(t.ushln(this.shift)); - }), - (S.prototype.convertFrom = function (t) { - var e = this.imod(t.mul(this.rinv)); - return (e.red = null), e; - }), - (S.prototype.imul = function (t, e) { - if (t.isZero() || e.isZero()) return (t.words[0] = 0), (t.length = 1), t; - var r = t.imul(e), - i = r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m), - n = r.isub(i).iushrn(this.shift), - o = n; - return n.cmp(this.m) >= 0 ? (o = n.isub(this.m)) : n.cmpn(0) < 0 && (o = n.iadd(this.m)), o._forceRed(this); - }), - (S.prototype.mul = function (t, e) { - if (t.isZero() || e.isZero()) return new o(0)._forceRed(this); - var r = t.mul(e), - i = r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m), - n = r.isub(i).iushrn(this.shift), - s = n; - return n.cmp(this.m) >= 0 ? (s = n.isub(this.m)) : n.cmpn(0) < 0 && (s = n.iadd(this.m)), s._forceRed(this); - }), - (S.prototype.invm = function (t) { - return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this); - }); - })((t = r.nmd(t)), this); - }, - 9749: (t, e, r) => { - 'use strict'; - var i = e; - (i.version = r(312).i8), - (i.utils = r(3369)), - (i.rand = r(9154)), - (i.curve = r(1530)), - (i.curves = r(1044)), - (i.ec = r(2263)), - (i.eddsa = r(1680)); - }, - 763: (t, e, r) => { - 'use strict'; - var i = r(6083), - n = r(3369), - o = n.getNAF, - s = n.getJSF, - a = n.assert; - function h(t, e) { - (this.type = t), - (this.p = new i(e.p, 16)), - (this.red = e.prime ? i.red(e.prime) : i.mont(this.p)), - (this.zero = new i(0).toRed(this.red)), - (this.one = new i(1).toRed(this.red)), - (this.two = new i(2).toRed(this.red)), - (this.n = e.n && new i(e.n, 16)), - (this.g = e.g && this.pointFromJSON(e.g, e.gRed)), - (this._wnafT1 = new Array(4)), - (this._wnafT2 = new Array(4)), - (this._wnafT3 = new Array(4)), - (this._wnafT4 = new Array(4)), - (this._bitLength = this.n ? this.n.bitLength() : 0); - var r = this.n && this.p.div(this.n); - !r || r.cmpn(100) > 0 ? (this.redN = null) : ((this._maxwellTrick = !0), (this.redN = this.n.toRed(this.red))); - } - function u(t, e) { - (this.curve = t), (this.type = e), (this.precomputed = null); - } - (t.exports = h), - (h.prototype.point = function () { - throw new Error('Not implemented'); - }), - (h.prototype.validate = function () { - throw new Error('Not implemented'); - }), - (h.prototype._fixedNafMul = function (t, e) { - a(t.precomputed); - var r = t._getDoubles(), - i = o(e, 1, this._bitLength), - n = (1 << (r.step + 1)) - (r.step % 2 == 0 ? 2 : 1); - n /= 3; - var s, - h, - u = []; - for (s = 0; s < i.length; s += r.step) { - h = 0; - for (var f = s + r.step - 1; f >= s; f--) h = (h << 1) + i[f]; - u.push(h); - } - for (var c = this.jpoint(null, null, null), l = this.jpoint(null, null, null), d = n; d > 0; d--) { - for (s = 0; s < u.length; s++) - (h = u[s]) === d ? (l = l.mixedAdd(r.points[s])) : h === -d && (l = l.mixedAdd(r.points[s].neg())); - c = c.add(l); - } - return c.toP(); - }), - (h.prototype._wnafMul = function (t, e) { - var r = 4, - i = t._getNAFPoints(r); - r = i.wnd; - for (var n = i.points, s = o(e, r, this._bitLength), h = this.jpoint(null, null, null), u = s.length - 1; u >= 0; u--) { - for (var f = 0; u >= 0 && 0 === s[u]; u--) f++; - if ((u >= 0 && f++, (h = h.dblp(f)), u < 0)) break; - var c = s[u]; - a(0 !== c), - (h = - 'affine' === t.type - ? c > 0 - ? h.mixedAdd(n[(c - 1) >> 1]) - : h.mixedAdd(n[(-c - 1) >> 1].neg()) - : c > 0 - ? h.add(n[(c - 1) >> 1]) - : h.add(n[(-c - 1) >> 1].neg())); - } - return 'affine' === t.type ? h.toP() : h; - }), - (h.prototype._wnafMulAdd = function (t, e, r, i, n) { - var a, - h, - u, - f = this._wnafT1, - c = this._wnafT2, - l = this._wnafT3, - d = 0; - for (a = 0; a < i; a++) { - var p = (u = e[a])._getNAFPoints(t); - (f[a] = p.wnd), (c[a] = p.points); - } - for (a = i - 1; a >= 1; a -= 2) { - var m = a - 1, - g = a; - if (1 === f[m] && 1 === f[g]) { - var b = [e[m], null, null, e[g]]; - 0 === e[m].y.cmp(e[g].y) - ? ((b[1] = e[m].add(e[g])), (b[2] = e[m].toJ().mixedAdd(e[g].neg()))) - : 0 === e[m].y.cmp(e[g].y.redNeg()) - ? ((b[1] = e[m].toJ().mixedAdd(e[g])), (b[2] = e[m].add(e[g].neg()))) - : ((b[1] = e[m].toJ().mixedAdd(e[g])), (b[2] = e[m].toJ().mixedAdd(e[g].neg()))); - var y = [-3, -1, -5, -7, 0, 7, 5, 1, 3], - v = s(r[m], r[g]); - for (d = Math.max(v[0].length, d), l[m] = new Array(d), l[g] = new Array(d), h = 0; h < d; h++) { - var w = 0 | v[0][h], - _ = 0 | v[1][h]; - (l[m][h] = y[3 * (w + 1) + (_ + 1)]), (l[g][h] = 0), (c[m] = b); - } - } else - (l[m] = o(r[m], f[m], this._bitLength)), - (l[g] = o(r[g], f[g], this._bitLength)), - (d = Math.max(l[m].length, d)), - (d = Math.max(l[g].length, d)); - } - var M = this.jpoint(null, null, null), - E = this._wnafT4; - for (a = d; a >= 0; a--) { - for (var S = 0; a >= 0; ) { - var x = !0; - for (h = 0; h < i; h++) (E[h] = 0 | l[h][a]), 0 !== E[h] && (x = !1); - if (!x) break; - S++, a--; - } - if ((a >= 0 && S++, (M = M.dblp(S)), a < 0)) break; - for (h = 0; h < i; h++) { - var A = E[h]; - 0 !== A && - (A > 0 ? (u = c[h][(A - 1) >> 1]) : A < 0 && (u = c[h][(-A - 1) >> 1].neg()), - (M = 'affine' === u.type ? M.mixedAdd(u) : M.add(u))); - } - } - for (a = 0; a < i; a++) c[a] = null; - return n ? M : M.toP(); - }), - (h.BasePoint = u), - (u.prototype.eq = function () { - throw new Error('Not implemented'); - }), - (u.prototype.validate = function () { - return this.curve.validate(this); - }), - (h.prototype.decodePoint = function (t, e) { - t = n.toArray(t, e); - var r = this.p.byteLength(); - if ((4 === t[0] || 6 === t[0] || 7 === t[0]) && t.length - 1 == 2 * r) - return ( - 6 === t[0] ? a(t[t.length - 1] % 2 == 0) : 7 === t[0] && a(t[t.length - 1] % 2 == 1), - this.point(t.slice(1, 1 + r), t.slice(1 + r, 1 + 2 * r)) - ); - if ((2 === t[0] || 3 === t[0]) && t.length - 1 === r) return this.pointFromX(t.slice(1, 1 + r), 3 === t[0]); - throw new Error('Unknown point format'); - }), - (u.prototype.encodeCompressed = function (t) { - return this.encode(t, !0); - }), - (u.prototype._encode = function (t) { - var e = this.curve.p.byteLength(), - r = this.getX().toArray('be', e); - return t ? [this.getY().isEven() ? 2 : 3].concat(r) : [4].concat(r, this.getY().toArray('be', e)); - }), - (u.prototype.encode = function (t, e) { - return n.encode(this._encode(e), t); - }), - (u.prototype.precompute = function (t) { - if (this.precomputed) return this; - var e = { doubles: null, naf: null, beta: null }; - return ( - (e.naf = this._getNAFPoints(8)), - (e.doubles = this._getDoubles(4, t)), - (e.beta = this._getBeta()), - (this.precomputed = e), - this - ); - }), - (u.prototype._hasDoubles = function (t) { - if (!this.precomputed) return !1; - var e = this.precomputed.doubles; - return !!e && e.points.length >= Math.ceil((t.bitLength() + 1) / e.step); - }), - (u.prototype._getDoubles = function (t, e) { - if (this.precomputed && this.precomputed.doubles) return this.precomputed.doubles; - for (var r = [this], i = this, n = 0; n < e; n += t) { - for (var o = 0; o < t; o++) i = i.dbl(); - r.push(i); - } - return { step: t, points: r }; - }), - (u.prototype._getNAFPoints = function (t) { - if (this.precomputed && this.precomputed.naf) return this.precomputed.naf; - for (var e = [this], r = (1 << t) - 1, i = 1 === r ? null : this.dbl(), n = 1; n < r; n++) e[n] = e[n - 1].add(i); - return { wnd: t, points: e }; - }), - (u.prototype._getBeta = function () { - return null; - }), - (u.prototype.dblp = function (t) { - for (var e = this, r = 0; r < t; r++) e = e.dbl(); - return e; - }); - }, - 4239: (t, e, r) => { - 'use strict'; - var i = r(3369), - n = r(6083), - o = r(87), - s = r(763), - a = i.assert; - function h(t) { - (this.twisted = 1 != (0 | t.a)), - (this.mOneA = this.twisted && -1 == (0 | t.a)), - (this.extended = this.mOneA), - s.call(this, 'edwards', t), - (this.a = new n(t.a, 16).umod(this.red.m)), - (this.a = this.a.toRed(this.red)), - (this.c = new n(t.c, 16).toRed(this.red)), - (this.c2 = this.c.redSqr()), - (this.d = new n(t.d, 16).toRed(this.red)), - (this.dd = this.d.redAdd(this.d)), - a(!this.twisted || 0 === this.c.fromRed().cmpn(1)), - (this.oneC = 1 == (0 | t.c)); - } - function u(t, e, r, i, o) { - s.BasePoint.call(this, t, 'projective'), - null === e && null === r && null === i - ? ((this.x = this.curve.zero), - (this.y = this.curve.one), - (this.z = this.curve.one), - (this.t = this.curve.zero), - (this.zOne = !0)) - : ((this.x = new n(e, 16)), - (this.y = new n(r, 16)), - (this.z = i ? new n(i, 16) : this.curve.one), - (this.t = o && new n(o, 16)), - this.x.red || (this.x = this.x.toRed(this.curve.red)), - this.y.red || (this.y = this.y.toRed(this.curve.red)), - this.z.red || (this.z = this.z.toRed(this.curve.red)), - this.t && !this.t.red && (this.t = this.t.toRed(this.curve.red)), - (this.zOne = this.z === this.curve.one), - this.curve.extended && - !this.t && - ((this.t = this.x.redMul(this.y)), this.zOne || (this.t = this.t.redMul(this.z.redInvm())))); - } - o(h, s), - (t.exports = h), - (h.prototype._mulA = function (t) { - return this.mOneA ? t.redNeg() : this.a.redMul(t); - }), - (h.prototype._mulC = function (t) { - return this.oneC ? t : this.c.redMul(t); - }), - (h.prototype.jpoint = function (t, e, r, i) { - return this.point(t, e, r, i); - }), - (h.prototype.pointFromX = function (t, e) { - (t = new n(t, 16)).red || (t = t.toRed(this.red)); - var r = t.redSqr(), - i = this.c2.redSub(this.a.redMul(r)), - o = this.one.redSub(this.c2.redMul(this.d).redMul(r)), - s = i.redMul(o.redInvm()), - a = s.redSqrt(); - if (0 !== a.redSqr().redSub(s).cmp(this.zero)) throw new Error('invalid point'); - var h = a.fromRed().isOdd(); - return ((e && !h) || (!e && h)) && (a = a.redNeg()), this.point(t, a); - }), - (h.prototype.pointFromY = function (t, e) { - (t = new n(t, 16)).red || (t = t.toRed(this.red)); - var r = t.redSqr(), - i = r.redSub(this.c2), - o = r.redMul(this.d).redMul(this.c2).redSub(this.a), - s = i.redMul(o.redInvm()); - if (0 === s.cmp(this.zero)) { - if (e) throw new Error('invalid point'); - return this.point(this.zero, t); - } - var a = s.redSqrt(); - if (0 !== a.redSqr().redSub(s).cmp(this.zero)) throw new Error('invalid point'); - return a.fromRed().isOdd() !== e && (a = a.redNeg()), this.point(a, t); - }), - (h.prototype.validate = function (t) { - if (t.isInfinity()) return !0; - t.normalize(); - var e = t.x.redSqr(), - r = t.y.redSqr(), - i = e.redMul(this.a).redAdd(r), - n = this.c2.redMul(this.one.redAdd(this.d.redMul(e).redMul(r))); - return 0 === i.cmp(n); - }), - o(u, s.BasePoint), - (h.prototype.pointFromJSON = function (t) { - return u.fromJSON(this, t); - }), - (h.prototype.point = function (t, e, r, i) { - return new u(this, t, e, r, i); - }), - (u.fromJSON = function (t, e) { - return new u(t, e[0], e[1], e[2]); - }), - (u.prototype.inspect = function () { - return this.isInfinity() - ? '' - : ''; - }), - (u.prototype.isInfinity = function () { - return 0 === this.x.cmpn(0) && (0 === this.y.cmp(this.z) || (this.zOne && 0 === this.y.cmp(this.curve.c))); - }), - (u.prototype._extDbl = function () { - var t = this.x.redSqr(), - e = this.y.redSqr(), - r = this.z.redSqr(); - r = r.redIAdd(r); - var i = this.curve._mulA(t), - n = this.x.redAdd(this.y).redSqr().redISub(t).redISub(e), - o = i.redAdd(e), - s = o.redSub(r), - a = i.redSub(e), - h = n.redMul(s), - u = o.redMul(a), - f = n.redMul(a), - c = s.redMul(o); - return this.curve.point(h, u, c, f); - }), - (u.prototype._projDbl = function () { - var t, - e, - r, - i, - n, - o, - s = this.x.redAdd(this.y).redSqr(), - a = this.x.redSqr(), - h = this.y.redSqr(); - if (this.curve.twisted) { - var u = (i = this.curve._mulA(a)).redAdd(h); - this.zOne - ? ((t = s.redSub(a).redSub(h).redMul(u.redSub(this.curve.two))), - (e = u.redMul(i.redSub(h))), - (r = u.redSqr().redSub(u).redSub(u))) - : ((n = this.z.redSqr()), - (o = u.redSub(n).redISub(n)), - (t = s.redSub(a).redISub(h).redMul(o)), - (e = u.redMul(i.redSub(h))), - (r = u.redMul(o))); - } else - (i = a.redAdd(h)), - (n = this.curve._mulC(this.z).redSqr()), - (o = i.redSub(n).redSub(n)), - (t = this.curve._mulC(s.redISub(i)).redMul(o)), - (e = this.curve._mulC(i).redMul(a.redISub(h))), - (r = i.redMul(o)); - return this.curve.point(t, e, r); - }), - (u.prototype.dbl = function () { - return this.isInfinity() ? this : this.curve.extended ? this._extDbl() : this._projDbl(); - }), - (u.prototype._extAdd = function (t) { - var e = this.y.redSub(this.x).redMul(t.y.redSub(t.x)), - r = this.y.redAdd(this.x).redMul(t.y.redAdd(t.x)), - i = this.t.redMul(this.curve.dd).redMul(t.t), - n = this.z.redMul(t.z.redAdd(t.z)), - o = r.redSub(e), - s = n.redSub(i), - a = n.redAdd(i), - h = r.redAdd(e), - u = o.redMul(s), - f = a.redMul(h), - c = o.redMul(h), - l = s.redMul(a); - return this.curve.point(u, f, l, c); - }), - (u.prototype._projAdd = function (t) { - var e, - r, - i = this.z.redMul(t.z), - n = i.redSqr(), - o = this.x.redMul(t.x), - s = this.y.redMul(t.y), - a = this.curve.d.redMul(o).redMul(s), - h = n.redSub(a), - u = n.redAdd(a), - f = this.x.redAdd(this.y).redMul(t.x.redAdd(t.y)).redISub(o).redISub(s), - c = i.redMul(h).redMul(f); - return ( - this.curve.twisted - ? ((e = i.redMul(u).redMul(s.redSub(this.curve._mulA(o)))), (r = h.redMul(u))) - : ((e = i.redMul(u).redMul(s.redSub(o))), (r = this.curve._mulC(h).redMul(u))), - this.curve.point(c, e, r) - ); - }), - (u.prototype.add = function (t) { - return this.isInfinity() ? t : t.isInfinity() ? this : this.curve.extended ? this._extAdd(t) : this._projAdd(t); - }), - (u.prototype.mul = function (t) { - return this._hasDoubles(t) ? this.curve._fixedNafMul(this, t) : this.curve._wnafMul(this, t); - }), - (u.prototype.mulAdd = function (t, e, r) { - return this.curve._wnafMulAdd(1, [this, e], [t, r], 2, !1); - }), - (u.prototype.jmulAdd = function (t, e, r) { - return this.curve._wnafMulAdd(1, [this, e], [t, r], 2, !0); - }), - (u.prototype.normalize = function () { - if (this.zOne) return this; - var t = this.z.redInvm(); - return ( - (this.x = this.x.redMul(t)), - (this.y = this.y.redMul(t)), - this.t && (this.t = this.t.redMul(t)), - (this.z = this.curve.one), - (this.zOne = !0), - this - ); - }), - (u.prototype.neg = function () { - return this.curve.point(this.x.redNeg(), this.y, this.z, this.t && this.t.redNeg()); - }), - (u.prototype.getX = function () { - return this.normalize(), this.x.fromRed(); - }), - (u.prototype.getY = function () { - return this.normalize(), this.y.fromRed(); - }), - (u.prototype.eq = function (t) { - return this === t || (0 === this.getX().cmp(t.getX()) && 0 === this.getY().cmp(t.getY())); - }), - (u.prototype.eqXToP = function (t) { - var e = t.toRed(this.curve.red).redMul(this.z); - if (0 === this.x.cmp(e)) return !0; - for (var r = t.clone(), i = this.curve.redN.redMul(this.z); ; ) { - if ((r.iadd(this.curve.n), r.cmp(this.curve.p) >= 0)) return !1; - if ((e.redIAdd(i), 0 === this.x.cmp(e))) return !0; - } - }), - (u.prototype.toP = u.prototype.normalize), - (u.prototype.mixedAdd = u.prototype.add); - }, - 1530: (t, e, r) => { - 'use strict'; - var i = e; - (i.base = r(763)), (i.short = r(4560)), (i.mont = r(5974)), (i.edwards = r(4239)); - }, - 5974: (t, e, r) => { - 'use strict'; - var i = r(6083), - n = r(87), - o = r(763), - s = r(3369); - function a(t) { - o.call(this, 'mont', t), - (this.a = new i(t.a, 16).toRed(this.red)), - (this.b = new i(t.b, 16).toRed(this.red)), - (this.i4 = new i(4).toRed(this.red).redInvm()), - (this.two = new i(2).toRed(this.red)), - (this.a24 = this.i4.redMul(this.a.redAdd(this.two))); - } - function h(t, e, r) { - o.BasePoint.call(this, t, 'projective'), - null === e && null === r - ? ((this.x = this.curve.one), (this.z = this.curve.zero)) - : ((this.x = new i(e, 16)), - (this.z = new i(r, 16)), - this.x.red || (this.x = this.x.toRed(this.curve.red)), - this.z.red || (this.z = this.z.toRed(this.curve.red))); - } - n(a, o), - (t.exports = a), - (a.prototype.validate = function (t) { - var e = t.normalize().x, - r = e.redSqr(), - i = r.redMul(e).redAdd(r.redMul(this.a)).redAdd(e); - return 0 === i.redSqrt().redSqr().cmp(i); - }), - n(h, o.BasePoint), - (a.prototype.decodePoint = function (t, e) { - return this.point(s.toArray(t, e), 1); - }), - (a.prototype.point = function (t, e) { - return new h(this, t, e); - }), - (a.prototype.pointFromJSON = function (t) { - return h.fromJSON(this, t); - }), - (h.prototype.precompute = function () {}), - (h.prototype._encode = function () { - return this.getX().toArray('be', this.curve.p.byteLength()); - }), - (h.fromJSON = function (t, e) { - return new h(t, e[0], e[1] || t.one); - }), - (h.prototype.inspect = function () { - return this.isInfinity() - ? '' - : ''; - }), - (h.prototype.isInfinity = function () { - return 0 === this.z.cmpn(0); - }), - (h.prototype.dbl = function () { - var t = this.x.redAdd(this.z).redSqr(), - e = this.x.redSub(this.z).redSqr(), - r = t.redSub(e), - i = t.redMul(e), - n = r.redMul(e.redAdd(this.curve.a24.redMul(r))); - return this.curve.point(i, n); - }), - (h.prototype.add = function () { - throw new Error('Not supported on Montgomery curve'); - }), - (h.prototype.diffAdd = function (t, e) { - var r = this.x.redAdd(this.z), - i = this.x.redSub(this.z), - n = t.x.redAdd(t.z), - o = t.x.redSub(t.z).redMul(r), - s = n.redMul(i), - a = e.z.redMul(o.redAdd(s).redSqr()), - h = e.x.redMul(o.redISub(s).redSqr()); - return this.curve.point(a, h); - }), - (h.prototype.mul = function (t) { - for (var e = t.clone(), r = this, i = this.curve.point(null, null), n = []; 0 !== e.cmpn(0); e.iushrn(1)) n.push(e.andln(1)); - for (var o = n.length - 1; o >= 0; o--) - 0 === n[o] ? ((r = r.diffAdd(i, this)), (i = i.dbl())) : ((i = r.diffAdd(i, this)), (r = r.dbl())); - return i; - }), - (h.prototype.mulAdd = function () { - throw new Error('Not supported on Montgomery curve'); - }), - (h.prototype.jumlAdd = function () { - throw new Error('Not supported on Montgomery curve'); - }), - (h.prototype.eq = function (t) { - return 0 === this.getX().cmp(t.getX()); - }), - (h.prototype.normalize = function () { - return (this.x = this.x.redMul(this.z.redInvm())), (this.z = this.curve.one), this; - }), - (h.prototype.getX = function () { - return this.normalize(), this.x.fromRed(); - }); - }, - 4560: (t, e, r) => { - 'use strict'; - var i = r(3369), - n = r(6083), - o = r(87), - s = r(763), - a = i.assert; - function h(t) { - s.call(this, 'short', t), - (this.a = new n(t.a, 16).toRed(this.red)), - (this.b = new n(t.b, 16).toRed(this.red)), - (this.tinv = this.two.redInvm()), - (this.zeroA = 0 === this.a.fromRed().cmpn(0)), - (this.threeA = 0 === this.a.fromRed().sub(this.p).cmpn(-3)), - (this.endo = this._getEndomorphism(t)), - (this._endoWnafT1 = new Array(4)), - (this._endoWnafT2 = new Array(4)); - } - function u(t, e, r, i) { - s.BasePoint.call(this, t, 'affine'), - null === e && null === r - ? ((this.x = null), (this.y = null), (this.inf = !0)) - : ((this.x = new n(e, 16)), - (this.y = new n(r, 16)), - i && (this.x.forceRed(this.curve.red), this.y.forceRed(this.curve.red)), - this.x.red || (this.x = this.x.toRed(this.curve.red)), - this.y.red || (this.y = this.y.toRed(this.curve.red)), - (this.inf = !1)); - } - function f(t, e, r, i) { - s.BasePoint.call(this, t, 'jacobian'), - null === e && null === r && null === i - ? ((this.x = this.curve.one), (this.y = this.curve.one), (this.z = new n(0))) - : ((this.x = new n(e, 16)), (this.y = new n(r, 16)), (this.z = new n(i, 16))), - this.x.red || (this.x = this.x.toRed(this.curve.red)), - this.y.red || (this.y = this.y.toRed(this.curve.red)), - this.z.red || (this.z = this.z.toRed(this.curve.red)), - (this.zOne = this.z === this.curve.one); - } - o(h, s), - (t.exports = h), - (h.prototype._getEndomorphism = function (t) { - if (this.zeroA && this.g && this.n && 1 === this.p.modn(3)) { - var e, r; - if (t.beta) e = new n(t.beta, 16).toRed(this.red); - else { - var i = this._getEndoRoots(this.p); - e = (e = i[0].cmp(i[1]) < 0 ? i[0] : i[1]).toRed(this.red); - } - if (t.lambda) r = new n(t.lambda, 16); - else { - var o = this._getEndoRoots(this.n); - 0 === this.g.mul(o[0]).x.cmp(this.g.x.redMul(e)) - ? (r = o[0]) - : ((r = o[1]), a(0 === this.g.mul(r).x.cmp(this.g.x.redMul(e)))); - } - return { - beta: e, - lambda: r, - basis: t.basis - ? t.basis.map(function (t) { - return { a: new n(t.a, 16), b: new n(t.b, 16) }; - }) - : this._getEndoBasis(r), - }; - } - }), - (h.prototype._getEndoRoots = function (t) { - var e = t === this.p ? this.red : n.mont(t), - r = new n(2).toRed(e).redInvm(), - i = r.redNeg(), - o = new n(3).toRed(e).redNeg().redSqrt().redMul(r); - return [i.redAdd(o).fromRed(), i.redSub(o).fromRed()]; - }), - (h.prototype._getEndoBasis = function (t) { - for ( - var e, - r, - i, - o, - s, - a, - h, - u, - f, - c = this.n.ushrn(Math.floor(this.n.bitLength() / 2)), - l = t, - d = this.n.clone(), - p = new n(1), - m = new n(0), - g = new n(0), - b = new n(1), - y = 0; - 0 !== l.cmpn(0); - - ) { - var v = d.div(l); - (u = d.sub(v.mul(l))), (f = g.sub(v.mul(p))); - var w = b.sub(v.mul(m)); - if (!i && u.cmp(c) < 0) (e = h.neg()), (r = p), (i = u.neg()), (o = f); - else if (i && 2 == ++y) break; - (h = u), (d = l), (l = u), (g = p), (p = f), (b = m), (m = w); - } - (s = u.neg()), (a = f); - var _ = i.sqr().add(o.sqr()); - return ( - s.sqr().add(a.sqr()).cmp(_) >= 0 && ((s = e), (a = r)), - i.negative && ((i = i.neg()), (o = o.neg())), - s.negative && ((s = s.neg()), (a = a.neg())), - [ - { a: i, b: o }, - { a: s, b: a }, - ] - ); - }), - (h.prototype._endoSplit = function (t) { - var e = this.endo.basis, - r = e[0], - i = e[1], - n = i.b.mul(t).divRound(this.n), - o = r.b.neg().mul(t).divRound(this.n), - s = n.mul(r.a), - a = o.mul(i.a), - h = n.mul(r.b), - u = o.mul(i.b); - return { k1: t.sub(s).sub(a), k2: h.add(u).neg() }; - }), - (h.prototype.pointFromX = function (t, e) { - (t = new n(t, 16)).red || (t = t.toRed(this.red)); - var r = t.redSqr().redMul(t).redIAdd(t.redMul(this.a)).redIAdd(this.b), - i = r.redSqrt(); - if (0 !== i.redSqr().redSub(r).cmp(this.zero)) throw new Error('invalid point'); - var o = i.fromRed().isOdd(); - return ((e && !o) || (!e && o)) && (i = i.redNeg()), this.point(t, i); - }), - (h.prototype.validate = function (t) { - if (t.inf) return !0; - var e = t.x, - r = t.y, - i = this.a.redMul(e), - n = e.redSqr().redMul(e).redIAdd(i).redIAdd(this.b); - return 0 === r.redSqr().redISub(n).cmpn(0); - }), - (h.prototype._endoWnafMulAdd = function (t, e, r) { - for (var i = this._endoWnafT1, n = this._endoWnafT2, o = 0; o < t.length; o++) { - var s = this._endoSplit(e[o]), - a = t[o], - h = a._getBeta(); - s.k1.negative && (s.k1.ineg(), (a = a.neg(!0))), - s.k2.negative && (s.k2.ineg(), (h = h.neg(!0))), - (i[2 * o] = a), - (i[2 * o + 1] = h), - (n[2 * o] = s.k1), - (n[2 * o + 1] = s.k2); - } - for (var u = this._wnafMulAdd(1, i, n, 2 * o, r), f = 0; f < 2 * o; f++) (i[f] = null), (n[f] = null); - return u; - }), - o(u, s.BasePoint), - (h.prototype.point = function (t, e, r) { - return new u(this, t, e, r); - }), - (h.prototype.pointFromJSON = function (t, e) { - return u.fromJSON(this, t, e); - }), - (u.prototype._getBeta = function () { - if (this.curve.endo) { - var t = this.precomputed; - if (t && t.beta) return t.beta; - var e = this.curve.point(this.x.redMul(this.curve.endo.beta), this.y); - if (t) { - var r = this.curve, - i = function (t) { - return r.point(t.x.redMul(r.endo.beta), t.y); - }; - (t.beta = e), - (e.precomputed = { - beta: null, - naf: t.naf && { wnd: t.naf.wnd, points: t.naf.points.map(i) }, - doubles: t.doubles && { step: t.doubles.step, points: t.doubles.points.map(i) }, - }); - } - return e; - } - }), - (u.prototype.toJSON = function () { - return this.precomputed - ? [ - this.x, - this.y, - this.precomputed && { - doubles: this.precomputed.doubles && { - step: this.precomputed.doubles.step, - points: this.precomputed.doubles.points.slice(1), - }, - naf: this.precomputed.naf && { wnd: this.precomputed.naf.wnd, points: this.precomputed.naf.points.slice(1) }, - }, - ] - : [this.x, this.y]; - }), - (u.fromJSON = function (t, e, r) { - 'string' == typeof e && (e = JSON.parse(e)); - var i = t.point(e[0], e[1], r); - if (!e[2]) return i; - function n(e) { - return t.point(e[0], e[1], r); - } - var o = e[2]; - return ( - (i.precomputed = { - beta: null, - doubles: o.doubles && { step: o.doubles.step, points: [i].concat(o.doubles.points.map(n)) }, - naf: o.naf && { wnd: o.naf.wnd, points: [i].concat(o.naf.points.map(n)) }, - }), - i - ); - }), - (u.prototype.inspect = function () { - return this.isInfinity() - ? '' - : ''; - }), - (u.prototype.isInfinity = function () { - return this.inf; - }), - (u.prototype.add = function (t) { - if (this.inf) return t; - if (t.inf) return this; - if (this.eq(t)) return this.dbl(); - if (this.neg().eq(t)) return this.curve.point(null, null); - if (0 === this.x.cmp(t.x)) return this.curve.point(null, null); - var e = this.y.redSub(t.y); - 0 !== e.cmpn(0) && (e = e.redMul(this.x.redSub(t.x).redInvm())); - var r = e.redSqr().redISub(this.x).redISub(t.x), - i = e.redMul(this.x.redSub(r)).redISub(this.y); - return this.curve.point(r, i); - }), - (u.prototype.dbl = function () { - if (this.inf) return this; - var t = this.y.redAdd(this.y); - if (0 === t.cmpn(0)) return this.curve.point(null, null); - var e = this.curve.a, - r = this.x.redSqr(), - i = t.redInvm(), - n = r.redAdd(r).redIAdd(r).redIAdd(e).redMul(i), - o = n.redSqr().redISub(this.x.redAdd(this.x)), - s = n.redMul(this.x.redSub(o)).redISub(this.y); - return this.curve.point(o, s); - }), - (u.prototype.getX = function () { - return this.x.fromRed(); - }), - (u.prototype.getY = function () { - return this.y.fromRed(); - }), - (u.prototype.mul = function (t) { - return ( - (t = new n(t, 16)), - this.isInfinity() - ? this - : this._hasDoubles(t) - ? this.curve._fixedNafMul(this, t) - : this.curve.endo - ? this.curve._endoWnafMulAdd([this], [t]) - : this.curve._wnafMul(this, t) - ); - }), - (u.prototype.mulAdd = function (t, e, r) { - var i = [this, e], - n = [t, r]; - return this.curve.endo ? this.curve._endoWnafMulAdd(i, n) : this.curve._wnafMulAdd(1, i, n, 2); - }), - (u.prototype.jmulAdd = function (t, e, r) { - var i = [this, e], - n = [t, r]; - return this.curve.endo ? this.curve._endoWnafMulAdd(i, n, !0) : this.curve._wnafMulAdd(1, i, n, 2, !0); - }), - (u.prototype.eq = function (t) { - return this === t || (this.inf === t.inf && (this.inf || (0 === this.x.cmp(t.x) && 0 === this.y.cmp(t.y)))); - }), - (u.prototype.neg = function (t) { - if (this.inf) return this; - var e = this.curve.point(this.x, this.y.redNeg()); - if (t && this.precomputed) { - var r = this.precomputed, - i = function (t) { - return t.neg(); - }; - e.precomputed = { - naf: r.naf && { wnd: r.naf.wnd, points: r.naf.points.map(i) }, - doubles: r.doubles && { step: r.doubles.step, points: r.doubles.points.map(i) }, - }; - } - return e; - }), - (u.prototype.toJ = function () { - return this.inf ? this.curve.jpoint(null, null, null) : this.curve.jpoint(this.x, this.y, this.curve.one); - }), - o(f, s.BasePoint), - (h.prototype.jpoint = function (t, e, r) { - return new f(this, t, e, r); - }), - (f.prototype.toP = function () { - if (this.isInfinity()) return this.curve.point(null, null); - var t = this.z.redInvm(), - e = t.redSqr(), - r = this.x.redMul(e), - i = this.y.redMul(e).redMul(t); - return this.curve.point(r, i); - }), - (f.prototype.neg = function () { - return this.curve.jpoint(this.x, this.y.redNeg(), this.z); - }), - (f.prototype.add = function (t) { - if (this.isInfinity()) return t; - if (t.isInfinity()) return this; - var e = t.z.redSqr(), - r = this.z.redSqr(), - i = this.x.redMul(e), - n = t.x.redMul(r), - o = this.y.redMul(e.redMul(t.z)), - s = t.y.redMul(r.redMul(this.z)), - a = i.redSub(n), - h = o.redSub(s); - if (0 === a.cmpn(0)) return 0 !== h.cmpn(0) ? this.curve.jpoint(null, null, null) : this.dbl(); - var u = a.redSqr(), - f = u.redMul(a), - c = i.redMul(u), - l = h.redSqr().redIAdd(f).redISub(c).redISub(c), - d = h.redMul(c.redISub(l)).redISub(o.redMul(f)), - p = this.z.redMul(t.z).redMul(a); - return this.curve.jpoint(l, d, p); - }), - (f.prototype.mixedAdd = function (t) { - if (this.isInfinity()) return t.toJ(); - if (t.isInfinity()) return this; - var e = this.z.redSqr(), - r = this.x, - i = t.x.redMul(e), - n = this.y, - o = t.y.redMul(e).redMul(this.z), - s = r.redSub(i), - a = n.redSub(o); - if (0 === s.cmpn(0)) return 0 !== a.cmpn(0) ? this.curve.jpoint(null, null, null) : this.dbl(); - var h = s.redSqr(), - u = h.redMul(s), - f = r.redMul(h), - c = a.redSqr().redIAdd(u).redISub(f).redISub(f), - l = a.redMul(f.redISub(c)).redISub(n.redMul(u)), - d = this.z.redMul(s); - return this.curve.jpoint(c, l, d); - }), - (f.prototype.dblp = function (t) { - if (0 === t) return this; - if (this.isInfinity()) return this; - if (!t) return this.dbl(); - var e; - if (this.curve.zeroA || this.curve.threeA) { - var r = this; - for (e = 0; e < t; e++) r = r.dbl(); - return r; - } - var i = this.curve.a, - n = this.curve.tinv, - o = this.x, - s = this.y, - a = this.z, - h = a.redSqr().redSqr(), - u = s.redAdd(s); - for (e = 0; e < t; e++) { - var f = o.redSqr(), - c = u.redSqr(), - l = c.redSqr(), - d = f.redAdd(f).redIAdd(f).redIAdd(i.redMul(h)), - p = o.redMul(c), - m = d.redSqr().redISub(p.redAdd(p)), - g = p.redISub(m), - b = d.redMul(g); - b = b.redIAdd(b).redISub(l); - var y = u.redMul(a); - e + 1 < t && (h = h.redMul(l)), (o = m), (a = y), (u = b); - } - return this.curve.jpoint(o, u.redMul(n), a); - }), - (f.prototype.dbl = function () { - return this.isInfinity() ? this : this.curve.zeroA ? this._zeroDbl() : this.curve.threeA ? this._threeDbl() : this._dbl(); - }), - (f.prototype._zeroDbl = function () { - var t, e, r; - if (this.zOne) { - var i = this.x.redSqr(), - n = this.y.redSqr(), - o = n.redSqr(), - s = this.x.redAdd(n).redSqr().redISub(i).redISub(o); - s = s.redIAdd(s); - var a = i.redAdd(i).redIAdd(i), - h = a.redSqr().redISub(s).redISub(s), - u = o.redIAdd(o); - (u = (u = u.redIAdd(u)).redIAdd(u)), (t = h), (e = a.redMul(s.redISub(h)).redISub(u)), (r = this.y.redAdd(this.y)); - } else { - var f = this.x.redSqr(), - c = this.y.redSqr(), - l = c.redSqr(), - d = this.x.redAdd(c).redSqr().redISub(f).redISub(l); - d = d.redIAdd(d); - var p = f.redAdd(f).redIAdd(f), - m = p.redSqr(), - g = l.redIAdd(l); - (g = (g = g.redIAdd(g)).redIAdd(g)), - (t = m.redISub(d).redISub(d)), - (e = p.redMul(d.redISub(t)).redISub(g)), - (r = (r = this.y.redMul(this.z)).redIAdd(r)); - } - return this.curve.jpoint(t, e, r); - }), - (f.prototype._threeDbl = function () { - var t, e, r; - if (this.zOne) { - var i = this.x.redSqr(), - n = this.y.redSqr(), - o = n.redSqr(), - s = this.x.redAdd(n).redSqr().redISub(i).redISub(o); - s = s.redIAdd(s); - var a = i.redAdd(i).redIAdd(i).redIAdd(this.curve.a), - h = a.redSqr().redISub(s).redISub(s); - t = h; - var u = o.redIAdd(o); - (u = (u = u.redIAdd(u)).redIAdd(u)), (e = a.redMul(s.redISub(h)).redISub(u)), (r = this.y.redAdd(this.y)); - } else { - var f = this.z.redSqr(), - c = this.y.redSqr(), - l = this.x.redMul(c), - d = this.x.redSub(f).redMul(this.x.redAdd(f)); - d = d.redAdd(d).redIAdd(d); - var p = l.redIAdd(l), - m = (p = p.redIAdd(p)).redAdd(p); - (t = d.redSqr().redISub(m)), (r = this.y.redAdd(this.z).redSqr().redISub(c).redISub(f)); - var g = c.redSqr(); - (g = (g = (g = g.redIAdd(g)).redIAdd(g)).redIAdd(g)), (e = d.redMul(p.redISub(t)).redISub(g)); - } - return this.curve.jpoint(t, e, r); - }), - (f.prototype._dbl = function () { - var t = this.curve.a, - e = this.x, - r = this.y, - i = this.z, - n = i.redSqr().redSqr(), - o = e.redSqr(), - s = r.redSqr(), - a = o.redAdd(o).redIAdd(o).redIAdd(t.redMul(n)), - h = e.redAdd(e), - u = (h = h.redIAdd(h)).redMul(s), - f = a.redSqr().redISub(u.redAdd(u)), - c = u.redISub(f), - l = s.redSqr(); - l = (l = (l = l.redIAdd(l)).redIAdd(l)).redIAdd(l); - var d = a.redMul(c).redISub(l), - p = r.redAdd(r).redMul(i); - return this.curve.jpoint(f, d, p); - }), - (f.prototype.trpl = function () { - if (!this.curve.zeroA) return this.dbl().add(this); - var t = this.x.redSqr(), - e = this.y.redSqr(), - r = this.z.redSqr(), - i = e.redSqr(), - n = t.redAdd(t).redIAdd(t), - o = n.redSqr(), - s = this.x.redAdd(e).redSqr().redISub(t).redISub(i), - a = (s = (s = (s = s.redIAdd(s)).redAdd(s).redIAdd(s)).redISub(o)).redSqr(), - h = i.redIAdd(i); - h = (h = (h = h.redIAdd(h)).redIAdd(h)).redIAdd(h); - var u = n.redIAdd(s).redSqr().redISub(o).redISub(a).redISub(h), - f = e.redMul(u); - f = (f = f.redIAdd(f)).redIAdd(f); - var c = this.x.redMul(a).redISub(f); - c = (c = c.redIAdd(c)).redIAdd(c); - var l = this.y.redMul(u.redMul(h.redISub(u)).redISub(s.redMul(a))); - l = (l = (l = l.redIAdd(l)).redIAdd(l)).redIAdd(l); - var d = this.z.redAdd(s).redSqr().redISub(r).redISub(a); - return this.curve.jpoint(c, l, d); - }), - (f.prototype.mul = function (t, e) { - return (t = new n(t, e)), this.curve._wnafMul(this, t); - }), - (f.prototype.eq = function (t) { - if ('affine' === t.type) return this.eq(t.toJ()); - if (this === t) return !0; - var e = this.z.redSqr(), - r = t.z.redSqr(); - if (0 !== this.x.redMul(r).redISub(t.x.redMul(e)).cmpn(0)) return !1; - var i = e.redMul(this.z), - n = r.redMul(t.z); - return 0 === this.y.redMul(n).redISub(t.y.redMul(i)).cmpn(0); - }), - (f.prototype.eqXToP = function (t) { - var e = this.z.redSqr(), - r = t.toRed(this.curve.red).redMul(e); - if (0 === this.x.cmp(r)) return !0; - for (var i = t.clone(), n = this.curve.redN.redMul(e); ; ) { - if ((i.iadd(this.curve.n), i.cmp(this.curve.p) >= 0)) return !1; - if ((r.redIAdd(n), 0 === this.x.cmp(r))) return !0; - } - }), - (f.prototype.inspect = function () { - return this.isInfinity() - ? '' - : ''; - }), - (f.prototype.isInfinity = function () { - return 0 === this.z.cmpn(0); - }); - }, - 1044: (t, e, r) => { - 'use strict'; - var i, - n = e, - o = r(5294), - s = r(1530), - a = r(3369).assert; - function h(t) { - 'short' === t.type - ? (this.curve = new s.short(t)) - : 'edwards' === t.type - ? (this.curve = new s.edwards(t)) - : (this.curve = new s.mont(t)), - (this.g = this.curve.g), - (this.n = this.curve.n), - (this.hash = t.hash), - a(this.g.validate(), 'Invalid curve'), - a(this.g.mul(this.n).isInfinity(), 'Invalid curve, G*N != O'); - } - function u(t, e) { - Object.defineProperty(n, t, { - configurable: !0, - enumerable: !0, - get: function () { - var r = new h(e); - return Object.defineProperty(n, t, { configurable: !0, enumerable: !0, value: r }), r; - }, - }); - } - (n.PresetCurve = h), - u('p192', { - type: 'short', - prime: 'p192', - p: 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff', - a: 'ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc', - b: '64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1', - n: 'ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831', - hash: o.sha256, - gRed: !1, - g: ['188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012', '07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811'], - }), - u('p224', { - type: 'short', - prime: 'p224', - p: 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001', - a: 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe', - b: 'b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4', - n: 'ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d', - hash: o.sha256, - gRed: !1, - g: [ - 'b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21', - 'bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34', - ], - }), - u('p256', { - type: 'short', - prime: null, - p: 'ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff', - a: 'ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc', - b: '5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b', - n: 'ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551', - hash: o.sha256, - gRed: !1, - g: [ - '6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296', - '4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5', - ], - }), - u('p384', { - type: 'short', - prime: null, - p: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff', - a: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc', - b: 'b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef', - n: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973', - hash: o.sha384, - gRed: !1, - g: [ - 'aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7', - '3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f', - ], - }), - u('p521', { - type: 'short', - prime: null, - p: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff', - a: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc', - b: '00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00', - n: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409', - hash: o.sha512, - gRed: !1, - g: [ - '000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66', - '00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650', - ], - }), - u('curve25519', { - type: 'mont', - prime: 'p25519', - p: '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed', - a: '76d06', - b: '1', - n: '1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed', - hash: o.sha256, - gRed: !1, - g: ['9'], - }), - u('ed25519', { - type: 'edwards', - prime: 'p25519', - p: '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed', - a: '-1', - c: '1', - d: '52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3', - n: '1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed', - hash: o.sha256, - gRed: !1, - g: [ - '216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a', - '6666666666666666666666666666666666666666666666666666666666666658', - ], - }); - try { - i = r(8719); - } catch (t) { - i = void 0; - } - u('secp256k1', { - type: 'short', - prime: 'k256', - p: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f', - a: '0', - b: '7', - n: 'ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141', - h: '1', - hash: o.sha256, - beta: '7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee', - lambda: '5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72', - basis: [ - { a: '3086d221a7d46bcde86c90e49284eb15', b: '-e4437ed6010e88286f547fa90abfe4c3' }, - { a: '114ca50f7a8e2f3f657c1108d9d44cfd8', b: '3086d221a7d46bcde86c90e49284eb15' }, - ], - gRed: !1, - g: [ - '79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798', - '483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8', - i, - ], - }); - }, - 2263: (t, e, r) => { - 'use strict'; - var i = r(6083), - n = r(6513), - o = r(3369), - s = r(1044), - a = r(9154), - h = o.assert, - u = r(4093), - f = r(9758); - function c(t) { - if (!(this instanceof c)) return new c(t); - 'string' == typeof t && (h(Object.prototype.hasOwnProperty.call(s, t), 'Unknown curve ' + t), (t = s[t])), - t instanceof s.PresetCurve && (t = { curve: t }), - (this.curve = t.curve.curve), - (this.n = this.curve.n), - (this.nh = this.n.ushrn(1)), - (this.g = this.curve.g), - (this.g = t.curve.g), - this.g.precompute(t.curve.n.bitLength() + 1), - (this.hash = t.hash || t.curve.hash); - } - (t.exports = c), - (c.prototype.keyPair = function (t) { - return new u(this, t); - }), - (c.prototype.keyFromPrivate = function (t, e) { - return u.fromPrivate(this, t, e); - }), - (c.prototype.keyFromPublic = function (t, e) { - return u.fromPublic(this, t, e); - }), - (c.prototype.genKeyPair = function (t) { - t || (t = {}); - for ( - var e = new n({ - hash: this.hash, - pers: t.pers, - persEnc: t.persEnc || 'utf8', - entropy: t.entropy || a(this.hash.hmacStrength), - entropyEnc: (t.entropy && t.entropyEnc) || 'utf8', - nonce: this.n.toArray(), - }), - r = this.n.byteLength(), - o = this.n.sub(new i(2)); - ; - - ) { - var s = new i(e.generate(r)); - if (!(s.cmp(o) > 0)) return s.iaddn(1), this.keyFromPrivate(s); - } - }), - (c.prototype._truncateToN = function (t, e) { - var r = 8 * t.byteLength() - this.n.bitLength(); - return r > 0 && (t = t.ushrn(r)), !e && t.cmp(this.n) >= 0 ? t.sub(this.n) : t; - }), - (c.prototype.sign = function (t, e, r, o) { - 'object' == typeof r && ((o = r), (r = null)), - o || (o = {}), - (e = this.keyFromPrivate(e, r)), - (t = this._truncateToN(new i(t, 16))); - for ( - var s = this.n.byteLength(), - a = e.getPrivate().toArray('be', s), - h = t.toArray('be', s), - u = new n({ hash: this.hash, entropy: a, nonce: h, pers: o.pers, persEnc: o.persEnc || 'utf8' }), - c = this.n.sub(new i(1)), - l = 0; - ; - l++ - ) { - var d = o.k ? o.k(l) : new i(u.generate(this.n.byteLength())); - if (!((d = this._truncateToN(d, !0)).cmpn(1) <= 0 || d.cmp(c) >= 0)) { - var p = this.g.mul(d); - if (!p.isInfinity()) { - var m = p.getX(), - g = m.umod(this.n); - if (0 !== g.cmpn(0)) { - var b = d.invm(this.n).mul(g.mul(e.getPrivate()).iadd(t)); - if (0 !== (b = b.umod(this.n)).cmpn(0)) { - var y = (p.getY().isOdd() ? 1 : 0) | (0 !== m.cmp(g) ? 2 : 0); - return o.canonical && b.cmp(this.nh) > 0 && ((b = this.n.sub(b)), (y ^= 1)), new f({ r: g, s: b, recoveryParam: y }); - } - } - } - } - } - }), - (c.prototype.verify = function (t, e, r, n) { - (t = this._truncateToN(new i(t, 16))), (r = this.keyFromPublic(r, n)); - var o = (e = new f(e, 'hex')).r, - s = e.s; - if (o.cmpn(1) < 0 || o.cmp(this.n) >= 0) return !1; - if (s.cmpn(1) < 0 || s.cmp(this.n) >= 0) return !1; - var a, - h = s.invm(this.n), - u = h.mul(t).umod(this.n), - c = h.mul(o).umod(this.n); - return this.curve._maxwellTrick - ? !(a = this.g.jmulAdd(u, r.getPublic(), c)).isInfinity() && a.eqXToP(o) - : !(a = this.g.mulAdd(u, r.getPublic(), c)).isInfinity() && 0 === a.getX().umod(this.n).cmp(o); - }), - (c.prototype.recoverPubKey = function (t, e, r, n) { - h((3 & r) === r, 'The recovery param is more than two bits'), (e = new f(e, n)); - var o = this.n, - s = new i(t), - a = e.r, - u = e.s, - c = 1 & r, - l = r >> 1; - if (a.cmp(this.curve.p.umod(this.curve.n)) >= 0 && l) throw new Error('Unable to find sencond key candinate'); - a = l ? this.curve.pointFromX(a.add(this.curve.n), c) : this.curve.pointFromX(a, c); - var d = e.r.invm(o), - p = o.sub(s).mul(d).umod(o), - m = u.mul(d).umod(o); - return this.g.mulAdd(p, a, m); - }), - (c.prototype.getKeyRecoveryParam = function (t, e, r, i) { - if (null !== (e = new f(e, i)).recoveryParam) return e.recoveryParam; - for (var n = 0; n < 4; n++) { - var o; - try { - o = this.recoverPubKey(t, e, n); - } catch (t) { - continue; - } - if (o.eq(r)) return n; - } - throw new Error('Unable to find valid recovery factor'); - }); - }, - 4093: (t, e, r) => { - 'use strict'; - var i = r(6083), - n = r(3369).assert; - function o(t, e) { - (this.ec = t), - (this.priv = null), - (this.pub = null), - e.priv && this._importPrivate(e.priv, e.privEnc), - e.pub && this._importPublic(e.pub, e.pubEnc); - } - (t.exports = o), - (o.fromPublic = function (t, e, r) { - return e instanceof o ? e : new o(t, { pub: e, pubEnc: r }); - }), - (o.fromPrivate = function (t, e, r) { - return e instanceof o ? e : new o(t, { priv: e, privEnc: r }); - }), - (o.prototype.validate = function () { - var t = this.getPublic(); - return t.isInfinity() - ? { result: !1, reason: 'Invalid public key' } - : t.validate() - ? t.mul(this.ec.curve.n).isInfinity() - ? { result: !0, reason: null } - : { result: !1, reason: 'Public key * N != O' } - : { result: !1, reason: 'Public key is not a point' }; - }), - (o.prototype.getPublic = function (t, e) { - return ( - 'string' == typeof t && ((e = t), (t = null)), - this.pub || (this.pub = this.ec.g.mul(this.priv)), - e ? this.pub.encode(e, t) : this.pub - ); - }), - (o.prototype.getPrivate = function (t) { - return 'hex' === t ? this.priv.toString(16, 2) : this.priv; - }), - (o.prototype._importPrivate = function (t, e) { - (this.priv = new i(t, e || 16)), (this.priv = this.priv.umod(this.ec.curve.n)); - }), - (o.prototype._importPublic = function (t, e) { - if (t.x || t.y) - return ( - 'mont' === this.ec.curve.type - ? n(t.x, 'Need x coordinate') - : ('short' !== this.ec.curve.type && 'edwards' !== this.ec.curve.type) || n(t.x && t.y, 'Need both x and y coordinate'), - void (this.pub = this.ec.curve.point(t.x, t.y)) - ); - this.pub = this.ec.curve.decodePoint(t, e); - }), - (o.prototype.derive = function (t) { - return t.validate() || n(t.validate(), 'public point not validated'), t.mul(this.priv).getX(); - }), - (o.prototype.sign = function (t, e, r) { - return this.ec.sign(t, this, e, r); - }), - (o.prototype.verify = function (t, e) { - return this.ec.verify(t, e, this); - }), - (o.prototype.inspect = function () { - return ''; - }); - }, - 9758: (t, e, r) => { - 'use strict'; - var i = r(6083), - n = r(3369), - o = n.assert; - function s(t, e) { - if (t instanceof s) return t; - this._importDER(t, e) || - (o(t.r && t.s, 'Signature without r or s'), - (this.r = new i(t.r, 16)), - (this.s = new i(t.s, 16)), - void 0 === t.recoveryParam ? (this.recoveryParam = null) : (this.recoveryParam = t.recoveryParam)); - } - function a() { - this.place = 0; - } - function h(t, e) { - var r = t[e.place++]; - if (!(128 & r)) return r; - var i = 15 & r; - if (0 === i || i > 4) return !1; - for (var n = 0, o = 0, s = e.place; o < i; o++, s++) (n <<= 8), (n |= t[s]), (n >>>= 0); - return !(n <= 127) && ((e.place = s), n); - } - function u(t) { - for (var e = 0, r = t.length - 1; !t[e] && !(128 & t[e + 1]) && e < r; ) e++; - return 0 === e ? t : t.slice(e); - } - function f(t, e) { - if (e < 128) t.push(e); - else { - var r = 1 + ((Math.log(e) / Math.LN2) >>> 3); - for (t.push(128 | r); --r; ) t.push((e >>> (r << 3)) & 255); - t.push(e); - } - } - (t.exports = s), - (s.prototype._importDER = function (t, e) { - t = n.toArray(t, e); - var r = new a(); - if (48 !== t[r.place++]) return !1; - var o = h(t, r); - if (!1 === o) return !1; - if (o + r.place !== t.length) return !1; - if (2 !== t[r.place++]) return !1; - var s = h(t, r); - if (!1 === s) return !1; - var u = t.slice(r.place, s + r.place); - if (((r.place += s), 2 !== t[r.place++])) return !1; - var f = h(t, r); - if (!1 === f) return !1; - if (t.length !== f + r.place) return !1; - var c = t.slice(r.place, f + r.place); - if (0 === u[0]) { - if (!(128 & u[1])) return !1; - u = u.slice(1); - } - if (0 === c[0]) { - if (!(128 & c[1])) return !1; - c = c.slice(1); - } - return (this.r = new i(u)), (this.s = new i(c)), (this.recoveryParam = null), !0; - }), - (s.prototype.toDER = function (t) { - var e = this.r.toArray(), - r = this.s.toArray(); - for (128 & e[0] && (e = [0].concat(e)), 128 & r[0] && (r = [0].concat(r)), e = u(e), r = u(r); !(r[0] || 128 & r[1]); ) - r = r.slice(1); - var i = [2]; - f(i, e.length), (i = i.concat(e)).push(2), f(i, r.length); - var o = i.concat(r), - s = [48]; - return f(s, o.length), (s = s.concat(o)), n.encode(s, t); - }); - }, - 1680: (t, e, r) => { - 'use strict'; - var i = r(5294), - n = r(1044), - o = r(3369), - s = o.assert, - a = o.parseBytes, - h = r(6699), - u = r(4396); - function f(t) { - if ((s('ed25519' === t, 'only tested with ed25519 so far'), !(this instanceof f))) return new f(t); - (t = n[t].curve), - (this.curve = t), - (this.g = t.g), - this.g.precompute(t.n.bitLength() + 1), - (this.pointClass = t.point().constructor), - (this.encodingLength = Math.ceil(t.n.bitLength() / 8)), - (this.hash = i.sha512); - } - (t.exports = f), - (f.prototype.sign = function (t, e) { - t = a(t); - var r = this.keyFromSecret(e), - i = this.hashInt(r.messagePrefix(), t), - n = this.g.mul(i), - o = this.encodePoint(n), - s = this.hashInt(o, r.pubBytes(), t).mul(r.priv()), - h = i.add(s).umod(this.curve.n); - return this.makeSignature({ R: n, S: h, Rencoded: o }); - }), - (f.prototype.verify = function (t, e, r) { - (t = a(t)), (e = this.makeSignature(e)); - var i = this.keyFromPublic(r), - n = this.hashInt(e.Rencoded(), i.pubBytes(), t), - o = this.g.mul(e.S()); - return e.R().add(i.pub().mul(n)).eq(o); - }), - (f.prototype.hashInt = function () { - for (var t = this.hash(), e = 0; e < arguments.length; e++) t.update(arguments[e]); - return o.intFromLE(t.digest()).umod(this.curve.n); - }), - (f.prototype.keyFromPublic = function (t) { - return h.fromPublic(this, t); - }), - (f.prototype.keyFromSecret = function (t) { - return h.fromSecret(this, t); - }), - (f.prototype.makeSignature = function (t) { - return t instanceof u ? t : new u(this, t); - }), - (f.prototype.encodePoint = function (t) { - var e = t.getY().toArray('le', this.encodingLength); - return (e[this.encodingLength - 1] |= t.getX().isOdd() ? 128 : 0), e; - }), - (f.prototype.decodePoint = function (t) { - var e = (t = o.parseBytes(t)).length - 1, - r = t.slice(0, e).concat(-129 & t[e]), - i = 0 != (128 & t[e]), - n = o.intFromLE(r); - return this.curve.pointFromY(n, i); - }), - (f.prototype.encodeInt = function (t) { - return t.toArray('le', this.encodingLength); - }), - (f.prototype.decodeInt = function (t) { - return o.intFromLE(t); - }), - (f.prototype.isPoint = function (t) { - return t instanceof this.pointClass; - }); - }, - 6699: (t, e, r) => { - 'use strict'; - var i = r(3369), - n = i.assert, - o = i.parseBytes, - s = i.cachedProperty; - function a(t, e) { - (this.eddsa = t), (this._secret = o(e.secret)), t.isPoint(e.pub) ? (this._pub = e.pub) : (this._pubBytes = o(e.pub)); - } - (a.fromPublic = function (t, e) { - return e instanceof a ? e : new a(t, { pub: e }); - }), - (a.fromSecret = function (t, e) { - return e instanceof a ? e : new a(t, { secret: e }); - }), - (a.prototype.secret = function () { - return this._secret; - }), - s(a, 'pubBytes', function () { - return this.eddsa.encodePoint(this.pub()); - }), - s(a, 'pub', function () { - return this._pubBytes ? this.eddsa.decodePoint(this._pubBytes) : this.eddsa.g.mul(this.priv()); - }), - s(a, 'privBytes', function () { - var t = this.eddsa, - e = this.hash(), - r = t.encodingLength - 1, - i = e.slice(0, t.encodingLength); - return (i[0] &= 248), (i[r] &= 127), (i[r] |= 64), i; - }), - s(a, 'priv', function () { - return this.eddsa.decodeInt(this.privBytes()); - }), - s(a, 'hash', function () { - return this.eddsa.hash().update(this.secret()).digest(); - }), - s(a, 'messagePrefix', function () { - return this.hash().slice(this.eddsa.encodingLength); - }), - (a.prototype.sign = function (t) { - return n(this._secret, 'KeyPair can only verify'), this.eddsa.sign(t, this); - }), - (a.prototype.verify = function (t, e) { - return this.eddsa.verify(t, e, this); - }), - (a.prototype.getSecret = function (t) { - return n(this._secret, 'KeyPair is public only'), i.encode(this.secret(), t); - }), - (a.prototype.getPublic = function (t) { - return i.encode(this.pubBytes(), t); - }), - (t.exports = a); - }, - 4396: (t, e, r) => { - 'use strict'; - var i = r(6083), - n = r(3369), - o = n.assert, - s = n.cachedProperty, - a = n.parseBytes; - function h(t, e) { - (this.eddsa = t), - 'object' != typeof e && (e = a(e)), - Array.isArray(e) && (e = { R: e.slice(0, t.encodingLength), S: e.slice(t.encodingLength) }), - o(e.R && e.S, 'Signature without R or S'), - t.isPoint(e.R) && (this._R = e.R), - e.S instanceof i && (this._S = e.S), - (this._Rencoded = Array.isArray(e.R) ? e.R : e.Rencoded), - (this._Sencoded = Array.isArray(e.S) ? e.S : e.Sencoded); - } - s(h, 'S', function () { - return this.eddsa.decodeInt(this.Sencoded()); - }), - s(h, 'R', function () { - return this.eddsa.decodePoint(this.Rencoded()); - }), - s(h, 'Rencoded', function () { - return this.eddsa.encodePoint(this.R()); - }), - s(h, 'Sencoded', function () { - return this.eddsa.encodeInt(this.S()); - }), - (h.prototype.toBytes = function () { - return this.Rencoded().concat(this.Sencoded()); - }), - (h.prototype.toHex = function () { - return n.encode(this.toBytes(), 'hex').toUpperCase(); - }), - (t.exports = h); - }, - 8719: t => { - t.exports = { - doubles: { - step: 4, - points: [ - [ - 'e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a', - 'f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821', - ], - [ - '8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508', - '11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf', - ], - [ - '175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739', - 'd3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695', - ], - [ - '363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640', - '4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9', - ], - [ - '8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c', - '4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36', - ], - [ - '723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda', - '96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f', - ], - [ - 'eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa', - '5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999', - ], - [ - '100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0', - 'cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09', - ], - [ - 'e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d', - '9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d', - ], - [ - 'feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d', - 'e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088', - ], - [ - 'da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1', - '9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d', - ], - [ - '53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0', - '5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8', - ], - [ - '8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047', - '10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a', - ], - [ - '385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862', - '283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453', - ], - [ - '6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7', - '7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160', - ], - [ - '3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd', - '56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0', - ], - [ - '85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83', - '7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6', - ], - [ - '948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a', - '53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589', - ], - [ - '6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8', - 'bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17', - ], - [ - 'e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d', - '4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda', - ], - [ - 'e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725', - '7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd', - ], - [ - '213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754', - '4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2', - ], - [ - '4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c', - '17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6', - ], - [ - 'fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6', - '6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f', - ], - [ - '76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39', - 'c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01', - ], - [ - 'c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891', - '893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3', - ], - [ - 'd895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b', - 'febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f', - ], - [ - 'b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03', - '2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7', - ], - [ - 'e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d', - 'eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78', - ], - [ - 'a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070', - '7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1', - ], - [ - '90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4', - 'e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150', - ], - [ - '8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da', - '662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82', - ], - [ - 'e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11', - '1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc', - ], - [ - '8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e', - 'efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b', - ], - [ - 'e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41', - '2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51', - ], - [ - 'b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef', - '67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45', - ], - [ - 'd68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8', - 'db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120', - ], - [ - '324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d', - '648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84', - ], - [ - '4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96', - '35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d', - ], - [ - '9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd', - 'ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d', - ], - [ - '6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5', - '9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8', - ], - [ - 'a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266', - '40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8', - ], - [ - '7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71', - '34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac', - ], - [ - '928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac', - 'c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f', - ], - [ - '85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751', - '1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962', - ], - [ - 'ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e', - '493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907', - ], - [ - '827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241', - 'c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec', - ], - [ - 'eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3', - 'be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d', - ], - [ - 'e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f', - '4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414', - ], - [ - '1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19', - 'aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd', - ], - [ - '146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be', - 'b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0', - ], - [ - 'fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9', - '6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811', - ], - [ - 'da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2', - '8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1', - ], - [ - 'a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13', - '7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c', - ], - [ - '174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c', - 'ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73', - ], - [ - '959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba', - '2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd', - ], - [ - 'd2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151', - 'e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405', - ], - [ - '64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073', - 'd99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589', - ], - [ - '8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458', - '38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e', - ], - [ - '13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b', - '69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27', - ], - [ - 'bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366', - 'd3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1', - ], - [ - '8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa', - '40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482', - ], - [ - '8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0', - '620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945', - ], - [ - 'dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787', - '7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573', - ], - [ - 'f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e', - 'ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82', - ], - ], - }, - naf: { - wnd: 7, - points: [ - [ - 'f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9', - '388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672', - ], - [ - '2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4', - 'd8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6', - ], - [ - '5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc', - '6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da', - ], - [ - 'acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe', - 'cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37', - ], - [ - '774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb', - 'd984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b', - ], - [ - 'f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8', - 'ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81', - ], - [ - 'd7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e', - '581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58', - ], - [ - 'defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34', - '4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77', - ], - [ - '2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c', - '85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a', - ], - [ - '352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5', - '321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c', - ], - [ - '2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f', - '2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67', - ], - [ - '9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714', - '73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402', - ], - [ - 'daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729', - 'a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55', - ], - [ - 'c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db', - '2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482', - ], - [ - '6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4', - 'e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82', - ], - [ - '1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5', - 'b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396', - ], - [ - '605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479', - '2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49', - ], - [ - '62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d', - '80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf', - ], - [ - '80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f', - '1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a', - ], - [ - '7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb', - 'd0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7', - ], - [ - 'd528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9', - 'eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933', - ], - [ - '49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963', - '758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a', - ], - [ - '77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74', - '958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6', - ], - [ - 'f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530', - 'e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37', - ], - [ - '463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b', - '5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e', - ], - [ - 'f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247', - 'cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6', - ], - [ - 'caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1', - 'cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476', - ], - [ - '2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120', - '4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40', - ], - [ - '7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435', - '91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61', - ], - [ - '754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18', - '673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683', - ], - [ - 'e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8', - '59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5', - ], - [ - '186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb', - '3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b', - ], - [ - 'df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f', - '55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417', - ], - [ - '5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143', - 'efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868', - ], - [ - '290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba', - 'e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a', - ], - [ - 'af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45', - 'f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6', - ], - [ - '766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a', - '744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996', - ], - [ - '59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e', - 'c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e', - ], - [ - 'f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8', - 'e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d', - ], - [ - '7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c', - '30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2', - ], - [ - '948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519', - 'e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e', - ], - [ - '7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab', - '100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437', - ], - [ - '3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca', - 'ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311', - ], - [ - 'd3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf', - '8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4', - ], - [ - '1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610', - '68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575', - ], - [ - '733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4', - 'f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d', - ], - [ - '15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c', - 'd56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d', - ], - [ - 'a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940', - 'edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629', - ], - [ - 'e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980', - 'a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06', - ], - [ - '311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3', - '66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374', - ], - [ - '34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf', - '9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee', - ], - [ - 'f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63', - '4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1', - ], - [ - 'd7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448', - 'fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b', - ], - [ - '32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf', - '5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661', - ], - [ - '7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5', - '8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6', - ], - [ - 'ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6', - '8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e', - ], - [ - '16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5', - '5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d', - ], - [ - 'eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99', - 'f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc', - ], - [ - '78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51', - 'f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4', - ], - [ - '494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5', - '42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c', - ], - [ - 'a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5', - '204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b', - ], - [ - 'c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997', - '4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913', - ], - [ - '841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881', - '73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154', - ], - [ - '5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5', - '39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865', - ], - [ - '36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66', - 'd2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc', - ], - [ - '336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726', - 'ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224', - ], - [ - '8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede', - '6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e', - ], - [ - '1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94', - '60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6', - ], - [ - '85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31', - '3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511', - ], - [ - '29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51', - 'b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b', - ], - [ - 'a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252', - 'ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2', - ], - [ - '4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5', - 'cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c', - ], - [ - 'd24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b', - '6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3', - ], - [ - 'ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4', - '322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d', - ], - [ - 'af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f', - '6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700', - ], - [ - 'e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889', - '2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4', - ], - [ - '591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246', - 'b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196', - ], - [ - '11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984', - '998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4', - ], - [ - '3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a', - 'b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257', - ], - [ - 'cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030', - 'bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13', - ], - [ - 'c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197', - '6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096', - ], - [ - 'c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593', - 'c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38', - ], - [ - 'a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef', - '21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f', - ], - [ - '347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38', - '60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448', - ], - [ - 'da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a', - '49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a', - ], - [ - 'c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111', - '5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4', - ], - [ - '4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502', - '7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437', - ], - [ - '3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea', - 'be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7', - ], - [ - 'cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26', - '8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d', - ], - [ - 'b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986', - '39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a', - ], - [ - 'd4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e', - '62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54', - ], - [ - '48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4', - '25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77', - ], - [ - 'dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda', - 'ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517', - ], - [ - '6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859', - 'cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10', - ], - [ - 'e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f', - 'f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125', - ], - [ - 'eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c', - '6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e', - ], - [ - '13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942', - 'fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1', - ], - [ - 'ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a', - '1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2', - ], - [ - 'b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80', - '5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423', - ], - [ - 'ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d', - '438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8', - ], - [ - '8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1', - 'cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758', - ], - [ - '52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63', - 'c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375', - ], - [ - 'e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352', - '6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d', - ], - [ - '7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193', - 'ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec', - ], - [ - '5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00', - '9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0', - ], - [ - '32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58', - 'ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c', - ], - [ - 'e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7', - 'd3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4', - ], - [ - '8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8', - 'c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f', - ], - [ - '4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e', - '67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649', - ], - [ - '3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d', - 'cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826', - ], - [ - '674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b', - '299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5', - ], - [ - 'd32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f', - 'f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87', - ], - [ - '30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6', - '462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b', - ], - [ - 'be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297', - '62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc', - ], - [ - '93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a', - '7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c', - ], - [ - 'b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c', - 'ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f', - ], - [ - 'd5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52', - '4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a', - ], - [ - 'd3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb', - 'bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46', - ], - [ - '463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065', - 'bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f', - ], - [ - '7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917', - '603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03', - ], - [ - '74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9', - 'cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08', - ], - [ - '30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3', - '553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8', - ], - [ - '9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57', - '712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373', - ], - [ - '176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66', - 'ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3', - ], - [ - '75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8', - '9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8', - ], - [ - '809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721', - '9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1', - ], - [ - '1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180', - '4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9', - ], - ], - }, - }; - }, - 3369: (t, e, r) => { - 'use strict'; - var i = e, - n = r(6083), - o = r(7859), - s = r(2910); - (i.assert = o), - (i.toArray = s.toArray), - (i.zero2 = s.zero2), - (i.toHex = s.toHex), - (i.encode = s.encode), - (i.getNAF = function (t, e, r) { - var i = new Array(Math.max(t.bitLength(), r) + 1); - i.fill(0); - for (var n = 1 << (e + 1), o = t.clone(), s = 0; s < i.length; s++) { - var a, - h = o.andln(n - 1); - o.isOdd() ? ((a = h > (n >> 1) - 1 ? (n >> 1) - h : h), o.isubn(a)) : (a = 0), (i[s] = a), o.iushrn(1); - } - return i; - }), - (i.getJSF = function (t, e) { - var r = [[], []]; - (t = t.clone()), (e = e.clone()); - for (var i, n = 0, o = 0; t.cmpn(-n) > 0 || e.cmpn(-o) > 0; ) { - var s, - a, - h = (t.andln(3) + n) & 3, - u = (e.andln(3) + o) & 3; - 3 === h && (h = -1), - 3 === u && (u = -1), - (s = 0 == (1 & h) ? 0 : (3 != (i = (t.andln(7) + n) & 7) && 5 !== i) || 2 !== u ? h : -h), - r[0].push(s), - (a = 0 == (1 & u) ? 0 : (3 != (i = (e.andln(7) + o) & 7) && 5 !== i) || 2 !== h ? u : -u), - r[1].push(a), - 2 * n === s + 1 && (n = 1 - n), - 2 * o === a + 1 && (o = 1 - o), - t.iushrn(1), - e.iushrn(1); - } - return r; - }), - (i.cachedProperty = function (t, e, r) { - var i = '_' + e; - t.prototype[e] = function () { - return void 0 !== this[i] ? this[i] : (this[i] = r.call(this)); - }; - }), - (i.parseBytes = function (t) { - return 'string' == typeof t ? i.toArray(t, 'hex') : t; - }), - (i.intFromLE = function (t) { - return new n(t, 'hex', 'le'); - }); - }, - 6083: function (t, e, r) { - !(function (t, e) { - 'use strict'; - function i(t, e) { - if (!t) throw new Error(e || 'Assertion failed'); - } - function n(t, e) { - t.super_ = e; - var r = function () {}; - (r.prototype = e.prototype), (t.prototype = new r()), (t.prototype.constructor = t); - } - function o(t, e, r) { - if (o.isBN(t)) return t; - (this.negative = 0), - (this.words = null), - (this.length = 0), - (this.red = null), - null !== t && (('le' !== e && 'be' !== e) || ((r = e), (e = 10)), this._init(t || 0, e || 10, r || 'be')); - } - var s; - 'object' == typeof t ? (t.exports = o) : (e.BN = o), (o.BN = o), (o.wordSize = 26); - try { - s = 'undefined' != typeof window && void 0 !== window.Buffer ? window.Buffer : r(303).Buffer; - } catch (t) {} - function a(t, e) { - var r = t.charCodeAt(e); - return r >= 65 && r <= 70 ? r - 55 : r >= 97 && r <= 102 ? r - 87 : (r - 48) & 15; - } - function h(t, e, r) { - var i = a(t, r); - return r - 1 >= e && (i |= a(t, r - 1) << 4), i; - } - function u(t, e, r, i) { - for (var n = 0, o = Math.min(t.length, r), s = e; s < o; s++) { - var a = t.charCodeAt(s) - 48; - (n *= i), (n += a >= 49 ? a - 49 + 10 : a >= 17 ? a - 17 + 10 : a); - } - return n; - } - (o.isBN = function (t) { - return ( - t instanceof o || (null !== t && 'object' == typeof t && t.constructor.wordSize === o.wordSize && Array.isArray(t.words)) - ); - }), - (o.max = function (t, e) { - return t.cmp(e) > 0 ? t : e; - }), - (o.min = function (t, e) { - return t.cmp(e) < 0 ? t : e; - }), - (o.prototype._init = function (t, e, r) { - if ('number' == typeof t) return this._initNumber(t, e, r); - if ('object' == typeof t) return this._initArray(t, e, r); - 'hex' === e && (e = 16), i(e === (0 | e) && e >= 2 && e <= 36); - var n = 0; - '-' === (t = t.toString().replace(/\s+/g, ''))[0] && (n++, (this.negative = 1)), - n < t.length && - (16 === e ? this._parseHex(t, n, r) : (this._parseBase(t, e, n), 'le' === r && this._initArray(this.toArray(), e, r))); - }), - (o.prototype._initNumber = function (t, e, r) { - t < 0 && ((this.negative = 1), (t = -t)), - t < 67108864 - ? ((this.words = [67108863 & t]), (this.length = 1)) - : t < 4503599627370496 - ? ((this.words = [67108863 & t, (t / 67108864) & 67108863]), (this.length = 2)) - : (i(t < 9007199254740992), (this.words = [67108863 & t, (t / 67108864) & 67108863, 1]), (this.length = 3)), - 'le' === r && this._initArray(this.toArray(), e, r); - }), - (o.prototype._initArray = function (t, e, r) { - if ((i('number' == typeof t.length), t.length <= 0)) return (this.words = [0]), (this.length = 1), this; - (this.length = Math.ceil(t.length / 3)), (this.words = new Array(this.length)); - for (var n = 0; n < this.length; n++) this.words[n] = 0; - var o, - s, - a = 0; - if ('be' === r) - for (n = t.length - 1, o = 0; n >= 0; n -= 3) - (s = t[n] | (t[n - 1] << 8) | (t[n - 2] << 16)), - (this.words[o] |= (s << a) & 67108863), - (this.words[o + 1] = (s >>> (26 - a)) & 67108863), - (a += 24) >= 26 && ((a -= 26), o++); - else if ('le' === r) - for (n = 0, o = 0; n < t.length; n += 3) - (s = t[n] | (t[n + 1] << 8) | (t[n + 2] << 16)), - (this.words[o] |= (s << a) & 67108863), - (this.words[o + 1] = (s >>> (26 - a)) & 67108863), - (a += 24) >= 26 && ((a -= 26), o++); - return this.strip(); - }), - (o.prototype._parseHex = function (t, e, r) { - (this.length = Math.ceil((t.length - e) / 6)), (this.words = new Array(this.length)); - for (var i = 0; i < this.length; i++) this.words[i] = 0; - var n, - o = 0, - s = 0; - if ('be' === r) - for (i = t.length - 1; i >= e; i -= 2) - (n = h(t, e, i) << o), - (this.words[s] |= 67108863 & n), - o >= 18 ? ((o -= 18), (s += 1), (this.words[s] |= n >>> 26)) : (o += 8); - else - for (i = (t.length - e) % 2 == 0 ? e + 1 : e; i < t.length; i += 2) - (n = h(t, e, i) << o), - (this.words[s] |= 67108863 & n), - o >= 18 ? ((o -= 18), (s += 1), (this.words[s] |= n >>> 26)) : (o += 8); - this.strip(); - }), - (o.prototype._parseBase = function (t, e, r) { - (this.words = [0]), (this.length = 1); - for (var i = 0, n = 1; n <= 67108863; n *= e) i++; - i--, (n = (n / e) | 0); - for (var o = t.length - r, s = o % i, a = Math.min(o, o - s) + r, h = 0, f = r; f < a; f += i) - (h = u(t, f, f + i, e)), this.imuln(n), this.words[0] + h < 67108864 ? (this.words[0] += h) : this._iaddn(h); - if (0 !== s) { - var c = 1; - for (h = u(t, f, t.length, e), f = 0; f < s; f++) c *= e; - this.imuln(c), this.words[0] + h < 67108864 ? (this.words[0] += h) : this._iaddn(h); - } - this.strip(); - }), - (o.prototype.copy = function (t) { - t.words = new Array(this.length); - for (var e = 0; e < this.length; e++) t.words[e] = this.words[e]; - (t.length = this.length), (t.negative = this.negative), (t.red = this.red); - }), - (o.prototype.clone = function () { - var t = new o(null); - return this.copy(t), t; - }), - (o.prototype._expand = function (t) { - for (; this.length < t; ) this.words[this.length++] = 0; - return this; - }), - (o.prototype.strip = function () { - for (; this.length > 1 && 0 === this.words[this.length - 1]; ) this.length--; - return this._normSign(); - }), - (o.prototype._normSign = function () { - return 1 === this.length && 0 === this.words[0] && (this.negative = 0), this; - }), - (o.prototype.inspect = function () { - return (this.red ? ''; - }); - var f = [ - '', - '0', - '00', - '000', - '0000', - '00000', - '000000', - '0000000', - '00000000', - '000000000', - '0000000000', - '00000000000', - '000000000000', - '0000000000000', - '00000000000000', - '000000000000000', - '0000000000000000', - '00000000000000000', - '000000000000000000', - '0000000000000000000', - '00000000000000000000', - '000000000000000000000', - '0000000000000000000000', - '00000000000000000000000', - '000000000000000000000000', - '0000000000000000000000000', - ], - c = [0, 0, 25, 16, 12, 11, 10, 9, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5], - l = [ - 0, 0, 33554432, 43046721, 16777216, 48828125, 60466176, 40353607, 16777216, 43046721, 1e7, 19487171, 35831808, 62748517, - 7529536, 11390625, 16777216, 24137569, 34012224, 47045881, 64e6, 4084101, 5153632, 6436343, 7962624, 9765625, 11881376, - 14348907, 17210368, 20511149, 243e5, 28629151, 33554432, 39135393, 45435424, 52521875, 60466176, - ]; - function d(t, e, r) { - r.negative = e.negative ^ t.negative; - var i = (t.length + e.length) | 0; - (r.length = i), (i = (i - 1) | 0); - var n = 0 | t.words[0], - o = 0 | e.words[0], - s = n * o, - a = 67108863 & s, - h = (s / 67108864) | 0; - r.words[0] = a; - for (var u = 1; u < i; u++) { - for (var f = h >>> 26, c = 67108863 & h, l = Math.min(u, e.length - 1), d = Math.max(0, u - t.length + 1); d <= l; d++) { - var p = (u - d) | 0; - (f += ((s = (n = 0 | t.words[p]) * (o = 0 | e.words[d]) + c) / 67108864) | 0), (c = 67108863 & s); - } - (r.words[u] = 0 | c), (h = 0 | f); - } - return 0 !== h ? (r.words[u] = 0 | h) : r.length--, r.strip(); - } - (o.prototype.toString = function (t, e) { - var r; - if (((e = 0 | e || 1), 16 === (t = t || 10) || 'hex' === t)) { - r = ''; - for (var n = 0, o = 0, s = 0; s < this.length; s++) { - var a = this.words[s], - h = (16777215 & ((a << n) | o)).toString(16); - (r = 0 != (o = (a >>> (24 - n)) & 16777215) || s !== this.length - 1 ? f[6 - h.length] + h + r : h + r), - (n += 2) >= 26 && ((n -= 26), s--); - } - for (0 !== o && (r = o.toString(16) + r); r.length % e != 0; ) r = '0' + r; - return 0 !== this.negative && (r = '-' + r), r; - } - if (t === (0 | t) && t >= 2 && t <= 36) { - var u = c[t], - d = l[t]; - r = ''; - var p = this.clone(); - for (p.negative = 0; !p.isZero(); ) { - var m = p.modn(d).toString(t); - r = (p = p.idivn(d)).isZero() ? m + r : f[u - m.length] + m + r; - } - for (this.isZero() && (r = '0' + r); r.length % e != 0; ) r = '0' + r; - return 0 !== this.negative && (r = '-' + r), r; - } - i(!1, 'Base should be between 2 and 36'); - }), - (o.prototype.toNumber = function () { - var t = this.words[0]; - return ( - 2 === this.length - ? (t += 67108864 * this.words[1]) - : 3 === this.length && 1 === this.words[2] - ? (t += 4503599627370496 + 67108864 * this.words[1]) - : this.length > 2 && i(!1, 'Number can only safely store up to 53 bits'), - 0 !== this.negative ? -t : t - ); - }), - (o.prototype.toJSON = function () { - return this.toString(16); - }), - (o.prototype.toBuffer = function (t, e) { - return i(void 0 !== s), this.toArrayLike(s, t, e); - }), - (o.prototype.toArray = function (t, e) { - return this.toArrayLike(Array, t, e); - }), - (o.prototype.toArrayLike = function (t, e, r) { - var n = this.byteLength(), - o = r || Math.max(1, n); - i(n <= o, 'byte array longer than desired length'), i(o > 0, 'Requested array length <= 0'), this.strip(); - var s, - a, - h = 'le' === e, - u = new t(o), - f = this.clone(); - if (h) { - for (a = 0; !f.isZero(); a++) (s = f.andln(255)), f.iushrn(8), (u[a] = s); - for (; a < o; a++) u[a] = 0; - } else { - for (a = 0; a < o - n; a++) u[a] = 0; - for (a = 0; !f.isZero(); a++) (s = f.andln(255)), f.iushrn(8), (u[o - a - 1] = s); - } - return u; - }), - Math.clz32 - ? (o.prototype._countBits = function (t) { - return 32 - Math.clz32(t); - }) - : (o.prototype._countBits = function (t) { - var e = t, - r = 0; - return ( - e >= 4096 && ((r += 13), (e >>>= 13)), - e >= 64 && ((r += 7), (e >>>= 7)), - e >= 8 && ((r += 4), (e >>>= 4)), - e >= 2 && ((r += 2), (e >>>= 2)), - r + e - ); - }), - (o.prototype._zeroBits = function (t) { - if (0 === t) return 26; - var e = t, - r = 0; - return ( - 0 == (8191 & e) && ((r += 13), (e >>>= 13)), - 0 == (127 & e) && ((r += 7), (e >>>= 7)), - 0 == (15 & e) && ((r += 4), (e >>>= 4)), - 0 == (3 & e) && ((r += 2), (e >>>= 2)), - 0 == (1 & e) && r++, - r - ); - }), - (o.prototype.bitLength = function () { - var t = this.words[this.length - 1], - e = this._countBits(t); - return 26 * (this.length - 1) + e; - }), - (o.prototype.zeroBits = function () { - if (this.isZero()) return 0; - for (var t = 0, e = 0; e < this.length; e++) { - var r = this._zeroBits(this.words[e]); - if (((t += r), 26 !== r)) break; - } - return t; - }), - (o.prototype.byteLength = function () { - return Math.ceil(this.bitLength() / 8); - }), - (o.prototype.toTwos = function (t) { - return 0 !== this.negative ? this.abs().inotn(t).iaddn(1) : this.clone(); - }), - (o.prototype.fromTwos = function (t) { - return this.testn(t - 1) ? this.notn(t).iaddn(1).ineg() : this.clone(); - }), - (o.prototype.isNeg = function () { - return 0 !== this.negative; - }), - (o.prototype.neg = function () { - return this.clone().ineg(); - }), - (o.prototype.ineg = function () { - return this.isZero() || (this.negative ^= 1), this; - }), - (o.prototype.iuor = function (t) { - for (; this.length < t.length; ) this.words[this.length++] = 0; - for (var e = 0; e < t.length; e++) this.words[e] = this.words[e] | t.words[e]; - return this.strip(); - }), - (o.prototype.ior = function (t) { - return i(0 == (this.negative | t.negative)), this.iuor(t); - }), - (o.prototype.or = function (t) { - return this.length > t.length ? this.clone().ior(t) : t.clone().ior(this); - }), - (o.prototype.uor = function (t) { - return this.length > t.length ? this.clone().iuor(t) : t.clone().iuor(this); - }), - (o.prototype.iuand = function (t) { - var e; - e = this.length > t.length ? t : this; - for (var r = 0; r < e.length; r++) this.words[r] = this.words[r] & t.words[r]; - return (this.length = e.length), this.strip(); - }), - (o.prototype.iand = function (t) { - return i(0 == (this.negative | t.negative)), this.iuand(t); - }), - (o.prototype.and = function (t) { - return this.length > t.length ? this.clone().iand(t) : t.clone().iand(this); - }), - (o.prototype.uand = function (t) { - return this.length > t.length ? this.clone().iuand(t) : t.clone().iuand(this); - }), - (o.prototype.iuxor = function (t) { - var e, r; - this.length > t.length ? ((e = this), (r = t)) : ((e = t), (r = this)); - for (var i = 0; i < r.length; i++) this.words[i] = e.words[i] ^ r.words[i]; - if (this !== e) for (; i < e.length; i++) this.words[i] = e.words[i]; - return (this.length = e.length), this.strip(); - }), - (o.prototype.ixor = function (t) { - return i(0 == (this.negative | t.negative)), this.iuxor(t); - }), - (o.prototype.xor = function (t) { - return this.length > t.length ? this.clone().ixor(t) : t.clone().ixor(this); - }), - (o.prototype.uxor = function (t) { - return this.length > t.length ? this.clone().iuxor(t) : t.clone().iuxor(this); - }), - (o.prototype.inotn = function (t) { - i('number' == typeof t && t >= 0); - var e = 0 | Math.ceil(t / 26), - r = t % 26; - this._expand(e), r > 0 && e--; - for (var n = 0; n < e; n++) this.words[n] = 67108863 & ~this.words[n]; - return r > 0 && (this.words[n] = ~this.words[n] & (67108863 >> (26 - r))), this.strip(); - }), - (o.prototype.notn = function (t) { - return this.clone().inotn(t); - }), - (o.prototype.setn = function (t, e) { - i('number' == typeof t && t >= 0); - var r = (t / 26) | 0, - n = t % 26; - return this._expand(r + 1), (this.words[r] = e ? this.words[r] | (1 << n) : this.words[r] & ~(1 << n)), this.strip(); - }), - (o.prototype.iadd = function (t) { - var e, r, i; - if (0 !== this.negative && 0 === t.negative) - return (this.negative = 0), (e = this.isub(t)), (this.negative ^= 1), this._normSign(); - if (0 === this.negative && 0 !== t.negative) return (t.negative = 0), (e = this.isub(t)), (t.negative = 1), e._normSign(); - this.length > t.length ? ((r = this), (i = t)) : ((r = t), (i = this)); - for (var n = 0, o = 0; o < i.length; o++) - (e = (0 | r.words[o]) + (0 | i.words[o]) + n), (this.words[o] = 67108863 & e), (n = e >>> 26); - for (; 0 !== n && o < r.length; o++) (e = (0 | r.words[o]) + n), (this.words[o] = 67108863 & e), (n = e >>> 26); - if (((this.length = r.length), 0 !== n)) (this.words[this.length] = n), this.length++; - else if (r !== this) for (; o < r.length; o++) this.words[o] = r.words[o]; - return this; - }), - (o.prototype.add = function (t) { - var e; - return 0 !== t.negative && 0 === this.negative - ? ((t.negative = 0), (e = this.sub(t)), (t.negative ^= 1), e) - : 0 === t.negative && 0 !== this.negative - ? ((this.negative = 0), (e = t.sub(this)), (this.negative = 1), e) - : this.length > t.length - ? this.clone().iadd(t) - : t.clone().iadd(this); - }), - (o.prototype.isub = function (t) { - if (0 !== t.negative) { - t.negative = 0; - var e = this.iadd(t); - return (t.negative = 1), e._normSign(); - } - if (0 !== this.negative) return (this.negative = 0), this.iadd(t), (this.negative = 1), this._normSign(); - var r, - i, - n = this.cmp(t); - if (0 === n) return (this.negative = 0), (this.length = 1), (this.words[0] = 0), this; - n > 0 ? ((r = this), (i = t)) : ((r = t), (i = this)); - for (var o = 0, s = 0; s < i.length; s++) - (o = (e = (0 | r.words[s]) - (0 | i.words[s]) + o) >> 26), (this.words[s] = 67108863 & e); - for (; 0 !== o && s < r.length; s++) (o = (e = (0 | r.words[s]) + o) >> 26), (this.words[s] = 67108863 & e); - if (0 === o && s < r.length && r !== this) for (; s < r.length; s++) this.words[s] = r.words[s]; - return (this.length = Math.max(this.length, s)), r !== this && (this.negative = 1), this.strip(); - }), - (o.prototype.sub = function (t) { - return this.clone().isub(t); - }); - var p = function (t, e, r) { - var i, - n, - o, - s = t.words, - a = e.words, - h = r.words, - u = 0, - f = 0 | s[0], - c = 8191 & f, - l = f >>> 13, - d = 0 | s[1], - p = 8191 & d, - m = d >>> 13, - g = 0 | s[2], - b = 8191 & g, - y = g >>> 13, - v = 0 | s[3], - w = 8191 & v, - _ = v >>> 13, - M = 0 | s[4], - E = 8191 & M, - S = M >>> 13, - x = 0 | s[5], - A = 8191 & x, - k = x >>> 13, - R = 0 | s[6], - B = 8191 & R, - I = R >>> 13, - T = 0 | s[7], - P = 8191 & T, - O = T >>> 13, - L = 0 | s[8], - C = 8191 & L, - N = L >>> 13, - j = 0 | s[9], - U = 8191 & j, - D = j >>> 13, - z = 0 | a[0], - F = 8191 & z, - q = z >>> 13, - H = 0 | a[1], - $ = 8191 & H, - Z = H >>> 13, - G = 0 | a[2], - V = 8191 & G, - W = G >>> 13, - K = 0 | a[3], - Y = 8191 & K, - J = K >>> 13, - X = 0 | a[4], - Q = 8191 & X, - tt = X >>> 13, - et = 0 | a[5], - rt = 8191 & et, - it = et >>> 13, - nt = 0 | a[6], - ot = 8191 & nt, - st = nt >>> 13, - at = 0 | a[7], - ht = 8191 & at, - ut = at >>> 13, - ft = 0 | a[8], - ct = 8191 & ft, - lt = ft >>> 13, - dt = 0 | a[9], - pt = 8191 & dt, - mt = dt >>> 13; - (r.negative = t.negative ^ e.negative), (r.length = 19); - var gt = (((u + (i = Math.imul(c, F))) | 0) + ((8191 & (n = ((n = Math.imul(c, q)) + Math.imul(l, F)) | 0)) << 13)) | 0; - (u = ((((o = Math.imul(l, q)) + (n >>> 13)) | 0) + (gt >>> 26)) | 0), - (gt &= 67108863), - (i = Math.imul(p, F)), - (n = ((n = Math.imul(p, q)) + Math.imul(m, F)) | 0), - (o = Math.imul(m, q)); - var bt = - (((u + (i = (i + Math.imul(c, $)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, Z)) | 0) + Math.imul(l, $)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, Z)) | 0) + (n >>> 13)) | 0) + (bt >>> 26)) | 0), - (bt &= 67108863), - (i = Math.imul(b, F)), - (n = ((n = Math.imul(b, q)) + Math.imul(y, F)) | 0), - (o = Math.imul(y, q)), - (i = (i + Math.imul(p, $)) | 0), - (n = ((n = (n + Math.imul(p, Z)) | 0) + Math.imul(m, $)) | 0), - (o = (o + Math.imul(m, Z)) | 0); - var yt = - (((u + (i = (i + Math.imul(c, V)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, W)) | 0) + Math.imul(l, V)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, W)) | 0) + (n >>> 13)) | 0) + (yt >>> 26)) | 0), - (yt &= 67108863), - (i = Math.imul(w, F)), - (n = ((n = Math.imul(w, q)) + Math.imul(_, F)) | 0), - (o = Math.imul(_, q)), - (i = (i + Math.imul(b, $)) | 0), - (n = ((n = (n + Math.imul(b, Z)) | 0) + Math.imul(y, $)) | 0), - (o = (o + Math.imul(y, Z)) | 0), - (i = (i + Math.imul(p, V)) | 0), - (n = ((n = (n + Math.imul(p, W)) | 0) + Math.imul(m, V)) | 0), - (o = (o + Math.imul(m, W)) | 0); - var vt = - (((u + (i = (i + Math.imul(c, Y)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, J)) | 0) + Math.imul(l, Y)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, J)) | 0) + (n >>> 13)) | 0) + (vt >>> 26)) | 0), - (vt &= 67108863), - (i = Math.imul(E, F)), - (n = ((n = Math.imul(E, q)) + Math.imul(S, F)) | 0), - (o = Math.imul(S, q)), - (i = (i + Math.imul(w, $)) | 0), - (n = ((n = (n + Math.imul(w, Z)) | 0) + Math.imul(_, $)) | 0), - (o = (o + Math.imul(_, Z)) | 0), - (i = (i + Math.imul(b, V)) | 0), - (n = ((n = (n + Math.imul(b, W)) | 0) + Math.imul(y, V)) | 0), - (o = (o + Math.imul(y, W)) | 0), - (i = (i + Math.imul(p, Y)) | 0), - (n = ((n = (n + Math.imul(p, J)) | 0) + Math.imul(m, Y)) | 0), - (o = (o + Math.imul(m, J)) | 0); - var wt = - (((u + (i = (i + Math.imul(c, Q)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, tt)) | 0) + Math.imul(l, Q)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, tt)) | 0) + (n >>> 13)) | 0) + (wt >>> 26)) | 0), - (wt &= 67108863), - (i = Math.imul(A, F)), - (n = ((n = Math.imul(A, q)) + Math.imul(k, F)) | 0), - (o = Math.imul(k, q)), - (i = (i + Math.imul(E, $)) | 0), - (n = ((n = (n + Math.imul(E, Z)) | 0) + Math.imul(S, $)) | 0), - (o = (o + Math.imul(S, Z)) | 0), - (i = (i + Math.imul(w, V)) | 0), - (n = ((n = (n + Math.imul(w, W)) | 0) + Math.imul(_, V)) | 0), - (o = (o + Math.imul(_, W)) | 0), - (i = (i + Math.imul(b, Y)) | 0), - (n = ((n = (n + Math.imul(b, J)) | 0) + Math.imul(y, Y)) | 0), - (o = (o + Math.imul(y, J)) | 0), - (i = (i + Math.imul(p, Q)) | 0), - (n = ((n = (n + Math.imul(p, tt)) | 0) + Math.imul(m, Q)) | 0), - (o = (o + Math.imul(m, tt)) | 0); - var _t = - (((u + (i = (i + Math.imul(c, rt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, it)) | 0) + Math.imul(l, rt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, it)) | 0) + (n >>> 13)) | 0) + (_t >>> 26)) | 0), - (_t &= 67108863), - (i = Math.imul(B, F)), - (n = ((n = Math.imul(B, q)) + Math.imul(I, F)) | 0), - (o = Math.imul(I, q)), - (i = (i + Math.imul(A, $)) | 0), - (n = ((n = (n + Math.imul(A, Z)) | 0) + Math.imul(k, $)) | 0), - (o = (o + Math.imul(k, Z)) | 0), - (i = (i + Math.imul(E, V)) | 0), - (n = ((n = (n + Math.imul(E, W)) | 0) + Math.imul(S, V)) | 0), - (o = (o + Math.imul(S, W)) | 0), - (i = (i + Math.imul(w, Y)) | 0), - (n = ((n = (n + Math.imul(w, J)) | 0) + Math.imul(_, Y)) | 0), - (o = (o + Math.imul(_, J)) | 0), - (i = (i + Math.imul(b, Q)) | 0), - (n = ((n = (n + Math.imul(b, tt)) | 0) + Math.imul(y, Q)) | 0), - (o = (o + Math.imul(y, tt)) | 0), - (i = (i + Math.imul(p, rt)) | 0), - (n = ((n = (n + Math.imul(p, it)) | 0) + Math.imul(m, rt)) | 0), - (o = (o + Math.imul(m, it)) | 0); - var Mt = - (((u + (i = (i + Math.imul(c, ot)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, st)) | 0) + Math.imul(l, ot)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, st)) | 0) + (n >>> 13)) | 0) + (Mt >>> 26)) | 0), - (Mt &= 67108863), - (i = Math.imul(P, F)), - (n = ((n = Math.imul(P, q)) + Math.imul(O, F)) | 0), - (o = Math.imul(O, q)), - (i = (i + Math.imul(B, $)) | 0), - (n = ((n = (n + Math.imul(B, Z)) | 0) + Math.imul(I, $)) | 0), - (o = (o + Math.imul(I, Z)) | 0), - (i = (i + Math.imul(A, V)) | 0), - (n = ((n = (n + Math.imul(A, W)) | 0) + Math.imul(k, V)) | 0), - (o = (o + Math.imul(k, W)) | 0), - (i = (i + Math.imul(E, Y)) | 0), - (n = ((n = (n + Math.imul(E, J)) | 0) + Math.imul(S, Y)) | 0), - (o = (o + Math.imul(S, J)) | 0), - (i = (i + Math.imul(w, Q)) | 0), - (n = ((n = (n + Math.imul(w, tt)) | 0) + Math.imul(_, Q)) | 0), - (o = (o + Math.imul(_, tt)) | 0), - (i = (i + Math.imul(b, rt)) | 0), - (n = ((n = (n + Math.imul(b, it)) | 0) + Math.imul(y, rt)) | 0), - (o = (o + Math.imul(y, it)) | 0), - (i = (i + Math.imul(p, ot)) | 0), - (n = ((n = (n + Math.imul(p, st)) | 0) + Math.imul(m, ot)) | 0), - (o = (o + Math.imul(m, st)) | 0); - var Et = - (((u + (i = (i + Math.imul(c, ht)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, ut)) | 0) + Math.imul(l, ht)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, ut)) | 0) + (n >>> 13)) | 0) + (Et >>> 26)) | 0), - (Et &= 67108863), - (i = Math.imul(C, F)), - (n = ((n = Math.imul(C, q)) + Math.imul(N, F)) | 0), - (o = Math.imul(N, q)), - (i = (i + Math.imul(P, $)) | 0), - (n = ((n = (n + Math.imul(P, Z)) | 0) + Math.imul(O, $)) | 0), - (o = (o + Math.imul(O, Z)) | 0), - (i = (i + Math.imul(B, V)) | 0), - (n = ((n = (n + Math.imul(B, W)) | 0) + Math.imul(I, V)) | 0), - (o = (o + Math.imul(I, W)) | 0), - (i = (i + Math.imul(A, Y)) | 0), - (n = ((n = (n + Math.imul(A, J)) | 0) + Math.imul(k, Y)) | 0), - (o = (o + Math.imul(k, J)) | 0), - (i = (i + Math.imul(E, Q)) | 0), - (n = ((n = (n + Math.imul(E, tt)) | 0) + Math.imul(S, Q)) | 0), - (o = (o + Math.imul(S, tt)) | 0), - (i = (i + Math.imul(w, rt)) | 0), - (n = ((n = (n + Math.imul(w, it)) | 0) + Math.imul(_, rt)) | 0), - (o = (o + Math.imul(_, it)) | 0), - (i = (i + Math.imul(b, ot)) | 0), - (n = ((n = (n + Math.imul(b, st)) | 0) + Math.imul(y, ot)) | 0), - (o = (o + Math.imul(y, st)) | 0), - (i = (i + Math.imul(p, ht)) | 0), - (n = ((n = (n + Math.imul(p, ut)) | 0) + Math.imul(m, ht)) | 0), - (o = (o + Math.imul(m, ut)) | 0); - var St = - (((u + (i = (i + Math.imul(c, ct)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, lt)) | 0) + Math.imul(l, ct)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, lt)) | 0) + (n >>> 13)) | 0) + (St >>> 26)) | 0), - (St &= 67108863), - (i = Math.imul(U, F)), - (n = ((n = Math.imul(U, q)) + Math.imul(D, F)) | 0), - (o = Math.imul(D, q)), - (i = (i + Math.imul(C, $)) | 0), - (n = ((n = (n + Math.imul(C, Z)) | 0) + Math.imul(N, $)) | 0), - (o = (o + Math.imul(N, Z)) | 0), - (i = (i + Math.imul(P, V)) | 0), - (n = ((n = (n + Math.imul(P, W)) | 0) + Math.imul(O, V)) | 0), - (o = (o + Math.imul(O, W)) | 0), - (i = (i + Math.imul(B, Y)) | 0), - (n = ((n = (n + Math.imul(B, J)) | 0) + Math.imul(I, Y)) | 0), - (o = (o + Math.imul(I, J)) | 0), - (i = (i + Math.imul(A, Q)) | 0), - (n = ((n = (n + Math.imul(A, tt)) | 0) + Math.imul(k, Q)) | 0), - (o = (o + Math.imul(k, tt)) | 0), - (i = (i + Math.imul(E, rt)) | 0), - (n = ((n = (n + Math.imul(E, it)) | 0) + Math.imul(S, rt)) | 0), - (o = (o + Math.imul(S, it)) | 0), - (i = (i + Math.imul(w, ot)) | 0), - (n = ((n = (n + Math.imul(w, st)) | 0) + Math.imul(_, ot)) | 0), - (o = (o + Math.imul(_, st)) | 0), - (i = (i + Math.imul(b, ht)) | 0), - (n = ((n = (n + Math.imul(b, ut)) | 0) + Math.imul(y, ht)) | 0), - (o = (o + Math.imul(y, ut)) | 0), - (i = (i + Math.imul(p, ct)) | 0), - (n = ((n = (n + Math.imul(p, lt)) | 0) + Math.imul(m, ct)) | 0), - (o = (o + Math.imul(m, lt)) | 0); - var xt = - (((u + (i = (i + Math.imul(c, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, mt)) | 0) + Math.imul(l, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, mt)) | 0) + (n >>> 13)) | 0) + (xt >>> 26)) | 0), - (xt &= 67108863), - (i = Math.imul(U, $)), - (n = ((n = Math.imul(U, Z)) + Math.imul(D, $)) | 0), - (o = Math.imul(D, Z)), - (i = (i + Math.imul(C, V)) | 0), - (n = ((n = (n + Math.imul(C, W)) | 0) + Math.imul(N, V)) | 0), - (o = (o + Math.imul(N, W)) | 0), - (i = (i + Math.imul(P, Y)) | 0), - (n = ((n = (n + Math.imul(P, J)) | 0) + Math.imul(O, Y)) | 0), - (o = (o + Math.imul(O, J)) | 0), - (i = (i + Math.imul(B, Q)) | 0), - (n = ((n = (n + Math.imul(B, tt)) | 0) + Math.imul(I, Q)) | 0), - (o = (o + Math.imul(I, tt)) | 0), - (i = (i + Math.imul(A, rt)) | 0), - (n = ((n = (n + Math.imul(A, it)) | 0) + Math.imul(k, rt)) | 0), - (o = (o + Math.imul(k, it)) | 0), - (i = (i + Math.imul(E, ot)) | 0), - (n = ((n = (n + Math.imul(E, st)) | 0) + Math.imul(S, ot)) | 0), - (o = (o + Math.imul(S, st)) | 0), - (i = (i + Math.imul(w, ht)) | 0), - (n = ((n = (n + Math.imul(w, ut)) | 0) + Math.imul(_, ht)) | 0), - (o = (o + Math.imul(_, ut)) | 0), - (i = (i + Math.imul(b, ct)) | 0), - (n = ((n = (n + Math.imul(b, lt)) | 0) + Math.imul(y, ct)) | 0), - (o = (o + Math.imul(y, lt)) | 0); - var At = - (((u + (i = (i + Math.imul(p, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(p, mt)) | 0) + Math.imul(m, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(m, mt)) | 0) + (n >>> 13)) | 0) + (At >>> 26)) | 0), - (At &= 67108863), - (i = Math.imul(U, V)), - (n = ((n = Math.imul(U, W)) + Math.imul(D, V)) | 0), - (o = Math.imul(D, W)), - (i = (i + Math.imul(C, Y)) | 0), - (n = ((n = (n + Math.imul(C, J)) | 0) + Math.imul(N, Y)) | 0), - (o = (o + Math.imul(N, J)) | 0), - (i = (i + Math.imul(P, Q)) | 0), - (n = ((n = (n + Math.imul(P, tt)) | 0) + Math.imul(O, Q)) | 0), - (o = (o + Math.imul(O, tt)) | 0), - (i = (i + Math.imul(B, rt)) | 0), - (n = ((n = (n + Math.imul(B, it)) | 0) + Math.imul(I, rt)) | 0), - (o = (o + Math.imul(I, it)) | 0), - (i = (i + Math.imul(A, ot)) | 0), - (n = ((n = (n + Math.imul(A, st)) | 0) + Math.imul(k, ot)) | 0), - (o = (o + Math.imul(k, st)) | 0), - (i = (i + Math.imul(E, ht)) | 0), - (n = ((n = (n + Math.imul(E, ut)) | 0) + Math.imul(S, ht)) | 0), - (o = (o + Math.imul(S, ut)) | 0), - (i = (i + Math.imul(w, ct)) | 0), - (n = ((n = (n + Math.imul(w, lt)) | 0) + Math.imul(_, ct)) | 0), - (o = (o + Math.imul(_, lt)) | 0); - var kt = - (((u + (i = (i + Math.imul(b, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(b, mt)) | 0) + Math.imul(y, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(y, mt)) | 0) + (n >>> 13)) | 0) + (kt >>> 26)) | 0), - (kt &= 67108863), - (i = Math.imul(U, Y)), - (n = ((n = Math.imul(U, J)) + Math.imul(D, Y)) | 0), - (o = Math.imul(D, J)), - (i = (i + Math.imul(C, Q)) | 0), - (n = ((n = (n + Math.imul(C, tt)) | 0) + Math.imul(N, Q)) | 0), - (o = (o + Math.imul(N, tt)) | 0), - (i = (i + Math.imul(P, rt)) | 0), - (n = ((n = (n + Math.imul(P, it)) | 0) + Math.imul(O, rt)) | 0), - (o = (o + Math.imul(O, it)) | 0), - (i = (i + Math.imul(B, ot)) | 0), - (n = ((n = (n + Math.imul(B, st)) | 0) + Math.imul(I, ot)) | 0), - (o = (o + Math.imul(I, st)) | 0), - (i = (i + Math.imul(A, ht)) | 0), - (n = ((n = (n + Math.imul(A, ut)) | 0) + Math.imul(k, ht)) | 0), - (o = (o + Math.imul(k, ut)) | 0), - (i = (i + Math.imul(E, ct)) | 0), - (n = ((n = (n + Math.imul(E, lt)) | 0) + Math.imul(S, ct)) | 0), - (o = (o + Math.imul(S, lt)) | 0); - var Rt = - (((u + (i = (i + Math.imul(w, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(w, mt)) | 0) + Math.imul(_, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(_, mt)) | 0) + (n >>> 13)) | 0) + (Rt >>> 26)) | 0), - (Rt &= 67108863), - (i = Math.imul(U, Q)), - (n = ((n = Math.imul(U, tt)) + Math.imul(D, Q)) | 0), - (o = Math.imul(D, tt)), - (i = (i + Math.imul(C, rt)) | 0), - (n = ((n = (n + Math.imul(C, it)) | 0) + Math.imul(N, rt)) | 0), - (o = (o + Math.imul(N, it)) | 0), - (i = (i + Math.imul(P, ot)) | 0), - (n = ((n = (n + Math.imul(P, st)) | 0) + Math.imul(O, ot)) | 0), - (o = (o + Math.imul(O, st)) | 0), - (i = (i + Math.imul(B, ht)) | 0), - (n = ((n = (n + Math.imul(B, ut)) | 0) + Math.imul(I, ht)) | 0), - (o = (o + Math.imul(I, ut)) | 0), - (i = (i + Math.imul(A, ct)) | 0), - (n = ((n = (n + Math.imul(A, lt)) | 0) + Math.imul(k, ct)) | 0), - (o = (o + Math.imul(k, lt)) | 0); - var Bt = - (((u + (i = (i + Math.imul(E, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(E, mt)) | 0) + Math.imul(S, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(S, mt)) | 0) + (n >>> 13)) | 0) + (Bt >>> 26)) | 0), - (Bt &= 67108863), - (i = Math.imul(U, rt)), - (n = ((n = Math.imul(U, it)) + Math.imul(D, rt)) | 0), - (o = Math.imul(D, it)), - (i = (i + Math.imul(C, ot)) | 0), - (n = ((n = (n + Math.imul(C, st)) | 0) + Math.imul(N, ot)) | 0), - (o = (o + Math.imul(N, st)) | 0), - (i = (i + Math.imul(P, ht)) | 0), - (n = ((n = (n + Math.imul(P, ut)) | 0) + Math.imul(O, ht)) | 0), - (o = (o + Math.imul(O, ut)) | 0), - (i = (i + Math.imul(B, ct)) | 0), - (n = ((n = (n + Math.imul(B, lt)) | 0) + Math.imul(I, ct)) | 0), - (o = (o + Math.imul(I, lt)) | 0); - var It = - (((u + (i = (i + Math.imul(A, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(A, mt)) | 0) + Math.imul(k, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(k, mt)) | 0) + (n >>> 13)) | 0) + (It >>> 26)) | 0), - (It &= 67108863), - (i = Math.imul(U, ot)), - (n = ((n = Math.imul(U, st)) + Math.imul(D, ot)) | 0), - (o = Math.imul(D, st)), - (i = (i + Math.imul(C, ht)) | 0), - (n = ((n = (n + Math.imul(C, ut)) | 0) + Math.imul(N, ht)) | 0), - (o = (o + Math.imul(N, ut)) | 0), - (i = (i + Math.imul(P, ct)) | 0), - (n = ((n = (n + Math.imul(P, lt)) | 0) + Math.imul(O, ct)) | 0), - (o = (o + Math.imul(O, lt)) | 0); - var Tt = - (((u + (i = (i + Math.imul(B, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(B, mt)) | 0) + Math.imul(I, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(I, mt)) | 0) + (n >>> 13)) | 0) + (Tt >>> 26)) | 0), - (Tt &= 67108863), - (i = Math.imul(U, ht)), - (n = ((n = Math.imul(U, ut)) + Math.imul(D, ht)) | 0), - (o = Math.imul(D, ut)), - (i = (i + Math.imul(C, ct)) | 0), - (n = ((n = (n + Math.imul(C, lt)) | 0) + Math.imul(N, ct)) | 0), - (o = (o + Math.imul(N, lt)) | 0); - var Pt = - (((u + (i = (i + Math.imul(P, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(P, mt)) | 0) + Math.imul(O, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(O, mt)) | 0) + (n >>> 13)) | 0) + (Pt >>> 26)) | 0), - (Pt &= 67108863), - (i = Math.imul(U, ct)), - (n = ((n = Math.imul(U, lt)) + Math.imul(D, ct)) | 0), - (o = Math.imul(D, lt)); - var Ot = - (((u + (i = (i + Math.imul(C, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(C, mt)) | 0) + Math.imul(N, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(N, mt)) | 0) + (n >>> 13)) | 0) + (Ot >>> 26)) | 0), (Ot &= 67108863); - var Lt = (((u + (i = Math.imul(U, pt))) | 0) + ((8191 & (n = ((n = Math.imul(U, mt)) + Math.imul(D, pt)) | 0)) << 13)) | 0; - return ( - (u = ((((o = Math.imul(D, mt)) + (n >>> 13)) | 0) + (Lt >>> 26)) | 0), - (Lt &= 67108863), - (h[0] = gt), - (h[1] = bt), - (h[2] = yt), - (h[3] = vt), - (h[4] = wt), - (h[5] = _t), - (h[6] = Mt), - (h[7] = Et), - (h[8] = St), - (h[9] = xt), - (h[10] = At), - (h[11] = kt), - (h[12] = Rt), - (h[13] = Bt), - (h[14] = It), - (h[15] = Tt), - (h[16] = Pt), - (h[17] = Ot), - (h[18] = Lt), - 0 !== u && ((h[19] = u), r.length++), - r - ); - }; - function m(t, e, r) { - return new g().mulp(t, e, r); - } - function g(t, e) { - (this.x = t), (this.y = e); - } - Math.imul || (p = d), - (o.prototype.mulTo = function (t, e) { - var r, - i = this.length + t.length; - return ( - (r = - 10 === this.length && 10 === t.length - ? p(this, t, e) - : i < 63 - ? d(this, t, e) - : i < 1024 - ? (function (t, e, r) { - (r.negative = e.negative ^ t.negative), (r.length = t.length + e.length); - for (var i = 0, n = 0, o = 0; o < r.length - 1; o++) { - var s = n; - n = 0; - for (var a = 67108863 & i, h = Math.min(o, e.length - 1), u = Math.max(0, o - t.length + 1); u <= h; u++) { - var f = o - u, - c = (0 | t.words[f]) * (0 | e.words[u]), - l = 67108863 & c; - (a = 67108863 & (l = (l + a) | 0)), - (n += (s = ((s = (s + ((c / 67108864) | 0)) | 0) + (l >>> 26)) | 0) >>> 26), - (s &= 67108863); - } - (r.words[o] = a), (i = s), (s = n); - } - return 0 !== i ? (r.words[o] = i) : r.length--, r.strip(); - })(this, t, e) - : m(this, t, e)), - r - ); - }), - (g.prototype.makeRBT = function (t) { - for (var e = new Array(t), r = o.prototype._countBits(t) - 1, i = 0; i < t; i++) e[i] = this.revBin(i, r, t); - return e; - }), - (g.prototype.revBin = function (t, e, r) { - if (0 === t || t === r - 1) return t; - for (var i = 0, n = 0; n < e; n++) (i |= (1 & t) << (e - n - 1)), (t >>= 1); - return i; - }), - (g.prototype.permute = function (t, e, r, i, n, o) { - for (var s = 0; s < o; s++) (i[s] = e[t[s]]), (n[s] = r[t[s]]); - }), - (g.prototype.transform = function (t, e, r, i, n, o) { - this.permute(o, t, e, r, i, n); - for (var s = 1; s < n; s <<= 1) - for (var a = s << 1, h = Math.cos((2 * Math.PI) / a), u = Math.sin((2 * Math.PI) / a), f = 0; f < n; f += a) - for (var c = h, l = u, d = 0; d < s; d++) { - var p = r[f + d], - m = i[f + d], - g = r[f + d + s], - b = i[f + d + s], - y = c * g - l * b; - (b = c * b + l * g), - (g = y), - (r[f + d] = p + g), - (i[f + d] = m + b), - (r[f + d + s] = p - g), - (i[f + d + s] = m - b), - d !== a && ((y = h * c - u * l), (l = h * l + u * c), (c = y)); - } - }), - (g.prototype.guessLen13b = function (t, e) { - var r = 1 | Math.max(e, t), - i = 1 & r, - n = 0; - for (r = (r / 2) | 0; r; r >>>= 1) n++; - return 1 << (n + 1 + i); - }), - (g.prototype.conjugate = function (t, e, r) { - if (!(r <= 1)) - for (var i = 0; i < r / 2; i++) { - var n = t[i]; - (t[i] = t[r - i - 1]), (t[r - i - 1] = n), (n = e[i]), (e[i] = -e[r - i - 1]), (e[r - i - 1] = -n); - } - }), - (g.prototype.normalize13b = function (t, e) { - for (var r = 0, i = 0; i < e / 2; i++) { - var n = 8192 * Math.round(t[2 * i + 1] / e) + Math.round(t[2 * i] / e) + r; - (t[i] = 67108863 & n), (r = n < 67108864 ? 0 : (n / 67108864) | 0); - } - return t; - }), - (g.prototype.convert13b = function (t, e, r, n) { - for (var o = 0, s = 0; s < e; s++) - (o += 0 | t[s]), (r[2 * s] = 8191 & o), (o >>>= 13), (r[2 * s + 1] = 8191 & o), (o >>>= 13); - for (s = 2 * e; s < n; ++s) r[s] = 0; - i(0 === o), i(0 == (-8192 & o)); - }), - (g.prototype.stub = function (t) { - for (var e = new Array(t), r = 0; r < t; r++) e[r] = 0; - return e; - }), - (g.prototype.mulp = function (t, e, r) { - var i = 2 * this.guessLen13b(t.length, e.length), - n = this.makeRBT(i), - o = this.stub(i), - s = new Array(i), - a = new Array(i), - h = new Array(i), - u = new Array(i), - f = new Array(i), - c = new Array(i), - l = r.words; - (l.length = i), - this.convert13b(t.words, t.length, s, i), - this.convert13b(e.words, e.length, u, i), - this.transform(s, o, a, h, i, n), - this.transform(u, o, f, c, i, n); - for (var d = 0; d < i; d++) { - var p = a[d] * f[d] - h[d] * c[d]; - (h[d] = a[d] * c[d] + h[d] * f[d]), (a[d] = p); - } - return ( - this.conjugate(a, h, i), - this.transform(a, h, l, o, i, n), - this.conjugate(l, o, i), - this.normalize13b(l, i), - (r.negative = t.negative ^ e.negative), - (r.length = t.length + e.length), - r.strip() - ); - }), - (o.prototype.mul = function (t) { - var e = new o(null); - return (e.words = new Array(this.length + t.length)), this.mulTo(t, e); - }), - (o.prototype.mulf = function (t) { - var e = new o(null); - return (e.words = new Array(this.length + t.length)), m(this, t, e); - }), - (o.prototype.imul = function (t) { - return this.clone().mulTo(t, this); - }), - (o.prototype.imuln = function (t) { - i('number' == typeof t), i(t < 67108864); - for (var e = 0, r = 0; r < this.length; r++) { - var n = (0 | this.words[r]) * t, - o = (67108863 & n) + (67108863 & e); - (e >>= 26), (e += (n / 67108864) | 0), (e += o >>> 26), (this.words[r] = 67108863 & o); - } - return 0 !== e && ((this.words[r] = e), this.length++), this; - }), - (o.prototype.muln = function (t) { - return this.clone().imuln(t); - }), - (o.prototype.sqr = function () { - return this.mul(this); - }), - (o.prototype.isqr = function () { - return this.imul(this.clone()); - }), - (o.prototype.pow = function (t) { - var e = (function (t) { - for (var e = new Array(t.bitLength()), r = 0; r < e.length; r++) { - var i = (r / 26) | 0, - n = r % 26; - e[r] = (t.words[i] & (1 << n)) >>> n; - } - return e; - })(t); - if (0 === e.length) return new o(1); - for (var r = this, i = 0; i < e.length && 0 === e[i]; i++, r = r.sqr()); - if (++i < e.length) for (var n = r.sqr(); i < e.length; i++, n = n.sqr()) 0 !== e[i] && (r = r.mul(n)); - return r; - }), - (o.prototype.iushln = function (t) { - i('number' == typeof t && t >= 0); - var e, - r = t % 26, - n = (t - r) / 26, - o = (67108863 >>> (26 - r)) << (26 - r); - if (0 !== r) { - var s = 0; - for (e = 0; e < this.length; e++) { - var a = this.words[e] & o, - h = ((0 | this.words[e]) - a) << r; - (this.words[e] = h | s), (s = a >>> (26 - r)); - } - s && ((this.words[e] = s), this.length++); - } - if (0 !== n) { - for (e = this.length - 1; e >= 0; e--) this.words[e + n] = this.words[e]; - for (e = 0; e < n; e++) this.words[e] = 0; - this.length += n; - } - return this.strip(); - }), - (o.prototype.ishln = function (t) { - return i(0 === this.negative), this.iushln(t); - }), - (o.prototype.iushrn = function (t, e, r) { - var n; - i('number' == typeof t && t >= 0), (n = e ? (e - (e % 26)) / 26 : 0); - var o = t % 26, - s = Math.min((t - o) / 26, this.length), - a = 67108863 ^ ((67108863 >>> o) << o), - h = r; - if (((n -= s), (n = Math.max(0, n)), h)) { - for (var u = 0; u < s; u++) h.words[u] = this.words[u]; - h.length = s; - } - if (0 === s); - else if (this.length > s) for (this.length -= s, u = 0; u < this.length; u++) this.words[u] = this.words[u + s]; - else (this.words[0] = 0), (this.length = 1); - var f = 0; - for (u = this.length - 1; u >= 0 && (0 !== f || u >= n); u--) { - var c = 0 | this.words[u]; - (this.words[u] = (f << (26 - o)) | (c >>> o)), (f = c & a); - } - return h && 0 !== f && (h.words[h.length++] = f), 0 === this.length && ((this.words[0] = 0), (this.length = 1)), this.strip(); - }), - (o.prototype.ishrn = function (t, e, r) { - return i(0 === this.negative), this.iushrn(t, e, r); - }), - (o.prototype.shln = function (t) { - return this.clone().ishln(t); - }), - (o.prototype.ushln = function (t) { - return this.clone().iushln(t); - }), - (o.prototype.shrn = function (t) { - return this.clone().ishrn(t); - }), - (o.prototype.ushrn = function (t) { - return this.clone().iushrn(t); - }), - (o.prototype.testn = function (t) { - i('number' == typeof t && t >= 0); - var e = t % 26, - r = (t - e) / 26, - n = 1 << e; - return !(this.length <= r || !(this.words[r] & n)); - }), - (o.prototype.imaskn = function (t) { - i('number' == typeof t && t >= 0); - var e = t % 26, - r = (t - e) / 26; - if ((i(0 === this.negative, 'imaskn works only with positive numbers'), this.length <= r)) return this; - if ((0 !== e && r++, (this.length = Math.min(r, this.length)), 0 !== e)) { - var n = 67108863 ^ ((67108863 >>> e) << e); - this.words[this.length - 1] &= n; - } - return this.strip(); - }), - (o.prototype.maskn = function (t) { - return this.clone().imaskn(t); - }), - (o.prototype.iaddn = function (t) { - return ( - i('number' == typeof t), - i(t < 67108864), - t < 0 - ? this.isubn(-t) - : 0 !== this.negative - ? 1 === this.length && (0 | this.words[0]) < t - ? ((this.words[0] = t - (0 | this.words[0])), (this.negative = 0), this) - : ((this.negative = 0), this.isubn(t), (this.negative = 1), this) - : this._iaddn(t) - ); - }), - (o.prototype._iaddn = function (t) { - this.words[0] += t; - for (var e = 0; e < this.length && this.words[e] >= 67108864; e++) - (this.words[e] -= 67108864), e === this.length - 1 ? (this.words[e + 1] = 1) : this.words[e + 1]++; - return (this.length = Math.max(this.length, e + 1)), this; - }), - (o.prototype.isubn = function (t) { - if ((i('number' == typeof t), i(t < 67108864), t < 0)) return this.iaddn(-t); - if (0 !== this.negative) return (this.negative = 0), this.iaddn(t), (this.negative = 1), this; - if (((this.words[0] -= t), 1 === this.length && this.words[0] < 0)) (this.words[0] = -this.words[0]), (this.negative = 1); - else for (var e = 0; e < this.length && this.words[e] < 0; e++) (this.words[e] += 67108864), (this.words[e + 1] -= 1); - return this.strip(); - }), - (o.prototype.addn = function (t) { - return this.clone().iaddn(t); - }), - (o.prototype.subn = function (t) { - return this.clone().isubn(t); - }), - (o.prototype.iabs = function () { - return (this.negative = 0), this; - }), - (o.prototype.abs = function () { - return this.clone().iabs(); - }), - (o.prototype._ishlnsubmul = function (t, e, r) { - var n, - o, - s = t.length + r; - this._expand(s); - var a = 0; - for (n = 0; n < t.length; n++) { - o = (0 | this.words[n + r]) + a; - var h = (0 | t.words[n]) * e; - (a = ((o -= 67108863 & h) >> 26) - ((h / 67108864) | 0)), (this.words[n + r] = 67108863 & o); - } - for (; n < this.length - r; n++) (a = (o = (0 | this.words[n + r]) + a) >> 26), (this.words[n + r] = 67108863 & o); - if (0 === a) return this.strip(); - for (i(-1 === a), a = 0, n = 0; n < this.length; n++) - (a = (o = -(0 | this.words[n]) + a) >> 26), (this.words[n] = 67108863 & o); - return (this.negative = 1), this.strip(); - }), - (o.prototype._wordDiv = function (t, e) { - var r = (this.length, t.length), - i = this.clone(), - n = t, - s = 0 | n.words[n.length - 1]; - 0 != (r = 26 - this._countBits(s)) && ((n = n.ushln(r)), i.iushln(r), (s = 0 | n.words[n.length - 1])); - var a, - h = i.length - n.length; - if ('mod' !== e) { - ((a = new o(null)).length = h + 1), (a.words = new Array(a.length)); - for (var u = 0; u < a.length; u++) a.words[u] = 0; - } - var f = i.clone()._ishlnsubmul(n, 1, h); - 0 === f.negative && ((i = f), a && (a.words[h] = 1)); - for (var c = h - 1; c >= 0; c--) { - var l = 67108864 * (0 | i.words[n.length + c]) + (0 | i.words[n.length + c - 1]); - for (l = Math.min((l / s) | 0, 67108863), i._ishlnsubmul(n, l, c); 0 !== i.negative; ) - l--, (i.negative = 0), i._ishlnsubmul(n, 1, c), i.isZero() || (i.negative ^= 1); - a && (a.words[c] = l); - } - return a && a.strip(), i.strip(), 'div' !== e && 0 !== r && i.iushrn(r), { div: a || null, mod: i }; - }), - (o.prototype.divmod = function (t, e, r) { - return ( - i(!t.isZero()), - this.isZero() - ? { div: new o(0), mod: new o(0) } - : 0 !== this.negative && 0 === t.negative - ? ((a = this.neg().divmod(t, e)), - 'mod' !== e && (n = a.div.neg()), - 'div' !== e && ((s = a.mod.neg()), r && 0 !== s.negative && s.iadd(t)), - { div: n, mod: s }) - : 0 === this.negative && 0 !== t.negative - ? ((a = this.divmod(t.neg(), e)), 'mod' !== e && (n = a.div.neg()), { div: n, mod: a.mod }) - : 0 != (this.negative & t.negative) - ? ((a = this.neg().divmod(t.neg(), e)), - 'div' !== e && ((s = a.mod.neg()), r && 0 !== s.negative && s.isub(t)), - { div: a.div, mod: s }) - : t.length > this.length || this.cmp(t) < 0 - ? { div: new o(0), mod: this } - : 1 === t.length - ? 'div' === e - ? { div: this.divn(t.words[0]), mod: null } - : 'mod' === e - ? { div: null, mod: new o(this.modn(t.words[0])) } - : { div: this.divn(t.words[0]), mod: new o(this.modn(t.words[0])) } - : this._wordDiv(t, e) - ); - var n, s, a; - }), - (o.prototype.div = function (t) { - return this.divmod(t, 'div', !1).div; - }), - (o.prototype.mod = function (t) { - return this.divmod(t, 'mod', !1).mod; - }), - (o.prototype.umod = function (t) { - return this.divmod(t, 'mod', !0).mod; - }), - (o.prototype.divRound = function (t) { - var e = this.divmod(t); - if (e.mod.isZero()) return e.div; - var r = 0 !== e.div.negative ? e.mod.isub(t) : e.mod, - i = t.ushrn(1), - n = t.andln(1), - o = r.cmp(i); - return o < 0 || (1 === n && 0 === o) ? e.div : 0 !== e.div.negative ? e.div.isubn(1) : e.div.iaddn(1); - }), - (o.prototype.modn = function (t) { - i(t <= 67108863); - for (var e = (1 << 26) % t, r = 0, n = this.length - 1; n >= 0; n--) r = (e * r + (0 | this.words[n])) % t; - return r; - }), - (o.prototype.idivn = function (t) { - i(t <= 67108863); - for (var e = 0, r = this.length - 1; r >= 0; r--) { - var n = (0 | this.words[r]) + 67108864 * e; - (this.words[r] = (n / t) | 0), (e = n % t); - } - return this.strip(); - }), - (o.prototype.divn = function (t) { - return this.clone().idivn(t); - }), - (o.prototype.egcd = function (t) { - i(0 === t.negative), i(!t.isZero()); - var e = this, - r = t.clone(); - e = 0 !== e.negative ? e.umod(t) : e.clone(); - for (var n = new o(1), s = new o(0), a = new o(0), h = new o(1), u = 0; e.isEven() && r.isEven(); ) - e.iushrn(1), r.iushrn(1), ++u; - for (var f = r.clone(), c = e.clone(); !e.isZero(); ) { - for (var l = 0, d = 1; 0 == (e.words[0] & d) && l < 26; ++l, d <<= 1); - if (l > 0) for (e.iushrn(l); l-- > 0; ) (n.isOdd() || s.isOdd()) && (n.iadd(f), s.isub(c)), n.iushrn(1), s.iushrn(1); - for (var p = 0, m = 1; 0 == (r.words[0] & m) && p < 26; ++p, m <<= 1); - if (p > 0) for (r.iushrn(p); p-- > 0; ) (a.isOdd() || h.isOdd()) && (a.iadd(f), h.isub(c)), a.iushrn(1), h.iushrn(1); - e.cmp(r) >= 0 ? (e.isub(r), n.isub(a), s.isub(h)) : (r.isub(e), a.isub(n), h.isub(s)); - } - return { a, b: h, gcd: r.iushln(u) }; - }), - (o.prototype._invmp = function (t) { - i(0 === t.negative), i(!t.isZero()); - var e = this, - r = t.clone(); - e = 0 !== e.negative ? e.umod(t) : e.clone(); - for (var n, s = new o(1), a = new o(0), h = r.clone(); e.cmpn(1) > 0 && r.cmpn(1) > 0; ) { - for (var u = 0, f = 1; 0 == (e.words[0] & f) && u < 26; ++u, f <<= 1); - if (u > 0) for (e.iushrn(u); u-- > 0; ) s.isOdd() && s.iadd(h), s.iushrn(1); - for (var c = 0, l = 1; 0 == (r.words[0] & l) && c < 26; ++c, l <<= 1); - if (c > 0) for (r.iushrn(c); c-- > 0; ) a.isOdd() && a.iadd(h), a.iushrn(1); - e.cmp(r) >= 0 ? (e.isub(r), s.isub(a)) : (r.isub(e), a.isub(s)); - } - return (n = 0 === e.cmpn(1) ? s : a).cmpn(0) < 0 && n.iadd(t), n; - }), - (o.prototype.gcd = function (t) { - if (this.isZero()) return t.abs(); - if (t.isZero()) return this.abs(); - var e = this.clone(), - r = t.clone(); - (e.negative = 0), (r.negative = 0); - for (var i = 0; e.isEven() && r.isEven(); i++) e.iushrn(1), r.iushrn(1); - for (;;) { - for (; e.isEven(); ) e.iushrn(1); - for (; r.isEven(); ) r.iushrn(1); - var n = e.cmp(r); - if (n < 0) { - var o = e; - (e = r), (r = o); - } else if (0 === n || 0 === r.cmpn(1)) break; - e.isub(r); - } - return r.iushln(i); - }), - (o.prototype.invm = function (t) { - return this.egcd(t).a.umod(t); - }), - (o.prototype.isEven = function () { - return 0 == (1 & this.words[0]); - }), - (o.prototype.isOdd = function () { - return 1 == (1 & this.words[0]); - }), - (o.prototype.andln = function (t) { - return this.words[0] & t; - }), - (o.prototype.bincn = function (t) { - i('number' == typeof t); - var e = t % 26, - r = (t - e) / 26, - n = 1 << e; - if (this.length <= r) return this._expand(r + 1), (this.words[r] |= n), this; - for (var o = n, s = r; 0 !== o && s < this.length; s++) { - var a = 0 | this.words[s]; - (o = (a += o) >>> 26), (a &= 67108863), (this.words[s] = a); - } - return 0 !== o && ((this.words[s] = o), this.length++), this; - }), - (o.prototype.isZero = function () { - return 1 === this.length && 0 === this.words[0]; - }), - (o.prototype.cmpn = function (t) { - var e, - r = t < 0; - if (0 !== this.negative && !r) return -1; - if (0 === this.negative && r) return 1; - if ((this.strip(), this.length > 1)) e = 1; - else { - r && (t = -t), i(t <= 67108863, 'Number is too big'); - var n = 0 | this.words[0]; - e = n === t ? 0 : n < t ? -1 : 1; - } - return 0 !== this.negative ? 0 | -e : e; - }), - (o.prototype.cmp = function (t) { - if (0 !== this.negative && 0 === t.negative) return -1; - if (0 === this.negative && 0 !== t.negative) return 1; - var e = this.ucmp(t); - return 0 !== this.negative ? 0 | -e : e; - }), - (o.prototype.ucmp = function (t) { - if (this.length > t.length) return 1; - if (this.length < t.length) return -1; - for (var e = 0, r = this.length - 1; r >= 0; r--) { - var i = 0 | this.words[r], - n = 0 | t.words[r]; - if (i !== n) { - i < n ? (e = -1) : i > n && (e = 1); - break; - } - } - return e; - }), - (o.prototype.gtn = function (t) { - return 1 === this.cmpn(t); - }), - (o.prototype.gt = function (t) { - return 1 === this.cmp(t); - }), - (o.prototype.gten = function (t) { - return this.cmpn(t) >= 0; - }), - (o.prototype.gte = function (t) { - return this.cmp(t) >= 0; - }), - (o.prototype.ltn = function (t) { - return -1 === this.cmpn(t); - }), - (o.prototype.lt = function (t) { - return -1 === this.cmp(t); - }), - (o.prototype.lten = function (t) { - return this.cmpn(t) <= 0; - }), - (o.prototype.lte = function (t) { - return this.cmp(t) <= 0; - }), - (o.prototype.eqn = function (t) { - return 0 === this.cmpn(t); - }), - (o.prototype.eq = function (t) { - return 0 === this.cmp(t); - }), - (o.red = function (t) { - return new E(t); - }), - (o.prototype.toRed = function (t) { - return ( - i(!this.red, 'Already a number in reduction context'), - i(0 === this.negative, 'red works only with positives'), - t.convertTo(this)._forceRed(t) - ); - }), - (o.prototype.fromRed = function () { - return i(this.red, 'fromRed works only with numbers in reduction context'), this.red.convertFrom(this); - }), - (o.prototype._forceRed = function (t) { - return (this.red = t), this; - }), - (o.prototype.forceRed = function (t) { - return i(!this.red, 'Already a number in reduction context'), this._forceRed(t); - }), - (o.prototype.redAdd = function (t) { - return i(this.red, 'redAdd works only with red numbers'), this.red.add(this, t); - }), - (o.prototype.redIAdd = function (t) { - return i(this.red, 'redIAdd works only with red numbers'), this.red.iadd(this, t); - }), - (o.prototype.redSub = function (t) { - return i(this.red, 'redSub works only with red numbers'), this.red.sub(this, t); - }), - (o.prototype.redISub = function (t) { - return i(this.red, 'redISub works only with red numbers'), this.red.isub(this, t); - }), - (o.prototype.redShl = function (t) { - return i(this.red, 'redShl works only with red numbers'), this.red.shl(this, t); - }), - (o.prototype.redMul = function (t) { - return i(this.red, 'redMul works only with red numbers'), this.red._verify2(this, t), this.red.mul(this, t); - }), - (o.prototype.redIMul = function (t) { - return i(this.red, 'redMul works only with red numbers'), this.red._verify2(this, t), this.red.imul(this, t); - }), - (o.prototype.redSqr = function () { - return i(this.red, 'redSqr works only with red numbers'), this.red._verify1(this), this.red.sqr(this); - }), - (o.prototype.redISqr = function () { - return i(this.red, 'redISqr works only with red numbers'), this.red._verify1(this), this.red.isqr(this); - }), - (o.prototype.redSqrt = function () { - return i(this.red, 'redSqrt works only with red numbers'), this.red._verify1(this), this.red.sqrt(this); - }), - (o.prototype.redInvm = function () { - return i(this.red, 'redInvm works only with red numbers'), this.red._verify1(this), this.red.invm(this); - }), - (o.prototype.redNeg = function () { - return i(this.red, 'redNeg works only with red numbers'), this.red._verify1(this), this.red.neg(this); - }), - (o.prototype.redPow = function (t) { - return i(this.red && !t.red, 'redPow(normalNum)'), this.red._verify1(this), this.red.pow(this, t); - }); - var b = { k256: null, p224: null, p192: null, p25519: null }; - function y(t, e) { - (this.name = t), - (this.p = new o(e, 16)), - (this.n = this.p.bitLength()), - (this.k = new o(1).iushln(this.n).isub(this.p)), - (this.tmp = this._tmp()); - } - function v() { - y.call(this, 'k256', 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f'); - } - function w() { - y.call(this, 'p224', 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001'); - } - function _() { - y.call(this, 'p192', 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff'); - } - function M() { - y.call(this, '25519', '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed'); - } - function E(t) { - if ('string' == typeof t) { - var e = o._prime(t); - (this.m = e.p), (this.prime = e); - } else i(t.gtn(1), 'modulus must be greater than 1'), (this.m = t), (this.prime = null); - } - function S(t) { - E.call(this, t), - (this.shift = this.m.bitLength()), - this.shift % 26 != 0 && (this.shift += 26 - (this.shift % 26)), - (this.r = new o(1).iushln(this.shift)), - (this.r2 = this.imod(this.r.sqr())), - (this.rinv = this.r._invmp(this.m)), - (this.minv = this.rinv.mul(this.r).isubn(1).div(this.m)), - (this.minv = this.minv.umod(this.r)), - (this.minv = this.r.sub(this.minv)); - } - (y.prototype._tmp = function () { - var t = new o(null); - return (t.words = new Array(Math.ceil(this.n / 13))), t; - }), - (y.prototype.ireduce = function (t) { - var e, - r = t; - do { - this.split(r, this.tmp), (e = (r = (r = this.imulK(r)).iadd(this.tmp)).bitLength()); - } while (e > this.n); - var i = e < this.n ? -1 : r.ucmp(this.p); - return 0 === i ? ((r.words[0] = 0), (r.length = 1)) : i > 0 ? r.isub(this.p) : void 0 !== r.strip ? r.strip() : r._strip(), r; - }), - (y.prototype.split = function (t, e) { - t.iushrn(this.n, 0, e); - }), - (y.prototype.imulK = function (t) { - return t.imul(this.k); - }), - n(v, y), - (v.prototype.split = function (t, e) { - for (var r = 4194303, i = Math.min(t.length, 9), n = 0; n < i; n++) e.words[n] = t.words[n]; - if (((e.length = i), t.length <= 9)) return (t.words[0] = 0), void (t.length = 1); - var o = t.words[9]; - for (e.words[e.length++] = o & r, n = 10; n < t.length; n++) { - var s = 0 | t.words[n]; - (t.words[n - 10] = ((s & r) << 4) | (o >>> 22)), (o = s); - } - (o >>>= 22), (t.words[n - 10] = o), 0 === o && t.length > 10 ? (t.length -= 10) : (t.length -= 9); - }), - (v.prototype.imulK = function (t) { - (t.words[t.length] = 0), (t.words[t.length + 1] = 0), (t.length += 2); - for (var e = 0, r = 0; r < t.length; r++) { - var i = 0 | t.words[r]; - (e += 977 * i), (t.words[r] = 67108863 & e), (e = 64 * i + ((e / 67108864) | 0)); - } - return 0 === t.words[t.length - 1] && (t.length--, 0 === t.words[t.length - 1] && t.length--), t; - }), - n(w, y), - n(_, y), - n(M, y), - (M.prototype.imulK = function (t) { - for (var e = 0, r = 0; r < t.length; r++) { - var i = 19 * (0 | t.words[r]) + e, - n = 67108863 & i; - (i >>>= 26), (t.words[r] = n), (e = i); - } - return 0 !== e && (t.words[t.length++] = e), t; - }), - (o._prime = function (t) { - if (b[t]) return b[t]; - var e; - if ('k256' === t) e = new v(); - else if ('p224' === t) e = new w(); - else if ('p192' === t) e = new _(); - else { - if ('p25519' !== t) throw new Error('Unknown prime ' + t); - e = new M(); - } - return (b[t] = e), e; - }), - (E.prototype._verify1 = function (t) { - i(0 === t.negative, 'red works only with positives'), i(t.red, 'red works only with red numbers'); - }), - (E.prototype._verify2 = function (t, e) { - i(0 == (t.negative | e.negative), 'red works only with positives'), - i(t.red && t.red === e.red, 'red works only with red numbers'); - }), - (E.prototype.imod = function (t) { - return this.prime ? this.prime.ireduce(t)._forceRed(this) : t.umod(this.m)._forceRed(this); - }), - (E.prototype.neg = function (t) { - return t.isZero() ? t.clone() : this.m.sub(t)._forceRed(this); - }), - (E.prototype.add = function (t, e) { - this._verify2(t, e); - var r = t.add(e); - return r.cmp(this.m) >= 0 && r.isub(this.m), r._forceRed(this); - }), - (E.prototype.iadd = function (t, e) { - this._verify2(t, e); - var r = t.iadd(e); - return r.cmp(this.m) >= 0 && r.isub(this.m), r; - }), - (E.prototype.sub = function (t, e) { - this._verify2(t, e); - var r = t.sub(e); - return r.cmpn(0) < 0 && r.iadd(this.m), r._forceRed(this); - }), - (E.prototype.isub = function (t, e) { - this._verify2(t, e); - var r = t.isub(e); - return r.cmpn(0) < 0 && r.iadd(this.m), r; - }), - (E.prototype.shl = function (t, e) { - return this._verify1(t), this.imod(t.ushln(e)); - }), - (E.prototype.imul = function (t, e) { - return this._verify2(t, e), this.imod(t.imul(e)); - }), - (E.prototype.mul = function (t, e) { - return this._verify2(t, e), this.imod(t.mul(e)); - }), - (E.prototype.isqr = function (t) { - return this.imul(t, t.clone()); - }), - (E.prototype.sqr = function (t) { - return this.mul(t, t); - }), - (E.prototype.sqrt = function (t) { - if (t.isZero()) return t.clone(); - var e = this.m.andln(3); - if ((i(e % 2 == 1), 3 === e)) { - var r = this.m.add(new o(1)).iushrn(2); - return this.pow(t, r); - } - for (var n = this.m.subn(1), s = 0; !n.isZero() && 0 === n.andln(1); ) s++, n.iushrn(1); - i(!n.isZero()); - var a = new o(1).toRed(this), - h = a.redNeg(), - u = this.m.subn(1).iushrn(1), - f = this.m.bitLength(); - for (f = new o(2 * f * f).toRed(this); 0 !== this.pow(f, u).cmp(h); ) f.redIAdd(h); - for (var c = this.pow(f, n), l = this.pow(t, n.addn(1).iushrn(1)), d = this.pow(t, n), p = s; 0 !== d.cmp(a); ) { - for (var m = d, g = 0; 0 !== m.cmp(a); g++) m = m.redSqr(); - i(g < p); - var b = this.pow(c, new o(1).iushln(p - g - 1)); - (l = l.redMul(b)), (c = b.redSqr()), (d = d.redMul(c)), (p = g); - } - return l; - }), - (E.prototype.invm = function (t) { - var e = t._invmp(this.m); - return 0 !== e.negative ? ((e.negative = 0), this.imod(e).redNeg()) : this.imod(e); - }), - (E.prototype.pow = function (t, e) { - if (e.isZero()) return new o(1).toRed(this); - if (0 === e.cmpn(1)) return t.clone(); - var r = new Array(16); - (r[0] = new o(1).toRed(this)), (r[1] = t); - for (var i = 2; i < r.length; i++) r[i] = this.mul(r[i - 1], t); - var n = r[0], - s = 0, - a = 0, - h = e.bitLength() % 26; - for (0 === h && (h = 26), i = e.length - 1; i >= 0; i--) { - for (var u = e.words[i], f = h - 1; f >= 0; f--) { - var c = (u >> f) & 1; - n !== r[0] && (n = this.sqr(n)), - 0 !== c || 0 !== s - ? ((s <<= 1), (s |= c), (4 == ++a || (0 === i && 0 === f)) && ((n = this.mul(n, r[s])), (a = 0), (s = 0))) - : (a = 0); - } - h = 26; - } - return n; - }), - (E.prototype.convertTo = function (t) { - var e = t.umod(this.m); - return e === t ? e.clone() : e; - }), - (E.prototype.convertFrom = function (t) { - var e = t.clone(); - return (e.red = null), e; - }), - (o.mont = function (t) { - return new S(t); - }), - n(S, E), - (S.prototype.convertTo = function (t) { - return this.imod(t.ushln(this.shift)); - }), - (S.prototype.convertFrom = function (t) { - var e = this.imod(t.mul(this.rinv)); - return (e.red = null), e; - }), - (S.prototype.imul = function (t, e) { - if (t.isZero() || e.isZero()) return (t.words[0] = 0), (t.length = 1), t; - var r = t.imul(e), - i = r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m), - n = r.isub(i).iushrn(this.shift), - o = n; - return n.cmp(this.m) >= 0 ? (o = n.isub(this.m)) : n.cmpn(0) < 0 && (o = n.iadd(this.m)), o._forceRed(this); - }), - (S.prototype.mul = function (t, e) { - if (t.isZero() || e.isZero()) return new o(0)._forceRed(this); - var r = t.mul(e), - i = r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m), - n = r.isub(i).iushrn(this.shift), - s = n; - return n.cmp(this.m) >= 0 ? (s = n.isub(this.m)) : n.cmpn(0) < 0 && (s = n.iadd(this.m)), s._forceRed(this); - }), - (S.prototype.invm = function (t) { - return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this); - }); - })((t = r.nmd(t)), this); - }, - 343: t => { - 'use strict'; - var e, - r = 'object' == typeof Reflect ? Reflect : null, - i = - r && 'function' == typeof r.apply - ? r.apply - : function (t, e, r) { - return Function.prototype.apply.call(t, e, r); - }; - e = - r && 'function' == typeof r.ownKeys - ? r.ownKeys - : Object.getOwnPropertySymbols - ? function (t) { - return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t)); - } - : function (t) { - return Object.getOwnPropertyNames(t); - }; - var n = - Number.isNaN || - function (t) { - return t != t; - }; - function o() { - o.init.call(this); - } - (t.exports = o), - (t.exports.once = function (t, e) { - return new Promise(function (r, i) { - function n(r) { - t.removeListener(e, o), i(r); - } - function o() { - 'function' == typeof t.removeListener && t.removeListener('error', n), r([].slice.call(arguments)); - } - m(t, e, o, { once: !0 }), - 'error' !== e && - (function (t, e, r) { - 'function' == typeof t.on && m(t, 'error', e, { once: !0 }); - })(t, n); - }); - }), - (o.EventEmitter = o), - (o.prototype._events = void 0), - (o.prototype._eventsCount = 0), - (o.prototype._maxListeners = void 0); - var s = 10; - function a(t) { - if ('function' != typeof t) throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof t); - } - function h(t) { - return void 0 === t._maxListeners ? o.defaultMaxListeners : t._maxListeners; - } - function u(t, e, r, i) { - var n, o, s, u; - if ( - (a(r), - void 0 === (o = t._events) - ? ((o = t._events = Object.create(null)), (t._eventsCount = 0)) - : (void 0 !== o.newListener && (t.emit('newListener', e, r.listener ? r.listener : r), (o = t._events)), (s = o[e])), - void 0 === s) - ) - (s = o[e] = r), ++t._eventsCount; - else if ( - ('function' == typeof s ? (s = o[e] = i ? [r, s] : [s, r]) : i ? s.unshift(r) : s.push(r), - (n = h(t)) > 0 && s.length > n && !s.warned) - ) { - s.warned = !0; - var f = new Error( - 'Possible EventEmitter memory leak detected. ' + - s.length + - ' ' + - String(e) + - ' listeners added. Use emitter.setMaxListeners() to increase limit' - ); - (f.name = 'MaxListenersExceededWarning'), - (f.emitter = t), - (f.type = e), - (f.count = s.length), - (u = f), - console && console.warn && console.warn(u); - } - return t; - } - function f() { - if (!this.fired) - return ( - this.target.removeListener(this.type, this.wrapFn), - (this.fired = !0), - 0 === arguments.length ? this.listener.call(this.target) : this.listener.apply(this.target, arguments) - ); - } - function c(t, e, r) { - var i = { fired: !1, wrapFn: void 0, target: t, type: e, listener: r }, - n = f.bind(i); - return (n.listener = r), (i.wrapFn = n), n; - } - function l(t, e, r) { - var i = t._events; - if (void 0 === i) return []; - var n = i[e]; - return void 0 === n - ? [] - : 'function' == typeof n - ? r - ? [n.listener || n] - : [n] - : r - ? (function (t) { - for (var e = new Array(t.length), r = 0; r < e.length; ++r) e[r] = t[r].listener || t[r]; - return e; - })(n) - : p(n, n.length); - } - function d(t) { - var e = this._events; - if (void 0 !== e) { - var r = e[t]; - if ('function' == typeof r) return 1; - if (void 0 !== r) return r.length; - } - return 0; - } - function p(t, e) { - for (var r = new Array(e), i = 0; i < e; ++i) r[i] = t[i]; - return r; - } - function m(t, e, r, i) { - if ('function' == typeof t.on) i.once ? t.once(e, r) : t.on(e, r); - else { - if ('function' != typeof t.addEventListener) - throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof t); - t.addEventListener(e, function n(o) { - i.once && t.removeEventListener(e, n), r(o); - }); - } - } - Object.defineProperty(o, 'defaultMaxListeners', { - enumerable: !0, - get: function () { - return s; - }, - set: function (t) { - if ('number' != typeof t || t < 0 || n(t)) - throw new RangeError( - 'The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + t + '.' - ); - s = t; - }, - }), - (o.init = function () { - (void 0 !== this._events && this._events !== Object.getPrototypeOf(this)._events) || - ((this._events = Object.create(null)), (this._eventsCount = 0)), - (this._maxListeners = this._maxListeners || void 0); - }), - (o.prototype.setMaxListeners = function (t) { - if ('number' != typeof t || t < 0 || n(t)) - throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + t + '.'); - return (this._maxListeners = t), this; - }), - (o.prototype.getMaxListeners = function () { - return h(this); - }), - (o.prototype.emit = function (t) { - for (var e = [], r = 1; r < arguments.length; r++) e.push(arguments[r]); - var n = 'error' === t, - o = this._events; - if (void 0 !== o) n = n && void 0 === o.error; - else if (!n) return !1; - if (n) { - var s; - if ((e.length > 0 && (s = e[0]), s instanceof Error)) throw s; - var a = new Error('Unhandled error.' + (s ? ' (' + s.message + ')' : '')); - throw ((a.context = s), a); - } - var h = o[t]; - if (void 0 === h) return !1; - if ('function' == typeof h) i(h, this, e); - else { - var u = h.length, - f = p(h, u); - for (r = 0; r < u; ++r) i(f[r], this, e); - } - return !0; - }), - (o.prototype.addListener = function (t, e) { - return u(this, t, e, !1); - }), - (o.prototype.on = o.prototype.addListener), - (o.prototype.prependListener = function (t, e) { - return u(this, t, e, !0); - }), - (o.prototype.once = function (t, e) { - return a(e), this.on(t, c(this, t, e)), this; - }), - (o.prototype.prependOnceListener = function (t, e) { - return a(e), this.prependListener(t, c(this, t, e)), this; - }), - (o.prototype.removeListener = function (t, e) { - var r, i, n, o, s; - if ((a(e), void 0 === (i = this._events))) return this; - if (void 0 === (r = i[t])) return this; - if (r === e || r.listener === e) - 0 == --this._eventsCount - ? (this._events = Object.create(null)) - : (delete i[t], i.removeListener && this.emit('removeListener', t, r.listener || e)); - else if ('function' != typeof r) { - for (n = -1, o = r.length - 1; o >= 0; o--) - if (r[o] === e || r[o].listener === e) { - (s = r[o].listener), (n = o); - break; - } - if (n < 0) return this; - 0 === n - ? r.shift() - : (function (t, e) { - for (; e + 1 < t.length; e++) t[e] = t[e + 1]; - t.pop(); - })(r, n), - 1 === r.length && (i[t] = r[0]), - void 0 !== i.removeListener && this.emit('removeListener', t, s || e); - } - return this; - }), - (o.prototype.off = o.prototype.removeListener), - (o.prototype.removeAllListeners = function (t) { - var e, r, i; - if (void 0 === (r = this._events)) return this; - if (void 0 === r.removeListener) - return ( - 0 === arguments.length - ? ((this._events = Object.create(null)), (this._eventsCount = 0)) - : void 0 !== r[t] && (0 == --this._eventsCount ? (this._events = Object.create(null)) : delete r[t]), - this - ); - if (0 === arguments.length) { - var n, - o = Object.keys(r); - for (i = 0; i < o.length; ++i) 'removeListener' !== (n = o[i]) && this.removeAllListeners(n); - return this.removeAllListeners('removeListener'), (this._events = Object.create(null)), (this._eventsCount = 0), this; - } - if ('function' == typeof (e = r[t])) this.removeListener(t, e); - else if (void 0 !== e) for (i = e.length - 1; i >= 0; i--) this.removeListener(t, e[i]); - return this; - }), - (o.prototype.listeners = function (t) { - return l(this, t, !0); - }), - (o.prototype.rawListeners = function (t) { - return l(this, t, !1); - }), - (o.listenerCount = function (t, e) { - return 'function' == typeof t.listenerCount ? t.listenerCount(e) : d.call(t, e); - }), - (o.prototype.listenerCount = d), - (o.prototype.eventNames = function () { - return this._eventsCount > 0 ? e(this._events) : []; - }); - }, - 5883: (t, e, r) => { - var i = r(7172).Buffer, - n = r(9500); - t.exports = function (t, e, r, o) { - if ((i.isBuffer(t) || (t = i.from(t, 'binary')), e && (i.isBuffer(e) || (e = i.from(e, 'binary')), 8 !== e.length))) - throw new RangeError('salt should be Buffer with 8 byte length'); - for (var s = r / 8, a = i.alloc(s), h = i.alloc(o || 0), u = i.alloc(0); s > 0 || o > 0; ) { - var f = new n(); - f.update(u), f.update(t), e && f.update(e), (u = f.digest()); - var c = 0; - if (s > 0) { - var l = a.length - s; - (c = Math.min(s, u.length)), u.copy(a, l, 0, c), (s -= c); - } - if (c < u.length && o > 0) { - var d = h.length - o, - p = Math.min(o, u.length - c); - u.copy(h, d, c, c + p), (o -= p); - } - } - return u.fill(0), { key: a, iv: h }; - }; - }, - 6883: (t, e, r) => { - 'use strict'; - var i = r(7172).Buffer, - n = r(1457).Transform; - function o(t) { - n.call(this), - (this._block = i.allocUnsafe(t)), - (this._blockSize = t), - (this._blockOffset = 0), - (this._length = [0, 0, 0, 0]), - (this._finalized = !1); - } - r(87)(o, n), - (o.prototype._transform = function (t, e, r) { - var i = null; - try { - this.update(t, e); - } catch (t) { - i = t; - } - r(i); - }), - (o.prototype._flush = function (t) { - var e = null; - try { - this.push(this.digest()); - } catch (t) { - e = t; - } - t(e); - }), - (o.prototype.update = function (t, e) { - if ( - ((function (t, e) { - if (!i.isBuffer(t) && 'string' != typeof t) throw new TypeError('Data must be a string or a buffer'); - })(t), - this._finalized) - ) - throw new Error('Digest already called'); - i.isBuffer(t) || (t = i.from(t, e)); - for (var r = this._block, n = 0; this._blockOffset + t.length - n >= this._blockSize; ) { - for (var o = this._blockOffset; o < this._blockSize; ) r[o++] = t[n++]; - this._update(), (this._blockOffset = 0); - } - for (; n < t.length; ) r[this._blockOffset++] = t[n++]; - for (var s = 0, a = 8 * t.length; a > 0; ++s) - (this._length[s] += a), (a = (this._length[s] / 4294967296) | 0) > 0 && (this._length[s] -= 4294967296 * a); - return this; - }), - (o.prototype._update = function () { - throw new Error('_update is not implemented'); - }), - (o.prototype.digest = function (t) { - if (this._finalized) throw new Error('Digest already called'); - this._finalized = !0; - var e = this._digest(); - void 0 !== t && (e = e.toString(t)), this._block.fill(0), (this._blockOffset = 0); - for (var r = 0; r < 4; ++r) this._length[r] = 0; - return e; - }), - (o.prototype._digest = function () { - throw new Error('_digest is not implemented'); - }), - (t.exports = o); - }, - 4004: t => { - 'use strict'; - var e = {}; - function r(t, r, i) { - i || (i = Error); - var n = (function (t) { - var e, i; - function n(e, i, n) { - return ( - t.call( - this, - (function (t, e, i) { - return 'string' == typeof r ? r : r(t, e, i); - })(e, i, n) - ) || this - ); - } - return (i = t), ((e = n).prototype = Object.create(i.prototype)), (e.prototype.constructor = e), (e.__proto__ = i), n; - })(i); - (n.prototype.name = i.name), (n.prototype.code = t), (e[t] = n); - } - function i(t, e) { - if (Array.isArray(t)) { - var r = t.length; - return ( - (t = t.map(function (t) { - return String(t); - })), - r > 2 - ? 'one of '.concat(e, ' ').concat(t.slice(0, r - 1).join(', '), ', or ') + t[r - 1] - : 2 === r - ? 'one of '.concat(e, ' ').concat(t[0], ' or ').concat(t[1]) - : 'of '.concat(e, ' ').concat(t[0]) - ); - } - return 'of '.concat(e, ' ').concat(String(t)); - } - r( - 'ERR_INVALID_OPT_VALUE', - function (t, e) { - return 'The value "' + e + '" is invalid for option "' + t + '"'; - }, - TypeError - ), - r( - 'ERR_INVALID_ARG_TYPE', - function (t, e, r) { - var n, o, s, a, h; - if ( - ('string' == typeof e && ((o = 'not '), e.substr(0, 4) === o) - ? ((n = 'must not be'), (e = e.replace(/^not /, ''))) - : (n = 'must be'), - (function (t, e, r) { - return (void 0 === r || r > t.length) && (r = t.length), t.substring(r - 9, r) === e; - })(t, ' argument')) - ) - s = 'The '.concat(t, ' ').concat(n, ' ').concat(i(e, 'type')); - else { - var u = ('number' != typeof h && (h = 0), h + 1 > (a = t).length || -1 === a.indexOf('.', h) ? 'argument' : 'property'); - s = 'The "'.concat(t, '" ').concat(u, ' ').concat(n, ' ').concat(i(e, 'type')); - } - return s + '. Received type '.concat(typeof r); - }, - TypeError - ), - r('ERR_STREAM_PUSH_AFTER_EOF', 'stream.push() after EOF'), - r('ERR_METHOD_NOT_IMPLEMENTED', function (t) { - return 'The ' + t + ' method is not implemented'; - }), - r('ERR_STREAM_PREMATURE_CLOSE', 'Premature close'), - r('ERR_STREAM_DESTROYED', function (t) { - return 'Cannot call ' + t + ' after a stream was destroyed'; - }), - r('ERR_MULTIPLE_CALLBACK', 'Callback called multiple times'), - r('ERR_STREAM_CANNOT_PIPE', 'Cannot pipe, not readable'), - r('ERR_STREAM_WRITE_AFTER_END', 'write after end'), - r('ERR_STREAM_NULL_VALUES', 'May not write null values to stream', TypeError), - r( - 'ERR_UNKNOWN_ENCODING', - function (t) { - return 'Unknown encoding: ' + t; - }, - TypeError - ), - r('ERR_STREAM_UNSHIFT_AFTER_END_EVENT', 'stream.unshift() after end event'), - (t.exports.q = e); - }, - 1033: (t, e, r) => { - 'use strict'; - var i = - Object.keys || - function (t) { - var e = []; - for (var r in t) e.push(r); - return e; - }; - t.exports = u; - var n = r(767), - o = r(4608); - r(87)(u, n); - for (var s = i(o.prototype), a = 0; a < s.length; a++) { - var h = s[a]; - u.prototype[h] || (u.prototype[h] = o.prototype[h]); - } - function u(t) { - if (!(this instanceof u)) return new u(t); - n.call(this, t), - o.call(this, t), - (this.allowHalfOpen = !0), - t && - (!1 === t.readable && (this.readable = !1), - !1 === t.writable && (this.writable = !1), - !1 === t.allowHalfOpen && ((this.allowHalfOpen = !1), this.once('end', f))); - } - function f() { - this._writableState.ended || process.nextTick(c, this); - } - function c(t) { - t.end(); - } - Object.defineProperty(u.prototype, 'writableHighWaterMark', { - enumerable: !1, - get: function () { - return this._writableState.highWaterMark; - }, - }), - Object.defineProperty(u.prototype, 'writableBuffer', { - enumerable: !1, - get: function () { - return this._writableState && this._writableState.getBuffer(); - }, - }), - Object.defineProperty(u.prototype, 'writableLength', { - enumerable: !1, - get: function () { - return this._writableState.length; - }, - }), - Object.defineProperty(u.prototype, 'destroyed', { - enumerable: !1, - get: function () { - return ( - void 0 !== this._readableState && - void 0 !== this._writableState && - this._readableState.destroyed && - this._writableState.destroyed - ); - }, - set: function (t) { - void 0 !== this._readableState && - void 0 !== this._writableState && - ((this._readableState.destroyed = t), (this._writableState.destroyed = t)); - }, - }); - }, - 3546: (t, e, r) => { - 'use strict'; - t.exports = n; - var i = r(2637); - function n(t) { - if (!(this instanceof n)) return new n(t); - i.call(this, t); - } - r(87)(n, i), - (n.prototype._transform = function (t, e, r) { - r(null, t); - }); - }, - 767: (t, e, r) => { - 'use strict'; - var i; - (t.exports = S), (S.ReadableState = E), r(343).EventEmitter; - var n, - o = function (t, e) { - return t.listeners(e).length; - }, - s = r(4358), - a = r(816).Buffer, - h = r.g.Uint8Array || function () {}, - u = r(3967); - n = u && u.debuglog ? u.debuglog('stream') : function () {}; - var f, - c, - l, - d = r(8049), - p = r(9591), - m = r(7452).getHighWaterMark, - g = r(4004).q, - b = g.ERR_INVALID_ARG_TYPE, - y = g.ERR_STREAM_PUSH_AFTER_EOF, - v = g.ERR_METHOD_NOT_IMPLEMENTED, - w = g.ERR_STREAM_UNSHIFT_AFTER_END_EVENT; - r(87)(S, s); - var _ = p.errorOrDestroy, - M = ['error', 'close', 'destroy', 'pause', 'resume']; - function E(t, e, n) { - (i = i || r(1033)), - (t = t || {}), - 'boolean' != typeof n && (n = e instanceof i), - (this.objectMode = !!t.objectMode), - n && (this.objectMode = this.objectMode || !!t.readableObjectMode), - (this.highWaterMark = m(this, t, 'readableHighWaterMark', n)), - (this.buffer = new d()), - (this.length = 0), - (this.pipes = null), - (this.pipesCount = 0), - (this.flowing = null), - (this.ended = !1), - (this.endEmitted = !1), - (this.reading = !1), - (this.sync = !0), - (this.needReadable = !1), - (this.emittedReadable = !1), - (this.readableListening = !1), - (this.resumeScheduled = !1), - (this.paused = !0), - (this.emitClose = !1 !== t.emitClose), - (this.autoDestroy = !!t.autoDestroy), - (this.destroyed = !1), - (this.defaultEncoding = t.defaultEncoding || 'utf8'), - (this.awaitDrain = 0), - (this.readingMore = !1), - (this.decoder = null), - (this.encoding = null), - t.encoding && (f || (f = r(4361).s), (this.decoder = new f(t.encoding)), (this.encoding = t.encoding)); - } - function S(t) { - if (((i = i || r(1033)), !(this instanceof S))) return new S(t); - var e = this instanceof i; - (this._readableState = new E(t, this, e)), - (this.readable = !0), - t && ('function' == typeof t.read && (this._read = t.read), 'function' == typeof t.destroy && (this._destroy = t.destroy)), - s.call(this); - } - function x(t, e, r, i, o) { - n('readableAddChunk', e); - var s, - u = t._readableState; - if (null === e) - (u.reading = !1), - (function (t, e) { - if ((n('onEofChunk'), !e.ended)) { - if (e.decoder) { - var r = e.decoder.end(); - r && r.length && (e.buffer.push(r), (e.length += e.objectMode ? 1 : r.length)); - } - (e.ended = !0), e.sync ? B(t) : ((e.needReadable = !1), e.emittedReadable || ((e.emittedReadable = !0), I(t))); - } - })(t, u); - else if ( - (o || - (s = (function (t, e) { - var r, i; - return ( - (i = e), - a.isBuffer(i) || - i instanceof h || - 'string' == typeof e || - void 0 === e || - t.objectMode || - (r = new b('chunk', ['string', 'Buffer', 'Uint8Array'], e)), - r - ); - })(u, e)), - s) - ) - _(t, s); - else if (u.objectMode || (e && e.length > 0)) - if ( - ('string' == typeof e || - u.objectMode || - Object.getPrototypeOf(e) === a.prototype || - (e = (function (t) { - return a.from(t); - })(e)), - i) - ) - u.endEmitted ? _(t, new w()) : A(t, u, e, !0); - else if (u.ended) _(t, new y()); - else { - if (u.destroyed) return !1; - (u.reading = !1), - u.decoder && !r ? ((e = u.decoder.write(e)), u.objectMode || 0 !== e.length ? A(t, u, e, !1) : T(t, u)) : A(t, u, e, !1); - } - else i || ((u.reading = !1), T(t, u)); - return !u.ended && (u.length < u.highWaterMark || 0 === u.length); - } - function A(t, e, r, i) { - e.flowing && 0 === e.length && !e.sync - ? ((e.awaitDrain = 0), t.emit('data', r)) - : ((e.length += e.objectMode ? 1 : r.length), i ? e.buffer.unshift(r) : e.buffer.push(r), e.needReadable && B(t)), - T(t, e); - } - Object.defineProperty(S.prototype, 'destroyed', { - enumerable: !1, - get: function () { - return void 0 !== this._readableState && this._readableState.destroyed; - }, - set: function (t) { - this._readableState && (this._readableState.destroyed = t); - }, - }), - (S.prototype.destroy = p.destroy), - (S.prototype._undestroy = p.undestroy), - (S.prototype._destroy = function (t, e) { - e(t); - }), - (S.prototype.push = function (t, e) { - var r, - i = this._readableState; - return ( - i.objectMode - ? (r = !0) - : 'string' == typeof t && ((e = e || i.defaultEncoding) !== i.encoding && ((t = a.from(t, e)), (e = '')), (r = !0)), - x(this, t, e, !1, r) - ); - }), - (S.prototype.unshift = function (t) { - return x(this, t, null, !0, !1); - }), - (S.prototype.isPaused = function () { - return !1 === this._readableState.flowing; - }), - (S.prototype.setEncoding = function (t) { - f || (f = r(4361).s); - var e = new f(t); - (this._readableState.decoder = e), (this._readableState.encoding = this._readableState.decoder.encoding); - for (var i = this._readableState.buffer.head, n = ''; null !== i; ) (n += e.write(i.data)), (i = i.next); - return ( - this._readableState.buffer.clear(), - '' !== n && this._readableState.buffer.push(n), - (this._readableState.length = n.length), - this - ); - }); - var k = 1073741824; - function R(t, e) { - return t <= 0 || (0 === e.length && e.ended) - ? 0 - : e.objectMode - ? 1 - : t != t - ? e.flowing && e.length - ? e.buffer.head.data.length - : e.length - : (t > e.highWaterMark && - (e.highWaterMark = (function (t) { - return ( - t >= k ? (t = k) : (t--, (t |= t >>> 1), (t |= t >>> 2), (t |= t >>> 4), (t |= t >>> 8), (t |= t >>> 16), t++), t - ); - })(t)), - t <= e.length ? t : e.ended ? e.length : ((e.needReadable = !0), 0)); - } - function B(t) { - var e = t._readableState; - n('emitReadable', e.needReadable, e.emittedReadable), - (e.needReadable = !1), - e.emittedReadable || (n('emitReadable', e.flowing), (e.emittedReadable = !0), process.nextTick(I, t)); - } - function I(t) { - var e = t._readableState; - n('emitReadable_', e.destroyed, e.length, e.ended), - e.destroyed || (!e.length && !e.ended) || (t.emit('readable'), (e.emittedReadable = !1)), - (e.needReadable = !e.flowing && !e.ended && e.length <= e.highWaterMark), - N(t); - } - function T(t, e) { - e.readingMore || ((e.readingMore = !0), process.nextTick(P, t, e)); - } - function P(t, e) { - for (; !e.reading && !e.ended && (e.length < e.highWaterMark || (e.flowing && 0 === e.length)); ) { - var r = e.length; - if ((n('maybeReadMore read 0'), t.read(0), r === e.length)) break; - } - e.readingMore = !1; - } - function O(t) { - var e = t._readableState; - (e.readableListening = t.listenerCount('readable') > 0), - e.resumeScheduled && !e.paused ? (e.flowing = !0) : t.listenerCount('data') > 0 && t.resume(); - } - function L(t) { - n('readable nexttick read 0'), t.read(0); - } - function C(t, e) { - n('resume', e.reading), - e.reading || t.read(0), - (e.resumeScheduled = !1), - t.emit('resume'), - N(t), - e.flowing && !e.reading && t.read(0); - } - function N(t) { - var e = t._readableState; - for (n('flow', e.flowing); e.flowing && null !== t.read(); ); - } - function j(t, e) { - return 0 === e.length - ? null - : (e.objectMode - ? (r = e.buffer.shift()) - : !t || t >= e.length - ? ((r = e.decoder ? e.buffer.join('') : 1 === e.buffer.length ? e.buffer.first() : e.buffer.concat(e.length)), - e.buffer.clear()) - : (r = e.buffer.consume(t, e.decoder)), - r); - var r; - } - function U(t) { - var e = t._readableState; - n('endReadable', e.endEmitted), e.endEmitted || ((e.ended = !0), process.nextTick(D, e, t)); - } - function D(t, e) { - if ( - (n('endReadableNT', t.endEmitted, t.length), - !t.endEmitted && 0 === t.length && ((t.endEmitted = !0), (e.readable = !1), e.emit('end'), t.autoDestroy)) - ) { - var r = e._writableState; - (!r || (r.autoDestroy && r.finished)) && e.destroy(); - } - } - function z(t, e) { - for (var r = 0, i = t.length; r < i; r++) if (t[r] === e) return r; - return -1; - } - (S.prototype.read = function (t) { - n('read', t), (t = parseInt(t, 10)); - var e = this._readableState, - r = t; - if ( - (0 !== t && (e.emittedReadable = !1), - 0 === t && e.needReadable && ((0 !== e.highWaterMark ? e.length >= e.highWaterMark : e.length > 0) || e.ended)) - ) - return n('read: emitReadable', e.length, e.ended), 0 === e.length && e.ended ? U(this) : B(this), null; - if (0 === (t = R(t, e)) && e.ended) return 0 === e.length && U(this), null; - var i, - o = e.needReadable; - return ( - n('need readable', o), - (0 === e.length || e.length - t < e.highWaterMark) && n('length less than watermark', (o = !0)), - e.ended || e.reading - ? n('reading or ended', (o = !1)) - : o && - (n('do read'), - (e.reading = !0), - (e.sync = !0), - 0 === e.length && (e.needReadable = !0), - this._read(e.highWaterMark), - (e.sync = !1), - e.reading || (t = R(r, e))), - null === (i = t > 0 ? j(t, e) : null) - ? ((e.needReadable = e.length <= e.highWaterMark), (t = 0)) - : ((e.length -= t), (e.awaitDrain = 0)), - 0 === e.length && (e.ended || (e.needReadable = !0), r !== t && e.ended && U(this)), - null !== i && this.emit('data', i), - i - ); - }), - (S.prototype._read = function (t) { - _(this, new v('_read()')); - }), - (S.prototype.pipe = function (t, e) { - var r = this, - i = this._readableState; - switch (i.pipesCount) { - case 0: - i.pipes = t; - break; - case 1: - i.pipes = [i.pipes, t]; - break; - default: - i.pipes.push(t); - } - (i.pipesCount += 1), n('pipe count=%d opts=%j', i.pipesCount, e); - var s = (e && !1 === e.end) || t === process.stdout || t === process.stderr ? p : a; - function a() { - n('onend'), t.end(); - } - i.endEmitted ? process.nextTick(s) : r.once('end', s), - t.on('unpipe', function e(o, s) { - n('onunpipe'), - o === r && - s && - !1 === s.hasUnpiped && - ((s.hasUnpiped = !0), - n('cleanup'), - t.removeListener('close', l), - t.removeListener('finish', d), - t.removeListener('drain', h), - t.removeListener('error', c), - t.removeListener('unpipe', e), - r.removeListener('end', a), - r.removeListener('end', p), - r.removeListener('data', f), - (u = !0), - !i.awaitDrain || (t._writableState && !t._writableState.needDrain) || h()); - }); - var h = (function (t) { - return function () { - var e = t._readableState; - n('pipeOnDrain', e.awaitDrain), - e.awaitDrain && e.awaitDrain--, - 0 === e.awaitDrain && o(t, 'data') && ((e.flowing = !0), N(t)); - }; - })(r); - t.on('drain', h); - var u = !1; - function f(e) { - n('ondata'); - var o = t.write(e); - n('dest.write', o), - !1 === o && - (((1 === i.pipesCount && i.pipes === t) || (i.pipesCount > 1 && -1 !== z(i.pipes, t))) && - !u && - (n('false write response, pause', i.awaitDrain), i.awaitDrain++), - r.pause()); - } - function c(e) { - n('onerror', e), p(), t.removeListener('error', c), 0 === o(t, 'error') && _(t, e); - } - function l() { - t.removeListener('finish', d), p(); - } - function d() { - n('onfinish'), t.removeListener('close', l), p(); - } - function p() { - n('unpipe'), r.unpipe(t); - } - return ( - r.on('data', f), - (function (t, e, r) { - if ('function' == typeof t.prependListener) return t.prependListener(e, r); - t._events && t._events[e] - ? Array.isArray(t._events[e]) - ? t._events[e].unshift(r) - : (t._events[e] = [r, t._events[e]]) - : t.on(e, r); - })(t, 'error', c), - t.once('close', l), - t.once('finish', d), - t.emit('pipe', r), - i.flowing || (n('pipe resume'), r.resume()), - t - ); - }), - (S.prototype.unpipe = function (t) { - var e = this._readableState, - r = { hasUnpiped: !1 }; - if (0 === e.pipesCount) return this; - if (1 === e.pipesCount) - return ( - (t && t !== e.pipes) || - (t || (t = e.pipes), (e.pipes = null), (e.pipesCount = 0), (e.flowing = !1), t && t.emit('unpipe', this, r)), - this - ); - if (!t) { - var i = e.pipes, - n = e.pipesCount; - (e.pipes = null), (e.pipesCount = 0), (e.flowing = !1); - for (var o = 0; o < n; o++) i[o].emit('unpipe', this, { hasUnpiped: !1 }); - return this; - } - var s = z(e.pipes, t); - return ( - -1 === s || - (e.pipes.splice(s, 1), (e.pipesCount -= 1), 1 === e.pipesCount && (e.pipes = e.pipes[0]), t.emit('unpipe', this, r)), - this - ); - }), - (S.prototype.on = function (t, e) { - var r = s.prototype.on.call(this, t, e), - i = this._readableState; - return ( - 'data' === t - ? ((i.readableListening = this.listenerCount('readable') > 0), !1 !== i.flowing && this.resume()) - : 'readable' === t && - (i.endEmitted || - i.readableListening || - ((i.readableListening = i.needReadable = !0), - (i.flowing = !1), - (i.emittedReadable = !1), - n('on readable', i.length, i.reading), - i.length ? B(this) : i.reading || process.nextTick(L, this))), - r - ); - }), - (S.prototype.addListener = S.prototype.on), - (S.prototype.removeListener = function (t, e) { - var r = s.prototype.removeListener.call(this, t, e); - return 'readable' === t && process.nextTick(O, this), r; - }), - (S.prototype.removeAllListeners = function (t) { - var e = s.prototype.removeAllListeners.apply(this, arguments); - return ('readable' !== t && void 0 !== t) || process.nextTick(O, this), e; - }), - (S.prototype.resume = function () { - var t = this._readableState; - return ( - t.flowing || - (n('resume'), - (t.flowing = !t.readableListening), - (function (t, e) { - e.resumeScheduled || ((e.resumeScheduled = !0), process.nextTick(C, t, e)); - })(this, t)), - (t.paused = !1), - this - ); - }), - (S.prototype.pause = function () { - return ( - n('call pause flowing=%j', this._readableState.flowing), - !1 !== this._readableState.flowing && (n('pause'), (this._readableState.flowing = !1), this.emit('pause')), - (this._readableState.paused = !0), - this - ); - }), - (S.prototype.wrap = function (t) { - var e = this, - r = this._readableState, - i = !1; - for (var o in (t.on('end', function () { - if ((n('wrapped end'), r.decoder && !r.ended)) { - var t = r.decoder.end(); - t && t.length && e.push(t); - } - e.push(null); - }), - t.on('data', function (o) { - n('wrapped data'), - r.decoder && (o = r.decoder.write(o)), - (r.objectMode && null == o) || ((r.objectMode || (o && o.length)) && (e.push(o) || ((i = !0), t.pause()))); - }), - t)) - void 0 === this[o] && - 'function' == typeof t[o] && - (this[o] = (function (e) { - return function () { - return t[e].apply(t, arguments); - }; - })(o)); - for (var s = 0; s < M.length; s++) t.on(M[s], this.emit.bind(this, M[s])); - return ( - (this._read = function (e) { - n('wrapped _read', e), i && ((i = !1), t.resume()); - }), - this - ); - }), - 'function' == typeof Symbol && - (S.prototype[Symbol.asyncIterator] = function () { - return void 0 === c && (c = r(1519)), c(this); - }), - Object.defineProperty(S.prototype, 'readableHighWaterMark', { - enumerable: !1, - get: function () { - return this._readableState.highWaterMark; - }, - }), - Object.defineProperty(S.prototype, 'readableBuffer', { - enumerable: !1, - get: function () { - return this._readableState && this._readableState.buffer; - }, - }), - Object.defineProperty(S.prototype, 'readableFlowing', { - enumerable: !1, - get: function () { - return this._readableState.flowing; - }, - set: function (t) { - this._readableState && (this._readableState.flowing = t); - }, - }), - (S._fromList = j), - Object.defineProperty(S.prototype, 'readableLength', { - enumerable: !1, - get: function () { - return this._readableState.length; - }, - }), - 'function' == typeof Symbol && - (S.from = function (t, e) { - return void 0 === l && (l = r(8727)), l(S, t, e); - }); - }, - 2637: (t, e, r) => { - 'use strict'; - t.exports = f; - var i = r(4004).q, - n = i.ERR_METHOD_NOT_IMPLEMENTED, - o = i.ERR_MULTIPLE_CALLBACK, - s = i.ERR_TRANSFORM_ALREADY_TRANSFORMING, - a = i.ERR_TRANSFORM_WITH_LENGTH_0, - h = r(1033); - function u(t, e) { - var r = this._transformState; - r.transforming = !1; - var i = r.writecb; - if (null === i) return this.emit('error', new o()); - (r.writechunk = null), (r.writecb = null), null != e && this.push(e), i(t); - var n = this._readableState; - (n.reading = !1), (n.needReadable || n.length < n.highWaterMark) && this._read(n.highWaterMark); - } - function f(t) { - if (!(this instanceof f)) return new f(t); - h.call(this, t), - (this._transformState = { - afterTransform: u.bind(this), - needTransform: !1, - transforming: !1, - writecb: null, - writechunk: null, - writeencoding: null, - }), - (this._readableState.needReadable = !0), - (this._readableState.sync = !1), - t && - ('function' == typeof t.transform && (this._transform = t.transform), - 'function' == typeof t.flush && (this._flush = t.flush)), - this.on('prefinish', c); - } - function c() { - var t = this; - 'function' != typeof this._flush || this._readableState.destroyed - ? l(this, null, null) - : this._flush(function (e, r) { - l(t, e, r); - }); - } - function l(t, e, r) { - if (e) return t.emit('error', e); - if ((null != r && t.push(r), t._writableState.length)) throw new a(); - if (t._transformState.transforming) throw new s(); - return t.push(null); - } - r(87)(f, h), - (f.prototype.push = function (t, e) { - return (this._transformState.needTransform = !1), h.prototype.push.call(this, t, e); - }), - (f.prototype._transform = function (t, e, r) { - r(new n('_transform()')); - }), - (f.prototype._write = function (t, e, r) { - var i = this._transformState; - if (((i.writecb = r), (i.writechunk = t), (i.writeencoding = e), !i.transforming)) { - var n = this._readableState; - (i.needTransform || n.needReadable || n.length < n.highWaterMark) && this._read(n.highWaterMark); - } - }), - (f.prototype._read = function (t) { - var e = this._transformState; - null === e.writechunk || e.transforming - ? (e.needTransform = !0) - : ((e.transforming = !0), this._transform(e.writechunk, e.writeencoding, e.afterTransform)); - }), - (f.prototype._destroy = function (t, e) { - h.prototype._destroy.call(this, t, function (t) { - e(t); - }); - }); - }, - 4608: (t, e, r) => { - 'use strict'; - function i(t) { - var e = this; - (this.next = null), - (this.entry = null), - (this.finish = function () { - !(function (t, e, r) { - var i = t.entry; - for (t.entry = null; i; ) { - var n = i.callback; - e.pendingcb--, n(undefined), (i = i.next); - } - e.corkedRequestsFree.next = t; - })(e, t); - }); - } - var n; - (t.exports = S), (S.WritableState = E); - var o, - s = { deprecate: r(7451) }, - a = r(4358), - h = r(816).Buffer, - u = r.g.Uint8Array || function () {}, - f = r(9591), - c = r(7452).getHighWaterMark, - l = r(4004).q, - d = l.ERR_INVALID_ARG_TYPE, - p = l.ERR_METHOD_NOT_IMPLEMENTED, - m = l.ERR_MULTIPLE_CALLBACK, - g = l.ERR_STREAM_CANNOT_PIPE, - b = l.ERR_STREAM_DESTROYED, - y = l.ERR_STREAM_NULL_VALUES, - v = l.ERR_STREAM_WRITE_AFTER_END, - w = l.ERR_UNKNOWN_ENCODING, - _ = f.errorOrDestroy; - function M() {} - function E(t, e, o) { - (n = n || r(1033)), - (t = t || {}), - 'boolean' != typeof o && (o = e instanceof n), - (this.objectMode = !!t.objectMode), - o && (this.objectMode = this.objectMode || !!t.writableObjectMode), - (this.highWaterMark = c(this, t, 'writableHighWaterMark', o)), - (this.finalCalled = !1), - (this.needDrain = !1), - (this.ending = !1), - (this.ended = !1), - (this.finished = !1), - (this.destroyed = !1); - var s = !1 === t.decodeStrings; - (this.decodeStrings = !s), - (this.defaultEncoding = t.defaultEncoding || 'utf8'), - (this.length = 0), - (this.writing = !1), - (this.corked = 0), - (this.sync = !0), - (this.bufferProcessing = !1), - (this.onwrite = function (t) { - !(function (t, e) { - var r = t._writableState, - i = r.sync, - n = r.writecb; - if ('function' != typeof n) throw new m(); - if ( - ((function (t) { - (t.writing = !1), (t.writecb = null), (t.length -= t.writelen), (t.writelen = 0); - })(r), - e) - ) - !(function (t, e, r, i, n) { - --e.pendingcb, - r - ? (process.nextTick(n, i), process.nextTick(I, t, e), (t._writableState.errorEmitted = !0), _(t, i)) - : (n(i), (t._writableState.errorEmitted = !0), _(t, i), I(t, e)); - })(t, r, i, e, n); - else { - var o = R(r) || t.destroyed; - o || r.corked || r.bufferProcessing || !r.bufferedRequest || k(t, r), i ? process.nextTick(A, t, r, o, n) : A(t, r, o, n); - } - })(e, t); - }), - (this.writecb = null), - (this.writelen = 0), - (this.bufferedRequest = null), - (this.lastBufferedRequest = null), - (this.pendingcb = 0), - (this.prefinished = !1), - (this.errorEmitted = !1), - (this.emitClose = !1 !== t.emitClose), - (this.autoDestroy = !!t.autoDestroy), - (this.bufferedRequestCount = 0), - (this.corkedRequestsFree = new i(this)); - } - function S(t) { - var e = this instanceof (n = n || r(1033)); - if (!e && !o.call(S, this)) return new S(t); - (this._writableState = new E(t, this, e)), - (this.writable = !0), - t && - ('function' == typeof t.write && (this._write = t.write), - 'function' == typeof t.writev && (this._writev = t.writev), - 'function' == typeof t.destroy && (this._destroy = t.destroy), - 'function' == typeof t.final && (this._final = t.final)), - a.call(this); - } - function x(t, e, r, i, n, o, s) { - (e.writelen = i), - (e.writecb = s), - (e.writing = !0), - (e.sync = !0), - e.destroyed ? e.onwrite(new b('write')) : r ? t._writev(n, e.onwrite) : t._write(n, o, e.onwrite), - (e.sync = !1); - } - function A(t, e, r, i) { - r || - (function (t, e) { - 0 === e.length && e.needDrain && ((e.needDrain = !1), t.emit('drain')); - })(t, e), - e.pendingcb--, - i(), - I(t, e); - } - function k(t, e) { - e.bufferProcessing = !0; - var r = e.bufferedRequest; - if (t._writev && r && r.next) { - var n = e.bufferedRequestCount, - o = new Array(n), - s = e.corkedRequestsFree; - s.entry = r; - for (var a = 0, h = !0; r; ) (o[a] = r), r.isBuf || (h = !1), (r = r.next), (a += 1); - (o.allBuffers = h), - x(t, e, !0, e.length, o, '', s.finish), - e.pendingcb++, - (e.lastBufferedRequest = null), - s.next ? ((e.corkedRequestsFree = s.next), (s.next = null)) : (e.corkedRequestsFree = new i(e)), - (e.bufferedRequestCount = 0); - } else { - for (; r; ) { - var u = r.chunk, - f = r.encoding, - c = r.callback; - if ((x(t, e, !1, e.objectMode ? 1 : u.length, u, f, c), (r = r.next), e.bufferedRequestCount--, e.writing)) break; - } - null === r && (e.lastBufferedRequest = null); - } - (e.bufferedRequest = r), (e.bufferProcessing = !1); - } - function R(t) { - return t.ending && 0 === t.length && null === t.bufferedRequest && !t.finished && !t.writing; - } - function B(t, e) { - t._final(function (r) { - e.pendingcb--, r && _(t, r), (e.prefinished = !0), t.emit('prefinish'), I(t, e); - }); - } - function I(t, e) { - var r = R(e); - if ( - r && - ((function (t, e) { - e.prefinished || - e.finalCalled || - ('function' != typeof t._final || e.destroyed - ? ((e.prefinished = !0), t.emit('prefinish')) - : (e.pendingcb++, (e.finalCalled = !0), process.nextTick(B, t, e))); - })(t, e), - 0 === e.pendingcb && ((e.finished = !0), t.emit('finish'), e.autoDestroy)) - ) { - var i = t._readableState; - (!i || (i.autoDestroy && i.endEmitted)) && t.destroy(); - } - return r; - } - r(87)(S, a), - (E.prototype.getBuffer = function () { - for (var t = this.bufferedRequest, e = []; t; ) e.push(t), (t = t.next); - return e; - }), - (function () { - try { - Object.defineProperty(E.prototype, 'buffer', { - get: s.deprecate( - function () { - return this.getBuffer(); - }, - '_writableState.buffer is deprecated. Use _writableState.getBuffer instead.', - 'DEP0003' - ), - }); - } catch (t) {} - })(), - 'function' == typeof Symbol && Symbol.hasInstance && 'function' == typeof Function.prototype[Symbol.hasInstance] - ? ((o = Function.prototype[Symbol.hasInstance]), - Object.defineProperty(S, Symbol.hasInstance, { - value: function (t) { - return !!o.call(this, t) || (this === S && t && t._writableState instanceof E); - }, - })) - : (o = function (t) { - return t instanceof this; - }), - (S.prototype.pipe = function () { - _(this, new g()); - }), - (S.prototype.write = function (t, e, r) { - var i, - n = this._writableState, - o = !1, - s = !n.objectMode && ((i = t), h.isBuffer(i) || i instanceof u); - return ( - s && - !h.isBuffer(t) && - (t = (function (t) { - return h.from(t); - })(t)), - 'function' == typeof e && ((r = e), (e = null)), - s ? (e = 'buffer') : e || (e = n.defaultEncoding), - 'function' != typeof r && (r = M), - n.ending - ? (function (t, e) { - var r = new v(); - _(t, r), process.nextTick(e, r); - })(this, r) - : (s || - (function (t, e, r, i) { - var n; - return ( - null === r ? (n = new y()) : 'string' == typeof r || e.objectMode || (n = new d('chunk', ['string', 'Buffer'], r)), - !n || (_(t, n), process.nextTick(i, n), !1) - ); - })(this, n, t, r)) && - (n.pendingcb++, - (o = (function (t, e, r, i, n, o) { - if (!r) { - var s = (function (t, e, r) { - return t.objectMode || !1 === t.decodeStrings || 'string' != typeof e || (e = h.from(e, r)), e; - })(e, i, n); - i !== s && ((r = !0), (n = 'buffer'), (i = s)); - } - var a = e.objectMode ? 1 : i.length; - e.length += a; - var u = e.length < e.highWaterMark; - if ((u || (e.needDrain = !0), e.writing || e.corked)) { - var f = e.lastBufferedRequest; - (e.lastBufferedRequest = { chunk: i, encoding: n, isBuf: r, callback: o, next: null }), - f ? (f.next = e.lastBufferedRequest) : (e.bufferedRequest = e.lastBufferedRequest), - (e.bufferedRequestCount += 1); - } else x(t, e, !1, a, i, n, o); - return u; - })(this, n, s, t, e, r))), - o - ); - }), - (S.prototype.cork = function () { - this._writableState.corked++; - }), - (S.prototype.uncork = function () { - var t = this._writableState; - t.corked && (t.corked--, t.writing || t.corked || t.bufferProcessing || !t.bufferedRequest || k(this, t)); - }), - (S.prototype.setDefaultEncoding = function (t) { - if ( - ('string' == typeof t && (t = t.toLowerCase()), - !( - ['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf( - (t + '').toLowerCase() - ) > -1 - )) - ) - throw new w(t); - return (this._writableState.defaultEncoding = t), this; - }), - Object.defineProperty(S.prototype, 'writableBuffer', { - enumerable: !1, - get: function () { - return this._writableState && this._writableState.getBuffer(); - }, - }), - Object.defineProperty(S.prototype, 'writableHighWaterMark', { - enumerable: !1, - get: function () { - return this._writableState.highWaterMark; - }, - }), - (S.prototype._write = function (t, e, r) { - r(new p('_write()')); - }), - (S.prototype._writev = null), - (S.prototype.end = function (t, e, r) { - var i = this._writableState; - return ( - 'function' == typeof t ? ((r = t), (t = null), (e = null)) : 'function' == typeof e && ((r = e), (e = null)), - null != t && this.write(t, e), - i.corked && ((i.corked = 1), this.uncork()), - i.ending || - (function (t, e, r) { - (e.ending = !0), - I(t, e), - r && (e.finished ? process.nextTick(r) : t.once('finish', r)), - (e.ended = !0), - (t.writable = !1); - })(this, i, r), - this - ); - }), - Object.defineProperty(S.prototype, 'writableLength', { - enumerable: !1, - get: function () { - return this._writableState.length; - }, - }), - Object.defineProperty(S.prototype, 'destroyed', { - enumerable: !1, - get: function () { - return void 0 !== this._writableState && this._writableState.destroyed; - }, - set: function (t) { - this._writableState && (this._writableState.destroyed = t); - }, - }), - (S.prototype.destroy = f.destroy), - (S.prototype._undestroy = f.undestroy), - (S.prototype._destroy = function (t, e) { - e(t); - }); - }, - 1519: (t, e, r) => { - 'use strict'; - var i; - function n(t, e, r) { - return e in t ? Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : (t[e] = r), t; - } - var o = r(4413), - s = Symbol('lastResolve'), - a = Symbol('lastReject'), - h = Symbol('error'), - u = Symbol('ended'), - f = Symbol('lastPromise'), - c = Symbol('handlePromise'), - l = Symbol('stream'); - function d(t, e) { - return { value: t, done: e }; - } - function p(t) { - var e = t[s]; - if (null !== e) { - var r = t[l].read(); - null !== r && ((t[f] = null), (t[s] = null), (t[a] = null), e(d(r, !1))); - } - } - function m(t) { - process.nextTick(p, t); - } - var g = Object.getPrototypeOf(function () {}), - b = Object.setPrototypeOf( - (n( - (i = { - get stream() { - return this[l]; - }, - next: function () { - var t = this, - e = this[h]; - if (null !== e) return Promise.reject(e); - if (this[u]) return Promise.resolve(d(void 0, !0)); - if (this[l].destroyed) - return new Promise(function (e, r) { - process.nextTick(function () { - t[h] ? r(t[h]) : e(d(void 0, !0)); - }); - }); - var r, - i = this[f]; - if (i) - r = new Promise( - (function (t, e) { - return function (r, i) { - t.then(function () { - e[u] ? r(d(void 0, !0)) : e[c](r, i); - }, i); - }; - })(i, this) - ); - else { - var n = this[l].read(); - if (null !== n) return Promise.resolve(d(n, !1)); - r = new Promise(this[c]); - } - return (this[f] = r), r; - }, - }), - Symbol.asyncIterator, - function () { - return this; - } - ), - n(i, 'return', function () { - var t = this; - return new Promise(function (e, r) { - t[l].destroy(null, function (t) { - t ? r(t) : e(d(void 0, !0)); - }); - }); - }), - i), - g - ); - t.exports = function (t) { - var e, - r = Object.create( - b, - (n((e = {}), l, { value: t, writable: !0 }), - n(e, s, { value: null, writable: !0 }), - n(e, a, { value: null, writable: !0 }), - n(e, h, { value: null, writable: !0 }), - n(e, u, { value: t._readableState.endEmitted, writable: !0 }), - n(e, c, { - value: function (t, e) { - var i = r[l].read(); - i ? ((r[f] = null), (r[s] = null), (r[a] = null), t(d(i, !1))) : ((r[s] = t), (r[a] = e)); - }, - writable: !0, - }), - e) - ); - return ( - (r[f] = null), - o(t, function (t) { - if (t && 'ERR_STREAM_PREMATURE_CLOSE' !== t.code) { - var e = r[a]; - return null !== e && ((r[f] = null), (r[s] = null), (r[a] = null), e(t)), void (r[h] = t); - } - var i = r[s]; - null !== i && ((r[f] = null), (r[s] = null), (r[a] = null), i(d(void 0, !0))), (r[u] = !0); - }), - t.on('readable', m.bind(null, r)), - r - ); - }; - }, - 8049: (t, e, r) => { - 'use strict'; - function i(t, e) { - var r = Object.keys(t); - if (Object.getOwnPropertySymbols) { - var i = Object.getOwnPropertySymbols(t); - e && - (i = i.filter(function (e) { - return Object.getOwnPropertyDescriptor(t, e).enumerable; - })), - r.push.apply(r, i); - } - return r; - } - function n(t, e, r) { - return e in t ? Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : (t[e] = r), t; - } - function o(t, e) { - for (var r = 0; r < e.length; r++) { - var i = e[r]; - (i.enumerable = i.enumerable || !1), - (i.configurable = !0), - 'value' in i && (i.writable = !0), - Object.defineProperty(t, i.key, i); - } - } - var s = r(816).Buffer, - a = r(4318).inspect, - h = (a && a.custom) || 'inspect'; - t.exports = (function () { - function t() { - !(function (t, e) { - if (!(t instanceof e)) throw new TypeError('Cannot call a class as a function'); - })(this, t), - (this.head = null), - (this.tail = null), - (this.length = 0); - } - var e, r; - return ( - (e = t), - (r = [ - { - key: 'push', - value: function (t) { - var e = { data: t, next: null }; - this.length > 0 ? (this.tail.next = e) : (this.head = e), (this.tail = e), ++this.length; - }, - }, - { - key: 'unshift', - value: function (t) { - var e = { data: t, next: this.head }; - 0 === this.length && (this.tail = e), (this.head = e), ++this.length; - }, - }, - { - key: 'shift', - value: function () { - if (0 !== this.length) { - var t = this.head.data; - return 1 === this.length ? (this.head = this.tail = null) : (this.head = this.head.next), --this.length, t; - } - }, - }, - { - key: 'clear', - value: function () { - (this.head = this.tail = null), (this.length = 0); - }, - }, - { - key: 'join', - value: function (t) { - if (0 === this.length) return ''; - for (var e = this.head, r = '' + e.data; (e = e.next); ) r += t + e.data; - return r; - }, - }, - { - key: 'concat', - value: function (t) { - if (0 === this.length) return s.alloc(0); - for (var e, r, i, n = s.allocUnsafe(t >>> 0), o = this.head, a = 0; o; ) - (e = o.data), (r = n), (i = a), s.prototype.copy.call(e, r, i), (a += o.data.length), (o = o.next); - return n; - }, - }, - { - key: 'consume', - value: function (t, e) { - var r; - return ( - t < this.head.data.length - ? ((r = this.head.data.slice(0, t)), (this.head.data = this.head.data.slice(t))) - : (r = t === this.head.data.length ? this.shift() : e ? this._getString(t) : this._getBuffer(t)), - r - ); - }, - }, - { - key: 'first', - value: function () { - return this.head.data; - }, - }, - { - key: '_getString', - value: function (t) { - var e = this.head, - r = 1, - i = e.data; - for (t -= i.length; (e = e.next); ) { - var n = e.data, - o = t > n.length ? n.length : t; - if ((o === n.length ? (i += n) : (i += n.slice(0, t)), 0 == (t -= o))) { - o === n.length - ? (++r, e.next ? (this.head = e.next) : (this.head = this.tail = null)) - : ((this.head = e), (e.data = n.slice(o))); - break; - } - ++r; - } - return (this.length -= r), i; - }, - }, - { - key: '_getBuffer', - value: function (t) { - var e = s.allocUnsafe(t), - r = this.head, - i = 1; - for (r.data.copy(e), t -= r.data.length; (r = r.next); ) { - var n = r.data, - o = t > n.length ? n.length : t; - if ((n.copy(e, e.length - t, 0, o), 0 == (t -= o))) { - o === n.length - ? (++i, r.next ? (this.head = r.next) : (this.head = this.tail = null)) - : ((this.head = r), (r.data = n.slice(o))); - break; - } - ++i; - } - return (this.length -= i), e; - }, - }, - { - key: h, - value: function (t, e) { - return a( - this, - (function (t) { - for (var e = 1; e < arguments.length; e++) { - var r = null != arguments[e] ? arguments[e] : {}; - e % 2 - ? i(Object(r), !0).forEach(function (e) { - n(t, e, r[e]); - }) - : Object.getOwnPropertyDescriptors - ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) - : i(Object(r)).forEach(function (e) { - Object.defineProperty(t, e, Object.getOwnPropertyDescriptor(r, e)); - }); - } - return t; - })({}, e, { depth: 0, customInspect: !1 }) - ); - }, - }, - ]), - r && o(e.prototype, r), - t - ); - })(); - }, - 9591: t => { - 'use strict'; - function e(t, e) { - i(t, e), r(t); - } - function r(t) { - (t._writableState && !t._writableState.emitClose) || (t._readableState && !t._readableState.emitClose) || t.emit('close'); - } - function i(t, e) { - t.emit('error', e); - } - t.exports = { - destroy: function (t, n) { - var o = this, - s = this._readableState && this._readableState.destroyed, - a = this._writableState && this._writableState.destroyed; - return s || a - ? (n - ? n(t) - : t && - (this._writableState - ? this._writableState.errorEmitted || ((this._writableState.errorEmitted = !0), process.nextTick(i, this, t)) - : process.nextTick(i, this, t)), - this) - : (this._readableState && (this._readableState.destroyed = !0), - this._writableState && (this._writableState.destroyed = !0), - this._destroy(t || null, function (t) { - !n && t - ? o._writableState - ? o._writableState.errorEmitted - ? process.nextTick(r, o) - : ((o._writableState.errorEmitted = !0), process.nextTick(e, o, t)) - : process.nextTick(e, o, t) - : n - ? (process.nextTick(r, o), n(t)) - : process.nextTick(r, o); - }), - this); - }, - undestroy: function () { - this._readableState && - ((this._readableState.destroyed = !1), - (this._readableState.reading = !1), - (this._readableState.ended = !1), - (this._readableState.endEmitted = !1)), - this._writableState && - ((this._writableState.destroyed = !1), - (this._writableState.ended = !1), - (this._writableState.ending = !1), - (this._writableState.finalCalled = !1), - (this._writableState.prefinished = !1), - (this._writableState.finished = !1), - (this._writableState.errorEmitted = !1)); - }, - errorOrDestroy: function (t, e) { - var r = t._readableState, - i = t._writableState; - (r && r.autoDestroy) || (i && i.autoDestroy) ? t.destroy(e) : t.emit('error', e); - }, - }; - }, - 4413: (t, e, r) => { - 'use strict'; - var i = r(4004).q.ERR_STREAM_PREMATURE_CLOSE; - function n() {} - t.exports = function t(e, r, o) { - if ('function' == typeof r) return t(e, null, r); - r || (r = {}), - (o = (function (t) { - var e = !1; - return function () { - if (!e) { - e = !0; - for (var r = arguments.length, i = new Array(r), n = 0; n < r; n++) i[n] = arguments[n]; - t.apply(this, i); - } - }; - })(o || n)); - var s = r.readable || (!1 !== r.readable && e.readable), - a = r.writable || (!1 !== r.writable && e.writable), - h = function () { - e.writable || f(); - }, - u = e._writableState && e._writableState.finished, - f = function () { - (a = !1), (u = !0), s || o.call(e); - }, - c = e._readableState && e._readableState.endEmitted, - l = function () { - (s = !1), (c = !0), a || o.call(e); - }, - d = function (t) { - o.call(e, t); - }, - p = function () { - var t; - return s && !c - ? ((e._readableState && e._readableState.ended) || (t = new i()), o.call(e, t)) - : a && !u - ? ((e._writableState && e._writableState.ended) || (t = new i()), o.call(e, t)) - : void 0; - }, - m = function () { - e.req.on('finish', f); - }; - return ( - (function (t) { - return t.setHeader && 'function' == typeof t.abort; - })(e) - ? (e.on('complete', f), e.on('abort', p), e.req ? m() : e.on('request', m)) - : a && !e._writableState && (e.on('end', h), e.on('close', h)), - e.on('end', l), - e.on('finish', f), - !1 !== r.error && e.on('error', d), - e.on('close', p), - function () { - e.removeListener('complete', f), - e.removeListener('abort', p), - e.removeListener('request', m), - e.req && e.req.removeListener('finish', f), - e.removeListener('end', h), - e.removeListener('close', h), - e.removeListener('finish', f), - e.removeListener('end', l), - e.removeListener('error', d), - e.removeListener('close', p); - } - ); - }; - }, - 8727: t => { - t.exports = function () { - throw new Error('Readable.from is not available in the browser'); - }; - }, - 9638: (t, e, r) => { - 'use strict'; - var i, - n = r(4004).q, - o = n.ERR_MISSING_ARGS, - s = n.ERR_STREAM_DESTROYED; - function a(t) { - if (t) throw t; - } - function h(t) { - t(); - } - function u(t, e) { - return t.pipe(e); - } - t.exports = function () { - for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++) e[n] = arguments[n]; - var f, - c = (function (t) { - return t.length ? ('function' != typeof t[t.length - 1] ? a : t.pop()) : a; - })(e); - if ((Array.isArray(e[0]) && (e = e[0]), e.length < 2)) throw new o('streams'); - var l = e.map(function (t, n) { - var o = n < e.length - 1; - return (function (t, e, n, o) { - o = (function (t) { - var e = !1; - return function () { - e || ((e = !0), t.apply(void 0, arguments)); - }; - })(o); - var a = !1; - t.on('close', function () { - a = !0; - }), - void 0 === i && (i = r(4413)), - i(t, { readable: e, writable: n }, function (t) { - if (t) return o(t); - (a = !0), o(); - }); - var h = !1; - return function (e) { - if (!a && !h) - return ( - (h = !0), - (function (t) { - return t.setHeader && 'function' == typeof t.abort; - })(t) - ? t.abort() - : 'function' == typeof t.destroy - ? t.destroy() - : void o(e || new s('pipe')) - ); - }; - })(t, o, n > 0, function (t) { - f || (f = t), t && l.forEach(h), o || (l.forEach(h), c(f)); - }); - }); - return e.reduce(u); - }; - }, - 7452: (t, e, r) => { - 'use strict'; - var i = r(4004).q.ERR_INVALID_OPT_VALUE; - t.exports = { - getHighWaterMark: function (t, e, r, n) { - var o = (function (t, e, r) { - return null != t.highWaterMark ? t.highWaterMark : e ? t[r] : null; - })(e, n, r); - if (null != o) { - if (!isFinite(o) || Math.floor(o) !== o || o < 0) throw new i(n ? r : 'highWaterMark', o); - return Math.floor(o); - } - return t.objectMode ? 16 : 16384; - }, - }; - }, - 4358: (t, e, r) => { - t.exports = r(343).EventEmitter; - }, - 1457: (t, e, r) => { - ((e = t.exports = r(767)).Stream = e), - (e.Readable = e), - (e.Writable = r(4608)), - (e.Duplex = r(1033)), - (e.Transform = r(2637)), - (e.PassThrough = r(3546)), - (e.finished = r(4413)), - (e.pipeline = r(9638)); - }, - 5294: (t, e, r) => { - var i = e; - (i.utils = r(8626)), - (i.common = r(8717)), - (i.sha = r(2589)), - (i.ripemd = r(8978)), - (i.hmac = r(2750)), - (i.sha1 = i.sha.sha1), - (i.sha256 = i.sha.sha256), - (i.sha224 = i.sha.sha224), - (i.sha384 = i.sha.sha384), - (i.sha512 = i.sha.sha512), - (i.ripemd160 = i.ripemd.ripemd160); - }, - 8717: (t, e, r) => { - 'use strict'; - var i = r(8626), - n = r(7859); - function o() { - (this.pending = null), - (this.pendingTotal = 0), - (this.blockSize = this.constructor.blockSize), - (this.outSize = this.constructor.outSize), - (this.hmacStrength = this.constructor.hmacStrength), - (this.padLength = this.constructor.padLength / 8), - (this.endian = 'big'), - (this._delta8 = this.blockSize / 8), - (this._delta32 = this.blockSize / 32); - } - (e.BlockHash = o), - (o.prototype.update = function (t, e) { - if ( - ((t = i.toArray(t, e)), - this.pending ? (this.pending = this.pending.concat(t)) : (this.pending = t), - (this.pendingTotal += t.length), - this.pending.length >= this._delta8) - ) { - var r = (t = this.pending).length % this._delta8; - (this.pending = t.slice(t.length - r, t.length)), - 0 === this.pending.length && (this.pending = null), - (t = i.join32(t, 0, t.length - r, this.endian)); - for (var n = 0; n < t.length; n += this._delta32) this._update(t, n, n + this._delta32); - } - return this; - }), - (o.prototype.digest = function (t) { - return this.update(this._pad()), n(null === this.pending), this._digest(t); - }), - (o.prototype._pad = function () { - var t = this.pendingTotal, - e = this._delta8, - r = e - ((t + this.padLength) % e), - i = new Array(r + this.padLength); - i[0] = 128; - for (var n = 1; n < r; n++) i[n] = 0; - if (((t <<= 3), 'big' === this.endian)) { - for (var o = 8; o < this.padLength; o++) i[n++] = 0; - (i[n++] = 0), - (i[n++] = 0), - (i[n++] = 0), - (i[n++] = 0), - (i[n++] = (t >>> 24) & 255), - (i[n++] = (t >>> 16) & 255), - (i[n++] = (t >>> 8) & 255), - (i[n++] = 255 & t); - } else - for ( - i[n++] = 255 & t, - i[n++] = (t >>> 8) & 255, - i[n++] = (t >>> 16) & 255, - i[n++] = (t >>> 24) & 255, - i[n++] = 0, - i[n++] = 0, - i[n++] = 0, - i[n++] = 0, - o = 8; - o < this.padLength; - o++ - ) - i[n++] = 0; - return i; - }); - }, - 2750: (t, e, r) => { - 'use strict'; - var i = r(8626), - n = r(7859); - function o(t, e, r) { - if (!(this instanceof o)) return new o(t, e, r); - (this.Hash = t), - (this.blockSize = t.blockSize / 8), - (this.outSize = t.outSize / 8), - (this.inner = null), - (this.outer = null), - this._init(i.toArray(e, r)); - } - (t.exports = o), - (o.prototype._init = function (t) { - t.length > this.blockSize && (t = new this.Hash().update(t).digest()), n(t.length <= this.blockSize); - for (var e = t.length; e < this.blockSize; e++) t.push(0); - for (e = 0; e < t.length; e++) t[e] ^= 54; - for (this.inner = new this.Hash().update(t), e = 0; e < t.length; e++) t[e] ^= 106; - this.outer = new this.Hash().update(t); - }), - (o.prototype.update = function (t, e) { - return this.inner.update(t, e), this; - }), - (o.prototype.digest = function (t) { - return this.outer.update(this.inner.digest()), this.outer.digest(t); - }); - }, - 8978: (t, e, r) => { - 'use strict'; - var i = r(8626), - n = r(8717), - o = i.rotl32, - s = i.sum32, - a = i.sum32_3, - h = i.sum32_4, - u = n.BlockHash; - function f() { - if (!(this instanceof f)) return new f(); - u.call(this), (this.h = [1732584193, 4023233417, 2562383102, 271733878, 3285377520]), (this.endian = 'little'); - } - function c(t, e, r, i) { - return t <= 15 ? e ^ r ^ i : t <= 31 ? (e & r) | (~e & i) : t <= 47 ? (e | ~r) ^ i : t <= 63 ? (e & i) | (r & ~i) : e ^ (r | ~i); - } - function l(t) { - return t <= 15 ? 0 : t <= 31 ? 1518500249 : t <= 47 ? 1859775393 : t <= 63 ? 2400959708 : 2840853838; - } - function d(t) { - return t <= 15 ? 1352829926 : t <= 31 ? 1548603684 : t <= 47 ? 1836072691 : t <= 63 ? 2053994217 : 0; - } - i.inherits(f, u), - (e.ripemd160 = f), - (f.blockSize = 512), - (f.outSize = 160), - (f.hmacStrength = 192), - (f.padLength = 64), - (f.prototype._update = function (t, e) { - for ( - var r = this.h[0], i = this.h[1], n = this.h[2], u = this.h[3], f = this.h[4], y = r, v = i, w = n, _ = u, M = f, E = 0; - E < 80; - E++ - ) { - var S = s(o(h(r, c(E, i, n, u), t[p[E] + e], l(E)), g[E]), f); - (r = f), - (f = u), - (u = o(n, 10)), - (n = i), - (i = S), - (S = s(o(h(y, c(79 - E, v, w, _), t[m[E] + e], d(E)), b[E]), M)), - (y = M), - (M = _), - (_ = o(w, 10)), - (w = v), - (v = S); - } - (S = a(this.h[1], n, _)), - (this.h[1] = a(this.h[2], u, M)), - (this.h[2] = a(this.h[3], f, y)), - (this.h[3] = a(this.h[4], r, v)), - (this.h[4] = a(this.h[0], i, w)), - (this.h[0] = S); - }), - (f.prototype._digest = function (t) { - return 'hex' === t ? i.toHex32(this.h, 'little') : i.split32(this.h, 'little'); - }); - var p = [ - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8, 3, 10, 14, 4, 9, 15, - 8, 1, 2, 7, 0, 6, 13, 11, 5, 12, 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2, 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, - 11, 6, 15, 13, - ], - m = [ - 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2, 15, 5, 1, 3, 7, 14, - 6, 9, 11, 8, 12, 2, 10, 0, 4, 13, 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14, 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, - 0, 3, 9, 11, - ], - g = [ - 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12, 11, 13, 6, 7, - 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5, 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12, 9, 15, 5, 11, 6, 8, 13, 12, 5, - 12, 13, 14, 11, 8, 5, 6, - ], - b = [ - 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6, 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11, 9, 7, 15, 11, 8, - 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5, 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8, 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, - 6, 5, 15, 13, 11, 11, - ]; - }, - 2589: (t, e, r) => { - 'use strict'; - (e.sha1 = r(9330)), (e.sha224 = r(5168)), (e.sha256 = r(375)), (e.sha384 = r(8899)), (e.sha512 = r(790)); - }, - 9330: (t, e, r) => { - 'use strict'; - var i = r(8626), - n = r(8717), - o = r(8156), - s = i.rotl32, - a = i.sum32, - h = i.sum32_5, - u = o.ft_1, - f = n.BlockHash, - c = [1518500249, 1859775393, 2400959708, 3395469782]; - function l() { - if (!(this instanceof l)) return new l(); - f.call(this), (this.h = [1732584193, 4023233417, 2562383102, 271733878, 3285377520]), (this.W = new Array(80)); - } - i.inherits(l, f), - (t.exports = l), - (l.blockSize = 512), - (l.outSize = 160), - (l.hmacStrength = 80), - (l.padLength = 64), - (l.prototype._update = function (t, e) { - for (var r = this.W, i = 0; i < 16; i++) r[i] = t[e + i]; - for (; i < r.length; i++) r[i] = s(r[i - 3] ^ r[i - 8] ^ r[i - 14] ^ r[i - 16], 1); - var n = this.h[0], - o = this.h[1], - f = this.h[2], - l = this.h[3], - d = this.h[4]; - for (i = 0; i < r.length; i++) { - var p = ~~(i / 20), - m = h(s(n, 5), u(p, o, f, l), d, r[i], c[p]); - (d = l), (l = f), (f = s(o, 30)), (o = n), (n = m); - } - (this.h[0] = a(this.h[0], n)), - (this.h[1] = a(this.h[1], o)), - (this.h[2] = a(this.h[2], f)), - (this.h[3] = a(this.h[3], l)), - (this.h[4] = a(this.h[4], d)); - }), - (l.prototype._digest = function (t) { - return 'hex' === t ? i.toHex32(this.h, 'big') : i.split32(this.h, 'big'); - }); - }, - 5168: (t, e, r) => { - 'use strict'; - var i = r(8626), - n = r(375); - function o() { - if (!(this instanceof o)) return new o(); - n.call(this), (this.h = [3238371032, 914150663, 812702999, 4144912697, 4290775857, 1750603025, 1694076839, 3204075428]); - } - i.inherits(o, n), - (t.exports = o), - (o.blockSize = 512), - (o.outSize = 224), - (o.hmacStrength = 192), - (o.padLength = 64), - (o.prototype._digest = function (t) { - return 'hex' === t ? i.toHex32(this.h.slice(0, 7), 'big') : i.split32(this.h.slice(0, 7), 'big'); - }); - }, - 375: (t, e, r) => { - 'use strict'; - var i = r(8626), - n = r(8717), - o = r(8156), - s = r(7859), - a = i.sum32, - h = i.sum32_4, - u = i.sum32_5, - f = o.ch32, - c = o.maj32, - l = o.s0_256, - d = o.s1_256, - p = o.g0_256, - m = o.g1_256, - g = n.BlockHash, - b = [ - 1116352408, 1899447441, 3049323471, 3921009573, 961987163, 1508970993, 2453635748, 2870763221, 3624381080, 310598401, 607225278, - 1426881987, 1925078388, 2162078206, 2614888103, 3248222580, 3835390401, 4022224774, 264347078, 604807628, 770255983, 1249150122, - 1555081692, 1996064986, 2554220882, 2821834349, 2952996808, 3210313671, 3336571891, 3584528711, 113926993, 338241895, 666307205, - 773529912, 1294757372, 1396182291, 1695183700, 1986661051, 2177026350, 2456956037, 2730485921, 2820302411, 3259730800, - 3345764771, 3516065817, 3600352804, 4094571909, 275423344, 430227734, 506948616, 659060556, 883997877, 958139571, 1322822218, - 1537002063, 1747873779, 1955562222, 2024104815, 2227730452, 2361852424, 2428436474, 2756734187, 3204031479, 3329325298, - ]; - function y() { - if (!(this instanceof y)) return new y(); - g.call(this), - (this.h = [1779033703, 3144134277, 1013904242, 2773480762, 1359893119, 2600822924, 528734635, 1541459225]), - (this.k = b), - (this.W = new Array(64)); - } - i.inherits(y, g), - (t.exports = y), - (y.blockSize = 512), - (y.outSize = 256), - (y.hmacStrength = 192), - (y.padLength = 64), - (y.prototype._update = function (t, e) { - for (var r = this.W, i = 0; i < 16; i++) r[i] = t[e + i]; - for (; i < r.length; i++) r[i] = h(m(r[i - 2]), r[i - 7], p(r[i - 15]), r[i - 16]); - var n = this.h[0], - o = this.h[1], - g = this.h[2], - b = this.h[3], - y = this.h[4], - v = this.h[5], - w = this.h[6], - _ = this.h[7]; - for (s(this.k.length === r.length), i = 0; i < r.length; i++) { - var M = u(_, d(y), f(y, v, w), this.k[i], r[i]), - E = a(l(n), c(n, o, g)); - (_ = w), (w = v), (v = y), (y = a(b, M)), (b = g), (g = o), (o = n), (n = a(M, E)); - } - (this.h[0] = a(this.h[0], n)), - (this.h[1] = a(this.h[1], o)), - (this.h[2] = a(this.h[2], g)), - (this.h[3] = a(this.h[3], b)), - (this.h[4] = a(this.h[4], y)), - (this.h[5] = a(this.h[5], v)), - (this.h[6] = a(this.h[6], w)), - (this.h[7] = a(this.h[7], _)); - }), - (y.prototype._digest = function (t) { - return 'hex' === t ? i.toHex32(this.h, 'big') : i.split32(this.h, 'big'); - }); - }, - 8899: (t, e, r) => { - 'use strict'; - var i = r(8626), - n = r(790); - function o() { - if (!(this instanceof o)) return new o(); - n.call(this), - (this.h = [ - 3418070365, 3238371032, 1654270250, 914150663, 2438529370, 812702999, 355462360, 4144912697, 1731405415, 4290775857, - 2394180231, 1750603025, 3675008525, 1694076839, 1203062813, 3204075428, - ]); - } - i.inherits(o, n), - (t.exports = o), - (o.blockSize = 1024), - (o.outSize = 384), - (o.hmacStrength = 192), - (o.padLength = 128), - (o.prototype._digest = function (t) { - return 'hex' === t ? i.toHex32(this.h.slice(0, 12), 'big') : i.split32(this.h.slice(0, 12), 'big'); - }); - }, - 790: (t, e, r) => { - 'use strict'; - var i = r(8626), - n = r(8717), - o = r(7859), - s = i.rotr64_hi, - a = i.rotr64_lo, - h = i.shr64_hi, - u = i.shr64_lo, - f = i.sum64, - c = i.sum64_hi, - l = i.sum64_lo, - d = i.sum64_4_hi, - p = i.sum64_4_lo, - m = i.sum64_5_hi, - g = i.sum64_5_lo, - b = n.BlockHash, - y = [ - 1116352408, 3609767458, 1899447441, 602891725, 3049323471, 3964484399, 3921009573, 2173295548, 961987163, 4081628472, - 1508970993, 3053834265, 2453635748, 2937671579, 2870763221, 3664609560, 3624381080, 2734883394, 310598401, 1164996542, - 607225278, 1323610764, 1426881987, 3590304994, 1925078388, 4068182383, 2162078206, 991336113, 2614888103, 633803317, 3248222580, - 3479774868, 3835390401, 2666613458, 4022224774, 944711139, 264347078, 2341262773, 604807628, 2007800933, 770255983, 1495990901, - 1249150122, 1856431235, 1555081692, 3175218132, 1996064986, 2198950837, 2554220882, 3999719339, 2821834349, 766784016, - 2952996808, 2566594879, 3210313671, 3203337956, 3336571891, 1034457026, 3584528711, 2466948901, 113926993, 3758326383, - 338241895, 168717936, 666307205, 1188179964, 773529912, 1546045734, 1294757372, 1522805485, 1396182291, 2643833823, 1695183700, - 2343527390, 1986661051, 1014477480, 2177026350, 1206759142, 2456956037, 344077627, 2730485921, 1290863460, 2820302411, - 3158454273, 3259730800, 3505952657, 3345764771, 106217008, 3516065817, 3606008344, 3600352804, 1432725776, 4094571909, - 1467031594, 275423344, 851169720, 430227734, 3100823752, 506948616, 1363258195, 659060556, 3750685593, 883997877, 3785050280, - 958139571, 3318307427, 1322822218, 3812723403, 1537002063, 2003034995, 1747873779, 3602036899, 1955562222, 1575990012, - 2024104815, 1125592928, 2227730452, 2716904306, 2361852424, 442776044, 2428436474, 593698344, 2756734187, 3733110249, - 3204031479, 2999351573, 3329325298, 3815920427, 3391569614, 3928383900, 3515267271, 566280711, 3940187606, 3454069534, - 4118630271, 4000239992, 116418474, 1914138554, 174292421, 2731055270, 289380356, 3203993006, 460393269, 320620315, 685471733, - 587496836, 852142971, 1086792851, 1017036298, 365543100, 1126000580, 2618297676, 1288033470, 3409855158, 1501505948, 4234509866, - 1607167915, 987167468, 1816402316, 1246189591, - ]; - function v() { - if (!(this instanceof v)) return new v(); - b.call(this), - (this.h = [ - 1779033703, 4089235720, 3144134277, 2227873595, 1013904242, 4271175723, 2773480762, 1595750129, 1359893119, 2917565137, - 2600822924, 725511199, 528734635, 4215389547, 1541459225, 327033209, - ]), - (this.k = y), - (this.W = new Array(160)); - } - function w(t, e, r, i, n) { - var o = (t & r) ^ (~t & n); - return o < 0 && (o += 4294967296), o; - } - function _(t, e, r, i, n, o) { - var s = (e & i) ^ (~e & o); - return s < 0 && (s += 4294967296), s; - } - function M(t, e, r, i, n) { - var o = (t & r) ^ (t & n) ^ (r & n); - return o < 0 && (o += 4294967296), o; - } - function E(t, e, r, i, n, o) { - var s = (e & i) ^ (e & o) ^ (i & o); - return s < 0 && (s += 4294967296), s; - } - function S(t, e) { - var r = s(t, e, 28) ^ s(e, t, 2) ^ s(e, t, 7); - return r < 0 && (r += 4294967296), r; - } - function x(t, e) { - var r = a(t, e, 28) ^ a(e, t, 2) ^ a(e, t, 7); - return r < 0 && (r += 4294967296), r; - } - function A(t, e) { - var r = a(t, e, 14) ^ a(t, e, 18) ^ a(e, t, 9); - return r < 0 && (r += 4294967296), r; - } - function k(t, e) { - var r = s(t, e, 1) ^ s(t, e, 8) ^ h(t, e, 7); - return r < 0 && (r += 4294967296), r; - } - function R(t, e) { - var r = a(t, e, 1) ^ a(t, e, 8) ^ u(t, e, 7); - return r < 0 && (r += 4294967296), r; - } - function B(t, e) { - var r = a(t, e, 19) ^ a(e, t, 29) ^ u(t, e, 6); - return r < 0 && (r += 4294967296), r; - } - i.inherits(v, b), - (t.exports = v), - (v.blockSize = 1024), - (v.outSize = 512), - (v.hmacStrength = 192), - (v.padLength = 128), - (v.prototype._prepareBlock = function (t, e) { - for (var r = this.W, i = 0; i < 32; i++) r[i] = t[e + i]; - for (; i < r.length; i += 2) { - var n = - ((g = r[i - 4]), (b = r[i - 3]), (y = void 0), (y = s(g, b, 19) ^ s(b, g, 29) ^ h(g, b, 6)) < 0 && (y += 4294967296), y), - o = B(r[i - 4], r[i - 3]), - a = r[i - 14], - u = r[i - 13], - f = k(r[i - 30], r[i - 29]), - c = R(r[i - 30], r[i - 29]), - l = r[i - 32], - m = r[i - 31]; - (r[i] = d(n, o, a, u, f, c, l, m)), (r[i + 1] = p(n, o, a, u, f, c, l, m)); - } - var g, b, y; - }), - (v.prototype._update = function (t, e) { - this._prepareBlock(t, e); - var r, - i, - n, - a = this.W, - h = this.h[0], - u = this.h[1], - d = this.h[2], - p = this.h[3], - b = this.h[4], - y = this.h[5], - v = this.h[6], - k = this.h[7], - R = this.h[8], - B = this.h[9], - I = this.h[10], - T = this.h[11], - P = this.h[12], - O = this.h[13], - L = this.h[14], - C = this.h[15]; - o(this.k.length === a.length); - for (var N = 0; N < a.length; N += 2) { - var j = L, - U = C, - D = ((n = void 0), (n = s((r = R), (i = B), 14) ^ s(r, i, 18) ^ s(i, r, 9)) < 0 && (n += 4294967296), n), - z = A(R, B), - F = w(R, 0, I, 0, P), - q = _(0, B, 0, T, 0, O), - H = this.k[N], - $ = this.k[N + 1], - Z = a[N], - G = a[N + 1], - V = m(j, U, D, z, F, q, H, $, Z, G), - W = g(j, U, D, z, F, q, H, $, Z, G); - (j = S(h, u)), (U = x(h, u)), (D = M(h, 0, d, 0, b)), (z = E(0, u, 0, p, 0, y)); - var K = c(j, U, D, z), - Y = l(j, U, D, z); - (L = P), - (C = O), - (P = I), - (O = T), - (I = R), - (T = B), - (R = c(v, k, V, W)), - (B = l(k, k, V, W)), - (v = b), - (k = y), - (b = d), - (y = p), - (d = h), - (p = u), - (h = c(V, W, K, Y)), - (u = l(V, W, K, Y)); - } - f(this.h, 0, h, u), - f(this.h, 2, d, p), - f(this.h, 4, b, y), - f(this.h, 6, v, k), - f(this.h, 8, R, B), - f(this.h, 10, I, T), - f(this.h, 12, P, O), - f(this.h, 14, L, C); - }), - (v.prototype._digest = function (t) { - return 'hex' === t ? i.toHex32(this.h, 'big') : i.split32(this.h, 'big'); - }); - }, - 8156: (t, e, r) => { - 'use strict'; - var i = r(8626).rotr32; - function n(t, e, r) { - return (t & e) ^ (~t & r); - } - function o(t, e, r) { - return (t & e) ^ (t & r) ^ (e & r); - } - function s(t, e, r) { - return t ^ e ^ r; - } - (e.ft_1 = function (t, e, r, i) { - return 0 === t ? n(e, r, i) : 1 === t || 3 === t ? s(e, r, i) : 2 === t ? o(e, r, i) : void 0; - }), - (e.ch32 = n), - (e.maj32 = o), - (e.p32 = s), - (e.s0_256 = function (t) { - return i(t, 2) ^ i(t, 13) ^ i(t, 22); - }), - (e.s1_256 = function (t) { - return i(t, 6) ^ i(t, 11) ^ i(t, 25); - }), - (e.g0_256 = function (t) { - return i(t, 7) ^ i(t, 18) ^ (t >>> 3); - }), - (e.g1_256 = function (t) { - return i(t, 17) ^ i(t, 19) ^ (t >>> 10); - }); - }, - 8626: (t, e, r) => { - 'use strict'; - var i = r(7859), - n = r(87); - function o(t, e) { - return 55296 == (64512 & t.charCodeAt(e)) && !(e < 0 || e + 1 >= t.length) && 56320 == (64512 & t.charCodeAt(e + 1)); - } - function s(t) { - return ((t >>> 24) | ((t >>> 8) & 65280) | ((t << 8) & 16711680) | ((255 & t) << 24)) >>> 0; - } - function a(t) { - return 1 === t.length ? '0' + t : t; - } - function h(t) { - return 7 === t.length - ? '0' + t - : 6 === t.length - ? '00' + t - : 5 === t.length - ? '000' + t - : 4 === t.length - ? '0000' + t - : 3 === t.length - ? '00000' + t - : 2 === t.length - ? '000000' + t - : 1 === t.length - ? '0000000' + t - : t; - } - (e.inherits = n), - (e.toArray = function (t, e) { - if (Array.isArray(t)) return t.slice(); - if (!t) return []; - var r = []; - if ('string' == typeof t) - if (e) { - if ('hex' === e) - for ((t = t.replace(/[^a-z0-9]+/gi, '')).length % 2 != 0 && (t = '0' + t), n = 0; n < t.length; n += 2) - r.push(parseInt(t[n] + t[n + 1], 16)); - } else - for (var i = 0, n = 0; n < t.length; n++) { - var s = t.charCodeAt(n); - s < 128 - ? (r[i++] = s) - : s < 2048 - ? ((r[i++] = (s >> 6) | 192), (r[i++] = (63 & s) | 128)) - : o(t, n) - ? ((s = 65536 + ((1023 & s) << 10) + (1023 & t.charCodeAt(++n))), - (r[i++] = (s >> 18) | 240), - (r[i++] = ((s >> 12) & 63) | 128), - (r[i++] = ((s >> 6) & 63) | 128), - (r[i++] = (63 & s) | 128)) - : ((r[i++] = (s >> 12) | 224), (r[i++] = ((s >> 6) & 63) | 128), (r[i++] = (63 & s) | 128)); - } - else for (n = 0; n < t.length; n++) r[n] = 0 | t[n]; - return r; - }), - (e.toHex = function (t) { - for (var e = '', r = 0; r < t.length; r++) e += a(t[r].toString(16)); - return e; - }), - (e.htonl = s), - (e.toHex32 = function (t, e) { - for (var r = '', i = 0; i < t.length; i++) { - var n = t[i]; - 'little' === e && (n = s(n)), (r += h(n.toString(16))); - } - return r; - }), - (e.zero2 = a), - (e.zero8 = h), - (e.join32 = function (t, e, r, n) { - var o = r - e; - i(o % 4 == 0); - for (var s = new Array(o / 4), a = 0, h = e; a < s.length; a++, h += 4) { - var u; - (u = - 'big' === n - ? (t[h] << 24) | (t[h + 1] << 16) | (t[h + 2] << 8) | t[h + 3] - : (t[h + 3] << 24) | (t[h + 2] << 16) | (t[h + 1] << 8) | t[h]), - (s[a] = u >>> 0); - } - return s; - }), - (e.split32 = function (t, e) { - for (var r = new Array(4 * t.length), i = 0, n = 0; i < t.length; i++, n += 4) { - var o = t[i]; - 'big' === e - ? ((r[n] = o >>> 24), (r[n + 1] = (o >>> 16) & 255), (r[n + 2] = (o >>> 8) & 255), (r[n + 3] = 255 & o)) - : ((r[n + 3] = o >>> 24), (r[n + 2] = (o >>> 16) & 255), (r[n + 1] = (o >>> 8) & 255), (r[n] = 255 & o)); - } - return r; - }), - (e.rotr32 = function (t, e) { - return (t >>> e) | (t << (32 - e)); - }), - (e.rotl32 = function (t, e) { - return (t << e) | (t >>> (32 - e)); - }), - (e.sum32 = function (t, e) { - return (t + e) >>> 0; - }), - (e.sum32_3 = function (t, e, r) { - return (t + e + r) >>> 0; - }), - (e.sum32_4 = function (t, e, r, i) { - return (t + e + r + i) >>> 0; - }), - (e.sum32_5 = function (t, e, r, i, n) { - return (t + e + r + i + n) >>> 0; - }), - (e.sum64 = function (t, e, r, i) { - var n = t[e], - o = (i + t[e + 1]) >>> 0, - s = (o < i ? 1 : 0) + r + n; - (t[e] = s >>> 0), (t[e + 1] = o); - }), - (e.sum64_hi = function (t, e, r, i) { - return (((e + i) >>> 0 < e ? 1 : 0) + t + r) >>> 0; - }), - (e.sum64_lo = function (t, e, r, i) { - return (e + i) >>> 0; - }), - (e.sum64_4_hi = function (t, e, r, i, n, o, s, a) { - var h = 0, - u = e; - return ( - (h += (u = (u + i) >>> 0) < e ? 1 : 0), - (h += (u = (u + o) >>> 0) < o ? 1 : 0), - (t + r + n + s + (h += (u = (u + a) >>> 0) < a ? 1 : 0)) >>> 0 - ); - }), - (e.sum64_4_lo = function (t, e, r, i, n, o, s, a) { - return (e + i + o + a) >>> 0; - }), - (e.sum64_5_hi = function (t, e, r, i, n, o, s, a, h, u) { - var f = 0, - c = e; - return ( - (f += (c = (c + i) >>> 0) < e ? 1 : 0), - (f += (c = (c + o) >>> 0) < o ? 1 : 0), - (f += (c = (c + a) >>> 0) < a ? 1 : 0), - (t + r + n + s + h + (f += (c = (c + u) >>> 0) < u ? 1 : 0)) >>> 0 - ); - }), - (e.sum64_5_lo = function (t, e, r, i, n, o, s, a, h, u) { - return (e + i + o + a + u) >>> 0; - }), - (e.rotr64_hi = function (t, e, r) { - return ((e << (32 - r)) | (t >>> r)) >>> 0; - }), - (e.rotr64_lo = function (t, e, r) { - return ((t << (32 - r)) | (e >>> r)) >>> 0; - }), - (e.shr64_hi = function (t, e, r) { - return t >>> r; - }), - (e.shr64_lo = function (t, e, r) { - return ((t << (32 - r)) | (e >>> r)) >>> 0; - }); - }, - 6513: (t, e, r) => { - 'use strict'; - var i = r(5294), - n = r(2910), - o = r(7859); - function s(t) { - if (!(this instanceof s)) return new s(t); - (this.hash = t.hash), - (this.predResist = !!t.predResist), - (this.outLen = this.hash.outSize), - (this.minEntropy = t.minEntropy || this.hash.hmacStrength), - (this._reseed = null), - (this.reseedInterval = null), - (this.K = null), - (this.V = null); - var e = n.toArray(t.entropy, t.entropyEnc || 'hex'), - r = n.toArray(t.nonce, t.nonceEnc || 'hex'), - i = n.toArray(t.pers, t.persEnc || 'hex'); - o(e.length >= this.minEntropy / 8, 'Not enough entropy. Minimum is: ' + this.minEntropy + ' bits'), this._init(e, r, i); - } - (t.exports = s), - (s.prototype._init = function (t, e, r) { - var i = t.concat(e).concat(r); - (this.K = new Array(this.outLen / 8)), (this.V = new Array(this.outLen / 8)); - for (var n = 0; n < this.V.length; n++) (this.K[n] = 0), (this.V[n] = 1); - this._update(i), (this._reseed = 1), (this.reseedInterval = 281474976710656); - }), - (s.prototype._hmac = function () { - return new i.hmac(this.hash, this.K); - }), - (s.prototype._update = function (t) { - var e = this._hmac().update(this.V).update([0]); - t && (e = e.update(t)), - (this.K = e.digest()), - (this.V = this._hmac().update(this.V).digest()), - t && ((this.K = this._hmac().update(this.V).update([1]).update(t).digest()), (this.V = this._hmac().update(this.V).digest())); - }), - (s.prototype.reseed = function (t, e, r, i) { - 'string' != typeof e && ((i = r), (r = e), (e = null)), - (t = n.toArray(t, e)), - (r = n.toArray(r, i)), - o(t.length >= this.minEntropy / 8, 'Not enough entropy. Minimum is: ' + this.minEntropy + ' bits'), - this._update(t.concat(r || [])), - (this._reseed = 1); - }), - (s.prototype.generate = function (t, e, r, i) { - if (this._reseed > this.reseedInterval) throw new Error('Reseed is required'); - 'string' != typeof e && ((i = r), (r = e), (e = null)), r && ((r = n.toArray(r, i || 'hex')), this._update(r)); - for (var o = []; o.length < t; ) (this.V = this._hmac().update(this.V).digest()), (o = o.concat(this.V)); - var s = o.slice(0, t); - return this._update(r), this._reseed++, n.encode(s, e); - }); - }, - 8898: (t, e) => { - (e.read = function (t, e, r, i, n) { - var o, - s, - a = 8 * n - i - 1, - h = (1 << a) - 1, - u = h >> 1, - f = -7, - c = r ? n - 1 : 0, - l = r ? -1 : 1, - d = t[e + c]; - for (c += l, o = d & ((1 << -f) - 1), d >>= -f, f += a; f > 0; o = 256 * o + t[e + c], c += l, f -= 8); - for (s = o & ((1 << -f) - 1), o >>= -f, f += i; f > 0; s = 256 * s + t[e + c], c += l, f -= 8); - if (0 === o) o = 1 - u; - else { - if (o === h) return s ? NaN : (1 / 0) * (d ? -1 : 1); - (s += Math.pow(2, i)), (o -= u); - } - return (d ? -1 : 1) * s * Math.pow(2, o - i); - }), - (e.write = function (t, e, r, i, n, o) { - var s, - a, - h, - u = 8 * o - n - 1, - f = (1 << u) - 1, - c = f >> 1, - l = 23 === n ? Math.pow(2, -24) - Math.pow(2, -77) : 0, - d = i ? 0 : o - 1, - p = i ? 1 : -1, - m = e < 0 || (0 === e && 1 / e < 0) ? 1 : 0; - for ( - e = Math.abs(e), - isNaN(e) || e === 1 / 0 - ? ((a = isNaN(e) ? 1 : 0), (s = f)) - : ((s = Math.floor(Math.log(e) / Math.LN2)), - e * (h = Math.pow(2, -s)) < 1 && (s--, (h *= 2)), - (e += s + c >= 1 ? l / h : l * Math.pow(2, 1 - c)) * h >= 2 && (s++, (h /= 2)), - s + c >= f - ? ((a = 0), (s = f)) - : s + c >= 1 - ? ((a = (e * h - 1) * Math.pow(2, n)), (s += c)) - : ((a = e * Math.pow(2, c - 1) * Math.pow(2, n)), (s = 0))); - n >= 8; - t[r + d] = 255 & a, d += p, a /= 256, n -= 8 - ); - for (s = (s << n) | a, u += n; u > 0; t[r + d] = 255 & s, d += p, s /= 256, u -= 8); - t[r + d - p] |= 128 * m; - }); - }, - 87: t => { - 'function' == typeof Object.create - ? (t.exports = function (t, e) { - e && - ((t.super_ = e), - (t.prototype = Object.create(e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } }))); - }) - : (t.exports = function (t, e) { - if (e) { - t.super_ = e; - var r = function () {}; - (r.prototype = e.prototype), (t.prototype = new r()), (t.prototype.constructor = t); - } - }); - }, - 9500: (t, e, r) => { - 'use strict'; - var i = r(87), - n = r(6883), - o = r(7172).Buffer, - s = new Array(16); - function a() { - n.call(this, 64), (this._a = 1732584193), (this._b = 4023233417), (this._c = 2562383102), (this._d = 271733878); - } - function h(t, e) { - return (t << e) | (t >>> (32 - e)); - } - function u(t, e, r, i, n, o, s) { - return (h((t + ((e & r) | (~e & i)) + n + o) | 0, s) + e) | 0; - } - function f(t, e, r, i, n, o, s) { - return (h((t + ((e & i) | (r & ~i)) + n + o) | 0, s) + e) | 0; - } - function c(t, e, r, i, n, o, s) { - return (h((t + (e ^ r ^ i) + n + o) | 0, s) + e) | 0; - } - function l(t, e, r, i, n, o, s) { - return (h((t + (r ^ (e | ~i)) + n + o) | 0, s) + e) | 0; - } - i(a, n), - (a.prototype._update = function () { - for (var t = s, e = 0; e < 16; ++e) t[e] = this._block.readInt32LE(4 * e); - var r = this._a, - i = this._b, - n = this._c, - o = this._d; - (r = u(r, i, n, o, t[0], 3614090360, 7)), - (o = u(o, r, i, n, t[1], 3905402710, 12)), - (n = u(n, o, r, i, t[2], 606105819, 17)), - (i = u(i, n, o, r, t[3], 3250441966, 22)), - (r = u(r, i, n, o, t[4], 4118548399, 7)), - (o = u(o, r, i, n, t[5], 1200080426, 12)), - (n = u(n, o, r, i, t[6], 2821735955, 17)), - (i = u(i, n, o, r, t[7], 4249261313, 22)), - (r = u(r, i, n, o, t[8], 1770035416, 7)), - (o = u(o, r, i, n, t[9], 2336552879, 12)), - (n = u(n, o, r, i, t[10], 4294925233, 17)), - (i = u(i, n, o, r, t[11], 2304563134, 22)), - (r = u(r, i, n, o, t[12], 1804603682, 7)), - (o = u(o, r, i, n, t[13], 4254626195, 12)), - (n = u(n, o, r, i, t[14], 2792965006, 17)), - (r = f(r, (i = u(i, n, o, r, t[15], 1236535329, 22)), n, o, t[1], 4129170786, 5)), - (o = f(o, r, i, n, t[6], 3225465664, 9)), - (n = f(n, o, r, i, t[11], 643717713, 14)), - (i = f(i, n, o, r, t[0], 3921069994, 20)), - (r = f(r, i, n, o, t[5], 3593408605, 5)), - (o = f(o, r, i, n, t[10], 38016083, 9)), - (n = f(n, o, r, i, t[15], 3634488961, 14)), - (i = f(i, n, o, r, t[4], 3889429448, 20)), - (r = f(r, i, n, o, t[9], 568446438, 5)), - (o = f(o, r, i, n, t[14], 3275163606, 9)), - (n = f(n, o, r, i, t[3], 4107603335, 14)), - (i = f(i, n, o, r, t[8], 1163531501, 20)), - (r = f(r, i, n, o, t[13], 2850285829, 5)), - (o = f(o, r, i, n, t[2], 4243563512, 9)), - (n = f(n, o, r, i, t[7], 1735328473, 14)), - (r = c(r, (i = f(i, n, o, r, t[12], 2368359562, 20)), n, o, t[5], 4294588738, 4)), - (o = c(o, r, i, n, t[8], 2272392833, 11)), - (n = c(n, o, r, i, t[11], 1839030562, 16)), - (i = c(i, n, o, r, t[14], 4259657740, 23)), - (r = c(r, i, n, o, t[1], 2763975236, 4)), - (o = c(o, r, i, n, t[4], 1272893353, 11)), - (n = c(n, o, r, i, t[7], 4139469664, 16)), - (i = c(i, n, o, r, t[10], 3200236656, 23)), - (r = c(r, i, n, o, t[13], 681279174, 4)), - (o = c(o, r, i, n, t[0], 3936430074, 11)), - (n = c(n, o, r, i, t[3], 3572445317, 16)), - (i = c(i, n, o, r, t[6], 76029189, 23)), - (r = c(r, i, n, o, t[9], 3654602809, 4)), - (o = c(o, r, i, n, t[12], 3873151461, 11)), - (n = c(n, o, r, i, t[15], 530742520, 16)), - (r = l(r, (i = c(i, n, o, r, t[2], 3299628645, 23)), n, o, t[0], 4096336452, 6)), - (o = l(o, r, i, n, t[7], 1126891415, 10)), - (n = l(n, o, r, i, t[14], 2878612391, 15)), - (i = l(i, n, o, r, t[5], 4237533241, 21)), - (r = l(r, i, n, o, t[12], 1700485571, 6)), - (o = l(o, r, i, n, t[3], 2399980690, 10)), - (n = l(n, o, r, i, t[10], 4293915773, 15)), - (i = l(i, n, o, r, t[1], 2240044497, 21)), - (r = l(r, i, n, o, t[8], 1873313359, 6)), - (o = l(o, r, i, n, t[15], 4264355552, 10)), - (n = l(n, o, r, i, t[6], 2734768916, 15)), - (i = l(i, n, o, r, t[13], 1309151649, 21)), - (r = l(r, i, n, o, t[4], 4149444226, 6)), - (o = l(o, r, i, n, t[11], 3174756917, 10)), - (n = l(n, o, r, i, t[2], 718787259, 15)), - (i = l(i, n, o, r, t[9], 3951481745, 21)), - (this._a = (this._a + r) | 0), - (this._b = (this._b + i) | 0), - (this._c = (this._c + n) | 0), - (this._d = (this._d + o) | 0); - }), - (a.prototype._digest = function () { - (this._block[this._blockOffset++] = 128), - this._blockOffset > 56 && (this._block.fill(0, this._blockOffset, 64), this._update(), (this._blockOffset = 0)), - this._block.fill(0, this._blockOffset, 56), - this._block.writeUInt32LE(this._length[0], 56), - this._block.writeUInt32LE(this._length[1], 60), - this._update(); - var t = o.allocUnsafe(16); - return t.writeInt32LE(this._a, 0), t.writeInt32LE(this._b, 4), t.writeInt32LE(this._c, 8), t.writeInt32LE(this._d, 12), t; - }), - (t.exports = a); - }, - 8773: (t, e, r) => { - var i = r(7929), - n = r(9154); - function o(t) { - this.rand = t || new n.Rand(); - } - (t.exports = o), - (o.create = function (t) { - return new o(t); - }), - (o.prototype._randbelow = function (t) { - var e = t.bitLength(), - r = Math.ceil(e / 8); - do { - var n = new i(this.rand.generate(r)); - } while (n.cmp(t) >= 0); - return n; - }), - (o.prototype._randrange = function (t, e) { - var r = e.sub(t); - return t.add(this._randbelow(r)); - }), - (o.prototype.test = function (t, e, r) { - var n = t.bitLength(), - o = i.mont(t), - s = new i(1).toRed(o); - e || (e = Math.max(1, (n / 48) | 0)); - for (var a = t.subn(1), h = 0; !a.testn(h); h++); - for (var u = t.shrn(h), f = a.toRed(o); e > 0; e--) { - var c = this._randrange(new i(2), a); - r && r(c); - var l = c.toRed(o).redPow(u); - if (0 !== l.cmp(s) && 0 !== l.cmp(f)) { - for (var d = 1; d < h; d++) { - if (0 === (l = l.redSqr()).cmp(s)) return !1; - if (0 === l.cmp(f)) break; - } - if (d === h) return !1; - } - } - return !0; - }), - (o.prototype.getDivisor = function (t, e) { - var r = t.bitLength(), - n = i.mont(t), - o = new i(1).toRed(n); - e || (e = Math.max(1, (r / 48) | 0)); - for (var s = t.subn(1), a = 0; !s.testn(a); a++); - for (var h = t.shrn(a), u = s.toRed(n); e > 0; e--) { - var f = this._randrange(new i(2), s), - c = t.gcd(f); - if (0 !== c.cmpn(1)) return c; - var l = f.toRed(n).redPow(h); - if (0 !== l.cmp(o) && 0 !== l.cmp(u)) { - for (var d = 1; d < a; d++) { - if (0 === (l = l.redSqr()).cmp(o)) return l.fromRed().subn(1).gcd(t); - if (0 === l.cmp(u)) break; - } - if (d === a) return (l = l.redSqr()).fromRed().subn(1).gcd(t); - } - } - return !1; - }); - }, - 7929: function (t, e, r) { - !(function (t, e) { - 'use strict'; - function i(t, e) { - if (!t) throw new Error(e || 'Assertion failed'); - } - function n(t, e) { - t.super_ = e; - var r = function () {}; - (r.prototype = e.prototype), (t.prototype = new r()), (t.prototype.constructor = t); - } - function o(t, e, r) { - if (o.isBN(t)) return t; - (this.negative = 0), - (this.words = null), - (this.length = 0), - (this.red = null), - null !== t && (('le' !== e && 'be' !== e) || ((r = e), (e = 10)), this._init(t || 0, e || 10, r || 'be')); - } - var s; - 'object' == typeof t ? (t.exports = o) : (e.BN = o), (o.BN = o), (o.wordSize = 26); - try { - s = 'undefined' != typeof window && void 0 !== window.Buffer ? window.Buffer : r(7523).Buffer; - } catch (t) {} - function a(t, e) { - var r = t.charCodeAt(e); - return r >= 65 && r <= 70 ? r - 55 : r >= 97 && r <= 102 ? r - 87 : (r - 48) & 15; - } - function h(t, e, r) { - var i = a(t, r); - return r - 1 >= e && (i |= a(t, r - 1) << 4), i; - } - function u(t, e, r, i) { - for (var n = 0, o = Math.min(t.length, r), s = e; s < o; s++) { - var a = t.charCodeAt(s) - 48; - (n *= i), (n += a >= 49 ? a - 49 + 10 : a >= 17 ? a - 17 + 10 : a); - } - return n; - } - (o.isBN = function (t) { - return ( - t instanceof o || (null !== t && 'object' == typeof t && t.constructor.wordSize === o.wordSize && Array.isArray(t.words)) - ); - }), - (o.max = function (t, e) { - return t.cmp(e) > 0 ? t : e; - }), - (o.min = function (t, e) { - return t.cmp(e) < 0 ? t : e; - }), - (o.prototype._init = function (t, e, r) { - if ('number' == typeof t) return this._initNumber(t, e, r); - if ('object' == typeof t) return this._initArray(t, e, r); - 'hex' === e && (e = 16), i(e === (0 | e) && e >= 2 && e <= 36); - var n = 0; - '-' === (t = t.toString().replace(/\s+/g, ''))[0] && (n++, (this.negative = 1)), - n < t.length && - (16 === e ? this._parseHex(t, n, r) : (this._parseBase(t, e, n), 'le' === r && this._initArray(this.toArray(), e, r))); - }), - (o.prototype._initNumber = function (t, e, r) { - t < 0 && ((this.negative = 1), (t = -t)), - t < 67108864 - ? ((this.words = [67108863 & t]), (this.length = 1)) - : t < 4503599627370496 - ? ((this.words = [67108863 & t, (t / 67108864) & 67108863]), (this.length = 2)) - : (i(t < 9007199254740992), (this.words = [67108863 & t, (t / 67108864) & 67108863, 1]), (this.length = 3)), - 'le' === r && this._initArray(this.toArray(), e, r); - }), - (o.prototype._initArray = function (t, e, r) { - if ((i('number' == typeof t.length), t.length <= 0)) return (this.words = [0]), (this.length = 1), this; - (this.length = Math.ceil(t.length / 3)), (this.words = new Array(this.length)); - for (var n = 0; n < this.length; n++) this.words[n] = 0; - var o, - s, - a = 0; - if ('be' === r) - for (n = t.length - 1, o = 0; n >= 0; n -= 3) - (s = t[n] | (t[n - 1] << 8) | (t[n - 2] << 16)), - (this.words[o] |= (s << a) & 67108863), - (this.words[o + 1] = (s >>> (26 - a)) & 67108863), - (a += 24) >= 26 && ((a -= 26), o++); - else if ('le' === r) - for (n = 0, o = 0; n < t.length; n += 3) - (s = t[n] | (t[n + 1] << 8) | (t[n + 2] << 16)), - (this.words[o] |= (s << a) & 67108863), - (this.words[o + 1] = (s >>> (26 - a)) & 67108863), - (a += 24) >= 26 && ((a -= 26), o++); - return this.strip(); - }), - (o.prototype._parseHex = function (t, e, r) { - (this.length = Math.ceil((t.length - e) / 6)), (this.words = new Array(this.length)); - for (var i = 0; i < this.length; i++) this.words[i] = 0; - var n, - o = 0, - s = 0; - if ('be' === r) - for (i = t.length - 1; i >= e; i -= 2) - (n = h(t, e, i) << o), - (this.words[s] |= 67108863 & n), - o >= 18 ? ((o -= 18), (s += 1), (this.words[s] |= n >>> 26)) : (o += 8); - else - for (i = (t.length - e) % 2 == 0 ? e + 1 : e; i < t.length; i += 2) - (n = h(t, e, i) << o), - (this.words[s] |= 67108863 & n), - o >= 18 ? ((o -= 18), (s += 1), (this.words[s] |= n >>> 26)) : (o += 8); - this.strip(); - }), - (o.prototype._parseBase = function (t, e, r) { - (this.words = [0]), (this.length = 1); - for (var i = 0, n = 1; n <= 67108863; n *= e) i++; - i--, (n = (n / e) | 0); - for (var o = t.length - r, s = o % i, a = Math.min(o, o - s) + r, h = 0, f = r; f < a; f += i) - (h = u(t, f, f + i, e)), this.imuln(n), this.words[0] + h < 67108864 ? (this.words[0] += h) : this._iaddn(h); - if (0 !== s) { - var c = 1; - for (h = u(t, f, t.length, e), f = 0; f < s; f++) c *= e; - this.imuln(c), this.words[0] + h < 67108864 ? (this.words[0] += h) : this._iaddn(h); - } - this.strip(); - }), - (o.prototype.copy = function (t) { - t.words = new Array(this.length); - for (var e = 0; e < this.length; e++) t.words[e] = this.words[e]; - (t.length = this.length), (t.negative = this.negative), (t.red = this.red); - }), - (o.prototype.clone = function () { - var t = new o(null); - return this.copy(t), t; - }), - (o.prototype._expand = function (t) { - for (; this.length < t; ) this.words[this.length++] = 0; - return this; - }), - (o.prototype.strip = function () { - for (; this.length > 1 && 0 === this.words[this.length - 1]; ) this.length--; - return this._normSign(); - }), - (o.prototype._normSign = function () { - return 1 === this.length && 0 === this.words[0] && (this.negative = 0), this; - }), - (o.prototype.inspect = function () { - return (this.red ? ''; - }); - var f = [ - '', - '0', - '00', - '000', - '0000', - '00000', - '000000', - '0000000', - '00000000', - '000000000', - '0000000000', - '00000000000', - '000000000000', - '0000000000000', - '00000000000000', - '000000000000000', - '0000000000000000', - '00000000000000000', - '000000000000000000', - '0000000000000000000', - '00000000000000000000', - '000000000000000000000', - '0000000000000000000000', - '00000000000000000000000', - '000000000000000000000000', - '0000000000000000000000000', - ], - c = [0, 0, 25, 16, 12, 11, 10, 9, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5], - l = [ - 0, 0, 33554432, 43046721, 16777216, 48828125, 60466176, 40353607, 16777216, 43046721, 1e7, 19487171, 35831808, 62748517, - 7529536, 11390625, 16777216, 24137569, 34012224, 47045881, 64e6, 4084101, 5153632, 6436343, 7962624, 9765625, 11881376, - 14348907, 17210368, 20511149, 243e5, 28629151, 33554432, 39135393, 45435424, 52521875, 60466176, - ]; - function d(t, e, r) { - r.negative = e.negative ^ t.negative; - var i = (t.length + e.length) | 0; - (r.length = i), (i = (i - 1) | 0); - var n = 0 | t.words[0], - o = 0 | e.words[0], - s = n * o, - a = 67108863 & s, - h = (s / 67108864) | 0; - r.words[0] = a; - for (var u = 1; u < i; u++) { - for (var f = h >>> 26, c = 67108863 & h, l = Math.min(u, e.length - 1), d = Math.max(0, u - t.length + 1); d <= l; d++) { - var p = (u - d) | 0; - (f += ((s = (n = 0 | t.words[p]) * (o = 0 | e.words[d]) + c) / 67108864) | 0), (c = 67108863 & s); - } - (r.words[u] = 0 | c), (h = 0 | f); - } - return 0 !== h ? (r.words[u] = 0 | h) : r.length--, r.strip(); - } - (o.prototype.toString = function (t, e) { - var r; - if (((e = 0 | e || 1), 16 === (t = t || 10) || 'hex' === t)) { - r = ''; - for (var n = 0, o = 0, s = 0; s < this.length; s++) { - var a = this.words[s], - h = (16777215 & ((a << n) | o)).toString(16); - (r = 0 != (o = (a >>> (24 - n)) & 16777215) || s !== this.length - 1 ? f[6 - h.length] + h + r : h + r), - (n += 2) >= 26 && ((n -= 26), s--); - } - for (0 !== o && (r = o.toString(16) + r); r.length % e != 0; ) r = '0' + r; - return 0 !== this.negative && (r = '-' + r), r; - } - if (t === (0 | t) && t >= 2 && t <= 36) { - var u = c[t], - d = l[t]; - r = ''; - var p = this.clone(); - for (p.negative = 0; !p.isZero(); ) { - var m = p.modn(d).toString(t); - r = (p = p.idivn(d)).isZero() ? m + r : f[u - m.length] + m + r; - } - for (this.isZero() && (r = '0' + r); r.length % e != 0; ) r = '0' + r; - return 0 !== this.negative && (r = '-' + r), r; - } - i(!1, 'Base should be between 2 and 36'); - }), - (o.prototype.toNumber = function () { - var t = this.words[0]; - return ( - 2 === this.length - ? (t += 67108864 * this.words[1]) - : 3 === this.length && 1 === this.words[2] - ? (t += 4503599627370496 + 67108864 * this.words[1]) - : this.length > 2 && i(!1, 'Number can only safely store up to 53 bits'), - 0 !== this.negative ? -t : t - ); - }), - (o.prototype.toJSON = function () { - return this.toString(16); - }), - (o.prototype.toBuffer = function (t, e) { - return i(void 0 !== s), this.toArrayLike(s, t, e); - }), - (o.prototype.toArray = function (t, e) { - return this.toArrayLike(Array, t, e); - }), - (o.prototype.toArrayLike = function (t, e, r) { - var n = this.byteLength(), - o = r || Math.max(1, n); - i(n <= o, 'byte array longer than desired length'), i(o > 0, 'Requested array length <= 0'), this.strip(); - var s, - a, - h = 'le' === e, - u = new t(o), - f = this.clone(); - if (h) { - for (a = 0; !f.isZero(); a++) (s = f.andln(255)), f.iushrn(8), (u[a] = s); - for (; a < o; a++) u[a] = 0; - } else { - for (a = 0; a < o - n; a++) u[a] = 0; - for (a = 0; !f.isZero(); a++) (s = f.andln(255)), f.iushrn(8), (u[o - a - 1] = s); - } - return u; - }), - Math.clz32 - ? (o.prototype._countBits = function (t) { - return 32 - Math.clz32(t); - }) - : (o.prototype._countBits = function (t) { - var e = t, - r = 0; - return ( - e >= 4096 && ((r += 13), (e >>>= 13)), - e >= 64 && ((r += 7), (e >>>= 7)), - e >= 8 && ((r += 4), (e >>>= 4)), - e >= 2 && ((r += 2), (e >>>= 2)), - r + e - ); - }), - (o.prototype._zeroBits = function (t) { - if (0 === t) return 26; - var e = t, - r = 0; - return ( - 0 == (8191 & e) && ((r += 13), (e >>>= 13)), - 0 == (127 & e) && ((r += 7), (e >>>= 7)), - 0 == (15 & e) && ((r += 4), (e >>>= 4)), - 0 == (3 & e) && ((r += 2), (e >>>= 2)), - 0 == (1 & e) && r++, - r - ); - }), - (o.prototype.bitLength = function () { - var t = this.words[this.length - 1], - e = this._countBits(t); - return 26 * (this.length - 1) + e; - }), - (o.prototype.zeroBits = function () { - if (this.isZero()) return 0; - for (var t = 0, e = 0; e < this.length; e++) { - var r = this._zeroBits(this.words[e]); - if (((t += r), 26 !== r)) break; - } - return t; - }), - (o.prototype.byteLength = function () { - return Math.ceil(this.bitLength() / 8); - }), - (o.prototype.toTwos = function (t) { - return 0 !== this.negative ? this.abs().inotn(t).iaddn(1) : this.clone(); - }), - (o.prototype.fromTwos = function (t) { - return this.testn(t - 1) ? this.notn(t).iaddn(1).ineg() : this.clone(); - }), - (o.prototype.isNeg = function () { - return 0 !== this.negative; - }), - (o.prototype.neg = function () { - return this.clone().ineg(); - }), - (o.prototype.ineg = function () { - return this.isZero() || (this.negative ^= 1), this; - }), - (o.prototype.iuor = function (t) { - for (; this.length < t.length; ) this.words[this.length++] = 0; - for (var e = 0; e < t.length; e++) this.words[e] = this.words[e] | t.words[e]; - return this.strip(); - }), - (o.prototype.ior = function (t) { - return i(0 == (this.negative | t.negative)), this.iuor(t); - }), - (o.prototype.or = function (t) { - return this.length > t.length ? this.clone().ior(t) : t.clone().ior(this); - }), - (o.prototype.uor = function (t) { - return this.length > t.length ? this.clone().iuor(t) : t.clone().iuor(this); - }), - (o.prototype.iuand = function (t) { - var e; - e = this.length > t.length ? t : this; - for (var r = 0; r < e.length; r++) this.words[r] = this.words[r] & t.words[r]; - return (this.length = e.length), this.strip(); - }), - (o.prototype.iand = function (t) { - return i(0 == (this.negative | t.negative)), this.iuand(t); - }), - (o.prototype.and = function (t) { - return this.length > t.length ? this.clone().iand(t) : t.clone().iand(this); - }), - (o.prototype.uand = function (t) { - return this.length > t.length ? this.clone().iuand(t) : t.clone().iuand(this); - }), - (o.prototype.iuxor = function (t) { - var e, r; - this.length > t.length ? ((e = this), (r = t)) : ((e = t), (r = this)); - for (var i = 0; i < r.length; i++) this.words[i] = e.words[i] ^ r.words[i]; - if (this !== e) for (; i < e.length; i++) this.words[i] = e.words[i]; - return (this.length = e.length), this.strip(); - }), - (o.prototype.ixor = function (t) { - return i(0 == (this.negative | t.negative)), this.iuxor(t); - }), - (o.prototype.xor = function (t) { - return this.length > t.length ? this.clone().ixor(t) : t.clone().ixor(this); - }), - (o.prototype.uxor = function (t) { - return this.length > t.length ? this.clone().iuxor(t) : t.clone().iuxor(this); - }), - (o.prototype.inotn = function (t) { - i('number' == typeof t && t >= 0); - var e = 0 | Math.ceil(t / 26), - r = t % 26; - this._expand(e), r > 0 && e--; - for (var n = 0; n < e; n++) this.words[n] = 67108863 & ~this.words[n]; - return r > 0 && (this.words[n] = ~this.words[n] & (67108863 >> (26 - r))), this.strip(); - }), - (o.prototype.notn = function (t) { - return this.clone().inotn(t); - }), - (o.prototype.setn = function (t, e) { - i('number' == typeof t && t >= 0); - var r = (t / 26) | 0, - n = t % 26; - return this._expand(r + 1), (this.words[r] = e ? this.words[r] | (1 << n) : this.words[r] & ~(1 << n)), this.strip(); - }), - (o.prototype.iadd = function (t) { - var e, r, i; - if (0 !== this.negative && 0 === t.negative) - return (this.negative = 0), (e = this.isub(t)), (this.negative ^= 1), this._normSign(); - if (0 === this.negative && 0 !== t.negative) return (t.negative = 0), (e = this.isub(t)), (t.negative = 1), e._normSign(); - this.length > t.length ? ((r = this), (i = t)) : ((r = t), (i = this)); - for (var n = 0, o = 0; o < i.length; o++) - (e = (0 | r.words[o]) + (0 | i.words[o]) + n), (this.words[o] = 67108863 & e), (n = e >>> 26); - for (; 0 !== n && o < r.length; o++) (e = (0 | r.words[o]) + n), (this.words[o] = 67108863 & e), (n = e >>> 26); - if (((this.length = r.length), 0 !== n)) (this.words[this.length] = n), this.length++; - else if (r !== this) for (; o < r.length; o++) this.words[o] = r.words[o]; - return this; - }), - (o.prototype.add = function (t) { - var e; - return 0 !== t.negative && 0 === this.negative - ? ((t.negative = 0), (e = this.sub(t)), (t.negative ^= 1), e) - : 0 === t.negative && 0 !== this.negative - ? ((this.negative = 0), (e = t.sub(this)), (this.negative = 1), e) - : this.length > t.length - ? this.clone().iadd(t) - : t.clone().iadd(this); - }), - (o.prototype.isub = function (t) { - if (0 !== t.negative) { - t.negative = 0; - var e = this.iadd(t); - return (t.negative = 1), e._normSign(); - } - if (0 !== this.negative) return (this.negative = 0), this.iadd(t), (this.negative = 1), this._normSign(); - var r, - i, - n = this.cmp(t); - if (0 === n) return (this.negative = 0), (this.length = 1), (this.words[0] = 0), this; - n > 0 ? ((r = this), (i = t)) : ((r = t), (i = this)); - for (var o = 0, s = 0; s < i.length; s++) - (o = (e = (0 | r.words[s]) - (0 | i.words[s]) + o) >> 26), (this.words[s] = 67108863 & e); - for (; 0 !== o && s < r.length; s++) (o = (e = (0 | r.words[s]) + o) >> 26), (this.words[s] = 67108863 & e); - if (0 === o && s < r.length && r !== this) for (; s < r.length; s++) this.words[s] = r.words[s]; - return (this.length = Math.max(this.length, s)), r !== this && (this.negative = 1), this.strip(); - }), - (o.prototype.sub = function (t) { - return this.clone().isub(t); - }); - var p = function (t, e, r) { - var i, - n, - o, - s = t.words, - a = e.words, - h = r.words, - u = 0, - f = 0 | s[0], - c = 8191 & f, - l = f >>> 13, - d = 0 | s[1], - p = 8191 & d, - m = d >>> 13, - g = 0 | s[2], - b = 8191 & g, - y = g >>> 13, - v = 0 | s[3], - w = 8191 & v, - _ = v >>> 13, - M = 0 | s[4], - E = 8191 & M, - S = M >>> 13, - x = 0 | s[5], - A = 8191 & x, - k = x >>> 13, - R = 0 | s[6], - B = 8191 & R, - I = R >>> 13, - T = 0 | s[7], - P = 8191 & T, - O = T >>> 13, - L = 0 | s[8], - C = 8191 & L, - N = L >>> 13, - j = 0 | s[9], - U = 8191 & j, - D = j >>> 13, - z = 0 | a[0], - F = 8191 & z, - q = z >>> 13, - H = 0 | a[1], - $ = 8191 & H, - Z = H >>> 13, - G = 0 | a[2], - V = 8191 & G, - W = G >>> 13, - K = 0 | a[3], - Y = 8191 & K, - J = K >>> 13, - X = 0 | a[4], - Q = 8191 & X, - tt = X >>> 13, - et = 0 | a[5], - rt = 8191 & et, - it = et >>> 13, - nt = 0 | a[6], - ot = 8191 & nt, - st = nt >>> 13, - at = 0 | a[7], - ht = 8191 & at, - ut = at >>> 13, - ft = 0 | a[8], - ct = 8191 & ft, - lt = ft >>> 13, - dt = 0 | a[9], - pt = 8191 & dt, - mt = dt >>> 13; - (r.negative = t.negative ^ e.negative), (r.length = 19); - var gt = (((u + (i = Math.imul(c, F))) | 0) + ((8191 & (n = ((n = Math.imul(c, q)) + Math.imul(l, F)) | 0)) << 13)) | 0; - (u = ((((o = Math.imul(l, q)) + (n >>> 13)) | 0) + (gt >>> 26)) | 0), - (gt &= 67108863), - (i = Math.imul(p, F)), - (n = ((n = Math.imul(p, q)) + Math.imul(m, F)) | 0), - (o = Math.imul(m, q)); - var bt = - (((u + (i = (i + Math.imul(c, $)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, Z)) | 0) + Math.imul(l, $)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, Z)) | 0) + (n >>> 13)) | 0) + (bt >>> 26)) | 0), - (bt &= 67108863), - (i = Math.imul(b, F)), - (n = ((n = Math.imul(b, q)) + Math.imul(y, F)) | 0), - (o = Math.imul(y, q)), - (i = (i + Math.imul(p, $)) | 0), - (n = ((n = (n + Math.imul(p, Z)) | 0) + Math.imul(m, $)) | 0), - (o = (o + Math.imul(m, Z)) | 0); - var yt = - (((u + (i = (i + Math.imul(c, V)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, W)) | 0) + Math.imul(l, V)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, W)) | 0) + (n >>> 13)) | 0) + (yt >>> 26)) | 0), - (yt &= 67108863), - (i = Math.imul(w, F)), - (n = ((n = Math.imul(w, q)) + Math.imul(_, F)) | 0), - (o = Math.imul(_, q)), - (i = (i + Math.imul(b, $)) | 0), - (n = ((n = (n + Math.imul(b, Z)) | 0) + Math.imul(y, $)) | 0), - (o = (o + Math.imul(y, Z)) | 0), - (i = (i + Math.imul(p, V)) | 0), - (n = ((n = (n + Math.imul(p, W)) | 0) + Math.imul(m, V)) | 0), - (o = (o + Math.imul(m, W)) | 0); - var vt = - (((u + (i = (i + Math.imul(c, Y)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, J)) | 0) + Math.imul(l, Y)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, J)) | 0) + (n >>> 13)) | 0) + (vt >>> 26)) | 0), - (vt &= 67108863), - (i = Math.imul(E, F)), - (n = ((n = Math.imul(E, q)) + Math.imul(S, F)) | 0), - (o = Math.imul(S, q)), - (i = (i + Math.imul(w, $)) | 0), - (n = ((n = (n + Math.imul(w, Z)) | 0) + Math.imul(_, $)) | 0), - (o = (o + Math.imul(_, Z)) | 0), - (i = (i + Math.imul(b, V)) | 0), - (n = ((n = (n + Math.imul(b, W)) | 0) + Math.imul(y, V)) | 0), - (o = (o + Math.imul(y, W)) | 0), - (i = (i + Math.imul(p, Y)) | 0), - (n = ((n = (n + Math.imul(p, J)) | 0) + Math.imul(m, Y)) | 0), - (o = (o + Math.imul(m, J)) | 0); - var wt = - (((u + (i = (i + Math.imul(c, Q)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, tt)) | 0) + Math.imul(l, Q)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, tt)) | 0) + (n >>> 13)) | 0) + (wt >>> 26)) | 0), - (wt &= 67108863), - (i = Math.imul(A, F)), - (n = ((n = Math.imul(A, q)) + Math.imul(k, F)) | 0), - (o = Math.imul(k, q)), - (i = (i + Math.imul(E, $)) | 0), - (n = ((n = (n + Math.imul(E, Z)) | 0) + Math.imul(S, $)) | 0), - (o = (o + Math.imul(S, Z)) | 0), - (i = (i + Math.imul(w, V)) | 0), - (n = ((n = (n + Math.imul(w, W)) | 0) + Math.imul(_, V)) | 0), - (o = (o + Math.imul(_, W)) | 0), - (i = (i + Math.imul(b, Y)) | 0), - (n = ((n = (n + Math.imul(b, J)) | 0) + Math.imul(y, Y)) | 0), - (o = (o + Math.imul(y, J)) | 0), - (i = (i + Math.imul(p, Q)) | 0), - (n = ((n = (n + Math.imul(p, tt)) | 0) + Math.imul(m, Q)) | 0), - (o = (o + Math.imul(m, tt)) | 0); - var _t = - (((u + (i = (i + Math.imul(c, rt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, it)) | 0) + Math.imul(l, rt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, it)) | 0) + (n >>> 13)) | 0) + (_t >>> 26)) | 0), - (_t &= 67108863), - (i = Math.imul(B, F)), - (n = ((n = Math.imul(B, q)) + Math.imul(I, F)) | 0), - (o = Math.imul(I, q)), - (i = (i + Math.imul(A, $)) | 0), - (n = ((n = (n + Math.imul(A, Z)) | 0) + Math.imul(k, $)) | 0), - (o = (o + Math.imul(k, Z)) | 0), - (i = (i + Math.imul(E, V)) | 0), - (n = ((n = (n + Math.imul(E, W)) | 0) + Math.imul(S, V)) | 0), - (o = (o + Math.imul(S, W)) | 0), - (i = (i + Math.imul(w, Y)) | 0), - (n = ((n = (n + Math.imul(w, J)) | 0) + Math.imul(_, Y)) | 0), - (o = (o + Math.imul(_, J)) | 0), - (i = (i + Math.imul(b, Q)) | 0), - (n = ((n = (n + Math.imul(b, tt)) | 0) + Math.imul(y, Q)) | 0), - (o = (o + Math.imul(y, tt)) | 0), - (i = (i + Math.imul(p, rt)) | 0), - (n = ((n = (n + Math.imul(p, it)) | 0) + Math.imul(m, rt)) | 0), - (o = (o + Math.imul(m, it)) | 0); - var Mt = - (((u + (i = (i + Math.imul(c, ot)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, st)) | 0) + Math.imul(l, ot)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, st)) | 0) + (n >>> 13)) | 0) + (Mt >>> 26)) | 0), - (Mt &= 67108863), - (i = Math.imul(P, F)), - (n = ((n = Math.imul(P, q)) + Math.imul(O, F)) | 0), - (o = Math.imul(O, q)), - (i = (i + Math.imul(B, $)) | 0), - (n = ((n = (n + Math.imul(B, Z)) | 0) + Math.imul(I, $)) | 0), - (o = (o + Math.imul(I, Z)) | 0), - (i = (i + Math.imul(A, V)) | 0), - (n = ((n = (n + Math.imul(A, W)) | 0) + Math.imul(k, V)) | 0), - (o = (o + Math.imul(k, W)) | 0), - (i = (i + Math.imul(E, Y)) | 0), - (n = ((n = (n + Math.imul(E, J)) | 0) + Math.imul(S, Y)) | 0), - (o = (o + Math.imul(S, J)) | 0), - (i = (i + Math.imul(w, Q)) | 0), - (n = ((n = (n + Math.imul(w, tt)) | 0) + Math.imul(_, Q)) | 0), - (o = (o + Math.imul(_, tt)) | 0), - (i = (i + Math.imul(b, rt)) | 0), - (n = ((n = (n + Math.imul(b, it)) | 0) + Math.imul(y, rt)) | 0), - (o = (o + Math.imul(y, it)) | 0), - (i = (i + Math.imul(p, ot)) | 0), - (n = ((n = (n + Math.imul(p, st)) | 0) + Math.imul(m, ot)) | 0), - (o = (o + Math.imul(m, st)) | 0); - var Et = - (((u + (i = (i + Math.imul(c, ht)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, ut)) | 0) + Math.imul(l, ht)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, ut)) | 0) + (n >>> 13)) | 0) + (Et >>> 26)) | 0), - (Et &= 67108863), - (i = Math.imul(C, F)), - (n = ((n = Math.imul(C, q)) + Math.imul(N, F)) | 0), - (o = Math.imul(N, q)), - (i = (i + Math.imul(P, $)) | 0), - (n = ((n = (n + Math.imul(P, Z)) | 0) + Math.imul(O, $)) | 0), - (o = (o + Math.imul(O, Z)) | 0), - (i = (i + Math.imul(B, V)) | 0), - (n = ((n = (n + Math.imul(B, W)) | 0) + Math.imul(I, V)) | 0), - (o = (o + Math.imul(I, W)) | 0), - (i = (i + Math.imul(A, Y)) | 0), - (n = ((n = (n + Math.imul(A, J)) | 0) + Math.imul(k, Y)) | 0), - (o = (o + Math.imul(k, J)) | 0), - (i = (i + Math.imul(E, Q)) | 0), - (n = ((n = (n + Math.imul(E, tt)) | 0) + Math.imul(S, Q)) | 0), - (o = (o + Math.imul(S, tt)) | 0), - (i = (i + Math.imul(w, rt)) | 0), - (n = ((n = (n + Math.imul(w, it)) | 0) + Math.imul(_, rt)) | 0), - (o = (o + Math.imul(_, it)) | 0), - (i = (i + Math.imul(b, ot)) | 0), - (n = ((n = (n + Math.imul(b, st)) | 0) + Math.imul(y, ot)) | 0), - (o = (o + Math.imul(y, st)) | 0), - (i = (i + Math.imul(p, ht)) | 0), - (n = ((n = (n + Math.imul(p, ut)) | 0) + Math.imul(m, ht)) | 0), - (o = (o + Math.imul(m, ut)) | 0); - var St = - (((u + (i = (i + Math.imul(c, ct)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, lt)) | 0) + Math.imul(l, ct)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, lt)) | 0) + (n >>> 13)) | 0) + (St >>> 26)) | 0), - (St &= 67108863), - (i = Math.imul(U, F)), - (n = ((n = Math.imul(U, q)) + Math.imul(D, F)) | 0), - (o = Math.imul(D, q)), - (i = (i + Math.imul(C, $)) | 0), - (n = ((n = (n + Math.imul(C, Z)) | 0) + Math.imul(N, $)) | 0), - (o = (o + Math.imul(N, Z)) | 0), - (i = (i + Math.imul(P, V)) | 0), - (n = ((n = (n + Math.imul(P, W)) | 0) + Math.imul(O, V)) | 0), - (o = (o + Math.imul(O, W)) | 0), - (i = (i + Math.imul(B, Y)) | 0), - (n = ((n = (n + Math.imul(B, J)) | 0) + Math.imul(I, Y)) | 0), - (o = (o + Math.imul(I, J)) | 0), - (i = (i + Math.imul(A, Q)) | 0), - (n = ((n = (n + Math.imul(A, tt)) | 0) + Math.imul(k, Q)) | 0), - (o = (o + Math.imul(k, tt)) | 0), - (i = (i + Math.imul(E, rt)) | 0), - (n = ((n = (n + Math.imul(E, it)) | 0) + Math.imul(S, rt)) | 0), - (o = (o + Math.imul(S, it)) | 0), - (i = (i + Math.imul(w, ot)) | 0), - (n = ((n = (n + Math.imul(w, st)) | 0) + Math.imul(_, ot)) | 0), - (o = (o + Math.imul(_, st)) | 0), - (i = (i + Math.imul(b, ht)) | 0), - (n = ((n = (n + Math.imul(b, ut)) | 0) + Math.imul(y, ht)) | 0), - (o = (o + Math.imul(y, ut)) | 0), - (i = (i + Math.imul(p, ct)) | 0), - (n = ((n = (n + Math.imul(p, lt)) | 0) + Math.imul(m, ct)) | 0), - (o = (o + Math.imul(m, lt)) | 0); - var xt = - (((u + (i = (i + Math.imul(c, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, mt)) | 0) + Math.imul(l, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, mt)) | 0) + (n >>> 13)) | 0) + (xt >>> 26)) | 0), - (xt &= 67108863), - (i = Math.imul(U, $)), - (n = ((n = Math.imul(U, Z)) + Math.imul(D, $)) | 0), - (o = Math.imul(D, Z)), - (i = (i + Math.imul(C, V)) | 0), - (n = ((n = (n + Math.imul(C, W)) | 0) + Math.imul(N, V)) | 0), - (o = (o + Math.imul(N, W)) | 0), - (i = (i + Math.imul(P, Y)) | 0), - (n = ((n = (n + Math.imul(P, J)) | 0) + Math.imul(O, Y)) | 0), - (o = (o + Math.imul(O, J)) | 0), - (i = (i + Math.imul(B, Q)) | 0), - (n = ((n = (n + Math.imul(B, tt)) | 0) + Math.imul(I, Q)) | 0), - (o = (o + Math.imul(I, tt)) | 0), - (i = (i + Math.imul(A, rt)) | 0), - (n = ((n = (n + Math.imul(A, it)) | 0) + Math.imul(k, rt)) | 0), - (o = (o + Math.imul(k, it)) | 0), - (i = (i + Math.imul(E, ot)) | 0), - (n = ((n = (n + Math.imul(E, st)) | 0) + Math.imul(S, ot)) | 0), - (o = (o + Math.imul(S, st)) | 0), - (i = (i + Math.imul(w, ht)) | 0), - (n = ((n = (n + Math.imul(w, ut)) | 0) + Math.imul(_, ht)) | 0), - (o = (o + Math.imul(_, ut)) | 0), - (i = (i + Math.imul(b, ct)) | 0), - (n = ((n = (n + Math.imul(b, lt)) | 0) + Math.imul(y, ct)) | 0), - (o = (o + Math.imul(y, lt)) | 0); - var At = - (((u + (i = (i + Math.imul(p, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(p, mt)) | 0) + Math.imul(m, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(m, mt)) | 0) + (n >>> 13)) | 0) + (At >>> 26)) | 0), - (At &= 67108863), - (i = Math.imul(U, V)), - (n = ((n = Math.imul(U, W)) + Math.imul(D, V)) | 0), - (o = Math.imul(D, W)), - (i = (i + Math.imul(C, Y)) | 0), - (n = ((n = (n + Math.imul(C, J)) | 0) + Math.imul(N, Y)) | 0), - (o = (o + Math.imul(N, J)) | 0), - (i = (i + Math.imul(P, Q)) | 0), - (n = ((n = (n + Math.imul(P, tt)) | 0) + Math.imul(O, Q)) | 0), - (o = (o + Math.imul(O, tt)) | 0), - (i = (i + Math.imul(B, rt)) | 0), - (n = ((n = (n + Math.imul(B, it)) | 0) + Math.imul(I, rt)) | 0), - (o = (o + Math.imul(I, it)) | 0), - (i = (i + Math.imul(A, ot)) | 0), - (n = ((n = (n + Math.imul(A, st)) | 0) + Math.imul(k, ot)) | 0), - (o = (o + Math.imul(k, st)) | 0), - (i = (i + Math.imul(E, ht)) | 0), - (n = ((n = (n + Math.imul(E, ut)) | 0) + Math.imul(S, ht)) | 0), - (o = (o + Math.imul(S, ut)) | 0), - (i = (i + Math.imul(w, ct)) | 0), - (n = ((n = (n + Math.imul(w, lt)) | 0) + Math.imul(_, ct)) | 0), - (o = (o + Math.imul(_, lt)) | 0); - var kt = - (((u + (i = (i + Math.imul(b, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(b, mt)) | 0) + Math.imul(y, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(y, mt)) | 0) + (n >>> 13)) | 0) + (kt >>> 26)) | 0), - (kt &= 67108863), - (i = Math.imul(U, Y)), - (n = ((n = Math.imul(U, J)) + Math.imul(D, Y)) | 0), - (o = Math.imul(D, J)), - (i = (i + Math.imul(C, Q)) | 0), - (n = ((n = (n + Math.imul(C, tt)) | 0) + Math.imul(N, Q)) | 0), - (o = (o + Math.imul(N, tt)) | 0), - (i = (i + Math.imul(P, rt)) | 0), - (n = ((n = (n + Math.imul(P, it)) | 0) + Math.imul(O, rt)) | 0), - (o = (o + Math.imul(O, it)) | 0), - (i = (i + Math.imul(B, ot)) | 0), - (n = ((n = (n + Math.imul(B, st)) | 0) + Math.imul(I, ot)) | 0), - (o = (o + Math.imul(I, st)) | 0), - (i = (i + Math.imul(A, ht)) | 0), - (n = ((n = (n + Math.imul(A, ut)) | 0) + Math.imul(k, ht)) | 0), - (o = (o + Math.imul(k, ut)) | 0), - (i = (i + Math.imul(E, ct)) | 0), - (n = ((n = (n + Math.imul(E, lt)) | 0) + Math.imul(S, ct)) | 0), - (o = (o + Math.imul(S, lt)) | 0); - var Rt = - (((u + (i = (i + Math.imul(w, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(w, mt)) | 0) + Math.imul(_, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(_, mt)) | 0) + (n >>> 13)) | 0) + (Rt >>> 26)) | 0), - (Rt &= 67108863), - (i = Math.imul(U, Q)), - (n = ((n = Math.imul(U, tt)) + Math.imul(D, Q)) | 0), - (o = Math.imul(D, tt)), - (i = (i + Math.imul(C, rt)) | 0), - (n = ((n = (n + Math.imul(C, it)) | 0) + Math.imul(N, rt)) | 0), - (o = (o + Math.imul(N, it)) | 0), - (i = (i + Math.imul(P, ot)) | 0), - (n = ((n = (n + Math.imul(P, st)) | 0) + Math.imul(O, ot)) | 0), - (o = (o + Math.imul(O, st)) | 0), - (i = (i + Math.imul(B, ht)) | 0), - (n = ((n = (n + Math.imul(B, ut)) | 0) + Math.imul(I, ht)) | 0), - (o = (o + Math.imul(I, ut)) | 0), - (i = (i + Math.imul(A, ct)) | 0), - (n = ((n = (n + Math.imul(A, lt)) | 0) + Math.imul(k, ct)) | 0), - (o = (o + Math.imul(k, lt)) | 0); - var Bt = - (((u + (i = (i + Math.imul(E, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(E, mt)) | 0) + Math.imul(S, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(S, mt)) | 0) + (n >>> 13)) | 0) + (Bt >>> 26)) | 0), - (Bt &= 67108863), - (i = Math.imul(U, rt)), - (n = ((n = Math.imul(U, it)) + Math.imul(D, rt)) | 0), - (o = Math.imul(D, it)), - (i = (i + Math.imul(C, ot)) | 0), - (n = ((n = (n + Math.imul(C, st)) | 0) + Math.imul(N, ot)) | 0), - (o = (o + Math.imul(N, st)) | 0), - (i = (i + Math.imul(P, ht)) | 0), - (n = ((n = (n + Math.imul(P, ut)) | 0) + Math.imul(O, ht)) | 0), - (o = (o + Math.imul(O, ut)) | 0), - (i = (i + Math.imul(B, ct)) | 0), - (n = ((n = (n + Math.imul(B, lt)) | 0) + Math.imul(I, ct)) | 0), - (o = (o + Math.imul(I, lt)) | 0); - var It = - (((u + (i = (i + Math.imul(A, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(A, mt)) | 0) + Math.imul(k, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(k, mt)) | 0) + (n >>> 13)) | 0) + (It >>> 26)) | 0), - (It &= 67108863), - (i = Math.imul(U, ot)), - (n = ((n = Math.imul(U, st)) + Math.imul(D, ot)) | 0), - (o = Math.imul(D, st)), - (i = (i + Math.imul(C, ht)) | 0), - (n = ((n = (n + Math.imul(C, ut)) | 0) + Math.imul(N, ht)) | 0), - (o = (o + Math.imul(N, ut)) | 0), - (i = (i + Math.imul(P, ct)) | 0), - (n = ((n = (n + Math.imul(P, lt)) | 0) + Math.imul(O, ct)) | 0), - (o = (o + Math.imul(O, lt)) | 0); - var Tt = - (((u + (i = (i + Math.imul(B, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(B, mt)) | 0) + Math.imul(I, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(I, mt)) | 0) + (n >>> 13)) | 0) + (Tt >>> 26)) | 0), - (Tt &= 67108863), - (i = Math.imul(U, ht)), - (n = ((n = Math.imul(U, ut)) + Math.imul(D, ht)) | 0), - (o = Math.imul(D, ut)), - (i = (i + Math.imul(C, ct)) | 0), - (n = ((n = (n + Math.imul(C, lt)) | 0) + Math.imul(N, ct)) | 0), - (o = (o + Math.imul(N, lt)) | 0); - var Pt = - (((u + (i = (i + Math.imul(P, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(P, mt)) | 0) + Math.imul(O, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(O, mt)) | 0) + (n >>> 13)) | 0) + (Pt >>> 26)) | 0), - (Pt &= 67108863), - (i = Math.imul(U, ct)), - (n = ((n = Math.imul(U, lt)) + Math.imul(D, ct)) | 0), - (o = Math.imul(D, lt)); - var Ot = - (((u + (i = (i + Math.imul(C, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(C, mt)) | 0) + Math.imul(N, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(N, mt)) | 0) + (n >>> 13)) | 0) + (Ot >>> 26)) | 0), (Ot &= 67108863); - var Lt = (((u + (i = Math.imul(U, pt))) | 0) + ((8191 & (n = ((n = Math.imul(U, mt)) + Math.imul(D, pt)) | 0)) << 13)) | 0; - return ( - (u = ((((o = Math.imul(D, mt)) + (n >>> 13)) | 0) + (Lt >>> 26)) | 0), - (Lt &= 67108863), - (h[0] = gt), - (h[1] = bt), - (h[2] = yt), - (h[3] = vt), - (h[4] = wt), - (h[5] = _t), - (h[6] = Mt), - (h[7] = Et), - (h[8] = St), - (h[9] = xt), - (h[10] = At), - (h[11] = kt), - (h[12] = Rt), - (h[13] = Bt), - (h[14] = It), - (h[15] = Tt), - (h[16] = Pt), - (h[17] = Ot), - (h[18] = Lt), - 0 !== u && ((h[19] = u), r.length++), - r - ); - }; - function m(t, e, r) { - return new g().mulp(t, e, r); - } - function g(t, e) { - (this.x = t), (this.y = e); - } - Math.imul || (p = d), - (o.prototype.mulTo = function (t, e) { - var r, - i = this.length + t.length; - return ( - (r = - 10 === this.length && 10 === t.length - ? p(this, t, e) - : i < 63 - ? d(this, t, e) - : i < 1024 - ? (function (t, e, r) { - (r.negative = e.negative ^ t.negative), (r.length = t.length + e.length); - for (var i = 0, n = 0, o = 0; o < r.length - 1; o++) { - var s = n; - n = 0; - for (var a = 67108863 & i, h = Math.min(o, e.length - 1), u = Math.max(0, o - t.length + 1); u <= h; u++) { - var f = o - u, - c = (0 | t.words[f]) * (0 | e.words[u]), - l = 67108863 & c; - (a = 67108863 & (l = (l + a) | 0)), - (n += (s = ((s = (s + ((c / 67108864) | 0)) | 0) + (l >>> 26)) | 0) >>> 26), - (s &= 67108863); - } - (r.words[o] = a), (i = s), (s = n); - } - return 0 !== i ? (r.words[o] = i) : r.length--, r.strip(); - })(this, t, e) - : m(this, t, e)), - r - ); - }), - (g.prototype.makeRBT = function (t) { - for (var e = new Array(t), r = o.prototype._countBits(t) - 1, i = 0; i < t; i++) e[i] = this.revBin(i, r, t); - return e; - }), - (g.prototype.revBin = function (t, e, r) { - if (0 === t || t === r - 1) return t; - for (var i = 0, n = 0; n < e; n++) (i |= (1 & t) << (e - n - 1)), (t >>= 1); - return i; - }), - (g.prototype.permute = function (t, e, r, i, n, o) { - for (var s = 0; s < o; s++) (i[s] = e[t[s]]), (n[s] = r[t[s]]); - }), - (g.prototype.transform = function (t, e, r, i, n, o) { - this.permute(o, t, e, r, i, n); - for (var s = 1; s < n; s <<= 1) - for (var a = s << 1, h = Math.cos((2 * Math.PI) / a), u = Math.sin((2 * Math.PI) / a), f = 0; f < n; f += a) - for (var c = h, l = u, d = 0; d < s; d++) { - var p = r[f + d], - m = i[f + d], - g = r[f + d + s], - b = i[f + d + s], - y = c * g - l * b; - (b = c * b + l * g), - (g = y), - (r[f + d] = p + g), - (i[f + d] = m + b), - (r[f + d + s] = p - g), - (i[f + d + s] = m - b), - d !== a && ((y = h * c - u * l), (l = h * l + u * c), (c = y)); - } - }), - (g.prototype.guessLen13b = function (t, e) { - var r = 1 | Math.max(e, t), - i = 1 & r, - n = 0; - for (r = (r / 2) | 0; r; r >>>= 1) n++; - return 1 << (n + 1 + i); - }), - (g.prototype.conjugate = function (t, e, r) { - if (!(r <= 1)) - for (var i = 0; i < r / 2; i++) { - var n = t[i]; - (t[i] = t[r - i - 1]), (t[r - i - 1] = n), (n = e[i]), (e[i] = -e[r - i - 1]), (e[r - i - 1] = -n); - } - }), - (g.prototype.normalize13b = function (t, e) { - for (var r = 0, i = 0; i < e / 2; i++) { - var n = 8192 * Math.round(t[2 * i + 1] / e) + Math.round(t[2 * i] / e) + r; - (t[i] = 67108863 & n), (r = n < 67108864 ? 0 : (n / 67108864) | 0); - } - return t; - }), - (g.prototype.convert13b = function (t, e, r, n) { - for (var o = 0, s = 0; s < e; s++) - (o += 0 | t[s]), (r[2 * s] = 8191 & o), (o >>>= 13), (r[2 * s + 1] = 8191 & o), (o >>>= 13); - for (s = 2 * e; s < n; ++s) r[s] = 0; - i(0 === o), i(0 == (-8192 & o)); - }), - (g.prototype.stub = function (t) { - for (var e = new Array(t), r = 0; r < t; r++) e[r] = 0; - return e; - }), - (g.prototype.mulp = function (t, e, r) { - var i = 2 * this.guessLen13b(t.length, e.length), - n = this.makeRBT(i), - o = this.stub(i), - s = new Array(i), - a = new Array(i), - h = new Array(i), - u = new Array(i), - f = new Array(i), - c = new Array(i), - l = r.words; - (l.length = i), - this.convert13b(t.words, t.length, s, i), - this.convert13b(e.words, e.length, u, i), - this.transform(s, o, a, h, i, n), - this.transform(u, o, f, c, i, n); - for (var d = 0; d < i; d++) { - var p = a[d] * f[d] - h[d] * c[d]; - (h[d] = a[d] * c[d] + h[d] * f[d]), (a[d] = p); - } - return ( - this.conjugate(a, h, i), - this.transform(a, h, l, o, i, n), - this.conjugate(l, o, i), - this.normalize13b(l, i), - (r.negative = t.negative ^ e.negative), - (r.length = t.length + e.length), - r.strip() - ); - }), - (o.prototype.mul = function (t) { - var e = new o(null); - return (e.words = new Array(this.length + t.length)), this.mulTo(t, e); - }), - (o.prototype.mulf = function (t) { - var e = new o(null); - return (e.words = new Array(this.length + t.length)), m(this, t, e); - }), - (o.prototype.imul = function (t) { - return this.clone().mulTo(t, this); - }), - (o.prototype.imuln = function (t) { - i('number' == typeof t), i(t < 67108864); - for (var e = 0, r = 0; r < this.length; r++) { - var n = (0 | this.words[r]) * t, - o = (67108863 & n) + (67108863 & e); - (e >>= 26), (e += (n / 67108864) | 0), (e += o >>> 26), (this.words[r] = 67108863 & o); - } - return 0 !== e && ((this.words[r] = e), this.length++), this; - }), - (o.prototype.muln = function (t) { - return this.clone().imuln(t); - }), - (o.prototype.sqr = function () { - return this.mul(this); - }), - (o.prototype.isqr = function () { - return this.imul(this.clone()); - }), - (o.prototype.pow = function (t) { - var e = (function (t) { - for (var e = new Array(t.bitLength()), r = 0; r < e.length; r++) { - var i = (r / 26) | 0, - n = r % 26; - e[r] = (t.words[i] & (1 << n)) >>> n; - } - return e; - })(t); - if (0 === e.length) return new o(1); - for (var r = this, i = 0; i < e.length && 0 === e[i]; i++, r = r.sqr()); - if (++i < e.length) for (var n = r.sqr(); i < e.length; i++, n = n.sqr()) 0 !== e[i] && (r = r.mul(n)); - return r; - }), - (o.prototype.iushln = function (t) { - i('number' == typeof t && t >= 0); - var e, - r = t % 26, - n = (t - r) / 26, - o = (67108863 >>> (26 - r)) << (26 - r); - if (0 !== r) { - var s = 0; - for (e = 0; e < this.length; e++) { - var a = this.words[e] & o, - h = ((0 | this.words[e]) - a) << r; - (this.words[e] = h | s), (s = a >>> (26 - r)); - } - s && ((this.words[e] = s), this.length++); - } - if (0 !== n) { - for (e = this.length - 1; e >= 0; e--) this.words[e + n] = this.words[e]; - for (e = 0; e < n; e++) this.words[e] = 0; - this.length += n; - } - return this.strip(); - }), - (o.prototype.ishln = function (t) { - return i(0 === this.negative), this.iushln(t); - }), - (o.prototype.iushrn = function (t, e, r) { - var n; - i('number' == typeof t && t >= 0), (n = e ? (e - (e % 26)) / 26 : 0); - var o = t % 26, - s = Math.min((t - o) / 26, this.length), - a = 67108863 ^ ((67108863 >>> o) << o), - h = r; - if (((n -= s), (n = Math.max(0, n)), h)) { - for (var u = 0; u < s; u++) h.words[u] = this.words[u]; - h.length = s; - } - if (0 === s); - else if (this.length > s) for (this.length -= s, u = 0; u < this.length; u++) this.words[u] = this.words[u + s]; - else (this.words[0] = 0), (this.length = 1); - var f = 0; - for (u = this.length - 1; u >= 0 && (0 !== f || u >= n); u--) { - var c = 0 | this.words[u]; - (this.words[u] = (f << (26 - o)) | (c >>> o)), (f = c & a); - } - return h && 0 !== f && (h.words[h.length++] = f), 0 === this.length && ((this.words[0] = 0), (this.length = 1)), this.strip(); - }), - (o.prototype.ishrn = function (t, e, r) { - return i(0 === this.negative), this.iushrn(t, e, r); - }), - (o.prototype.shln = function (t) { - return this.clone().ishln(t); - }), - (o.prototype.ushln = function (t) { - return this.clone().iushln(t); - }), - (o.prototype.shrn = function (t) { - return this.clone().ishrn(t); - }), - (o.prototype.ushrn = function (t) { - return this.clone().iushrn(t); - }), - (o.prototype.testn = function (t) { - i('number' == typeof t && t >= 0); - var e = t % 26, - r = (t - e) / 26, - n = 1 << e; - return !(this.length <= r || !(this.words[r] & n)); - }), - (o.prototype.imaskn = function (t) { - i('number' == typeof t && t >= 0); - var e = t % 26, - r = (t - e) / 26; - if ((i(0 === this.negative, 'imaskn works only with positive numbers'), this.length <= r)) return this; - if ((0 !== e && r++, (this.length = Math.min(r, this.length)), 0 !== e)) { - var n = 67108863 ^ ((67108863 >>> e) << e); - this.words[this.length - 1] &= n; - } - return this.strip(); - }), - (o.prototype.maskn = function (t) { - return this.clone().imaskn(t); - }), - (o.prototype.iaddn = function (t) { - return ( - i('number' == typeof t), - i(t < 67108864), - t < 0 - ? this.isubn(-t) - : 0 !== this.negative - ? 1 === this.length && (0 | this.words[0]) < t - ? ((this.words[0] = t - (0 | this.words[0])), (this.negative = 0), this) - : ((this.negative = 0), this.isubn(t), (this.negative = 1), this) - : this._iaddn(t) - ); - }), - (o.prototype._iaddn = function (t) { - this.words[0] += t; - for (var e = 0; e < this.length && this.words[e] >= 67108864; e++) - (this.words[e] -= 67108864), e === this.length - 1 ? (this.words[e + 1] = 1) : this.words[e + 1]++; - return (this.length = Math.max(this.length, e + 1)), this; - }), - (o.prototype.isubn = function (t) { - if ((i('number' == typeof t), i(t < 67108864), t < 0)) return this.iaddn(-t); - if (0 !== this.negative) return (this.negative = 0), this.iaddn(t), (this.negative = 1), this; - if (((this.words[0] -= t), 1 === this.length && this.words[0] < 0)) (this.words[0] = -this.words[0]), (this.negative = 1); - else for (var e = 0; e < this.length && this.words[e] < 0; e++) (this.words[e] += 67108864), (this.words[e + 1] -= 1); - return this.strip(); - }), - (o.prototype.addn = function (t) { - return this.clone().iaddn(t); - }), - (o.prototype.subn = function (t) { - return this.clone().isubn(t); - }), - (o.prototype.iabs = function () { - return (this.negative = 0), this; - }), - (o.prototype.abs = function () { - return this.clone().iabs(); - }), - (o.prototype._ishlnsubmul = function (t, e, r) { - var n, - o, - s = t.length + r; - this._expand(s); - var a = 0; - for (n = 0; n < t.length; n++) { - o = (0 | this.words[n + r]) + a; - var h = (0 | t.words[n]) * e; - (a = ((o -= 67108863 & h) >> 26) - ((h / 67108864) | 0)), (this.words[n + r] = 67108863 & o); - } - for (; n < this.length - r; n++) (a = (o = (0 | this.words[n + r]) + a) >> 26), (this.words[n + r] = 67108863 & o); - if (0 === a) return this.strip(); - for (i(-1 === a), a = 0, n = 0; n < this.length; n++) - (a = (o = -(0 | this.words[n]) + a) >> 26), (this.words[n] = 67108863 & o); - return (this.negative = 1), this.strip(); - }), - (o.prototype._wordDiv = function (t, e) { - var r = (this.length, t.length), - i = this.clone(), - n = t, - s = 0 | n.words[n.length - 1]; - 0 != (r = 26 - this._countBits(s)) && ((n = n.ushln(r)), i.iushln(r), (s = 0 | n.words[n.length - 1])); - var a, - h = i.length - n.length; - if ('mod' !== e) { - ((a = new o(null)).length = h + 1), (a.words = new Array(a.length)); - for (var u = 0; u < a.length; u++) a.words[u] = 0; - } - var f = i.clone()._ishlnsubmul(n, 1, h); - 0 === f.negative && ((i = f), a && (a.words[h] = 1)); - for (var c = h - 1; c >= 0; c--) { - var l = 67108864 * (0 | i.words[n.length + c]) + (0 | i.words[n.length + c - 1]); - for (l = Math.min((l / s) | 0, 67108863), i._ishlnsubmul(n, l, c); 0 !== i.negative; ) - l--, (i.negative = 0), i._ishlnsubmul(n, 1, c), i.isZero() || (i.negative ^= 1); - a && (a.words[c] = l); - } - return a && a.strip(), i.strip(), 'div' !== e && 0 !== r && i.iushrn(r), { div: a || null, mod: i }; - }), - (o.prototype.divmod = function (t, e, r) { - return ( - i(!t.isZero()), - this.isZero() - ? { div: new o(0), mod: new o(0) } - : 0 !== this.negative && 0 === t.negative - ? ((a = this.neg().divmod(t, e)), - 'mod' !== e && (n = a.div.neg()), - 'div' !== e && ((s = a.mod.neg()), r && 0 !== s.negative && s.iadd(t)), - { div: n, mod: s }) - : 0 === this.negative && 0 !== t.negative - ? ((a = this.divmod(t.neg(), e)), 'mod' !== e && (n = a.div.neg()), { div: n, mod: a.mod }) - : 0 != (this.negative & t.negative) - ? ((a = this.neg().divmod(t.neg(), e)), - 'div' !== e && ((s = a.mod.neg()), r && 0 !== s.negative && s.isub(t)), - { div: a.div, mod: s }) - : t.length > this.length || this.cmp(t) < 0 - ? { div: new o(0), mod: this } - : 1 === t.length - ? 'div' === e - ? { div: this.divn(t.words[0]), mod: null } - : 'mod' === e - ? { div: null, mod: new o(this.modn(t.words[0])) } - : { div: this.divn(t.words[0]), mod: new o(this.modn(t.words[0])) } - : this._wordDiv(t, e) - ); - var n, s, a; - }), - (o.prototype.div = function (t) { - return this.divmod(t, 'div', !1).div; - }), - (o.prototype.mod = function (t) { - return this.divmod(t, 'mod', !1).mod; - }), - (o.prototype.umod = function (t) { - return this.divmod(t, 'mod', !0).mod; - }), - (o.prototype.divRound = function (t) { - var e = this.divmod(t); - if (e.mod.isZero()) return e.div; - var r = 0 !== e.div.negative ? e.mod.isub(t) : e.mod, - i = t.ushrn(1), - n = t.andln(1), - o = r.cmp(i); - return o < 0 || (1 === n && 0 === o) ? e.div : 0 !== e.div.negative ? e.div.isubn(1) : e.div.iaddn(1); - }), - (o.prototype.modn = function (t) { - i(t <= 67108863); - for (var e = (1 << 26) % t, r = 0, n = this.length - 1; n >= 0; n--) r = (e * r + (0 | this.words[n])) % t; - return r; - }), - (o.prototype.idivn = function (t) { - i(t <= 67108863); - for (var e = 0, r = this.length - 1; r >= 0; r--) { - var n = (0 | this.words[r]) + 67108864 * e; - (this.words[r] = (n / t) | 0), (e = n % t); - } - return this.strip(); - }), - (o.prototype.divn = function (t) { - return this.clone().idivn(t); - }), - (o.prototype.egcd = function (t) { - i(0 === t.negative), i(!t.isZero()); - var e = this, - r = t.clone(); - e = 0 !== e.negative ? e.umod(t) : e.clone(); - for (var n = new o(1), s = new o(0), a = new o(0), h = new o(1), u = 0; e.isEven() && r.isEven(); ) - e.iushrn(1), r.iushrn(1), ++u; - for (var f = r.clone(), c = e.clone(); !e.isZero(); ) { - for (var l = 0, d = 1; 0 == (e.words[0] & d) && l < 26; ++l, d <<= 1); - if (l > 0) for (e.iushrn(l); l-- > 0; ) (n.isOdd() || s.isOdd()) && (n.iadd(f), s.isub(c)), n.iushrn(1), s.iushrn(1); - for (var p = 0, m = 1; 0 == (r.words[0] & m) && p < 26; ++p, m <<= 1); - if (p > 0) for (r.iushrn(p); p-- > 0; ) (a.isOdd() || h.isOdd()) && (a.iadd(f), h.isub(c)), a.iushrn(1), h.iushrn(1); - e.cmp(r) >= 0 ? (e.isub(r), n.isub(a), s.isub(h)) : (r.isub(e), a.isub(n), h.isub(s)); - } - return { a, b: h, gcd: r.iushln(u) }; - }), - (o.prototype._invmp = function (t) { - i(0 === t.negative), i(!t.isZero()); - var e = this, - r = t.clone(); - e = 0 !== e.negative ? e.umod(t) : e.clone(); - for (var n, s = new o(1), a = new o(0), h = r.clone(); e.cmpn(1) > 0 && r.cmpn(1) > 0; ) { - for (var u = 0, f = 1; 0 == (e.words[0] & f) && u < 26; ++u, f <<= 1); - if (u > 0) for (e.iushrn(u); u-- > 0; ) s.isOdd() && s.iadd(h), s.iushrn(1); - for (var c = 0, l = 1; 0 == (r.words[0] & l) && c < 26; ++c, l <<= 1); - if (c > 0) for (r.iushrn(c); c-- > 0; ) a.isOdd() && a.iadd(h), a.iushrn(1); - e.cmp(r) >= 0 ? (e.isub(r), s.isub(a)) : (r.isub(e), a.isub(s)); - } - return (n = 0 === e.cmpn(1) ? s : a).cmpn(0) < 0 && n.iadd(t), n; - }), - (o.prototype.gcd = function (t) { - if (this.isZero()) return t.abs(); - if (t.isZero()) return this.abs(); - var e = this.clone(), - r = t.clone(); - (e.negative = 0), (r.negative = 0); - for (var i = 0; e.isEven() && r.isEven(); i++) e.iushrn(1), r.iushrn(1); - for (;;) { - for (; e.isEven(); ) e.iushrn(1); - for (; r.isEven(); ) r.iushrn(1); - var n = e.cmp(r); - if (n < 0) { - var o = e; - (e = r), (r = o); - } else if (0 === n || 0 === r.cmpn(1)) break; - e.isub(r); - } - return r.iushln(i); - }), - (o.prototype.invm = function (t) { - return this.egcd(t).a.umod(t); - }), - (o.prototype.isEven = function () { - return 0 == (1 & this.words[0]); - }), - (o.prototype.isOdd = function () { - return 1 == (1 & this.words[0]); - }), - (o.prototype.andln = function (t) { - return this.words[0] & t; - }), - (o.prototype.bincn = function (t) { - i('number' == typeof t); - var e = t % 26, - r = (t - e) / 26, - n = 1 << e; - if (this.length <= r) return this._expand(r + 1), (this.words[r] |= n), this; - for (var o = n, s = r; 0 !== o && s < this.length; s++) { - var a = 0 | this.words[s]; - (o = (a += o) >>> 26), (a &= 67108863), (this.words[s] = a); - } - return 0 !== o && ((this.words[s] = o), this.length++), this; - }), - (o.prototype.isZero = function () { - return 1 === this.length && 0 === this.words[0]; - }), - (o.prototype.cmpn = function (t) { - var e, - r = t < 0; - if (0 !== this.negative && !r) return -1; - if (0 === this.negative && r) return 1; - if ((this.strip(), this.length > 1)) e = 1; - else { - r && (t = -t), i(t <= 67108863, 'Number is too big'); - var n = 0 | this.words[0]; - e = n === t ? 0 : n < t ? -1 : 1; - } - return 0 !== this.negative ? 0 | -e : e; - }), - (o.prototype.cmp = function (t) { - if (0 !== this.negative && 0 === t.negative) return -1; - if (0 === this.negative && 0 !== t.negative) return 1; - var e = this.ucmp(t); - return 0 !== this.negative ? 0 | -e : e; - }), - (o.prototype.ucmp = function (t) { - if (this.length > t.length) return 1; - if (this.length < t.length) return -1; - for (var e = 0, r = this.length - 1; r >= 0; r--) { - var i = 0 | this.words[r], - n = 0 | t.words[r]; - if (i !== n) { - i < n ? (e = -1) : i > n && (e = 1); - break; - } - } - return e; - }), - (o.prototype.gtn = function (t) { - return 1 === this.cmpn(t); - }), - (o.prototype.gt = function (t) { - return 1 === this.cmp(t); - }), - (o.prototype.gten = function (t) { - return this.cmpn(t) >= 0; - }), - (o.prototype.gte = function (t) { - return this.cmp(t) >= 0; - }), - (o.prototype.ltn = function (t) { - return -1 === this.cmpn(t); - }), - (o.prototype.lt = function (t) { - return -1 === this.cmp(t); - }), - (o.prototype.lten = function (t) { - return this.cmpn(t) <= 0; - }), - (o.prototype.lte = function (t) { - return this.cmp(t) <= 0; - }), - (o.prototype.eqn = function (t) { - return 0 === this.cmpn(t); - }), - (o.prototype.eq = function (t) { - return 0 === this.cmp(t); - }), - (o.red = function (t) { - return new E(t); - }), - (o.prototype.toRed = function (t) { - return ( - i(!this.red, 'Already a number in reduction context'), - i(0 === this.negative, 'red works only with positives'), - t.convertTo(this)._forceRed(t) - ); - }), - (o.prototype.fromRed = function () { - return i(this.red, 'fromRed works only with numbers in reduction context'), this.red.convertFrom(this); - }), - (o.prototype._forceRed = function (t) { - return (this.red = t), this; - }), - (o.prototype.forceRed = function (t) { - return i(!this.red, 'Already a number in reduction context'), this._forceRed(t); - }), - (o.prototype.redAdd = function (t) { - return i(this.red, 'redAdd works only with red numbers'), this.red.add(this, t); - }), - (o.prototype.redIAdd = function (t) { - return i(this.red, 'redIAdd works only with red numbers'), this.red.iadd(this, t); - }), - (o.prototype.redSub = function (t) { - return i(this.red, 'redSub works only with red numbers'), this.red.sub(this, t); - }), - (o.prototype.redISub = function (t) { - return i(this.red, 'redISub works only with red numbers'), this.red.isub(this, t); - }), - (o.prototype.redShl = function (t) { - return i(this.red, 'redShl works only with red numbers'), this.red.shl(this, t); - }), - (o.prototype.redMul = function (t) { - return i(this.red, 'redMul works only with red numbers'), this.red._verify2(this, t), this.red.mul(this, t); - }), - (o.prototype.redIMul = function (t) { - return i(this.red, 'redMul works only with red numbers'), this.red._verify2(this, t), this.red.imul(this, t); - }), - (o.prototype.redSqr = function () { - return i(this.red, 'redSqr works only with red numbers'), this.red._verify1(this), this.red.sqr(this); - }), - (o.prototype.redISqr = function () { - return i(this.red, 'redISqr works only with red numbers'), this.red._verify1(this), this.red.isqr(this); - }), - (o.prototype.redSqrt = function () { - return i(this.red, 'redSqrt works only with red numbers'), this.red._verify1(this), this.red.sqrt(this); - }), - (o.prototype.redInvm = function () { - return i(this.red, 'redInvm works only with red numbers'), this.red._verify1(this), this.red.invm(this); - }), - (o.prototype.redNeg = function () { - return i(this.red, 'redNeg works only with red numbers'), this.red._verify1(this), this.red.neg(this); - }), - (o.prototype.redPow = function (t) { - return i(this.red && !t.red, 'redPow(normalNum)'), this.red._verify1(this), this.red.pow(this, t); - }); - var b = { k256: null, p224: null, p192: null, p25519: null }; - function y(t, e) { - (this.name = t), - (this.p = new o(e, 16)), - (this.n = this.p.bitLength()), - (this.k = new o(1).iushln(this.n).isub(this.p)), - (this.tmp = this._tmp()); - } - function v() { - y.call(this, 'k256', 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f'); - } - function w() { - y.call(this, 'p224', 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001'); - } - function _() { - y.call(this, 'p192', 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff'); - } - function M() { - y.call(this, '25519', '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed'); - } - function E(t) { - if ('string' == typeof t) { - var e = o._prime(t); - (this.m = e.p), (this.prime = e); - } else i(t.gtn(1), 'modulus must be greater than 1'), (this.m = t), (this.prime = null); - } - function S(t) { - E.call(this, t), - (this.shift = this.m.bitLength()), - this.shift % 26 != 0 && (this.shift += 26 - (this.shift % 26)), - (this.r = new o(1).iushln(this.shift)), - (this.r2 = this.imod(this.r.sqr())), - (this.rinv = this.r._invmp(this.m)), - (this.minv = this.rinv.mul(this.r).isubn(1).div(this.m)), - (this.minv = this.minv.umod(this.r)), - (this.minv = this.r.sub(this.minv)); - } - (y.prototype._tmp = function () { - var t = new o(null); - return (t.words = new Array(Math.ceil(this.n / 13))), t; - }), - (y.prototype.ireduce = function (t) { - var e, - r = t; - do { - this.split(r, this.tmp), (e = (r = (r = this.imulK(r)).iadd(this.tmp)).bitLength()); - } while (e > this.n); - var i = e < this.n ? -1 : r.ucmp(this.p); - return 0 === i ? ((r.words[0] = 0), (r.length = 1)) : i > 0 ? r.isub(this.p) : void 0 !== r.strip ? r.strip() : r._strip(), r; - }), - (y.prototype.split = function (t, e) { - t.iushrn(this.n, 0, e); - }), - (y.prototype.imulK = function (t) { - return t.imul(this.k); - }), - n(v, y), - (v.prototype.split = function (t, e) { - for (var r = 4194303, i = Math.min(t.length, 9), n = 0; n < i; n++) e.words[n] = t.words[n]; - if (((e.length = i), t.length <= 9)) return (t.words[0] = 0), void (t.length = 1); - var o = t.words[9]; - for (e.words[e.length++] = o & r, n = 10; n < t.length; n++) { - var s = 0 | t.words[n]; - (t.words[n - 10] = ((s & r) << 4) | (o >>> 22)), (o = s); - } - (o >>>= 22), (t.words[n - 10] = o), 0 === o && t.length > 10 ? (t.length -= 10) : (t.length -= 9); - }), - (v.prototype.imulK = function (t) { - (t.words[t.length] = 0), (t.words[t.length + 1] = 0), (t.length += 2); - for (var e = 0, r = 0; r < t.length; r++) { - var i = 0 | t.words[r]; - (e += 977 * i), (t.words[r] = 67108863 & e), (e = 64 * i + ((e / 67108864) | 0)); - } - return 0 === t.words[t.length - 1] && (t.length--, 0 === t.words[t.length - 1] && t.length--), t; - }), - n(w, y), - n(_, y), - n(M, y), - (M.prototype.imulK = function (t) { - for (var e = 0, r = 0; r < t.length; r++) { - var i = 19 * (0 | t.words[r]) + e, - n = 67108863 & i; - (i >>>= 26), (t.words[r] = n), (e = i); - } - return 0 !== e && (t.words[t.length++] = e), t; - }), - (o._prime = function (t) { - if (b[t]) return b[t]; - var e; - if ('k256' === t) e = new v(); - else if ('p224' === t) e = new w(); - else if ('p192' === t) e = new _(); - else { - if ('p25519' !== t) throw new Error('Unknown prime ' + t); - e = new M(); - } - return (b[t] = e), e; - }), - (E.prototype._verify1 = function (t) { - i(0 === t.negative, 'red works only with positives'), i(t.red, 'red works only with red numbers'); - }), - (E.prototype._verify2 = function (t, e) { - i(0 == (t.negative | e.negative), 'red works only with positives'), - i(t.red && t.red === e.red, 'red works only with red numbers'); - }), - (E.prototype.imod = function (t) { - return this.prime ? this.prime.ireduce(t)._forceRed(this) : t.umod(this.m)._forceRed(this); - }), - (E.prototype.neg = function (t) { - return t.isZero() ? t.clone() : this.m.sub(t)._forceRed(this); - }), - (E.prototype.add = function (t, e) { - this._verify2(t, e); - var r = t.add(e); - return r.cmp(this.m) >= 0 && r.isub(this.m), r._forceRed(this); - }), - (E.prototype.iadd = function (t, e) { - this._verify2(t, e); - var r = t.iadd(e); - return r.cmp(this.m) >= 0 && r.isub(this.m), r; - }), - (E.prototype.sub = function (t, e) { - this._verify2(t, e); - var r = t.sub(e); - return r.cmpn(0) < 0 && r.iadd(this.m), r._forceRed(this); - }), - (E.prototype.isub = function (t, e) { - this._verify2(t, e); - var r = t.isub(e); - return r.cmpn(0) < 0 && r.iadd(this.m), r; - }), - (E.prototype.shl = function (t, e) { - return this._verify1(t), this.imod(t.ushln(e)); - }), - (E.prototype.imul = function (t, e) { - return this._verify2(t, e), this.imod(t.imul(e)); - }), - (E.prototype.mul = function (t, e) { - return this._verify2(t, e), this.imod(t.mul(e)); - }), - (E.prototype.isqr = function (t) { - return this.imul(t, t.clone()); - }), - (E.prototype.sqr = function (t) { - return this.mul(t, t); - }), - (E.prototype.sqrt = function (t) { - if (t.isZero()) return t.clone(); - var e = this.m.andln(3); - if ((i(e % 2 == 1), 3 === e)) { - var r = this.m.add(new o(1)).iushrn(2); - return this.pow(t, r); - } - for (var n = this.m.subn(1), s = 0; !n.isZero() && 0 === n.andln(1); ) s++, n.iushrn(1); - i(!n.isZero()); - var a = new o(1).toRed(this), - h = a.redNeg(), - u = this.m.subn(1).iushrn(1), - f = this.m.bitLength(); - for (f = new o(2 * f * f).toRed(this); 0 !== this.pow(f, u).cmp(h); ) f.redIAdd(h); - for (var c = this.pow(f, n), l = this.pow(t, n.addn(1).iushrn(1)), d = this.pow(t, n), p = s; 0 !== d.cmp(a); ) { - for (var m = d, g = 0; 0 !== m.cmp(a); g++) m = m.redSqr(); - i(g < p); - var b = this.pow(c, new o(1).iushln(p - g - 1)); - (l = l.redMul(b)), (c = b.redSqr()), (d = d.redMul(c)), (p = g); - } - return l; - }), - (E.prototype.invm = function (t) { - var e = t._invmp(this.m); - return 0 !== e.negative ? ((e.negative = 0), this.imod(e).redNeg()) : this.imod(e); - }), - (E.prototype.pow = function (t, e) { - if (e.isZero()) return new o(1).toRed(this); - if (0 === e.cmpn(1)) return t.clone(); - var r = new Array(16); - (r[0] = new o(1).toRed(this)), (r[1] = t); - for (var i = 2; i < r.length; i++) r[i] = this.mul(r[i - 1], t); - var n = r[0], - s = 0, - a = 0, - h = e.bitLength() % 26; - for (0 === h && (h = 26), i = e.length - 1; i >= 0; i--) { - for (var u = e.words[i], f = h - 1; f >= 0; f--) { - var c = (u >> f) & 1; - n !== r[0] && (n = this.sqr(n)), - 0 !== c || 0 !== s - ? ((s <<= 1), (s |= c), (4 == ++a || (0 === i && 0 === f)) && ((n = this.mul(n, r[s])), (a = 0), (s = 0))) - : (a = 0); - } - h = 26; - } - return n; - }), - (E.prototype.convertTo = function (t) { - var e = t.umod(this.m); - return e === t ? e.clone() : e; - }), - (E.prototype.convertFrom = function (t) { - var e = t.clone(); - return (e.red = null), e; - }), - (o.mont = function (t) { - return new S(t); - }), - n(S, E), - (S.prototype.convertTo = function (t) { - return this.imod(t.ushln(this.shift)); - }), - (S.prototype.convertFrom = function (t) { - var e = this.imod(t.mul(this.rinv)); - return (e.red = null), e; - }), - (S.prototype.imul = function (t, e) { - if (t.isZero() || e.isZero()) return (t.words[0] = 0), (t.length = 1), t; - var r = t.imul(e), - i = r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m), - n = r.isub(i).iushrn(this.shift), - o = n; - return n.cmp(this.m) >= 0 ? (o = n.isub(this.m)) : n.cmpn(0) < 0 && (o = n.iadd(this.m)), o._forceRed(this); - }), - (S.prototype.mul = function (t, e) { - if (t.isZero() || e.isZero()) return new o(0)._forceRed(this); - var r = t.mul(e), - i = r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m), - n = r.isub(i).iushrn(this.shift), - s = n; - return n.cmp(this.m) >= 0 ? (s = n.isub(this.m)) : n.cmpn(0) < 0 && (s = n.iadd(this.m)), s._forceRed(this); - }), - (S.prototype.invm = function (t) { - return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this); - }); - })((t = r.nmd(t)), this); - }, - 7859: t => { - function e(t, e) { - if (!t) throw new Error(e || 'Assertion failed'); - } - (t.exports = e), - (e.equal = function (t, e, r) { - if (t != e) throw new Error(r || 'Assertion failed: ' + t + ' != ' + e); - }); - }, - 2910: (t, e) => { - 'use strict'; - var r = e; - function i(t) { - return 1 === t.length ? '0' + t : t; - } - function n(t) { - for (var e = '', r = 0; r < t.length; r++) e += i(t[r].toString(16)); - return e; - } - (r.toArray = function (t, e) { - if (Array.isArray(t)) return t.slice(); - if (!t) return []; - var r = []; - if ('string' != typeof t) { - for (var i = 0; i < t.length; i++) r[i] = 0 | t[i]; - return r; - } - if ('hex' === e) - for ((t = t.replace(/[^a-z0-9]+/gi, '')).length % 2 != 0 && (t = '0' + t), i = 0; i < t.length; i += 2) - r.push(parseInt(t[i] + t[i + 1], 16)); - else - for (i = 0; i < t.length; i++) { - var n = t.charCodeAt(i), - o = n >> 8, - s = 255 & n; - o ? r.push(o, s) : r.push(s); - } - return r; - }), - (r.zero2 = i), - (r.toHex = n), - (r.encode = function (t, e) { - return 'hex' === e ? n(t) : t; - }); - }, - 8481: (t, e, r) => { - 'use strict'; - var i = r(9840); - e.certificate = r(6939); - var n = i.define('RSAPrivateKey', function () { - this.seq().obj( - this.key('version').int(), - this.key('modulus').int(), - this.key('publicExponent').int(), - this.key('privateExponent').int(), - this.key('prime1').int(), - this.key('prime2').int(), - this.key('exponent1').int(), - this.key('exponent2').int(), - this.key('coefficient').int() - ); - }); - e.RSAPrivateKey = n; - var o = i.define('RSAPublicKey', function () { - this.seq().obj(this.key('modulus').int(), this.key('publicExponent').int()); - }); - e.RSAPublicKey = o; - var s = i.define('SubjectPublicKeyInfo', function () { - this.seq().obj(this.key('algorithm').use(a), this.key('subjectPublicKey').bitstr()); - }); - e.PublicKey = s; - var a = i.define('AlgorithmIdentifier', function () { - this.seq().obj( - this.key('algorithm').objid(), - this.key('none').null_().optional(), - this.key('curve').objid().optional(), - this.key('params').seq().obj(this.key('p').int(), this.key('q').int(), this.key('g').int()).optional() - ); - }), - h = i.define('PrivateKeyInfo', function () { - this.seq().obj(this.key('version').int(), this.key('algorithm').use(a), this.key('subjectPrivateKey').octstr()); - }); - e.PrivateKey = h; - var u = i.define('EncryptedPrivateKeyInfo', function () { - this.seq().obj( - this.key('algorithm') - .seq() - .obj( - this.key('id').objid(), - this.key('decrypt') - .seq() - .obj( - this.key('kde') - .seq() - .obj(this.key('id').objid(), this.key('kdeparams').seq().obj(this.key('salt').octstr(), this.key('iters').int())), - this.key('cipher').seq().obj(this.key('algo').objid(), this.key('iv').octstr()) - ) - ), - this.key('subjectPrivateKey').octstr() - ); - }); - e.EncryptedPrivateKey = u; - var f = i.define('DSAPrivateKey', function () { - this.seq().obj( - this.key('version').int(), - this.key('p').int(), - this.key('q').int(), - this.key('g').int(), - this.key('pub_key').int(), - this.key('priv_key').int() - ); - }); - (e.DSAPrivateKey = f), - (e.DSAparam = i.define('DSAparam', function () { - this.int(); - })); - var c = i.define('ECPrivateKey', function () { - this.seq().obj( - this.key('version').int(), - this.key('privateKey').octstr(), - this.key('parameters').optional().explicit(0).use(l), - this.key('publicKey').optional().explicit(1).bitstr() - ); - }); - e.ECPrivateKey = c; - var l = i.define('ECParameters', function () { - this.choice({ namedCurve: this.objid() }); - }); - e.signature = i.define('signature', function () { - this.seq().obj(this.key('r').int(), this.key('s').int()); - }); - }, - 6939: (t, e, r) => { - 'use strict'; - var i = r(9840), - n = i.define('Time', function () { - this.choice({ utcTime: this.utctime(), generalTime: this.gentime() }); - }), - o = i.define('AttributeTypeValue', function () { - this.seq().obj(this.key('type').objid(), this.key('value').any()); - }), - s = i.define('AlgorithmIdentifier', function () { - this.seq().obj(this.key('algorithm').objid(), this.key('parameters').optional(), this.key('curve').objid().optional()); - }), - a = i.define('SubjectPublicKeyInfo', function () { - this.seq().obj(this.key('algorithm').use(s), this.key('subjectPublicKey').bitstr()); - }), - h = i.define('RelativeDistinguishedName', function () { - this.setof(o); - }), - u = i.define('RDNSequence', function () { - this.seqof(h); - }), - f = i.define('Name', function () { - this.choice({ rdnSequence: this.use(u) }); - }), - c = i.define('Validity', function () { - this.seq().obj(this.key('notBefore').use(n), this.key('notAfter').use(n)); - }), - l = i.define('Extension', function () { - this.seq().obj(this.key('extnID').objid(), this.key('critical').bool().def(!1), this.key('extnValue').octstr()); - }), - d = i.define('TBSCertificate', function () { - this.seq().obj( - this.key('version').explicit(0).int().optional(), - this.key('serialNumber').int(), - this.key('signature').use(s), - this.key('issuer').use(f), - this.key('validity').use(c), - this.key('subject').use(f), - this.key('subjectPublicKeyInfo').use(a), - this.key('issuerUniqueID').implicit(1).bitstr().optional(), - this.key('subjectUniqueID').implicit(2).bitstr().optional(), - this.key('extensions').explicit(3).seqof(l).optional() - ); - }), - p = i.define('X509Certificate', function () { - this.seq().obj(this.key('tbsCertificate').use(d), this.key('signatureAlgorithm').use(s), this.key('signatureValue').bitstr()); - }); - t.exports = p; - }, - 1412: (t, e, r) => { - var i = /Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m, - n = /^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m, - o = /^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m, - s = r(5883), - a = r(8901), - h = r(7172).Buffer; - t.exports = function (t, e) { - var r, - u = t.toString(), - f = u.match(i); - if (f) { - var c = 'aes' + f[1], - l = h.from(f[2], 'hex'), - d = h.from(f[3].replace(/[\r\n]/g, ''), 'base64'), - p = s(e, l.slice(0, 8), parseInt(f[1], 10)).key, - m = [], - g = a.createDecipheriv(c, p, l); - m.push(g.update(d)), m.push(g.final()), (r = h.concat(m)); - } else { - var b = u.match(o); - r = h.from(b[2].replace(/[\r\n]/g, ''), 'base64'); - } - return { tag: u.match(n)[1], data: r }; - }; - }, - 1463: (t, e, r) => { - var i = r(8481), - n = r(1095), - o = r(1412), - s = r(8901), - a = r(41), - h = r(7172).Buffer; - function u(t) { - var e; - 'object' != typeof t || h.isBuffer(t) || ((e = t.passphrase), (t = t.key)), 'string' == typeof t && (t = h.from(t)); - var r, - u, - f = o(t, e), - c = f.tag, - l = f.data; - switch (c) { - case 'CERTIFICATE': - u = i.certificate.decode(l, 'der').tbsCertificate.subjectPublicKeyInfo; - case 'PUBLIC KEY': - switch ((u || (u = i.PublicKey.decode(l, 'der')), (r = u.algorithm.algorithm.join('.')))) { - case '1.2.840.113549.1.1.1': - return i.RSAPublicKey.decode(u.subjectPublicKey.data, 'der'); - case '1.2.840.10045.2.1': - return (u.subjectPrivateKey = u.subjectPublicKey), { type: 'ec', data: u }; - case '1.2.840.10040.4.1': - return ( - (u.algorithm.params.pub_key = i.DSAparam.decode(u.subjectPublicKey.data, 'der')), - { type: 'dsa', data: u.algorithm.params } - ); - default: - throw new Error('unknown key id ' + r); - } - case 'ENCRYPTED PRIVATE KEY': - l = (function (t, e) { - var r = t.algorithm.decrypt.kde.kdeparams.salt, - i = parseInt(t.algorithm.decrypt.kde.kdeparams.iters.toString(), 10), - o = n[t.algorithm.decrypt.cipher.algo.join('.')], - u = t.algorithm.decrypt.cipher.iv, - f = t.subjectPrivateKey, - c = parseInt(o.split('-')[1], 10) / 8, - l = a.pbkdf2Sync(e, r, i, c, 'sha1'), - d = s.createDecipheriv(o, l, u), - p = []; - return p.push(d.update(f)), p.push(d.final()), h.concat(p); - })((l = i.EncryptedPrivateKey.decode(l, 'der')), e); - case 'PRIVATE KEY': - switch ((r = (u = i.PrivateKey.decode(l, 'der')).algorithm.algorithm.join('.'))) { - case '1.2.840.113549.1.1.1': - return i.RSAPrivateKey.decode(u.subjectPrivateKey, 'der'); - case '1.2.840.10045.2.1': - return { curve: u.algorithm.curve, privateKey: i.ECPrivateKey.decode(u.subjectPrivateKey, 'der').privateKey }; - case '1.2.840.10040.4.1': - return ( - (u.algorithm.params.priv_key = i.DSAparam.decode(u.subjectPrivateKey, 'der')), - { type: 'dsa', params: u.algorithm.params } - ); - default: - throw new Error('unknown key id ' + r); - } - case 'RSA PUBLIC KEY': - return i.RSAPublicKey.decode(l, 'der'); - case 'RSA PRIVATE KEY': - return i.RSAPrivateKey.decode(l, 'der'); - case 'DSA PRIVATE KEY': - return { type: 'dsa', params: i.DSAPrivateKey.decode(l, 'der') }; - case 'EC PRIVATE KEY': - return { curve: (l = i.ECPrivateKey.decode(l, 'der')).parameters.value, privateKey: l.privateKey }; - default: - throw new Error('unknown key type ' + c); - } - } - (t.exports = u), (u.signature = i.signature); - }, - 41: (t, e, r) => { - (e.pbkdf2 = r(6394)), (e.pbkdf2Sync = r(4355)); - }, - 6394: (t, e, r) => { - var i, - n, - o = r(7172).Buffer, - s = r(2642), - a = r(2703), - h = r(4355), - u = r(3819), - f = r.g.crypto && r.g.crypto.subtle, - c = { - 'sha': 'SHA-1', - 'sha-1': 'SHA-1', - 'sha1': 'SHA-1', - 'sha256': 'SHA-256', - 'sha-256': 'SHA-256', - 'sha384': 'SHA-384', - 'sha-384': 'SHA-384', - 'sha-512': 'SHA-512', - 'sha512': 'SHA-512', - }, - l = []; - function d() { - return ( - n || - (n = - r.g.process && r.g.process.nextTick - ? r.g.process.nextTick - : r.g.queueMicrotask - ? r.g.queueMicrotask - : r.g.setImmediate - ? r.g.setImmediate - : r.g.setTimeout) - ); - } - function p(t, e, r, i, n) { - return f - .importKey('raw', t, { name: 'PBKDF2' }, !1, ['deriveBits']) - .then(function (t) { - return f.deriveBits({ name: 'PBKDF2', salt: e, iterations: r, hash: { name: n } }, t, i << 3); - }) - .then(function (t) { - return o.from(t); - }); - } - t.exports = function (t, e, n, m, g, b) { - 'function' == typeof g && ((b = g), (g = void 0)); - var y = c[(g = g || 'sha1').toLowerCase()]; - if (y && 'function' == typeof r.g.Promise) { - if ((s(n, m), (t = u(t, a, 'Password')), (e = u(e, a, 'Salt')), 'function' != typeof b)) - throw new Error('No callback provided to pbkdf2'); - !(function (t, e) { - t.then( - function (t) { - d()(function () { - e(null, t); - }); - }, - function (t) { - d()(function () { - e(t); - }); - } - ); - })( - (function (t) { - if (r.g.process && !r.g.process.browser) return Promise.resolve(!1); - if (!f || !f.importKey || !f.deriveBits) return Promise.resolve(!1); - if (void 0 !== l[t]) return l[t]; - var e = p((i = i || o.alloc(8)), i, 10, 128, t) - .then(function () { - return !0; - }) - .catch(function () { - return !1; - }); - return (l[t] = e), e; - })(y).then(function (r) { - return r ? p(t, e, n, m, y) : h(t, e, n, m, g); - }), - b - ); - } else - d()(function () { - var r; - try { - r = h(t, e, n, m, g); - } catch (t) { - return b(t); - } - b(null, r); - }); - }; - }, - 2703: (t, e, r) => { - var i; - (i = - r.g.process && r.g.process.browser - ? 'utf-8' - : r.g.process && r.g.process.version - ? parseInt(process.version.split('.')[0].slice(1), 10) >= 6 - ? 'utf-8' - : 'binary' - : 'utf-8'), - (t.exports = i); - }, - 2642: t => { - var e = Math.pow(2, 30) - 1; - t.exports = function (t, r) { - if ('number' != typeof t) throw new TypeError('Iterations not a number'); - if (t < 0) throw new TypeError('Bad iterations'); - if ('number' != typeof r) throw new TypeError('Key length not a number'); - if (r < 0 || r > e || r != r) throw new TypeError('Bad key length'); - }; - }, - 4355: (t, e, r) => { - var i = r(7401), - n = r(6558), - o = r(4458), - s = r(7172).Buffer, - a = r(2642), - h = r(2703), - u = r(3819), - f = s.alloc(128), - c = { md5: 16, sha1: 20, sha224: 28, sha256: 32, sha384: 48, sha512: 64, rmd160: 20, ripemd160: 20 }; - function l(t, e, r) { - var a = (function (t) { - return 'rmd160' === t || 'ripemd160' === t - ? function (t) { - return new n().update(t).digest(); - } - : 'md5' === t - ? i - : function (e) { - return o(t).update(e).digest(); - }; - })(t), - h = 'sha512' === t || 'sha384' === t ? 128 : 64; - e.length > h ? (e = a(e)) : e.length < h && (e = s.concat([e, f], h)); - for (var u = s.allocUnsafe(h + c[t]), l = s.allocUnsafe(h + c[t]), d = 0; d < h; d++) (u[d] = 54 ^ e[d]), (l[d] = 92 ^ e[d]); - var p = s.allocUnsafe(h + r + 4); - u.copy(p, 0, 0, h), - (this.ipad1 = p), - (this.ipad2 = u), - (this.opad = l), - (this.alg = t), - (this.blocksize = h), - (this.hash = a), - (this.size = c[t]); - } - (l.prototype.run = function (t, e) { - return t.copy(e, this.blocksize), this.hash(e).copy(this.opad, this.blocksize), this.hash(this.opad); - }), - (t.exports = function (t, e, r, i, n) { - a(r, i); - var o = new l((n = n || 'sha1'), (t = u(t, h, 'Password')), (e = u(e, h, 'Salt')).length), - f = s.allocUnsafe(i), - d = s.allocUnsafe(e.length + 4); - e.copy(d, 0, 0, e.length); - for (var p = 0, m = c[n], g = Math.ceil(i / m), b = 1; b <= g; b++) { - d.writeUInt32BE(b, e.length); - for (var y = o.run(d, o.ipad1), v = y, w = 1; w < r; w++) { - v = o.run(v, o.ipad2); - for (var _ = 0; _ < m; _++) y[_] ^= v[_]; - } - y.copy(f, p), (p += m); - } - return f; - }); - }, - 3819: (t, e, r) => { - var i = r(7172).Buffer; - t.exports = function (t, e, r) { - if (i.isBuffer(t)) return t; - if ('string' == typeof t) return i.from(t, e); - if (ArrayBuffer.isView(t)) return i.from(t.buffer); - throw new TypeError(r + ' must be a string, a Buffer, a typed array or a DataView'); - }; - }, - 9639: (t, e, r) => { - (e.publicEncrypt = r(9881)), - (e.privateDecrypt = r(2619)), - (e.privateEncrypt = function (t, r) { - return e.publicEncrypt(t, r, !0); - }), - (e.publicDecrypt = function (t, r) { - return e.privateDecrypt(t, r, !0); - }); - }, - 1697: (t, e, r) => { - var i = r(7266), - n = r(7172).Buffer; - function o(t) { - var e = n.allocUnsafe(4); - return e.writeUInt32BE(t, 0), e; - } - t.exports = function (t, e) { - for (var r, s = n.alloc(0), a = 0; s.length < e; ) (r = o(a++)), (s = n.concat([s, i('sha1').update(t).update(r).digest()])); - return s.slice(0, e); - }; - }, - 9492: function (t, e, r) { - !(function (t, e) { - 'use strict'; - function i(t, e) { - if (!t) throw new Error(e || 'Assertion failed'); - } - function n(t, e) { - t.super_ = e; - var r = function () {}; - (r.prototype = e.prototype), (t.prototype = new r()), (t.prototype.constructor = t); - } - function o(t, e, r) { - if (o.isBN(t)) return t; - (this.negative = 0), - (this.words = null), - (this.length = 0), - (this.red = null), - null !== t && (('le' !== e && 'be' !== e) || ((r = e), (e = 10)), this._init(t || 0, e || 10, r || 'be')); - } - var s; - 'object' == typeof t ? (t.exports = o) : (e.BN = o), (o.BN = o), (o.wordSize = 26); - try { - s = 'undefined' != typeof window && void 0 !== window.Buffer ? window.Buffer : r(4282).Buffer; - } catch (t) {} - function a(t, e) { - var r = t.charCodeAt(e); - return r >= 65 && r <= 70 ? r - 55 : r >= 97 && r <= 102 ? r - 87 : (r - 48) & 15; - } - function h(t, e, r) { - var i = a(t, r); - return r - 1 >= e && (i |= a(t, r - 1) << 4), i; - } - function u(t, e, r, i) { - for (var n = 0, o = Math.min(t.length, r), s = e; s < o; s++) { - var a = t.charCodeAt(s) - 48; - (n *= i), (n += a >= 49 ? a - 49 + 10 : a >= 17 ? a - 17 + 10 : a); - } - return n; - } - (o.isBN = function (t) { - return ( - t instanceof o || (null !== t && 'object' == typeof t && t.constructor.wordSize === o.wordSize && Array.isArray(t.words)) - ); - }), - (o.max = function (t, e) { - return t.cmp(e) > 0 ? t : e; - }), - (o.min = function (t, e) { - return t.cmp(e) < 0 ? t : e; - }), - (o.prototype._init = function (t, e, r) { - if ('number' == typeof t) return this._initNumber(t, e, r); - if ('object' == typeof t) return this._initArray(t, e, r); - 'hex' === e && (e = 16), i(e === (0 | e) && e >= 2 && e <= 36); - var n = 0; - '-' === (t = t.toString().replace(/\s+/g, ''))[0] && (n++, (this.negative = 1)), - n < t.length && - (16 === e ? this._parseHex(t, n, r) : (this._parseBase(t, e, n), 'le' === r && this._initArray(this.toArray(), e, r))); - }), - (o.prototype._initNumber = function (t, e, r) { - t < 0 && ((this.negative = 1), (t = -t)), - t < 67108864 - ? ((this.words = [67108863 & t]), (this.length = 1)) - : t < 4503599627370496 - ? ((this.words = [67108863 & t, (t / 67108864) & 67108863]), (this.length = 2)) - : (i(t < 9007199254740992), (this.words = [67108863 & t, (t / 67108864) & 67108863, 1]), (this.length = 3)), - 'le' === r && this._initArray(this.toArray(), e, r); - }), - (o.prototype._initArray = function (t, e, r) { - if ((i('number' == typeof t.length), t.length <= 0)) return (this.words = [0]), (this.length = 1), this; - (this.length = Math.ceil(t.length / 3)), (this.words = new Array(this.length)); - for (var n = 0; n < this.length; n++) this.words[n] = 0; - var o, - s, - a = 0; - if ('be' === r) - for (n = t.length - 1, o = 0; n >= 0; n -= 3) - (s = t[n] | (t[n - 1] << 8) | (t[n - 2] << 16)), - (this.words[o] |= (s << a) & 67108863), - (this.words[o + 1] = (s >>> (26 - a)) & 67108863), - (a += 24) >= 26 && ((a -= 26), o++); - else if ('le' === r) - for (n = 0, o = 0; n < t.length; n += 3) - (s = t[n] | (t[n + 1] << 8) | (t[n + 2] << 16)), - (this.words[o] |= (s << a) & 67108863), - (this.words[o + 1] = (s >>> (26 - a)) & 67108863), - (a += 24) >= 26 && ((a -= 26), o++); - return this.strip(); - }), - (o.prototype._parseHex = function (t, e, r) { - (this.length = Math.ceil((t.length - e) / 6)), (this.words = new Array(this.length)); - for (var i = 0; i < this.length; i++) this.words[i] = 0; - var n, - o = 0, - s = 0; - if ('be' === r) - for (i = t.length - 1; i >= e; i -= 2) - (n = h(t, e, i) << o), - (this.words[s] |= 67108863 & n), - o >= 18 ? ((o -= 18), (s += 1), (this.words[s] |= n >>> 26)) : (o += 8); - else - for (i = (t.length - e) % 2 == 0 ? e + 1 : e; i < t.length; i += 2) - (n = h(t, e, i) << o), - (this.words[s] |= 67108863 & n), - o >= 18 ? ((o -= 18), (s += 1), (this.words[s] |= n >>> 26)) : (o += 8); - this.strip(); - }), - (o.prototype._parseBase = function (t, e, r) { - (this.words = [0]), (this.length = 1); - for (var i = 0, n = 1; n <= 67108863; n *= e) i++; - i--, (n = (n / e) | 0); - for (var o = t.length - r, s = o % i, a = Math.min(o, o - s) + r, h = 0, f = r; f < a; f += i) - (h = u(t, f, f + i, e)), this.imuln(n), this.words[0] + h < 67108864 ? (this.words[0] += h) : this._iaddn(h); - if (0 !== s) { - var c = 1; - for (h = u(t, f, t.length, e), f = 0; f < s; f++) c *= e; - this.imuln(c), this.words[0] + h < 67108864 ? (this.words[0] += h) : this._iaddn(h); - } - this.strip(); - }), - (o.prototype.copy = function (t) { - t.words = new Array(this.length); - for (var e = 0; e < this.length; e++) t.words[e] = this.words[e]; - (t.length = this.length), (t.negative = this.negative), (t.red = this.red); - }), - (o.prototype.clone = function () { - var t = new o(null); - return this.copy(t), t; - }), - (o.prototype._expand = function (t) { - for (; this.length < t; ) this.words[this.length++] = 0; - return this; - }), - (o.prototype.strip = function () { - for (; this.length > 1 && 0 === this.words[this.length - 1]; ) this.length--; - return this._normSign(); - }), - (o.prototype._normSign = function () { - return 1 === this.length && 0 === this.words[0] && (this.negative = 0), this; - }), - (o.prototype.inspect = function () { - return (this.red ? ''; - }); - var f = [ - '', - '0', - '00', - '000', - '0000', - '00000', - '000000', - '0000000', - '00000000', - '000000000', - '0000000000', - '00000000000', - '000000000000', - '0000000000000', - '00000000000000', - '000000000000000', - '0000000000000000', - '00000000000000000', - '000000000000000000', - '0000000000000000000', - '00000000000000000000', - '000000000000000000000', - '0000000000000000000000', - '00000000000000000000000', - '000000000000000000000000', - '0000000000000000000000000', - ], - c = [0, 0, 25, 16, 12, 11, 10, 9, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5], - l = [ - 0, 0, 33554432, 43046721, 16777216, 48828125, 60466176, 40353607, 16777216, 43046721, 1e7, 19487171, 35831808, 62748517, - 7529536, 11390625, 16777216, 24137569, 34012224, 47045881, 64e6, 4084101, 5153632, 6436343, 7962624, 9765625, 11881376, - 14348907, 17210368, 20511149, 243e5, 28629151, 33554432, 39135393, 45435424, 52521875, 60466176, - ]; - function d(t, e, r) { - r.negative = e.negative ^ t.negative; - var i = (t.length + e.length) | 0; - (r.length = i), (i = (i - 1) | 0); - var n = 0 | t.words[0], - o = 0 | e.words[0], - s = n * o, - a = 67108863 & s, - h = (s / 67108864) | 0; - r.words[0] = a; - for (var u = 1; u < i; u++) { - for (var f = h >>> 26, c = 67108863 & h, l = Math.min(u, e.length - 1), d = Math.max(0, u - t.length + 1); d <= l; d++) { - var p = (u - d) | 0; - (f += ((s = (n = 0 | t.words[p]) * (o = 0 | e.words[d]) + c) / 67108864) | 0), (c = 67108863 & s); - } - (r.words[u] = 0 | c), (h = 0 | f); - } - return 0 !== h ? (r.words[u] = 0 | h) : r.length--, r.strip(); - } - (o.prototype.toString = function (t, e) { - var r; - if (((e = 0 | e || 1), 16 === (t = t || 10) || 'hex' === t)) { - r = ''; - for (var n = 0, o = 0, s = 0; s < this.length; s++) { - var a = this.words[s], - h = (16777215 & ((a << n) | o)).toString(16); - (r = 0 != (o = (a >>> (24 - n)) & 16777215) || s !== this.length - 1 ? f[6 - h.length] + h + r : h + r), - (n += 2) >= 26 && ((n -= 26), s--); - } - for (0 !== o && (r = o.toString(16) + r); r.length % e != 0; ) r = '0' + r; - return 0 !== this.negative && (r = '-' + r), r; - } - if (t === (0 | t) && t >= 2 && t <= 36) { - var u = c[t], - d = l[t]; - r = ''; - var p = this.clone(); - for (p.negative = 0; !p.isZero(); ) { - var m = p.modn(d).toString(t); - r = (p = p.idivn(d)).isZero() ? m + r : f[u - m.length] + m + r; - } - for (this.isZero() && (r = '0' + r); r.length % e != 0; ) r = '0' + r; - return 0 !== this.negative && (r = '-' + r), r; - } - i(!1, 'Base should be between 2 and 36'); - }), - (o.prototype.toNumber = function () { - var t = this.words[0]; - return ( - 2 === this.length - ? (t += 67108864 * this.words[1]) - : 3 === this.length && 1 === this.words[2] - ? (t += 4503599627370496 + 67108864 * this.words[1]) - : this.length > 2 && i(!1, 'Number can only safely store up to 53 bits'), - 0 !== this.negative ? -t : t - ); - }), - (o.prototype.toJSON = function () { - return this.toString(16); - }), - (o.prototype.toBuffer = function (t, e) { - return i(void 0 !== s), this.toArrayLike(s, t, e); - }), - (o.prototype.toArray = function (t, e) { - return this.toArrayLike(Array, t, e); - }), - (o.prototype.toArrayLike = function (t, e, r) { - var n = this.byteLength(), - o = r || Math.max(1, n); - i(n <= o, 'byte array longer than desired length'), i(o > 0, 'Requested array length <= 0'), this.strip(); - var s, - a, - h = 'le' === e, - u = new t(o), - f = this.clone(); - if (h) { - for (a = 0; !f.isZero(); a++) (s = f.andln(255)), f.iushrn(8), (u[a] = s); - for (; a < o; a++) u[a] = 0; - } else { - for (a = 0; a < o - n; a++) u[a] = 0; - for (a = 0; !f.isZero(); a++) (s = f.andln(255)), f.iushrn(8), (u[o - a - 1] = s); - } - return u; - }), - Math.clz32 - ? (o.prototype._countBits = function (t) { - return 32 - Math.clz32(t); - }) - : (o.prototype._countBits = function (t) { - var e = t, - r = 0; - return ( - e >= 4096 && ((r += 13), (e >>>= 13)), - e >= 64 && ((r += 7), (e >>>= 7)), - e >= 8 && ((r += 4), (e >>>= 4)), - e >= 2 && ((r += 2), (e >>>= 2)), - r + e - ); - }), - (o.prototype._zeroBits = function (t) { - if (0 === t) return 26; - var e = t, - r = 0; - return ( - 0 == (8191 & e) && ((r += 13), (e >>>= 13)), - 0 == (127 & e) && ((r += 7), (e >>>= 7)), - 0 == (15 & e) && ((r += 4), (e >>>= 4)), - 0 == (3 & e) && ((r += 2), (e >>>= 2)), - 0 == (1 & e) && r++, - r - ); - }), - (o.prototype.bitLength = function () { - var t = this.words[this.length - 1], - e = this._countBits(t); - return 26 * (this.length - 1) + e; - }), - (o.prototype.zeroBits = function () { - if (this.isZero()) return 0; - for (var t = 0, e = 0; e < this.length; e++) { - var r = this._zeroBits(this.words[e]); - if (((t += r), 26 !== r)) break; - } - return t; - }), - (o.prototype.byteLength = function () { - return Math.ceil(this.bitLength() / 8); - }), - (o.prototype.toTwos = function (t) { - return 0 !== this.negative ? this.abs().inotn(t).iaddn(1) : this.clone(); - }), - (o.prototype.fromTwos = function (t) { - return this.testn(t - 1) ? this.notn(t).iaddn(1).ineg() : this.clone(); - }), - (o.prototype.isNeg = function () { - return 0 !== this.negative; - }), - (o.prototype.neg = function () { - return this.clone().ineg(); - }), - (o.prototype.ineg = function () { - return this.isZero() || (this.negative ^= 1), this; - }), - (o.prototype.iuor = function (t) { - for (; this.length < t.length; ) this.words[this.length++] = 0; - for (var e = 0; e < t.length; e++) this.words[e] = this.words[e] | t.words[e]; - return this.strip(); - }), - (o.prototype.ior = function (t) { - return i(0 == (this.negative | t.negative)), this.iuor(t); - }), - (o.prototype.or = function (t) { - return this.length > t.length ? this.clone().ior(t) : t.clone().ior(this); - }), - (o.prototype.uor = function (t) { - return this.length > t.length ? this.clone().iuor(t) : t.clone().iuor(this); - }), - (o.prototype.iuand = function (t) { - var e; - e = this.length > t.length ? t : this; - for (var r = 0; r < e.length; r++) this.words[r] = this.words[r] & t.words[r]; - return (this.length = e.length), this.strip(); - }), - (o.prototype.iand = function (t) { - return i(0 == (this.negative | t.negative)), this.iuand(t); - }), - (o.prototype.and = function (t) { - return this.length > t.length ? this.clone().iand(t) : t.clone().iand(this); - }), - (o.prototype.uand = function (t) { - return this.length > t.length ? this.clone().iuand(t) : t.clone().iuand(this); - }), - (o.prototype.iuxor = function (t) { - var e, r; - this.length > t.length ? ((e = this), (r = t)) : ((e = t), (r = this)); - for (var i = 0; i < r.length; i++) this.words[i] = e.words[i] ^ r.words[i]; - if (this !== e) for (; i < e.length; i++) this.words[i] = e.words[i]; - return (this.length = e.length), this.strip(); - }), - (o.prototype.ixor = function (t) { - return i(0 == (this.negative | t.negative)), this.iuxor(t); - }), - (o.prototype.xor = function (t) { - return this.length > t.length ? this.clone().ixor(t) : t.clone().ixor(this); - }), - (o.prototype.uxor = function (t) { - return this.length > t.length ? this.clone().iuxor(t) : t.clone().iuxor(this); - }), - (o.prototype.inotn = function (t) { - i('number' == typeof t && t >= 0); - var e = 0 | Math.ceil(t / 26), - r = t % 26; - this._expand(e), r > 0 && e--; - for (var n = 0; n < e; n++) this.words[n] = 67108863 & ~this.words[n]; - return r > 0 && (this.words[n] = ~this.words[n] & (67108863 >> (26 - r))), this.strip(); - }), - (o.prototype.notn = function (t) { - return this.clone().inotn(t); - }), - (o.prototype.setn = function (t, e) { - i('number' == typeof t && t >= 0); - var r = (t / 26) | 0, - n = t % 26; - return this._expand(r + 1), (this.words[r] = e ? this.words[r] | (1 << n) : this.words[r] & ~(1 << n)), this.strip(); - }), - (o.prototype.iadd = function (t) { - var e, r, i; - if (0 !== this.negative && 0 === t.negative) - return (this.negative = 0), (e = this.isub(t)), (this.negative ^= 1), this._normSign(); - if (0 === this.negative && 0 !== t.negative) return (t.negative = 0), (e = this.isub(t)), (t.negative = 1), e._normSign(); - this.length > t.length ? ((r = this), (i = t)) : ((r = t), (i = this)); - for (var n = 0, o = 0; o < i.length; o++) - (e = (0 | r.words[o]) + (0 | i.words[o]) + n), (this.words[o] = 67108863 & e), (n = e >>> 26); - for (; 0 !== n && o < r.length; o++) (e = (0 | r.words[o]) + n), (this.words[o] = 67108863 & e), (n = e >>> 26); - if (((this.length = r.length), 0 !== n)) (this.words[this.length] = n), this.length++; - else if (r !== this) for (; o < r.length; o++) this.words[o] = r.words[o]; - return this; - }), - (o.prototype.add = function (t) { - var e; - return 0 !== t.negative && 0 === this.negative - ? ((t.negative = 0), (e = this.sub(t)), (t.negative ^= 1), e) - : 0 === t.negative && 0 !== this.negative - ? ((this.negative = 0), (e = t.sub(this)), (this.negative = 1), e) - : this.length > t.length - ? this.clone().iadd(t) - : t.clone().iadd(this); - }), - (o.prototype.isub = function (t) { - if (0 !== t.negative) { - t.negative = 0; - var e = this.iadd(t); - return (t.negative = 1), e._normSign(); - } - if (0 !== this.negative) return (this.negative = 0), this.iadd(t), (this.negative = 1), this._normSign(); - var r, - i, - n = this.cmp(t); - if (0 === n) return (this.negative = 0), (this.length = 1), (this.words[0] = 0), this; - n > 0 ? ((r = this), (i = t)) : ((r = t), (i = this)); - for (var o = 0, s = 0; s < i.length; s++) - (o = (e = (0 | r.words[s]) - (0 | i.words[s]) + o) >> 26), (this.words[s] = 67108863 & e); - for (; 0 !== o && s < r.length; s++) (o = (e = (0 | r.words[s]) + o) >> 26), (this.words[s] = 67108863 & e); - if (0 === o && s < r.length && r !== this) for (; s < r.length; s++) this.words[s] = r.words[s]; - return (this.length = Math.max(this.length, s)), r !== this && (this.negative = 1), this.strip(); - }), - (o.prototype.sub = function (t) { - return this.clone().isub(t); - }); - var p = function (t, e, r) { - var i, - n, - o, - s = t.words, - a = e.words, - h = r.words, - u = 0, - f = 0 | s[0], - c = 8191 & f, - l = f >>> 13, - d = 0 | s[1], - p = 8191 & d, - m = d >>> 13, - g = 0 | s[2], - b = 8191 & g, - y = g >>> 13, - v = 0 | s[3], - w = 8191 & v, - _ = v >>> 13, - M = 0 | s[4], - E = 8191 & M, - S = M >>> 13, - x = 0 | s[5], - A = 8191 & x, - k = x >>> 13, - R = 0 | s[6], - B = 8191 & R, - I = R >>> 13, - T = 0 | s[7], - P = 8191 & T, - O = T >>> 13, - L = 0 | s[8], - C = 8191 & L, - N = L >>> 13, - j = 0 | s[9], - U = 8191 & j, - D = j >>> 13, - z = 0 | a[0], - F = 8191 & z, - q = z >>> 13, - H = 0 | a[1], - $ = 8191 & H, - Z = H >>> 13, - G = 0 | a[2], - V = 8191 & G, - W = G >>> 13, - K = 0 | a[3], - Y = 8191 & K, - J = K >>> 13, - X = 0 | a[4], - Q = 8191 & X, - tt = X >>> 13, - et = 0 | a[5], - rt = 8191 & et, - it = et >>> 13, - nt = 0 | a[6], - ot = 8191 & nt, - st = nt >>> 13, - at = 0 | a[7], - ht = 8191 & at, - ut = at >>> 13, - ft = 0 | a[8], - ct = 8191 & ft, - lt = ft >>> 13, - dt = 0 | a[9], - pt = 8191 & dt, - mt = dt >>> 13; - (r.negative = t.negative ^ e.negative), (r.length = 19); - var gt = (((u + (i = Math.imul(c, F))) | 0) + ((8191 & (n = ((n = Math.imul(c, q)) + Math.imul(l, F)) | 0)) << 13)) | 0; - (u = ((((o = Math.imul(l, q)) + (n >>> 13)) | 0) + (gt >>> 26)) | 0), - (gt &= 67108863), - (i = Math.imul(p, F)), - (n = ((n = Math.imul(p, q)) + Math.imul(m, F)) | 0), - (o = Math.imul(m, q)); - var bt = - (((u + (i = (i + Math.imul(c, $)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, Z)) | 0) + Math.imul(l, $)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, Z)) | 0) + (n >>> 13)) | 0) + (bt >>> 26)) | 0), - (bt &= 67108863), - (i = Math.imul(b, F)), - (n = ((n = Math.imul(b, q)) + Math.imul(y, F)) | 0), - (o = Math.imul(y, q)), - (i = (i + Math.imul(p, $)) | 0), - (n = ((n = (n + Math.imul(p, Z)) | 0) + Math.imul(m, $)) | 0), - (o = (o + Math.imul(m, Z)) | 0); - var yt = - (((u + (i = (i + Math.imul(c, V)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, W)) | 0) + Math.imul(l, V)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, W)) | 0) + (n >>> 13)) | 0) + (yt >>> 26)) | 0), - (yt &= 67108863), - (i = Math.imul(w, F)), - (n = ((n = Math.imul(w, q)) + Math.imul(_, F)) | 0), - (o = Math.imul(_, q)), - (i = (i + Math.imul(b, $)) | 0), - (n = ((n = (n + Math.imul(b, Z)) | 0) + Math.imul(y, $)) | 0), - (o = (o + Math.imul(y, Z)) | 0), - (i = (i + Math.imul(p, V)) | 0), - (n = ((n = (n + Math.imul(p, W)) | 0) + Math.imul(m, V)) | 0), - (o = (o + Math.imul(m, W)) | 0); - var vt = - (((u + (i = (i + Math.imul(c, Y)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, J)) | 0) + Math.imul(l, Y)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, J)) | 0) + (n >>> 13)) | 0) + (vt >>> 26)) | 0), - (vt &= 67108863), - (i = Math.imul(E, F)), - (n = ((n = Math.imul(E, q)) + Math.imul(S, F)) | 0), - (o = Math.imul(S, q)), - (i = (i + Math.imul(w, $)) | 0), - (n = ((n = (n + Math.imul(w, Z)) | 0) + Math.imul(_, $)) | 0), - (o = (o + Math.imul(_, Z)) | 0), - (i = (i + Math.imul(b, V)) | 0), - (n = ((n = (n + Math.imul(b, W)) | 0) + Math.imul(y, V)) | 0), - (o = (o + Math.imul(y, W)) | 0), - (i = (i + Math.imul(p, Y)) | 0), - (n = ((n = (n + Math.imul(p, J)) | 0) + Math.imul(m, Y)) | 0), - (o = (o + Math.imul(m, J)) | 0); - var wt = - (((u + (i = (i + Math.imul(c, Q)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, tt)) | 0) + Math.imul(l, Q)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, tt)) | 0) + (n >>> 13)) | 0) + (wt >>> 26)) | 0), - (wt &= 67108863), - (i = Math.imul(A, F)), - (n = ((n = Math.imul(A, q)) + Math.imul(k, F)) | 0), - (o = Math.imul(k, q)), - (i = (i + Math.imul(E, $)) | 0), - (n = ((n = (n + Math.imul(E, Z)) | 0) + Math.imul(S, $)) | 0), - (o = (o + Math.imul(S, Z)) | 0), - (i = (i + Math.imul(w, V)) | 0), - (n = ((n = (n + Math.imul(w, W)) | 0) + Math.imul(_, V)) | 0), - (o = (o + Math.imul(_, W)) | 0), - (i = (i + Math.imul(b, Y)) | 0), - (n = ((n = (n + Math.imul(b, J)) | 0) + Math.imul(y, Y)) | 0), - (o = (o + Math.imul(y, J)) | 0), - (i = (i + Math.imul(p, Q)) | 0), - (n = ((n = (n + Math.imul(p, tt)) | 0) + Math.imul(m, Q)) | 0), - (o = (o + Math.imul(m, tt)) | 0); - var _t = - (((u + (i = (i + Math.imul(c, rt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, it)) | 0) + Math.imul(l, rt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, it)) | 0) + (n >>> 13)) | 0) + (_t >>> 26)) | 0), - (_t &= 67108863), - (i = Math.imul(B, F)), - (n = ((n = Math.imul(B, q)) + Math.imul(I, F)) | 0), - (o = Math.imul(I, q)), - (i = (i + Math.imul(A, $)) | 0), - (n = ((n = (n + Math.imul(A, Z)) | 0) + Math.imul(k, $)) | 0), - (o = (o + Math.imul(k, Z)) | 0), - (i = (i + Math.imul(E, V)) | 0), - (n = ((n = (n + Math.imul(E, W)) | 0) + Math.imul(S, V)) | 0), - (o = (o + Math.imul(S, W)) | 0), - (i = (i + Math.imul(w, Y)) | 0), - (n = ((n = (n + Math.imul(w, J)) | 0) + Math.imul(_, Y)) | 0), - (o = (o + Math.imul(_, J)) | 0), - (i = (i + Math.imul(b, Q)) | 0), - (n = ((n = (n + Math.imul(b, tt)) | 0) + Math.imul(y, Q)) | 0), - (o = (o + Math.imul(y, tt)) | 0), - (i = (i + Math.imul(p, rt)) | 0), - (n = ((n = (n + Math.imul(p, it)) | 0) + Math.imul(m, rt)) | 0), - (o = (o + Math.imul(m, it)) | 0); - var Mt = - (((u + (i = (i + Math.imul(c, ot)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, st)) | 0) + Math.imul(l, ot)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, st)) | 0) + (n >>> 13)) | 0) + (Mt >>> 26)) | 0), - (Mt &= 67108863), - (i = Math.imul(P, F)), - (n = ((n = Math.imul(P, q)) + Math.imul(O, F)) | 0), - (o = Math.imul(O, q)), - (i = (i + Math.imul(B, $)) | 0), - (n = ((n = (n + Math.imul(B, Z)) | 0) + Math.imul(I, $)) | 0), - (o = (o + Math.imul(I, Z)) | 0), - (i = (i + Math.imul(A, V)) | 0), - (n = ((n = (n + Math.imul(A, W)) | 0) + Math.imul(k, V)) | 0), - (o = (o + Math.imul(k, W)) | 0), - (i = (i + Math.imul(E, Y)) | 0), - (n = ((n = (n + Math.imul(E, J)) | 0) + Math.imul(S, Y)) | 0), - (o = (o + Math.imul(S, J)) | 0), - (i = (i + Math.imul(w, Q)) | 0), - (n = ((n = (n + Math.imul(w, tt)) | 0) + Math.imul(_, Q)) | 0), - (o = (o + Math.imul(_, tt)) | 0), - (i = (i + Math.imul(b, rt)) | 0), - (n = ((n = (n + Math.imul(b, it)) | 0) + Math.imul(y, rt)) | 0), - (o = (o + Math.imul(y, it)) | 0), - (i = (i + Math.imul(p, ot)) | 0), - (n = ((n = (n + Math.imul(p, st)) | 0) + Math.imul(m, ot)) | 0), - (o = (o + Math.imul(m, st)) | 0); - var Et = - (((u + (i = (i + Math.imul(c, ht)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, ut)) | 0) + Math.imul(l, ht)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, ut)) | 0) + (n >>> 13)) | 0) + (Et >>> 26)) | 0), - (Et &= 67108863), - (i = Math.imul(C, F)), - (n = ((n = Math.imul(C, q)) + Math.imul(N, F)) | 0), - (o = Math.imul(N, q)), - (i = (i + Math.imul(P, $)) | 0), - (n = ((n = (n + Math.imul(P, Z)) | 0) + Math.imul(O, $)) | 0), - (o = (o + Math.imul(O, Z)) | 0), - (i = (i + Math.imul(B, V)) | 0), - (n = ((n = (n + Math.imul(B, W)) | 0) + Math.imul(I, V)) | 0), - (o = (o + Math.imul(I, W)) | 0), - (i = (i + Math.imul(A, Y)) | 0), - (n = ((n = (n + Math.imul(A, J)) | 0) + Math.imul(k, Y)) | 0), - (o = (o + Math.imul(k, J)) | 0), - (i = (i + Math.imul(E, Q)) | 0), - (n = ((n = (n + Math.imul(E, tt)) | 0) + Math.imul(S, Q)) | 0), - (o = (o + Math.imul(S, tt)) | 0), - (i = (i + Math.imul(w, rt)) | 0), - (n = ((n = (n + Math.imul(w, it)) | 0) + Math.imul(_, rt)) | 0), - (o = (o + Math.imul(_, it)) | 0), - (i = (i + Math.imul(b, ot)) | 0), - (n = ((n = (n + Math.imul(b, st)) | 0) + Math.imul(y, ot)) | 0), - (o = (o + Math.imul(y, st)) | 0), - (i = (i + Math.imul(p, ht)) | 0), - (n = ((n = (n + Math.imul(p, ut)) | 0) + Math.imul(m, ht)) | 0), - (o = (o + Math.imul(m, ut)) | 0); - var St = - (((u + (i = (i + Math.imul(c, ct)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, lt)) | 0) + Math.imul(l, ct)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, lt)) | 0) + (n >>> 13)) | 0) + (St >>> 26)) | 0), - (St &= 67108863), - (i = Math.imul(U, F)), - (n = ((n = Math.imul(U, q)) + Math.imul(D, F)) | 0), - (o = Math.imul(D, q)), - (i = (i + Math.imul(C, $)) | 0), - (n = ((n = (n + Math.imul(C, Z)) | 0) + Math.imul(N, $)) | 0), - (o = (o + Math.imul(N, Z)) | 0), - (i = (i + Math.imul(P, V)) | 0), - (n = ((n = (n + Math.imul(P, W)) | 0) + Math.imul(O, V)) | 0), - (o = (o + Math.imul(O, W)) | 0), - (i = (i + Math.imul(B, Y)) | 0), - (n = ((n = (n + Math.imul(B, J)) | 0) + Math.imul(I, Y)) | 0), - (o = (o + Math.imul(I, J)) | 0), - (i = (i + Math.imul(A, Q)) | 0), - (n = ((n = (n + Math.imul(A, tt)) | 0) + Math.imul(k, Q)) | 0), - (o = (o + Math.imul(k, tt)) | 0), - (i = (i + Math.imul(E, rt)) | 0), - (n = ((n = (n + Math.imul(E, it)) | 0) + Math.imul(S, rt)) | 0), - (o = (o + Math.imul(S, it)) | 0), - (i = (i + Math.imul(w, ot)) | 0), - (n = ((n = (n + Math.imul(w, st)) | 0) + Math.imul(_, ot)) | 0), - (o = (o + Math.imul(_, st)) | 0), - (i = (i + Math.imul(b, ht)) | 0), - (n = ((n = (n + Math.imul(b, ut)) | 0) + Math.imul(y, ht)) | 0), - (o = (o + Math.imul(y, ut)) | 0), - (i = (i + Math.imul(p, ct)) | 0), - (n = ((n = (n + Math.imul(p, lt)) | 0) + Math.imul(m, ct)) | 0), - (o = (o + Math.imul(m, lt)) | 0); - var xt = - (((u + (i = (i + Math.imul(c, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, mt)) | 0) + Math.imul(l, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, mt)) | 0) + (n >>> 13)) | 0) + (xt >>> 26)) | 0), - (xt &= 67108863), - (i = Math.imul(U, $)), - (n = ((n = Math.imul(U, Z)) + Math.imul(D, $)) | 0), - (o = Math.imul(D, Z)), - (i = (i + Math.imul(C, V)) | 0), - (n = ((n = (n + Math.imul(C, W)) | 0) + Math.imul(N, V)) | 0), - (o = (o + Math.imul(N, W)) | 0), - (i = (i + Math.imul(P, Y)) | 0), - (n = ((n = (n + Math.imul(P, J)) | 0) + Math.imul(O, Y)) | 0), - (o = (o + Math.imul(O, J)) | 0), - (i = (i + Math.imul(B, Q)) | 0), - (n = ((n = (n + Math.imul(B, tt)) | 0) + Math.imul(I, Q)) | 0), - (o = (o + Math.imul(I, tt)) | 0), - (i = (i + Math.imul(A, rt)) | 0), - (n = ((n = (n + Math.imul(A, it)) | 0) + Math.imul(k, rt)) | 0), - (o = (o + Math.imul(k, it)) | 0), - (i = (i + Math.imul(E, ot)) | 0), - (n = ((n = (n + Math.imul(E, st)) | 0) + Math.imul(S, ot)) | 0), - (o = (o + Math.imul(S, st)) | 0), - (i = (i + Math.imul(w, ht)) | 0), - (n = ((n = (n + Math.imul(w, ut)) | 0) + Math.imul(_, ht)) | 0), - (o = (o + Math.imul(_, ut)) | 0), - (i = (i + Math.imul(b, ct)) | 0), - (n = ((n = (n + Math.imul(b, lt)) | 0) + Math.imul(y, ct)) | 0), - (o = (o + Math.imul(y, lt)) | 0); - var At = - (((u + (i = (i + Math.imul(p, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(p, mt)) | 0) + Math.imul(m, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(m, mt)) | 0) + (n >>> 13)) | 0) + (At >>> 26)) | 0), - (At &= 67108863), - (i = Math.imul(U, V)), - (n = ((n = Math.imul(U, W)) + Math.imul(D, V)) | 0), - (o = Math.imul(D, W)), - (i = (i + Math.imul(C, Y)) | 0), - (n = ((n = (n + Math.imul(C, J)) | 0) + Math.imul(N, Y)) | 0), - (o = (o + Math.imul(N, J)) | 0), - (i = (i + Math.imul(P, Q)) | 0), - (n = ((n = (n + Math.imul(P, tt)) | 0) + Math.imul(O, Q)) | 0), - (o = (o + Math.imul(O, tt)) | 0), - (i = (i + Math.imul(B, rt)) | 0), - (n = ((n = (n + Math.imul(B, it)) | 0) + Math.imul(I, rt)) | 0), - (o = (o + Math.imul(I, it)) | 0), - (i = (i + Math.imul(A, ot)) | 0), - (n = ((n = (n + Math.imul(A, st)) | 0) + Math.imul(k, ot)) | 0), - (o = (o + Math.imul(k, st)) | 0), - (i = (i + Math.imul(E, ht)) | 0), - (n = ((n = (n + Math.imul(E, ut)) | 0) + Math.imul(S, ht)) | 0), - (o = (o + Math.imul(S, ut)) | 0), - (i = (i + Math.imul(w, ct)) | 0), - (n = ((n = (n + Math.imul(w, lt)) | 0) + Math.imul(_, ct)) | 0), - (o = (o + Math.imul(_, lt)) | 0); - var kt = - (((u + (i = (i + Math.imul(b, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(b, mt)) | 0) + Math.imul(y, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(y, mt)) | 0) + (n >>> 13)) | 0) + (kt >>> 26)) | 0), - (kt &= 67108863), - (i = Math.imul(U, Y)), - (n = ((n = Math.imul(U, J)) + Math.imul(D, Y)) | 0), - (o = Math.imul(D, J)), - (i = (i + Math.imul(C, Q)) | 0), - (n = ((n = (n + Math.imul(C, tt)) | 0) + Math.imul(N, Q)) | 0), - (o = (o + Math.imul(N, tt)) | 0), - (i = (i + Math.imul(P, rt)) | 0), - (n = ((n = (n + Math.imul(P, it)) | 0) + Math.imul(O, rt)) | 0), - (o = (o + Math.imul(O, it)) | 0), - (i = (i + Math.imul(B, ot)) | 0), - (n = ((n = (n + Math.imul(B, st)) | 0) + Math.imul(I, ot)) | 0), - (o = (o + Math.imul(I, st)) | 0), - (i = (i + Math.imul(A, ht)) | 0), - (n = ((n = (n + Math.imul(A, ut)) | 0) + Math.imul(k, ht)) | 0), - (o = (o + Math.imul(k, ut)) | 0), - (i = (i + Math.imul(E, ct)) | 0), - (n = ((n = (n + Math.imul(E, lt)) | 0) + Math.imul(S, ct)) | 0), - (o = (o + Math.imul(S, lt)) | 0); - var Rt = - (((u + (i = (i + Math.imul(w, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(w, mt)) | 0) + Math.imul(_, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(_, mt)) | 0) + (n >>> 13)) | 0) + (Rt >>> 26)) | 0), - (Rt &= 67108863), - (i = Math.imul(U, Q)), - (n = ((n = Math.imul(U, tt)) + Math.imul(D, Q)) | 0), - (o = Math.imul(D, tt)), - (i = (i + Math.imul(C, rt)) | 0), - (n = ((n = (n + Math.imul(C, it)) | 0) + Math.imul(N, rt)) | 0), - (o = (o + Math.imul(N, it)) | 0), - (i = (i + Math.imul(P, ot)) | 0), - (n = ((n = (n + Math.imul(P, st)) | 0) + Math.imul(O, ot)) | 0), - (o = (o + Math.imul(O, st)) | 0), - (i = (i + Math.imul(B, ht)) | 0), - (n = ((n = (n + Math.imul(B, ut)) | 0) + Math.imul(I, ht)) | 0), - (o = (o + Math.imul(I, ut)) | 0), - (i = (i + Math.imul(A, ct)) | 0), - (n = ((n = (n + Math.imul(A, lt)) | 0) + Math.imul(k, ct)) | 0), - (o = (o + Math.imul(k, lt)) | 0); - var Bt = - (((u + (i = (i + Math.imul(E, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(E, mt)) | 0) + Math.imul(S, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(S, mt)) | 0) + (n >>> 13)) | 0) + (Bt >>> 26)) | 0), - (Bt &= 67108863), - (i = Math.imul(U, rt)), - (n = ((n = Math.imul(U, it)) + Math.imul(D, rt)) | 0), - (o = Math.imul(D, it)), - (i = (i + Math.imul(C, ot)) | 0), - (n = ((n = (n + Math.imul(C, st)) | 0) + Math.imul(N, ot)) | 0), - (o = (o + Math.imul(N, st)) | 0), - (i = (i + Math.imul(P, ht)) | 0), - (n = ((n = (n + Math.imul(P, ut)) | 0) + Math.imul(O, ht)) | 0), - (o = (o + Math.imul(O, ut)) | 0), - (i = (i + Math.imul(B, ct)) | 0), - (n = ((n = (n + Math.imul(B, lt)) | 0) + Math.imul(I, ct)) | 0), - (o = (o + Math.imul(I, lt)) | 0); - var It = - (((u + (i = (i + Math.imul(A, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(A, mt)) | 0) + Math.imul(k, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(k, mt)) | 0) + (n >>> 13)) | 0) + (It >>> 26)) | 0), - (It &= 67108863), - (i = Math.imul(U, ot)), - (n = ((n = Math.imul(U, st)) + Math.imul(D, ot)) | 0), - (o = Math.imul(D, st)), - (i = (i + Math.imul(C, ht)) | 0), - (n = ((n = (n + Math.imul(C, ut)) | 0) + Math.imul(N, ht)) | 0), - (o = (o + Math.imul(N, ut)) | 0), - (i = (i + Math.imul(P, ct)) | 0), - (n = ((n = (n + Math.imul(P, lt)) | 0) + Math.imul(O, ct)) | 0), - (o = (o + Math.imul(O, lt)) | 0); - var Tt = - (((u + (i = (i + Math.imul(B, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(B, mt)) | 0) + Math.imul(I, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(I, mt)) | 0) + (n >>> 13)) | 0) + (Tt >>> 26)) | 0), - (Tt &= 67108863), - (i = Math.imul(U, ht)), - (n = ((n = Math.imul(U, ut)) + Math.imul(D, ht)) | 0), - (o = Math.imul(D, ut)), - (i = (i + Math.imul(C, ct)) | 0), - (n = ((n = (n + Math.imul(C, lt)) | 0) + Math.imul(N, ct)) | 0), - (o = (o + Math.imul(N, lt)) | 0); - var Pt = - (((u + (i = (i + Math.imul(P, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(P, mt)) | 0) + Math.imul(O, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(O, mt)) | 0) + (n >>> 13)) | 0) + (Pt >>> 26)) | 0), - (Pt &= 67108863), - (i = Math.imul(U, ct)), - (n = ((n = Math.imul(U, lt)) + Math.imul(D, ct)) | 0), - (o = Math.imul(D, lt)); - var Ot = - (((u + (i = (i + Math.imul(C, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(C, mt)) | 0) + Math.imul(N, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(N, mt)) | 0) + (n >>> 13)) | 0) + (Ot >>> 26)) | 0), (Ot &= 67108863); - var Lt = (((u + (i = Math.imul(U, pt))) | 0) + ((8191 & (n = ((n = Math.imul(U, mt)) + Math.imul(D, pt)) | 0)) << 13)) | 0; - return ( - (u = ((((o = Math.imul(D, mt)) + (n >>> 13)) | 0) + (Lt >>> 26)) | 0), - (Lt &= 67108863), - (h[0] = gt), - (h[1] = bt), - (h[2] = yt), - (h[3] = vt), - (h[4] = wt), - (h[5] = _t), - (h[6] = Mt), - (h[7] = Et), - (h[8] = St), - (h[9] = xt), - (h[10] = At), - (h[11] = kt), - (h[12] = Rt), - (h[13] = Bt), - (h[14] = It), - (h[15] = Tt), - (h[16] = Pt), - (h[17] = Ot), - (h[18] = Lt), - 0 !== u && ((h[19] = u), r.length++), - r - ); - }; - function m(t, e, r) { - return new g().mulp(t, e, r); - } - function g(t, e) { - (this.x = t), (this.y = e); - } - Math.imul || (p = d), - (o.prototype.mulTo = function (t, e) { - var r, - i = this.length + t.length; - return ( - (r = - 10 === this.length && 10 === t.length - ? p(this, t, e) - : i < 63 - ? d(this, t, e) - : i < 1024 - ? (function (t, e, r) { - (r.negative = e.negative ^ t.negative), (r.length = t.length + e.length); - for (var i = 0, n = 0, o = 0; o < r.length - 1; o++) { - var s = n; - n = 0; - for (var a = 67108863 & i, h = Math.min(o, e.length - 1), u = Math.max(0, o - t.length + 1); u <= h; u++) { - var f = o - u, - c = (0 | t.words[f]) * (0 | e.words[u]), - l = 67108863 & c; - (a = 67108863 & (l = (l + a) | 0)), - (n += (s = ((s = (s + ((c / 67108864) | 0)) | 0) + (l >>> 26)) | 0) >>> 26), - (s &= 67108863); - } - (r.words[o] = a), (i = s), (s = n); - } - return 0 !== i ? (r.words[o] = i) : r.length--, r.strip(); - })(this, t, e) - : m(this, t, e)), - r - ); - }), - (g.prototype.makeRBT = function (t) { - for (var e = new Array(t), r = o.prototype._countBits(t) - 1, i = 0; i < t; i++) e[i] = this.revBin(i, r, t); - return e; - }), - (g.prototype.revBin = function (t, e, r) { - if (0 === t || t === r - 1) return t; - for (var i = 0, n = 0; n < e; n++) (i |= (1 & t) << (e - n - 1)), (t >>= 1); - return i; - }), - (g.prototype.permute = function (t, e, r, i, n, o) { - for (var s = 0; s < o; s++) (i[s] = e[t[s]]), (n[s] = r[t[s]]); - }), - (g.prototype.transform = function (t, e, r, i, n, o) { - this.permute(o, t, e, r, i, n); - for (var s = 1; s < n; s <<= 1) - for (var a = s << 1, h = Math.cos((2 * Math.PI) / a), u = Math.sin((2 * Math.PI) / a), f = 0; f < n; f += a) - for (var c = h, l = u, d = 0; d < s; d++) { - var p = r[f + d], - m = i[f + d], - g = r[f + d + s], - b = i[f + d + s], - y = c * g - l * b; - (b = c * b + l * g), - (g = y), - (r[f + d] = p + g), - (i[f + d] = m + b), - (r[f + d + s] = p - g), - (i[f + d + s] = m - b), - d !== a && ((y = h * c - u * l), (l = h * l + u * c), (c = y)); - } - }), - (g.prototype.guessLen13b = function (t, e) { - var r = 1 | Math.max(e, t), - i = 1 & r, - n = 0; - for (r = (r / 2) | 0; r; r >>>= 1) n++; - return 1 << (n + 1 + i); - }), - (g.prototype.conjugate = function (t, e, r) { - if (!(r <= 1)) - for (var i = 0; i < r / 2; i++) { - var n = t[i]; - (t[i] = t[r - i - 1]), (t[r - i - 1] = n), (n = e[i]), (e[i] = -e[r - i - 1]), (e[r - i - 1] = -n); - } - }), - (g.prototype.normalize13b = function (t, e) { - for (var r = 0, i = 0; i < e / 2; i++) { - var n = 8192 * Math.round(t[2 * i + 1] / e) + Math.round(t[2 * i] / e) + r; - (t[i] = 67108863 & n), (r = n < 67108864 ? 0 : (n / 67108864) | 0); - } - return t; - }), - (g.prototype.convert13b = function (t, e, r, n) { - for (var o = 0, s = 0; s < e; s++) - (o += 0 | t[s]), (r[2 * s] = 8191 & o), (o >>>= 13), (r[2 * s + 1] = 8191 & o), (o >>>= 13); - for (s = 2 * e; s < n; ++s) r[s] = 0; - i(0 === o), i(0 == (-8192 & o)); - }), - (g.prototype.stub = function (t) { - for (var e = new Array(t), r = 0; r < t; r++) e[r] = 0; - return e; - }), - (g.prototype.mulp = function (t, e, r) { - var i = 2 * this.guessLen13b(t.length, e.length), - n = this.makeRBT(i), - o = this.stub(i), - s = new Array(i), - a = new Array(i), - h = new Array(i), - u = new Array(i), - f = new Array(i), - c = new Array(i), - l = r.words; - (l.length = i), - this.convert13b(t.words, t.length, s, i), - this.convert13b(e.words, e.length, u, i), - this.transform(s, o, a, h, i, n), - this.transform(u, o, f, c, i, n); - for (var d = 0; d < i; d++) { - var p = a[d] * f[d] - h[d] * c[d]; - (h[d] = a[d] * c[d] + h[d] * f[d]), (a[d] = p); - } - return ( - this.conjugate(a, h, i), - this.transform(a, h, l, o, i, n), - this.conjugate(l, o, i), - this.normalize13b(l, i), - (r.negative = t.negative ^ e.negative), - (r.length = t.length + e.length), - r.strip() - ); - }), - (o.prototype.mul = function (t) { - var e = new o(null); - return (e.words = new Array(this.length + t.length)), this.mulTo(t, e); - }), - (o.prototype.mulf = function (t) { - var e = new o(null); - return (e.words = new Array(this.length + t.length)), m(this, t, e); - }), - (o.prototype.imul = function (t) { - return this.clone().mulTo(t, this); - }), - (o.prototype.imuln = function (t) { - i('number' == typeof t), i(t < 67108864); - for (var e = 0, r = 0; r < this.length; r++) { - var n = (0 | this.words[r]) * t, - o = (67108863 & n) + (67108863 & e); - (e >>= 26), (e += (n / 67108864) | 0), (e += o >>> 26), (this.words[r] = 67108863 & o); - } - return 0 !== e && ((this.words[r] = e), this.length++), this; - }), - (o.prototype.muln = function (t) { - return this.clone().imuln(t); - }), - (o.prototype.sqr = function () { - return this.mul(this); - }), - (o.prototype.isqr = function () { - return this.imul(this.clone()); - }), - (o.prototype.pow = function (t) { - var e = (function (t) { - for (var e = new Array(t.bitLength()), r = 0; r < e.length; r++) { - var i = (r / 26) | 0, - n = r % 26; - e[r] = (t.words[i] & (1 << n)) >>> n; - } - return e; - })(t); - if (0 === e.length) return new o(1); - for (var r = this, i = 0; i < e.length && 0 === e[i]; i++, r = r.sqr()); - if (++i < e.length) for (var n = r.sqr(); i < e.length; i++, n = n.sqr()) 0 !== e[i] && (r = r.mul(n)); - return r; - }), - (o.prototype.iushln = function (t) { - i('number' == typeof t && t >= 0); - var e, - r = t % 26, - n = (t - r) / 26, - o = (67108863 >>> (26 - r)) << (26 - r); - if (0 !== r) { - var s = 0; - for (e = 0; e < this.length; e++) { - var a = this.words[e] & o, - h = ((0 | this.words[e]) - a) << r; - (this.words[e] = h | s), (s = a >>> (26 - r)); - } - s && ((this.words[e] = s), this.length++); - } - if (0 !== n) { - for (e = this.length - 1; e >= 0; e--) this.words[e + n] = this.words[e]; - for (e = 0; e < n; e++) this.words[e] = 0; - this.length += n; - } - return this.strip(); - }), - (o.prototype.ishln = function (t) { - return i(0 === this.negative), this.iushln(t); - }), - (o.prototype.iushrn = function (t, e, r) { - var n; - i('number' == typeof t && t >= 0), (n = e ? (e - (e % 26)) / 26 : 0); - var o = t % 26, - s = Math.min((t - o) / 26, this.length), - a = 67108863 ^ ((67108863 >>> o) << o), - h = r; - if (((n -= s), (n = Math.max(0, n)), h)) { - for (var u = 0; u < s; u++) h.words[u] = this.words[u]; - h.length = s; - } - if (0 === s); - else if (this.length > s) for (this.length -= s, u = 0; u < this.length; u++) this.words[u] = this.words[u + s]; - else (this.words[0] = 0), (this.length = 1); - var f = 0; - for (u = this.length - 1; u >= 0 && (0 !== f || u >= n); u--) { - var c = 0 | this.words[u]; - (this.words[u] = (f << (26 - o)) | (c >>> o)), (f = c & a); - } - return h && 0 !== f && (h.words[h.length++] = f), 0 === this.length && ((this.words[0] = 0), (this.length = 1)), this.strip(); - }), - (o.prototype.ishrn = function (t, e, r) { - return i(0 === this.negative), this.iushrn(t, e, r); - }), - (o.prototype.shln = function (t) { - return this.clone().ishln(t); - }), - (o.prototype.ushln = function (t) { - return this.clone().iushln(t); - }), - (o.prototype.shrn = function (t) { - return this.clone().ishrn(t); - }), - (o.prototype.ushrn = function (t) { - return this.clone().iushrn(t); - }), - (o.prototype.testn = function (t) { - i('number' == typeof t && t >= 0); - var e = t % 26, - r = (t - e) / 26, - n = 1 << e; - return !(this.length <= r || !(this.words[r] & n)); - }), - (o.prototype.imaskn = function (t) { - i('number' == typeof t && t >= 0); - var e = t % 26, - r = (t - e) / 26; - if ((i(0 === this.negative, 'imaskn works only with positive numbers'), this.length <= r)) return this; - if ((0 !== e && r++, (this.length = Math.min(r, this.length)), 0 !== e)) { - var n = 67108863 ^ ((67108863 >>> e) << e); - this.words[this.length - 1] &= n; - } - return this.strip(); - }), - (o.prototype.maskn = function (t) { - return this.clone().imaskn(t); - }), - (o.prototype.iaddn = function (t) { - return ( - i('number' == typeof t), - i(t < 67108864), - t < 0 - ? this.isubn(-t) - : 0 !== this.negative - ? 1 === this.length && (0 | this.words[0]) < t - ? ((this.words[0] = t - (0 | this.words[0])), (this.negative = 0), this) - : ((this.negative = 0), this.isubn(t), (this.negative = 1), this) - : this._iaddn(t) - ); - }), - (o.prototype._iaddn = function (t) { - this.words[0] += t; - for (var e = 0; e < this.length && this.words[e] >= 67108864; e++) - (this.words[e] -= 67108864), e === this.length - 1 ? (this.words[e + 1] = 1) : this.words[e + 1]++; - return (this.length = Math.max(this.length, e + 1)), this; - }), - (o.prototype.isubn = function (t) { - if ((i('number' == typeof t), i(t < 67108864), t < 0)) return this.iaddn(-t); - if (0 !== this.negative) return (this.negative = 0), this.iaddn(t), (this.negative = 1), this; - if (((this.words[0] -= t), 1 === this.length && this.words[0] < 0)) (this.words[0] = -this.words[0]), (this.negative = 1); - else for (var e = 0; e < this.length && this.words[e] < 0; e++) (this.words[e] += 67108864), (this.words[e + 1] -= 1); - return this.strip(); - }), - (o.prototype.addn = function (t) { - return this.clone().iaddn(t); - }), - (o.prototype.subn = function (t) { - return this.clone().isubn(t); - }), - (o.prototype.iabs = function () { - return (this.negative = 0), this; - }), - (o.prototype.abs = function () { - return this.clone().iabs(); - }), - (o.prototype._ishlnsubmul = function (t, e, r) { - var n, - o, - s = t.length + r; - this._expand(s); - var a = 0; - for (n = 0; n < t.length; n++) { - o = (0 | this.words[n + r]) + a; - var h = (0 | t.words[n]) * e; - (a = ((o -= 67108863 & h) >> 26) - ((h / 67108864) | 0)), (this.words[n + r] = 67108863 & o); - } - for (; n < this.length - r; n++) (a = (o = (0 | this.words[n + r]) + a) >> 26), (this.words[n + r] = 67108863 & o); - if (0 === a) return this.strip(); - for (i(-1 === a), a = 0, n = 0; n < this.length; n++) - (a = (o = -(0 | this.words[n]) + a) >> 26), (this.words[n] = 67108863 & o); - return (this.negative = 1), this.strip(); - }), - (o.prototype._wordDiv = function (t, e) { - var r = (this.length, t.length), - i = this.clone(), - n = t, - s = 0 | n.words[n.length - 1]; - 0 != (r = 26 - this._countBits(s)) && ((n = n.ushln(r)), i.iushln(r), (s = 0 | n.words[n.length - 1])); - var a, - h = i.length - n.length; - if ('mod' !== e) { - ((a = new o(null)).length = h + 1), (a.words = new Array(a.length)); - for (var u = 0; u < a.length; u++) a.words[u] = 0; - } - var f = i.clone()._ishlnsubmul(n, 1, h); - 0 === f.negative && ((i = f), a && (a.words[h] = 1)); - for (var c = h - 1; c >= 0; c--) { - var l = 67108864 * (0 | i.words[n.length + c]) + (0 | i.words[n.length + c - 1]); - for (l = Math.min((l / s) | 0, 67108863), i._ishlnsubmul(n, l, c); 0 !== i.negative; ) - l--, (i.negative = 0), i._ishlnsubmul(n, 1, c), i.isZero() || (i.negative ^= 1); - a && (a.words[c] = l); - } - return a && a.strip(), i.strip(), 'div' !== e && 0 !== r && i.iushrn(r), { div: a || null, mod: i }; - }), - (o.prototype.divmod = function (t, e, r) { - return ( - i(!t.isZero()), - this.isZero() - ? { div: new o(0), mod: new o(0) } - : 0 !== this.negative && 0 === t.negative - ? ((a = this.neg().divmod(t, e)), - 'mod' !== e && (n = a.div.neg()), - 'div' !== e && ((s = a.mod.neg()), r && 0 !== s.negative && s.iadd(t)), - { div: n, mod: s }) - : 0 === this.negative && 0 !== t.negative - ? ((a = this.divmod(t.neg(), e)), 'mod' !== e && (n = a.div.neg()), { div: n, mod: a.mod }) - : 0 != (this.negative & t.negative) - ? ((a = this.neg().divmod(t.neg(), e)), - 'div' !== e && ((s = a.mod.neg()), r && 0 !== s.negative && s.isub(t)), - { div: a.div, mod: s }) - : t.length > this.length || this.cmp(t) < 0 - ? { div: new o(0), mod: this } - : 1 === t.length - ? 'div' === e - ? { div: this.divn(t.words[0]), mod: null } - : 'mod' === e - ? { div: null, mod: new o(this.modn(t.words[0])) } - : { div: this.divn(t.words[0]), mod: new o(this.modn(t.words[0])) } - : this._wordDiv(t, e) - ); - var n, s, a; - }), - (o.prototype.div = function (t) { - return this.divmod(t, 'div', !1).div; - }), - (o.prototype.mod = function (t) { - return this.divmod(t, 'mod', !1).mod; - }), - (o.prototype.umod = function (t) { - return this.divmod(t, 'mod', !0).mod; - }), - (o.prototype.divRound = function (t) { - var e = this.divmod(t); - if (e.mod.isZero()) return e.div; - var r = 0 !== e.div.negative ? e.mod.isub(t) : e.mod, - i = t.ushrn(1), - n = t.andln(1), - o = r.cmp(i); - return o < 0 || (1 === n && 0 === o) ? e.div : 0 !== e.div.negative ? e.div.isubn(1) : e.div.iaddn(1); - }), - (o.prototype.modn = function (t) { - i(t <= 67108863); - for (var e = (1 << 26) % t, r = 0, n = this.length - 1; n >= 0; n--) r = (e * r + (0 | this.words[n])) % t; - return r; - }), - (o.prototype.idivn = function (t) { - i(t <= 67108863); - for (var e = 0, r = this.length - 1; r >= 0; r--) { - var n = (0 | this.words[r]) + 67108864 * e; - (this.words[r] = (n / t) | 0), (e = n % t); - } - return this.strip(); - }), - (o.prototype.divn = function (t) { - return this.clone().idivn(t); - }), - (o.prototype.egcd = function (t) { - i(0 === t.negative), i(!t.isZero()); - var e = this, - r = t.clone(); - e = 0 !== e.negative ? e.umod(t) : e.clone(); - for (var n = new o(1), s = new o(0), a = new o(0), h = new o(1), u = 0; e.isEven() && r.isEven(); ) - e.iushrn(1), r.iushrn(1), ++u; - for (var f = r.clone(), c = e.clone(); !e.isZero(); ) { - for (var l = 0, d = 1; 0 == (e.words[0] & d) && l < 26; ++l, d <<= 1); - if (l > 0) for (e.iushrn(l); l-- > 0; ) (n.isOdd() || s.isOdd()) && (n.iadd(f), s.isub(c)), n.iushrn(1), s.iushrn(1); - for (var p = 0, m = 1; 0 == (r.words[0] & m) && p < 26; ++p, m <<= 1); - if (p > 0) for (r.iushrn(p); p-- > 0; ) (a.isOdd() || h.isOdd()) && (a.iadd(f), h.isub(c)), a.iushrn(1), h.iushrn(1); - e.cmp(r) >= 0 ? (e.isub(r), n.isub(a), s.isub(h)) : (r.isub(e), a.isub(n), h.isub(s)); - } - return { a, b: h, gcd: r.iushln(u) }; - }), - (o.prototype._invmp = function (t) { - i(0 === t.negative), i(!t.isZero()); - var e = this, - r = t.clone(); - e = 0 !== e.negative ? e.umod(t) : e.clone(); - for (var n, s = new o(1), a = new o(0), h = r.clone(); e.cmpn(1) > 0 && r.cmpn(1) > 0; ) { - for (var u = 0, f = 1; 0 == (e.words[0] & f) && u < 26; ++u, f <<= 1); - if (u > 0) for (e.iushrn(u); u-- > 0; ) s.isOdd() && s.iadd(h), s.iushrn(1); - for (var c = 0, l = 1; 0 == (r.words[0] & l) && c < 26; ++c, l <<= 1); - if (c > 0) for (r.iushrn(c); c-- > 0; ) a.isOdd() && a.iadd(h), a.iushrn(1); - e.cmp(r) >= 0 ? (e.isub(r), s.isub(a)) : (r.isub(e), a.isub(s)); - } - return (n = 0 === e.cmpn(1) ? s : a).cmpn(0) < 0 && n.iadd(t), n; - }), - (o.prototype.gcd = function (t) { - if (this.isZero()) return t.abs(); - if (t.isZero()) return this.abs(); - var e = this.clone(), - r = t.clone(); - (e.negative = 0), (r.negative = 0); - for (var i = 0; e.isEven() && r.isEven(); i++) e.iushrn(1), r.iushrn(1); - for (;;) { - for (; e.isEven(); ) e.iushrn(1); - for (; r.isEven(); ) r.iushrn(1); - var n = e.cmp(r); - if (n < 0) { - var o = e; - (e = r), (r = o); - } else if (0 === n || 0 === r.cmpn(1)) break; - e.isub(r); - } - return r.iushln(i); - }), - (o.prototype.invm = function (t) { - return this.egcd(t).a.umod(t); - }), - (o.prototype.isEven = function () { - return 0 == (1 & this.words[0]); - }), - (o.prototype.isOdd = function () { - return 1 == (1 & this.words[0]); - }), - (o.prototype.andln = function (t) { - return this.words[0] & t; - }), - (o.prototype.bincn = function (t) { - i('number' == typeof t); - var e = t % 26, - r = (t - e) / 26, - n = 1 << e; - if (this.length <= r) return this._expand(r + 1), (this.words[r] |= n), this; - for (var o = n, s = r; 0 !== o && s < this.length; s++) { - var a = 0 | this.words[s]; - (o = (a += o) >>> 26), (a &= 67108863), (this.words[s] = a); - } - return 0 !== o && ((this.words[s] = o), this.length++), this; - }), - (o.prototype.isZero = function () { - return 1 === this.length && 0 === this.words[0]; - }), - (o.prototype.cmpn = function (t) { - var e, - r = t < 0; - if (0 !== this.negative && !r) return -1; - if (0 === this.negative && r) return 1; - if ((this.strip(), this.length > 1)) e = 1; - else { - r && (t = -t), i(t <= 67108863, 'Number is too big'); - var n = 0 | this.words[0]; - e = n === t ? 0 : n < t ? -1 : 1; - } - return 0 !== this.negative ? 0 | -e : e; - }), - (o.prototype.cmp = function (t) { - if (0 !== this.negative && 0 === t.negative) return -1; - if (0 === this.negative && 0 !== t.negative) return 1; - var e = this.ucmp(t); - return 0 !== this.negative ? 0 | -e : e; - }), - (o.prototype.ucmp = function (t) { - if (this.length > t.length) return 1; - if (this.length < t.length) return -1; - for (var e = 0, r = this.length - 1; r >= 0; r--) { - var i = 0 | this.words[r], - n = 0 | t.words[r]; - if (i !== n) { - i < n ? (e = -1) : i > n && (e = 1); - break; - } - } - return e; - }), - (o.prototype.gtn = function (t) { - return 1 === this.cmpn(t); - }), - (o.prototype.gt = function (t) { - return 1 === this.cmp(t); - }), - (o.prototype.gten = function (t) { - return this.cmpn(t) >= 0; - }), - (o.prototype.gte = function (t) { - return this.cmp(t) >= 0; - }), - (o.prototype.ltn = function (t) { - return -1 === this.cmpn(t); - }), - (o.prototype.lt = function (t) { - return -1 === this.cmp(t); - }), - (o.prototype.lten = function (t) { - return this.cmpn(t) <= 0; - }), - (o.prototype.lte = function (t) { - return this.cmp(t) <= 0; - }), - (o.prototype.eqn = function (t) { - return 0 === this.cmpn(t); - }), - (o.prototype.eq = function (t) { - return 0 === this.cmp(t); - }), - (o.red = function (t) { - return new E(t); - }), - (o.prototype.toRed = function (t) { - return ( - i(!this.red, 'Already a number in reduction context'), - i(0 === this.negative, 'red works only with positives'), - t.convertTo(this)._forceRed(t) - ); - }), - (o.prototype.fromRed = function () { - return i(this.red, 'fromRed works only with numbers in reduction context'), this.red.convertFrom(this); - }), - (o.prototype._forceRed = function (t) { - return (this.red = t), this; - }), - (o.prototype.forceRed = function (t) { - return i(!this.red, 'Already a number in reduction context'), this._forceRed(t); - }), - (o.prototype.redAdd = function (t) { - return i(this.red, 'redAdd works only with red numbers'), this.red.add(this, t); - }), - (o.prototype.redIAdd = function (t) { - return i(this.red, 'redIAdd works only with red numbers'), this.red.iadd(this, t); - }), - (o.prototype.redSub = function (t) { - return i(this.red, 'redSub works only with red numbers'), this.red.sub(this, t); - }), - (o.prototype.redISub = function (t) { - return i(this.red, 'redISub works only with red numbers'), this.red.isub(this, t); - }), - (o.prototype.redShl = function (t) { - return i(this.red, 'redShl works only with red numbers'), this.red.shl(this, t); - }), - (o.prototype.redMul = function (t) { - return i(this.red, 'redMul works only with red numbers'), this.red._verify2(this, t), this.red.mul(this, t); - }), - (o.prototype.redIMul = function (t) { - return i(this.red, 'redMul works only with red numbers'), this.red._verify2(this, t), this.red.imul(this, t); - }), - (o.prototype.redSqr = function () { - return i(this.red, 'redSqr works only with red numbers'), this.red._verify1(this), this.red.sqr(this); - }), - (o.prototype.redISqr = function () { - return i(this.red, 'redISqr works only with red numbers'), this.red._verify1(this), this.red.isqr(this); - }), - (o.prototype.redSqrt = function () { - return i(this.red, 'redSqrt works only with red numbers'), this.red._verify1(this), this.red.sqrt(this); - }), - (o.prototype.redInvm = function () { - return i(this.red, 'redInvm works only with red numbers'), this.red._verify1(this), this.red.invm(this); - }), - (o.prototype.redNeg = function () { - return i(this.red, 'redNeg works only with red numbers'), this.red._verify1(this), this.red.neg(this); - }), - (o.prototype.redPow = function (t) { - return i(this.red && !t.red, 'redPow(normalNum)'), this.red._verify1(this), this.red.pow(this, t); - }); - var b = { k256: null, p224: null, p192: null, p25519: null }; - function y(t, e) { - (this.name = t), - (this.p = new o(e, 16)), - (this.n = this.p.bitLength()), - (this.k = new o(1).iushln(this.n).isub(this.p)), - (this.tmp = this._tmp()); - } - function v() { - y.call(this, 'k256', 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f'); - } - function w() { - y.call(this, 'p224', 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001'); - } - function _() { - y.call(this, 'p192', 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff'); - } - function M() { - y.call(this, '25519', '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed'); - } - function E(t) { - if ('string' == typeof t) { - var e = o._prime(t); - (this.m = e.p), (this.prime = e); - } else i(t.gtn(1), 'modulus must be greater than 1'), (this.m = t), (this.prime = null); - } - function S(t) { - E.call(this, t), - (this.shift = this.m.bitLength()), - this.shift % 26 != 0 && (this.shift += 26 - (this.shift % 26)), - (this.r = new o(1).iushln(this.shift)), - (this.r2 = this.imod(this.r.sqr())), - (this.rinv = this.r._invmp(this.m)), - (this.minv = this.rinv.mul(this.r).isubn(1).div(this.m)), - (this.minv = this.minv.umod(this.r)), - (this.minv = this.r.sub(this.minv)); - } - (y.prototype._tmp = function () { - var t = new o(null); - return (t.words = new Array(Math.ceil(this.n / 13))), t; - }), - (y.prototype.ireduce = function (t) { - var e, - r = t; - do { - this.split(r, this.tmp), (e = (r = (r = this.imulK(r)).iadd(this.tmp)).bitLength()); - } while (e > this.n); - var i = e < this.n ? -1 : r.ucmp(this.p); - return 0 === i ? ((r.words[0] = 0), (r.length = 1)) : i > 0 ? r.isub(this.p) : void 0 !== r.strip ? r.strip() : r._strip(), r; - }), - (y.prototype.split = function (t, e) { - t.iushrn(this.n, 0, e); - }), - (y.prototype.imulK = function (t) { - return t.imul(this.k); - }), - n(v, y), - (v.prototype.split = function (t, e) { - for (var r = 4194303, i = Math.min(t.length, 9), n = 0; n < i; n++) e.words[n] = t.words[n]; - if (((e.length = i), t.length <= 9)) return (t.words[0] = 0), void (t.length = 1); - var o = t.words[9]; - for (e.words[e.length++] = o & r, n = 10; n < t.length; n++) { - var s = 0 | t.words[n]; - (t.words[n - 10] = ((s & r) << 4) | (o >>> 22)), (o = s); - } - (o >>>= 22), (t.words[n - 10] = o), 0 === o && t.length > 10 ? (t.length -= 10) : (t.length -= 9); - }), - (v.prototype.imulK = function (t) { - (t.words[t.length] = 0), (t.words[t.length + 1] = 0), (t.length += 2); - for (var e = 0, r = 0; r < t.length; r++) { - var i = 0 | t.words[r]; - (e += 977 * i), (t.words[r] = 67108863 & e), (e = 64 * i + ((e / 67108864) | 0)); - } - return 0 === t.words[t.length - 1] && (t.length--, 0 === t.words[t.length - 1] && t.length--), t; - }), - n(w, y), - n(_, y), - n(M, y), - (M.prototype.imulK = function (t) { - for (var e = 0, r = 0; r < t.length; r++) { - var i = 19 * (0 | t.words[r]) + e, - n = 67108863 & i; - (i >>>= 26), (t.words[r] = n), (e = i); - } - return 0 !== e && (t.words[t.length++] = e), t; - }), - (o._prime = function (t) { - if (b[t]) return b[t]; - var e; - if ('k256' === t) e = new v(); - else if ('p224' === t) e = new w(); - else if ('p192' === t) e = new _(); - else { - if ('p25519' !== t) throw new Error('Unknown prime ' + t); - e = new M(); - } - return (b[t] = e), e; - }), - (E.prototype._verify1 = function (t) { - i(0 === t.negative, 'red works only with positives'), i(t.red, 'red works only with red numbers'); - }), - (E.prototype._verify2 = function (t, e) { - i(0 == (t.negative | e.negative), 'red works only with positives'), - i(t.red && t.red === e.red, 'red works only with red numbers'); - }), - (E.prototype.imod = function (t) { - return this.prime ? this.prime.ireduce(t)._forceRed(this) : t.umod(this.m)._forceRed(this); - }), - (E.prototype.neg = function (t) { - return t.isZero() ? t.clone() : this.m.sub(t)._forceRed(this); - }), - (E.prototype.add = function (t, e) { - this._verify2(t, e); - var r = t.add(e); - return r.cmp(this.m) >= 0 && r.isub(this.m), r._forceRed(this); - }), - (E.prototype.iadd = function (t, e) { - this._verify2(t, e); - var r = t.iadd(e); - return r.cmp(this.m) >= 0 && r.isub(this.m), r; - }), - (E.prototype.sub = function (t, e) { - this._verify2(t, e); - var r = t.sub(e); - return r.cmpn(0) < 0 && r.iadd(this.m), r._forceRed(this); - }), - (E.prototype.isub = function (t, e) { - this._verify2(t, e); - var r = t.isub(e); - return r.cmpn(0) < 0 && r.iadd(this.m), r; - }), - (E.prototype.shl = function (t, e) { - return this._verify1(t), this.imod(t.ushln(e)); - }), - (E.prototype.imul = function (t, e) { - return this._verify2(t, e), this.imod(t.imul(e)); - }), - (E.prototype.mul = function (t, e) { - return this._verify2(t, e), this.imod(t.mul(e)); - }), - (E.prototype.isqr = function (t) { - return this.imul(t, t.clone()); - }), - (E.prototype.sqr = function (t) { - return this.mul(t, t); - }), - (E.prototype.sqrt = function (t) { - if (t.isZero()) return t.clone(); - var e = this.m.andln(3); - if ((i(e % 2 == 1), 3 === e)) { - var r = this.m.add(new o(1)).iushrn(2); - return this.pow(t, r); - } - for (var n = this.m.subn(1), s = 0; !n.isZero() && 0 === n.andln(1); ) s++, n.iushrn(1); - i(!n.isZero()); - var a = new o(1).toRed(this), - h = a.redNeg(), - u = this.m.subn(1).iushrn(1), - f = this.m.bitLength(); - for (f = new o(2 * f * f).toRed(this); 0 !== this.pow(f, u).cmp(h); ) f.redIAdd(h); - for (var c = this.pow(f, n), l = this.pow(t, n.addn(1).iushrn(1)), d = this.pow(t, n), p = s; 0 !== d.cmp(a); ) { - for (var m = d, g = 0; 0 !== m.cmp(a); g++) m = m.redSqr(); - i(g < p); - var b = this.pow(c, new o(1).iushln(p - g - 1)); - (l = l.redMul(b)), (c = b.redSqr()), (d = d.redMul(c)), (p = g); - } - return l; - }), - (E.prototype.invm = function (t) { - var e = t._invmp(this.m); - return 0 !== e.negative ? ((e.negative = 0), this.imod(e).redNeg()) : this.imod(e); - }), - (E.prototype.pow = function (t, e) { - if (e.isZero()) return new o(1).toRed(this); - if (0 === e.cmpn(1)) return t.clone(); - var r = new Array(16); - (r[0] = new o(1).toRed(this)), (r[1] = t); - for (var i = 2; i < r.length; i++) r[i] = this.mul(r[i - 1], t); - var n = r[0], - s = 0, - a = 0, - h = e.bitLength() % 26; - for (0 === h && (h = 26), i = e.length - 1; i >= 0; i--) { - for (var u = e.words[i], f = h - 1; f >= 0; f--) { - var c = (u >> f) & 1; - n !== r[0] && (n = this.sqr(n)), - 0 !== c || 0 !== s - ? ((s <<= 1), (s |= c), (4 == ++a || (0 === i && 0 === f)) && ((n = this.mul(n, r[s])), (a = 0), (s = 0))) - : (a = 0); - } - h = 26; - } - return n; - }), - (E.prototype.convertTo = function (t) { - var e = t.umod(this.m); - return e === t ? e.clone() : e; - }), - (E.prototype.convertFrom = function (t) { - var e = t.clone(); - return (e.red = null), e; - }), - (o.mont = function (t) { - return new S(t); - }), - n(S, E), - (S.prototype.convertTo = function (t) { - return this.imod(t.ushln(this.shift)); - }), - (S.prototype.convertFrom = function (t) { - var e = this.imod(t.mul(this.rinv)); - return (e.red = null), e; - }), - (S.prototype.imul = function (t, e) { - if (t.isZero() || e.isZero()) return (t.words[0] = 0), (t.length = 1), t; - var r = t.imul(e), - i = r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m), - n = r.isub(i).iushrn(this.shift), - o = n; - return n.cmp(this.m) >= 0 ? (o = n.isub(this.m)) : n.cmpn(0) < 0 && (o = n.iadd(this.m)), o._forceRed(this); - }), - (S.prototype.mul = function (t, e) { - if (t.isZero() || e.isZero()) return new o(0)._forceRed(this); - var r = t.mul(e), - i = r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m), - n = r.isub(i).iushrn(this.shift), - s = n; - return n.cmp(this.m) >= 0 ? (s = n.isub(this.m)) : n.cmpn(0) < 0 && (s = n.iadd(this.m)), s._forceRed(this); - }), - (S.prototype.invm = function (t) { - return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this); - }); - })((t = r.nmd(t)), this); - }, - 2619: (t, e, r) => { - var i = r(1463), - n = r(1697), - o = r(6107), - s = r(9492), - a = r(7354), - h = r(7266), - u = r(6756), - f = r(7172).Buffer; - t.exports = function (t, e, r) { - var c; - c = t.padding ? t.padding : r ? 1 : 4; - var l, - d = i(t), - p = d.modulus.byteLength(); - if (e.length > p || new s(e).cmp(d.modulus) >= 0) throw new Error('decryption error'); - l = r ? u(new s(e), d) : a(e, d); - var m = f.alloc(p - l.length); - if (((l = f.concat([m, l], p)), 4 === c)) - return (function (t, e) { - var r = t.modulus.byteLength(), - i = h('sha1').update(f.alloc(0)).digest(), - s = i.length; - if (0 !== e[0]) throw new Error('decryption error'); - var a = e.slice(1, s + 1), - u = e.slice(s + 1), - c = o(a, n(u, s)), - l = o(u, n(c, r - s - 1)); - if ( - (function (t, e) { - (t = f.from(t)), (e = f.from(e)); - var r = 0, - i = t.length; - t.length !== e.length && (r++, (i = Math.min(t.length, e.length))); - for (var n = -1; ++n < i; ) r += t[n] ^ e[n]; - return r; - })(i, l.slice(0, s)) - ) - throw new Error('decryption error'); - for (var d = s; 0 === l[d]; ) d++; - if (1 !== l[d++]) throw new Error('decryption error'); - return l.slice(d); - })(d, l); - if (1 === c) - return (function (t, e, r) { - for (var i = e.slice(0, 2), n = 2, o = 0; 0 !== e[n++]; ) - if (n >= e.length) { - o++; - break; - } - var s = e.slice(2, n - 1); - if (((('0002' !== i.toString('hex') && !r) || ('0001' !== i.toString('hex') && r)) && o++, s.length < 8 && o++, o)) - throw new Error('decryption error'); - return e.slice(n); - })(0, l, r); - if (3 === c) return l; - throw new Error('unknown padding'); - }; - }, - 9881: (t, e, r) => { - var i = r(1463), - n = r(4198), - o = r(7266), - s = r(1697), - a = r(6107), - h = r(9492), - u = r(6756), - f = r(7354), - c = r(7172).Buffer; - t.exports = function (t, e, r) { - var l; - l = t.padding ? t.padding : r ? 1 : 4; - var d, - p = i(t); - if (4 === l) - d = (function (t, e) { - var r = t.modulus.byteLength(), - i = e.length, - u = o('sha1').update(c.alloc(0)).digest(), - f = u.length, - l = 2 * f; - if (i > r - l - 2) throw new Error('message too long'); - var d = c.alloc(r - i - l - 2), - p = r - f - 1, - m = n(f), - g = a(c.concat([u, d, c.alloc(1, 1), e], p), s(m, p)), - b = a(m, s(g, f)); - return new h(c.concat([c.alloc(1), b, g], r)); - })(p, e); - else if (1 === l) - d = (function (t, e, r) { - var i, - o = e.length, - s = t.modulus.byteLength(); - if (o > s - 11) throw new Error('message too long'); - return ( - (i = r - ? c.alloc(s - o - 3, 255) - : (function (t) { - for (var e, r = c.allocUnsafe(t), i = 0, o = n(2 * t), s = 0; i < t; ) - s === o.length && ((o = n(2 * t)), (s = 0)), (e = o[s++]) && (r[i++] = e); - return r; - })(s - o - 3)), - new h(c.concat([c.from([0, r ? 1 : 2]), i, c.alloc(1), e], s)) - ); - })(p, e, r); - else { - if (3 !== l) throw new Error('unknown padding'); - if ((d = new h(e)).cmp(p.modulus) >= 0) throw new Error('data too long for modulus'); - } - return r ? f(d, p) : u(d, p); - }; - }, - 6756: (t, e, r) => { - var i = r(9492), - n = r(7172).Buffer; - t.exports = function (t, e) { - return n.from(t.toRed(i.mont(e.modulus)).redPow(new i(e.publicExponent)).fromRed().toArray()); - }; - }, - 6107: t => { - t.exports = function (t, e) { - for (var r = t.length, i = -1; ++i < r; ) t[i] ^= e[i]; - return t; - }; - }, - 4198: (t, e, r) => { - 'use strict'; - var i = 65536, - n = r(7172).Buffer, - o = r.g.crypto || r.g.msCrypto; - o && o.getRandomValues - ? (t.exports = function (t, e) { - if (t > 4294967295) throw new RangeError('requested too many random bytes'); - var r = n.allocUnsafe(t); - if (t > 0) - if (t > i) for (var s = 0; s < t; s += i) o.getRandomValues(r.slice(s, s + i)); - else o.getRandomValues(r); - return 'function' == typeof e - ? process.nextTick(function () { - e(null, r); - }) - : r; - }) - : (t.exports = function () { - throw new Error( - 'Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11' - ); - }); - }, - 8519: (t, e, r) => { - 'use strict'; - function i() { - throw new Error('secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11'); - } - var n = r(7172), - o = r(4198), - s = n.Buffer, - a = n.kMaxLength, - h = r.g.crypto || r.g.msCrypto, - u = Math.pow(2, 32) - 1; - function f(t, e) { - if ('number' != typeof t || t != t) throw new TypeError('offset must be a number'); - if (t > u || t < 0) throw new TypeError('offset must be a uint32'); - if (t > a || t > e) throw new RangeError('offset out of range'); - } - function c(t, e, r) { - if ('number' != typeof t || t != t) throw new TypeError('size must be a number'); - if (t > u || t < 0) throw new TypeError('size must be a uint32'); - if (t + e > r || t > a) throw new RangeError('buffer too small'); - } - function l(t, e, r, i) { - if (process.browser) { - var n = t.buffer, - s = new Uint8Array(n, e, r); - return ( - h.getRandomValues(s), - i - ? void process.nextTick(function () { - i(null, t); - }) - : t - ); - } - if (!i) return o(r).copy(t, e), t; - o(r, function (r, n) { - if (r) return i(r); - n.copy(t, e), i(null, t); - }); - } - (h && h.getRandomValues) || !process.browser - ? ((e.randomFill = function (t, e, i, n) { - if (!(s.isBuffer(t) || t instanceof r.g.Uint8Array)) throw new TypeError('"buf" argument must be a Buffer or Uint8Array'); - if ('function' == typeof e) (n = e), (e = 0), (i = t.length); - else if ('function' == typeof i) (n = i), (i = t.length - e); - else if ('function' != typeof n) throw new TypeError('"cb" argument must be a function'); - return f(e, t.length), c(i, e, t.length), l(t, e, i, n); - }), - (e.randomFillSync = function (t, e, i) { - if ((void 0 === e && (e = 0), !(s.isBuffer(t) || t instanceof r.g.Uint8Array))) - throw new TypeError('"buf" argument must be a Buffer or Uint8Array'); - return f(e, t.length), void 0 === i && (i = t.length - e), c(i, e, t.length), l(t, e, i); - })) - : ((e.randomFill = i), (e.randomFillSync = i)); - }, - 6558: (t, e, r) => { - 'use strict'; - var i = r(816).Buffer, - n = r(87), - o = r(6883), - s = new Array(16), - a = [ - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8, 3, 10, 14, 4, 9, 15, - 8, 1, 2, 7, 0, 6, 13, 11, 5, 12, 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2, 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, - 11, 6, 15, 13, - ], - h = [ - 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2, 15, 5, 1, 3, 7, 14, - 6, 9, 11, 8, 12, 2, 10, 0, 4, 13, 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14, 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, - 0, 3, 9, 11, - ], - u = [ - 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12, 11, 13, 6, 7, - 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5, 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12, 9, 15, 5, 11, 6, 8, 13, 12, 5, - 12, 13, 14, 11, 8, 5, 6, - ], - f = [ - 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6, 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11, 9, 7, 15, 11, 8, - 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5, 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8, 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, - 6, 5, 15, 13, 11, 11, - ], - c = [0, 1518500249, 1859775393, 2400959708, 2840853838], - l = [1352829926, 1548603684, 1836072691, 2053994217, 0]; - function d() { - o.call(this, 64), - (this._a = 1732584193), - (this._b = 4023233417), - (this._c = 2562383102), - (this._d = 271733878), - (this._e = 3285377520); - } - function p(t, e) { - return (t << e) | (t >>> (32 - e)); - } - function m(t, e, r, i, n, o, s, a) { - return (p((t + (e ^ r ^ i) + o + s) | 0, a) + n) | 0; - } - function g(t, e, r, i, n, o, s, a) { - return (p((t + ((e & r) | (~e & i)) + o + s) | 0, a) + n) | 0; - } - function b(t, e, r, i, n, o, s, a) { - return (p((t + ((e | ~r) ^ i) + o + s) | 0, a) + n) | 0; - } - function y(t, e, r, i, n, o, s, a) { - return (p((t + ((e & i) | (r & ~i)) + o + s) | 0, a) + n) | 0; - } - function v(t, e, r, i, n, o, s, a) { - return (p((t + (e ^ (r | ~i)) + o + s) | 0, a) + n) | 0; - } - n(d, o), - (d.prototype._update = function () { - for (var t = s, e = 0; e < 16; ++e) t[e] = this._block.readInt32LE(4 * e); - for ( - var r = 0 | this._a, - i = 0 | this._b, - n = 0 | this._c, - o = 0 | this._d, - d = 0 | this._e, - w = 0 | this._a, - _ = 0 | this._b, - M = 0 | this._c, - E = 0 | this._d, - S = 0 | this._e, - x = 0; - x < 80; - x += 1 - ) { - var A, k; - x < 16 - ? ((A = m(r, i, n, o, d, t[a[x]], c[0], u[x])), (k = v(w, _, M, E, S, t[h[x]], l[0], f[x]))) - : x < 32 - ? ((A = g(r, i, n, o, d, t[a[x]], c[1], u[x])), (k = y(w, _, M, E, S, t[h[x]], l[1], f[x]))) - : x < 48 - ? ((A = b(r, i, n, o, d, t[a[x]], c[2], u[x])), (k = b(w, _, M, E, S, t[h[x]], l[2], f[x]))) - : x < 64 - ? ((A = y(r, i, n, o, d, t[a[x]], c[3], u[x])), (k = g(w, _, M, E, S, t[h[x]], l[3], f[x]))) - : ((A = v(r, i, n, o, d, t[a[x]], c[4], u[x])), (k = m(w, _, M, E, S, t[h[x]], l[4], f[x]))), - (r = d), - (d = o), - (o = p(n, 10)), - (n = i), - (i = A), - (w = S), - (S = E), - (E = p(M, 10)), - (M = _), - (_ = k); - } - var R = (this._b + n + E) | 0; - (this._b = (this._c + o + S) | 0), - (this._c = (this._d + d + w) | 0), - (this._d = (this._e + r + _) | 0), - (this._e = (this._a + i + M) | 0), - (this._a = R); - }), - (d.prototype._digest = function () { - (this._block[this._blockOffset++] = 128), - this._blockOffset > 56 && (this._block.fill(0, this._blockOffset, 64), this._update(), (this._blockOffset = 0)), - this._block.fill(0, this._blockOffset, 56), - this._block.writeUInt32LE(this._length[0], 56), - this._block.writeUInt32LE(this._length[1], 60), - this._update(); - var t = i.alloc ? i.alloc(20) : new i(20); - return ( - t.writeInt32LE(this._a, 0), - t.writeInt32LE(this._b, 4), - t.writeInt32LE(this._c, 8), - t.writeInt32LE(this._d, 12), - t.writeInt32LE(this._e, 16), - t - ); - }), - (t.exports = d); - }, - 7172: (t, e, r) => { - var i = r(816), - n = i.Buffer; - function o(t, e) { - for (var r in t) e[r] = t[r]; - } - function s(t, e, r) { - return n(t, e, r); - } - n.from && n.alloc && n.allocUnsafe && n.allocUnsafeSlow ? (t.exports = i) : (o(i, e), (e.Buffer = s)), - (s.prototype = Object.create(n.prototype)), - o(n, s), - (s.from = function (t, e, r) { - if ('number' == typeof t) throw new TypeError('Argument must not be a number'); - return n(t, e, r); - }), - (s.alloc = function (t, e, r) { - if ('number' != typeof t) throw new TypeError('Argument must be a number'); - var i = n(t); - return void 0 !== e ? ('string' == typeof r ? i.fill(e, r) : i.fill(e)) : i.fill(0), i; - }), - (s.allocUnsafe = function (t) { - if ('number' != typeof t) throw new TypeError('Argument must be a number'); - return n(t); - }), - (s.allocUnsafeSlow = function (t) { - if ('number' != typeof t) throw new TypeError('Argument must be a number'); - return i.SlowBuffer(t); - }); - }, - 1788: (t, e, r) => { - 'use strict'; - var i, - n = r(816), - o = n.Buffer, - s = {}; - for (i in n) n.hasOwnProperty(i) && 'SlowBuffer' !== i && 'Buffer' !== i && (s[i] = n[i]); - var a = (s.Buffer = {}); - for (i in o) o.hasOwnProperty(i) && 'allocUnsafe' !== i && 'allocUnsafeSlow' !== i && (a[i] = o[i]); - if ( - ((s.Buffer.prototype = o.prototype), - (a.from && a.from !== Uint8Array.from) || - (a.from = function (t, e, r) { - if ('number' == typeof t) throw new TypeError('The "value" argument must not be of type number. Received type ' + typeof t); - if (t && void 0 === t.length) - throw new TypeError( - 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type ' + - typeof t - ); - return o(t, e, r); - }), - a.alloc || - (a.alloc = function (t, e, r) { - if ('number' != typeof t) throw new TypeError('The "size" argument must be of type number. Received type ' + typeof t); - if (t < 0 || t >= 2 * (1 << 30)) throw new RangeError('The value "' + t + '" is invalid for option "size"'); - var i = o(t); - return e && 0 !== e.length ? ('string' == typeof r ? i.fill(e, r) : i.fill(e)) : i.fill(0), i; - }), - !s.kStringMaxLength) - ) - try { - s.kStringMaxLength = process.binding('buffer').kStringMaxLength; - } catch (t) {} - s.constants || - ((s.constants = { MAX_LENGTH: s.kMaxLength }), s.kStringMaxLength && (s.constants.MAX_STRING_LENGTH = s.kStringMaxLength)), - (t.exports = s); - }, - 8423: (t, e, r) => { - var i = r(7172).Buffer; - function n(t, e) { - (this._block = i.alloc(t)), (this._finalSize = e), (this._blockSize = t), (this._len = 0); - } - (n.prototype.update = function (t, e) { - 'string' == typeof t && ((e = e || 'utf8'), (t = i.from(t, e))); - for (var r = this._block, n = this._blockSize, o = t.length, s = this._len, a = 0; a < o; ) { - for (var h = s % n, u = Math.min(o - a, n - h), f = 0; f < u; f++) r[h + f] = t[a + f]; - (a += u), (s += u) % n == 0 && this._update(r); - } - return (this._len += o), this; - }), - (n.prototype.digest = function (t) { - var e = this._len % this._blockSize; - (this._block[e] = 128), this._block.fill(0, e + 1), e >= this._finalSize && (this._update(this._block), this._block.fill(0)); - var r = 8 * this._len; - if (r <= 4294967295) this._block.writeUInt32BE(r, this._blockSize - 4); - else { - var i = (4294967295 & r) >>> 0, - n = (r - i) / 4294967296; - this._block.writeUInt32BE(n, this._blockSize - 8), this._block.writeUInt32BE(i, this._blockSize - 4); - } - this._update(this._block); - var o = this._hash(); - return t ? o.toString(t) : o; - }), - (n.prototype._update = function () { - throw new Error('_update must be implemented by subclass'); - }), - (t.exports = n); - }, - 4458: (t, e, r) => { - var i = (t.exports = function (t) { - t = t.toLowerCase(); - var e = i[t]; - if (!e) throw new Error(t + ' is not supported (we accept pull requests)'); - return new e(); - }); - (i.sha = r(3608)), (i.sha1 = r(6533)), (i.sha224 = r(8203)), (i.sha256 = r(9541)), (i.sha384 = r(1389)), (i.sha512 = r(6282)); - }, - 3608: (t, e, r) => { - var i = r(87), - n = r(8423), - o = r(7172).Buffer, - s = [1518500249, 1859775393, -1894007588, -899497514], - a = new Array(80); - function h() { - this.init(), (this._w = a), n.call(this, 64, 56); - } - function u(t) { - return (t << 30) | (t >>> 2); - } - function f(t, e, r, i) { - return 0 === t ? (e & r) | (~e & i) : 2 === t ? (e & r) | (e & i) | (r & i) : e ^ r ^ i; - } - i(h, n), - (h.prototype.init = function () { - return ( - (this._a = 1732584193), (this._b = 4023233417), (this._c = 2562383102), (this._d = 271733878), (this._e = 3285377520), this - ); - }), - (h.prototype._update = function (t) { - for ( - var e, r = this._w, i = 0 | this._a, n = 0 | this._b, o = 0 | this._c, a = 0 | this._d, h = 0 | this._e, c = 0; - c < 16; - ++c - ) - r[c] = t.readInt32BE(4 * c); - for (; c < 80; ++c) r[c] = r[c - 3] ^ r[c - 8] ^ r[c - 14] ^ r[c - 16]; - for (var l = 0; l < 80; ++l) { - var d = ~~(l / 20), - p = 0 | ((((e = i) << 5) | (e >>> 27)) + f(d, n, o, a) + h + r[l] + s[d]); - (h = a), (a = o), (o = u(n)), (n = i), (i = p); - } - (this._a = (i + this._a) | 0), - (this._b = (n + this._b) | 0), - (this._c = (o + this._c) | 0), - (this._d = (a + this._d) | 0), - (this._e = (h + this._e) | 0); - }), - (h.prototype._hash = function () { - var t = o.allocUnsafe(20); - return ( - t.writeInt32BE(0 | this._a, 0), - t.writeInt32BE(0 | this._b, 4), - t.writeInt32BE(0 | this._c, 8), - t.writeInt32BE(0 | this._d, 12), - t.writeInt32BE(0 | this._e, 16), - t - ); - }), - (t.exports = h); - }, - 6533: (t, e, r) => { - var i = r(87), - n = r(8423), - o = r(7172).Buffer, - s = [1518500249, 1859775393, -1894007588, -899497514], - a = new Array(80); - function h() { - this.init(), (this._w = a), n.call(this, 64, 56); - } - function u(t) { - return (t << 5) | (t >>> 27); - } - function f(t) { - return (t << 30) | (t >>> 2); - } - function c(t, e, r, i) { - return 0 === t ? (e & r) | (~e & i) : 2 === t ? (e & r) | (e & i) | (r & i) : e ^ r ^ i; - } - i(h, n), - (h.prototype.init = function () { - return ( - (this._a = 1732584193), (this._b = 4023233417), (this._c = 2562383102), (this._d = 271733878), (this._e = 3285377520), this - ); - }), - (h.prototype._update = function (t) { - for ( - var e, r = this._w, i = 0 | this._a, n = 0 | this._b, o = 0 | this._c, a = 0 | this._d, h = 0 | this._e, l = 0; - l < 16; - ++l - ) - r[l] = t.readInt32BE(4 * l); - for (; l < 80; ++l) r[l] = ((e = r[l - 3] ^ r[l - 8] ^ r[l - 14] ^ r[l - 16]) << 1) | (e >>> 31); - for (var d = 0; d < 80; ++d) { - var p = ~~(d / 20), - m = (u(i) + c(p, n, o, a) + h + r[d] + s[p]) | 0; - (h = a), (a = o), (o = f(n)), (n = i), (i = m); - } - (this._a = (i + this._a) | 0), - (this._b = (n + this._b) | 0), - (this._c = (o + this._c) | 0), - (this._d = (a + this._d) | 0), - (this._e = (h + this._e) | 0); - }), - (h.prototype._hash = function () { - var t = o.allocUnsafe(20); - return ( - t.writeInt32BE(0 | this._a, 0), - t.writeInt32BE(0 | this._b, 4), - t.writeInt32BE(0 | this._c, 8), - t.writeInt32BE(0 | this._d, 12), - t.writeInt32BE(0 | this._e, 16), - t - ); - }), - (t.exports = h); - }, - 8203: (t, e, r) => { - var i = r(87), - n = r(9541), - o = r(8423), - s = r(7172).Buffer, - a = new Array(64); - function h() { - this.init(), (this._w = a), o.call(this, 64, 56); - } - i(h, n), - (h.prototype.init = function () { - return ( - (this._a = 3238371032), - (this._b = 914150663), - (this._c = 812702999), - (this._d = 4144912697), - (this._e = 4290775857), - (this._f = 1750603025), - (this._g = 1694076839), - (this._h = 3204075428), - this - ); - }), - (h.prototype._hash = function () { - var t = s.allocUnsafe(28); - return ( - t.writeInt32BE(this._a, 0), - t.writeInt32BE(this._b, 4), - t.writeInt32BE(this._c, 8), - t.writeInt32BE(this._d, 12), - t.writeInt32BE(this._e, 16), - t.writeInt32BE(this._f, 20), - t.writeInt32BE(this._g, 24), - t - ); - }), - (t.exports = h); - }, - 9541: (t, e, r) => { - var i = r(87), - n = r(8423), - o = r(7172).Buffer, - s = [ - 1116352408, 1899447441, 3049323471, 3921009573, 961987163, 1508970993, 2453635748, 2870763221, 3624381080, 310598401, 607225278, - 1426881987, 1925078388, 2162078206, 2614888103, 3248222580, 3835390401, 4022224774, 264347078, 604807628, 770255983, 1249150122, - 1555081692, 1996064986, 2554220882, 2821834349, 2952996808, 3210313671, 3336571891, 3584528711, 113926993, 338241895, 666307205, - 773529912, 1294757372, 1396182291, 1695183700, 1986661051, 2177026350, 2456956037, 2730485921, 2820302411, 3259730800, - 3345764771, 3516065817, 3600352804, 4094571909, 275423344, 430227734, 506948616, 659060556, 883997877, 958139571, 1322822218, - 1537002063, 1747873779, 1955562222, 2024104815, 2227730452, 2361852424, 2428436474, 2756734187, 3204031479, 3329325298, - ], - a = new Array(64); - function h() { - this.init(), (this._w = a), n.call(this, 64, 56); - } - function u(t, e, r) { - return r ^ (t & (e ^ r)); - } - function f(t, e, r) { - return (t & e) | (r & (t | e)); - } - function c(t) { - return ((t >>> 2) | (t << 30)) ^ ((t >>> 13) | (t << 19)) ^ ((t >>> 22) | (t << 10)); - } - function l(t) { - return ((t >>> 6) | (t << 26)) ^ ((t >>> 11) | (t << 21)) ^ ((t >>> 25) | (t << 7)); - } - function d(t) { - return ((t >>> 7) | (t << 25)) ^ ((t >>> 18) | (t << 14)) ^ (t >>> 3); - } - i(h, n), - (h.prototype.init = function () { - return ( - (this._a = 1779033703), - (this._b = 3144134277), - (this._c = 1013904242), - (this._d = 2773480762), - (this._e = 1359893119), - (this._f = 2600822924), - (this._g = 528734635), - (this._h = 1541459225), - this - ); - }), - (h.prototype._update = function (t) { - for ( - var e, - r = this._w, - i = 0 | this._a, - n = 0 | this._b, - o = 0 | this._c, - a = 0 | this._d, - h = 0 | this._e, - p = 0 | this._f, - m = 0 | this._g, - g = 0 | this._h, - b = 0; - b < 16; - ++b - ) - r[b] = t.readInt32BE(4 * b); - for (; b < 64; ++b) - r[b] = - 0 | (((((e = r[b - 2]) >>> 17) | (e << 15)) ^ ((e >>> 19) | (e << 13)) ^ (e >>> 10)) + r[b - 7] + d(r[b - 15]) + r[b - 16]); - for (var y = 0; y < 64; ++y) { - var v = (g + l(h) + u(h, p, m) + s[y] + r[y]) | 0, - w = (c(i) + f(i, n, o)) | 0; - (g = m), (m = p), (p = h), (h = (a + v) | 0), (a = o), (o = n), (n = i), (i = (v + w) | 0); - } - (this._a = (i + this._a) | 0), - (this._b = (n + this._b) | 0), - (this._c = (o + this._c) | 0), - (this._d = (a + this._d) | 0), - (this._e = (h + this._e) | 0), - (this._f = (p + this._f) | 0), - (this._g = (m + this._g) | 0), - (this._h = (g + this._h) | 0); - }), - (h.prototype._hash = function () { - var t = o.allocUnsafe(32); - return ( - t.writeInt32BE(this._a, 0), - t.writeInt32BE(this._b, 4), - t.writeInt32BE(this._c, 8), - t.writeInt32BE(this._d, 12), - t.writeInt32BE(this._e, 16), - t.writeInt32BE(this._f, 20), - t.writeInt32BE(this._g, 24), - t.writeInt32BE(this._h, 28), - t - ); - }), - (t.exports = h); - }, - 1389: (t, e, r) => { - var i = r(87), - n = r(6282), - o = r(8423), - s = r(7172).Buffer, - a = new Array(160); - function h() { - this.init(), (this._w = a), o.call(this, 128, 112); - } - i(h, n), - (h.prototype.init = function () { - return ( - (this._ah = 3418070365), - (this._bh = 1654270250), - (this._ch = 2438529370), - (this._dh = 355462360), - (this._eh = 1731405415), - (this._fh = 2394180231), - (this._gh = 3675008525), - (this._hh = 1203062813), - (this._al = 3238371032), - (this._bl = 914150663), - (this._cl = 812702999), - (this._dl = 4144912697), - (this._el = 4290775857), - (this._fl = 1750603025), - (this._gl = 1694076839), - (this._hl = 3204075428), - this - ); - }), - (h.prototype._hash = function () { - var t = s.allocUnsafe(48); - function e(e, r, i) { - t.writeInt32BE(e, i), t.writeInt32BE(r, i + 4); - } - return ( - e(this._ah, this._al, 0), - e(this._bh, this._bl, 8), - e(this._ch, this._cl, 16), - e(this._dh, this._dl, 24), - e(this._eh, this._el, 32), - e(this._fh, this._fl, 40), - t - ); - }), - (t.exports = h); - }, - 6282: (t, e, r) => { - var i = r(87), - n = r(8423), - o = r(7172).Buffer, - s = [ - 1116352408, 3609767458, 1899447441, 602891725, 3049323471, 3964484399, 3921009573, 2173295548, 961987163, 4081628472, - 1508970993, 3053834265, 2453635748, 2937671579, 2870763221, 3664609560, 3624381080, 2734883394, 310598401, 1164996542, - 607225278, 1323610764, 1426881987, 3590304994, 1925078388, 4068182383, 2162078206, 991336113, 2614888103, 633803317, 3248222580, - 3479774868, 3835390401, 2666613458, 4022224774, 944711139, 264347078, 2341262773, 604807628, 2007800933, 770255983, 1495990901, - 1249150122, 1856431235, 1555081692, 3175218132, 1996064986, 2198950837, 2554220882, 3999719339, 2821834349, 766784016, - 2952996808, 2566594879, 3210313671, 3203337956, 3336571891, 1034457026, 3584528711, 2466948901, 113926993, 3758326383, - 338241895, 168717936, 666307205, 1188179964, 773529912, 1546045734, 1294757372, 1522805485, 1396182291, 2643833823, 1695183700, - 2343527390, 1986661051, 1014477480, 2177026350, 1206759142, 2456956037, 344077627, 2730485921, 1290863460, 2820302411, - 3158454273, 3259730800, 3505952657, 3345764771, 106217008, 3516065817, 3606008344, 3600352804, 1432725776, 4094571909, - 1467031594, 275423344, 851169720, 430227734, 3100823752, 506948616, 1363258195, 659060556, 3750685593, 883997877, 3785050280, - 958139571, 3318307427, 1322822218, 3812723403, 1537002063, 2003034995, 1747873779, 3602036899, 1955562222, 1575990012, - 2024104815, 1125592928, 2227730452, 2716904306, 2361852424, 442776044, 2428436474, 593698344, 2756734187, 3733110249, - 3204031479, 2999351573, 3329325298, 3815920427, 3391569614, 3928383900, 3515267271, 566280711, 3940187606, 3454069534, - 4118630271, 4000239992, 116418474, 1914138554, 174292421, 2731055270, 289380356, 3203993006, 460393269, 320620315, 685471733, - 587496836, 852142971, 1086792851, 1017036298, 365543100, 1126000580, 2618297676, 1288033470, 3409855158, 1501505948, 4234509866, - 1607167915, 987167468, 1816402316, 1246189591, - ], - a = new Array(160); - function h() { - this.init(), (this._w = a), n.call(this, 128, 112); - } - function u(t, e, r) { - return r ^ (t & (e ^ r)); - } - function f(t, e, r) { - return (t & e) | (r & (t | e)); - } - function c(t, e) { - return ((t >>> 28) | (e << 4)) ^ ((e >>> 2) | (t << 30)) ^ ((e >>> 7) | (t << 25)); - } - function l(t, e) { - return ((t >>> 14) | (e << 18)) ^ ((t >>> 18) | (e << 14)) ^ ((e >>> 9) | (t << 23)); - } - function d(t, e) { - return ((t >>> 1) | (e << 31)) ^ ((t >>> 8) | (e << 24)) ^ (t >>> 7); - } - function p(t, e) { - return ((t >>> 1) | (e << 31)) ^ ((t >>> 8) | (e << 24)) ^ ((t >>> 7) | (e << 25)); - } - function m(t, e) { - return ((t >>> 19) | (e << 13)) ^ ((e >>> 29) | (t << 3)) ^ (t >>> 6); - } - function g(t, e) { - return ((t >>> 19) | (e << 13)) ^ ((e >>> 29) | (t << 3)) ^ ((t >>> 6) | (e << 26)); - } - function b(t, e) { - return t >>> 0 < e >>> 0 ? 1 : 0; - } - i(h, n), - (h.prototype.init = function () { - return ( - (this._ah = 1779033703), - (this._bh = 3144134277), - (this._ch = 1013904242), - (this._dh = 2773480762), - (this._eh = 1359893119), - (this._fh = 2600822924), - (this._gh = 528734635), - (this._hh = 1541459225), - (this._al = 4089235720), - (this._bl = 2227873595), - (this._cl = 4271175723), - (this._dl = 1595750129), - (this._el = 2917565137), - (this._fl = 725511199), - (this._gl = 4215389547), - (this._hl = 327033209), - this - ); - }), - (h.prototype._update = function (t) { - for ( - var e = this._w, - r = 0 | this._ah, - i = 0 | this._bh, - n = 0 | this._ch, - o = 0 | this._dh, - a = 0 | this._eh, - h = 0 | this._fh, - y = 0 | this._gh, - v = 0 | this._hh, - w = 0 | this._al, - _ = 0 | this._bl, - M = 0 | this._cl, - E = 0 | this._dl, - S = 0 | this._el, - x = 0 | this._fl, - A = 0 | this._gl, - k = 0 | this._hl, - R = 0; - R < 32; - R += 2 - ) - (e[R] = t.readInt32BE(4 * R)), (e[R + 1] = t.readInt32BE(4 * R + 4)); - for (; R < 160; R += 2) { - var B = e[R - 30], - I = e[R - 30 + 1], - T = d(B, I), - P = p(I, B), - O = m((B = e[R - 4]), (I = e[R - 4 + 1])), - L = g(I, B), - C = e[R - 14], - N = e[R - 14 + 1], - j = e[R - 32], - U = e[R - 32 + 1], - D = (P + N) | 0, - z = (T + C + b(D, P)) | 0; - (z = ((z = (z + O + b((D = (D + L) | 0), L)) | 0) + j + b((D = (D + U) | 0), U)) | 0), (e[R] = z), (e[R + 1] = D); - } - for (var F = 0; F < 160; F += 2) { - (z = e[F]), (D = e[F + 1]); - var q = f(r, i, n), - H = f(w, _, M), - $ = c(r, w), - Z = c(w, r), - G = l(a, S), - V = l(S, a), - W = s[F], - K = s[F + 1], - Y = u(a, h, y), - J = u(S, x, A), - X = (k + V) | 0, - Q = (v + G + b(X, k)) | 0; - Q = ((Q = ((Q = (Q + Y + b((X = (X + J) | 0), J)) | 0) + W + b((X = (X + K) | 0), K)) | 0) + z + b((X = (X + D) | 0), D)) | 0; - var tt = (Z + H) | 0, - et = ($ + q + b(tt, Z)) | 0; - (v = y), - (k = A), - (y = h), - (A = x), - (h = a), - (x = S), - (a = (o + Q + b((S = (E + X) | 0), E)) | 0), - (o = n), - (E = M), - (n = i), - (M = _), - (i = r), - (_ = w), - (r = (Q + et + b((w = (X + tt) | 0), X)) | 0); - } - (this._al = (this._al + w) | 0), - (this._bl = (this._bl + _) | 0), - (this._cl = (this._cl + M) | 0), - (this._dl = (this._dl + E) | 0), - (this._el = (this._el + S) | 0), - (this._fl = (this._fl + x) | 0), - (this._gl = (this._gl + A) | 0), - (this._hl = (this._hl + k) | 0), - (this._ah = (this._ah + r + b(this._al, w)) | 0), - (this._bh = (this._bh + i + b(this._bl, _)) | 0), - (this._ch = (this._ch + n + b(this._cl, M)) | 0), - (this._dh = (this._dh + o + b(this._dl, E)) | 0), - (this._eh = (this._eh + a + b(this._el, S)) | 0), - (this._fh = (this._fh + h + b(this._fl, x)) | 0), - (this._gh = (this._gh + y + b(this._gl, A)) | 0), - (this._hh = (this._hh + v + b(this._hl, k)) | 0); - }), - (h.prototype._hash = function () { - var t = o.allocUnsafe(64); - function e(e, r, i) { - t.writeInt32BE(e, i), t.writeInt32BE(r, i + 4); - } - return ( - e(this._ah, this._al, 0), - e(this._bh, this._bl, 8), - e(this._ch, this._cl, 16), - e(this._dh, this._dl, 24), - e(this._eh, this._el, 32), - e(this._fh, this._fl, 40), - e(this._gh, this._gl, 48), - e(this._hh, this._hl, 56), - t - ); - }), - (t.exports = h); - }, - 3424: (t, e, r) => { - t.exports = n; - var i = r(343).EventEmitter; - function n() { - i.call(this); - } - r(87)(n, i), - (n.Readable = r(3610)), - (n.Writable = r(5163)), - (n.Duplex = r(8863)), - (n.Transform = r(5081)), - (n.PassThrough = r(5117)), - (n.finished = r(1791)), - (n.pipeline = r(4297)), - (n.Stream = n), - (n.prototype.pipe = function (t, e) { - var r = this; - function n(e) { - t.writable && !1 === t.write(e) && r.pause && r.pause(); - } - function o() { - r.readable && r.resume && r.resume(); - } - r.on('data', n), t.on('drain', o), t._isStdio || (e && !1 === e.end) || (r.on('end', a), r.on('close', h)); - var s = !1; - function a() { - s || ((s = !0), t.end()); - } - function h() { - s || ((s = !0), 'function' == typeof t.destroy && t.destroy()); - } - function u(t) { - if ((f(), 0 === i.listenerCount(this, 'error'))) throw t; - } - function f() { - r.removeListener('data', n), - t.removeListener('drain', o), - r.removeListener('end', a), - r.removeListener('close', h), - r.removeListener('error', u), - t.removeListener('error', u), - r.removeListener('end', f), - r.removeListener('close', f), - t.removeListener('close', f); - } - return r.on('error', u), t.on('error', u), r.on('end', f), r.on('close', f), t.on('close', f), t.emit('pipe', r), t; - }); - }, - 5319: t => { - 'use strict'; - var e = {}; - function r(t, r, i) { - i || (i = Error); - var n = (function (t) { - var e, i; - function n(e, i, n) { - return ( - t.call( - this, - (function (t, e, i) { - return 'string' == typeof r ? r : r(t, e, i); - })(e, i, n) - ) || this - ); - } - return (i = t), ((e = n).prototype = Object.create(i.prototype)), (e.prototype.constructor = e), (e.__proto__ = i), n; - })(i); - (n.prototype.name = i.name), (n.prototype.code = t), (e[t] = n); - } - function i(t, e) { - if (Array.isArray(t)) { - var r = t.length; - return ( - (t = t.map(function (t) { - return String(t); - })), - r > 2 - ? 'one of '.concat(e, ' ').concat(t.slice(0, r - 1).join(', '), ', or ') + t[r - 1] - : 2 === r - ? 'one of '.concat(e, ' ').concat(t[0], ' or ').concat(t[1]) - : 'of '.concat(e, ' ').concat(t[0]) - ); - } - return 'of '.concat(e, ' ').concat(String(t)); - } - r( - 'ERR_INVALID_OPT_VALUE', - function (t, e) { - return 'The value "' + e + '" is invalid for option "' + t + '"'; - }, - TypeError - ), - r( - 'ERR_INVALID_ARG_TYPE', - function (t, e, r) { - var n, o, s, a, h; - if ( - ('string' == typeof e && ((o = 'not '), e.substr(0, 4) === o) - ? ((n = 'must not be'), (e = e.replace(/^not /, ''))) - : (n = 'must be'), - (function (t, e, r) { - return (void 0 === r || r > t.length) && (r = t.length), t.substring(r - 9, r) === e; - })(t, ' argument')) - ) - s = 'The '.concat(t, ' ').concat(n, ' ').concat(i(e, 'type')); - else { - var u = ('number' != typeof h && (h = 0), h + 1 > (a = t).length || -1 === a.indexOf('.', h) ? 'argument' : 'property'); - s = 'The "'.concat(t, '" ').concat(u, ' ').concat(n, ' ').concat(i(e, 'type')); - } - return s + '. Received type '.concat(typeof r); - }, - TypeError - ), - r('ERR_STREAM_PUSH_AFTER_EOF', 'stream.push() after EOF'), - r('ERR_METHOD_NOT_IMPLEMENTED', function (t) { - return 'The ' + t + ' method is not implemented'; - }), - r('ERR_STREAM_PREMATURE_CLOSE', 'Premature close'), - r('ERR_STREAM_DESTROYED', function (t) { - return 'Cannot call ' + t + ' after a stream was destroyed'; - }), - r('ERR_MULTIPLE_CALLBACK', 'Callback called multiple times'), - r('ERR_STREAM_CANNOT_PIPE', 'Cannot pipe, not readable'), - r('ERR_STREAM_WRITE_AFTER_END', 'write after end'), - r('ERR_STREAM_NULL_VALUES', 'May not write null values to stream', TypeError), - r( - 'ERR_UNKNOWN_ENCODING', - function (t) { - return 'Unknown encoding: ' + t; - }, - TypeError - ), - r('ERR_STREAM_UNSHIFT_AFTER_END_EVENT', 'stream.unshift() after end event'), - (t.exports.q = e); - }, - 8863: (t, e, r) => { - 'use strict'; - var i = - Object.keys || - function (t) { - var e = []; - for (var r in t) e.push(r); - return e; - }; - t.exports = u; - var n = r(3610), - o = r(5163); - r(87)(u, n); - for (var s = i(o.prototype), a = 0; a < s.length; a++) { - var h = s[a]; - u.prototype[h] || (u.prototype[h] = o.prototype[h]); - } - function u(t) { - if (!(this instanceof u)) return new u(t); - n.call(this, t), - o.call(this, t), - (this.allowHalfOpen = !0), - t && - (!1 === t.readable && (this.readable = !1), - !1 === t.writable && (this.writable = !1), - !1 === t.allowHalfOpen && ((this.allowHalfOpen = !1), this.once('end', f))); - } - function f() { - this._writableState.ended || process.nextTick(c, this); - } - function c(t) { - t.end(); - } - Object.defineProperty(u.prototype, 'writableHighWaterMark', { - enumerable: !1, - get: function () { - return this._writableState.highWaterMark; - }, - }), - Object.defineProperty(u.prototype, 'writableBuffer', { - enumerable: !1, - get: function () { - return this._writableState && this._writableState.getBuffer(); - }, - }), - Object.defineProperty(u.prototype, 'writableLength', { - enumerable: !1, - get: function () { - return this._writableState.length; - }, - }), - Object.defineProperty(u.prototype, 'destroyed', { - enumerable: !1, - get: function () { - return ( - void 0 !== this._readableState && - void 0 !== this._writableState && - this._readableState.destroyed && - this._writableState.destroyed - ); - }, - set: function (t) { - void 0 !== this._readableState && - void 0 !== this._writableState && - ((this._readableState.destroyed = t), (this._writableState.destroyed = t)); - }, - }); - }, - 5117: (t, e, r) => { - 'use strict'; - t.exports = n; - var i = r(5081); - function n(t) { - if (!(this instanceof n)) return new n(t); - i.call(this, t); - } - r(87)(n, i), - (n.prototype._transform = function (t, e, r) { - r(null, t); - }); - }, - 3610: (t, e, r) => { - 'use strict'; - var i; - (t.exports = S), (S.ReadableState = E), r(343).EventEmitter; - var n, - o = function (t, e) { - return t.listeners(e).length; - }, - s = r(801), - a = r(816).Buffer, - h = - (void 0 !== r.g ? r.g : 'undefined' != typeof window ? window : 'undefined' != typeof self ? self : {}).Uint8Array || - function () {}, - u = r(7702); - n = u && u.debuglog ? u.debuglog('stream') : function () {}; - var f, - c, - l, - d = r(3667), - p = r(4382), - m = r(9693).getHighWaterMark, - g = r(5319).q, - b = g.ERR_INVALID_ARG_TYPE, - y = g.ERR_STREAM_PUSH_AFTER_EOF, - v = g.ERR_METHOD_NOT_IMPLEMENTED, - w = g.ERR_STREAM_UNSHIFT_AFTER_END_EVENT; - r(87)(S, s); - var _ = p.errorOrDestroy, - M = ['error', 'close', 'destroy', 'pause', 'resume']; - function E(t, e, n) { - (i = i || r(8863)), - (t = t || {}), - 'boolean' != typeof n && (n = e instanceof i), - (this.objectMode = !!t.objectMode), - n && (this.objectMode = this.objectMode || !!t.readableObjectMode), - (this.highWaterMark = m(this, t, 'readableHighWaterMark', n)), - (this.buffer = new d()), - (this.length = 0), - (this.pipes = null), - (this.pipesCount = 0), - (this.flowing = null), - (this.ended = !1), - (this.endEmitted = !1), - (this.reading = !1), - (this.sync = !0), - (this.needReadable = !1), - (this.emittedReadable = !1), - (this.readableListening = !1), - (this.resumeScheduled = !1), - (this.paused = !0), - (this.emitClose = !1 !== t.emitClose), - (this.autoDestroy = !!t.autoDestroy), - (this.destroyed = !1), - (this.defaultEncoding = t.defaultEncoding || 'utf8'), - (this.awaitDrain = 0), - (this.readingMore = !1), - (this.decoder = null), - (this.encoding = null), - t.encoding && (f || (f = r(4361).s), (this.decoder = new f(t.encoding)), (this.encoding = t.encoding)); - } - function S(t) { - if (((i = i || r(8863)), !(this instanceof S))) return new S(t); - var e = this instanceof i; - (this._readableState = new E(t, this, e)), - (this.readable = !0), - t && ('function' == typeof t.read && (this._read = t.read), 'function' == typeof t.destroy && (this._destroy = t.destroy)), - s.call(this); - } - function x(t, e, r, i, o) { - n('readableAddChunk', e); - var s, - u = t._readableState; - if (null === e) - (u.reading = !1), - (function (t, e) { - if ((n('onEofChunk'), !e.ended)) { - if (e.decoder) { - var r = e.decoder.end(); - r && r.length && (e.buffer.push(r), (e.length += e.objectMode ? 1 : r.length)); - } - (e.ended = !0), e.sync ? B(t) : ((e.needReadable = !1), e.emittedReadable || ((e.emittedReadable = !0), I(t))); - } - })(t, u); - else if ( - (o || - (s = (function (t, e) { - var r, i; - return ( - (i = e), - a.isBuffer(i) || - i instanceof h || - 'string' == typeof e || - void 0 === e || - t.objectMode || - (r = new b('chunk', ['string', 'Buffer', 'Uint8Array'], e)), - r - ); - })(u, e)), - s) - ) - _(t, s); - else if (u.objectMode || (e && e.length > 0)) - if ( - ('string' == typeof e || - u.objectMode || - Object.getPrototypeOf(e) === a.prototype || - (e = (function (t) { - return a.from(t); - })(e)), - i) - ) - u.endEmitted ? _(t, new w()) : A(t, u, e, !0); - else if (u.ended) _(t, new y()); - else { - if (u.destroyed) return !1; - (u.reading = !1), - u.decoder && !r ? ((e = u.decoder.write(e)), u.objectMode || 0 !== e.length ? A(t, u, e, !1) : T(t, u)) : A(t, u, e, !1); - } - else i || ((u.reading = !1), T(t, u)); - return !u.ended && (u.length < u.highWaterMark || 0 === u.length); - } - function A(t, e, r, i) { - e.flowing && 0 === e.length && !e.sync - ? ((e.awaitDrain = 0), t.emit('data', r)) - : ((e.length += e.objectMode ? 1 : r.length), i ? e.buffer.unshift(r) : e.buffer.push(r), e.needReadable && B(t)), - T(t, e); - } - Object.defineProperty(S.prototype, 'destroyed', { - enumerable: !1, - get: function () { - return void 0 !== this._readableState && this._readableState.destroyed; - }, - set: function (t) { - this._readableState && (this._readableState.destroyed = t); - }, - }), - (S.prototype.destroy = p.destroy), - (S.prototype._undestroy = p.undestroy), - (S.prototype._destroy = function (t, e) { - e(t); - }), - (S.prototype.push = function (t, e) { - var r, - i = this._readableState; - return ( - i.objectMode - ? (r = !0) - : 'string' == typeof t && ((e = e || i.defaultEncoding) !== i.encoding && ((t = a.from(t, e)), (e = '')), (r = !0)), - x(this, t, e, !1, r) - ); - }), - (S.prototype.unshift = function (t) { - return x(this, t, null, !0, !1); - }), - (S.prototype.isPaused = function () { - return !1 === this._readableState.flowing; - }), - (S.prototype.setEncoding = function (t) { - f || (f = r(4361).s); - var e = new f(t); - (this._readableState.decoder = e), (this._readableState.encoding = this._readableState.decoder.encoding); - for (var i = this._readableState.buffer.head, n = ''; null !== i; ) (n += e.write(i.data)), (i = i.next); - return ( - this._readableState.buffer.clear(), - '' !== n && this._readableState.buffer.push(n), - (this._readableState.length = n.length), - this - ); - }); - var k = 1073741824; - function R(t, e) { - return t <= 0 || (0 === e.length && e.ended) - ? 0 - : e.objectMode - ? 1 - : t != t - ? e.flowing && e.length - ? e.buffer.head.data.length - : e.length - : (t > e.highWaterMark && - (e.highWaterMark = (function (t) { - return ( - t >= k ? (t = k) : (t--, (t |= t >>> 1), (t |= t >>> 2), (t |= t >>> 4), (t |= t >>> 8), (t |= t >>> 16), t++), t - ); - })(t)), - t <= e.length ? t : e.ended ? e.length : ((e.needReadable = !0), 0)); - } - function B(t) { - var e = t._readableState; - n('emitReadable', e.needReadable, e.emittedReadable), - (e.needReadable = !1), - e.emittedReadable || (n('emitReadable', e.flowing), (e.emittedReadable = !0), process.nextTick(I, t)); - } - function I(t) { - var e = t._readableState; - n('emitReadable_', e.destroyed, e.length, e.ended), - e.destroyed || (!e.length && !e.ended) || (t.emit('readable'), (e.emittedReadable = !1)), - (e.needReadable = !e.flowing && !e.ended && e.length <= e.highWaterMark), - N(t); - } - function T(t, e) { - e.readingMore || ((e.readingMore = !0), process.nextTick(P, t, e)); - } - function P(t, e) { - for (; !e.reading && !e.ended && (e.length < e.highWaterMark || (e.flowing && 0 === e.length)); ) { - var r = e.length; - if ((n('maybeReadMore read 0'), t.read(0), r === e.length)) break; - } - e.readingMore = !1; - } - function O(t) { - var e = t._readableState; - (e.readableListening = t.listenerCount('readable') > 0), - e.resumeScheduled && !e.paused ? (e.flowing = !0) : t.listenerCount('data') > 0 && t.resume(); - } - function L(t) { - n('readable nexttick read 0'), t.read(0); - } - function C(t, e) { - n('resume', e.reading), - e.reading || t.read(0), - (e.resumeScheduled = !1), - t.emit('resume'), - N(t), - e.flowing && !e.reading && t.read(0); - } - function N(t) { - var e = t._readableState; - for (n('flow', e.flowing); e.flowing && null !== t.read(); ); - } - function j(t, e) { - return 0 === e.length - ? null - : (e.objectMode - ? (r = e.buffer.shift()) - : !t || t >= e.length - ? ((r = e.decoder ? e.buffer.join('') : 1 === e.buffer.length ? e.buffer.first() : e.buffer.concat(e.length)), - e.buffer.clear()) - : (r = e.buffer.consume(t, e.decoder)), - r); - var r; - } - function U(t) { - var e = t._readableState; - n('endReadable', e.endEmitted), e.endEmitted || ((e.ended = !0), process.nextTick(D, e, t)); - } - function D(t, e) { - if ( - (n('endReadableNT', t.endEmitted, t.length), - !t.endEmitted && 0 === t.length && ((t.endEmitted = !0), (e.readable = !1), e.emit('end'), t.autoDestroy)) - ) { - var r = e._writableState; - (!r || (r.autoDestroy && r.finished)) && e.destroy(); - } - } - function z(t, e) { - for (var r = 0, i = t.length; r < i; r++) if (t[r] === e) return r; - return -1; - } - (S.prototype.read = function (t) { - n('read', t), (t = parseInt(t, 10)); - var e = this._readableState, - r = t; - if ( - (0 !== t && (e.emittedReadable = !1), - 0 === t && e.needReadable && ((0 !== e.highWaterMark ? e.length >= e.highWaterMark : e.length > 0) || e.ended)) - ) - return n('read: emitReadable', e.length, e.ended), 0 === e.length && e.ended ? U(this) : B(this), null; - if (0 === (t = R(t, e)) && e.ended) return 0 === e.length && U(this), null; - var i, - o = e.needReadable; - return ( - n('need readable', o), - (0 === e.length || e.length - t < e.highWaterMark) && n('length less than watermark', (o = !0)), - e.ended || e.reading - ? n('reading or ended', (o = !1)) - : o && - (n('do read'), - (e.reading = !0), - (e.sync = !0), - 0 === e.length && (e.needReadable = !0), - this._read(e.highWaterMark), - (e.sync = !1), - e.reading || (t = R(r, e))), - null === (i = t > 0 ? j(t, e) : null) - ? ((e.needReadable = e.length <= e.highWaterMark), (t = 0)) - : ((e.length -= t), (e.awaitDrain = 0)), - 0 === e.length && (e.ended || (e.needReadable = !0), r !== t && e.ended && U(this)), - null !== i && this.emit('data', i), - i - ); - }), - (S.prototype._read = function (t) { - _(this, new v('_read()')); - }), - (S.prototype.pipe = function (t, e) { - var r = this, - i = this._readableState; - switch (i.pipesCount) { - case 0: - i.pipes = t; - break; - case 1: - i.pipes = [i.pipes, t]; - break; - default: - i.pipes.push(t); - } - (i.pipesCount += 1), n('pipe count=%d opts=%j', i.pipesCount, e); - var s = (e && !1 === e.end) || t === process.stdout || t === process.stderr ? p : a; - function a() { - n('onend'), t.end(); - } - i.endEmitted ? process.nextTick(s) : r.once('end', s), - t.on('unpipe', function e(o, s) { - n('onunpipe'), - o === r && - s && - !1 === s.hasUnpiped && - ((s.hasUnpiped = !0), - n('cleanup'), - t.removeListener('close', l), - t.removeListener('finish', d), - t.removeListener('drain', h), - t.removeListener('error', c), - t.removeListener('unpipe', e), - r.removeListener('end', a), - r.removeListener('end', p), - r.removeListener('data', f), - (u = !0), - !i.awaitDrain || (t._writableState && !t._writableState.needDrain) || h()); - }); - var h = (function (t) { - return function () { - var e = t._readableState; - n('pipeOnDrain', e.awaitDrain), - e.awaitDrain && e.awaitDrain--, - 0 === e.awaitDrain && o(t, 'data') && ((e.flowing = !0), N(t)); - }; - })(r); - t.on('drain', h); - var u = !1; - function f(e) { - n('ondata'); - var o = t.write(e); - n('dest.write', o), - !1 === o && - (((1 === i.pipesCount && i.pipes === t) || (i.pipesCount > 1 && -1 !== z(i.pipes, t))) && - !u && - (n('false write response, pause', i.awaitDrain), i.awaitDrain++), - r.pause()); - } - function c(e) { - n('onerror', e), p(), t.removeListener('error', c), 0 === o(t, 'error') && _(t, e); - } - function l() { - t.removeListener('finish', d), p(); - } - function d() { - n('onfinish'), t.removeListener('close', l), p(); - } - function p() { - n('unpipe'), r.unpipe(t); - } - return ( - r.on('data', f), - (function (t, e, r) { - if ('function' == typeof t.prependListener) return t.prependListener(e, r); - t._events && t._events[e] - ? Array.isArray(t._events[e]) - ? t._events[e].unshift(r) - : (t._events[e] = [r, t._events[e]]) - : t.on(e, r); - })(t, 'error', c), - t.once('close', l), - t.once('finish', d), - t.emit('pipe', r), - i.flowing || (n('pipe resume'), r.resume()), - t - ); - }), - (S.prototype.unpipe = function (t) { - var e = this._readableState, - r = { hasUnpiped: !1 }; - if (0 === e.pipesCount) return this; - if (1 === e.pipesCount) - return ( - (t && t !== e.pipes) || - (t || (t = e.pipes), (e.pipes = null), (e.pipesCount = 0), (e.flowing = !1), t && t.emit('unpipe', this, r)), - this - ); - if (!t) { - var i = e.pipes, - n = e.pipesCount; - (e.pipes = null), (e.pipesCount = 0), (e.flowing = !1); - for (var o = 0; o < n; o++) i[o].emit('unpipe', this, { hasUnpiped: !1 }); - return this; - } - var s = z(e.pipes, t); - return ( - -1 === s || - (e.pipes.splice(s, 1), (e.pipesCount -= 1), 1 === e.pipesCount && (e.pipes = e.pipes[0]), t.emit('unpipe', this, r)), - this - ); - }), - (S.prototype.on = function (t, e) { - var r = s.prototype.on.call(this, t, e), - i = this._readableState; - return ( - 'data' === t - ? ((i.readableListening = this.listenerCount('readable') > 0), !1 !== i.flowing && this.resume()) - : 'readable' === t && - (i.endEmitted || - i.readableListening || - ((i.readableListening = i.needReadable = !0), - (i.flowing = !1), - (i.emittedReadable = !1), - n('on readable', i.length, i.reading), - i.length ? B(this) : i.reading || process.nextTick(L, this))), - r - ); - }), - (S.prototype.addListener = S.prototype.on), - (S.prototype.removeListener = function (t, e) { - var r = s.prototype.removeListener.call(this, t, e); - return 'readable' === t && process.nextTick(O, this), r; - }), - (S.prototype.removeAllListeners = function (t) { - var e = s.prototype.removeAllListeners.apply(this, arguments); - return ('readable' !== t && void 0 !== t) || process.nextTick(O, this), e; - }), - (S.prototype.resume = function () { - var t = this._readableState; - return ( - t.flowing || - (n('resume'), - (t.flowing = !t.readableListening), - (function (t, e) { - e.resumeScheduled || ((e.resumeScheduled = !0), process.nextTick(C, t, e)); - })(this, t)), - (t.paused = !1), - this - ); - }), - (S.prototype.pause = function () { - return ( - n('call pause flowing=%j', this._readableState.flowing), - !1 !== this._readableState.flowing && (n('pause'), (this._readableState.flowing = !1), this.emit('pause')), - (this._readableState.paused = !0), - this - ); - }), - (S.prototype.wrap = function (t) { - var e = this, - r = this._readableState, - i = !1; - for (var o in (t.on('end', function () { - if ((n('wrapped end'), r.decoder && !r.ended)) { - var t = r.decoder.end(); - t && t.length && e.push(t); - } - e.push(null); - }), - t.on('data', function (o) { - n('wrapped data'), - r.decoder && (o = r.decoder.write(o)), - (r.objectMode && null == o) || ((r.objectMode || (o && o.length)) && (e.push(o) || ((i = !0), t.pause()))); - }), - t)) - void 0 === this[o] && - 'function' == typeof t[o] && - (this[o] = (function (e) { - return function () { - return t[e].apply(t, arguments); - }; - })(o)); - for (var s = 0; s < M.length; s++) t.on(M[s], this.emit.bind(this, M[s])); - return ( - (this._read = function (e) { - n('wrapped _read', e), i && ((i = !1), t.resume()); - }), - this - ); - }), - 'function' == typeof Symbol && - (S.prototype[Symbol.asyncIterator] = function () { - return void 0 === c && (c = r(6473)), c(this); - }), - Object.defineProperty(S.prototype, 'readableHighWaterMark', { - enumerable: !1, - get: function () { - return this._readableState.highWaterMark; - }, - }), - Object.defineProperty(S.prototype, 'readableBuffer', { - enumerable: !1, - get: function () { - return this._readableState && this._readableState.buffer; - }, - }), - Object.defineProperty(S.prototype, 'readableFlowing', { - enumerable: !1, - get: function () { - return this._readableState.flowing; - }, - set: function (t) { - this._readableState && (this._readableState.flowing = t); - }, - }), - (S._fromList = j), - Object.defineProperty(S.prototype, 'readableLength', { - enumerable: !1, - get: function () { - return this._readableState.length; - }, - }), - 'function' == typeof Symbol && - (S.from = function (t, e) { - return void 0 === l && (l = r(2867)), l(S, t, e); - }); - }, - 5081: (t, e, r) => { - 'use strict'; - t.exports = f; - var i = r(5319).q, - n = i.ERR_METHOD_NOT_IMPLEMENTED, - o = i.ERR_MULTIPLE_CALLBACK, - s = i.ERR_TRANSFORM_ALREADY_TRANSFORMING, - a = i.ERR_TRANSFORM_WITH_LENGTH_0, - h = r(8863); - function u(t, e) { - var r = this._transformState; - r.transforming = !1; - var i = r.writecb; - if (null === i) return this.emit('error', new o()); - (r.writechunk = null), (r.writecb = null), null != e && this.push(e), i(t); - var n = this._readableState; - (n.reading = !1), (n.needReadable || n.length < n.highWaterMark) && this._read(n.highWaterMark); - } - function f(t) { - if (!(this instanceof f)) return new f(t); - h.call(this, t), - (this._transformState = { - afterTransform: u.bind(this), - needTransform: !1, - transforming: !1, - writecb: null, - writechunk: null, - writeencoding: null, - }), - (this._readableState.needReadable = !0), - (this._readableState.sync = !1), - t && - ('function' == typeof t.transform && (this._transform = t.transform), - 'function' == typeof t.flush && (this._flush = t.flush)), - this.on('prefinish', c); - } - function c() { - var t = this; - 'function' != typeof this._flush || this._readableState.destroyed - ? l(this, null, null) - : this._flush(function (e, r) { - l(t, e, r); - }); - } - function l(t, e, r) { - if (e) return t.emit('error', e); - if ((null != r && t.push(r), t._writableState.length)) throw new a(); - if (t._transformState.transforming) throw new s(); - return t.push(null); - } - r(87)(f, h), - (f.prototype.push = function (t, e) { - return (this._transformState.needTransform = !1), h.prototype.push.call(this, t, e); - }), - (f.prototype._transform = function (t, e, r) { - r(new n('_transform()')); - }), - (f.prototype._write = function (t, e, r) { - var i = this._transformState; - if (((i.writecb = r), (i.writechunk = t), (i.writeencoding = e), !i.transforming)) { - var n = this._readableState; - (i.needTransform || n.needReadable || n.length < n.highWaterMark) && this._read(n.highWaterMark); - } - }), - (f.prototype._read = function (t) { - var e = this._transformState; - null === e.writechunk || e.transforming - ? (e.needTransform = !0) - : ((e.transforming = !0), this._transform(e.writechunk, e.writeencoding, e.afterTransform)); - }), - (f.prototype._destroy = function (t, e) { - h.prototype._destroy.call(this, t, function (t) { - e(t); - }); - }); - }, - 5163: (t, e, r) => { - 'use strict'; - function i(t) { - var e = this; - (this.next = null), - (this.entry = null), - (this.finish = function () { - !(function (t, e, r) { - var i = t.entry; - for (t.entry = null; i; ) { - var n = i.callback; - e.pendingcb--, n(undefined), (i = i.next); - } - e.corkedRequestsFree.next = t; - })(e, t); - }); - } - var n; - (t.exports = S), (S.WritableState = E); - var o, - s = { deprecate: r(7451) }, - a = r(801), - h = r(816).Buffer, - u = - (void 0 !== r.g ? r.g : 'undefined' != typeof window ? window : 'undefined' != typeof self ? self : {}).Uint8Array || - function () {}, - f = r(4382), - c = r(9693).getHighWaterMark, - l = r(5319).q, - d = l.ERR_INVALID_ARG_TYPE, - p = l.ERR_METHOD_NOT_IMPLEMENTED, - m = l.ERR_MULTIPLE_CALLBACK, - g = l.ERR_STREAM_CANNOT_PIPE, - b = l.ERR_STREAM_DESTROYED, - y = l.ERR_STREAM_NULL_VALUES, - v = l.ERR_STREAM_WRITE_AFTER_END, - w = l.ERR_UNKNOWN_ENCODING, - _ = f.errorOrDestroy; - function M() {} - function E(t, e, o) { - (n = n || r(8863)), - (t = t || {}), - 'boolean' != typeof o && (o = e instanceof n), - (this.objectMode = !!t.objectMode), - o && (this.objectMode = this.objectMode || !!t.writableObjectMode), - (this.highWaterMark = c(this, t, 'writableHighWaterMark', o)), - (this.finalCalled = !1), - (this.needDrain = !1), - (this.ending = !1), - (this.ended = !1), - (this.finished = !1), - (this.destroyed = !1); - var s = !1 === t.decodeStrings; - (this.decodeStrings = !s), - (this.defaultEncoding = t.defaultEncoding || 'utf8'), - (this.length = 0), - (this.writing = !1), - (this.corked = 0), - (this.sync = !0), - (this.bufferProcessing = !1), - (this.onwrite = function (t) { - !(function (t, e) { - var r = t._writableState, - i = r.sync, - n = r.writecb; - if ('function' != typeof n) throw new m(); - if ( - ((function (t) { - (t.writing = !1), (t.writecb = null), (t.length -= t.writelen), (t.writelen = 0); - })(r), - e) - ) - !(function (t, e, r, i, n) { - --e.pendingcb, - r - ? (process.nextTick(n, i), process.nextTick(I, t, e), (t._writableState.errorEmitted = !0), _(t, i)) - : (n(i), (t._writableState.errorEmitted = !0), _(t, i), I(t, e)); - })(t, r, i, e, n); - else { - var o = R(r) || t.destroyed; - o || r.corked || r.bufferProcessing || !r.bufferedRequest || k(t, r), i ? process.nextTick(A, t, r, o, n) : A(t, r, o, n); - } - })(e, t); - }), - (this.writecb = null), - (this.writelen = 0), - (this.bufferedRequest = null), - (this.lastBufferedRequest = null), - (this.pendingcb = 0), - (this.prefinished = !1), - (this.errorEmitted = !1), - (this.emitClose = !1 !== t.emitClose), - (this.autoDestroy = !!t.autoDestroy), - (this.bufferedRequestCount = 0), - (this.corkedRequestsFree = new i(this)); - } - function S(t) { - var e = this instanceof (n = n || r(8863)); - if (!e && !o.call(S, this)) return new S(t); - (this._writableState = new E(t, this, e)), - (this.writable = !0), - t && - ('function' == typeof t.write && (this._write = t.write), - 'function' == typeof t.writev && (this._writev = t.writev), - 'function' == typeof t.destroy && (this._destroy = t.destroy), - 'function' == typeof t.final && (this._final = t.final)), - a.call(this); - } - function x(t, e, r, i, n, o, s) { - (e.writelen = i), - (e.writecb = s), - (e.writing = !0), - (e.sync = !0), - e.destroyed ? e.onwrite(new b('write')) : r ? t._writev(n, e.onwrite) : t._write(n, o, e.onwrite), - (e.sync = !1); - } - function A(t, e, r, i) { - r || - (function (t, e) { - 0 === e.length && e.needDrain && ((e.needDrain = !1), t.emit('drain')); - })(t, e), - e.pendingcb--, - i(), - I(t, e); - } - function k(t, e) { - e.bufferProcessing = !0; - var r = e.bufferedRequest; - if (t._writev && r && r.next) { - var n = e.bufferedRequestCount, - o = new Array(n), - s = e.corkedRequestsFree; - s.entry = r; - for (var a = 0, h = !0; r; ) (o[a] = r), r.isBuf || (h = !1), (r = r.next), (a += 1); - (o.allBuffers = h), - x(t, e, !0, e.length, o, '', s.finish), - e.pendingcb++, - (e.lastBufferedRequest = null), - s.next ? ((e.corkedRequestsFree = s.next), (s.next = null)) : (e.corkedRequestsFree = new i(e)), - (e.bufferedRequestCount = 0); - } else { - for (; r; ) { - var u = r.chunk, - f = r.encoding, - c = r.callback; - if ((x(t, e, !1, e.objectMode ? 1 : u.length, u, f, c), (r = r.next), e.bufferedRequestCount--, e.writing)) break; - } - null === r && (e.lastBufferedRequest = null); - } - (e.bufferedRequest = r), (e.bufferProcessing = !1); - } - function R(t) { - return t.ending && 0 === t.length && null === t.bufferedRequest && !t.finished && !t.writing; - } - function B(t, e) { - t._final(function (r) { - e.pendingcb--, r && _(t, r), (e.prefinished = !0), t.emit('prefinish'), I(t, e); - }); - } - function I(t, e) { - var r = R(e); - if ( - r && - ((function (t, e) { - e.prefinished || - e.finalCalled || - ('function' != typeof t._final || e.destroyed - ? ((e.prefinished = !0), t.emit('prefinish')) - : (e.pendingcb++, (e.finalCalled = !0), process.nextTick(B, t, e))); - })(t, e), - 0 === e.pendingcb && ((e.finished = !0), t.emit('finish'), e.autoDestroy)) - ) { - var i = t._readableState; - (!i || (i.autoDestroy && i.endEmitted)) && t.destroy(); - } - return r; - } - r(87)(S, a), - (E.prototype.getBuffer = function () { - for (var t = this.bufferedRequest, e = []; t; ) e.push(t), (t = t.next); - return e; - }), - (function () { - try { - Object.defineProperty(E.prototype, 'buffer', { - get: s.deprecate( - function () { - return this.getBuffer(); - }, - '_writableState.buffer is deprecated. Use _writableState.getBuffer instead.', - 'DEP0003' - ), - }); - } catch (t) {} - })(), - 'function' == typeof Symbol && Symbol.hasInstance && 'function' == typeof Function.prototype[Symbol.hasInstance] - ? ((o = Function.prototype[Symbol.hasInstance]), - Object.defineProperty(S, Symbol.hasInstance, { - value: function (t) { - return !!o.call(this, t) || (this === S && t && t._writableState instanceof E); - }, - })) - : (o = function (t) { - return t instanceof this; - }), - (S.prototype.pipe = function () { - _(this, new g()); - }), - (S.prototype.write = function (t, e, r) { - var i, - n = this._writableState, - o = !1, - s = !n.objectMode && ((i = t), h.isBuffer(i) || i instanceof u); - return ( - s && - !h.isBuffer(t) && - (t = (function (t) { - return h.from(t); - })(t)), - 'function' == typeof e && ((r = e), (e = null)), - s ? (e = 'buffer') : e || (e = n.defaultEncoding), - 'function' != typeof r && (r = M), - n.ending - ? (function (t, e) { - var r = new v(); - _(t, r), process.nextTick(e, r); - })(this, r) - : (s || - (function (t, e, r, i) { - var n; - return ( - null === r ? (n = new y()) : 'string' == typeof r || e.objectMode || (n = new d('chunk', ['string', 'Buffer'], r)), - !n || (_(t, n), process.nextTick(i, n), !1) - ); - })(this, n, t, r)) && - (n.pendingcb++, - (o = (function (t, e, r, i, n, o) { - if (!r) { - var s = (function (t, e, r) { - return t.objectMode || !1 === t.decodeStrings || 'string' != typeof e || (e = h.from(e, r)), e; - })(e, i, n); - i !== s && ((r = !0), (n = 'buffer'), (i = s)); - } - var a = e.objectMode ? 1 : i.length; - e.length += a; - var u = e.length < e.highWaterMark; - if ((u || (e.needDrain = !0), e.writing || e.corked)) { - var f = e.lastBufferedRequest; - (e.lastBufferedRequest = { chunk: i, encoding: n, isBuf: r, callback: o, next: null }), - f ? (f.next = e.lastBufferedRequest) : (e.bufferedRequest = e.lastBufferedRequest), - (e.bufferedRequestCount += 1); - } else x(t, e, !1, a, i, n, o); - return u; - })(this, n, s, t, e, r))), - o - ); - }), - (S.prototype.cork = function () { - this._writableState.corked++; - }), - (S.prototype.uncork = function () { - var t = this._writableState; - t.corked && (t.corked--, t.writing || t.corked || t.bufferProcessing || !t.bufferedRequest || k(this, t)); - }), - (S.prototype.setDefaultEncoding = function (t) { - if ( - ('string' == typeof t && (t = t.toLowerCase()), - !( - ['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf( - (t + '').toLowerCase() - ) > -1 - )) - ) - throw new w(t); - return (this._writableState.defaultEncoding = t), this; - }), - Object.defineProperty(S.prototype, 'writableBuffer', { - enumerable: !1, - get: function () { - return this._writableState && this._writableState.getBuffer(); - }, - }), - Object.defineProperty(S.prototype, 'writableHighWaterMark', { - enumerable: !1, - get: function () { - return this._writableState.highWaterMark; - }, - }), - (S.prototype._write = function (t, e, r) { - r(new p('_write()')); - }), - (S.prototype._writev = null), - (S.prototype.end = function (t, e, r) { - var i = this._writableState; - return ( - 'function' == typeof t ? ((r = t), (t = null), (e = null)) : 'function' == typeof e && ((r = e), (e = null)), - null != t && this.write(t, e), - i.corked && ((i.corked = 1), this.uncork()), - i.ending || - (function (t, e, r) { - (e.ending = !0), - I(t, e), - r && (e.finished ? process.nextTick(r) : t.once('finish', r)), - (e.ended = !0), - (t.writable = !1); - })(this, i, r), - this - ); - }), - Object.defineProperty(S.prototype, 'writableLength', { - enumerable: !1, - get: function () { - return this._writableState.length; - }, - }), - Object.defineProperty(S.prototype, 'destroyed', { - enumerable: !1, - get: function () { - return void 0 !== this._writableState && this._writableState.destroyed; - }, - set: function (t) { - this._writableState && (this._writableState.destroyed = t); - }, - }), - (S.prototype.destroy = f.destroy), - (S.prototype._undestroy = f.undestroy), - (S.prototype._destroy = function (t, e) { - e(t); - }); - }, - 6473: (t, e, r) => { - 'use strict'; - var i; - function n(t, e, r) { - return ( - (e = (function (t) { - var e = (function (t, e) { - if ('object' != typeof t || null === t) return t; - var r = t[Symbol.toPrimitive]; - if (void 0 !== r) { - var i = r.call(t, 'string'); - if ('object' != typeof i) return i; - throw new TypeError('@@toPrimitive must return a primitive value.'); - } - return String(t); - })(t); - return 'symbol' == typeof e ? e : String(e); - })(e)) in t - ? Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }) - : (t[e] = r), - t - ); - } - var o = r(1791), - s = Symbol('lastResolve'), - a = Symbol('lastReject'), - h = Symbol('error'), - u = Symbol('ended'), - f = Symbol('lastPromise'), - c = Symbol('handlePromise'), - l = Symbol('stream'); - function d(t, e) { - return { value: t, done: e }; - } - function p(t) { - var e = t[s]; - if (null !== e) { - var r = t[l].read(); - null !== r && ((t[f] = null), (t[s] = null), (t[a] = null), e(d(r, !1))); - } - } - function m(t) { - process.nextTick(p, t); - } - var g = Object.getPrototypeOf(function () {}), - b = Object.setPrototypeOf( - (n( - (i = { - get stream() { - return this[l]; - }, - next: function () { - var t = this, - e = this[h]; - if (null !== e) return Promise.reject(e); - if (this[u]) return Promise.resolve(d(void 0, !0)); - if (this[l].destroyed) - return new Promise(function (e, r) { - process.nextTick(function () { - t[h] ? r(t[h]) : e(d(void 0, !0)); - }); - }); - var r, - i = this[f]; - if (i) - r = new Promise( - (function (t, e) { - return function (r, i) { - t.then(function () { - e[u] ? r(d(void 0, !0)) : e[c](r, i); - }, i); - }; - })(i, this) - ); - else { - var n = this[l].read(); - if (null !== n) return Promise.resolve(d(n, !1)); - r = new Promise(this[c]); - } - return (this[f] = r), r; - }, - }), - Symbol.asyncIterator, - function () { - return this; - } - ), - n(i, 'return', function () { - var t = this; - return new Promise(function (e, r) { - t[l].destroy(null, function (t) { - t ? r(t) : e(d(void 0, !0)); - }); - }); - }), - i), - g - ); - t.exports = function (t) { - var e, - r = Object.create( - b, - (n((e = {}), l, { value: t, writable: !0 }), - n(e, s, { value: null, writable: !0 }), - n(e, a, { value: null, writable: !0 }), - n(e, h, { value: null, writable: !0 }), - n(e, u, { value: t._readableState.endEmitted, writable: !0 }), - n(e, c, { - value: function (t, e) { - var i = r[l].read(); - i ? ((r[f] = null), (r[s] = null), (r[a] = null), t(d(i, !1))) : ((r[s] = t), (r[a] = e)); - }, - writable: !0, - }), - e) - ); - return ( - (r[f] = null), - o(t, function (t) { - if (t && 'ERR_STREAM_PREMATURE_CLOSE' !== t.code) { - var e = r[a]; - return null !== e && ((r[f] = null), (r[s] = null), (r[a] = null), e(t)), void (r[h] = t); - } - var i = r[s]; - null !== i && ((r[f] = null), (r[s] = null), (r[a] = null), i(d(void 0, !0))), (r[u] = !0); - }), - t.on('readable', m.bind(null, r)), - r - ); - }; - }, - 3667: (t, e, r) => { - 'use strict'; - function i(t, e) { - var r = Object.keys(t); - if (Object.getOwnPropertySymbols) { - var i = Object.getOwnPropertySymbols(t); - e && - (i = i.filter(function (e) { - return Object.getOwnPropertyDescriptor(t, e).enumerable; - })), - r.push.apply(r, i); - } - return r; - } - function n(t) { - for (var e = 1; e < arguments.length; e++) { - var r = null != arguments[e] ? arguments[e] : {}; - e % 2 - ? i(Object(r), !0).forEach(function (e) { - o(t, e, r[e]); - }) - : Object.getOwnPropertyDescriptors - ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) - : i(Object(r)).forEach(function (e) { - Object.defineProperty(t, e, Object.getOwnPropertyDescriptor(r, e)); - }); - } - return t; - } - function o(t, e, r) { - return ( - (e = a(e)) in t ? Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : (t[e] = r), t - ); - } - function s(t, e) { - for (var r = 0; r < e.length; r++) { - var i = e[r]; - (i.enumerable = i.enumerable || !1), - (i.configurable = !0), - 'value' in i && (i.writable = !0), - Object.defineProperty(t, a(i.key), i); - } - } - function a(t) { - var e = (function (t, e) { - if ('object' != typeof t || null === t) return t; - var r = t[Symbol.toPrimitive]; - if (void 0 !== r) { - var i = r.call(t, 'string'); - if ('object' != typeof i) return i; - throw new TypeError('@@toPrimitive must return a primitive value.'); - } - return String(t); - })(t); - return 'symbol' == typeof e ? e : String(e); - } - var h = r(816).Buffer, - u = r(3927).inspect, - f = (u && u.custom) || 'inspect'; - t.exports = (function () { - function t() { - !(function (t, e) { - if (!(t instanceof e)) throw new TypeError('Cannot call a class as a function'); - })(this, t), - (this.head = null), - (this.tail = null), - (this.length = 0); - } - var e, r; - return ( - (e = t), - (r = [ - { - key: 'push', - value: function (t) { - var e = { data: t, next: null }; - this.length > 0 ? (this.tail.next = e) : (this.head = e), (this.tail = e), ++this.length; - }, - }, - { - key: 'unshift', - value: function (t) { - var e = { data: t, next: this.head }; - 0 === this.length && (this.tail = e), (this.head = e), ++this.length; - }, - }, - { - key: 'shift', - value: function () { - if (0 !== this.length) { - var t = this.head.data; - return 1 === this.length ? (this.head = this.tail = null) : (this.head = this.head.next), --this.length, t; - } - }, - }, - { - key: 'clear', - value: function () { - (this.head = this.tail = null), (this.length = 0); - }, - }, - { - key: 'join', - value: function (t) { - if (0 === this.length) return ''; - for (var e = this.head, r = '' + e.data; (e = e.next); ) r += t + e.data; - return r; - }, - }, - { - key: 'concat', - value: function (t) { - if (0 === this.length) return h.alloc(0); - for (var e, r, i, n = h.allocUnsafe(t >>> 0), o = this.head, s = 0; o; ) - (e = o.data), (r = n), (i = s), h.prototype.copy.call(e, r, i), (s += o.data.length), (o = o.next); - return n; - }, - }, - { - key: 'consume', - value: function (t, e) { - var r; - return ( - t < this.head.data.length - ? ((r = this.head.data.slice(0, t)), (this.head.data = this.head.data.slice(t))) - : (r = t === this.head.data.length ? this.shift() : e ? this._getString(t) : this._getBuffer(t)), - r - ); - }, - }, - { - key: 'first', - value: function () { - return this.head.data; - }, - }, - { - key: '_getString', - value: function (t) { - var e = this.head, - r = 1, - i = e.data; - for (t -= i.length; (e = e.next); ) { - var n = e.data, - o = t > n.length ? n.length : t; - if ((o === n.length ? (i += n) : (i += n.slice(0, t)), 0 == (t -= o))) { - o === n.length - ? (++r, e.next ? (this.head = e.next) : (this.head = this.tail = null)) - : ((this.head = e), (e.data = n.slice(o))); - break; - } - ++r; - } - return (this.length -= r), i; - }, - }, - { - key: '_getBuffer', - value: function (t) { - var e = h.allocUnsafe(t), - r = this.head, - i = 1; - for (r.data.copy(e), t -= r.data.length; (r = r.next); ) { - var n = r.data, - o = t > n.length ? n.length : t; - if ((n.copy(e, e.length - t, 0, o), 0 == (t -= o))) { - o === n.length - ? (++i, r.next ? (this.head = r.next) : (this.head = this.tail = null)) - : ((this.head = r), (r.data = n.slice(o))); - break; - } - ++i; - } - return (this.length -= i), e; - }, - }, - { - key: f, - value: function (t, e) { - return u(this, n(n({}, e), {}, { depth: 0, customInspect: !1 })); - }, - }, - ]) && s(e.prototype, r), - Object.defineProperty(e, 'prototype', { writable: !1 }), - t - ); - })(); - }, - 4382: t => { - 'use strict'; - function e(t, e) { - i(t, e), r(t); - } - function r(t) { - (t._writableState && !t._writableState.emitClose) || (t._readableState && !t._readableState.emitClose) || t.emit('close'); - } - function i(t, e) { - t.emit('error', e); - } - t.exports = { - destroy: function (t, n) { - var o = this, - s = this._readableState && this._readableState.destroyed, - a = this._writableState && this._writableState.destroyed; - return s || a - ? (n - ? n(t) - : t && - (this._writableState - ? this._writableState.errorEmitted || ((this._writableState.errorEmitted = !0), process.nextTick(i, this, t)) - : process.nextTick(i, this, t)), - this) - : (this._readableState && (this._readableState.destroyed = !0), - this._writableState && (this._writableState.destroyed = !0), - this._destroy(t || null, function (t) { - !n && t - ? o._writableState - ? o._writableState.errorEmitted - ? process.nextTick(r, o) - : ((o._writableState.errorEmitted = !0), process.nextTick(e, o, t)) - : process.nextTick(e, o, t) - : n - ? (process.nextTick(r, o), n(t)) - : process.nextTick(r, o); - }), - this); - }, - undestroy: function () { - this._readableState && - ((this._readableState.destroyed = !1), - (this._readableState.reading = !1), - (this._readableState.ended = !1), - (this._readableState.endEmitted = !1)), - this._writableState && - ((this._writableState.destroyed = !1), - (this._writableState.ended = !1), - (this._writableState.ending = !1), - (this._writableState.finalCalled = !1), - (this._writableState.prefinished = !1), - (this._writableState.finished = !1), - (this._writableState.errorEmitted = !1)); - }, - errorOrDestroy: function (t, e) { - var r = t._readableState, - i = t._writableState; - (r && r.autoDestroy) || (i && i.autoDestroy) ? t.destroy(e) : t.emit('error', e); - }, - }; - }, - 1791: (t, e, r) => { - 'use strict'; - var i = r(5319).q.ERR_STREAM_PREMATURE_CLOSE; - function n() {} - t.exports = function t(e, r, o) { - if ('function' == typeof r) return t(e, null, r); - r || (r = {}), - (o = (function (t) { - var e = !1; - return function () { - if (!e) { - e = !0; - for (var r = arguments.length, i = new Array(r), n = 0; n < r; n++) i[n] = arguments[n]; - t.apply(this, i); - } - }; - })(o || n)); - var s = r.readable || (!1 !== r.readable && e.readable), - a = r.writable || (!1 !== r.writable && e.writable), - h = function () { - e.writable || f(); - }, - u = e._writableState && e._writableState.finished, - f = function () { - (a = !1), (u = !0), s || o.call(e); - }, - c = e._readableState && e._readableState.endEmitted, - l = function () { - (s = !1), (c = !0), a || o.call(e); - }, - d = function (t) { - o.call(e, t); - }, - p = function () { - var t; - return s && !c - ? ((e._readableState && e._readableState.ended) || (t = new i()), o.call(e, t)) - : a && !u - ? ((e._writableState && e._writableState.ended) || (t = new i()), o.call(e, t)) - : void 0; - }, - m = function () { - e.req.on('finish', f); - }; - return ( - (function (t) { - return t.setHeader && 'function' == typeof t.abort; - })(e) - ? (e.on('complete', f), e.on('abort', p), e.req ? m() : e.on('request', m)) - : a && !e._writableState && (e.on('end', h), e.on('close', h)), - e.on('end', l), - e.on('finish', f), - !1 !== r.error && e.on('error', d), - e.on('close', p), - function () { - e.removeListener('complete', f), - e.removeListener('abort', p), - e.removeListener('request', m), - e.req && e.req.removeListener('finish', f), - e.removeListener('end', h), - e.removeListener('close', h), - e.removeListener('finish', f), - e.removeListener('end', l), - e.removeListener('error', d), - e.removeListener('close', p); - } - ); - }; - }, - 2867: t => { - t.exports = function () { - throw new Error('Readable.from is not available in the browser'); - }; - }, - 4297: (t, e, r) => { - 'use strict'; - var i, - n = r(5319).q, - o = n.ERR_MISSING_ARGS, - s = n.ERR_STREAM_DESTROYED; - function a(t) { - if (t) throw t; - } - function h(t) { - t(); - } - function u(t, e) { - return t.pipe(e); - } - t.exports = function () { - for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++) e[n] = arguments[n]; - var f, - c = (function (t) { - return t.length ? ('function' != typeof t[t.length - 1] ? a : t.pop()) : a; - })(e); - if ((Array.isArray(e[0]) && (e = e[0]), e.length < 2)) throw new o('streams'); - var l = e.map(function (t, n) { - var o = n < e.length - 1; - return (function (t, e, n, o) { - o = (function (t) { - var e = !1; - return function () { - e || ((e = !0), t.apply(void 0, arguments)); - }; - })(o); - var a = !1; - t.on('close', function () { - a = !0; - }), - void 0 === i && (i = r(1791)), - i(t, { readable: e, writable: n }, function (t) { - if (t) return o(t); - (a = !0), o(); - }); - var h = !1; - return function (e) { - if (!a && !h) - return ( - (h = !0), - (function (t) { - return t.setHeader && 'function' == typeof t.abort; - })(t) - ? t.abort() - : 'function' == typeof t.destroy - ? t.destroy() - : void o(e || new s('pipe')) - ); - }; - })(t, o, n > 0, function (t) { - f || (f = t), t && l.forEach(h), o || (l.forEach(h), c(f)); - }); - }); - return e.reduce(u); - }; - }, - 9693: (t, e, r) => { - 'use strict'; - var i = r(5319).q.ERR_INVALID_OPT_VALUE; - t.exports = { - getHighWaterMark: function (t, e, r, n) { - var o = (function (t, e, r) { - return null != t.highWaterMark ? t.highWaterMark : e ? t[r] : null; - })(e, n, r); - if (null != o) { - if (!isFinite(o) || Math.floor(o) !== o || o < 0) throw new i(n ? r : 'highWaterMark', o); - return Math.floor(o); - } - return t.objectMode ? 16 : 16384; - }, - }; - }, - 801: (t, e, r) => { - t.exports = r(343).EventEmitter; - }, - 4361: (t, e, r) => { - 'use strict'; - var i = r(7172).Buffer, - n = - i.isEncoding || - function (t) { - switch ((t = '' + t) && t.toLowerCase()) { - case 'hex': - case 'utf8': - case 'utf-8': - case 'ascii': - case 'binary': - case 'base64': - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - case 'raw': - return !0; - default: - return !1; - } - }; - function o(t) { - var e; - switch ( - ((this.encoding = (function (t) { - var e = (function (t) { - if (!t) return 'utf8'; - for (var e; ; ) - switch (t) { - case 'utf8': - case 'utf-8': - return 'utf8'; - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return 'utf16le'; - case 'latin1': - case 'binary': - return 'latin1'; - case 'base64': - case 'ascii': - case 'hex': - return t; - default: - if (e) return; - (t = ('' + t).toLowerCase()), (e = !0); - } - })(t); - if ('string' != typeof e && (i.isEncoding === n || !n(t))) throw new Error('Unknown encoding: ' + t); - return e || t; - })(t)), - this.encoding) - ) { - case 'utf16le': - (this.text = h), (this.end = u), (e = 4); - break; - case 'utf8': - (this.fillLast = a), (e = 4); - break; - case 'base64': - (this.text = f), (this.end = c), (e = 3); - break; - default: - return (this.write = l), void (this.end = d); - } - (this.lastNeed = 0), (this.lastTotal = 0), (this.lastChar = i.allocUnsafe(e)); - } - function s(t) { - return t <= 127 ? 0 : t >> 5 == 6 ? 2 : t >> 4 == 14 ? 3 : t >> 3 == 30 ? 4 : t >> 6 == 2 ? -1 : -2; - } - function a(t) { - var e = this.lastTotal - this.lastNeed, - r = (function (t, e, r) { - if (128 != (192 & e[0])) return (t.lastNeed = 0), '�'; - if (t.lastNeed > 1 && e.length > 1) { - if (128 != (192 & e[1])) return (t.lastNeed = 1), '�'; - if (t.lastNeed > 2 && e.length > 2 && 128 != (192 & e[2])) return (t.lastNeed = 2), '�'; - } - })(this, t); - return void 0 !== r - ? r - : this.lastNeed <= t.length - ? (t.copy(this.lastChar, e, 0, this.lastNeed), this.lastChar.toString(this.encoding, 0, this.lastTotal)) - : (t.copy(this.lastChar, e, 0, t.length), void (this.lastNeed -= t.length)); - } - function h(t, e) { - if ((t.length - e) % 2 == 0) { - var r = t.toString('utf16le', e); - if (r) { - var i = r.charCodeAt(r.length - 1); - if (i >= 55296 && i <= 56319) - return ( - (this.lastNeed = 2), - (this.lastTotal = 4), - (this.lastChar[0] = t[t.length - 2]), - (this.lastChar[1] = t[t.length - 1]), - r.slice(0, -1) - ); - } - return r; - } - return (this.lastNeed = 1), (this.lastTotal = 2), (this.lastChar[0] = t[t.length - 1]), t.toString('utf16le', e, t.length - 1); - } - function u(t) { - var e = t && t.length ? this.write(t) : ''; - if (this.lastNeed) { - var r = this.lastTotal - this.lastNeed; - return e + this.lastChar.toString('utf16le', 0, r); - } - return e; - } - function f(t, e) { - var r = (t.length - e) % 3; - return 0 === r - ? t.toString('base64', e) - : ((this.lastNeed = 3 - r), - (this.lastTotal = 3), - 1 === r ? (this.lastChar[0] = t[t.length - 1]) : ((this.lastChar[0] = t[t.length - 2]), (this.lastChar[1] = t[t.length - 1])), - t.toString('base64', e, t.length - r)); - } - function c(t) { - var e = t && t.length ? this.write(t) : ''; - return this.lastNeed ? e + this.lastChar.toString('base64', 0, 3 - this.lastNeed) : e; - } - function l(t) { - return t.toString(this.encoding); - } - function d(t) { - return t && t.length ? this.write(t) : ''; - } - (e.s = o), - (o.prototype.write = function (t) { - if (0 === t.length) return ''; - var e, r; - if (this.lastNeed) { - if (void 0 === (e = this.fillLast(t))) return ''; - (r = this.lastNeed), (this.lastNeed = 0); - } else r = 0; - return r < t.length ? (e ? e + this.text(t, r) : this.text(t, r)) : e || ''; - }), - (o.prototype.end = function (t) { - var e = t && t.length ? this.write(t) : ''; - return this.lastNeed ? e + '�' : e; - }), - (o.prototype.text = function (t, e) { - var r = (function (t, e, r) { - var i = e.length - 1; - if (i < r) return 0; - var n = s(e[i]); - return n >= 0 - ? (n > 0 && (t.lastNeed = n - 1), n) - : --i < r || -2 === n - ? 0 - : (n = s(e[i])) >= 0 - ? (n > 0 && (t.lastNeed = n - 2), n) - : --i < r || -2 === n - ? 0 - : (n = s(e[i])) >= 0 - ? (n > 0 && (2 === n ? (n = 0) : (t.lastNeed = n - 3)), n) - : 0; - })(this, t, e); - if (!this.lastNeed) return t.toString('utf8', e); - this.lastTotal = r; - var i = t.length - (r - this.lastNeed); - return t.copy(this.lastChar, 0, i), t.toString('utf8', e, i); - }), - (o.prototype.fillLast = function (t) { - if (this.lastNeed <= t.length) - return ( - t.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed), - this.lastChar.toString(this.encoding, 0, this.lastTotal) - ); - t.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, t.length), (this.lastNeed -= t.length); - }); - }, - 7451: (t, e, r) => { - function i(t) { - try { - if (!r.g.localStorage) return !1; - } catch (t) { - return !1; - } - var e = r.g.localStorage[t]; - return null != e && 'true' === String(e).toLowerCase(); - } - t.exports = function (t, e) { - if (i('noDeprecation')) return t; - var r = !1; - return function () { - if (!r) { - if (i('throwDeprecation')) throw new Error(e); - i('traceDeprecation') ? console.trace(e) : console.warn(e), (r = !0); - } - return t.apply(this, arguments); - }; - }; - }, - 5507: (t, e) => { - 'use strict'; - function r(t) { - if (Array.isArray(t)) { - const e = []; - let i = 0; - for (let n = 0; n < t.length; n++) { - const o = r(t[n]); - e.push(o), (i += o.length); - } - return l(o(i, 192), ...e); - } - const e = g(t); - return 1 === e.length && e[0] < 128 ? e : l(o(e.length, 128), e); - } - function i(t, e, r) { - if (r > t.length) throw new Error('invalid RLP (safeSlice): end slice of Uint8Array out-of-bounds'); - return t.slice(e, r); - } - function n(t) { - if (0 === t[0]) throw new Error('invalid RLP: extra zeros'); - return f(u(t)); - } - function o(t, e) { - if (t < 56) return Uint8Array.from([t + e]); - const r = p(t), - i = p(e + 55 + r.length / 2); - return Uint8Array.from(c(i + r)); - } - function s(t, e = !1) { - if (null == t || 0 === t.length) return Uint8Array.from([]); - const r = a(g(t)); - if (e) return r; - if (0 !== r.remainder.length) throw new Error('invalid RLP: remainder must be zero'); - return r.data; - } - function a(t) { - let e, r, o, s, h; - const u = [], - f = t[0]; - if (f <= 127) return { data: t.slice(0, 1), remainder: t.slice(1) }; - if (f <= 183) { - if (((e = f - 127), (o = 128 === f ? Uint8Array.from([]) : i(t, 1, e)), 2 === e && o[0] < 128)) - throw new Error('invalid RLP encoding: invalid prefix, single byte < 0x80 are not prefixed'); - return { data: o, remainder: t.slice(e) }; - } - if (f <= 191) { - if (((r = f - 182), t.length - 1 < r)) throw new Error('invalid RLP: not enough bytes for string length'); - if (((e = n(i(t, 1, r))), e <= 55)) throw new Error('invalid RLP: expected string length to be greater than 55'); - return (o = i(t, r, e + r)), { data: o, remainder: t.slice(e + r) }; - } - if (f <= 247) { - for (e = f - 191, s = i(t, 1, e); s.length; ) (h = a(s)), u.push(h.data), (s = h.remainder); - return { data: u, remainder: t.slice(e) }; - } - { - if (((r = f - 246), (e = n(i(t, 1, r))), e < 56)) throw new Error('invalid RLP: encoded list too short'); - const o = r + e; - if (o > t.length) throw new Error('invalid RLP: total length is larger than the data'); - for (s = i(t, r, o); s.length; ) (h = a(s)), u.push(h.data), (s = h.remainder); - return { data: u, remainder: t.slice(o) }; - } - } - Object.defineProperty(e, '__esModule', { value: !0 }), - (e.RLP = e.utils = e.decode = e.encode = void 0), - (e.encode = r), - (e.decode = s); - const h = Array.from({ length: 256 }, (t, e) => e.toString(16).padStart(2, '0')); - function u(t) { - let e = ''; - for (let r = 0; r < t.length; r++) e += h[t[r]]; - return e; - } - function f(t) { - const e = Number.parseInt(t, 16); - if (Number.isNaN(e)) throw new Error('Invalid byte sequence'); - return e; - } - function c(t) { - if ('string' != typeof t) throw new TypeError('hexToBytes: expected string, got ' + typeof t); - if (t.length % 2) throw new Error('hexToBytes: received invalid unpadded hex'); - const e = new Uint8Array(t.length / 2); - for (let r = 0; r < e.length; r++) { - const i = 2 * r; - e[r] = f(t.slice(i, i + 2)); - } - return e; - } - function l(...t) { - if (1 === t.length) return t[0]; - const e = t.reduce((t, e) => t + e.length, 0), - r = new Uint8Array(e); - for (let e = 0, i = 0; e < t.length; e++) { - const n = t[e]; - r.set(n, i), (i += n.length); - } - return r; - } - function d(t) { - return new TextEncoder().encode(t); - } - function p(t) { - if (t < 0) throw new Error('Invalid integer as argument, must be unsigned!'); - const e = t.toString(16); - return e.length % 2 ? `0${e}` : e; - } - function m(t) { - return t.length >= 2 && '0' === t[0] && 'x' === t[1]; - } - function g(t) { - if (t instanceof Uint8Array) return t; - if ('string' == typeof t) - return m(t) ? c((e = 'string' != typeof (r = t) ? r : m(r) ? r.slice(2) : r).length % 2 ? `0${e}` : e) : d(t); - var e, r; - if ('number' == typeof t || 'bigint' == typeof t) return t ? c(p(t)) : Uint8Array.from([]); - if (null == t) return Uint8Array.from([]); - throw new Error('toBytes: received unsupported type ' + typeof t); - } - (e.utils = { bytesToHex: u, concatBytes: l, hexToBytes: c, utf8ToBytes: d }), (e.RLP = { encode: r, decode: s }); - }, - 8e3: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), - (e.accountBodyToRLP = - e.accountBodyToSlim = - e.accountBodyFromSlim = - e.isZeroAddress = - e.zeroAddress = - e.importPublic = - e.privateToAddress = - e.privateToPublic = - e.publicToAddress = - e.pubToAddress = - e.isValidPublic = - e.isValidPrivate = - e.generateAddress2 = - e.generateAddress = - e.isValidChecksumAddress = - e.toChecksumAddress = - e.isValidAddress = - e.Account = - void 0); - const i = r(5507), - n = r(1906), - o = r(6579), - s = r(2820), - a = r(8289), - h = r(6219), - u = r(8480), - f = r(4712), - c = BigInt(0); - class l { - constructor(t = c, e = c, r = h.KECCAK256_RLP, i = h.KECCAK256_NULL) { - (this.nonce = t), (this.balance = e), (this.storageRoot = r), (this.codeHash = i), this._validate(); - } - static fromAccountData(t) { - const { nonce: e, balance: r, storageRoot: i, codeHash: n } = t; - return new l( - void 0 !== e ? (0, a.bufferToBigInt)((0, a.toBuffer)(e)) : void 0, - void 0 !== r ? (0, a.bufferToBigInt)((0, a.toBuffer)(r)) : void 0, - void 0 !== i ? (0, a.toBuffer)(i) : void 0, - void 0 !== n ? (0, a.toBuffer)(n) : void 0 - ); - } - static fromRlpSerializedAccount(t) { - const e = (0, a.arrToBufArr)(i.RLP.decode(Uint8Array.from(t))); - if (!Array.isArray(e)) throw new Error('Invalid serialized account input. Must be array'); - return this.fromValuesArray(e); - } - static fromValuesArray(t) { - const [e, r, i, n] = t; - return new l((0, a.bufferToBigInt)(e), (0, a.bufferToBigInt)(r), i, n); - } - _validate() { - if (this.nonce < c) throw new Error('nonce must be greater than zero'); - if (this.balance < c) throw new Error('balance must be greater than zero'); - if (32 !== this.storageRoot.length) throw new Error('storageRoot must have a length of 32'); - if (32 !== this.codeHash.length) throw new Error('codeHash must have a length of 32'); - } - raw() { - return [ - (0, a.bigIntToUnpaddedBuffer)(this.nonce), - (0, a.bigIntToUnpaddedBuffer)(this.balance), - this.storageRoot, - this.codeHash, - ]; - } - serialize() { - return Buffer.from(i.RLP.encode((0, a.bufArrToArr)(this.raw()))); - } - isContract() { - return !this.codeHash.equals(h.KECCAK256_NULL); - } - isEmpty() { - return this.balance === c && this.nonce === c && this.codeHash.equals(h.KECCAK256_NULL); - } - } - function d(t) { - const [e, r, i, n] = t; - return [ - e, - r, - 0 === (0, a.arrToBufArr)(i).length ? h.KECCAK256_RLP : i, - 0 === (0, a.arrToBufArr)(n).length ? h.KECCAK256_NULL : n, - ]; - } - (e.Account = l), - (e.isValidAddress = function (t) { - try { - (0, u.assertIsString)(t); - } catch (t) { - return !1; - } - return /^0x[0-9a-fA-F]{40}$/.test(t); - }), - (e.toChecksumAddress = function (t, e) { - (0, u.assertIsHexString)(t); - const r = (0, f.stripHexPrefix)(t).toLowerCase(); - let i = ''; - void 0 !== e && (i = (0, a.bufferToBigInt)((0, a.toBuffer)(e)).toString() + '0x'); - const o = Buffer.from(i + r, 'utf8'), - h = (0, s.bytesToHex)((0, n.keccak256)(o)); - let c = '0x'; - for (let t = 0; t < r.length; t++) parseInt(h[t], 16) >= 8 ? (c += r[t].toUpperCase()) : (c += r[t]); - return c; - }), - (e.isValidChecksumAddress = function (t, r) { - return (0, e.isValidAddress)(t) && (0, e.toChecksumAddress)(t, r) === t; - }), - (e.generateAddress = function (t, e) { - return ( - (0, u.assertIsBuffer)(t), - (0, u.assertIsBuffer)(e), - (0, a.bufferToBigInt)(e) === BigInt(0) - ? Buffer.from((0, n.keccak256)(i.RLP.encode((0, a.bufArrToArr)([t, null])))).slice(-20) - : Buffer.from((0, n.keccak256)(i.RLP.encode((0, a.bufArrToArr)([t, e])))).slice(-20) - ); - }), - (e.generateAddress2 = function (t, e, r) { - if (((0, u.assertIsBuffer)(t), (0, u.assertIsBuffer)(e), (0, u.assertIsBuffer)(r), 20 !== t.length)) - throw new Error('Expected from to be of length 20'); - if (32 !== e.length) throw new Error('Expected salt to be of length 32'); - const i = (0, n.keccak256)(Buffer.concat([Buffer.from('ff', 'hex'), t, e, (0, n.keccak256)(r)])); - return (0, a.toBuffer)(i).slice(-20); - }), - (e.isValidPrivate = function (t) { - return o.secp256k1.utils.isValidPrivateKey(t); - }), - (e.isValidPublic = function (t, e = !1) { - if (((0, u.assertIsBuffer)(t), 64 === t.length)) - try { - return o.secp256k1.ProjectivePoint.fromHex(Buffer.concat([Buffer.from([4]), t])), !0; - } catch (t) { - return !1; - } - if (!e) return !1; - try { - return o.secp256k1.ProjectivePoint.fromHex(t), !0; - } catch (t) { - return !1; - } - }), - (e.pubToAddress = function (t, e = !1) { - if ( - ((0, u.assertIsBuffer)(t), - e && 64 !== t.length && (t = Buffer.from(o.secp256k1.ProjectivePoint.fromHex(t).toRawBytes(!1).slice(1))), - 64 !== t.length) - ) - throw new Error('Expected pubKey to be of length 64'); - return Buffer.from((0, n.keccak256)(t)).slice(-20); - }), - (e.publicToAddress = e.pubToAddress), - (e.privateToPublic = function (t) { - return (0, u.assertIsBuffer)(t), Buffer.from(o.secp256k1.ProjectivePoint.fromPrivateKey(t).toRawBytes(!1).slice(1)); - }), - (e.privateToAddress = function (t) { - return (0, e.publicToAddress)((0, e.privateToPublic)(t)); - }), - (e.importPublic = function (t) { - return ( - (0, u.assertIsBuffer)(t), - 64 !== t.length && (t = Buffer.from(o.secp256k1.ProjectivePoint.fromHex(t).toRawBytes(!1).slice(1))), - t - ); - }), - (e.zeroAddress = function () { - const t = (0, a.zeros)(20); - return (0, a.bufferToHex)(t); - }), - (e.isZeroAddress = function (t) { - try { - (0, u.assertIsString)(t); - } catch (t) { - return !1; - } - return (0, e.zeroAddress)() === t; - }), - (e.accountBodyFromSlim = d); - const p = new Uint8Array(0); - (e.accountBodyToSlim = function (t) { - const [e, r, i, n] = t; - return [e, r, (0, a.arrToBufArr)(i).equals(h.KECCAK256_RLP) ? p : i, (0, a.arrToBufArr)(n).equals(h.KECCAK256_NULL) ? p : n]; - }), - (e.accountBodyToRLP = function (t, e = !0) { - const r = e ? d(t) : t; - return (0, a.arrToBufArr)(i.RLP.encode(r)); - }); - }, - 3415: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), (e.Address = void 0); - const i = r(8e3), - n = r(8289); - class o { - constructor(t) { - if (20 !== t.length) throw new Error('Invalid address length'); - this.buf = t; - } - static zero() { - return new o((0, n.zeros)(20)); - } - static fromString(t) { - if (!(0, i.isValidAddress)(t)) throw new Error('Invalid address'); - return new o((0, n.toBuffer)(t)); - } - static fromPublicKey(t) { - if (!Buffer.isBuffer(t)) throw new Error('Public key should be Buffer'); - const e = (0, i.pubToAddress)(t); - return new o(e); - } - static fromPrivateKey(t) { - if (!Buffer.isBuffer(t)) throw new Error('Private key should be Buffer'); - const e = (0, i.privateToAddress)(t); - return new o(e); - } - static generate(t, e) { - if ('bigint' != typeof e) throw new Error('Expected nonce to be a bigint'); - return new o((0, i.generateAddress)(t.buf, (0, n.bigIntToBuffer)(e))); - } - static generate2(t, e, r) { - if (!Buffer.isBuffer(e)) throw new Error('Expected salt to be a Buffer'); - if (!Buffer.isBuffer(r)) throw new Error('Expected initCode to be a Buffer'); - return new o((0, i.generateAddress2)(t.buf, e, r)); - } - equals(t) { - return this.buf.equals(t.buf); - } - isZero() { - return this.equals(o.zero()); - } - isPrecompileOrSystemAddress() { - const t = (0, n.bufferToBigInt)(this.buf), - e = BigInt(0), - r = BigInt('0xffff'); - return t >= e && t <= r; - } - toString() { - return '0x' + this.buf.toString('hex'); - } - toBuffer() { - return Buffer.from(this.buf); - } - } - e.Address = o; - }, - 7285: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), (e.AsyncEventEmitter = void 0); - const i = r(7187); - class n extends i.EventEmitter { - emit(t, ...e) { - let [r, i] = e; - const n = this; - let o = n._events[t] ?? []; - return ( - void 0 === i && 'function' == typeof r && ((i = r), (r = void 0)), - ('newListener' !== t && 'removeListener' !== t) || ((r = { event: r, fn: i }), (i = void 0)), - (o = Array.isArray(o) ? o : [o]), - (async function (t, e, r) { - let i; - for await (const n of e) - try { - n.length < 2 - ? n.call(t, r) - : await new Promise((e, i) => { - n.call(t, r, t => { - t ? i(t) : e(); - }); - }); - } catch (t) { - i = t; - } - if (i) throw i; - })(n, o.slice(), r) - .then(i) - .catch(i), - n.listenerCount(t) > 0 - ); - } - once(t, e) { - const r = this; - let i; - if ('function' != typeof e) throw new TypeError('listener must be a function'); - return ( - (i = - e.length >= 2 - ? function (n, o) { - r.removeListener(t, i), e(n, o); - } - : function (n) { - r.removeListener(t, i), e(n, i); - }), - r.on(t, i), - r - ); - } - first(t, e) { - let r = this._events[t] ?? []; - if ('function' != typeof e) throw new TypeError('listener must be a function'); - return Array.isArray(r) || (this._events[t] = r = [r]), r.unshift(e), this; - } - before(t, e, r) { - return this.beforeOrAfter(t, e, r); - } - after(t, e, r) { - return this.beforeOrAfter(t, e, r, 'after'); - } - beforeOrAfter(t, e, r, i) { - let n, - o, - s = this._events[t] ?? []; - const a = 'after' === i ? 1 : 0; - if ('function' != typeof r) throw new TypeError('listener must be a function'); - if ('function' != typeof e) throw new TypeError('target must be a function'); - for (Array.isArray(s) || (this._events[t] = s = [s]), o = s.length, n = s.length; n--; ) - if (s[n] === e) { - o = n + a; - break; - } - return s.splice(o, 0, r), this; - } - on(t, e) { - return super.on(t, e); - } - addListener(t, e) { - return super.addListener(t, e); - } - prependListener(t, e) { - return super.prependListener(t, e); - } - prependOnceListener(t, e) { - return super.prependOnceListener(t, e); - } - removeAllListeners(t) { - return super.removeAllListeners(t); - } - removeListener(t, e) { - return super.removeListener(t, e); - } - eventNames() { - return super.eventNames(); - } - listeners(t) { - return super.listeners(t); - } - listenerCount(t) { - return super.listenerCount(t); - } - getMaxListeners() { - return super.getMaxListeners(); - } - setMaxListeners(t) { - return super.setMaxListeners(t); - } - } - e.AsyncEventEmitter = n; - }, - 8289: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), - (e.intToUnpaddedBuffer = - e.bigIntToUnpaddedBuffer = - e.bigIntToHex = - e.bufArrToArr = - e.arrToBufArr = - e.validateNoLeadingZeroes = - e.baToJSON = - e.toUtf8 = - e.short = - e.addHexPrefix = - e.toUnsigned = - e.fromSigned = - e.bufferToInt = - e.bigIntToBuffer = - e.bufferToBigInt = - e.bufferToHex = - e.toBuffer = - e.unpadHexString = - e.unpadArray = - e.unpadBuffer = - e.setLengthRight = - e.setLengthLeft = - e.zeros = - e.intToBuffer = - e.intToHex = - void 0); - const i = r(8480), - n = r(4712); - (e.intToHex = function (t) { - if (!Number.isSafeInteger(t) || t < 0) throw new Error(`Received an invalid integer type: ${t}`); - return `0x${t.toString(16)}`; - }), - (e.intToBuffer = function (t) { - const r = (0, e.intToHex)(t); - return Buffer.from((0, n.padToEven)(r.slice(2)), 'hex'); - }), - (e.zeros = function (t) { - return Buffer.allocUnsafe(t).fill(0); - }); - const o = function (t, r, i) { - const n = (0, e.zeros)(r); - return i ? (t.length < r ? (t.copy(n), n) : t.slice(0, r)) : t.length < r ? (t.copy(n, r - t.length), n) : t.slice(-r); - }; - (e.setLengthLeft = function (t, e) { - return (0, i.assertIsBuffer)(t), o(t, e, !1); - }), - (e.setLengthRight = function (t, e) { - return (0, i.assertIsBuffer)(t), o(t, e, !0); - }); - const s = function (t) { - let e = t[0]; - for (; t.length > 0 && '0' === e.toString(); ) e = (t = t.slice(1))[0]; - return t; - }; - function a(t) { - const r = (0, e.bufferToHex)(t); - return '0x' === r ? BigInt(0) : BigInt(r); - } - function h(t) { - return (0, e.toBuffer)('0x' + t.toString(16)); - } - (e.unpadBuffer = function (t) { - return (0, i.assertIsBuffer)(t), s(t); - }), - (e.unpadArray = function (t) { - return (0, i.assertIsArray)(t), s(t); - }), - (e.unpadHexString = function (t) { - return (0, i.assertIsHexString)(t), (t = (0, n.stripHexPrefix)(t)), '0x' + s(t); - }), - (e.toBuffer = function (t) { - if (null == t) return Buffer.allocUnsafe(0); - if (Buffer.isBuffer(t)) return Buffer.from(t); - if (Array.isArray(t) || t instanceof Uint8Array) return Buffer.from(t); - if ('string' == typeof t) { - if (!(0, n.isHexString)(t)) - throw new Error( - `Cannot convert string to buffer. toBuffer only supports 0x-prefixed hex strings and this string was given: ${t}` - ); - return Buffer.from((0, n.padToEven)((0, n.stripHexPrefix)(t)), 'hex'); - } - if ('number' == typeof t) return (0, e.intToBuffer)(t); - if ('bigint' == typeof t) { - if (t < BigInt(0)) throw new Error(`Cannot convert negative bigint to buffer. Given: ${t}`); - let e = t.toString(16); - return e.length % 2 && (e = '0' + e), Buffer.from(e, 'hex'); - } - if (t.toArray) return Buffer.from(t.toArray()); - if (t.toBuffer) return Buffer.from(t.toBuffer()); - throw new Error('invalid type'); - }), - (e.bufferToHex = function (t) { - return '0x' + (t = (0, e.toBuffer)(t)).toString('hex'); - }), - (e.bufferToBigInt = a), - (e.bigIntToBuffer = h), - (e.bufferToInt = function (t) { - const e = Number(a(t)); - if (!Number.isSafeInteger(e)) throw new Error('Number exceeds 53 bits'); - return e; - }), - (e.fromSigned = function (t) { - return BigInt.asIntN(256, a(t)); - }), - (e.toUnsigned = function (t) { - return h(BigInt.asUintN(256, t)); - }), - (e.addHexPrefix = function (t) { - return 'string' != typeof t || (0, n.isHexPrefixed)(t) ? t : '0x' + t; - }), - (e.short = function (t, e = 50) { - const r = Buffer.isBuffer(t) ? t.toString('hex') : t; - return r.length <= e ? r : r.slice(0, e) + '…'; - }), - (e.toUtf8 = function (t) { - if ((t = (0, n.stripHexPrefix)(t)).length % 2 != 0) throw new Error('Invalid non-even hex string input for toUtf8() provided'); - return Buffer.from(t.replace(/^(00)+|(00)+$/g, ''), 'hex').toString('utf8'); - }), - (e.baToJSON = function (t) { - if (Buffer.isBuffer(t)) return `0x${t.toString('hex')}`; - if (t instanceof Array) { - const r = []; - for (let i = 0; i < t.length; i++) r.push((0, e.baToJSON)(t[i])); - return r; - } - }), - (e.validateNoLeadingZeroes = function (t) { - for (const [e, r] of Object.entries(t)) - if (void 0 !== r && r.length > 0 && 0 === r[0]) - throw new Error(`${e} cannot have leading zeroes, received: ${r.toString('hex')}`); - }), - (e.arrToBufArr = function t(e) { - return Array.isArray(e) ? e.map(e => t(e)) : Buffer.from(e); - }), - (e.bufArrToArr = function t(e) { - return Array.isArray(e) ? e.map(e => t(e)) : Uint8Array.from(e ?? []); - }), - (e.bigIntToHex = t => '0x' + t.toString(16)), - (e.bigIntToUnpaddedBuffer = function (t) { - return (0, e.unpadBuffer)(h(t)); - }), - (e.intToUnpaddedBuffer = function (t) { - return (0, e.unpadBuffer)((0, e.intToBuffer)(t)); - }); - }, - 6219: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), - (e.MAX_WITHDRAWALS_PER_PAYLOAD = - e.RLP_EMPTY_STRING = - e.KECCAK256_RLP = - e.KECCAK256_RLP_S = - e.KECCAK256_RLP_ARRAY = - e.KECCAK256_RLP_ARRAY_S = - e.KECCAK256_NULL = - e.KECCAK256_NULL_S = - e.TWO_POW256 = - e.SECP256K1_ORDER_DIV_2 = - e.SECP256K1_ORDER = - e.MAX_INTEGER_BIGINT = - e.MAX_INTEGER = - e.MAX_UINT64 = - void 0); - const i = r(8764), - n = r(6579); - (e.MAX_UINT64 = BigInt('0xffffffffffffffff')), - (e.MAX_INTEGER = BigInt('0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff')), - (e.MAX_INTEGER_BIGINT = BigInt('115792089237316195423570985008687907853269984665640564039457584007913129639935')), - (e.SECP256K1_ORDER = n.secp256k1.CURVE.n), - (e.SECP256K1_ORDER_DIV_2 = n.secp256k1.CURVE.n / BigInt(2)), - (e.TWO_POW256 = BigInt('0x10000000000000000000000000000000000000000000000000000000000000000')), - (e.KECCAK256_NULL_S = 'c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470'), - (e.KECCAK256_NULL = i.Buffer.from(e.KECCAK256_NULL_S, 'hex')), - (e.KECCAK256_RLP_ARRAY_S = '1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347'), - (e.KECCAK256_RLP_ARRAY = i.Buffer.from(e.KECCAK256_RLP_ARRAY_S, 'hex')), - (e.KECCAK256_RLP_S = '56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421'), - (e.KECCAK256_RLP = i.Buffer.from(e.KECCAK256_RLP_S, 'hex')), - (e.RLP_EMPTY_STRING = i.Buffer.from([128])), - (e.MAX_WITHDRAWALS_PER_PAYLOAD = 16); - }, - 3791: (t, e) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), - (e.compactBytesToNibbles = e.bytesToNibbles = e.nibblesToCompactBytes = e.nibblesToBytes = e.hasTerminator = void 0), - (e.hasTerminator = t => t.length > 0 && 16 === t[t.length - 1]), - (e.nibblesToBytes = (t, e) => { - for (let r = 0, i = 0; i < t.length; r += 1, i += 2) e[r] = (t[i] << 4) | t[i + 1]; - }), - (e.nibblesToCompactBytes = t => { - let r = 0; - (0, e.hasTerminator)(t) && ((r = 1), (t = t.subarray(0, t.length - 1))); - const i = new Uint8Array(t.length / 2 + 1); - return ( - (i[0] = r << 5), - 1 == (1 & t.length) && ((i[0] |= 16), (i[0] |= t[0]), (t = t.subarray(1))), - (0, e.nibblesToBytes)(t, i.subarray(1)), - i - ); - }), - (e.bytesToNibbles = t => { - const e = 2 * t.length + 1, - r = new Uint8Array(e); - for (let e = 0; e < t.length; e++) { - const i = t[e]; - (r[2 * e] = i / 16), (r[2 * e + 1] = i % 16); - } - return (r[e - 1] = 16), r; - }), - (e.compactBytesToNibbles = t => { - if (0 === t.length) return t; - let r = (0, e.bytesToNibbles)(t); - r[0] < 2 && (r = r.subarray(0, r.length - 1)); - const i = 2 - (1 & r[0]); - return r.subarray(i); - }); - }, - 8480: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), - (e.assertIsString = e.assertIsArray = e.assertIsBuffer = e.assertIsHexString = void 0); - const i = r(4712); - (e.assertIsHexString = function (t) { - if (!(0, i.isHexString)(t)) throw new Error(`This method only supports 0x-prefixed hex strings but input was: ${t}`); - }), - (e.assertIsBuffer = function (t) { - if (!Buffer.isBuffer(t)) throw new Error(`This method only supports Buffer but input was: ${t}`); - }), - (e.assertIsArray = function (t) { - if (!Array.isArray(t)) throw new Error(`This method only supports number arrays but input was: ${t}`); - }), - (e.assertIsString = function (t) { - if ('string' != typeof t) throw new Error(`This method only supports strings but input was: ${t}`); - }); - }, - 2730: function (t, e, r) { - 'use strict'; - var i = - (this && this.__createBinding) || - (Object.create - ? function (t, e, r, i) { - void 0 === i && (i = r); - var n = Object.getOwnPropertyDescriptor(e, r); - (n && !('get' in n ? !e.__esModule : n.writable || n.configurable)) || - (n = { - enumerable: !0, - get: function () { - return e[r]; - }, - }), - Object.defineProperty(t, i, n); - } - : function (t, e, r, i) { - void 0 === i && (i = r), (t[i] = e[r]); - }), - n = - (this && this.__exportStar) || - function (t, e) { - for (var r in t) 'default' === r || Object.prototype.hasOwnProperty.call(e, r) || i(e, t, r); - }; - Object.defineProperty(e, '__esModule', { value: !0 }), - (e.toAscii = - e.stripHexPrefix = - e.padToEven = - e.isHexString = - e.isHexPrefixed = - e.getKeys = - e.getBinarySize = - e.fromUtf8 = - e.fromAscii = - e.arrayContainsArray = - void 0), - n(r(6219), e), - n(r(4554), e), - n(r(8e3), e), - n(r(3415), e), - n(r(4683), e), - n(r(5026), e), - n(r(8289), e), - n(r(1200), e), - n(r(3791), e), - n(r(7285), e); - var o = r(4712); - Object.defineProperty(e, 'arrayContainsArray', { - enumerable: !0, - get: function () { - return o.arrayContainsArray; - }, - }), - Object.defineProperty(e, 'fromAscii', { - enumerable: !0, - get: function () { - return o.fromAscii; - }, - }), - Object.defineProperty(e, 'fromUtf8', { - enumerable: !0, - get: function () { - return o.fromUtf8; - }, - }), - Object.defineProperty(e, 'getBinarySize', { - enumerable: !0, - get: function () { - return o.getBinarySize; - }, - }), - Object.defineProperty(e, 'getKeys', { - enumerable: !0, - get: function () { - return o.getKeys; - }, - }), - Object.defineProperty(e, 'isHexPrefixed', { - enumerable: !0, - get: function () { - return o.isHexPrefixed; - }, - }), - Object.defineProperty(e, 'isHexString', { - enumerable: !0, - get: function () { - return o.isHexString; - }, - }), - Object.defineProperty(e, 'padToEven', { - enumerable: !0, - get: function () { - return o.padToEven; - }, - }), - Object.defineProperty(e, 'stripHexPrefix', { - enumerable: !0, - get: function () { - return o.stripHexPrefix; - }, - }), - Object.defineProperty(e, 'toAscii', { - enumerable: !0, - get: function () { - return o.toAscii; - }, - }), - n(r(3543), e), - n(r(438), e); - }, - 4712: (t, e) => { - 'use strict'; - function r(t) { - if ('string' != typeof t) throw new Error("[isHexPrefixed] input must be type 'string', received type " + typeof t); - return '0' === t[0] && 'x' === t[1]; - } - function i(t) { - let e = t; - if ('string' != typeof e) throw new Error("[padToEven] value must be type 'string', received " + typeof e); - return e.length % 2 && (e = `0${e}`), e; - } - Object.defineProperty(e, '__esModule', { value: !0 }), - (e.isHexString = - e.getKeys = - e.fromAscii = - e.fromUtf8 = - e.toAscii = - e.arrayContainsArray = - e.getBinarySize = - e.padToEven = - e.stripHexPrefix = - e.isHexPrefixed = - void 0), - (e.isHexPrefixed = r), - (e.stripHexPrefix = t => { - if ('string' != typeof t) throw new Error("[stripHexPrefix] input must be type 'string', received " + typeof t); - return r(t) ? t.slice(2) : t; - }), - (e.padToEven = i), - (e.getBinarySize = function (t) { - if ('string' != typeof t) throw new Error("[getBinarySize] method requires input type 'string', received " + typeof t); - return Buffer.byteLength(t, 'utf8'); - }), - (e.arrayContainsArray = function (t, e, r) { - if (!0 !== Array.isArray(t)) - throw new Error(`[arrayContainsArray] method requires input 'superset' to be an array, got type '${typeof t}'`); - if (!0 !== Array.isArray(e)) - throw new Error(`[arrayContainsArray] method requires input 'subset' to be an array, got type '${typeof e}'`); - return e[!0 === r ? 'some' : 'every'](e => t.indexOf(e) >= 0); - }), - (e.toAscii = function (t) { - let e = '', - r = 0; - const i = t.length; - for ('0x' === t.substring(0, 2) && (r = 2); r < i; r += 2) { - const i = parseInt(t.substr(r, 2), 16); - e += String.fromCharCode(i); - } - return e; - }), - (e.fromUtf8 = function (t) { - return `0x${i(Buffer.from(t, 'utf8').toString('hex')).replace(/^0+|0+$/g, '')}`; - }), - (e.fromAscii = function (t) { - let e = ''; - for (let r = 0; r < t.length; r++) { - const i = t.charCodeAt(r).toString(16); - e += i.length < 2 ? `0${i}` : i; - } - return `0x${e}`; - }), - (e.getKeys = function (t, e, r) { - if (!Array.isArray(t)) throw new Error("[getKeys] method expects input 'params' to be an array, got " + typeof t); - if ('string' != typeof e) throw new Error("[getKeys] method expects input 'key' to be type 'string', got " + typeof t); - const i = []; - for (let n = 0; n < t.length; n++) { - let o = t[n][e]; - if (!0 !== r || o) { - if ('string' != typeof o) throw new Error("invalid abi - expected type 'string', received " + typeof o); - } else o = ''; - i.push(o); - } - return i; - }), - (e.isHexString = function (t, e) { - return !('string' != typeof t || !t.match(/^0x[0-9A-Fa-f]*$/) || (void 0 !== e && e > 0 && t.length !== 2 + 2 * e)); - }); - }, - 3543: (t, e) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), - (e.Lock = void 0), - (e.Lock = class { - constructor() { - (this.permits = 1), (this.promiseResolverQueue = []); - } - async acquire() { - return this.permits > 0 ? ((this.permits -= 1), Promise.resolve(!0)) : new Promise(t => this.promiseResolverQueue.push(t)); - } - release() { - if (((this.permits += 1), this.permits > 1 && this.promiseResolverQueue.length > 0)) - console.warn('Lock.permits should never be > 0 when there is someone waiting.'); - else if (1 === this.permits && this.promiseResolverQueue.length > 0) { - this.permits -= 1; - const t = this.promiseResolverQueue.shift(); - t && t(!0); - } - } - }); - }, - 438: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), (e.getProvider = e.fetchFromProvider = void 0); - const i = r(4898); - (e.fetchFromProvider = async (t, e) => - ( - await (0, i.default)(t, { - headers: { 'content-type': 'application/json' }, - type: 'json', - data: { method: e.method, params: e.params, jsonrpc: '2.0', id: 1 }, - }) - ).result), - (e.getProvider = t => { - if ('string' == typeof t) return t; - if (void 0 !== t?.connection?.url) return t.connection.url; - throw new Error('Must provide valid provider URL or Web3Provider'); - }); - }, - 5026: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), - (e.hashPersonalMessage = e.isValidSignature = e.fromRpcSig = e.toCompactSig = e.toRpcSig = e.ecrecover = e.ecsign = void 0); - const i = r(1906), - n = r(6579), - o = r(8289), - s = r(6219), - a = r(8480); - function h(t, e) { - return t === BigInt(0) || t === BigInt(1) ? t : void 0 === e ? t - BigInt(27) : t - (e * BigInt(2) + BigInt(35)); - } - function u(t) { - return t === BigInt(0) || t === BigInt(1); - } - (e.ecsign = function (t, e, r) { - const i = n.secp256k1.sign(t, e), - o = i.toCompactRawBytes(); - return { - r: Buffer.from(o.slice(0, 32)), - s: Buffer.from(o.slice(32, 64)), - v: void 0 === r ? BigInt(i.recovery + 27) : BigInt(i.recovery + 35) + BigInt(r) * BigInt(2), - }; - }), - (e.ecrecover = function (t, e, r, i, s) { - const a = Buffer.concat([(0, o.setLengthLeft)(r, 32), (0, o.setLengthLeft)(i, 32)], 64), - f = h(e, s); - if (!u(f)) throw new Error('Invalid signature v value'); - const c = n.secp256k1.Signature.fromCompact(a).addRecoveryBit(Number(f)).recoverPublicKey(t); - return Buffer.from(c.toRawBytes(!1).slice(1)); - }), - (e.toRpcSig = function (t, e, r, i) { - if (!u(h(t, i))) throw new Error('Invalid signature v value'); - return (0, o.bufferToHex)(Buffer.concat([(0, o.setLengthLeft)(e, 32), (0, o.setLengthLeft)(r, 32), (0, o.toBuffer)(t)])); - }), - (e.toCompactSig = function (t, e, r, i) { - if (!u(h(t, i))) throw new Error('Invalid signature v value'); - let n = r; - return ( - ((t > BigInt(28) && t % BigInt(2) === BigInt(1)) || t === BigInt(1) || t === BigInt(28)) && - ((n = Buffer.from(r)), (n[0] |= 128)), - (0, o.bufferToHex)(Buffer.concat([(0, o.setLengthLeft)(e, 32), (0, o.setLengthLeft)(n, 32)])) - ); - }), - (e.fromRpcSig = function (t) { - const e = (0, o.toBuffer)(t); - let r, i, n; - if (e.length >= 65) (r = e.slice(0, 32)), (i = e.slice(32, 64)), (n = (0, o.bufferToBigInt)(e.slice(64))); - else { - if (64 !== e.length) throw new Error('Invalid signature length'); - (r = e.slice(0, 32)), (i = e.slice(32, 64)), (n = BigInt((0, o.bufferToInt)(e.slice(32, 33)) >> 7)), (i[0] &= 127); - } - return n < 27 && (n += BigInt(27)), { v: n, r, s: i }; - }), - (e.isValidSignature = function (t, e, r, i = !0, n) { - if (32 !== e.length || 32 !== r.length) return !1; - if (!u(h(t, n))) return !1; - const a = (0, o.bufferToBigInt)(e), - f = (0, o.bufferToBigInt)(r); - return !( - a === BigInt(0) || - a >= s.SECP256K1_ORDER || - f === BigInt(0) || - f >= s.SECP256K1_ORDER || - (i && f >= s.SECP256K1_ORDER_DIV_2) - ); - }), - (e.hashPersonalMessage = function (t) { - (0, a.assertIsBuffer)(t); - const e = Buffer.from(`Ethereum Signed Message:\n${t.length}`, 'utf-8'); - return Buffer.from((0, i.keccak256)(Buffer.concat([e, t]))); - }); - }, - 1200: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), (e.toType = e.TypeOutput = void 0); - const i = r(8289), - n = r(4712); - var o; - !(function (t) { - (t[(t.Number = 0)] = 'Number'), - (t[(t.BigInt = 1)] = 'BigInt'), - (t[(t.Buffer = 2)] = 'Buffer'), - (t[(t.PrefixedHexString = 3)] = 'PrefixedHexString'); - })((o = e.TypeOutput || (e.TypeOutput = {}))), - (e.toType = function (t, e) { - if (null === t) return null; - if (void 0 === t) return; - if ('string' == typeof t && !(0, n.isHexString)(t)) throw new Error(`A string must be provided with a 0x-prefix, given: ${t}`); - if ('number' == typeof t && !Number.isSafeInteger(t)) - throw new Error('The provided number is greater than MAX_SAFE_INTEGER (please use an alternative input type)'); - const r = (0, i.toBuffer)(t); - switch (e) { - case o.Buffer: - return r; - case o.BigInt: - return (0, i.bufferToBigInt)(r); - case o.Number: { - const t = (0, i.bufferToBigInt)(r); - if (t > BigInt(Number.MAX_SAFE_INTEGER)) - throw new Error('The provided number is greater than MAX_SAFE_INTEGER (please use an alternative output type)'); - return Number(t); - } - case o.PrefixedHexString: - return (0, i.bufferToHex)(r); - default: - throw new Error('unknown outputType'); - } - }); - }, - 4554: (t, e) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), (e.GWEI_TO_WEI = void 0), (e.GWEI_TO_WEI = BigInt(1e9)); - }, - 4683: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), (e.Withdrawal = void 0); - const i = r(3415), - n = r(8289), - o = r(1200); - class s { - constructor(t, e, r, i) { - (this.index = t), (this.validatorIndex = e), (this.address = r), (this.amount = i); - } - static fromWithdrawalData(t) { - const { index: e, validatorIndex: r, address: n, amount: a } = t, - h = (0, o.toType)(e, o.TypeOutput.BigInt), - u = (0, o.toType)(r, o.TypeOutput.BigInt), - f = new i.Address((0, o.toType)(n, o.TypeOutput.Buffer)), - c = (0, o.toType)(a, o.TypeOutput.BigInt); - return new s(h, u, f, c); - } - static fromValuesArray(t) { - if (4 !== t.length) throw Error(`Invalid withdrawalArray length expected=4 actual=${t.length}`); - const [e, r, i, n] = t; - return s.fromWithdrawalData({ index: e, validatorIndex: r, address: i, amount: n }); - } - static toBufferArray(t) { - const { index: e, validatorIndex: r, address: n, amount: s } = t, - a = (0, o.toType)(e, o.TypeOutput.BigInt) === BigInt(0) ? Buffer.alloc(0) : (0, o.toType)(e, o.TypeOutput.Buffer), - h = (0, o.toType)(r, o.TypeOutput.BigInt) === BigInt(0) ? Buffer.alloc(0) : (0, o.toType)(r, o.TypeOutput.Buffer); - let u; - return ( - (u = n instanceof i.Address ? n.buf : (0, o.toType)(n, o.TypeOutput.Buffer)), - [a, h, u, (0, o.toType)(s, o.TypeOutput.BigInt) === BigInt(0) ? Buffer.alloc(0) : (0, o.toType)(s, o.TypeOutput.Buffer)] - ); - } - raw() { - return s.toBufferArray(this); - } - toValue() { - return { index: this.index, validatorIndex: this.validatorIndex, address: this.address.buf, amount: this.amount }; - } - toJSON() { - return { - index: (0, n.bigIntToHex)(this.index), - validatorIndex: (0, n.bigIntToHex)(this.validatorIndex), - address: '0x' + this.address.buf.toString('hex'), - amount: (0, n.bigIntToHex)(this.amount), - }; - } - } - e.Withdrawal = s; - }, - 1614: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), (e.createCurve = e.getHash = void 0); - const i = r(9569), - n = r(8089), - o = r(7602); - function s(t) { - return { hash: t, hmac: (e, ...r) => (0, i.hmac)(t, e, (0, n.concatBytes)(...r)), randomBytes: n.randomBytes }; - } - (e.getHash = s), - (e.createCurve = function (t, e) { - const r = e => (0, o.weierstrass)({ ...t, ...s(e) }); - return Object.freeze({ ...r(e), create: r }); - }); - }, - 6861: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), (e.validateBasic = e.wNAF = void 0); - const i = r(3818), - n = r(9309), - o = BigInt(0), - s = BigInt(1); - (e.wNAF = function (t, e) { - const r = (t, e) => { - const r = e.negate(); - return t ? r : e; - }, - i = t => ({ windows: Math.ceil(e / t) + 1, windowSize: 2 ** (t - 1) }); - return { - constTimeNegate: r, - unsafeLadder(e, r) { - let i = t.ZERO, - n = e; - for (; r > o; ) r & s && (i = i.add(n)), (n = n.double()), (r >>= s); - return i; - }, - precomputeWindow(t, e) { - const { windows: r, windowSize: n } = i(e), - o = []; - let s = t, - a = s; - for (let t = 0; t < r; t++) { - (a = s), o.push(a); - for (let t = 1; t < n; t++) (a = a.add(s)), o.push(a); - s = a.double(); - } - return o; - }, - wNAF(e, n, o) { - const { windows: a, windowSize: h } = i(e); - let u = t.ZERO, - f = t.BASE; - const c = BigInt(2 ** e - 1), - l = 2 ** e, - d = BigInt(e); - for (let t = 0; t < a; t++) { - const e = t * h; - let i = Number(o & c); - (o >>= d), i > h && ((i -= l), (o += s)); - const a = e, - p = e + Math.abs(i) - 1, - m = t % 2 != 0, - g = i < 0; - 0 === i ? (f = f.add(r(m, n[a]))) : (u = u.add(r(g, n[p]))); - } - return { p: u, f }; - }, - wNAFCached(t, e, r, i) { - const n = t._WINDOW_SIZE || 1; - let o = e.get(t); - return o || ((o = this.precomputeWindow(t, n)), 1 !== n && e.set(t, i(o))), this.wNAF(n, o, r); - }, - }; - }), - (e.validateBasic = function (t) { - return ( - (0, i.validateField)(t.Fp), - (0, n.validateObject)( - t, - { n: 'bigint', h: 'bigint', Gx: 'field', Gy: 'field' }, - { nBitLength: 'isSafeInteger', nByteLength: 'isSafeInteger' } - ), - Object.freeze({ ...(0, i.nLength)(t.n, t.nBitLength), ...t, p: t.Fp.ORDER }) - ); - }); - }, - 5984: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), - (e.createHasher = e.isogenyMap = e.hash_to_field = e.expand_message_xof = e.expand_message_xmd = void 0); - const i = r(3818), - n = r(9309), - o = n.bytesToNumberBE; - function s(t, e) { - if (t < 0 || t >= 1 << (8 * e)) throw new Error(`bad I2OSP call: value=${t} length=${e}`); - const r = Array.from({ length: e }).fill(0); - for (let i = e - 1; i >= 0; i--) (r[i] = 255 & t), (t >>>= 8); - return new Uint8Array(r); - } - function a(t, e) { - const r = new Uint8Array(t.length); - for (let i = 0; i < t.length; i++) r[i] = t[i] ^ e[i]; - return r; - } - function h(t) { - if (!(0, n.isBytes)(t)) throw new Error('Uint8Array expected'); - } - function u(t) { - if (!Number.isSafeInteger(t)) throw new Error('number expected'); - } - function f(t, e, r, i) { - h(t), h(e), u(r), e.length > 255 && (e = i((0, n.concatBytes)((0, n.utf8ToBytes)('H2C-OVERSIZE-DST-'), e))); - const { outputLen: o, blockLen: f } = i, - c = Math.ceil(r / o); - if (c > 255) throw new Error('Invalid xmd length'); - const l = (0, n.concatBytes)(e, s(e.length, 1)), - d = s(0, f), - p = s(r, 2), - m = new Array(c), - g = i((0, n.concatBytes)(d, t, p, s(0, 1), l)); - m[0] = i((0, n.concatBytes)(g, s(1, 1), l)); - for (let t = 1; t <= c; t++) { - const e = [a(g, m[t - 1]), s(t + 1, 1), l]; - m[t] = i((0, n.concatBytes)(...e)); - } - return (0, n.concatBytes)(...m).slice(0, r); - } - function c(t, e, r, i, o) { - if ((h(t), h(e), u(r), e.length > 255)) { - const t = Math.ceil((2 * i) / 8); - e = o - .create({ dkLen: t }) - .update((0, n.utf8ToBytes)('H2C-OVERSIZE-DST-')) - .update(e) - .digest(); - } - if (r > 65535 || e.length > 255) throw new Error('expand_message_xof: invalid lenInBytes'); - return o.create({ dkLen: r }).update(t).update(s(r, 2)).update(e).update(s(e.length, 1)).digest(); - } - function l(t, e, r) { - (0, n.validateObject)(r, { DST: 'stringOrUint8Array', p: 'bigint', m: 'isSafeInteger', k: 'isSafeInteger', hash: 'hash' }); - const { p: s, k: a, m: l, hash: d, expand: p, DST: m } = r; - h(t), u(e); - const g = (function (t) { - if ((0, n.isBytes)(t)) return t; - if ('string' == typeof t) return (0, n.utf8ToBytes)(t); - throw new Error('DST must be Uint8Array or string'); - })(m), - b = s.toString(2).length, - y = Math.ceil((b + a) / 8), - v = e * l * y; - let w; - if ('xmd' === p) w = f(t, g, v, d); - else if ('xof' === p) w = c(t, g, v, a, d); - else { - if ('_internal_pass' !== p) throw new Error('expand must be "xmd" or "xof"'); - w = t; - } - const _ = new Array(e); - for (let t = 0; t < e; t++) { - const e = new Array(l); - for (let r = 0; r < l; r++) { - const n = y * (r + t * l), - a = w.subarray(n, n + y); - e[r] = (0, i.mod)(o(a), s); - } - _[t] = e; - } - return _; - } - (e.expand_message_xmd = f), - (e.expand_message_xof = c), - (e.hash_to_field = l), - (e.isogenyMap = function (t, e) { - const r = e.map(t => Array.from(t).reverse()); - return (e, i) => { - const [n, o, s, a] = r.map(r => r.reduce((r, i) => t.add(t.mul(r, e), i))); - return (e = t.div(n, o)), (i = t.mul(i, t.div(s, a))), { x: e, y: i }; - }; - }), - (e.createHasher = function (t, e, r) { - if ('function' != typeof e) throw new Error('mapToCurve() must be defined'); - return { - hashToCurve(i, n) { - const o = l(i, 2, { ...r, DST: r.DST, ...n }), - s = t.fromAffine(e(o[0])), - a = t.fromAffine(e(o[1])), - h = s.add(a).clearCofactor(); - return h.assertValidity(), h; - }, - encodeToCurve(i, n) { - const o = l(i, 1, { ...r, DST: r.encodeDST, ...n }), - s = t.fromAffine(e(o[0])).clearCofactor(); - return s.assertValidity(), s; - }, - }; - }); - }, - 3818: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), - (e.mapHashToField = - e.getMinHashLength = - e.getFieldBytesLength = - e.hashToPrivateScalar = - e.FpSqrtEven = - e.FpSqrtOdd = - e.Field = - e.nLength = - e.FpIsSquare = - e.FpDiv = - e.FpInvertBatch = - e.FpPow = - e.validateField = - e.isNegativeLE = - e.FpSqrt = - e.tonelliShanks = - e.invert = - e.pow2 = - e.pow = - e.mod = - void 0); - const i = r(9309), - n = BigInt(0), - o = BigInt(1), - s = BigInt(2), - a = BigInt(3), - h = BigInt(4), - u = BigInt(5), - f = BigInt(8); - function c(t, e) { - const r = t % e; - return r >= n ? r : e + r; - } - function l(t, e, r) { - if (r <= n || e < n) throw new Error('Expected power/modulo > 0'); - if (r === o) return n; - let i = o; - for (; e > n; ) e & o && (i = (i * t) % r), (t = (t * t) % r), (e >>= o); - return i; - } - function d(t, e) { - if (t === n || e <= n) throw new Error(`invert: expected positive integers, got n=${t} mod=${e}`); - let r = c(t, e), - i = e, - s = n, - a = o, - h = o, - u = n; - for (; r !== n; ) { - const t = i / r, - e = i % r, - n = s - h * t, - o = a - u * t; - (i = r), (r = e), (s = h), (a = u), (h = n), (u = o); - } - if (i !== o) throw new Error('invert: does not exist'); - return c(s, e); - } - function p(t) { - const e = (t - o) / s; - let r, i, a; - for (r = t - o, i = 0; r % s === n; r /= s, i++); - for (a = s; a < t && l(a, e, t) !== t - o; a++); - if (1 === i) { - const e = (t + o) / h; - return function (t, r) { - const i = t.pow(r, e); - if (!t.eql(t.sqr(i), r)) throw new Error('Cannot find square root'); - return i; - }; - } - const u = (r + o) / s; - return function (t, n) { - if (t.pow(n, e) === t.neg(t.ONE)) throw new Error('Cannot find square root'); - let s = i, - h = t.pow(t.mul(t.ONE, a), r), - f = t.pow(n, u), - c = t.pow(n, r); - for (; !t.eql(c, t.ONE); ) { - if (t.eql(c, t.ZERO)) return t.ZERO; - let e = 1; - for (let r = t.sqr(c); e < s && !t.eql(r, t.ONE); e++) r = t.sqr(r); - const r = t.pow(h, o << BigInt(s - e - 1)); - (h = t.sqr(r)), (f = t.mul(f, r)), (c = t.mul(c, h)), (s = e); - } - return f; - }; - } - function m(t) { - if (t % h === a) { - const e = (t + o) / h; - return function (t, r) { - const i = t.pow(r, e); - if (!t.eql(t.sqr(i), r)) throw new Error('Cannot find square root'); - return i; - }; - } - if (t % f === u) { - const e = (t - u) / f; - return function (t, r) { - const i = t.mul(r, s), - n = t.pow(i, e), - o = t.mul(r, n), - a = t.mul(t.mul(o, s), n), - h = t.mul(o, t.sub(a, t.ONE)); - if (!t.eql(t.sqr(h), r)) throw new Error('Cannot find square root'); - return h; - }; - } - return p(t); - } - BigInt(9), - BigInt(16), - (e.mod = c), - (e.pow = l), - (e.pow2 = function (t, e, r) { - let i = t; - for (; e-- > n; ) (i *= i), (i %= r); - return i; - }), - (e.invert = d), - (e.tonelliShanks = p), - (e.FpSqrt = m), - (e.isNegativeLE = (t, e) => (c(t, e) & o) === o); - const g = [ - 'create', - 'isValid', - 'is0', - 'neg', - 'inv', - 'sqrt', - 'sqr', - 'eql', - 'add', - 'sub', - 'mul', - 'pow', - 'div', - 'addN', - 'subN', - 'mulN', - 'sqrN', - ]; - function b(t, e, r) { - if (r < n) throw new Error('Expected power > 0'); - if (r === n) return t.ONE; - if (r === o) return e; - let i = t.ONE, - s = e; - for (; r > n; ) r & o && (i = t.mul(i, s)), (s = t.sqr(s)), (r >>= o); - return i; - } - function y(t, e) { - const r = new Array(e.length), - i = e.reduce((e, i, n) => (t.is0(i) ? e : ((r[n] = e), t.mul(e, i))), t.ONE), - n = t.inv(i); - return e.reduceRight((e, i, n) => (t.is0(i) ? e : ((r[n] = t.mul(e, r[n])), t.mul(e, i))), n), r; - } - function v(t, e) { - const r = void 0 !== e ? e : t.toString(2).length; - return { nBitLength: r, nByteLength: Math.ceil(r / 8) }; - } - function w(t) { - if ('bigint' != typeof t) throw new Error('field order must be bigint'); - const e = t.toString(2).length; - return Math.ceil(e / 8); - } - function _(t) { - const e = w(t); - return e + Math.ceil(e / 2); - } - (e.validateField = function (t) { - const e = g.reduce((t, e) => ((t[e] = 'function'), t), { - ORDER: 'bigint', - MASK: 'bigint', - BYTES: 'isSafeInteger', - BITS: 'isSafeInteger', - }); - return (0, i.validateObject)(t, e); - }), - (e.FpPow = b), - (e.FpInvertBatch = y), - (e.FpDiv = function (t, e, r) { - return t.mul(e, 'bigint' == typeof r ? d(r, t.ORDER) : t.inv(r)); - }), - (e.FpIsSquare = function (t) { - const e = (t.ORDER - o) / s; - return r => { - const i = t.pow(r, e); - return t.eql(i, t.ZERO) || t.eql(i, t.ONE); - }; - }), - (e.nLength = v), - (e.Field = function (t, e, r = !1, s = {}) { - if (t <= n) throw new Error(`Expected Field ORDER > 0, got ${t}`); - const { nBitLength: a, nByteLength: h } = v(t, e); - if (h > 2048) throw new Error('Field lengths over 2048 bytes are not supported'); - const u = m(t), - f = Object.freeze({ - ORDER: t, - BITS: a, - BYTES: h, - MASK: (0, i.bitMask)(a), - ZERO: n, - ONE: o, - create: e => c(e, t), - isValid: e => { - if ('bigint' != typeof e) throw new Error('Invalid field element: expected bigint, got ' + typeof e); - return n <= e && e < t; - }, - is0: t => t === n, - isOdd: t => (t & o) === o, - neg: e => c(-e, t), - eql: (t, e) => t === e, - sqr: e => c(e * e, t), - add: (e, r) => c(e + r, t), - sub: (e, r) => c(e - r, t), - mul: (e, r) => c(e * r, t), - pow: (t, e) => b(f, t, e), - div: (e, r) => c(e * d(r, t), t), - sqrN: t => t * t, - addN: (t, e) => t + e, - subN: (t, e) => t - e, - mulN: (t, e) => t * e, - inv: e => d(e, t), - sqrt: s.sqrt || (t => u(f, t)), - invertBatch: t => y(f, t), - cmov: (t, e, r) => (r ? e : t), - toBytes: t => (r ? (0, i.numberToBytesLE)(t, h) : (0, i.numberToBytesBE)(t, h)), - fromBytes: t => { - if (t.length !== h) throw new Error(`Fp.fromBytes: expected ${h}, got ${t.length}`); - return r ? (0, i.bytesToNumberLE)(t) : (0, i.bytesToNumberBE)(t); - }, - }); - return Object.freeze(f); - }), - (e.FpSqrtOdd = function (t, e) { - if (!t.isOdd) throw new Error("Field doesn't have isOdd"); - const r = t.sqrt(e); - return t.isOdd(r) ? r : t.neg(r); - }), - (e.FpSqrtEven = function (t, e) { - if (!t.isOdd) throw new Error("Field doesn't have isOdd"); - const r = t.sqrt(e); - return t.isOdd(r) ? t.neg(r) : r; - }), - (e.hashToPrivateScalar = function (t, e, r = !1) { - const n = (t = (0, i.ensureBytes)('privateHash', t)).length, - s = v(e).nByteLength + 8; - if (s < 24 || n < s || n > 1024) throw new Error(`hashToPrivateScalar: expected ${s}-1024 bytes of input, got ${n}`); - return c(r ? (0, i.bytesToNumberLE)(t) : (0, i.bytesToNumberBE)(t), e - o) + o; - }), - (e.getFieldBytesLength = w), - (e.getMinHashLength = _), - (e.mapHashToField = function (t, e, r = !1) { - const n = t.length, - s = w(e), - a = _(e); - if (n < 16 || n < a || n > 1024) throw new Error(`expected ${a}-1024 bytes of input, got ${n}`); - const h = c(r ? (0, i.bytesToNumberBE)(t) : (0, i.bytesToNumberLE)(t), e - o) + o; - return r ? (0, i.numberToBytesLE)(h, s) : (0, i.numberToBytesBE)(h, s); - }); - }, - 9309: (t, e) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), - (e.validateObject = - e.createHmacDrbg = - e.bitMask = - e.bitSet = - e.bitGet = - e.bitLen = - e.utf8ToBytes = - e.equalBytes = - e.concatBytes = - e.ensureBytes = - e.numberToVarBytesBE = - e.numberToBytesLE = - e.numberToBytesBE = - e.bytesToNumberLE = - e.bytesToNumberBE = - e.hexToBytes = - e.hexToNumber = - e.numberToHexUnpadded = - e.bytesToHex = - e.isBytes = - void 0); - const r = BigInt(0), - i = BigInt(1), - n = BigInt(2); - function o(t) { - return t instanceof Uint8Array || (null != t && 'object' == typeof t && 'Uint8Array' === t.constructor.name); - } - e.isBytes = o; - const s = Array.from({ length: 256 }, (t, e) => e.toString(16).padStart(2, '0')); - function a(t) { - if (!o(t)) throw new Error('Uint8Array expected'); - let e = ''; - for (let r = 0; r < t.length; r++) e += s[t[r]]; - return e; - } - function h(t) { - const e = t.toString(16); - return 1 & e.length ? `0${e}` : e; - } - function u(t) { - if ('string' != typeof t) throw new Error('hex string expected, got ' + typeof t); - return BigInt('' === t ? '0' : `0x${t}`); - } - (e.bytesToHex = a), (e.numberToHexUnpadded = h), (e.hexToNumber = u); - const f = { _0: 48, _9: 57, _A: 65, _F: 70, _a: 97, _f: 102 }; - function c(t) { - return t >= f._0 && t <= f._9 - ? t - f._0 - : t >= f._A && t <= f._F - ? t - (f._A - 10) - : t >= f._a && t <= f._f - ? t - (f._a - 10) - : void 0; - } - function l(t) { - if ('string' != typeof t) throw new Error('hex string expected, got ' + typeof t); - const e = t.length, - r = e / 2; - if (e % 2) throw new Error('padded hex string expected, got unpadded hex of length ' + e); - const i = new Uint8Array(r); - for (let e = 0, n = 0; e < r; e++, n += 2) { - const r = c(t.charCodeAt(n)), - o = c(t.charCodeAt(n + 1)); - if (void 0 === r || void 0 === o) { - const e = t[n] + t[n + 1]; - throw new Error('hex string expected, got non-hex character "' + e + '" at index ' + n); - } - i[e] = 16 * r + o; - } - return i; - } - function d(t, e) { - return l(t.toString(16).padStart(2 * e, '0')); - } - function p(...t) { - let e = 0; - for (let r = 0; r < t.length; r++) { - const i = t[r]; - if (!o(i)) throw new Error('Uint8Array expected'); - e += i.length; - } - let r = new Uint8Array(e), - i = 0; - for (let e = 0; e < t.length; e++) { - const n = t[e]; - r.set(n, i), (i += n.length); - } - return r; - } - (e.hexToBytes = l), - (e.bytesToNumberBE = function (t) { - return u(a(t)); - }), - (e.bytesToNumberLE = function (t) { - if (!o(t)) throw new Error('Uint8Array expected'); - return u(a(Uint8Array.from(t).reverse())); - }), - (e.numberToBytesBE = d), - (e.numberToBytesLE = function (t, e) { - return d(t, e).reverse(); - }), - (e.numberToVarBytesBE = function (t) { - return l(h(t)); - }), - (e.ensureBytes = function (t, e, r) { - let i; - if ('string' == typeof e) - try { - i = l(e); - } catch (r) { - throw new Error(`${t} must be valid hex string, got "${e}". Cause: ${r}`); - } - else { - if (!o(e)) throw new Error(`${t} must be hex string or Uint8Array`); - i = Uint8Array.from(e); - } - const n = i.length; - if ('number' == typeof r && n !== r) throw new Error(`${t} expected ${r} bytes, got ${n}`); - return i; - }), - (e.concatBytes = p), - (e.equalBytes = function (t, e) { - if (t.length !== e.length) return !1; - let r = 0; - for (let i = 0; i < t.length; i++) r |= t[i] ^ e[i]; - return 0 === r; - }), - (e.utf8ToBytes = function (t) { - if ('string' != typeof t) throw new Error('utf8ToBytes expected string, got ' + typeof t); - return new Uint8Array(new TextEncoder().encode(t)); - }), - (e.bitLen = function (t) { - let e; - for (e = 0; t > r; t >>= i, e += 1); - return e; - }), - (e.bitGet = function (t, e) { - return (t >> BigInt(e)) & i; - }), - (e.bitSet = (t, e, n) => t | ((n ? i : r) << BigInt(e))), - (e.bitMask = t => (n << BigInt(t - 1)) - i); - const m = t => new Uint8Array(t), - g = t => Uint8Array.from(t); - e.createHmacDrbg = function (t, e, r) { - if ('number' != typeof t || t < 2) throw new Error('hashLen must be a number'); - if ('number' != typeof e || e < 2) throw new Error('qByteLen must be a number'); - if ('function' != typeof r) throw new Error('hmacFn must be a function'); - let i = m(t), - n = m(t), - o = 0; - const s = () => { - i.fill(1), n.fill(0), (o = 0); - }, - a = (...t) => r(n, i, ...t), - h = (t = m()) => { - (n = a(g([0]), t)), (i = a()), 0 !== t.length && ((n = a(g([1]), t)), (i = a())); - }, - u = () => { - if (o++ >= 1e3) throw new Error('drbg: tried 1000 values'); - let t = 0; - const r = []; - for (; t < e; ) { - i = a(); - const e = i.slice(); - r.push(e), (t += i.length); - } - return p(...r); - }; - return (t, e) => { - let r; - for (s(), h(t); !(r = e(u())); ) h(); - return s(), r; - }; - }; - const b = { - bigint: t => 'bigint' == typeof t, - function: t => 'function' == typeof t, - boolean: t => 'boolean' == typeof t, - string: t => 'string' == typeof t, - stringOrUint8Array: t => 'string' == typeof t || o(t), - isSafeInteger: t => Number.isSafeInteger(t), - array: t => Array.isArray(t), - field: (t, e) => e.Fp.isValid(t), - hash: t => 'function' == typeof t && Number.isSafeInteger(t.outputLen), - }; - e.validateObject = function (t, e, r = {}) { - const i = (e, r, i) => { - const n = b[r]; - if ('function' != typeof n) throw new Error(`Invalid validator "${r}", expected function`); - const o = t[e]; - if (!((i && void 0 === o) || n(o, t))) throw new Error(`Invalid param ${String(e)}=${o} (${typeof o}), expected ${r}`); - }; - for (const [t, r] of Object.entries(e)) i(t, r, !1); - for (const [t, e] of Object.entries(r)) i(t, e, !0); - return t; - }; - }, - 7602: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), - (e.mapToCurveSimpleSWU = e.SWUFpSqrtRatio = e.weierstrass = e.weierstrassPoints = e.DER = void 0); - const i = r(3818), - n = r(9309), - o = r(9309), - s = r(6861), - { bytesToNumberBE: a, hexToBytes: h } = n; - e.DER = { - Err: class extends Error { - constructor(t = '') { - super(t); - } - }, - _parseInt(t) { - const { Err: r } = e.DER; - if (t.length < 2 || 2 !== t[0]) throw new r('Invalid signature integer tag'); - const i = t[1], - n = t.subarray(2, i + 2); - if (!i || n.length !== i) throw new r('Invalid signature integer: wrong length'); - if (128 & n[0]) throw new r('Invalid signature integer: negative'); - if (0 === n[0] && !(128 & n[1])) throw new r('Invalid signature integer: unnecessary leading zero'); - return { d: a(n), l: t.subarray(i + 2) }; - }, - toSig(t) { - const { Err: r } = e.DER, - i = 'string' == typeof t ? h(t) : t; - if (!n.isBytes(i)) throw new Error('ui8a expected'); - let o = i.length; - if (o < 2 || 48 != i[0]) throw new r('Invalid signature tag'); - if (i[1] !== o - 2) throw new r('Invalid signature: incorrect length'); - const { d: s, l: a } = e.DER._parseInt(i.subarray(2)), - { d: u, l: f } = e.DER._parseInt(a); - if (f.length) throw new r('Invalid signature: left bytes after parsing'); - return { r: s, s: u }; - }, - hexFromSig(t) { - const e = t => (8 & Number.parseInt(t[0], 16) ? '00' + t : t), - r = t => { - const e = t.toString(16); - return 1 & e.length ? `0${e}` : e; - }, - i = e(r(t.s)), - n = e(r(t.r)), - o = i.length / 2, - s = n.length / 2, - a = r(o), - h = r(s); - return `30${r(s + o + 4)}02${h}${n}02${a}${i}`; - }, - }; - const u = BigInt(0), - f = BigInt(1), - c = BigInt(2), - l = BigInt(3), - d = BigInt(4); - function p(t) { - const e = (function (t) { - const e = (0, s.validateBasic)(t); - n.validateObject( - e, - { a: 'field', b: 'field' }, - { - allowedPrivateKeyLengths: 'array', - wrapPrivateKey: 'boolean', - isTorsionFree: 'function', - clearCofactor: 'function', - allowInfinityPoint: 'boolean', - fromBytes: 'function', - toBytes: 'function', - } - ); - const { endo: r, Fp: i, a: o } = e; - if (r) { - if (!i.eql(o, i.ZERO)) throw new Error('Endomorphism can only be defined for Koblitz curves that have a=0'); - if ('object' != typeof r || 'bigint' != typeof r.beta || 'function' != typeof r.splitScalar) - throw new Error('Expected endomorphism with beta: bigint and splitScalar: function'); - } - return Object.freeze({ ...e }); - })(t), - { Fp: r } = e, - a = - e.toBytes || - ((t, e, i) => { - const o = e.toAffine(); - return n.concatBytes(Uint8Array.from([4]), r.toBytes(o.x), r.toBytes(o.y)); - }), - h = - e.fromBytes || - (t => { - const e = t.subarray(1); - return { x: r.fromBytes(e.subarray(0, r.BYTES)), y: r.fromBytes(e.subarray(r.BYTES, 2 * r.BYTES)) }; - }); - function c(t) { - const { a: i, b: n } = e, - o = r.sqr(t), - s = r.mul(o, t); - return r.add(r.add(s, r.mul(t, i)), n); - } - if (!r.eql(r.sqr(e.Gy), c(e.Gx))) throw new Error('bad generator point: equation left != right'); - function d(t) { - return 'bigint' == typeof t && u < t && t < e.n; - } - function p(t) { - if (!d(t)) throw new Error('Expected valid bigint: 0 < bigint < curve.n'); - } - function m(t) { - const { allowedPrivateKeyLengths: r, nByteLength: s, wrapPrivateKey: a, n: h } = e; - if (r && 'bigint' != typeof t) { - if ((n.isBytes(t) && (t = n.bytesToHex(t)), 'string' != typeof t || !r.includes(t.length))) throw new Error('Invalid key'); - t = t.padStart(2 * s, '0'); - } - let u; - try { - u = 'bigint' == typeof t ? t : n.bytesToNumberBE((0, o.ensureBytes)('private key', t, s)); - } catch (e) { - throw new Error(`private key must be ${s} bytes, hex or bigint, not ${typeof t}`); - } - return a && (u = i.mod(u, h)), p(u), u; - } - const g = new Map(); - function b(t) { - if (!(t instanceof y)) throw new Error('ProjectivePoint expected'); - } - class y { - constructor(t, e, i) { - if (((this.px = t), (this.py = e), (this.pz = i), null == t || !r.isValid(t))) throw new Error('x required'); - if (null == e || !r.isValid(e)) throw new Error('y required'); - if (null == i || !r.isValid(i)) throw new Error('z required'); - } - static fromAffine(t) { - const { x: e, y: i } = t || {}; - if (!t || !r.isValid(e) || !r.isValid(i)) throw new Error('invalid affine point'); - if (t instanceof y) throw new Error('projective point not allowed'); - const n = t => r.eql(t, r.ZERO); - return n(e) && n(i) ? y.ZERO : new y(e, i, r.ONE); - } - get x() { - return this.toAffine().x; - } - get y() { - return this.toAffine().y; - } - static normalizeZ(t) { - const e = r.invertBatch(t.map(t => t.pz)); - return t.map((t, r) => t.toAffine(e[r])).map(y.fromAffine); - } - static fromHex(t) { - const e = y.fromAffine(h((0, o.ensureBytes)('pointHex', t))); - return e.assertValidity(), e; - } - static fromPrivateKey(t) { - return y.BASE.multiply(m(t)); - } - _setWindowSize(t) { - (this._WINDOW_SIZE = t), g.delete(this); - } - assertValidity() { - if (this.is0()) { - if (e.allowInfinityPoint && !r.is0(this.py)) return; - throw new Error('bad point: ZERO'); - } - const { x: t, y: i } = this.toAffine(); - if (!r.isValid(t) || !r.isValid(i)) throw new Error('bad point: x or y not FE'); - const n = r.sqr(i), - o = c(t); - if (!r.eql(n, o)) throw new Error('bad point: equation left != right'); - if (!this.isTorsionFree()) throw new Error('bad point: not in prime-order subgroup'); - } - hasEvenY() { - const { y: t } = this.toAffine(); - if (r.isOdd) return !r.isOdd(t); - throw new Error("Field doesn't support isOdd"); - } - equals(t) { - b(t); - const { px: e, py: i, pz: n } = this, - { px: o, py: s, pz: a } = t, - h = r.eql(r.mul(e, a), r.mul(o, n)), - u = r.eql(r.mul(i, a), r.mul(s, n)); - return h && u; - } - negate() { - return new y(this.px, r.neg(this.py), this.pz); - } - double() { - const { a: t, b: i } = e, - n = r.mul(i, l), - { px: o, py: s, pz: a } = this; - let h = r.ZERO, - u = r.ZERO, - f = r.ZERO, - c = r.mul(o, o), - d = r.mul(s, s), - p = r.mul(a, a), - m = r.mul(o, s); - return ( - (m = r.add(m, m)), - (f = r.mul(o, a)), - (f = r.add(f, f)), - (h = r.mul(t, f)), - (u = r.mul(n, p)), - (u = r.add(h, u)), - (h = r.sub(d, u)), - (u = r.add(d, u)), - (u = r.mul(h, u)), - (h = r.mul(m, h)), - (f = r.mul(n, f)), - (p = r.mul(t, p)), - (m = r.sub(c, p)), - (m = r.mul(t, m)), - (m = r.add(m, f)), - (f = r.add(c, c)), - (c = r.add(f, c)), - (c = r.add(c, p)), - (c = r.mul(c, m)), - (u = r.add(u, c)), - (p = r.mul(s, a)), - (p = r.add(p, p)), - (c = r.mul(p, m)), - (h = r.sub(h, c)), - (f = r.mul(p, d)), - (f = r.add(f, f)), - (f = r.add(f, f)), - new y(h, u, f) - ); - } - add(t) { - b(t); - const { px: i, py: n, pz: o } = this, - { px: s, py: a, pz: h } = t; - let u = r.ZERO, - f = r.ZERO, - c = r.ZERO; - const d = e.a, - p = r.mul(e.b, l); - let m = r.mul(i, s), - g = r.mul(n, a), - v = r.mul(o, h), - w = r.add(i, n), - _ = r.add(s, a); - (w = r.mul(w, _)), (_ = r.add(m, g)), (w = r.sub(w, _)), (_ = r.add(i, o)); - let M = r.add(s, h); - return ( - (_ = r.mul(_, M)), - (M = r.add(m, v)), - (_ = r.sub(_, M)), - (M = r.add(n, o)), - (u = r.add(a, h)), - (M = r.mul(M, u)), - (u = r.add(g, v)), - (M = r.sub(M, u)), - (c = r.mul(d, _)), - (u = r.mul(p, v)), - (c = r.add(u, c)), - (u = r.sub(g, c)), - (c = r.add(g, c)), - (f = r.mul(u, c)), - (g = r.add(m, m)), - (g = r.add(g, m)), - (v = r.mul(d, v)), - (_ = r.mul(p, _)), - (g = r.add(g, v)), - (v = r.sub(m, v)), - (v = r.mul(d, v)), - (_ = r.add(_, v)), - (m = r.mul(g, _)), - (f = r.add(f, m)), - (m = r.mul(M, _)), - (u = r.mul(w, u)), - (u = r.sub(u, m)), - (m = r.mul(w, g)), - (c = r.mul(M, c)), - (c = r.add(c, m)), - new y(u, f, c) - ); - } - subtract(t) { - return this.add(t.negate()); - } - is0() { - return this.equals(y.ZERO); - } - wNAF(t) { - return w.wNAFCached(this, g, t, t => { - const e = r.invertBatch(t.map(t => t.pz)); - return t.map((t, r) => t.toAffine(e[r])).map(y.fromAffine); - }); - } - multiplyUnsafe(t) { - const i = y.ZERO; - if (t === u) return i; - if ((p(t), t === f)) return this; - const { endo: n } = e; - if (!n) return w.unsafeLadder(this, t); - let { k1neg: o, k1: s, k2neg: a, k2: h } = n.splitScalar(t), - c = i, - l = i, - d = this; - for (; s > u || h > u; ) s & f && (c = c.add(d)), h & f && (l = l.add(d)), (d = d.double()), (s >>= f), (h >>= f); - return o && (c = c.negate()), a && (l = l.negate()), (l = new y(r.mul(l.px, n.beta), l.py, l.pz)), c.add(l); - } - multiply(t) { - p(t); - let i, - n, - o = t; - const { endo: s } = e; - if (s) { - const { k1neg: t, k1: e, k2neg: a, k2: h } = s.splitScalar(o); - let { p: u, f } = this.wNAF(e), - { p: c, f: l } = this.wNAF(h); - (u = w.constTimeNegate(t, u)), - (c = w.constTimeNegate(a, c)), - (c = new y(r.mul(c.px, s.beta), c.py, c.pz)), - (i = u.add(c)), - (n = f.add(l)); - } else { - const { p: t, f: e } = this.wNAF(o); - (i = t), (n = e); - } - return y.normalizeZ([i, n])[0]; - } - multiplyAndAddUnsafe(t, e, r) { - const i = y.BASE, - n = (t, e) => (e !== u && e !== f && t.equals(i) ? t.multiply(e) : t.multiplyUnsafe(e)), - o = n(this, e).add(n(t, r)); - return o.is0() ? void 0 : o; - } - toAffine(t) { - const { px: e, py: i, pz: n } = this, - o = this.is0(); - null == t && (t = o ? r.ONE : r.inv(n)); - const s = r.mul(e, t), - a = r.mul(i, t), - h = r.mul(n, t); - if (o) return { x: r.ZERO, y: r.ZERO }; - if (!r.eql(h, r.ONE)) throw new Error('invZ was invalid'); - return { x: s, y: a }; - } - isTorsionFree() { - const { h: t, isTorsionFree: r } = e; - if (t === f) return !0; - if (r) return r(y, this); - throw new Error('isTorsionFree() has not been declared for the elliptic curve'); - } - clearCofactor() { - const { h: t, clearCofactor: r } = e; - return t === f ? this : r ? r(y, this) : this.multiplyUnsafe(e.h); - } - toRawBytes(t = !0) { - return this.assertValidity(), a(y, this, t); - } - toHex(t = !0) { - return n.bytesToHex(this.toRawBytes(t)); - } - } - (y.BASE = new y(e.Gx, e.Gy, r.ONE)), (y.ZERO = new y(r.ZERO, r.ONE, r.ZERO)); - const v = e.nBitLength, - w = (0, s.wNAF)(y, e.endo ? Math.ceil(v / 2) : v); - return { CURVE: e, ProjectivePoint: y, normPrivateKeyToScalar: m, weierstrassEquation: c, isWithinCurveOrder: d }; - } - function m(t, e) { - const r = t.ORDER; - let i = u; - for (let t = r - f; t % c === u; t /= c) i += f; - const n = i, - o = c << (n - f - f), - s = o * c, - a = (r - f) / s, - h = (a - f) / c, - p = s - f, - m = o, - g = t.pow(e, a), - b = t.pow(e, (a + f) / c); - let y = (e, r) => { - let i = g, - o = t.pow(r, p), - s = t.sqr(o); - s = t.mul(s, r); - let a = t.mul(e, s); - (a = t.pow(a, h)), (a = t.mul(a, o)), (o = t.mul(a, r)), (s = t.mul(a, e)); - let u = t.mul(s, o); - a = t.pow(u, m); - let l = t.eql(a, t.ONE); - (o = t.mul(s, b)), (a = t.mul(u, i)), (s = t.cmov(o, s, l)), (u = t.cmov(a, u, l)); - for (let e = n; e > f; e--) { - let r = e - c; - r = c << (r - f); - let n = t.pow(u, r); - const a = t.eql(n, t.ONE); - (o = t.mul(s, i)), (i = t.mul(i, i)), (n = t.mul(u, i)), (s = t.cmov(o, s, a)), (u = t.cmov(n, u, a)); - } - return { isValid: l, value: s }; - }; - if (t.ORDER % d === l) { - const r = (t.ORDER - l) / d, - i = t.sqrt(t.neg(e)); - y = (e, n) => { - let o = t.sqr(n); - const s = t.mul(e, n); - o = t.mul(o, s); - let a = t.pow(o, r); - a = t.mul(a, s); - const h = t.mul(a, i), - u = t.mul(t.sqr(a), n), - f = t.eql(u, e); - return { isValid: f, value: t.cmov(h, a, f) }; - }; - } - return y; - } - (e.weierstrassPoints = p), - (e.weierstrass = function (t) { - const r = (function (t) { - const e = (0, s.validateBasic)(t); - return ( - n.validateObject( - e, - { hash: 'hash', hmac: 'function', randomBytes: 'function' }, - { bits2int: 'function', bits2int_modN: 'function', lowS: 'boolean' } - ), - Object.freeze({ lowS: !0, ...e }) - ); - })(t), - { Fp: a, n: h } = r, - c = a.BYTES + 1, - l = 2 * a.BYTES + 1; - function d(t) { - return i.mod(t, h); - } - function m(t) { - return i.invert(t, h); - } - const { - ProjectivePoint: g, - normPrivateKeyToScalar: b, - weierstrassEquation: y, - isWithinCurveOrder: v, - } = p({ - ...r, - toBytes(t, e, r) { - const i = e.toAffine(), - o = a.toBytes(i.x), - s = n.concatBytes; - return r ? s(Uint8Array.from([e.hasEvenY() ? 2 : 3]), o) : s(Uint8Array.from([4]), o, a.toBytes(i.y)); - }, - fromBytes(t) { - const e = t.length, - r = t[0], - i = t.subarray(1); - if (e !== c || (2 !== r && 3 !== r)) { - if (e === l && 4 === r) - return { x: a.fromBytes(i.subarray(0, a.BYTES)), y: a.fromBytes(i.subarray(a.BYTES, 2 * a.BYTES)) }; - throw new Error(`Point of length ${e} was invalid. Expected ${c} compressed bytes or ${l} uncompressed bytes`); - } - { - const t = n.bytesToNumberBE(i); - if (!(u < (o = t) && o < a.ORDER)) throw new Error('Point is not on curve'); - const e = y(t); - let s = a.sqrt(e); - return (1 == (1 & r)) != ((s & f) === f) && (s = a.neg(s)), { x: t, y: s }; - } - var o; - }, - }), - w = t => n.bytesToHex(n.numberToBytesBE(t, r.nByteLength)); - function _(t) { - return t > h >> f; - } - const M = (t, e, r) => n.bytesToNumberBE(t.slice(e, r)); - class E { - constructor(t, e, r) { - (this.r = t), (this.s = e), (this.recovery = r), this.assertValidity(); - } - static fromCompact(t) { - const e = r.nByteLength; - return (t = (0, o.ensureBytes)('compactSignature', t, 2 * e)), new E(M(t, 0, e), M(t, e, 2 * e)); - } - static fromDER(t) { - const { r, s: i } = e.DER.toSig((0, o.ensureBytes)('DER', t)); - return new E(r, i); - } - assertValidity() { - if (!v(this.r)) throw new Error('r must be 0 < r < CURVE.n'); - if (!v(this.s)) throw new Error('s must be 0 < s < CURVE.n'); - } - addRecoveryBit(t) { - return new E(this.r, this.s, t); - } - recoverPublicKey(t) { - const { r: e, s: i, recovery: n } = this, - s = k((0, o.ensureBytes)('msgHash', t)); - if (null == n || ![0, 1, 2, 3].includes(n)) throw new Error('recovery id invalid'); - const h = 2 === n || 3 === n ? e + r.n : e; - if (h >= a.ORDER) throw new Error('recovery id 2 or 3 invalid'); - const u = 0 == (1 & n) ? '02' : '03', - f = g.fromHex(u + w(h)), - c = m(h), - l = d(-s * c), - p = d(i * c), - b = g.BASE.multiplyAndAddUnsafe(f, l, p); - if (!b) throw new Error('point at infinify'); - return b.assertValidity(), b; - } - hasHighS() { - return _(this.s); - } - normalizeS() { - return this.hasHighS() ? new E(this.r, d(-this.s), this.recovery) : this; - } - toDERRawBytes() { - return n.hexToBytes(this.toDERHex()); - } - toDERHex() { - return e.DER.hexFromSig({ r: this.r, s: this.s }); - } - toCompactRawBytes() { - return n.hexToBytes(this.toCompactHex()); - } - toCompactHex() { - return w(this.r) + w(this.s); - } - } - const S = { - isValidPrivateKey(t) { - try { - return b(t), !0; - } catch (t) { - return !1; - } - }, - normPrivateKeyToScalar: b, - randomPrivateKey: () => { - const t = i.getMinHashLength(r.n); - return i.mapHashToField(r.randomBytes(t), r.n); - }, - precompute: (t = 8, e = g.BASE) => (e._setWindowSize(t), e.multiply(BigInt(3)), e), - }; - function x(t) { - const e = n.isBytes(t), - r = 'string' == typeof t, - i = (e || r) && t.length; - return e ? i === c || i === l : r ? i === 2 * c || i === 2 * l : t instanceof g; - } - const A = - r.bits2int || - function (t) { - const e = n.bytesToNumberBE(t), - i = 8 * t.length - r.nBitLength; - return i > 0 ? e >> BigInt(i) : e; - }, - k = - r.bits2int_modN || - function (t) { - return d(A(t)); - }, - R = n.bitMask(r.nBitLength); - function B(t) { - if ('bigint' != typeof t) throw new Error('bigint expected'); - if (!(u <= t && t < R)) throw new Error(`bigint expected < 2^${r.nBitLength}`); - return n.numberToBytesBE(t, r.nByteLength); - } - const I = { lowS: r.lowS, prehash: !1 }, - T = { lowS: r.lowS, prehash: !1 }; - return ( - g.BASE._setWindowSize(8), - { - CURVE: r, - getPublicKey: function (t, e = !0) { - return g.fromPrivateKey(t).toRawBytes(e); - }, - getSharedSecret: function (t, e, r = !0) { - if (x(t)) throw new Error('first arg must be private key'); - if (!x(e)) throw new Error('second arg must be public key'); - return g.fromHex(e).multiply(b(t)).toRawBytes(r); - }, - sign: function (t, e, i = I) { - const { seed: s, k2sig: h } = (function (t, e, i = I) { - if (['recovered', 'canonical'].some(t => t in i)) throw new Error('sign() legacy options not supported'); - const { hash: s, randomBytes: h } = r; - let { lowS: c, prehash: l, extraEntropy: p } = i; - null == c && (c = !0), - (t = (0, o.ensureBytes)('msgHash', t)), - l && (t = (0, o.ensureBytes)('prehashed msgHash', s(t))); - const y = k(t), - w = b(e), - M = [B(w), B(y)]; - if (null != p) { - const t = !0 === p ? h(a.BYTES) : p; - M.push((0, o.ensureBytes)('extraEntropy', t)); - } - const S = n.concatBytes(...M), - x = y; - return { - seed: S, - k2sig: function (t) { - const e = A(t); - if (!v(e)) return; - const r = m(e), - i = g.BASE.multiply(e).toAffine(), - n = d(i.x); - if (n === u) return; - const o = d(r * d(x + n * w)); - if (o === u) return; - let s = (i.x === n ? 0 : 2) | Number(i.y & f), - a = o; - return ( - c && - _(o) && - ((a = (function (t) { - return _(t) ? d(-t) : t; - })(o)), - (s ^= 1)), - new E(n, a, s) - ); - }, - }; - })(t, e, i), - c = r; - return n.createHmacDrbg(c.hash.outputLen, c.nByteLength, c.hmac)(s, h); - }, - verify: function (t, i, s, a = T) { - const h = t; - if (((i = (0, o.ensureBytes)('msgHash', i)), (s = (0, o.ensureBytes)('publicKey', s)), 'strict' in a)) - throw new Error('options.strict was renamed to lowS'); - const { lowS: u, prehash: f } = a; - let c, l; - try { - if ('string' == typeof h || n.isBytes(h)) - try { - c = E.fromDER(h); - } catch (t) { - if (!(t instanceof e.DER.Err)) throw t; - c = E.fromCompact(h); - } - else { - if ('object' != typeof h || 'bigint' != typeof h.r || 'bigint' != typeof h.s) throw new Error('PARSE'); - { - const { r: t, s: e } = h; - c = new E(t, e); - } - } - l = g.fromHex(s); - } catch (t) { - if ('PARSE' === t.message) throw new Error('signature must be Signature instance, Uint8Array or hex string'); - return !1; - } - if (u && c.hasHighS()) return !1; - f && (i = r.hash(i)); - const { r: p, s: b } = c, - y = k(i), - v = m(b), - w = d(y * v), - _ = d(p * v), - M = g.BASE.multiplyAndAddUnsafe(l, w, _)?.toAffine(); - return !!M && d(M.x) === p; - }, - ProjectivePoint: g, - Signature: E, - utils: S, - } - ); - }), - (e.SWUFpSqrtRatio = m), - (e.mapToCurveSimpleSWU = function (t, e) { - if ((i.validateField(t), !t.isValid(e.A) || !t.isValid(e.B) || !t.isValid(e.Z))) - throw new Error('mapToCurveSimpleSWU: invalid opts'); - const r = m(t, e.Z); - if (!t.isOdd) throw new Error('Fp.isOdd is not implemented!'); - return i => { - let n, o, s, a, h, u, f, c; - (n = t.sqr(i)), - (n = t.mul(n, e.Z)), - (o = t.sqr(n)), - (o = t.add(o, n)), - (s = t.add(o, t.ONE)), - (s = t.mul(s, e.B)), - (a = t.cmov(e.Z, t.neg(o), !t.eql(o, t.ZERO))), - (a = t.mul(a, e.A)), - (o = t.sqr(s)), - (u = t.sqr(a)), - (h = t.mul(u, e.A)), - (o = t.add(o, h)), - (o = t.mul(o, s)), - (u = t.mul(u, a)), - (h = t.mul(u, e.B)), - (o = t.add(o, h)), - (f = t.mul(n, s)); - const { isValid: l, value: d } = r(o, u); - (c = t.mul(n, i)), (c = t.mul(c, d)), (f = t.cmov(f, s, l)), (c = t.cmov(c, d, l)); - const p = t.isOdd(i) === t.isOdd(c); - return (c = t.cmov(t.neg(c), c, p)), (f = t.div(f, a)), { x: f, y: c }; - }; - }); - }, - 3532: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), (e.encodeToCurve = e.hashToCurve = e.schnorr = e.secp256k1 = void 0); - const i = r(3061), - n = r(8089), - o = r(3818), - s = r(7602), - a = r(9309), - h = r(5984), - u = r(1614), - f = BigInt('0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f'), - c = BigInt('0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141'), - l = BigInt(1), - d = BigInt(2), - p = (t, e) => (t + e / d) / e; - function m(t) { - const e = f, - r = BigInt(3), - i = BigInt(6), - n = BigInt(11), - s = BigInt(22), - a = BigInt(23), - h = BigInt(44), - u = BigInt(88), - c = (t * t * t) % e, - l = (c * c * t) % e, - p = ((0, o.pow2)(l, r, e) * l) % e, - m = ((0, o.pow2)(p, r, e) * l) % e, - b = ((0, o.pow2)(m, d, e) * c) % e, - y = ((0, o.pow2)(b, n, e) * b) % e, - v = ((0, o.pow2)(y, s, e) * y) % e, - w = ((0, o.pow2)(v, h, e) * v) % e, - _ = ((0, o.pow2)(w, u, e) * w) % e, - M = ((0, o.pow2)(_, h, e) * v) % e, - E = ((0, o.pow2)(M, r, e) * l) % e, - S = ((0, o.pow2)(E, a, e) * y) % e, - x = ((0, o.pow2)(S, i, e) * c) % e, - A = (0, o.pow2)(x, d, e); - if (!g.eql(g.sqr(A), t)) throw new Error('Cannot find square root'); - return A; - } - const g = (0, o.Field)(f, void 0, void 0, { sqrt: m }); - e.secp256k1 = (0, u.createCurve)( - { - a: BigInt(0), - b: BigInt(7), - Fp: g, - n: c, - Gx: BigInt('55066263022277343669578718895168534326250603453777594175500187360389116729240'), - Gy: BigInt('32670510020758816978083085130507043184471273380659243275938904335757337482424'), - h: BigInt(1), - lowS: !0, - endo: { - beta: BigInt('0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee'), - splitScalar: t => { - const e = c, - r = BigInt('0x3086d221a7d46bcde86c90e49284eb15'), - i = -l * BigInt('0xe4437ed6010e88286f547fa90abfe4c3'), - n = BigInt('0x114ca50f7a8e2f3f657c1108d9d44cfd8'), - s = r, - a = BigInt('0x100000000000000000000000000000000'), - h = p(s * t, e), - u = p(-i * t, e); - let f = (0, o.mod)(t - h * r - u * n, e), - d = (0, o.mod)(-h * i - u * s, e); - const m = f > a, - g = d > a; - if ((m && (f = e - f), g && (d = e - d), f > a || d > a)) throw new Error('splitScalar: Endomorphism failed, k=' + t); - return { k1neg: m, k1: f, k2neg: g, k2: d }; - }, - }, - }, - i.sha256 - ); - const b = BigInt(0), - y = t => 'bigint' == typeof t && b < t && t < f, - v = t => 'bigint' == typeof t && b < t && t < c, - w = {}; - function _(t, ...e) { - let r = w[t]; - if (void 0 === r) { - const e = (0, i.sha256)(Uint8Array.from(t, t => t.charCodeAt(0))); - (r = (0, a.concatBytes)(e, e)), (w[t] = r); - } - return (0, i.sha256)((0, a.concatBytes)(r, ...e)); - } - const M = t => t.toRawBytes(!0).slice(1), - E = t => (0, a.numberToBytesBE)(t, 32), - S = t => (0, o.mod)(t, f), - x = t => (0, o.mod)(t, c), - A = e.secp256k1.ProjectivePoint, - k = (t, e, r) => A.BASE.multiplyAndAddUnsafe(t, e, r); - function R(t) { - let r = e.secp256k1.utils.normPrivateKeyToScalar(t), - i = A.fromPrivateKey(r); - return { scalar: i.hasEvenY() ? r : x(-r), bytes: M(i) }; - } - function B(t) { - if (!y(t)) throw new Error('bad x: need 0 < x < p'); - const e = S(t * t); - let r = m(S(e * t + BigInt(7))); - r % d !== b && (r = S(-r)); - const i = new A(t, r, l); - return i.assertValidity(), i; - } - function I(...t) { - return x((0, a.bytesToNumberBE)(_('BIP0340/challenge', ...t))); - } - function T(t, e, r) { - const i = (0, a.ensureBytes)('signature', t, 64), - n = (0, a.ensureBytes)('message', e), - o = (0, a.ensureBytes)('publicKey', r, 32); - try { - const t = B((0, a.bytesToNumberBE)(o)), - e = (0, a.bytesToNumberBE)(i.subarray(0, 32)); - if (!y(e)) return !1; - const r = (0, a.bytesToNumberBE)(i.subarray(32, 64)); - if (!v(r)) return !1; - const s = I(E(e), M(t), n), - h = k(t, r, x(-s)); - return !(!h || !h.hasEvenY() || h.toAffine().x !== e); - } catch (t) { - return !1; - } - } - e.schnorr = { - getPublicKey: function (t) { - return R(t).bytes; - }, - sign: function (t, e, r = (0, n.randomBytes)(32)) { - const i = (0, a.ensureBytes)('message', t), - { bytes: o, scalar: s } = R(e), - h = (0, a.ensureBytes)('auxRand', r, 32), - u = E(s ^ (0, a.bytesToNumberBE)(_('BIP0340/aux', h))), - f = _('BIP0340/nonce', u, o, i), - c = x((0, a.bytesToNumberBE)(f)); - if (c === b) throw new Error('sign failed: k is zero'); - const { bytes: l, scalar: d } = R(c), - p = I(l, o, i), - m = new Uint8Array(64); - if ((m.set(l, 0), m.set(E(x(d + p * s)), 32), !T(m, i, o))) throw new Error('sign: Invalid signature produced'); - return m; - }, - verify: T, - utils: { - randomPrivateKey: e.secp256k1.utils.randomPrivateKey, - lift_x: B, - pointToBytes: M, - numberToBytesBE: a.numberToBytesBE, - bytesToNumberBE: a.bytesToNumberBE, - taggedHash: _, - mod: o.mod, - }, - }; - const P = (() => - (0, h.isogenyMap)( - g, - [ - [ - '0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7', - '0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581', - '0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262', - '0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c', - ], - [ - '0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b', - '0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14', - '0x0000000000000000000000000000000000000000000000000000000000000001', - ], - [ - '0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c', - '0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3', - '0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931', - '0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84', - ], - [ - '0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b', - '0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573', - '0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f', - '0x0000000000000000000000000000000000000000000000000000000000000001', - ], - ].map(t => t.map(t => BigInt(t))) - ))(), - O = (() => - (0, s.mapToCurveSimpleSWU)(g, { - A: BigInt('0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533'), - B: BigInt('1771'), - Z: g.create(BigInt('-11')), - }))(), - L = (() => - (0, h.createHasher)( - e.secp256k1.ProjectivePoint, - t => { - const { x: e, y: r } = O(g.create(t[0])); - return P(e, r); - }, - { - DST: 'secp256k1_XMD:SHA-256_SSWU_RO_', - encodeDST: 'secp256k1_XMD:SHA-256_SSWU_NU_', - p: g.ORDER, - m: 1, - k: 128, - expand: 'xmd', - hash: i.sha256, - } - ))(); - (e.hashToCurve = L.hashToCurve), (e.encodeToCurve = L.encodeToCurve); - }, - 1906: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), (e.keccak512 = e.keccak384 = e.keccak256 = e.keccak224 = void 0); - const i = r(5426), - n = r(2820); - (e.keccak224 = (0, n.wrapHash)(i.keccak_224)), - (e.keccak256 = (() => { - const t = (0, n.wrapHash)(i.keccak_256); - return (t.create = i.keccak_256.create), t; - })()), - (e.keccak384 = (0, n.wrapHash)(i.keccak_384)), - (e.keccak512 = (0, n.wrapHash)(i.keccak_512)); - }, - 6579: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), (e.secp256k1 = void 0); - var i = r(3532); - Object.defineProperty(e, 'secp256k1', { - enumerable: !0, - get: function () { - return i.secp256k1; - }, - }); - }, - 2820: function (t, e, r) { - 'use strict'; - t = r.nmd(t); - var i = - (this && this.__importDefault) || - function (t) { - return t && t.__esModule ? t : { default: t }; - }; - Object.defineProperty(e, '__esModule', { value: !0 }), - (e.crypto = - e.wrapHash = - e.equalsBytes = - e.hexToBytes = - e.bytesToUtf8 = - e.utf8ToBytes = - e.createView = - e.concatBytes = - e.toHex = - e.bytesToHex = - e.assertBytes = - e.assertBool = - void 0); - const n = i(r(7320)), - o = r(8089), - s = n.default.bool; - e.assertBool = s; - const a = n.default.bytes; - e.assertBytes = a; - var h = r(8089); - Object.defineProperty(e, 'bytesToHex', { - enumerable: !0, - get: function () { - return h.bytesToHex; - }, - }), - Object.defineProperty(e, 'toHex', { - enumerable: !0, - get: function () { - return h.bytesToHex; - }, - }), - Object.defineProperty(e, 'concatBytes', { - enumerable: !0, - get: function () { - return h.concatBytes; - }, - }), - Object.defineProperty(e, 'createView', { - enumerable: !0, - get: function () { - return h.createView; - }, - }), - Object.defineProperty(e, 'utf8ToBytes', { - enumerable: !0, - get: function () { - return h.utf8ToBytes; - }, - }), - (e.bytesToUtf8 = function (t) { - if (!(t instanceof Uint8Array)) throw new TypeError('bytesToUtf8 expected Uint8Array, got ' + typeof t); - return new TextDecoder().decode(t); - }), - (e.hexToBytes = function (t) { - const e = t.startsWith('0x') ? t.substring(2) : t; - return (0, o.hexToBytes)(e); - }), - (e.equalsBytes = function (t, e) { - if (t.length !== e.length) return !1; - for (let r = 0; r < t.length; r++) if (t[r] !== e[r]) return !1; - return !0; - }), - (e.wrapHash = function (t) { - return e => (n.default.bytes(e), t(e)); - }), - (e.crypto = (() => { - const e = 'object' == typeof globalThis && 'crypto' in globalThis ? globalThis.crypto : void 0, - r = 'function' == typeof t.require && t.require.bind(t); - return { node: r && !e ? r('crypto') : void 0, web: e }; - })()); - }, - 280: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), - (e.decodeSingle = e.decode = e.encodePacked = e.encodeSingle = e.encode = void 0); - const i = r(2451), - n = r(2858), - o = r(3763); - (e.encode = (t, e, r, i) => { - try { - return (0, o.pack)({ types: t, values: e, packed: r, tight: i }); - } catch (t) { - if (t instanceof n.ParserError) throw new n.ParserError(`Unable to encode value: ${t.message}`, t); - throw new n.ParserError(`An unexpected error occurred: ${(0, n.getErrorMessage)(t)}`, t); - } - }), - (e.encodeSingle = (t, r) => (0, e.encode)([t], [r])), - (e.encodePacked = (t, r, i) => (0, e.encode)(t, r, !0, i)), - (e.decode = (t, e) => { - const r = (0, i.createBytes)(e); - try { - return (0, o.unpack)(t, r); - } catch (t) { - if (t instanceof n.ParserError) throw new n.ParserError(`Unable to decode value: ${t.message}`, t); - throw new n.ParserError(`An unexpected error occurred: ${(0, n.getErrorMessage)(t)}`, t); - } - }), - (e.decodeSingle = (t, r) => { - const o = (0, e.decode)([t], r); - return (0, i.assert)(1 === o.length, new n.ParserError('Decoded value array has unexpected length.')), o[0]; - }); - }, - 2858: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), (e.ParserError = e.getErrorStack = e.getErrorMessage = void 0); - const i = r(2451); - (e.getErrorMessage = t => - 'string' == typeof t - ? t - : t instanceof Error || ((0, i.isObject)(t) && (0, i.hasProperty)(t, 'message') && 'string' == typeof t.message) - ? t.message - : 'Unknown error.'), - (e.getErrorStack = t => { - if (t instanceof Error) return t.stack; - }); - class n extends Error { - constructor(t, r) { - super(t), (this.name = 'ParserError'); - const i = (0, e.getErrorStack)(r); - i && (this.stack = i); - } - } - e.ParserError = n; - }, - 8009: function (t, e, r) { - 'use strict'; - var i = - (this && this.__createBinding) || - (Object.create - ? function (t, e, r, i) { - void 0 === i && (i = r); - var n = Object.getOwnPropertyDescriptor(e, r); - (n && !('get' in n ? !e.__esModule : n.writable || n.configurable)) || - (n = { - enumerable: !0, - get: function () { - return e[r]; - }, - }), - Object.defineProperty(t, i, n); - } - : function (t, e, r, i) { - void 0 === i && (i = r), (t[i] = e[r]); - }), - n = - (this && this.__exportStar) || - function (t, e) { - for (var r in t) 'default' === r || Object.prototype.hasOwnProperty.call(e, r) || i(e, t, r); - }; - Object.defineProperty(e, '__esModule', { value: !0 }), n(r(280), e), n(r(2858), e), n(r(3307), e); - }, - 8119: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), (e.iterate = void 0); - const i = r(2451); - e.iterate = function* (t, e = 32) { - for (let r = 0; r < t.length; r += e) { - const n = t => { - (0, i.assert)(t >= 0, 'Cannot skip a negative number of bytes.'), - (0, i.assert)(t % e == 0, 'Length must be a multiple of the size.'), - (r += t); - }, - o = t.subarray(r); - yield { skip: n, value: o }; - } - return { skip: () => {}, value: new Uint8Array() }; - }; - }, - 3763: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), (e.unpack = e.pack = e.isDynamicParser = e.getParser = void 0); - const i = r(2451), - n = r(2858), - o = r(8119), - s = r(8986), - a = r(3742); - (e.getParser = t => { - const e = { - address: s.address, - array: s.array, - bool: s.bool, - bytes: s.bytes, - fixedBytes: s.fixedBytes, - function: s.fn, - number: s.number, - string: s.string, - tuple: s.tuple, - }, - r = e[t]; - if (r) return r; - const i = Object.values(e).find(e => e.isType(t)); - if (i) return i; - throw new n.ParserError(`The type "${t}" is not supported.`); - }), - (e.isDynamicParser = (t, e) => { - const { isDynamic: r } = t; - return 'function' == typeof r ? r(e) : r; - }), - (e.pack = ({ types: t, values: r, packed: o = !1, tight: s = !1, arrayPacked: h = !1, byteArray: u = new Uint8Array() }) => { - (0, i.assert)( - t.length === r.length, - new n.ParserError(`The number of types (${t.length}) does not match the number of values (${r.length}).`) - ); - const { - staticBuffer: f, - dynamicBuffer: c, - pointers: l, - } = t.reduce( - ({ staticBuffer: t, dynamicBuffer: n, pointers: a }, u, f) => { - const c = (0, e.getParser)(u), - l = r[f]; - return o || h || !(0, e.isDynamicParser)(c, u) - ? { staticBuffer: c.encode({ buffer: t, value: l, type: u, packed: o, tight: s }), dynamicBuffer: n, pointers: a } - : { - staticBuffer: (0, i.concatBytes)([t, new Uint8Array(32)]), - dynamicBuffer: c.encode({ buffer: n, value: l, type: u, packed: o, tight: s }), - pointers: [...a, { position: t.length, pointer: n.length }], - }; - }, - { staticBuffer: new Uint8Array(), dynamicBuffer: new Uint8Array(), pointers: [] } - ); - (0, i.assert)((!o && !h) || 0 === c.length, new n.ParserError('Invalid pack state.')); - const d = f.length, - p = l.reduce((t, { pointer: e, position: r }) => { - const n = (0, a.padStart)((0, i.numberToBytes)(d + e)); - return (0, a.set)(t, n, r); - }, f); - return (0, i.concatBytes)([u, p, c]); - }), - (e.unpack = (t, r) => { - const s = (0, o.iterate)(r); - return t.map(t => { - const { - value: { value: o, skip: a }, - done: h, - } = s.next(); - (0, i.assert)( - !h, - new n.ParserError( - `The encoded value is invalid for the provided types. Reached end of buffer while attempting to parse "${t}".` - ) - ); - const u = (0, e.getParser)(t); - if ((0, e.isDynamicParser)(u, t)) { - const e = (0, i.bytesToNumber)(o.subarray(0, 32)), - n = r.subarray(e); - return u.decode({ type: t, value: n, skip: a }); - } - return u.decode({ type: t, value: o, skip: a }); - }); - }); - }, - 4192: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), (e.address = e.getAddress = void 0); - const i = r(2451), - n = r(2858), - o = r(3742); - (e.getAddress = t => { - const e = (0, i.createBytes)(t); - return ( - (0, i.assert)( - e.length <= 20, - new n.ParserError(`Invalid address value. Expected address to be 20 bytes long, but received ${e.length} bytes.`) - ), - (0, o.padStart)(e, 20) - ); - }), - (e.address = { - isDynamic: !1, - isType: t => 'address' === t, - getByteLength: () => 32, - encode({ buffer: t, value: r, packed: n }) { - const s = (0, e.getAddress)(r); - if (n) return (0, i.concatBytes)([t, s]); - const a = (0, o.padStart)(s); - return (0, i.concatBytes)([t, a]); - }, - decode: ({ value: t }) => (0, i.add0x)((0, i.bytesToHex)(t.slice(12, 32))), - }); - }, - 8763: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), (e.array = e.getTupleType = e.getArrayType = e.isArrayType = void 0); - const i = r(2451), - n = r(2858), - o = r(3763), - s = r(3742), - a = r(4400), - h = r(8772), - u = /^(?.*)\[(?\d*?)\]$/u; - (e.isArrayType = t => u.test(t)), - (e.getArrayType = t => { - const e = t.match(u); - return ( - (0, i.assert)(e?.groups?.type, new n.ParserError(`Invalid array type. Expected an array type, but received "${t}".`)), - [e.groups.type, e.groups.length ? parseInt(e.groups.length, 10) : void 0] - ); - }), - (e.getTupleType = (t, e) => `(${new Array(e).fill(t).join(',')})`), - (e.array = { - isDynamic(t) { - const [r, i] = (0, e.getArrayType)(t); - return void 0 === i || (0, o.isDynamicParser)((0, o.getParser)(r), r); - }, - isType: t => (0, e.isArrayType)(t), - getByteLength(t) { - (0, i.assert)((0, e.isArrayType)(t), new n.ParserError(`Expected an array type, but received "${t}".`)); - const [r, s] = (0, e.getArrayType)(t); - return (0, o.isDynamicParser)(this, t) || void 0 === s ? 32 : h.tuple.getByteLength((0, e.getTupleType)(r, s)); - }, - encode({ type: t, buffer: r, value: u, packed: f, tight: c }) { - const [l, d] = (0, e.getArrayType)(t); - if ( - ((0, i.assert)(!f || !(0, e.isArrayType)(l), new n.ParserError('Cannot pack nested arrays.')), - f && (0, o.isDynamicParser)((0, o.getParser)(l), l)) - ) - return (0, o.pack)({ types: new Array(u.length).fill(l), values: u, byteArray: r, packed: f, arrayPacked: !0, tight: c }); - if (d) - return ( - (0, i.assert)( - d === u.length, - new n.ParserError(`Array length does not match type length. Expected a length of ${d}, but received ${u.length}.`) - ), - h.tuple.encode({ type: (0, e.getTupleType)(l, d), buffer: r, value: u, packed: a.fixedBytes.isType(l) && c, tight: c }) - ); - if (f) - return (0, o.pack)({ - types: new Array(u.length).fill(l), - values: u, - byteArray: r, - packed: a.fixedBytes.isType(l) && c, - arrayPacked: !0, - tight: c, - }); - const p = (0, s.padStart)((0, i.numberToBytes)(u.length)); - return (0, o.pack)({ - types: new Array(u.length).fill(l), - values: u, - byteArray: (0, i.concatBytes)([r, p]), - packed: f, - tight: c, - }); - }, - decode({ type: t, value: r, ...s }) { - const [a, u] = (0, e.getArrayType)(t); - if (u) { - const t = h.tuple.decode({ type: (0, e.getTupleType)(a, u), value: r, ...s }); - return ( - (0, i.assert)( - t.length === u, - new n.ParserError(`Array length does not match type length. Expected a length of ${u}, but received ${t.length}.`) - ), - t - ); - } - const f = (0, i.bytesToNumber)(r.subarray(0, 32)); - return (0, o.unpack)(new Array(f).fill(a), r.subarray(32)); - }, - }); - }, - 1299: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), (e.bool = e.getBooleanValue = void 0); - const i = r(2451), - n = r(7884), - o = r(2858), - s = r(8325), - a = (0, n.coerce)((0, n.boolean)(), (0, n.union)([(0, n.literal)('true'), (0, n.literal)('false')]), t => 'true' === t); - (e.getBooleanValue = t => { - try { - return (0, n.create)(t, a) ? BigInt(1) : BigInt(0); - } catch { - throw new o.ParserError( - `Invalid boolean value. Expected a boolean literal, or the string "true" or "false", but received "${t}".` - ); - } - }), - (e.bool = { - isDynamic: !1, - isType: t => 'bool' === t, - getByteLength: () => 32, - encode({ buffer: t, value: r, packed: n, tight: o }) { - const a = (0, e.getBooleanValue)(r); - return n - ? (0, i.concatBytes)([t, (0, i.bigIntToBytes)(a)]) - : s.number.encode({ type: 'uint256', buffer: t, value: a, packed: n, tight: o }); - }, - decode: t => s.number.decode({ ...t, type: 'uint256' }) === BigInt(1), - }); - }, - 7378: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), (e.bytes = void 0); - const i = r(2451), - n = r(3742); - e.bytes = { - isDynamic: !0, - isType: t => 'bytes' === t, - getByteLength: () => 32, - encode({ buffer: t, value: e, packed: r }) { - const o = (0, i.createBytes)(e); - if (r) return (0, i.concatBytes)([t, o]); - const s = 32 * Math.ceil(o.byteLength / 32); - return (0, i.concatBytes)([t, (0, n.padStart)((0, i.numberToBytes)(o.byteLength)), (0, n.padEnd)(o, s)]); - }, - decode({ value: t }) { - const e = t.subarray(0, 32), - r = (0, i.bytesToNumber)(e); - return t.slice(32, 32 + r); - }, - }; - }, - 4400: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), (e.fixedBytes = e.getByteLength = void 0); - const i = r(2451), - n = r(2858), - o = r(3742), - s = /^bytes([0-9]{1,2})$/u; - (e.getByteLength = t => { - const e = t.match(s)?.[1]; - (0, i.assert)(e, `Invalid byte length. Expected a number between 1 and 32, but received "${t}".`); - const r = Number(e); - return ( - (0, i.assert)( - r > 0 && r <= 32, - new n.ParserError(`Invalid byte length. Expected a number between 1 and 32, but received "${t}".`) - ), - r - ); - }), - (e.fixedBytes = { - isDynamic: !1, - isType: t => s.test(t), - getByteLength: () => 32, - encode({ type: t, buffer: r, value: s, packed: a }) { - const h = (0, e.getByteLength)(t), - u = (0, i.createBytes)(s); - return ( - (0, i.assert)( - u.length <= h, - new n.ParserError(`Expected a value of length ${h}, but received a value of length ${u.length}.`) - ), - a ? (0, i.concatBytes)([r, (0, o.padEnd)(u, h)]) : (0, i.concatBytes)([r, (0, o.padEnd)(u)]) - ); - }, - decode({ type: t, value: r }) { - const i = (0, e.getByteLength)(t); - return r.slice(0, i); - }, - }); - }, - 9129: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), (e.fn = e.getFunction = void 0); - const i = r(2451), - n = r(7884), - o = r(2858), - s = r(4400), - a = (0, n.coerce)( - (0, n.object)({ address: i.StrictHexStruct, selector: i.StrictHexStruct }), - (0, n.union)([i.StrictHexStruct, (0, n.instance)(Uint8Array)]), - t => { - const e = (0, i.createBytes)(t); - return ( - (0, i.assert)( - 24 === e.length, - new o.ParserError(`Invalid Solidity function. Expected function to be 24 bytes long, but received ${e.length} bytes.`) - ), - { address: (0, i.bytesToHex)(e.subarray(0, 20)), selector: (0, i.bytesToHex)(e.subarray(20, 24)) } - ); - } - ); - (e.getFunction = t => { - const e = (0, n.create)(t, a); - return (0, i.concatBytes)([(0, i.hexToBytes)(e.address), (0, i.hexToBytes)(e.selector)]); - }), - (e.fn = { - isDynamic: !1, - isType: t => 'function' === t, - getByteLength: () => 32, - encode({ buffer: t, value: r, packed: i, tight: n }) { - const o = (0, e.getFunction)(r); - return s.fixedBytes.encode({ type: 'bytes24', buffer: t, value: o, packed: i, tight: n }); - }, - decode: ({ value: t }) => ({ address: (0, i.bytesToHex)(t.slice(0, 20)), selector: (0, i.bytesToHex)(t.slice(20, 24)) }), - }); - }, - 8986: function (t, e, r) { - 'use strict'; - var i = - (this && this.__createBinding) || - (Object.create - ? function (t, e, r, i) { - void 0 === i && (i = r); - var n = Object.getOwnPropertyDescriptor(e, r); - (n && !('get' in n ? !e.__esModule : n.writable || n.configurable)) || - (n = { - enumerable: !0, - get: function () { - return e[r]; - }, - }), - Object.defineProperty(t, i, n); - } - : function (t, e, r, i) { - void 0 === i && (i = r), (t[i] = e[r]); - }), - n = - (this && this.__exportStar) || - function (t, e) { - for (var r in t) 'default' === r || Object.prototype.hasOwnProperty.call(e, r) || i(e, t, r); - }; - Object.defineProperty(e, '__esModule', { value: !0 }), - n(r(4192), e), - n(r(8763), e), - n(r(1299), e), - n(r(7378), e), - n(r(4400), e), - n(r(9129), e), - n(r(8325), e), - n(r(8012), e), - n(r(1869), e), - n(r(8772), e); - }, - 8325: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), - (e.number = e.getBigInt = e.assertNumberLength = e.getLength = e.isSigned = void 0); - const i = r(2451), - n = r(2858), - o = r(3742), - s = /^u?int(?[0-9]*)?$/u; - (e.isSigned = t => !t.startsWith('u')), - (e.getLength = t => { - if ('int' === t || 'uint' === t) return 256; - const e = t.match(s); - (0, i.assert)(e?.groups?.length, new n.ParserError(`Invalid number type. Expected a number type, but received "${t}".`)); - const r = parseInt(e.groups.length, 10); - return ( - (0, i.assert)( - r >= 8 && r <= 256, - new n.ParserError(`Invalid number length. Expected a number between 8 and 256, but received "${t}".`) - ), - (0, i.assert)(r % 8 == 0, new n.ParserError(`Invalid number length. Expected a multiple of 8, but received "${t}".`)), - r - ); - }), - (e.assertNumberLength = (t, r) => { - const o = (0, e.getLength)(r), - s = BigInt(2) ** BigInt(o - ((0, e.isSigned)(r) ? 1 : 0)) - BigInt(1); - (0, e.isSigned)(r) - ? (0, i.assert)(t >= -(s + BigInt(1)) && t <= s, new n.ParserError(`Number "${t}" is out of range for type "${r}".`)) - : (0, i.assert)(t <= s, new n.ParserError(`Number "${t}" is out of range for type "${r}".`)); - }), - (e.getBigInt = t => { - try { - return (0, i.createBigInt)(t); - } catch { - throw new n.ParserError(`Invalid number. Expected a valid number value, but received "${t}".`); - } - }), - (e.number = { - isDynamic: !1, - isType: t => s.test(t), - getByteLength: () => 32, - encode({ type: t, buffer: r, value: n, packed: s }) { - const a = (0, e.getBigInt)(n); - if (((0, e.assertNumberLength)(a, t), (0, e.isSigned)(t))) { - if (s) { - const n = (0, e.getLength)(t) / 8; - return (0, i.concatBytes)([r, (0, i.signedBigIntToBytes)(a, n)]); - } - return (0, i.concatBytes)([r, (0, o.padStart)((0, i.signedBigIntToBytes)(a, 32))]); - } - if (s) { - const n = (0, e.getLength)(t) / 8; - return (0, i.concatBytes)([r, (0, o.padStart)((0, i.bigIntToBytes)(a), n)]); - } - return (0, i.concatBytes)([r, (0, o.padStart)((0, i.bigIntToBytes)(a))]); - }, - decode({ type: t, value: r }) { - const n = r.subarray(0, 32); - if ((0, e.isSigned)(t)) { - const r = (0, i.bytesToSignedBigInt)(n); - return (0, e.assertNumberLength)(r, t), r; - } - const o = (0, i.bytesToBigInt)(n); - return (0, e.assertNumberLength)(o, t), o; - }, - }); - }, - 8012: (t, e) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }); - }, - 1869: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), (e.string = void 0); - const i = r(2451), - n = r(7378); - e.string = { - isDynamic: !0, - isType: t => 'string' === t, - getByteLength: () => 32, - encode: ({ buffer: t, value: e, packed: r, tight: o }) => - n.bytes.encode({ type: 'bytes', buffer: t, value: (0, i.stringToBytes)(e), packed: r, tight: o }), - decode: t => (0, i.bytesToString)(n.bytes.decode(t)), - }; - }, - 8772: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), (e.tuple = e.getTupleElements = void 0); - const i = r(2451), - n = r(2858), - o = r(3763), - s = /^\((.+)\)$/u; - (e.getTupleElements = t => { - (0, i.assert)( - t.startsWith('(') && t.endsWith(')'), - new n.ParserError(`Invalid tuple type. Expected tuple type, but received "${t}".`) - ); - const e = []; - let r = '', - o = 0; - for (let i = 1; i < t.length - 1; i++) { - const n = t[i]; - ',' === n && 0 === o ? (e.push(r.trim()), (r = '')) : ((r += n), '(' === n ? (o += 1) : ')' === n && (o -= 1)); - } - return r.trim() && e.push(r.trim()), e; - }), - (e.tuple = { - isDynamic: t => - (0, e.getTupleElements)(t).some(t => { - const e = (0, o.getParser)(t); - return (0, o.isDynamicParser)(e, t); - }), - isType: t => (t => s.test(t))(t), - getByteLength(t) { - return (0, o.isDynamicParser)(this, t) - ? 32 - : (0, e.getTupleElements)(t).reduce((t, e) => t + (0, o.getParser)(e).getByteLength(e), 0); - }, - encode({ type: t, buffer: r, value: i, packed: n, tight: s }) { - const a = (0, e.getTupleElements)(t); - return (0, o.pack)({ types: a, values: i, byteArray: r, packed: n, tight: s }); - }, - decode({ type: t, value: r, skip: i }) { - const n = (0, e.getTupleElements)(t); - return i(this.getByteLength(t) - 32), (0, o.unpack)(n, r); - }, - }); - }, - 4460: (t, e) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }); - }, - 3307: function (t, e, r) { - 'use strict'; - var i = - (this && this.__createBinding) || - (Object.create - ? function (t, e, r, i) { - void 0 === i && (i = r); - var n = Object.getOwnPropertyDescriptor(e, r); - (n && !('get' in n ? !e.__esModule : n.writable || n.configurable)) || - (n = { - enumerable: !0, - get: function () { - return e[r]; - }, - }), - Object.defineProperty(t, i, n); - } - : function (t, e, r, i) { - void 0 === i && (i = r), (t[i] = e[r]); - }), - n = - (this && this.__exportStar) || - function (t, e) { - for (var r in t) 'default' === r || Object.prototype.hasOwnProperty.call(e, r) || i(e, t, r); - }; - Object.defineProperty(e, '__esModule', { value: !0 }), n(r(4460), e); - }, - 4979: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), (e.padEnd = e.padStart = e.set = void 0); - const i = r(2451); - (e.set = (t, e, r) => (0, i.concatBytes)([t.subarray(0, r), e, t.subarray(r + e.length)])), - (e.padStart = (t, e = 32) => { - const r = new Uint8Array(Math.max(e - t.length, 0)).fill(0); - return (0, i.concatBytes)([r, t]); - }), - (e.padEnd = (t, e = 32) => { - const r = new Uint8Array(Math.max(e - t.length, 0)).fill(0); - return (0, i.concatBytes)([t, r]); - }); - }, - 3742: function (t, e, r) { - 'use strict'; - var i = - (this && this.__createBinding) || - (Object.create - ? function (t, e, r, i) { - void 0 === i && (i = r); - var n = Object.getOwnPropertyDescriptor(e, r); - (n && !('get' in n ? !e.__esModule : n.writable || n.configurable)) || - (n = { - enumerable: !0, - get: function () { - return e[r]; - }, - }), - Object.defineProperty(t, i, n); - } - : function (t, e, r, i) { - void 0 === i && (i = r), (t[i] = e[r]); - }), - n = - (this && this.__exportStar) || - function (t, e) { - for (var r in t) 'default' === r || Object.prototype.hasOwnProperty.call(e, r) || i(e, t, r); - }; - Object.defineProperty(e, '__esModule', { value: !0 }), n(r(4979), e); - }, - 6982: function (t, e, r) { - 'use strict'; - var i = - (this && this.__createBinding) || - (Object.create - ? function (t, e, r, i) { - void 0 === i && (i = r); - var n = Object.getOwnPropertyDescriptor(e, r); - (n && !('get' in n ? !e.__esModule : n.writable || n.configurable)) || - (n = { - enumerable: !0, - get: function () { - return e[r]; - }, - }), - Object.defineProperty(t, i, n); - } - : function (t, e, r, i) { - void 0 === i && (i = r), (t[i] = e[r]); - }), - n = - (this && this.__setModuleDefault) || - (Object.create - ? function (t, e) { - Object.defineProperty(t, 'default', { enumerable: !0, value: e }); - } - : function (t, e) { - t.default = e; - }), - o = - (this && this.__importStar) || - function (t) { - if (t && t.__esModule) return t; - var e = {}; - if (null != t) for (var r in t) 'default' !== r && Object.prototype.hasOwnProperty.call(t, r) && i(e, t, r); - return n(e, t), e; - }; - Object.defineProperty(e, '__esModule', { value: !0 }), - (e.getEncryptionPublicKey = e.decryptSafely = e.decrypt = e.encryptSafely = e.encrypt = void 0); - const s = o(r(780)), - a = o(r(6885)), - h = r(3275); - function u({ publicKey: t, data: e, version: r }) { - if ((0, h.isNullish)(t)) throw new Error('Missing publicKey parameter'); - if ((0, h.isNullish)(e)) throw new Error('Missing data parameter'); - if ((0, h.isNullish)(r)) throw new Error('Missing version parameter'); - if ('x25519-xsalsa20-poly1305' === r) { - if ('string' != typeof e) throw new Error('Message data must be given as a string'); - const r = s.box.keyPair(); - let i; - try { - i = a.decodeBase64(t); - } catch (t) { - throw new Error('Bad public key'); - } - const n = a.decodeUTF8(e), - o = s.randomBytes(s.box.nonceLength), - h = s.box(n, o, i, r.secretKey); - return { - version: 'x25519-xsalsa20-poly1305', - nonce: a.encodeBase64(o), - ephemPublicKey: a.encodeBase64(r.publicKey), - ciphertext: a.encodeBase64(h), - }; - } - throw new Error('Encryption type/version not supported'); - } - function f({ encryptedData: t, privateKey: e }) { - if ((0, h.isNullish)(t)) throw new Error('Missing encryptedData parameter'); - if ((0, h.isNullish)(e)) throw new Error('Missing privateKey parameter'); - if ('x25519-xsalsa20-poly1305' === t.version) { - const r = c(e), - i = s.box.keyPair.fromSecretKey(r).secretKey, - n = a.decodeBase64(t.nonce), - o = a.decodeBase64(t.ciphertext), - h = a.decodeBase64(t.ephemPublicKey), - u = s.box.open(o, n, h, i); - try { - if (!u) throw new Error(); - const t = a.encodeUTF8(u); - if (!t) throw new Error(); - return t; - } catch (t) { - if (t && 'string' == typeof t.message && t.message.length) throw new Error(`Decryption failed: ${t.message}`); - throw new Error('Decryption failed.'); - } - } - throw new Error('Encryption type/version not supported.'); - } - function c(t) { - const e = Buffer.from(t, 'hex').toString('base64'); - return a.decodeBase64(e); - } - (e.encrypt = u), - (e.encryptSafely = function ({ publicKey: t, data: e, version: r }) { - if ((0, h.isNullish)(t)) throw new Error('Missing publicKey parameter'); - if ((0, h.isNullish)(e)) throw new Error('Missing data parameter'); - if ((0, h.isNullish)(r)) throw new Error('Missing version parameter'); - if ('object' == typeof e && e && 'toJSON' in e) - throw new Error('Cannot encrypt with toJSON property. Please remove toJSON property'); - const i = { data: e, padding: '' }, - n = Buffer.byteLength(JSON.stringify(i), 'utf-8') % 2048; - let o = 0; - return n > 0 && (o = 2048 - n - 16), (i.padding = '0'.repeat(o)), u({ publicKey: t, data: JSON.stringify(i), version: r }); - }), - (e.decrypt = f), - (e.decryptSafely = function ({ encryptedData: t, privateKey: e }) { - if ((0, h.isNullish)(t)) throw new Error('Missing encryptedData parameter'); - if ((0, h.isNullish)(e)) throw new Error('Missing privateKey parameter'); - return JSON.parse(f({ encryptedData: t, privateKey: e })).data; - }), - (e.getEncryptionPublicKey = function (t) { - const e = c(t), - r = s.box.keyPair.fromSecretKey(e).publicKey; - return a.encodeBase64(r); - }); - }, - 1091: function (t, e, r) { - 'use strict'; - var i = - (this && this.__createBinding) || - (Object.create - ? function (t, e, r, i) { - void 0 === i && (i = r); - var n = Object.getOwnPropertyDescriptor(e, r); - (n && !('get' in n ? !e.__esModule : n.writable || n.configurable)) || - (n = { - enumerable: !0, - get: function () { - return e[r]; - }, - }), - Object.defineProperty(t, i, n); - } - : function (t, e, r, i) { - void 0 === i && (i = r), (t[i] = e[r]); - }), - n = - (this && this.__exportStar) || - function (t, e) { - for (var r in t) 'default' === r || Object.prototype.hasOwnProperty.call(e, r) || i(e, t, r); - }; - Object.defineProperty(e, '__esModule', { value: !0 }), - (e.normalize = e.concatSig = void 0), - n(r(3066), e), - n(r(2853), e), - n(r(6982), e); - var o = r(3275); - Object.defineProperty(e, 'concatSig', { - enumerable: !0, - get: function () { - return o.concatSig; - }, - }), - Object.defineProperty(e, 'normalize', { - enumerable: !0, - get: function () { - return o.normalize; - }, - }); - }, - 3066: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), (e.extractPublicKey = e.recoverPersonalSignature = e.personalSign = void 0); - const i = r(2730), - n = r(3275); - function o(t, e) { - const r = (0, i.hashPersonalMessage)((0, n.legacyToBuffer)(t)); - return (0, n.recoverPublicKey)(r, e); - } - (e.personalSign = function ({ privateKey: t, data: e }) { - if ((0, n.isNullish)(e)) throw new Error('Missing data parameter'); - if ((0, n.isNullish)(t)) throw new Error('Missing privateKey parameter'); - const r = (0, n.legacyToBuffer)(e), - o = (0, i.hashPersonalMessage)(r), - s = (0, i.ecsign)(o, t); - return (0, n.concatSig)((0, i.toBuffer)(s.v), s.r, s.s); - }), - (e.recoverPersonalSignature = function ({ data: t, signature: e }) { - if ((0, n.isNullish)(t)) throw new Error('Missing data parameter'); - if ((0, n.isNullish)(e)) throw new Error('Missing signature parameter'); - const r = o(t, e), - s = (0, i.publicToAddress)(r); - return (0, i.bufferToHex)(s); - }), - (e.extractPublicKey = function ({ data: t, signature: e }) { - if ((0, n.isNullish)(t)) throw new Error('Missing data parameter'); - if ((0, n.isNullish)(e)) throw new Error('Missing signature parameter'); - return `0x${o(t, e).toString('hex')}`; - }); - }, - 2853: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), - (e.recoverTypedSignature = - e.signTypedData = - e.typedSignatureHash = - e.TypedDataUtils = - e.TYPED_MESSAGE_SCHEMA = - e.SignTypedDataVersion = - void 0); - const i = r(2730), - n = r(8009), - o = r(8986), - s = r(3742), - a = r(2451), - h = r(2145), - u = r(3275); - var f; - function c(t, e) { - if (!Object.keys(f).includes(t)) throw new Error(`Invalid version: '${t}'`); - if (e && !e.includes(t)) throw new Error(`SignTypedDataVersion not allowed: '${t}'. Allowed versions are: ${e.join(', ')}`); - } - function l(t, e) { - (0, a.assert)(null !== e, `Unable to encode value: Invalid number. Expected a valid number value, but received "${e}".`); - const r = BigInt(e), - i = (0, o.getLength)(t), - n = BigInt(2) ** BigInt(i) - BigInt(1); - return (0, a.assert)(r >= -n && r <= n, `Unable to encode value: Number "${e}" is out of range for type "${t}".`), r; - } - function d(t) { - let e = BigInt(0); - for (let r = 0; r < t.length; r++) { - const i = BigInt(t.charCodeAt(r) - 48); - (e *= BigInt(10)), (e += i >= 49 ? i - BigInt(49) + BigInt(10) : i >= 17 ? i - BigInt(17) + BigInt(10) : i); - } - return (0, s.padStart)((0, a.bigIntToBytes)(e), 20); - } - function p(t, e, r, o, u) { - if ((c(u, [f.V3, f.V4]), void 0 !== t[r])) - return [ - 'bytes32', - u === f.V4 && null == o - ? '0x0000000000000000000000000000000000000000000000000000000000000000' - : (0, i.arrToBufArr)((0, h.keccak256)(m(r, o, t, u))), - ]; - if ('function' === r) throw new Error('Unsupported or invalid type: "function"'); - if (void 0 === o) throw new Error(`missing value for field ${e} of type ${r}`); - if ('address' === r) { - if ('number' == typeof o) return ['address', (0, s.padStart)((0, a.numberToBytes)(o), 20)]; - if ((0, a.isStrictHexString)(o)) return ['address', (0, a.add0x)(o)]; - if ('string' == typeof o) return ['address', d(o).subarray(0, 20)]; - } - if ('bool' === r) return ['bool', Boolean(o)]; - if ('bytes' === r) - return ( - 'number' == typeof o - ? (o = (0, a.numberToBytes)(o)) - : (0, a.isStrictHexString)(o) || '0x' === o - ? (o = (0, a.hexToBytes)(o)) - : 'string' == typeof o && (o = (0, a.stringToBytes)(o)), - ['bytes32', (0, i.arrToBufArr)((0, h.keccak256)(o))] - ); - if (r.startsWith('bytes') && 'bytes' !== r && !r.includes('[')) - return 'number' == typeof o - ? o < 0 - ? ['bytes32', new Uint8Array(32)] - : ['bytes32', (0, a.bigIntToBytes)(BigInt(o))] - : (0, a.isStrictHexString)(o) - ? ['bytes32', (0, a.hexToBytes)(o)] - : ['bytes32', o]; - if (r.startsWith('int') && !r.includes('[')) { - const t = l(r, o); - return t >= BigInt(0) ? ['uint256', t] : ['int256', t]; - } - if ('string' === r) - return ( - (o = 'number' == typeof o ? (0, a.numberToBytes)(o) : (0, a.stringToBytes)(null != o ? o : '')), - ['bytes32', (0, i.arrToBufArr)((0, h.keccak256)(o))] - ); - if (r.endsWith(']')) { - if (u === f.V3) throw new Error('Arrays are unimplemented in encodeData; use V4 extension'); - const s = r.slice(0, r.lastIndexOf('[')), - a = o.map(r => p(t, e, s, r, u)); - return [ - 'bytes32', - (0, i.arrToBufArr)( - (0, h.keccak256)( - (0, n.encode)( - a.map(([t]) => t), - a.map(([, t]) => t) - ) - ) - ), - ]; - } - return [r, o]; - } - function m(t, e, r, o) { - c(o, [f.V3, f.V4]); - const s = ['bytes32'], - a = [v(t, r)]; - for (const i of r[t]) { - if (o === f.V3 && void 0 === e[i.name]) continue; - const [t, n] = p(r, i.name, i.type, e[i.name], o); - s.push(t), a.push(n); - } - return (0, i.arrToBufArr)((0, n.encode)(s, a)); - } - function g(t, e) { - let r = ''; - const i = b(t, e); - i.delete(t); - const n = [t, ...Array.from(i).sort()]; - for (const t of n) { - if (!e[t]) throw new Error(`No type definition specified: ${t}`); - r += `${t}(${e[t].map(({ name: t, type: e }) => `${e} ${t}`).join(',')})`; - } - return r; - } - function b(t, e, r = new Set()) { - if ('string' != typeof t) throw new Error(`Invalid findTypeDependencies input ${JSON.stringify(t)}`); - const i = t.match(/^\w*/u); - if ((([t] = i), r.has(t) || void 0 === e[t])) return r; - r.add(t); - for (const i of e[t]) b(i.type, e, r); - return r; - } - function y(t, e, r, n) { - c(n, [f.V3, f.V4]); - const o = m(t, e, r, n), - s = (0, h.keccak256)(o); - return (0, i.arrToBufArr)(s); - } - function v(t, e) { - const r = (0, a.stringToBytes)(g(t, e)); - return (0, i.arrToBufArr)((0, h.keccak256)(r)); - } - function w(t) { - const r = {}; - for (const i in e.TYPED_MESSAGE_SCHEMA.properties) t[i] && (r[i] = t[i]); - return 'types' in r && (r.types = Object.assign({ EIP712Domain: [] }, r.types)), r; - } - function _(t, e) { - c(e, [f.V3, f.V4]); - const r = w(t), - { domain: i } = r; - return y('EIP712Domain', i, { EIP712Domain: r.types.EIP712Domain }, e); - } - function M(t, e) { - if ((0, o.isArrayType)(t) && Array.isArray(e)) { - const [r] = (0, o.getArrayType)(t); - return e.map(t => M(r, t)); - } - if ('address' === t) { - if ('number' == typeof e) return (0, s.padStart)((0, a.numberToBytes)(e), 20); - if ((0, a.isStrictHexString)(e)) return (0, s.padStart)((0, a.hexToBytes)(e).subarray(0, 20), 20); - if (e instanceof Uint8Array) return (0, s.padStart)(e.subarray(0, 20), 20); - } - if ('bool' === t) return Boolean(e); - if (t.startsWith('bytes') && 'bytes' !== t) { - const r = (0, o.getByteLength)(t); - if ('number' == typeof e) return e < 0 ? new Uint8Array() : (0, a.numberToBytes)(e).subarray(0, r); - if ((0, a.isStrictHexString)(e)) return (0, a.hexToBytes)(e).subarray(0, r); - if (e instanceof Uint8Array) return e.subarray(0, r); - } - if (t.startsWith('uint') && 'number' == typeof e) return Math.abs(e); - if (t.startsWith('int') && 'number' == typeof e) { - const r = (0, o.getLength)(t); - return BigInt.asIntN(r, BigInt(e)); - } - return e; - } - function E(t, e) { - return e.map(e => { - if ('string' == typeof e || 'number' == typeof e || 'bigint' == typeof e) { - const r = l(t, e); - if (r >= BigInt(0)) return (0, s.padStart)((0, a.bigIntToBytes)(r), 32); - const i = (0, o.getLength)(t), - n = BigInt.asIntN(i, r); - return (0, a.signedBigIntToBytes)(n, 32); - } - return e; - }); - } - function S(t) { - const e = new Error('Expect argument to be non-empty array'); - if ('object' != typeof t || !('length' in t) || !t.length) throw e; - const r = t.map(({ name: t, type: e, value: r }) => { - if ('address[]' === e) - return { - name: t, - type: 'bytes32[]', - value: - ((i = r), - i.map(t => - 'number' == typeof t - ? (0, s.padStart)((0, a.numberToBytes)(t), 32) - : (0, a.isStrictHexString)(t) - ? (0, s.padStart)((0, a.hexToBytes)(t).subarray(0, 32), 32) - : t instanceof Uint8Array - ? (0, s.padStart)(t.subarray(0, 32), 32) - : t - )), - }; - var i; - if (e.startsWith('int') && (0, o.isArrayType)(e)) { - const [i, n] = (0, o.getArrayType)(e); - return { name: t, type: `bytes32[${null != n ? n : ''}]`, value: E(i, r) }; - } - return { name: t, type: e, value: M(e, r) }; - }), - f = r.map(t => ('bytes' !== t.type ? t.value : (0, u.legacyToBuffer)(t.value))), - c = r.map(t => { - if ('function' === t.type) throw new Error('Unsupported or invalid type: "function"'); - return t.type; - }), - l = t.map(t => { - if (!t.name) throw e; - return `${t.type} ${t.name}`; - }); - return (0, i.arrToBufArr)( - (0, h.keccak256)( - (0, n.encodePacked)( - ['bytes32', 'bytes32'], - [(0, h.keccak256)((0, n.encodePacked)(['string[]'], [l], !0)), (0, h.keccak256)((0, n.encodePacked)(c, f, !0))] - ) - ) - ); - } - !(function (t) { - (t.V1 = 'V1'), (t.V3 = 'V3'), (t.V4 = 'V4'); - })((f = e.SignTypedDataVersion || (e.SignTypedDataVersion = {}))), - (e.TYPED_MESSAGE_SCHEMA = { - type: 'object', - properties: { - types: { - type: 'object', - additionalProperties: { - type: 'array', - items: { type: 'object', properties: { name: { type: 'string' }, type: { type: 'string' } }, required: ['name', 'type'] }, - }, - }, - primaryType: { type: 'string' }, - domain: { type: 'object' }, - message: { type: 'object' }, - }, - required: ['types', 'primaryType', 'domain', 'message'], - }), - (e.TypedDataUtils = { - encodeData: m, - encodeType: g, - findTypeDependencies: b, - hashStruct: y, - hashType: v, - sanitizeData: w, - eip712Hash: function (t, e) { - c(e, [f.V3, f.V4]); - const r = w(t), - n = [(0, a.hexToBytes)('1901')]; - return ( - n.push(_(t, e)), - 'EIP712Domain' !== r.primaryType && n.push(y(r.primaryType, r.message, r.types, e)), - (0, i.arrToBufArr)((0, h.keccak256)((0, a.concatBytes)(n))) - ); - }, - eip712DomainHash: _, - }), - (e.typedSignatureHash = function (t) { - const e = S(t); - return (0, a.bytesToHex)(e); - }), - (e.signTypedData = function ({ privateKey: t, data: r, version: n }) { - if ((c(n), (0, u.isNullish)(r))) throw new Error('Missing data parameter'); - if ((0, u.isNullish)(t)) throw new Error('Missing private key parameter'); - const o = n === f.V1 ? S(r) : e.TypedDataUtils.eip712Hash(r, n), - s = (0, i.ecsign)(o, t); - return (0, u.concatSig)((0, i.arrToBufArr)((0, a.bigIntToBytes)(s.v)), s.r, s.s); - }), - (e.recoverTypedSignature = function ({ data: t, signature: r, version: n }) { - if ((c(n), (0, u.isNullish)(t))) throw new Error('Missing data parameter'); - if ((0, u.isNullish)(r)) throw new Error('Missing signature parameter'); - const o = n === f.V1 ? S(t) : e.TypedDataUtils.eip712Hash(t, n), - s = (0, u.recoverPublicKey)(o, r), - h = (0, i.publicToAddress)(s); - return (0, a.bytesToHex)(h); - }); - }, - 3275: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), - (e.normalize = e.recoverPublicKey = e.concatSig = e.legacyToBuffer = e.isNullish = e.padWithZeroes = void 0); - const i = r(2730), - n = r(2451); - function o(t, e) { - if ('' !== t && !/^[a-f0-9]+$/iu.test(t)) throw new Error(`Expected an unprefixed hex string. Received: ${t}`); - if (e < 0) throw new Error(`Expected a non-negative integer target length. Received: ${e}`); - return String.prototype.padStart.call(t, e, '0'); - } - function s(t) { - return null == t; - } - (e.padWithZeroes = o), - (e.isNullish = s), - (e.legacyToBuffer = function (t) { - return 'string' != typeof t || (0, i.isHexString)(t) ? (0, i.toBuffer)(t) : Buffer.from(t); - }), - (e.concatSig = function (t, e, r) { - const s = (0, i.fromSigned)(e), - a = (0, i.fromSigned)(r), - h = (0, i.bufferToInt)(t), - u = o((0, i.toUnsigned)(s).toString('hex'), 64), - f = o((0, i.toUnsigned)(a).toString('hex'), 64), - c = (0, n.remove0x)((0, n.numberToHex)(h)); - return (0, n.add0x)(u.concat(f, c)); - }), - (e.recoverPublicKey = function (t, e) { - const r = (0, i.fromRpcSig)(e); - return (0, i.ecrecover)(t, r.v, r.r, r.s); - }), - (e.normalize = function (t) { - if (!s(t)) { - if ('number' == typeof t) { - if (t < 0) return '0x'; - const e = (0, n.numberToBytes)(t); - t = (0, n.bytesToHex)(e); - } - if ('string' != typeof t) { - let e = 'eth-sig-util.normalize() requires hex string or integer input.'; - throw ((e += ` received ${typeof t}: ${t}`), new Error(e)); - } - return (0, n.add0x)(t.toLowerCase()); - } - }); - }, - 2145: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), (e.keccak512 = e.keccak384 = e.keccak256 = e.keccak224 = void 0); - const i = r(5426), - n = r(664); - (e.keccak224 = (0, n.wrapHash)(i.keccak_224)), - (e.keccak256 = (() => { - const t = (0, n.wrapHash)(i.keccak_256); - return (t.create = i.keccak_256.create), t; - })()), - (e.keccak384 = (0, n.wrapHash)(i.keccak_384)), - (e.keccak512 = (0, n.wrapHash)(i.keccak_512)); - }, - 664: function (t, e, r) { - 'use strict'; - t = r.nmd(t); - var i = - (this && this.__importDefault) || - function (t) { - return t && t.__esModule ? t : { default: t }; - }; - Object.defineProperty(e, '__esModule', { value: !0 }), - (e.crypto = - e.wrapHash = - e.equalsBytes = - e.hexToBytes = - e.bytesToUtf8 = - e.utf8ToBytes = - e.createView = - e.concatBytes = - e.toHex = - e.bytesToHex = - e.assertBytes = - e.assertBool = - void 0); - const n = i(r(7320)), - o = r(8089), - s = n.default.bool; - e.assertBool = s; - const a = n.default.bytes; - e.assertBytes = a; - var h = r(8089); - Object.defineProperty(e, 'bytesToHex', { - enumerable: !0, - get: function () { - return h.bytesToHex; - }, - }), - Object.defineProperty(e, 'toHex', { - enumerable: !0, - get: function () { - return h.bytesToHex; - }, - }), - Object.defineProperty(e, 'concatBytes', { - enumerable: !0, - get: function () { - return h.concatBytes; - }, - }), - Object.defineProperty(e, 'createView', { - enumerable: !0, - get: function () { - return h.createView; - }, - }), - Object.defineProperty(e, 'utf8ToBytes', { - enumerable: !0, - get: function () { - return h.utf8ToBytes; - }, - }), - (e.bytesToUtf8 = function (t) { - if (!(t instanceof Uint8Array)) throw new TypeError('bytesToUtf8 expected Uint8Array, got ' + typeof t); - return new TextDecoder().decode(t); - }), - (e.hexToBytes = function (t) { - const e = t.startsWith('0x') ? t.substring(2) : t; - return (0, o.hexToBytes)(e); - }), - (e.equalsBytes = function (t, e) { - if (t.length !== e.length) return !1; - for (let r = 0; r < t.length; r++) if (t[r] !== e[r]) return !1; - return !0; - }), - (e.wrapHash = function (t) { - return e => (n.default.bytes(e), t(e)); - }), - (e.crypto = (() => { - const e = 'object' == typeof globalThis && 'crypto' in globalThis ? globalThis.crypto : void 0, - r = 'function' == typeof t.require && t.require.bind(t); - return { node: r && !e ? r('crypto') : void 0, web: e }; - })()); - }, - 708: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }); - var i, - n = ((i = r(1227)) && i.__esModule ? i : { default: i }).default.call(void 0, 'metamask'); - (e.createProjectLogger = function (t) { - return n.extend(t); - }), - (e.createModuleLogger = function (t, e) { - return t.extend(e); - }); - }, - 4466: (t, e) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }); - var r = (t, e, r) => { - if (!e.has(t)) throw TypeError('Cannot ' + r); - }; - (e.__privateGet = (t, e, i) => (r(t, e, 'read from private field'), i ? i.call(t) : e.get(t))), - (e.__privateAdd = (t, e, r) => { - if (e.has(t)) throw TypeError('Cannot add the same private member more than once'); - e instanceof WeakSet ? e.add(t) : e.set(t, r); - }), - (e.__privateSet = (t, e, i, n) => (r(t, e, 'write to private field'), n ? n.call(t, i) : e.set(t, i), i)); - }, - 3889: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }); - var i = r(593), - n = r(1249), - o = r(7884), - s = o.refine.call( - void 0, - o.string.call(void 0), - 'Version', - t => null !== n.valid.call(void 0, t) || `Expected SemVer version, got "${t}"` - ), - a = o.refine.call( - void 0, - o.string.call(void 0), - 'Version range', - t => null !== n.validRange.call(void 0, t) || `Expected SemVer range, got "${t}"` - ); - (e.VersionStruct = s), - (e.VersionRangeStruct = a), - (e.isValidSemVerVersion = function (t) { - return o.is.call(void 0, t, s); - }), - (e.isValidSemVerRange = function (t) { - return o.is.call(void 0, t, a); - }), - (e.assertIsSemVerVersion = function (t) { - i.assertStruct.call(void 0, t, s); - }), - (e.assertIsSemVerRange = function (t) { - i.assertStruct.call(void 0, t, a); - }), - (e.gtVersion = function (t, e) { - return n.gt.call(void 0, t, e); - }), - (e.gtRange = function (t, e) { - return n.gtr.call(void 0, t, e); - }), - (e.satisfiesVersionRange = function (t, e) { - return n.satisfies.call(void 0, t, e, { includePrerelease: !0 }); - }); - }, - 6587: (t, e) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), - (e.createDeferredPromise = function ({ suppressUnhandledRejection: t = !1 } = {}) { - let e, r; - const i = new Promise((t, i) => { - (e = t), (r = i); - }); - return t && i.catch(t => {}), { promise: i, resolve: e, reject: r }; - }); - }, - 5671: (t, e) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }); - var r = (t => ( - (t[(t.Millisecond = 1)] = 'Millisecond'), - (t[(t.Second = 1e3)] = 'Second'), - (t[(t.Minute = 6e4)] = 'Minute'), - (t[(t.Hour = 36e5)] = 'Hour'), - (t[(t.Day = 864e5)] = 'Day'), - (t[(t.Week = 6048e5)] = 'Week'), - (t[(t.Year = 31536e6)] = 'Year'), - t - ))(r || {}), - i = (t, e) => { - if (!(t => Number.isInteger(t) && t >= 0)(t)) throw new Error(`"${e}" must be a non-negative integer. Received: "${t}".`); - }; - (e.Duration = r), - (e.inMilliseconds = function (t, e) { - return i(t, 'count'), t * e; - }), - (e.timeSince = function (t) { - return i(t, 'timestamp'), Date.now() - t; - }); - }, - 7479: () => {}, - 5217: (t, e, r) => { - 'use strict'; - function i(t, e) { - return null != t ? t : e(); - } - Object.defineProperty(e, '__esModule', { value: !0 }); - var n = r(593), - o = r(7884); - e.base64 = (t, e = {}) => { - const r = i(e.paddingRequired, () => !1), - s = i(e.characterSet, () => 'base64'); - let a, h; - return ( - 'base64' === s ? (a = String.raw`[A-Za-z0-9+\/]`) : (n.assert.call(void 0, 'base64url' === s), (a = String.raw`[-_A-Za-z0-9]`)), - (h = r - ? new RegExp(`^(?:${a}{4})*(?:${a}{3}=|${a}{2}==)?$`, 'u') - : new RegExp(`^(?:${a}{4})*(?:${a}{2,3}|${a}{3}=|${a}{2}==)?$`, 'u')), - o.pattern.call(void 0, t, h) - ); - }; - }, - 593: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }); - var i = r(2173), - n = r(7884); - function o(t, e) { - return Boolean( - 'string' == - typeof (function (t) { - let e, - r = t[0], - i = 1; - for (; i < t.length; ) { - const n = t[i], - o = t[i + 1]; - if (((i += 2), ('optionalAccess' === n || 'optionalCall' === n) && null == r)) return; - 'access' === n || 'optionalAccess' === n - ? ((e = r), (r = o(r))) - : ('call' !== n && 'optionalCall' !== n) || ((r = o((...t) => r.call(e, ...t))), (e = void 0)); - } - return r; - })([t, 'optionalAccess', t => t.prototype, 'optionalAccess', t => t.constructor, 'optionalAccess', t => t.name]) - ) - ? new t({ message: e }) - : t({ message: e }); - } - var s = class extends Error { - constructor(t) { - super(t.message), (this.code = 'ERR_ASSERTION'); - } - }; - (e.AssertionError = s), - (e.assert = function (t, e = 'Assertion failed.', r = s) { - if (!t) { - if (e instanceof Error) throw e; - throw o(r, e); - } - }), - (e.assertStruct = function (t, e, r = 'Assertion failed', a = s) { - try { - n.assert.call(void 0, t, e); - } catch (t) { - throw o( - a, - `${r}: ${(function (t) { - return i.getErrorMessage.call(void 0, t).replace(/\.$/u, ''); - })(t)}.` - ); - } - }), - (e.assertExhaustive = function (t) { - throw new Error('Invalid branch reached. Should be detected during compilation.'); - }); - }, - 9162: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }); - var i = r(2591), - n = r(593), - o = r(7884), - s = o.union.call(void 0, [o.number.call(void 0), o.bigint.call(void 0), o.string.call(void 0), i.StrictHexStruct]), - a = o.coerce.call(void 0, o.number.call(void 0), s, Number), - h = o.coerce.call(void 0, o.bigint.call(void 0), s, BigInt), - u = - (o.union.call(void 0, [i.StrictHexStruct, o.instance.call(void 0, Uint8Array)]), - o.coerce.call(void 0, o.instance.call(void 0, Uint8Array), o.union.call(void 0, [i.StrictHexStruct]), i.hexToBytes)), - f = o.coerce.call(void 0, i.StrictHexStruct, o.instance.call(void 0, Uint8Array), i.bytesToHex); - (e.createNumber = function (t) { - try { - const e = o.create.call(void 0, t, a); - return n.assert.call(void 0, Number.isFinite(e), `Expected a number-like value, got "${t}".`), e; - } catch (e) { - if (e instanceof o.StructError) throw new Error(`Expected a number-like value, got "${t}".`); - throw e; - } - }), - (e.createBigInt = function (t) { - try { - return o.create.call(void 0, t, h); - } catch (t) { - if (t instanceof o.StructError) throw new Error(`Expected a number-like value, got "${String(t.value)}".`); - throw t; - } - }), - (e.createBytes = function (t) { - if ('string' == typeof t && '0x' === t.toLowerCase()) return new Uint8Array(); - try { - return o.create.call(void 0, t, u); - } catch (t) { - if (t instanceof o.StructError) throw new Error(`Expected a bytes-like value, got "${String(t.value)}".`); - throw t; - } - }), - (e.createHex = function (t) { - if ((t instanceof Uint8Array && 0 === t.length) || ('string' == typeof t && '0x' === t.toLowerCase())) return '0x'; - try { - return o.create.call(void 0, t, f); - } catch (t) { - if (t instanceof o.StructError) throw new Error(`Expected a bytes-like value, got "${String(t.value)}".`); - throw t; - } - }); - }, - 6815: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }); - var i = r(5217), - n = r(7884), - o = n.size.call(void 0, i.base64.call(void 0, n.string.call(void 0), { paddingRequired: !0 }), 44, 44); - e.ChecksumStruct = o; - }, - 5174: () => {}, - 2173: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }); - var i = r(2706), - n = r(905); - function o(t) { - return 'object' == typeof t && null !== t && 'code' in t; - } - function s(t) { - return 'object' == typeof t && null !== t && 'message' in t; - } - (e.isErrorWithCode = o), - (e.isErrorWithMessage = s), - (e.isErrorWithStack = function (t) { - return 'object' == typeof t && null !== t && 'stack' in t; - }), - (e.getErrorMessage = function (t) { - return s(t) && 'string' == typeof t.message ? t.message : i.isNullOrUndefined.call(void 0, t) ? '' : String(t); - }), - (e.wrapError = function (t, e) { - if ((r = t) instanceof Error || (i.isObject.call(void 0, r) && 'Error' === r.constructor.name)) { - let r; - return ( - (r = 2 === Error.length ? new Error(e, { cause: t }) : new (0, n.ErrorWithCause)(e, { cause: t })), - o(t) && (r.code = t.code), - r - ); - } - var r; - return e.length > 0 ? new Error(`${String(t)}: ${e}`) : new Error(String(t)); - }); - }, - 3356: () => {}, - 8657: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }); - var i = r(593), - n = r(2706), - o = r(7884), - s = t => o.object.call(void 0, t); - function a({ path: t, branch: e }) { - const r = t[t.length - 1]; - return n.hasProperty.call(void 0, e[e.length - 2], r); - } - function h(t) { - return new (0, o.Struct)({ - ...t, - type: `optional ${t.type}`, - validator: (e, r) => !a(r) || t.validator(e, r), - refiner: (e, r) => !a(r) || t.refiner(e, r), - }); - } - var u = o.union.call(void 0, [ - o.literal.call(void 0, null), - o.boolean.call(void 0), - o.define.call(void 0, 'finite number', t => o.is.call(void 0, t, o.number.call(void 0)) && Number.isFinite(t)), - o.string.call(void 0), - o.array.call( - void 0, - o.lazy.call(void 0, () => u) - ), - o.record.call( - void 0, - o.string.call(void 0), - o.lazy.call(void 0, () => u) - ), - ]), - f = o.coerce.call( - void 0, - u, - o.any.call(void 0), - t => ( - i.assertStruct.call(void 0, t, u), - JSON.parse( - JSON.stringify(t, (t, e) => { - if ('__proto__' !== t && 'constructor' !== t) return e; - }) - ) - ) - ); - function c(t) { - return o.create.call(void 0, t, f); - } - var l = o.literal.call(void 0, '2.0'), - d = o.nullable.call(void 0, o.union.call(void 0, [o.number.call(void 0), o.string.call(void 0)])), - p = s({ code: o.integer.call(void 0), message: o.string.call(void 0), data: h(f), stack: h(o.string.call(void 0)) }), - m = o.union.call(void 0, [o.record.call(void 0, o.string.call(void 0), f), o.array.call(void 0, f)]), - g = s({ id: d, jsonrpc: l, method: o.string.call(void 0), params: h(m) }), - b = s({ jsonrpc: l, method: o.string.call(void 0), params: h(m) }), - y = o.object.call(void 0, { - id: d, - jsonrpc: l, - result: o.optional.call(void 0, o.unknown.call(void 0)), - error: o.optional.call(void 0, p), - }), - v = s({ id: d, jsonrpc: l, result: f }), - w = s({ id: d, jsonrpc: l, error: p }), - _ = o.union.call(void 0, [v, w]); - (e.object = s), - (e.exactOptional = h), - (e.UnsafeJsonStruct = u), - (e.JsonStruct = f), - (e.isValidJson = function (t) { - try { - return c(t), !0; - } catch (t) { - return !1; - } - }), - (e.getSafeJson = c), - (e.getJsonSize = function (t) { - i.assertStruct.call(void 0, t, f, 'Invalid JSON value'); - const e = JSON.stringify(t); - return new TextEncoder().encode(e).byteLength; - }), - (e.jsonrpc2 = '2.0'), - (e.JsonRpcVersionStruct = l), - (e.JsonRpcIdStruct = d), - (e.JsonRpcErrorStruct = p), - (e.JsonRpcParamsStruct = m), - (e.JsonRpcRequestStruct = g), - (e.JsonRpcNotificationStruct = b), - (e.isJsonRpcNotification = function (t) { - return o.is.call(void 0, t, b); - }), - (e.assertIsJsonRpcNotification = function (t, e) { - i.assertStruct.call(void 0, t, b, 'Invalid JSON-RPC notification', e); - }), - (e.isJsonRpcRequest = function (t) { - return o.is.call(void 0, t, g); - }), - (e.assertIsJsonRpcRequest = function (t, e) { - i.assertStruct.call(void 0, t, g, 'Invalid JSON-RPC request', e); - }), - (e.PendingJsonRpcResponseStruct = y), - (e.JsonRpcSuccessStruct = v), - (e.JsonRpcFailureStruct = w), - (e.JsonRpcResponseStruct = _), - (e.isPendingJsonRpcResponse = function (t) { - return o.is.call(void 0, t, y); - }), - (e.assertIsPendingJsonRpcResponse = function (t, e) { - i.assertStruct.call(void 0, t, y, 'Invalid pending JSON-RPC response', e); - }), - (e.isJsonRpcResponse = function (t) { - return o.is.call(void 0, t, _); - }), - (e.assertIsJsonRpcResponse = function (t, e) { - i.assertStruct.call(void 0, t, _, 'Invalid JSON-RPC response', e); - }), - (e.isJsonRpcSuccess = function (t) { - return o.is.call(void 0, t, v); - }), - (e.assertIsJsonRpcSuccess = function (t, e) { - i.assertStruct.call(void 0, t, v, 'Invalid JSON-RPC success response', e); - }), - (e.isJsonRpcFailure = function (t) { - return o.is.call(void 0, t, w); - }), - (e.assertIsJsonRpcFailure = function (t, e) { - i.assertStruct.call(void 0, t, w, 'Invalid JSON-RPC failure response', e); - }), - (e.isJsonRpcError = function (t) { - return o.is.call(void 0, t, p); - }), - (e.assertIsJsonRpcError = function (t, e) { - i.assertStruct.call(void 0, t, p, 'Invalid JSON-RPC error', e); - }), - (e.getJsonRpcIdValidator = function (t) { - const { - permitEmptyString: e, - permitFractions: r, - permitNull: i, - } = { permitEmptyString: !0, permitFractions: !1, permitNull: !0, ...t }; - return t => - Boolean( - ('number' == typeof t && (r || Number.isInteger(t))) || ('string' == typeof t && (e || t.length > 0)) || (i && null === t) - ); - }); - }, - 2591: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }); - var i = r(593), - n = r(5426), - o = r(7884), - s = r(4927), - a = 48, - h = 58, - u = 87, - f = (function () { - const t = []; - return () => { - if (0 === t.length) for (let e = 0; e < 256; e++) t.push(e.toString(16).padStart(2, '0')); - return t; - }; - })(); - function c(t) { - return t instanceof Uint8Array; - } - function l(t) { - i.assert.call(void 0, c(t), 'Value must be a Uint8Array.'); - } - function d(t) { - if ((l(t), 0 === t.length)) return '0x'; - const e = f(), - r = new Array(t.length); - for (let i = 0; i < t.length; i++) r[i] = e[t[i]]; - return B(r.join('')); - } - function p(t) { - l(t); - const e = d(t); - return BigInt(e); - } - function m(t) { - if ( - '0x' === - (function (t) { - let e, - r = t[0], - i = 1; - for (; i < t.length; ) { - const n = t[i], - o = t[i + 1]; - if (((i += 2), ('optionalAccess' === n || 'optionalCall' === n) && null == r)) return; - 'access' === n || 'optionalAccess' === n - ? ((e = r), (r = o(r))) - : ('call' !== n && 'optionalCall' !== n) || ((r = o((...t) => r.call(e, ...t))), (e = void 0)); - } - return r; - })([t, 'optionalAccess', t => t.toLowerCase, 'optionalCall', t => t()]) - ) - return new Uint8Array(); - A(t); - const e = I(t).toLowerCase(), - r = e.length % 2 == 0 ? e : `0${e}`, - i = new Uint8Array(r.length / 2); - for (let t = 0; t < i.length; t++) { - const e = r.charCodeAt(2 * t), - n = r.charCodeAt(2 * t + 1), - o = e - (e < h ? a : u), - s = n - (n < h ? a : u); - i[t] = 16 * o + s; - } - return i; - } - function g(t) { - return ( - i.assert.call(void 0, 'bigint' == typeof t, 'Value must be a bigint.'), - i.assert.call(void 0, t >= BigInt(0), 'Value must be a non-negative bigint.'), - m(t.toString(16)) - ); - } - function b(t) { - return ( - i.assert.call(void 0, 'number' == typeof t, 'Value must be a number.'), - i.assert.call(void 0, t >= 0, 'Value must be a non-negative number.'), - i.assert.call(void 0, Number.isSafeInteger(t), 'Value is not a safe integer. Use `bigIntToBytes` instead.'), - m(t.toString(16)) - ); - } - function y(t) { - return i.assert.call(void 0, 'string' == typeof t, 'Value must be a string.'), new TextEncoder().encode(t); - } - function v(t) { - if ('bigint' == typeof t) return g(t); - if ('number' == typeof t) return b(t); - if ('string' == typeof t) return t.startsWith('0x') ? m(t) : y(t); - if (c(t)) return t; - throw new TypeError(`Unsupported value type: "${typeof t}".`); - } - var w = o.pattern.call(void 0, o.string.call(void 0), /^(?:0x)?[0-9a-f]+$/iu), - _ = o.pattern.call(void 0, o.string.call(void 0), /^0x[0-9a-f]+$/iu), - M = o.pattern.call(void 0, o.string.call(void 0), /^0x[0-9a-f]{40}$/u), - E = o.pattern.call(void 0, o.string.call(void 0), /^0x[0-9a-fA-F]{40}$/u); - function S(t) { - return o.is.call(void 0, t, w); - } - function x(t) { - return o.is.call(void 0, t, _); - } - function A(t) { - i.assert.call(void 0, S(t), 'Value must be a hexadecimal string.'); - } - function k(t) { - i.assert.call(void 0, o.is.call(void 0, t, E), 'Invalid hex address.'); - const e = I(t.toLowerCase()), - r = I(d(n.keccak_256.call(void 0, e))); - return `0x${e - .split('') - .map((t, e) => { - const n = r[e]; - return ( - i.assert.call(void 0, o.is.call(void 0, n, o.string.call(void 0)), 'Hash shorter than address.'), - parseInt(n, 16) > 7 ? t.toUpperCase() : t - ); - }) - .join('')}`; - } - function R(t) { - return !!o.is.call(void 0, t, E) && k(t) === t; - } - function B(t) { - return t.startsWith('0x') ? t : t.startsWith('0X') ? `0x${t.substring(2)}` : `0x${t}`; - } - function I(t) { - return t.startsWith('0x') || t.startsWith('0X') ? t.substring(2) : t; - } - (e.HexStruct = w), - (e.StrictHexStruct = _), - (e.HexAddressStruct = M), - (e.HexChecksumAddressStruct = E), - (e.isHexString = S), - (e.isStrictHexString = x), - (e.assertIsHexString = A), - (e.assertIsStrictHexString = function (t) { - i.assert.call(void 0, x(t), 'Value must be a hexadecimal string, starting with "0x".'); - }), - (e.isValidHexAddress = function (t) { - return o.is.call(void 0, t, M) || R(t); - }), - (e.getChecksumAddress = k), - (e.isValidChecksumAddress = R), - (e.add0x = B), - (e.remove0x = I), - (e.isBytes = c), - (e.assertIsBytes = l), - (e.bytesToHex = d), - (e.bytesToBigInt = p), - (e.bytesToSignedBigInt = function (t) { - l(t); - let e = BigInt(0); - for (const r of t) e = (e << BigInt(8)) + BigInt(r); - return BigInt.asIntN(8 * t.length, e); - }), - (e.bytesToNumber = function (t) { - l(t); - const e = p(t); - return ( - i.assert.call(void 0, e <= BigInt(Number.MAX_SAFE_INTEGER), 'Number is not a safe integer. Use `bytesToBigInt` instead.'), - Number(e) - ); - }), - (e.bytesToString = function (t) { - return l(t), new TextDecoder().decode(t); - }), - (e.bytesToBase64 = function (t) { - return l(t), s.base64.encode(t); - }), - (e.hexToBytes = m), - (e.bigIntToBytes = g), - (e.signedBigIntToBytes = function (t, e) { - i.assert.call(void 0, 'bigint' == typeof t, 'Value must be a bigint.'), - i.assert.call(void 0, 'number' == typeof e, 'Byte length must be a number.'), - i.assert.call(void 0, e > 0, 'Byte length must be greater than 0.'), - i.assert.call( - void 0, - (function (t, e) { - i.assert.call(void 0, e > 0); - const r = t >> BigInt(31); - return !(((~t & r) + (t & ~r)) >> BigInt(8 * e - 1)); - })(t, e), - 'Byte length is too small to represent the given value.' - ); - let r = t; - const n = new Uint8Array(e); - for (let t = 0; t < n.length; t++) (n[t] = Number(BigInt.asUintN(8, r))), (r >>= BigInt(8)); - return n.reverse(); - }), - (e.numberToBytes = b), - (e.stringToBytes = y), - (e.base64ToBytes = function (t) { - return i.assert.call(void 0, 'string' == typeof t, 'Value must be a string.'), s.base64.decode(t); - }), - (e.valueToBytes = v), - (e.concatBytes = function (t) { - const e = new Array(t.length); - let r = 0; - for (let i = 0; i < t.length; i++) { - const n = v(t[i]); - (e[i] = n), (r += n.length); - } - const i = new Uint8Array(r); - for (let t = 0, r = 0; t < e.length; t++) i.set(e[t], r), (r += e[t].length); - return i; - }), - (e.createDataView = function (t) { - if ('undefined' != typeof Buffer && t instanceof Buffer) { - const e = t.buffer.slice(t.byteOffset, t.byteOffset + t.byteLength); - return new DataView(e); - } - return new DataView(t.buffer, t.byteOffset, t.byteLength); - }); - }, - 2706: (t, e) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }); - var r = (t => ( - (t[(t.Null = 4)] = 'Null'), - (t[(t.Comma = 1)] = 'Comma'), - (t[(t.Wrapper = 1)] = 'Wrapper'), - (t[(t.True = 4)] = 'True'), - (t[(t.False = 5)] = 'False'), - (t[(t.Quote = 1)] = 'Quote'), - (t[(t.Colon = 1)] = 'Colon'), - (t[(t.Date = 24)] = 'Date'), - t - ))(r || {}), - i = /"|\\|\n|\r|\t/gu; - function n(t) { - return t.charCodeAt(0) <= 127; - } - (e.isNonEmptyArray = function (t) { - return Array.isArray(t) && t.length > 0; - }), - (e.isNullOrUndefined = function (t) { - return null == t; - }), - (e.isObject = function (t) { - return Boolean(t) && 'object' == typeof t && !Array.isArray(t); - }), - (e.hasProperty = (t, e) => Object.hasOwnProperty.call(t, e)), - (e.getKnownPropertyNames = function (t) { - return Object.getOwnPropertyNames(t); - }), - (e.JsonSize = r), - (e.ESCAPE_CHARACTERS_REGEXP = i), - (e.isPlainObject = function (t) { - if ('object' != typeof t || null === t) return !1; - try { - let e = t; - for (; null !== Object.getPrototypeOf(e); ) e = Object.getPrototypeOf(e); - return Object.getPrototypeOf(t) === e; - } catch (t) { - return !1; - } - }), - (e.isASCII = n), - (e.calculateStringSize = function (t) { - return t.split('').reduce((t, e) => (n(e) ? t + 1 : t + 2), 0) + ((e = t.match(i)), () => [], null != e ? e : []).length; - var e; - }), - (e.calculateNumberSize = function (t) { - return t.toString().length; - }); - }, - 3006: () => {}, - 7847: (t, e, r) => { - 'use strict'; - function i(t) { - let e, - r = t[0], - i = 1; - for (; i < t.length; ) { - const n = t[i], - o = t[i + 1]; - if (((i += 2), ('optionalAccess' === n || 'optionalCall' === n) && null == r)) return; - 'access' === n || 'optionalAccess' === n - ? ((e = r), (r = o(r))) - : ('call' !== n && 'optionalCall' !== n) || ((r = o((...t) => r.call(e, ...t))), (e = void 0)); - } - return r; - } - Object.defineProperty(e, '__esModule', { value: !0 }); - var n = r(7884), - o = /^(?[-a-z0-9]{3,8}):(?[-_a-zA-Z0-9]{1,32})$/u, - s = /^[-a-z0-9]{3,8}$/u, - a = /^[-_a-zA-Z0-9]{1,32}$/u, - h = /^(?(?[-a-z0-9]{3,8}):(?[-_a-zA-Z0-9]{1,32})):(?[-.%a-zA-Z0-9]{1,128})$/u, - u = /^[-.%a-zA-Z0-9]{1,128}$/u, - f = n.pattern.call(void 0, n.string.call(void 0), o), - c = n.pattern.call(void 0, n.string.call(void 0), s), - l = n.pattern.call(void 0, n.string.call(void 0), a), - d = n.pattern.call(void 0, n.string.call(void 0), h), - p = n.pattern.call(void 0, n.string.call(void 0), u); - (e.CAIP_CHAIN_ID_REGEX = o), - (e.CAIP_NAMESPACE_REGEX = s), - (e.CAIP_REFERENCE_REGEX = a), - (e.CAIP_ACCOUNT_ID_REGEX = h), - (e.CAIP_ACCOUNT_ADDRESS_REGEX = u), - (e.CaipChainIdStruct = f), - (e.CaipNamespaceStruct = c), - (e.CaipReferenceStruct = l), - (e.CaipAccountIdStruct = d), - (e.CaipAccountAddressStruct = p), - (e.isCaipChainId = function (t) { - return n.is.call(void 0, t, f); - }), - (e.isCaipNamespace = function (t) { - return n.is.call(void 0, t, c); - }), - (e.isCaipReference = function (t) { - return n.is.call(void 0, t, l); - }), - (e.isCaipAccountId = function (t) { - return n.is.call(void 0, t, d); - }), - (e.isCaipAccountAddress = function (t) { - return n.is.call(void 0, t, p); - }), - (e.parseCaipChainId = function (t) { - const e = o.exec(t); - if (!i([e, 'optionalAccess', t => t.groups])) throw new Error('Invalid CAIP chain ID.'); - return { namespace: e.groups.namespace, reference: e.groups.reference }; - }), - (e.parseCaipAccountId = function (t) { - const e = h.exec(t); - if (!i([e, 'optionalAccess', t => t.groups])) throw new Error('Invalid CAIP account ID.'); - return { - address: e.groups.accountAddress, - chainId: e.groups.chainId, - chain: { namespace: e.groups.namespace, reference: e.groups.reference }, - }; - }); - }, - 9123: () => {}, - 1866: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }); - var i = r(2591), - n = r(593); - (e.numberToHex = t => ( - n.assert.call(void 0, 'number' == typeof t, 'Value must be a number.'), - n.assert.call(void 0, t >= 0, 'Value must be a non-negative number.'), - n.assert.call(void 0, Number.isSafeInteger(t), 'Value is not a safe integer. Use `bigIntToHex` instead.'), - i.add0x.call(void 0, t.toString(16)) - )), - (e.bigIntToHex = t => ( - n.assert.call(void 0, 'bigint' == typeof t, 'Value must be a bigint.'), - n.assert.call(void 0, t >= 0, 'Value must be a non-negative bigint.'), - i.add0x.call(void 0, t.toString(16)) - )), - (e.hexToNumber = t => { - i.assertIsHexString.call(void 0, t); - const e = parseInt(t, 16); - return n.assert.call(void 0, Number.isSafeInteger(e), 'Value is not a safe integer. Use `hexToBigInt` instead.'), e; - }), - (e.hexToBigInt = t => (i.assertIsHexString.call(void 0, t), BigInt(i.add0x.call(void 0, t)))); - }, - 1322: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }); - var i, - n, - o = r(4466), - s = class { - constructor(t) { - o.__privateAdd.call(void 0, this, i, void 0), o.__privateSet.call(void 0, this, i, new Map(t)), Object.freeze(this); - } - get size() { - return o.__privateGet.call(void 0, this, i).size; - } - [Symbol.iterator]() { - return o.__privateGet.call(void 0, this, i)[Symbol.iterator](); - } - entries() { - return o.__privateGet.call(void 0, this, i).entries(); - } - forEach(t, e) { - return o.__privateGet.call(void 0, this, i).forEach((r, i, n) => t.call(e, r, i, this)); - } - get(t) { - return o.__privateGet.call(void 0, this, i).get(t); - } - has(t) { - return o.__privateGet.call(void 0, this, i).has(t); - } - keys() { - return o.__privateGet.call(void 0, this, i).keys(); - } - values() { - return o.__privateGet.call(void 0, this, i).values(); - } - toString() { - return `FrozenMap(${this.size}) {${this.size > 0 ? ` ${[...this.entries()].map(([t, e]) => `${String(t)} => ${String(e)}`).join(', ')} ` : ''}}`; - } - }; - i = new WeakMap(); - var a = class { - constructor(t) { - o.__privateAdd.call(void 0, this, n, void 0), o.__privateSet.call(void 0, this, n, new Set(t)), Object.freeze(this); - } - get size() { - return o.__privateGet.call(void 0, this, n).size; - } - [Symbol.iterator]() { - return o.__privateGet.call(void 0, this, n)[Symbol.iterator](); - } - entries() { - return o.__privateGet.call(void 0, this, n).entries(); - } - forEach(t, e) { - return o.__privateGet.call(void 0, this, n).forEach((r, i, n) => t.call(e, r, i, this)); - } - has(t) { - return o.__privateGet.call(void 0, this, n).has(t); - } - keys() { - return o.__privateGet.call(void 0, this, n).keys(); - } - values() { - return o.__privateGet.call(void 0, this, n).values(); - } - toString() { - return `FrozenSet(${this.size}) {${this.size > 0 ? ` ${[...this.values()].map(t => String(t)).join(', ')} ` : ''}}`; - } - }; - (n = new WeakMap()), - Object.freeze(s), - Object.freeze(s.prototype), - Object.freeze(a), - Object.freeze(a.prototype), - (e.FrozenMap = s), - (e.FrozenSet = a); - }, - 2451: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), r(7479); - var i = r(1866); - r(3356); - var n = r(6587), - o = r(5671); - r(9123); - var s = r(3889), - a = r(8657); - r(3006); - var h = r(708), - u = r(7847), - f = r(6815), - c = r(5217), - l = r(9162), - d = r(2591), - p = r(593), - m = r(2173), - g = r(2706), - b = r(1322); - r(4466), - r(5174), - (e.AssertionError = p.AssertionError), - (e.CAIP_ACCOUNT_ADDRESS_REGEX = u.CAIP_ACCOUNT_ADDRESS_REGEX), - (e.CAIP_ACCOUNT_ID_REGEX = u.CAIP_ACCOUNT_ID_REGEX), - (e.CAIP_CHAIN_ID_REGEX = u.CAIP_CHAIN_ID_REGEX), - (e.CAIP_NAMESPACE_REGEX = u.CAIP_NAMESPACE_REGEX), - (e.CAIP_REFERENCE_REGEX = u.CAIP_REFERENCE_REGEX), - (e.CaipAccountAddressStruct = u.CaipAccountAddressStruct), - (e.CaipAccountIdStruct = u.CaipAccountIdStruct), - (e.CaipChainIdStruct = u.CaipChainIdStruct), - (e.CaipNamespaceStruct = u.CaipNamespaceStruct), - (e.CaipReferenceStruct = u.CaipReferenceStruct), - (e.ChecksumStruct = f.ChecksumStruct), - (e.Duration = o.Duration), - (e.ESCAPE_CHARACTERS_REGEXP = g.ESCAPE_CHARACTERS_REGEXP), - (e.FrozenMap = b.FrozenMap), - (e.FrozenSet = b.FrozenSet), - (e.HexAddressStruct = d.HexAddressStruct), - (e.HexChecksumAddressStruct = d.HexChecksumAddressStruct), - (e.HexStruct = d.HexStruct), - (e.JsonRpcErrorStruct = a.JsonRpcErrorStruct), - (e.JsonRpcFailureStruct = a.JsonRpcFailureStruct), - (e.JsonRpcIdStruct = a.JsonRpcIdStruct), - (e.JsonRpcNotificationStruct = a.JsonRpcNotificationStruct), - (e.JsonRpcParamsStruct = a.JsonRpcParamsStruct), - (e.JsonRpcRequestStruct = a.JsonRpcRequestStruct), - (e.JsonRpcResponseStruct = a.JsonRpcResponseStruct), - (e.JsonRpcSuccessStruct = a.JsonRpcSuccessStruct), - (e.JsonRpcVersionStruct = a.JsonRpcVersionStruct), - (e.JsonSize = g.JsonSize), - (e.JsonStruct = a.JsonStruct), - (e.PendingJsonRpcResponseStruct = a.PendingJsonRpcResponseStruct), - (e.StrictHexStruct = d.StrictHexStruct), - (e.UnsafeJsonStruct = a.UnsafeJsonStruct), - (e.VersionRangeStruct = s.VersionRangeStruct), - (e.VersionStruct = s.VersionStruct), - (e.add0x = d.add0x), - (e.assert = p.assert), - (e.assertExhaustive = p.assertExhaustive), - (e.assertIsBytes = d.assertIsBytes), - (e.assertIsHexString = d.assertIsHexString), - (e.assertIsJsonRpcError = a.assertIsJsonRpcError), - (e.assertIsJsonRpcFailure = a.assertIsJsonRpcFailure), - (e.assertIsJsonRpcNotification = a.assertIsJsonRpcNotification), - (e.assertIsJsonRpcRequest = a.assertIsJsonRpcRequest), - (e.assertIsJsonRpcResponse = a.assertIsJsonRpcResponse), - (e.assertIsJsonRpcSuccess = a.assertIsJsonRpcSuccess), - (e.assertIsPendingJsonRpcResponse = a.assertIsPendingJsonRpcResponse), - (e.assertIsSemVerRange = s.assertIsSemVerRange), - (e.assertIsSemVerVersion = s.assertIsSemVerVersion), - (e.assertIsStrictHexString = d.assertIsStrictHexString), - (e.assertStruct = p.assertStruct), - (e.base64 = c.base64), - (e.base64ToBytes = d.base64ToBytes), - (e.bigIntToBytes = d.bigIntToBytes), - (e.bigIntToHex = i.bigIntToHex), - (e.bytesToBase64 = d.bytesToBase64), - (e.bytesToBigInt = d.bytesToBigInt), - (e.bytesToHex = d.bytesToHex), - (e.bytesToNumber = d.bytesToNumber), - (e.bytesToSignedBigInt = d.bytesToSignedBigInt), - (e.bytesToString = d.bytesToString), - (e.calculateNumberSize = g.calculateNumberSize), - (e.calculateStringSize = g.calculateStringSize), - (e.concatBytes = d.concatBytes), - (e.createBigInt = l.createBigInt), - (e.createBytes = l.createBytes), - (e.createDataView = d.createDataView), - (e.createDeferredPromise = n.createDeferredPromise), - (e.createHex = l.createHex), - (e.createModuleLogger = h.createModuleLogger), - (e.createNumber = l.createNumber), - (e.createProjectLogger = h.createProjectLogger), - (e.exactOptional = a.exactOptional), - (e.getChecksumAddress = d.getChecksumAddress), - (e.getErrorMessage = m.getErrorMessage), - (e.getJsonRpcIdValidator = a.getJsonRpcIdValidator), - (e.getJsonSize = a.getJsonSize), - (e.getKnownPropertyNames = g.getKnownPropertyNames), - (e.getSafeJson = a.getSafeJson), - (e.gtRange = s.gtRange), - (e.gtVersion = s.gtVersion), - (e.hasProperty = g.hasProperty), - (e.hexToBigInt = i.hexToBigInt), - (e.hexToBytes = d.hexToBytes), - (e.hexToNumber = i.hexToNumber), - (e.inMilliseconds = o.inMilliseconds), - (e.isASCII = g.isASCII), - (e.isBytes = d.isBytes), - (e.isCaipAccountAddress = u.isCaipAccountAddress), - (e.isCaipAccountId = u.isCaipAccountId), - (e.isCaipChainId = u.isCaipChainId), - (e.isCaipNamespace = u.isCaipNamespace), - (e.isCaipReference = u.isCaipReference), - (e.isErrorWithCode = m.isErrorWithCode), - (e.isErrorWithMessage = m.isErrorWithMessage), - (e.isErrorWithStack = m.isErrorWithStack), - (e.isHexString = d.isHexString), - (e.isJsonRpcError = a.isJsonRpcError), - (e.isJsonRpcFailure = a.isJsonRpcFailure), - (e.isJsonRpcNotification = a.isJsonRpcNotification), - (e.isJsonRpcRequest = a.isJsonRpcRequest), - (e.isJsonRpcResponse = a.isJsonRpcResponse), - (e.isJsonRpcSuccess = a.isJsonRpcSuccess), - (e.isNonEmptyArray = g.isNonEmptyArray), - (e.isNullOrUndefined = g.isNullOrUndefined), - (e.isObject = g.isObject), - (e.isPendingJsonRpcResponse = a.isPendingJsonRpcResponse), - (e.isPlainObject = g.isPlainObject), - (e.isStrictHexString = d.isStrictHexString), - (e.isValidChecksumAddress = d.isValidChecksumAddress), - (e.isValidHexAddress = d.isValidHexAddress), - (e.isValidJson = a.isValidJson), - (e.isValidSemVerRange = s.isValidSemVerRange), - (e.isValidSemVerVersion = s.isValidSemVerVersion), - (e.jsonrpc2 = a.jsonrpc2), - (e.numberToBytes = d.numberToBytes), - (e.numberToHex = i.numberToHex), - (e.object = a.object), - (e.parseCaipAccountId = u.parseCaipAccountId), - (e.parseCaipChainId = u.parseCaipChainId), - (e.remove0x = d.remove0x), - (e.satisfiesVersionRange = s.satisfiesVersionRange), - (e.signedBigIntToBytes = d.signedBigIntToBytes), - (e.stringToBytes = d.stringToBytes), - (e.timeSince = o.timeSince), - (e.valueToBytes = d.valueToBytes), - (e.wrapError = m.wrapError); - }, - 4927: (t, e) => { - 'use strict'; - function r(t) { - if (!Number.isSafeInteger(t)) throw new Error(`Wrong integer: ${t}`); - } - function i(t) { - return t instanceof Uint8Array || (null != t && 'object' == typeof t && 'Uint8Array' === t.constructor.name); - } - function n(...t) { - const e = t => t, - r = (t, e) => r => t(e(r)); - return { encode: t.map(t => t.encode).reduceRight(r, e), decode: t.map(t => t.decode).reduce(r, e) }; - } - function o(t) { - return { - encode: e => { - if (!Array.isArray(e) || (e.length && 'number' != typeof e[0])) - throw new Error('alphabet.encode input should be an array of numbers'); - return e.map(e => { - if ((r(e), e < 0 || e >= t.length)) throw new Error(`Digit index outside alphabet: ${e} (alphabet: ${t.length})`); - return t[e]; - }); - }, - decode: e => { - if (!Array.isArray(e) || (e.length && 'string' != typeof e[0])) - throw new Error('alphabet.decode input should be array of strings'); - return e.map(e => { - if ('string' != typeof e) throw new Error(`alphabet.decode: not string element=${e}`); - const r = t.indexOf(e); - if (-1 === r) throw new Error(`Unknown letter: "${e}". Allowed: ${t}`); - return r; - }); - }, - }; - } - function s(t = '') { - if ('string' != typeof t) throw new Error('join separator should be string'); - return { - encode: e => { - if (!Array.isArray(e) || (e.length && 'string' != typeof e[0])) - throw new Error('join.encode input should be array of strings'); - for (let t of e) if ('string' != typeof t) throw new Error(`join.encode: non-string input=${t}`); - return e.join(t); - }, - decode: e => { - if ('string' != typeof e) throw new Error('join.decode input should be string'); - return e.split(t); - }, - }; - } - function a(t, e = '=') { - if ((r(t), 'string' != typeof e)) throw new Error('padding chr should be string'); - return { - encode(r) { - if (!Array.isArray(r) || (r.length && 'string' != typeof r[0])) - throw new Error('padding.encode input should be array of strings'); - for (let t of r) if ('string' != typeof t) throw new Error(`padding.encode: non-string input=${t}`); - for (; (r.length * t) % 8; ) r.push(e); - return r; - }, - decode(r) { - if (!Array.isArray(r) || (r.length && 'string' != typeof r[0])) - throw new Error('padding.encode input should be array of strings'); - for (let t of r) if ('string' != typeof t) throw new Error(`padding.decode: non-string input=${t}`); - let i = r.length; - if ((i * t) % 8) throw new Error('Invalid padding: string should have whole number of bytes'); - for (; i > 0 && r[i - 1] === e; i--) - if (!(((i - 1) * t) % 8)) throw new Error('Invalid padding: string has too much padding'); - return r.slice(0, i); - }, - }; - } - function h(t) { - if ('function' != typeof t) throw new Error('normalize fn should be function'); - return { encode: t => t, decode: e => t(e) }; - } - function u(t, e, i) { - if (e < 2) throw new Error(`convertRadix: wrong from=${e}, base cannot be less than 2`); - if (i < 2) throw new Error(`convertRadix: wrong to=${i}, base cannot be less than 2`); - if (!Array.isArray(t)) throw new Error('convertRadix: data should be array'); - if (!t.length) return []; - let n = 0; - const o = [], - s = Array.from(t); - for ( - s.forEach(t => { - if ((r(t), t < 0 || t >= e)) throw new Error(`Wrong integer: ${t}`); - }); - ; - - ) { - let t = 0, - r = !0; - for (let o = n; o < s.length; o++) { - const a = s[o], - h = e * t + a; - if (!Number.isSafeInteger(h) || (e * t) / e !== t || h - a != e * t) throw new Error('convertRadix: carry overflow'); - t = h % i; - const u = Math.floor(h / i); - if (((s[o] = u), !Number.isSafeInteger(u) || u * i + t !== h)) throw new Error('convertRadix: carry overflow'); - r && (u ? (r = !1) : (n = o)); - } - if ((o.push(t), r)) break; - } - for (let e = 0; e < t.length - 1 && 0 === t[e]; e++) o.push(0); - return o.reverse(); - } - Object.defineProperty(e, '__esModule', { value: !0 }), - (e.bytes = - e.stringToBytes = - e.str = - e.bytesToString = - e.hex = - e.utf8 = - e.bech32m = - e.bech32 = - e.base58check = - e.createBase58check = - e.base58xmr = - e.base58xrp = - e.base58flickr = - e.base58 = - e.base64urlnopad = - e.base64url = - e.base64 = - e.base32crockford = - e.base32hex = - e.base32 = - e.base16 = - e.utils = - e.assertNumber = - void 0), - (e.assertNumber = r); - const f = (t, e) => (e ? f(e, t % e) : t), - c = (t, e) => t + (e - f(t, e)); - function l(t, e, i, n) { - if (!Array.isArray(t)) throw new Error('convertRadix2: data should be array'); - if (e <= 0 || e > 32) throw new Error(`convertRadix2: wrong from=${e}`); - if (i <= 0 || i > 32) throw new Error(`convertRadix2: wrong to=${i}`); - if (c(e, i) > 32) throw new Error(`convertRadix2: carry overflow from=${e} to=${i} carryBits=${c(e, i)}`); - let o = 0, - s = 0; - const a = 2 ** i - 1, - h = []; - for (const n of t) { - if ((r(n), n >= 2 ** e)) throw new Error(`convertRadix2: invalid data word=${n} from=${e}`); - if (((o = (o << e) | n), s + e > 32)) throw new Error(`convertRadix2: carry overflow pos=${s} from=${e}`); - for (s += e; s >= i; s -= i) h.push(((o >> (s - i)) & a) >>> 0); - o &= 2 ** s - 1; - } - if (((o = (o << (i - s)) & a), !n && s >= e)) throw new Error('Excess padding'); - if (!n && o) throw new Error(`Non-zero padding: ${o}`); - return n && s > 0 && h.push(o >>> 0), h; - } - function d(t) { - return ( - r(t), - { - encode: e => { - if (!i(e)) throw new Error('radix.encode input should be Uint8Array'); - return u(Array.from(e), 256, t); - }, - decode: e => { - if (!Array.isArray(e) || (e.length && 'number' != typeof e[0])) - throw new Error('radix.decode input should be array of numbers'); - return Uint8Array.from(u(e, t, 256)); - }, - } - ); - } - function p(t, e = !1) { - if ((r(t), t <= 0 || t > 32)) throw new Error('radix2: bits should be in (0..32]'); - if (c(8, t) > 32 || c(t, 8) > 32) throw new Error('radix2: carry overflow'); - return { - encode: r => { - if (!i(r)) throw new Error('radix2.encode input should be Uint8Array'); - return l(Array.from(r), 8, t, !e); - }, - decode: r => { - if (!Array.isArray(r) || (r.length && 'number' != typeof r[0])) - throw new Error('radix2.decode input should be array of numbers'); - return Uint8Array.from(l(r, t, 8, e)); - }, - }; - } - function m(t) { - if ('function' != typeof t) throw new Error('unsafeWrapper fn should be function'); - return function (...e) { - try { - return t.apply(null, e); - } catch (t) {} - }; - } - function g(t, e) { - if ((r(t), 'function' != typeof e)) throw new Error('checksum fn should be function'); - return { - encode(r) { - if (!i(r)) throw new Error('checksum.encode: input should be Uint8Array'); - const n = e(r).slice(0, t), - o = new Uint8Array(r.length + t); - return o.set(r), o.set(n, r.length), o; - }, - decode(r) { - if (!i(r)) throw new Error('checksum.decode: input should be Uint8Array'); - const n = r.slice(0, -t), - o = e(n).slice(0, t), - s = r.slice(-t); - for (let e = 0; e < t; e++) if (o[e] !== s[e]) throw new Error('Invalid checksum'); - return n; - }, - }; - } - (e.utils = { alphabet: o, chain: n, checksum: g, convertRadix: u, convertRadix2: l, radix: d, radix2: p, join: s, padding: a }), - (e.base16 = n(p(4), o('0123456789ABCDEF'), s(''))), - (e.base32 = n(p(5), o('ABCDEFGHIJKLMNOPQRSTUVWXYZ234567'), a(5), s(''))), - (e.base32hex = n(p(5), o('0123456789ABCDEFGHIJKLMNOPQRSTUV'), a(5), s(''))), - (e.base32crockford = n( - p(5), - o('0123456789ABCDEFGHJKMNPQRSTVWXYZ'), - s(''), - h(t => t.toUpperCase().replace(/O/g, '0').replace(/[IL]/g, '1')) - )), - (e.base64 = n(p(6), o('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'), a(6), s(''))), - (e.base64url = n(p(6), o('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_'), a(6), s(''))), - (e.base64urlnopad = n(p(6), o('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_'), s(''))); - const b = t => n(d(58), o(t), s('')); - (e.base58 = b('123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz')), - (e.base58flickr = b('123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ')), - (e.base58xrp = b('rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz')); - const y = [0, 2, 3, 5, 6, 7, 9, 10, 11]; - (e.base58xmr = { - encode(t) { - let r = ''; - for (let i = 0; i < t.length; i += 8) { - const n = t.subarray(i, i + 8); - r += e.base58.encode(n).padStart(y[n.length], '1'); - } - return r; - }, - decode(t) { - let r = []; - for (let i = 0; i < t.length; i += 11) { - const n = t.slice(i, i + 11), - o = y.indexOf(n.length), - s = e.base58.decode(n); - for (let t = 0; t < s.length - o; t++) if (0 !== s[t]) throw new Error('base58xmr: wrong padding'); - r = r.concat(Array.from(s.slice(s.length - o))); - } - return Uint8Array.from(r); - }, - }), - (e.createBase58check = t => - n( - g(4, e => t(t(e))), - e.base58 - )), - (e.base58check = e.createBase58check); - const v = n(o('qpzry9x8gf2tvdw0s3jn54khce6mua7l'), s('')), - w = [996825010, 642813549, 513874426, 1027748829, 705979059]; - function _(t) { - const e = t >> 25; - let r = (33554431 & t) << 5; - for (let t = 0; t < w.length; t++) 1 == ((e >> t) & 1) && (r ^= w[t]); - return r; - } - function M(t, e, r = 1) { - const i = t.length; - let n = 1; - for (let e = 0; e < i; e++) { - const r = t.charCodeAt(e); - if (r < 33 || r > 126) throw new Error(`Invalid prefix (${t})`); - n = _(n) ^ (r >> 5); - } - n = _(n); - for (let e = 0; e < i; e++) n = _(n) ^ (31 & t.charCodeAt(e)); - for (let t of e) n = _(n) ^ t; - for (let t = 0; t < 6; t++) n = _(n); - return (n ^= r), v.encode(l([n % 2 ** 30], 30, 5, !1)); - } - function E(t) { - const e = 'bech32' === t ? 1 : 734539939, - r = p(5), - i = r.decode, - n = r.encode, - o = m(i); - function s(t, r = 90) { - if ('string' != typeof t) throw new Error('bech32.decode input should be string, not ' + typeof t); - if (t.length < 8 || (!1 !== r && t.length > r)) - throw new TypeError(`Wrong string length: ${t.length} (${t}). Expected (8..${r})`); - const i = t.toLowerCase(); - if (t !== i && t !== t.toUpperCase()) throw new Error('String must be lowercase or uppercase'); - const n = (t = i).lastIndexOf('1'); - if (0 === n || -1 === n) throw new Error('Letter "1" must be present between prefix and data only'); - const o = t.slice(0, n), - s = t.slice(n + 1); - if (s.length < 6) throw new Error('Data must be at least 6 characters long'); - const a = v.decode(s).slice(0, -6), - h = M(o, a, e); - if (!s.endsWith(h)) throw new Error(`Invalid checksum in ${t}: expected "${h}"`); - return { prefix: o, words: a }; - } - return { - encode: function (t, r, i = 90) { - if ('string' != typeof t) throw new Error('bech32.encode prefix should be string, not ' + typeof t); - if (!Array.isArray(r) || (r.length && 'number' != typeof r[0])) - throw new Error('bech32.encode words should be array of numbers, not ' + typeof r); - const n = t.length + 7 + r.length; - if (!1 !== i && n > i) throw new TypeError(`Length ${n} exceeds limit ${i}`); - const o = t.toLowerCase(), - s = M(o, r, e); - return `${o}1${v.encode(r)}${s}`; - }, - decode: s, - decodeToBytes: function (t) { - const { prefix: e, words: r } = s(t, !1); - return { prefix: e, words: r, bytes: i(r) }; - }, - decodeUnsafe: m(s), - fromWords: i, - fromWordsUnsafe: o, - toWords: n, - }; - } - (e.bech32 = E('bech32')), - (e.bech32m = E('bech32m')), - (e.utf8 = { encode: t => new TextDecoder().decode(t), decode: t => new TextEncoder().encode(t) }), - (e.hex = n( - p(4), - o('0123456789abcdef'), - s(''), - h(t => { - if ('string' != typeof t || t.length % 2) - throw new TypeError(`hex.decode: expected string, got ${typeof t} with length ${t.length}`); - return t.toLowerCase(); - }) - )); - const S = { - utf8: e.utf8, - hex: e.hex, - base16: e.base16, - base32: e.base32, - base64: e.base64, - base64url: e.base64url, - base58: e.base58, - base58xmr: e.base58xmr, - }, - x = 'Invalid encoding type. Available types: utf8, hex, base16, base32, base64, base64url, base58, base58xmr'; - (e.bytesToString = (t, e) => { - if ('string' != typeof t || !S.hasOwnProperty(t)) throw new TypeError(x); - if (!i(e)) throw new TypeError('bytesToString() expects Uint8Array'); - return S[t].encode(e); - }), - (e.str = e.bytesToString), - (e.stringToBytes = (t, e) => { - if (!S.hasOwnProperty(t)) throw new TypeError(x); - if ('string' != typeof e) throw new TypeError('stringToBytes() expects string'); - return S[t].decode(e); - }), - (e.bytes = e.stringToBytes); - }, - 7320: (t, e) => { - 'use strict'; - function r(t) { - if (!Number.isSafeInteger(t) || t < 0) throw new Error(`Wrong positive integer: ${t}`); - } - function i(t) { - if ('boolean' != typeof t) throw new Error(`Expected boolean, not ${t}`); - } - function n(t, ...e) { - if (!((r = t) instanceof Uint8Array || (null != r && 'object' == typeof r && 'Uint8Array' === r.constructor.name))) - throw new Error('Expected Uint8Array'); - var r; - if (e.length > 0 && !e.includes(t.length)) throw new Error(`Expected Uint8Array of length ${e}, not of length=${t.length}`); - } - function o(t) { - if ('function' != typeof t || 'function' != typeof t.create) throw new Error('Hash should be wrapped by utils.wrapConstructor'); - r(t.outputLen), r(t.blockLen); - } - function s(t, e = !0) { - if (t.destroyed) throw new Error('Hash instance has been destroyed'); - if (e && t.finished) throw new Error('Hash#digest() has already been called'); - } - function a(t, e) { - n(t); - const r = e.outputLen; - if (t.length < r) throw new Error(`digestInto() expects output buffer of length at least ${r}`); - } - Object.defineProperty(e, '__esModule', { value: !0 }), - (e.output = e.exists = e.hash = e.bytes = e.bool = e.number = void 0), - (e.number = r), - (e.bool = i), - (e.bytes = n), - (e.hash = o), - (e.exists = s), - (e.output = a); - const h = { number: r, bool: i, bytes: n, hash: o, exists: s, output: a }; - e.default = h; - }, - 7505: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), (e.SHA2 = void 0); - const i = r(7320), - n = r(8089); - class o extends n.Hash { - constructor(t, e, r, i) { - super(), - (this.blockLen = t), - (this.outputLen = e), - (this.padOffset = r), - (this.isLE = i), - (this.finished = !1), - (this.length = 0), - (this.pos = 0), - (this.destroyed = !1), - (this.buffer = new Uint8Array(t)), - (this.view = (0, n.createView)(this.buffer)); - } - update(t) { - (0, i.exists)(this); - const { view: e, buffer: r, blockLen: o } = this, - s = (t = (0, n.toBytes)(t)).length; - for (let i = 0; i < s; ) { - const a = Math.min(o - this.pos, s - i); - if (a !== o) - r.set(t.subarray(i, i + a), this.pos), (this.pos += a), (i += a), this.pos === o && (this.process(e, 0), (this.pos = 0)); - else { - const e = (0, n.createView)(t); - for (; o <= s - i; i += o) this.process(e, i); - } - } - return (this.length += t.length), this.roundClean(), this; - } - digestInto(t) { - (0, i.exists)(this), (0, i.output)(t, this), (this.finished = !0); - const { buffer: e, view: r, blockLen: o, isLE: s } = this; - let { pos: a } = this; - (e[a++] = 128), this.buffer.subarray(a).fill(0), this.padOffset > o - a && (this.process(r, 0), (a = 0)); - for (let t = a; t < o; t++) e[t] = 0; - !(function (t, e, r, i) { - if ('function' == typeof t.setBigUint64) return t.setBigUint64(e, r, i); - const n = BigInt(32), - o = BigInt(4294967295), - s = Number((r >> n) & o), - a = Number(r & o), - h = i ? 4 : 0, - u = i ? 0 : 4; - t.setUint32(e + h, s, i), t.setUint32(e + u, a, i); - })(r, o - 8, BigInt(8 * this.length), s), - this.process(r, 0); - const h = (0, n.createView)(t), - u = this.outputLen; - if (u % 4) throw new Error('_sha2: outputLen should be aligned to 32bit'); - const f = u / 4, - c = this.get(); - if (f > c.length) throw new Error('_sha2: outputLen bigger than state'); - for (let t = 0; t < f; t++) h.setUint32(4 * t, c[t], s); - } - digest() { - const { buffer: t, outputLen: e } = this; - this.digestInto(t); - const r = t.slice(0, e); - return this.destroy(), r; - } - _cloneInto(t) { - t || (t = new this.constructor()), t.set(...this.get()); - const { blockLen: e, buffer: r, length: i, finished: n, destroyed: o, pos: s } = this; - return (t.length = i), (t.pos = s), (t.finished = n), (t.destroyed = o), i % e && t.buffer.set(r), t; - } - } - e.SHA2 = o; - }, - 6873: (t, e) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), - (e.add5L = - e.add5H = - e.add4H = - e.add4L = - e.add3H = - e.add3L = - e.add = - e.rotlBL = - e.rotlBH = - e.rotlSL = - e.rotlSH = - e.rotr32L = - e.rotr32H = - e.rotrBL = - e.rotrBH = - e.rotrSL = - e.rotrSH = - e.shrSL = - e.shrSH = - e.toBig = - e.split = - e.fromBig = - void 0); - const r = BigInt(2 ** 32 - 1), - i = BigInt(32); - function n(t, e = !1) { - return e ? { h: Number(t & r), l: Number((t >> i) & r) } : { h: 0 | Number((t >> i) & r), l: 0 | Number(t & r) }; - } - function o(t, e = !1) { - let r = new Uint32Array(t.length), - i = new Uint32Array(t.length); - for (let o = 0; o < t.length; o++) { - const { h: s, l: a } = n(t[o], e); - [r[o], i[o]] = [s, a]; - } - return [r, i]; - } - (e.fromBig = n), (e.split = o); - const s = (t, e) => (BigInt(t >>> 0) << i) | BigInt(e >>> 0); - e.toBig = s; - const a = (t, e, r) => t >>> r; - e.shrSH = a; - const h = (t, e, r) => (t << (32 - r)) | (e >>> r); - e.shrSL = h; - const u = (t, e, r) => (t >>> r) | (e << (32 - r)); - e.rotrSH = u; - const f = (t, e, r) => (t << (32 - r)) | (e >>> r); - e.rotrSL = f; - const c = (t, e, r) => (t << (64 - r)) | (e >>> (r - 32)); - e.rotrBH = c; - const l = (t, e, r) => (t >>> (r - 32)) | (e << (64 - r)); - e.rotrBL = l; - const d = (t, e) => e; - e.rotr32H = d; - const p = (t, e) => t; - e.rotr32L = p; - const m = (t, e, r) => (t << r) | (e >>> (32 - r)); - e.rotlSH = m; - const g = (t, e, r) => (e << r) | (t >>> (32 - r)); - e.rotlSL = g; - const b = (t, e, r) => (e << (r - 32)) | (t >>> (64 - r)); - e.rotlBH = b; - const y = (t, e, r) => (t << (r - 32)) | (e >>> (64 - r)); - function v(t, e, r, i) { - const n = (e >>> 0) + (i >>> 0); - return { h: (t + r + ((n / 2 ** 32) | 0)) | 0, l: 0 | n }; - } - (e.rotlBL = y), (e.add = v); - const w = (t, e, r) => (t >>> 0) + (e >>> 0) + (r >>> 0); - e.add3L = w; - const _ = (t, e, r, i) => (e + r + i + ((t / 2 ** 32) | 0)) | 0; - e.add3H = _; - const M = (t, e, r, i) => (t >>> 0) + (e >>> 0) + (r >>> 0) + (i >>> 0); - e.add4L = M; - const E = (t, e, r, i, n) => (e + r + i + n + ((t / 2 ** 32) | 0)) | 0; - e.add4H = E; - const S = (t, e, r, i, n) => (t >>> 0) + (e >>> 0) + (r >>> 0) + (i >>> 0) + (n >>> 0); - e.add5L = S; - const x = (t, e, r, i, n, o) => (e + r + i + n + o + ((t / 2 ** 32) | 0)) | 0; - e.add5H = x; - const A = { - fromBig: n, - split: o, - toBig: s, - shrSH: a, - shrSL: h, - rotrSH: u, - rotrSL: f, - rotrBH: c, - rotrBL: l, - rotr32H: d, - rotr32L: p, - rotlSH: m, - rotlSL: g, - rotlBH: b, - rotlBL: y, - add: v, - add3L: w, - add3H: _, - add4L: M, - add4H: E, - add5H: x, - add5L: S, - }; - e.default = A; - }, - 1945: (t, e) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), - (e.crypto = void 0), - (e.crypto = 'object' == typeof globalThis && 'crypto' in globalThis ? globalThis.crypto : void 0); - }, - 9569: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), (e.hmac = e.HMAC = void 0); - const i = r(7320), - n = r(8089); - class o extends n.Hash { - constructor(t, e) { - super(), (this.finished = !1), (this.destroyed = !1), (0, i.hash)(t); - const r = (0, n.toBytes)(e); - if (((this.iHash = t.create()), 'function' != typeof this.iHash.update)) - throw new Error('Expected instance of class which extends utils.Hash'); - (this.blockLen = this.iHash.blockLen), (this.outputLen = this.iHash.outputLen); - const o = this.blockLen, - s = new Uint8Array(o); - s.set(r.length > o ? t.create().update(r).digest() : r); - for (let t = 0; t < s.length; t++) s[t] ^= 54; - this.iHash.update(s), (this.oHash = t.create()); - for (let t = 0; t < s.length; t++) s[t] ^= 106; - this.oHash.update(s), s.fill(0); - } - update(t) { - return (0, i.exists)(this), this.iHash.update(t), this; - } - digestInto(t) { - (0, i.exists)(this), - (0, i.bytes)(t, this.outputLen), - (this.finished = !0), - this.iHash.digestInto(t), - this.oHash.update(t), - this.oHash.digestInto(t), - this.destroy(); - } - digest() { - const t = new Uint8Array(this.oHash.outputLen); - return this.digestInto(t), t; - } - _cloneInto(t) { - t || (t = Object.create(Object.getPrototypeOf(this), {})); - const { oHash: e, iHash: r, finished: i, destroyed: n, blockLen: o, outputLen: s } = this; - return ( - (t.finished = i), - (t.destroyed = n), - (t.blockLen = o), - (t.outputLen = s), - (t.oHash = e._cloneInto(t.oHash)), - (t.iHash = r._cloneInto(t.iHash)), - t - ); - } - destroy() { - (this.destroyed = !0), this.oHash.destroy(), this.iHash.destroy(); - } - } - (e.HMAC = o), (e.hmac = (t, e, r) => new o(t, e).update(r).digest()), (e.hmac.create = (t, e) => new o(t, e)); - }, - 3061: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), (e.sha224 = e.sha256 = void 0); - const i = r(7505), - n = r(8089), - o = (t, e, r) => (t & e) ^ (t & r) ^ (e & r), - s = new Uint32Array([ - 1116352408, 1899447441, 3049323471, 3921009573, 961987163, 1508970993, 2453635748, 2870763221, 3624381080, 310598401, 607225278, - 1426881987, 1925078388, 2162078206, 2614888103, 3248222580, 3835390401, 4022224774, 264347078, 604807628, 770255983, 1249150122, - 1555081692, 1996064986, 2554220882, 2821834349, 2952996808, 3210313671, 3336571891, 3584528711, 113926993, 338241895, 666307205, - 773529912, 1294757372, 1396182291, 1695183700, 1986661051, 2177026350, 2456956037, 2730485921, 2820302411, 3259730800, - 3345764771, 3516065817, 3600352804, 4094571909, 275423344, 430227734, 506948616, 659060556, 883997877, 958139571, 1322822218, - 1537002063, 1747873779, 1955562222, 2024104815, 2227730452, 2361852424, 2428436474, 2756734187, 3204031479, 3329325298, - ]), - a = new Uint32Array([1779033703, 3144134277, 1013904242, 2773480762, 1359893119, 2600822924, 528734635, 1541459225]), - h = new Uint32Array(64); - class u extends i.SHA2 { - constructor() { - super(64, 32, 8, !1), - (this.A = 0 | a[0]), - (this.B = 0 | a[1]), - (this.C = 0 | a[2]), - (this.D = 0 | a[3]), - (this.E = 0 | a[4]), - (this.F = 0 | a[5]), - (this.G = 0 | a[6]), - (this.H = 0 | a[7]); - } - get() { - const { A: t, B: e, C: r, D: i, E: n, F: o, G: s, H: a } = this; - return [t, e, r, i, n, o, s, a]; - } - set(t, e, r, i, n, o, s, a) { - (this.A = 0 | t), - (this.B = 0 | e), - (this.C = 0 | r), - (this.D = 0 | i), - (this.E = 0 | n), - (this.F = 0 | o), - (this.G = 0 | s), - (this.H = 0 | a); - } - process(t, e) { - for (let r = 0; r < 16; r++, e += 4) h[r] = t.getUint32(e, !1); - for (let t = 16; t < 64; t++) { - const e = h[t - 15], - r = h[t - 2], - i = (0, n.rotr)(e, 7) ^ (0, n.rotr)(e, 18) ^ (e >>> 3), - o = (0, n.rotr)(r, 17) ^ (0, n.rotr)(r, 19) ^ (r >>> 10); - h[t] = (o + h[t - 7] + i + h[t - 16]) | 0; - } - let { A: r, B: i, C: a, D: u, E: f, F: c, G: l, H: d } = this; - for (let t = 0; t < 64; t++) { - const e = (d + ((0, n.rotr)(f, 6) ^ (0, n.rotr)(f, 11) ^ (0, n.rotr)(f, 25)) + (((p = f) & c) ^ (~p & l)) + s[t] + h[t]) | 0, - m = (((0, n.rotr)(r, 2) ^ (0, n.rotr)(r, 13) ^ (0, n.rotr)(r, 22)) + o(r, i, a)) | 0; - (d = l), (l = c), (c = f), (f = (u + e) | 0), (u = a), (a = i), (i = r), (r = (e + m) | 0); - } - var p; - (r = (r + this.A) | 0), - (i = (i + this.B) | 0), - (a = (a + this.C) | 0), - (u = (u + this.D) | 0), - (f = (f + this.E) | 0), - (c = (c + this.F) | 0), - (l = (l + this.G) | 0), - (d = (d + this.H) | 0), - this.set(r, i, a, u, f, c, l, d); - } - roundClean() { - h.fill(0); - } - destroy() { - this.set(0, 0, 0, 0, 0, 0, 0, 0), this.buffer.fill(0); - } - } - class f extends u { - constructor() { - super(), - (this.A = -1056596264), - (this.B = 914150663), - (this.C = 812702999), - (this.D = -150054599), - (this.E = -4191439), - (this.F = 1750603025), - (this.G = 1694076839), - (this.H = -1090891868), - (this.outputLen = 28); - } - } - (e.sha256 = (0, n.wrapConstructor)(() => new u())), (e.sha224 = (0, n.wrapConstructor)(() => new f())); - }, - 5426: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), - (e.shake256 = - e.shake128 = - e.keccak_512 = - e.keccak_384 = - e.keccak_256 = - e.keccak_224 = - e.sha3_512 = - e.sha3_384 = - e.sha3_256 = - e.sha3_224 = - e.Keccak = - e.keccakP = - void 0); - const i = r(7320), - n = r(6873), - o = r(8089), - [s, a, h] = [[], [], []], - u = BigInt(0), - f = BigInt(1), - c = BigInt(2), - l = BigInt(7), - d = BigInt(256), - p = BigInt(113); - for (let t = 0, e = f, r = 1, i = 0; t < 24; t++) { - ([r, i] = [i, (2 * r + 3 * i) % 5]), s.push(2 * (5 * i + r)), a.push((((t + 1) * (t + 2)) / 2) % 64); - let n = u; - for (let t = 0; t < 7; t++) (e = ((e << f) ^ ((e >> l) * p)) % d), e & c && (n ^= f << ((f << BigInt(t)) - f)); - h.push(n); - } - const [m, g] = (0, n.split)(h, !0), - b = (t, e, r) => (r > 32 ? (0, n.rotlBH)(t, e, r) : (0, n.rotlSH)(t, e, r)), - y = (t, e, r) => (r > 32 ? (0, n.rotlBL)(t, e, r) : (0, n.rotlSL)(t, e, r)); - function v(t, e = 24) { - const r = new Uint32Array(10); - for (let i = 24 - e; i < 24; i++) { - for (let e = 0; e < 10; e++) r[e] = t[e] ^ t[e + 10] ^ t[e + 20] ^ t[e + 30] ^ t[e + 40]; - for (let e = 0; e < 10; e += 2) { - const i = (e + 8) % 10, - n = (e + 2) % 10, - o = r[n], - s = r[n + 1], - a = b(o, s, 1) ^ r[i], - h = y(o, s, 1) ^ r[i + 1]; - for (let r = 0; r < 50; r += 10) (t[e + r] ^= a), (t[e + r + 1] ^= h); - } - let e = t[2], - n = t[3]; - for (let r = 0; r < 24; r++) { - const i = a[r], - o = b(e, n, i), - h = y(e, n, i), - u = s[r]; - (e = t[u]), (n = t[u + 1]), (t[u] = o), (t[u + 1] = h); - } - for (let e = 0; e < 50; e += 10) { - for (let i = 0; i < 10; i++) r[i] = t[e + i]; - for (let i = 0; i < 10; i++) t[e + i] ^= ~r[(i + 2) % 10] & r[(i + 4) % 10]; - } - (t[0] ^= m[i]), (t[1] ^= g[i]); - } - r.fill(0); - } - e.keccakP = v; - class w extends o.Hash { - constructor(t, e, r, n = !1, s = 24) { - if ( - (super(), - (this.blockLen = t), - (this.suffix = e), - (this.outputLen = r), - (this.enableXOF = n), - (this.rounds = s), - (this.pos = 0), - (this.posOut = 0), - (this.finished = !1), - (this.destroyed = !1), - (0, i.number)(r), - 0 >= this.blockLen || this.blockLen >= 200) - ) - throw new Error('Sha3 supports only keccak-f1600 function'); - (this.state = new Uint8Array(200)), (this.state32 = (0, o.u32)(this.state)); - } - keccak() { - v(this.state32, this.rounds), (this.posOut = 0), (this.pos = 0); - } - update(t) { - (0, i.exists)(this); - const { blockLen: e, state: r } = this, - n = (t = (0, o.toBytes)(t)).length; - for (let i = 0; i < n; ) { - const o = Math.min(e - this.pos, n - i); - for (let e = 0; e < o; e++) r[this.pos++] ^= t[i++]; - this.pos === e && this.keccak(); - } - return this; - } - finish() { - if (this.finished) return; - this.finished = !0; - const { state: t, suffix: e, pos: r, blockLen: i } = this; - (t[r] ^= e), 0 != (128 & e) && r === i - 1 && this.keccak(), (t[i - 1] ^= 128), this.keccak(); - } - writeInto(t) { - (0, i.exists)(this, !1), (0, i.bytes)(t), this.finish(); - const e = this.state, - { blockLen: r } = this; - for (let i = 0, n = t.length; i < n; ) { - this.posOut >= r && this.keccak(); - const o = Math.min(r - this.posOut, n - i); - t.set(e.subarray(this.posOut, this.posOut + o), i), (this.posOut += o), (i += o); - } - return t; - } - xofInto(t) { - if (!this.enableXOF) throw new Error('XOF is not possible for this instance'); - return this.writeInto(t); - } - xof(t) { - return (0, i.number)(t), this.xofInto(new Uint8Array(t)); - } - digestInto(t) { - if (((0, i.output)(t, this), this.finished)) throw new Error('digest() was already called'); - return this.writeInto(t), this.destroy(), t; - } - digest() { - return this.digestInto(new Uint8Array(this.outputLen)); - } - destroy() { - (this.destroyed = !0), this.state.fill(0); - } - _cloneInto(t) { - const { blockLen: e, suffix: r, outputLen: i, rounds: n, enableXOF: o } = this; - return ( - t || (t = new w(e, r, i, o, n)), - t.state32.set(this.state32), - (t.pos = this.pos), - (t.posOut = this.posOut), - (t.finished = this.finished), - (t.rounds = n), - (t.suffix = r), - (t.outputLen = i), - (t.enableXOF = o), - (t.destroyed = this.destroyed), - t - ); - } - } - e.Keccak = w; - const _ = (t, e, r) => (0, o.wrapConstructor)(() => new w(e, t, r)); - (e.sha3_224 = _(6, 144, 28)), - (e.sha3_256 = _(6, 136, 32)), - (e.sha3_384 = _(6, 104, 48)), - (e.sha3_512 = _(6, 72, 64)), - (e.keccak_224 = _(1, 144, 28)), - (e.keccak_256 = _(1, 136, 32)), - (e.keccak_384 = _(1, 104, 48)), - (e.keccak_512 = _(1, 72, 64)); - const M = (t, e, r) => (0, o.wrapXOFConstructorWithOpts)((i = {}) => new w(e, t, void 0 === i.dkLen ? r : i.dkLen, !0)); - (e.shake128 = M(31, 168, 16)), (e.shake256 = M(31, 136, 32)); - }, - 8089: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), - (e.randomBytes = - e.wrapXOFConstructorWithOpts = - e.wrapConstructorWithOpts = - e.wrapConstructor = - e.checkOpts = - e.Hash = - e.concatBytes = - e.toBytes = - e.utf8ToBytes = - e.asyncLoop = - e.nextTick = - e.hexToBytes = - e.bytesToHex = - e.isLE = - e.rotr = - e.createView = - e.u32 = - e.u8 = - void 0); - const i = r(1945); - function n(t) { - return t instanceof Uint8Array || (null != t && 'object' == typeof t && 'Uint8Array' === t.constructor.name); - } - if ( - ((e.u8 = t => new Uint8Array(t.buffer, t.byteOffset, t.byteLength)), - (e.u32 = t => new Uint32Array(t.buffer, t.byteOffset, Math.floor(t.byteLength / 4))), - (e.createView = t => new DataView(t.buffer, t.byteOffset, t.byteLength)), - (e.rotr = (t, e) => (t << (32 - e)) | (t >>> e)), - (e.isLE = 68 === new Uint8Array(new Uint32Array([287454020]).buffer)[0]), - !e.isLE) - ) - throw new Error('Non little-endian hardware is not supported'); - const o = Array.from({ length: 256 }, (t, e) => e.toString(16).padStart(2, '0')); - e.bytesToHex = function (t) { - if (!n(t)) throw new Error('Uint8Array expected'); - let e = ''; - for (let r = 0; r < t.length; r++) e += o[t[r]]; - return e; - }; - const s = 48, - a = 57, - h = 65, - u = 70, - f = 97, - c = 102; - function l(t) { - return t >= s && t <= a ? t - s : t >= h && t <= u ? t - (h - 10) : t >= f && t <= c ? t - (f - 10) : void 0; - } - function d(t) { - if ('string' != typeof t) throw new Error('utf8ToBytes expected string, got ' + typeof t); - return new Uint8Array(new TextEncoder().encode(t)); - } - function p(t) { - if (('string' == typeof t && (t = d(t)), !n(t))) throw new Error('expected Uint8Array, got ' + typeof t); - return t; - } - (e.hexToBytes = function (t) { - if ('string' != typeof t) throw new Error('hex string expected, got ' + typeof t); - const e = t.length, - r = e / 2; - if (e % 2) throw new Error('padded hex string expected, got unpadded hex of length ' + e); - const i = new Uint8Array(r); - for (let e = 0, n = 0; e < r; e++, n += 2) { - const r = l(t.charCodeAt(n)), - o = l(t.charCodeAt(n + 1)); - if (void 0 === r || void 0 === o) { - const e = t[n] + t[n + 1]; - throw new Error('hex string expected, got non-hex character "' + e + '" at index ' + n); - } - i[e] = 16 * r + o; - } - return i; - }), - (e.nextTick = async () => {}), - (e.asyncLoop = async function (t, r, i) { - let n = Date.now(); - for (let o = 0; o < t; o++) { - i(o); - const t = Date.now() - n; - (t >= 0 && t < r) || (await (0, e.nextTick)(), (n += t)); - } - }), - (e.utf8ToBytes = d), - (e.toBytes = p), - (e.concatBytes = function (...t) { - let e = 0; - for (let r = 0; r < t.length; r++) { - const i = t[r]; - if (!n(i)) throw new Error('Uint8Array expected'); - e += i.length; - } - const r = new Uint8Array(e); - for (let e = 0, i = 0; e < t.length; e++) { - const n = t[e]; - r.set(n, i), (i += n.length); - } - return r; - }), - (e.Hash = class { - clone() { - return this._cloneInto(); - } - }); - const m = {}.toString; - (e.checkOpts = function (t, e) { - if (void 0 !== e && '[object Object]' !== m.call(e)) throw new Error('Options should be object or undefined'); - return Object.assign(t, e); - }), - (e.wrapConstructor = function (t) { - const e = e => t().update(p(e)).digest(), - r = t(); - return (e.outputLen = r.outputLen), (e.blockLen = r.blockLen), (e.create = () => t()), e; - }), - (e.wrapConstructorWithOpts = function (t) { - const e = (e, r) => t(r).update(p(e)).digest(), - r = t({}); - return (e.outputLen = r.outputLen), (e.blockLen = r.blockLen), (e.create = e => t(e)), e; - }), - (e.wrapXOFConstructorWithOpts = function (t) { - const e = (e, r) => t(r).update(p(e)).digest(), - r = t({}); - return (e.outputLen = r.outputLen), (e.blockLen = r.blockLen), (e.create = e => t(e)), e; - }), - (e.randomBytes = function (t = 32) { - if (i.crypto && 'function' == typeof i.crypto.getRandomValues) return i.crypto.getRandomValues(new Uint8Array(t)); - throw new Error('crypto.getRandomValues must be defined'); - }); - }, - 9899: (t, e, r) => { - var i = t.exports, - n = (r(7187).EventEmitter, r(8290)), - o = r(8575); - (i.request = function (t, e) { - if ( - ('string' == typeof t && (t = o.parse(t)), - t || (t = {}), - t.host || t.port || (t.port = 80), - !t.host && t.hostname && (t.host = t.hostname), - t.protocol || (t.scheme ? (t.protocol = t.scheme + ':') : (t.protocol = 'http:')), - !t.host) - ) - throw new Error('missing host'); - /:/.test(t.host) && (t.port || (t.port = t.host.split(':')[1]), (t.host = t.host.split(':')[0])), - t.port || (t.port = 'https:' == t.protocol ? 443 : 80); - var r = new n(new XMLHttpRequest(), t); - return e && r.on('response', e), r; - }), - (i.get = function (t, e) { - t.method = 'GET'; - var r = i.request(t, e); - return r.end(), r; - }), - (i.Agent = function () {}), - (i.Agent.defaultMaxSockets = 4), - (i.STATUS_CODES = { - 100: 'Continue', - 101: 'Switching Protocols', - 102: 'Processing', - 200: 'OK', - 201: 'Created', - 202: 'Accepted', - 203: 'Non-Authoritative Information', - 204: 'No Content', - 205: 'Reset Content', - 206: 'Partial Content', - 207: 'Multi-Status', - 300: 'Multiple Choices', - 301: 'Moved Permanently', - 302: 'Moved Temporarily', - 303: 'See Other', - 304: 'Not Modified', - 305: 'Use Proxy', - 307: 'Temporary Redirect', - 400: 'Bad Request', - 401: 'Unauthorized', - 402: 'Payment Required', - 403: 'Forbidden', - 404: 'Not Found', - 405: 'Method Not Allowed', - 406: 'Not Acceptable', - 407: 'Proxy Authentication Required', - 408: 'Request Time-out', - 409: 'Conflict', - 410: 'Gone', - 411: 'Length Required', - 412: 'Precondition Failed', - 413: 'Request Entity Too Large', - 414: 'Request-URI Too Large', - 415: 'Unsupported Media Type', - 416: 'Requested Range Not Satisfiable', - 417: 'Expectation Failed', - 418: "I'm a teapot", - 422: 'Unprocessable Entity', - 423: 'Locked', - 424: 'Failed Dependency', - 425: 'Unordered Collection', - 426: 'Upgrade Required', - 428: 'Precondition Required', - 429: 'Too Many Requests', - 431: 'Request Header Fields Too Large', - 500: 'Internal Server Error', - 501: 'Not Implemented', - 502: 'Bad Gateway', - 503: 'Service Unavailable', - 504: 'Gateway Time-out', - 505: 'HTTP Version Not Supported', - 506: 'Variant Also Negotiates', - 507: 'Insufficient Storage', - 509: 'Bandwidth Limit Exceeded', - 510: 'Not Extended', - 511: 'Network Authentication Required', - }); - }, - 8290: (t, e, r) => { - var i = r(2830), - n = r(7630), - o = r(4188), - s = r(5717), - a = (t.exports = function (t, e) { - var r = this; - (r.writable = !0), - (r.xhr = t), - (r.body = []), - (r.uri = (e.protocol || 'http:') + '//' + e.host + (e.port ? ':' + e.port : '') + (e.path || '/')), - void 0 === e.withCredentials && (e.withCredentials = !0); - try { - t.withCredentials = e.withCredentials; - } catch (t) {} - if (e.responseType) - try { - t.responseType = e.responseType; - } catch (t) {} - if ( - (t.open(e.method || 'GET', r.uri, !0), - (t.onerror = function (t) { - r.emit('error', new Error('Network error')); - }), - (r._headers = {}), - e.headers) - ) - for (var i = h(e.headers), s = 0; s < i.length; s++) { - var a = i[s]; - if (r.isSafeRequestHeader(a)) { - var u = e.headers[a]; - r.setHeader(a, u); - } - } - e.auth && this.setHeader('Authorization', 'Basic ' + o.btoa(e.auth)); - var f = new n(); - f.on('close', function () { - r.emit('close'); - }), - f.on('ready', function () { - r.emit('response', f); - }), - f.on('error', function (t) { - r.emit('error', t); - }), - (t.onreadystatechange = function () { - t.__aborted || f.handle(t); - }); - }); - s(a, i), - (a.prototype.setHeader = function (t, e) { - this._headers[t.toLowerCase()] = e; - }), - (a.prototype.getHeader = function (t) { - return this._headers[t.toLowerCase()]; - }), - (a.prototype.removeHeader = function (t) { - delete this._headers[t.toLowerCase()]; - }), - (a.prototype.write = function (t) { - this.body.push(t); - }), - (a.prototype.destroy = function (t) { - (this.xhr.__aborted = !0), this.xhr.abort(), this.emit('close'); - }), - (a.prototype.end = function (t) { - void 0 !== t && this.body.push(t); - for (var e = h(this._headers), r = 0; r < e.length; r++) { - var i = e[r], - n = this._headers[i]; - if (u(n)) for (var o = 0; o < n.length; o++) this.xhr.setRequestHeader(i, n[o]); - else this.xhr.setRequestHeader(i, n); - } - if (0 === this.body.length) this.xhr.send(''); - else if ('string' == typeof this.body[0]) this.xhr.send(this.body.join('')); - else if (u(this.body[0])) { - var s = []; - for (r = 0; r < this.body.length; r++) s.push.apply(s, this.body[r]); - this.xhr.send(s); - } else if (/Array/.test(Object.prototype.toString.call(this.body[0]))) { - var a = 0; - for (r = 0; r < this.body.length; r++) a += this.body[r].length; - s = new this.body[0].constructor(a); - var f = 0; - for (r = 0; r < this.body.length; r++) { - var l = this.body[r]; - for (o = 0; o < l.length; o++) s[f++] = l[o]; - } - this.xhr.send(s); - } else if (c(this.body[0])) this.xhr.send(this.body[0]); - else { - for (s = '', r = 0; r < this.body.length; r++) s += this.body[r].toString(); - this.xhr.send(s); - } - }), - (a.unsafeHeaders = [ - 'accept-charset', - 'accept-encoding', - 'access-control-request-headers', - 'access-control-request-method', - 'connection', - 'content-length', - 'cookie', - 'cookie2', - 'content-transfer-encoding', - 'date', - 'expect', - 'host', - 'keep-alive', - 'origin', - 'referer', - 'te', - 'trailer', - 'transfer-encoding', - 'upgrade', - 'user-agent', - 'via', - ]), - (a.prototype.isSafeRequestHeader = function (t) { - return !!t && -1 === f(a.unsafeHeaders, t.toLowerCase()); - }); - var h = - Object.keys || - function (t) { - var e = []; - for (var r in t) e.push(r); - return e; - }, - u = - Array.isArray || - function (t) { - return '[object Array]' === Object.prototype.toString.call(t); - }, - f = function (t, e) { - if (t.indexOf) return t.indexOf(e); - for (var r = 0; r < t.length; r++) if (t[r] === e) return r; - return -1; - }, - c = function (t) { - return ( - ('undefined' != typeof Blob && t instanceof Blob) || - ('undefined' != typeof ArrayBuffer && t instanceof ArrayBuffer) || - ('undefined' != typeof FormData && t instanceof FormData) || - void 0 - ); - }; - }, - 7630: (t, e, r) => { - var i = r(2830), - n = r(9539), - o = (t.exports = function (t) { - (this.offset = 0), (this.readable = !0); - }); - n.inherits(o, i); - var s = { streaming: !0, status2: !0 }; - function a(t) { - for (var e = t.getAllResponseHeaders().split(/\r?\n/), r = {}, i = 0; i < e.length; i++) { - var n = e[i]; - if ('' !== n) { - var o = n.match(/^([^:]+):\s*(.*)/); - if (o) { - var s = o[1].toLowerCase(), - a = o[2]; - void 0 !== r[s] ? (h(r[s]) ? r[s].push(a) : (r[s] = [r[s], a])) : (r[s] = a); - } else r[n] = !0; - } - } - return r; - } - (o.prototype.getResponse = function (t) { - var e = String(t.responseType).toLowerCase(); - return 'blob' === e ? t.responseBlob || t.response : 'arraybuffer' === e ? t.response : t.responseText; - }), - (o.prototype.getHeader = function (t) { - return this.headers[t.toLowerCase()]; - }), - (o.prototype.handle = function (t) { - if (2 === t.readyState && s.status2) { - try { - (this.statusCode = t.status), (this.headers = a(t)); - } catch (t) { - s.status2 = !1; - } - s.status2 && this.emit('ready'); - } else if (s.streaming && 3 === t.readyState) { - try { - this.statusCode || ((this.statusCode = t.status), (this.headers = a(t)), this.emit('ready')); - } catch (t) {} - try { - this._emitData(t); - } catch (t) { - s.streaming = !1; - } - } else - 4 === t.readyState && - (this.statusCode || ((this.statusCode = t.status), this.emit('ready')), - this._emitData(t), - t.error ? this.emit('error', this.getResponse(t)) : this.emit('end'), - this.emit('close')); - }), - (o.prototype._emitData = function (t) { - var e = this.getResponse(t); - e.length > this.offset && (this.emit('data', new Buffer(e.slice(this.offset))), (this.offset = e.length)); - }); - var h = - Array.isArray || - function (t) { - return '[object Array]' === Object.prototype.toString.call(t); - }; - }, - 4188: (t, e) => { - !(function () { - var t = e, - r = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='; - function i(t) { - this.message = t; - } - (i.prototype = new Error()), - (i.prototype.name = 'InvalidCharacterError'), - t.btoa || - (t.btoa = function (t) { - for (var e, n, o = 0, s = r, a = ''; t.charAt(0 | o) || ((s = '='), o % 1); a += s.charAt(63 & (e >> (8 - (o % 1) * 8)))) { - if ((n = t.charCodeAt((o += 3 / 4))) > 255) - throw new i("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range."); - e = (e << 8) | n; - } - return a; - }), - t.atob || - (t.atob = function (t) { - if ((t = t.replace(/=+$/, '')).length % 4 == 1) - throw new i("'atob' failed: The string to be decoded is not correctly encoded."); - for ( - var e, n, o = 0, s = 0, a = ''; - (n = t.charAt(s++)); - ~n && ((e = o % 4 ? 64 * e + n : n), o++ % 4) ? (a += String.fromCharCode(255 & (e >> ((-2 * o) & 6)))) : 0 - ) - n = r.indexOf(n); - return a; - }); - })(); - }, - 8583: (t, e, r) => { - 'use strict'; - var i = r(7418); - function n(t, e) { - if (t === e) return 0; - for (var r = t.length, i = e.length, n = 0, o = Math.min(r, i); n < o; ++n) - if (t[n] !== e[n]) { - (r = t[n]), (i = e[n]); - break; - } - return r < i ? -1 : i < r ? 1 : 0; - } - function o(t) { - return r.g.Buffer && 'function' == typeof r.g.Buffer.isBuffer ? r.g.Buffer.isBuffer(t) : !(null == t || !t._isBuffer); - } - var s = r(69), - a = Object.prototype.hasOwnProperty, - h = Array.prototype.slice, - u = 'foo' === function () {}.name; - function f(t) { - return Object.prototype.toString.call(t); - } - function c(t) { - return ( - !o(t) && - 'function' == typeof r.g.ArrayBuffer && - ('function' == typeof ArrayBuffer.isView - ? ArrayBuffer.isView(t) - : !!t && (t instanceof DataView || !!(t.buffer && t.buffer instanceof ArrayBuffer))) - ); - } - var l = (t.exports = y), - d = /\s*function\s+([^\(\s]*)\s*/; - function p(t) { - if (s.isFunction(t)) { - if (u) return t.name; - var e = t.toString().match(d); - return e && e[1]; - } - } - function m(t, e) { - return 'string' == typeof t ? (t.length < e ? t : t.slice(0, e)) : t; - } - function g(t) { - if (u || !s.isFunction(t)) return s.inspect(t); - var e = p(t); - return '[Function' + (e ? ': ' + e : '') + ']'; - } - function b(t, e, r, i, n) { - throw new l.AssertionError({ message: r, actual: t, expected: e, operator: i, stackStartFunction: n }); - } - function y(t, e) { - t || b(t, !0, e, '==', l.ok); - } - function v(t, e, r, i) { - if (t === e) return !0; - if (o(t) && o(e)) return 0 === n(t, e); - if (s.isDate(t) && s.isDate(e)) return t.getTime() === e.getTime(); - if (s.isRegExp(t) && s.isRegExp(e)) - return ( - t.source === e.source && - t.global === e.global && - t.multiline === e.multiline && - t.lastIndex === e.lastIndex && - t.ignoreCase === e.ignoreCase - ); - if ((null !== t && 'object' == typeof t) || (null !== e && 'object' == typeof e)) { - if (c(t) && c(e) && f(t) === f(e) && !(t instanceof Float32Array || t instanceof Float64Array)) - return 0 === n(new Uint8Array(t.buffer), new Uint8Array(e.buffer)); - if (o(t) !== o(e)) return !1; - var a = (i = i || { actual: [], expected: [] }).actual.indexOf(t); - return ( - (-1 !== a && a === i.expected.indexOf(e)) || - (i.actual.push(t), - i.expected.push(e), - (function (t, e, r, i) { - if (null == t || null == e) return !1; - if (s.isPrimitive(t) || s.isPrimitive(e)) return t === e; - if (r && Object.getPrototypeOf(t) !== Object.getPrototypeOf(e)) return !1; - var n = w(t), - o = w(e); - if ((n && !o) || (!n && o)) return !1; - if (n) return v((t = h.call(t)), (e = h.call(e)), r); - var a, - u, - f = E(t), - c = E(e); - if (f.length !== c.length) return !1; - for (f.sort(), c.sort(), u = f.length - 1; u >= 0; u--) if (f[u] !== c[u]) return !1; - for (u = f.length - 1; u >= 0; u--) if (!v(t[(a = f[u])], e[a], r, i)) return !1; - return !0; - })(t, e, r, i)) - ); - } - return r ? t === e : t == e; - } - function w(t) { - return '[object Arguments]' == Object.prototype.toString.call(t); - } - function _(t, e) { - if (!t || !e) return !1; - if ('[object RegExp]' == Object.prototype.toString.call(e)) return e.test(t); - try { - if (t instanceof e) return !0; - } catch (t) {} - return !Error.isPrototypeOf(e) && !0 === e.call({}, t); - } - function M(t, e, r, i) { - var n; - if ('function' != typeof e) throw new TypeError('"block" argument must be a function'); - 'string' == typeof r && ((i = r), (r = null)), - (n = (function (t) { - var e; - try { - t(); - } catch (t) { - e = t; - } - return e; - })(e)), - (i = (r && r.name ? ' (' + r.name + ').' : '.') + (i ? ' ' + i : '.')), - t && !n && b(n, r, 'Missing expected exception' + i); - var o = 'string' == typeof i, - a = !t && n && !r; - if ( - (((!t && s.isError(n) && o && _(n, r)) || a) && b(n, r, 'Got unwanted exception' + i), (t && n && r && !_(n, r)) || (!t && n)) - ) - throw n; - } - (l.AssertionError = function (t) { - (this.name = 'AssertionError'), - (this.actual = t.actual), - (this.expected = t.expected), - (this.operator = t.operator), - t.message - ? ((this.message = t.message), (this.generatedMessage = !1)) - : ((this.message = (function (t) { - return m(g(t.actual), 128) + ' ' + t.operator + ' ' + m(g(t.expected), 128); - })(this)), - (this.generatedMessage = !0)); - var e = t.stackStartFunction || b; - if (Error.captureStackTrace) Error.captureStackTrace(this, e); - else { - var r = new Error(); - if (r.stack) { - var i = r.stack, - n = p(e), - o = i.indexOf('\n' + n); - if (o >= 0) { - var s = i.indexOf('\n', o + 1); - i = i.substring(s + 1); - } - this.stack = i; - } - } - }), - s.inherits(l.AssertionError, Error), - (l.fail = b), - (l.ok = y), - (l.equal = function (t, e, r) { - t != e && b(t, e, r, '==', l.equal); - }), - (l.notEqual = function (t, e, r) { - t == e && b(t, e, r, '!=', l.notEqual); - }), - (l.deepEqual = function (t, e, r) { - v(t, e, !1) || b(t, e, r, 'deepEqual', l.deepEqual); - }), - (l.deepStrictEqual = function (t, e, r) { - v(t, e, !0) || b(t, e, r, 'deepStrictEqual', l.deepStrictEqual); - }), - (l.notDeepEqual = function (t, e, r) { - v(t, e, !1) && b(t, e, r, 'notDeepEqual', l.notDeepEqual); - }), - (l.notDeepStrictEqual = function t(e, r, i) { - v(e, r, !0) && b(e, r, i, 'notDeepStrictEqual', t); - }), - (l.strictEqual = function (t, e, r) { - t !== e && b(t, e, r, '===', l.strictEqual); - }), - (l.notStrictEqual = function (t, e, r) { - t === e && b(t, e, r, '!==', l.notStrictEqual); - }), - (l.throws = function (t, e, r) { - M(!0, t, e, r); - }), - (l.doesNotThrow = function (t, e, r) { - M(!1, t, e, r); - }), - (l.ifError = function (t) { - if (t) throw t; - }), - (l.strict = i( - function t(e, r) { - e || b(e, !0, r, '==', t); - }, - l, - { equal: l.strictEqual, deepEqual: l.deepStrictEqual, notEqual: l.notStrictEqual, notDeepEqual: l.notDeepStrictEqual } - )), - (l.strict.strict = l.strict); - var E = - Object.keys || - function (t) { - var e = []; - for (var r in t) a.call(t, r) && e.push(r); - return e; - }; - }, - 6076: t => { - 'function' == typeof Object.create - ? (t.exports = function (t, e) { - (t.super_ = e), - (t.prototype = Object.create(e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } })); - }) - : (t.exports = function (t, e) { - t.super_ = e; - var r = function () {}; - (r.prototype = e.prototype), (t.prototype = new r()), (t.prototype.constructor = t); - }); - }, - 2014: t => { - t.exports = function (t) { - return ( - t && 'object' == typeof t && 'function' == typeof t.copy && 'function' == typeof t.fill && 'function' == typeof t.readUInt8 - ); - }; - }, - 69: (t, e, r) => { - var i = /%[sdj%]/g; - (e.format = function (t) { - if (!g(t)) { - for (var e = [], r = 0; r < arguments.length; r++) e.push(s(arguments[r])); - return e.join(' '); - } - r = 1; - for ( - var n = arguments, - o = n.length, - a = String(t).replace(i, function (t) { - if ('%%' === t) return '%'; - if (r >= o) return t; - switch (t) { - case '%s': - return String(n[r++]); - case '%d': - return Number(n[r++]); - case '%j': - try { - return JSON.stringify(n[r++]); - } catch (t) { - return '[Circular]'; - } - default: - return t; - } - }), - h = n[r]; - r < o; - h = n[++r] - ) - p(h) || !v(h) ? (a += ' ' + h) : (a += ' ' + s(h)); - return a; - }), - (e.deprecate = function (t, i) { - if (b(r.g.process)) - return function () { - return e.deprecate(t, i).apply(this, arguments); - }; - if (!0 === process.noDeprecation) return t; - var n = !1; - return function () { - if (!n) { - if (process.throwDeprecation) throw new Error(i); - process.traceDeprecation ? console.trace(i) : console.error(i), (n = !0); - } - return t.apply(this, arguments); - }; - }); - var n, - o = {}; - function s(t, r) { - var i = { seen: [], stylize: h }; - return ( - arguments.length >= 3 && (i.depth = arguments[2]), - arguments.length >= 4 && (i.colors = arguments[3]), - d(r) ? (i.showHidden = r) : r && e._extend(i, r), - b(i.showHidden) && (i.showHidden = !1), - b(i.depth) && (i.depth = 2), - b(i.colors) && (i.colors = !1), - b(i.customInspect) && (i.customInspect = !0), - i.colors && (i.stylize = a), - u(i, t, i.depth) - ); - } - function a(t, e) { - var r = s.styles[e]; - return r ? '[' + s.colors[r][0] + 'm' + t + '[' + s.colors[r][1] + 'm' : t; - } - function h(t, e) { - return t; - } - function u(t, r, i) { - if (t.customInspect && r && M(r.inspect) && r.inspect !== e.inspect && (!r.constructor || r.constructor.prototype !== r)) { - var n = r.inspect(i, t); - return g(n) || (n = u(t, n, i)), n; - } - var o = (function (t, e) { - if (b(e)) return t.stylize('undefined', 'undefined'); - if (g(e)) { - var r = "'" + JSON.stringify(e).replace(/^"|"$/g, '').replace(/'/g, "\\'").replace(/\\"/g, '"') + "'"; - return t.stylize(r, 'string'); - } - return m(e) ? t.stylize('' + e, 'number') : d(e) ? t.stylize('' + e, 'boolean') : p(e) ? t.stylize('null', 'null') : void 0; - })(t, r); - if (o) return o; - var s = Object.keys(r), - a = (function (t) { - var e = {}; - return ( - t.forEach(function (t, r) { - e[t] = !0; - }), - e - ); - })(s); - if ((t.showHidden && (s = Object.getOwnPropertyNames(r)), _(r) && (s.indexOf('message') >= 0 || s.indexOf('description') >= 0))) - return f(r); - if (0 === s.length) { - if (M(r)) { - var h = r.name ? ': ' + r.name : ''; - return t.stylize('[Function' + h + ']', 'special'); - } - if (y(r)) return t.stylize(RegExp.prototype.toString.call(r), 'regexp'); - if (w(r)) return t.stylize(Date.prototype.toString.call(r), 'date'); - if (_(r)) return f(r); - } - var v, - E = '', - S = !1, - x = ['{', '}']; - return ( - l(r) && ((S = !0), (x = ['[', ']'])), - M(r) && (E = ' [Function' + (r.name ? ': ' + r.name : '') + ']'), - y(r) && (E = ' ' + RegExp.prototype.toString.call(r)), - w(r) && (E = ' ' + Date.prototype.toUTCString.call(r)), - _(r) && (E = ' ' + f(r)), - 0 !== s.length || (S && 0 != r.length) - ? i < 0 - ? y(r) - ? t.stylize(RegExp.prototype.toString.call(r), 'regexp') - : t.stylize('[Object]', 'special') - : (t.seen.push(r), - (v = S - ? (function (t, e, r, i, n) { - for (var o = [], s = 0, a = e.length; s < a; ++s) - A(e, String(s)) ? o.push(c(t, e, r, i, String(s), !0)) : o.push(''); - return ( - n.forEach(function (n) { - n.match(/^\d+$/) || o.push(c(t, e, r, i, n, !0)); - }), - o - ); - })(t, r, i, a, s) - : s.map(function (e) { - return c(t, r, i, a, e, S); - })), - t.seen.pop(), - (function (t, e, r) { - return t.reduce(function (t, e) { - return e.indexOf('\n'), t + e.replace(/\u001b\[\d\d?m/g, '').length + 1; - }, 0) > 60 - ? r[0] + ('' === e ? '' : e + '\n ') + ' ' + t.join(',\n ') + ' ' + r[1] - : r[0] + e + ' ' + t.join(', ') + ' ' + r[1]; - })(v, E, x)) - : x[0] + E + x[1] - ); - } - function f(t) { - return '[' + Error.prototype.toString.call(t) + ']'; - } - function c(t, e, r, i, n, o) { - var s, a, h; - if ( - ((h = Object.getOwnPropertyDescriptor(e, n) || { value: e[n] }).get - ? (a = h.set ? t.stylize('[Getter/Setter]', 'special') : t.stylize('[Getter]', 'special')) - : h.set && (a = t.stylize('[Setter]', 'special')), - A(i, n) || (s = '[' + n + ']'), - a || - (t.seen.indexOf(h.value) < 0 - ? (a = p(r) ? u(t, h.value, null) : u(t, h.value, r - 1)).indexOf('\n') > -1 && - (a = o - ? a - .split('\n') - .map(function (t) { - return ' ' + t; - }) - .join('\n') - .substr(2) - : '\n' + - a - .split('\n') - .map(function (t) { - return ' ' + t; - }) - .join('\n')) - : (a = t.stylize('[Circular]', 'special'))), - b(s)) - ) { - if (o && n.match(/^\d+$/)) return a; - (s = JSON.stringify('' + n)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/) - ? ((s = s.substr(1, s.length - 2)), (s = t.stylize(s, 'name'))) - : ((s = s - .replace(/'/g, "\\'") - .replace(/\\"/g, '"') - .replace(/(^"|"$)/g, "'")), - (s = t.stylize(s, 'string'))); - } - return s + ': ' + a; - } - function l(t) { - return Array.isArray(t); - } - function d(t) { - return 'boolean' == typeof t; - } - function p(t) { - return null === t; - } - function m(t) { - return 'number' == typeof t; - } - function g(t) { - return 'string' == typeof t; - } - function b(t) { - return void 0 === t; - } - function y(t) { - return v(t) && '[object RegExp]' === E(t); - } - function v(t) { - return 'object' == typeof t && null !== t; - } - function w(t) { - return v(t) && '[object Date]' === E(t); - } - function _(t) { - return v(t) && ('[object Error]' === E(t) || t instanceof Error); - } - function M(t) { - return 'function' == typeof t; - } - function E(t) { - return Object.prototype.toString.call(t); - } - function S(t) { - return t < 10 ? '0' + t.toString(10) : t.toString(10); - } - (e.debuglog = function (t) { - if ((b(n) && (n = process.env.NODE_DEBUG || ''), (t = t.toUpperCase()), !o[t])) - if (new RegExp('\\b' + t + '\\b', 'i').test(n)) { - var r = process.pid; - o[t] = function () { - var i = e.format.apply(e, arguments); - console.error('%s %d: %s', t, r, i); - }; - } else o[t] = function () {}; - return o[t]; - }), - (e.inspect = s), - (s.colors = { - bold: [1, 22], - italic: [3, 23], - underline: [4, 24], - inverse: [7, 27], - white: [37, 39], - grey: [90, 39], - black: [30, 39], - blue: [34, 39], - cyan: [36, 39], - green: [32, 39], - magenta: [35, 39], - red: [31, 39], - yellow: [33, 39], - }), - (s.styles = { - special: 'cyan', - number: 'yellow', - boolean: 'yellow', - undefined: 'grey', - null: 'bold', - string: 'green', - date: 'magenta', - regexp: 'red', - }), - (e.isArray = l), - (e.isBoolean = d), - (e.isNull = p), - (e.isNullOrUndefined = function (t) { - return null == t; - }), - (e.isNumber = m), - (e.isString = g), - (e.isSymbol = function (t) { - return 'symbol' == typeof t; - }), - (e.isUndefined = b), - (e.isRegExp = y), - (e.isObject = v), - (e.isDate = w), - (e.isError = _), - (e.isFunction = M), - (e.isPrimitive = function (t) { - return ( - null === t || 'boolean' == typeof t || 'number' == typeof t || 'string' == typeof t || 'symbol' == typeof t || void 0 === t - ); - }), - (e.isBuffer = r(2014)); - var x = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']; - function A(t, e) { - return Object.prototype.hasOwnProperty.call(t, e); - } - (e.log = function () { - var t, r; - console.log( - '%s - %s', - ((r = [S((t = new Date()).getHours()), S(t.getMinutes()), S(t.getSeconds())].join(':')), - [t.getDate(), x[t.getMonth()], r].join(' ')), - e.format.apply(e, arguments) - ); - }), - (e.inherits = r(6076)), - (e._extend = function (t, e) { - if (!e || !v(e)) return t; - for (var r = Object.keys(e), i = r.length; i--; ) t[r[i]] = e[r[i]]; - return t; - }); - }, - 9742: (t, e) => { - 'use strict'; - (e.byteLength = function (t) { - var e = a(t), - r = e[0], - i = e[1]; - return (3 * (r + i)) / 4 - i; - }), - (e.toByteArray = function (t) { - var e, - r, - o = a(t), - s = o[0], - h = o[1], - u = new n( - (function (t, e, r) { - return (3 * (e + r)) / 4 - r; - })(0, s, h) - ), - f = 0, - c = h > 0 ? s - 4 : s; - for (r = 0; r < c; r += 4) - (e = (i[t.charCodeAt(r)] << 18) | (i[t.charCodeAt(r + 1)] << 12) | (i[t.charCodeAt(r + 2)] << 6) | i[t.charCodeAt(r + 3)]), - (u[f++] = (e >> 16) & 255), - (u[f++] = (e >> 8) & 255), - (u[f++] = 255 & e); - return ( - 2 === h && ((e = (i[t.charCodeAt(r)] << 2) | (i[t.charCodeAt(r + 1)] >> 4)), (u[f++] = 255 & e)), - 1 === h && - ((e = (i[t.charCodeAt(r)] << 10) | (i[t.charCodeAt(r + 1)] << 4) | (i[t.charCodeAt(r + 2)] >> 2)), - (u[f++] = (e >> 8) & 255), - (u[f++] = 255 & e)), - u - ); - }), - (e.fromByteArray = function (t) { - for (var e, i = t.length, n = i % 3, o = [], s = 16383, a = 0, u = i - n; a < u; a += s) o.push(h(t, a, a + s > u ? u : a + s)); - return ( - 1 === n - ? ((e = t[i - 1]), o.push(r[e >> 2] + r[(e << 4) & 63] + '==')) - : 2 === n && ((e = (t[i - 2] << 8) + t[i - 1]), o.push(r[e >> 10] + r[(e >> 4) & 63] + r[(e << 2) & 63] + '=')), - o.join('') - ); - }); - for ( - var r = [], - i = [], - n = 'undefined' != typeof Uint8Array ? Uint8Array : Array, - o = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/', - s = 0; - s < 64; - ++s - ) - (r[s] = o[s]), (i[o.charCodeAt(s)] = s); - function a(t) { - var e = t.length; - if (e % 4 > 0) throw new Error('Invalid string. Length must be a multiple of 4'); - var r = t.indexOf('='); - return -1 === r && (r = e), [r, r === e ? 0 : 4 - (r % 4)]; - } - function h(t, e, i) { - for (var n, o, s = [], a = e; a < i; a += 3) - (n = ((t[a] << 16) & 16711680) + ((t[a + 1] << 8) & 65280) + (255 & t[a + 2])), - s.push(r[((o = n) >> 18) & 63] + r[(o >> 12) & 63] + r[(o >> 6) & 63] + r[63 & o]); - return s.join(''); - } - (i['-'.charCodeAt(0)] = 62), (i['_'.charCodeAt(0)] = 63); - }, - 6907: (t, e) => { - 'use strict'; - var r = 'undefined' != typeof Uint8Array && 'undefined' != typeof Uint16Array && 'undefined' != typeof Int32Array; - (e.assign = function (t) { - for (var e = Array.prototype.slice.call(arguments, 1); e.length; ) { - var r = e.shift(); - if (r) { - if ('object' != typeof r) throw new TypeError(r + 'must be non-object'); - for (var i in r) r.hasOwnProperty(i) && (t[i] = r[i]); - } - } - return t; - }), - (e.shrinkBuf = function (t, e) { - return t.length === e ? t : t.subarray ? t.subarray(0, e) : ((t.length = e), t); - }); - var i = { - arraySet: function (t, e, r, i, n) { - if (e.subarray && t.subarray) t.set(e.subarray(r, r + i), n); - else for (var o = 0; o < i; o++) t[n + o] = e[r + o]; - }, - flattenChunks: function (t) { - var e, r, i, n, o, s; - for (i = 0, e = 0, r = t.length; e < r; e++) i += t[e].length; - for (s = new Uint8Array(i), n = 0, e = 0, r = t.length; e < r; e++) (o = t[e]), s.set(o, n), (n += o.length); - return s; - }, - }, - n = { - arraySet: function (t, e, r, i, n) { - for (var o = 0; o < i; o++) t[n + o] = e[r + o]; - }, - flattenChunks: function (t) { - return [].concat.apply([], t); - }, - }; - (e.setTyped = function (t) { - t - ? ((e.Buf8 = Uint8Array), (e.Buf16 = Uint16Array), (e.Buf32 = Int32Array), e.assign(e, i)) - : ((e.Buf8 = Array), (e.Buf16 = Array), (e.Buf32 = Array), e.assign(e, n)); - }), - e.setTyped(r); - }, - 7575: t => { - 'use strict'; - t.exports = function (t, e, r, i) { - for (var n = (65535 & t) | 0, o = ((t >>> 16) & 65535) | 0, s = 0; 0 !== r; ) { - r -= s = r > 2e3 ? 2e3 : r; - do { - o = (o + (n = (n + e[i++]) | 0)) | 0; - } while (--s); - (n %= 65521), (o %= 65521); - } - return n | (o << 16) | 0; - }; - }, - 7162: t => { - 'use strict'; - t.exports = { - Z_NO_FLUSH: 0, - Z_PARTIAL_FLUSH: 1, - Z_SYNC_FLUSH: 2, - Z_FULL_FLUSH: 3, - Z_FINISH: 4, - Z_BLOCK: 5, - Z_TREES: 6, - Z_OK: 0, - Z_STREAM_END: 1, - Z_NEED_DICT: 2, - Z_ERRNO: -1, - Z_STREAM_ERROR: -2, - Z_DATA_ERROR: -3, - Z_BUF_ERROR: -5, - Z_NO_COMPRESSION: 0, - Z_BEST_SPEED: 1, - Z_BEST_COMPRESSION: 9, - Z_DEFAULT_COMPRESSION: -1, - Z_FILTERED: 1, - Z_HUFFMAN_ONLY: 2, - Z_RLE: 3, - Z_FIXED: 4, - Z_DEFAULT_STRATEGY: 0, - Z_BINARY: 0, - Z_TEXT: 1, - Z_UNKNOWN: 2, - Z_DEFLATED: 8, - }; - }, - 631: t => { - 'use strict'; - var e = (function () { - for (var t, e = [], r = 0; r < 256; r++) { - t = r; - for (var i = 0; i < 8; i++) t = 1 & t ? 3988292384 ^ (t >>> 1) : t >>> 1; - e[r] = t; - } - return e; - })(); - t.exports = function (t, r, i, n) { - var o = e, - s = n + i; - t ^= -1; - for (var a = n; a < s; a++) t = (t >>> 8) ^ o[255 & (t ^ r[a])]; - return -1 ^ t; - }; - }, - 2233: (t, e, r) => { - 'use strict'; - var i, - n = r(6907), - o = r(1339), - s = r(7575), - a = r(631), - h = r(9364), - u = 0, - f = 0, - c = -2, - l = 2, - d = 8, - p = 286, - m = 30, - g = 19, - b = 2 * p + 1, - y = 15, - v = 3, - w = 258, - _ = w + v + 1, - M = 42, - E = 103, - S = 113, - x = 666; - function A(t, e) { - return (t.msg = h[e]), e; - } - function k(t) { - return (t << 1) - (t > 4 ? 9 : 0); - } - function R(t) { - for (var e = t.length; --e >= 0; ) t[e] = 0; - } - function B(t) { - var e = t.state, - r = e.pending; - r > t.avail_out && (r = t.avail_out), - 0 !== r && - (n.arraySet(t.output, e.pending_buf, e.pending_out, r, t.next_out), - (t.next_out += r), - (e.pending_out += r), - (t.total_out += r), - (t.avail_out -= r), - (e.pending -= r), - 0 === e.pending && (e.pending_out = 0)); - } - function I(t, e) { - o._tr_flush_block(t, t.block_start >= 0 ? t.block_start : -1, t.strstart - t.block_start, e), - (t.block_start = t.strstart), - B(t.strm); - } - function T(t, e) { - t.pending_buf[t.pending++] = e; - } - function P(t, e) { - (t.pending_buf[t.pending++] = (e >>> 8) & 255), (t.pending_buf[t.pending++] = 255 & e); - } - function O(t, e) { - var r, - i, - n = t.max_chain_length, - o = t.strstart, - s = t.prev_length, - a = t.nice_match, - h = t.strstart > t.w_size - _ ? t.strstart - (t.w_size - _) : 0, - u = t.window, - f = t.w_mask, - c = t.prev, - l = t.strstart + w, - d = u[o + s - 1], - p = u[o + s]; - t.prev_length >= t.good_match && (n >>= 2), a > t.lookahead && (a = t.lookahead); - do { - if (u[(r = e) + s] === p && u[r + s - 1] === d && u[r] === u[o] && u[++r] === u[o + 1]) { - (o += 2), r++; - do {} while ( - u[++o] === u[++r] && - u[++o] === u[++r] && - u[++o] === u[++r] && - u[++o] === u[++r] && - u[++o] === u[++r] && - u[++o] === u[++r] && - u[++o] === u[++r] && - u[++o] === u[++r] && - o < l - ); - if (((i = w - (l - o)), (o = l - w), i > s)) { - if (((t.match_start = e), (s = i), i >= a)) break; - (d = u[o + s - 1]), (p = u[o + s]); - } - } - } while ((e = c[e & f]) > h && 0 != --n); - return s <= t.lookahead ? s : t.lookahead; - } - function L(t) { - var e, - r, - i, - o, - h, - u, - f, - c, - l, - d, - p = t.w_size; - do { - if (((o = t.window_size - t.lookahead - t.strstart), t.strstart >= p + (p - _))) { - n.arraySet(t.window, t.window, p, p, 0), (t.match_start -= p), (t.strstart -= p), (t.block_start -= p), (e = r = t.hash_size); - do { - (i = t.head[--e]), (t.head[e] = i >= p ? i - p : 0); - } while (--r); - e = r = p; - do { - (i = t.prev[--e]), (t.prev[e] = i >= p ? i - p : 0); - } while (--r); - o += p; - } - if (0 === t.strm.avail_in) break; - if ( - ((u = t.strm), - (f = t.window), - (c = t.strstart + t.lookahead), - (l = o), - (d = void 0), - (d = u.avail_in) > l && (d = l), - (r = - 0 === d - ? 0 - : ((u.avail_in -= d), - n.arraySet(f, u.input, u.next_in, d, c), - 1 === u.state.wrap ? (u.adler = s(u.adler, f, d, c)) : 2 === u.state.wrap && (u.adler = a(u.adler, f, d, c)), - (u.next_in += d), - (u.total_in += d), - d)), - (t.lookahead += r), - t.lookahead + t.insert >= v) - ) - for ( - h = t.strstart - t.insert, t.ins_h = t.window[h], t.ins_h = ((t.ins_h << t.hash_shift) ^ t.window[h + 1]) & t.hash_mask; - t.insert && - ((t.ins_h = ((t.ins_h << t.hash_shift) ^ t.window[h + v - 1]) & t.hash_mask), - (t.prev[h & t.w_mask] = t.head[t.ins_h]), - (t.head[t.ins_h] = h), - h++, - t.insert--, - !(t.lookahead + t.insert < v)); - - ); - } while (t.lookahead < _ && 0 !== t.strm.avail_in); - } - function C(t, e) { - for (var r, i; ; ) { - if (t.lookahead < _) { - if ((L(t), t.lookahead < _ && e === u)) return 1; - if (0 === t.lookahead) break; - } - if ( - ((r = 0), - t.lookahead >= v && - ((t.ins_h = ((t.ins_h << t.hash_shift) ^ t.window[t.strstart + v - 1]) & t.hash_mask), - (r = t.prev[t.strstart & t.w_mask] = t.head[t.ins_h]), - (t.head[t.ins_h] = t.strstart)), - 0 !== r && t.strstart - r <= t.w_size - _ && (t.match_length = O(t, r)), - t.match_length >= v) - ) - if ( - ((i = o._tr_tally(t, t.strstart - t.match_start, t.match_length - v)), - (t.lookahead -= t.match_length), - t.match_length <= t.max_lazy_match && t.lookahead >= v) - ) { - t.match_length--; - do { - t.strstart++, - (t.ins_h = ((t.ins_h << t.hash_shift) ^ t.window[t.strstart + v - 1]) & t.hash_mask), - (r = t.prev[t.strstart & t.w_mask] = t.head[t.ins_h]), - (t.head[t.ins_h] = t.strstart); - } while (0 != --t.match_length); - t.strstart++; - } else - (t.strstart += t.match_length), - (t.match_length = 0), - (t.ins_h = t.window[t.strstart]), - (t.ins_h = ((t.ins_h << t.hash_shift) ^ t.window[t.strstart + 1]) & t.hash_mask); - else (i = o._tr_tally(t, 0, t.window[t.strstart])), t.lookahead--, t.strstart++; - if (i && (I(t, !1), 0 === t.strm.avail_out)) return 1; - } - return ( - (t.insert = t.strstart < v - 1 ? t.strstart : v - 1), - 4 === e ? (I(t, !0), 0 === t.strm.avail_out ? 3 : 4) : t.last_lit && (I(t, !1), 0 === t.strm.avail_out) ? 1 : 2 - ); - } - function N(t, e) { - for (var r, i, n; ; ) { - if (t.lookahead < _) { - if ((L(t), t.lookahead < _ && e === u)) return 1; - if (0 === t.lookahead) break; - } - if ( - ((r = 0), - t.lookahead >= v && - ((t.ins_h = ((t.ins_h << t.hash_shift) ^ t.window[t.strstart + v - 1]) & t.hash_mask), - (r = t.prev[t.strstart & t.w_mask] = t.head[t.ins_h]), - (t.head[t.ins_h] = t.strstart)), - (t.prev_length = t.match_length), - (t.prev_match = t.match_start), - (t.match_length = v - 1), - 0 !== r && - t.prev_length < t.max_lazy_match && - t.strstart - r <= t.w_size - _ && - ((t.match_length = O(t, r)), - t.match_length <= 5 && - (1 === t.strategy || (t.match_length === v && t.strstart - t.match_start > 4096)) && - (t.match_length = v - 1)), - t.prev_length >= v && t.match_length <= t.prev_length) - ) { - (n = t.strstart + t.lookahead - v), - (i = o._tr_tally(t, t.strstart - 1 - t.prev_match, t.prev_length - v)), - (t.lookahead -= t.prev_length - 1), - (t.prev_length -= 2); - do { - ++t.strstart <= n && - ((t.ins_h = ((t.ins_h << t.hash_shift) ^ t.window[t.strstart + v - 1]) & t.hash_mask), - (r = t.prev[t.strstart & t.w_mask] = t.head[t.ins_h]), - (t.head[t.ins_h] = t.strstart)); - } while (0 != --t.prev_length); - if (((t.match_available = 0), (t.match_length = v - 1), t.strstart++, i && (I(t, !1), 0 === t.strm.avail_out))) return 1; - } else if (t.match_available) { - if (((i = o._tr_tally(t, 0, t.window[t.strstart - 1])) && I(t, !1), t.strstart++, t.lookahead--, 0 === t.strm.avail_out)) - return 1; - } else (t.match_available = 1), t.strstart++, t.lookahead--; - } - return ( - t.match_available && ((i = o._tr_tally(t, 0, t.window[t.strstart - 1])), (t.match_available = 0)), - (t.insert = t.strstart < v - 1 ? t.strstart : v - 1), - 4 === e ? (I(t, !0), 0 === t.strm.avail_out ? 3 : 4) : t.last_lit && (I(t, !1), 0 === t.strm.avail_out) ? 1 : 2 - ); - } - function j(t, e, r, i, n) { - (this.good_length = t), (this.max_lazy = e), (this.nice_length = r), (this.max_chain = i), (this.func = n); - } - function U() { - (this.strm = null), - (this.status = 0), - (this.pending_buf = null), - (this.pending_buf_size = 0), - (this.pending_out = 0), - (this.pending = 0), - (this.wrap = 0), - (this.gzhead = null), - (this.gzindex = 0), - (this.method = d), - (this.last_flush = -1), - (this.w_size = 0), - (this.w_bits = 0), - (this.w_mask = 0), - (this.window = null), - (this.window_size = 0), - (this.prev = null), - (this.head = null), - (this.ins_h = 0), - (this.hash_size = 0), - (this.hash_bits = 0), - (this.hash_mask = 0), - (this.hash_shift = 0), - (this.block_start = 0), - (this.match_length = 0), - (this.prev_match = 0), - (this.match_available = 0), - (this.strstart = 0), - (this.match_start = 0), - (this.lookahead = 0), - (this.prev_length = 0), - (this.max_chain_length = 0), - (this.max_lazy_match = 0), - (this.level = 0), - (this.strategy = 0), - (this.good_match = 0), - (this.nice_match = 0), - (this.dyn_ltree = new n.Buf16(2 * b)), - (this.dyn_dtree = new n.Buf16(2 * (2 * m + 1))), - (this.bl_tree = new n.Buf16(2 * (2 * g + 1))), - R(this.dyn_ltree), - R(this.dyn_dtree), - R(this.bl_tree), - (this.l_desc = null), - (this.d_desc = null), - (this.bl_desc = null), - (this.bl_count = new n.Buf16(y + 1)), - (this.heap = new n.Buf16(2 * p + 1)), - R(this.heap), - (this.heap_len = 0), - (this.heap_max = 0), - (this.depth = new n.Buf16(2 * p + 1)), - R(this.depth), - (this.l_buf = 0), - (this.lit_bufsize = 0), - (this.last_lit = 0), - (this.d_buf = 0), - (this.opt_len = 0), - (this.static_len = 0), - (this.matches = 0), - (this.insert = 0), - (this.bi_buf = 0), - (this.bi_valid = 0); - } - function D(t) { - var e; - return t && t.state - ? ((t.total_in = t.total_out = 0), - (t.data_type = l), - ((e = t.state).pending = 0), - (e.pending_out = 0), - e.wrap < 0 && (e.wrap = -e.wrap), - (e.status = e.wrap ? M : S), - (t.adler = 2 === e.wrap ? 0 : 1), - (e.last_flush = u), - o._tr_init(e), - f) - : A(t, c); - } - function z(t) { - var e, - r = D(t); - return ( - r === f && - (((e = t.state).window_size = 2 * e.w_size), - R(e.head), - (e.max_lazy_match = i[e.level].max_lazy), - (e.good_match = i[e.level].good_length), - (e.nice_match = i[e.level].nice_length), - (e.max_chain_length = i[e.level].max_chain), - (e.strstart = 0), - (e.block_start = 0), - (e.lookahead = 0), - (e.insert = 0), - (e.match_length = e.prev_length = v - 1), - (e.match_available = 0), - (e.ins_h = 0)), - r - ); - } - function F(t, e, r, i, o, s) { - if (!t) return c; - var a = 1; - if ( - (-1 === e && (e = 6), - i < 0 ? ((a = 0), (i = -i)) : i > 15 && ((a = 2), (i -= 16)), - o < 1 || o > 9 || r !== d || i < 8 || i > 15 || e < 0 || e > 9 || s < 0 || s > 4) - ) - return A(t, c); - 8 === i && (i = 9); - var h = new U(); - return ( - (t.state = h), - (h.strm = t), - (h.wrap = a), - (h.gzhead = null), - (h.w_bits = i), - (h.w_size = 1 << h.w_bits), - (h.w_mask = h.w_size - 1), - (h.hash_bits = o + 7), - (h.hash_size = 1 << h.hash_bits), - (h.hash_mask = h.hash_size - 1), - (h.hash_shift = ~~((h.hash_bits + v - 1) / v)), - (h.window = new n.Buf8(2 * h.w_size)), - (h.head = new n.Buf16(h.hash_size)), - (h.prev = new n.Buf16(h.w_size)), - (h.lit_bufsize = 1 << (o + 6)), - (h.pending_buf_size = 4 * h.lit_bufsize), - (h.pending_buf = new n.Buf8(h.pending_buf_size)), - (h.d_buf = 1 * h.lit_bufsize), - (h.l_buf = 3 * h.lit_bufsize), - (h.level = e), - (h.strategy = s), - (h.method = r), - z(t) - ); - } - (i = [ - new j(0, 0, 0, 0, function (t, e) { - var r = 65535; - for (r > t.pending_buf_size - 5 && (r = t.pending_buf_size - 5); ; ) { - if (t.lookahead <= 1) { - if ((L(t), 0 === t.lookahead && e === u)) return 1; - if (0 === t.lookahead) break; - } - (t.strstart += t.lookahead), (t.lookahead = 0); - var i = t.block_start + r; - if ( - (0 === t.strstart || t.strstart >= i) && - ((t.lookahead = t.strstart - i), (t.strstart = i), I(t, !1), 0 === t.strm.avail_out) - ) - return 1; - if (t.strstart - t.block_start >= t.w_size - _ && (I(t, !1), 0 === t.strm.avail_out)) return 1; - } - return ( - (t.insert = 0), - 4 === e ? (I(t, !0), 0 === t.strm.avail_out ? 3 : 4) : (t.strstart > t.block_start && (I(t, !1), t.strm.avail_out), 1) - ); - }), - new j(4, 4, 8, 4, C), - new j(4, 5, 16, 8, C), - new j(4, 6, 32, 32, C), - new j(4, 4, 16, 16, N), - new j(8, 16, 32, 32, N), - new j(8, 16, 128, 128, N), - new j(8, 32, 128, 256, N), - new j(32, 128, 258, 1024, N), - new j(32, 258, 258, 4096, N), - ]), - (e.deflateInit = function (t, e) { - return F(t, e, d, 15, 8, 0); - }), - (e.deflateInit2 = F), - (e.deflateReset = z), - (e.deflateResetKeep = D), - (e.deflateSetHeader = function (t, e) { - return t && t.state ? (2 !== t.state.wrap ? c : ((t.state.gzhead = e), f)) : c; - }), - (e.deflate = function (t, e) { - var r, n, s, h; - if (!t || !t.state || e > 5 || e < 0) return t ? A(t, c) : c; - if (((n = t.state), !t.output || (!t.input && 0 !== t.avail_in) || (n.status === x && 4 !== e))) - return A(t, 0 === t.avail_out ? -5 : c); - if (((n.strm = t), (r = n.last_flush), (n.last_flush = e), n.status === M)) - if (2 === n.wrap) - (t.adler = 0), - T(n, 31), - T(n, 139), - T(n, 8), - n.gzhead - ? (T( - n, - (n.gzhead.text ? 1 : 0) + - (n.gzhead.hcrc ? 2 : 0) + - (n.gzhead.extra ? 4 : 0) + - (n.gzhead.name ? 8 : 0) + - (n.gzhead.comment ? 16 : 0) - ), - T(n, 255 & n.gzhead.time), - T(n, (n.gzhead.time >> 8) & 255), - T(n, (n.gzhead.time >> 16) & 255), - T(n, (n.gzhead.time >> 24) & 255), - T(n, 9 === n.level ? 2 : n.strategy >= 2 || n.level < 2 ? 4 : 0), - T(n, 255 & n.gzhead.os), - n.gzhead.extra && - n.gzhead.extra.length && - (T(n, 255 & n.gzhead.extra.length), T(n, (n.gzhead.extra.length >> 8) & 255)), - n.gzhead.hcrc && (t.adler = a(t.adler, n.pending_buf, n.pending, 0)), - (n.gzindex = 0), - (n.status = 69)) - : (T(n, 0), - T(n, 0), - T(n, 0), - T(n, 0), - T(n, 0), - T(n, 9 === n.level ? 2 : n.strategy >= 2 || n.level < 2 ? 4 : 0), - T(n, 3), - (n.status = S)); - else { - var l = (d + ((n.w_bits - 8) << 4)) << 8; - (l |= (n.strategy >= 2 || n.level < 2 ? 0 : n.level < 6 ? 1 : 6 === n.level ? 2 : 3) << 6), - 0 !== n.strstart && (l |= 32), - (l += 31 - (l % 31)), - (n.status = S), - P(n, l), - 0 !== n.strstart && (P(n, t.adler >>> 16), P(n, 65535 & t.adler)), - (t.adler = 1); - } - if (69 === n.status) - if (n.gzhead.extra) { - for ( - s = n.pending; - n.gzindex < (65535 & n.gzhead.extra.length) && - (n.pending !== n.pending_buf_size || - (n.gzhead.hcrc && n.pending > s && (t.adler = a(t.adler, n.pending_buf, n.pending - s, s)), - B(t), - (s = n.pending), - n.pending !== n.pending_buf_size)); - - ) - T(n, 255 & n.gzhead.extra[n.gzindex]), n.gzindex++; - n.gzhead.hcrc && n.pending > s && (t.adler = a(t.adler, n.pending_buf, n.pending - s, s)), - n.gzindex === n.gzhead.extra.length && ((n.gzindex = 0), (n.status = 73)); - } else n.status = 73; - if (73 === n.status) - if (n.gzhead.name) { - s = n.pending; - do { - if ( - n.pending === n.pending_buf_size && - (n.gzhead.hcrc && n.pending > s && (t.adler = a(t.adler, n.pending_buf, n.pending - s, s)), - B(t), - (s = n.pending), - n.pending === n.pending_buf_size) - ) { - h = 1; - break; - } - (h = n.gzindex < n.gzhead.name.length ? 255 & n.gzhead.name.charCodeAt(n.gzindex++) : 0), T(n, h); - } while (0 !== h); - n.gzhead.hcrc && n.pending > s && (t.adler = a(t.adler, n.pending_buf, n.pending - s, s)), - 0 === h && ((n.gzindex = 0), (n.status = 91)); - } else n.status = 91; - if (91 === n.status) - if (n.gzhead.comment) { - s = n.pending; - do { - if ( - n.pending === n.pending_buf_size && - (n.gzhead.hcrc && n.pending > s && (t.adler = a(t.adler, n.pending_buf, n.pending - s, s)), - B(t), - (s = n.pending), - n.pending === n.pending_buf_size) - ) { - h = 1; - break; - } - (h = n.gzindex < n.gzhead.comment.length ? 255 & n.gzhead.comment.charCodeAt(n.gzindex++) : 0), T(n, h); - } while (0 !== h); - n.gzhead.hcrc && n.pending > s && (t.adler = a(t.adler, n.pending_buf, n.pending - s, s)), 0 === h && (n.status = E); - } else n.status = E; - if ( - (n.status === E && - (n.gzhead.hcrc - ? (n.pending + 2 > n.pending_buf_size && B(t), - n.pending + 2 <= n.pending_buf_size && (T(n, 255 & t.adler), T(n, (t.adler >> 8) & 255), (t.adler = 0), (n.status = S))) - : (n.status = S)), - 0 !== n.pending) - ) { - if ((B(t), 0 === t.avail_out)) return (n.last_flush = -1), f; - } else if (0 === t.avail_in && k(e) <= k(r) && 4 !== e) return A(t, -5); - if (n.status === x && 0 !== t.avail_in) return A(t, -5); - if (0 !== t.avail_in || 0 !== n.lookahead || (e !== u && n.status !== x)) { - var p = - 2 === n.strategy - ? (function (t, e) { - for (var r; ; ) { - if (0 === t.lookahead && (L(t), 0 === t.lookahead)) { - if (e === u) return 1; - break; - } - if ( - ((t.match_length = 0), - (r = o._tr_tally(t, 0, t.window[t.strstart])), - t.lookahead--, - t.strstart++, - r && (I(t, !1), 0 === t.strm.avail_out)) - ) - return 1; - } - return ( - (t.insert = 0), - 4 === e ? (I(t, !0), 0 === t.strm.avail_out ? 3 : 4) : t.last_lit && (I(t, !1), 0 === t.strm.avail_out) ? 1 : 2 - ); - })(n, e) - : 3 === n.strategy - ? (function (t, e) { - for (var r, i, n, s, a = t.window; ; ) { - if (t.lookahead <= w) { - if ((L(t), t.lookahead <= w && e === u)) return 1; - if (0 === t.lookahead) break; - } - if ( - ((t.match_length = 0), - t.lookahead >= v && t.strstart > 0 && (i = a[(n = t.strstart - 1)]) === a[++n] && i === a[++n] && i === a[++n]) - ) { - s = t.strstart + w; - do {} while ( - i === a[++n] && - i === a[++n] && - i === a[++n] && - i === a[++n] && - i === a[++n] && - i === a[++n] && - i === a[++n] && - i === a[++n] && - n < s - ); - (t.match_length = w - (s - n)), t.match_length > t.lookahead && (t.match_length = t.lookahead); - } - if ( - (t.match_length >= v - ? ((r = o._tr_tally(t, 1, t.match_length - v)), - (t.lookahead -= t.match_length), - (t.strstart += t.match_length), - (t.match_length = 0)) - : ((r = o._tr_tally(t, 0, t.window[t.strstart])), t.lookahead--, t.strstart++), - r && (I(t, !1), 0 === t.strm.avail_out)) - ) - return 1; - } - return ( - (t.insert = 0), - 4 === e ? (I(t, !0), 0 === t.strm.avail_out ? 3 : 4) : t.last_lit && (I(t, !1), 0 === t.strm.avail_out) ? 1 : 2 - ); - })(n, e) - : i[n.level].func(n, e); - if (((3 !== p && 4 !== p) || (n.status = x), 1 === p || 3 === p)) return 0 === t.avail_out && (n.last_flush = -1), f; - if ( - 2 === p && - (1 === e - ? o._tr_align(n) - : 5 !== e && - (o._tr_stored_block(n, 0, 0, !1), - 3 === e && (R(n.head), 0 === n.lookahead && ((n.strstart = 0), (n.block_start = 0), (n.insert = 0)))), - B(t), - 0 === t.avail_out) - ) - return (n.last_flush = -1), f; - } - return 4 !== e - ? f - : n.wrap <= 0 - ? 1 - : (2 === n.wrap - ? (T(n, 255 & t.adler), - T(n, (t.adler >> 8) & 255), - T(n, (t.adler >> 16) & 255), - T(n, (t.adler >> 24) & 255), - T(n, 255 & t.total_in), - T(n, (t.total_in >> 8) & 255), - T(n, (t.total_in >> 16) & 255), - T(n, (t.total_in >> 24) & 255)) - : (P(n, t.adler >>> 16), P(n, 65535 & t.adler)), - B(t), - n.wrap > 0 && (n.wrap = -n.wrap), - 0 !== n.pending ? f : 1); - }), - (e.deflateEnd = function (t) { - var e; - return t && t.state - ? (e = t.state.status) !== M && 69 !== e && 73 !== e && 91 !== e && e !== E && e !== S && e !== x - ? A(t, c) - : ((t.state = null), e === S ? A(t, -3) : f) - : c; - }), - (e.deflateSetDictionary = function (t, e) { - var r, - i, - o, - a, - h, - u, - l, - d, - p = e.length; - if (!t || !t.state) return c; - if (2 === (a = (r = t.state).wrap) || (1 === a && r.status !== M) || r.lookahead) return c; - for ( - 1 === a && (t.adler = s(t.adler, e, p, 0)), - r.wrap = 0, - p >= r.w_size && - (0 === a && (R(r.head), (r.strstart = 0), (r.block_start = 0), (r.insert = 0)), - (d = new n.Buf8(r.w_size)), - n.arraySet(d, e, p - r.w_size, r.w_size, 0), - (e = d), - (p = r.w_size)), - h = t.avail_in, - u = t.next_in, - l = t.input, - t.avail_in = p, - t.next_in = 0, - t.input = e, - L(r); - r.lookahead >= v; - - ) { - (i = r.strstart), (o = r.lookahead - (v - 1)); - do { - (r.ins_h = ((r.ins_h << r.hash_shift) ^ r.window[i + v - 1]) & r.hash_mask), - (r.prev[i & r.w_mask] = r.head[r.ins_h]), - (r.head[r.ins_h] = i), - i++; - } while (--o); - (r.strstart = i), (r.lookahead = v - 1), L(r); - } - return ( - (r.strstart += r.lookahead), - (r.block_start = r.strstart), - (r.insert = r.lookahead), - (r.lookahead = 0), - (r.match_length = r.prev_length = v - 1), - (r.match_available = 0), - (t.next_in = u), - (t.input = l), - (t.avail_in = h), - (r.wrap = a), - f - ); - }), - (e.deflateInfo = 'pako deflate (from Nodeca project)'); - }, - 6438: t => { - 'use strict'; - t.exports = function (t, e) { - var r, i, n, o, s, a, h, u, f, c, l, d, p, m, g, b, y, v, w, _, M, E, S, x, A; - (r = t.state), - (i = t.next_in), - (x = t.input), - (n = i + (t.avail_in - 5)), - (o = t.next_out), - (A = t.output), - (s = o - (e - t.avail_out)), - (a = o + (t.avail_out - 257)), - (h = r.dmax), - (u = r.wsize), - (f = r.whave), - (c = r.wnext), - (l = r.window), - (d = r.hold), - (p = r.bits), - (m = r.lencode), - (g = r.distcode), - (b = (1 << r.lenbits) - 1), - (y = (1 << r.distbits) - 1); - t: do { - p < 15 && ((d += x[i++] << p), (p += 8), (d += x[i++] << p), (p += 8)), (v = m[d & b]); - e: for (;;) { - if (((d >>>= w = v >>> 24), (p -= w), 0 == (w = (v >>> 16) & 255))) A[o++] = 65535 & v; - else { - if (!(16 & w)) { - if (0 == (64 & w)) { - v = m[(65535 & v) + (d & ((1 << w) - 1))]; - continue e; - } - if (32 & w) { - r.mode = 12; - break t; - } - (t.msg = 'invalid literal/length code'), (r.mode = 30); - break t; - } - (_ = 65535 & v), - (w &= 15) && (p < w && ((d += x[i++] << p), (p += 8)), (_ += d & ((1 << w) - 1)), (d >>>= w), (p -= w)), - p < 15 && ((d += x[i++] << p), (p += 8), (d += x[i++] << p), (p += 8)), - (v = g[d & y]); - r: for (;;) { - if (((d >>>= w = v >>> 24), (p -= w), !(16 & (w = (v >>> 16) & 255)))) { - if (0 == (64 & w)) { - v = g[(65535 & v) + (d & ((1 << w) - 1))]; - continue r; - } - (t.msg = 'invalid distance code'), (r.mode = 30); - break t; - } - if ( - ((M = 65535 & v), - p < (w &= 15) && ((d += x[i++] << p), (p += 8) < w && ((d += x[i++] << p), (p += 8))), - (M += d & ((1 << w) - 1)) > h) - ) { - (t.msg = 'invalid distance too far back'), (r.mode = 30); - break t; - } - if (((d >>>= w), (p -= w), M > (w = o - s))) { - if ((w = M - w) > f && r.sane) { - (t.msg = 'invalid distance too far back'), (r.mode = 30); - break t; - } - if (((E = 0), (S = l), 0 === c)) { - if (((E += u - w), w < _)) { - _ -= w; - do { - A[o++] = l[E++]; - } while (--w); - (E = o - M), (S = A); - } - } else if (c < w) { - if (((E += u + c - w), (w -= c) < _)) { - _ -= w; - do { - A[o++] = l[E++]; - } while (--w); - if (((E = 0), c < _)) { - _ -= w = c; - do { - A[o++] = l[E++]; - } while (--w); - (E = o - M), (S = A); - } - } - } else if (((E += c - w), w < _)) { - _ -= w; - do { - A[o++] = l[E++]; - } while (--w); - (E = o - M), (S = A); - } - for (; _ > 2; ) (A[o++] = S[E++]), (A[o++] = S[E++]), (A[o++] = S[E++]), (_ -= 3); - _ && ((A[o++] = S[E++]), _ > 1 && (A[o++] = S[E++])); - } else { - E = o - M; - do { - (A[o++] = A[E++]), (A[o++] = A[E++]), (A[o++] = A[E++]), (_ -= 3); - } while (_ > 2); - _ && ((A[o++] = A[E++]), _ > 1 && (A[o++] = A[E++])); - } - break; - } - } - break; - } - } while (i < n && o < a); - (i -= _ = p >> 3), - (d &= (1 << (p -= _ << 3)) - 1), - (t.next_in = i), - (t.next_out = o), - (t.avail_in = i < n ? n - i + 5 : 5 - (i - n)), - (t.avail_out = o < a ? a - o + 257 : 257 - (o - a)), - (r.hold = d), - (r.bits = p); - }; - }, - 3001: (t, e, r) => { - 'use strict'; - var i = r(6907), - n = r(7575), - o = r(631), - s = r(6438), - a = r(1375), - h = 0, - u = -2, - f = 1, - c = 12, - l = 30, - d = 852, - p = 592; - function m(t) { - return ((t >>> 24) & 255) + ((t >>> 8) & 65280) + ((65280 & t) << 8) + ((255 & t) << 24); - } - function g() { - (this.mode = 0), - (this.last = !1), - (this.wrap = 0), - (this.havedict = !1), - (this.flags = 0), - (this.dmax = 0), - (this.check = 0), - (this.total = 0), - (this.head = null), - (this.wbits = 0), - (this.wsize = 0), - (this.whave = 0), - (this.wnext = 0), - (this.window = null), - (this.hold = 0), - (this.bits = 0), - (this.length = 0), - (this.offset = 0), - (this.extra = 0), - (this.lencode = null), - (this.distcode = null), - (this.lenbits = 0), - (this.distbits = 0), - (this.ncode = 0), - (this.nlen = 0), - (this.ndist = 0), - (this.have = 0), - (this.next = null), - (this.lens = new i.Buf16(320)), - (this.work = new i.Buf16(288)), - (this.lendyn = null), - (this.distdyn = null), - (this.sane = 0), - (this.back = 0), - (this.was = 0); - } - function b(t) { - var e; - return t && t.state - ? ((e = t.state), - (t.total_in = t.total_out = e.total = 0), - (t.msg = ''), - e.wrap && (t.adler = 1 & e.wrap), - (e.mode = f), - (e.last = 0), - (e.havedict = 0), - (e.dmax = 32768), - (e.head = null), - (e.hold = 0), - (e.bits = 0), - (e.lencode = e.lendyn = new i.Buf32(d)), - (e.distcode = e.distdyn = new i.Buf32(p)), - (e.sane = 1), - (e.back = -1), - h) - : u; - } - function y(t) { - var e; - return t && t.state ? (((e = t.state).wsize = 0), (e.whave = 0), (e.wnext = 0), b(t)) : u; - } - function v(t, e) { - var r, i; - return t && t.state - ? ((i = t.state), - e < 0 ? ((r = 0), (e = -e)) : ((r = 1 + (e >> 4)), e < 48 && (e &= 15)), - e && (e < 8 || e > 15) ? u : (null !== i.window && i.wbits !== e && (i.window = null), (i.wrap = r), (i.wbits = e), y(t))) - : u; - } - function w(t, e) { - var r, i; - return t ? ((i = new g()), (t.state = i), (i.window = null), (r = v(t, e)) !== h && (t.state = null), r) : u; - } - var _, - M, - E = !0; - function S(t) { - if (E) { - var e; - for (_ = new i.Buf32(512), M = new i.Buf32(32), e = 0; e < 144; ) t.lens[e++] = 8; - for (; e < 256; ) t.lens[e++] = 9; - for (; e < 280; ) t.lens[e++] = 7; - for (; e < 288; ) t.lens[e++] = 8; - for (a(1, t.lens, 0, 288, _, 0, t.work, { bits: 9 }), e = 0; e < 32; ) t.lens[e++] = 5; - a(2, t.lens, 0, 32, M, 0, t.work, { bits: 5 }), (E = !1); - } - (t.lencode = _), (t.lenbits = 9), (t.distcode = M), (t.distbits = 5); - } - function x(t, e, r, n) { - var o, - s = t.state; - return ( - null === s.window && ((s.wsize = 1 << s.wbits), (s.wnext = 0), (s.whave = 0), (s.window = new i.Buf8(s.wsize))), - n >= s.wsize - ? (i.arraySet(s.window, e, r - s.wsize, s.wsize, 0), (s.wnext = 0), (s.whave = s.wsize)) - : ((o = s.wsize - s.wnext) > n && (o = n), - i.arraySet(s.window, e, r - n, o, s.wnext), - (n -= o) - ? (i.arraySet(s.window, e, r - n, n, 0), (s.wnext = n), (s.whave = s.wsize)) - : ((s.wnext += o), s.wnext === s.wsize && (s.wnext = 0), s.whave < s.wsize && (s.whave += o))), - 0 - ); - } - (e.inflateReset = y), - (e.inflateReset2 = v), - (e.inflateResetKeep = b), - (e.inflateInit = function (t) { - return w(t, 15); - }), - (e.inflateInit2 = w), - (e.inflate = function (t, e) { - var r, - d, - p, - g, - b, - y, - v, - w, - _, - M, - E, - A, - k, - R, - B, - I, - T, - P, - O, - L, - C, - N, - j, - U, - D = 0, - z = new i.Buf8(4), - F = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]; - if (!t || !t.state || !t.output || (!t.input && 0 !== t.avail_in)) return u; - (r = t.state).mode === c && (r.mode = 13), - (b = t.next_out), - (p = t.output), - (v = t.avail_out), - (g = t.next_in), - (d = t.input), - (y = t.avail_in), - (w = r.hold), - (_ = r.bits), - (M = y), - (E = v), - (N = h); - t: for (;;) - switch (r.mode) { - case f: - if (0 === r.wrap) { - r.mode = 13; - break; - } - for (; _ < 16; ) { - if (0 === y) break t; - y--, (w += d[g++] << _), (_ += 8); - } - if (2 & r.wrap && 35615 === w) { - (r.check = 0), - (z[0] = 255 & w), - (z[1] = (w >>> 8) & 255), - (r.check = o(r.check, z, 2, 0)), - (w = 0), - (_ = 0), - (r.mode = 2); - break; - } - if (((r.flags = 0), r.head && (r.head.done = !1), !(1 & r.wrap) || (((255 & w) << 8) + (w >> 8)) % 31)) { - (t.msg = 'incorrect header check'), (r.mode = l); - break; - } - if (8 != (15 & w)) { - (t.msg = 'unknown compression method'), (r.mode = l); - break; - } - if (((_ -= 4), (C = 8 + (15 & (w >>>= 4))), 0 === r.wbits)) r.wbits = C; - else if (C > r.wbits) { - (t.msg = 'invalid window size'), (r.mode = l); - break; - } - (r.dmax = 1 << C), (t.adler = r.check = 1), (r.mode = 512 & w ? 10 : c), (w = 0), (_ = 0); - break; - case 2: - for (; _ < 16; ) { - if (0 === y) break t; - y--, (w += d[g++] << _), (_ += 8); - } - if (((r.flags = w), 8 != (255 & r.flags))) { - (t.msg = 'unknown compression method'), (r.mode = l); - break; - } - if (57344 & r.flags) { - (t.msg = 'unknown header flags set'), (r.mode = l); - break; - } - r.head && (r.head.text = (w >> 8) & 1), - 512 & r.flags && ((z[0] = 255 & w), (z[1] = (w >>> 8) & 255), (r.check = o(r.check, z, 2, 0))), - (w = 0), - (_ = 0), - (r.mode = 3); - case 3: - for (; _ < 32; ) { - if (0 === y) break t; - y--, (w += d[g++] << _), (_ += 8); - } - r.head && (r.head.time = w), - 512 & r.flags && - ((z[0] = 255 & w), - (z[1] = (w >>> 8) & 255), - (z[2] = (w >>> 16) & 255), - (z[3] = (w >>> 24) & 255), - (r.check = o(r.check, z, 4, 0))), - (w = 0), - (_ = 0), - (r.mode = 4); - case 4: - for (; _ < 16; ) { - if (0 === y) break t; - y--, (w += d[g++] << _), (_ += 8); - } - r.head && ((r.head.xflags = 255 & w), (r.head.os = w >> 8)), - 512 & r.flags && ((z[0] = 255 & w), (z[1] = (w >>> 8) & 255), (r.check = o(r.check, z, 2, 0))), - (w = 0), - (_ = 0), - (r.mode = 5); - case 5: - if (1024 & r.flags) { - for (; _ < 16; ) { - if (0 === y) break t; - y--, (w += d[g++] << _), (_ += 8); - } - (r.length = w), - r.head && (r.head.extra_len = w), - 512 & r.flags && ((z[0] = 255 & w), (z[1] = (w >>> 8) & 255), (r.check = o(r.check, z, 2, 0))), - (w = 0), - (_ = 0); - } else r.head && (r.head.extra = null); - r.mode = 6; - case 6: - if ( - 1024 & r.flags && - ((A = r.length) > y && (A = y), - A && - (r.head && - ((C = r.head.extra_len - r.length), - r.head.extra || (r.head.extra = new Array(r.head.extra_len)), - i.arraySet(r.head.extra, d, g, A, C)), - 512 & r.flags && (r.check = o(r.check, d, A, g)), - (y -= A), - (g += A), - (r.length -= A)), - r.length) - ) - break t; - (r.length = 0), (r.mode = 7); - case 7: - if (2048 & r.flags) { - if (0 === y) break t; - A = 0; - do { - (C = d[g + A++]), r.head && C && r.length < 65536 && (r.head.name += String.fromCharCode(C)); - } while (C && A < y); - if ((512 & r.flags && (r.check = o(r.check, d, A, g)), (y -= A), (g += A), C)) break t; - } else r.head && (r.head.name = null); - (r.length = 0), (r.mode = 8); - case 8: - if (4096 & r.flags) { - if (0 === y) break t; - A = 0; - do { - (C = d[g + A++]), r.head && C && r.length < 65536 && (r.head.comment += String.fromCharCode(C)); - } while (C && A < y); - if ((512 & r.flags && (r.check = o(r.check, d, A, g)), (y -= A), (g += A), C)) break t; - } else r.head && (r.head.comment = null); - r.mode = 9; - case 9: - if (512 & r.flags) { - for (; _ < 16; ) { - if (0 === y) break t; - y--, (w += d[g++] << _), (_ += 8); - } - if (w !== (65535 & r.check)) { - (t.msg = 'header crc mismatch'), (r.mode = l); - break; - } - (w = 0), (_ = 0); - } - r.head && ((r.head.hcrc = (r.flags >> 9) & 1), (r.head.done = !0)), (t.adler = r.check = 0), (r.mode = c); - break; - case 10: - for (; _ < 32; ) { - if (0 === y) break t; - y--, (w += d[g++] << _), (_ += 8); - } - (t.adler = r.check = m(w)), (w = 0), (_ = 0), (r.mode = 11); - case 11: - if (0 === r.havedict) - return (t.next_out = b), (t.avail_out = v), (t.next_in = g), (t.avail_in = y), (r.hold = w), (r.bits = _), 2; - (t.adler = r.check = 1), (r.mode = c); - case c: - if (5 === e || 6 === e) break t; - case 13: - if (r.last) { - (w >>>= 7 & _), (_ -= 7 & _), (r.mode = 27); - break; - } - for (; _ < 3; ) { - if (0 === y) break t; - y--, (w += d[g++] << _), (_ += 8); - } - switch (((r.last = 1 & w), (_ -= 1), 3 & (w >>>= 1))) { - case 0: - r.mode = 14; - break; - case 1: - if ((S(r), (r.mode = 20), 6 === e)) { - (w >>>= 2), (_ -= 2); - break t; - } - break; - case 2: - r.mode = 17; - break; - case 3: - (t.msg = 'invalid block type'), (r.mode = l); - } - (w >>>= 2), (_ -= 2); - break; - case 14: - for (w >>>= 7 & _, _ -= 7 & _; _ < 32; ) { - if (0 === y) break t; - y--, (w += d[g++] << _), (_ += 8); - } - if ((65535 & w) != ((w >>> 16) ^ 65535)) { - (t.msg = 'invalid stored block lengths'), (r.mode = l); - break; - } - if (((r.length = 65535 & w), (w = 0), (_ = 0), (r.mode = 15), 6 === e)) break t; - case 15: - r.mode = 16; - case 16: - if ((A = r.length)) { - if ((A > y && (A = y), A > v && (A = v), 0 === A)) break t; - i.arraySet(p, d, g, A, b), (y -= A), (g += A), (v -= A), (b += A), (r.length -= A); - break; - } - r.mode = c; - break; - case 17: - for (; _ < 14; ) { - if (0 === y) break t; - y--, (w += d[g++] << _), (_ += 8); - } - if ( - ((r.nlen = 257 + (31 & w)), - (w >>>= 5), - (_ -= 5), - (r.ndist = 1 + (31 & w)), - (w >>>= 5), - (_ -= 5), - (r.ncode = 4 + (15 & w)), - (w >>>= 4), - (_ -= 4), - r.nlen > 286 || r.ndist > 30) - ) { - (t.msg = 'too many length or distance symbols'), (r.mode = l); - break; - } - (r.have = 0), (r.mode = 18); - case 18: - for (; r.have < r.ncode; ) { - for (; _ < 3; ) { - if (0 === y) break t; - y--, (w += d[g++] << _), (_ += 8); - } - (r.lens[F[r.have++]] = 7 & w), (w >>>= 3), (_ -= 3); - } - for (; r.have < 19; ) r.lens[F[r.have++]] = 0; - if ( - ((r.lencode = r.lendyn), - (r.lenbits = 7), - (j = { bits: r.lenbits }), - (N = a(0, r.lens, 0, 19, r.lencode, 0, r.work, j)), - (r.lenbits = j.bits), - N) - ) { - (t.msg = 'invalid code lengths set'), (r.mode = l); - break; - } - (r.have = 0), (r.mode = 19); - case 19: - for (; r.have < r.nlen + r.ndist; ) { - for (; (I = ((D = r.lencode[w & ((1 << r.lenbits) - 1)]) >>> 16) & 255), (T = 65535 & D), !((B = D >>> 24) <= _); ) { - if (0 === y) break t; - y--, (w += d[g++] << _), (_ += 8); - } - if (T < 16) (w >>>= B), (_ -= B), (r.lens[r.have++] = T); - else { - if (16 === T) { - for (U = B + 2; _ < U; ) { - if (0 === y) break t; - y--, (w += d[g++] << _), (_ += 8); - } - if (((w >>>= B), (_ -= B), 0 === r.have)) { - (t.msg = 'invalid bit length repeat'), (r.mode = l); - break; - } - (C = r.lens[r.have - 1]), (A = 3 + (3 & w)), (w >>>= 2), (_ -= 2); - } else if (17 === T) { - for (U = B + 3; _ < U; ) { - if (0 === y) break t; - y--, (w += d[g++] << _), (_ += 8); - } - (_ -= B), (C = 0), (A = 3 + (7 & (w >>>= B))), (w >>>= 3), (_ -= 3); - } else { - for (U = B + 7; _ < U; ) { - if (0 === y) break t; - y--, (w += d[g++] << _), (_ += 8); - } - (_ -= B), (C = 0), (A = 11 + (127 & (w >>>= B))), (w >>>= 7), (_ -= 7); - } - if (r.have + A > r.nlen + r.ndist) { - (t.msg = 'invalid bit length repeat'), (r.mode = l); - break; - } - for (; A--; ) r.lens[r.have++] = C; - } - } - if (r.mode === l) break; - if (0 === r.lens[256]) { - (t.msg = 'invalid code -- missing end-of-block'), (r.mode = l); - break; - } - if ( - ((r.lenbits = 9), - (j = { bits: r.lenbits }), - (N = a(1, r.lens, 0, r.nlen, r.lencode, 0, r.work, j)), - (r.lenbits = j.bits), - N) - ) { - (t.msg = 'invalid literal/lengths set'), (r.mode = l); - break; - } - if ( - ((r.distbits = 6), - (r.distcode = r.distdyn), - (j = { bits: r.distbits }), - (N = a(2, r.lens, r.nlen, r.ndist, r.distcode, 0, r.work, j)), - (r.distbits = j.bits), - N) - ) { - (t.msg = 'invalid distances set'), (r.mode = l); - break; - } - if (((r.mode = 20), 6 === e)) break t; - case 20: - r.mode = 21; - case 21: - if (y >= 6 && v >= 258) { - (t.next_out = b), - (t.avail_out = v), - (t.next_in = g), - (t.avail_in = y), - (r.hold = w), - (r.bits = _), - s(t, E), - (b = t.next_out), - (p = t.output), - (v = t.avail_out), - (g = t.next_in), - (d = t.input), - (y = t.avail_in), - (w = r.hold), - (_ = r.bits), - r.mode === c && (r.back = -1); - break; - } - for ( - r.back = 0; - (I = ((D = r.lencode[w & ((1 << r.lenbits) - 1)]) >>> 16) & 255), (T = 65535 & D), !((B = D >>> 24) <= _); - - ) { - if (0 === y) break t; - y--, (w += d[g++] << _), (_ += 8); - } - if (I && 0 == (240 & I)) { - for ( - P = B, O = I, L = T; - (I = ((D = r.lencode[L + ((w & ((1 << (P + O)) - 1)) >> P)]) >>> 16) & 255), - (T = 65535 & D), - !(P + (B = D >>> 24) <= _); - - ) { - if (0 === y) break t; - y--, (w += d[g++] << _), (_ += 8); - } - (w >>>= P), (_ -= P), (r.back += P); - } - if (((w >>>= B), (_ -= B), (r.back += B), (r.length = T), 0 === I)) { - r.mode = 26; - break; - } - if (32 & I) { - (r.back = -1), (r.mode = c); - break; - } - if (64 & I) { - (t.msg = 'invalid literal/length code'), (r.mode = l); - break; - } - (r.extra = 15 & I), (r.mode = 22); - case 22: - if (r.extra) { - for (U = r.extra; _ < U; ) { - if (0 === y) break t; - y--, (w += d[g++] << _), (_ += 8); - } - (r.length += w & ((1 << r.extra) - 1)), (w >>>= r.extra), (_ -= r.extra), (r.back += r.extra); - } - (r.was = r.length), (r.mode = 23); - case 23: - for (; (I = ((D = r.distcode[w & ((1 << r.distbits) - 1)]) >>> 16) & 255), (T = 65535 & D), !((B = D >>> 24) <= _); ) { - if (0 === y) break t; - y--, (w += d[g++] << _), (_ += 8); - } - if (0 == (240 & I)) { - for ( - P = B, O = I, L = T; - (I = ((D = r.distcode[L + ((w & ((1 << (P + O)) - 1)) >> P)]) >>> 16) & 255), - (T = 65535 & D), - !(P + (B = D >>> 24) <= _); - - ) { - if (0 === y) break t; - y--, (w += d[g++] << _), (_ += 8); - } - (w >>>= P), (_ -= P), (r.back += P); - } - if (((w >>>= B), (_ -= B), (r.back += B), 64 & I)) { - (t.msg = 'invalid distance code'), (r.mode = l); - break; - } - (r.offset = T), (r.extra = 15 & I), (r.mode = 24); - case 24: - if (r.extra) { - for (U = r.extra; _ < U; ) { - if (0 === y) break t; - y--, (w += d[g++] << _), (_ += 8); - } - (r.offset += w & ((1 << r.extra) - 1)), (w >>>= r.extra), (_ -= r.extra), (r.back += r.extra); - } - if (r.offset > r.dmax) { - (t.msg = 'invalid distance too far back'), (r.mode = l); - break; - } - r.mode = 25; - case 25: - if (0 === v) break t; - if (((A = E - v), r.offset > A)) { - if ((A = r.offset - A) > r.whave && r.sane) { - (t.msg = 'invalid distance too far back'), (r.mode = l); - break; - } - A > r.wnext ? ((A -= r.wnext), (k = r.wsize - A)) : (k = r.wnext - A), A > r.length && (A = r.length), (R = r.window); - } else (R = p), (k = b - r.offset), (A = r.length); - A > v && (A = v), (v -= A), (r.length -= A); - do { - p[b++] = R[k++]; - } while (--A); - 0 === r.length && (r.mode = 21); - break; - case 26: - if (0 === v) break t; - (p[b++] = r.length), v--, (r.mode = 21); - break; - case 27: - if (r.wrap) { - for (; _ < 32; ) { - if (0 === y) break t; - y--, (w |= d[g++] << _), (_ += 8); - } - if ( - ((E -= v), - (t.total_out += E), - (r.total += E), - E && (t.adler = r.check = r.flags ? o(r.check, p, E, b - E) : n(r.check, p, E, b - E)), - (E = v), - (r.flags ? w : m(w)) !== r.check) - ) { - (t.msg = 'incorrect data check'), (r.mode = l); - break; - } - (w = 0), (_ = 0); - } - r.mode = 28; - case 28: - if (r.wrap && r.flags) { - for (; _ < 32; ) { - if (0 === y) break t; - y--, (w += d[g++] << _), (_ += 8); - } - if (w !== (4294967295 & r.total)) { - (t.msg = 'incorrect length check'), (r.mode = l); - break; - } - (w = 0), (_ = 0); - } - r.mode = 29; - case 29: - N = 1; - break t; - case l: - N = -3; - break t; - case 31: - return -4; - default: - return u; - } - return ( - (t.next_out = b), - (t.avail_out = v), - (t.next_in = g), - (t.avail_in = y), - (r.hold = w), - (r.bits = _), - (r.wsize || (E !== t.avail_out && r.mode < l && (r.mode < 27 || 4 !== e))) && x(t, t.output, t.next_out, E - t.avail_out) - ? ((r.mode = 31), -4) - : ((M -= t.avail_in), - (E -= t.avail_out), - (t.total_in += M), - (t.total_out += E), - (r.total += E), - r.wrap && E && (t.adler = r.check = r.flags ? o(r.check, p, E, t.next_out - E) : n(r.check, p, E, t.next_out - E)), - (t.data_type = r.bits + (r.last ? 64 : 0) + (r.mode === c ? 128 : 0) + (20 === r.mode || 15 === r.mode ? 256 : 0)), - ((0 === M && 0 === E) || 4 === e) && N === h && (N = -5), - N) - ); - }), - (e.inflateEnd = function (t) { - if (!t || !t.state) return u; - var e = t.state; - return e.window && (e.window = null), (t.state = null), h; - }), - (e.inflateGetHeader = function (t, e) { - var r; - return t && t.state ? (0 == (2 & (r = t.state).wrap) ? u : ((r.head = e), (e.done = !1), h)) : u; - }), - (e.inflateSetDictionary = function (t, e) { - var r, - i = e.length; - return t && t.state - ? 0 !== (r = t.state).wrap && 11 !== r.mode - ? u - : 11 === r.mode && n(1, e, i, 0) !== r.check - ? -3 - : x(t, e, i, i) - ? ((r.mode = 31), -4) - : ((r.havedict = 1), h) - : u; - }), - (e.inflateInfo = 'pako inflate (from Nodeca project)'); - }, - 1375: (t, e, r) => { - 'use strict'; - var i = r(6907), - n = [3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0], - o = [16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78], - s = [ - 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, - 16385, 24577, 0, 0, - ], - a = [ - 16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, 28, 28, 29, 29, 64, 64, - ]; - t.exports = function (t, e, r, h, u, f, c, l) { - var d, - p, - m, - g, - b, - y, - v, - w, - _, - M = l.bits, - E = 0, - S = 0, - x = 0, - A = 0, - k = 0, - R = 0, - B = 0, - I = 0, - T = 0, - P = 0, - O = null, - L = 0, - C = new i.Buf16(16), - N = new i.Buf16(16), - j = null, - U = 0; - for (E = 0; E <= 15; E++) C[E] = 0; - for (S = 0; S < h; S++) C[e[r + S]]++; - for (k = M, A = 15; A >= 1 && 0 === C[A]; A--); - if ((k > A && (k = A), 0 === A)) return (u[f++] = 20971520), (u[f++] = 20971520), (l.bits = 1), 0; - for (x = 1; x < A && 0 === C[x]; x++); - for (k < x && (k = x), I = 1, E = 1; E <= 15; E++) if (((I <<= 1), (I -= C[E]) < 0)) return -1; - if (I > 0 && (0 === t || 1 !== A)) return -1; - for (N[1] = 0, E = 1; E < 15; E++) N[E + 1] = N[E] + C[E]; - for (S = 0; S < h; S++) 0 !== e[r + S] && (c[N[e[r + S]]++] = S); - if ( - (0 === t - ? ((O = j = c), (y = 19)) - : 1 === t - ? ((O = n), (L -= 257), (j = o), (U -= 257), (y = 256)) - : ((O = s), (j = a), (y = -1)), - (P = 0), - (S = 0), - (E = x), - (b = f), - (R = k), - (B = 0), - (m = -1), - (g = (T = 1 << k) - 1), - (1 === t && T > 852) || (2 === t && T > 592)) - ) - return 1; - for (;;) { - (v = E - B), - c[S] < y ? ((w = 0), (_ = c[S])) : c[S] > y ? ((w = j[U + c[S]]), (_ = O[L + c[S]])) : ((w = 96), (_ = 0)), - (d = 1 << (E - B)), - (x = p = 1 << R); - do { - u[b + (P >> B) + (p -= d)] = (v << 24) | (w << 16) | _ | 0; - } while (0 !== p); - for (d = 1 << (E - 1); P & d; ) d >>= 1; - if ((0 !== d ? ((P &= d - 1), (P += d)) : (P = 0), S++, 0 == --C[E])) { - if (E === A) break; - E = e[r + c[S]]; - } - if (E > k && (P & g) !== m) { - for (0 === B && (B = k), b += x, I = 1 << (R = E - B); R + B < A && !((I -= C[R + B]) <= 0); ) R++, (I <<= 1); - if (((T += 1 << R), (1 === t && T > 852) || (2 === t && T > 592))) return 1; - u[(m = P & g)] = (k << 24) | (R << 16) | (b - f) | 0; - } - } - return 0 !== P && (u[b + P] = ((E - B) << 24) | (64 << 16) | 0), (l.bits = k), 0; - }; - }, - 9364: t => { - 'use strict'; - t.exports = { - '2': 'need dictionary', - '1': 'stream end', - '0': '', - '-1': 'file error', - '-2': 'stream error', - '-3': 'data error', - '-4': 'insufficient memory', - '-5': 'buffer error', - '-6': 'incompatible version', - }; - }, - 1339: (t, e, r) => { - 'use strict'; - var i = r(6907); - function n(t) { - for (var e = t.length; --e >= 0; ) t[e] = 0; - } - var o = 256, - s = 286, - a = 30, - h = 15, - u = 16, - f = [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0], - c = [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13], - l = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7], - d = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15], - p = new Array(576); - n(p); - var m = new Array(60); - n(m); - var g = new Array(512); - n(g); - var b = new Array(256); - n(b); - var y = new Array(29); - n(y); - var v, - w, - _, - M = new Array(a); - function E(t, e, r, i, n) { - (this.static_tree = t), - (this.extra_bits = e), - (this.extra_base = r), - (this.elems = i), - (this.max_length = n), - (this.has_stree = t && t.length); - } - function S(t, e) { - (this.dyn_tree = t), (this.max_code = 0), (this.stat_desc = e); - } - function x(t) { - return t < 256 ? g[t] : g[256 + (t >>> 7)]; - } - function A(t, e) { - (t.pending_buf[t.pending++] = 255 & e), (t.pending_buf[t.pending++] = (e >>> 8) & 255); - } - function k(t, e, r) { - t.bi_valid > u - r - ? ((t.bi_buf |= (e << t.bi_valid) & 65535), A(t, t.bi_buf), (t.bi_buf = e >> (u - t.bi_valid)), (t.bi_valid += r - u)) - : ((t.bi_buf |= (e << t.bi_valid) & 65535), (t.bi_valid += r)); - } - function R(t, e, r) { - k(t, r[2 * e], r[2 * e + 1]); - } - function B(t, e) { - var r = 0; - do { - (r |= 1 & t), (t >>>= 1), (r <<= 1); - } while (--e > 0); - return r >>> 1; - } - function I(t, e, r) { - var i, - n, - o = new Array(h + 1), - s = 0; - for (i = 1; i <= h; i++) o[i] = s = (s + r[i - 1]) << 1; - for (n = 0; n <= e; n++) { - var a = t[2 * n + 1]; - 0 !== a && (t[2 * n] = B(o[a]++, a)); - } - } - function T(t) { - var e; - for (e = 0; e < s; e++) t.dyn_ltree[2 * e] = 0; - for (e = 0; e < a; e++) t.dyn_dtree[2 * e] = 0; - for (e = 0; e < 19; e++) t.bl_tree[2 * e] = 0; - (t.dyn_ltree[512] = 1), (t.opt_len = t.static_len = 0), (t.last_lit = t.matches = 0); - } - function P(t) { - t.bi_valid > 8 ? A(t, t.bi_buf) : t.bi_valid > 0 && (t.pending_buf[t.pending++] = t.bi_buf), (t.bi_buf = 0), (t.bi_valid = 0); - } - function O(t, e, r, i) { - var n = 2 * e, - o = 2 * r; - return t[n] < t[o] || (t[n] === t[o] && i[e] <= i[r]); - } - function L(t, e, r) { - for ( - var i = t.heap[r], n = r << 1; - n <= t.heap_len && (n < t.heap_len && O(e, t.heap[n + 1], t.heap[n], t.depth) && n++, !O(e, i, t.heap[n], t.depth)); - - ) - (t.heap[r] = t.heap[n]), (r = n), (n <<= 1); - t.heap[r] = i; - } - function C(t, e, r) { - var i, - n, - s, - a, - h = 0; - if (0 !== t.last_lit) - do { - (i = (t.pending_buf[t.d_buf + 2 * h] << 8) | t.pending_buf[t.d_buf + 2 * h + 1]), - (n = t.pending_buf[t.l_buf + h]), - h++, - 0 === i - ? R(t, n, e) - : (R(t, (s = b[n]) + o + 1, e), - 0 !== (a = f[s]) && k(t, (n -= y[s]), a), - R(t, (s = x(--i)), r), - 0 !== (a = c[s]) && k(t, (i -= M[s]), a)); - } while (h < t.last_lit); - R(t, 256, e); - } - function N(t, e) { - var r, - i, - n, - o = e.dyn_tree, - s = e.stat_desc.static_tree, - a = e.stat_desc.has_stree, - u = e.stat_desc.elems, - f = -1; - for (t.heap_len = 0, t.heap_max = 573, r = 0; r < u; r++) - 0 !== o[2 * r] ? ((t.heap[++t.heap_len] = f = r), (t.depth[r] = 0)) : (o[2 * r + 1] = 0); - for (; t.heap_len < 2; ) - (o[2 * (n = t.heap[++t.heap_len] = f < 2 ? ++f : 0)] = 1), (t.depth[n] = 0), t.opt_len--, a && (t.static_len -= s[2 * n + 1]); - for (e.max_code = f, r = t.heap_len >> 1; r >= 1; r--) L(t, o, r); - n = u; - do { - (r = t.heap[1]), - (t.heap[1] = t.heap[t.heap_len--]), - L(t, o, 1), - (i = t.heap[1]), - (t.heap[--t.heap_max] = r), - (t.heap[--t.heap_max] = i), - (o[2 * n] = o[2 * r] + o[2 * i]), - (t.depth[n] = (t.depth[r] >= t.depth[i] ? t.depth[r] : t.depth[i]) + 1), - (o[2 * r + 1] = o[2 * i + 1] = n), - (t.heap[1] = n++), - L(t, o, 1); - } while (t.heap_len >= 2); - (t.heap[--t.heap_max] = t.heap[1]), - (function (t, e) { - var r, - i, - n, - o, - s, - a, - u = e.dyn_tree, - f = e.max_code, - c = e.stat_desc.static_tree, - l = e.stat_desc.has_stree, - d = e.stat_desc.extra_bits, - p = e.stat_desc.extra_base, - m = e.stat_desc.max_length, - g = 0; - for (o = 0; o <= h; o++) t.bl_count[o] = 0; - for (u[2 * t.heap[t.heap_max] + 1] = 0, r = t.heap_max + 1; r < 573; r++) - (o = u[2 * u[2 * (i = t.heap[r]) + 1] + 1] + 1) > m && ((o = m), g++), - (u[2 * i + 1] = o), - i > f || - (t.bl_count[o]++, - (s = 0), - i >= p && (s = d[i - p]), - (a = u[2 * i]), - (t.opt_len += a * (o + s)), - l && (t.static_len += a * (c[2 * i + 1] + s))); - if (0 !== g) { - do { - for (o = m - 1; 0 === t.bl_count[o]; ) o--; - t.bl_count[o]--, (t.bl_count[o + 1] += 2), t.bl_count[m]--, (g -= 2); - } while (g > 0); - for (o = m; 0 !== o; o--) - for (i = t.bl_count[o]; 0 !== i; ) - (n = t.heap[--r]) > f || - (u[2 * n + 1] !== o && ((t.opt_len += (o - u[2 * n + 1]) * u[2 * n]), (u[2 * n + 1] = o)), i--); - } - })(t, e), - I(o, f, t.bl_count); - } - function j(t, e, r) { - var i, - n, - o = -1, - s = e[1], - a = 0, - h = 7, - u = 4; - for (0 === s && ((h = 138), (u = 3)), e[2 * (r + 1) + 1] = 65535, i = 0; i <= r; i++) - (n = s), - (s = e[2 * (i + 1) + 1]), - (++a < h && n === s) || - (a < u - ? (t.bl_tree[2 * n] += a) - : 0 !== n - ? (n !== o && t.bl_tree[2 * n]++, t.bl_tree[32]++) - : a <= 10 - ? t.bl_tree[34]++ - : t.bl_tree[36]++, - (a = 0), - (o = n), - 0 === s ? ((h = 138), (u = 3)) : n === s ? ((h = 6), (u = 3)) : ((h = 7), (u = 4))); - } - function U(t, e, r) { - var i, - n, - o = -1, - s = e[1], - a = 0, - h = 7, - u = 4; - for (0 === s && ((h = 138), (u = 3)), i = 0; i <= r; i++) - if (((n = s), (s = e[2 * (i + 1) + 1]), !(++a < h && n === s))) { - if (a < u) - do { - R(t, n, t.bl_tree); - } while (0 != --a); - else - 0 !== n - ? (n !== o && (R(t, n, t.bl_tree), a--), R(t, 16, t.bl_tree), k(t, a - 3, 2)) - : a <= 10 - ? (R(t, 17, t.bl_tree), k(t, a - 3, 3)) - : (R(t, 18, t.bl_tree), k(t, a - 11, 7)); - (a = 0), (o = n), 0 === s ? ((h = 138), (u = 3)) : n === s ? ((h = 6), (u = 3)) : ((h = 7), (u = 4)); - } - } - n(M); - var D = !1; - function z(t, e, r, n) { - k(t, 0 + (n ? 1 : 0), 3), - (function (t, e, r, n) { - P(t), A(t, r), A(t, ~r), i.arraySet(t.pending_buf, t.window, e, r, t.pending), (t.pending += r); - })(t, e, r); - } - (e._tr_init = function (t) { - D || - ((function () { - var t, - e, - r, - i, - n, - o = new Array(h + 1); - for (r = 0, i = 0; i < 28; i++) for (y[i] = r, t = 0; t < 1 << f[i]; t++) b[r++] = i; - for (b[r - 1] = i, n = 0, i = 0; i < 16; i++) for (M[i] = n, t = 0; t < 1 << c[i]; t++) g[n++] = i; - for (n >>= 7; i < a; i++) for (M[i] = n << 7, t = 0; t < 1 << (c[i] - 7); t++) g[256 + n++] = i; - for (e = 0; e <= h; e++) o[e] = 0; - for (t = 0; t <= 143; ) (p[2 * t + 1] = 8), t++, o[8]++; - for (; t <= 255; ) (p[2 * t + 1] = 9), t++, o[9]++; - for (; t <= 279; ) (p[2 * t + 1] = 7), t++, o[7]++; - for (; t <= 287; ) (p[2 * t + 1] = 8), t++, o[8]++; - for (I(p, 287, o), t = 0; t < a; t++) (m[2 * t + 1] = 5), (m[2 * t] = B(t, 5)); - (v = new E(p, f, 257, s, h)), (w = new E(m, c, 0, a, h)), (_ = new E(new Array(0), l, 0, 19, 7)); - })(), - (D = !0)), - (t.l_desc = new S(t.dyn_ltree, v)), - (t.d_desc = new S(t.dyn_dtree, w)), - (t.bl_desc = new S(t.bl_tree, _)), - (t.bi_buf = 0), - (t.bi_valid = 0), - T(t); - }), - (e._tr_stored_block = z), - (e._tr_flush_block = function (t, e, r, i) { - var n, - s, - a = 0; - t.level > 0 - ? (2 === t.strm.data_type && - (t.strm.data_type = (function (t) { - var e, - r = 4093624447; - for (e = 0; e <= 31; e++, r >>>= 1) if (1 & r && 0 !== t.dyn_ltree[2 * e]) return 0; - if (0 !== t.dyn_ltree[18] || 0 !== t.dyn_ltree[20] || 0 !== t.dyn_ltree[26]) return 1; - for (e = 32; e < o; e++) if (0 !== t.dyn_ltree[2 * e]) return 1; - return 0; - })(t)), - N(t, t.l_desc), - N(t, t.d_desc), - (a = (function (t) { - var e; - for ( - j(t, t.dyn_ltree, t.l_desc.max_code), j(t, t.dyn_dtree, t.d_desc.max_code), N(t, t.bl_desc), e = 18; - e >= 3 && 0 === t.bl_tree[2 * d[e] + 1]; - e-- - ); - return (t.opt_len += 3 * (e + 1) + 5 + 5 + 4), e; - })(t)), - (n = (t.opt_len + 3 + 7) >>> 3), - (s = (t.static_len + 3 + 7) >>> 3) <= n && (n = s)) - : (n = s = r + 5), - r + 4 <= n && -1 !== e - ? z(t, e, r, i) - : 4 === t.strategy || s === n - ? (k(t, 2 + (i ? 1 : 0), 3), C(t, p, m)) - : (k(t, 4 + (i ? 1 : 0), 3), - (function (t, e, r, i) { - var n; - for (k(t, e - 257, 5), k(t, r - 1, 5), k(t, i - 4, 4), n = 0; n < i; n++) k(t, t.bl_tree[2 * d[n] + 1], 3); - U(t, t.dyn_ltree, e - 1), U(t, t.dyn_dtree, r - 1); - })(t, t.l_desc.max_code + 1, t.d_desc.max_code + 1, a + 1), - C(t, t.dyn_ltree, t.dyn_dtree)), - T(t), - i && P(t); - }), - (e._tr_tally = function (t, e, r) { - return ( - (t.pending_buf[t.d_buf + 2 * t.last_lit] = (e >>> 8) & 255), - (t.pending_buf[t.d_buf + 2 * t.last_lit + 1] = 255 & e), - (t.pending_buf[t.l_buf + t.last_lit] = 255 & r), - t.last_lit++, - 0 === e ? t.dyn_ltree[2 * r]++ : (t.matches++, e--, t.dyn_ltree[2 * (b[r] + o + 1)]++, t.dyn_dtree[2 * x(e)]++), - t.last_lit === t.lit_bufsize - 1 - ); - }), - (e._tr_align = function (t) { - k(t, 2, 3), - R(t, 256, p), - (function (t) { - 16 === t.bi_valid - ? (A(t, t.bi_buf), (t.bi_buf = 0), (t.bi_valid = 0)) - : t.bi_valid >= 8 && ((t.pending_buf[t.pending++] = 255 & t.bi_buf), (t.bi_buf >>= 8), (t.bi_valid -= 8)); - })(t); - }); - }, - 4860: t => { - 'use strict'; - t.exports = function () { - (this.input = null), - (this.next_in = 0), - (this.avail_in = 0), - (this.total_in = 0), - (this.output = null), - (this.next_out = 0), - (this.avail_out = 0), - (this.total_out = 0), - (this.msg = ''), - (this.state = null), - (this.data_type = 2), - (this.adler = 0); - }; - }, - 2080: (t, e, r) => { - var i = r(9364), - n = r(4860), - o = r(2233), - s = r(3001), - a = r(7162); - for (var h in a) e[h] = a[h]; - function u(t) { - if (t < e.DEFLATE || t > e.UNZIP) throw new TypeError('Bad argument'); - (this.mode = t), - (this.init_done = !1), - (this.write_in_progress = !1), - (this.pending_close = !1), - (this.windowBits = 0), - (this.level = 0), - (this.memLevel = 0), - (this.strategy = 0), - (this.dictionary = null); - } - function f(t, e) { - for (var r = 0; r < t.length; r++) this[e + r] = t[r]; - } - (e.NONE = 0), - (e.DEFLATE = 1), - (e.INFLATE = 2), - (e.GZIP = 3), - (e.GUNZIP = 4), - (e.DEFLATERAW = 5), - (e.INFLATERAW = 6), - (e.UNZIP = 7), - (u.prototype.init = function (t, r, i, a, h) { - switch ( - ((this.windowBits = t), - (this.level = r), - (this.memLevel = i), - (this.strategy = a), - (this.mode !== e.GZIP && this.mode !== e.GUNZIP) || (this.windowBits += 16), - this.mode === e.UNZIP && (this.windowBits += 32), - (this.mode !== e.DEFLATERAW && this.mode !== e.INFLATERAW) || (this.windowBits = -this.windowBits), - (this.strm = new n()), - this.mode) - ) { - case e.DEFLATE: - case e.GZIP: - case e.DEFLATERAW: - var u = o.deflateInit2(this.strm, this.level, e.Z_DEFLATED, this.windowBits, this.memLevel, this.strategy); - break; - case e.INFLATE: - case e.GUNZIP: - case e.INFLATERAW: - case e.UNZIP: - u = s.inflateInit2(this.strm, this.windowBits); - break; - default: - throw new Error('Unknown mode ' + this.mode); - } - u === e.Z_OK ? ((this.write_in_progress = !1), (this.init_done = !0)) : this._error(u); - }), - (u.prototype.params = function () { - throw new Error('deflateParams Not supported'); - }), - (u.prototype._writeCheck = function () { - if (!this.init_done) throw new Error('write before init'); - if (this.mode === e.NONE) throw new Error('already finalized'); - if (this.write_in_progress) throw new Error('write already in progress'); - if (this.pending_close) throw new Error('close is pending'); - }), - (u.prototype.write = function (t, e, r, i, n, o, s) { - this._writeCheck(), (this.write_in_progress = !0); - var a = this; - return ( - process.nextTick(function () { - a.write_in_progress = !1; - var h = a._write(t, e, r, i, n, o, s); - a.callback(h[0], h[1]), a.pending_close && a.close(); - }), - this - ); - }), - (u.prototype.writeSync = function (t, e, r, i, n, o, s) { - return this._writeCheck(), this._write(t, e, r, i, n, o, s); - }), - (u.prototype._write = function (t, r, i, n, a, h, u) { - if ( - ((this.write_in_progress = !0), - t !== e.Z_NO_FLUSH && - t !== e.Z_PARTIAL_FLUSH && - t !== e.Z_SYNC_FLUSH && - t !== e.Z_FULL_FLUSH && - t !== e.Z_FINISH && - t !== e.Z_BLOCK) - ) - throw new Error('Invalid flush value'); - null == r && ((r = new Buffer(0)), (n = 0), (i = 0)), a._set ? (a.set = a._set) : (a.set = f); - var c = this.strm; - switch (((c.avail_in = n), (c.input = r), (c.next_in = i), (c.avail_out = u), (c.output = a), (c.next_out = h), this.mode)) { - case e.DEFLATE: - case e.GZIP: - case e.DEFLATERAW: - var l = o.deflate(c, t); - break; - case e.UNZIP: - case e.INFLATE: - case e.GUNZIP: - case e.INFLATERAW: - l = s.inflate(c, t); - break; - default: - throw new Error('Unknown mode ' + this.mode); - } - return l !== e.Z_STREAM_END && l !== e.Z_OK && this._error(l), (this.write_in_progress = !1), [c.avail_in, c.avail_out]; - }), - (u.prototype.close = function () { - this.write_in_progress - ? (this.pending_close = !0) - : ((this.pending_close = !1), - this.mode === e.DEFLATE || this.mode === e.GZIP || this.mode === e.DEFLATERAW - ? o.deflateEnd(this.strm) - : s.inflateEnd(this.strm), - (this.mode = e.NONE)); - }), - (u.prototype.reset = function () { - switch (this.mode) { - case e.DEFLATE: - case e.DEFLATERAW: - var t = o.deflateReset(this.strm); - break; - case e.INFLATE: - case e.INFLATERAW: - t = s.inflateReset(this.strm); - } - t !== e.Z_OK && this._error(t); - }), - (u.prototype._error = function (t) { - this.onerror(i[t] + ': ' + this.strm.msg, t), (this.write_in_progress = !1), this.pending_close && this.close(); - }), - (e.Zlib = u); - }, - 9173: (t, e, r) => { - var i = r(4219), - n = r(2080), - o = r(9539), - s = r(8583).ok; - function a(t, e, r) { - var i = [], - n = 0; - function o() { - for (var e; null !== (e = t.read()); ) i.push(e), (n += e.length); - t.once('readable', o); - } - function s() { - var e = Buffer.concat(i, n); - (i = []), r(null, e), t.close(); - } - t.on('error', function (e) { - t.removeListener('end', s), t.removeListener('readable', o), r(e); - }), - t.on('end', s), - t.end(e), - o(); - } - function h(t, e) { - if (('string' == typeof e && (e = new Buffer(e)), !Buffer.isBuffer(e))) throw new TypeError('Not a string or buffer'); - var r = n.Z_FINISH; - return t._processChunk(e, r); - } - function u(t) { - if (!(this instanceof u)) return new u(t); - g.call(this, t, n.DEFLATE); - } - function f(t) { - if (!(this instanceof f)) return new f(t); - g.call(this, t, n.INFLATE); - } - function c(t) { - if (!(this instanceof c)) return new c(t); - g.call(this, t, n.GZIP); - } - function l(t) { - if (!(this instanceof l)) return new l(t); - g.call(this, t, n.GUNZIP); - } - function d(t) { - if (!(this instanceof d)) return new d(t); - g.call(this, t, n.DEFLATERAW); - } - function p(t) { - if (!(this instanceof p)) return new p(t); - g.call(this, t, n.INFLATERAW); - } - function m(t) { - if (!(this instanceof m)) return new m(t); - g.call(this, t, n.UNZIP); - } - function g(t, r) { - if ( - ((this._opts = t = t || {}), - (this._chunkSize = t.chunkSize || e.Z_DEFAULT_CHUNK), - i.call(this, t), - t.flush && - t.flush !== n.Z_NO_FLUSH && - t.flush !== n.Z_PARTIAL_FLUSH && - t.flush !== n.Z_SYNC_FLUSH && - t.flush !== n.Z_FULL_FLUSH && - t.flush !== n.Z_FINISH && - t.flush !== n.Z_BLOCK) - ) - throw new Error('Invalid flush flag: ' + t.flush); - if (((this._flushFlag = t.flush || n.Z_NO_FLUSH), t.chunkSize && (t.chunkSize < e.Z_MIN_CHUNK || t.chunkSize > e.Z_MAX_CHUNK))) - throw new Error('Invalid chunk size: ' + t.chunkSize); - if (t.windowBits && (t.windowBits < e.Z_MIN_WINDOWBITS || t.windowBits > e.Z_MAX_WINDOWBITS)) - throw new Error('Invalid windowBits: ' + t.windowBits); - if (t.level && (t.level < e.Z_MIN_LEVEL || t.level > e.Z_MAX_LEVEL)) throw new Error('Invalid compression level: ' + t.level); - if (t.memLevel && (t.memLevel < e.Z_MIN_MEMLEVEL || t.memLevel > e.Z_MAX_MEMLEVEL)) - throw new Error('Invalid memLevel: ' + t.memLevel); - if ( - t.strategy && - t.strategy != e.Z_FILTERED && - t.strategy != e.Z_HUFFMAN_ONLY && - t.strategy != e.Z_RLE && - t.strategy != e.Z_FIXED && - t.strategy != e.Z_DEFAULT_STRATEGY - ) - throw new Error('Invalid strategy: ' + t.strategy); - if (t.dictionary && !Buffer.isBuffer(t.dictionary)) throw new Error('Invalid dictionary: it should be a Buffer instance'); - this._binding = new n.Zlib(r); - var o = this; - (this._hadError = !1), - (this._binding.onerror = function (t, r) { - (o._binding = null), (o._hadError = !0); - var i = new Error(t); - (i.errno = r), (i.code = e.codes[r]), o.emit('error', i); - }); - var s = e.Z_DEFAULT_COMPRESSION; - 'number' == typeof t.level && (s = t.level); - var a = e.Z_DEFAULT_STRATEGY; - 'number' == typeof t.strategy && (a = t.strategy), - this._binding.init(t.windowBits || e.Z_DEFAULT_WINDOWBITS, s, t.memLevel || e.Z_DEFAULT_MEMLEVEL, a, t.dictionary), - (this._buffer = new Buffer(this._chunkSize)), - (this._offset = 0), - (this._closed = !1), - (this._level = s), - (this._strategy = a), - this.once('end', this.close); - } - (n.Z_MIN_WINDOWBITS = 8), - (n.Z_MAX_WINDOWBITS = 15), - (n.Z_DEFAULT_WINDOWBITS = 15), - (n.Z_MIN_CHUNK = 64), - (n.Z_MAX_CHUNK = 1 / 0), - (n.Z_DEFAULT_CHUNK = 16384), - (n.Z_MIN_MEMLEVEL = 1), - (n.Z_MAX_MEMLEVEL = 9), - (n.Z_DEFAULT_MEMLEVEL = 8), - (n.Z_MIN_LEVEL = -1), - (n.Z_MAX_LEVEL = 9), - (n.Z_DEFAULT_LEVEL = n.Z_DEFAULT_COMPRESSION), - Object.keys(n).forEach(function (t) { - t.match(/^Z/) && (e[t] = n[t]); - }), - (e.codes = { - Z_OK: n.Z_OK, - Z_STREAM_END: n.Z_STREAM_END, - Z_NEED_DICT: n.Z_NEED_DICT, - Z_ERRNO: n.Z_ERRNO, - Z_STREAM_ERROR: n.Z_STREAM_ERROR, - Z_DATA_ERROR: n.Z_DATA_ERROR, - Z_MEM_ERROR: n.Z_MEM_ERROR, - Z_BUF_ERROR: n.Z_BUF_ERROR, - Z_VERSION_ERROR: n.Z_VERSION_ERROR, - }), - Object.keys(e.codes).forEach(function (t) { - e.codes[e.codes[t]] = t; - }), - (e.Deflate = u), - (e.Inflate = f), - (e.Gzip = c), - (e.Gunzip = l), - (e.DeflateRaw = d), - (e.InflateRaw = p), - (e.Unzip = m), - (e.createDeflate = function (t) { - return new u(t); - }), - (e.createInflate = function (t) { - return new f(t); - }), - (e.createDeflateRaw = function (t) { - return new d(t); - }), - (e.createInflateRaw = function (t) { - return new p(t); - }), - (e.createGzip = function (t) { - return new c(t); - }), - (e.createGunzip = function (t) { - return new l(t); - }), - (e.createUnzip = function (t) { - return new m(t); - }), - (e.deflate = function (t, e, r) { - return 'function' == typeof e && ((r = e), (e = {})), a(new u(e), t, r); - }), - (e.deflateSync = function (t, e) { - return h(new u(e), t); - }), - (e.gzip = function (t, e, r) { - return 'function' == typeof e && ((r = e), (e = {})), a(new c(e), t, r); - }), - (e.gzipSync = function (t, e) { - return h(new c(e), t); - }), - (e.deflateRaw = function (t, e, r) { - return 'function' == typeof e && ((r = e), (e = {})), a(new d(e), t, r); - }), - (e.deflateRawSync = function (t, e) { - return h(new d(e), t); - }), - (e.unzip = function (t, e, r) { - return 'function' == typeof e && ((r = e), (e = {})), a(new m(e), t, r); - }), - (e.unzipSync = function (t, e) { - return h(new m(e), t); - }), - (e.inflate = function (t, e, r) { - return 'function' == typeof e && ((r = e), (e = {})), a(new f(e), t, r); - }), - (e.inflateSync = function (t, e) { - return h(new f(e), t); - }), - (e.gunzip = function (t, e, r) { - return 'function' == typeof e && ((r = e), (e = {})), a(new l(e), t, r); - }), - (e.gunzipSync = function (t, e) { - return h(new l(e), t); - }), - (e.inflateRaw = function (t, e, r) { - return 'function' == typeof e && ((r = e), (e = {})), a(new p(e), t, r); - }), - (e.inflateRawSync = function (t, e) { - return h(new p(e), t); - }), - o.inherits(g, i), - (g.prototype.params = function (t, r, i) { - if (t < e.Z_MIN_LEVEL || t > e.Z_MAX_LEVEL) throw new RangeError('Invalid compression level: ' + t); - if (r != e.Z_FILTERED && r != e.Z_HUFFMAN_ONLY && r != e.Z_RLE && r != e.Z_FIXED && r != e.Z_DEFAULT_STRATEGY) - throw new TypeError('Invalid strategy: ' + r); - if (this._level !== t || this._strategy !== r) { - var o = this; - this.flush(n.Z_SYNC_FLUSH, function () { - o._binding.params(t, r), o._hadError || ((o._level = t), (o._strategy = r), i && i()); - }); - } else process.nextTick(i); - }), - (g.prototype.reset = function () { - return this._binding.reset(); - }), - (g.prototype._flush = function (t) { - this._transform(new Buffer(0), '', t); - }), - (g.prototype.flush = function (t, e) { - var r = this._writableState; - if ((('function' == typeof t || (void 0 === t && !e)) && ((e = t), (t = n.Z_FULL_FLUSH)), r.ended)) e && process.nextTick(e); - else if (r.ending) e && this.once('end', e); - else if (r.needDrain) { - var i = this; - this.once('drain', function () { - i.flush(e); - }); - } else (this._flushFlag = t), this.write(new Buffer(0), '', e); - }), - (g.prototype.close = function (t) { - if ((t && process.nextTick(t), !this._closed)) { - (this._closed = !0), this._binding.close(); - var e = this; - process.nextTick(function () { - e.emit('close'); - }); - } - }), - (g.prototype._transform = function (t, e, r) { - var i, - o = this._writableState, - s = (o.ending || o.ended) && (!t || o.length === t.length); - if (null === !t && !Buffer.isBuffer(t)) return r(new Error('invalid input')); - s ? (i = n.Z_FINISH) : ((i = this._flushFlag), t.length >= o.length && (this._flushFlag = this._opts.flush || n.Z_NO_FLUSH)), - this._processChunk(t, i, r); - }), - (g.prototype._processChunk = function (t, e, r) { - var i = t && t.length, - n = this._chunkSize - this._offset, - o = 0, - a = this, - h = 'function' == typeof r; - if (!h) { - var u, - f = [], - c = 0; - this.on('error', function (t) { - u = t; - }); - do { - var l = this._binding.writeSync(e, t, o, i, this._buffer, this._offset, n); - } while (!this._hadError && m(l[0], l[1])); - if (this._hadError) throw u; - var d = Buffer.concat(f, c); - return this.close(), d; - } - var p = this._binding.write(e, t, o, i, this._buffer, this._offset, n); - function m(u, l) { - if (!a._hadError) { - var d = n - l; - if ((s(d >= 0, 'have should not go down'), d > 0)) { - var p = a._buffer.slice(a._offset, a._offset + d); - (a._offset += d), h ? a.push(p) : (f.push(p), (c += p.length)); - } - if ( - ((0 === l || a._offset >= a._chunkSize) && ((n = a._chunkSize), (a._offset = 0), (a._buffer = new Buffer(a._chunkSize))), - 0 === l) - ) { - if (((o += i - u), (i = u), !h)) return !0; - var g = a._binding.write(e, t, o, i, a._buffer, a._offset, a._chunkSize); - return (g.callback = m), void (g.buffer = t); - } - if (!h) return !1; - r(); - } - } - (p.buffer = t), (p.callback = m); - }), - o.inherits(u, g), - o.inherits(f, g), - o.inherits(c, g), - o.inherits(l, g), - o.inherits(d, g), - o.inherits(p, g), - o.inherits(m, g); - }, - 8764: (t, e, r) => { - 'use strict'; - var i = r(9742), - n = r(645), - o = r(5826); - function s() { - return h.TYPED_ARRAY_SUPPORT ? 2147483647 : 1073741823; - } - function a(t, e) { - if (s() < e) throw new RangeError('Invalid typed array length'); - return ( - h.TYPED_ARRAY_SUPPORT ? ((t = new Uint8Array(e)).__proto__ = h.prototype) : (null === t && (t = new h(e)), (t.length = e)), t - ); - } - function h(t, e, r) { - if (!(h.TYPED_ARRAY_SUPPORT || this instanceof h)) return new h(t, e, r); - if ('number' == typeof t) { - if ('string' == typeof e) throw new Error('If encoding is specified then the first argument must be a string'); - return c(this, t); - } - return u(this, t, e, r); - } - function u(t, e, r, i) { - if ('number' == typeof e) throw new TypeError('"value" argument must not be a number'); - return 'undefined' != typeof ArrayBuffer && e instanceof ArrayBuffer - ? (function (t, e, r, i) { - if ((e.byteLength, r < 0 || e.byteLength < r)) throw new RangeError("'offset' is out of bounds"); - if (e.byteLength < r + (i || 0)) throw new RangeError("'length' is out of bounds"); - return ( - (e = void 0 === r && void 0 === i ? new Uint8Array(e) : void 0 === i ? new Uint8Array(e, r) : new Uint8Array(e, r, i)), - h.TYPED_ARRAY_SUPPORT ? ((t = e).__proto__ = h.prototype) : (t = l(t, e)), - t - ); - })(t, e, r, i) - : 'string' == typeof e - ? (function (t, e, r) { - if ((('string' == typeof r && '' !== r) || (r = 'utf8'), !h.isEncoding(r))) - throw new TypeError('"encoding" must be a valid string encoding'); - var i = 0 | p(e, r), - n = (t = a(t, i)).write(e, r); - return n !== i && (t = t.slice(0, n)), t; - })(t, e, r) - : (function (t, e) { - if (h.isBuffer(e)) { - var r = 0 | d(e.length); - return 0 === (t = a(t, r)).length || e.copy(t, 0, 0, r), t; - } - if (e) { - if (('undefined' != typeof ArrayBuffer && e.buffer instanceof ArrayBuffer) || 'length' in e) - return 'number' != typeof e.length || (i = e.length) != i ? a(t, 0) : l(t, e); - if ('Buffer' === e.type && o(e.data)) return l(t, e.data); - } - var i; - throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.'); - })(t, e); - } - function f(t) { - if ('number' != typeof t) throw new TypeError('"size" argument must be a number'); - if (t < 0) throw new RangeError('"size" argument must not be negative'); - } - function c(t, e) { - if ((f(e), (t = a(t, e < 0 ? 0 : 0 | d(e))), !h.TYPED_ARRAY_SUPPORT)) for (var r = 0; r < e; ++r) t[r] = 0; - return t; - } - function l(t, e) { - var r = e.length < 0 ? 0 : 0 | d(e.length); - t = a(t, r); - for (var i = 0; i < r; i += 1) t[i] = 255 & e[i]; - return t; - } - function d(t) { - if (t >= s()) throw new RangeError('Attempt to allocate Buffer larger than maximum size: 0x' + s().toString(16) + ' bytes'); - return 0 | t; - } - function p(t, e) { - if (h.isBuffer(t)) return t.length; - if ( - 'undefined' != typeof ArrayBuffer && - 'function' == typeof ArrayBuffer.isView && - (ArrayBuffer.isView(t) || t instanceof ArrayBuffer) - ) - return t.byteLength; - 'string' != typeof t && (t = '' + t); - var r = t.length; - if (0 === r) return 0; - for (var i = !1; ; ) - switch (e) { - case 'ascii': - case 'latin1': - case 'binary': - return r; - case 'utf8': - case 'utf-8': - case void 0: - return z(t).length; - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return 2 * r; - case 'hex': - return r >>> 1; - case 'base64': - return F(t).length; - default: - if (i) return z(t).length; - (e = ('' + e).toLowerCase()), (i = !0); - } - } - function m(t, e, r) { - var i = !1; - if (((void 0 === e || e < 0) && (e = 0), e > this.length)) return ''; - if (((void 0 === r || r > this.length) && (r = this.length), r <= 0)) return ''; - if ((r >>>= 0) <= (e >>>= 0)) return ''; - for (t || (t = 'utf8'); ; ) - switch (t) { - case 'hex': - return I(this, e, r); - case 'utf8': - case 'utf-8': - return A(this, e, r); - case 'ascii': - return R(this, e, r); - case 'latin1': - case 'binary': - return B(this, e, r); - case 'base64': - return x(this, e, r); - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return T(this, e, r); - default: - if (i) throw new TypeError('Unknown encoding: ' + t); - (t = (t + '').toLowerCase()), (i = !0); - } - } - function g(t, e, r) { - var i = t[e]; - (t[e] = t[r]), (t[r] = i); - } - function b(t, e, r, i, n) { - if (0 === t.length) return -1; - if ( - ('string' == typeof r ? ((i = r), (r = 0)) : r > 2147483647 ? (r = 2147483647) : r < -2147483648 && (r = -2147483648), - (r = +r), - isNaN(r) && (r = n ? 0 : t.length - 1), - r < 0 && (r = t.length + r), - r >= t.length) - ) { - if (n) return -1; - r = t.length - 1; - } else if (r < 0) { - if (!n) return -1; - r = 0; - } - if (('string' == typeof e && (e = h.from(e, i)), h.isBuffer(e))) return 0 === e.length ? -1 : y(t, e, r, i, n); - if ('number' == typeof e) - return ( - (e &= 255), - h.TYPED_ARRAY_SUPPORT && 'function' == typeof Uint8Array.prototype.indexOf - ? n - ? Uint8Array.prototype.indexOf.call(t, e, r) - : Uint8Array.prototype.lastIndexOf.call(t, e, r) - : y(t, [e], r, i, n) - ); - throw new TypeError('val must be string, number or Buffer'); - } - function y(t, e, r, i, n) { - var o, - s = 1, - a = t.length, - h = e.length; - if (void 0 !== i && ('ucs2' === (i = String(i).toLowerCase()) || 'ucs-2' === i || 'utf16le' === i || 'utf-16le' === i)) { - if (t.length < 2 || e.length < 2) return -1; - (s = 2), (a /= 2), (h /= 2), (r /= 2); - } - function u(t, e) { - return 1 === s ? t[e] : t.readUInt16BE(e * s); - } - if (n) { - var f = -1; - for (o = r; o < a; o++) - if (u(t, o) === u(e, -1 === f ? 0 : o - f)) { - if ((-1 === f && (f = o), o - f + 1 === h)) return f * s; - } else -1 !== f && (o -= o - f), (f = -1); - } else - for (r + h > a && (r = a - h), o = r; o >= 0; o--) { - for (var c = !0, l = 0; l < h; l++) - if (u(t, o + l) !== u(e, l)) { - c = !1; - break; - } - if (c) return o; - } - return -1; - } - function v(t, e, r, i) { - r = Number(r) || 0; - var n = t.length - r; - i ? (i = Number(i)) > n && (i = n) : (i = n); - var o = e.length; - if (o % 2 != 0) throw new TypeError('Invalid hex string'); - i > o / 2 && (i = o / 2); - for (var s = 0; s < i; ++s) { - var a = parseInt(e.substr(2 * s, 2), 16); - if (isNaN(a)) return s; - t[r + s] = a; - } - return s; - } - function w(t, e, r, i) { - return q(z(e, t.length - r), t, r, i); - } - function _(t, e, r, i) { - return q( - (function (t) { - for (var e = [], r = 0; r < t.length; ++r) e.push(255 & t.charCodeAt(r)); - return e; - })(e), - t, - r, - i - ); - } - function M(t, e, r, i) { - return _(t, e, r, i); - } - function E(t, e, r, i) { - return q(F(e), t, r, i); - } - function S(t, e, r, i) { - return q( - (function (t, e) { - for (var r, i, n, o = [], s = 0; s < t.length && !((e -= 2) < 0); ++s) - (i = (r = t.charCodeAt(s)) >> 8), (n = r % 256), o.push(n), o.push(i); - return o; - })(e, t.length - r), - t, - r, - i - ); - } - function x(t, e, r) { - return 0 === e && r === t.length ? i.fromByteArray(t) : i.fromByteArray(t.slice(e, r)); - } - function A(t, e, r) { - r = Math.min(t.length, r); - for (var i = [], n = e; n < r; ) { - var o, - s, - a, - h, - u = t[n], - f = null, - c = u > 239 ? 4 : u > 223 ? 3 : u > 191 ? 2 : 1; - if (n + c <= r) - switch (c) { - case 1: - u < 128 && (f = u); - break; - case 2: - 128 == (192 & (o = t[n + 1])) && (h = ((31 & u) << 6) | (63 & o)) > 127 && (f = h); - break; - case 3: - (o = t[n + 1]), - (s = t[n + 2]), - 128 == (192 & o) && - 128 == (192 & s) && - (h = ((15 & u) << 12) | ((63 & o) << 6) | (63 & s)) > 2047 && - (h < 55296 || h > 57343) && - (f = h); - break; - case 4: - (o = t[n + 1]), - (s = t[n + 2]), - (a = t[n + 3]), - 128 == (192 & o) && - 128 == (192 & s) && - 128 == (192 & a) && - (h = ((15 & u) << 18) | ((63 & o) << 12) | ((63 & s) << 6) | (63 & a)) > 65535 && - h < 1114112 && - (f = h); - } - null === f - ? ((f = 65533), (c = 1)) - : f > 65535 && ((f -= 65536), i.push(((f >>> 10) & 1023) | 55296), (f = 56320 | (1023 & f))), - i.push(f), - (n += c); - } - return (function (t) { - var e = t.length; - if (e <= k) return String.fromCharCode.apply(String, t); - for (var r = '', i = 0; i < e; ) r += String.fromCharCode.apply(String, t.slice(i, (i += k))); - return r; - })(i); - } - (e.Buffer = h), - (e.SlowBuffer = function (t) { - return +t != t && (t = 0), h.alloc(+t); - }), - (e.INSPECT_MAX_BYTES = 50), - (h.TYPED_ARRAY_SUPPORT = - void 0 !== r.g.TYPED_ARRAY_SUPPORT - ? r.g.TYPED_ARRAY_SUPPORT - : (function () { - try { - var t = new Uint8Array(1); - return ( - (t.__proto__ = { - __proto__: Uint8Array.prototype, - foo: function () { - return 42; - }, - }), - 42 === t.foo() && 'function' == typeof t.subarray && 0 === t.subarray(1, 1).byteLength - ); - } catch (t) { - return !1; - } - })()), - (e.kMaxLength = s()), - (h.poolSize = 8192), - (h._augment = function (t) { - return (t.__proto__ = h.prototype), t; - }), - (h.from = function (t, e, r) { - return u(null, t, e, r); - }), - h.TYPED_ARRAY_SUPPORT && - ((h.prototype.__proto__ = Uint8Array.prototype), - (h.__proto__ = Uint8Array), - 'undefined' != typeof Symbol && - Symbol.species && - h[Symbol.species] === h && - Object.defineProperty(h, Symbol.species, { value: null, configurable: !0 })), - (h.alloc = function (t, e, r) { - return (function (t, e, r, i) { - return f(e), e <= 0 ? a(t, e) : void 0 !== r ? ('string' == typeof i ? a(t, e).fill(r, i) : a(t, e).fill(r)) : a(t, e); - })(null, t, e, r); - }), - (h.allocUnsafe = function (t) { - return c(null, t); - }), - (h.allocUnsafeSlow = function (t) { - return c(null, t); - }), - (h.isBuffer = function (t) { - return !(null == t || !t._isBuffer); - }), - (h.compare = function (t, e) { - if (!h.isBuffer(t) || !h.isBuffer(e)) throw new TypeError('Arguments must be Buffers'); - if (t === e) return 0; - for (var r = t.length, i = e.length, n = 0, o = Math.min(r, i); n < o; ++n) - if (t[n] !== e[n]) { - (r = t[n]), (i = e[n]); - break; - } - return r < i ? -1 : i < r ? 1 : 0; - }), - (h.isEncoding = function (t) { - switch (String(t).toLowerCase()) { - case 'hex': - case 'utf8': - case 'utf-8': - case 'ascii': - case 'latin1': - case 'binary': - case 'base64': - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return !0; - default: - return !1; - } - }), - (h.concat = function (t, e) { - if (!o(t)) throw new TypeError('"list" argument must be an Array of Buffers'); - if (0 === t.length) return h.alloc(0); - var r; - if (void 0 === e) for (e = 0, r = 0; r < t.length; ++r) e += t[r].length; - var i = h.allocUnsafe(e), - n = 0; - for (r = 0; r < t.length; ++r) { - var s = t[r]; - if (!h.isBuffer(s)) throw new TypeError('"list" argument must be an Array of Buffers'); - s.copy(i, n), (n += s.length); - } - return i; - }), - (h.byteLength = p), - (h.prototype._isBuffer = !0), - (h.prototype.swap16 = function () { - var t = this.length; - if (t % 2 != 0) throw new RangeError('Buffer size must be a multiple of 16-bits'); - for (var e = 0; e < t; e += 2) g(this, e, e + 1); - return this; - }), - (h.prototype.swap32 = function () { - var t = this.length; - if (t % 4 != 0) throw new RangeError('Buffer size must be a multiple of 32-bits'); - for (var e = 0; e < t; e += 4) g(this, e, e + 3), g(this, e + 1, e + 2); - return this; - }), - (h.prototype.swap64 = function () { - var t = this.length; - if (t % 8 != 0) throw new RangeError('Buffer size must be a multiple of 64-bits'); - for (var e = 0; e < t; e += 8) g(this, e, e + 7), g(this, e + 1, e + 6), g(this, e + 2, e + 5), g(this, e + 3, e + 4); - return this; - }), - (h.prototype.toString = function () { - var t = 0 | this.length; - return 0 === t ? '' : 0 === arguments.length ? A(this, 0, t) : m.apply(this, arguments); - }), - (h.prototype.equals = function (t) { - if (!h.isBuffer(t)) throw new TypeError('Argument must be a Buffer'); - return this === t || 0 === h.compare(this, t); - }), - (h.prototype.inspect = function () { - var t = '', - r = e.INSPECT_MAX_BYTES; - return ( - this.length > 0 && ((t = this.toString('hex', 0, r).match(/.{2}/g).join(' ')), this.length > r && (t += ' ... ')), - '' - ); - }), - (h.prototype.compare = function (t, e, r, i, n) { - if (!h.isBuffer(t)) throw new TypeError('Argument must be a Buffer'); - if ( - (void 0 === e && (e = 0), - void 0 === r && (r = t ? t.length : 0), - void 0 === i && (i = 0), - void 0 === n && (n = this.length), - e < 0 || r > t.length || i < 0 || n > this.length) - ) - throw new RangeError('out of range index'); - if (i >= n && e >= r) return 0; - if (i >= n) return -1; - if (e >= r) return 1; - if (this === t) return 0; - for ( - var o = (n >>>= 0) - (i >>>= 0), - s = (r >>>= 0) - (e >>>= 0), - a = Math.min(o, s), - u = this.slice(i, n), - f = t.slice(e, r), - c = 0; - c < a; - ++c - ) - if (u[c] !== f[c]) { - (o = u[c]), (s = f[c]); - break; - } - return o < s ? -1 : s < o ? 1 : 0; - }), - (h.prototype.includes = function (t, e, r) { - return -1 !== this.indexOf(t, e, r); - }), - (h.prototype.indexOf = function (t, e, r) { - return b(this, t, e, r, !0); - }), - (h.prototype.lastIndexOf = function (t, e, r) { - return b(this, t, e, r, !1); - }), - (h.prototype.write = function (t, e, r, i) { - if (void 0 === e) (i = 'utf8'), (r = this.length), (e = 0); - else if (void 0 === r && 'string' == typeof e) (i = e), (r = this.length), (e = 0); - else { - if (!isFinite(e)) throw new Error('Buffer.write(string, encoding, offset[, length]) is no longer supported'); - (e |= 0), isFinite(r) ? ((r |= 0), void 0 === i && (i = 'utf8')) : ((i = r), (r = void 0)); - } - var n = this.length - e; - if (((void 0 === r || r > n) && (r = n), (t.length > 0 && (r < 0 || e < 0)) || e > this.length)) - throw new RangeError('Attempt to write outside buffer bounds'); - i || (i = 'utf8'); - for (var o = !1; ; ) - switch (i) { - case 'hex': - return v(this, t, e, r); - case 'utf8': - case 'utf-8': - return w(this, t, e, r); - case 'ascii': - return _(this, t, e, r); - case 'latin1': - case 'binary': - return M(this, t, e, r); - case 'base64': - return E(this, t, e, r); - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return S(this, t, e, r); - default: - if (o) throw new TypeError('Unknown encoding: ' + i); - (i = ('' + i).toLowerCase()), (o = !0); - } - }), - (h.prototype.toJSON = function () { - return { type: 'Buffer', data: Array.prototype.slice.call(this._arr || this, 0) }; - }); - var k = 4096; - function R(t, e, r) { - var i = ''; - r = Math.min(t.length, r); - for (var n = e; n < r; ++n) i += String.fromCharCode(127 & t[n]); - return i; - } - function B(t, e, r) { - var i = ''; - r = Math.min(t.length, r); - for (var n = e; n < r; ++n) i += String.fromCharCode(t[n]); - return i; - } - function I(t, e, r) { - var i, - n = t.length; - (!e || e < 0) && (e = 0), (!r || r < 0 || r > n) && (r = n); - for (var o = '', s = e; s < r; ++s) o += (i = t[s]) < 16 ? '0' + i.toString(16) : i.toString(16); - return o; - } - function T(t, e, r) { - for (var i = t.slice(e, r), n = '', o = 0; o < i.length; o += 2) n += String.fromCharCode(i[o] + 256 * i[o + 1]); - return n; - } - function P(t, e, r) { - if (t % 1 != 0 || t < 0) throw new RangeError('offset is not uint'); - if (t + e > r) throw new RangeError('Trying to access beyond buffer length'); - } - function O(t, e, r, i, n, o) { - if (!h.isBuffer(t)) throw new TypeError('"buffer" argument must be a Buffer instance'); - if (e > n || e < o) throw new RangeError('"value" argument is out of bounds'); - if (r + i > t.length) throw new RangeError('Index out of range'); - } - function L(t, e, r, i) { - e < 0 && (e = 65535 + e + 1); - for (var n = 0, o = Math.min(t.length - r, 2); n < o; ++n) - t[r + n] = (e & (255 << (8 * (i ? n : 1 - n)))) >>> (8 * (i ? n : 1 - n)); - } - function C(t, e, r, i) { - e < 0 && (e = 4294967295 + e + 1); - for (var n = 0, o = Math.min(t.length - r, 4); n < o; ++n) t[r + n] = (e >>> (8 * (i ? n : 3 - n))) & 255; - } - function N(t, e, r, i, n, o) { - if (r + i > t.length) throw new RangeError('Index out of range'); - if (r < 0) throw new RangeError('Index out of range'); - } - function j(t, e, r, i, o) { - return o || N(t, 0, r, 4), n.write(t, e, r, i, 23, 4), r + 4; - } - function U(t, e, r, i, o) { - return o || N(t, 0, r, 8), n.write(t, e, r, i, 52, 8), r + 8; - } - (h.prototype.slice = function (t, e) { - var r, - i = this.length; - if ( - ((t = ~~t) < 0 ? (t += i) < 0 && (t = 0) : t > i && (t = i), - (e = void 0 === e ? i : ~~e) < 0 ? (e += i) < 0 && (e = 0) : e > i && (e = i), - e < t && (e = t), - h.TYPED_ARRAY_SUPPORT) - ) - (r = this.subarray(t, e)).__proto__ = h.prototype; - else { - var n = e - t; - r = new h(n, void 0); - for (var o = 0; o < n; ++o) r[o] = this[o + t]; - } - return r; - }), - (h.prototype.readUIntLE = function (t, e, r) { - (t |= 0), (e |= 0), r || P(t, e, this.length); - for (var i = this[t], n = 1, o = 0; ++o < e && (n *= 256); ) i += this[t + o] * n; - return i; - }), - (h.prototype.readUIntBE = function (t, e, r) { - (t |= 0), (e |= 0), r || P(t, e, this.length); - for (var i = this[t + --e], n = 1; e > 0 && (n *= 256); ) i += this[t + --e] * n; - return i; - }), - (h.prototype.readUInt8 = function (t, e) { - return e || P(t, 1, this.length), this[t]; - }), - (h.prototype.readUInt16LE = function (t, e) { - return e || P(t, 2, this.length), this[t] | (this[t + 1] << 8); - }), - (h.prototype.readUInt16BE = function (t, e) { - return e || P(t, 2, this.length), (this[t] << 8) | this[t + 1]; - }), - (h.prototype.readUInt32LE = function (t, e) { - return e || P(t, 4, this.length), (this[t] | (this[t + 1] << 8) | (this[t + 2] << 16)) + 16777216 * this[t + 3]; - }), - (h.prototype.readUInt32BE = function (t, e) { - return e || P(t, 4, this.length), 16777216 * this[t] + ((this[t + 1] << 16) | (this[t + 2] << 8) | this[t + 3]); - }), - (h.prototype.readIntLE = function (t, e, r) { - (t |= 0), (e |= 0), r || P(t, e, this.length); - for (var i = this[t], n = 1, o = 0; ++o < e && (n *= 256); ) i += this[t + o] * n; - return i >= (n *= 128) && (i -= Math.pow(2, 8 * e)), i; - }), - (h.prototype.readIntBE = function (t, e, r) { - (t |= 0), (e |= 0), r || P(t, e, this.length); - for (var i = e, n = 1, o = this[t + --i]; i > 0 && (n *= 256); ) o += this[t + --i] * n; - return o >= (n *= 128) && (o -= Math.pow(2, 8 * e)), o; - }), - (h.prototype.readInt8 = function (t, e) { - return e || P(t, 1, this.length), 128 & this[t] ? -1 * (255 - this[t] + 1) : this[t]; - }), - (h.prototype.readInt16LE = function (t, e) { - e || P(t, 2, this.length); - var r = this[t] | (this[t + 1] << 8); - return 32768 & r ? 4294901760 | r : r; - }), - (h.prototype.readInt16BE = function (t, e) { - e || P(t, 2, this.length); - var r = this[t + 1] | (this[t] << 8); - return 32768 & r ? 4294901760 | r : r; - }), - (h.prototype.readInt32LE = function (t, e) { - return e || P(t, 4, this.length), this[t] | (this[t + 1] << 8) | (this[t + 2] << 16) | (this[t + 3] << 24); - }), - (h.prototype.readInt32BE = function (t, e) { - return e || P(t, 4, this.length), (this[t] << 24) | (this[t + 1] << 16) | (this[t + 2] << 8) | this[t + 3]; - }), - (h.prototype.readFloatLE = function (t, e) { - return e || P(t, 4, this.length), n.read(this, t, !0, 23, 4); - }), - (h.prototype.readFloatBE = function (t, e) { - return e || P(t, 4, this.length), n.read(this, t, !1, 23, 4); - }), - (h.prototype.readDoubleLE = function (t, e) { - return e || P(t, 8, this.length), n.read(this, t, !0, 52, 8); - }), - (h.prototype.readDoubleBE = function (t, e) { - return e || P(t, 8, this.length), n.read(this, t, !1, 52, 8); - }), - (h.prototype.writeUIntLE = function (t, e, r, i) { - (t = +t), (e |= 0), (r |= 0), i || O(this, t, e, r, Math.pow(2, 8 * r) - 1, 0); - var n = 1, - o = 0; - for (this[e] = 255 & t; ++o < r && (n *= 256); ) this[e + o] = (t / n) & 255; - return e + r; - }), - (h.prototype.writeUIntBE = function (t, e, r, i) { - (t = +t), (e |= 0), (r |= 0), i || O(this, t, e, r, Math.pow(2, 8 * r) - 1, 0); - var n = r - 1, - o = 1; - for (this[e + n] = 255 & t; --n >= 0 && (o *= 256); ) this[e + n] = (t / o) & 255; - return e + r; - }), - (h.prototype.writeUInt8 = function (t, e, r) { - return ( - (t = +t), (e |= 0), r || O(this, t, e, 1, 255, 0), h.TYPED_ARRAY_SUPPORT || (t = Math.floor(t)), (this[e] = 255 & t), e + 1 - ); - }), - (h.prototype.writeUInt16LE = function (t, e, r) { - return ( - (t = +t), - (e |= 0), - r || O(this, t, e, 2, 65535, 0), - h.TYPED_ARRAY_SUPPORT ? ((this[e] = 255 & t), (this[e + 1] = t >>> 8)) : L(this, t, e, !0), - e + 2 - ); - }), - (h.prototype.writeUInt16BE = function (t, e, r) { - return ( - (t = +t), - (e |= 0), - r || O(this, t, e, 2, 65535, 0), - h.TYPED_ARRAY_SUPPORT ? ((this[e] = t >>> 8), (this[e + 1] = 255 & t)) : L(this, t, e, !1), - e + 2 - ); - }), - (h.prototype.writeUInt32LE = function (t, e, r) { - return ( - (t = +t), - (e |= 0), - r || O(this, t, e, 4, 4294967295, 0), - h.TYPED_ARRAY_SUPPORT - ? ((this[e + 3] = t >>> 24), (this[e + 2] = t >>> 16), (this[e + 1] = t >>> 8), (this[e] = 255 & t)) - : C(this, t, e, !0), - e + 4 - ); - }), - (h.prototype.writeUInt32BE = function (t, e, r) { - return ( - (t = +t), - (e |= 0), - r || O(this, t, e, 4, 4294967295, 0), - h.TYPED_ARRAY_SUPPORT - ? ((this[e] = t >>> 24), (this[e + 1] = t >>> 16), (this[e + 2] = t >>> 8), (this[e + 3] = 255 & t)) - : C(this, t, e, !1), - e + 4 - ); - }), - (h.prototype.writeIntLE = function (t, e, r, i) { - if (((t = +t), (e |= 0), !i)) { - var n = Math.pow(2, 8 * r - 1); - O(this, t, e, r, n - 1, -n); - } - var o = 0, - s = 1, - a = 0; - for (this[e] = 255 & t; ++o < r && (s *= 256); ) - t < 0 && 0 === a && 0 !== this[e + o - 1] && (a = 1), (this[e + o] = (((t / s) >> 0) - a) & 255); - return e + r; - }), - (h.prototype.writeIntBE = function (t, e, r, i) { - if (((t = +t), (e |= 0), !i)) { - var n = Math.pow(2, 8 * r - 1); - O(this, t, e, r, n - 1, -n); - } - var o = r - 1, - s = 1, - a = 0; - for (this[e + o] = 255 & t; --o >= 0 && (s *= 256); ) - t < 0 && 0 === a && 0 !== this[e + o + 1] && (a = 1), (this[e + o] = (((t / s) >> 0) - a) & 255); - return e + r; - }), - (h.prototype.writeInt8 = function (t, e, r) { - return ( - (t = +t), - (e |= 0), - r || O(this, t, e, 1, 127, -128), - h.TYPED_ARRAY_SUPPORT || (t = Math.floor(t)), - t < 0 && (t = 255 + t + 1), - (this[e] = 255 & t), - e + 1 - ); - }), - (h.prototype.writeInt16LE = function (t, e, r) { - return ( - (t = +t), - (e |= 0), - r || O(this, t, e, 2, 32767, -32768), - h.TYPED_ARRAY_SUPPORT ? ((this[e] = 255 & t), (this[e + 1] = t >>> 8)) : L(this, t, e, !0), - e + 2 - ); - }), - (h.prototype.writeInt16BE = function (t, e, r) { - return ( - (t = +t), - (e |= 0), - r || O(this, t, e, 2, 32767, -32768), - h.TYPED_ARRAY_SUPPORT ? ((this[e] = t >>> 8), (this[e + 1] = 255 & t)) : L(this, t, e, !1), - e + 2 - ); - }), - (h.prototype.writeInt32LE = function (t, e, r) { - return ( - (t = +t), - (e |= 0), - r || O(this, t, e, 4, 2147483647, -2147483648), - h.TYPED_ARRAY_SUPPORT - ? ((this[e] = 255 & t), (this[e + 1] = t >>> 8), (this[e + 2] = t >>> 16), (this[e + 3] = t >>> 24)) - : C(this, t, e, !0), - e + 4 - ); - }), - (h.prototype.writeInt32BE = function (t, e, r) { - return ( - (t = +t), - (e |= 0), - r || O(this, t, e, 4, 2147483647, -2147483648), - t < 0 && (t = 4294967295 + t + 1), - h.TYPED_ARRAY_SUPPORT - ? ((this[e] = t >>> 24), (this[e + 1] = t >>> 16), (this[e + 2] = t >>> 8), (this[e + 3] = 255 & t)) - : C(this, t, e, !1), - e + 4 - ); - }), - (h.prototype.writeFloatLE = function (t, e, r) { - return j(this, t, e, !0, r); - }), - (h.prototype.writeFloatBE = function (t, e, r) { - return j(this, t, e, !1, r); - }), - (h.prototype.writeDoubleLE = function (t, e, r) { - return U(this, t, e, !0, r); - }), - (h.prototype.writeDoubleBE = function (t, e, r) { - return U(this, t, e, !1, r); - }), - (h.prototype.copy = function (t, e, r, i) { - if ( - (r || (r = 0), - i || 0 === i || (i = this.length), - e >= t.length && (e = t.length), - e || (e = 0), - i > 0 && i < r && (i = r), - i === r) - ) - return 0; - if (0 === t.length || 0 === this.length) return 0; - if (e < 0) throw new RangeError('targetStart out of bounds'); - if (r < 0 || r >= this.length) throw new RangeError('sourceStart out of bounds'); - if (i < 0) throw new RangeError('sourceEnd out of bounds'); - i > this.length && (i = this.length), t.length - e < i - r && (i = t.length - e + r); - var n, - o = i - r; - if (this === t && r < e && e < i) for (n = o - 1; n >= 0; --n) t[n + e] = this[n + r]; - else if (o < 1e3 || !h.TYPED_ARRAY_SUPPORT) for (n = 0; n < o; ++n) t[n + e] = this[n + r]; - else Uint8Array.prototype.set.call(t, this.subarray(r, r + o), e); - return o; - }), - (h.prototype.fill = function (t, e, r, i) { - if ('string' == typeof t) { - if ( - ('string' == typeof e ? ((i = e), (e = 0), (r = this.length)) : 'string' == typeof r && ((i = r), (r = this.length)), - 1 === t.length) - ) { - var n = t.charCodeAt(0); - n < 256 && (t = n); - } - if (void 0 !== i && 'string' != typeof i) throw new TypeError('encoding must be a string'); - if ('string' == typeof i && !h.isEncoding(i)) throw new TypeError('Unknown encoding: ' + i); - } else 'number' == typeof t && (t &= 255); - if (e < 0 || this.length < e || this.length < r) throw new RangeError('Out of range index'); - if (r <= e) return this; - var o; - if (((e >>>= 0), (r = void 0 === r ? this.length : r >>> 0), t || (t = 0), 'number' == typeof t)) - for (o = e; o < r; ++o) this[o] = t; - else { - var s = h.isBuffer(t) ? t : z(new h(t, i).toString()), - a = s.length; - for (o = 0; o < r - e; ++o) this[o + e] = s[o % a]; - } - return this; - }); - var D = /[^+\/0-9A-Za-z-_]/g; - function z(t, e) { - var r; - e = e || 1 / 0; - for (var i = t.length, n = null, o = [], s = 0; s < i; ++s) { - if ((r = t.charCodeAt(s)) > 55295 && r < 57344) { - if (!n) { - if (r > 56319) { - (e -= 3) > -1 && o.push(239, 191, 189); - continue; - } - if (s + 1 === i) { - (e -= 3) > -1 && o.push(239, 191, 189); - continue; - } - n = r; - continue; - } - if (r < 56320) { - (e -= 3) > -1 && o.push(239, 191, 189), (n = r); - continue; - } - r = 65536 + (((n - 55296) << 10) | (r - 56320)); - } else n && (e -= 3) > -1 && o.push(239, 191, 189); - if (((n = null), r < 128)) { - if ((e -= 1) < 0) break; - o.push(r); - } else if (r < 2048) { - if ((e -= 2) < 0) break; - o.push((r >> 6) | 192, (63 & r) | 128); - } else if (r < 65536) { - if ((e -= 3) < 0) break; - o.push((r >> 12) | 224, ((r >> 6) & 63) | 128, (63 & r) | 128); - } else { - if (!(r < 1114112)) throw new Error('Invalid code point'); - if ((e -= 4) < 0) break; - o.push((r >> 18) | 240, ((r >> 12) & 63) | 128, ((r >> 6) & 63) | 128, (63 & r) | 128); - } - } - return o; - } - function F(t) { - return i.toByteArray( - (function (t) { - if ( - (t = (function (t) { - return t.trim ? t.trim() : t.replace(/^\s+|\s+$/g, ''); - })(t).replace(D, '')).length < 2 - ) - return ''; - for (; t.length % 4 != 0; ) t += '='; - return t; - })(t) - ); - } - function q(t, e, r, i) { - for (var n = 0; n < i && !(n + r >= e.length || n >= t.length); ++n) e[n + r] = t[n]; - return n; - } - }, - 6497: (t, e, r) => { - function i(t) { - return Object.prototype.toString.call(t); - } - (e.isArray = function (t) { - return Array.isArray ? Array.isArray(t) : '[object Array]' === i(t); - }), - (e.isBoolean = function (t) { - return 'boolean' == typeof t; - }), - (e.isNull = function (t) { - return null === t; - }), - (e.isNullOrUndefined = function (t) { - return null == t; - }), - (e.isNumber = function (t) { - return 'number' == typeof t; - }), - (e.isString = function (t) { - return 'string' == typeof t; - }), - (e.isSymbol = function (t) { - return 'symbol' == typeof t; - }), - (e.isUndefined = function (t) { - return void 0 === t; - }), - (e.isRegExp = function (t) { - return '[object RegExp]' === i(t); - }), - (e.isObject = function (t) { - return 'object' == typeof t && null !== t; - }), - (e.isDate = function (t) { - return '[object Date]' === i(t); - }), - (e.isError = function (t) { - return '[object Error]' === i(t) || t instanceof Error; - }), - (e.isFunction = function (t) { - return 'function' == typeof t; - }), - (e.isPrimitive = function (t) { - return ( - null === t || 'boolean' == typeof t || 'number' == typeof t || 'string' == typeof t || 'symbol' == typeof t || void 0 === t - ); - }), - (e.isBuffer = r(8764).Buffer.isBuffer); - }, - 9435: t => { - var e = 1e3, - r = 60 * e, - i = 60 * r, - n = 24 * i; - function o(t, e, r, i) { - var n = e >= 1.5 * r; - return Math.round(t / r) + ' ' + i + (n ? 's' : ''); - } - t.exports = function (t, s) { - s = s || {}; - var a, - h, - u = typeof t; - if ('string' === u && t.length > 0) - return (function (t) { - if (!((t = String(t)).length > 100)) { - var o = - /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec( - t - ); - if (o) { - var s = parseFloat(o[1]); - switch ((o[2] || 'ms').toLowerCase()) { - case 'years': - case 'year': - case 'yrs': - case 'yr': - case 'y': - return 315576e5 * s; - case 'weeks': - case 'week': - case 'w': - return 6048e5 * s; - case 'days': - case 'day': - case 'd': - return s * n; - case 'hours': - case 'hour': - case 'hrs': - case 'hr': - case 'h': - return s * i; - case 'minutes': - case 'minute': - case 'mins': - case 'min': - case 'm': - return s * r; - case 'seconds': - case 'second': - case 'secs': - case 'sec': - case 's': - return s * e; - case 'milliseconds': - case 'millisecond': - case 'msecs': - case 'msec': - case 'ms': - return s; - default: - return; - } - } - } - })(t); - if ('number' === u && isFinite(t)) - return s.long - ? ((a = t), - (h = Math.abs(a)) >= n - ? o(a, h, n, 'day') - : h >= i - ? o(a, h, i, 'hour') - : h >= r - ? o(a, h, r, 'minute') - : h >= e - ? o(a, h, e, 'second') - : a + ' ms') - : (function (t) { - var o = Math.abs(t); - return o >= n - ? Math.round(t / n) + 'd' - : o >= i - ? Math.round(t / i) + 'h' - : o >= r - ? Math.round(t / r) + 'm' - : o >= e - ? Math.round(t / e) + 's' - : t + 'ms'; - })(t); - throw new Error('val is not a non-empty string or a valid number. val=' + JSON.stringify(t)); - }; - }, - 1227: (t, e, r) => { - (e.formatArgs = function (e) { - if ( - ((e[0] = - (this.useColors ? '%c' : '') + - this.namespace + - (this.useColors ? ' %c' : ' ') + - e[0] + - (this.useColors ? '%c ' : ' ') + - '+' + - t.exports.humanize(this.diff)), - !this.useColors) - ) - return; - const r = 'color: ' + this.color; - e.splice(1, 0, r, 'color: inherit'); - let i = 0, - n = 0; - e[0].replace(/%[a-zA-Z%]/g, t => { - '%%' !== t && (i++, '%c' === t && (n = i)); - }), - e.splice(n, 0, r); - }), - (e.save = function (t) { - try { - t ? e.storage.setItem('debug', t) : e.storage.removeItem('debug'); - } catch (t) {} - }), - (e.load = function () { - let t; - try { - t = e.storage.getItem('debug'); - } catch (t) {} - return !t && 'undefined' != typeof process && 'env' in process && (t = process.env.DEBUG), t; - }), - (e.useColors = function () { - return ( - !('undefined' == typeof window || !window.process || ('renderer' !== window.process.type && !window.process.__nwjs)) || - (('undefined' == typeof navigator || - !navigator.userAgent || - !navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) && - (('undefined' != typeof document && - document.documentElement && - document.documentElement.style && - document.documentElement.style.WebkitAppearance) || - ('undefined' != typeof window && - window.console && - (window.console.firebug || (window.console.exception && window.console.table))) || - ('undefined' != typeof navigator && - navigator.userAgent && - navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && - parseInt(RegExp.$1, 10) >= 31) || - ('undefined' != typeof navigator && - navigator.userAgent && - navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)))) - ); - }), - (e.storage = (function () { - try { - return localStorage; - } catch (t) {} - })()), - (e.destroy = (() => { - let t = !1; - return () => { - t || - ((t = !0), - console.warn( - 'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.' - )); - }; - })()), - (e.colors = [ - '#0000CC', - '#0000FF', - '#0033CC', - '#0033FF', - '#0066CC', - '#0066FF', - '#0099CC', - '#0099FF', - '#00CC00', - '#00CC33', - '#00CC66', - '#00CC99', - '#00CCCC', - '#00CCFF', - '#3300CC', - '#3300FF', - '#3333CC', - '#3333FF', - '#3366CC', - '#3366FF', - '#3399CC', - '#3399FF', - '#33CC00', - '#33CC33', - '#33CC66', - '#33CC99', - '#33CCCC', - '#33CCFF', - '#6600CC', - '#6600FF', - '#6633CC', - '#6633FF', - '#66CC00', - '#66CC33', - '#9900CC', - '#9900FF', - '#9933CC', - '#9933FF', - '#99CC00', - '#99CC33', - '#CC0000', - '#CC0033', - '#CC0066', - '#CC0099', - '#CC00CC', - '#CC00FF', - '#CC3300', - '#CC3333', - '#CC3366', - '#CC3399', - '#CC33CC', - '#CC33FF', - '#CC6600', - '#CC6633', - '#CC9900', - '#CC9933', - '#CCCC00', - '#CCCC33', - '#FF0000', - '#FF0033', - '#FF0066', - '#FF0099', - '#FF00CC', - '#FF00FF', - '#FF3300', - '#FF3333', - '#FF3366', - '#FF3399', - '#FF33CC', - '#FF33FF', - '#FF6600', - '#FF6633', - '#FF9900', - '#FF9933', - '#FFCC00', - '#FFCC33', - ]), - (e.log = console.debug || console.log || (() => {})), - (t.exports = r(2447)(e)); - const { formatters: i } = t.exports; - i.j = function (t) { - try { - return JSON.stringify(t); - } catch (t) { - return '[UnexpectedJSONParseError]: ' + t.message; - } - }; - }, - 2447: (t, e, r) => { - t.exports = function (t) { - function e(t) { - let r, - n, - o, - s = null; - function a(...t) { - if (!a.enabled) return; - const i = a, - n = Number(new Date()), - o = n - (r || n); - (i.diff = o), (i.prev = r), (i.curr = n), (r = n), (t[0] = e.coerce(t[0])), 'string' != typeof t[0] && t.unshift('%O'); - let s = 0; - (t[0] = t[0].replace(/%([a-zA-Z%])/g, (r, n) => { - if ('%%' === r) return '%'; - s++; - const o = e.formatters[n]; - if ('function' == typeof o) { - const e = t[s]; - (r = o.call(i, e)), t.splice(s, 1), s--; - } - return r; - })), - e.formatArgs.call(i, t), - (i.log || e.log).apply(i, t); - } - return ( - (a.namespace = t), - (a.useColors = e.useColors()), - (a.color = e.selectColor(t)), - (a.extend = i), - (a.destroy = e.destroy), - Object.defineProperty(a, 'enabled', { - enumerable: !0, - configurable: !1, - get: () => (null !== s ? s : (n !== e.namespaces && ((n = e.namespaces), (o = e.enabled(t))), o)), - set: t => { - s = t; - }, - }), - 'function' == typeof e.init && e.init(a), - a - ); - } - function i(t, r) { - const i = e(this.namespace + (void 0 === r ? ':' : r) + t); - return (i.log = this.log), i; - } - function n(t) { - return t - .toString() - .substring(2, t.toString().length - 2) - .replace(/\.\*\?$/, '*'); - } - return ( - (e.debug = e), - (e.default = e), - (e.coerce = function (t) { - return t instanceof Error ? t.stack || t.message : t; - }), - (e.disable = function () { - const t = [...e.names.map(n), ...e.skips.map(n).map(t => '-' + t)].join(','); - return e.enable(''), t; - }), - (e.enable = function (t) { - let r; - e.save(t), (e.namespaces = t), (e.names = []), (e.skips = []); - const i = ('string' == typeof t ? t : '').split(/[\s,]+/), - n = i.length; - for (r = 0; r < n; r++) - i[r] && - ('-' === (t = i[r].replace(/\*/g, '.*?'))[0] - ? e.skips.push(new RegExp('^' + t.slice(1) + '$')) - : e.names.push(new RegExp('^' + t + '$'))); - }), - (e.enabled = function (t) { - if ('*' === t[t.length - 1]) return !0; - let r, i; - for (r = 0, i = e.skips.length; r < i; r++) if (e.skips[r].test(t)) return !1; - for (r = 0, i = e.names.length; r < i; r++) if (e.names[r].test(t)) return !0; - return !1; - }), - (e.humanize = r(9435)), - (e.destroy = function () { - console.warn( - 'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.' - ); - }), - Object.keys(t).forEach(r => { - e[r] = t[r]; - }), - (e.names = []), - (e.skips = []), - (e.formatters = {}), - (e.selectColor = function (t) { - let r = 0; - for (let e = 0; e < t.length; e++) (r = (r << 5) - r + t.charCodeAt(e)), (r |= 0); - return e.colors[Math.abs(r) % e.colors.length]; - }), - e.enable(e.load()), - e - ); - }; - }, - 6729: t => { - 'use strict'; - var e = Object.prototype.hasOwnProperty, - r = '~'; - function i() {} - function n(t, e, r) { - (this.fn = t), (this.context = e), (this.once = r || !1); - } - function o(t, e, i, o, s) { - if ('function' != typeof i) throw new TypeError('The listener must be a function'); - var a = new n(i, o || t, s), - h = r ? r + e : e; - return ( - t._events[h] - ? t._events[h].fn - ? (t._events[h] = [t._events[h], a]) - : t._events[h].push(a) - : ((t._events[h] = a), t._eventsCount++), - t - ); - } - function s(t, e) { - 0 == --t._eventsCount ? (t._events = new i()) : delete t._events[e]; - } - function a() { - (this._events = new i()), (this._eventsCount = 0); - } - Object.create && ((i.prototype = Object.create(null)), new i().__proto__ || (r = !1)), - (a.prototype.eventNames = function () { - var t, - i, - n = []; - if (0 === this._eventsCount) return n; - for (i in (t = this._events)) e.call(t, i) && n.push(r ? i.slice(1) : i); - return Object.getOwnPropertySymbols ? n.concat(Object.getOwnPropertySymbols(t)) : n; - }), - (a.prototype.listeners = function (t) { - var e = r ? r + t : t, - i = this._events[e]; - if (!i) return []; - if (i.fn) return [i.fn]; - for (var n = 0, o = i.length, s = new Array(o); n < o; n++) s[n] = i[n].fn; - return s; - }), - (a.prototype.listenerCount = function (t) { - var e = r ? r + t : t, - i = this._events[e]; - return i ? (i.fn ? 1 : i.length) : 0; - }), - (a.prototype.emit = function (t, e, i, n, o, s) { - var a = r ? r + t : t; - if (!this._events[a]) return !1; - var h, - u, - f = this._events[a], - c = arguments.length; - if (f.fn) { - switch ((f.once && this.removeListener(t, f.fn, void 0, !0), c)) { - case 1: - return f.fn.call(f.context), !0; - case 2: - return f.fn.call(f.context, e), !0; - case 3: - return f.fn.call(f.context, e, i), !0; - case 4: - return f.fn.call(f.context, e, i, n), !0; - case 5: - return f.fn.call(f.context, e, i, n, o), !0; - case 6: - return f.fn.call(f.context, e, i, n, o, s), !0; - } - for (u = 1, h = new Array(c - 1); u < c; u++) h[u - 1] = arguments[u]; - f.fn.apply(f.context, h); - } else { - var l, - d = f.length; - for (u = 0; u < d; u++) - switch ((f[u].once && this.removeListener(t, f[u].fn, void 0, !0), c)) { - case 1: - f[u].fn.call(f[u].context); - break; - case 2: - f[u].fn.call(f[u].context, e); - break; - case 3: - f[u].fn.call(f[u].context, e, i); - break; - case 4: - f[u].fn.call(f[u].context, e, i, n); - break; - default: - if (!h) for (l = 1, h = new Array(c - 1); l < c; l++) h[l - 1] = arguments[l]; - f[u].fn.apply(f[u].context, h); - } - } - return !0; - }), - (a.prototype.on = function (t, e, r) { - return o(this, t, e, r, !1); - }), - (a.prototype.once = function (t, e, r) { - return o(this, t, e, r, !0); - }), - (a.prototype.removeListener = function (t, e, i, n) { - var o = r ? r + t : t; - if (!this._events[o]) return this; - if (!e) return s(this, o), this; - var a = this._events[o]; - if (a.fn) a.fn !== e || (n && !a.once) || (i && a.context !== i) || s(this, o); - else { - for (var h = 0, u = [], f = a.length; h < f; h++) - (a[h].fn !== e || (n && !a[h].once) || (i && a[h].context !== i)) && u.push(a[h]); - u.length ? (this._events[o] = 1 === u.length ? u[0] : u) : s(this, o); - } - return this; - }), - (a.prototype.removeAllListeners = function (t) { - var e; - return t ? ((e = r ? r + t : t), this._events[e] && s(this, e)) : ((this._events = new i()), (this._eventsCount = 0)), this; - }), - (a.prototype.off = a.prototype.removeListener), - (a.prototype.addListener = a.prototype.on), - (a.prefixed = r), - (a.EventEmitter = a), - (t.exports = a); - }, - 7187: t => { - 'use strict'; - var e, - r = 'object' == typeof Reflect ? Reflect : null, - i = - r && 'function' == typeof r.apply - ? r.apply - : function (t, e, r) { - return Function.prototype.apply.call(t, e, r); - }; - e = - r && 'function' == typeof r.ownKeys - ? r.ownKeys - : Object.getOwnPropertySymbols - ? function (t) { - return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t)); - } - : function (t) { - return Object.getOwnPropertyNames(t); - }; - var n = - Number.isNaN || - function (t) { - return t != t; - }; - function o() { - o.init.call(this); - } - (t.exports = o), - (t.exports.once = function (t, e) { - return new Promise(function (r, i) { - function n(r) { - t.removeListener(e, o), i(r); - } - function o() { - 'function' == typeof t.removeListener && t.removeListener('error', n), r([].slice.call(arguments)); - } - m(t, e, o, { once: !0 }), - 'error' !== e && - (function (t, e, r) { - 'function' == typeof t.on && m(t, 'error', e, { once: !0 }); - })(t, n); - }); - }), - (o.EventEmitter = o), - (o.prototype._events = void 0), - (o.prototype._eventsCount = 0), - (o.prototype._maxListeners = void 0); - var s = 10; - function a(t) { - if ('function' != typeof t) throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof t); - } - function h(t) { - return void 0 === t._maxListeners ? o.defaultMaxListeners : t._maxListeners; - } - function u(t, e, r, i) { - var n, o, s, u; - if ( - (a(r), - void 0 === (o = t._events) - ? ((o = t._events = Object.create(null)), (t._eventsCount = 0)) - : (void 0 !== o.newListener && (t.emit('newListener', e, r.listener ? r.listener : r), (o = t._events)), (s = o[e])), - void 0 === s) - ) - (s = o[e] = r), ++t._eventsCount; - else if ( - ('function' == typeof s ? (s = o[e] = i ? [r, s] : [s, r]) : i ? s.unshift(r) : s.push(r), - (n = h(t)) > 0 && s.length > n && !s.warned) - ) { - s.warned = !0; - var f = new Error( - 'Possible EventEmitter memory leak detected. ' + - s.length + - ' ' + - String(e) + - ' listeners added. Use emitter.setMaxListeners() to increase limit' - ); - (f.name = 'MaxListenersExceededWarning'), - (f.emitter = t), - (f.type = e), - (f.count = s.length), - (u = f), - console && console.warn && console.warn(u); - } - return t; - } - function f() { - if (!this.fired) - return ( - this.target.removeListener(this.type, this.wrapFn), - (this.fired = !0), - 0 === arguments.length ? this.listener.call(this.target) : this.listener.apply(this.target, arguments) - ); - } - function c(t, e, r) { - var i = { fired: !1, wrapFn: void 0, target: t, type: e, listener: r }, - n = f.bind(i); - return (n.listener = r), (i.wrapFn = n), n; - } - function l(t, e, r) { - var i = t._events; - if (void 0 === i) return []; - var n = i[e]; - return void 0 === n - ? [] - : 'function' == typeof n - ? r - ? [n.listener || n] - : [n] - : r - ? (function (t) { - for (var e = new Array(t.length), r = 0; r < e.length; ++r) e[r] = t[r].listener || t[r]; - return e; - })(n) - : p(n, n.length); - } - function d(t) { - var e = this._events; - if (void 0 !== e) { - var r = e[t]; - if ('function' == typeof r) return 1; - if (void 0 !== r) return r.length; - } - return 0; - } - function p(t, e) { - for (var r = new Array(e), i = 0; i < e; ++i) r[i] = t[i]; - return r; - } - function m(t, e, r, i) { - if ('function' == typeof t.on) i.once ? t.once(e, r) : t.on(e, r); - else { - if ('function' != typeof t.addEventListener) - throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof t); - t.addEventListener(e, function n(o) { - i.once && t.removeEventListener(e, n), r(o); - }); - } - } - Object.defineProperty(o, 'defaultMaxListeners', { - enumerable: !0, - get: function () { - return s; - }, - set: function (t) { - if ('number' != typeof t || t < 0 || n(t)) - throw new RangeError( - 'The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + t + '.' - ); - s = t; - }, - }), - (o.init = function () { - (void 0 !== this._events && this._events !== Object.getPrototypeOf(this)._events) || - ((this._events = Object.create(null)), (this._eventsCount = 0)), - (this._maxListeners = this._maxListeners || void 0); - }), - (o.prototype.setMaxListeners = function (t) { - if ('number' != typeof t || t < 0 || n(t)) - throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + t + '.'); - return (this._maxListeners = t), this; - }), - (o.prototype.getMaxListeners = function () { - return h(this); - }), - (o.prototype.emit = function (t) { - for (var e = [], r = 1; r < arguments.length; r++) e.push(arguments[r]); - var n = 'error' === t, - o = this._events; - if (void 0 !== o) n = n && void 0 === o.error; - else if (!n) return !1; - if (n) { - var s; - if ((e.length > 0 && (s = e[0]), s instanceof Error)) throw s; - var a = new Error('Unhandled error.' + (s ? ' (' + s.message + ')' : '')); - throw ((a.context = s), a); - } - var h = o[t]; - if (void 0 === h) return !1; - if ('function' == typeof h) i(h, this, e); - else { - var u = h.length, - f = p(h, u); - for (r = 0; r < u; ++r) i(f[r], this, e); - } - return !0; - }), - (o.prototype.addListener = function (t, e) { - return u(this, t, e, !1); - }), - (o.prototype.on = o.prototype.addListener), - (o.prototype.prependListener = function (t, e) { - return u(this, t, e, !0); - }), - (o.prototype.once = function (t, e) { - return a(e), this.on(t, c(this, t, e)), this; - }), - (o.prototype.prependOnceListener = function (t, e) { - return a(e), this.prependListener(t, c(this, t, e)), this; - }), - (o.prototype.removeListener = function (t, e) { - var r, i, n, o, s; - if ((a(e), void 0 === (i = this._events))) return this; - if (void 0 === (r = i[t])) return this; - if (r === e || r.listener === e) - 0 == --this._eventsCount - ? (this._events = Object.create(null)) - : (delete i[t], i.removeListener && this.emit('removeListener', t, r.listener || e)); - else if ('function' != typeof r) { - for (n = -1, o = r.length - 1; o >= 0; o--) - if (r[o] === e || r[o].listener === e) { - (s = r[o].listener), (n = o); - break; - } - if (n < 0) return this; - 0 === n - ? r.shift() - : (function (t, e) { - for (; e + 1 < t.length; e++) t[e] = t[e + 1]; - t.pop(); - })(r, n), - 1 === r.length && (i[t] = r[0]), - void 0 !== i.removeListener && this.emit('removeListener', t, s || e); - } - return this; - }), - (o.prototype.off = o.prototype.removeListener), - (o.prototype.removeAllListeners = function (t) { - var e, r, i; - if (void 0 === (r = this._events)) return this; - if (void 0 === r.removeListener) - return ( - 0 === arguments.length - ? ((this._events = Object.create(null)), (this._eventsCount = 0)) - : void 0 !== r[t] && (0 == --this._eventsCount ? (this._events = Object.create(null)) : delete r[t]), - this - ); - if (0 === arguments.length) { - var n, - o = Object.keys(r); - for (i = 0; i < o.length; ++i) 'removeListener' !== (n = o[i]) && this.removeAllListeners(n); - return this.removeAllListeners('removeListener'), (this._events = Object.create(null)), (this._eventsCount = 0), this; - } - if ('function' == typeof (e = r[t])) this.removeListener(t, e); - else if (void 0 !== e) for (i = e.length - 1; i >= 0; i--) this.removeListener(t, e[i]); - return this; - }), - (o.prototype.listeners = function (t) { - return l(this, t, !0); - }), - (o.prototype.rawListeners = function (t) { - return l(this, t, !1); - }), - (o.listenerCount = function (t, e) { - return 'function' == typeof t.listenerCount ? t.listenerCount(e) : d.call(t, e); - }), - (o.prototype.listenerCount = d), - (o.prototype.eventNames = function () { - return this._eventsCount > 0 ? e(this._events) : []; - }); - }, - 9267: (t, e, r) => { - var i = r(9899), - n = t.exports; - for (var o in i) i.hasOwnProperty(o) && (n[o] = i[o]); - n.request = function (t, e) { - return t || (t = {}), (t.scheme = 'https'), (t.protocol = 'https:'), i.request.call(this, t, e); - }; - }, - 645: (t, e) => { - (e.read = function (t, e, r, i, n) { - var o, - s, - a = 8 * n - i - 1, - h = (1 << a) - 1, - u = h >> 1, - f = -7, - c = r ? n - 1 : 0, - l = r ? -1 : 1, - d = t[e + c]; - for (c += l, o = d & ((1 << -f) - 1), d >>= -f, f += a; f > 0; o = 256 * o + t[e + c], c += l, f -= 8); - for (s = o & ((1 << -f) - 1), o >>= -f, f += i; f > 0; s = 256 * s + t[e + c], c += l, f -= 8); - if (0 === o) o = 1 - u; - else { - if (o === h) return s ? NaN : (1 / 0) * (d ? -1 : 1); - (s += Math.pow(2, i)), (o -= u); - } - return (d ? -1 : 1) * s * Math.pow(2, o - i); - }), - (e.write = function (t, e, r, i, n, o) { - var s, - a, - h, - u = 8 * o - n - 1, - f = (1 << u) - 1, - c = f >> 1, - l = 23 === n ? Math.pow(2, -24) - Math.pow(2, -77) : 0, - d = i ? 0 : o - 1, - p = i ? 1 : -1, - m = e < 0 || (0 === e && 1 / e < 0) ? 1 : 0; - for ( - e = Math.abs(e), - isNaN(e) || e === 1 / 0 - ? ((a = isNaN(e) ? 1 : 0), (s = f)) - : ((s = Math.floor(Math.log(e) / Math.LN2)), - e * (h = Math.pow(2, -s)) < 1 && (s--, (h *= 2)), - (e += s + c >= 1 ? l / h : l * Math.pow(2, 1 - c)) * h >= 2 && (s++, (h /= 2)), - s + c >= f - ? ((a = 0), (s = f)) - : s + c >= 1 - ? ((a = (e * h - 1) * Math.pow(2, n)), (s += c)) - : ((a = e * Math.pow(2, c - 1) * Math.pow(2, n)), (s = 0))); - n >= 8; - t[r + d] = 255 & a, d += p, a /= 256, n -= 8 - ); - for (s = (s << n) | a, u += n; u > 0; t[r + d] = 255 & s, d += p, s /= 256, u -= 8); - t[r + d - p] |= 128 * m; - }); - }, - 5717: t => { - 'function' == typeof Object.create - ? (t.exports = function (t, e) { - e && - ((t.super_ = e), - (t.prototype = Object.create(e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } }))); - }) - : (t.exports = function (t, e) { - if (e) { - t.super_ = e; - var r = function () {}; - (r.prototype = e.prototype), (t.prototype = new r()), (t.prototype.constructor = t); - } - }); - }, - 5826: t => { - var e = {}.toString; - t.exports = - Array.isArray || - function (t) { - return '[object Array]' == e.call(t); - }; - }, - 4898: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), (e.InvalidStatusCodeError = e.InvalidCertError = void 0); - const i = Object.freeze({ - redirect: !0, - expectStatusCode: 200, - headers: {}, - full: !1, - keepAlive: !0, - cors: !1, - referrer: !1, - sslAllowSelfSigned: !1, - _redirectCount: 0, - }); - class n extends Error { - constructor(t, e) { - super(t), (this.fingerprint256 = e); - } - } - e.InvalidCertError = n; - class o extends Error { - constructor(t) { - super(`Request Failed. Status Code: ${t}`), (this.statusCode = t); - } - } - function s(t, e) { - if (!e || 'text' === e || 'json' === e) - try { - let r = new TextDecoder('utf8', { fatal: !0 }).decode(t); - if ('text' === e) return r; - try { - return JSON.parse(r); - } catch (t) { - if ('json' === e) throw t; - return r; - } - } catch (t) { - if ('text' === e || 'json' === e) throw t; - } - return t; - } - e.InvalidStatusCodeError = o; - let a = {}; - function h(t, e) { - let u = { ...i, ...e }; - const f = r(9899), - c = r(9267), - l = r(9173), - { promisify: d } = r(9539), - { resolve: p } = r(8575), - m = !!/^https/.test(t); - let g = { method: u.method || 'GET', headers: { 'Accept-Encoding': 'gzip, deflate, br' } }; - const b = t => t.replace(/:| /g, '').toLowerCase(); - if (u.keepAlive) { - const t = { keepAlive: !0, keepAliveMsecs: 3e4, maxFreeSockets: 1024, maxCachedSessions: 1024 }, - e = [m, m && u.sslPinnedCertificates?.map(t => b(t)).sort()].join(); - g.agent = a[e] || (a[e] = new (m ? c : f).Agent(t)); - } - return ( - 'json' === u.type && (g.headers['Content-Type'] = 'application/json'), - u.data && (u.method || (g.method = 'POST'), (g.body = 'json' === u.type ? JSON.stringify(u.data) : u.data)), - (g.headers = { ...g.headers, ...u.headers }), - u.sslAllowSelfSigned && (g.rejectUnauthorized = !1), - new Promise((e, r) => { - const i = async e => { - if (e && 'DEPTH_ZERO_SELF_SIGNED_CERT' === e.code) - try { - await h(t, { ...u, sslAllowSelfSigned: !0, sslPinnedCertificates: [] }); - } catch (t) { - t && t.fingerprint256 && (e = new n(`Self-signed SSL certificate: ${t.fingerprint256}`, t.fingerprint256)); - } - r(e); - }, - a = (m ? c : f).request(t, g, n => { - n.on('error', i), - (async () => { - try { - e( - await (async e => { - const r = e.statusCode; - if (u.redirect && 300 <= r && r < 400 && e.headers.location) { - if (10 == u._redirectCount) throw new Error('Request failed. Too much redirects.'); - return (u._redirectCount += 1), await h(p(t, e.headers.location), u); - } - if (u.expectStatusCode && r !== u.expectStatusCode) throw (e.resume(), new o(r)); - let i = []; - for await (const t of e) i.push(t); - let n = Buffer.concat(i); - const a = e.headers['content-encoding']; - 'br' === a && (n = await d(l.brotliDecompress)(n)), - ('gzip' !== a && 'deflate' !== a) || (n = await d(l.unzip)(n)); - const f = s(n, u.type); - return u.full ? { headers: e.headers, status: r, body: f } : f; - })(n) - ); - } catch (t) { - r(t); - } - })(); - }); - a.on('error', i); - const y = u.sslPinnedCertificates?.map(t => b(t)), - v = t => { - const e = b(t.getPeerCertificate()?.fingerprint256 || ''); - if ((e || !t.isSessionReused()) && !y.includes(e)) - return a.emit('error', new n(`Invalid SSL certificate: ${e} Expected: ${y}`, e)), a.abort(); - }; - u.sslPinnedCertificates && - a.on('socket', t => { - t - .listeners('secureConnect') - .map(t => (t.name || '').replace('bound ', '')) - .includes('mfetchSecureConnect') || t.on('secureConnect', v.bind(null, t)); - }), - u.keepAlive && a.setNoDelay(!0), - g.body && a.write(g.body), - a.end(); - }) - ); - } - const u = new Set(['Accept', 'Accept-Language', 'Content-Language', 'Content-Type'].map(t => t.toLowerCase())), - f = new Set( - [ - 'Accept-Charset', - 'Accept-Encoding', - 'Access-Control-Request-Headers', - 'Access-Control-Request-Method', - 'Connection', - 'Content-Length', - 'Cookie', - 'Cookie2', - 'Date', - 'DNT', - 'Expect', - 'Host', - 'Keep-Alive', - 'Origin', - 'Referer', - 'TE', - 'Trailer', - 'Transfer-Encoding', - 'Upgrade', - 'Via', - ].map(t => t.toLowerCase()) - ); - async function c(t, e) { - let r = { ...i, ...e }; - const n = new Headers(); - 'json' === r.type && n.set('Content-Type', 'application/json'); - let a = new URL(t); - if (a.username) { - const t = btoa(`${a.username}:${a.password}`); - n.set('Authorization', `Basic ${t}`), (a.username = ''), (a.password = ''); - } - t = '' + a; - for (let t in r.headers) { - const e = t.toLowerCase(); - (u.has(e) || (r.cors && !f.has(e))) && n.set(t, r.headers[t]); - } - let h = { headers: n, redirect: r.redirect ? 'follow' : 'manual' }; - r.referrer || (h.referrerPolicy = 'no-referrer'), - r.cors && (h.mode = 'cors'), - r.data && (r.method || (h.method = 'POST'), (h.body = 'json' === r.type ? JSON.stringify(r.data) : r.data)); - const c = await fetch(t, h); - if (r.expectStatusCode && c.status !== r.expectStatusCode) throw new o(c.status); - const l = s(new Uint8Array(await c.arrayBuffer()), r.type); - return r.full ? { headers: Object.fromEntries(c.headers.entries()), status: c.status, body: l } : l; - } - const l = !!('object' == typeof process && process.versions && process.versions.node && process.versions.v8); - e.default = function (t, e) { - return (l ? h : c)(t, e); - }; - }, - 7418: t => { - 'use strict'; - var e = Object.getOwnPropertySymbols, - r = Object.prototype.hasOwnProperty, - i = Object.prototype.propertyIsEnumerable; - t.exports = (function () { - try { - if (!Object.assign) return !1; - var t = new String('abc'); - if (((t[5] = 'de'), '5' === Object.getOwnPropertyNames(t)[0])) return !1; - for (var e = {}, r = 0; r < 10; r++) e['_' + String.fromCharCode(r)] = r; - if ( - '0123456789' !== - Object.getOwnPropertyNames(e) - .map(function (t) { - return e[t]; - }) - .join('') - ) - return !1; - var i = {}; - return ( - 'abcdefghijklmnopqrst'.split('').forEach(function (t) { - i[t] = t; - }), - 'abcdefghijklmnopqrst' === Object.keys(Object.assign({}, i)).join('') - ); - } catch (t) { - return !1; - } - })() - ? Object.assign - : function (t, n) { - for ( - var o, - s, - a = (function (t) { - if (null == t) throw new TypeError('Object.assign cannot be called with null or undefined'); - return Object(t); - })(t), - h = 1; - h < arguments.length; - h++ - ) { - for (var u in (o = Object(arguments[h]))) r.call(o, u) && (a[u] = o[u]); - if (e) { - s = e(o); - for (var f = 0; f < s.length; f++) i.call(o, s[f]) && (a[s[f]] = o[s[f]]); - } - } - return a; - }; - }, - 905: (t, e, r) => { - 'use strict'; - const { ErrorWithCause: i } = r(5409), - { findCauseByReference: n, getErrorCause: o, messageWithCauses: s, stackWithCauses: a } = r(8920); - t.exports = { ErrorWithCause: i, findCauseByReference: n, getErrorCause: o, stackWithCauses: a, messageWithCauses: s }; - }, - 5409: t => { - 'use strict'; - class e extends Error { - constructor(t, { cause: r } = {}) { - super(t), (this.name = e.name), r && (this.cause = r), (this.message = t); - } - } - t.exports = { ErrorWithCause: e }; - }, - 8920: t => { - 'use strict'; - const e = t => { - if (t && 'object' == typeof t && 'cause' in t) { - if ('function' == typeof t.cause) { - const e = t.cause(); - return e instanceof Error ? e : void 0; - } - return t.cause instanceof Error ? t.cause : void 0; - } - }, - r = (t, i) => { - if (!(t instanceof Error)) return ''; - const n = t.stack || ''; - if (i.has(t)) return n + '\ncauses have become circular...'; - const o = e(t); - return o ? (i.add(t), n + '\ncaused by: ' + r(o, i)) : n; - }, - i = (t, r, n) => { - if (!(t instanceof Error)) return ''; - const o = n ? '' : t.message || ''; - if (r.has(t)) return o + ': ...'; - const s = e(t); - if (s) { - r.add(t); - const e = 'cause' in t && 'function' == typeof t.cause; - return o + (e ? '' : ': ') + i(s, r, e); - } - return o; - }; - t.exports = { - findCauseByReference: (t, r) => { - if (!t || !r) return; - if (!(t instanceof Error)) return; - if (!(r.prototype instanceof Error) && r !== Error) return; - const i = new Set(); - let n = t; - for (; n && !i.has(n); ) { - if ((i.add(n), n instanceof r)) return n; - n = e(n); - } - }, - getErrorCause: e, - stackWithCauses: t => r(t, new Set()), - messageWithCauses: t => i(t, new Set()), - }; - }, - 9335: t => { - 'use strict'; - function e(t, e) { - return Object.prototype.hasOwnProperty.call(t, e); - } - t.exports = function (t, i, n, o) { - (i = i || '&'), (n = n || '='); - var s = {}; - if ('string' != typeof t || 0 === t.length) return s; - var a = /\+/g; - t = t.split(i); - var h = 1e3; - o && 'number' == typeof o.maxKeys && (h = o.maxKeys); - var u = t.length; - h > 0 && u > h && (u = h); - for (var f = 0; f < u; ++f) { - var c, - l, - d, - p, - m = t[f].replace(a, '%20'), - g = m.indexOf(n); - g >= 0 ? ((c = m.substr(0, g)), (l = m.substr(g + 1))) : ((c = m), (l = '')), - (d = decodeURIComponent(c)), - (p = decodeURIComponent(l)), - e(s, d) ? (r(s[d]) ? s[d].push(p) : (s[d] = [s[d], p])) : (s[d] = p); - } - return s; - }; - var r = - Array.isArray || - function (t) { - return '[object Array]' === Object.prototype.toString.call(t); - }; - }, - 8795: t => { - 'use strict'; - var e = function (t) { - switch (typeof t) { - case 'string': - return t; - case 'boolean': - return t ? 'true' : 'false'; - case 'number': - return isFinite(t) ? t : ''; - default: - return ''; - } - }; - t.exports = function (t, o, s, a) { - return ( - (o = o || '&'), - (s = s || '='), - null === t && (t = void 0), - 'object' == typeof t - ? i(n(t), function (n) { - var a = encodeURIComponent(e(n)) + s; - return r(t[n]) - ? i(t[n], function (t) { - return a + encodeURIComponent(e(t)); - }).join(o) - : a + encodeURIComponent(e(t[n])); - }).join(o) - : a - ? encodeURIComponent(e(a)) + s + encodeURIComponent(e(t)) - : '' - ); - }; - var r = - Array.isArray || - function (t) { - return '[object Array]' === Object.prototype.toString.call(t); - }; - function i(t, e) { - if (t.map) return t.map(e); - for (var r = [], i = 0; i < t.length; i++) r.push(e(t[i], i)); - return r; - } - var n = - Object.keys || - function (t) { - var e = []; - for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.push(r); - return e; - }; - }, - 7735: (t, e, r) => { - 'use strict'; - (e.decode = e.parse = r(9335)), (e.encode = e.stringify = r(8795)); - }, - 6666: (t, e, r) => { - t.exports = r(6753); - }, - 6753: (t, e, r) => { - t.exports = a; - var i = - Object.keys || - function (t) { - var e = []; - for (var r in t) e.push(r); - return e; - }, - n = r(6497); - n.inherits = r(5717); - var o = r(9481), - s = r(4229); - function a(t) { - if (!(this instanceof a)) return new a(t); - o.call(this, t), - s.call(this, t), - t && !1 === t.readable && (this.readable = !1), - t && !1 === t.writable && (this.writable = !1), - (this.allowHalfOpen = !0), - t && !1 === t.allowHalfOpen && (this.allowHalfOpen = !1), - this.once('end', h); - } - function h() { - this.allowHalfOpen || this._writableState.ended || process.nextTick(this.end.bind(this)); - } - n.inherits(a, o), - (function (t, e) { - for (var r = 0, i = t.length; r < i; r++) (n = t[r]), a.prototype[n] || (a.prototype[n] = s.prototype[n]); - var n; - })(i(s.prototype)); - }, - 2725: (t, e, r) => { - t.exports = o; - var i = r(4605), - n = r(6497); - function o(t) { - if (!(this instanceof o)) return new o(t); - i.call(this, t); - } - (n.inherits = r(5717)), - n.inherits(o, i), - (o.prototype._transform = function (t, e, r) { - r(null, t); - }); - }, - 9481: (t, e, r) => { - t.exports = c; - var i = r(5309), - n = r(8764).Buffer; - c.ReadableState = f; - var o = r(7187).EventEmitter; - o.listenerCount || - (o.listenerCount = function (t, e) { - return t.listeners(e).length; - }); - var s, - a = r(2830), - h = r(6497); - h.inherits = r(5717); - var u = r(9539); - function f(t, e) { - var i = r(6753), - n = (t = t || {}).highWaterMark, - o = t.objectMode ? 16 : 16384; - (this.highWaterMark = n || 0 === n ? n : o), - (this.highWaterMark = ~~this.highWaterMark), - (this.buffer = []), - (this.length = 0), - (this.pipes = null), - (this.pipesCount = 0), - (this.flowing = null), - (this.ended = !1), - (this.endEmitted = !1), - (this.reading = !1), - (this.sync = !0), - (this.needReadable = !1), - (this.emittedReadable = !1), - (this.readableListening = !1), - (this.objectMode = !!t.objectMode), - e instanceof i && (this.objectMode = this.objectMode || !!t.readableObjectMode), - (this.defaultEncoding = t.defaultEncoding || 'utf8'), - (this.ranOut = !1), - (this.awaitDrain = 0), - (this.readingMore = !1), - (this.decoder = null), - (this.encoding = null), - t.encoding && (s || (s = r(6941).s), (this.decoder = new s(t.encoding)), (this.encoding = t.encoding)); - } - function c(t) { - if ((r(6753), !(this instanceof c))) return new c(t); - (this._readableState = new f(t, this)), (this.readable = !0), a.call(this); - } - function l(t, e, r, i, n) { - var o = (function (t, e) { - var r = null; - return ( - h.isBuffer(e) || - h.isString(e) || - h.isNullOrUndefined(e) || - t.objectMode || - (r = new TypeError('Invalid non-string/buffer chunk')), - r - ); - })(e, r); - if (o) t.emit('error', o); - else if (h.isNullOrUndefined(r)) - (e.reading = !1), - e.ended || - (function (t, e) { - if (e.decoder && !e.ended) { - var r = e.decoder.end(); - r && r.length && (e.buffer.push(r), (e.length += e.objectMode ? 1 : r.length)); - } - (e.ended = !0), m(t); - })(t, e); - else if (e.objectMode || (r && r.length > 0)) - if (e.ended && !n) { - var s = new Error('stream.push() after EOF'); - t.emit('error', s); - } else - e.endEmitted && n - ? ((s = new Error('stream.unshift() after end event')), t.emit('error', s)) - : (!e.decoder || n || i || (r = e.decoder.write(r)), - n || (e.reading = !1), - e.flowing && 0 === e.length && !e.sync - ? (t.emit('data', r), t.read(0)) - : ((e.length += e.objectMode ? 1 : r.length), n ? e.buffer.unshift(r) : e.buffer.push(r), e.needReadable && m(t)), - (function (t, e) { - e.readingMore || - ((e.readingMore = !0), - process.nextTick(function () { - !(function (t, e) { - for ( - var r = e.length; - !e.reading && - !e.flowing && - !e.ended && - e.length < e.highWaterMark && - (u('maybeReadMore read 0'), t.read(0), r !== e.length); - - ) - r = e.length; - e.readingMore = !1; - })(t, e); - })); - })(t, e)); - else n || (e.reading = !1); - return (function (t) { - return !t.ended && (t.needReadable || t.length < t.highWaterMark || 0 === t.length); - })(e); - } - (u = u && u.debuglog ? u.debuglog('stream') : function () {}), - h.inherits(c, a), - (c.prototype.push = function (t, e) { - var r = this._readableState; - return ( - h.isString(t) && !r.objectMode && (e = e || r.defaultEncoding) !== r.encoding && ((t = new n(t, e)), (e = '')), - l(this, r, t, e, !1) - ); - }), - (c.prototype.unshift = function (t) { - return l(this, this._readableState, t, '', !0); - }), - (c.prototype.setEncoding = function (t) { - return s || (s = r(6941).s), (this._readableState.decoder = new s(t)), (this._readableState.encoding = t), this; - }); - var d = 8388608; - function p(t, e) { - return 0 === e.length && e.ended - ? 0 - : e.objectMode - ? 0 === t - ? 0 - : 1 - : isNaN(t) || h.isNull(t) - ? e.flowing && e.buffer.length - ? e.buffer[0].length - : e.length - : t <= 0 - ? 0 - : (t > e.highWaterMark && - (e.highWaterMark = (function (t) { - if (t >= d) t = d; - else { - t--; - for (var e = 1; e < 32; e <<= 1) t |= t >> e; - t++; - } - return t; - })(t)), - t > e.length ? (e.ended ? e.length : ((e.needReadable = !0), 0)) : t); - } - function m(t) { - var e = t._readableState; - (e.needReadable = !1), - e.emittedReadable || - (u('emitReadable', e.flowing), - (e.emittedReadable = !0), - e.sync - ? process.nextTick(function () { - g(t); - }) - : g(t)); - } - function g(t) { - u('emit readable'), t.emit('readable'), b(t); - } - function b(t) { - var e = t._readableState; - if ((u('flow', e.flowing), e.flowing)) - do { - var r = t.read(); - } while (null !== r && e.flowing); - } - function y(t, e) { - var r, - i = e.buffer, - o = e.length, - s = !!e.decoder, - a = !!e.objectMode; - if (0 === i.length) return null; - if (0 === o) r = null; - else if (a) r = i.shift(); - else if (!t || t >= o) (r = s ? i.join('') : n.concat(i, o)), (i.length = 0); - else if (t < i[0].length) (r = (c = i[0]).slice(0, t)), (i[0] = c.slice(t)); - else if (t === i[0].length) r = i.shift(); - else { - r = s ? '' : new n(t); - for (var h = 0, u = 0, f = i.length; u < f && h < t; u++) { - var c = i[0], - l = Math.min(t - h, c.length); - s ? (r += c.slice(0, l)) : c.copy(r, h, 0, l), l < c.length ? (i[0] = c.slice(l)) : i.shift(), (h += l); - } - } - return r; - } - function v(t) { - var e = t._readableState; - if (e.length > 0) throw new Error('endReadable called on non-empty stream'); - e.endEmitted || - ((e.ended = !0), - process.nextTick(function () { - e.endEmitted || 0 !== e.length || ((e.endEmitted = !0), (t.readable = !1), t.emit('end')); - })); - } - (c.prototype.read = function (t) { - u('read', t); - var e = this._readableState, - r = t; - if ( - ((!h.isNumber(t) || t > 0) && (e.emittedReadable = !1), 0 === t && e.needReadable && (e.length >= e.highWaterMark || e.ended)) - ) - return u('read: emitReadable', e.length, e.ended), 0 === e.length && e.ended ? v(this) : m(this), null; - if (0 === (t = p(t, e)) && e.ended) return 0 === e.length && v(this), null; - var i, - n = e.needReadable; - return ( - u('need readable', n), - (0 === e.length || e.length - t < e.highWaterMark) && u('length less than watermark', (n = !0)), - (e.ended || e.reading) && u('reading or ended', (n = !1)), - n && - (u('do read'), - (e.reading = !0), - (e.sync = !0), - 0 === e.length && (e.needReadable = !0), - this._read(e.highWaterMark), - (e.sync = !1)), - n && !e.reading && (t = p(r, e)), - (i = t > 0 ? y(t, e) : null), - h.isNull(i) && ((e.needReadable = !0), (t = 0)), - (e.length -= t), - 0 !== e.length || e.ended || (e.needReadable = !0), - r !== t && e.ended && 0 === e.length && v(this), - h.isNull(i) || this.emit('data', i), - i - ); - }), - (c.prototype._read = function (t) { - this.emit('error', new Error('not implemented')); - }), - (c.prototype.pipe = function (t, e) { - var r = this, - n = this._readableState; - switch (n.pipesCount) { - case 0: - n.pipes = t; - break; - case 1: - n.pipes = [n.pipes, t]; - break; - default: - n.pipes.push(t); - } - (n.pipesCount += 1), u('pipe count=%d opts=%j', n.pipesCount, e); - var s = (e && !1 === e.end) || t === process.stdout || t === process.stderr ? c : h; - function a(t) { - u('onunpipe'), t === r && c(); - } - function h() { - u('onend'), t.end(); - } - n.endEmitted ? process.nextTick(s) : r.once('end', s), t.on('unpipe', a); - var f = (function (t) { - return function () { - var e = t._readableState; - u('pipeOnDrain', e.awaitDrain), - e.awaitDrain && e.awaitDrain--, - 0 === e.awaitDrain && o.listenerCount(t, 'data') && ((e.flowing = !0), b(t)); - }; - })(r); - function c() { - u('cleanup'), - t.removeListener('close', p), - t.removeListener('finish', m), - t.removeListener('drain', f), - t.removeListener('error', d), - t.removeListener('unpipe', a), - r.removeListener('end', h), - r.removeListener('end', c), - r.removeListener('data', l), - !n.awaitDrain || (t._writableState && !t._writableState.needDrain) || f(); - } - function l(e) { - u('ondata'), - !1 === t.write(e) && - (u('false write response, pause', r._readableState.awaitDrain), r._readableState.awaitDrain++, r.pause()); - } - function d(e) { - u('onerror', e), g(), t.removeListener('error', d), 0 === o.listenerCount(t, 'error') && t.emit('error', e); - } - function p() { - t.removeListener('finish', m), g(); - } - function m() { - u('onfinish'), t.removeListener('close', p), g(); - } - function g() { - u('unpipe'), r.unpipe(t); - } - return ( - t.on('drain', f), - r.on('data', l), - t._events && t._events.error - ? i(t._events.error) - ? t._events.error.unshift(d) - : (t._events.error = [d, t._events.error]) - : t.on('error', d), - t.once('close', p), - t.once('finish', m), - t.emit('pipe', r), - n.flowing || (u('pipe resume'), r.resume()), - t - ); - }), - (c.prototype.unpipe = function (t) { - var e = this._readableState; - if (0 === e.pipesCount) return this; - if (1 === e.pipesCount) - return ( - (t && t !== e.pipes) || - (t || (t = e.pipes), (e.pipes = null), (e.pipesCount = 0), (e.flowing = !1), t && t.emit('unpipe', this)), - this - ); - if (!t) { - var r = e.pipes, - i = e.pipesCount; - (e.pipes = null), (e.pipesCount = 0), (e.flowing = !1); - for (var n = 0; n < i; n++) r[n].emit('unpipe', this); - return this; - } - return ( - -1 === - (n = (function (t, e) { - for (var r = 0, i = t.length; r < i; r++) if (t[r] === e) return r; - return -1; - })(e.pipes, t)) || - (e.pipes.splice(n, 1), (e.pipesCount -= 1), 1 === e.pipesCount && (e.pipes = e.pipes[0]), t.emit('unpipe', this)), - this - ); - }), - (c.prototype.on = function (t, e) { - var r = a.prototype.on.call(this, t, e); - if (('data' === t && !1 !== this._readableState.flowing && this.resume(), 'readable' === t && this.readable)) { - var i = this._readableState; - if (!i.readableListening) - if (((i.readableListening = !0), (i.emittedReadable = !1), (i.needReadable = !0), i.reading)) i.length && m(this); - else { - var n = this; - process.nextTick(function () { - u('readable nexttick read 0'), n.read(0); - }); - } - } - return r; - }), - (c.prototype.addListener = c.prototype.on), - (c.prototype.resume = function () { - var t = this._readableState; - return ( - t.flowing || - (u('resume'), - (t.flowing = !0), - t.reading || (u('resume read 0'), this.read(0)), - (function (t, e) { - e.resumeScheduled || - ((e.resumeScheduled = !0), - process.nextTick(function () { - !(function (t, e) { - (e.resumeScheduled = !1), t.emit('resume'), b(t), e.flowing && !e.reading && t.read(0); - })(t, e); - })); - })(this, t)), - this - ); - }), - (c.prototype.pause = function () { - return ( - u('call pause flowing=%j', this._readableState.flowing), - !1 !== this._readableState.flowing && (u('pause'), (this._readableState.flowing = !1), this.emit('pause')), - this - ); - }), - (c.prototype.wrap = function (t) { - var e = this._readableState, - r = !1, - i = this; - for (var n in (t.on('end', function () { - if ((u('wrapped end'), e.decoder && !e.ended)) { - var t = e.decoder.end(); - t && t.length && i.push(t); - } - i.push(null); - }), - t.on('data', function (n) { - u('wrapped data'), - e.decoder && (n = e.decoder.write(n)), - n && (e.objectMode || n.length) && (i.push(n) || ((r = !0), t.pause())); - }), - t)) - h.isFunction(t[n]) && - h.isUndefined(this[n]) && - (this[n] = (function (e) { - return function () { - return t[e].apply(t, arguments); - }; - })(n)); - return ( - (function (e, r) { - for (var n = 0, o = e.length; n < o; n++) (s = e[n]), t.on(s, i.emit.bind(i, s)); - var s; - })(['error', 'close', 'destroy', 'pause', 'resume']), - (i._read = function (e) { - u('wrapped _read', e), r && ((r = !1), t.resume()); - }), - i - ); - }), - (c._fromList = y); - }, - 4605: (t, e, r) => { - t.exports = s; - var i = r(6753), - n = r(6497); - function o(t, e) { - (this.afterTransform = function (t, r) { - return (function (t, e, r) { - var i = t._transformState; - i.transforming = !1; - var o = i.writecb; - if (!o) return t.emit('error', new Error('no writecb in Transform class')); - (i.writechunk = null), (i.writecb = null), n.isNullOrUndefined(r) || t.push(r), o && o(e); - var s = t._readableState; - (s.reading = !1), (s.needReadable || s.length < s.highWaterMark) && t._read(s.highWaterMark); - })(e, t, r); - }), - (this.needTransform = !1), - (this.transforming = !1), - (this.writecb = null), - (this.writechunk = null); - } - function s(t) { - if (!(this instanceof s)) return new s(t); - i.call(this, t), (this._transformState = new o(t, this)); - var e = this; - (this._readableState.needReadable = !0), - (this._readableState.sync = !1), - this.once('prefinish', function () { - n.isFunction(this._flush) - ? this._flush(function (t) { - a(e, t); - }) - : a(e); - }); - } - function a(t, e) { - if (e) return t.emit('error', e); - var r = t._writableState, - i = t._transformState; - if (r.length) throw new Error('calling transform done when ws.length != 0'); - if (i.transforming) throw new Error('calling transform done when still transforming'); - return t.push(null); - } - (n.inherits = r(5717)), - n.inherits(s, i), - (s.prototype.push = function (t, e) { - return (this._transformState.needTransform = !1), i.prototype.push.call(this, t, e); - }), - (s.prototype._transform = function (t, e, r) { - throw new Error('not implemented'); - }), - (s.prototype._write = function (t, e, r) { - var i = this._transformState; - if (((i.writecb = r), (i.writechunk = t), (i.writeencoding = e), !i.transforming)) { - var n = this._readableState; - (i.needTransform || n.needReadable || n.length < n.highWaterMark) && this._read(n.highWaterMark); - } - }), - (s.prototype._read = function (t) { - var e = this._transformState; - n.isNull(e.writechunk) || !e.writecb || e.transforming - ? (e.needTransform = !0) - : ((e.transforming = !0), this._transform(e.writechunk, e.writeencoding, e.afterTransform)); - }); - }, - 4229: (t, e, r) => { - t.exports = h; - var i = r(8764).Buffer; - h.WritableState = a; - var n = r(6497); - n.inherits = r(5717); - var o = r(2830); - function s(t, e, r) { - (this.chunk = t), (this.encoding = e), (this.callback = r); - } - function a(t, e) { - var i = r(6753), - n = (t = t || {}).highWaterMark, - o = t.objectMode ? 16 : 16384; - (this.highWaterMark = n || 0 === n ? n : o), - (this.objectMode = !!t.objectMode), - e instanceof i && (this.objectMode = this.objectMode || !!t.writableObjectMode), - (this.highWaterMark = ~~this.highWaterMark), - (this.needDrain = !1), - (this.ending = !1), - (this.ended = !1), - (this.finished = !1); - var s = !1 === t.decodeStrings; - (this.decodeStrings = !s), - (this.defaultEncoding = t.defaultEncoding || 'utf8'), - (this.length = 0), - (this.writing = !1), - (this.corked = 0), - (this.sync = !0), - (this.bufferProcessing = !1), - (this.onwrite = function (t) { - !(function (t, e) { - var r = t._writableState, - i = r.sync, - n = r.writecb; - if ( - ((function (t) { - (t.writing = !1), (t.writecb = null), (t.length -= t.writelen), (t.writelen = 0); - })(r), - e) - ) - !(function (t, e, r, i, n) { - r - ? process.nextTick(function () { - e.pendingcb--, n(i); - }) - : (e.pendingcb--, n(i)), - (t._writableState.errorEmitted = !0), - t.emit('error', i); - })(t, r, i, e, n); - else { - var o = l(0, r); - o || r.corked || r.bufferProcessing || !r.buffer.length || c(t, r), - i - ? process.nextTick(function () { - f(t, r, o, n); - }) - : f(t, r, o, n); - } - })(e, t); - }), - (this.writecb = null), - (this.writelen = 0), - (this.buffer = []), - (this.pendingcb = 0), - (this.prefinished = !1), - (this.errorEmitted = !1); - } - function h(t) { - var e = r(6753); - if (!(this instanceof h || this instanceof e)) return new h(t); - (this._writableState = new a(t, this)), (this.writable = !0), o.call(this); - } - function u(t, e, r, i, n, o, s) { - (e.writelen = i), - (e.writecb = s), - (e.writing = !0), - (e.sync = !0), - r ? t._writev(n, e.onwrite) : t._write(n, o, e.onwrite), - (e.sync = !1); - } - function f(t, e, r, i) { - r || - (function (t, e) { - 0 === e.length && e.needDrain && ((e.needDrain = !1), t.emit('drain')); - })(t, e), - e.pendingcb--, - i(), - p(t, e); - } - function c(t, e) { - if (((e.bufferProcessing = !0), t._writev && e.buffer.length > 1)) { - for (var r = [], i = 0; i < e.buffer.length; i++) r.push(e.buffer[i].callback); - e.pendingcb++, - u(t, e, !0, e.length, e.buffer, '', function (t) { - for (var i = 0; i < r.length; i++) e.pendingcb--, r[i](t); - }), - (e.buffer = []); - } else { - for (i = 0; i < e.buffer.length; i++) { - var n = e.buffer[i], - o = n.chunk, - s = n.encoding, - a = n.callback, - h = e.objectMode ? 1 : o.length; - if ((u(t, e, !1, h, o, s, a), e.writing)) { - i++; - break; - } - } - i < e.buffer.length ? (e.buffer = e.buffer.slice(i)) : (e.buffer.length = 0); - } - e.bufferProcessing = !1; - } - function l(t, e) { - return e.ending && 0 === e.length && !e.finished && !e.writing; - } - function d(t, e) { - e.prefinished || ((e.prefinished = !0), t.emit('prefinish')); - } - function p(t, e) { - var r = l(0, e); - return r && (0 === e.pendingcb ? (d(t, e), (e.finished = !0), t.emit('finish')) : d(t, e)), r; - } - n.inherits(h, o), - (h.prototype.pipe = function () { - this.emit('error', new Error('Cannot pipe. Not readable.')); - }), - (h.prototype.write = function (t, e, r) { - var o = this._writableState, - a = !1; - return ( - n.isFunction(e) && ((r = e), (e = null)), - n.isBuffer(t) ? (e = 'buffer') : e || (e = o.defaultEncoding), - n.isFunction(r) || (r = function () {}), - o.ended - ? (function (t, e, r) { - var i = new Error('write after end'); - t.emit('error', i), - process.nextTick(function () { - r(i); - }); - })(this, 0, r) - : (function (t, e, r, i) { - var o = !0; - if (!(n.isBuffer(r) || n.isString(r) || n.isNullOrUndefined(r) || e.objectMode)) { - var s = new TypeError('Invalid non-string/buffer chunk'); - t.emit('error', s), - process.nextTick(function () { - i(s); - }), - (o = !1); - } - return o; - })(this, o, t, r) && - (o.pendingcb++, - (a = (function (t, e, r, o, a) { - (r = (function (t, e, r) { - return !t.objectMode && !1 !== t.decodeStrings && n.isString(e) && (e = new i(e, r)), e; - })(e, r, o)), - n.isBuffer(r) && (o = 'buffer'); - var h = e.objectMode ? 1 : r.length; - e.length += h; - var f = e.length < e.highWaterMark; - return f || (e.needDrain = !0), e.writing || e.corked ? e.buffer.push(new s(r, o, a)) : u(t, e, !1, h, r, o, a), f; - })(this, o, t, e, r))), - a - ); - }), - (h.prototype.cork = function () { - this._writableState.corked++; - }), - (h.prototype.uncork = function () { - var t = this._writableState; - t.corked && (t.corked--, t.writing || t.corked || t.finished || t.bufferProcessing || !t.buffer.length || c(this, t)); - }), - (h.prototype._write = function (t, e, r) { - r(new Error('not implemented')); - }), - (h.prototype._writev = null), - (h.prototype.end = function (t, e, r) { - var i = this._writableState; - n.isFunction(t) ? ((r = t), (t = null), (e = null)) : n.isFunction(e) && ((r = e), (e = null)), - n.isNullOrUndefined(t) || this.write(t, e), - i.corked && ((i.corked = 1), this.uncork()), - i.ending || - i.finished || - (function (t, e, r) { - (e.ending = !0), p(t, e), r && (e.finished ? process.nextTick(r) : t.once('finish', r)), (e.ended = !0); - })(this, i, r); - }); - }, - 5309: t => { - t.exports = - Array.isArray || - function (t) { - return '[object Array]' == Object.prototype.toString.call(t); - }; - }, - 5799: (t, e, r) => { - t.exports = r(2725); - }, - 1451: (t, e, r) => { - ((e = t.exports = r(9481)).Stream = r(2830)), - (e.Readable = e), - (e.Writable = r(4229)), - (e.Duplex = r(6753)), - (e.Transform = r(4605)), - (e.PassThrough = r(2725)), - process.browser || 'disable' !== process.env.READABLE_STREAM || (t.exports = r(2830)); - }, - 4219: (t, e, r) => { - t.exports = r(4605); - }, - 9909: (t, e, r) => { - t.exports = r(4229); - }, - 2257: (t, e, r) => { - const i = Symbol('SemVer ANY'); - class n { - static get ANY() { - return i; - } - constructor(t, e) { - if (((e = o(e)), t instanceof n)) { - if (t.loose === !!e.loose) return t; - t = t.value; - } - (t = t.trim().split(/\s+/).join(' ')), - u('comparator', t, e), - (this.options = e), - (this.loose = !!e.loose), - this.parse(t), - this.semver === i ? (this.value = '') : (this.value = this.operator + this.semver.version), - u('comp', this); - } - parse(t) { - const e = this.options.loose ? s[a.COMPARATORLOOSE] : s[a.COMPARATOR], - r = t.match(e); - if (!r) throw new TypeError(`Invalid comparator: ${t}`); - (this.operator = void 0 !== r[1] ? r[1] : ''), - '=' === this.operator && (this.operator = ''), - r[2] ? (this.semver = new f(r[2], this.options.loose)) : (this.semver = i); - } - toString() { - return this.value; - } - test(t) { - if ((u('Comparator.test', t, this.options.loose), this.semver === i || t === i)) return !0; - if ('string' == typeof t) - try { - t = new f(t, this.options); - } catch (t) { - return !1; - } - return h(t, this.operator, this.semver, this.options); - } - intersects(t, e) { - if (!(t instanceof n)) throw new TypeError('a Comparator is required'); - return '' === this.operator - ? '' === this.value || new c(t.value, e).test(this.value) - : '' === t.operator - ? '' === t.value || new c(this.value, e).test(t.semver) - : !( - ((e = o(e)).includePrerelease && ('<0.0.0-0' === this.value || '<0.0.0-0' === t.value)) || - (!e.includePrerelease && (this.value.startsWith('<0.0.0') || t.value.startsWith('<0.0.0'))) || - ((!this.operator.startsWith('>') || !t.operator.startsWith('>')) && - (!this.operator.startsWith('<') || !t.operator.startsWith('<')) && - (this.semver.version !== t.semver.version || !this.operator.includes('=') || !t.operator.includes('=')) && - !(h(this.semver, '<', t.semver, e) && this.operator.startsWith('>') && t.operator.startsWith('<')) && - !(h(this.semver, '>', t.semver, e) && this.operator.startsWith('<') && t.operator.startsWith('>'))) - ); - } - } - t.exports = n; - const o = r(2893), - { safeRe: s, t: a } = r(5765), - h = r(7539), - u = r(4225), - f = r(6376), - c = r(6902); - }, - 6902: (t, e, r) => { - class i { - constructor(t, e) { - if (((e = o(e)), t instanceof i)) - return t.loose === !!e.loose && t.includePrerelease === !!e.includePrerelease ? t : new i(t.raw, e); - if (t instanceof s) return (this.raw = t.value), (this.set = [[t]]), this.format(), this; - if ( - ((this.options = e), - (this.loose = !!e.loose), - (this.includePrerelease = !!e.includePrerelease), - (this.raw = t.trim().split(/\s+/).join(' ')), - (this.set = this.raw - .split('||') - .map(t => this.parseRange(t)) - .filter(t => t.length)), - !this.set.length) - ) - throw new TypeError(`Invalid SemVer Range: ${this.raw}`); - if (this.set.length > 1) { - const t = this.set[0]; - if (((this.set = this.set.filter(t => !g(t[0]))), 0 === this.set.length)) this.set = [t]; - else if (this.set.length > 1) - for (const t of this.set) - if (1 === t.length && b(t[0])) { - this.set = [t]; - break; - } - } - this.format(); - } - format() { - return ( - (this.range = this.set - .map(t => t.join(' ').trim()) - .join('||') - .trim()), - this.range - ); - } - toString() { - return this.range; - } - parseRange(t) { - const e = ((this.options.includePrerelease && p) | (this.options.loose && m)) + ':' + t, - r = n.get(e); - if (r) return r; - const i = this.options.loose, - o = i ? u[f.HYPHENRANGELOOSE] : u[f.HYPHENRANGE]; - (t = t.replace(o, B(this.options.includePrerelease))), - a('hyphen replace', t), - (t = t.replace(u[f.COMPARATORTRIM], c)), - a('comparator trim', t); - let h = (t = (t = t.replace(u[f.TILDETRIM], l)).replace(u[f.CARETTRIM], d)) - .split(' ') - .map(t => v(t, this.options)) - .join(' ') - .split(/\s+/) - .map(t => R(t, this.options)); - i && (h = h.filter(t => (a('loose invalid filter', t, this.options), !!t.match(u[f.COMPARATORLOOSE])))), a('range list', h); - const b = new Map(), - y = h.map(t => new s(t, this.options)); - for (const t of y) { - if (g(t)) return [t]; - b.set(t.value, t); - } - b.size > 1 && b.has('') && b.delete(''); - const w = [...b.values()]; - return n.set(e, w), w; - } - intersects(t, e) { - if (!(t instanceof i)) throw new TypeError('a Range is required'); - return this.set.some(r => y(r, e) && t.set.some(t => y(t, e) && r.every(r => t.every(t => r.intersects(t, e))))); - } - test(t) { - if (!t) return !1; - if ('string' == typeof t) - try { - t = new h(t, this.options); - } catch (t) { - return !1; - } - for (let e = 0; e < this.set.length; e++) if (I(this.set[e], t, this.options)) return !0; - return !1; - } - } - t.exports = i; - const n = new (r(6062))({ max: 1e3 }), - o = r(2893), - s = r(2257), - a = r(4225), - h = r(6376), - { safeRe: u, t: f, comparatorTrimReplace: c, tildeTrimReplace: l, caretTrimReplace: d } = r(5765), - { FLAG_INCLUDE_PRERELEASE: p, FLAG_LOOSE: m } = r(3295), - g = t => '<0.0.0-0' === t.value, - b = t => '' === t.value, - y = (t, e) => { - let r = !0; - const i = t.slice(); - let n = i.pop(); - for (; r && i.length; ) (r = i.every(t => n.intersects(t, e))), (n = i.pop()); - return r; - }, - v = (t, e) => ( - a('comp', t, e), - (t = E(t, e)), - a('caret', t), - (t = _(t, e)), - a('tildes', t), - (t = x(t, e)), - a('xrange', t), - (t = k(t, e)), - a('stars', t), - t - ), - w = t => !t || 'x' === t.toLowerCase() || '*' === t, - _ = (t, e) => - t - .trim() - .split(/\s+/) - .map(t => M(t, e)) - .join(' '), - M = (t, e) => { - const r = e.loose ? u[f.TILDELOOSE] : u[f.TILDE]; - return t.replace(r, (e, r, i, n, o) => { - let s; - return ( - a('tilde', t, e, r, i, n, o), - w(r) - ? (s = '') - : w(i) - ? (s = `>=${r}.0.0 <${+r + 1}.0.0-0`) - : w(n) - ? (s = `>=${r}.${i}.0 <${r}.${+i + 1}.0-0`) - : o - ? (a('replaceTilde pr', o), (s = `>=${r}.${i}.${n}-${o} <${r}.${+i + 1}.0-0`)) - : (s = `>=${r}.${i}.${n} <${r}.${+i + 1}.0-0`), - a('tilde return', s), - s - ); - }); - }, - E = (t, e) => - t - .trim() - .split(/\s+/) - .map(t => S(t, e)) - .join(' '), - S = (t, e) => { - a('caret', t, e); - const r = e.loose ? u[f.CARETLOOSE] : u[f.CARET], - i = e.includePrerelease ? '-0' : ''; - return t.replace(r, (e, r, n, o, s) => { - let h; - return ( - a('caret', t, e, r, n, o, s), - w(r) - ? (h = '') - : w(n) - ? (h = `>=${r}.0.0${i} <${+r + 1}.0.0-0`) - : w(o) - ? (h = '0' === r ? `>=${r}.${n}.0${i} <${r}.${+n + 1}.0-0` : `>=${r}.${n}.0${i} <${+r + 1}.0.0-0`) - : s - ? (a('replaceCaret pr', s), - (h = - '0' === r - ? '0' === n - ? `>=${r}.${n}.${o}-${s} <${r}.${n}.${+o + 1}-0` - : `>=${r}.${n}.${o}-${s} <${r}.${+n + 1}.0-0` - : `>=${r}.${n}.${o}-${s} <${+r + 1}.0.0-0`)) - : (a('no pr'), - (h = - '0' === r - ? '0' === n - ? `>=${r}.${n}.${o}${i} <${r}.${n}.${+o + 1}-0` - : `>=${r}.${n}.${o}${i} <${r}.${+n + 1}.0-0` - : `>=${r}.${n}.${o} <${+r + 1}.0.0-0`)), - a('caret return', h), - h - ); - }); - }, - x = (t, e) => ( - a('replaceXRanges', t, e), - t - .split(/\s+/) - .map(t => A(t, e)) - .join(' ') - ), - A = (t, e) => { - t = t.trim(); - const r = e.loose ? u[f.XRANGELOOSE] : u[f.XRANGE]; - return t.replace(r, (r, i, n, o, s, h) => { - a('xRange', t, r, i, n, o, s, h); - const u = w(n), - f = u || w(o), - c = f || w(s), - l = c; - return ( - '=' === i && l && (i = ''), - (h = e.includePrerelease ? '-0' : ''), - u - ? (r = '>' === i || '<' === i ? '<0.0.0-0' : '*') - : i && l - ? (f && (o = 0), - (s = 0), - '>' === i - ? ((i = '>='), f ? ((n = +n + 1), (o = 0), (s = 0)) : ((o = +o + 1), (s = 0))) - : '<=' === i && ((i = '<'), f ? (n = +n + 1) : (o = +o + 1)), - '<' === i && (h = '-0'), - (r = `${i + n}.${o}.${s}${h}`)) - : f - ? (r = `>=${n}.0.0${h} <${+n + 1}.0.0-0`) - : c && (r = `>=${n}.${o}.0${h} <${n}.${+o + 1}.0-0`), - a('xRange return', r), - r - ); - }); - }, - k = (t, e) => (a('replaceStars', t, e), t.trim().replace(u[f.STAR], '')), - R = (t, e) => (a('replaceGTE0', t, e), t.trim().replace(u[e.includePrerelease ? f.GTE0PRE : f.GTE0], '')), - B = t => (e, r, i, n, o, s, a, h, u, f, c, l, d) => - `${(r = w(i) ? '' : w(n) ? `>=${i}.0.0${t ? '-0' : ''}` : w(o) ? `>=${i}.${n}.0${t ? '-0' : ''}` : s ? `>=${r}` : `>=${r}${t ? '-0' : ''}`)} ${(h = w(u) ? '' : w(f) ? `<${+u + 1}.0.0-0` : w(c) ? `<${u}.${+f + 1}.0-0` : l ? `<=${u}.${f}.${c}-${l}` : t ? `<${u}.${f}.${+c + 1}-0` : `<=${h}`)}`.trim(), - I = (t, e, r) => { - for (let r = 0; r < t.length; r++) if (!t[r].test(e)) return !1; - if (e.prerelease.length && !r.includePrerelease) { - for (let r = 0; r < t.length; r++) - if ((a(t[r].semver), t[r].semver !== s.ANY && t[r].semver.prerelease.length > 0)) { - const i = t[r].semver; - if (i.major === e.major && i.minor === e.minor && i.patch === e.patch) return !0; - } - return !1; - } - return !0; - }; - }, - 6376: (t, e, r) => { - const i = r(4225), - { MAX_LENGTH: n, MAX_SAFE_INTEGER: o } = r(3295), - { safeRe: s, t: a } = r(5765), - h = r(2893), - { compareIdentifiers: u } = r(6742); - class f { - constructor(t, e) { - if (((e = h(e)), t instanceof f)) { - if (t.loose === !!e.loose && t.includePrerelease === !!e.includePrerelease) return t; - t = t.version; - } else if ('string' != typeof t) throw new TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`); - if (t.length > n) throw new TypeError(`version is longer than ${n} characters`); - i('SemVer', t, e), (this.options = e), (this.loose = !!e.loose), (this.includePrerelease = !!e.includePrerelease); - const r = t.trim().match(e.loose ? s[a.LOOSE] : s[a.FULL]); - if (!r) throw new TypeError(`Invalid Version: ${t}`); - if (((this.raw = t), (this.major = +r[1]), (this.minor = +r[2]), (this.patch = +r[3]), this.major > o || this.major < 0)) - throw new TypeError('Invalid major version'); - if (this.minor > o || this.minor < 0) throw new TypeError('Invalid minor version'); - if (this.patch > o || this.patch < 0) throw new TypeError('Invalid patch version'); - r[4] - ? (this.prerelease = r[4].split('.').map(t => { - if (/^[0-9]+$/.test(t)) { - const e = +t; - if (e >= 0 && e < o) return e; - } - return t; - })) - : (this.prerelease = []), - (this.build = r[5] ? r[5].split('.') : []), - this.format(); - } - format() { - return ( - (this.version = `${this.major}.${this.minor}.${this.patch}`), - this.prerelease.length && (this.version += `-${this.prerelease.join('.')}`), - this.version - ); - } - toString() { - return this.version; - } - compare(t) { - if ((i('SemVer.compare', this.version, this.options, t), !(t instanceof f))) { - if ('string' == typeof t && t === this.version) return 0; - t = new f(t, this.options); - } - return t.version === this.version ? 0 : this.compareMain(t) || this.comparePre(t); - } - compareMain(t) { - return ( - t instanceof f || (t = new f(t, this.options)), u(this.major, t.major) || u(this.minor, t.minor) || u(this.patch, t.patch) - ); - } - comparePre(t) { - if ((t instanceof f || (t = new f(t, this.options)), this.prerelease.length && !t.prerelease.length)) return -1; - if (!this.prerelease.length && t.prerelease.length) return 1; - if (!this.prerelease.length && !t.prerelease.length) return 0; - let e = 0; - do { - const r = this.prerelease[e], - n = t.prerelease[e]; - if ((i('prerelease compare', e, r, n), void 0 === r && void 0 === n)) return 0; - if (void 0 === n) return 1; - if (void 0 === r) return -1; - if (r !== n) return u(r, n); - } while (++e); - } - compareBuild(t) { - t instanceof f || (t = new f(t, this.options)); - let e = 0; - do { - const r = this.build[e], - n = t.build[e]; - if ((i('prerelease compare', e, r, n), void 0 === r && void 0 === n)) return 0; - if (void 0 === n) return 1; - if (void 0 === r) return -1; - if (r !== n) return u(r, n); - } while (++e); - } - inc(t, e, r) { - switch (t) { - case 'premajor': - (this.prerelease.length = 0), (this.patch = 0), (this.minor = 0), this.major++, this.inc('pre', e, r); - break; - case 'preminor': - (this.prerelease.length = 0), (this.patch = 0), this.minor++, this.inc('pre', e, r); - break; - case 'prepatch': - (this.prerelease.length = 0), this.inc('patch', e, r), this.inc('pre', e, r); - break; - case 'prerelease': - 0 === this.prerelease.length && this.inc('patch', e, r), this.inc('pre', e, r); - break; - case 'major': - (0 === this.minor && 0 === this.patch && 0 !== this.prerelease.length) || this.major++, - (this.minor = 0), - (this.patch = 0), - (this.prerelease = []); - break; - case 'minor': - (0 === this.patch && 0 !== this.prerelease.length) || this.minor++, (this.patch = 0), (this.prerelease = []); - break; - case 'patch': - 0 === this.prerelease.length && this.patch++, (this.prerelease = []); - break; - case 'pre': { - const t = Number(r) ? 1 : 0; - if (!e && !1 === r) throw new Error('invalid increment argument: identifier is empty'); - if (0 === this.prerelease.length) this.prerelease = [t]; - else { - let i = this.prerelease.length; - for (; --i >= 0; ) 'number' == typeof this.prerelease[i] && (this.prerelease[i]++, (i = -2)); - if (-1 === i) { - if (e === this.prerelease.join('.') && !1 === r) - throw new Error('invalid increment argument: identifier already exists'); - this.prerelease.push(t); - } - } - if (e) { - let i = [e, t]; - !1 === r && (i = [e]), - 0 === u(this.prerelease[0], e) ? isNaN(this.prerelease[1]) && (this.prerelease = i) : (this.prerelease = i); - } - break; - } - default: - throw new Error(`invalid increment argument: ${t}`); - } - return (this.raw = this.format()), this.build.length && (this.raw += `+${this.build.join('.')}`), this; - } - } - t.exports = f; - }, - 3507: (t, e, r) => { - const i = r(3959); - t.exports = (t, e) => { - const r = i(t.trim().replace(/^[=v]+/, ''), e); - return r ? r.version : null; - }; - }, - 7539: (t, e, r) => { - const i = r(8718), - n = r(1194), - o = r(1312), - s = r(5903), - a = r(1544), - h = r(2056); - t.exports = (t, e, r, u) => { - switch (e) { - case '===': - return 'object' == typeof t && (t = t.version), 'object' == typeof r && (r = r.version), t === r; - case '!==': - return 'object' == typeof t && (t = t.version), 'object' == typeof r && (r = r.version), t !== r; - case '': - case '=': - case '==': - return i(t, r, u); - case '!=': - return n(t, r, u); - case '>': - return o(t, r, u); - case '>=': - return s(t, r, u); - case '<': - return a(t, r, u); - case '<=': - return h(t, r, u); - default: - throw new TypeError(`Invalid operator: ${e}`); - } - }; - }, - 9038: (t, e, r) => { - const i = r(6376), - n = r(3959), - { safeRe: o, t: s } = r(5765); - t.exports = (t, e) => { - if (t instanceof i) return t; - if (('number' == typeof t && (t = String(t)), 'string' != typeof t)) return null; - let r = null; - if ((e = e || {}).rtl) { - let e; - for (; (e = o[s.COERCERTL].exec(t)) && (!r || r.index + r[0].length !== t.length); ) - (r && e.index + e[0].length === r.index + r[0].length) || (r = e), - (o[s.COERCERTL].lastIndex = e.index + e[1].length + e[2].length); - o[s.COERCERTL].lastIndex = -1; - } else r = t.match(o[s.COERCE]); - return null === r ? null : n(`${r[2]}.${r[3] || '0'}.${r[4] || '0'}`, e); - }; - }, - 8880: (t, e, r) => { - const i = r(6376); - t.exports = (t, e, r) => { - const n = new i(t, r), - o = new i(e, r); - return n.compare(o) || n.compareBuild(o); - }; - }, - 7880: (t, e, r) => { - const i = r(6269); - t.exports = (t, e) => i(t, e, !0); - }, - 6269: (t, e, r) => { - const i = r(6376); - t.exports = (t, e, r) => new i(t, r).compare(new i(e, r)); - }, - 2378: (t, e, r) => { - const i = r(3959); - t.exports = (t, e) => { - const r = i(t, null, !0), - n = i(e, null, !0), - o = r.compare(n); - if (0 === o) return null; - const s = o > 0, - a = s ? r : n, - h = s ? n : r, - u = !!a.prerelease.length; - if (h.prerelease.length && !u) return h.patch || h.minor ? (a.patch ? 'patch' : a.minor ? 'minor' : 'major') : 'major'; - const f = u ? 'pre' : ''; - return r.major !== n.major ? f + 'major' : r.minor !== n.minor ? f + 'minor' : r.patch !== n.patch ? f + 'patch' : 'prerelease'; - }; - }, - 8718: (t, e, r) => { - const i = r(6269); - t.exports = (t, e, r) => 0 === i(t, e, r); - }, - 1312: (t, e, r) => { - const i = r(6269); - t.exports = (t, e, r) => i(t, e, r) > 0; - }, - 5903: (t, e, r) => { - const i = r(6269); - t.exports = (t, e, r) => i(t, e, r) >= 0; - }, - 253: (t, e, r) => { - const i = r(6376); - t.exports = (t, e, r, n, o) => { - 'string' == typeof r && ((o = n), (n = r), (r = void 0)); - try { - return new i(t instanceof i ? t.version : t, r).inc(e, n, o).version; - } catch (t) { - return null; - } - }; - }, - 1544: (t, e, r) => { - const i = r(6269); - t.exports = (t, e, r) => i(t, e, r) < 0; - }, - 2056: (t, e, r) => { - const i = r(6269); - t.exports = (t, e, r) => i(t, e, r) <= 0; - }, - 8679: (t, e, r) => { - const i = r(6376); - t.exports = (t, e) => new i(t, e).major; - }, - 7789: (t, e, r) => { - const i = r(6376); - t.exports = (t, e) => new i(t, e).minor; - }, - 1194: (t, e, r) => { - const i = r(6269); - t.exports = (t, e, r) => 0 !== i(t, e, r); - }, - 3959: (t, e, r) => { - const i = r(6376); - t.exports = (t, e, r = !1) => { - if (t instanceof i) return t; - try { - return new i(t, e); - } catch (t) { - if (!r) return null; - throw t; - } - }; - }, - 2358: (t, e, r) => { - const i = r(6376); - t.exports = (t, e) => new i(t, e).patch; - }, - 7559: (t, e, r) => { - const i = r(3959); - t.exports = (t, e) => { - const r = i(t, e); - return r && r.prerelease.length ? r.prerelease : null; - }; - }, - 9795: (t, e, r) => { - const i = r(6269); - t.exports = (t, e, r) => i(e, t, r); - }, - 3657: (t, e, r) => { - const i = r(8880); - t.exports = (t, e) => t.sort((t, r) => i(r, t, e)); - }, - 5712: (t, e, r) => { - const i = r(6902); - t.exports = (t, e, r) => { - try { - e = new i(e, r); - } catch (t) { - return !1; - } - return e.test(t); - }; - }, - 1100: (t, e, r) => { - const i = r(8880); - t.exports = (t, e) => t.sort((t, r) => i(t, r, e)); - }, - 6397: (t, e, r) => { - const i = r(3959); - t.exports = (t, e) => { - const r = i(t, e); - return r ? r.version : null; - }; - }, - 1249: (t, e, r) => { - const i = r(5765), - n = r(3295), - o = r(6376), - s = r(6742), - a = r(3959), - h = r(6397), - u = r(3507), - f = r(253), - c = r(2378), - l = r(8679), - d = r(7789), - p = r(2358), - m = r(7559), - g = r(6269), - b = r(9795), - y = r(7880), - v = r(8880), - w = r(1100), - _ = r(3657), - M = r(1312), - E = r(1544), - S = r(8718), - x = r(1194), - A = r(5903), - k = r(2056), - R = r(7539), - B = r(9038), - I = r(2257), - T = r(6902), - P = r(5712), - O = r(1042), - L = r(5775), - C = r(1657), - N = r(5316), - j = r(9042), - U = r(6826), - D = r(7606), - z = r(32), - F = r(2937), - q = r(7908), - H = r(799); - t.exports = { - parse: a, - valid: h, - clean: u, - inc: f, - diff: c, - major: l, - minor: d, - patch: p, - prerelease: m, - compare: g, - rcompare: b, - compareLoose: y, - compareBuild: v, - sort: w, - rsort: _, - gt: M, - lt: E, - eq: S, - neq: x, - gte: A, - lte: k, - cmp: R, - coerce: B, - Comparator: I, - Range: T, - satisfies: P, - toComparators: O, - maxSatisfying: L, - minSatisfying: C, - minVersion: N, - validRange: j, - outside: U, - gtr: D, - ltr: z, - intersects: F, - simplifyRange: q, - subset: H, - SemVer: o, - re: i.re, - src: i.src, - tokens: i.t, - SEMVER_SPEC_VERSION: n.SEMVER_SPEC_VERSION, - RELEASE_TYPES: n.RELEASE_TYPES, - compareIdentifiers: s.compareIdentifiers, - rcompareIdentifiers: s.rcompareIdentifiers, - }; - }, - 3295: t => { - const e = Number.MAX_SAFE_INTEGER || 9007199254740991; - t.exports = { - MAX_LENGTH: 256, - MAX_SAFE_COMPONENT_LENGTH: 16, - MAX_SAFE_INTEGER: e, - RELEASE_TYPES: ['major', 'premajor', 'minor', 'preminor', 'patch', 'prepatch', 'prerelease'], - SEMVER_SPEC_VERSION: '2.0.0', - FLAG_INCLUDE_PRERELEASE: 1, - FLAG_LOOSE: 2, - }; - }, - 4225: t => { - const e = - 'object' == typeof process && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) - ? (...t) => console.error('SEMVER', ...t) - : () => {}; - t.exports = e; - }, - 6742: t => { - const e = /^[0-9]+$/, - r = (t, r) => { - const i = e.test(t), - n = e.test(r); - return i && n && ((t = +t), (r = +r)), t === r ? 0 : i && !n ? -1 : n && !i ? 1 : t < r ? -1 : 1; - }; - t.exports = { compareIdentifiers: r, rcompareIdentifiers: (t, e) => r(e, t) }; - }, - 2893: t => { - const e = Object.freeze({ loose: !0 }), - r = Object.freeze({}); - t.exports = t => (t ? ('object' != typeof t ? e : t) : r); - }, - 5765: (t, e, r) => { - const { MAX_SAFE_COMPONENT_LENGTH: i } = r(3295), - n = r(4225), - o = ((e = t.exports = {}).re = []), - s = (e.safeRe = []), - a = (e.src = []), - h = (e.t = {}); - let u = 0; - const f = (t, e, r) => { - const i = e.split('\\s*').join('\\s{0,1}').split('\\s+').join('\\s'), - f = u++; - n(t, f, e), (h[t] = f), (a[f] = e), (o[f] = new RegExp(e, r ? 'g' : void 0)), (s[f] = new RegExp(i, r ? 'g' : void 0)); - }; - f('NUMERICIDENTIFIER', '0|[1-9]\\d*'), - f('NUMERICIDENTIFIERLOOSE', '[0-9]+'), - f('NONNUMERICIDENTIFIER', '\\d*[a-zA-Z-][a-zA-Z0-9-]*'), - f('MAINVERSION', `(${a[h.NUMERICIDENTIFIER]})\\.(${a[h.NUMERICIDENTIFIER]})\\.(${a[h.NUMERICIDENTIFIER]})`), - f('MAINVERSIONLOOSE', `(${a[h.NUMERICIDENTIFIERLOOSE]})\\.(${a[h.NUMERICIDENTIFIERLOOSE]})\\.(${a[h.NUMERICIDENTIFIERLOOSE]})`), - f('PRERELEASEIDENTIFIER', `(?:${a[h.NUMERICIDENTIFIER]}|${a[h.NONNUMERICIDENTIFIER]})`), - f('PRERELEASEIDENTIFIERLOOSE', `(?:${a[h.NUMERICIDENTIFIERLOOSE]}|${a[h.NONNUMERICIDENTIFIER]})`), - f('PRERELEASE', `(?:-(${a[h.PRERELEASEIDENTIFIER]}(?:\\.${a[h.PRERELEASEIDENTIFIER]})*))`), - f('PRERELEASELOOSE', `(?:-?(${a[h.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${a[h.PRERELEASEIDENTIFIERLOOSE]})*))`), - f('BUILDIDENTIFIER', '[0-9A-Za-z-]+'), - f('BUILD', `(?:\\+(${a[h.BUILDIDENTIFIER]}(?:\\.${a[h.BUILDIDENTIFIER]})*))`), - f('FULLPLAIN', `v?${a[h.MAINVERSION]}${a[h.PRERELEASE]}?${a[h.BUILD]}?`), - f('FULL', `^${a[h.FULLPLAIN]}$`), - f('LOOSEPLAIN', `[v=\\s]*${a[h.MAINVERSIONLOOSE]}${a[h.PRERELEASELOOSE]}?${a[h.BUILD]}?`), - f('LOOSE', `^${a[h.LOOSEPLAIN]}$`), - f('GTLT', '((?:<|>)?=?)'), - f('XRANGEIDENTIFIERLOOSE', `${a[h.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`), - f('XRANGEIDENTIFIER', `${a[h.NUMERICIDENTIFIER]}|x|X|\\*`), - f( - 'XRANGEPLAIN', - `[v=\\s]*(${a[h.XRANGEIDENTIFIER]})(?:\\.(${a[h.XRANGEIDENTIFIER]})(?:\\.(${a[h.XRANGEIDENTIFIER]})(?:${a[h.PRERELEASE]})?${a[h.BUILD]}?)?)?` - ), - f( - 'XRANGEPLAINLOOSE', - `[v=\\s]*(${a[h.XRANGEIDENTIFIERLOOSE]})(?:\\.(${a[h.XRANGEIDENTIFIERLOOSE]})(?:\\.(${a[h.XRANGEIDENTIFIERLOOSE]})(?:${a[h.PRERELEASELOOSE]})?${a[h.BUILD]}?)?)?` - ), - f('XRANGE', `^${a[h.GTLT]}\\s*${a[h.XRANGEPLAIN]}$`), - f('XRANGELOOSE', `^${a[h.GTLT]}\\s*${a[h.XRANGEPLAINLOOSE]}$`), - f('COERCE', `(^|[^\\d])(\\d{1,${i}})(?:\\.(\\d{1,${i}}))?(?:\\.(\\d{1,${i}}))?(?:$|[^\\d])`), - f('COERCERTL', a[h.COERCE], !0), - f('LONETILDE', '(?:~>?)'), - f('TILDETRIM', `(\\s*)${a[h.LONETILDE]}\\s+`, !0), - (e.tildeTrimReplace = '$1~'), - f('TILDE', `^${a[h.LONETILDE]}${a[h.XRANGEPLAIN]}$`), - f('TILDELOOSE', `^${a[h.LONETILDE]}${a[h.XRANGEPLAINLOOSE]}$`), - f('LONECARET', '(?:\\^)'), - f('CARETTRIM', `(\\s*)${a[h.LONECARET]}\\s+`, !0), - (e.caretTrimReplace = '$1^'), - f('CARET', `^${a[h.LONECARET]}${a[h.XRANGEPLAIN]}$`), - f('CARETLOOSE', `^${a[h.LONECARET]}${a[h.XRANGEPLAINLOOSE]}$`), - f('COMPARATORLOOSE', `^${a[h.GTLT]}\\s*(${a[h.LOOSEPLAIN]})$|^$`), - f('COMPARATOR', `^${a[h.GTLT]}\\s*(${a[h.FULLPLAIN]})$|^$`), - f('COMPARATORTRIM', `(\\s*)${a[h.GTLT]}\\s*(${a[h.LOOSEPLAIN]}|${a[h.XRANGEPLAIN]})`, !0), - (e.comparatorTrimReplace = '$1$2$3'), - f('HYPHENRANGE', `^\\s*(${a[h.XRANGEPLAIN]})\\s+-\\s+(${a[h.XRANGEPLAIN]})\\s*$`), - f('HYPHENRANGELOOSE', `^\\s*(${a[h.XRANGEPLAINLOOSE]})\\s+-\\s+(${a[h.XRANGEPLAINLOOSE]})\\s*$`), - f('STAR', '(<|>)?=?\\s*\\*'), - f('GTE0', '^\\s*>=\\s*0\\.0\\.0\\s*$'), - f('GTE0PRE', '^\\s*>=\\s*0\\.0\\.0-0\\s*$'); - }, - 6062: (t, e, r) => { - 'use strict'; - const i = r(4411), - n = Symbol('max'), - o = Symbol('length'), - s = Symbol('lengthCalculator'), - a = Symbol('allowStale'), - h = Symbol('maxAge'), - u = Symbol('dispose'), - f = Symbol('noDisposeOnSet'), - c = Symbol('lruList'), - l = Symbol('cache'), - d = Symbol('updateAgeOnGet'), - p = () => 1, - m = (t, e, r) => { - const i = t[l].get(e); - if (i) { - const e = i.value; - if (g(t, e)) { - if ((y(t, i), !t[a])) return; - } else r && (t[d] && (i.value.now = Date.now()), t[c].unshiftNode(i)); - return e.value; - } - }, - g = (t, e) => { - if (!e || (!e.maxAge && !t[h])) return !1; - const r = Date.now() - e.now; - return e.maxAge ? r > e.maxAge : t[h] && r > t[h]; - }, - b = t => { - if (t[o] > t[n]) - for (let e = t[c].tail; t[o] > t[n] && null !== e; ) { - const r = e.prev; - y(t, e), (e = r); - } - }, - y = (t, e) => { - if (e) { - const r = e.value; - t[u] && t[u](r.key, r.value), (t[o] -= r.length), t[l].delete(r.key), t[c].removeNode(e); - } - }; - class v { - constructor(t, e, r, i, n) { - (this.key = t), (this.value = e), (this.length = r), (this.now = i), (this.maxAge = n || 0); - } - } - const w = (t, e, r, i) => { - let n = r.value; - g(t, n) && (y(t, r), t[a] || (n = void 0)), n && e.call(i, n.value, n.key, t); - }; - t.exports = class { - constructor(t) { - if (('number' == typeof t && (t = { max: t }), t || (t = {}), t.max && ('number' != typeof t.max || t.max < 0))) - throw new TypeError('max must be a non-negative number'); - this[n] = t.max || 1 / 0; - const e = t.length || p; - if (((this[s] = 'function' != typeof e ? p : e), (this[a] = t.stale || !1), t.maxAge && 'number' != typeof t.maxAge)) - throw new TypeError('maxAge must be a number'); - (this[h] = t.maxAge || 0), - (this[u] = t.dispose), - (this[f] = t.noDisposeOnSet || !1), - (this[d] = t.updateAgeOnGet || !1), - this.reset(); - } - set max(t) { - if ('number' != typeof t || t < 0) throw new TypeError('max must be a non-negative number'); - (this[n] = t || 1 / 0), b(this); - } - get max() { - return this[n]; - } - set allowStale(t) { - this[a] = !!t; - } - get allowStale() { - return this[a]; - } - set maxAge(t) { - if ('number' != typeof t) throw new TypeError('maxAge must be a non-negative number'); - (this[h] = t), b(this); - } - get maxAge() { - return this[h]; - } - set lengthCalculator(t) { - 'function' != typeof t && (t = p), - t !== this[s] && - ((this[s] = t), - (this[o] = 0), - this[c].forEach(t => { - (t.length = this[s](t.value, t.key)), (this[o] += t.length); - })), - b(this); - } - get lengthCalculator() { - return this[s]; - } - get length() { - return this[o]; - } - get itemCount() { - return this[c].length; - } - rforEach(t, e) { - e = e || this; - for (let r = this[c].tail; null !== r; ) { - const i = r.prev; - w(this, t, r, e), (r = i); - } - } - forEach(t, e) { - e = e || this; - for (let r = this[c].head; null !== r; ) { - const i = r.next; - w(this, t, r, e), (r = i); - } - } - keys() { - return this[c].toArray().map(t => t.key); - } - values() { - return this[c].toArray().map(t => t.value); - } - reset() { - this[u] && this[c] && this[c].length && this[c].forEach(t => this[u](t.key, t.value)), - (this[l] = new Map()), - (this[c] = new i()), - (this[o] = 0); - } - dump() { - return this[c] - .map(t => !g(this, t) && { k: t.key, v: t.value, e: t.now + (t.maxAge || 0) }) - .toArray() - .filter(t => t); - } - dumpLru() { - return this[c]; - } - set(t, e, r) { - if ((r = r || this[h]) && 'number' != typeof r) throw new TypeError('maxAge must be a number'); - const i = r ? Date.now() : 0, - a = this[s](e, t); - if (this[l].has(t)) { - if (a > this[n]) return y(this, this[l].get(t)), !1; - const s = this[l].get(t).value; - return ( - this[u] && (this[f] || this[u](t, s.value)), - (s.now = i), - (s.maxAge = r), - (s.value = e), - (this[o] += a - s.length), - (s.length = a), - this.get(t), - b(this), - !0 - ); - } - const d = new v(t, e, a, i, r); - return d.length > this[n] - ? (this[u] && this[u](t, e), !1) - : ((this[o] += d.length), this[c].unshift(d), this[l].set(t, this[c].head), b(this), !0); - } - has(t) { - if (!this[l].has(t)) return !1; - const e = this[l].get(t).value; - return !g(this, e); - } - get(t) { - return m(this, t, !0); - } - peek(t) { - return m(this, t, !1); - } - pop() { - const t = this[c].tail; - return t ? (y(this, t), t.value) : null; - } - del(t) { - y(this, this[l].get(t)); - } - load(t) { - this.reset(); - const e = Date.now(); - for (let r = t.length - 1; r >= 0; r--) { - const i = t[r], - n = i.e || 0; - if (0 === n) this.set(i.k, i.v); - else { - const t = n - e; - t > 0 && this.set(i.k, i.v, t); - } - } - } - prune() { - this[l].forEach((t, e) => m(this, e, !1)); - } - }; - }, - 7606: (t, e, r) => { - const i = r(6826); - t.exports = (t, e, r) => i(t, e, '>', r); - }, - 2937: (t, e, r) => { - const i = r(6902); - t.exports = (t, e, r) => ((t = new i(t, r)), (e = new i(e, r)), t.intersects(e, r)); - }, - 32: (t, e, r) => { - const i = r(6826); - t.exports = (t, e, r) => i(t, e, '<', r); - }, - 5775: (t, e, r) => { - const i = r(6376), - n = r(6902); - t.exports = (t, e, r) => { - let o = null, - s = null, - a = null; - try { - a = new n(e, r); - } catch (t) { - return null; - } - return ( - t.forEach(t => { - a.test(t) && ((o && -1 !== s.compare(t)) || ((o = t), (s = new i(o, r)))); - }), - o - ); - }; - }, - 1657: (t, e, r) => { - const i = r(6376), - n = r(6902); - t.exports = (t, e, r) => { - let o = null, - s = null, - a = null; - try { - a = new n(e, r); - } catch (t) { - return null; - } - return ( - t.forEach(t => { - a.test(t) && ((o && 1 !== s.compare(t)) || ((o = t), (s = new i(o, r)))); - }), - o - ); - }; - }, - 5316: (t, e, r) => { - const i = r(6376), - n = r(6902), - o = r(1312); - t.exports = (t, e) => { - t = new n(t, e); - let r = new i('0.0.0'); - if (t.test(r)) return r; - if (((r = new i('0.0.0-0')), t.test(r))) return r; - r = null; - for (let e = 0; e < t.set.length; ++e) { - const n = t.set[e]; - let s = null; - n.forEach(t => { - const e = new i(t.semver.version); - switch (t.operator) { - case '>': - 0 === e.prerelease.length ? e.patch++ : e.prerelease.push(0), (e.raw = e.format()); - case '': - case '>=': - (s && !o(e, s)) || (s = e); - break; - case '<': - case '<=': - break; - default: - throw new Error(`Unexpected operation: ${t.operator}`); - } - }), - !s || (r && !o(r, s)) || (r = s); - } - return r && t.test(r) ? r : null; - }; - }, - 6826: (t, e, r) => { - const i = r(6376), - n = r(2257), - { ANY: o } = n, - s = r(6902), - a = r(5712), - h = r(1312), - u = r(1544), - f = r(2056), - c = r(5903); - t.exports = (t, e, r, l) => { - let d, p, m, g, b; - switch (((t = new i(t, l)), (e = new s(e, l)), r)) { - case '>': - (d = h), (p = f), (m = u), (g = '>'), (b = '>='); - break; - case '<': - (d = u), (p = c), (m = h), (g = '<'), (b = '<='); - break; - default: - throw new TypeError('Must provide a hilo val of "<" or ">"'); - } - if (a(t, e, l)) return !1; - for (let r = 0; r < e.set.length; ++r) { - const i = e.set[r]; - let s = null, - a = null; - if ( - (i.forEach(t => { - t.semver === o && (t = new n('>=0.0.0')), - (s = s || t), - (a = a || t), - d(t.semver, s.semver, l) ? (s = t) : m(t.semver, a.semver, l) && (a = t); - }), - s.operator === g || s.operator === b) - ) - return !1; - if ((!a.operator || a.operator === g) && p(t, a.semver)) return !1; - if (a.operator === b && m(t, a.semver)) return !1; - } - return !0; - }; - }, - 7908: (t, e, r) => { - const i = r(5712), - n = r(6269); - t.exports = (t, e, r) => { - const o = []; - let s = null, - a = null; - const h = t.sort((t, e) => n(t, e, r)); - for (const t of h) i(t, e, r) ? ((a = t), s || (s = t)) : (a && o.push([s, a]), (a = null), (s = null)); - s && o.push([s, null]); - const u = []; - for (const [t, e] of o) - t === e - ? u.push(t) - : e || t !== h[0] - ? e - ? t === h[0] - ? u.push(`<=${e}`) - : u.push(`${t} - ${e}`) - : u.push(`>=${t}`) - : u.push('*'); - const f = u.join(' || '), - c = 'string' == typeof e.raw ? e.raw : String(e); - return f.length < c.length ? f : e; - }; - }, - 799: (t, e, r) => { - const i = r(6902), - n = r(2257), - { ANY: o } = n, - s = r(5712), - a = r(6269), - h = [new n('>=0.0.0-0')], - u = [new n('>=0.0.0')], - f = (t, e, r) => { - if (t === e) return !0; - if (1 === t.length && t[0].semver === o) { - if (1 === e.length && e[0].semver === o) return !0; - t = r.includePrerelease ? h : u; - } - if (1 === e.length && e[0].semver === o) { - if (r.includePrerelease) return !0; - e = u; - } - const i = new Set(); - let n, f, d, p, m, g, b; - for (const e of t) - '>' === e.operator || '>=' === e.operator - ? (n = c(n, e, r)) - : '<' === e.operator || '<=' === e.operator - ? (f = l(f, e, r)) - : i.add(e.semver); - if (i.size > 1) return null; - if (n && f) { - if (((d = a(n.semver, f.semver, r)), d > 0)) return null; - if (0 === d && ('>=' !== n.operator || '<=' !== f.operator)) return null; - } - for (const t of i) { - if (n && !s(t, String(n), r)) return null; - if (f && !s(t, String(f), r)) return null; - for (const i of e) if (!s(t, String(i), r)) return !1; - return !0; - } - let y = !(!f || r.includePrerelease || !f.semver.prerelease.length) && f.semver, - v = !(!n || r.includePrerelease || !n.semver.prerelease.length) && n.semver; - y && 1 === y.prerelease.length && '<' === f.operator && 0 === y.prerelease[0] && (y = !1); - for (const t of e) { - if (((b = b || '>' === t.operator || '>=' === t.operator), (g = g || '<' === t.operator || '<=' === t.operator), n)) - if ( - (v && - t.semver.prerelease && - t.semver.prerelease.length && - t.semver.major === v.major && - t.semver.minor === v.minor && - t.semver.patch === v.patch && - (v = !1), - '>' === t.operator || '>=' === t.operator) - ) { - if (((p = c(n, t, r)), p === t && p !== n)) return !1; - } else if ('>=' === n.operator && !s(n.semver, String(t), r)) return !1; - if (f) - if ( - (y && - t.semver.prerelease && - t.semver.prerelease.length && - t.semver.major === y.major && - t.semver.minor === y.minor && - t.semver.patch === y.patch && - (y = !1), - '<' === t.operator || '<=' === t.operator) - ) { - if (((m = l(f, t, r)), m === t && m !== f)) return !1; - } else if ('<=' === f.operator && !s(f.semver, String(t), r)) return !1; - if (!t.operator && (f || n) && 0 !== d) return !1; - } - return !((n && g && !f && 0 !== d) || (f && b && !n && 0 !== d) || v || y); - }, - c = (t, e, r) => { - if (!t) return e; - const i = a(t.semver, e.semver, r); - return i > 0 ? t : i < 0 || ('>' === e.operator && '>=' === t.operator) ? e : t; - }, - l = (t, e, r) => { - if (!t) return e; - const i = a(t.semver, e.semver, r); - return i < 0 ? t : i > 0 || ('<' === e.operator && '<=' === t.operator) ? e : t; - }; - t.exports = (t, e, r = {}) => { - if (t === e) return !0; - (t = new i(t, r)), (e = new i(e, r)); - let n = !1; - t: for (const i of t.set) { - for (const t of e.set) { - const e = f(i, t, r); - if (((n = n || null !== e), e)) continue t; - } - if (n) return !1; - } - return !0; - }; - }, - 1042: (t, e, r) => { - const i = r(6902); - t.exports = (t, e) => - new i(t, e).set.map(t => - t - .map(t => t.value) - .join(' ') - .trim() - .split(' ') - ); - }, - 9042: (t, e, r) => { - const i = r(6902); - t.exports = (t, e) => { - try { - return new i(t, e).range || '*'; - } catch (t) { - return null; - } - }; - }, - 2830: (t, e, r) => { - t.exports = n; - var i = r(7187).EventEmitter; - function n() { - i.call(this); - } - r(5717)(n, i), - (n.Readable = r(1451)), - (n.Writable = r(9909)), - (n.Duplex = r(6666)), - (n.Transform = r(4219)), - (n.PassThrough = r(5799)), - (n.Stream = n), - (n.prototype.pipe = function (t, e) { - var r = this; - function n(e) { - t.writable && !1 === t.write(e) && r.pause && r.pause(); - } - function o() { - r.readable && r.resume && r.resume(); - } - r.on('data', n), t.on('drain', o), t._isStdio || (e && !1 === e.end) || (r.on('end', a), r.on('close', h)); - var s = !1; - function a() { - s || ((s = !0), t.end()); - } - function h() { - s || ((s = !0), 'function' == typeof t.destroy && t.destroy()); - } - function u(t) { - if ((f(), 0 === i.listenerCount(this, 'error'))) throw t; - } - function f() { - r.removeListener('data', n), - t.removeListener('drain', o), - r.removeListener('end', a), - r.removeListener('close', h), - r.removeListener('error', u), - t.removeListener('error', u), - r.removeListener('end', f), - r.removeListener('close', f), - t.removeListener('close', f); - } - return r.on('error', u), t.on('error', u), r.on('end', f), r.on('close', f), t.on('close', f), t.emit('pipe', r), t; - }); - }, - 6941: (t, e, r) => { - var i = r(8764).Buffer, - n = - i.isEncoding || - function (t) { - switch (t && t.toLowerCase()) { - case 'hex': - case 'utf8': - case 'utf-8': - case 'ascii': - case 'binary': - case 'base64': - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - case 'raw': - return !0; - default: - return !1; - } - }, - o = (e.s = function (t) { - switch ( - ((this.encoding = (t || 'utf8').toLowerCase().replace(/[-_]/, '')), - (function (t) { - if (t && !n(t)) throw new Error('Unknown encoding: ' + t); - })(t), - this.encoding) - ) { - case 'utf8': - this.surrogateSize = 3; - break; - case 'ucs2': - case 'utf16le': - (this.surrogateSize = 2), (this.detectIncompleteChar = a); - break; - case 'base64': - (this.surrogateSize = 3), (this.detectIncompleteChar = h); - break; - default: - return void (this.write = s); - } - (this.charBuffer = new i(6)), (this.charReceived = 0), (this.charLength = 0); - }); - function s(t) { - return t.toString(this.encoding); - } - function a(t) { - (this.charReceived = t.length % 2), (this.charLength = this.charReceived ? 2 : 0); - } - function h(t) { - (this.charReceived = t.length % 3), (this.charLength = this.charReceived ? 3 : 0); - } - (o.prototype.write = function (t) { - for (var e = ''; this.charLength; ) { - var r = t.length >= this.charLength - this.charReceived ? this.charLength - this.charReceived : t.length; - if ((t.copy(this.charBuffer, this.charReceived, 0, r), (this.charReceived += r), this.charReceived < this.charLength)) - return ''; - if ( - ((t = t.slice(r, t.length)), - !( - (i = (e = this.charBuffer.slice(0, this.charLength).toString(this.encoding)).charCodeAt(e.length - 1)) >= 55296 && - i <= 56319 - )) - ) { - if (((this.charReceived = this.charLength = 0), 0 === t.length)) return e; - break; - } - (this.charLength += this.surrogateSize), (e = ''); - } - this.detectIncompleteChar(t); - var i, - n = t.length; - if ( - (this.charLength && (t.copy(this.charBuffer, 0, t.length - this.charReceived, n), (n -= this.charReceived)), - (n = (e += t.toString(this.encoding, 0, n)).length - 1), - (i = e.charCodeAt(n)) >= 55296 && i <= 56319) - ) { - var o = this.surrogateSize; - return ( - (this.charLength += o), - (this.charReceived += o), - this.charBuffer.copy(this.charBuffer, o, 0, o), - t.copy(this.charBuffer, 0, 0, o), - e.substring(0, n) - ); - } - return e; - }), - (o.prototype.detectIncompleteChar = function (t) { - for (var e = t.length >= 3 ? 3 : t.length; e > 0; e--) { - var r = t[t.length - e]; - if (1 == e && r >> 5 == 6) { - this.charLength = 2; - break; - } - if (e <= 2 && r >> 4 == 14) { - this.charLength = 3; - break; - } - if (e <= 3 && r >> 3 == 30) { - this.charLength = 4; - break; - } - } - this.charReceived = e; - }), - (o.prototype.end = function (t) { - var e = ''; - if ((t && t.length && (e = this.write(t)), this.charReceived)) { - var r = this.charReceived, - i = this.charBuffer, - n = this.encoding; - e += i.slice(0, r).toString(n); - } - return e; - }); - }, - 6885: function (t) { - !(function (e, r) { - 'use strict'; - t.exports ? (t.exports = r()) : (e.nacl || (e.nacl = {}), (e.nacl.util = r())); - })(this, function () { - 'use strict'; - var t = {}; - function e(t) { - if (!/^(?:[A-Za-z0-9+\/]{2}[A-Za-z0-9+\/]{2})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.test(t)) - throw new TypeError('invalid encoding'); - } - return ( - (t.decodeUTF8 = function (t) { - if ('string' != typeof t) throw new TypeError('expected string'); - var e, - r = unescape(encodeURIComponent(t)), - i = new Uint8Array(r.length); - for (e = 0; e < r.length; e++) i[e] = r.charCodeAt(e); - return i; - }), - (t.encodeUTF8 = function (t) { - var e, - r = []; - for (e = 0; e < t.length; e++) r.push(String.fromCharCode(t[e])); - return decodeURIComponent(escape(r.join(''))); - }), - 'undefined' == typeof atob - ? void 0 !== Buffer.from - ? ((t.encodeBase64 = function (t) { - return Buffer.from(t).toString('base64'); - }), - (t.decodeBase64 = function (t) { - return e(t), new Uint8Array(Array.prototype.slice.call(Buffer.from(t, 'base64'), 0)); - })) - : ((t.encodeBase64 = function (t) { - return new Buffer(t).toString('base64'); - }), - (t.decodeBase64 = function (t) { - return e(t), new Uint8Array(Array.prototype.slice.call(new Buffer(t, 'base64'), 0)); - })) - : ((t.encodeBase64 = function (t) { - var e, - r = [], - i = t.length; - for (e = 0; e < i; e++) r.push(String.fromCharCode(t[e])); - return btoa(r.join('')); - }), - (t.decodeBase64 = function (t) { - e(t); - var r, - i = atob(t), - n = new Uint8Array(i.length); - for (r = 0; r < i.length; r++) n[r] = i.charCodeAt(r); - return n; - })), - t - ); - }); - }, - 780: (t, e, r) => { - !(function (t) { - 'use strict'; - var e = function (t) { - var e, - r = new Float64Array(16); - if (t) for (e = 0; e < t.length; e++) r[e] = t[e]; - return r; - }, - i = function () { - throw new Error('no PRNG'); - }, - n = new Uint8Array(16), - o = new Uint8Array(32); - o[0] = 9; - var s = e(), - a = e([1]), - h = e([56129, 1]), - u = e([30883, 4953, 19914, 30187, 55467, 16705, 2637, 112, 59544, 30585, 16505, 36039, 65139, 11119, 27886, 20995]), - f = e([61785, 9906, 39828, 60374, 45398, 33411, 5274, 224, 53552, 61171, 33010, 6542, 64743, 22239, 55772, 9222]), - c = e([54554, 36645, 11616, 51542, 42930, 38181, 51040, 26924, 56412, 64982, 57905, 49316, 21502, 52590, 14035, 8553]), - l = e([26200, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214]), - d = e([41136, 18958, 6951, 50414, 58488, 44335, 6150, 12099, 55207, 15867, 153, 11085, 57099, 20417, 9344, 11139]); - function p(t, e, r, i) { - (t[e] = (r >> 24) & 255), - (t[e + 1] = (r >> 16) & 255), - (t[e + 2] = (r >> 8) & 255), - (t[e + 3] = 255 & r), - (t[e + 4] = (i >> 24) & 255), - (t[e + 5] = (i >> 16) & 255), - (t[e + 6] = (i >> 8) & 255), - (t[e + 7] = 255 & i); - } - function m(t, e, r, i, n) { - var o, - s = 0; - for (o = 0; o < n; o++) s |= t[e + o] ^ r[i + o]; - return (1 & ((s - 1) >>> 8)) - 1; - } - function g(t, e, r, i) { - return m(t, e, r, i, 16); - } - function b(t, e, r, i) { - return m(t, e, r, i, 32); - } - function y(t, e, r, i) { - !(function (t, e, r, i) { - for ( - var n, - o = (255 & i[0]) | ((255 & i[1]) << 8) | ((255 & i[2]) << 16) | ((255 & i[3]) << 24), - s = (255 & r[0]) | ((255 & r[1]) << 8) | ((255 & r[2]) << 16) | ((255 & r[3]) << 24), - a = (255 & r[4]) | ((255 & r[5]) << 8) | ((255 & r[6]) << 16) | ((255 & r[7]) << 24), - h = (255 & r[8]) | ((255 & r[9]) << 8) | ((255 & r[10]) << 16) | ((255 & r[11]) << 24), - u = (255 & r[12]) | ((255 & r[13]) << 8) | ((255 & r[14]) << 16) | ((255 & r[15]) << 24), - f = (255 & i[4]) | ((255 & i[5]) << 8) | ((255 & i[6]) << 16) | ((255 & i[7]) << 24), - c = (255 & e[0]) | ((255 & e[1]) << 8) | ((255 & e[2]) << 16) | ((255 & e[3]) << 24), - l = (255 & e[4]) | ((255 & e[5]) << 8) | ((255 & e[6]) << 16) | ((255 & e[7]) << 24), - d = (255 & e[8]) | ((255 & e[9]) << 8) | ((255 & e[10]) << 16) | ((255 & e[11]) << 24), - p = (255 & e[12]) | ((255 & e[13]) << 8) | ((255 & e[14]) << 16) | ((255 & e[15]) << 24), - m = (255 & i[8]) | ((255 & i[9]) << 8) | ((255 & i[10]) << 16) | ((255 & i[11]) << 24), - g = (255 & r[16]) | ((255 & r[17]) << 8) | ((255 & r[18]) << 16) | ((255 & r[19]) << 24), - b = (255 & r[20]) | ((255 & r[21]) << 8) | ((255 & r[22]) << 16) | ((255 & r[23]) << 24), - y = (255 & r[24]) | ((255 & r[25]) << 8) | ((255 & r[26]) << 16) | ((255 & r[27]) << 24), - v = (255 & r[28]) | ((255 & r[29]) << 8) | ((255 & r[30]) << 16) | ((255 & r[31]) << 24), - w = (255 & i[12]) | ((255 & i[13]) << 8) | ((255 & i[14]) << 16) | ((255 & i[15]) << 24), - _ = o, - M = s, - E = a, - S = h, - x = u, - A = f, - k = c, - R = l, - B = d, - I = p, - T = m, - P = g, - O = b, - L = y, - C = v, - N = w, - j = 0; - j < 20; - j += 2 - ) - (_ ^= - ((n = - ((O ^= - ((n = ((B ^= ((n = ((x ^= ((n = (_ + O) | 0) << 7) | (n >>> 25)) + _) | 0) << 9) | (n >>> 23)) + x) | 0) << 13) | - (n >>> 19)) + - B) | - 0) << - 18) | - (n >>> 14)), - (A ^= - ((n = - ((M ^= - ((n = ((L ^= ((n = ((I ^= ((n = (A + M) | 0) << 7) | (n >>> 25)) + A) | 0) << 9) | (n >>> 23)) + I) | 0) << 13) | - (n >>> 19)) + - L) | - 0) << - 18) | - (n >>> 14)), - (T ^= - ((n = - ((k ^= - ((n = ((E ^= ((n = ((C ^= ((n = (T + k) | 0) << 7) | (n >>> 25)) + T) | 0) << 9) | (n >>> 23)) + C) | 0) << 13) | - (n >>> 19)) + - E) | - 0) << - 18) | - (n >>> 14)), - (N ^= - ((n = - ((P ^= - ((n = ((R ^= ((n = ((S ^= ((n = (N + P) | 0) << 7) | (n >>> 25)) + N) | 0) << 9) | (n >>> 23)) + S) | 0) << 13) | - (n >>> 19)) + - R) | - 0) << - 18) | - (n >>> 14)), - (_ ^= - ((n = - ((S ^= - ((n = ((E ^= ((n = ((M ^= ((n = (_ + S) | 0) << 7) | (n >>> 25)) + _) | 0) << 9) | (n >>> 23)) + M) | 0) << 13) | - (n >>> 19)) + - E) | - 0) << - 18) | - (n >>> 14)), - (A ^= - ((n = - ((x ^= - ((n = ((R ^= ((n = ((k ^= ((n = (A + x) | 0) << 7) | (n >>> 25)) + A) | 0) << 9) | (n >>> 23)) + k) | 0) << 13) | - (n >>> 19)) + - R) | - 0) << - 18) | - (n >>> 14)), - (T ^= - ((n = - ((I ^= - ((n = ((B ^= ((n = ((P ^= ((n = (T + I) | 0) << 7) | (n >>> 25)) + T) | 0) << 9) | (n >>> 23)) + P) | 0) << 13) | - (n >>> 19)) + - B) | - 0) << - 18) | - (n >>> 14)), - (N ^= - ((n = - ((C ^= - ((n = ((L ^= ((n = ((O ^= ((n = (N + C) | 0) << 7) | (n >>> 25)) + N) | 0) << 9) | (n >>> 23)) + O) | 0) << 13) | - (n >>> 19)) + - L) | - 0) << - 18) | - (n >>> 14)); - (_ = (_ + o) | 0), - (M = (M + s) | 0), - (E = (E + a) | 0), - (S = (S + h) | 0), - (x = (x + u) | 0), - (A = (A + f) | 0), - (k = (k + c) | 0), - (R = (R + l) | 0), - (B = (B + d) | 0), - (I = (I + p) | 0), - (T = (T + m) | 0), - (P = (P + g) | 0), - (O = (O + b) | 0), - (L = (L + y) | 0), - (C = (C + v) | 0), - (N = (N + w) | 0), - (t[0] = (_ >>> 0) & 255), - (t[1] = (_ >>> 8) & 255), - (t[2] = (_ >>> 16) & 255), - (t[3] = (_ >>> 24) & 255), - (t[4] = (M >>> 0) & 255), - (t[5] = (M >>> 8) & 255), - (t[6] = (M >>> 16) & 255), - (t[7] = (M >>> 24) & 255), - (t[8] = (E >>> 0) & 255), - (t[9] = (E >>> 8) & 255), - (t[10] = (E >>> 16) & 255), - (t[11] = (E >>> 24) & 255), - (t[12] = (S >>> 0) & 255), - (t[13] = (S >>> 8) & 255), - (t[14] = (S >>> 16) & 255), - (t[15] = (S >>> 24) & 255), - (t[16] = (x >>> 0) & 255), - (t[17] = (x >>> 8) & 255), - (t[18] = (x >>> 16) & 255), - (t[19] = (x >>> 24) & 255), - (t[20] = (A >>> 0) & 255), - (t[21] = (A >>> 8) & 255), - (t[22] = (A >>> 16) & 255), - (t[23] = (A >>> 24) & 255), - (t[24] = (k >>> 0) & 255), - (t[25] = (k >>> 8) & 255), - (t[26] = (k >>> 16) & 255), - (t[27] = (k >>> 24) & 255), - (t[28] = (R >>> 0) & 255), - (t[29] = (R >>> 8) & 255), - (t[30] = (R >>> 16) & 255), - (t[31] = (R >>> 24) & 255), - (t[32] = (B >>> 0) & 255), - (t[33] = (B >>> 8) & 255), - (t[34] = (B >>> 16) & 255), - (t[35] = (B >>> 24) & 255), - (t[36] = (I >>> 0) & 255), - (t[37] = (I >>> 8) & 255), - (t[38] = (I >>> 16) & 255), - (t[39] = (I >>> 24) & 255), - (t[40] = (T >>> 0) & 255), - (t[41] = (T >>> 8) & 255), - (t[42] = (T >>> 16) & 255), - (t[43] = (T >>> 24) & 255), - (t[44] = (P >>> 0) & 255), - (t[45] = (P >>> 8) & 255), - (t[46] = (P >>> 16) & 255), - (t[47] = (P >>> 24) & 255), - (t[48] = (O >>> 0) & 255), - (t[49] = (O >>> 8) & 255), - (t[50] = (O >>> 16) & 255), - (t[51] = (O >>> 24) & 255), - (t[52] = (L >>> 0) & 255), - (t[53] = (L >>> 8) & 255), - (t[54] = (L >>> 16) & 255), - (t[55] = (L >>> 24) & 255), - (t[56] = (C >>> 0) & 255), - (t[57] = (C >>> 8) & 255), - (t[58] = (C >>> 16) & 255), - (t[59] = (C >>> 24) & 255), - (t[60] = (N >>> 0) & 255), - (t[61] = (N >>> 8) & 255), - (t[62] = (N >>> 16) & 255), - (t[63] = (N >>> 24) & 255); - })(t, e, r, i); - } - function v(t, e, r, i) { - !(function (t, e, r, i) { - for ( - var n, - o = (255 & i[0]) | ((255 & i[1]) << 8) | ((255 & i[2]) << 16) | ((255 & i[3]) << 24), - s = (255 & r[0]) | ((255 & r[1]) << 8) | ((255 & r[2]) << 16) | ((255 & r[3]) << 24), - a = (255 & r[4]) | ((255 & r[5]) << 8) | ((255 & r[6]) << 16) | ((255 & r[7]) << 24), - h = (255 & r[8]) | ((255 & r[9]) << 8) | ((255 & r[10]) << 16) | ((255 & r[11]) << 24), - u = (255 & r[12]) | ((255 & r[13]) << 8) | ((255 & r[14]) << 16) | ((255 & r[15]) << 24), - f = (255 & i[4]) | ((255 & i[5]) << 8) | ((255 & i[6]) << 16) | ((255 & i[7]) << 24), - c = (255 & e[0]) | ((255 & e[1]) << 8) | ((255 & e[2]) << 16) | ((255 & e[3]) << 24), - l = (255 & e[4]) | ((255 & e[5]) << 8) | ((255 & e[6]) << 16) | ((255 & e[7]) << 24), - d = (255 & e[8]) | ((255 & e[9]) << 8) | ((255 & e[10]) << 16) | ((255 & e[11]) << 24), - p = (255 & e[12]) | ((255 & e[13]) << 8) | ((255 & e[14]) << 16) | ((255 & e[15]) << 24), - m = (255 & i[8]) | ((255 & i[9]) << 8) | ((255 & i[10]) << 16) | ((255 & i[11]) << 24), - g = (255 & r[16]) | ((255 & r[17]) << 8) | ((255 & r[18]) << 16) | ((255 & r[19]) << 24), - b = (255 & r[20]) | ((255 & r[21]) << 8) | ((255 & r[22]) << 16) | ((255 & r[23]) << 24), - y = (255 & r[24]) | ((255 & r[25]) << 8) | ((255 & r[26]) << 16) | ((255 & r[27]) << 24), - v = (255 & r[28]) | ((255 & r[29]) << 8) | ((255 & r[30]) << 16) | ((255 & r[31]) << 24), - w = (255 & i[12]) | ((255 & i[13]) << 8) | ((255 & i[14]) << 16) | ((255 & i[15]) << 24), - _ = 0; - _ < 20; - _ += 2 - ) - (o ^= - ((n = - ((b ^= - ((n = ((d ^= ((n = ((u ^= ((n = (o + b) | 0) << 7) | (n >>> 25)) + o) | 0) << 9) | (n >>> 23)) + u) | 0) << 13) | - (n >>> 19)) + - d) | - 0) << - 18) | - (n >>> 14)), - (f ^= - ((n = - ((s ^= - ((n = ((y ^= ((n = ((p ^= ((n = (f + s) | 0) << 7) | (n >>> 25)) + f) | 0) << 9) | (n >>> 23)) + p) | 0) << 13) | - (n >>> 19)) + - y) | - 0) << - 18) | - (n >>> 14)), - (m ^= - ((n = - ((c ^= - ((n = ((a ^= ((n = ((v ^= ((n = (m + c) | 0) << 7) | (n >>> 25)) + m) | 0) << 9) | (n >>> 23)) + v) | 0) << 13) | - (n >>> 19)) + - a) | - 0) << - 18) | - (n >>> 14)), - (w ^= - ((n = - ((g ^= - ((n = ((l ^= ((n = ((h ^= ((n = (w + g) | 0) << 7) | (n >>> 25)) + w) | 0) << 9) | (n >>> 23)) + h) | 0) << 13) | - (n >>> 19)) + - l) | - 0) << - 18) | - (n >>> 14)), - (o ^= - ((n = - ((h ^= - ((n = ((a ^= ((n = ((s ^= ((n = (o + h) | 0) << 7) | (n >>> 25)) + o) | 0) << 9) | (n >>> 23)) + s) | 0) << 13) | - (n >>> 19)) + - a) | - 0) << - 18) | - (n >>> 14)), - (f ^= - ((n = - ((u ^= - ((n = ((l ^= ((n = ((c ^= ((n = (f + u) | 0) << 7) | (n >>> 25)) + f) | 0) << 9) | (n >>> 23)) + c) | 0) << 13) | - (n >>> 19)) + - l) | - 0) << - 18) | - (n >>> 14)), - (m ^= - ((n = - ((p ^= - ((n = ((d ^= ((n = ((g ^= ((n = (m + p) | 0) << 7) | (n >>> 25)) + m) | 0) << 9) | (n >>> 23)) + g) | 0) << 13) | - (n >>> 19)) + - d) | - 0) << - 18) | - (n >>> 14)), - (w ^= - ((n = - ((v ^= - ((n = ((y ^= ((n = ((b ^= ((n = (w + v) | 0) << 7) | (n >>> 25)) + w) | 0) << 9) | (n >>> 23)) + b) | 0) << 13) | - (n >>> 19)) + - y) | - 0) << - 18) | - (n >>> 14)); - (t[0] = (o >>> 0) & 255), - (t[1] = (o >>> 8) & 255), - (t[2] = (o >>> 16) & 255), - (t[3] = (o >>> 24) & 255), - (t[4] = (f >>> 0) & 255), - (t[5] = (f >>> 8) & 255), - (t[6] = (f >>> 16) & 255), - (t[7] = (f >>> 24) & 255), - (t[8] = (m >>> 0) & 255), - (t[9] = (m >>> 8) & 255), - (t[10] = (m >>> 16) & 255), - (t[11] = (m >>> 24) & 255), - (t[12] = (w >>> 0) & 255), - (t[13] = (w >>> 8) & 255), - (t[14] = (w >>> 16) & 255), - (t[15] = (w >>> 24) & 255), - (t[16] = (c >>> 0) & 255), - (t[17] = (c >>> 8) & 255), - (t[18] = (c >>> 16) & 255), - (t[19] = (c >>> 24) & 255), - (t[20] = (l >>> 0) & 255), - (t[21] = (l >>> 8) & 255), - (t[22] = (l >>> 16) & 255), - (t[23] = (l >>> 24) & 255), - (t[24] = (d >>> 0) & 255), - (t[25] = (d >>> 8) & 255), - (t[26] = (d >>> 16) & 255), - (t[27] = (d >>> 24) & 255), - (t[28] = (p >>> 0) & 255), - (t[29] = (p >>> 8) & 255), - (t[30] = (p >>> 16) & 255), - (t[31] = (p >>> 24) & 255); - })(t, e, r, i); - } - var w = new Uint8Array([101, 120, 112, 97, 110, 100, 32, 51, 50, 45, 98, 121, 116, 101, 32, 107]); - function _(t, e, r, i, n, o, s) { - var a, - h, - u = new Uint8Array(16), - f = new Uint8Array(64); - for (h = 0; h < 16; h++) u[h] = 0; - for (h = 0; h < 8; h++) u[h] = o[h]; - for (; n >= 64; ) { - for (y(f, u, s, w), h = 0; h < 64; h++) t[e + h] = r[i + h] ^ f[h]; - for (a = 1, h = 8; h < 16; h++) (a = (a + (255 & u[h])) | 0), (u[h] = 255 & a), (a >>>= 8); - (n -= 64), (e += 64), (i += 64); - } - if (n > 0) for (y(f, u, s, w), h = 0; h < n; h++) t[e + h] = r[i + h] ^ f[h]; - return 0; - } - function M(t, e, r, i, n) { - var o, - s, - a = new Uint8Array(16), - h = new Uint8Array(64); - for (s = 0; s < 16; s++) a[s] = 0; - for (s = 0; s < 8; s++) a[s] = i[s]; - for (; r >= 64; ) { - for (y(h, a, n, w), s = 0; s < 64; s++) t[e + s] = h[s]; - for (o = 1, s = 8; s < 16; s++) (o = (o + (255 & a[s])) | 0), (a[s] = 255 & o), (o >>>= 8); - (r -= 64), (e += 64); - } - if (r > 0) for (y(h, a, n, w), s = 0; s < r; s++) t[e + s] = h[s]; - return 0; - } - function E(t, e, r, i, n) { - var o = new Uint8Array(32); - v(o, i, n, w); - for (var s = new Uint8Array(8), a = 0; a < 8; a++) s[a] = i[a + 16]; - return M(t, e, r, s, o); - } - function S(t, e, r, i, n, o, s) { - var a = new Uint8Array(32); - v(a, o, s, w); - for (var h = new Uint8Array(8), u = 0; u < 8; u++) h[u] = o[u + 16]; - return _(t, e, r, i, n, h, a); - } - var x = function (t) { - var e, r, i, n, o, s, a, h; - (this.buffer = new Uint8Array(16)), - (this.r = new Uint16Array(10)), - (this.h = new Uint16Array(10)), - (this.pad = new Uint16Array(8)), - (this.leftover = 0), - (this.fin = 0), - (e = (255 & t[0]) | ((255 & t[1]) << 8)), - (this.r[0] = 8191 & e), - (r = (255 & t[2]) | ((255 & t[3]) << 8)), - (this.r[1] = 8191 & ((e >>> 13) | (r << 3))), - (i = (255 & t[4]) | ((255 & t[5]) << 8)), - (this.r[2] = 7939 & ((r >>> 10) | (i << 6))), - (n = (255 & t[6]) | ((255 & t[7]) << 8)), - (this.r[3] = 8191 & ((i >>> 7) | (n << 9))), - (o = (255 & t[8]) | ((255 & t[9]) << 8)), - (this.r[4] = 255 & ((n >>> 4) | (o << 12))), - (this.r[5] = (o >>> 1) & 8190), - (s = (255 & t[10]) | ((255 & t[11]) << 8)), - (this.r[6] = 8191 & ((o >>> 14) | (s << 2))), - (a = (255 & t[12]) | ((255 & t[13]) << 8)), - (this.r[7] = 8065 & ((s >>> 11) | (a << 5))), - (h = (255 & t[14]) | ((255 & t[15]) << 8)), - (this.r[8] = 8191 & ((a >>> 8) | (h << 8))), - (this.r[9] = (h >>> 5) & 127), - (this.pad[0] = (255 & t[16]) | ((255 & t[17]) << 8)), - (this.pad[1] = (255 & t[18]) | ((255 & t[19]) << 8)), - (this.pad[2] = (255 & t[20]) | ((255 & t[21]) << 8)), - (this.pad[3] = (255 & t[22]) | ((255 & t[23]) << 8)), - (this.pad[4] = (255 & t[24]) | ((255 & t[25]) << 8)), - (this.pad[5] = (255 & t[26]) | ((255 & t[27]) << 8)), - (this.pad[6] = (255 & t[28]) | ((255 & t[29]) << 8)), - (this.pad[7] = (255 & t[30]) | ((255 & t[31]) << 8)); - }; - function A(t, e, r, i, n, o) { - var s = new x(o); - return s.update(r, i, n), s.finish(t, e), 0; - } - function k(t, e, r, i, n, o) { - var s = new Uint8Array(16); - return A(s, 0, r, i, n, o), g(t, e, s, 0); - } - function R(t, e, r, i, n) { - var o; - if (r < 32) return -1; - for (S(t, 0, e, 0, r, i, n), A(t, 16, t, 32, r - 32, t), o = 0; o < 16; o++) t[o] = 0; - return 0; - } - function B(t, e, r, i, n) { - var o, - s = new Uint8Array(32); - if (r < 32) return -1; - if ((E(s, 0, 32, i, n), 0 !== k(e, 16, e, 32, r - 32, s))) return -1; - for (S(t, 0, e, 0, r, i, n), o = 0; o < 32; o++) t[o] = 0; - return 0; - } - function I(t, e) { - var r; - for (r = 0; r < 16; r++) t[r] = 0 | e[r]; - } - function T(t) { - var e, - r, - i = 1; - for (e = 0; e < 16; e++) (r = t[e] + i + 65535), (i = Math.floor(r / 65536)), (t[e] = r - 65536 * i); - t[0] += i - 1 + 37 * (i - 1); - } - function P(t, e, r) { - for (var i, n = ~(r - 1), o = 0; o < 16; o++) (i = n & (t[o] ^ e[o])), (t[o] ^= i), (e[o] ^= i); - } - function O(t, r) { - var i, - n, - o, - s = e(), - a = e(); - for (i = 0; i < 16; i++) a[i] = r[i]; - for (T(a), T(a), T(a), n = 0; n < 2; n++) { - for (s[0] = a[0] - 65517, i = 1; i < 15; i++) (s[i] = a[i] - 65535 - ((s[i - 1] >> 16) & 1)), (s[i - 1] &= 65535); - (s[15] = a[15] - 32767 - ((s[14] >> 16) & 1)), (o = (s[15] >> 16) & 1), (s[14] &= 65535), P(a, s, 1 - o); - } - for (i = 0; i < 16; i++) (t[2 * i] = 255 & a[i]), (t[2 * i + 1] = a[i] >> 8); - } - function L(t, e) { - var r = new Uint8Array(32), - i = new Uint8Array(32); - return O(r, t), O(i, e), b(r, 0, i, 0); - } - function C(t) { - var e = new Uint8Array(32); - return O(e, t), 1 & e[0]; - } - function N(t, e) { - var r; - for (r = 0; r < 16; r++) t[r] = e[2 * r] + (e[2 * r + 1] << 8); - t[15] &= 32767; - } - function j(t, e, r) { - for (var i = 0; i < 16; i++) t[i] = e[i] + r[i]; - } - function U(t, e, r) { - for (var i = 0; i < 16; i++) t[i] = e[i] - r[i]; - } - function D(t, e, r) { - var i, - n, - o = 0, - s = 0, - a = 0, - h = 0, - u = 0, - f = 0, - c = 0, - l = 0, - d = 0, - p = 0, - m = 0, - g = 0, - b = 0, - y = 0, - v = 0, - w = 0, - _ = 0, - M = 0, - E = 0, - S = 0, - x = 0, - A = 0, - k = 0, - R = 0, - B = 0, - I = 0, - T = 0, - P = 0, - O = 0, - L = 0, - C = 0, - N = r[0], - j = r[1], - U = r[2], - D = r[3], - z = r[4], - F = r[5], - q = r[6], - H = r[7], - $ = r[8], - Z = r[9], - G = r[10], - V = r[11], - W = r[12], - K = r[13], - Y = r[14], - J = r[15]; - (o += (i = e[0]) * N), - (s += i * j), - (a += i * U), - (h += i * D), - (u += i * z), - (f += i * F), - (c += i * q), - (l += i * H), - (d += i * $), - (p += i * Z), - (m += i * G), - (g += i * V), - (b += i * W), - (y += i * K), - (v += i * Y), - (w += i * J), - (s += (i = e[1]) * N), - (a += i * j), - (h += i * U), - (u += i * D), - (f += i * z), - (c += i * F), - (l += i * q), - (d += i * H), - (p += i * $), - (m += i * Z), - (g += i * G), - (b += i * V), - (y += i * W), - (v += i * K), - (w += i * Y), - (_ += i * J), - (a += (i = e[2]) * N), - (h += i * j), - (u += i * U), - (f += i * D), - (c += i * z), - (l += i * F), - (d += i * q), - (p += i * H), - (m += i * $), - (g += i * Z), - (b += i * G), - (y += i * V), - (v += i * W), - (w += i * K), - (_ += i * Y), - (M += i * J), - (h += (i = e[3]) * N), - (u += i * j), - (f += i * U), - (c += i * D), - (l += i * z), - (d += i * F), - (p += i * q), - (m += i * H), - (g += i * $), - (b += i * Z), - (y += i * G), - (v += i * V), - (w += i * W), - (_ += i * K), - (M += i * Y), - (E += i * J), - (u += (i = e[4]) * N), - (f += i * j), - (c += i * U), - (l += i * D), - (d += i * z), - (p += i * F), - (m += i * q), - (g += i * H), - (b += i * $), - (y += i * Z), - (v += i * G), - (w += i * V), - (_ += i * W), - (M += i * K), - (E += i * Y), - (S += i * J), - (f += (i = e[5]) * N), - (c += i * j), - (l += i * U), - (d += i * D), - (p += i * z), - (m += i * F), - (g += i * q), - (b += i * H), - (y += i * $), - (v += i * Z), - (w += i * G), - (_ += i * V), - (M += i * W), - (E += i * K), - (S += i * Y), - (x += i * J), - (c += (i = e[6]) * N), - (l += i * j), - (d += i * U), - (p += i * D), - (m += i * z), - (g += i * F), - (b += i * q), - (y += i * H), - (v += i * $), - (w += i * Z), - (_ += i * G), - (M += i * V), - (E += i * W), - (S += i * K), - (x += i * Y), - (A += i * J), - (l += (i = e[7]) * N), - (d += i * j), - (p += i * U), - (m += i * D), - (g += i * z), - (b += i * F), - (y += i * q), - (v += i * H), - (w += i * $), - (_ += i * Z), - (M += i * G), - (E += i * V), - (S += i * W), - (x += i * K), - (A += i * Y), - (k += i * J), - (d += (i = e[8]) * N), - (p += i * j), - (m += i * U), - (g += i * D), - (b += i * z), - (y += i * F), - (v += i * q), - (w += i * H), - (_ += i * $), - (M += i * Z), - (E += i * G), - (S += i * V), - (x += i * W), - (A += i * K), - (k += i * Y), - (R += i * J), - (p += (i = e[9]) * N), - (m += i * j), - (g += i * U), - (b += i * D), - (y += i * z), - (v += i * F), - (w += i * q), - (_ += i * H), - (M += i * $), - (E += i * Z), - (S += i * G), - (x += i * V), - (A += i * W), - (k += i * K), - (R += i * Y), - (B += i * J), - (m += (i = e[10]) * N), - (g += i * j), - (b += i * U), - (y += i * D), - (v += i * z), - (w += i * F), - (_ += i * q), - (M += i * H), - (E += i * $), - (S += i * Z), - (x += i * G), - (A += i * V), - (k += i * W), - (R += i * K), - (B += i * Y), - (I += i * J), - (g += (i = e[11]) * N), - (b += i * j), - (y += i * U), - (v += i * D), - (w += i * z), - (_ += i * F), - (M += i * q), - (E += i * H), - (S += i * $), - (x += i * Z), - (A += i * G), - (k += i * V), - (R += i * W), - (B += i * K), - (I += i * Y), - (T += i * J), - (b += (i = e[12]) * N), - (y += i * j), - (v += i * U), - (w += i * D), - (_ += i * z), - (M += i * F), - (E += i * q), - (S += i * H), - (x += i * $), - (A += i * Z), - (k += i * G), - (R += i * V), - (B += i * W), - (I += i * K), - (T += i * Y), - (P += i * J), - (y += (i = e[13]) * N), - (v += i * j), - (w += i * U), - (_ += i * D), - (M += i * z), - (E += i * F), - (S += i * q), - (x += i * H), - (A += i * $), - (k += i * Z), - (R += i * G), - (B += i * V), - (I += i * W), - (T += i * K), - (P += i * Y), - (O += i * J), - (v += (i = e[14]) * N), - (w += i * j), - (_ += i * U), - (M += i * D), - (E += i * z), - (S += i * F), - (x += i * q), - (A += i * H), - (k += i * $), - (R += i * Z), - (B += i * G), - (I += i * V), - (T += i * W), - (P += i * K), - (O += i * Y), - (L += i * J), - (w += (i = e[15]) * N), - (s += 38 * (M += i * U)), - (a += 38 * (E += i * D)), - (h += 38 * (S += i * z)), - (u += 38 * (x += i * F)), - (f += 38 * (A += i * q)), - (c += 38 * (k += i * H)), - (l += 38 * (R += i * $)), - (d += 38 * (B += i * Z)), - (p += 38 * (I += i * G)), - (m += 38 * (T += i * V)), - (g += 38 * (P += i * W)), - (b += 38 * (O += i * K)), - (y += 38 * (L += i * Y)), - (v += 38 * (C += i * J)), - (o = (i = (o += 38 * (_ += i * j)) + (n = 1) + 65535) - 65536 * (n = Math.floor(i / 65536))), - (s = (i = s + n + 65535) - 65536 * (n = Math.floor(i / 65536))), - (a = (i = a + n + 65535) - 65536 * (n = Math.floor(i / 65536))), - (h = (i = h + n + 65535) - 65536 * (n = Math.floor(i / 65536))), - (u = (i = u + n + 65535) - 65536 * (n = Math.floor(i / 65536))), - (f = (i = f + n + 65535) - 65536 * (n = Math.floor(i / 65536))), - (c = (i = c + n + 65535) - 65536 * (n = Math.floor(i / 65536))), - (l = (i = l + n + 65535) - 65536 * (n = Math.floor(i / 65536))), - (d = (i = d + n + 65535) - 65536 * (n = Math.floor(i / 65536))), - (p = (i = p + n + 65535) - 65536 * (n = Math.floor(i / 65536))), - (m = (i = m + n + 65535) - 65536 * (n = Math.floor(i / 65536))), - (g = (i = g + n + 65535) - 65536 * (n = Math.floor(i / 65536))), - (b = (i = b + n + 65535) - 65536 * (n = Math.floor(i / 65536))), - (y = (i = y + n + 65535) - 65536 * (n = Math.floor(i / 65536))), - (v = (i = v + n + 65535) - 65536 * (n = Math.floor(i / 65536))), - (w = (i = w + n + 65535) - 65536 * (n = Math.floor(i / 65536))), - (o = (i = (o += n - 1 + 37 * (n - 1)) + (n = 1) + 65535) - 65536 * (n = Math.floor(i / 65536))), - (s = (i = s + n + 65535) - 65536 * (n = Math.floor(i / 65536))), - (a = (i = a + n + 65535) - 65536 * (n = Math.floor(i / 65536))), - (h = (i = h + n + 65535) - 65536 * (n = Math.floor(i / 65536))), - (u = (i = u + n + 65535) - 65536 * (n = Math.floor(i / 65536))), - (f = (i = f + n + 65535) - 65536 * (n = Math.floor(i / 65536))), - (c = (i = c + n + 65535) - 65536 * (n = Math.floor(i / 65536))), - (l = (i = l + n + 65535) - 65536 * (n = Math.floor(i / 65536))), - (d = (i = d + n + 65535) - 65536 * (n = Math.floor(i / 65536))), - (p = (i = p + n + 65535) - 65536 * (n = Math.floor(i / 65536))), - (m = (i = m + n + 65535) - 65536 * (n = Math.floor(i / 65536))), - (g = (i = g + n + 65535) - 65536 * (n = Math.floor(i / 65536))), - (b = (i = b + n + 65535) - 65536 * (n = Math.floor(i / 65536))), - (y = (i = y + n + 65535) - 65536 * (n = Math.floor(i / 65536))), - (v = (i = v + n + 65535) - 65536 * (n = Math.floor(i / 65536))), - (w = (i = w + n + 65535) - 65536 * (n = Math.floor(i / 65536))), - (o += n - 1 + 37 * (n - 1)), - (t[0] = o), - (t[1] = s), - (t[2] = a), - (t[3] = h), - (t[4] = u), - (t[5] = f), - (t[6] = c), - (t[7] = l), - (t[8] = d), - (t[9] = p), - (t[10] = m), - (t[11] = g), - (t[12] = b), - (t[13] = y), - (t[14] = v), - (t[15] = w); - } - function z(t, e) { - D(t, e, e); - } - function F(t, r) { - var i, - n = e(); - for (i = 0; i < 16; i++) n[i] = r[i]; - for (i = 253; i >= 0; i--) z(n, n), 2 !== i && 4 !== i && D(n, n, r); - for (i = 0; i < 16; i++) t[i] = n[i]; - } - function q(t, r) { - var i, - n = e(); - for (i = 0; i < 16; i++) n[i] = r[i]; - for (i = 250; i >= 0; i--) z(n, n), 1 !== i && D(n, n, r); - for (i = 0; i < 16; i++) t[i] = n[i]; - } - function H(t, r, i) { - var n, - o, - s = new Uint8Array(32), - a = new Float64Array(80), - u = e(), - f = e(), - c = e(), - l = e(), - d = e(), - p = e(); - for (o = 0; o < 31; o++) s[o] = r[o]; - for (s[31] = (127 & r[31]) | 64, s[0] &= 248, N(a, i), o = 0; o < 16; o++) (f[o] = a[o]), (l[o] = u[o] = c[o] = 0); - for (u[0] = l[0] = 1, o = 254; o >= 0; --o) - P(u, f, (n = (s[o >>> 3] >>> (7 & o)) & 1)), - P(c, l, n), - j(d, u, c), - U(u, u, c), - j(c, f, l), - U(f, f, l), - z(l, d), - z(p, u), - D(u, c, u), - D(c, f, d), - j(d, u, c), - U(u, u, c), - z(f, u), - U(c, l, p), - D(u, c, h), - j(u, u, l), - D(c, c, u), - D(u, l, p), - D(l, f, a), - z(f, d), - P(u, f, n), - P(c, l, n); - for (o = 0; o < 16; o++) (a[o + 16] = u[o]), (a[o + 32] = c[o]), (a[o + 48] = f[o]), (a[o + 64] = l[o]); - var m = a.subarray(32), - g = a.subarray(16); - return F(m, m), D(g, g, m), O(t, g), 0; - } - function $(t, e) { - return H(t, e, o); - } - function Z(t, e) { - return i(e, 32), $(t, e); - } - function G(t, e, r) { - var i = new Uint8Array(32); - return H(i, r, e), v(t, n, i, w); - } - (x.prototype.blocks = function (t, e, r) { - for ( - var i, - n, - o, - s, - a, - h, - u, - f, - c, - l, - d, - p, - m, - g, - b, - y, - v, - w, - _, - M = this.fin ? 0 : 2048, - E = this.h[0], - S = this.h[1], - x = this.h[2], - A = this.h[3], - k = this.h[4], - R = this.h[5], - B = this.h[6], - I = this.h[7], - T = this.h[8], - P = this.h[9], - O = this.r[0], - L = this.r[1], - C = this.r[2], - N = this.r[3], - j = this.r[4], - U = this.r[5], - D = this.r[6], - z = this.r[7], - F = this.r[8], - q = this.r[9]; - r >= 16; - - ) - (l = c = 0), - (l += (E += 8191 & (i = (255 & t[e + 0]) | ((255 & t[e + 1]) << 8))) * O), - (l += (S += 8191 & ((i >>> 13) | ((n = (255 & t[e + 2]) | ((255 & t[e + 3]) << 8)) << 3))) * (5 * q)), - (l += (x += 8191 & ((n >>> 10) | ((o = (255 & t[e + 4]) | ((255 & t[e + 5]) << 8)) << 6))) * (5 * F)), - (l += (A += 8191 & ((o >>> 7) | ((s = (255 & t[e + 6]) | ((255 & t[e + 7]) << 8)) << 9))) * (5 * z)), - (c = (l += (k += 8191 & ((s >>> 4) | ((a = (255 & t[e + 8]) | ((255 & t[e + 9]) << 8)) << 12))) * (5 * D)) >>> 13), - (l &= 8191), - (l += (R += (a >>> 1) & 8191) * (5 * U)), - (l += (B += 8191 & ((a >>> 14) | ((h = (255 & t[e + 10]) | ((255 & t[e + 11]) << 8)) << 2))) * (5 * j)), - (l += (I += 8191 & ((h >>> 11) | ((u = (255 & t[e + 12]) | ((255 & t[e + 13]) << 8)) << 5))) * (5 * N)), - (l += (T += 8191 & ((u >>> 8) | ((f = (255 & t[e + 14]) | ((255 & t[e + 15]) << 8)) << 8))) * (5 * C)), - (d = c += (l += (P += (f >>> 5) | M) * (5 * L)) >>> 13), - (d += E * L), - (d += S * O), - (d += x * (5 * q)), - (d += A * (5 * F)), - (c = (d += k * (5 * z)) >>> 13), - (d &= 8191), - (d += R * (5 * D)), - (d += B * (5 * U)), - (d += I * (5 * j)), - (d += T * (5 * N)), - (c += (d += P * (5 * C)) >>> 13), - (d &= 8191), - (p = c), - (p += E * C), - (p += S * L), - (p += x * O), - (p += A * (5 * q)), - (c = (p += k * (5 * F)) >>> 13), - (p &= 8191), - (p += R * (5 * z)), - (p += B * (5 * D)), - (p += I * (5 * U)), - (p += T * (5 * j)), - (m = c += (p += P * (5 * N)) >>> 13), - (m += E * N), - (m += S * C), - (m += x * L), - (m += A * O), - (c = (m += k * (5 * q)) >>> 13), - (m &= 8191), - (m += R * (5 * F)), - (m += B * (5 * z)), - (m += I * (5 * D)), - (m += T * (5 * U)), - (g = c += (m += P * (5 * j)) >>> 13), - (g += E * j), - (g += S * N), - (g += x * C), - (g += A * L), - (c = (g += k * O) >>> 13), - (g &= 8191), - (g += R * (5 * q)), - (g += B * (5 * F)), - (g += I * (5 * z)), - (g += T * (5 * D)), - (b = c += (g += P * (5 * U)) >>> 13), - (b += E * U), - (b += S * j), - (b += x * N), - (b += A * C), - (c = (b += k * L) >>> 13), - (b &= 8191), - (b += R * O), - (b += B * (5 * q)), - (b += I * (5 * F)), - (b += T * (5 * z)), - (y = c += (b += P * (5 * D)) >>> 13), - (y += E * D), - (y += S * U), - (y += x * j), - (y += A * N), - (c = (y += k * C) >>> 13), - (y &= 8191), - (y += R * L), - (y += B * O), - (y += I * (5 * q)), - (y += T * (5 * F)), - (v = c += (y += P * (5 * z)) >>> 13), - (v += E * z), - (v += S * D), - (v += x * U), - (v += A * j), - (c = (v += k * N) >>> 13), - (v &= 8191), - (v += R * C), - (v += B * L), - (v += I * O), - (v += T * (5 * q)), - (w = c += (v += P * (5 * F)) >>> 13), - (w += E * F), - (w += S * z), - (w += x * D), - (w += A * U), - (c = (w += k * j) >>> 13), - (w &= 8191), - (w += R * N), - (w += B * C), - (w += I * L), - (w += T * O), - (_ = c += (w += P * (5 * q)) >>> 13), - (_ += E * q), - (_ += S * F), - (_ += x * z), - (_ += A * D), - (c = (_ += k * U) >>> 13), - (_ &= 8191), - (_ += R * j), - (_ += B * N), - (_ += I * C), - (_ += T * L), - (E = l = 8191 & (c = ((c = (((c += (_ += P * O) >>> 13) << 2) + c) | 0) + (l &= 8191)) | 0)), - (S = d += c >>>= 13), - (x = p &= 8191), - (A = m &= 8191), - (k = g &= 8191), - (R = b &= 8191), - (B = y &= 8191), - (I = v &= 8191), - (T = w &= 8191), - (P = _ &= 8191), - (e += 16), - (r -= 16); - (this.h[0] = E), - (this.h[1] = S), - (this.h[2] = x), - (this.h[3] = A), - (this.h[4] = k), - (this.h[5] = R), - (this.h[6] = B), - (this.h[7] = I), - (this.h[8] = T), - (this.h[9] = P); - }), - (x.prototype.finish = function (t, e) { - var r, - i, - n, - o, - s = new Uint16Array(10); - if (this.leftover) { - for (o = this.leftover, this.buffer[o++] = 1; o < 16; o++) this.buffer[o] = 0; - (this.fin = 1), this.blocks(this.buffer, 0, 16); - } - for (r = this.h[1] >>> 13, this.h[1] &= 8191, o = 2; o < 10; o++) - (this.h[o] += r), (r = this.h[o] >>> 13), (this.h[o] &= 8191); - for ( - this.h[0] += 5 * r, - r = this.h[0] >>> 13, - this.h[0] &= 8191, - this.h[1] += r, - r = this.h[1] >>> 13, - this.h[1] &= 8191, - this.h[2] += r, - s[0] = this.h[0] + 5, - r = s[0] >>> 13, - s[0] &= 8191, - o = 1; - o < 10; - o++ - ) - (s[o] = this.h[o] + r), (r = s[o] >>> 13), (s[o] &= 8191); - for (s[9] -= 8192, i = (1 ^ r) - 1, o = 0; o < 10; o++) s[o] &= i; - for (i = ~i, o = 0; o < 10; o++) this.h[o] = (this.h[o] & i) | s[o]; - for ( - this.h[0] = 65535 & (this.h[0] | (this.h[1] << 13)), - this.h[1] = 65535 & ((this.h[1] >>> 3) | (this.h[2] << 10)), - this.h[2] = 65535 & ((this.h[2] >>> 6) | (this.h[3] << 7)), - this.h[3] = 65535 & ((this.h[3] >>> 9) | (this.h[4] << 4)), - this.h[4] = 65535 & ((this.h[4] >>> 12) | (this.h[5] << 1) | (this.h[6] << 14)), - this.h[5] = 65535 & ((this.h[6] >>> 2) | (this.h[7] << 11)), - this.h[6] = 65535 & ((this.h[7] >>> 5) | (this.h[8] << 8)), - this.h[7] = 65535 & ((this.h[8] >>> 8) | (this.h[9] << 5)), - n = this.h[0] + this.pad[0], - this.h[0] = 65535 & n, - o = 1; - o < 8; - o++ - ) - (n = (((this.h[o] + this.pad[o]) | 0) + (n >>> 16)) | 0), (this.h[o] = 65535 & n); - (t[e + 0] = (this.h[0] >>> 0) & 255), - (t[e + 1] = (this.h[0] >>> 8) & 255), - (t[e + 2] = (this.h[1] >>> 0) & 255), - (t[e + 3] = (this.h[1] >>> 8) & 255), - (t[e + 4] = (this.h[2] >>> 0) & 255), - (t[e + 5] = (this.h[2] >>> 8) & 255), - (t[e + 6] = (this.h[3] >>> 0) & 255), - (t[e + 7] = (this.h[3] >>> 8) & 255), - (t[e + 8] = (this.h[4] >>> 0) & 255), - (t[e + 9] = (this.h[4] >>> 8) & 255), - (t[e + 10] = (this.h[5] >>> 0) & 255), - (t[e + 11] = (this.h[5] >>> 8) & 255), - (t[e + 12] = (this.h[6] >>> 0) & 255), - (t[e + 13] = (this.h[6] >>> 8) & 255), - (t[e + 14] = (this.h[7] >>> 0) & 255), - (t[e + 15] = (this.h[7] >>> 8) & 255); - }), - (x.prototype.update = function (t, e, r) { - var i, n; - if (this.leftover) { - for ((n = 16 - this.leftover) > r && (n = r), i = 0; i < n; i++) this.buffer[this.leftover + i] = t[e + i]; - if (((r -= n), (e += n), (this.leftover += n), this.leftover < 16)) return; - this.blocks(this.buffer, 0, 16), (this.leftover = 0); - } - if ((r >= 16 && ((n = r - (r % 16)), this.blocks(t, e, n), (e += n), (r -= n)), r)) { - for (i = 0; i < r; i++) this.buffer[this.leftover + i] = t[e + i]; - this.leftover += r; - } - }); - var V = R, - W = B, - K = [ - 1116352408, 3609767458, 1899447441, 602891725, 3049323471, 3964484399, 3921009573, 2173295548, 961987163, 4081628472, - 1508970993, 3053834265, 2453635748, 2937671579, 2870763221, 3664609560, 3624381080, 2734883394, 310598401, 1164996542, - 607225278, 1323610764, 1426881987, 3590304994, 1925078388, 4068182383, 2162078206, 991336113, 2614888103, 633803317, - 3248222580, 3479774868, 3835390401, 2666613458, 4022224774, 944711139, 264347078, 2341262773, 604807628, 2007800933, - 770255983, 1495990901, 1249150122, 1856431235, 1555081692, 3175218132, 1996064986, 2198950837, 2554220882, 3999719339, - 2821834349, 766784016, 2952996808, 2566594879, 3210313671, 3203337956, 3336571891, 1034457026, 3584528711, 2466948901, - 113926993, 3758326383, 338241895, 168717936, 666307205, 1188179964, 773529912, 1546045734, 1294757372, 1522805485, 1396182291, - 2643833823, 1695183700, 2343527390, 1986661051, 1014477480, 2177026350, 1206759142, 2456956037, 344077627, 2730485921, - 1290863460, 2820302411, 3158454273, 3259730800, 3505952657, 3345764771, 106217008, 3516065817, 3606008344, 3600352804, - 1432725776, 4094571909, 1467031594, 275423344, 851169720, 430227734, 3100823752, 506948616, 1363258195, 659060556, 3750685593, - 883997877, 3785050280, 958139571, 3318307427, 1322822218, 3812723403, 1537002063, 2003034995, 1747873779, 3602036899, - 1955562222, 1575990012, 2024104815, 1125592928, 2227730452, 2716904306, 2361852424, 442776044, 2428436474, 593698344, - 2756734187, 3733110249, 3204031479, 2999351573, 3329325298, 3815920427, 3391569614, 3928383900, 3515267271, 566280711, - 3940187606, 3454069534, 4118630271, 4000239992, 116418474, 1914138554, 174292421, 2731055270, 289380356, 3203993006, - 460393269, 320620315, 685471733, 587496836, 852142971, 1086792851, 1017036298, 365543100, 1126000580, 2618297676, 1288033470, - 3409855158, 1501505948, 4234509866, 1607167915, 987167468, 1816402316, 1246189591, - ]; - function Y(t, e, r, i) { - for ( - var n, - o, - s, - a, - h, - u, - f, - c, - l, - d, - p, - m, - g, - b, - y, - v, - w, - _, - M, - E, - S, - x, - A, - k, - R, - B, - I = new Int32Array(16), - T = new Int32Array(16), - P = t[0], - O = t[1], - L = t[2], - C = t[3], - N = t[4], - j = t[5], - U = t[6], - D = t[7], - z = e[0], - F = e[1], - q = e[2], - H = e[3], - $ = e[4], - Z = e[5], - G = e[6], - V = e[7], - W = 0; - i >= 128; - - ) { - for (M = 0; M < 16; M++) - (E = 8 * M + W), - (I[M] = (r[E + 0] << 24) | (r[E + 1] << 16) | (r[E + 2] << 8) | r[E + 3]), - (T[M] = (r[E + 4] << 24) | (r[E + 5] << 16) | (r[E + 6] << 8) | r[E + 7]); - for (M = 0; M < 80; M++) - if ( - ((n = P), - (o = O), - (s = L), - (a = C), - (h = N), - (u = j), - (f = U), - (l = z), - (d = F), - (p = q), - (m = H), - (g = $), - (b = Z), - (y = G), - (A = 65535 & (x = V)), - (k = x >>> 16), - (R = 65535 & (S = D)), - (B = S >>> 16), - (A += 65535 & (x = (($ >>> 14) | (N << 18)) ^ (($ >>> 18) | (N << 14)) ^ ((N >>> 9) | ($ << 23)))), - (k += x >>> 16), - (R += 65535 & (S = ((N >>> 14) | ($ << 18)) ^ ((N >>> 18) | ($ << 14)) ^ (($ >>> 9) | (N << 23)))), - (B += S >>> 16), - (A += 65535 & (x = ($ & Z) ^ (~$ & G))), - (k += x >>> 16), - (R += 65535 & (S = (N & j) ^ (~N & U))), - (B += S >>> 16), - (S = K[2 * M]), - (A += 65535 & (x = K[2 * M + 1])), - (k += x >>> 16), - (R += 65535 & S), - (B += S >>> 16), - (S = I[M % 16]), - (k += (x = T[M % 16]) >>> 16), - (R += 65535 & S), - (B += S >>> 16), - (R += (k += (A += 65535 & x) >>> 16) >>> 16), - (A = 65535 & (x = _ = (65535 & A) | (k << 16))), - (k = x >>> 16), - (R = 65535 & (S = w = (65535 & R) | ((B += R >>> 16) << 16))), - (B = S >>> 16), - (A += 65535 & (x = ((z >>> 28) | (P << 4)) ^ ((P >>> 2) | (z << 30)) ^ ((P >>> 7) | (z << 25)))), - (k += x >>> 16), - (R += 65535 & (S = ((P >>> 28) | (z << 4)) ^ ((z >>> 2) | (P << 30)) ^ ((z >>> 7) | (P << 25)))), - (B += S >>> 16), - (k += (x = (z & F) ^ (z & q) ^ (F & q)) >>> 16), - (R += 65535 & (S = (P & O) ^ (P & L) ^ (O & L))), - (B += S >>> 16), - (c = (65535 & (R += (k += (A += 65535 & x) >>> 16) >>> 16)) | ((B += R >>> 16) << 16)), - (v = (65535 & A) | (k << 16)), - (A = 65535 & (x = m)), - (k = x >>> 16), - (R = 65535 & (S = a)), - (B = S >>> 16), - (k += (x = _) >>> 16), - (R += 65535 & (S = w)), - (B += S >>> 16), - (O = n), - (L = o), - (C = s), - (N = a = (65535 & (R += (k += (A += 65535 & x) >>> 16) >>> 16)) | ((B += R >>> 16) << 16)), - (j = h), - (U = u), - (D = f), - (P = c), - (F = l), - (q = d), - (H = p), - ($ = m = (65535 & A) | (k << 16)), - (Z = g), - (G = b), - (V = y), - (z = v), - M % 16 == 15) - ) - for (E = 0; E < 16; E++) - (S = I[E]), - (A = 65535 & (x = T[E])), - (k = x >>> 16), - (R = 65535 & S), - (B = S >>> 16), - (S = I[(E + 9) % 16]), - (A += 65535 & (x = T[(E + 9) % 16])), - (k += x >>> 16), - (R += 65535 & S), - (B += S >>> 16), - (w = I[(E + 1) % 16]), - (A += 65535 & (x = (((_ = T[(E + 1) % 16]) >>> 1) | (w << 31)) ^ ((_ >>> 8) | (w << 24)) ^ ((_ >>> 7) | (w << 25)))), - (k += x >>> 16), - (R += 65535 & (S = ((w >>> 1) | (_ << 31)) ^ ((w >>> 8) | (_ << 24)) ^ (w >>> 7))), - (B += S >>> 16), - (w = I[(E + 14) % 16]), - (k += (x = (((_ = T[(E + 14) % 16]) >>> 19) | (w << 13)) ^ ((w >>> 29) | (_ << 3)) ^ ((_ >>> 6) | (w << 26))) >>> 16), - (R += 65535 & (S = ((w >>> 19) | (_ << 13)) ^ ((_ >>> 29) | (w << 3)) ^ (w >>> 6))), - (B += S >>> 16), - (B += (R += (k += (A += 65535 & x) >>> 16) >>> 16) >>> 16), - (I[E] = (65535 & R) | (B << 16)), - (T[E] = (65535 & A) | (k << 16)); - (A = 65535 & (x = z)), - (k = x >>> 16), - (R = 65535 & (S = P)), - (B = S >>> 16), - (S = t[0]), - (k += (x = e[0]) >>> 16), - (R += 65535 & S), - (B += S >>> 16), - (B += (R += (k += (A += 65535 & x) >>> 16) >>> 16) >>> 16), - (t[0] = P = (65535 & R) | (B << 16)), - (e[0] = z = (65535 & A) | (k << 16)), - (A = 65535 & (x = F)), - (k = x >>> 16), - (R = 65535 & (S = O)), - (B = S >>> 16), - (S = t[1]), - (k += (x = e[1]) >>> 16), - (R += 65535 & S), - (B += S >>> 16), - (B += (R += (k += (A += 65535 & x) >>> 16) >>> 16) >>> 16), - (t[1] = O = (65535 & R) | (B << 16)), - (e[1] = F = (65535 & A) | (k << 16)), - (A = 65535 & (x = q)), - (k = x >>> 16), - (R = 65535 & (S = L)), - (B = S >>> 16), - (S = t[2]), - (k += (x = e[2]) >>> 16), - (R += 65535 & S), - (B += S >>> 16), - (B += (R += (k += (A += 65535 & x) >>> 16) >>> 16) >>> 16), - (t[2] = L = (65535 & R) | (B << 16)), - (e[2] = q = (65535 & A) | (k << 16)), - (A = 65535 & (x = H)), - (k = x >>> 16), - (R = 65535 & (S = C)), - (B = S >>> 16), - (S = t[3]), - (k += (x = e[3]) >>> 16), - (R += 65535 & S), - (B += S >>> 16), - (B += (R += (k += (A += 65535 & x) >>> 16) >>> 16) >>> 16), - (t[3] = C = (65535 & R) | (B << 16)), - (e[3] = H = (65535 & A) | (k << 16)), - (A = 65535 & (x = $)), - (k = x >>> 16), - (R = 65535 & (S = N)), - (B = S >>> 16), - (S = t[4]), - (k += (x = e[4]) >>> 16), - (R += 65535 & S), - (B += S >>> 16), - (B += (R += (k += (A += 65535 & x) >>> 16) >>> 16) >>> 16), - (t[4] = N = (65535 & R) | (B << 16)), - (e[4] = $ = (65535 & A) | (k << 16)), - (A = 65535 & (x = Z)), - (k = x >>> 16), - (R = 65535 & (S = j)), - (B = S >>> 16), - (S = t[5]), - (k += (x = e[5]) >>> 16), - (R += 65535 & S), - (B += S >>> 16), - (B += (R += (k += (A += 65535 & x) >>> 16) >>> 16) >>> 16), - (t[5] = j = (65535 & R) | (B << 16)), - (e[5] = Z = (65535 & A) | (k << 16)), - (A = 65535 & (x = G)), - (k = x >>> 16), - (R = 65535 & (S = U)), - (B = S >>> 16), - (S = t[6]), - (k += (x = e[6]) >>> 16), - (R += 65535 & S), - (B += S >>> 16), - (B += (R += (k += (A += 65535 & x) >>> 16) >>> 16) >>> 16), - (t[6] = U = (65535 & R) | (B << 16)), - (e[6] = G = (65535 & A) | (k << 16)), - (A = 65535 & (x = V)), - (k = x >>> 16), - (R = 65535 & (S = D)), - (B = S >>> 16), - (S = t[7]), - (k += (x = e[7]) >>> 16), - (R += 65535 & S), - (B += S >>> 16), - (B += (R += (k += (A += 65535 & x) >>> 16) >>> 16) >>> 16), - (t[7] = D = (65535 & R) | (B << 16)), - (e[7] = V = (65535 & A) | (k << 16)), - (W += 128), - (i -= 128); - } - return i; - } - function J(t, e, r) { - var i, - n = new Int32Array(8), - o = new Int32Array(8), - s = new Uint8Array(256), - a = r; - for ( - n[0] = 1779033703, - n[1] = 3144134277, - n[2] = 1013904242, - n[3] = 2773480762, - n[4] = 1359893119, - n[5] = 2600822924, - n[6] = 528734635, - n[7] = 1541459225, - o[0] = 4089235720, - o[1] = 2227873595, - o[2] = 4271175723, - o[3] = 1595750129, - o[4] = 2917565137, - o[5] = 725511199, - o[6] = 4215389547, - o[7] = 327033209, - Y(n, o, e, r), - r %= 128, - i = 0; - i < r; - i++ - ) - s[i] = e[a - r + i]; - for ( - s[r] = 128, s[(r = 256 - 128 * (r < 112 ? 1 : 0)) - 9] = 0, p(s, r - 8, (a / 536870912) | 0, a << 3), Y(n, o, s, r), i = 0; - i < 8; - i++ - ) - p(t, 8 * i, n[i], o[i]); - return 0; - } - function X(t, r) { - var i = e(), - n = e(), - o = e(), - s = e(), - a = e(), - h = e(), - u = e(), - c = e(), - l = e(); - U(i, t[1], t[0]), - U(l, r[1], r[0]), - D(i, i, l), - j(n, t[0], t[1]), - j(l, r[0], r[1]), - D(n, n, l), - D(o, t[3], r[3]), - D(o, o, f), - D(s, t[2], r[2]), - j(s, s, s), - U(a, n, i), - U(h, s, o), - j(u, s, o), - j(c, n, i), - D(t[0], a, h), - D(t[1], c, u), - D(t[2], u, h), - D(t[3], a, c); - } - function Q(t, e, r) { - var i; - for (i = 0; i < 4; i++) P(t[i], e[i], r); - } - function tt(t, r) { - var i = e(), - n = e(), - o = e(); - F(o, r[2]), D(i, r[0], o), D(n, r[1], o), O(t, n), (t[31] ^= C(i) << 7); - } - function et(t, e, r) { - var i, n; - for (I(t[0], s), I(t[1], a), I(t[2], a), I(t[3], s), n = 255; n >= 0; --n) - Q(t, e, (i = (r[(n / 8) | 0] >> (7 & n)) & 1)), X(e, t), X(t, t), Q(t, e, i); - } - function rt(t, r) { - var i = [e(), e(), e(), e()]; - I(i[0], c), I(i[1], l), I(i[2], a), D(i[3], c, l), et(t, i, r); - } - function it(t, r, n) { - var o, - s = new Uint8Array(64), - a = [e(), e(), e(), e()]; - for (n || i(r, 32), J(s, r, 32), s[0] &= 248, s[31] &= 127, s[31] |= 64, rt(a, s), tt(t, a), o = 0; o < 32; o++) - r[o + 32] = t[o]; - return 0; - } - var nt = new Float64Array([ - 237, 211, 245, 92, 26, 99, 18, 88, 214, 156, 247, 162, 222, 249, 222, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, - ]); - function ot(t, e) { - var r, i, n, o; - for (i = 63; i >= 32; --i) { - for (r = 0, n = i - 32, o = i - 12; n < o; ++n) - (e[n] += r - 16 * e[i] * nt[n - (i - 32)]), (r = Math.floor((e[n] + 128) / 256)), (e[n] -= 256 * r); - (e[n] += r), (e[i] = 0); - } - for (r = 0, n = 0; n < 32; n++) (e[n] += r - (e[31] >> 4) * nt[n]), (r = e[n] >> 8), (e[n] &= 255); - for (n = 0; n < 32; n++) e[n] -= r * nt[n]; - for (i = 0; i < 32; i++) (e[i + 1] += e[i] >> 8), (t[i] = 255 & e[i]); - } - function st(t) { - var e, - r = new Float64Array(64); - for (e = 0; e < 64; e++) r[e] = t[e]; - for (e = 0; e < 64; e++) t[e] = 0; - ot(t, r); - } - function at(t, r, i, n) { - var o, - s, - a = new Uint8Array(64), - h = new Uint8Array(64), - u = new Uint8Array(64), - f = new Float64Array(64), - c = [e(), e(), e(), e()]; - J(a, n, 32), (a[0] &= 248), (a[31] &= 127), (a[31] |= 64); - var l = i + 64; - for (o = 0; o < i; o++) t[64 + o] = r[o]; - for (o = 0; o < 32; o++) t[32 + o] = a[32 + o]; - for (J(u, t.subarray(32), i + 32), st(u), rt(c, u), tt(t, c), o = 32; o < 64; o++) t[o] = n[o]; - for (J(h, t, i + 64), st(h), o = 0; o < 64; o++) f[o] = 0; - for (o = 0; o < 32; o++) f[o] = u[o]; - for (o = 0; o < 32; o++) for (s = 0; s < 32; s++) f[o + s] += h[o] * a[s]; - return ot(t.subarray(32), f), l; - } - function ht(t, r, i, n) { - var o, - h = new Uint8Array(32), - f = new Uint8Array(64), - c = [e(), e(), e(), e()], - l = [e(), e(), e(), e()]; - if (i < 64) return -1; - if ( - (function (t, r) { - var i = e(), - n = e(), - o = e(), - h = e(), - f = e(), - c = e(), - l = e(); - return ( - I(t[2], a), - N(t[1], r), - z(o, t[1]), - D(h, o, u), - U(o, o, t[2]), - j(h, t[2], h), - z(f, h), - z(c, f), - D(l, c, f), - D(i, l, o), - D(i, i, h), - q(i, i), - D(i, i, o), - D(i, i, h), - D(i, i, h), - D(t[0], i, h), - z(n, t[0]), - D(n, n, h), - L(n, o) && D(t[0], t[0], d), - z(n, t[0]), - D(n, n, h), - L(n, o) ? -1 : (C(t[0]) === r[31] >> 7 && U(t[0], s, t[0]), D(t[3], t[0], t[1]), 0) - ); - })(l, n) - ) - return -1; - for (o = 0; o < i; o++) t[o] = r[o]; - for (o = 0; o < 32; o++) t[o + 32] = n[o]; - if ((J(f, t, i), st(f), et(c, l, f), rt(l, r.subarray(32)), X(c, l), tt(h, c), (i -= 64), b(r, 0, h, 0))) { - for (o = 0; o < i; o++) t[o] = 0; - return -1; - } - for (o = 0; o < i; o++) t[o] = r[o + 64]; - return i; - } - var ut = 64, - ft = 32, - ct = 64; - function lt(t, e) { - if (32 !== t.length) throw new Error('bad key size'); - if (24 !== e.length) throw new Error('bad nonce size'); - } - function dt() { - for (var t = 0; t < arguments.length; t++) - if (!(arguments[t] instanceof Uint8Array)) throw new TypeError('unexpected type, use Uint8Array'); - } - function pt(t) { - for (var e = 0; e < t.length; e++) t[e] = 0; - } - (t.lowlevel = { - crypto_core_hsalsa20: v, - crypto_stream_xor: S, - crypto_stream: E, - crypto_stream_salsa20_xor: _, - crypto_stream_salsa20: M, - crypto_onetimeauth: A, - crypto_onetimeauth_verify: k, - crypto_verify_16: g, - crypto_verify_32: b, - crypto_secretbox: R, - crypto_secretbox_open: B, - crypto_scalarmult: H, - crypto_scalarmult_base: $, - crypto_box_beforenm: G, - crypto_box_afternm: V, - crypto_box: function (t, e, r, i, n, o) { - var s = new Uint8Array(32); - return G(s, n, o), V(t, e, r, i, s); - }, - crypto_box_open: function (t, e, r, i, n, o) { - var s = new Uint8Array(32); - return G(s, n, o), W(t, e, r, i, s); - }, - crypto_box_keypair: Z, - crypto_hash: J, - crypto_sign: at, - crypto_sign_keypair: it, - crypto_sign_open: ht, - crypto_secretbox_KEYBYTES: 32, - crypto_secretbox_NONCEBYTES: 24, - crypto_secretbox_ZEROBYTES: 32, - crypto_secretbox_BOXZEROBYTES: 16, - crypto_scalarmult_BYTES: 32, - crypto_scalarmult_SCALARBYTES: 32, - crypto_box_PUBLICKEYBYTES: 32, - crypto_box_SECRETKEYBYTES: 32, - crypto_box_BEFORENMBYTES: 32, - crypto_box_NONCEBYTES: 24, - crypto_box_ZEROBYTES: 32, - crypto_box_BOXZEROBYTES: 16, - crypto_sign_BYTES: ut, - crypto_sign_PUBLICKEYBYTES: ft, - crypto_sign_SECRETKEYBYTES: ct, - crypto_sign_SEEDBYTES: 32, - crypto_hash_BYTES: 64, - gf: e, - D: u, - L: nt, - pack25519: O, - unpack25519: N, - M: D, - A: j, - S: z, - Z: U, - pow2523: q, - add: X, - set25519: I, - modL: ot, - scalarmult: et, - scalarbase: rt, - }), - (t.randomBytes = function (t) { - var e = new Uint8Array(t); - return i(e, t), e; - }), - (t.secretbox = function (t, e, r) { - dt(t, e, r), lt(r, e); - for (var i = new Uint8Array(32 + t.length), n = new Uint8Array(i.length), o = 0; o < t.length; o++) i[o + 32] = t[o]; - return R(n, i, i.length, e, r), n.subarray(16); - }), - (t.secretbox.open = function (t, e, r) { - dt(t, e, r), lt(r, e); - for (var i = new Uint8Array(16 + t.length), n = new Uint8Array(i.length), o = 0; o < t.length; o++) i[o + 16] = t[o]; - return i.length < 32 || 0 !== B(n, i, i.length, e, r) ? null : n.subarray(32); - }), - (t.secretbox.keyLength = 32), - (t.secretbox.nonceLength = 24), - (t.secretbox.overheadLength = 16), - (t.scalarMult = function (t, e) { - if ((dt(t, e), 32 !== t.length)) throw new Error('bad n size'); - if (32 !== e.length) throw new Error('bad p size'); - var r = new Uint8Array(32); - return H(r, t, e), r; - }), - (t.scalarMult.base = function (t) { - if ((dt(t), 32 !== t.length)) throw new Error('bad n size'); - var e = new Uint8Array(32); - return $(e, t), e; - }), - (t.scalarMult.scalarLength = 32), - (t.scalarMult.groupElementLength = 32), - (t.box = function (e, r, i, n) { - var o = t.box.before(i, n); - return t.secretbox(e, r, o); - }), - (t.box.before = function (t, e) { - dt(t, e), - (function (t, e) { - if (32 !== t.length) throw new Error('bad public key size'); - if (32 !== e.length) throw new Error('bad secret key size'); - })(t, e); - var r = new Uint8Array(32); - return G(r, t, e), r; - }), - (t.box.after = t.secretbox), - (t.box.open = function (e, r, i, n) { - var o = t.box.before(i, n); - return t.secretbox.open(e, r, o); - }), - (t.box.open.after = t.secretbox.open), - (t.box.keyPair = function () { - var t = new Uint8Array(32), - e = new Uint8Array(32); - return Z(t, e), { publicKey: t, secretKey: e }; - }), - (t.box.keyPair.fromSecretKey = function (t) { - if ((dt(t), 32 !== t.length)) throw new Error('bad secret key size'); - var e = new Uint8Array(32); - return $(e, t), { publicKey: e, secretKey: new Uint8Array(t) }; - }), - (t.box.publicKeyLength = 32), - (t.box.secretKeyLength = 32), - (t.box.sharedKeyLength = 32), - (t.box.nonceLength = 24), - (t.box.overheadLength = t.secretbox.overheadLength), - (t.sign = function (t, e) { - if ((dt(t, e), e.length !== ct)) throw new Error('bad secret key size'); - var r = new Uint8Array(ut + t.length); - return at(r, t, t.length, e), r; - }), - (t.sign.open = function (t, e) { - if ((dt(t, e), e.length !== ft)) throw new Error('bad public key size'); - var r = new Uint8Array(t.length), - i = ht(r, t, t.length, e); - if (i < 0) return null; - for (var n = new Uint8Array(i), o = 0; o < n.length; o++) n[o] = r[o]; - return n; - }), - (t.sign.detached = function (e, r) { - for (var i = t.sign(e, r), n = new Uint8Array(ut), o = 0; o < n.length; o++) n[o] = i[o]; - return n; - }), - (t.sign.detached.verify = function (t, e, r) { - if ((dt(t, e, r), e.length !== ut)) throw new Error('bad signature size'); - if (r.length !== ft) throw new Error('bad public key size'); - var i, - n = new Uint8Array(ut + t.length), - o = new Uint8Array(ut + t.length); - for (i = 0; i < ut; i++) n[i] = e[i]; - for (i = 0; i < t.length; i++) n[i + ut] = t[i]; - return ht(o, n, n.length, r) >= 0; - }), - (t.sign.keyPair = function () { - var t = new Uint8Array(ft), - e = new Uint8Array(ct); - return it(t, e), { publicKey: t, secretKey: e }; - }), - (t.sign.keyPair.fromSecretKey = function (t) { - if ((dt(t), t.length !== ct)) throw new Error('bad secret key size'); - for (var e = new Uint8Array(ft), r = 0; r < e.length; r++) e[r] = t[32 + r]; - return { publicKey: e, secretKey: new Uint8Array(t) }; - }), - (t.sign.keyPair.fromSeed = function (t) { - if ((dt(t), 32 !== t.length)) throw new Error('bad seed size'); - for (var e = new Uint8Array(ft), r = new Uint8Array(ct), i = 0; i < 32; i++) r[i] = t[i]; - return it(e, r, !0), { publicKey: e, secretKey: r }; - }), - (t.sign.publicKeyLength = ft), - (t.sign.secretKeyLength = ct), - (t.sign.seedLength = 32), - (t.sign.signatureLength = ut), - (t.hash = function (t) { - dt(t); - var e = new Uint8Array(64); - return J(e, t, t.length), e; - }), - (t.hash.hashLength = 64), - (t.verify = function (t, e) { - return dt(t, e), 0 !== t.length && 0 !== e.length && t.length === e.length && 0 === m(t, 0, e, 0, t.length); - }), - (t.setPRNG = function (t) { - i = t; - }), - (function () { - var e = 'undefined' != typeof self ? self.crypto || self.msCrypto : null; - e && e.getRandomValues - ? t.setPRNG(function (t, r) { - var i, - n = new Uint8Array(r); - for (i = 0; i < r; i += 65536) e.getRandomValues(n.subarray(i, i + Math.min(r - i, 65536))); - for (i = 0; i < r; i++) t[i] = n[i]; - pt(n); - }) - : (e = r(2337)) && - e.randomBytes && - t.setPRNG(function (t, r) { - var i, - n = e.randomBytes(r); - for (i = 0; i < r; i++) t[i] = n[i]; - pt(n); - }); - })(); - })(t.exports ? t.exports : (self.nacl = self.nacl || {})); - }, - 2511: function (t, e, r) { - var i; - (t = r.nmd(t)), - (function (n) { - e && e.nodeType, t && t.nodeType; - var o = 'object' == typeof r.g && r.g; - o.global !== o && o.window !== o && o.self; - var s, - a = 2147483647, - h = 36, - u = 26, - f = 38, - c = 700, - l = /^xn--/, - d = /[^\x20-\x7E]/, - p = /[\x2E\u3002\uFF0E\uFF61]/g, - m = { - 'overflow': 'Overflow: input needs wider integers to process', - 'not-basic': 'Illegal input >= 0x80 (not a basic code point)', - 'invalid-input': 'Invalid input', - }, - g = h - 1, - b = Math.floor, - y = String.fromCharCode; - function v(t) { - throw RangeError(m[t]); - } - function w(t, e) { - for (var r = t.length, i = []; r--; ) i[r] = e(t[r]); - return i; - } - function _(t, e) { - var r = t.split('@'), - i = ''; - return r.length > 1 && ((i = r[0] + '@'), (t = r[1])), i + w((t = t.replace(p, '.')).split('.'), e).join('.'); - } - function M(t) { - for (var e, r, i = [], n = 0, o = t.length; n < o; ) - (e = t.charCodeAt(n++)) >= 55296 && e <= 56319 && n < o - ? 56320 == (64512 & (r = t.charCodeAt(n++))) - ? i.push(((1023 & e) << 10) + (1023 & r) + 65536) - : (i.push(e), n--) - : i.push(e); - return i; - } - function E(t) { - return w(t, function (t) { - var e = ''; - return t > 65535 && ((e += y((((t -= 65536) >>> 10) & 1023) | 55296)), (t = 56320 | (1023 & t))), e + y(t); - }).join(''); - } - function S(t, e) { - return t + 22 + 75 * (t < 26) - ((0 != e) << 5); - } - function x(t, e, r) { - var i = 0; - for (t = r ? b(t / c) : t >> 1, t += b(t / e); t > (g * u) >> 1; i += h) t = b(t / g); - return b(i + ((g + 1) * t) / (t + f)); - } - function A(t) { - var e, - r, - i, - n, - o, - s, - f, - c, - l, - d, - p, - m = [], - g = t.length, - y = 0, - w = 128, - _ = 72; - for ((r = t.lastIndexOf('-')) < 0 && (r = 0), i = 0; i < r; ++i) - t.charCodeAt(i) >= 128 && v('not-basic'), m.push(t.charCodeAt(i)); - for (n = r > 0 ? r + 1 : 0; n < g; ) { - for ( - o = y, s = 1, f = h; - n >= g && v('invalid-input'), - ((c = (p = t.charCodeAt(n++)) - 48 < 10 ? p - 22 : p - 65 < 26 ? p - 65 : p - 97 < 26 ? p - 97 : h) >= h || - c > b((a - y) / s)) && - v('overflow'), - (y += c * s), - !(c < (l = f <= _ ? 1 : f >= _ + u ? u : f - _)); - f += h - ) - s > b(a / (d = h - l)) && v('overflow'), (s *= d); - (_ = x(y - o, (e = m.length + 1), 0 == o)), - b(y / e) > a - w && v('overflow'), - (w += b(y / e)), - (y %= e), - m.splice(y++, 0, w); - } - return E(m); - } - function k(t) { - var e, - r, - i, - n, - o, - s, - f, - c, - l, - d, - p, - m, - g, - w, - _, - E = []; - for (m = (t = M(t)).length, e = 128, r = 0, o = 72, s = 0; s < m; ++s) (p = t[s]) < 128 && E.push(y(p)); - for (i = n = E.length, n && E.push('-'); i < m; ) { - for (f = a, s = 0; s < m; ++s) (p = t[s]) >= e && p < f && (f = p); - for (f - e > b((a - r) / (g = i + 1)) && v('overflow'), r += (f - e) * g, e = f, s = 0; s < m; ++s) - if (((p = t[s]) < e && ++r > a && v('overflow'), p == e)) { - for (c = r, l = h; !(c < (d = l <= o ? 1 : l >= o + u ? u : l - o)); l += h) - (_ = c - d), (w = h - d), E.push(y(S(d + (_ % w), 0))), (c = b(_ / w)); - E.push(y(S(c, 0))), (o = x(r, g, i == n)), (r = 0), ++i; - } - ++r, ++e; - } - return E.join(''); - } - (s = { - version: '1.3.2', - ucs2: { decode: M, encode: E }, - decode: A, - encode: k, - toASCII: function (t) { - return _(t, function (t) { - return d.test(t) ? 'xn--' + k(t) : t; - }); - }, - toUnicode: function (t) { - return _(t, function (t) { - return l.test(t) ? A(t.slice(4).toLowerCase()) : t; - }); - }, - }), - void 0 === - (i = function () { - return s; - }.call(e, r, e, t)) || (t.exports = i); - })(); - }, - 8575: (t, e, r) => { - var i = r(2511); - function n() { - (this.protocol = null), - (this.slashes = null), - (this.auth = null), - (this.host = null), - (this.port = null), - (this.hostname = null), - (this.hash = null), - (this.search = null), - (this.query = null), - (this.pathname = null), - (this.path = null), - (this.href = null); - } - (e.parse = b), - (e.resolve = function (t, e) { - return b(t, !1, !0).resolve(e); - }), - (e.resolveObject = function (t, e) { - return t ? b(t, !1, !0).resolveObject(e) : e; - }), - (e.format = function (t) { - return y(t) && (t = b(t)), t instanceof n ? t.format() : n.prototype.format.call(t); - }), - (e.Url = n); - var o = /^([a-z0-9.+-]+:)/i, - s = /:[0-9]*$/, - a = ['{', '}', '|', '\\', '^', '`'].concat(['<', '>', '"', '`', ' ', '\r', '\n', '\t']), - h = ["'"].concat(a), - u = ['%', '/', '?', ';', '#'].concat(h), - f = ['/', '?', '#'], - c = /^[a-z0-9A-Z_-]{0,63}$/, - l = /^([a-z0-9A-Z_-]{0,63})(.*)$/, - d = { 'javascript': !0, 'javascript:': !0 }, - p = { 'javascript': !0, 'javascript:': !0 }, - m = { - 'http': !0, - 'https': !0, - 'ftp': !0, - 'gopher': !0, - 'file': !0, - 'http:': !0, - 'https:': !0, - 'ftp:': !0, - 'gopher:': !0, - 'file:': !0, - }, - g = r(7735); - function b(t, e, r) { - if (t && v(t) && t instanceof n) return t; - var i = new n(); - return i.parse(t, e, r), i; - } - function y(t) { - return 'string' == typeof t; - } - function v(t) { - return 'object' == typeof t && null !== t; - } - function w(t) { - return null === t; - } - (n.prototype.parse = function (t, e, r) { - if (!y(t)) throw new TypeError("Parameter 'url' must be a string, not " + typeof t); - var n = t; - n = n.trim(); - var s = o.exec(n); - if (s) { - var a = (s = s[0]).toLowerCase(); - (this.protocol = a), (n = n.substr(s.length)); - } - if (r || s || n.match(/^\/\/[^@\/]+@[^@\/]+/)) { - var b = '//' === n.substr(0, 2); - !b || (s && p[s]) || ((n = n.substr(2)), (this.slashes = !0)); - } - if (!p[s] && (b || (s && !m[s]))) { - for (var v, w, _ = -1, M = 0; M < f.length; M++) -1 !== (E = n.indexOf(f[M])) && (-1 === _ || E < _) && (_ = E); - for ( - -1 !== (w = -1 === _ ? n.lastIndexOf('@') : n.lastIndexOf('@', _)) && - ((v = n.slice(0, w)), (n = n.slice(w + 1)), (this.auth = decodeURIComponent(v))), - _ = -1, - M = 0; - M < u.length; - M++ - ) { - var E; - -1 !== (E = n.indexOf(u[M])) && (-1 === _ || E < _) && (_ = E); - } - -1 === _ && (_ = n.length), - (this.host = n.slice(0, _)), - (n = n.slice(_)), - this.parseHost(), - (this.hostname = this.hostname || ''); - var S = '[' === this.hostname[0] && ']' === this.hostname[this.hostname.length - 1]; - if (!S) - for (var x = this.hostname.split(/\./), A = ((M = 0), x.length); M < A; M++) { - var k = x[M]; - if (k && !k.match(c)) { - for (var R = '', B = 0, I = k.length; B < I; B++) k.charCodeAt(B) > 127 ? (R += 'x') : (R += k[B]); - if (!R.match(c)) { - var T = x.slice(0, M), - P = x.slice(M + 1), - O = k.match(l); - O && (T.push(O[1]), P.unshift(O[2])), P.length && (n = '/' + P.join('.') + n), (this.hostname = T.join('.')); - break; - } - } - } - if ((this.hostname.length > 255 ? (this.hostname = '') : (this.hostname = this.hostname.toLowerCase()), !S)) { - var L = this.hostname.split('.'), - C = []; - for (M = 0; M < L.length; ++M) { - var N = L[M]; - C.push(N.match(/[^A-Za-z0-9_-]/) ? 'xn--' + i.encode(N) : N); - } - this.hostname = C.join('.'); - } - var j = this.port ? ':' + this.port : '', - U = this.hostname || ''; - (this.host = U + j), - (this.href += this.host), - S && ((this.hostname = this.hostname.substr(1, this.hostname.length - 2)), '/' !== n[0] && (n = '/' + n)); - } - if (!d[a]) - for (M = 0, A = h.length; M < A; M++) { - var D = h[M], - z = encodeURIComponent(D); - z === D && (z = escape(D)), (n = n.split(D).join(z)); - } - var F = n.indexOf('#'); - -1 !== F && ((this.hash = n.substr(F)), (n = n.slice(0, F))); - var q = n.indexOf('?'); - return ( - -1 !== q - ? ((this.search = n.substr(q)), (this.query = n.substr(q + 1)), e && (this.query = g.parse(this.query)), (n = n.slice(0, q))) - : e && ((this.search = ''), (this.query = {})), - n && (this.pathname = n), - m[a] && this.hostname && !this.pathname && (this.pathname = '/'), - (this.pathname || this.search) && ((j = this.pathname || ''), (N = this.search || ''), (this.path = j + N)), - (this.href = this.format()), - this - ); - }), - (n.prototype.format = function () { - var t = this.auth || ''; - t && ((t = (t = encodeURIComponent(t)).replace(/%3A/i, ':')), (t += '@')); - var e = this.protocol || '', - r = this.pathname || '', - i = this.hash || '', - n = !1, - o = ''; - this.host - ? (n = t + this.host) - : this.hostname && - ((n = t + (-1 === this.hostname.indexOf(':') ? this.hostname : '[' + this.hostname + ']')), - this.port && (n += ':' + this.port)), - this.query && v(this.query) && Object.keys(this.query).length && (o = g.stringify(this.query)); - var s = this.search || (o && '?' + o) || ''; - return ( - e && ':' !== e.substr(-1) && (e += ':'), - this.slashes || ((!e || m[e]) && !1 !== n) - ? ((n = '//' + (n || '')), r && '/' !== r.charAt(0) && (r = '/' + r)) - : n || (n = ''), - i && '#' !== i.charAt(0) && (i = '#' + i), - s && '?' !== s.charAt(0) && (s = '?' + s), - e + - n + - (r = r.replace(/[?#]/g, function (t) { - return encodeURIComponent(t); - })) + - (s = s.replace('#', '%23')) + - i - ); - }), - (n.prototype.resolve = function (t) { - return this.resolveObject(b(t, !1, !0)).format(); - }), - (n.prototype.resolveObject = function (t) { - if (y(t)) { - var e = new n(); - e.parse(t, !1, !0), (t = e); - } - var r = new n(); - if ( - (Object.keys(this).forEach(function (t) { - r[t] = this[t]; - }, this), - (r.hash = t.hash), - '' === t.href) - ) - return (r.href = r.format()), r; - if (t.slashes && !t.protocol) - return ( - Object.keys(t).forEach(function (e) { - 'protocol' !== e && (r[e] = t[e]); - }), - m[r.protocol] && r.hostname && !r.pathname && (r.path = r.pathname = '/'), - (r.href = r.format()), - r - ); - if (t.protocol && t.protocol !== r.protocol) { - if (!m[t.protocol]) - return ( - Object.keys(t).forEach(function (e) { - r[e] = t[e]; - }), - (r.href = r.format()), - r - ); - if (((r.protocol = t.protocol), t.host || p[t.protocol])) r.pathname = t.pathname; - else { - for (var i = (t.pathname || '').split('/'); i.length && !(t.host = i.shift()); ); - t.host || (t.host = ''), - t.hostname || (t.hostname = ''), - '' !== i[0] && i.unshift(''), - i.length < 2 && i.unshift(''), - (r.pathname = i.join('/')); - } - if ( - ((r.search = t.search), - (r.query = t.query), - (r.host = t.host || ''), - (r.auth = t.auth), - (r.hostname = t.hostname || t.host), - (r.port = t.port), - r.pathname || r.search) - ) { - var o = r.pathname || '', - s = r.search || ''; - r.path = o + s; - } - return (r.slashes = r.slashes || t.slashes), (r.href = r.format()), r; - } - var a = r.pathname && '/' === r.pathname.charAt(0), - h = t.host || (t.pathname && '/' === t.pathname.charAt(0)), - u = h || a || (r.host && t.pathname), - f = u, - c = (r.pathname && r.pathname.split('/')) || [], - l = ((i = (t.pathname && t.pathname.split('/')) || []), r.protocol && !m[r.protocol]); - if ( - (l && - ((r.hostname = ''), - (r.port = null), - r.host && ('' === c[0] ? (c[0] = r.host) : c.unshift(r.host)), - (r.host = ''), - t.protocol && - ((t.hostname = null), (t.port = null), t.host && ('' === i[0] ? (i[0] = t.host) : i.unshift(t.host)), (t.host = null)), - (u = u && ('' === i[0] || '' === c[0]))), - h) - ) - (r.host = t.host || '' === t.host ? t.host : r.host), - (r.hostname = t.hostname || '' === t.hostname ? t.hostname : r.hostname), - (r.search = t.search), - (r.query = t.query), - (c = i); - else if (i.length) c || (c = []), c.pop(), (c = c.concat(i)), (r.search = t.search), (r.query = t.query); - else if (null != t.search) - return ( - l && - ((r.hostname = r.host = c.shift()), - (_ = !!(r.host && r.host.indexOf('@') > 0) && r.host.split('@')) && - ((r.auth = _.shift()), (r.host = r.hostname = _.shift()))), - (r.search = t.search), - (r.query = t.query), - (w(r.pathname) && w(r.search)) || (r.path = (r.pathname ? r.pathname : '') + (r.search ? r.search : '')), - (r.href = r.format()), - r - ); - if (!c.length) return (r.pathname = null), r.search ? (r.path = '/' + r.search) : (r.path = null), (r.href = r.format()), r; - for ( - var d = c.slice(-1)[0], g = ((r.host || t.host) && ('.' === d || '..' === d)) || '' === d, b = 0, v = c.length; - v >= 0; - v-- - ) - '.' == (d = c[v]) ? c.splice(v, 1) : '..' === d ? (c.splice(v, 1), b++) : b && (c.splice(v, 1), b--); - if (!u && !f) for (; b--; b) c.unshift('..'); - !u || '' === c[0] || (c[0] && '/' === c[0].charAt(0)) || c.unshift(''), g && '/' !== c.join('/').substr(-1) && c.push(''); - var _, - M = '' === c[0] || (c[0] && '/' === c[0].charAt(0)); - return ( - l && - ((r.hostname = r.host = M ? '' : c.length ? c.shift() : ''), - (_ = !!(r.host && r.host.indexOf('@') > 0) && r.host.split('@')) && - ((r.auth = _.shift()), (r.host = r.hostname = _.shift()))), - (u = u || (r.host && c.length)) && !M && c.unshift(''), - c.length ? (r.pathname = c.join('/')) : ((r.pathname = null), (r.path = null)), - (w(r.pathname) && w(r.search)) || (r.path = (r.pathname ? r.pathname : '') + (r.search ? r.search : '')), - (r.auth = t.auth || r.auth), - (r.slashes = r.slashes || t.slashes), - (r.href = r.format()), - r - ); - }), - (n.prototype.parseHost = function () { - var t = this.host, - e = s.exec(t); - e && (':' !== (e = e[0]) && (this.port = e.substr(1)), (t = t.substr(0, t.length - e.length))), t && (this.hostname = t); - }); - }, - 1496: t => { - 'function' == typeof Object.create - ? (t.exports = function (t, e) { - (t.super_ = e), - (t.prototype = Object.create(e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } })); - }) - : (t.exports = function (t, e) { - t.super_ = e; - var r = function () {}; - (r.prototype = e.prototype), (t.prototype = new r()), (t.prototype.constructor = t); - }); - }, - 384: t => { - t.exports = function (t) { - return ( - t && 'object' == typeof t && 'function' == typeof t.copy && 'function' == typeof t.fill && 'function' == typeof t.readUInt8 - ); - }; - }, - 9539: (t, e, r) => { - var i = /%[sdj%]/g; - (e.format = function (t) { - if (!g(t)) { - for (var e = [], r = 0; r < arguments.length; r++) e.push(s(arguments[r])); - return e.join(' '); - } - r = 1; - for ( - var n = arguments, - o = n.length, - a = String(t).replace(i, function (t) { - if ('%%' === t) return '%'; - if (r >= o) return t; - switch (t) { - case '%s': - return String(n[r++]); - case '%d': - return Number(n[r++]); - case '%j': - try { - return JSON.stringify(n[r++]); - } catch (t) { - return '[Circular]'; - } - default: - return t; - } - }), - h = n[r]; - r < o; - h = n[++r] - ) - p(h) || !v(h) ? (a += ' ' + h) : (a += ' ' + s(h)); - return a; - }), - (e.deprecate = function (t, i) { - if (b(r.g.process)) - return function () { - return e.deprecate(t, i).apply(this, arguments); - }; - if (!0 === process.noDeprecation) return t; - var n = !1; - return function () { - if (!n) { - if (process.throwDeprecation) throw new Error(i); - process.traceDeprecation ? console.trace(i) : console.error(i), (n = !0); - } - return t.apply(this, arguments); - }; - }); - var n, - o = {}; - function s(t, r) { - var i = { seen: [], stylize: h }; - return ( - arguments.length >= 3 && (i.depth = arguments[2]), - arguments.length >= 4 && (i.colors = arguments[3]), - d(r) ? (i.showHidden = r) : r && e._extend(i, r), - b(i.showHidden) && (i.showHidden = !1), - b(i.depth) && (i.depth = 2), - b(i.colors) && (i.colors = !1), - b(i.customInspect) && (i.customInspect = !0), - i.colors && (i.stylize = a), - u(i, t, i.depth) - ); - } - function a(t, e) { - var r = s.styles[e]; - return r ? '[' + s.colors[r][0] + 'm' + t + '[' + s.colors[r][1] + 'm' : t; - } - function h(t, e) { - return t; - } - function u(t, r, i) { - if (t.customInspect && r && M(r.inspect) && r.inspect !== e.inspect && (!r.constructor || r.constructor.prototype !== r)) { - var n = r.inspect(i, t); - return g(n) || (n = u(t, n, i)), n; - } - var o = (function (t, e) { - if (b(e)) return t.stylize('undefined', 'undefined'); - if (g(e)) { - var r = "'" + JSON.stringify(e).replace(/^"|"$/g, '').replace(/'/g, "\\'").replace(/\\"/g, '"') + "'"; - return t.stylize(r, 'string'); - } - return m(e) ? t.stylize('' + e, 'number') : d(e) ? t.stylize('' + e, 'boolean') : p(e) ? t.stylize('null', 'null') : void 0; - })(t, r); - if (o) return o; - var s = Object.keys(r), - a = (function (t) { - var e = {}; - return ( - t.forEach(function (t, r) { - e[t] = !0; - }), - e - ); - })(s); - if ((t.showHidden && (s = Object.getOwnPropertyNames(r)), _(r) && (s.indexOf('message') >= 0 || s.indexOf('description') >= 0))) - return f(r); - if (0 === s.length) { - if (M(r)) { - var h = r.name ? ': ' + r.name : ''; - return t.stylize('[Function' + h + ']', 'special'); - } - if (y(r)) return t.stylize(RegExp.prototype.toString.call(r), 'regexp'); - if (w(r)) return t.stylize(Date.prototype.toString.call(r), 'date'); - if (_(r)) return f(r); - } - var v, - E = '', - S = !1, - x = ['{', '}']; - return ( - l(r) && ((S = !0), (x = ['[', ']'])), - M(r) && (E = ' [Function' + (r.name ? ': ' + r.name : '') + ']'), - y(r) && (E = ' ' + RegExp.prototype.toString.call(r)), - w(r) && (E = ' ' + Date.prototype.toUTCString.call(r)), - _(r) && (E = ' ' + f(r)), - 0 !== s.length || (S && 0 != r.length) - ? i < 0 - ? y(r) - ? t.stylize(RegExp.prototype.toString.call(r), 'regexp') - : t.stylize('[Object]', 'special') - : (t.seen.push(r), - (v = S - ? (function (t, e, r, i, n) { - for (var o = [], s = 0, a = e.length; s < a; ++s) - A(e, String(s)) ? o.push(c(t, e, r, i, String(s), !0)) : o.push(''); - return ( - n.forEach(function (n) { - n.match(/^\d+$/) || o.push(c(t, e, r, i, n, !0)); - }), - o - ); - })(t, r, i, a, s) - : s.map(function (e) { - return c(t, r, i, a, e, S); - })), - t.seen.pop(), - (function (t, e, r) { - return t.reduce(function (t, e) { - return e.indexOf('\n'), t + e.replace(/\u001b\[\d\d?m/g, '').length + 1; - }, 0) > 60 - ? r[0] + ('' === e ? '' : e + '\n ') + ' ' + t.join(',\n ') + ' ' + r[1] - : r[0] + e + ' ' + t.join(', ') + ' ' + r[1]; - })(v, E, x)) - : x[0] + E + x[1] - ); - } - function f(t) { - return '[' + Error.prototype.toString.call(t) + ']'; - } - function c(t, e, r, i, n, o) { - var s, a, h; - if ( - ((h = Object.getOwnPropertyDescriptor(e, n) || { value: e[n] }).get - ? (a = h.set ? t.stylize('[Getter/Setter]', 'special') : t.stylize('[Getter]', 'special')) - : h.set && (a = t.stylize('[Setter]', 'special')), - A(i, n) || (s = '[' + n + ']'), - a || - (t.seen.indexOf(h.value) < 0 - ? (a = p(r) ? u(t, h.value, null) : u(t, h.value, r - 1)).indexOf('\n') > -1 && - (a = o - ? a - .split('\n') - .map(function (t) { - return ' ' + t; - }) - .join('\n') - .substr(2) - : '\n' + - a - .split('\n') - .map(function (t) { - return ' ' + t; - }) - .join('\n')) - : (a = t.stylize('[Circular]', 'special'))), - b(s)) - ) { - if (o && n.match(/^\d+$/)) return a; - (s = JSON.stringify('' + n)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/) - ? ((s = s.substr(1, s.length - 2)), (s = t.stylize(s, 'name'))) - : ((s = s - .replace(/'/g, "\\'") - .replace(/\\"/g, '"') - .replace(/(^"|"$)/g, "'")), - (s = t.stylize(s, 'string'))); - } - return s + ': ' + a; - } - function l(t) { - return Array.isArray(t); - } - function d(t) { - return 'boolean' == typeof t; - } - function p(t) { - return null === t; - } - function m(t) { - return 'number' == typeof t; - } - function g(t) { - return 'string' == typeof t; - } - function b(t) { - return void 0 === t; - } - function y(t) { - return v(t) && '[object RegExp]' === E(t); - } - function v(t) { - return 'object' == typeof t && null !== t; - } - function w(t) { - return v(t) && '[object Date]' === E(t); - } - function _(t) { - return v(t) && ('[object Error]' === E(t) || t instanceof Error); - } - function M(t) { - return 'function' == typeof t; - } - function E(t) { - return Object.prototype.toString.call(t); - } - function S(t) { - return t < 10 ? '0' + t.toString(10) : t.toString(10); - } - (e.debuglog = function (t) { - if ((b(n) && (n = process.env.NODE_DEBUG || ''), (t = t.toUpperCase()), !o[t])) - if (new RegExp('\\b' + t + '\\b', 'i').test(n)) { - var r = process.pid; - o[t] = function () { - var i = e.format.apply(e, arguments); - console.error('%s %d: %s', t, r, i); - }; - } else o[t] = function () {}; - return o[t]; - }), - (e.inspect = s), - (s.colors = { - bold: [1, 22], - italic: [3, 23], - underline: [4, 24], - inverse: [7, 27], - white: [37, 39], - grey: [90, 39], - black: [30, 39], - blue: [34, 39], - cyan: [36, 39], - green: [32, 39], - magenta: [35, 39], - red: [31, 39], - yellow: [33, 39], - }), - (s.styles = { - special: 'cyan', - number: 'yellow', - boolean: 'yellow', - undefined: 'grey', - null: 'bold', - string: 'green', - date: 'magenta', - regexp: 'red', - }), - (e.isArray = l), - (e.isBoolean = d), - (e.isNull = p), - (e.isNullOrUndefined = function (t) { - return null == t; - }), - (e.isNumber = m), - (e.isString = g), - (e.isSymbol = function (t) { - return 'symbol' == typeof t; - }), - (e.isUndefined = b), - (e.isRegExp = y), - (e.isObject = v), - (e.isDate = w), - (e.isError = _), - (e.isFunction = M), - (e.isPrimitive = function (t) { - return ( - null === t || 'boolean' == typeof t || 'number' == typeof t || 'string' == typeof t || 'symbol' == typeof t || void 0 === t - ); - }), - (e.isBuffer = r(384)); - var x = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']; - function A(t, e) { - return Object.prototype.hasOwnProperty.call(t, e); - } - (e.log = function () { - var t, r; - console.log( - '%s - %s', - ((r = [S((t = new Date()).getHours()), S(t.getMinutes()), S(t.getSeconds())].join(':')), - [t.getDate(), x[t.getMonth()], r].join(' ')), - e.format.apply(e, arguments) - ); - }), - (e.inherits = r(1496)), - (e._extend = function (t, e) { - if (!e || !v(e)) return t; - for (var r = Object.keys(e), i = r.length; i--; ) t[r[i]] = e[r[i]]; - return t; - }); - }, - 9602: t => { - 'use strict'; - t.exports = function (t) { - t.prototype[Symbol.iterator] = function* () { - for (let t = this.head; t; t = t.next) yield t.value; - }; - }; - }, - 4411: (t, e, r) => { - 'use strict'; - function i(t) { - var e = this; - if ((e instanceof i || (e = new i()), (e.tail = null), (e.head = null), (e.length = 0), t && 'function' == typeof t.forEach)) - t.forEach(function (t) { - e.push(t); - }); - else if (arguments.length > 0) for (var r = 0, n = arguments.length; r < n; r++) e.push(arguments[r]); - return e; - } - function n(t, e, r) { - var i = e === t.head ? new a(r, null, e, t) : new a(r, e, e.next, t); - return null === i.next && (t.tail = i), null === i.prev && (t.head = i), t.length++, i; - } - function o(t, e) { - (t.tail = new a(e, t.tail, null, t)), t.head || (t.head = t.tail), t.length++; - } - function s(t, e) { - (t.head = new a(e, null, t.head, t)), t.tail || (t.tail = t.head), t.length++; - } - function a(t, e, r, i) { - if (!(this instanceof a)) return new a(t, e, r, i); - (this.list = i), - (this.value = t), - e ? ((e.next = this), (this.prev = e)) : (this.prev = null), - r ? ((r.prev = this), (this.next = r)) : (this.next = null); - } - (t.exports = i), - (i.Node = a), - (i.create = i), - (i.prototype.removeNode = function (t) { - if (t.list !== this) throw new Error('removing node which does not belong to this list'); - var e = t.next, - r = t.prev; - return ( - e && (e.prev = r), - r && (r.next = e), - t === this.head && (this.head = e), - t === this.tail && (this.tail = r), - t.list.length--, - (t.next = null), - (t.prev = null), - (t.list = null), - e - ); - }), - (i.prototype.unshiftNode = function (t) { - if (t !== this.head) { - t.list && t.list.removeNode(t); - var e = this.head; - (t.list = this), (t.next = e), e && (e.prev = t), (this.head = t), this.tail || (this.tail = t), this.length++; - } - }), - (i.prototype.pushNode = function (t) { - if (t !== this.tail) { - t.list && t.list.removeNode(t); - var e = this.tail; - (t.list = this), (t.prev = e), e && (e.next = t), (this.tail = t), this.head || (this.head = t), this.length++; - } - }), - (i.prototype.push = function () { - for (var t = 0, e = arguments.length; t < e; t++) o(this, arguments[t]); - return this.length; - }), - (i.prototype.unshift = function () { - for (var t = 0, e = arguments.length; t < e; t++) s(this, arguments[t]); - return this.length; - }), - (i.prototype.pop = function () { - if (this.tail) { - var t = this.tail.value; - return (this.tail = this.tail.prev), this.tail ? (this.tail.next = null) : (this.head = null), this.length--, t; - } - }), - (i.prototype.shift = function () { - if (this.head) { - var t = this.head.value; - return (this.head = this.head.next), this.head ? (this.head.prev = null) : (this.tail = null), this.length--, t; - } - }), - (i.prototype.forEach = function (t, e) { - e = e || this; - for (var r = this.head, i = 0; null !== r; i++) t.call(e, r.value, i, this), (r = r.next); - }), - (i.prototype.forEachReverse = function (t, e) { - e = e || this; - for (var r = this.tail, i = this.length - 1; null !== r; i--) t.call(e, r.value, i, this), (r = r.prev); - }), - (i.prototype.get = function (t) { - for (var e = 0, r = this.head; null !== r && e < t; e++) r = r.next; - if (e === t && null !== r) return r.value; - }), - (i.prototype.getReverse = function (t) { - for (var e = 0, r = this.tail; null !== r && e < t; e++) r = r.prev; - if (e === t && null !== r) return r.value; - }), - (i.prototype.map = function (t, e) { - e = e || this; - for (var r = new i(), n = this.head; null !== n; ) r.push(t.call(e, n.value, this)), (n = n.next); - return r; - }), - (i.prototype.mapReverse = function (t, e) { - e = e || this; - for (var r = new i(), n = this.tail; null !== n; ) r.push(t.call(e, n.value, this)), (n = n.prev); - return r; - }), - (i.prototype.reduce = function (t, e) { - var r, - i = this.head; - if (arguments.length > 1) r = e; - else { - if (!this.head) throw new TypeError('Reduce of empty list with no initial value'); - (i = this.head.next), (r = this.head.value); - } - for (var n = 0; null !== i; n++) (r = t(r, i.value, n)), (i = i.next); - return r; - }), - (i.prototype.reduceReverse = function (t, e) { - var r, - i = this.tail; - if (arguments.length > 1) r = e; - else { - if (!this.tail) throw new TypeError('Reduce of empty list with no initial value'); - (i = this.tail.prev), (r = this.tail.value); - } - for (var n = this.length - 1; null !== i; n--) (r = t(r, i.value, n)), (i = i.prev); - return r; - }), - (i.prototype.toArray = function () { - for (var t = new Array(this.length), e = 0, r = this.head; null !== r; e++) (t[e] = r.value), (r = r.next); - return t; - }), - (i.prototype.toArrayReverse = function () { - for (var t = new Array(this.length), e = 0, r = this.tail; null !== r; e++) (t[e] = r.value), (r = r.prev); - return t; - }), - (i.prototype.slice = function (t, e) { - (e = e || this.length) < 0 && (e += this.length), (t = t || 0) < 0 && (t += this.length); - var r = new i(); - if (e < t || e < 0) return r; - t < 0 && (t = 0), e > this.length && (e = this.length); - for (var n = 0, o = this.head; null !== o && n < t; n++) o = o.next; - for (; null !== o && n < e; n++, o = o.next) r.push(o.value); - return r; - }), - (i.prototype.sliceReverse = function (t, e) { - (e = e || this.length) < 0 && (e += this.length), (t = t || 0) < 0 && (t += this.length); - var r = new i(); - if (e < t || e < 0) return r; - t < 0 && (t = 0), e > this.length && (e = this.length); - for (var n = this.length, o = this.tail; null !== o && n > e; n--) o = o.prev; - for (; null !== o && n > t; n--, o = o.prev) r.push(o.value); - return r; - }), - (i.prototype.splice = function (t, e, ...r) { - t > this.length && (t = this.length - 1), t < 0 && (t = this.length + t); - for (var i = 0, o = this.head; null !== o && i < t; i++) o = o.next; - var s = []; - for (i = 0; o && i < e; i++) s.push(o.value), (o = this.removeNode(o)); - for (null === o && (o = this.tail), o !== this.head && o !== this.tail && (o = o.prev), i = 0; i < r.length; i++) - o = n(this, o, r[i]); - return s; - }), - (i.prototype.reverse = function () { - for (var t = this.head, e = this.tail, r = t; null !== r; r = r.prev) { - var i = r.prev; - (r.prev = r.next), (r.next = i); - } - return (this.head = e), (this.tail = t), this; - }); - try { - r(9602)(i); - } catch (t) {} - }, - 2909: () => {}, - 5545: () => {}, - 6047: () => {}, - 4215: () => {}, - 7021: () => {}, - 6611: () => {}, - 1212: () => {}, - 303: () => {}, - 4318: () => {}, - 3967: () => {}, - 7523: () => {}, - 4282: () => {}, - 3927: () => {}, - 7702: () => {}, - 7884: (t, e, r) => { - 'use strict'; - r.r(e), - r.d(e, { - Struct: () => f, - StructError: () => i, - any: () => x, - array: () => A, - assert: () => c, - assign: () => g, - bigint: () => k, - boolean: () => R, - coerce: () => Y, - create: () => l, - date: () => B, - defaulted: () => J, - define: () => b, - deprecated: () => y, - dynamic: () => v, - empty: () => Q, - enums: () => I, - func: () => T, - instance: () => P, - integer: () => O, - intersection: () => L, - is: () => p, - lazy: () => w, - literal: () => C, - map: () => N, - mask: () => d, - max: () => et, - min: () => rt, - never: () => j, - nonempty: () => it, - nullable: () => U, - number: () => D, - object: () => z, - omit: () => _, - optional: () => F, - partial: () => M, - pattern: () => nt, - pick: () => E, - record: () => q, - refine: () => st, - regexp: () => H, - set: () => $, - size: () => ot, - string: () => Z, - struct: () => S, - trimmed: () => X, - tuple: () => G, - type: () => V, - union: () => W, - unknown: () => K, - validate: () => m, - }); - class i extends TypeError { - constructor(t, e) { - let r; - const { message: i, explanation: n, ...o } = t, - { path: s } = t, - a = 0 === s.length ? i : `At path: ${s.join('.')} -- ${i}`; - super(n ?? a), - null != n && (this.cause = a), - Object.assign(this, o), - (this.name = this.constructor.name), - (this.failures = () => r ?? (r = [t, ...e()])); - } - } - function n(t) { - return 'object' == typeof t && null != t; - } - function o(t) { - if ('[object Object]' !== Object.prototype.toString.call(t)) return !1; - const e = Object.getPrototypeOf(t); - return null === e || e === Object.prototype; - } - function s(t) { - return 'symbol' == typeof t ? t.toString() : 'string' == typeof t ? JSON.stringify(t) : `${t}`; - } - function a(t, e, r, i) { - if (!0 === t) return; - !1 === t ? (t = {}) : 'string' == typeof t && (t = { message: t }); - const { path: n, branch: o } = e, - { type: a } = r, - { - refinement: h, - message: u = `Expected a value of type \`${a}\`${h ? ` with refinement \`${h}\`` : ''}, but received: \`${s(i)}\``, - } = t; - return { value: i, type: a, refinement: h, key: n[n.length - 1], path: n, branch: o, ...t, message: u }; - } - function* h(t, e, r, i) { - var o; - (n((o = t)) && 'function' == typeof o[Symbol.iterator]) || (t = [t]); - for (const n of t) { - const t = a(n, e, r, i); - t && (yield t); - } - } - function* u(t, e, r = {}) { - const { path: i = [], branch: o = [t], coerce: s = !1, mask: a = !1 } = r, - h = { path: i, branch: o }; - if (s && ((t = e.coercer(t, h)), a && 'type' !== e.type && n(e.schema) && n(t) && !Array.isArray(t))) - for (const r in t) void 0 === e.schema[r] && delete t[r]; - let f = 'valid'; - for (const i of e.validator(t, h)) (i.explanation = r.message), (f = 'not_valid'), yield [i, void 0]; - for (let [c, l, d] of e.entries(t, h)) { - const e = u(l, d, { - path: void 0 === c ? i : [...i, c], - branch: void 0 === c ? o : [...o, l], - coerce: s, - mask: a, - message: r.message, - }); - for (const r of e) - r[0] - ? ((f = null != r[0].refinement ? 'not_refined' : 'not_valid'), yield [r[0], void 0]) - : s && - ((l = r[1]), - void 0 === c - ? (t = l) - : t instanceof Map - ? t.set(c, l) - : t instanceof Set - ? t.add(l) - : n(t) && (void 0 !== l || c in t) && (t[c] = l)); - } - if ('not_valid' !== f) for (const i of e.refiner(t, h)) (i.explanation = r.message), (f = 'not_refined'), yield [i, void 0]; - 'valid' === f && (yield [void 0, t]); - } - class f { - constructor(t) { - const { type: e, schema: r, validator: i, refiner: n, coercer: o = t => t, entries: s = function* () {} } = t; - (this.type = e), - (this.schema = r), - (this.entries = s), - (this.coercer = o), - (this.validator = i ? (t, e) => h(i(t, e), e, this, t) : () => []), - (this.refiner = n ? (t, e) => h(n(t, e), e, this, t) : () => []); - } - assert(t, e) { - return c(t, this, e); - } - create(t, e) { - return l(t, this, e); - } - is(t) { - return p(t, this); - } - mask(t, e) { - return d(t, this, e); - } - validate(t, e = {}) { - return m(t, this, e); - } - } - function c(t, e, r) { - const i = m(t, e, { message: r }); - if (i[0]) throw i[0]; - } - function l(t, e, r) { - const i = m(t, e, { coerce: !0, message: r }); - if (i[0]) throw i[0]; - return i[1]; - } - function d(t, e, r) { - const i = m(t, e, { coerce: !0, mask: !0, message: r }); - if (i[0]) throw i[0]; - return i[1]; - } - function p(t, e) { - return !m(t, e)[0]; - } - function m(t, e, r = {}) { - const n = u(t, e, r), - o = (function (t) { - const { done: e, value: r } = t.next(); - return e ? void 0 : r; - })(n); - return o[0] - ? [ - new i(o[0], function* () { - for (const t of n) t[0] && (yield t[0]); - }), - void 0, - ] - : [void 0, o[1]]; - } - function g(...t) { - const e = 'type' === t[0].type, - r = t.map(t => t.schema), - i = Object.assign({}, ...r); - return e ? V(i) : z(i); - } - function b(t, e) { - return new f({ type: t, schema: null, validator: e }); - } - function y(t, e) { - return new f({ - ...t, - refiner: (e, r) => void 0 === e || t.refiner(e, r), - validator: (r, i) => void 0 === r || (e(r, i), t.validator(r, i)), - }); - } - function v(t) { - return new f({ - type: 'dynamic', - schema: null, - *entries(e, r) { - const i = t(e, r); - yield* i.entries(e, r); - }, - validator: (e, r) => t(e, r).validator(e, r), - coercer: (e, r) => t(e, r).coercer(e, r), - refiner: (e, r) => t(e, r).refiner(e, r), - }); - } - function w(t) { - let e; - return new f({ - type: 'lazy', - schema: null, - *entries(r, i) { - e ?? (e = t()), yield* e.entries(r, i); - }, - validator: (r, i) => (e ?? (e = t()), e.validator(r, i)), - coercer: (r, i) => (e ?? (e = t()), e.coercer(r, i)), - refiner: (r, i) => (e ?? (e = t()), e.refiner(r, i)), - }); - } - function _(t, e) { - const { schema: r } = t, - i = { ...r }; - for (const t of e) delete i[t]; - return 'type' === t.type ? V(i) : z(i); - } - function M(t) { - const e = t instanceof f ? { ...t.schema } : { ...t }; - for (const t in e) e[t] = F(e[t]); - return z(e); - } - function E(t, e) { - const { schema: r } = t, - i = {}; - for (const t of e) i[t] = r[t]; - return z(i); - } - function S(t, e) { - return console.warn('superstruct@0.11 - The `struct` helper has been renamed to `define`.'), b(t, e); - } - function x() { - return b('any', () => !0); - } - function A(t) { - return new f({ - type: 'array', - schema: t, - *entries(e) { - if (t && Array.isArray(e)) for (const [r, i] of e.entries()) yield [r, i, t]; - }, - coercer: t => (Array.isArray(t) ? t.slice() : t), - validator: t => Array.isArray(t) || `Expected an array value, but received: ${s(t)}`, - }); - } - function k() { - return b('bigint', t => 'bigint' == typeof t); - } - function R() { - return b('boolean', t => 'boolean' == typeof t); - } - function B() { - return b('date', t => (t instanceof Date && !isNaN(t.getTime())) || `Expected a valid \`Date\` object, but received: ${s(t)}`); - } - function I(t) { - const e = {}, - r = t.map(t => s(t)).join(); - for (const r of t) e[r] = r; - return new f({ type: 'enums', schema: e, validator: e => t.includes(e) || `Expected one of \`${r}\`, but received: ${s(e)}` }); - } - function T() { - return b('func', t => 'function' == typeof t || `Expected a function, but received: ${s(t)}`); - } - function P(t) { - return b('instance', e => e instanceof t || `Expected a \`${t.name}\` instance, but received: ${s(e)}`); - } - function O() { - return b( - 'integer', - t => ('number' == typeof t && !isNaN(t) && Number.isInteger(t)) || `Expected an integer, but received: ${s(t)}` - ); - } - function L(t) { - return new f({ - type: 'intersection', - schema: null, - *entries(e, r) { - for (const i of t) yield* i.entries(e, r); - }, - *validator(e, r) { - for (const i of t) yield* i.validator(e, r); - }, - *refiner(e, r) { - for (const i of t) yield* i.refiner(e, r); - }, - }); - } - function C(t) { - const e = s(t), - r = typeof t; - return new f({ - type: 'literal', - schema: 'string' === r || 'number' === r || 'boolean' === r ? t : null, - validator: r => r === t || `Expected the literal \`${e}\`, but received: ${s(r)}`, - }); - } - function N(t, e) { - return new f({ - type: 'map', - schema: null, - *entries(r) { - if (t && e && r instanceof Map) for (const [i, n] of r.entries()) yield [i, i, t], yield [i, n, e]; - }, - coercer: t => (t instanceof Map ? new Map(t) : t), - validator: t => t instanceof Map || `Expected a \`Map\` object, but received: ${s(t)}`, - }); - } - function j() { - return b('never', () => !1); - } - function U(t) { - return new f({ ...t, validator: (e, r) => null === e || t.validator(e, r), refiner: (e, r) => null === e || t.refiner(e, r) }); - } - function D() { - return b('number', t => ('number' == typeof t && !isNaN(t)) || `Expected a number, but received: ${s(t)}`); - } - function z(t) { - const e = t ? Object.keys(t) : [], - r = j(); - return new f({ - type: 'object', - schema: t || null, - *entries(i) { - if (t && n(i)) { - const n = new Set(Object.keys(i)); - for (const r of e) n.delete(r), yield [r, i[r], t[r]]; - for (const t of n) yield [t, i[t], r]; - } - }, - validator: t => n(t) || `Expected an object, but received: ${s(t)}`, - coercer: t => (n(t) ? { ...t } : t), - }); - } - function F(t) { - return new f({ - ...t, - validator: (e, r) => void 0 === e || t.validator(e, r), - refiner: (e, r) => void 0 === e || t.refiner(e, r), - }); - } - function q(t, e) { - return new f({ - type: 'record', - schema: null, - *entries(r) { - if (n(r)) - for (const i in r) { - const n = r[i]; - yield [i, i, t], yield [i, n, e]; - } - }, - validator: t => n(t) || `Expected an object, but received: ${s(t)}`, - }); - } - function H() { - return b('regexp', t => t instanceof RegExp); - } - function $(t) { - return new f({ - type: 'set', - schema: null, - *entries(e) { - if (t && e instanceof Set) for (const r of e) yield [r, r, t]; - }, - coercer: t => (t instanceof Set ? new Set(t) : t), - validator: t => t instanceof Set || `Expected a \`Set\` object, but received: ${s(t)}`, - }); - } - function Z() { - return b('string', t => 'string' == typeof t || `Expected a string, but received: ${s(t)}`); - } - function G(t) { - const e = j(); - return new f({ - type: 'tuple', - schema: null, - *entries(r) { - if (Array.isArray(r)) { - const i = Math.max(t.length, r.length); - for (let n = 0; n < i; n++) yield [n, r[n], t[n] || e]; - } - }, - validator: t => Array.isArray(t) || `Expected an array, but received: ${s(t)}`, - }); - } - function V(t) { - const e = Object.keys(t); - return new f({ - type: 'type', - schema: t, - *entries(r) { - if (n(r)) for (const i of e) yield [i, r[i], t[i]]; - }, - validator: t => n(t) || `Expected an object, but received: ${s(t)}`, - coercer: t => (n(t) ? { ...t } : t), - }); - } - function W(t) { - const e = t.map(t => t.type).join(' | '); - return new f({ - type: 'union', - schema: null, - coercer(e) { - for (const r of t) { - const [t, i] = r.validate(e, { coerce: !0 }); - if (!t) return i; - } - return e; - }, - validator(r, i) { - const n = []; - for (const e of t) { - const [...t] = u(r, e, i), - [o] = t; - if (!o[0]) return []; - for (const [e] of t) e && n.push(e); - } - return [`Expected the value to satisfy a union of \`${e}\`, but received: ${s(r)}`, ...n]; - }, - }); - } - function K() { - return b('unknown', () => !0); - } - function Y(t, e, r) { - return new f({ ...t, coercer: (i, n) => (p(i, e) ? t.coercer(r(i, n), n) : t.coercer(i, n)) }); - } - function J(t, e, r = {}) { - return Y(t, K(), t => { - const i = 'function' == typeof e ? e() : e; - if (void 0 === t) return i; - if (!r.strict && o(t) && o(i)) { - const e = { ...t }; - let r = !1; - for (const t in i) void 0 === e[t] && ((e[t] = i[t]), (r = !0)); - if (r) return e; - } - return t; - }); - } - function X(t) { - return Y(t, Z(), t => t.trim()); - } - function Q(t) { - return st(t, 'empty', e => { - const r = tt(e); - return 0 === r || `Expected an empty ${t.type} but received one with a size of \`${r}\``; - }); - } - function tt(t) { - return t instanceof Map || t instanceof Set ? t.size : t.length; - } - function et(t, e, r = {}) { - const { exclusive: i } = r; - return st(t, 'max', r => - i ? r < e : r <= e || `Expected a ${t.type} less than ${i ? '' : 'or equal to '}${e} but received \`${r}\`` - ); - } - function rt(t, e, r = {}) { - const { exclusive: i } = r; - return st(t, 'min', r => - i ? r > e : r >= e || `Expected a ${t.type} greater than ${i ? '' : 'or equal to '}${e} but received \`${r}\`` - ); - } - function it(t) { - return st(t, 'nonempty', e => tt(e) > 0 || `Expected a nonempty ${t.type} but received an empty one`); - } - function nt(t, e) { - return st(t, 'pattern', r => e.test(r) || `Expected a ${t.type} matching \`/${e.source}/\` but received "${r}"`); - } - function ot(t, e, r = e) { - const i = `Expected a ${t.type}`, - n = e === r ? `of \`${e}\`` : `between \`${e}\` and \`${r}\``; - return st(t, 'size', t => { - if ('number' == typeof t || t instanceof Date) return (e <= t && t <= r) || `${i} ${n} but received \`${t}\``; - if (t instanceof Map || t instanceof Set) { - const { size: o } = t; - return (e <= o && o <= r) || `${i} with a size ${n} but received one with a size of \`${o}\``; - } - { - const { length: o } = t; - return (e <= o && o <= r) || `${i} with a length ${n} but received one with a length of \`${o}\``; - } - }); - } - function st(t, e, r) { - return new f({ - ...t, - *refiner(i, n) { - yield* t.refiner(i, n); - const o = h(r(i, n), n, t, i); - for (const t of o) yield { ...t, refinement: e }; - }, - }); - } - }, - 4636: t => { - 'use strict'; - t.exports = JSON.parse( - '{"aes-128-ecb":{"cipher":"AES","key":128,"iv":0,"mode":"ECB","type":"block"},"aes-192-ecb":{"cipher":"AES","key":192,"iv":0,"mode":"ECB","type":"block"},"aes-256-ecb":{"cipher":"AES","key":256,"iv":0,"mode":"ECB","type":"block"},"aes-128-cbc":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes-192-cbc":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes-256-cbc":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes128":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes192":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes256":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes-128-cfb":{"cipher":"AES","key":128,"iv":16,"mode":"CFB","type":"stream"},"aes-192-cfb":{"cipher":"AES","key":192,"iv":16,"mode":"CFB","type":"stream"},"aes-256-cfb":{"cipher":"AES","key":256,"iv":16,"mode":"CFB","type":"stream"},"aes-128-cfb8":{"cipher":"AES","key":128,"iv":16,"mode":"CFB8","type":"stream"},"aes-192-cfb8":{"cipher":"AES","key":192,"iv":16,"mode":"CFB8","type":"stream"},"aes-256-cfb8":{"cipher":"AES","key":256,"iv":16,"mode":"CFB8","type":"stream"},"aes-128-cfb1":{"cipher":"AES","key":128,"iv":16,"mode":"CFB1","type":"stream"},"aes-192-cfb1":{"cipher":"AES","key":192,"iv":16,"mode":"CFB1","type":"stream"},"aes-256-cfb1":{"cipher":"AES","key":256,"iv":16,"mode":"CFB1","type":"stream"},"aes-128-ofb":{"cipher":"AES","key":128,"iv":16,"mode":"OFB","type":"stream"},"aes-192-ofb":{"cipher":"AES","key":192,"iv":16,"mode":"OFB","type":"stream"},"aes-256-ofb":{"cipher":"AES","key":256,"iv":16,"mode":"OFB","type":"stream"},"aes-128-ctr":{"cipher":"AES","key":128,"iv":16,"mode":"CTR","type":"stream"},"aes-192-ctr":{"cipher":"AES","key":192,"iv":16,"mode":"CTR","type":"stream"},"aes-256-ctr":{"cipher":"AES","key":256,"iv":16,"mode":"CTR","type":"stream"},"aes-128-gcm":{"cipher":"AES","key":128,"iv":12,"mode":"GCM","type":"auth"},"aes-192-gcm":{"cipher":"AES","key":192,"iv":12,"mode":"GCM","type":"auth"},"aes-256-gcm":{"cipher":"AES","key":256,"iv":12,"mode":"GCM","type":"auth"}}' - ); - }, - 7536: t => { - 'use strict'; - t.exports = JSON.parse( - '{"sha224WithRSAEncryption":{"sign":"rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"RSA-SHA224":{"sign":"ecdsa/rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"sha256WithRSAEncryption":{"sign":"rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"RSA-SHA256":{"sign":"ecdsa/rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"sha384WithRSAEncryption":{"sign":"rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"RSA-SHA384":{"sign":"ecdsa/rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"sha512WithRSAEncryption":{"sign":"rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA512":{"sign":"ecdsa/rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA1":{"sign":"rsa","hash":"sha1","id":"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{"sign":"ecdsa","hash":"sha1","id":""},"sha256":{"sign":"ecdsa","hash":"sha256","id":""},"sha224":{"sign":"ecdsa","hash":"sha224","id":""},"sha384":{"sign":"ecdsa","hash":"sha384","id":""},"sha512":{"sign":"ecdsa","hash":"sha512","id":""},"DSA-SHA":{"sign":"dsa","hash":"sha1","id":""},"DSA-SHA1":{"sign":"dsa","hash":"sha1","id":""},"DSA":{"sign":"dsa","hash":"sha1","id":""},"DSA-WITH-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-WITH-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-WITH-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-WITH-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-RIPEMD160":{"sign":"dsa","hash":"rmd160","id":""},"ripemd160WithRSA":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"RSA-RIPEMD160":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"md5WithRSAEncryption":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"},"RSA-MD5":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"}}' - ); - }, - 7330: t => { - 'use strict'; - t.exports = JSON.parse( - '{"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"}' - ); - }, - 7064: t => { - 'use strict'; - t.exports = JSON.parse( - '{"modp1":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},"modp2":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},"modp5":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},"modp14":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},"modp15":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},"modp16":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},"modp17":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},"modp18":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}' - ); - }, - 312: t => { - 'use strict'; - t.exports = { i8: '6.5.4' }; - }, - 1095: t => { - 'use strict'; - t.exports = JSON.parse( - '{"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}' - ); - }, - }, - e = {}; - function r(i) { - var n = e[i]; - if (void 0 !== n) return n.exports; - var o = (e[i] = { id: i, loaded: !1, exports: {} }); - return t[i].call(o.exports, o, o.exports, r), (o.loaded = !0), o.exports; - } - (r.d = (t, e) => { - for (var i in e) r.o(e, i) && !r.o(t, i) && Object.defineProperty(t, i, { enumerable: !0, get: e[i] }); - }), - (r.g = (function () { - if ('object' == typeof globalThis) return globalThis; - try { - return this || new Function('return this')(); - } catch (t) { - if ('object' == typeof window) return window; - } - })()), - (r.o = (t, e) => Object.prototype.hasOwnProperty.call(t, e)), - (r.r = t => { - 'undefined' != typeof Symbol && Symbol.toStringTag && Object.defineProperty(t, Symbol.toStringTag, { value: 'Module' }), - Object.defineProperty(t, '__esModule', { value: !0 }); - }), - (r.nmd = t => ((t.paths = []), t.children || (t.children = []), t)), - (() => { - 'use strict'; - var t, - e = r(6729), - i = - ((t = function (e, r) { - return ( - (t = - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && - function (t, e) { - t.__proto__ = e; - }) || - function (t, e) { - for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && (t[r] = e[r]); - }), - t(e, r) - ); - }), - function (e, r) { - if ('function' != typeof r && null !== r) - throw new TypeError('Class extends value ' + String(r) + ' is not a constructor or null'); - function i() { - this.constructor = e; - } - t(e, r), (e.prototype = null === r ? Object.create(r) : ((i.prototype = r.prototype), new i())); - }), - n = function (t, e, r, i) { - return new (r || (r = Promise))(function (n, o) { - function s(t) { - try { - h(i.next(t)); - } catch (t) { - o(t); - } - } - function a(t) { - try { - h(i.throw(t)); - } catch (t) { - o(t); - } - } - function h(t) { - var e; - t.done - ? n(t.value) - : ((e = t.value), - e instanceof r - ? e - : new r(function (t) { - t(e); - })).then(s, a); - } - h((i = i.apply(t, e || [])).next()); - }); - }, - o = function (t, e) { - var r, - i, - n, - o, - s = { - label: 0, - sent: function () { - if (1 & n[0]) throw n[1]; - return n[1]; - }, - trys: [], - ops: [], - }; - return ( - (o = { next: a(0), throw: a(1), return: a(2) }), - 'function' == typeof Symbol && - (o[Symbol.iterator] = function () { - return this; - }), - o - ); - function a(a) { - return function (h) { - return (function (a) { - if (r) throw new TypeError('Generator is already executing.'); - for (; o && ((o = 0), a[0] && (s = 0)), s; ) - try { - if ( - ((r = 1), - i && - (n = 2 & a[0] ? i.return : a[0] ? i.throw || ((n = i.return) && n.call(i), 0) : i.next) && - !(n = n.call(i, a[1])).done) - ) - return n; - switch (((i = 0), n && (a = [2 & a[0], n.value]), a[0])) { - case 0: - case 1: - n = a; - break; - case 4: - return s.label++, { value: a[1], done: !1 }; - case 5: - s.label++, (i = a[1]), (a = [0]); - continue; - case 7: - (a = s.ops.pop()), s.trys.pop(); - continue; - default: - if (!((n = (n = s.trys).length > 0 && n[n.length - 1]) || (6 !== a[0] && 2 !== a[0]))) { - s = 0; - continue; - } - if (3 === a[0] && (!n || (a[1] > n[0] && a[1] < n[3]))) { - s.label = a[1]; - break; - } - if (6 === a[0] && s.label < n[1]) { - (s.label = n[1]), (n = a); - break; - } - if (n && s.label < n[2]) { - (s.label = n[2]), s.ops.push(a); - break; - } - n[2] && s.ops.pop(), s.trys.pop(); - continue; - } - a = e.call(t, s); - } catch (t) { - (a = [6, t]), (i = 0); - } finally { - r = n = 0; - } - if (5 & a[0]) throw a[1]; - return { value: a[0] ? a[1] : void 0, done: !0 }; - })([a, h]); - }; - } - }, - s = (function (t) { - function e(e) { - var r = void 0 === e ? {} : e, - i = r.backgroundMessenger, - n = r.providerRequestTransport, - o = r.onConstruct, - s = t.call(this) || this; - return ( - (s.chainId = '0x1'), - (s.connected = !1), - (s.isRainbow = !0), - (s.isReady = !0), - (s.isMetaMask = !0), - (s.networkVersion = '1'), - (s.providers = void 0), - (s.requestId = 0), - (s.backgroundMessenger = i), - (s.providerRequestTransport = n), - null == o || o({ emit: s.emit.bind(s) }), - s.bindMethods(), - s - ); - } - return ( - i(e, t), - (e.prototype.bindMethods = function () { - for (var t = 0, e = Object.getOwnPropertyNames(Object.getPrototypeOf(this)); t < e.length; t++) { - var r = e[t], - i = this[r]; - 'function' == typeof i && 'constructor' !== r && (this[r] = i.bind(this)); - } - }), - (e.prototype.enable = function () { - return n(this, void 0, void 0, function () { - return o(this, function (t) { - return [2, this.request({ method: 'eth_requestAccounts' })]; - }); - }); - }), - (e.prototype.isConnected = function () { - return this.connected; - }), - (e.prototype.request = function (t) { - var e, - r, - i = t.method, - s = t.params; - return n(this, void 0, void 0, function () { - var t, n; - return o(this, function (o) { - switch (o.label) { - case 0: - if (!this.providerRequestTransport) throw new Error('No transport'); - return ( - null === (e = this.backgroundMessenger) || - void 0 === e || - e.send('rainbow_prefetchDappMetadata', window.location.href), - (t = this.requestId++), - [ - 4, - null === (r = this.providerRequestTransport) || void 0 === r - ? void 0 - : r.send({ id: t, method: i, params: s }, { id: t }), - ] - ); - case 1: - n = o.sent(); - if (n.error) throw n.error; - switch (i) { - case 'eth_requestAccounts': - (this.selectedAddress = n.result[0]), (this.connected = !0); - break; - case 'eth_chainId': - (this.chainId = n.result), (this.networkVersion = parseInt(this.chainId, 16).toString()); - } - return [2, n.result]; - } - }); - }); - }), - (e.prototype.sendAsync = function (t) { - return n(this, void 0, void 0, function () { - return o(this, function (e) { - return [2, this.request(t)]; - }); - }); - }), - (e.prototype.send = function (t, e) { - return n(this, void 0, void 0, function () { - return o(this, function (r) { - return 'string' == typeof t && Array.isArray(e) ? [2, this.request({ method: t, params: e })] : [2, this.request(t)]; - }); - }); - }), - e - ); - })(e); - function a(t, e = {}) { - const { fees: r = t.fees, formatters: i = t.formatters, serializers: n = t.serializers } = e; - return { ...t, fees: r, formatters: i, serializers: n }; - } - const h = a({ - id: 42161, - name: 'Arbitrum One', - network: 'arbitrum', - nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 }, - rpcUrls: { - alchemy: { http: ['https://arb-mainnet.g.alchemy.com/v2'], webSocket: ['wss://arb-mainnet.g.alchemy.com/v2'] }, - infura: { http: ['https://arbitrum-mainnet.infura.io/v3'], webSocket: ['wss://arbitrum-mainnet.infura.io/ws/v3'] }, - default: { http: ['https://arb1.arbitrum.io/rpc'] }, - public: { http: ['https://arb1.arbitrum.io/rpc'] }, - }, - blockExplorers: { - etherscan: { name: 'Arbiscan', url: 'https://arbiscan.io' }, - default: { name: 'Arbiscan', url: 'https://arbiscan.io' }, - }, - contracts: { multicall3: { address: '0xca11bde05977b3631167028862be2a173976ca11', blockCreated: 7654707 } }, - }), - u = a({ - id: 42170, - name: 'Arbitrum Nova', - network: 'arbitrum-nova', - nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 }, - rpcUrls: { - blast: { http: ['https://arbitrum-nova.public.blastapi.io'], webSocket: ['wss://arbitrum-nova.public.blastapi.io'] }, - default: { http: ['https://nova.arbitrum.io/rpc'] }, - public: { http: ['https://nova.arbitrum.io/rpc'] }, - }, - blockExplorers: { - etherscan: { name: 'Arbiscan', url: 'https://nova.arbiscan.io' }, - blockScout: { name: 'BlockScout', url: 'https://nova-explorer.arbitrum.io/' }, - default: { name: 'Arbiscan', url: 'https://nova.arbiscan.io' }, - }, - contracts: { multicall3: { address: '0xca11bde05977b3631167028862be2a173976ca11', blockCreated: 1746963 } }, - }), - f = a({ - id: 43114, - name: 'Avalanche', - network: 'avalanche', - nativeCurrency: { decimals: 18, name: 'Avalanche', symbol: 'AVAX' }, - rpcUrls: { - default: { http: ['https://api.avax.network/ext/bc/C/rpc'] }, - public: { http: ['https://api.avax.network/ext/bc/C/rpc'] }, - }, - blockExplorers: { - etherscan: { name: 'SnowTrace', url: 'https://snowtrace.io' }, - default: { name: 'SnowTrace', url: 'https://snowtrace.io' }, - }, - contracts: { multicall3: { address: '0xca11bde05977b3631167028862be2a173976ca11', blockCreated: 11907934 } }, - }); - class c extends Error { - constructor(t, e = {}) { - super(), - Object.defineProperty(this, 'details', { enumerable: !0, configurable: !0, writable: !0, value: void 0 }), - Object.defineProperty(this, 'docsPath', { enumerable: !0, configurable: !0, writable: !0, value: void 0 }), - Object.defineProperty(this, 'metaMessages', { enumerable: !0, configurable: !0, writable: !0, value: void 0 }), - Object.defineProperty(this, 'shortMessage', { enumerable: !0, configurable: !0, writable: !0, value: void 0 }), - Object.defineProperty(this, 'name', { enumerable: !0, configurable: !0, writable: !0, value: 'ViemError' }), - Object.defineProperty(this, 'version', { enumerable: !0, configurable: !0, writable: !0, value: 'viem@1.21.3' }); - const r = e.cause instanceof c ? e.cause.details : e.cause?.message ? e.cause.message : e.details, - i = (e.cause instanceof c && e.cause.docsPath) || e.docsPath; - (this.message = [ - t || 'An error occurred.', - '', - ...(e.metaMessages ? [...e.metaMessages, ''] : []), - ...(i ? [`Docs: https://viem.sh${i}.html${e.docsSlug ? `#${e.docsSlug}` : ''}`] : []), - ...(r ? [`Details: ${r}`] : []), - `Version: ${this.version}`, - ].join('\n')), - e.cause && (this.cause = e.cause), - (this.details = r), - (this.docsPath = i), - (this.metaMessages = e.metaMessages), - (this.shortMessage = t); - } - walk(t) { - return l(this, t); - } - } - function l(t, e) { - return e?.(t) ? t : t && 'object' == typeof t && 'cause' in t ? l(t.cause, e) : e ? null : t; - } - class d extends c { - constructor({ max: t, min: e, signed: r, size: i, value: n }) { - super( - `Number "${n}" is not in safe ${i ? `${8 * i}-bit ${r ? 'signed' : 'unsigned'} ` : ''}integer range ${t ? `(${e} to ${t})` : `(above ${e})`}` - ), - Object.defineProperty(this, 'name', { enumerable: !0, configurable: !0, writable: !0, value: 'IntegerOutOfRangeError' }); - } - } - class p extends c { - constructor({ givenSize: t, maxSize: e }) { - super(`Size cannot exceed ${e} bytes. Given size: ${t} bytes.`), - Object.defineProperty(this, 'name', { enumerable: !0, configurable: !0, writable: !0, value: 'SizeOverflowError' }); - } - } - function m(t) { - return (function (t, { strict: e = !0 } = {}) { - return !!t && 'string' == typeof t && (e ? /^0x[0-9a-fA-F]*$/.test(t) : t.startsWith('0x')); - })(t, { strict: !1 }) - ? Math.ceil((t.length - 2) / 2) - : t.length; - } - function g(t, { size: e }) { - if (m(t) > e) throw new p({ givenSize: m(t), maxSize: e }); - } - function b(t, e = {}) { - const { signed: r } = e; - e.size && g(t, { size: e.size }); - const i = BigInt(t); - if (!r) return i; - const n = (t.length - 2) / 2; - return i <= (1n << (8n * BigInt(n) - 1n)) - 1n ? i : i - BigInt(`0x${'f'.padStart(2 * n, 'f')}`) - 1n; - } - function y(t, e = {}) { - return Number(b(t, e)); - } - function v(t, e) { - return ({ exclude: r, format: i }) => ({ - exclude: r, - format: t => { - const n = e(t); - if (r) for (const t of r) delete n[t]; - return { ...n, ...i(t) }; - }, - type: t, - }); - } - const w = { '0x0': 'legacy', '0x1': 'eip2930', '0x2': 'eip1559' }; - function _(t) { - const e = { - ...t, - blockHash: t.blockHash ? t.blockHash : null, - blockNumber: t.blockNumber ? BigInt(t.blockNumber) : null, - chainId: t.chainId ? y(t.chainId) : void 0, - gas: t.gas ? BigInt(t.gas) : void 0, - gasPrice: t.gasPrice ? BigInt(t.gasPrice) : void 0, - maxFeePerGas: t.maxFeePerGas ? BigInt(t.maxFeePerGas) : void 0, - maxPriorityFeePerGas: t.maxPriorityFeePerGas ? BigInt(t.maxPriorityFeePerGas) : void 0, - nonce: t.nonce ? y(t.nonce) : void 0, - to: t.to ? t.to : null, - transactionIndex: t.transactionIndex ? Number(t.transactionIndex) : null, - type: t.type ? w[t.type] : void 0, - typeHex: t.type ? t.type : void 0, - value: t.value ? BigInt(t.value) : void 0, - v: t.v ? BigInt(t.v) : void 0, - }; - return ( - (e.yParity = (() => { - if (t.yParity) return Number(t.yParity); - if ('bigint' == typeof e.v) { - if (0n === e.v || 27n === e.v) return 0; - if (1n === e.v || 28n === e.v) return 1; - if (e.v >= 35n) return e.v % 2n === 0n ? 1 : 0; - } - })()), - 'legacy' === e.type && (delete e.accessList, delete e.maxFeePerGas, delete e.maxPriorityFeePerGas, delete e.yParity), - 'eip2930' === e.type && (delete e.maxFeePerGas, delete e.maxPriorityFeePerGas), - e - ); - } - const M = v('transaction', _); - function E(t) { - const e = t.transactions?.map(t => ('string' == typeof t ? t : _(t))); - return { - ...t, - baseFeePerGas: t.baseFeePerGas ? BigInt(t.baseFeePerGas) : null, - difficulty: t.difficulty ? BigInt(t.difficulty) : void 0, - gasLimit: t.gasLimit ? BigInt(t.gasLimit) : void 0, - gasUsed: t.gasUsed ? BigInt(t.gasUsed) : void 0, - hash: t.hash ? t.hash : null, - logsBloom: t.logsBloom ? t.logsBloom : null, - nonce: t.nonce ? t.nonce : null, - number: t.number ? BigInt(t.number) : null, - size: t.size ? BigInt(t.size) : void 0, - timestamp: t.timestamp ? BigInt(t.timestamp) : void 0, - transactions: e, - totalDifficulty: t.totalDifficulty ? BigInt(t.totalDifficulty) : null, - }; - } - const S = v('block', E), - x = { '0x0': 'reverted', '0x1': 'success' }; - function A(t) { - return { - ...t, - blockNumber: t.blockNumber ? BigInt(t.blockNumber) : null, - contractAddress: t.contractAddress ? t.contractAddress : null, - cumulativeGasUsed: t.cumulativeGasUsed ? BigInt(t.cumulativeGasUsed) : null, - effectiveGasPrice: t.effectiveGasPrice ? BigInt(t.effectiveGasPrice) : null, - gasUsed: t.gasUsed ? BigInt(t.gasUsed) : null, - logs: t.logs - ? t.logs.map(t => - (function (t, { args: e, eventName: r } = {}) { - return { - ...t, - blockHash: t.blockHash ? t.blockHash : null, - blockNumber: t.blockNumber ? BigInt(t.blockNumber) : null, - logIndex: t.logIndex ? Number(t.logIndex) : null, - transactionHash: t.transactionHash ? t.transactionHash : null, - transactionIndex: t.transactionIndex ? Number(t.transactionIndex) : null, - ...(r ? { args: e, eventName: r } : {}), - }; - })(t) - ) - : null, - to: t.to ? t.to : null, - transactionIndex: t.transactionIndex ? y(t.transactionIndex) : null, - status: t.status ? x[t.status] : null, - type: t.type ? w[t.type] || t.type : null, - }; - } - const k = v('transactionReceipt', A), - R = { - block: S({ - format(t) { - const e = t.transactions?.map(t => { - if ('string' == typeof t) return t; - const e = _(t); - return ( - '0x7e' === e.typeHex && - ((e.isSystemTx = t.isSystemTx), - (e.mint = t.mint ? b(t.mint) : void 0), - (e.sourceHash = t.sourceHash), - (e.type = 'deposit')), - e - ); - }); - return { transactions: e, stateRoot: t.stateRoot }; - }, - }), - transaction: M({ - format(t) { - const e = {}; - return ( - '0x7e' === t.type && - ((e.isSystemTx = t.isSystemTx), - (e.mint = t.mint ? b(t.mint) : void 0), - (e.sourceHash = t.sourceHash), - (e.type = 'deposit')), - e - ); - }, - }), - transactionReceipt: k({ - format: t => ({ - l1GasPrice: t.l1GasPrice ? b(t.l1GasPrice) : null, - l1GasUsed: t.l1GasUsed ? b(t.l1GasUsed) : null, - l1Fee: t.l1Fee ? b(t.l1Fee) : null, - l1FeeScalar: t.l1FeeScalar ? Number(t.l1FeeScalar) : null, - }), - }), - }, - B = a( - { - id: 8453, - network: 'base', - name: 'Base', - nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 }, - rpcUrls: { - alchemy: { http: ['https://base-mainnet.g.alchemy.com/v2'], webSocket: ['wss://base-mainnet.g.alchemy.com/v2'] }, - infura: { http: ['https://base-mainnet.infura.io/v3'], webSocket: ['wss://base-mainnet.infura.io/ws/v3'] }, - default: { http: ['https://mainnet.base.org'] }, - public: { http: ['https://mainnet.base.org'] }, - }, - blockExplorers: { - blockscout: { name: 'Basescout', url: 'https://base.blockscout.com' }, - default: { name: 'Basescan', url: 'https://basescan.org' }, - etherscan: { name: 'Basescan', url: 'https://basescan.org' }, - }, - contracts: { multicall3: { address: '0xca11bde05977b3631167028862be2a173976ca11', blockCreated: 5022 } }, - }, - { formatters: R } - ), - I = a({ - id: 56, - name: 'BNB Smart Chain', - network: 'bsc', - nativeCurrency: { decimals: 18, name: 'BNB', symbol: 'BNB' }, - rpcUrls: { default: { http: ['https://rpc.ankr.com/bsc'] }, public: { http: ['https://rpc.ankr.com/bsc'] } }, - blockExplorers: { - etherscan: { name: 'BscScan', url: 'https://bscscan.com' }, - default: { name: 'BscScan', url: 'https://bscscan.com' }, - }, - contracts: { multicall3: { address: '0xca11bde05977b3631167028862be2a173976ca11', blockCreated: 15921452 } }, - }); - class T extends c { - constructor({ size: t, targetSize: e, type: r }) { - super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (${t}) exceeds padding size (${e}).`), - Object.defineProperty(this, 'name', { enumerable: !0, configurable: !0, writable: !0, value: 'SizeExceedsPaddingSizeError' }); - } - } - function P(t, { dir: e, size: r = 32 } = {}) { - return 'string' == typeof t - ? (function (t, { dir: e, size: r = 32 } = {}) { - if (null === r) return t; - const i = t.replace('0x', ''); - if (i.length > 2 * r) throw new T({ size: Math.ceil(i.length / 2), targetSize: r, type: 'hex' }); - return `0x${i['right' === e ? 'padEnd' : 'padStart'](2 * r, '0')}`; - })(t, { dir: e, size: r }) - : (function (t, { dir: e, size: r = 32 } = {}) { - if (null === r) return t; - if (t.length > r) throw new T({ size: t.length, targetSize: r, type: 'bytes' }); - const i = new Uint8Array(r); - for (let n = 0; n < r; n++) { - const o = 'right' === e; - i[o ? n : r - n - 1] = t[o ? n : t.length - n - 1]; - } - return i; - })(t, { dir: e, size: r }); - } - const O = Array.from({ length: 256 }, (t, e) => e.toString(16).padStart(2, '0')); - function L(t, e = {}) { - return 'number' == typeof t || 'bigint' == typeof t - ? N(t, e) - : 'string' == typeof t - ? (function (t, e = {}) { - return C(j.encode(t), e); - })(t, e) - : 'boolean' == typeof t - ? (function (t, e = {}) { - const r = `0x${Number(t)}`; - return 'number' == typeof e.size ? (g(r, { size: e.size }), P(r, { size: e.size })) : r; - })(t, e) - : C(t, e); - } - function C(t, e = {}) { - let r = ''; - for (let e = 0; e < t.length; e++) r += O[t[e]]; - const i = `0x${r}`; - return 'number' == typeof e.size ? (g(i, { size: e.size }), P(i, { dir: 'right', size: e.size })) : i; - } - function N(t, e = {}) { - const { signed: r, size: i } = e, - n = BigInt(t); - let o; - i - ? (o = r ? (1n << (8n * BigInt(i) - 1n)) - 1n : 2n ** (8n * BigInt(i)) - 1n) - : 'number' == typeof t && (o = BigInt(Number.MAX_SAFE_INTEGER)); - const s = 'bigint' == typeof o && r ? -o - 1n : 0; - if ((o && n > o) || n < s) { - const e = 'bigint' == typeof t ? 'n' : ''; - throw new d({ max: o ? `${o}${e}` : void 0, min: `${s}${e}`, signed: r, size: i, value: `${t}${e}` }); - } - const a = `0x${(r && n < 0 ? (1n << BigInt(8 * i)) + BigInt(n) : n).toString(16)}`; - return i ? P(a, { size: i }) : a; - } - const j = new TextEncoder(), - U = { legacy: '0x0', eip2930: '0x1', eip1559: '0x2' }; - function D(t) { - return { - ...t, - gas: void 0 !== t.gas ? N(t.gas) : void 0, - gasPrice: void 0 !== t.gasPrice ? N(t.gasPrice) : void 0, - maxFeePerGas: void 0 !== t.maxFeePerGas ? N(t.maxFeePerGas) : void 0, - maxPriorityFeePerGas: void 0 !== t.maxPriorityFeePerGas ? N(t.maxPriorityFeePerGas) : void 0, - nonce: void 0 !== t.nonce ? N(t.nonce) : void 0, - type: void 0 !== t.type ? U[t.type] : void 0, - value: void 0 !== t.value ? N(t.value) : void 0, - }; - } - const z = v('transactionRequest', D); - function F(t, { dir: e = 'left' } = {}) { - let r = 'string' == typeof t ? t.replace('0x', '') : t, - i = 0; - for (let t = 0; t < r.length - 1 && '0' === r['left' === e ? t : r.length - t - 1].toString(); t++) i++; - return ( - (r = 'left' === e ? r.slice(i) : r.slice(0, r.length - i)), - 'string' == typeof t ? (1 === r.length && 'right' === e && (r = `${r}0`), `0x${r.length % 2 == 1 ? `0${r}` : r}`) : r - ); - } - function q(t) { - return ( - 0 === t || - 0n === t || - null == t || - '0' === t || - '' === t || - ('string' == typeof t && ('0x' === F(t).toLowerCase() || '0x00' === F(t).toLowerCase())) - ); - } - function H(t) { - return !q(t); - } - function $(t) { - return H(t.maxFeePerGas) && H(t.maxPriorityFeePerGas); - } - function Z(t) { - return 'cip42' === t.type || ($(t) && (H(t.feeCurrency) || H(t.gatewayFeeRecipient) || H(t.gatewayFee))); - } - function G(t) { - return 'cip64' === t.type || ($(t) && H(t.feeCurrency) && q(t.gatewayFee) && q(t.gatewayFeeRecipient)); - } - const V = { - block: S({ - exclude: ['difficulty', 'gasLimit', 'mixHash', 'nonce', 'uncles'], - format(t) { - const e = t.transactions?.map(t => - 'string' == typeof t - ? t - : { - ..._(t), - feeCurrency: t.feeCurrency, - ...('0x7b' !== t.type - ? { gatewayFee: t.gatewayFee ? b(t.gatewayFee) : null, gatewayFeeRecipient: t.gatewayFeeRecipient || null } - : {}), - } - ); - return { randomness: t.randomness, transactions: e }; - }, - }), - transaction: M({ - format(t) { - const e = { feeCurrency: t.feeCurrency }; - return ( - '0x7b' === t.type - ? (e.type = 'cip64') - : ('0x7c' === t.type && (e.type = 'cip42'), - (e.gatewayFee = t.gatewayFee ? b(t.gatewayFee) : null), - (e.gatewayFeeRecipient = t.gatewayFeeRecipient)), - e - ); - }, - }), - transactionRequest: z({ - format(t) { - const e = { feeCurrency: t.feeCurrency }; - return ( - G(t) - ? (e.type = '0x7b') - : (Z(t) && (e.type = '0x7c'), - (e.gatewayFee = void 0 !== t.gatewayFee ? N(t.gatewayFee) : void 0), - (e.gatewayFeeRecipient = t.gatewayFeeRecipient)), - e - ); - }, - }), - }; - class W extends c { - constructor({ address: t }) { - super(`Address "${t}" is invalid.`), - Object.defineProperty(this, 'name', { enumerable: !0, configurable: !0, writable: !0, value: 'InvalidAddressError' }); - } - } - class K extends c { - constructor({ chainId: t }) { - super(`Chain ID "${t}" is invalid.`), - Object.defineProperty(this, 'name', { enumerable: !0, configurable: !0, writable: !0, value: 'InvalidChainIdError' }); - } - } - const Y = { ether: -9, wei: 9 }; - function J(t, e = 'wei') { - return (function (t, e) { - let r = t.toString(); - const i = r.startsWith('-'); - i && (r = r.slice(1)), (r = r.padStart(e, '0')); - let [n, o] = [r.slice(0, r.length - e), r.slice(r.length - e)]; - return (o = o.replace(/(0+)$/, '')), `${i ? '-' : ''}${n || '0'}${o ? `.${o}` : ''}`; - })(t, Y[e]); - } - class X extends c { - constructor({ cause: t, message: e } = {}) { - const r = e?.replace('execution reverted: ', '')?.replace('execution reverted', ''); - super(`Execution reverted ${r ? `with reason: ${r}` : 'for an unknown reason'}.`, { cause: t }), - Object.defineProperty(this, 'name', { enumerable: !0, configurable: !0, writable: !0, value: 'ExecutionRevertedError' }); - } - } - Object.defineProperty(X, 'code', { enumerable: !0, configurable: !0, writable: !0, value: 3 }), - Object.defineProperty(X, 'nodeMessage', { enumerable: !0, configurable: !0, writable: !0, value: /execution reverted/ }); - class Q extends c { - constructor({ cause: t, maxFeePerGas: e } = {}) { - super(`The fee cap (\`maxFeePerGas\`${e ? ` = ${J(e)} gwei` : ''}) cannot be higher than the maximum allowed value (2^256-1).`, { - cause: t, - }), - Object.defineProperty(this, 'name', { enumerable: !0, configurable: !0, writable: !0, value: 'FeeCapTooHigh' }); - } - } - Object.defineProperty(Q, 'nodeMessage', { - enumerable: !0, - configurable: !0, - writable: !0, - value: /max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/, - }), - Object.defineProperty( - class extends c { - constructor({ cause: t, maxFeePerGas: e } = {}) { - super(`The fee cap (\`maxFeePerGas\`${e ? ` = ${J(e)}` : ''} gwei) cannot be lower than the block base fee.`, { cause: t }), - Object.defineProperty(this, 'name', { enumerable: !0, configurable: !0, writable: !0, value: 'FeeCapTooLow' }); - } - }, - 'nodeMessage', - { - enumerable: !0, - configurable: !0, - writable: !0, - value: /max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/, - } - ), - Object.defineProperty( - class extends c { - constructor({ cause: t, nonce: e } = {}) { - super(`Nonce provided for the transaction ${e ? `(${e}) ` : ''}is higher than the next one expected.`, { cause: t }), - Object.defineProperty(this, 'name', { enumerable: !0, configurable: !0, writable: !0, value: 'NonceTooHighError' }); - } - }, - 'nodeMessage', - { enumerable: !0, configurable: !0, writable: !0, value: /nonce too high/ } - ), - Object.defineProperty( - class extends c { - constructor({ cause: t, nonce: e } = {}) { - super( - [ - `Nonce provided for the transaction ${e ? `(${e}) ` : ''}is lower than the current nonce of the account.`, - 'Try increasing the nonce or find the latest nonce with `getTransactionCount`.', - ].join('\n'), - { cause: t } - ), - Object.defineProperty(this, 'name', { enumerable: !0, configurable: !0, writable: !0, value: 'NonceTooLowError' }); - } - }, - 'nodeMessage', - { enumerable: !0, configurable: !0, writable: !0, value: /nonce too low|transaction already imported|already known/ } - ), - Object.defineProperty( - class extends c { - constructor({ cause: t, nonce: e } = {}) { - super(`Nonce provided for the transaction ${e ? `(${e}) ` : ''}exceeds the maximum allowed nonce.`, { cause: t }), - Object.defineProperty(this, 'name', { enumerable: !0, configurable: !0, writable: !0, value: 'NonceMaxValueError' }); - } - }, - 'nodeMessage', - { enumerable: !0, configurable: !0, writable: !0, value: /nonce has max value/ } - ), - Object.defineProperty( - class extends c { - constructor({ cause: t } = {}) { - super( - ['The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account.'].join('\n'), - { - cause: t, - metaMessages: [ - 'This error could arise when the account does not have enough funds to:', - ' - pay for the total gas fee,', - ' - pay for the value to send.', - ' ', - 'The cost of the transaction is calculated as `gas * gas fee + value`, where:', - ' - `gas` is the amount of gas needed for transaction to execute,', - ' - `gas fee` is the gas fee,', - ' - `value` is the amount of ether to send to the recipient.', - ], - } - ), - Object.defineProperty(this, 'name', { enumerable: !0, configurable: !0, writable: !0, value: 'InsufficientFundsError' }); - } - }, - 'nodeMessage', - { enumerable: !0, configurable: !0, writable: !0, value: /insufficient funds/ } - ), - Object.defineProperty( - class extends c { - constructor({ cause: t, gas: e } = {}) { - super(`The amount of gas ${e ? `(${e}) ` : ''}provided for the transaction exceeds the limit allowed for the block.`, { - cause: t, - }), - Object.defineProperty(this, 'name', { enumerable: !0, configurable: !0, writable: !0, value: 'IntrinsicGasTooHighError' }); - } - }, - 'nodeMessage', - { enumerable: !0, configurable: !0, writable: !0, value: /intrinsic gas too high|gas limit reached/ } - ), - Object.defineProperty( - class extends c { - constructor({ cause: t, gas: e } = {}) { - super(`The amount of gas ${e ? `(${e}) ` : ''}provided for the transaction is too low.`, { cause: t }), - Object.defineProperty(this, 'name', { enumerable: !0, configurable: !0, writable: !0, value: 'IntrinsicGasTooLowError' }); - } - }, - 'nodeMessage', - { enumerable: !0, configurable: !0, writable: !0, value: /intrinsic gas too low/ } - ), - Object.defineProperty( - class extends c { - constructor({ cause: t }) { - super('The transaction type is not supported for this chain.', { cause: t }), - Object.defineProperty(this, 'name', { - enumerable: !0, - configurable: !0, - writable: !0, - value: 'TransactionTypeNotSupportedError', - }); - } - }, - 'nodeMessage', - { enumerable: !0, configurable: !0, writable: !0, value: /transaction type not valid/ } - ); - class tt extends c { - constructor({ cause: t, maxPriorityFeePerGas: e, maxFeePerGas: r } = {}) { - super( - [ - `The provided tip (\`maxPriorityFeePerGas\`${e ? ` = ${J(e)} gwei` : ''}) cannot be higher than the fee cap (\`maxFeePerGas\`${r ? ` = ${J(r)} gwei` : ''}).`, - ].join('\n'), - { cause: t } - ), - Object.defineProperty(this, 'name', { enumerable: !0, configurable: !0, writable: !0, value: 'TipAboveFeeCapError' }); - } - } - Object.defineProperty(tt, 'nodeMessage', { - enumerable: !0, - configurable: !0, - writable: !0, - value: /max priority fee per gas higher than max fee per gas|tip higher than fee cap/, - }); - const et = /^0x[a-fA-F0-9]{40}$/; - function rt(t) { - return et.test(t); - } - function it(t) { - return `0x${t.reduce((t, e) => t + e.replace('0x', ''), '')}`; - } - class nt extends c { - constructor({ offset: t }) { - super(`Offset \`${t}\` cannot be negative.`), - Object.defineProperty(this, 'name', { enumerable: !0, configurable: !0, writable: !0, value: 'NegativeOffsetError' }); - } - } - class ot extends c { - constructor({ length: t, position: e }) { - super(`Position \`${e}\` is out of bounds (\`0 < position < ${t}\`).`), - Object.defineProperty(this, 'name', { enumerable: !0, configurable: !0, writable: !0, value: 'PositionOutOfBoundsError' }); - } - } - const st = { - bytes: new Uint8Array(), - dataView: new DataView(new ArrayBuffer(0)), - position: 0, - assertPosition(t) { - if (t < 0 || t > this.bytes.length - 1) throw new ot({ length: this.bytes.length, position: t }); - }, - decrementPosition(t) { - if (t < 0) throw new nt({ offset: t }); - const e = this.position - t; - this.assertPosition(e), (this.position = e); - }, - incrementPosition(t) { - if (t < 0) throw new nt({ offset: t }); - const e = this.position + t; - this.assertPosition(e), (this.position = e); - }, - inspectByte(t) { - const e = t ?? this.position; - return this.assertPosition(e), this.bytes[e]; - }, - inspectBytes(t, e) { - const r = e ?? this.position; - return this.assertPosition(r + t - 1), this.bytes.subarray(r, r + t); - }, - inspectUint8(t) { - const e = t ?? this.position; - return this.assertPosition(e), this.bytes[e]; - }, - inspectUint16(t) { - const e = t ?? this.position; - return this.assertPosition(e + 1), this.dataView.getUint16(e); - }, - inspectUint24(t) { - const e = t ?? this.position; - return this.assertPosition(e + 2), (this.dataView.getUint16(e) << 8) + this.dataView.getUint8(e + 2); - }, - inspectUint32(t) { - const e = t ?? this.position; - return this.assertPosition(e + 3), this.dataView.getUint32(e); - }, - pushByte(t) { - this.assertPosition(this.position), (this.bytes[this.position] = t), this.position++; - }, - pushBytes(t) { - this.assertPosition(this.position + t.length - 1), this.bytes.set(t, this.position), (this.position += t.length); - }, - pushUint8(t) { - this.assertPosition(this.position), (this.bytes[this.position] = t), this.position++; - }, - pushUint16(t) { - this.assertPosition(this.position + 1), this.dataView.setUint16(this.position, t), (this.position += 2); - }, - pushUint24(t) { - this.assertPosition(this.position + 2), - this.dataView.setUint16(this.position, t >> 8), - this.dataView.setUint8(this.position + 2, 255 & t), - (this.position += 3); - }, - pushUint32(t) { - this.assertPosition(this.position + 3), this.dataView.setUint32(this.position, t), (this.position += 4); - }, - readByte() { - const t = this.inspectByte(); - return this.position++, t; - }, - readBytes(t) { - const e = this.inspectBytes(t); - return (this.position += t), e; - }, - readUint8() { - const t = this.inspectUint8(); - return (this.position += 1), t; - }, - readUint16() { - const t = this.inspectUint16(); - return (this.position += 2), t; - }, - readUint24() { - const t = this.inspectUint24(); - return (this.position += 3), t; - }, - readUint32() { - const t = this.inspectUint32(); - return (this.position += 4), t; - }, - setPosition(t) { - this.assertPosition(t), (this.position = t); - }, - }, - at = { zero: 48, nine: 57, A: 65, F: 70, a: 97, f: 102 }; - function ht(t) { - return t >= at.zero && t <= at.nine - ? t - at.zero - : t >= at.A && t <= at.F - ? t - (at.A - 10) - : t >= at.a && t <= at.f - ? t - (at.a - 10) - : void 0; - } - function ut(t, e = 'hex') { - const r = ft(t), - i = (function (t) { - const e = Object.create(st); - return (e.bytes = t), (e.dataView = new DataView(t.buffer, t.byteOffset, t.byteLength)), e; - })(new Uint8Array(r.length)); - return r.encode(i), 'hex' === e ? C(i.bytes) : i.bytes; - } - function ft(t) { - return Array.isArray(t) - ? (function (t) { - const e = t.reduce((t, e) => t + e.length, 0), - r = ct(e); - return { - length: e <= 55 ? 1 + e : 1 + r + e, - encode(i) { - e <= 55 - ? i.pushByte(192 + e) - : (i.pushByte(247 + r), - 1 === r ? i.pushUint8(e) : 2 === r ? i.pushUint16(e) : 3 === r ? i.pushUint24(e) : i.pushUint32(e)); - for (const { encode: e } of t) e(i); - }, - }; - })(t.map(t => ft(t))) - : (function (t) { - const e = - 'string' == typeof t - ? (function (t, e = {}) { - let r = t; - e.size && (g(r, { size: e.size }), (r = P(r, { dir: 'right', size: e.size }))); - let i = r.slice(2); - i.length % 2 && (i = `0${i}`); - const n = i.length / 2, - o = new Uint8Array(n); - for (let t = 0, e = 0; t < n; t++) { - const r = ht(i.charCodeAt(e++)), - n = ht(i.charCodeAt(e++)); - if (void 0 === r || void 0 === n) throw new c(`Invalid byte sequence ("${i[e - 2]}${i[e - 1]}" in "${i}").`); - o[t] = 16 * r + n; - } - return o; - })(t) - : t, - r = ct(e.length); - return { - length: 1 === e.length && e[0] < 128 ? 1 : e.length <= 55 ? 1 + e.length : 1 + r + e.length, - encode(t) { - 1 === e.length && e[0] < 128 - ? t.pushBytes(e) - : e.length <= 55 - ? (t.pushByte(128 + e.length), t.pushBytes(e)) - : (t.pushByte(183 + r), - 1 === r - ? t.pushUint8(e.length) - : 2 === r - ? t.pushUint16(e.length) - : 3 === r - ? t.pushUint24(e.length) - : t.pushUint32(e.length), - t.pushBytes(e)); - }, - }; - })(t); - } - function ct(t) { - if (t < 256) return 1; - if (t < 65536) return 2; - if (t < 2 ** 24) return 3; - if (t < 2 ** 32) return 4; - throw new c('Length is too large.'); - } - function lt(t) { - const e = Object.entries(t) - .map(([t, e]) => (void 0 === e || !1 === e ? null : [t, e])) - .filter(Boolean), - r = e.reduce((t, [e]) => Math.max(t, e.length), 0); - return e.map(([t, e]) => ` ${`${t}:`.padEnd(r + 1)} ${e}`).join('\n'); - } - class dt extends c { - constructor({ v: t }) { - super(`Invalid \`v\` value "${t}". Expected 27 or 28.`), - Object.defineProperty(this, 'name', { enumerable: !0, configurable: !0, writable: !0, value: 'InvalidLegacyVError' }); - } - } - class pt extends c { - constructor({ transaction: t }) { - super('Cannot infer a transaction type from provided transaction.', { - metaMessages: [ - 'Provided Transaction:', - '{', - lt(t), - '}', - '', - 'To infer the type, either provide:', - '- a `type` to the Transaction, or', - '- an EIP-1559 Transaction with `maxFeePerGas`, or', - '- an EIP-2930 Transaction with `gasPrice` & `accessList`, or', - '- a Legacy Transaction with `gasPrice`', - ], - }), - Object.defineProperty(this, 'name', { - enumerable: !0, - configurable: !0, - writable: !0, - value: 'InvalidSerializableTransactionError', - }); - } - } - class mt extends c { - constructor({ storageKey: t }) { - super(`Size for storage key "${t}" is invalid. Expected 32 bytes. Got ${Math.floor((t.length - 2) / 2)} bytes.`), - Object.defineProperty(this, 'name', { enumerable: !0, configurable: !0, writable: !0, value: 'InvalidStorageKeySizeError' }); - } - } - function gt(t) { - if (!t || 0 === t.length) return []; - const e = []; - for (let r = 0; r < t.length; r++) { - const { address: i, storageKeys: n } = t[r]; - for (let t = 0; t < n.length; t++) if (n[t].length - 2 != 64) throw new mt({ storageKey: n[t] }); - if (!rt(i)) throw new W({ address: i }); - e.push([i, n]); - } - return e; - } - const bt = { - transaction: (t, e) => - G(t) - ? (function (t, e) { - !(function (t) { - const { chainId: e, maxPriorityFeePerGas: r, gasPrice: i, maxFeePerGas: n, to: o, feeCurrency: s } = t; - if (e <= 0) throw new K({ chainId: e }); - if (o && !rt(o)) throw new W({ address: o }); - if (i) throw new c('`gasPrice` is not a valid CIP-64 Transaction attribute.'); - if (H(n) && n > yt) throw new Q({ maxFeePerGas: n }); - if (H(r) && H(n) && r > n) throw new tt({ maxFeePerGas: n, maxPriorityFeePerGas: r }); - if (H(s) && !rt(s)) throw new c('`feeCurrency` MUST be a token address for CIP-64 transactions.'); - if (q(s)) throw new c('`feeCurrency` must be provided for CIP-64 transactions.'); - })(t); - const { - chainId: r, - gas: i, - nonce: n, - to: o, - value: s, - maxFeePerGas: a, - maxPriorityFeePerGas: h, - accessList: u, - feeCurrency: f, - data: l, - } = t, - d = [ - L(r), - n ? L(n) : '0x', - h ? L(h) : '0x', - a ? L(a) : '0x', - i ? L(i) : '0x', - o ?? '0x', - s ? L(s) : '0x', - l ?? '0x', - gt(u), - f, - ]; - return e && d.push(27n === e.v ? '0x' : L(1), F(e.r), F(e.s)), it(['0x7b', ut(d)]); - })(t, e) - : Z(t) - ? (function (t, e) { - !(function (t) { - const { - chainId: e, - maxPriorityFeePerGas: r, - gasPrice: i, - maxFeePerGas: n, - to: o, - feeCurrency: s, - gatewayFee: a, - gatewayFeeRecipient: h, - } = t; - if (e <= 0) throw new K({ chainId: e }); - if (o && !rt(o)) throw new W({ address: o }); - if (i) throw new c('`gasPrice` is not a valid CIP-42 Transaction attribute.'); - if (H(n) && n > yt) throw new Q({ maxFeePerGas: n }); - if (H(r) && H(n) && r > n) throw new tt({ maxFeePerGas: n, maxPriorityFeePerGas: r }); - if ((H(a) && q(h)) || (H(h) && q(a))) - throw new c('`gatewayFee` and `gatewayFeeRecipient` must be provided together.'); - if (H(s) && !rt(s)) throw new c('`feeCurrency` MUST be a token address for CIP-42 transactions.'); - if (H(h) && !rt(h)) throw new W(h); - if (q(s) && q(h)) - throw new c('Either `feeCurrency` or `gatewayFeeRecipient` must be provided for CIP-42 transactions.'); - })(t); - const { - chainId: r, - gas: i, - nonce: n, - to: o, - value: s, - maxFeePerGas: a, - maxPriorityFeePerGas: h, - accessList: u, - feeCurrency: f, - gatewayFeeRecipient: l, - gatewayFee: d, - data: p, - } = t, - m = [ - L(r), - n ? L(n) : '0x', - h ? L(h) : '0x', - a ? L(a) : '0x', - i ? L(i) : '0x', - f ?? '0x', - l ?? '0x', - d ? L(d) : '0x', - o ?? '0x', - s ? L(s) : '0x', - p ?? '0x', - gt(u), - ]; - return e && m.push(27n === e.v ? '0x' : L(1), F(e.r), F(e.s)), it(['0x7c', ut(m)]); - })(t, e) - : (function (t, e) { - const r = (function (t) { - if (t.type) return t.type; - if (void 0 !== t.maxFeePerGas || void 0 !== t.maxPriorityFeePerGas) return 'eip1559'; - if (void 0 !== t.gasPrice) return void 0 !== t.accessList ? 'eip2930' : 'legacy'; - throw new pt({ transaction: t }); - })(t); - return 'eip1559' === r - ? (function (t, e) { - const { - chainId: r, - gas: i, - nonce: n, - to: o, - value: s, - maxFeePerGas: a, - maxPriorityFeePerGas: h, - accessList: u, - data: f, - } = t; - !(function (t) { - const { chainId: e, maxPriorityFeePerGas: r, gasPrice: i, maxFeePerGas: n, to: o } = t; - if (e <= 0) throw new K({ chainId: e }); - if (o && !rt(o)) throw new W({ address: o }); - if (i) throw new c('`gasPrice` is not a valid EIP-1559 Transaction attribute.'); - if (n && n > 2n ** 256n - 1n) throw new Q({ maxFeePerGas: n }); - if (r && n && r > n) throw new tt({ maxFeePerGas: n, maxPriorityFeePerGas: r }); - })(t); - const l = gt(u), - d = [ - L(r), - n ? L(n) : '0x', - h ? L(h) : '0x', - a ? L(a) : '0x', - i ? L(i) : '0x', - o ?? '0x', - s ? L(s) : '0x', - f ?? '0x', - l, - ]; - if (e) { - const t = 0n === e.v ? '0x' : 1n === e.v ? L(1) : 27n === e.v ? '0x' : L(1); - d.push(t, F(e.r), F(e.s)); - } - return it(['0x02', ut(d)]); - })(t, e) - : 'eip2930' === r - ? (function (t, e) { - const { chainId: r, gas: i, data: n, nonce: o, to: s, value: a, accessList: h, gasPrice: u } = t; - !(function (t) { - const { chainId: e, maxPriorityFeePerGas: r, gasPrice: i, maxFeePerGas: n, to: o } = t; - if (e <= 0) throw new K({ chainId: e }); - if (o && !rt(o)) throw new W({ address: o }); - if (r || n) - throw new c('`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.'); - if (i && i > 2n ** 256n - 1n) throw new Q({ maxFeePerGas: i }); - })(t); - const f = gt(h), - l = [L(r), o ? L(o) : '0x', u ? L(u) : '0x', i ? L(i) : '0x', s ?? '0x', a ? L(a) : '0x', n ?? '0x', f]; - if (e) { - const t = 0n === e.v ? '0x' : 1n === e.v ? L(1) : 27n === e.v ? '0x' : L(1); - l.push(t, F(e.r), F(e.s)); - } - return it(['0x01', ut(l)]); - })(t, e) - : (function (t, e) { - const { chainId: r = 0, gas: i, data: n, nonce: o, to: s, value: a, gasPrice: h } = t; - !(function (t) { - const { chainId: e, maxPriorityFeePerGas: r, gasPrice: i, maxFeePerGas: n, to: o, accessList: s } = t; - if (o && !rt(o)) throw new W({ address: o }); - if (void 0 !== e && e <= 0) throw new K({ chainId: e }); - if (r || n) throw new c('`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.'); - if (i && i > 2n ** 256n - 1n) throw new Q({ maxFeePerGas: i }); - if (s) throw new c('`accessList` is not a valid Legacy Transaction attribute.'); - })(t); - let u = [o ? L(o) : '0x', h ? L(h) : '0x', i ? L(i) : '0x', s ?? '0x', a ? L(a) : '0x', n ?? '0x']; - if (e) { - const t = (() => { - if (r > 0) return BigInt(2 * r) + BigInt(35n + e.v - 27n); - if (e.v >= 35n) return (e.v - 35n) / 2n > 0 ? e.v : 27n + (35n === e.v ? 0n : 1n); - const t = 27n + (27n === e.v ? 0n : 1n); - if (e.v !== t) throw new dt({ v: e.v }); - return t; - })(); - u = [...u, L(t), e.r, e.s]; - } else r > 0 && (u = [...u, L(r), '0x', '0x']); - return ut(u); - })(t, e); - })(t, e), - }, - yt = 2n ** 256n - 1n, - vt = a( - { - id: 42220, - name: 'Celo', - network: 'celo', - nativeCurrency: { decimals: 18, name: 'CELO', symbol: 'CELO' }, - rpcUrls: { - default: { http: ['https://forno.celo.org'] }, - infura: { http: ['https://celo-mainnet.infura.io/v3'] }, - public: { http: ['https://forno.celo.org'] }, - }, - blockExplorers: { - default: { name: 'Celo Explorer', url: 'https://explorer.celo.org/mainnet' }, - etherscan: { name: 'CeloScan', url: 'https://celoscan.io' }, - }, - contracts: { multicall3: { address: '0xcA11bde05977b3631167028862bE2a173976CA11', blockCreated: 13112599 } }, - testnet: !1, - }, - { formatters: V, serializers: bt } - ), - wt = a({ - id: 100, - name: 'Gnosis', - network: 'gnosis', - nativeCurrency: { decimals: 18, name: 'Gnosis', symbol: 'xDAI' }, - rpcUrls: { - default: { http: ['https://rpc.gnosischain.com'], webSocket: ['wss://rpc.gnosischain.com/wss'] }, - public: { http: ['https://rpc.gnosischain.com'], webSocket: ['wss://rpc.gnosischain.com/wss'] }, - }, - blockExplorers: { - etherscan: { name: 'Gnosisscan', url: 'https://gnosisscan.io' }, - default: { name: 'Gnosis Chain Explorer', url: 'https://blockscout.com/xdai/mainnet' }, - }, - contracts: { multicall3: { address: '0xca11bde05977b3631167028862be2a173976ca11', blockCreated: 21022491 } }, - }), - _t = a({ - id: 59144, - name: 'Linea Mainnet', - network: 'linea-mainnet', - nativeCurrency: { name: 'Linea Ether', symbol: 'ETH', decimals: 18 }, - rpcUrls: { - infura: { http: ['https://linea-mainnet.infura.io/v3'], webSocket: ['wss://linea-mainnet.infura.io/ws/v3'] }, - default: { http: ['https://rpc.linea.build'], webSocket: ['wss://rpc.linea.build'] }, - public: { http: ['https://rpc.linea.build'], webSocket: ['wss://rpc.linea.build'] }, - }, - blockExplorers: { - default: { name: 'Etherscan', url: 'https://lineascan.build' }, - etherscan: { name: 'Etherscan', url: 'https://lineascan.build' }, - blockscout: { name: 'Blockscout', url: 'https://explorer.linea.build' }, - }, - contracts: { multicall3: { address: '0xcA11bde05977b3631167028862bE2a173976CA11', blockCreated: 42 } }, - testnet: !1, - }), - Mt = a({ - id: 169, - name: 'Manta Pacific Mainnet', - network: 'manta', - nativeCurrency: { decimals: 18, name: 'ETH', symbol: 'ETH' }, - rpcUrls: { - default: { http: ['https://pacific-rpc.manta.network/http'] }, - public: { http: ['https://pacific-rpc.manta.network/http'] }, - }, - blockExplorers: { - etherscan: { name: 'Manta Explorer', url: 'https://pacific-explorer.manta.network' }, - default: { name: 'Manta Explorer', url: 'https://pacific-explorer.manta.network' }, - }, - contracts: { multicall3: { address: '0xcA11bde05977b3631167028862bE2a173976CA11', blockCreated: 332890 } }, - }), - Et = a( - { - id: 10, - name: 'OP Mainnet', - network: 'optimism', - nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 }, - rpcUrls: { - alchemy: { http: ['https://opt-mainnet.g.alchemy.com/v2'], webSocket: ['wss://opt-mainnet.g.alchemy.com/v2'] }, - infura: { http: ['https://optimism-mainnet.infura.io/v3'], webSocket: ['wss://optimism-mainnet.infura.io/ws/v3'] }, - default: { http: ['https://mainnet.optimism.io'] }, - public: { http: ['https://mainnet.optimism.io'] }, - }, - blockExplorers: { - etherscan: { name: 'Etherscan', url: 'https://optimistic.etherscan.io' }, - default: { name: 'Optimism Explorer', url: 'https://explorer.optimism.io' }, - }, - contracts: { multicall3: { address: '0xca11bde05977b3631167028862be2a173976ca11', blockCreated: 4286263 } }, - }, - { formatters: R } - ), - St = a({ - id: 1, - network: 'homestead', - name: 'Ethereum', - nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 }, - rpcUrls: { - alchemy: { http: ['https://eth-mainnet.g.alchemy.com/v2'], webSocket: ['wss://eth-mainnet.g.alchemy.com/v2'] }, - infura: { http: ['https://mainnet.infura.io/v3'], webSocket: ['wss://mainnet.infura.io/ws/v3'] }, - default: { http: ['https://cloudflare-eth.com'] }, - public: { http: ['https://cloudflare-eth.com'] }, - }, - blockExplorers: { - etherscan: { name: 'Etherscan', url: 'https://etherscan.io' }, - default: { name: 'Etherscan', url: 'https://etherscan.io' }, - }, - contracts: { - ensRegistry: { address: '0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e' }, - ensUniversalResolver: { address: '0xc0497E381f536Be9ce14B0dD3817cBcAe57d2F62', blockCreated: 16966585 }, - multicall3: { address: '0xca11bde05977b3631167028862be2a173976ca11', blockCreated: 14353601 }, - }, - }), - xt = a({ - id: 137, - name: 'Polygon', - network: 'matic', - nativeCurrency: { name: 'MATIC', symbol: 'MATIC', decimals: 18 }, - rpcUrls: { - alchemy: { http: ['https://polygon-mainnet.g.alchemy.com/v2'], webSocket: ['wss://polygon-mainnet.g.alchemy.com/v2'] }, - infura: { http: ['https://polygon-mainnet.infura.io/v3'], webSocket: ['wss://polygon-mainnet.infura.io/ws/v3'] }, - default: { http: ['https://polygon-rpc.com'] }, - public: { http: ['https://polygon-rpc.com'] }, - }, - blockExplorers: { - etherscan: { name: 'PolygonScan', url: 'https://polygonscan.com' }, - default: { name: 'PolygonScan', url: 'https://polygonscan.com' }, - }, - contracts: { multicall3: { address: '0xca11bde05977b3631167028862be2a173976ca11', blockCreated: 25770160 } }, - }), - At = a({ - id: 1101, - name: 'Polygon zkEVM', - network: 'polygon-zkevm', - nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 }, - rpcUrls: { default: { http: ['https://zkevm-rpc.com'] }, public: { http: ['https://zkevm-rpc.com'] } }, - blockExplorers: { default: { name: 'PolygonScan', url: 'https://zkevm.polygonscan.com' } }, - contracts: { multicall3: { address: '0xca11bde05977b3631167028862be2a173976ca11', blockCreated: 57746 } }, - }), - kt = a( - { - id: 7777777, - name: 'Zora', - network: 'zora', - nativeCurrency: { decimals: 18, name: 'Ether', symbol: 'ETH' }, - rpcUrls: { - default: { http: ['https://rpc.zora.energy'], webSocket: ['wss://rpc.zora.energy'] }, - public: { http: ['https://rpc.zora.energy'], webSocket: ['wss://rpc.zora.energy'] }, - }, - blockExplorers: { default: { name: 'Explorer', url: 'https://explorer.zora.energy' } }, - contracts: { multicall3: { address: '0xcA11bde05977b3631167028862bE2a173976CA11', blockCreated: 5882 } }, - }, - { formatters: R } - ), - Rt = a({ - id: 31337, - name: 'Hardhat', - network: 'hardhat', - nativeCurrency: { decimals: 18, name: 'Ether', symbol: 'ETH' }, - rpcUrls: { default: { http: ['http://127.0.0.1:8545'] }, public: { http: ['http://127.0.0.1:8545'] } }, - }), - Bt = a({ - id: 5, - network: 'goerli', - name: 'Goerli', - nativeCurrency: { name: 'Goerli Ether', symbol: 'ETH', decimals: 18 }, - rpcUrls: { - alchemy: { http: ['https://eth-goerli.g.alchemy.com/v2'], webSocket: ['wss://eth-goerli.g.alchemy.com/v2'] }, - infura: { http: ['https://goerli.infura.io/v3'], webSocket: ['wss://goerli.infura.io/ws/v3'] }, - default: { http: ['https://rpc.ankr.com/eth_goerli'] }, - public: { http: ['https://rpc.ankr.com/eth_goerli'] }, - }, - blockExplorers: { - etherscan: { name: 'Etherscan', url: 'https://goerli.etherscan.io' }, - default: { name: 'Etherscan', url: 'https://goerli.etherscan.io' }, - }, - contracts: { - ensRegistry: { address: '0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e' }, - ensUniversalResolver: { address: '0x56522D00C410a43BFfDF00a9A569489297385790', blockCreated: 8765204 }, - multicall3: { address: '0xca11bde05977b3631167028862be2a173976ca11', blockCreated: 6507670 }, - }, - testnet: !0, - }), - It = a({ - id: 11155111, - network: 'sepolia', - name: 'Sepolia', - nativeCurrency: { name: 'Sepolia Ether', symbol: 'SEP', decimals: 18 }, - rpcUrls: { - alchemy: { http: ['https://eth-sepolia.g.alchemy.com/v2'], webSocket: ['wss://eth-sepolia.g.alchemy.com/v2'] }, - infura: { http: ['https://sepolia.infura.io/v3'], webSocket: ['wss://sepolia.infura.io/ws/v3'] }, - default: { http: ['https://rpc.sepolia.org'] }, - public: { http: ['https://rpc.sepolia.org'] }, - }, - blockExplorers: { - etherscan: { name: 'Etherscan', url: 'https://sepolia.etherscan.io' }, - default: { name: 'Etherscan', url: 'https://sepolia.etherscan.io' }, - }, - contracts: { - multicall3: { address: '0xca11bde05977b3631167028862be2a173976ca11', blockCreated: 751532 }, - ensRegistry: { address: '0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e' }, - ensUniversalResolver: { address: '0x21B000Fd62a880b2125A61e36a284BB757b76025', blockCreated: 3914906 }, - }, - testnet: !0, - }), - Tt = a({ - id: 534352, - name: 'Scroll', - network: 'scroll', - nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 }, - rpcUrls: { - default: { http: ['https://rpc.scroll.io'], webSocket: ['wss://wss-rpc.scroll.io/ws'] }, - public: { http: ['https://rpc.scroll.io'], webSocket: ['wss://wss-rpc.scroll.io/ws'] }, - }, - blockExplorers: { - default: { name: 'Scrollscan', url: 'https://scrollscan.com' }, - blockscout: { name: 'Blockscout', url: 'https://blockscout.scroll.io' }, - }, - contracts: { multicall3: { address: '0xca11bde05977b3631167028862be2a173976ca11', blockCreated: 14 } }, - testnet: !1, - }), - Pt = a({ - id: 17e3, - network: 'holesky', - name: 'Holesky', - nativeCurrency: { name: 'Holesky Ether', symbol: 'ETH', decimals: 18 }, - rpcUrls: { - default: { http: ['https://ethereum-holesky.publicnode.com'] }, - public: { http: ['https://ethereum-holesky.publicnode.com'] }, - }, - contracts: { multicall3: { address: '0xca11bde05977b3631167028862be2a173976ca11', blockCreated: 77 } }, - testnet: !0, - }), - Ot = a( - { - id: 420, - name: 'Optimism Goerli', - network: 'optimism-goerli', - nativeCurrency: { name: 'Goerli Ether', symbol: 'ETH', decimals: 18 }, - rpcUrls: { - alchemy: { http: ['https://opt-goerli.g.alchemy.com/v2'], webSocket: ['wss://opt-goerli.g.alchemy.com/v2'] }, - infura: { http: ['https://optimism-goerli.infura.io/v3'], webSocket: ['wss://optimism-goerli.infura.io/ws/v3'] }, - default: { http: ['https://goerli.optimism.io'] }, - public: { http: ['https://goerli.optimism.io'] }, - }, - blockExplorers: { - etherscan: { name: 'Etherscan', url: 'https://goerli-optimism.etherscan.io' }, - default: { name: 'Etherscan', url: 'https://goerli-optimism.etherscan.io' }, - }, - contracts: { multicall3: { address: '0xca11bde05977b3631167028862be2a173976ca11', blockCreated: 49461 } }, - testnet: !0, - }, - { formatters: R } - ), - Lt = a( - { - id: 11155420, - name: 'Optimism Sepolia', - network: 'optimism-sepolia', - nativeCurrency: { name: 'Sepolia Ether', symbol: 'ETH', decimals: 18 }, - rpcUrls: { - alchemy: { http: ['https://opt-sepolia.g.alchemy.com/v2'], webSocket: ['wss://opt-sepolia.g.alchemy.com/v2'] }, - default: { http: ['https://sepolia.optimism.io'] }, - public: { http: ['https://sepolia.optimism.io'] }, - }, - blockExplorers: { - blockscout: { name: 'Blockscout', url: 'https://optimism-sepolia.blockscout.com' }, - default: { name: 'Blockscout', url: 'https://optimism-sepolia.blockscout.com' }, - }, - contracts: { multicall3: { address: '0xca11bde05977b3631167028862be2a173976ca11', blockCreated: 1620204 } }, - testnet: !0, - }, - { formatters: R } - ), - Ct = a({ - id: 97, - name: 'Binance Smart Chain Testnet', - network: 'bsc-testnet', - nativeCurrency: { decimals: 18, name: 'BNB', symbol: 'tBNB' }, - rpcUrls: { - default: { http: ['https://data-seed-prebsc-1-s1.bnbchain.org:8545'] }, - public: { http: ['https://data-seed-prebsc-1-s1.bnbchain.org:8545'] }, - }, - blockExplorers: { - etherscan: { name: 'BscScan', url: 'https://testnet.bscscan.com' }, - default: { name: 'BscScan', url: 'https://testnet.bscscan.com' }, - }, - contracts: { multicall3: { address: '0xca11bde05977b3631167028862be2a173976ca11', blockCreated: 17422483 } }, - testnet: !0, - }), - Nt = a({ - id: 80001, - name: 'Polygon Mumbai', - network: 'maticmum', - nativeCurrency: { name: 'MATIC', symbol: 'MATIC', decimals: 18 }, - rpcUrls: { - alchemy: { http: ['https://polygon-mumbai.g.alchemy.com/v2'], webSocket: ['wss://polygon-mumbai.g.alchemy.com/v2'] }, - infura: { http: ['https://polygon-mumbai.infura.io/v3'], webSocket: ['wss://polygon-mumbai.infura.io/ws/v3'] }, - default: { http: ['https://rpc.ankr.com/polygon_mumbai'] }, - public: { http: ['https://rpc.ankr.com/polygon_mumbai'] }, - }, - blockExplorers: { - etherscan: { name: 'PolygonScan', url: 'https://mumbai.polygonscan.com' }, - default: { name: 'PolygonScan', url: 'https://mumbai.polygonscan.com' }, - }, - contracts: { multicall3: { address: '0xca11bde05977b3631167028862be2a173976ca11', blockCreated: 25770160 } }, - testnet: !0, - }), - jt = a({ - id: 421613, - name: 'Arbitrum Goerli', - network: 'arbitrum-goerli', - nativeCurrency: { name: 'Arbitrum Goerli Ether', symbol: 'ETH', decimals: 18 }, - rpcUrls: { - alchemy: { http: ['https://arb-goerli.g.alchemy.com/v2'], webSocket: ['wss://arb-goerli.g.alchemy.com/v2'] }, - infura: { http: ['https://arbitrum-goerli.infura.io/v3'], webSocket: ['wss://arbitrum-goerli.infura.io/ws/v3'] }, - default: { http: ['https://goerli-rollup.arbitrum.io/rpc'] }, - public: { http: ['https://goerli-rollup.arbitrum.io/rpc'] }, - }, - blockExplorers: { - etherscan: { name: 'Arbiscan', url: 'https://goerli.arbiscan.io' }, - default: { name: 'Arbiscan', url: 'https://goerli.arbiscan.io' }, - }, - contracts: { multicall3: { address: '0xca11bde05977b3631167028862be2a173976ca11', blockCreated: 88114 } }, - testnet: !0, - }), - Ut = a({ - id: 421614, - name: 'Arbitrum Sepolia', - network: 'arbitrum-sepolia', - nativeCurrency: { name: 'Arbitrum Sepolia Ether', symbol: 'ETH', decimals: 18 }, - rpcUrls: { - alchemy: { http: ['https://arb-sepolia.g.alchemy.com/v2'], webSocket: ['wss://arb-sepolia.g.alchemy.com/v2'] }, - default: { http: ['https://sepolia-rollup.arbitrum.io/rpc'] }, - public: { http: ['https://sepolia-rollup.arbitrum.io/rpc'] }, - }, - blockExplorers: { - etherscan: { name: 'Arbiscan', url: 'https://sepolia.arbiscan.io' }, - default: { name: 'Arbiscan', url: 'https://sepolia.arbiscan.io' }, - }, - contracts: { multicall3: { address: '0xca11bde05977b3631167028862be2a173976ca11', blockCreated: 81930 } }, - testnet: !0, - }), - Dt = a( - { - id: 84532, - network: 'base-sepolia', - name: 'Base Sepolia', - nativeCurrency: { name: 'Sepolia Ether', symbol: 'ETH', decimals: 18 }, - rpcUrls: { - alchemy: { http: ['https://base-sepolia.g.alchemy.com/v2'], webSocket: ['wss://base-sepolia.g.alchemy.com/v2'] }, - default: { http: ['https://sepolia.base.org'] }, - public: { http: ['https://sepolia.base.org'] }, - }, - blockExplorers: { - blockscout: { name: 'Blockscout', url: 'https://base-sepolia.blockscout.com' }, - default: { name: 'Blockscout', url: 'https://base-sepolia.blockscout.com' }, - }, - testnet: !0, - sourceId: 11155111, - }, - { formatters: R } - ), - zt = a( - { - id: 999, - name: 'Zora Goerli Testnet', - network: 'zora-testnet', - nativeCurrency: { decimals: 18, name: 'Zora Goerli', symbol: 'ETH' }, - rpcUrls: { - default: { http: ['https://testnet.rpc.zora.energy'], webSocket: ['wss://testnet.rpc.zora.energy'] }, - public: { http: ['https://testnet.rpc.zora.energy'], webSocket: ['wss://testnet.rpc.zora.energy'] }, - }, - blockExplorers: { default: { name: 'Explorer', url: 'https://testnet.explorer.zora.energy' } }, - contracts: { multicall3: { address: '0xcA11bde05977b3631167028862bE2a173976CA11', blockCreated: 189123 } }, - testnet: !0, - }, - { formatters: R } - ), - Ft = a( - { - id: 999999999, - name: 'Zora Sepolia', - network: 'zora-sepolia', - nativeCurrency: { decimals: 18, name: 'Zora Sepolia', symbol: 'ETH' }, - rpcUrls: { - default: { http: ['https://sepolia.rpc.zora.energy'], webSocket: ['wss://sepolia.rpc.zora.energy'] }, - public: { http: ['https://sepolia.rpc.zora.energy'], webSocket: ['wss://sepolia.rpc.zora.energy'] }, - }, - blockExplorers: { default: { name: 'Zora Sepolia Explorer', url: 'https://sepolia.explorer.zora.energy/' } }, - contracts: { multicall3: { address: '0xcA11bde05977b3631167028862bE2a173976CA11', blockCreated: 83160 } }, - testnet: !0, - }, - { formatters: R } - ), - qt = a({ - id: 250, - name: 'Fantom', - network: 'fantom', - nativeCurrency: { decimals: 18, name: 'Fantom', symbol: 'FTM' }, - rpcUrls: { default: { http: ['https://rpc.ankr.com/fantom'] }, public: { http: ['https://rpc.ankr.com/fantom'] } }, - blockExplorers: { - etherscan: { name: 'FTMScan', url: 'https://ftmscan.com' }, - default: { name: 'FTMScan', url: 'https://ftmscan.com' }, - }, - contracts: { multicall3: { address: '0xca11bde05977b3631167028862be2a173976ca11', blockCreated: 33001987 } }, - }), - Ht = a({ - id: 16666e5, - name: 'Harmony One', - network: 'harmony', - nativeCurrency: { name: 'Harmony', symbol: 'ONE', decimals: 18 }, - rpcUrls: { public: { http: ['https://rpc.ankr.com/harmony'] }, default: { http: ['https://rpc.ankr.com/harmony'] } }, - blockExplorers: { default: { name: 'Harmony Explorer', url: 'https://explorer.harmony.one' } }, - contracts: { multicall3: { address: '0xca11bde05977b3631167028862be2a173976ca11', blockCreated: 24185753 } }, - }), - $t = a({ - id: 1284, - name: 'Moonbeam', - network: 'moonbeam', - nativeCurrency: { decimals: 18, name: 'GLMR', symbol: 'GLMR' }, - rpcUrls: { - public: { http: ['https://moonbeam.public.blastapi.io'], webSocket: ['wss://moonbeam.public.blastapi.io'] }, - default: { http: ['https://moonbeam.public.blastapi.io'], webSocket: ['wss://moonbeam.public.blastapi.io'] }, - }, - blockExplorers: { - default: { name: 'Moonscan', url: 'https://moonscan.io' }, - etherscan: { name: 'Moonscan', url: 'https://moonscan.io' }, - }, - contracts: { multicall3: { address: '0xcA11bde05977b3631167028862bE2a173976CA11', blockCreated: 609002 } }, - testnet: !1, - }); - var Zt, Gt; - ((Gt = Zt || (Zt = {}))[(Gt.arbitrum = h.id)] = 'arbitrum'), - (Gt[(Gt.arbitrumNova = u.id)] = 'arbitrumNova'), - (Gt[(Gt.avalanche = f.id)] = 'avalanche'), - (Gt[(Gt.base = B.id)] = 'base'), - (Gt[(Gt.bsc = I.id)] = 'bsc'), - (Gt[(Gt.celo = vt.id)] = 'celo'), - (Gt[(Gt.gnosis = wt.id)] = 'gnosis'), - (Gt[(Gt.linea = _t.id)] = 'linea'), - (Gt[(Gt.manta = Mt.id)] = 'manta'), - (Gt[(Gt.optimism = Et.id)] = 'optimism'), - (Gt[(Gt.mainnet = St.id)] = 'mainnet'), - (Gt[(Gt.polygon = xt.id)] = 'polygon'), - (Gt[(Gt.polygonZkEvm = At.id)] = 'polygonZkEvm'), - (Gt[(Gt.rari = 1380012617)] = 'rari'), - (Gt[(Gt.zora = kt.id)] = 'zora'), - (Gt[(Gt.hardhat = Rt.id)] = 'hardhat'), - (Gt[(Gt.hardhatOptimism = 1338)] = 'hardhatOptimism'), - (Gt[(Gt.goerli = Bt.id)] = 'goerli'), - (Gt[(Gt.sepolia = It.id)] = 'sepolia'), - (Gt[(Gt.scroll = Tt.id)] = 'scroll'), - (Gt[(Gt.holesky = Pt.id)] = 'holesky'), - (Gt[(Gt.optimismGoerli = Ot.id)] = 'optimismGoerli'), - (Gt[(Gt.optimismSepolia = Lt.id)] = 'optimismSepolia'), - (Gt[(Gt.bscTestnet = Ct.id)] = 'bscTestnet'), - (Gt[(Gt.polygonMumbai = Nt.id)] = 'polygonMumbai'), - (Gt[(Gt.arbitrumGoerli = jt.id)] = 'arbitrumGoerli'), - (Gt[(Gt.arbitrumSepolia = Ut.id)] = 'arbitrumSepolia'), - (Gt[(Gt.baseSepolia = Dt.id)] = 'baseSepolia'), - (Gt[(Gt.zoraTestnet = zt.id)] = 'zoraTestnet'), - (Gt[(Gt.zoraSepolia = Ft.id)] = 'zoraSepolia'), - (Gt[(Gt.fantom = qt.id)] = 'fantom'), - (Gt[(Gt.harmonyOne = Ht.id)] = 'harmonyOne'), - (Gt[(Gt.moonbeam = $t.id)] = 'moonbeam'), - r(1091); - var Vt = /^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i, - Wt = Math.ceil, - Kt = Math.floor, - Yt = '[BigNumber Error] ', - Jt = Yt + 'Number primitive has more than 15 significant digits: ', - Xt = 1e14, - Qt = 14, - te = 9007199254740991, - ee = [1, 10, 100, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11, 1e12, 1e13], - re = 1e7, - ie = 1e9; - function ne(t) { - var e = 0 | t; - return t > 0 || t === e ? e : e - 1; - } - function oe(t) { - for (var e, r, i = 1, n = t.length, o = t[0] + ''; i < n; ) { - for (e = t[i++] + '', r = Qt - e.length; r--; e = '0' + e); - o += e; - } - for (n = o.length; 48 === o.charCodeAt(--n); ); - return o.slice(0, n + 1 || 1); - } - function se(t, e) { - var r, - i, - n = t.c, - o = e.c, - s = t.s, - a = e.s, - h = t.e, - u = e.e; - if (!s || !a) return null; - if (((r = n && !n[0]), (i = o && !o[0]), r || i)) return r ? (i ? 0 : -a) : s; - if (s != a) return s; - if (((r = s < 0), (i = h == u), !n || !o)) return i ? 0 : !n ^ r ? 1 : -1; - if (!i) return (h > u) ^ r ? 1 : -1; - for (a = (h = n.length) < (u = o.length) ? h : u, s = 0; s < a; s++) if (n[s] != o[s]) return (n[s] > o[s]) ^ r ? 1 : -1; - return h == u ? 0 : (h > u) ^ r ? 1 : -1; - } - function ae(t, e, r, i) { - if (t < e || t > r || t !== Kt(t)) - throw Error( - Yt + - (i || 'Argument') + - ('number' == typeof t ? (t < e || t > r ? ' out of range: ' : ' not an integer: ') : ' not a primitive number: ') + - String(t) - ); - } - function he(t) { - var e = t.c.length - 1; - return ne(t.e / Qt) == e && t.c[e] % 2 != 0; - } - function ue(t, e) { - return (t.length > 1 ? t.charAt(0) + '.' + t.slice(1) : t) + (e < 0 ? 'e' : 'e+') + e; - } - function fe(t, e, r) { - var i, n; - if (e < 0) { - for (n = r + '.'; ++e; n += r); - t = n + t; - } else if (++e > (i = t.length)) { - for (n = r, e -= i; --e; n += r); - t += n; - } else e < i && (t = t.slice(0, e) + '.' + t.slice(e)); - return t; - } - var ce = (function t(e) { - var r, - i, - n, - o, - s, - a, - h, - u, - f, - c, - l = (x.prototype = { constructor: x, toString: null, valueOf: null }), - d = new x(1), - p = 20, - m = 4, - g = -7, - b = 21, - y = -1e7, - v = 1e7, - w = !1, - _ = 1, - M = 0, - E = { - prefix: '', - groupSize: 3, - secondaryGroupSize: 0, - groupSeparator: ',', - decimalSeparator: '.', - fractionGroupSize: 0, - fractionGroupSeparator: ' ', - suffix: '', - }, - S = '0123456789abcdefghijklmnopqrstuvwxyz'; - function x(t, e) { - var r, - o, - s, - a, - h, - u, - f, - c, - l = this; - if (!(l instanceof x)) return new x(t, e); - if (null == e) { - if (t && !0 === t._isBigNumber) - return ( - (l.s = t.s), - void (!t.c || t.e > v ? (l.c = l.e = null) : t.e < y ? (l.c = [(l.e = 0)]) : ((l.e = t.e), (l.c = t.c.slice()))) - ); - if ((u = 'number' == typeof t) && 0 * t == 0) { - if (((l.s = 1 / t < 0 ? ((t = -t), -1) : 1), t === ~~t)) { - for (a = 0, h = t; h >= 10; h /= 10, a++); - return void (a > v ? (l.c = l.e = null) : ((l.e = a), (l.c = [t]))); - } - c = String(t); - } else { - if (!Vt.test((c = String(t)))) return n(l, c, u); - l.s = 45 == c.charCodeAt(0) ? ((c = c.slice(1)), -1) : 1; - } - (a = c.indexOf('.')) > -1 && (c = c.replace('.', '')), - (h = c.search(/e/i)) > 0 ? (a < 0 && (a = h), (a += +c.slice(h + 1)), (c = c.substring(0, h))) : a < 0 && (a = c.length); - } else { - if ((ae(e, 2, S.length, 'Base'), 10 == e)) return B((l = new x(t)), p + l.e + 1, m); - if (((c = String(t)), (u = 'number' == typeof t))) { - if (0 * t != 0) return n(l, c, u, e); - if (((l.s = 1 / t < 0 ? ((c = c.slice(1)), -1) : 1), x.DEBUG && c.replace(/^0\.0*|\./, '').length > 15)) throw Error(Jt + t); - } else l.s = 45 === c.charCodeAt(0) ? ((c = c.slice(1)), -1) : 1; - for (r = S.slice(0, e), a = h = 0, f = c.length; h < f; h++) - if (r.indexOf((o = c.charAt(h))) < 0) { - if ('.' == o) { - if (h > a) { - a = f; - continue; - } - } else if (!s && ((c == c.toUpperCase() && (c = c.toLowerCase())) || (c == c.toLowerCase() && (c = c.toUpperCase())))) { - (s = !0), (h = -1), (a = 0); - continue; - } - return n(l, String(t), u, e); - } - (u = !1), (a = (c = i(c, e, 10, l.s)).indexOf('.')) > -1 ? (c = c.replace('.', '')) : (a = c.length); - } - for (h = 0; 48 === c.charCodeAt(h); h++); - for (f = c.length; 48 === c.charCodeAt(--f); ); - if ((c = c.slice(h, ++f))) { - if (((f -= h), u && x.DEBUG && f > 15 && (t > te || t !== Kt(t)))) throw Error(Jt + l.s * t); - if ((a = a - h - 1) > v) l.c = l.e = null; - else if (a < y) l.c = [(l.e = 0)]; - else { - if (((l.e = a), (l.c = []), (h = (a + 1) % Qt), a < 0 && (h += Qt), h < f)) { - for (h && l.c.push(+c.slice(0, h)), f -= Qt; h < f; ) l.c.push(+c.slice(h, (h += Qt))); - h = Qt - (c = c.slice(h)).length; - } else h -= f; - for (; h--; c += '0'); - l.c.push(+c); - } - } else l.c = [(l.e = 0)]; - } - function A(t, e, r, i) { - var n, o, s, a, h; - if ((null == r ? (r = m) : ae(r, 0, 8), !t.c)) return t.toString(); - if (((n = t.c[0]), (s = t.e), null == e)) - (h = oe(t.c)), (h = 1 == i || (2 == i && (s <= g || s >= b)) ? ue(h, s) : fe(h, s, '0')); - else if (((o = (t = B(new x(t), e, r)).e), (a = (h = oe(t.c)).length), 1 == i || (2 == i && (e <= o || o <= g)))) { - for (; a < e; h += '0', a++); - h = ue(h, o); - } else if (((e -= s), (h = fe(h, o, '0')), o + 1 > a)) { - if (--e > 0) for (h += '.'; e--; h += '0'); - } else if ((e += o - a) > 0) for (o + 1 == a && (h += '.'); e--; h += '0'); - return t.s < 0 && n ? '-' + h : h; - } - function k(t, e) { - for (var r, i = 1, n = new x(t[0]); i < t.length; i++) { - if (!(r = new x(t[i])).s) { - n = r; - break; - } - e.call(n, r) && (n = r); - } - return n; - } - function R(t, e, r) { - for (var i = 1, n = e.length; !e[--n]; e.pop()); - for (n = e[0]; n >= 10; n /= 10, i++); - return (r = i + r * Qt - 1) > v ? (t.c = t.e = null) : r < y ? (t.c = [(t.e = 0)]) : ((t.e = r), (t.c = e)), t; - } - function B(t, e, r, i) { - var n, - o, - s, - a, - h, - u, - f, - c = t.c, - l = ee; - if (c) { - t: { - for (n = 1, a = c[0]; a >= 10; a /= 10, n++); - if ((o = e - n) < 0) (o += Qt), (s = e), (f = ((h = c[(u = 0)]) / l[n - s - 1]) % 10 | 0); - else if ((u = Wt((o + 1) / Qt)) >= c.length) { - if (!i) break t; - for (; c.length <= u; c.push(0)); - (h = f = 0), (n = 1), (s = (o %= Qt) - Qt + 1); - } else { - for (h = a = c[u], n = 1; a >= 10; a /= 10, n++); - f = (s = (o %= Qt) - Qt + n) < 0 ? 0 : (h / l[n - s - 1]) % 10 | 0; - } - if ( - ((i = i || e < 0 || null != c[u + 1] || (s < 0 ? h : h % l[n - s - 1])), - (i = - r < 4 - ? (f || i) && (0 == r || r == (t.s < 0 ? 3 : 2)) - : f > 5 || - (5 == f && - (4 == r || i || (6 == r && (o > 0 ? (s > 0 ? h / l[n - s] : 0) : c[u - 1]) % 10 & 1) || r == (t.s < 0 ? 8 : 7)))), - e < 1 || !c[0]) - ) - return (c.length = 0), i ? ((e -= t.e + 1), (c[0] = l[(Qt - (e % Qt)) % Qt]), (t.e = -e || 0)) : (c[0] = t.e = 0), t; - if ( - (0 == o - ? ((c.length = u), (a = 1), u--) - : ((c.length = u + 1), (a = l[Qt - o]), (c[u] = s > 0 ? Kt((h / l[n - s]) % l[s]) * a : 0)), - i) - ) - for (;;) { - if (0 == u) { - for (o = 1, s = c[0]; s >= 10; s /= 10, o++); - for (s = c[0] += a, a = 1; s >= 10; s /= 10, a++); - o != a && (t.e++, c[0] == Xt && (c[0] = 1)); - break; - } - if (((c[u] += a), c[u] != Xt)) break; - (c[u--] = 0), (a = 1); - } - for (o = c.length; 0 === c[--o]; c.pop()); - } - t.e > v ? (t.c = t.e = null) : t.e < y && (t.c = [(t.e = 0)]); - } - return t; - } - function I(t) { - var e, - r = t.e; - return null === r ? t.toString() : ((e = oe(t.c)), (e = r <= g || r >= b ? ue(e, r) : fe(e, r, '0')), t.s < 0 ? '-' + e : e); - } - return ( - (x.clone = t), - (x.ROUND_UP = 0), - (x.ROUND_DOWN = 1), - (x.ROUND_CEIL = 2), - (x.ROUND_FLOOR = 3), - (x.ROUND_HALF_UP = 4), - (x.ROUND_HALF_DOWN = 5), - (x.ROUND_HALF_EVEN = 6), - (x.ROUND_HALF_CEIL = 7), - (x.ROUND_HALF_FLOOR = 8), - (x.EUCLID = 9), - (x.config = x.set = - function (t) { - var e, r; - if (null != t) { - if ('object' != typeof t) throw Error(Yt + 'Object expected: ' + t); - if ( - (t.hasOwnProperty((e = 'DECIMAL_PLACES')) && (ae((r = t[e]), 0, ie, e), (p = r)), - t.hasOwnProperty((e = 'ROUNDING_MODE')) && (ae((r = t[e]), 0, 8, e), (m = r)), - t.hasOwnProperty((e = 'EXPONENTIAL_AT')) && - ((r = t[e]) && r.pop - ? (ae(r[0], -ie, 0, e), ae(r[1], 0, ie, e), (g = r[0]), (b = r[1])) - : (ae(r, -ie, ie, e), (g = -(b = r < 0 ? -r : r)))), - t.hasOwnProperty((e = 'RANGE'))) - ) - if ((r = t[e]) && r.pop) ae(r[0], -ie, -1, e), ae(r[1], 1, ie, e), (y = r[0]), (v = r[1]); - else { - if ((ae(r, -ie, ie, e), !r)) throw Error(Yt + e + ' cannot be zero: ' + r); - y = -(v = r < 0 ? -r : r); - } - if (t.hasOwnProperty((e = 'CRYPTO'))) { - if ((r = t[e]) !== !!r) throw Error(Yt + e + ' not true or false: ' + r); - if (r) { - if ('undefined' == typeof crypto || !crypto || (!crypto.getRandomValues && !crypto.randomBytes)) - throw ((w = !r), Error(Yt + 'crypto unavailable')); - w = r; - } else w = r; - } - if ( - (t.hasOwnProperty((e = 'MODULO_MODE')) && (ae((r = t[e]), 0, 9, e), (_ = r)), - t.hasOwnProperty((e = 'POW_PRECISION')) && (ae((r = t[e]), 0, ie, e), (M = r)), - t.hasOwnProperty((e = 'FORMAT'))) - ) { - if ('object' != typeof (r = t[e])) throw Error(Yt + e + ' not an object: ' + r); - E = r; - } - if (t.hasOwnProperty((e = 'ALPHABET'))) { - if ('string' != typeof (r = t[e]) || /^.$|[+-.\s]|(.).*\1/.test(r)) throw Error(Yt + e + ' invalid: ' + r); - S = r; - } - } - return { - DECIMAL_PLACES: p, - ROUNDING_MODE: m, - EXPONENTIAL_AT: [g, b], - RANGE: [y, v], - CRYPTO: w, - MODULO_MODE: _, - POW_PRECISION: M, - FORMAT: E, - ALPHABET: S, - }; - }), - (x.isBigNumber = function (t) { - if (!t || !0 !== t._isBigNumber) return !1; - if (!x.DEBUG) return !0; - var e, - r, - i = t.c, - n = t.e, - o = t.s; - t: if ('[object Array]' == {}.toString.call(i)) { - if ((1 === o || -1 === o) && n >= -ie && n <= ie && n === Kt(n)) { - if (0 === i[0]) { - if (0 === n && 1 === i.length) return !0; - break t; - } - if (((e = (n + 1) % Qt) < 1 && (e += Qt), String(i[0]).length == e)) { - for (e = 0; e < i.length; e++) if ((r = i[e]) < 0 || r >= Xt || r !== Kt(r)) break t; - if (0 !== r) return !0; - } - } - } else if (null === i && null === n && (null === o || 1 === o || -1 === o)) return !0; - throw Error(Yt + 'Invalid BigNumber: ' + t); - }), - (x.maximum = x.max = - function () { - return k(arguments, l.lt); - }), - (x.minimum = x.min = - function () { - return k(arguments, l.gt); - }), - (x.random = - ((o = 9007199254740992), - (s = - (Math.random() * o) & 2097151 - ? function () { - return Kt(Math.random() * o); - } - : function () { - return 8388608 * ((1073741824 * Math.random()) | 0) + ((8388608 * Math.random()) | 0); - }), - function (t) { - var e, - r, - i, - n, - o, - a = 0, - h = [], - u = new x(d); - if ((null == t ? (t = p) : ae(t, 0, ie), (n = Wt(t / Qt)), w)) - if (crypto.getRandomValues) { - for (e = crypto.getRandomValues(new Uint32Array((n *= 2))); a < n; ) - (o = 131072 * e[a] + (e[a + 1] >>> 11)) >= 9e15 - ? ((r = crypto.getRandomValues(new Uint32Array(2))), (e[a] = r[0]), (e[a + 1] = r[1])) - : (h.push(o % 1e14), (a += 2)); - a = n / 2; - } else { - if (!crypto.randomBytes) throw ((w = !1), Error(Yt + 'crypto unavailable')); - for (e = crypto.randomBytes((n *= 7)); a < n; ) - (o = - 281474976710656 * (31 & e[a]) + - 1099511627776 * e[a + 1] + - 4294967296 * e[a + 2] + - 16777216 * e[a + 3] + - (e[a + 4] << 16) + - (e[a + 5] << 8) + - e[a + 6]) >= 9e15 - ? crypto.randomBytes(7).copy(e, a) - : (h.push(o % 1e14), (a += 7)); - a = n / 7; - } - if (!w) for (; a < n; ) (o = s()) < 9e15 && (h[a++] = o % 1e14); - for (n = h[--a], t %= Qt, n && t && ((o = ee[Qt - t]), (h[a] = Kt(n / o) * o)); 0 === h[a]; h.pop(), a--); - if (a < 0) h = [(i = 0)]; - else { - for (i = -1; 0 === h[0]; h.splice(0, 1), i -= Qt); - for (a = 1, o = h[0]; o >= 10; o /= 10, a++); - a < Qt && (i -= Qt - a); - } - return (u.e = i), (u.c = h), u; - })), - (x.sum = function () { - for (var t = 1, e = arguments, r = new x(e[0]); t < e.length; ) r = r.plus(e[t++]); - return r; - }), - (i = (function () { - var t = '0123456789'; - function e(t, e, r, i) { - for (var n, o, s = [0], a = 0, h = t.length; a < h; ) { - for (o = s.length; o--; s[o] *= e); - for (s[0] += i.indexOf(t.charAt(a++)), n = 0; n < s.length; n++) - s[n] > r - 1 && (null == s[n + 1] && (s[n + 1] = 0), (s[n + 1] += (s[n] / r) | 0), (s[n] %= r)); - } - return s.reverse(); - } - return function (i, n, o, s, a) { - var h, - u, - f, - c, - l, - d, - g, - b, - y = i.indexOf('.'), - v = p, - w = m; - for ( - y >= 0 && - ((c = M), - (M = 0), - (i = i.replace('.', '')), - (d = (b = new x(n)).pow(i.length - y)), - (M = c), - (b.c = e(fe(oe(d.c), d.e, '0'), 10, o, t)), - (b.e = b.c.length)), - f = c = (g = e(i, n, o, a ? ((h = S), t) : ((h = t), S))).length; - 0 == g[--c]; - g.pop() - ); - if (!g[0]) return h.charAt(0); - if ( - (y < 0 ? --f : ((d.c = g), (d.e = f), (d.s = s), (g = (d = r(d, b, v, w, o)).c), (l = d.r), (f = d.e)), - (y = g[(u = f + v + 1)]), - (c = o / 2), - (l = l || u < 0 || null != g[u + 1]), - (l = - w < 4 - ? (null != y || l) && (0 == w || w == (d.s < 0 ? 3 : 2)) - : y > c || (y == c && (4 == w || l || (6 == w && 1 & g[u - 1]) || w == (d.s < 0 ? 8 : 7)))), - u < 1 || !g[0]) - ) - i = l ? fe(h.charAt(1), -v, h.charAt(0)) : h.charAt(0); - else { - if (((g.length = u), l)) for (--o; ++g[--u] > o; ) (g[u] = 0), u || (++f, (g = [1].concat(g))); - for (c = g.length; !g[--c]; ); - for (y = 0, i = ''; y <= c; i += h.charAt(g[y++])); - i = fe(i, f, h.charAt(0)); - } - return i; - }; - })()), - (r = (function () { - function t(t, e, r) { - var i, - n, - o, - s, - a = 0, - h = t.length, - u = e % re, - f = (e / re) | 0; - for (t = t.slice(); h--; ) - (a = - (((n = u * (o = t[h] % re) + ((i = f * o + (s = (t[h] / re) | 0) * u) % re) * re + a) / r) | 0) + ((i / re) | 0) + f * s), - (t[h] = n % r); - return a && (t = [a].concat(t)), t; - } - function e(t, e, r, i) { - var n, o; - if (r != i) o = r > i ? 1 : -1; - else - for (n = o = 0; n < r; n++) - if (t[n] != e[n]) { - o = t[n] > e[n] ? 1 : -1; - break; - } - return o; - } - function r(t, e, r, i) { - for (var n = 0; r--; ) (t[r] -= n), (n = t[r] < e[r] ? 1 : 0), (t[r] = n * i + t[r] - e[r]); - for (; !t[0] && t.length > 1; t.splice(0, 1)); - } - return function (i, n, o, s, a) { - var h, - u, - f, - c, - l, - d, - p, - m, - g, - b, - y, - v, - w, - _, - M, - E, - S, - A = i.s == n.s ? 1 : -1, - k = i.c, - R = n.c; - if (!(k && k[0] && R && R[0])) - return new x(i.s && n.s && (k ? !R || k[0] != R[0] : R) ? ((k && 0 == k[0]) || !R ? 0 * A : A / 0) : NaN); - for ( - g = (m = new x(A)).c = [], - A = o + (u = i.e - n.e) + 1, - a || ((a = Xt), (u = ne(i.e / Qt) - ne(n.e / Qt)), (A = (A / Qt) | 0)), - f = 0; - R[f] == (k[f] || 0); - f++ - ); - if ((R[f] > (k[f] || 0) && u--, A < 0)) g.push(1), (c = !0); - else { - for ( - _ = k.length, - E = R.length, - f = 0, - A += 2, - (l = Kt(a / (R[0] + 1))) > 1 && ((R = t(R, l, a)), (k = t(k, l, a)), (E = R.length), (_ = k.length)), - w = E, - y = (b = k.slice(0, E)).length; - y < E; - b[y++] = 0 - ); - (S = R.slice()), (S = [0].concat(S)), (M = R[0]), R[1] >= a / 2 && M++; - do { - if (((l = 0), (h = e(R, b, E, y)) < 0)) { - if (((v = b[0]), E != y && (v = v * a + (b[1] || 0)), (l = Kt(v / M)) > 1)) - for (l >= a && (l = a - 1), p = (d = t(R, l, a)).length, y = b.length; 1 == e(d, b, p, y); ) - l--, r(d, E < p ? S : R, p, a), (p = d.length), (h = 1); - else 0 == l && (h = l = 1), (p = (d = R.slice()).length); - if ((p < y && (d = [0].concat(d)), r(b, d, y, a), (y = b.length), -1 == h)) - for (; e(R, b, E, y) < 1; ) l++, r(b, E < y ? S : R, y, a), (y = b.length); - } else 0 === h && (l++, (b = [0])); - (g[f++] = l), b[0] ? (b[y++] = k[w] || 0) : ((b = [k[w]]), (y = 1)); - } while ((w++ < _ || null != b[0]) && A--); - (c = null != b[0]), g[0] || g.splice(0, 1); - } - if (a == Xt) { - for (f = 1, A = g[0]; A >= 10; A /= 10, f++); - B(m, o + (m.e = f + u * Qt - 1) + 1, s, c); - } else (m.e = u), (m.r = +c); - return m; - }; - })()), - (a = /^(-?)0([xbo])(?=\w[\w.]*$)/i), - (h = /^([^.]+)\.$/), - (u = /^\.([^.]+)$/), - (f = /^-?(Infinity|NaN)$/), - (c = /^\s*\+(?=[\w.])|^\s+|\s+$/g), - (n = function (t, e, r, i) { - var n, - o = r ? e : e.replace(c, ''); - if (f.test(o)) t.s = isNaN(o) ? null : o < 0 ? -1 : 1; - else { - if ( - !r && - ((o = o.replace(a, function (t, e, r) { - return (n = 'x' == (r = r.toLowerCase()) ? 16 : 'b' == r ? 2 : 8), i && i != n ? t : e; - })), - i && ((n = i), (o = o.replace(h, '$1').replace(u, '0.$1'))), - e != o) - ) - return new x(o, n); - if (x.DEBUG) throw Error(Yt + 'Not a' + (i ? ' base ' + i : '') + ' number: ' + e); - t.s = null; - } - t.c = t.e = null; - }), - (l.absoluteValue = l.abs = - function () { - var t = new x(this); - return t.s < 0 && (t.s = 1), t; - }), - (l.comparedTo = function (t, e) { - return se(this, new x(t, e)); - }), - (l.decimalPlaces = l.dp = - function (t, e) { - var r, - i, - n, - o = this; - if (null != t) return ae(t, 0, ie), null == e ? (e = m) : ae(e, 0, 8), B(new x(o), t + o.e + 1, e); - if (!(r = o.c)) return null; - if (((i = ((n = r.length - 1) - ne(this.e / Qt)) * Qt), (n = r[n]))) for (; n % 10 == 0; n /= 10, i--); - return i < 0 && (i = 0), i; - }), - (l.dividedBy = l.div = - function (t, e) { - return r(this, new x(t, e), p, m); - }), - (l.dividedToIntegerBy = l.idiv = - function (t, e) { - return r(this, new x(t, e), 0, 1); - }), - (l.exponentiatedBy = l.pow = - function (t, e) { - var r, - i, - n, - o, - s, - a, - h, - u, - f = this; - if ((t = new x(t)).c && !t.isInteger()) throw Error(Yt + 'Exponent not an integer: ' + I(t)); - if ( - (null != e && (e = new x(e)), - (s = t.e > 14), - !f.c || !f.c[0] || (1 == f.c[0] && !f.e && 1 == f.c.length) || !t.c || !t.c[0]) - ) - return (u = new x(Math.pow(+I(f), s ? 2 - he(t) : +I(t)))), e ? u.mod(e) : u; - if (((a = t.s < 0), e)) { - if (e.c ? !e.c[0] : !e.s) return new x(NaN); - (i = !a && f.isInteger() && e.isInteger()) && (f = f.mod(e)); - } else { - if ( - t.e > 9 && - (f.e > 0 || f.e < -1 || (0 == f.e ? f.c[0] > 1 || (s && f.c[1] >= 24e7) : f.c[0] < 8e13 || (s && f.c[0] <= 9999975e7))) - ) - return (o = f.s < 0 && he(t) ? -0 : 0), f.e > -1 && (o = 1 / o), new x(a ? 1 / o : o); - M && (o = Wt(M / Qt + 2)); - } - for (s ? ((r = new x(0.5)), a && (t.s = 1), (h = he(t))) : (h = (n = Math.abs(+I(t))) % 2), u = new x(d); ; ) { - if (h) { - if (!(u = u.times(f)).c) break; - o ? u.c.length > o && (u.c.length = o) : i && (u = u.mod(e)); - } - if (n) { - if (0 === (n = Kt(n / 2))) break; - h = n % 2; - } else if ((B((t = t.times(r)), t.e + 1, 1), t.e > 14)) h = he(t); - else { - if (0 == (n = +I(t))) break; - h = n % 2; - } - (f = f.times(f)), o ? f.c && f.c.length > o && (f.c.length = o) : i && (f = f.mod(e)); - } - return i ? u : (a && (u = d.div(u)), e ? u.mod(e) : o ? B(u, M, m, void 0) : u); - }), - (l.integerValue = function (t) { - var e = new x(this); - return null == t ? (t = m) : ae(t, 0, 8), B(e, e.e + 1, t); - }), - (l.isEqualTo = l.eq = - function (t, e) { - return 0 === se(this, new x(t, e)); - }), - (l.isFinite = function () { - return !!this.c; - }), - (l.isGreaterThan = l.gt = - function (t, e) { - return se(this, new x(t, e)) > 0; - }), - (l.isGreaterThanOrEqualTo = l.gte = - function (t, e) { - return 1 === (e = se(this, new x(t, e))) || 0 === e; - }), - (l.isInteger = function () { - return !!this.c && ne(this.e / Qt) > this.c.length - 2; - }), - (l.isLessThan = l.lt = - function (t, e) { - return se(this, new x(t, e)) < 0; - }), - (l.isLessThanOrEqualTo = l.lte = - function (t, e) { - return -1 === (e = se(this, new x(t, e))) || 0 === e; - }), - (l.isNaN = function () { - return !this.s; - }), - (l.isNegative = function () { - return this.s < 0; - }), - (l.isPositive = function () { - return this.s > 0; - }), - (l.isZero = function () { - return !!this.c && 0 == this.c[0]; - }), - (l.minus = function (t, e) { - var r, - i, - n, - o, - s = this, - a = s.s; - if (((e = (t = new x(t, e)).s), !a || !e)) return new x(NaN); - if (a != e) return (t.s = -e), s.plus(t); - var h = s.e / Qt, - u = t.e / Qt, - f = s.c, - c = t.c; - if (!h || !u) { - if (!f || !c) return f ? ((t.s = -e), t) : new x(c ? s : NaN); - if (!f[0] || !c[0]) return c[0] ? ((t.s = -e), t) : new x(f[0] ? s : 3 == m ? -0 : 0); - } - if (((h = ne(h)), (u = ne(u)), (f = f.slice()), (a = h - u))) { - for ((o = a < 0) ? ((a = -a), (n = f)) : ((u = h), (n = c)), n.reverse(), e = a; e--; n.push(0)); - n.reverse(); - } else - for (i = (o = (a = f.length) < (e = c.length)) ? a : e, a = e = 0; e < i; e++) - if (f[e] != c[e]) { - o = f[e] < c[e]; - break; - } - if ((o && ((n = f), (f = c), (c = n), (t.s = -t.s)), (e = (i = c.length) - (r = f.length)) > 0)) for (; e--; f[r++] = 0); - for (e = Xt - 1; i > a; ) { - if (f[--i] < c[i]) { - for (r = i; r && !f[--r]; f[r] = e); - --f[r], (f[i] += Xt); - } - f[i] -= c[i]; - } - for (; 0 == f[0]; f.splice(0, 1), --u); - return f[0] ? R(t, f, u) : ((t.s = 3 == m ? -1 : 1), (t.c = [(t.e = 0)]), t); - }), - (l.modulo = l.mod = - function (t, e) { - var i, - n, - o = this; - return ( - (t = new x(t, e)), - !o.c || !t.s || (t.c && !t.c[0]) - ? new x(NaN) - : !t.c || (o.c && !o.c[0]) - ? new x(o) - : (9 == _ ? ((n = t.s), (t.s = 1), (i = r(o, t, 0, 3)), (t.s = n), (i.s *= n)) : (i = r(o, t, 0, _)), - (t = o.minus(i.times(t))).c[0] || 1 != _ || (t.s = o.s), - t) - ); - }), - (l.multipliedBy = l.times = - function (t, e) { - var r, - i, - n, - o, - s, - a, - h, - u, - f, - c, - l, - d, - p, - m, - g, - b = this, - y = b.c, - v = (t = new x(t, e)).c; - if (!(y && v && y[0] && v[0])) - return ( - !b.s || !t.s || (y && !y[0] && !v) || (v && !v[0] && !y) - ? (t.c = t.e = t.s = null) - : ((t.s *= b.s), y && v ? ((t.c = [0]), (t.e = 0)) : (t.c = t.e = null)), - t - ); - for ( - i = ne(b.e / Qt) + ne(t.e / Qt), - t.s *= b.s, - (h = y.length) < (c = v.length) && ((p = y), (y = v), (v = p), (n = h), (h = c), (c = n)), - n = h + c, - p = []; - n--; - p.push(0) - ); - for (m = Xt, g = re, n = c; --n >= 0; ) { - for (r = 0, l = v[n] % g, d = (v[n] / g) | 0, o = n + (s = h); o > n; ) - (r = - (((u = l * (u = y[--s] % g) + ((a = d * u + (f = (y[s] / g) | 0) * l) % g) * g + p[o] + r) / m) | 0) + - ((a / g) | 0) + - d * f), - (p[o--] = u % m); - p[o] = r; - } - return r ? ++i : p.splice(0, 1), R(t, p, i); - }), - (l.negated = function () { - var t = new x(this); - return (t.s = -t.s || null), t; - }), - (l.plus = function (t, e) { - var r, - i = this, - n = i.s; - if (((e = (t = new x(t, e)).s), !n || !e)) return new x(NaN); - if (n != e) return (t.s = -e), i.minus(t); - var o = i.e / Qt, - s = t.e / Qt, - a = i.c, - h = t.c; - if (!o || !s) { - if (!a || !h) return new x(n / 0); - if (!a[0] || !h[0]) return h[0] ? t : new x(a[0] ? i : 0 * n); - } - if (((o = ne(o)), (s = ne(s)), (a = a.slice()), (n = o - s))) { - for (n > 0 ? ((s = o), (r = h)) : ((n = -n), (r = a)), r.reverse(); n--; r.push(0)); - r.reverse(); - } - for ((n = a.length) - (e = h.length) < 0 && ((r = h), (h = a), (a = r), (e = n)), n = 0; e; ) - (n = ((a[--e] = a[e] + h[e] + n) / Xt) | 0), (a[e] = Xt === a[e] ? 0 : a[e] % Xt); - return n && ((a = [n].concat(a)), ++s), R(t, a, s); - }), - (l.precision = l.sd = - function (t, e) { - var r, - i, - n, - o = this; - if (null != t && t !== !!t) return ae(t, 1, ie), null == e ? (e = m) : ae(e, 0, 8), B(new x(o), t, e); - if (!(r = o.c)) return null; - if (((i = (n = r.length - 1) * Qt + 1), (n = r[n]))) { - for (; n % 10 == 0; n /= 10, i--); - for (n = r[0]; n >= 10; n /= 10, i++); - } - return t && o.e + 1 > i && (i = o.e + 1), i; - }), - (l.shiftedBy = function (t) { - return ae(t, -9007199254740991, te), this.times('1e' + t); - }), - (l.squareRoot = l.sqrt = - function () { - var t, - e, - i, - n, - o, - s = this, - a = s.c, - h = s.s, - u = s.e, - f = p + 4, - c = new x('0.5'); - if (1 !== h || !a || !a[0]) return new x(!h || (h < 0 && (!a || a[0])) ? NaN : a ? s : 1 / 0); - if ( - (0 == (h = Math.sqrt(+I(s))) || h == 1 / 0 - ? (((e = oe(a)).length + u) % 2 == 0 && (e += '0'), - (h = Math.sqrt(+e)), - (u = ne((u + 1) / 2) - (u < 0 || u % 2)), - (i = new x((e = h == 1 / 0 ? '5e' + u : (e = h.toExponential()).slice(0, e.indexOf('e') + 1) + u)))) - : (i = new x(h + '')), - i.c[0]) - ) - for ((h = (u = i.e) + f) < 3 && (h = 0); ; ) - if (((o = i), (i = c.times(o.plus(r(s, o, f, 1)))), oe(o.c).slice(0, h) === (e = oe(i.c)).slice(0, h))) { - if ((i.e < u && --h, '9999' != (e = e.slice(h - 3, h + 1)) && (n || '4999' != e))) { - (+e && (+e.slice(1) || '5' != e.charAt(0))) || (B(i, i.e + p + 2, 1), (t = !i.times(i).eq(s))); - break; - } - if (!n && (B(o, o.e + p + 2, 0), o.times(o).eq(s))) { - i = o; - break; - } - (f += 4), (h += 4), (n = 1); - } - return B(i, i.e + p + 1, m, t); - }), - (l.toExponential = function (t, e) { - return null != t && (ae(t, 0, ie), t++), A(this, t, e, 1); - }), - (l.toFixed = function (t, e) { - return null != t && (ae(t, 0, ie), (t = t + this.e + 1)), A(this, t, e); - }), - (l.toFormat = function (t, e, r) { - var i, - n = this; - if (null == r) - null != t && e && 'object' == typeof e - ? ((r = e), (e = null)) - : t && 'object' == typeof t - ? ((r = t), (t = e = null)) - : (r = E); - else if ('object' != typeof r) throw Error(Yt + 'Argument not an object: ' + r); - if (((i = n.toFixed(t, e)), n.c)) { - var o, - s = i.split('.'), - a = +r.groupSize, - h = +r.secondaryGroupSize, - u = r.groupSeparator || '', - f = s[0], - c = s[1], - l = n.s < 0, - d = l ? f.slice(1) : f, - p = d.length; - if ((h && ((o = a), (a = h), (h = o), (p -= o)), a > 0 && p > 0)) { - for (o = p % a || a, f = d.substr(0, o); o < p; o += a) f += u + d.substr(o, a); - h > 0 && (f += u + d.slice(o)), l && (f = '-' + f); - } - i = c - ? f + - (r.decimalSeparator || '') + - ((h = +r.fractionGroupSize) - ? c.replace(new RegExp('\\d{' + h + '}\\B', 'g'), '$&' + (r.fractionGroupSeparator || '')) - : c) - : f; - } - return (r.prefix || '') + i + (r.suffix || ''); - }), - (l.toFraction = function (t) { - var e, - i, - n, - o, - s, - a, - h, - u, - f, - c, - l, - p, - g = this, - b = g.c; - if (null != t && ((!(h = new x(t)).isInteger() && (h.c || 1 !== h.s)) || h.lt(d))) - throw Error(Yt + 'Argument ' + (h.isInteger() ? 'out of range: ' : 'not an integer: ') + I(h)); - if (!b) return new x(g); - for ( - e = new x(d), - f = i = new x(d), - n = u = new x(d), - p = oe(b), - s = e.e = p.length - g.e - 1, - e.c[0] = ee[(a = s % Qt) < 0 ? Qt + a : a], - t = !t || h.comparedTo(e) > 0 ? (s > 0 ? e : f) : h, - a = v, - v = 1 / 0, - h = new x(p), - u.c[0] = 0; - (c = r(h, e, 0, 1)), 1 != (o = i.plus(c.times(n))).comparedTo(t); - - ) - (i = n), (n = o), (f = u.plus(c.times((o = f)))), (u = o), (e = h.minus(c.times((o = e)))), (h = o); - return ( - (o = r(t.minus(i), n, 0, 1)), - (u = u.plus(o.times(f))), - (i = i.plus(o.times(n))), - (u.s = f.s = g.s), - (l = - r(f, n, (s *= 2), m) - .minus(g) - .abs() - .comparedTo(r(u, i, s, m).minus(g).abs()) < 1 - ? [f, n] - : [u, i]), - (v = a), - l - ); - }), - (l.toNumber = function () { - return +I(this); - }), - (l.toPrecision = function (t, e) { - return null != t && ae(t, 1, ie), A(this, t, e, 2); - }), - (l.toString = function (t) { - var e, - r = this, - n = r.s, - o = r.e; - return ( - null === o - ? n - ? ((e = 'Infinity'), n < 0 && (e = '-' + e)) - : (e = 'NaN') - : (null == t - ? (e = o <= g || o >= b ? ue(oe(r.c), o) : fe(oe(r.c), o, '0')) - : 10 === t - ? (e = fe(oe((r = B(new x(r), p + o + 1, m)).c), r.e, '0')) - : (ae(t, 2, S.length, 'Base'), (e = i(fe(oe(r.c), o, '0'), 10, t, n, !0))), - n < 0 && r.c[0] && (e = '-' + e)), - e - ); - }), - (l.valueOf = l.toJSON = - function () { - return I(this); - }), - (l._isBigNumber = !0), - (l[Symbol.toStringTag] = 'BigNumber'), - (l[Symbol.for('nodejs.util.inspect.custom')] = l.valueOf), - null != e && x.set(e), - x - ); - })(); - const le = ce; - function de(t) { - return t && t.Math == Math ? t : void 0; - } - const pe = - ('object' == typeof globalThis && de(globalThis)) || - ('object' == typeof window && de(window)) || - ('object' == typeof self && de(self)) || - ('object' == typeof r.g && de(r.g)) || - (function () { - return this; - })() || - {}, - me = t => { - try { - if (t) { - const e = new URL(t).host; - return 0 === e.indexOf('www.') ? e.replace('www.', '') : e; - } - return ''; - } catch (t) { - return ''; - } - }; - var ge; - !(function (t) { - (t.success = 'success'), - (t.no_active_session = 'no_active_session'), - (t.unsupported_network = 'unsupported_network'), - (t.already_added = 'already_added'), - (t.set_as_active = 'set_as_active'), - (t.already_active = 'already_active'); - })(ge || (ge = {})); - var be; - !(function (t) { - (t.eth_chainId = 'eth_chainId'), - (t.eth_accounts = 'eth_accounts'), - (t.eth_sendTransaction = 'eth_sendTransaction'), - (t.eth_signTransaction = 'eth_signTransaction'), - (t.personal_sign = 'personal_sign'), - (t.eth_signTypedData = 'eth_signTypedData'), - (t.eth_signTypedData_v3 = 'eth_signTypedData_v3'), - (t.eth_signTypedData_v4 = 'eth_signTypedData_v4'), - (t.eth_getCode = 'eth_getCode'), - (t.wallet_addEthereumChain = 'wallet_addEthereumChain'), - (t.wallet_switchEthereumChain = 'wallet_switchEthereumChain'), - (t.eth_requestAccounts = 'eth_requestAccounts'), - (t.eth_blockNumber = 'eth_blockNumber'), - (t.eth_call = 'eth_call'), - (t.eth_estimateGas = 'eth_estimateGas'), - (t.personal_ecRecover = 'personal_ecRecover'), - (t.eth_gasPrice = 'eth_gasPrice'), - (t.eth_getBlockByNumber = 'eth_getBlockByNumber'), - (t.eth_getBalance = 'eth_getBalance'), - (t.eth_getTransactionByHash = 'eth_getTransactionByHash'); - })(be || (be = {})); - const ye = { - available: 'undefined' != typeof window, - name: 'webviewMessenger', - send: async (t, e, { id: r } = {}) => ( - window.ReactNativeWebView.postMessage(JSON.stringify({ topic: `> ${t}`, payload: e, id: r })), - new Promise((e, i) => { - const n = o => { - if ( - !(function ({ id: t, topic: e, message: r }) { - if (r.topic === `< ${e}` && (void 0 === t || r.id === t) && r.payload) return !0; - })({ id: r, message: o.data, topic: t }) - ) - return; - if (o.source != window) return; - window.removeEventListener('message', n); - const { response: s, error: a } = o.data.payload; - a && i(new Error(a.message)), e(s); - }; - window.addEventListener('message', n); - }) - ), - reply(t, e) { - const r = async r => { - if ( - !(function ({ topic: t, message: e }) { - return !(!e.topic || ('*' !== t && e.topic !== `> ${t}`) || ('*' === t && e.topic.startsWith('<'))); - })({ message: r.data, topic: t }) - ) - return; - if (r.source != window) return; - let i, n; - try { - n = await e(r.data.payload, { topic: r.data.topic, sender: r.source, id: r.data.id }); - } catch (t) { - i = t; - } - const o = r.data.topic.replace('>', '<'); - window.ReactNativeWebView.postMessage(JSON.stringify({ topic: o, payload: { error: i, response: n }, id: r.data.id })); - }; - return window.addEventListener('message', r, !1), () => window.removeEventListener('message', r); - }, - }, - ve = (function ({ messenger: t, topic: e }) { - return ( - t.available || console.error(`Messenger "${t.name}" is not available in this context.`), - { - send: async (r, { id: i }) => t.send(e, r, { id: i }), - async reply(r) { - t.reply(e, r); - }, - } - ); - })({ messenger: ye, topic: 'providerRequest' }), - we = new s({ - backgroundMessenger: ye, - providerRequestTransport: ve, - onConstruct({ emit: t }) { - if ( - (t => { - try { - return new URL(t), !0; - } catch (t) { - return !1; - } - })(window.location.href) - ) { - const e = me(window.location.href); - ye?.reply(`accountsChanged:${e}`, async e => { - t('accountsChanged', [e]); - }), - ye?.reply(`chainChanged:${e}`, async e => { - var r, i; - t('chainChanged', ((r = String(e)), (i = (t => new le(t).toString(16))(r)).startsWith('0x') ? i : `0x${i}`)); - }), - ye?.reply(`disconnect:${e}`, async () => { - t('disconnect', []); - }), - ye?.reply(`connect:${e}`, async e => { - t('connect', e); - }); - } - }, - }); - (function () { - const { doctype: t } = window.document; - return !t || 'html' === t.name; - })() && - (function () { - const t = [/\.xml$/u, /\.pdf$/u], - e = window.location.pathname; - for (let r = 0; r < t.length; r++) if (t[r].test(e)) return !1; - return !0; - })() && - (function () { - const t = document.documentElement.nodeName; - return !t || 'html' === t.toLowerCase(); - })() && - ((function (t) { - const e = new CustomEvent('eip6963:announceProvider', { detail: Object.freeze(t) }); - window.dispatchEvent(e); - window.addEventListener('eip6963:requestProvider', () => window.dispatchEvent(e)); - })({ - info: { - icon: 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMiIgaGVpZ2h0PSIzMiIgZmlsbD0ibm9uZSI+PGcgY2xpcC1wYXRoPSJ1cmwoI2EpIj48cGF0aCBmaWxsPSJ1cmwoI2IpIiBkPSJNMCAwaDMydjMySDB6Ii8+PHBhdGggZmlsbD0idXJsKCNjKSIgZD0iTTUuMzMzIDEwLjEzM2gxLjZjOC4yNDggMCAxNC45MzQgNi42ODYgMTQuOTM0IDE0LjkzNHYxLjZoMy4yYTEuNiAxLjYgMCAwIDAgMS42LTEuNmMwLTEwLjg5OS04LjgzNS0xOS43MzQtMTkuNzM0LTE5LjczNGExLjYgMS42IDAgMCAwLTEuNiAxLjZ2My4yWiIvPjxwYXRoIGZpbGw9InVybCgjZCkiIGQ9Ik0yMi40IDI1LjA2N2g0LjI2N2ExLjYgMS42IDAgMCAxLTEuNiAxLjZIMjIuNHYtMS42WiIvPjxwYXRoIGZpbGw9InVybCgjZSkiIGQ9Ik02LjkzMyA1LjMzM1Y5LjZoLTEuNlY2LjkzM2ExLjYgMS42IDAgMCAxIDEuNi0xLjZaIi8+PHBhdGggZmlsbD0idXJsKCNmKSIgZD0iTTUuMzMzIDkuNmgxLjZjOC41NDIgMCAxNS40NjcgNi45MjUgMTUuNDY3IDE1LjQ2N3YxLjZoLTQuOHYtMS42YzAtNS44OTEtNC43NzYtMTAuNjY3LTEwLjY2Ny0xMC42NjdoLTEuNlY5LjZaIi8+PHBhdGggZmlsbD0idXJsKCNnKSIgZD0iTTE4LjEzMyAyNS4wNjdIMjIuNHYxLjZoLTQuMjY3di0xLjZaIi8+PHBhdGggZmlsbD0idXJsKCNoKSIgZD0iTTUuMzMzIDEzLjg2N1Y5LjZoMS42djQuMjY3aC0xLjZaIi8+PHBhdGggZmlsbD0idXJsKCNpKSIgZD0iTTUuMzMzIDE2LjUzM2ExLjYgMS42IDAgMCAwIDEuNiAxLjYgNi45MzMgNi45MzMgMCAwIDEgNi45MzQgNi45MzQgMS42IDEuNiAwIDAgMCAxLjYgMS42aDIuNjY2di0xLjZjMC02LjE4Ni01LjAxNC0xMS4yLTExLjItMTEuMmgtMS42djIuNjY2WiIvPjxwYXRoIGZpbGw9InVybCgjaikiIGQ9Ik0xMy44NjcgMjUuMDY3aDQuMjY2djEuNmgtMi42NjZhMS42IDEuNiAwIDAgMS0xLjYtMS42WiIvPjxwYXRoIGZpbGw9InVybCgjaykiIGQ9Ik02LjkzMyAxOC4xMzNhMS42IDEuNiAwIDAgMS0xLjYtMS42di0yLjY2NmgxLjZ2NC4yNjZaIi8+PC9nPjxkZWZzPjxyYWRpYWxHcmFkaWVudCBpZD0iYyIgY3g9IjAiIGN5PSIwIiByPSIxIiBncmFkaWVudFRyYW5zZm9ybT0icm90YXRlKC05MCAxNiA5LjA2Nykgc2NhbGUoMTkuNzMzMykiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj48c3RvcCBvZmZzZXQ9Ii43NyIgc3RvcC1jb2xvcj0iI0ZGNDAwMCIvPjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzg3NTRDOSIvPjwvcmFkaWFsR3JhZGllbnQ+PHJhZGlhbEdyYWRpZW50IGlkPSJmIiBjeD0iMCIgY3k9IjAiIHI9IjEiIGdyYWRpZW50VHJhbnNmb3JtPSJyb3RhdGUoLTkwIDE2IDkuMDY3KSBzY2FsZSgxNS40NjY3KSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPjxzdG9wIG9mZnNldD0iLjcyNCIgc3RvcC1jb2xvcj0iI0ZGRjcwMCIvPjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iI0ZGOTkwMSIvPjwvcmFkaWFsR3JhZGllbnQ+PHJhZGlhbEdyYWRpZW50IGlkPSJpIiBjeD0iMCIgY3k9IjAiIHI9IjEiIGdyYWRpZW50VHJhbnNmb3JtPSJyb3RhdGUoLTkwIDE2IDkuMDY3KSBzY2FsZSgxMS4yKSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPjxzdG9wIG9mZnNldD0iLjU5NSIgc3RvcC1jb2xvcj0iIzBBRiIvPjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzAxREE0MCIvPjwvcmFkaWFsR3JhZGllbnQ+PHJhZGlhbEdyYWRpZW50IGlkPSJqIiBjeD0iMCIgY3k9IjAiIHI9IjEiIGdyYWRpZW50VHJhbnNmb3JtPSJtYXRyaXgoNC41MzMzMyAwIDAgMTIuMDg4OSAxMy42IDI1Ljg2NykiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj48c3RvcCBzdG9wLWNvbG9yPSIjMEFGIi8+PHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjMDFEQTQwIi8+PC9yYWRpYWxHcmFkaWVudD48cmFkaWFsR3JhZGllbnQgaWQ9ImsiIGN4PSIwIiBjeT0iMCIgcj0iMSIgZ3JhZGllbnRUcmFuc2Zvcm09Im1hdHJpeCgwIC00LjUzMzMzIDg1Ljk2NTQgMCA2LjEzMyAxOC40KSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPjxzdG9wIHN0b3AtY29sb3I9IiMwQUYiLz48c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiMwMURBNDAiLz48L3JhZGlhbEdyYWRpZW50PjxsaW5lYXJHcmFkaWVudCBpZD0iYiIgeDE9IjE2IiB4Mj0iMTYiIHkxPSIwIiB5Mj0iMzIiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj48c3RvcCBzdG9wLWNvbG9yPSIjMTc0Mjk5Ii8+PHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjMDAxRTU5Ii8+PC9saW5lYXJHcmFkaWVudD48bGluZWFyR3JhZGllbnQgaWQ9ImQiIHgxPSIyMi4xMzMiIHgyPSIyNi42NjciIHkxPSIyNS44NjciIHkyPSIyNS44NjciIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj48c3RvcCBzdG9wLWNvbG9yPSIjRkY0MDAwIi8+PHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjODc1NEM5Ii8+PC9saW5lYXJHcmFkaWVudD48bGluZWFyR3JhZGllbnQgaWQ9ImUiIHgxPSI2LjEzMyIgeDI9IjYuMTMzIiB5MT0iNS4zMzMiIHkyPSI5Ljg2NyIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPjxzdG9wIHN0b3AtY29sb3I9IiM4NzU0QzkiLz48c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiNGRjQwMDAiLz48L2xpbmVhckdyYWRpZW50PjxsaW5lYXJHcmFkaWVudCBpZD0iZyIgeDE9IjE4LjEzMyIgeDI9IjIyLjQiIHkxPSIyNS44NjciIHkyPSIyNS44NjciIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj48c3RvcCBzdG9wLWNvbG9yPSIjRkZGNzAwIi8+PHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjRkY5OTAxIi8+PC9saW5lYXJHcmFkaWVudD48bGluZWFyR3JhZGllbnQgaWQ9ImgiIHgxPSI2LjEzMyIgeDI9IjYuMTMzIiB5MT0iMTMuODY3IiB5Mj0iOS42IiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+PHN0b3Agc3RvcC1jb2xvcj0iI0ZGRjcwMCIvPjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iI0ZGOTkwMSIvPjwvbGluZWFyR3JhZGllbnQ+PGNsaXBQYXRoIGlkPSJhIj48cGF0aCBmaWxsPSIjZmZmIiBkPSJNMCAwaDMydjMySDB6Ii8+PC9jbGlwUGF0aD48L2RlZnM+PC9zdmc+', - name: 'Rainbow', - rdns: 'me.rainbow', - uuid: (function () { - const t = pe, - e = t.crypto || t.msCrypto; - let r = () => 16 * Math.random(); - try { - if (e && e.randomUUID) return e.randomUUID().replace(/-/g, ''); - e && e.getRandomValues && (r = () => e.getRandomValues(new Uint8Array(1))[0]); - } catch (t) {} - return ([1e7] + 1e3 + 4e3 + 8e3 + 1e11).replace(/[018]/g, t => (t ^ ((15 & r()) >> (t / 4))).toString(16)); - })(), - }, - provider: we, - }), - ye.reply('rainbow_ethereumChainEvent', async ({ chainId: t, chainName: e, status: r, extensionUrl: i, host: n }) => { - me(window.location.href) === n && - alert('Should inject notification ' + JSON.stringify({ chainId: t, chainName: e, status: r, extensionUrl: i })); - }), - ye.reply('rainbow_reload', async () => { - window.location.reload(); - }), - Object.defineProperties(window, { - rainbow: { value: we, configurable: !1, writable: !1 }, - ethereum: { - get: () => window.walletRouter.currentProvider, - set(t) { - window.walletRouter.addProvider(t); - }, - configurable: !1, - }, - walletRouter: { - value: { - rainbowProvider: we, - lastInjectedProvider: window.ethereum, - currentProvider: we, - providers: [we, ...(window.ethereum ? [window.ethereum] : [])], - setDefaultProvider(t) { - if (t) window.walletRouter.currentProvider = window.rainbow; - else { - const t = window.walletRouter.lastInjectedProvider ?? window.ethereum; - window.walletRouter.currentProvider = t; - } - }, - addProvider(t) { - window.walletRouter.providers.includes(t) || window.walletRouter.providers.push(t), - we !== t && (window.walletRouter.lastInjectedProvider = t); - }, - }, - configurable: !1, - writable: !1, - }, - }), - (window.rainbow.providers = window.walletRouter.providers), - window.dispatchEvent(new Event('ethereum#initialized')), - ye.reply('rainbow_setDefaultProvider', async ({ rainbowAsDefault: t }) => { - window.walletRouter.setDefaultProvider(t); - })); - })(); -})(); +(()=>{var e={6289:(e,t)=>{"use strict";function r(e){if(Array.isArray(e)){const t=[];let n=0;for(let o=0;oe.length)throw new Error("invalid RLP (safeSlice): end slice of Uint8Array out-of-bounds");return e.slice(t,r)}function o(e){if(0===e[0])throw new Error("invalid RLP: extra zeros");return l(u(e))}function i(e,t){if(e<56)return Uint8Array.from([e+t]);const r=d(e),n=d(t+55+r.length/2);return Uint8Array.from(f(n+r))}function s(e,t=!1){if(null==e||0===e.length)return Uint8Array.from([]);const r=a(y(e));if(t)return r;if(0!==r.remainder.length)throw new Error("invalid RLP: remainder must be zero");return r.data}function a(e){let t,r,i,s,c;const u=[],l=e[0];if(l<=127)return{data:e.slice(0,1),remainder:e.slice(1)};if(l<=183){if(t=l-127,i=128===l?Uint8Array.from([]):n(e,1,t),2===t&&i[0]<128)throw new Error("invalid RLP encoding: invalid prefix, single byte < 0x80 are not prefixed");return{data:i,remainder:e.slice(t)}}if(l<=191){if(r=l-182,e.length-1e.length)throw new Error("invalid RLP: total length is larger than the data");for(s=n(e,r,i);s.length;)c=a(s),u.push(c.data),s=c.remainder;return{data:u,remainder:e.slice(i)}}}Object.defineProperty(t,"__esModule",{value:!0}),t.RLP=t.utils=t.decode=t.encode=void 0,t.encode=r,t.decode=s;const c=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));function u(e){let t="";for(let r=0;re+t.length),0),r=new Uint8Array(t);for(let t=0,n=0;t=2&&"0"===e[0]&&"x"===e[1]}function y(e){if(e instanceof Uint8Array)return e;if("string"==typeof e)return g(e)?f((t="string"!=typeof(r=e)?r:g(r)?r.slice(2):r).length%2?`0${t}`:t):p(e);var t,r;if("number"==typeof e||"bigint"==typeof e)return e?f(d(e)):Uint8Array.from([]);if(null==e)return Uint8Array.from([]);throw new Error("toBytes: received unsupported type "+typeof e)}t.utils={bytesToHex:u,concatBytes:h,hexToBytes:f,utf8ToBytes:p},t.RLP={encode:r,decode:s}},6284:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.accountBodyToRLP=t.accountBodyToSlim=t.accountBodyFromSlim=t.isZeroAddress=t.zeroAddress=t.importPublic=t.privateToAddress=t.privateToPublic=t.publicToAddress=t.pubToAddress=t.isValidPublic=t.isValidPrivate=t.generateAddress2=t.generateAddress=t.isValidChecksumAddress=t.toChecksumAddress=t.isValidAddress=t.Account=void 0;const n=r(6289),o=r(9956),i=r(3852),s=r(7513),a=r(7312),c=r(9838),u=r(5546),l=r(9498),f=BigInt(0);class h{constructor(e=f,t=f,r=c.KECCAK256_RLP,n=c.KECCAK256_NULL){this.nonce=e,this.balance=t,this.storageRoot=r,this.codeHash=n,this._validate()}static fromAccountData(e){const{nonce:t,balance:r,storageRoot:n,codeHash:o}=e;return new h(void 0!==t?(0,a.bufferToBigInt)((0,a.toBuffer)(t)):void 0,void 0!==r?(0,a.bufferToBigInt)((0,a.toBuffer)(r)):void 0,void 0!==n?(0,a.toBuffer)(n):void 0,void 0!==o?(0,a.toBuffer)(o):void 0)}static fromRlpSerializedAccount(e){const t=(0,a.arrToBufArr)(n.RLP.decode(Uint8Array.from(e)));if(!Array.isArray(t))throw new Error("Invalid serialized account input. Must be array");return this.fromValuesArray(t)}static fromValuesArray(e){const[t,r,n,o]=e;return new h((0,a.bufferToBigInt)(t),(0,a.bufferToBigInt)(r),n,o)}_validate(){if(this.nonce=8?f+=r[e].toUpperCase():f+=r[e];return f},t.isValidChecksumAddress=function(e,r){return(0,t.isValidAddress)(e)&&(0,t.toChecksumAddress)(e,r)===e},t.generateAddress=function(e,t){return(0,u.assertIsBuffer)(e),(0,u.assertIsBuffer)(t),(0,a.bufferToBigInt)(t)===BigInt(0)?Buffer.from((0,o.keccak256)(n.RLP.encode((0,a.bufArrToArr)([e,null])))).slice(-20):Buffer.from((0,o.keccak256)(n.RLP.encode((0,a.bufArrToArr)([e,t])))).slice(-20)},t.generateAddress2=function(e,t,r){if((0,u.assertIsBuffer)(e),(0,u.assertIsBuffer)(t),(0,u.assertIsBuffer)(r),20!==e.length)throw new Error("Expected from to be of length 20");if(32!==t.length)throw new Error("Expected salt to be of length 32");const n=(0,o.keccak256)(Buffer.concat([Buffer.from("ff","hex"),e,t,(0,o.keccak256)(r)]));return(0,a.toBuffer)(n).slice(-20)},t.isValidPrivate=function(e){return i.secp256k1.utils.isValidPrivateKey(e)},t.isValidPublic=function(e,t=!1){if((0,u.assertIsBuffer)(e),64===e.length)try{return i.secp256k1.ProjectivePoint.fromHex(Buffer.concat([Buffer.from([4]),e])),!0}catch(e){return!1}if(!t)return!1;try{return i.secp256k1.ProjectivePoint.fromHex(e),!0}catch(e){return!1}},t.pubToAddress=function(e,t=!1){if((0,u.assertIsBuffer)(e),t&&64!==e.length&&(e=Buffer.from(i.secp256k1.ProjectivePoint.fromHex(e).toRawBytes(!1).slice(1))),64!==e.length)throw new Error("Expected pubKey to be of length 64");return Buffer.from((0,o.keccak256)(e)).slice(-20)},t.publicToAddress=t.pubToAddress,t.privateToPublic=function(e){return(0,u.assertIsBuffer)(e),Buffer.from(i.secp256k1.ProjectivePoint.fromPrivateKey(e).toRawBytes(!1).slice(1))},t.privateToAddress=function(e){return(0,t.publicToAddress)((0,t.privateToPublic)(e))},t.importPublic=function(e){return(0,u.assertIsBuffer)(e),64!==e.length&&(e=Buffer.from(i.secp256k1.ProjectivePoint.fromHex(e).toRawBytes(!1).slice(1))),e},t.zeroAddress=function(){const e=(0,a.zeros)(20);return(0,a.bufferToHex)(e)},t.isZeroAddress=function(e){try{(0,u.assertIsString)(e)}catch(e){return!1}return(0,t.zeroAddress)()===e},t.accountBodyFromSlim=p;const d=new Uint8Array(0);t.accountBodyToSlim=function(e){const[t,r,n,o]=e;return[t,r,(0,a.arrToBufArr)(n).equals(c.KECCAK256_RLP)?d:n,(0,a.arrToBufArr)(o).equals(c.KECCAK256_NULL)?d:o]},t.accountBodyToRLP=function(e,t=!0){const r=t?p(e):e;return(0,a.arrToBufArr)(n.RLP.encode(r))}},6727:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Address=void 0;const n=r(6284),o=r(7312);class i{constructor(e){if(20!==e.length)throw new Error("Invalid address length");this.buf=e}static zero(){return new i((0,o.zeros)(20))}static fromString(e){if(!(0,n.isValidAddress)(e))throw new Error("Invalid address");return new i((0,o.toBuffer)(e))}static fromPublicKey(e){if(!Buffer.isBuffer(e))throw new Error("Public key should be Buffer");const t=(0,n.pubToAddress)(e);return new i(t)}static fromPrivateKey(e){if(!Buffer.isBuffer(e))throw new Error("Private key should be Buffer");const t=(0,n.privateToAddress)(e);return new i(t)}static generate(e,t){if("bigint"!=typeof t)throw new Error("Expected nonce to be a bigint");return new i((0,n.generateAddress)(e.buf,(0,o.bigIntToBuffer)(t)))}static generate2(e,t,r){if(!Buffer.isBuffer(t))throw new Error("Expected salt to be a Buffer");if(!Buffer.isBuffer(r))throw new Error("Expected initCode to be a Buffer");return new i((0,n.generateAddress2)(e.buf,t,r))}equals(e){return this.buf.equals(e.buf)}isZero(){return this.equals(i.zero())}isPrecompileOrSystemAddress(){const e=(0,o.bufferToBigInt)(this.buf),t=BigInt(0),r=BigInt("0xffff");return e>=t&&e<=r}toString(){return"0x"+this.buf.toString("hex")}toBuffer(){return Buffer.from(this.buf)}}t.Address=i},8421:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncEventEmitter=void 0;const n=r(7007);class o extends n.EventEmitter{emit(e,...t){let[r,n]=t;const o=this;let i=o._events[e]??[];return void 0===n&&"function"==typeof r&&(n=r,r=void 0),"newListener"!==e&&"removeListener"!==e||(r={event:r,fn:n},n=void 0),i=Array.isArray(i)?i:[i],async function(e,t,r){let n;for await(const o of t)try{o.length<2?o.call(e,r):await new Promise(((t,n)=>{o.call(e,r,(e=>{e?n(e):t()}))}))}catch(e){n=e}if(n)throw n}(o,i.slice(),r).then(n).catch(n),o.listenerCount(e)>0}once(e,t){const r=this;let n;if("function"!=typeof t)throw new TypeError("listener must be a function");return n=t.length>=2?function(o,i){r.removeListener(e,n),t(o,i)}:function(o){r.removeListener(e,n),t(o,n)},r.on(e,n),r}first(e,t){let r=this._events[e]??[];if("function"!=typeof t)throw new TypeError("listener must be a function");return Array.isArray(r)||(this._events[e]=r=[r]),r.unshift(t),this}before(e,t,r){return this.beforeOrAfter(e,t,r)}after(e,t,r){return this.beforeOrAfter(e,t,r,"after")}beforeOrAfter(e,t,r,n){let o,i,s=this._events[e]??[];const a="after"===n?1:0;if("function"!=typeof r)throw new TypeError("listener must be a function");if("function"!=typeof t)throw new TypeError("target must be a function");for(Array.isArray(s)||(this._events[e]=s=[s]),i=s.length,o=s.length;o--;)if(s[o]===t){i=o+a;break}return s.splice(i,0,r),this}on(e,t){return super.on(e,t)}addListener(e,t){return super.addListener(e,t)}prependListener(e,t){return super.prependListener(e,t)}prependOnceListener(e,t){return super.prependOnceListener(e,t)}removeAllListeners(e){return super.removeAllListeners(e)}removeListener(e,t){return super.removeListener(e,t)}eventNames(){return super.eventNames()}listeners(e){return super.listeners(e)}listenerCount(e){return super.listenerCount(e)}getMaxListeners(){return super.getMaxListeners()}setMaxListeners(e){return super.setMaxListeners(e)}}t.AsyncEventEmitter=o},7312:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.intToUnpaddedBuffer=t.bigIntToUnpaddedBuffer=t.bigIntToHex=t.bufArrToArr=t.arrToBufArr=t.validateNoLeadingZeroes=t.baToJSON=t.toUtf8=t.short=t.addHexPrefix=t.toUnsigned=t.fromSigned=t.bufferToInt=t.bigIntToBuffer=t.bufferToBigInt=t.bufferToHex=t.toBuffer=t.unpadHexString=t.unpadArray=t.unpadBuffer=t.setLengthRight=t.setLengthLeft=t.zeros=t.intToBuffer=t.intToHex=void 0;const n=r(5546),o=r(9498);t.intToHex=function(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Received an invalid integer type: ${e}`);return`0x${e.toString(16)}`},t.intToBuffer=function(e){const r=(0,t.intToHex)(e);return Buffer.from((0,o.padToEven)(r.slice(2)),"hex")},t.zeros=function(e){return Buffer.allocUnsafe(e).fill(0)};const i=function(e,r,n){const o=(0,t.zeros)(r);return n?e.length0&&"0"===t.toString();)t=(e=e.slice(1))[0];return e};function a(e){const r=(0,t.bufferToHex)(e);return"0x"===r?BigInt(0):BigInt(r)}function c(e){return(0,t.toBuffer)("0x"+e.toString(16))}t.unpadBuffer=function(e){return(0,n.assertIsBuffer)(e),s(e)},t.unpadArray=function(e){return(0,n.assertIsArray)(e),s(e)},t.unpadHexString=function(e){return(0,n.assertIsHexString)(e),e=(0,o.stripHexPrefix)(e),"0x"+s(e)},t.toBuffer=function(e){if(null==e)return Buffer.allocUnsafe(0);if(Buffer.isBuffer(e))return Buffer.from(e);if(Array.isArray(e)||e instanceof Uint8Array)return Buffer.from(e);if("string"==typeof e){if(!(0,o.isHexString)(e))throw new Error(`Cannot convert string to buffer. toBuffer only supports 0x-prefixed hex strings and this string was given: ${e}`);return Buffer.from((0,o.padToEven)((0,o.stripHexPrefix)(e)),"hex")}if("number"==typeof e)return(0,t.intToBuffer)(e);if("bigint"==typeof e){if(e0&&0===r[0])throw new Error(`${t} cannot have leading zeroes, received: ${r.toString("hex")}`)},t.arrToBufArr=function e(t){return Array.isArray(t)?t.map((t=>e(t))):Buffer.from(t)},t.bufArrToArr=function e(t){return Array.isArray(t)?t.map((t=>e(t))):Uint8Array.from(t??[])},t.bigIntToHex=e=>"0x"+e.toString(16),t.bigIntToUnpaddedBuffer=function(e){return(0,t.unpadBuffer)(c(e))},t.intToUnpaddedBuffer=function(e){return(0,t.unpadBuffer)((0,t.intToBuffer)(e))}},9838:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MAX_WITHDRAWALS_PER_PAYLOAD=t.RLP_EMPTY_STRING=t.KECCAK256_RLP=t.KECCAK256_RLP_S=t.KECCAK256_RLP_ARRAY=t.KECCAK256_RLP_ARRAY_S=t.KECCAK256_NULL=t.KECCAK256_NULL_S=t.TWO_POW256=t.SECP256K1_ORDER_DIV_2=t.SECP256K1_ORDER=t.MAX_INTEGER_BIGINT=t.MAX_INTEGER=t.MAX_UINT64=void 0;const n=r(8287),o=r(3852);t.MAX_UINT64=BigInt("0xffffffffffffffff"),t.MAX_INTEGER=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),t.MAX_INTEGER_BIGINT=BigInt("115792089237316195423570985008687907853269984665640564039457584007913129639935"),t.SECP256K1_ORDER=o.secp256k1.CURVE.n,t.SECP256K1_ORDER_DIV_2=o.secp256k1.CURVE.n/BigInt(2),t.TWO_POW256=BigInt("0x10000000000000000000000000000000000000000000000000000000000000000"),t.KECCAK256_NULL_S="c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",t.KECCAK256_NULL=n.Buffer.from(t.KECCAK256_NULL_S,"hex"),t.KECCAK256_RLP_ARRAY_S="1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",t.KECCAK256_RLP_ARRAY=n.Buffer.from(t.KECCAK256_RLP_ARRAY_S,"hex"),t.KECCAK256_RLP_S="56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",t.KECCAK256_RLP=n.Buffer.from(t.KECCAK256_RLP_S,"hex"),t.RLP_EMPTY_STRING=n.Buffer.from([128]),t.MAX_WITHDRAWALS_PER_PAYLOAD=16},5062:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.compactBytesToNibbles=t.bytesToNibbles=t.nibblesToCompactBytes=t.nibblesToBytes=t.hasTerminator=void 0,t.hasTerminator=e=>e.length>0&&16===e[e.length-1],t.nibblesToBytes=(e,t)=>{for(let r=0,n=0;n{let r=0;(0,t.hasTerminator)(e)&&(r=1,e=e.subarray(0,e.length-1));const n=new Uint8Array(e.length/2+1);return n[0]=r<<5,1==(1&e.length)&&(n[0]|=16,n[0]|=e[0],e=e.subarray(1)),(0,t.nibblesToBytes)(e,n.subarray(1)),n},t.bytesToNibbles=e=>{const t=2*e.length+1,r=new Uint8Array(t);for(let t=0;t{if(0===e.length)return e;let r=(0,t.bytesToNibbles)(e);r[0]<2&&(r=r.subarray(0,r.length-1));const n=2-(1&r[0]);return r.subarray(n)}},5546:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assertIsString=t.assertIsArray=t.assertIsBuffer=t.assertIsHexString=void 0;const n=r(9498);t.assertIsHexString=function(e){if(!(0,n.isHexString)(e))throw new Error(`This method only supports 0x-prefixed hex strings but input was: ${e}`)},t.assertIsBuffer=function(e){if(!Buffer.isBuffer(e))throw new Error(`This method only supports Buffer but input was: ${e}`)},t.assertIsArray=function(e){if(!Array.isArray(e))throw new Error(`This method only supports number arrays but input was: ${e}`)},t.assertIsString=function(e){if("string"!=typeof e)throw new Error(`This method only supports strings but input was: ${e}`)}},8683:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.toAscii=t.stripHexPrefix=t.padToEven=t.isHexString=t.isHexPrefixed=t.getKeys=t.getBinarySize=t.fromUtf8=t.fromAscii=t.arrayContainsArray=void 0,o(r(9838),t),o(r(2652),t),o(r(6284),t),o(r(6727),t),o(r(7380),t),o(r(2133),t),o(r(7312),t),o(r(2666),t),o(r(5062),t),o(r(8421),t);var i=r(9498);Object.defineProperty(t,"arrayContainsArray",{enumerable:!0,get:function(){return i.arrayContainsArray}}),Object.defineProperty(t,"fromAscii",{enumerable:!0,get:function(){return i.fromAscii}}),Object.defineProperty(t,"fromUtf8",{enumerable:!0,get:function(){return i.fromUtf8}}),Object.defineProperty(t,"getBinarySize",{enumerable:!0,get:function(){return i.getBinarySize}}),Object.defineProperty(t,"getKeys",{enumerable:!0,get:function(){return i.getKeys}}),Object.defineProperty(t,"isHexPrefixed",{enumerable:!0,get:function(){return i.isHexPrefixed}}),Object.defineProperty(t,"isHexString",{enumerable:!0,get:function(){return i.isHexString}}),Object.defineProperty(t,"padToEven",{enumerable:!0,get:function(){return i.padToEven}}),Object.defineProperty(t,"stripHexPrefix",{enumerable:!0,get:function(){return i.stripHexPrefix}}),Object.defineProperty(t,"toAscii",{enumerable:!0,get:function(){return i.toAscii}}),o(r(1708),t),o(r(1862),t)},9498:(e,t)=>{"use strict";function r(e){if("string"!=typeof e)throw new Error("[isHexPrefixed] input must be type 'string', received type "+typeof e);return"0"===e[0]&&"x"===e[1]}function n(e){let t=e;if("string"!=typeof t)throw new Error("[padToEven] value must be type 'string', received "+typeof t);return t.length%2&&(t=`0${t}`),t}Object.defineProperty(t,"__esModule",{value:!0}),t.isHexString=t.getKeys=t.fromAscii=t.fromUtf8=t.toAscii=t.arrayContainsArray=t.getBinarySize=t.padToEven=t.stripHexPrefix=t.isHexPrefixed=void 0,t.isHexPrefixed=r,t.stripHexPrefix=e=>{if("string"!=typeof e)throw new Error("[stripHexPrefix] input must be type 'string', received "+typeof e);return r(e)?e.slice(2):e},t.padToEven=n,t.getBinarySize=function(e){if("string"!=typeof e)throw new Error("[getBinarySize] method requires input type 'string', received "+typeof e);return Buffer.byteLength(e,"utf8")},t.arrayContainsArray=function(e,t,r){if(!0!==Array.isArray(e))throw new Error(`[arrayContainsArray] method requires input 'superset' to be an array, got type '${typeof e}'`);if(!0!==Array.isArray(t))throw new Error(`[arrayContainsArray] method requires input 'subset' to be an array, got type '${typeof t}'`);return t[!0===r?"some":"every"]((t=>e.indexOf(t)>=0))},t.toAscii=function(e){let t="",r=0;const n=e.length;for("0x"===e.substring(0,2)&&(r=2);r0&&e.length!==2+2*t)}},1708:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Lock=void 0,t.Lock=class{constructor(){this.permits=1,this.promiseResolverQueue=[]}async acquire(){return this.permits>0?(this.permits-=1,Promise.resolve(!0)):new Promise((e=>this.promiseResolverQueue.push(e)))}release(){if(this.permits+=1,this.permits>1&&this.promiseResolverQueue.length>0)console.warn("Lock.permits should never be > 0 when there is someone waiting.");else if(1===this.permits&&this.promiseResolverQueue.length>0){this.permits-=1;const e=this.promiseResolverQueue.shift();e&&e(!0)}}}},1862:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getProvider=t.fetchFromProvider=void 0;const n=r(6215);t.fetchFromProvider=async(e,t)=>(await(0,n.default)(e,{headers:{"content-type":"application/json"},type:"json",data:{method:t.method,params:t.params,jsonrpc:"2.0",id:1}})).result,t.getProvider=e=>{if("string"==typeof e)return e;if(void 0!==e?.connection?.url)return e.connection.url;throw new Error("Must provide valid provider URL or Web3Provider")}},2133:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hashPersonalMessage=t.isValidSignature=t.fromRpcSig=t.toCompactSig=t.toRpcSig=t.ecrecover=t.ecsign=void 0;const n=r(9956),o=r(3852),i=r(7312),s=r(9838),a=r(5546);function c(e,t){return e===BigInt(0)||e===BigInt(1)?e:void 0===t?e-BigInt(27):e-(t*BigInt(2)+BigInt(35))}function u(e){return e===BigInt(0)||e===BigInt(1)}t.ecsign=function(e,t,r){const n=o.secp256k1.sign(e,t),i=n.toCompactRawBytes();return{r:Buffer.from(i.slice(0,32)),s:Buffer.from(i.slice(32,64)),v:void 0===r?BigInt(n.recovery+27):BigInt(n.recovery+35)+BigInt(r)*BigInt(2)}},t.ecrecover=function(e,t,r,n,s){const a=Buffer.concat([(0,i.setLengthLeft)(r,32),(0,i.setLengthLeft)(n,32)],64),l=c(t,s);if(!u(l))throw new Error("Invalid signature v value");const f=o.secp256k1.Signature.fromCompact(a).addRecoveryBit(Number(l)).recoverPublicKey(e);return Buffer.from(f.toRawBytes(!1).slice(1))},t.toRpcSig=function(e,t,r,n){if(!u(c(e,n)))throw new Error("Invalid signature v value");return(0,i.bufferToHex)(Buffer.concat([(0,i.setLengthLeft)(t,32),(0,i.setLengthLeft)(r,32),(0,i.toBuffer)(e)]))},t.toCompactSig=function(e,t,r,n){if(!u(c(e,n)))throw new Error("Invalid signature v value");let o=r;return(e>BigInt(28)&&e%BigInt(2)===BigInt(1)||e===BigInt(1)||e===BigInt(28))&&(o=Buffer.from(r),o[0]|=128),(0,i.bufferToHex)(Buffer.concat([(0,i.setLengthLeft)(t,32),(0,i.setLengthLeft)(o,32)]))},t.fromRpcSig=function(e){const t=(0,i.toBuffer)(e);let r,n,o;if(t.length>=65)r=t.slice(0,32),n=t.slice(32,64),o=(0,i.bufferToBigInt)(t.slice(64));else{if(64!==t.length)throw new Error("Invalid signature length");r=t.slice(0,32),n=t.slice(32,64),o=BigInt((0,i.bufferToInt)(t.slice(32,33))>>7),n[0]&=127}return o<27&&(o+=BigInt(27)),{v:o,r,s:n}},t.isValidSignature=function(e,t,r,n=!0,o){if(32!==t.length||32!==r.length)return!1;if(!u(c(e,o)))return!1;const a=(0,i.bufferToBigInt)(t),l=(0,i.bufferToBigInt)(r);return!(a===BigInt(0)||a>=s.SECP256K1_ORDER||l===BigInt(0)||l>=s.SECP256K1_ORDER||n&&l>=s.SECP256K1_ORDER_DIV_2)},t.hashPersonalMessage=function(e){(0,a.assertIsBuffer)(e);const t=Buffer.from(`Ethereum Signed Message:\n${e.length}`,"utf-8");return Buffer.from((0,n.keccak256)(Buffer.concat([t,e])))}},2666:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toType=t.TypeOutput=void 0;const n=r(7312),o=r(9498);var i;!function(e){e[e.Number=0]="Number",e[e.BigInt=1]="BigInt",e[e.Buffer=2]="Buffer",e[e.PrefixedHexString=3]="PrefixedHexString"}(i=t.TypeOutput||(t.TypeOutput={})),t.toType=function(e,t){if(null===e)return null;if(void 0===e)return;if("string"==typeof e&&!(0,o.isHexString)(e))throw new Error(`A string must be provided with a 0x-prefix, given: ${e}`);if("number"==typeof e&&!Number.isSafeInteger(e))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative input type)");const r=(0,n.toBuffer)(e);switch(t){case i.Buffer:return r;case i.BigInt:return(0,n.bufferToBigInt)(r);case i.Number:{const e=(0,n.bufferToBigInt)(r);if(e>BigInt(Number.MAX_SAFE_INTEGER))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative output type)");return Number(e)}case i.PrefixedHexString:return(0,n.bufferToHex)(r);default:throw new Error("unknown outputType")}}},2652:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GWEI_TO_WEI=void 0,t.GWEI_TO_WEI=BigInt(1e9)},7380:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Withdrawal=void 0;const n=r(6727),o=r(7312),i=r(2666);class s{constructor(e,t,r,n){this.index=e,this.validatorIndex=t,this.address=r,this.amount=n}static fromWithdrawalData(e){const{index:t,validatorIndex:r,address:o,amount:a}=e,c=(0,i.toType)(t,i.TypeOutput.BigInt),u=(0,i.toType)(r,i.TypeOutput.BigInt),l=new n.Address((0,i.toType)(o,i.TypeOutput.Buffer)),f=(0,i.toType)(a,i.TypeOutput.BigInt);return new s(c,u,l,f)}static fromValuesArray(e){if(4!==e.length)throw Error(`Invalid withdrawalArray length expected=4 actual=${e.length}`);const[t,r,n,o]=e;return s.fromWithdrawalData({index:t,validatorIndex:r,address:n,amount:o})}static toBufferArray(e){const{index:t,validatorIndex:r,address:o,amount:s}=e,a=(0,i.toType)(t,i.TypeOutput.BigInt)===BigInt(0)?Buffer.alloc(0):(0,i.toType)(t,i.TypeOutput.Buffer),c=(0,i.toType)(r,i.TypeOutput.BigInt)===BigInt(0)?Buffer.alloc(0):(0,i.toType)(r,i.TypeOutput.Buffer);let u;return u=o instanceof n.Address?o.buf:(0,i.toType)(o,i.TypeOutput.Buffer),[a,c,u,(0,i.toType)(s,i.TypeOutput.BigInt)===BigInt(0)?Buffer.alloc(0):(0,i.toType)(s,i.TypeOutput.Buffer)]}raw(){return s.toBufferArray(this)}toValue(){return{index:this.index,validatorIndex:this.validatorIndex,address:this.address.buf,amount:this.amount}}toJSON(){return{index:(0,o.bigIntToHex)(this.index),validatorIndex:(0,o.bigIntToHex)(this.validatorIndex),address:"0x"+this.address.buf.toString("hex"),amount:(0,o.bigIntToHex)(this.amount)}}}t.Withdrawal=s},723:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createCurve=t.getHash=void 0;const n=r(9615),o=r(9175),i=r(4678);function s(e){return{hash:e,hmac:(t,...r)=>(0,n.hmac)(e,t,(0,o.concatBytes)(...r)),randomBytes:o.randomBytes}}t.getHash=s,t.createCurve=function(e,t){const r=t=>(0,i.weierstrass)({...e,...s(t)});return Object.freeze({...r(t),create:r})}},9141:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateBasic=t.wNAF=void 0;const n=r(5304),o=r(7939),i=BigInt(0),s=BigInt(1);t.wNAF=function(e,t){const r=(e,t)=>{const r=t.negate();return e?r:t},n=e=>({windows:Math.ceil(t/e)+1,windowSize:2**(e-1)});return{constTimeNegate:r,unsafeLadder(t,r){let n=e.ZERO,o=t;for(;r>i;)r&s&&(n=n.add(o)),o=o.double(),r>>=s;return n},precomputeWindow(e,t){const{windows:r,windowSize:o}=n(t),i=[];let s=e,a=s;for(let e=0;e>=p,n>c&&(n-=h,i+=s);const a=t,d=t+Math.abs(n)-1,g=e%2!=0,y=n<0;0===n?l=l.add(r(g,o[a])):u=u.add(r(y,o[d]))}return{p:u,f:l}},wNAFCached(e,t,r,n){const o=e._WINDOW_SIZE||1;let i=t.get(e);return i||(i=this.precomputeWindow(e,o),1!==o&&t.set(e,n(i))),this.wNAF(o,i,r)}}},t.validateBasic=function(e){return(0,n.validateField)(e.Fp),(0,o.validateObject)(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...(0,n.nLength)(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}},1298:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createHasher=t.isogenyMap=t.hash_to_field=t.expand_message_xof=t.expand_message_xmd=void 0;const n=r(5304),o=r(7939),i=o.bytesToNumberBE;function s(e,t){if(e<0||e>=1<<8*t)throw new Error(`bad I2OSP call: value=${e} length=${t}`);const r=Array.from({length:t}).fill(0);for(let n=t-1;n>=0;n--)r[n]=255&e,e>>>=8;return new Uint8Array(r)}function a(e,t){const r=new Uint8Array(e.length);for(let n=0;n255&&(t=n((0,o.concatBytes)((0,o.utf8ToBytes)("H2C-OVERSIZE-DST-"),t)));const{outputLen:i,blockLen:l}=n,f=Math.ceil(r/i);if(f>255)throw new Error("Invalid xmd length");const h=(0,o.concatBytes)(t,s(t.length,1)),p=s(0,l),d=s(r,2),g=new Array(f),y=n((0,o.concatBytes)(p,e,d,s(0,1),h));g[0]=n((0,o.concatBytes)(y,s(1,1),h));for(let e=1;e<=f;e++){const t=[a(y,g[e-1]),s(e+1,1),h];g[e]=n((0,o.concatBytes)(...t))}return(0,o.concatBytes)(...g).slice(0,r)}function f(e,t,r,n,i){if(c(e),c(t),u(r),t.length>255){const e=Math.ceil(2*n/8);t=i.create({dkLen:e}).update((0,o.utf8ToBytes)("H2C-OVERSIZE-DST-")).update(t).digest()}if(r>65535||t.length>255)throw new Error("expand_message_xof: invalid lenInBytes");return i.create({dkLen:r}).update(e).update(s(r,2)).update(t).update(s(t.length,1)).digest()}function h(e,t,r){(0,o.validateObject)(r,{DST:"stringOrUint8Array",p:"bigint",m:"isSafeInteger",k:"isSafeInteger",hash:"hash"});const{p:s,k:a,m:h,hash:p,expand:d,DST:g}=r;c(e),u(t);const y=function(e){if((0,o.isBytes)(e))return e;if("string"==typeof e)return(0,o.utf8ToBytes)(e);throw new Error("DST must be Uint8Array or string")}(g),m=s.toString(2).length,b=Math.ceil((m+a)/8),v=t*h*b;let w;if("xmd"===d)w=l(e,y,v,p);else if("xof"===d)w=f(e,y,v,a,p);else{if("_internal_pass"!==d)throw new Error('expand must be "xmd" or "xof"');w=e}const E=new Array(t);for(let e=0;eArray.from(e).reverse()));return(t,n)=>{const[o,i,s,a]=r.map((r=>r.reduce(((r,n)=>e.add(e.mul(r,t),n)))));return t=e.div(o,i),n=e.mul(n,e.div(s,a)),{x:t,y:n}}},t.createHasher=function(e,t,r){if("function"!=typeof t)throw new Error("mapToCurve() must be defined");return{hashToCurve(n,o){const i=h(n,2,{...r,DST:r.DST,...o}),s=e.fromAffine(t(i[0])),a=e.fromAffine(t(i[1])),c=s.add(a).clearCofactor();return c.assertValidity(),c},encodeToCurve(n,o){const i=h(n,1,{...r,DST:r.encodeDST,...o}),s=e.fromAffine(t(i[0])).clearCofactor();return s.assertValidity(),s}}}},5304:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mapHashToField=t.getMinHashLength=t.getFieldBytesLength=t.hashToPrivateScalar=t.FpSqrtEven=t.FpSqrtOdd=t.Field=t.nLength=t.FpIsSquare=t.FpDiv=t.FpInvertBatch=t.FpPow=t.validateField=t.isNegativeLE=t.FpSqrt=t.tonelliShanks=t.invert=t.pow2=t.pow=t.mod=void 0;const n=r(7939),o=BigInt(0),i=BigInt(1),s=BigInt(2),a=BigInt(3),c=BigInt(4),u=BigInt(5),l=BigInt(8);function f(e,t){const r=e%t;return r>=o?r:t+r}function h(e,t,r){if(r<=o||t 0");if(r===i)return o;let n=i;for(;t>o;)t&i&&(n=n*e%r),e=e*e%r,t>>=i;return n}function p(e,t){if(e===o||t<=o)throw new Error(`invert: expected positive integers, got n=${e} mod=${t}`);let r=f(e,t),n=t,s=o,a=i,c=i,u=o;for(;r!==o;){const e=n/r,t=n%r,o=s-c*e,i=a-u*e;n=r,r=t,s=c,a=u,c=o,u=i}if(n!==i)throw new Error("invert: does not exist");return f(s,t)}function d(e){const t=(e-i)/s;let r,n,a;for(r=e-i,n=0;r%s===o;r/=s,n++);for(a=s;ao;)n*=n,n%=r;return n},t.invert=p,t.tonelliShanks=d,t.FpSqrt=g,t.isNegativeLE=(e,t)=>(f(e,t)&i)===i;const y=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function m(e,t,r){if(r 0");if(r===o)return e.ONE;if(r===i)return t;let n=e.ONE,s=t;for(;r>o;)r&i&&(n=e.mul(n,s)),s=e.sqr(s),r>>=i;return n}function b(e,t){const r=new Array(t.length),n=t.reduce(((t,n,o)=>e.is0(n)?t:(r[o]=t,e.mul(t,n))),e.ONE),o=e.inv(n);return t.reduceRight(((t,n,o)=>e.is0(n)?t:(r[o]=e.mul(t,r[o]),e.mul(t,n))),o),r}function v(e,t){const r=void 0!==t?t:e.toString(2).length;return{nBitLength:r,nByteLength:Math.ceil(r/8)}}function w(e){if("bigint"!=typeof e)throw new Error("field order must be bigint");const t=e.toString(2).length;return Math.ceil(t/8)}function E(e){const t=w(e);return t+Math.ceil(t/2)}t.validateField=function(e){const t=y.reduce(((e,t)=>(e[t]="function",e)),{ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"});return(0,n.validateObject)(e,t)},t.FpPow=m,t.FpInvertBatch=b,t.FpDiv=function(e,t,r){return e.mul(t,"bigint"==typeof r?p(r,e.ORDER):e.inv(r))},t.FpIsSquare=function(e){const t=(e.ORDER-i)/s;return r=>{const n=e.pow(r,t);return e.eql(n,e.ZERO)||e.eql(n,e.ONE)}},t.nLength=v,t.Field=function(e,t,r=!1,s={}){if(e<=o)throw new Error(`Expected Field ORDER > 0, got ${e}`);const{nBitLength:a,nByteLength:c}=v(e,t);if(c>2048)throw new Error("Field lengths over 2048 bytes are not supported");const u=g(e),l=Object.freeze({ORDER:e,BITS:a,BYTES:c,MASK:(0,n.bitMask)(a),ZERO:o,ONE:i,create:t=>f(t,e),isValid:t=>{if("bigint"!=typeof t)throw new Error("Invalid field element: expected bigint, got "+typeof t);return o<=t&&te===o,isOdd:e=>(e&i)===i,neg:t=>f(-t,e),eql:(e,t)=>e===t,sqr:t=>f(t*t,e),add:(t,r)=>f(t+r,e),sub:(t,r)=>f(t-r,e),mul:(t,r)=>f(t*r,e),pow:(e,t)=>m(l,e,t),div:(t,r)=>f(t*p(r,e),e),sqrN:e=>e*e,addN:(e,t)=>e+t,subN:(e,t)=>e-t,mulN:(e,t)=>e*t,inv:t=>p(t,e),sqrt:s.sqrt||(e=>u(l,e)),invertBatch:e=>b(l,e),cmov:(e,t,r)=>r?t:e,toBytes:e=>r?(0,n.numberToBytesLE)(e,c):(0,n.numberToBytesBE)(e,c),fromBytes:e=>{if(e.length!==c)throw new Error(`Fp.fromBytes: expected ${c}, got ${e.length}`);return r?(0,n.bytesToNumberLE)(e):(0,n.bytesToNumberBE)(e)}});return Object.freeze(l)},t.FpSqrtOdd=function(e,t){if(!e.isOdd)throw new Error("Field doesn't have isOdd");const r=e.sqrt(t);return e.isOdd(r)?r:e.neg(r)},t.FpSqrtEven=function(e,t){if(!e.isOdd)throw new Error("Field doesn't have isOdd");const r=e.sqrt(t);return e.isOdd(r)?e.neg(r):r},t.hashToPrivateScalar=function(e,t,r=!1){const o=(e=(0,n.ensureBytes)("privateHash",e)).length,s=v(t).nByteLength+8;if(s<24||o1024)throw new Error(`hashToPrivateScalar: expected ${s}-1024 bytes of input, got ${o}`);return f(r?(0,n.bytesToNumberLE)(e):(0,n.bytesToNumberBE)(e),t-i)+i},t.getFieldBytesLength=w,t.getMinHashLength=E,t.mapHashToField=function(e,t,r=!1){const o=e.length,s=w(t),a=E(t);if(o<16||o1024)throw new Error(`expected ${a}-1024 bytes of input, got ${o}`);const c=f(r?(0,n.bytesToNumberBE)(e):(0,n.bytesToNumberLE)(e),t-i)+i;return r?(0,n.numberToBytesLE)(c,s):(0,n.numberToBytesBE)(c,s)}},7939:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateObject=t.createHmacDrbg=t.bitMask=t.bitSet=t.bitGet=t.bitLen=t.utf8ToBytes=t.equalBytes=t.concatBytes=t.ensureBytes=t.numberToVarBytesBE=t.numberToBytesLE=t.numberToBytesBE=t.bytesToNumberLE=t.bytesToNumberBE=t.hexToBytes=t.hexToNumber=t.numberToHexUnpadded=t.bytesToHex=t.isBytes=void 0;const r=BigInt(0),n=BigInt(1),o=BigInt(2);function i(e){return e instanceof Uint8Array||null!=e&&"object"==typeof e&&"Uint8Array"===e.constructor.name}t.isBytes=i;const s=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));function a(e){if(!i(e))throw new Error("Uint8Array expected");let t="";for(let r=0;r=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:void 0}function f(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);const t=e.length,r=t/2;if(t%2)throw new Error("padded hex string expected, got unpadded hex of length "+t);const n=new Uint8Array(r);for(let t=0,o=0;tr;e>>=n,t+=1);return t},t.bitGet=function(e,t){return e>>BigInt(t)&n},t.bitSet=(e,t,o)=>e|(o?n:r)<(o<new Uint8Array(e),g=e=>Uint8Array.from(e);t.createHmacDrbg=function(e,t,r){if("number"!=typeof e||e<2)throw new Error("hashLen must be a number");if("number"!=typeof t||t<2)throw new Error("qByteLen must be a number");if("function"!=typeof r)throw new Error("hmacFn must be a function");let n=d(e),o=d(e),i=0;const s=()=>{n.fill(1),o.fill(0),i=0},a=(...e)=>r(o,n,...e),c=(e=d())=>{o=a(g([0]),e),n=a(),0!==e.length&&(o=a(g([1]),e),n=a())},u=()=>{if(i++>=1e3)throw new Error("drbg: tried 1000 values");let e=0;const r=[];for(;e{let r;for(s(),c(e);!(r=t(u()));)c();return s(),r}};const y={bigint:e=>"bigint"==typeof e,function:e=>"function"==typeof e,boolean:e=>"boolean"==typeof e,string:e=>"string"==typeof e,stringOrUint8Array:e=>"string"==typeof e||i(e),isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>"function"==typeof e&&Number.isSafeInteger(e.outputLen)};t.validateObject=function(e,t,r={}){const n=(t,r,n)=>{const o=y[r];if("function"!=typeof o)throw new Error(`Invalid validator "${r}", expected function`);const i=e[t];if(!(n&&void 0===i||o(i,e)))throw new Error(`Invalid param ${String(t)}=${i} (${typeof i}), expected ${r}`)};for(const[e,r]of Object.entries(t))n(e,r,!1);for(const[e,t]of Object.entries(r))n(e,t,!0);return e}},4678:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mapToCurveSimpleSWU=t.SWUFpSqrtRatio=t.weierstrass=t.weierstrassPoints=t.DER=void 0;const n=r(5304),o=r(7939),i=r(7939),s=r(9141),{bytesToNumberBE:a,hexToBytes:c}=o;t.DER={Err:class extends Error{constructor(e=""){super(e)}},_parseInt(e){const{Err:r}=t.DER;if(e.length<2||2!==e[0])throw new r("Invalid signature integer tag");const n=e[1],o=e.subarray(2,n+2);if(!n||o.length!==n)throw new r("Invalid signature integer: wrong length");if(128&o[0])throw new r("Invalid signature integer: negative");if(0===o[0]&&!(128&o[1]))throw new r("Invalid signature integer: unnecessary leading zero");return{d:a(o),l:e.subarray(n+2)}},toSig(e){const{Err:r}=t.DER,n="string"==typeof e?c(e):e;if(!o.isBytes(n))throw new Error("ui8a expected");let i=n.length;if(i<2||48!=n[0])throw new r("Invalid signature tag");if(n[1]!==i-2)throw new r("Invalid signature: incorrect length");const{d:s,l:a}=t.DER._parseInt(n.subarray(2)),{d:u,l}=t.DER._parseInt(a);if(l.length)throw new r("Invalid signature: left bytes after parsing");return{r:s,s:u}},hexFromSig(e){const t=e=>8&Number.parseInt(e[0],16)?"00"+e:e,r=e=>{const t=e.toString(16);return 1&t.length?`0${t}`:t},n=t(r(e.s)),o=t(r(e.r)),i=n.length/2,s=o.length/2,a=r(i),c=r(s);return`30${r(s+i+4)}02${c}${o}02${a}${n}`}};const u=BigInt(0),l=BigInt(1),f=BigInt(2),h=BigInt(3),p=BigInt(4);function d(e){const t=function(e){const t=(0,s.validateBasic)(e);o.validateObject(t,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:r,Fp:n,a:i}=t;if(r){if(!n.eql(i,n.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if("object"!=typeof r||"bigint"!=typeof r.beta||"function"!=typeof r.splitScalar)throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...t})}(e),{Fp:r}=t,a=t.toBytes||((e,t,n)=>{const i=t.toAffine();return o.concatBytes(Uint8Array.from([4]),r.toBytes(i.x),r.toBytes(i.y))}),c=t.fromBytes||(e=>{const t=e.subarray(1);return{x:r.fromBytes(t.subarray(0,r.BYTES)),y:r.fromBytes(t.subarray(r.BYTES,2*r.BYTES))}});function f(e){const{a:n,b:o}=t,i=r.sqr(e),s=r.mul(i,e);return r.add(r.add(s,r.mul(e,n)),o)}if(!r.eql(r.sqr(t.Gy),f(t.Gx)))throw new Error("bad generator point: equation left != right");function p(e){return"bigint"==typeof e&&ur.eql(e,r.ZERO);return o(t)&&o(n)?b.ZERO:new b(t,n,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(e){const t=r.invertBatch(e.map((e=>e.pz)));return e.map(((e,r)=>e.toAffine(t[r]))).map(b.fromAffine)}static fromHex(e){const t=b.fromAffine(c((0,i.ensureBytes)("pointHex",e)));return t.assertValidity(),t}static fromPrivateKey(e){return b.BASE.multiply(g(e))}_setWindowSize(e){this._WINDOW_SIZE=e,y.delete(this)}assertValidity(){if(this.is0()){if(t.allowInfinityPoint&&!r.is0(this.py))return;throw new Error("bad point: ZERO")}const{x:e,y:n}=this.toAffine();if(!r.isValid(e)||!r.isValid(n))throw new Error("bad point: x or y not FE");const o=r.sqr(n),i=f(e);if(!r.eql(o,i))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y:e}=this.toAffine();if(r.isOdd)return!r.isOdd(e);throw new Error("Field doesn't support isOdd")}equals(e){m(e);const{px:t,py:n,pz:o}=this,{px:i,py:s,pz:a}=e,c=r.eql(r.mul(t,a),r.mul(i,o)),u=r.eql(r.mul(n,a),r.mul(s,o));return c&&u}negate(){return new b(this.px,r.neg(this.py),this.pz)}double(){const{a:e,b:n}=t,o=r.mul(n,h),{px:i,py:s,pz:a}=this;let c=r.ZERO,u=r.ZERO,l=r.ZERO,f=r.mul(i,i),p=r.mul(s,s),d=r.mul(a,a),g=r.mul(i,s);return g=r.add(g,g),l=r.mul(i,a),l=r.add(l,l),c=r.mul(e,l),u=r.mul(o,d),u=r.add(c,u),c=r.sub(p,u),u=r.add(p,u),u=r.mul(c,u),c=r.mul(g,c),l=r.mul(o,l),d=r.mul(e,d),g=r.sub(f,d),g=r.mul(e,g),g=r.add(g,l),l=r.add(f,f),f=r.add(l,f),f=r.add(f,d),f=r.mul(f,g),u=r.add(u,f),d=r.mul(s,a),d=r.add(d,d),f=r.mul(d,g),c=r.sub(c,f),l=r.mul(d,p),l=r.add(l,l),l=r.add(l,l),new b(c,u,l)}add(e){m(e);const{px:n,py:o,pz:i}=this,{px:s,py:a,pz:c}=e;let u=r.ZERO,l=r.ZERO,f=r.ZERO;const p=t.a,d=r.mul(t.b,h);let g=r.mul(n,s),y=r.mul(o,a),v=r.mul(i,c),w=r.add(n,o),E=r.add(s,a);w=r.mul(w,E),E=r.add(g,y),w=r.sub(w,E),E=r.add(n,i);let x=r.add(s,c);return E=r.mul(E,x),x=r.add(g,v),E=r.sub(E,x),x=r.add(o,i),u=r.add(a,c),x=r.mul(x,u),u=r.add(y,v),x=r.sub(x,u),f=r.mul(p,E),u=r.mul(d,v),f=r.add(u,f),u=r.sub(y,f),f=r.add(y,f),l=r.mul(u,f),y=r.add(g,g),y=r.add(y,g),v=r.mul(p,v),E=r.mul(d,E),y=r.add(y,v),v=r.sub(g,v),v=r.mul(p,v),E=r.add(E,v),g=r.mul(y,E),l=r.add(l,g),g=r.mul(x,E),u=r.mul(w,u),u=r.sub(u,g),g=r.mul(w,y),f=r.mul(x,f),f=r.add(f,g),new b(u,l,f)}subtract(e){return this.add(e.negate())}is0(){return this.equals(b.ZERO)}wNAF(e){return w.wNAFCached(this,y,e,(e=>{const t=r.invertBatch(e.map((e=>e.pz)));return e.map(((e,r)=>e.toAffine(t[r]))).map(b.fromAffine)}))}multiplyUnsafe(e){const n=b.ZERO;if(e===u)return n;if(d(e),e===l)return this;const{endo:o}=t;if(!o)return w.unsafeLadder(this,e);let{k1neg:i,k1:s,k2neg:a,k2:c}=o.splitScalar(e),f=n,h=n,p=this;for(;s>u||c>u;)s&l&&(f=f.add(p)),c&l&&(h=h.add(p)),p=p.double(),s>>=l,c>>=l;return i&&(f=f.negate()),a&&(h=h.negate()),h=new b(r.mul(h.px,o.beta),h.py,h.pz),f.add(h)}multiply(e){d(e);let n,o,i=e;const{endo:s}=t;if(s){const{k1neg:e,k1:t,k2neg:a,k2:c}=s.splitScalar(i);let{p:u,f:l}=this.wNAF(t),{p:f,f:h}=this.wNAF(c);u=w.constTimeNegate(e,u),f=w.constTimeNegate(a,f),f=new b(r.mul(f.px,s.beta),f.py,f.pz),n=u.add(f),o=l.add(h)}else{const{p:e,f:t}=this.wNAF(i);n=e,o=t}return b.normalizeZ([n,o])[0]}multiplyAndAddUnsafe(e,t,r){const n=b.BASE,o=(e,t)=>t!==u&&t!==l&&e.equals(n)?e.multiply(t):e.multiplyUnsafe(t),i=o(this,t).add(o(e,r));return i.is0()?void 0:i}toAffine(e){const{px:t,py:n,pz:o}=this,i=this.is0();null==e&&(e=i?r.ONE:r.inv(o));const s=r.mul(t,e),a=r.mul(n,e),c=r.mul(o,e);if(i)return{x:r.ZERO,y:r.ZERO};if(!r.eql(c,r.ONE))throw new Error("invZ was invalid");return{x:s,y:a}}isTorsionFree(){const{h:e,isTorsionFree:r}=t;if(e===l)return!0;if(r)return r(b,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:e,clearCofactor:r}=t;return e===l?this:r?r(b,this):this.multiplyUnsafe(t.h)}toRawBytes(e=!0){return this.assertValidity(),a(b,this,e)}toHex(e=!0){return o.bytesToHex(this.toRawBytes(e))}}b.BASE=new b(t.Gx,t.Gy,r.ONE),b.ZERO=new b(r.ZERO,r.ONE,r.ZERO);const v=t.nBitLength,w=(0,s.wNAF)(b,t.endo?Math.ceil(v/2):v);return{CURVE:t,ProjectivePoint:b,normPrivateKeyToScalar:g,weierstrassEquation:f,isWithinCurveOrder:p}}function g(e,t){const r=e.ORDER;let n=u;for(let e=r-l;e%f===u;e/=f)n+=l;const o=n,i=f<{let n=y,i=e.pow(r,d),s=e.sqr(i);s=e.mul(s,r);let a=e.mul(t,s);a=e.pow(a,c),a=e.mul(a,i),i=e.mul(a,r),s=e.mul(a,t);let u=e.mul(s,i);a=e.pow(u,g);let h=e.eql(a,e.ONE);i=e.mul(s,m),a=e.mul(u,n),s=e.cmov(i,s,h),u=e.cmov(a,u,h);for(let t=o;t>l;t--){let r=t-f;r=f<{let i=e.sqr(o);const s=e.mul(t,o);i=e.mul(i,s);let a=e.pow(i,r);a=e.mul(a,s);const c=e.mul(a,n),u=e.mul(e.sqr(a),o),l=e.eql(u,t);return{isValid:l,value:e.cmov(c,a,l)}}}return b}t.weierstrassPoints=d,t.weierstrass=function(e){const r=function(e){const t=(0,s.validateBasic)(e);return o.validateObject(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}(e),{Fp:a,n:c}=r,f=a.BYTES+1,h=2*a.BYTES+1;function p(e){return n.mod(e,c)}function g(e){return n.invert(e,c)}const{ProjectivePoint:y,normPrivateKeyToScalar:m,weierstrassEquation:b,isWithinCurveOrder:v}=d({...r,toBytes(e,t,r){const n=t.toAffine(),i=a.toBytes(n.x),s=o.concatBytes;return r?s(Uint8Array.from([t.hasEvenY()?2:3]),i):s(Uint8Array.from([4]),i,a.toBytes(n.y))},fromBytes(e){const t=e.length,r=e[0],n=e.subarray(1);if(t!==f||2!==r&&3!==r){if(t===h&&4===r)return{x:a.fromBytes(n.subarray(0,a.BYTES)),y:a.fromBytes(n.subarray(a.BYTES,2*a.BYTES))};throw new Error(`Point of length ${t} was invalid. Expected ${f} compressed bytes or ${h} uncompressed bytes`)}{const e=o.bytesToNumberBE(n);if(!(u<(i=e)&&io.bytesToHex(o.numberToBytesBE(e,r.nByteLength));function E(e){return e>c>>l}const x=(e,t,r)=>o.bytesToNumberBE(e.slice(t,r));class S{constructor(e,t,r){this.r=e,this.s=t,this.recovery=r,this.assertValidity()}static fromCompact(e){const t=r.nByteLength;return e=(0,i.ensureBytes)("compactSignature",e,2*t),new S(x(e,0,t),x(e,t,2*t))}static fromDER(e){const{r,s:n}=t.DER.toSig((0,i.ensureBytes)("DER",e));return new S(r,n)}assertValidity(){if(!v(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!v(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(e){return new S(this.r,this.s,e)}recoverPublicKey(e){const{r:t,s:n,recovery:o}=this,s=T((0,i.ensureBytes)("msgHash",e));if(null==o||![0,1,2,3].includes(o))throw new Error("recovery id invalid");const c=2===o||3===o?t+r.n:t;if(c>=a.ORDER)throw new Error("recovery id 2 or 3 invalid");const u=0==(1&o)?"02":"03",l=y.fromHex(u+w(c)),f=g(c),h=p(-s*f),d=p(n*f),m=y.BASE.multiplyAndAddUnsafe(l,h,d);if(!m)throw new Error("point at infinify");return m.assertValidity(),m}hasHighS(){return E(this.s)}normalizeS(){return this.hasHighS()?new S(this.r,p(-this.s),this.recovery):this}toDERRawBytes(){return o.hexToBytes(this.toDERHex())}toDERHex(){return t.DER.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return o.hexToBytes(this.toCompactHex())}toCompactHex(){return w(this.r)+w(this.s)}}const A={isValidPrivateKey(e){try{return m(e),!0}catch(e){return!1}},normPrivateKeyToScalar:m,randomPrivateKey:()=>{const e=n.getMinHashLength(r.n);return n.mapHashToField(r.randomBytes(e),r.n)},precompute:(e=8,t=y.BASE)=>(t._setWindowSize(e),t.multiply(BigInt(3)),t)};function I(e){const t=o.isBytes(e),r="string"==typeof e,n=(t||r)&&e.length;return t?n===f||n===h:r?n===2*f||n===2*h:e instanceof y}const B=r.bits2int||function(e){const t=o.bytesToNumberBE(e),n=8*e.length-r.nBitLength;return n>0?t>>BigInt(n):t},T=r.bits2int_modN||function(e){return p(B(e))},P=o.bitMask(r.nBitLength);function C(e){if("bigint"!=typeof e)throw new Error("bigint expected");if(!(u<=e&&ee in n)))throw new Error("sign() legacy options not supported");const{hash:s,randomBytes:c}=r;let{lowS:f,prehash:h,extraEntropy:d}=n;null==f&&(f=!0),e=(0,i.ensureBytes)("msgHash",e),h&&(e=(0,i.ensureBytes)("prehashed msgHash",s(e)));const b=T(e),w=m(t),x=[C(w),C(b)];if(null!=d){const e=!0===d?c(a.BYTES):d;x.push((0,i.ensureBytes)("extraEntropy",e))}const A=o.concatBytes(...x),I=b;return{seed:A,k2sig:function(e){const t=B(e);if(!v(t))return;const r=g(t),n=y.BASE.multiply(t).toAffine(),o=p(n.x);if(o===u)return;const i=p(r*p(I+o*w));if(i===u)return;let s=(n.x===o?0:2)|Number(n.y&l),a=i;return f&&E(i)&&(a=function(e){return E(e)?p(-e):e}(i),s^=1),new S(o,a,s)}}}(e,t,n),f=r;return o.createHmacDrbg(f.hash.outputLen,f.nByteLength,f.hmac)(s,c)},verify:function(e,n,s,a=R){const c=e;if(n=(0,i.ensureBytes)("msgHash",n),s=(0,i.ensureBytes)("publicKey",s),"strict"in a)throw new Error("options.strict was renamed to lowS");const{lowS:u,prehash:l}=a;let f,h;try{if("string"==typeof c||o.isBytes(c))try{f=S.fromDER(c)}catch(e){if(!(e instanceof t.DER.Err))throw e;f=S.fromCompact(c)}else{if("object"!=typeof c||"bigint"!=typeof c.r||"bigint"!=typeof c.s)throw new Error("PARSE");{const{r:e,s:t}=c;f=new S(e,t)}}h=y.fromHex(s)}catch(e){if("PARSE"===e.message)throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(u&&f.hasHighS())return!1;l&&(n=r.hash(n));const{r:d,s:m}=f,b=T(n),v=g(m),w=p(b*v),E=p(d*v),x=y.BASE.multiplyAndAddUnsafe(h,w,E)?.toAffine();return!!x&&p(x.x)===d},ProjectivePoint:y,Signature:S,utils:A}},t.SWUFpSqrtRatio=g,t.mapToCurveSimpleSWU=function(e,t){if(n.validateField(e),!e.isValid(t.A)||!e.isValid(t.B)||!e.isValid(t.Z))throw new Error("mapToCurveSimpleSWU: invalid opts");const r=g(e,t.Z);if(!e.isOdd)throw new Error("Fp.isOdd is not implemented!");return n=>{let o,i,s,a,c,u,l,f;o=e.sqr(n),o=e.mul(o,t.Z),i=e.sqr(o),i=e.add(i,o),s=e.add(i,e.ONE),s=e.mul(s,t.B),a=e.cmov(t.Z,e.neg(i),!e.eql(i,e.ZERO)),a=e.mul(a,t.A),i=e.sqr(s),u=e.sqr(a),c=e.mul(u,t.A),i=e.add(i,c),i=e.mul(i,s),u=e.mul(u,a),c=e.mul(u,t.B),i=e.add(i,c),l=e.mul(o,s);const{isValid:h,value:p}=r(i,u);f=e.mul(o,n),f=e.mul(f,p),l=e.cmov(l,s,h),f=e.cmov(f,p,h);const d=e.isOdd(n)===e.isOdd(f);return f=e.cmov(e.neg(f),f,d),l=e.div(l,a),{x:l,y:f}}}},7399:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodeToCurve=t.hashToCurve=t.schnorr=t.secp256k1=void 0;const n=r(2623),o=r(9175),i=r(5304),s=r(4678),a=r(7939),c=r(1298),u=r(723),l=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),f=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),h=BigInt(1),p=BigInt(2),d=(e,t)=>(e+t/p)/t;function g(e){const t=l,r=BigInt(3),n=BigInt(6),o=BigInt(11),s=BigInt(22),a=BigInt(23),c=BigInt(44),u=BigInt(88),f=e*e*e%t,h=f*f*e%t,d=(0,i.pow2)(h,r,t)*h%t,g=(0,i.pow2)(d,r,t)*h%t,m=(0,i.pow2)(g,p,t)*f%t,b=(0,i.pow2)(m,o,t)*m%t,v=(0,i.pow2)(b,s,t)*b%t,w=(0,i.pow2)(v,c,t)*v%t,E=(0,i.pow2)(w,u,t)*w%t,x=(0,i.pow2)(E,c,t)*v%t,S=(0,i.pow2)(x,r,t)*h%t,A=(0,i.pow2)(S,a,t)*b%t,I=(0,i.pow2)(A,n,t)*f%t,B=(0,i.pow2)(I,p,t);if(!y.eql(y.sqr(B),e))throw new Error("Cannot find square root");return B}const y=(0,i.Field)(l,void 0,void 0,{sqrt:g});t.secp256k1=(0,u.createCurve)({a:BigInt(0),b:BigInt(7),Fp:y,n:f,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{const t=f,r=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),n=-h*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),o=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),s=r,a=BigInt("0x100000000000000000000000000000000"),c=d(s*e,t),u=d(-n*e,t);let l=(0,i.mod)(e-c*r-u*o,t),p=(0,i.mod)(-c*n-u*s,t);const g=l>a,y=p>a;if(g&&(l=t-l),y&&(p=t-p),l>a||p>a)throw new Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:g,k1:l,k2neg:y,k2:p}}}},n.sha256);const m=BigInt(0),b=e=>"bigint"==typeof e&&me.charCodeAt(0))));r=(0,a.concatBytes)(t,t),v[e]=r}return(0,n.sha256)((0,a.concatBytes)(r,...t))}const E=e=>e.toRawBytes(!0).slice(1),x=e=>(0,a.numberToBytesBE)(e,32),S=e=>(0,i.mod)(e,l),A=e=>(0,i.mod)(e,f),I=t.secp256k1.ProjectivePoint;function B(e){let r=t.secp256k1.utils.normPrivateKeyToScalar(e),n=I.fromPrivateKey(r);return{scalar:n.hasEvenY()?r:A(-r),bytes:E(n)}}function T(e){if(!b(e))throw new Error("bad x: need 0 < x < p");const t=S(e*e);let r=g(S(t*e+BigInt(7)));r%p!==m&&(r=S(-r));const n=new I(e,r,h);return n.assertValidity(),n}function P(...e){return A((0,a.bytesToNumberBE)(w("BIP0340/challenge",...e)))}function C(e,t,r){const n=(0,a.ensureBytes)("signature",e,64),o=(0,a.ensureBytes)("message",t),i=(0,a.ensureBytes)("publicKey",r,32);try{const e=T((0,a.bytesToNumberBE)(i)),t=(0,a.bytesToNumberBE)(n.subarray(0,32));if(!b(t))return!1;const r=(0,a.bytesToNumberBE)(n.subarray(32,64));if(!("bigint"==typeof(l=r)&&m(0,c.isogenyMap)(y,[["0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7","0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581","0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262","0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c"],["0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b","0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14","0x0000000000000000000000000000000000000000000000000000000000000001"],["0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c","0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3","0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931","0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84"],["0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b","0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573","0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f","0x0000000000000000000000000000000000000000000000000000000000000001"]].map((e=>e.map((e=>BigInt(e)))))))(),R=(()=>(0,s.mapToCurveSimpleSWU)(y,{A:BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),B:BigInt("1771"),Z:y.create(BigInt("-11"))}))(),O=(()=>(0,c.createHasher)(t.secp256k1.ProjectivePoint,(e=>{const{x:t,y:r}=R(y.create(e[0]));return _(t,r)}),{DST:"secp256k1_XMD:SHA-256_SSWU_RO_",encodeDST:"secp256k1_XMD:SHA-256_SSWU_NU_",p:y.ORDER,m:1,k:128,expand:"xmd",hash:n.sha256}))();t.hashToCurve=O.hashToCurve,t.encodeToCurve=O.encodeToCurve},9956:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.keccak512=t.keccak384=t.keccak256=t.keccak224=void 0;const n=r(2955),o=r(7513);t.keccak224=(0,o.wrapHash)(n.keccak_224),t.keccak256=(()=>{const e=(0,o.wrapHash)(n.keccak_256);return e.create=n.keccak_256.create,e})(),t.keccak384=(0,o.wrapHash)(n.keccak_384),t.keccak512=(0,o.wrapHash)(n.keccak_512)},3852:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.secp256k1=void 0;var n=r(7399);Object.defineProperty(t,"secp256k1",{enumerable:!0,get:function(){return n.secp256k1}})},7513:function(e,t,r){"use strict";e=r.nmd(e);var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.crypto=t.wrapHash=t.equalsBytes=t.hexToBytes=t.bytesToUtf8=t.utf8ToBytes=t.createView=t.concatBytes=t.toHex=t.bytesToHex=t.assertBytes=t.assertBool=void 0;const o=n(r(7557)),i=r(9175),s=o.default.bool;t.assertBool=s;const a=o.default.bytes;t.assertBytes=a;var c=r(9175);Object.defineProperty(t,"bytesToHex",{enumerable:!0,get:function(){return c.bytesToHex}}),Object.defineProperty(t,"toHex",{enumerable:!0,get:function(){return c.bytesToHex}}),Object.defineProperty(t,"concatBytes",{enumerable:!0,get:function(){return c.concatBytes}}),Object.defineProperty(t,"createView",{enumerable:!0,get:function(){return c.createView}}),Object.defineProperty(t,"utf8ToBytes",{enumerable:!0,get:function(){return c.utf8ToBytes}}),t.bytesToUtf8=function(e){if(!(e instanceof Uint8Array))throw new TypeError("bytesToUtf8 expected Uint8Array, got "+typeof e);return(new TextDecoder).decode(e)},t.hexToBytes=function(e){const t=e.startsWith("0x")?e.substring(2):e;return(0,i.hexToBytes)(t)},t.equalsBytes=function(e,t){if(e.length!==t.length)return!1;for(let r=0;r(o.default.bytes(t),e(t))},t.crypto=(()=>{const t="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0,r="function"==typeof e.require&&e.require.bind(e);return{node:r&&!t?r("crypto"):void 0,web:t}})()},6498:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeSingle=t.decode=t.encodePacked=t.encodeSingle=t.encode=void 0;const n=r(2049),o=r(5961),i=r(7700);t.encode=(e,t,r,n)=>{try{return(0,i.pack)({types:e,values:t,packed:r,tight:n})}catch(e){if(e instanceof o.ParserError)throw new o.ParserError(`Unable to encode value: ${e.message}`,e);throw new o.ParserError(`An unexpected error occurred: ${(0,o.getErrorMessage)(e)}`,e)}},t.encodeSingle=(e,r)=>(0,t.encode)([e],[r]),t.encodePacked=(e,r,n)=>(0,t.encode)(e,r,!0,n),t.decode=(e,t)=>{const r=(0,n.createBytes)(t);try{return(0,i.unpack)(e,r)}catch(e){if(e instanceof o.ParserError)throw new o.ParserError(`Unable to decode value: ${e.message}`,e);throw new o.ParserError(`An unexpected error occurred: ${(0,o.getErrorMessage)(e)}`,e)}},t.decodeSingle=(e,r)=>{const i=(0,t.decode)([e],r);return(0,n.assert)(1===i.length,new o.ParserError("Decoded value array has unexpected length.")),i[0]}},5961:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParserError=t.getErrorStack=t.getErrorMessage=void 0;const n=r(2049);t.getErrorMessage=e=>"string"==typeof e?e:e instanceof Error||(0,n.isObject)(e)&&(0,n.hasProperty)(e,"message")&&"string"==typeof e.message?e.message:"Unknown error.",t.getErrorStack=e=>{if(e instanceof Error)return e.stack};class o extends Error{constructor(e,r){super(e),this.name="ParserError";const n=(0,t.getErrorStack)(r);n&&(this.stack=n)}}t.ParserError=o},3256:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(6498),t),o(r(5961),t),o(r(1126),t)},7924:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.iterate=void 0;const n=r(2049);t.iterate=function*(e,t=32){for(let r=0;r{(0,n.assert)(e>=0,"Cannot skip a negative number of bytes."),(0,n.assert)(e%t==0,"Length must be a multiple of the size."),r+=e},i=e.subarray(r);yield{skip:o,value:i}}return{skip:()=>{},value:new Uint8Array}}},7700:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.unpack=t.pack=t.isDynamicParser=t.getParser=void 0;const n=r(2049),o=r(5961),i=r(7924),s=r(6207),a=r(8746);t.getParser=e=>{const t={address:s.address,array:s.array,bool:s.bool,bytes:s.bytes,fixedBytes:s.fixedBytes,function:s.fn,number:s.number,string:s.string,tuple:s.tuple},r=t[e];if(r)return r;const n=Object.values(t).find((t=>t.isType(e)));if(n)return n;throw new o.ParserError(`The type "${e}" is not supported.`)},t.isDynamicParser=(e,t)=>{const{isDynamic:r}=e;return"function"==typeof r?r(t):r},t.pack=({types:e,values:r,packed:i=!1,tight:s=!1,arrayPacked:c=!1,byteArray:u=new Uint8Array})=>{(0,n.assert)(e.length===r.length,new o.ParserError(`The number of types (${e.length}) does not match the number of values (${r.length}).`));const{staticBuffer:l,dynamicBuffer:f,pointers:h}=e.reduce((({staticBuffer:e,dynamicBuffer:o,pointers:a},u,l)=>{const f=(0,t.getParser)(u),h=r[l];return i||c||!(0,t.isDynamicParser)(f,u)?{staticBuffer:f.encode({buffer:e,value:h,type:u,packed:i,tight:s}),dynamicBuffer:o,pointers:a}:{staticBuffer:(0,n.concatBytes)([e,new Uint8Array(32)]),dynamicBuffer:f.encode({buffer:o,value:h,type:u,packed:i,tight:s}),pointers:[...a,{position:e.length,pointer:o.length}]}}),{staticBuffer:new Uint8Array,dynamicBuffer:new Uint8Array,pointers:[]});(0,n.assert)(!i&&!c||0===f.length,new o.ParserError("Invalid pack state."));const p=l.length,d=h.reduce(((e,{pointer:t,position:r})=>{const o=(0,a.padStart)((0,n.numberToBytes)(p+t));return(0,a.set)(e,o,r)}),l);return(0,n.concatBytes)([u,d,f])},t.unpack=(e,r)=>{const s=(0,i.iterate)(r);return e.map((e=>{const{value:{value:i,skip:a},done:c}=s.next();(0,n.assert)(!c,new o.ParserError(`The encoded value is invalid for the provided types. Reached end of buffer while attempting to parse "${e}".`));const u=(0,t.getParser)(e);if((0,t.isDynamicParser)(u,e)){const t=(0,n.bytesToNumber)(i.subarray(0,32)),o=r.subarray(t);return u.decode({type:e,value:o,skip:a})}return u.decode({type:e,value:i,skip:a})}))}},1563:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.address=t.getAddress=void 0;const n=r(2049),o=r(5961),i=r(8746);t.getAddress=e=>{const t=(0,n.createBytes)(e);return(0,n.assert)(t.length<=20,new o.ParserError(`Invalid address value. Expected address to be 20 bytes long, but received ${t.length} bytes.`)),(0,i.padStart)(t,20)},t.address={isDynamic:!1,isType:e=>"address"===e,getByteLength:()=>32,encode({buffer:e,value:r,packed:o}){const s=(0,t.getAddress)(r);if(o)return(0,n.concatBytes)([e,s]);const a=(0,i.padStart)(s);return(0,n.concatBytes)([e,a])},decode:({value:e})=>(0,n.add0x)((0,n.bytesToHex)(e.slice(12,32)))}},186:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.array=t.getTupleType=t.getArrayType=t.isArrayType=void 0;const n=r(2049),o=r(5961),i=r(7700),s=r(8746),a=r(3415),c=r(717),u=/^(?.*)\[(?\d*?)\]$/u;t.isArrayType=e=>u.test(e),t.getArrayType=e=>{const t=e.match(u);return(0,n.assert)(t?.groups?.type,new o.ParserError(`Invalid array type. Expected an array type, but received "${e}".`)),[t.groups.type,t.groups.length?parseInt(t.groups.length,10):void 0]},t.getTupleType=(e,t)=>`(${new Array(t).fill(e).join(",")})`,t.array={isDynamic(e){const[r,n]=(0,t.getArrayType)(e);return void 0===n||(0,i.isDynamicParser)((0,i.getParser)(r),r)},isType:e=>(0,t.isArrayType)(e),getByteLength(e){(0,n.assert)((0,t.isArrayType)(e),new o.ParserError(`Expected an array type, but received "${e}".`));const[r,s]=(0,t.getArrayType)(e);return(0,i.isDynamicParser)(this,e)||void 0===s?32:c.tuple.getByteLength((0,t.getTupleType)(r,s))},encode({type:e,buffer:r,value:u,packed:l,tight:f}){const[h,p]=(0,t.getArrayType)(e);if((0,n.assert)(!l||!(0,t.isArrayType)(h),new o.ParserError("Cannot pack nested arrays.")),l&&(0,i.isDynamicParser)((0,i.getParser)(h),h))return(0,i.pack)({types:new Array(u.length).fill(h),values:u,byteArray:r,packed:l,arrayPacked:!0,tight:f});if(p)return(0,n.assert)(p===u.length,new o.ParserError(`Array length does not match type length. Expected a length of ${p}, but received ${u.length}.`)),c.tuple.encode({type:(0,t.getTupleType)(h,p),buffer:r,value:u,packed:a.fixedBytes.isType(h)&&f,tight:f});if(l)return(0,i.pack)({types:new Array(u.length).fill(h),values:u,byteArray:r,packed:a.fixedBytes.isType(h)&&f,arrayPacked:!0,tight:f});const d=(0,s.padStart)((0,n.numberToBytes)(u.length));return(0,i.pack)({types:new Array(u.length).fill(h),values:u,byteArray:(0,n.concatBytes)([r,d]),packed:l,tight:f})},decode({type:e,value:r,...s}){const[a,u]=(0,t.getArrayType)(e);if(u){const e=c.tuple.decode({type:(0,t.getTupleType)(a,u),value:r,...s});return(0,n.assert)(e.length===u,new o.ParserError(`Array length does not match type length. Expected a length of ${u}, but received ${e.length}.`)),e}const l=(0,n.bytesToNumber)(r.subarray(0,32));return(0,i.unpack)(new Array(l).fill(a),r.subarray(32))}}},7435:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bool=t.getBooleanValue=void 0;const n=r(2049),o=r(2150),i=r(5961),s=r(6150),a=(0,o.coerce)((0,o.boolean)(),(0,o.union)([(0,o.literal)("true"),(0,o.literal)("false")]),(e=>"true"===e));t.getBooleanValue=e=>{try{return(0,o.create)(e,a)?BigInt(1):BigInt(0)}catch{throw new i.ParserError(`Invalid boolean value. Expected a boolean literal, or the string "true" or "false", but received "${e}".`)}},t.bool={isDynamic:!1,isType:e=>"bool"===e,getByteLength:()=>32,encode({buffer:e,value:r,packed:o,tight:i}){const a=(0,t.getBooleanValue)(r);return o?(0,n.concatBytes)([e,(0,n.bigIntToBytes)(a)]):s.number.encode({type:"uint256",buffer:e,value:a,packed:o,tight:i})},decode:e=>s.number.decode({...e,type:"uint256"})===BigInt(1)}},9356:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bytes=void 0;const n=r(2049),o=r(8746);t.bytes={isDynamic:!0,isType:e=>"bytes"===e,getByteLength:()=>32,encode({buffer:e,value:t,packed:r}){const i=(0,n.createBytes)(t);if(r)return(0,n.concatBytes)([e,i]);const s=32*Math.ceil(i.byteLength/32);return(0,n.concatBytes)([e,(0,o.padStart)((0,n.numberToBytes)(i.byteLength)),(0,o.padEnd)(i,s)])},decode({value:e}){const t=e.subarray(0,32),r=(0,n.bytesToNumber)(t);return e.slice(32,32+r)}}},3415:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fixedBytes=t.getByteLength=void 0;const n=r(2049),o=r(5961),i=r(8746),s=/^bytes([0-9]{1,2})$/u;t.getByteLength=e=>{const t=e.match(s)?.[1];(0,n.assert)(t,`Invalid byte length. Expected a number between 1 and 32, but received "${e}".`);const r=Number(t);return(0,n.assert)(r>0&&r<=32,new o.ParserError(`Invalid byte length. Expected a number between 1 and 32, but received "${e}".`)),r},t.fixedBytes={isDynamic:!1,isType:e=>s.test(e),getByteLength:()=>32,encode({type:e,buffer:r,value:s,packed:a}){const c=(0,t.getByteLength)(e),u=(0,n.createBytes)(s);return(0,n.assert)(u.length<=c,new o.ParserError(`Expected a value of length ${c}, but received a value of length ${u.length}.`)),a?(0,n.concatBytes)([r,(0,i.padEnd)(u,c)]):(0,n.concatBytes)([r,(0,i.padEnd)(u)])},decode({type:e,value:r}){const n=(0,t.getByteLength)(e);return r.slice(0,n)}}},7827:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fn=t.getFunction=void 0;const n=r(2049),o=r(2150),i=r(5961),s=r(3415),a=(0,o.coerce)((0,o.object)({address:n.StrictHexStruct,selector:n.StrictHexStruct}),(0,o.union)([n.StrictHexStruct,(0,o.instance)(Uint8Array)]),(e=>{const t=(0,n.createBytes)(e);return(0,n.assert)(24===t.length,new i.ParserError(`Invalid Solidity function. Expected function to be 24 bytes long, but received ${t.length} bytes.`)),{address:(0,n.bytesToHex)(t.subarray(0,20)),selector:(0,n.bytesToHex)(t.subarray(20,24))}}));t.getFunction=e=>{const t=(0,o.create)(e,a);return(0,n.concatBytes)([(0,n.hexToBytes)(t.address),(0,n.hexToBytes)(t.selector)])},t.fn={isDynamic:!1,isType:e=>"function"===e,getByteLength:()=>32,encode({buffer:e,value:r,packed:n,tight:o}){const i=(0,t.getFunction)(r);return s.fixedBytes.encode({type:"bytes24",buffer:e,value:i,packed:n,tight:o})},decode:({value:e})=>({address:(0,n.bytesToHex)(e.slice(0,20)),selector:(0,n.bytesToHex)(e.slice(20,24))})}},6207:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(1563),t),o(r(186),t),o(r(7435),t),o(r(9356),t),o(r(3415),t),o(r(7827),t),o(r(6150),t),o(r(8160),t),o(r(8446),t),o(r(717),t)},6150:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.number=t.getBigInt=t.assertNumberLength=t.getLength=t.isSigned=void 0;const n=r(2049),o=r(5961),i=r(8746),s=/^u?int(?[0-9]*)?$/u;t.isSigned=e=>!e.startsWith("u"),t.getLength=e=>{if("int"===e||"uint"===e)return 256;const t=e.match(s);(0,n.assert)(t?.groups?.length,new o.ParserError(`Invalid number type. Expected a number type, but received "${e}".`));const r=parseInt(t.groups.length,10);return(0,n.assert)(r>=8&&r<=256,new o.ParserError(`Invalid number length. Expected a number between 8 and 256, but received "${e}".`)),(0,n.assert)(r%8==0,new o.ParserError(`Invalid number length. Expected a multiple of 8, but received "${e}".`)),r},t.assertNumberLength=(e,r)=>{const i=(0,t.getLength)(r),s=BigInt(2)**BigInt(i-((0,t.isSigned)(r)?1:0))-BigInt(1);(0,t.isSigned)(r)?(0,n.assert)(e>=-(s+BigInt(1))&&e<=s,new o.ParserError(`Number "${e}" is out of range for type "${r}".`)):(0,n.assert)(e<=s,new o.ParserError(`Number "${e}" is out of range for type "${r}".`))},t.getBigInt=e=>{try{return(0,n.createBigInt)(e)}catch{throw new o.ParserError(`Invalid number. Expected a valid number value, but received "${e}".`)}},t.number={isDynamic:!1,isType:e=>s.test(e),getByteLength:()=>32,encode({type:e,buffer:r,value:o,packed:s}){const a=(0,t.getBigInt)(o);if((0,t.assertNumberLength)(a,e),(0,t.isSigned)(e)){if(s){const o=(0,t.getLength)(e)/8;return(0,n.concatBytes)([r,(0,n.signedBigIntToBytes)(a,o)])}return(0,n.concatBytes)([r,(0,i.padStart)((0,n.signedBigIntToBytes)(a,32))])}if(s){const o=(0,t.getLength)(e)/8;return(0,n.concatBytes)([r,(0,i.padStart)((0,n.bigIntToBytes)(a),o)])}return(0,n.concatBytes)([r,(0,i.padStart)((0,n.bigIntToBytes)(a))])},decode({type:e,value:r}){const o=r.subarray(0,32);if((0,t.isSigned)(e)){const r=(0,n.bytesToSignedBigInt)(o);return(0,t.assertNumberLength)(r,e),r}const i=(0,n.bytesToBigInt)(o);return(0,t.assertNumberLength)(i,e),i}}},8160:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},8446:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.string=void 0;const n=r(2049),o=r(9356);t.string={isDynamic:!0,isType:e=>"string"===e,getByteLength:()=>32,encode:({buffer:e,value:t,packed:r,tight:i})=>o.bytes.encode({type:"bytes",buffer:e,value:(0,n.stringToBytes)(t),packed:r,tight:i}),decode:e=>(0,n.bytesToString)(o.bytes.decode(e))}},717:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.tuple=t.getTupleElements=void 0;const n=r(2049),o=r(5961),i=r(7700),s=/^\((.+)\)$/u;t.getTupleElements=e=>{(0,n.assert)(e.startsWith("(")&&e.endsWith(")"),new o.ParserError(`Invalid tuple type. Expected tuple type, but received "${e}".`));const t=[];let r="",i=0;for(let n=1;n(0,t.getTupleElements)(e).some((e=>{const t=(0,i.getParser)(e);return(0,i.isDynamicParser)(t,e)})),isType:e=>(e=>s.test(e))(e),getByteLength(e){return(0,i.isDynamicParser)(this,e)?32:(0,t.getTupleElements)(e).reduce(((e,t)=>e+(0,i.getParser)(t).getByteLength(t)),0)},encode({type:e,buffer:r,value:n,packed:o,tight:s}){const a=(0,t.getTupleElements)(e);return(0,i.pack)({types:a,values:n,byteArray:r,packed:o,tight:s})},decode({type:e,value:r,skip:n}){const o=(0,t.getTupleElements)(e);return n(this.getByteLength(e)-32),(0,i.unpack)(o,r)}}},5744:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},1126:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(5744),t)},9194:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.padEnd=t.padStart=t.set=void 0;const n=r(2049);t.set=(e,t,r)=>(0,n.concatBytes)([e.subarray(0,r),t,e.subarray(r+t.length)]),t.padStart=(e,t=32)=>{const r=new Uint8Array(Math.max(t-e.length,0)).fill(0);return(0,n.concatBytes)([r,e])},t.padEnd=(e,t=32)=>{const r=new Uint8Array(Math.max(t-e.length,0)).fill(0);return(0,n.concatBytes)([e,r])}},8746:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(9194),t)},8537:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.getEncryptionPublicKey=t.decryptSafely=t.decrypt=t.encryptSafely=t.encrypt=void 0;const s=i(r(8947)),a=i(r(6386)),c=r(4907);function u({publicKey:e,data:t,version:r}){if((0,c.isNullish)(e))throw new Error("Missing publicKey parameter");if((0,c.isNullish)(t))throw new Error("Missing data parameter");if((0,c.isNullish)(r))throw new Error("Missing version parameter");if("x25519-xsalsa20-poly1305"===r){if("string"!=typeof t)throw new Error("Message data must be given as a string");const r=s.box.keyPair();let n;try{n=a.decodeBase64(e)}catch(e){throw new Error("Bad public key")}const o=a.decodeUTF8(t),i=s.randomBytes(s.box.nonceLength),c=s.box(o,i,n,r.secretKey);return{version:"x25519-xsalsa20-poly1305",nonce:a.encodeBase64(i),ephemPublicKey:a.encodeBase64(r.publicKey),ciphertext:a.encodeBase64(c)}}throw new Error("Encryption type/version not supported")}function l({encryptedData:e,privateKey:t}){if((0,c.isNullish)(e))throw new Error("Missing encryptedData parameter");if((0,c.isNullish)(t))throw new Error("Missing privateKey parameter");if("x25519-xsalsa20-poly1305"===e.version){const r=f(t),n=s.box.keyPair.fromSecretKey(r).secretKey,o=a.decodeBase64(e.nonce),i=a.decodeBase64(e.ciphertext),c=a.decodeBase64(e.ephemPublicKey),u=s.box.open(i,o,c,n);try{if(!u)throw new Error;const e=a.encodeUTF8(u);if(!e)throw new Error;return e}catch(e){if(e&&"string"==typeof e.message&&e.message.length)throw new Error(`Decryption failed: ${e.message}`);throw new Error("Decryption failed.")}}throw new Error("Encryption type/version not supported.")}function f(e){const t=Buffer.from(e,"hex").toString("base64");return a.decodeBase64(t)}t.encrypt=u,t.encryptSafely=function({publicKey:e,data:t,version:r}){if((0,c.isNullish)(e))throw new Error("Missing publicKey parameter");if((0,c.isNullish)(t))throw new Error("Missing data parameter");if((0,c.isNullish)(r))throw new Error("Missing version parameter");if("object"==typeof t&&t&&"toJSON"in t)throw new Error("Cannot encrypt with toJSON property. Please remove toJSON property");const n={data:t,padding:""},o=Buffer.byteLength(JSON.stringify(n),"utf-8")%2048;let i=0;return o>0&&(i=2048-o-16),n.padding="0".repeat(i),u({publicKey:e,data:JSON.stringify(n),version:r})},t.decrypt=l,t.decryptSafely=function({encryptedData:e,privateKey:t}){if((0,c.isNullish)(e))throw new Error("Missing encryptedData parameter");if((0,c.isNullish)(t))throw new Error("Missing privateKey parameter");return JSON.parse(l({encryptedData:e,privateKey:t})).data},t.getEncryptionPublicKey=function(e){const t=f(e),r=s.box.keyPair.fromSecretKey(t).publicKey;return a.encodeBase64(r)}},1594:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.normalize=t.concatSig=void 0,o(r(252),t),o(r(169),t),o(r(8537),t);var i=r(4907);Object.defineProperty(t,"concatSig",{enumerable:!0,get:function(){return i.concatSig}}),Object.defineProperty(t,"normalize",{enumerable:!0,get:function(){return i.normalize}})},252:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extractPublicKey=t.recoverPersonalSignature=t.personalSign=void 0;const n=r(8683),o=r(4907);function i(e,t){const r=(0,n.hashPersonalMessage)((0,o.legacyToBuffer)(e));return(0,o.recoverPublicKey)(r,t)}t.personalSign=function({privateKey:e,data:t}){if((0,o.isNullish)(t))throw new Error("Missing data parameter");if((0,o.isNullish)(e))throw new Error("Missing privateKey parameter");const r=(0,o.legacyToBuffer)(t),i=(0,n.hashPersonalMessage)(r),s=(0,n.ecsign)(i,e);return(0,o.concatSig)((0,n.toBuffer)(s.v),s.r,s.s)},t.recoverPersonalSignature=function({data:e,signature:t}){if((0,o.isNullish)(e))throw new Error("Missing data parameter");if((0,o.isNullish)(t))throw new Error("Missing signature parameter");const r=i(e,t),s=(0,n.publicToAddress)(r);return(0,n.bufferToHex)(s)},t.extractPublicKey=function({data:e,signature:t}){if((0,o.isNullish)(e))throw new Error("Missing data parameter");if((0,o.isNullish)(t))throw new Error("Missing signature parameter");return`0x${i(e,t).toString("hex")}`}},169:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.recoverTypedSignature=t.signTypedData=t.typedSignatureHash=t.TypedDataUtils=t.TYPED_MESSAGE_SCHEMA=t.SignTypedDataVersion=void 0;const n=r(8683),o=r(3256),i=r(6207),s=r(8746),a=r(2049),c=r(199),u=r(4907);var l;function f(e,t){if(!Object.keys(l).includes(e))throw new Error(`Invalid version: '${e}'`);if(t&&!t.includes(e))throw new Error(`SignTypedDataVersion not allowed: '${e}'. Allowed versions are: ${t.join(", ")}`)}function h(e,t){(0,a.assert)(null!==t,`Unable to encode value: Invalid number. Expected a valid number value, but received "${t}".`);const r=BigInt(t),n=(0,i.getLength)(e),o=BigInt(2)**BigInt(n)-BigInt(1);return(0,a.assert)(r>=-o&&r<=o,`Unable to encode value: Number "${t}" is out of range for type "${e}".`),r}function p(e){let t=BigInt(0);for(let r=0;r=49?n-BigInt(49)+BigInt(10):n>=17?n-BigInt(17)+BigInt(10):n}return(0,s.padStart)((0,a.bigIntToBytes)(t),20)}function d(e,t,r,i,u){if(f(u,[l.V3,l.V4]),void 0!==e[r])return["bytes32",u===l.V4&&null==i?"0x0000000000000000000000000000000000000000000000000000000000000000":(0,n.arrToBufArr)((0,c.keccak256)(g(r,i,e,u)))];if("function"===r)throw new Error('Unsupported or invalid type: "function"');if(void 0===i)throw new Error(`missing value for field ${t} of type ${r}`);if("address"===r){if("number"==typeof i)return["address",(0,s.padStart)((0,a.numberToBytes)(i),20)];if((0,a.isStrictHexString)(i))return["address",(0,a.add0x)(i)];if("string"==typeof i)return["address",p(i).subarray(0,20)]}if("bool"===r)return["bool",Boolean(i)];if("bytes"===r)return"number"==typeof i?i=(0,a.numberToBytes)(i):(0,a.isStrictHexString)(i)||"0x"===i?i=(0,a.hexToBytes)(i):"string"==typeof i&&(i=(0,a.stringToBytes)(i)),["bytes32",(0,n.arrToBufArr)((0,c.keccak256)(i))];if(r.startsWith("bytes")&&"bytes"!==r&&!r.includes("["))return"number"==typeof i?i<0?["bytes32",new Uint8Array(32)]:["bytes32",(0,a.bigIntToBytes)(BigInt(i))]:(0,a.isStrictHexString)(i)?["bytes32",(0,a.hexToBytes)(i)]:["bytes32",i];if(r.startsWith("int")&&!r.includes("[")){const e=h(r,i);return e>=BigInt(0)?["uint256",e]:["int256",e]}if("string"===r)return i="number"==typeof i?(0,a.numberToBytes)(i):(0,a.stringToBytes)(null!=i?i:""),["bytes32",(0,n.arrToBufArr)((0,c.keccak256)(i))];if(r.endsWith("]")){if(u===l.V3)throw new Error("Arrays are unimplemented in encodeData; use V4 extension");const s=r.slice(0,r.lastIndexOf("[")),a=i.map((r=>d(e,t,s,r,u)));return["bytes32",(0,n.arrToBufArr)((0,c.keccak256)((0,o.encode)(a.map((([e])=>e)),a.map((([,e])=>e)))))]}return[r,i]}function g(e,t,r,i){f(i,[l.V3,l.V4]);const s=["bytes32"],a=[v(e,r)];for(const n of r[e]){if(i===l.V3&&void 0===t[n.name])continue;const[e,o]=d(r,n.name,n.type,t[n.name],i);s.push(e),a.push(o)}return(0,n.arrToBufArr)((0,o.encode)(s,a))}function y(e,t){let r="";const n=m(e,t);n.delete(e);const o=[e,...Array.from(n).sort()];for(const e of o){if(!t[e])throw new Error(`No type definition specified: ${e}`);r+=`${e}(${t[e].map((({name:e,type:t})=>`${t} ${e}`)).join(",")})`}return r}function m(e,t,r=new Set){if("string"!=typeof e)throw new Error(`Invalid findTypeDependencies input ${JSON.stringify(e)}`);const n=e.match(/^\w*/u);if([e]=n,r.has(e)||void 0===t[e])return r;r.add(e);for(const n of t[e])m(n.type,t,r);return r}function b(e,t,r,o){f(o,[l.V3,l.V4]);const i=g(e,t,r,o),s=(0,c.keccak256)(i);return(0,n.arrToBufArr)(s)}function v(e,t){const r=(0,a.stringToBytes)(y(e,t));return(0,n.arrToBufArr)((0,c.keccak256)(r))}function w(e){const r={};for(const n in t.TYPED_MESSAGE_SCHEMA.properties)e[n]&&(r[n]=e[n]);return"types"in r&&(r.types=Object.assign({EIP712Domain:[]},r.types)),r}function E(e,t){f(t,[l.V3,l.V4]);const r=w(e),{domain:n}=r;return b("EIP712Domain",n,{EIP712Domain:r.types.EIP712Domain},t)}function x(e,t){if((0,i.isArrayType)(e)&&Array.isArray(t)){const[r]=(0,i.getArrayType)(e);return t.map((e=>x(r,e)))}if("address"===e){if("number"==typeof t)return(0,s.padStart)((0,a.numberToBytes)(t),20);if((0,a.isStrictHexString)(t))return(0,s.padStart)((0,a.hexToBytes)(t).subarray(0,20),20);if(t instanceof Uint8Array)return(0,s.padStart)(t.subarray(0,20),20)}if("bool"===e)return Boolean(t);if(e.startsWith("bytes")&&"bytes"!==e){const r=(0,i.getByteLength)(e);if("number"==typeof t)return t<0?new Uint8Array:(0,a.numberToBytes)(t).subarray(0,r);if((0,a.isStrictHexString)(t))return(0,a.hexToBytes)(t).subarray(0,r);if(t instanceof Uint8Array)return t.subarray(0,r)}if(e.startsWith("uint")&&"number"==typeof t)return Math.abs(t);if(e.startsWith("int")&&"number"==typeof t){const r=(0,i.getLength)(e);return BigInt.asIntN(r,BigInt(t))}return t}function S(e,t){return t.map((t=>{if("string"==typeof t||"number"==typeof t||"bigint"==typeof t){const r=h(e,t);if(r>=BigInt(0))return(0,s.padStart)((0,a.bigIntToBytes)(r),32);const n=(0,i.getLength)(e),o=BigInt.asIntN(n,r);return(0,a.signedBigIntToBytes)(o,32)}return t}))}function A(e){const t=new Error("Expect argument to be non-empty array");if("object"!=typeof e||!("length"in e)||!e.length)throw t;const r=e.map((({name:e,type:t,value:r})=>{if("address[]"===t)return{name:e,type:"bytes32[]",value:(n=r,n.map((e=>"number"==typeof e?(0,s.padStart)((0,a.numberToBytes)(e),32):(0,a.isStrictHexString)(e)?(0,s.padStart)((0,a.hexToBytes)(e).subarray(0,32),32):e instanceof Uint8Array?(0,s.padStart)(e.subarray(0,32),32):e)))};var n;if(t.startsWith("int")&&(0,i.isArrayType)(t)){const[n,o]=(0,i.getArrayType)(t);return{name:e,type:`bytes32[${null!=o?o:""}]`,value:S(n,r)}}return{name:e,type:t,value:x(t,r)}})),l=r.map((e=>"bytes"!==e.type?e.value:(0,u.legacyToBuffer)(e.value))),f=r.map((e=>{if("function"===e.type)throw new Error('Unsupported or invalid type: "function"');return e.type})),h=e.map((e=>{if(!e.name)throw t;return`${e.type} ${e.name}`}));return(0,n.arrToBufArr)((0,c.keccak256)((0,o.encodePacked)(["bytes32","bytes32"],[(0,c.keccak256)((0,o.encodePacked)(["string[]"],[h],!0)),(0,c.keccak256)((0,o.encodePacked)(f,l,!0))])))}!function(e){e.V1="V1",e.V3="V3",e.V4="V4"}(l=t.SignTypedDataVersion||(t.SignTypedDataVersion={})),t.TYPED_MESSAGE_SCHEMA={type:"object",properties:{types:{type:"object",additionalProperties:{type:"array",items:{type:"object",properties:{name:{type:"string"},type:{type:"string"}},required:["name","type"]}}},primaryType:{type:"string"},domain:{type:"object"},message:{type:"object"}},required:["types","primaryType","domain","message"]},t.TypedDataUtils={encodeData:g,encodeType:y,findTypeDependencies:m,hashStruct:b,hashType:v,sanitizeData:w,eip712Hash:function(e,t){f(t,[l.V3,l.V4]);const r=w(e),o=[(0,a.hexToBytes)("1901")];return o.push(E(e,t)),"EIP712Domain"!==r.primaryType&&o.push(b(r.primaryType,r.message,r.types,t)),(0,n.arrToBufArr)((0,c.keccak256)((0,a.concatBytes)(o)))},eip712DomainHash:E},t.typedSignatureHash=function(e){const t=A(e);return(0,a.bytesToHex)(t)},t.signTypedData=function({privateKey:e,data:r,version:o}){if(f(o),(0,u.isNullish)(r))throw new Error("Missing data parameter");if((0,u.isNullish)(e))throw new Error("Missing private key parameter");const i=o===l.V1?A(r):t.TypedDataUtils.eip712Hash(r,o),s=(0,n.ecsign)(i,e);return(0,u.concatSig)((0,n.arrToBufArr)((0,a.bigIntToBytes)(s.v)),s.r,s.s)},t.recoverTypedSignature=function({data:e,signature:r,version:o}){if(f(o),(0,u.isNullish)(e))throw new Error("Missing data parameter");if((0,u.isNullish)(r))throw new Error("Missing signature parameter");const i=o===l.V1?A(e):t.TypedDataUtils.eip712Hash(e,o),s=(0,u.recoverPublicKey)(i,r),c=(0,n.publicToAddress)(s);return(0,a.bytesToHex)(c)}},4907:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.normalize=t.recoverPublicKey=t.concatSig=t.legacyToBuffer=t.isNullish=t.padWithZeroes=void 0;const n=r(8683),o=r(2049);function i(e,t){if(""!==e&&!/^[a-f0-9]+$/iu.test(e))throw new Error(`Expected an unprefixed hex string. Received: ${e}`);if(t<0)throw new Error(`Expected a non-negative integer target length. Received: ${t}`);return String.prototype.padStart.call(e,t,"0")}function s(e){return null==e}t.padWithZeroes=i,t.isNullish=s,t.legacyToBuffer=function(e){return"string"!=typeof e||(0,n.isHexString)(e)?(0,n.toBuffer)(e):Buffer.from(e)},t.concatSig=function(e,t,r){const s=(0,n.fromSigned)(t),a=(0,n.fromSigned)(r),c=(0,n.bufferToInt)(e),u=i((0,n.toUnsigned)(s).toString("hex"),64),l=i((0,n.toUnsigned)(a).toString("hex"),64),f=(0,o.remove0x)((0,o.numberToHex)(c));return(0,o.add0x)(u.concat(l,f))},t.recoverPublicKey=function(e,t){const r=(0,n.fromRpcSig)(t);return(0,n.ecrecover)(e,r.v,r.r,r.s)},t.normalize=function(e){if(!s(e)){if("number"==typeof e){if(e<0)return"0x";const t=(0,o.numberToBytes)(e);e=(0,o.bytesToHex)(t)}if("string"!=typeof e){let t="eth-sig-util.normalize() requires hex string or integer input.";throw t+=` received ${typeof e}: ${e}`,new Error(t)}return(0,o.add0x)(e.toLowerCase())}}},199:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.keccak512=t.keccak384=t.keccak256=t.keccak224=void 0;const n=r(2955),o=r(8492);t.keccak224=(0,o.wrapHash)(n.keccak_224),t.keccak256=(()=>{const e=(0,o.wrapHash)(n.keccak_256);return e.create=n.keccak_256.create,e})(),t.keccak384=(0,o.wrapHash)(n.keccak_384),t.keccak512=(0,o.wrapHash)(n.keccak_512)},8492:function(e,t,r){"use strict";e=r.nmd(e);var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.crypto=t.wrapHash=t.equalsBytes=t.hexToBytes=t.bytesToUtf8=t.utf8ToBytes=t.createView=t.concatBytes=t.toHex=t.bytesToHex=t.assertBytes=t.assertBool=void 0;const o=n(r(7557)),i=r(9175),s=o.default.bool;t.assertBool=s;const a=o.default.bytes;t.assertBytes=a;var c=r(9175);Object.defineProperty(t,"bytesToHex",{enumerable:!0,get:function(){return c.bytesToHex}}),Object.defineProperty(t,"toHex",{enumerable:!0,get:function(){return c.bytesToHex}}),Object.defineProperty(t,"concatBytes",{enumerable:!0,get:function(){return c.concatBytes}}),Object.defineProperty(t,"createView",{enumerable:!0,get:function(){return c.createView}}),Object.defineProperty(t,"utf8ToBytes",{enumerable:!0,get:function(){return c.utf8ToBytes}}),t.bytesToUtf8=function(e){if(!(e instanceof Uint8Array))throw new TypeError("bytesToUtf8 expected Uint8Array, got "+typeof e);return(new TextDecoder).decode(e)},t.hexToBytes=function(e){const t=e.startsWith("0x")?e.substring(2):e;return(0,i.hexToBytes)(t)},t.equalsBytes=function(e,t){if(e.length!==t.length)return!1;for(let r=0;r(o.default.bytes(t),e(t))},t.crypto=(()=>{const t="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0,r="function"==typeof e.require&&e.require.bind(e);return{node:r&&!t?r("crypto"):void 0,web:t}})()},1275:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=((n=r(7833))&&n.__esModule?n:{default:n}).default.call(void 0,"metamask");t.createProjectLogger=function(e){return o.extend(e)},t.createModuleLogger=function(e,t){return e.extend(t)}},5244:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)};t.__privateGet=(e,t,n)=>(r(e,t,"read from private field"),n?n.call(e):t.get(e)),t.__privateAdd=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},t.__privateSet=(e,t,n,o)=>(r(e,t,"write to private field"),o?o.call(e,n):t.set(e,n),n)},3631:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(932),o=r(9589),i=r(2150),s=i.refine.call(void 0,i.string.call(void 0),"Version",(e=>null!==o.valid.call(void 0,e)||`Expected SemVer version, got "${e}"`)),a=i.refine.call(void 0,i.string.call(void 0),"Version range",(e=>null!==o.validRange.call(void 0,e)||`Expected SemVer range, got "${e}"`));t.VersionStruct=s,t.VersionRangeStruct=a,t.isValidSemVerVersion=function(e){return i.is.call(void 0,e,s)},t.isValidSemVerRange=function(e){return i.is.call(void 0,e,a)},t.assertIsSemVerVersion=function(e){n.assertStruct.call(void 0,e,s)},t.assertIsSemVerRange=function(e){n.assertStruct.call(void 0,e,a)},t.gtVersion=function(e,t){return o.gt.call(void 0,e,t)},t.gtRange=function(e,t){return o.gtr.call(void 0,e,t)},t.satisfiesVersionRange=function(e,t){return o.satisfies.call(void 0,e,t,{includePrerelease:!0})}},5680:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createDeferredPromise=function({suppressUnhandledRejection:e=!1}={}){let t,r;const n=new Promise(((e,n)=>{t=e,r=n}));return e&&n.catch((e=>{})),{promise:n,resolve:t,reject:r}}},9116:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=(e=>(e[e.Millisecond=1]="Millisecond",e[e.Second=1e3]="Second",e[e.Minute=6e4]="Minute",e[e.Hour=36e5]="Hour",e[e.Day=864e5]="Day",e[e.Week=6048e5]="Week",e[e.Year=31536e6]="Year",e))(r||{}),n=(e,t)=>{if(!(e=>Number.isInteger(e)&&e>=0)(e))throw new Error(`"${t}" must be a non-negative integer. Received: "${e}".`)};t.Duration=r,t.inMilliseconds=function(e,t){return n(e,"count"),e*t},t.timeSince=function(e){return n(e,"timestamp"),Date.now()-e}},7982:()=>{},1848:(e,t,r)=>{"use strict";function n(e,t){return null!=e?e:t()}Object.defineProperty(t,"__esModule",{value:!0});var o=r(932),i=r(2150);t.base64=(e,t={})=>{const r=n(t.paddingRequired,(()=>!1)),s=n(t.characterSet,(()=>"base64"));let a,c;return"base64"===s?a=String.raw`[A-Za-z0-9+\/]`:(o.assert.call(void 0,"base64url"===s),a=String.raw`[-_A-Za-z0-9]`),c=r?new RegExp(`^(?:${a}{4})*(?:${a}{3}=|${a}{2}==)?$`,"u"):new RegExp(`^(?:${a}{4})*(?:${a}{2,3}|${a}{3}=|${a}{2}==)?$`,"u"),i.pattern.call(void 0,e,c)}},932:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1486),o=r(2150);function i(e,t){return Boolean("string"==typeof function(e){let t,r=e[0],n=1;for(;nr.call(t,...e))),t=void 0)}return r}([e,"optionalAccess",e=>e.prototype,"optionalAccess",e=>e.constructor,"optionalAccess",e=>e.name]))?new e({message:t}):e({message:t})}var s=class extends Error{constructor(e){super(e.message),this.code="ERR_ASSERTION"}};t.AssertionError=s,t.assert=function(e,t="Assertion failed.",r=s){if(!e){if(t instanceof Error)throw t;throw i(r,t)}},t.assertStruct=function(e,t,r="Assertion failed",a=s){try{o.assert.call(void 0,e,t)}catch(e){throw i(a,`${r}: ${function(e){return n.getErrorMessage.call(void 0,e).replace(/\.$/u,"")}(e)}.`)}},t.assertExhaustive=function(e){throw new Error("Invalid branch reached. Should be detected during compilation.")}},1203:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(5363),o=r(932),i=r(2150),s=i.union.call(void 0,[i.number.call(void 0),i.bigint.call(void 0),i.string.call(void 0),n.StrictHexStruct]),a=i.coerce.call(void 0,i.number.call(void 0),s,Number),c=i.coerce.call(void 0,i.bigint.call(void 0),s,BigInt),u=(i.union.call(void 0,[n.StrictHexStruct,i.instance.call(void 0,Uint8Array)]),i.coerce.call(void 0,i.instance.call(void 0,Uint8Array),i.union.call(void 0,[n.StrictHexStruct]),n.hexToBytes)),l=i.coerce.call(void 0,n.StrictHexStruct,i.instance.call(void 0,Uint8Array),n.bytesToHex);t.createNumber=function(e){try{const t=i.create.call(void 0,e,a);return o.assert.call(void 0,Number.isFinite(t),`Expected a number-like value, got "${e}".`),t}catch(t){if(t instanceof i.StructError)throw new Error(`Expected a number-like value, got "${e}".`);throw t}},t.createBigInt=function(e){try{return i.create.call(void 0,e,c)}catch(e){if(e instanceof i.StructError)throw new Error(`Expected a number-like value, got "${String(e.value)}".`);throw e}},t.createBytes=function(e){if("string"==typeof e&&"0x"===e.toLowerCase())return new Uint8Array;try{return i.create.call(void 0,e,u)}catch(e){if(e instanceof i.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}},t.createHex=function(e){if(e instanceof Uint8Array&&0===e.length||"string"==typeof e&&"0x"===e.toLowerCase())return"0x";try{return i.create.call(void 0,e,l)}catch(e){if(e instanceof i.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}}},1508:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1848),o=r(2150),i=o.size.call(void 0,n.base64.call(void 0,o.string.call(void 0),{paddingRequired:!0}),44,44);t.ChecksumStruct=i},1423:()=>{},1486:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(6526),o=r(1843);function i(e){return"object"==typeof e&&null!==e&&"code"in e}function s(e){return"object"==typeof e&&null!==e&&"message"in e}t.isErrorWithCode=i,t.isErrorWithMessage=s,t.isErrorWithStack=function(e){return"object"==typeof e&&null!==e&&"stack"in e},t.getErrorMessage=function(e){return s(e)&&"string"==typeof e.message?e.message:n.isNullOrUndefined.call(void 0,e)?"":String(e)},t.wrapError=function(e,t){if((r=e)instanceof Error||n.isObject.call(void 0,r)&&"Error"===r.constructor.name){let r;return r=2===Error.length?new Error(t,{cause:e}):new(0,o.ErrorWithCause)(t,{cause:e}),i(e)&&(r.code=e.code),r}var r;return t.length>0?new Error(`${String(e)}: ${t}`):new Error(String(e))}},8383:()=>{},7427:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(932),o=r(6526),i=r(2150),s=e=>i.object.call(void 0,e);function a({path:e,branch:t}){const r=e[e.length-1];return o.hasProperty.call(void 0,t[t.length-2],r)}function c(e){return new(0,i.Struct)({...e,type:`optional ${e.type}`,validator:(t,r)=>!a(r)||e.validator(t,r),refiner:(t,r)=>!a(r)||e.refiner(t,r)})}var u=i.union.call(void 0,[i.literal.call(void 0,null),i.boolean.call(void 0),i.define.call(void 0,"finite number",(e=>i.is.call(void 0,e,i.number.call(void 0))&&Number.isFinite(e))),i.string.call(void 0),i.array.call(void 0,i.lazy.call(void 0,(()=>u))),i.record.call(void 0,i.string.call(void 0),i.lazy.call(void 0,(()=>u)))]),l=i.coerce.call(void 0,u,i.any.call(void 0),(e=>(n.assertStruct.call(void 0,e,u),JSON.parse(JSON.stringify(e,((e,t)=>{if("__proto__"!==e&&"constructor"!==e)return t}))))));function f(e){return i.create.call(void 0,e,l)}var h=i.literal.call(void 0,"2.0"),p=i.nullable.call(void 0,i.union.call(void 0,[i.number.call(void 0),i.string.call(void 0)])),d=s({code:i.integer.call(void 0),message:i.string.call(void 0),data:c(l),stack:c(i.string.call(void 0))}),g=i.union.call(void 0,[i.record.call(void 0,i.string.call(void 0),l),i.array.call(void 0,l)]),y=s({id:p,jsonrpc:h,method:i.string.call(void 0),params:c(g)}),m=s({jsonrpc:h,method:i.string.call(void 0),params:c(g)}),b=i.object.call(void 0,{id:p,jsonrpc:h,result:i.optional.call(void 0,i.unknown.call(void 0)),error:i.optional.call(void 0,d)}),v=s({id:p,jsonrpc:h,result:l}),w=s({id:p,jsonrpc:h,error:d}),E=i.union.call(void 0,[v,w]);t.object=s,t.exactOptional=c,t.UnsafeJsonStruct=u,t.JsonStruct=l,t.isValidJson=function(e){try{return f(e),!0}catch(e){return!1}},t.getSafeJson=f,t.getJsonSize=function(e){n.assertStruct.call(void 0,e,l,"Invalid JSON value");const t=JSON.stringify(e);return(new TextEncoder).encode(t).byteLength},t.jsonrpc2="2.0",t.JsonRpcVersionStruct=h,t.JsonRpcIdStruct=p,t.JsonRpcErrorStruct=d,t.JsonRpcParamsStruct=g,t.JsonRpcRequestStruct=y,t.JsonRpcNotificationStruct=m,t.isJsonRpcNotification=function(e){return i.is.call(void 0,e,m)},t.assertIsJsonRpcNotification=function(e,t){n.assertStruct.call(void 0,e,m,"Invalid JSON-RPC notification",t)},t.isJsonRpcRequest=function(e){return i.is.call(void 0,e,y)},t.assertIsJsonRpcRequest=function(e,t){n.assertStruct.call(void 0,e,y,"Invalid JSON-RPC request",t)},t.PendingJsonRpcResponseStruct=b,t.JsonRpcSuccessStruct=v,t.JsonRpcFailureStruct=w,t.JsonRpcResponseStruct=E,t.isPendingJsonRpcResponse=function(e){return i.is.call(void 0,e,b)},t.assertIsPendingJsonRpcResponse=function(e,t){n.assertStruct.call(void 0,e,b,"Invalid pending JSON-RPC response",t)},t.isJsonRpcResponse=function(e){return i.is.call(void 0,e,E)},t.assertIsJsonRpcResponse=function(e,t){n.assertStruct.call(void 0,e,E,"Invalid JSON-RPC response",t)},t.isJsonRpcSuccess=function(e){return i.is.call(void 0,e,v)},t.assertIsJsonRpcSuccess=function(e,t){n.assertStruct.call(void 0,e,v,"Invalid JSON-RPC success response",t)},t.isJsonRpcFailure=function(e){return i.is.call(void 0,e,w)},t.assertIsJsonRpcFailure=function(e,t){n.assertStruct.call(void 0,e,w,"Invalid JSON-RPC failure response",t)},t.isJsonRpcError=function(e){return i.is.call(void 0,e,d)},t.assertIsJsonRpcError=function(e,t){n.assertStruct.call(void 0,e,d,"Invalid JSON-RPC error",t)},t.getJsonRpcIdValidator=function(e){const{permitEmptyString:t,permitFractions:r,permitNull:n}={permitEmptyString:!0,permitFractions:!1,permitNull:!0,...e};return e=>Boolean("number"==typeof e&&(r||Number.isInteger(e))||"string"==typeof e&&(t||e.length>0)||n&&null===e)}},5363:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(932),o=r(2955),i=r(2150),s=r(3203),a=function(){const e=[];return()=>{if(0===e.length)for(let t=0;t<256;t++)e.push(t.toString(16).padStart(2,"0"));return e}}();function c(e){return e instanceof Uint8Array}function u(e){n.assert.call(void 0,c(e),"Value must be a Uint8Array.")}function l(e){if(u(e),0===e.length)return"0x";const t=a(),r=new Array(e.length);for(let n=0;nr.call(t,...e))),t=void 0)}return r}([e,"optionalAccess",e=>e.toLowerCase,"optionalCall",e=>e()]))return new Uint8Array;S(e);const t=T(e).toLowerCase(),r=t.length%2==0?t:`0${t}`,n=new Uint8Array(r.length/2);for(let e=0;e=BigInt(0),"Value must be a non-negative bigint."),h(e.toString(16))}function d(e){return n.assert.call(void 0,"number"==typeof e,"Value must be a number."),n.assert.call(void 0,e>=0,"Value must be a non-negative number."),n.assert.call(void 0,Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToBytes` instead."),h(e.toString(16))}function g(e){return n.assert.call(void 0,"string"==typeof e,"Value must be a string."),(new TextEncoder).encode(e)}function y(e){if("bigint"==typeof e)return p(e);if("number"==typeof e)return d(e);if("string"==typeof e)return e.startsWith("0x")?h(e):g(e);if(c(e))return e;throw new TypeError(`Unsupported value type: "${typeof e}".`)}var m=i.pattern.call(void 0,i.string.call(void 0),/^(?:0x)?[0-9a-f]+$/iu),b=i.pattern.call(void 0,i.string.call(void 0),/^0x[0-9a-f]+$/iu),v=i.pattern.call(void 0,i.string.call(void 0),/^0x[0-9a-f]{40}$/u),w=i.pattern.call(void 0,i.string.call(void 0),/^0x[0-9a-fA-F]{40}$/u);function E(e){return i.is.call(void 0,e,m)}function x(e){return i.is.call(void 0,e,b)}function S(e){n.assert.call(void 0,E(e),"Value must be a hexadecimal string.")}function A(e){n.assert.call(void 0,i.is.call(void 0,e,w),"Invalid hex address.");const t=T(e.toLowerCase()),r=T(l(o.keccak_256.call(void 0,t)));return`0x${t.split("").map(((e,t)=>{const o=r[t];return n.assert.call(void 0,i.is.call(void 0,o,i.string.call(void 0)),"Hash shorter than address."),parseInt(o,16)>7?e.toUpperCase():e})).join("")}`}function I(e){return!!i.is.call(void 0,e,w)&&A(e)===e}function B(e){return e.startsWith("0x")?e:e.startsWith("0X")?`0x${e.substring(2)}`:`0x${e}`}function T(e){return e.startsWith("0x")||e.startsWith("0X")?e.substring(2):e}t.HexStruct=m,t.StrictHexStruct=b,t.HexAddressStruct=v,t.HexChecksumAddressStruct=w,t.isHexString=E,t.isStrictHexString=x,t.assertIsHexString=S,t.assertIsStrictHexString=function(e){n.assert.call(void 0,x(e),'Value must be a hexadecimal string, starting with "0x".')},t.isValidHexAddress=function(e){return i.is.call(void 0,e,v)||I(e)},t.getChecksumAddress=A,t.isValidChecksumAddress=I,t.add0x=B,t.remove0x=T,t.isBytes=c,t.assertIsBytes=u,t.bytesToHex=l,t.bytesToBigInt=f,t.bytesToSignedBigInt=function(e){u(e);let t=BigInt(0);for(const r of e)t=(t<0,"Byte length must be greater than 0."),n.assert.call(void 0,function(e,t){n.assert.call(void 0,t>0);const r=e>>BigInt(31);return!((~e&r)+(e&~r)>>BigInt(8*t-1))}(e,t),"Byte length is too small to represent the given value.");let r=e;const o=new Uint8Array(t);for(let e=0;e>=BigInt(8);return o.reverse()},t.numberToBytes=d,t.stringToBytes=g,t.base64ToBytes=function(e){return n.assert.call(void 0,"string"==typeof e,"Value must be a string."),s.base64.decode(e)},t.valueToBytes=y,t.concatBytes=function(e){const t=new Array(e.length);let r=0;for(let n=0;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=(e=>(e[e.Null=4]="Null",e[e.Comma=1]="Comma",e[e.Wrapper=1]="Wrapper",e[e.True=4]="True",e[e.False=5]="False",e[e.Quote=1]="Quote",e[e.Colon=1]="Colon",e[e.Date=24]="Date",e))(r||{}),n=/"|\\|\n|\r|\t/gu;function o(e){return e.charCodeAt(0)<=127}t.isNonEmptyArray=function(e){return Array.isArray(e)&&e.length>0},t.isNullOrUndefined=function(e){return null==e},t.isObject=function(e){return Boolean(e)&&"object"==typeof e&&!Array.isArray(e)},t.hasProperty=(e,t)=>Object.hasOwnProperty.call(e,t),t.getKnownPropertyNames=function(e){return Object.getOwnPropertyNames(e)},t.JsonSize=r,t.ESCAPE_CHARACTERS_REGEXP=n,t.isPlainObject=function(e){if("object"!=typeof e||null===e)return!1;try{let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}catch(e){return!1}},t.isASCII=o,t.calculateStringSize=function(e){return e.split("").reduce(((e,t)=>o(t)?e+1:e+2),0)+(t=e.match(n),()=>[],null!=t?t:[]).length;var t},t.calculateNumberSize=function(e){return e.toString().length}},1305:()=>{},2298:(e,t,r)=>{"use strict";function n(e){let t,r=e[0],n=1;for(;nr.call(t,...e))),t=void 0)}return r}Object.defineProperty(t,"__esModule",{value:!0});var o=r(2150),i=/^(?[-a-z0-9]{3,8}):(?[-_a-zA-Z0-9]{1,32})$/u,s=/^[-a-z0-9]{3,8}$/u,a=/^[-_a-zA-Z0-9]{1,32}$/u,c=/^(?(?[-a-z0-9]{3,8}):(?[-_a-zA-Z0-9]{1,32})):(?[-.%a-zA-Z0-9]{1,128})$/u,u=/^[-.%a-zA-Z0-9]{1,128}$/u,l=o.pattern.call(void 0,o.string.call(void 0),i),f=o.pattern.call(void 0,o.string.call(void 0),s),h=o.pattern.call(void 0,o.string.call(void 0),a),p=o.pattern.call(void 0,o.string.call(void 0),c),d=o.pattern.call(void 0,o.string.call(void 0),u);t.CAIP_CHAIN_ID_REGEX=i,t.CAIP_NAMESPACE_REGEX=s,t.CAIP_REFERENCE_REGEX=a,t.CAIP_ACCOUNT_ID_REGEX=c,t.CAIP_ACCOUNT_ADDRESS_REGEX=u,t.CaipChainIdStruct=l,t.CaipNamespaceStruct=f,t.CaipReferenceStruct=h,t.CaipAccountIdStruct=p,t.CaipAccountAddressStruct=d,t.isCaipChainId=function(e){return o.is.call(void 0,e,l)},t.isCaipNamespace=function(e){return o.is.call(void 0,e,f)},t.isCaipReference=function(e){return o.is.call(void 0,e,h)},t.isCaipAccountId=function(e){return o.is.call(void 0,e,p)},t.isCaipAccountAddress=function(e){return o.is.call(void 0,e,d)},t.parseCaipChainId=function(e){const t=i.exec(e);if(!n([t,"optionalAccess",e=>e.groups]))throw new Error("Invalid CAIP chain ID.");return{namespace:t.groups.namespace,reference:t.groups.reference}},t.parseCaipAccountId=function(e){const t=c.exec(e);if(!n([t,"optionalAccess",e=>e.groups]))throw new Error("Invalid CAIP account ID.");return{address:t.groups.accountAddress,chainId:t.groups.chainId,chain:{namespace:t.groups.namespace,reference:t.groups.reference}}}},3207:()=>{},1535:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(5363),o=r(932);t.numberToHex=e=>(o.assert.call(void 0,"number"==typeof e,"Value must be a number."),o.assert.call(void 0,e>=0,"Value must be a non-negative number."),o.assert.call(void 0,Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToHex` instead."),n.add0x.call(void 0,e.toString(16))),t.bigIntToHex=e=>(o.assert.call(void 0,"bigint"==typeof e,"Value must be a bigint."),o.assert.call(void 0,e>=0,"Value must be a non-negative bigint."),n.add0x.call(void 0,e.toString(16))),t.hexToNumber=e=>{n.assertIsHexString.call(void 0,e);const t=parseInt(e,16);return o.assert.call(void 0,Number.isSafeInteger(t),"Value is not a safe integer. Use `hexToBigInt` instead."),t},t.hexToBigInt=e=>(n.assertIsHexString.call(void 0,e),BigInt(n.add0x.call(void 0,e)))},1584:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o,i=r(5244),s=class{constructor(e){i.__privateAdd.call(void 0,this,n,void 0),i.__privateSet.call(void 0,this,n,new Map(e)),Object.freeze(this)}get size(){return i.__privateGet.call(void 0,this,n).size}[Symbol.iterator](){return i.__privateGet.call(void 0,this,n)[Symbol.iterator]()}entries(){return i.__privateGet.call(void 0,this,n).entries()}forEach(e,t){return i.__privateGet.call(void 0,this,n).forEach(((r,n,o)=>e.call(t,r,n,this)))}get(e){return i.__privateGet.call(void 0,this,n).get(e)}has(e){return i.__privateGet.call(void 0,this,n).has(e)}keys(){return i.__privateGet.call(void 0,this,n).keys()}values(){return i.__privateGet.call(void 0,this,n).values()}toString(){return`FrozenMap(${this.size}) {${this.size>0?` ${[...this.entries()].map((([e,t])=>`${String(e)} => ${String(t)}`)).join(", ")} `:""}}`}};n=new WeakMap;var a=class{constructor(e){i.__privateAdd.call(void 0,this,o,void 0),i.__privateSet.call(void 0,this,o,new Set(e)),Object.freeze(this)}get size(){return i.__privateGet.call(void 0,this,o).size}[Symbol.iterator](){return i.__privateGet.call(void 0,this,o)[Symbol.iterator]()}entries(){return i.__privateGet.call(void 0,this,o).entries()}forEach(e,t){return i.__privateGet.call(void 0,this,o).forEach(((r,n,o)=>e.call(t,r,n,this)))}has(e){return i.__privateGet.call(void 0,this,o).has(e)}keys(){return i.__privateGet.call(void 0,this,o).keys()}values(){return i.__privateGet.call(void 0,this,o).values()}toString(){return`FrozenSet(${this.size}) {${this.size>0?` ${[...this.values()].map((e=>String(e))).join(", ")} `:""}}`}};o=new WeakMap,Object.freeze(s),Object.freeze(s.prototype),Object.freeze(a),Object.freeze(a.prototype),t.FrozenMap=s,t.FrozenSet=a},2049:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(7982);var n=r(1535);r(8383);var o=r(5680),i=r(9116);r(3207);var s=r(3631),a=r(7427);r(1305);var c=r(1275),u=r(2298),l=r(1508),f=r(1848),h=r(1203),p=r(5363),d=r(932),g=r(1486),y=r(6526),m=r(1584);r(5244),r(1423),t.AssertionError=d.AssertionError,t.CAIP_ACCOUNT_ADDRESS_REGEX=u.CAIP_ACCOUNT_ADDRESS_REGEX,t.CAIP_ACCOUNT_ID_REGEX=u.CAIP_ACCOUNT_ID_REGEX,t.CAIP_CHAIN_ID_REGEX=u.CAIP_CHAIN_ID_REGEX,t.CAIP_NAMESPACE_REGEX=u.CAIP_NAMESPACE_REGEX,t.CAIP_REFERENCE_REGEX=u.CAIP_REFERENCE_REGEX,t.CaipAccountAddressStruct=u.CaipAccountAddressStruct,t.CaipAccountIdStruct=u.CaipAccountIdStruct,t.CaipChainIdStruct=u.CaipChainIdStruct,t.CaipNamespaceStruct=u.CaipNamespaceStruct,t.CaipReferenceStruct=u.CaipReferenceStruct,t.ChecksumStruct=l.ChecksumStruct,t.Duration=i.Duration,t.ESCAPE_CHARACTERS_REGEXP=y.ESCAPE_CHARACTERS_REGEXP,t.FrozenMap=m.FrozenMap,t.FrozenSet=m.FrozenSet,t.HexAddressStruct=p.HexAddressStruct,t.HexChecksumAddressStruct=p.HexChecksumAddressStruct,t.HexStruct=p.HexStruct,t.JsonRpcErrorStruct=a.JsonRpcErrorStruct,t.JsonRpcFailureStruct=a.JsonRpcFailureStruct,t.JsonRpcIdStruct=a.JsonRpcIdStruct,t.JsonRpcNotificationStruct=a.JsonRpcNotificationStruct,t.JsonRpcParamsStruct=a.JsonRpcParamsStruct,t.JsonRpcRequestStruct=a.JsonRpcRequestStruct,t.JsonRpcResponseStruct=a.JsonRpcResponseStruct,t.JsonRpcSuccessStruct=a.JsonRpcSuccessStruct,t.JsonRpcVersionStruct=a.JsonRpcVersionStruct,t.JsonSize=y.JsonSize,t.JsonStruct=a.JsonStruct,t.PendingJsonRpcResponseStruct=a.PendingJsonRpcResponseStruct,t.StrictHexStruct=p.StrictHexStruct,t.UnsafeJsonStruct=a.UnsafeJsonStruct,t.VersionRangeStruct=s.VersionRangeStruct,t.VersionStruct=s.VersionStruct,t.add0x=p.add0x,t.assert=d.assert,t.assertExhaustive=d.assertExhaustive,t.assertIsBytes=p.assertIsBytes,t.assertIsHexString=p.assertIsHexString,t.assertIsJsonRpcError=a.assertIsJsonRpcError,t.assertIsJsonRpcFailure=a.assertIsJsonRpcFailure,t.assertIsJsonRpcNotification=a.assertIsJsonRpcNotification,t.assertIsJsonRpcRequest=a.assertIsJsonRpcRequest,t.assertIsJsonRpcResponse=a.assertIsJsonRpcResponse,t.assertIsJsonRpcSuccess=a.assertIsJsonRpcSuccess,t.assertIsPendingJsonRpcResponse=a.assertIsPendingJsonRpcResponse,t.assertIsSemVerRange=s.assertIsSemVerRange,t.assertIsSemVerVersion=s.assertIsSemVerVersion,t.assertIsStrictHexString=p.assertIsStrictHexString,t.assertStruct=d.assertStruct,t.base64=f.base64,t.base64ToBytes=p.base64ToBytes,t.bigIntToBytes=p.bigIntToBytes,t.bigIntToHex=n.bigIntToHex,t.bytesToBase64=p.bytesToBase64,t.bytesToBigInt=p.bytesToBigInt,t.bytesToHex=p.bytesToHex,t.bytesToNumber=p.bytesToNumber,t.bytesToSignedBigInt=p.bytesToSignedBigInt,t.bytesToString=p.bytesToString,t.calculateNumberSize=y.calculateNumberSize,t.calculateStringSize=y.calculateStringSize,t.concatBytes=p.concatBytes,t.createBigInt=h.createBigInt,t.createBytes=h.createBytes,t.createDataView=p.createDataView,t.createDeferredPromise=o.createDeferredPromise,t.createHex=h.createHex,t.createModuleLogger=c.createModuleLogger,t.createNumber=h.createNumber,t.createProjectLogger=c.createProjectLogger,t.exactOptional=a.exactOptional,t.getChecksumAddress=p.getChecksumAddress,t.getErrorMessage=g.getErrorMessage,t.getJsonRpcIdValidator=a.getJsonRpcIdValidator,t.getJsonSize=a.getJsonSize,t.getKnownPropertyNames=y.getKnownPropertyNames,t.getSafeJson=a.getSafeJson,t.gtRange=s.gtRange,t.gtVersion=s.gtVersion,t.hasProperty=y.hasProperty,t.hexToBigInt=n.hexToBigInt,t.hexToBytes=p.hexToBytes,t.hexToNumber=n.hexToNumber,t.inMilliseconds=i.inMilliseconds,t.isASCII=y.isASCII,t.isBytes=p.isBytes,t.isCaipAccountAddress=u.isCaipAccountAddress,t.isCaipAccountId=u.isCaipAccountId,t.isCaipChainId=u.isCaipChainId,t.isCaipNamespace=u.isCaipNamespace,t.isCaipReference=u.isCaipReference,t.isErrorWithCode=g.isErrorWithCode,t.isErrorWithMessage=g.isErrorWithMessage,t.isErrorWithStack=g.isErrorWithStack,t.isHexString=p.isHexString,t.isJsonRpcError=a.isJsonRpcError,t.isJsonRpcFailure=a.isJsonRpcFailure,t.isJsonRpcNotification=a.isJsonRpcNotification,t.isJsonRpcRequest=a.isJsonRpcRequest,t.isJsonRpcResponse=a.isJsonRpcResponse,t.isJsonRpcSuccess=a.isJsonRpcSuccess,t.isNonEmptyArray=y.isNonEmptyArray,t.isNullOrUndefined=y.isNullOrUndefined,t.isObject=y.isObject,t.isPendingJsonRpcResponse=a.isPendingJsonRpcResponse,t.isPlainObject=y.isPlainObject,t.isStrictHexString=p.isStrictHexString,t.isValidChecksumAddress=p.isValidChecksumAddress,t.isValidHexAddress=p.isValidHexAddress,t.isValidJson=a.isValidJson,t.isValidSemVerRange=s.isValidSemVerRange,t.isValidSemVerVersion=s.isValidSemVerVersion,t.jsonrpc2=a.jsonrpc2,t.numberToBytes=p.numberToBytes,t.numberToHex=n.numberToHex,t.object=a.object,t.parseCaipAccountId=u.parseCaipAccountId,t.parseCaipChainId=u.parseCaipChainId,t.remove0x=p.remove0x,t.satisfiesVersionRange=s.satisfiesVersionRange,t.signedBigIntToBytes=p.signedBigIntToBytes,t.stringToBytes=p.stringToBytes,t.timeSince=i.timeSince,t.valueToBytes=p.valueToBytes,t.wrapError=g.wrapError},7557:(e,t)=>{"use strict";function r(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}function n(e){if("boolean"!=typeof e)throw new Error(`Expected boolean, not ${e}`)}function o(e,...t){if(!((r=e)instanceof Uint8Array||null!=r&&"object"==typeof r&&"Uint8Array"===r.constructor.name))throw new Error("Expected Uint8Array");var r;if(t.length>0&&!t.includes(e.length))throw new Error(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}function i(e){if("function"!=typeof e||"function"!=typeof e.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");r(e.outputLen),r(e.blockLen)}function s(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function a(e,t){o(e);const r=t.outputLen;if(e.length{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SHA2=void 0;const n=r(7557),o=r(9175);class i extends o.Hash{constructor(e,t,r,n){super(),this.blockLen=e,this.outputLen=t,this.padOffset=r,this.isLE=n,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=(0,o.createView)(this.buffer)}update(e){(0,n.exists)(this);const{view:t,buffer:r,blockLen:i}=this,s=(e=(0,o.toBytes)(e)).length;for(let n=0;ni-a&&(this.process(r,0),a=0);for(let e=a;e>o&i),a=Number(r&i),c=n?4:0,u=n?0:4;e.setUint32(t+c,s,n),e.setUint32(t+u,a,n)}(r,i-8,BigInt(8*this.length),s),this.process(r,0);const c=(0,o.createView)(e),u=this.outputLen;if(u%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const l=u/4,f=this.get();if(l>f.length)throw new Error("_sha2: outputLen bigger than state");for(let e=0;e{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.add5L=t.add5H=t.add4H=t.add4L=t.add3H=t.add3L=t.add=t.rotlBL=t.rotlBH=t.rotlSL=t.rotlSH=t.rotr32L=t.rotr32H=t.rotrBL=t.rotrBH=t.rotrSL=t.rotrSH=t.shrSL=t.shrSH=t.toBig=t.split=t.fromBig=void 0;const r=BigInt(2**32-1),n=BigInt(32);function o(e,t=!1){return t?{h:Number(e&r),l:Number(e>>n&r)}:{h:0|Number(e>>n&r),l:0|Number(e&r)}}function i(e,t=!1){let r=new Uint32Array(e.length),n=new Uint32Array(e.length);for(let i=0;iBigInt(e>>>0)<>>0);t.toBig=s;const a=(e,t,r)=>e>>>r;t.shrSH=a;const c=(e,t,r)=>e<<32-r|t>>>r;t.shrSL=c;const u=(e,t,r)=>e>>>r|t<<32-r;t.rotrSH=u;const l=(e,t,r)=>e<<32-r|t>>>r;t.rotrSL=l;const f=(e,t,r)=>e<<64-r|t>>>r-32;t.rotrBH=f;const h=(e,t,r)=>e>>>r-32|t<<64-r;t.rotrBL=h;const p=(e,t)=>t;t.rotr32H=p;const d=(e,t)=>e;t.rotr32L=d;const g=(e,t,r)=>e<>>32-r;t.rotlSH=g;const y=(e,t,r)=>t<>>32-r;t.rotlSL=y;const m=(e,t,r)=>t<>>64-r;t.rotlBH=m;const b=(e,t,r)=>e<>>64-r;function v(e,t,r,n){const o=(t>>>0)+(n>>>0);return{h:e+r+(o/2**32|0)|0,l:0|o}}t.rotlBL=b,t.add=v;const w=(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0);t.add3L=w;const E=(e,t,r,n)=>t+r+n+(e/2**32|0)|0;t.add3H=E;const x=(e,t,r,n)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0);t.add4L=x;const S=(e,t,r,n,o)=>t+r+n+o+(e/2**32|0)|0;t.add4H=S;const A=(e,t,r,n,o)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0)+(o>>>0);t.add5L=A;const I=(e,t,r,n,o,i)=>t+r+n+o+i+(e/2**32|0)|0;t.add5H=I;const B={fromBig:o,split:i,toBig:s,shrSH:a,shrSL:c,rotrSH:u,rotrSL:l,rotrBH:f,rotrBL:h,rotr32H:p,rotr32L:d,rotlSH:g,rotlSL:y,rotlBH:m,rotlBL:b,add:v,add3L:w,add3H:E,add4L:x,add4H:S,add5H:I,add5L:A};t.default=B},5145:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.crypto=void 0,t.crypto="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0},9615:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hmac=t.HMAC=void 0;const n=r(7557),o=r(9175);class i extends o.Hash{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,(0,n.hash)(e);const r=(0,o.toBytes)(t);if(this.iHash=e.create(),"function"!=typeof this.iHash.update)throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const i=this.blockLen,s=new Uint8Array(i);s.set(r.length>i?e.create().update(r).digest():r);for(let e=0;enew i(e,t).update(r).digest(),t.hmac.create=(e,t)=>new i(e,t)},2623:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sha224=t.sha256=void 0;const n=r(915),o=r(9175),i=(e,t,r)=>e&t^e&r^t&r,s=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),a=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),c=new Uint32Array(64);class u extends n.SHA2{constructor(){super(64,32,8,!1),this.A=0|a[0],this.B=0|a[1],this.C=0|a[2],this.D=0|a[3],this.E=0|a[4],this.F=0|a[5],this.G=0|a[6],this.H=0|a[7]}get(){const{A:e,B:t,C:r,D:n,E:o,F:i,G:s,H:a}=this;return[e,t,r,n,o,i,s,a]}set(e,t,r,n,o,i,s,a){this.A=0|e,this.B=0|t,this.C=0|r,this.D=0|n,this.E=0|o,this.F=0|i,this.G=0|s,this.H=0|a}process(e,t){for(let r=0;r<16;r++,t+=4)c[r]=e.getUint32(t,!1);for(let e=16;e<64;e++){const t=c[e-15],r=c[e-2],n=(0,o.rotr)(t,7)^(0,o.rotr)(t,18)^t>>>3,i=(0,o.rotr)(r,17)^(0,o.rotr)(r,19)^r>>>10;c[e]=i+c[e-7]+n+c[e-16]|0}let{A:r,B:n,C:a,D:u,E:l,F:f,G:h,H:p}=this;for(let e=0;e<64;e++){const t=p+((0,o.rotr)(l,6)^(0,o.rotr)(l,11)^(0,o.rotr)(l,25))+((d=l)&f^~d&h)+s[e]+c[e]|0,g=((0,o.rotr)(r,2)^(0,o.rotr)(r,13)^(0,o.rotr)(r,22))+i(r,n,a)|0;p=h,h=f,f=l,l=u+t|0,u=a,a=n,n=r,r=t+g|0}var d;r=r+this.A|0,n=n+this.B|0,a=a+this.C|0,u=u+this.D|0,l=l+this.E|0,f=f+this.F|0,h=h+this.G|0,p=p+this.H|0,this.set(r,n,a,u,l,f,h,p)}roundClean(){c.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}class l extends u{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}}t.sha256=(0,o.wrapConstructor)((()=>new u)),t.sha224=(0,o.wrapConstructor)((()=>new l))},2955:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.shake256=t.shake128=t.keccak_512=t.keccak_384=t.keccak_256=t.keccak_224=t.sha3_512=t.sha3_384=t.sha3_256=t.sha3_224=t.Keccak=t.keccakP=void 0;const n=r(7557),o=r(2318),i=r(9175),[s,a,c]=[[],[],[]],u=BigInt(0),l=BigInt(1),f=BigInt(2),h=BigInt(7),p=BigInt(256),d=BigInt(113);for(let e=0,t=l,r=1,n=0;e<24;e++){[r,n]=[n,(2*r+3*n)%5],s.push(2*(5*n+r)),a.push((e+1)*(e+2)/2%64);let o=u;for(let e=0;e<7;e++)t=(t<>h)*d)%p,t&f&&(o^=l<<(l<r>32?(0,o.rotlBH)(e,t,r):(0,o.rotlSH)(e,t,r),b=(e,t,r)=>r>32?(0,o.rotlBL)(e,t,r):(0,o.rotlSL)(e,t,r);function v(e,t=24){const r=new Uint32Array(10);for(let n=24-t;n<24;n++){for(let t=0;t<10;t++)r[t]=e[t]^e[t+10]^e[t+20]^e[t+30]^e[t+40];for(let t=0;t<10;t+=2){const n=(t+8)%10,o=(t+2)%10,i=r[o],s=r[o+1],a=m(i,s,1)^r[n],c=b(i,s,1)^r[n+1];for(let r=0;r<50;r+=10)e[t+r]^=a,e[t+r+1]^=c}let t=e[2],o=e[3];for(let r=0;r<24;r++){const n=a[r],i=m(t,o,n),c=b(t,o,n),u=s[r];t=e[u],o=e[u+1],e[u]=i,e[u+1]=c}for(let t=0;t<50;t+=10){for(let n=0;n<10;n++)r[n]=e[t+n];for(let n=0;n<10;n++)e[t+n]^=~r[(n+2)%10]&r[(n+4)%10]}e[0]^=g[n],e[1]^=y[n]}r.fill(0)}t.keccakP=v;class w extends i.Hash{constructor(e,t,r,o=!1,s=24){if(super(),this.blockLen=e,this.suffix=t,this.outputLen=r,this.enableXOF=o,this.rounds=s,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,(0,n.number)(r),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=(0,i.u32)(this.state)}keccak(){v(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){(0,n.exists)(this);const{blockLen:t,state:r}=this,o=(e=(0,i.toBytes)(e)).length;for(let n=0;n=r&&this.keccak();const i=Math.min(r-this.posOut,o-n);e.set(t.subarray(this.posOut,this.posOut+i),n),this.posOut+=i,n+=i}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return(0,n.number)(e),this.xofInto(new Uint8Array(e))}digestInto(e){if((0,n.output)(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){const{blockLen:t,suffix:r,outputLen:n,rounds:o,enableXOF:i}=this;return e||(e=new w(t,r,n,i,o)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=o,e.suffix=r,e.outputLen=n,e.enableXOF=i,e.destroyed=this.destroyed,e}}t.Keccak=w;const E=(e,t,r)=>(0,i.wrapConstructor)((()=>new w(t,e,r)));t.sha3_224=E(6,144,28),t.sha3_256=E(6,136,32),t.sha3_384=E(6,104,48),t.sha3_512=E(6,72,64),t.keccak_224=E(1,144,28),t.keccak_256=E(1,136,32),t.keccak_384=E(1,104,48),t.keccak_512=E(1,72,64);const x=(e,t,r)=>(0,i.wrapXOFConstructorWithOpts)(((n={})=>new w(t,e,void 0===n.dkLen?r:n.dkLen,!0)));t.shake128=x(31,168,16),t.shake256=x(31,136,32)},9175:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.randomBytes=t.wrapXOFConstructorWithOpts=t.wrapConstructorWithOpts=t.wrapConstructor=t.checkOpts=t.Hash=t.concatBytes=t.toBytes=t.utf8ToBytes=t.asyncLoop=t.nextTick=t.hexToBytes=t.bytesToHex=t.isLE=t.rotr=t.createView=t.u32=t.u8=void 0;const n=r(5145);function o(e){return e instanceof Uint8Array||null!=e&&"object"==typeof e&&"Uint8Array"===e.constructor.name}if(t.u8=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),t.u32=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4)),t.createView=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),t.rotr=(e,t)=>e<<32-t|e>>>t,t.isLE=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],!t.isLE)throw new Error("Non little-endian hardware is not supported");const i=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));t.bytesToHex=function(e){if(!o(e))throw new Error("Uint8Array expected");let t="";for(let r=0;r=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:void 0}function a(e){if("string"!=typeof e)throw new Error("utf8ToBytes expected string, got "+typeof e);return new Uint8Array((new TextEncoder).encode(e))}function c(e){if("string"==typeof e&&(e=a(e)),!o(e))throw new Error("expected Uint8Array, got "+typeof e);return e}t.hexToBytes=function(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);const t=e.length,r=t/2;if(t%2)throw new Error("padded hex string expected, got unpadded hex of length "+t);const n=new Uint8Array(r);for(let t=0,o=0;t{},t.asyncLoop=async function(e,r,n){let o=Date.now();for(let i=0;i=0&&ee().update(c(t)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t},t.wrapConstructorWithOpts=function(e){const t=(t,r)=>e(r).update(c(t)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=t=>e(t),t},t.wrapXOFConstructorWithOpts=function(e){const t=(t,r)=>e(r).update(c(t)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=t=>e(t),t},t.randomBytes=function(e=32){if(n.crypto&&"function"==typeof n.crypto.getRandomValues)return n.crypto.getRandomValues(new Uint8Array(e));throw new Error("crypto.getRandomValues must be defined")}},3203:(e,t)=>{"use strict";function r(e){if(!Number.isSafeInteger(e))throw new Error(`Wrong integer: ${e}`)}function n(e){return e instanceof Uint8Array||null!=e&&"object"==typeof e&&"Uint8Array"===e.constructor.name}function o(...e){const t=e=>e,r=(e,t)=>r=>e(t(r));return{encode:e.map((e=>e.encode)).reduceRight(r,t),decode:e.map((e=>e.decode)).reduce(r,t)}}function i(e){return{encode:t=>{if(!Array.isArray(t)||t.length&&"number"!=typeof t[0])throw new Error("alphabet.encode input should be an array of numbers");return t.map((t=>{if(r(t),t<0||t>=e.length)throw new Error(`Digit index outside alphabet: ${t} (alphabet: ${e.length})`);return e[t]}))},decode:t=>{if(!Array.isArray(t)||t.length&&"string"!=typeof t[0])throw new Error("alphabet.decode input should be array of strings");return t.map((t=>{if("string"!=typeof t)throw new Error(`alphabet.decode: not string element=${t}`);const r=e.indexOf(t);if(-1===r)throw new Error(`Unknown letter: "${t}". Allowed: ${e}`);return r}))}}}function s(e=""){if("string"!=typeof e)throw new Error("join separator should be string");return{encode:t=>{if(!Array.isArray(t)||t.length&&"string"!=typeof t[0])throw new Error("join.encode input should be array of strings");for(let e of t)if("string"!=typeof e)throw new Error(`join.encode: non-string input=${e}`);return t.join(e)},decode:t=>{if("string"!=typeof t)throw new Error("join.decode input should be string");return t.split(e)}}}function a(e,t="="){if(r(e),"string"!=typeof t)throw new Error("padding chr should be string");return{encode(r){if(!Array.isArray(r)||r.length&&"string"!=typeof r[0])throw new Error("padding.encode input should be array of strings");for(let e of r)if("string"!=typeof e)throw new Error(`padding.encode: non-string input=${e}`);for(;r.length*e%8;)r.push(t);return r},decode(r){if(!Array.isArray(r)||r.length&&"string"!=typeof r[0])throw new Error("padding.encode input should be array of strings");for(let e of r)if("string"!=typeof e)throw new Error(`padding.decode: non-string input=${e}`);let n=r.length;if(n*e%8)throw new Error("Invalid padding: string should have whole number of bytes");for(;n>0&&r[n-1]===t;n--)if(!((n-1)*e%8))throw new Error("Invalid padding: string has too much padding");return r.slice(0,n)}}}function c(e){if("function"!=typeof e)throw new Error("normalize fn should be function");return{encode:e=>e,decode:t=>e(t)}}function u(e,t,n){if(t<2)throw new Error(`convertRadix: wrong from=${t}, base cannot be less than 2`);if(n<2)throw new Error(`convertRadix: wrong to=${n}, base cannot be less than 2`);if(!Array.isArray(e))throw new Error("convertRadix: data should be array");if(!e.length)return[];let o=0;const i=[],s=Array.from(e);for(s.forEach((e=>{if(r(e),e<0||e>=t)throw new Error(`Wrong integer: ${e}`)}));;){let e=0,r=!0;for(let i=o;it?l(t,e%t):e,f=(e,t)=>e+(t-l(e,t));function h(e,t,n,o){if(!Array.isArray(e))throw new Error("convertRadix2: data should be array");if(t<=0||t>32)throw new Error(`convertRadix2: wrong from=${t}`);if(n<=0||n>32)throw new Error(`convertRadix2: wrong to=${n}`);if(f(t,n)>32)throw new Error(`convertRadix2: carry overflow from=${t} to=${n} carryBits=${f(t,n)}`);let i=0,s=0;const a=2**n-1,c=[];for(const o of e){if(r(o),o>=2**t)throw new Error(`convertRadix2: invalid data word=${o} from=${t}`);if(i=i<32)throw new Error(`convertRadix2: carry overflow pos=${s} from=${t}`);for(s+=t;s>=n;s-=n)c.push((i>>s-n&a)>>>0);i&=2**s-1}if(i=i<=t)throw new Error("Excess padding");if(!o&&i)throw new Error(`Non-zero padding: ${i}`);return o&&s>0&&c.push(i>>>0),c}function p(e){return r(e),{encode:t=>{if(!n(t))throw new Error("radix.encode input should be Uint8Array");return u(Array.from(t),256,e)},decode:t=>{if(!Array.isArray(t)||t.length&&"number"!=typeof t[0])throw new Error("radix.decode input should be array of numbers");return Uint8Array.from(u(t,e,256))}}}function d(e,t=!1){if(r(e),e<=0||e>32)throw new Error("radix2: bits should be in (0..32]");if(f(8,e)>32||f(e,8)>32)throw new Error("radix2: carry overflow");return{encode:r=>{if(!n(r))throw new Error("radix2.encode input should be Uint8Array");return h(Array.from(r),8,e,!t)},decode:r=>{if(!Array.isArray(r)||r.length&&"number"!=typeof r[0])throw new Error("radix2.decode input should be array of numbers");return Uint8Array.from(h(r,e,8,t))}}}function g(e){if("function"!=typeof e)throw new Error("unsafeWrapper fn should be function");return function(...t){try{return e.apply(null,t)}catch(e){}}}function y(e,t){if(r(e),"function"!=typeof t)throw new Error("checksum fn should be function");return{encode(r){if(!n(r))throw new Error("checksum.encode: input should be Uint8Array");const o=t(r).slice(0,e),i=new Uint8Array(r.length+e);return i.set(r),i.set(o,r.length),i},decode(r){if(!n(r))throw new Error("checksum.decode: input should be Uint8Array");const o=r.slice(0,-e),i=t(o).slice(0,e),s=r.slice(-e);for(let t=0;te.toUpperCase().replace(/O/g,"0").replace(/[IL]/g,"1")))),t.base64=o(d(6),i("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),a(6),s("")),t.base64url=o(d(6),i("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"),a(6),s("")),t.base64urlnopad=o(d(6),i("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"),s(""));const m=e=>o(p(58),i(e),s(""));t.base58=m("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),t.base58flickr=m("123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"),t.base58xrp=m("rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz");const b=[0,2,3,5,6,7,9,10,11];t.base58xmr={encode(e){let r="";for(let n=0;no(y(4,(t=>e(e(t)))),t.base58),t.base58check=t.createBase58check;const v=o(i("qpzry9x8gf2tvdw0s3jn54khce6mua7l"),s("")),w=[996825010,642813549,513874426,1027748829,705979059];function E(e){const t=e>>25;let r=(33554431&e)<<5;for(let e=0;e>e&1)&&(r^=w[e]);return r}function x(e,t,r=1){const n=e.length;let o=1;for(let t=0;t126)throw new Error(`Invalid prefix (${e})`);o=E(o)^r>>5}o=E(o);for(let t=0;tr)throw new TypeError(`Wrong string length: ${e.length} (${e}). Expected (8..${r})`);const n=e.toLowerCase();if(e!==n&&e!==e.toUpperCase())throw new Error("String must be lowercase or uppercase");const o=(e=n).lastIndexOf("1");if(0===o||-1===o)throw new Error('Letter "1" must be present between prefix and data only');const i=e.slice(0,o),s=e.slice(o+1);if(s.length<6)throw new Error("Data must be at least 6 characters long");const a=v.decode(s).slice(0,-6),c=x(i,a,t);if(!s.endsWith(c))throw new Error(`Invalid checksum in ${e}: expected "${c}"`);return{prefix:i,words:a}}return{encode:function(e,r,n=90){if("string"!=typeof e)throw new Error("bech32.encode prefix should be string, not "+typeof e);if(!Array.isArray(r)||r.length&&"number"!=typeof r[0])throw new Error("bech32.encode words should be array of numbers, not "+typeof r);const o=e.length+7+r.length;if(!1!==n&&o>n)throw new TypeError(`Length ${o} exceeds limit ${n}`);const i=e.toLowerCase(),s=x(i,r,t);return`${i}1${v.encode(r)}${s}`},decode:s,decodeToBytes:function(e){const{prefix:t,words:r}=s(e,!1);return{prefix:t,words:r,bytes:n(r)}},decodeUnsafe:g(s),fromWords:n,fromWordsUnsafe:i,toWords:o}}t.bech32=S("bech32"),t.bech32m=S("bech32m"),t.utf8={encode:e=>(new TextDecoder).decode(e),decode:e=>(new TextEncoder).encode(e)},t.hex=o(d(4),i("0123456789abcdef"),s(""),c((e=>{if("string"!=typeof e||e.length%2)throw new TypeError(`hex.decode: expected string, got ${typeof e} with length ${e.length}`);return e.toLowerCase()})));const A={utf8:t.utf8,hex:t.hex,base16:t.base16,base32:t.base32,base64:t.base64,base64url:t.base64url,base58:t.base58,base58xmr:t.base58xmr},I="Invalid encoding type. Available types: utf8, hex, base16, base32, base64, base64url, base58, base58xmr";t.bytesToString=(e,t)=>{if("string"!=typeof e||!A.hasOwnProperty(e))throw new TypeError(I);if(!n(t))throw new TypeError("bytesToString() expects Uint8Array");return A[e].encode(t)},t.str=t.bytesToString,t.stringToBytes=(e,t)=>{if(!A.hasOwnProperty(e))throw new TypeError(I);if("string"!=typeof t)throw new TypeError("stringToBytes() expects string");return A[e].decode(t)},t.bytes=t.stringToBytes},544:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.req=t.json=t.toBuffer=void 0;const s=i(r(5891)),a=i(r(917));async function c(e){let t=0;const r=[];for await(const n of e)t+=n.length,r.push(n);return Buffer.concat(r,t)}t.toBuffer=c,t.json=async function(e){const t=(await c(e)).toString("utf8");try{return JSON.parse(t)}catch(e){const r=e;throw r.message+=` (input: ${t})`,r}},t.req=function(e,t={}){const r=(("string"==typeof e?e:e.href).startsWith("https:")?a:s).request(e,t),n=new Promise(((e,t)=>{r.once("response",e).once("error",t).end()}));return r.then=n.then.bind(n),r}},917:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t},s=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.Agent=void 0;const a=i(r(5891));s(r(544),t);const c=Symbol("AgentBaseInternalState");class u extends a.Agent{constructor(e){super(e),this[c]={}}isSecureEndpoint(e){if(e){if("boolean"==typeof e.secureEndpoint)return e.secureEndpoint;if("string"==typeof e.protocol)return"https:"===e.protocol}const{stack:t}=new Error;return"string"==typeof t&&t.split("\n").some((e=>-1!==e.indexOf("(https.js:")||-1!==e.indexOf("node:https:")))}createSocket(e,t,r){const n={...t,secureEndpoint:this.isSecureEndpoint(t)};Promise.resolve().then((()=>this.connect(e,n))).then((o=>{if(o instanceof a.Agent)return o.addRequest(e,n);this[c].currentSocket=o,super.createSocket(e,t,r)}),r)}createConnection(){const e=this[c].currentSocket;if(this[c].currentSocket=void 0,!e)throw new Error("No socket was returned in the `connect()` function");return e}get defaultPort(){return this[c].defaultPort??("https:"===this.protocol?443:80)}set defaultPort(e){this[c]&&(this[c].defaultPort=e)}get protocol(){return this[c].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(e){this[c]&&(this[c].protocol=e)}}t.Agent=u},7526:(e,t)=>{"use strict";t.byteLength=function(e){var t=c(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,i=c(e),s=i[0],a=i[1],u=new o(function(e,t,r){return 3*(t+r)/4-r}(0,s,a)),l=0,f=a>0?s-4:s;for(r=0;r>16&255,u[l++]=t>>8&255,u[l++]=255&t;return 2===a&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,u[l++]=255&t),1===a&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,u[l++]=t>>8&255,u[l++]=255&t),u},t.fromByteArray=function(e){for(var t,n=e.length,o=n%3,i=[],s=16383,a=0,c=n-o;ac?c:a+s));return 1===o?(t=e[n-1],i.push(r[t>>2]+r[t<<4&63]+"==")):2===o&&(t=(e[n-2]<<8)+e[n-1],i.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),i.join("")};for(var r=[],n=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,a=i.length;s0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function u(e,t,n){for(var o,i,s=[],a=t;a>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return s.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},9213:function(e,t,r){var n;!function(o){"use strict";var i,s=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,a=Math.ceil,c=Math.floor,u="[BigNumber Error] ",l=u+"Number primitive has more than 15 significant digits: ",f=1e14,h=14,p=9007199254740991,d=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],g=1e7,y=1e9;function m(e){var t=0|e;return e>0||e===t?t:t-1}function b(e){for(var t,r,n=1,o=e.length,i=e[0]+"";nu^r?1:-1;for(a=(c=o.length)<(u=i.length)?c:u,s=0;si[s]^r?1:-1;return c==u?0:c>u^r?1:-1}function w(e,t,r,n){if(er||e!==c(e))throw Error(u+(n||"Argument")+("number"==typeof e?er?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function E(e){var t=e.c.length-1;return m(e.e/h)==t&&e.c[t]%2!=0}function x(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function S(e,t,r){var n,o;if(t<0){for(o=r+".";++t;o+=r);e=o+e}else if(++t>(n=e.length)){for(o=r,t-=n;--t;o+=r);e+=o}else tM?m.c=m.e=null:e.e=10;f/=10,u++);return void(u>M?m.c=m.e=null:(m.e=u,m.c=[e]))}y=String(e)}else{if(!s.test(y=String(e)))return o(m,y,d);m.s=45==y.charCodeAt(0)?(y=y.slice(1),-1):1}(u=y.indexOf("."))>-1&&(y=y.replace(".","")),(f=y.search(/e/i))>0?(u<0&&(u=f),u+=+y.slice(f+1),y=y.substring(0,f)):u<0&&(u=y.length)}else{if(w(t,2,H.length,"Base"),10==t)return Y(m=new z(e),O+m.e+1,k);if(y=String(e),d="number"==typeof e){if(0*e!=0)return o(m,y,d,t);if(m.s=1/e<0?(y=y.slice(1),-1):1,z.DEBUG&&y.replace(/^0\.0*|\./,"").length>15)throw Error(l+e)}else m.s=45===y.charCodeAt(0)?(y=y.slice(1),-1):1;for(r=H.slice(0,t),u=f=0,g=y.length;fu){u=g;continue}}else if(!a&&(y==y.toUpperCase()&&(y=y.toLowerCase())||y==y.toLowerCase()&&(y=y.toUpperCase()))){a=!0,f=-1,u=0;continue}return o(m,String(e),d,t)}d=!1,(u=(y=n(y,t,10,m.s)).indexOf("."))>-1?y=y.replace(".",""):u=y.length}for(f=0;48===y.charCodeAt(f);f++);for(g=y.length;48===y.charCodeAt(--g););if(y=y.slice(f,++g)){if(g-=f,d&&z.DEBUG&&g>15&&(e>p||e!==c(e)))throw Error(l+m.s*e);if((u=u-f-1)>M)m.c=m.e=null;else if(u=L)?x(c,s):S(c,s,"0");else if(i=(e=Y(new z(e),t,r)).e,a=(c=b(e.c)).length,1==n||2==n&&(t<=i||i<=N)){for(;aa){if(--t>0)for(c+=".";t--;c+="0");}else if((t+=i-a)>0)for(i+1==a&&(c+=".");t--;c+="0");return e.s<0&&o?"-"+c:c}function V(e,t){for(var r,n=1,o=new z(e[0]);n=10;o/=10,n++);return(r=n+r*h-1)>M?e.c=e.e=null:r=10;u/=10,o++);if((i=t-o)<0)i+=h,s=t,g=(l=y[p=0])/m[o-s-1]%10|0;else if((p=a((i+1)/h))>=y.length){if(!n)break e;for(;y.length<=p;y.push(0));l=g=0,o=1,s=(i%=h)-h+1}else{for(l=u=y[p],o=1;u>=10;u/=10,o++);g=(s=(i%=h)-h+o)<0?0:l/m[o-s-1]%10|0}if(n=n||t<0||null!=y[p+1]||(s<0?l:l%m[o-s-1]),n=r<4?(g||n)&&(0==r||r==(e.s<0?3:2)):g>5||5==g&&(4==r||n||6==r&&(i>0?s>0?l/m[o-s]:0:y[p-1])%10&1||r==(e.s<0?8:7)),t<1||!y[0])return y.length=0,n?(t-=e.e+1,y[0]=m[(h-t%h)%h],e.e=-t||0):y[0]=e.e=0,e;if(0==i?(y.length=p,u=1,p--):(y.length=p+1,u=m[h-i],y[p]=s>0?c(l/m[o-s]%m[s])*u:0),n)for(;;){if(0==p){for(i=1,s=y[0];s>=10;s/=10,i++);for(s=y[0]+=u,u=1;s>=10;s/=10,u++);i!=u&&(e.e++,y[0]==f&&(y[0]=1));break}if(y[p]+=u,y[p]!=f)break;y[p--]=0,u=1}for(i=y.length;0===y[--i];y.pop());}e.e>M?e.c=e.e=null:e.e=L?x(t,r):S(t,r,"0"),e.s<0?"-"+t:t)}return z.clone=e,z.ROUND_UP=0,z.ROUND_DOWN=1,z.ROUND_CEIL=2,z.ROUND_FLOOR=3,z.ROUND_HALF_UP=4,z.ROUND_HALF_DOWN=5,z.ROUND_HALF_EVEN=6,z.ROUND_HALF_CEIL=7,z.ROUND_HALF_FLOOR=8,z.EUCLID=9,z.config=z.set=function(e){var t,r;if(null!=e){if("object"!=typeof e)throw Error(u+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(w(r=e[t],0,y,t),O=r),e.hasOwnProperty(t="ROUNDING_MODE")&&(w(r=e[t],0,8,t),k=r),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((r=e[t])&&r.pop?(w(r[0],-y,0,t),w(r[1],0,y,t),N=r[0],L=r[1]):(w(r,-y,y,t),N=-(L=r<0?-r:r))),e.hasOwnProperty(t="RANGE"))if((r=e[t])&&r.pop)w(r[0],-y,-1,t),w(r[1],1,y,t),j=r[0],M=r[1];else{if(w(r,-y,y,t),!r)throw Error(u+t+" cannot be zero: "+r);j=-(M=r<0?-r:r)}if(e.hasOwnProperty(t="CRYPTO")){if((r=e[t])!==!!r)throw Error(u+t+" not true or false: "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw $=!r,Error(u+"crypto unavailable");$=r}else $=r}if(e.hasOwnProperty(t="MODULO_MODE")&&(w(r=e[t],0,9,t),U=r),e.hasOwnProperty(t="POW_PRECISION")&&(w(r=e[t],0,y,t),F=r),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(r=e[t]))throw Error(u+t+" not an object: "+r);D=r}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(r=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(r))throw Error(u+t+" invalid: "+r);H=r}}return{DECIMAL_PLACES:O,ROUNDING_MODE:k,EXPONENTIAL_AT:[N,L],RANGE:[j,M],CRYPTO:$,MODULO_MODE:U,POW_PRECISION:F,FORMAT:D,ALPHABET:H}},z.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!z.DEBUG)return!0;var t,r,n=e.c,o=e.e,i=e.s;e:if("[object Array]"=={}.toString.call(n)){if((1===i||-1===i)&&o>=-y&&o<=y&&o===c(o)){if(0===n[0]){if(0===o&&1===n.length)return!0;break e}if((t=(o+1)%h)<1&&(t+=h),String(n[0]).length==t){for(t=0;t=f||r!==c(r))break e;if(0!==r)return!0}}}else if(null===n&&null===o&&(null===i||1===i||-1===i))return!0;throw Error(u+"Invalid BigNumber: "+e)},z.maximum=z.max=function(){return V(arguments,_.lt)},z.minimum=z.min=function(){return V(arguments,_.gt)},z.random=(i=9007199254740992,A=Math.random()*i&2097151?function(){return c(Math.random()*i)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,r,n,o,i,s=0,l=[],f=new z(R);if(null==e?e=O:w(e,0,y),o=a(e/h),$)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(o*=2));s>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),t[s]=r[0],t[s+1]=r[1]):(l.push(i%1e14),s+=2);s=o/2}else{if(!crypto.randomBytes)throw $=!1,Error(u+"crypto unavailable");for(t=crypto.randomBytes(o*=7);s=9e15?crypto.randomBytes(7).copy(t,s):(l.push(i%1e14),s+=7);s=o/7}if(!$)for(;s=10;i/=10,s++);sr-1&&(null==s[o+1]&&(s[o+1]=0),s[o+1]+=s[o]/r|0,s[o]%=r)}return s.reverse()}return function(n,o,i,s,a){var c,u,l,f,h,p,d,g,y=n.indexOf("."),m=O,v=k;for(y>=0&&(f=F,F=0,n=n.replace(".",""),p=(g=new z(o)).pow(n.length-y),F=f,g.c=t(S(b(p.c),p.e,"0"),10,i,e),g.e=g.c.length),l=f=(d=t(n,o,i,a?(c=H,e):(c=e,H))).length;0==d[--f];d.pop());if(!d[0])return c.charAt(0);if(y<0?--l:(p.c=d,p.e=l,p.s=s,d=(p=r(p,g,m,v,i)).c,h=p.r,l=p.e),y=d[u=l+m+1],f=i/2,h=h||u<0||null!=d[u+1],h=v<4?(null!=y||h)&&(0==v||v==(p.s<0?3:2)):y>f||y==f&&(4==v||h||6==v&&1&d[u-1]||v==(p.s<0?8:7)),u<1||!d[0])n=h?S(c.charAt(1),-m,c.charAt(0)):c.charAt(0);else{if(d.length=u,h)for(--i;++d[--u]>i;)d[u]=0,u||(++l,d=[1].concat(d));for(f=d.length;!d[--f];);for(y=0,n="";y<=f;n+=c.charAt(d[y++]));n=S(n,l,c.charAt(0))}return n}}(),r=function(){function e(e,t,r){var n,o,i,s,a=0,c=e.length,u=t%g,l=t/g|0;for(e=e.slice();c--;)a=((o=u*(i=e[c]%g)+(n=l*i+(s=e[c]/g|0)*u)%g*g+a)/r|0)+(n/g|0)+l*s,e[c]=o%r;return a&&(e=[a].concat(e)),e}function t(e,t,r,n){var o,i;if(r!=n)i=r>n?1:-1;else for(o=i=0;ot[o]?1:-1;break}return i}function r(e,t,r,n){for(var o=0;r--;)e[r]-=o,o=e[r]1;e.splice(0,1));}return function(n,o,i,s,a){var u,l,p,d,g,y,b,v,w,E,x,S,A,I,B,T,P,C=n.s==o.s?1:-1,_=n.c,R=o.c;if(!(_&&_[0]&&R&&R[0]))return new z(n.s&&o.s&&(_?!R||_[0]!=R[0]:R)?_&&0==_[0]||!R?0*C:C/0:NaN);for(w=(v=new z(C)).c=[],C=i+(l=n.e-o.e)+1,a||(a=f,l=m(n.e/h)-m(o.e/h),C=C/h|0),p=0;R[p]==(_[p]||0);p++);if(R[p]>(_[p]||0)&&l--,C<0)w.push(1),d=!0;else{for(I=_.length,T=R.length,p=0,C+=2,(g=c(a/(R[0]+1)))>1&&(R=e(R,g,a),_=e(_,g,a),T=R.length,I=_.length),A=T,x=(E=_.slice(0,T)).length;x=a/2&&B++;do{if(g=0,(u=t(R,E,T,x))<0){if(S=E[0],T!=x&&(S=S*a+(E[1]||0)),(g=c(S/B))>1)for(g>=a&&(g=a-1),b=(y=e(R,g,a)).length,x=E.length;1==t(y,E,b,x);)g--,r(y,T=10;C/=10,p++);Y(v,i+(v.e=p+l*h-1)+1,s,d)}else v.e=l,v.r=+d;return v}}(),I=/^(-?)0([xbo])(?=\w[\w.]*$)/i,B=/^([^.]+)\.$/,T=/^\.([^.]+)$/,P=/^-?(Infinity|NaN)$/,C=/^\s*\+(?=[\w.])|^\s+|\s+$/g,o=function(e,t,r,n){var o,i=r?t:t.replace(C,"");if(P.test(i))e.s=isNaN(i)?null:i<0?-1:1;else{if(!r&&(i=i.replace(I,(function(e,t,r){return o="x"==(r=r.toLowerCase())?16:"b"==r?2:8,n&&n!=o?e:t})),n&&(o=n,i=i.replace(B,"$1").replace(T,"0.$1")),t!=i))return new z(i,o);if(z.DEBUG)throw Error(u+"Not a"+(n?" base "+n:"")+" number: "+t);e.s=null}e.c=e.e=null},_.absoluteValue=_.abs=function(){var e=new z(this);return e.s<0&&(e.s=1),e},_.comparedTo=function(e,t){return v(this,new z(e,t))},_.decimalPlaces=_.dp=function(e,t){var r,n,o,i=this;if(null!=e)return w(e,0,y),null==t?t=k:w(t,0,8),Y(new z(i),e+i.e+1,t);if(!(r=i.c))return null;if(n=((o=r.length-1)-m(this.e/h))*h,o=r[o])for(;o%10==0;o/=10,n--);return n<0&&(n=0),n},_.dividedBy=_.div=function(e,t){return r(this,new z(e,t),O,k)},_.dividedToIntegerBy=_.idiv=function(e,t){return r(this,new z(e,t),0,1)},_.exponentiatedBy=_.pow=function(e,t){var r,n,o,i,s,l,f,p,d=this;if((e=new z(e)).c&&!e.isInteger())throw Error(u+"Exponent not an integer: "+W(e));if(null!=t&&(t=new z(t)),s=e.e>14,!d.c||!d.c[0]||1==d.c[0]&&!d.e&&1==d.c.length||!e.c||!e.c[0])return p=new z(Math.pow(+W(d),s?2-E(e):+W(e))),t?p.mod(t):p;if(l=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new z(NaN);(n=!l&&d.isInteger()&&t.isInteger())&&(d=d.mod(t))}else{if(e.e>9&&(d.e>0||d.e<-1||(0==d.e?d.c[0]>1||s&&d.c[1]>=24e7:d.c[0]<8e13||s&&d.c[0]<=9999975e7)))return i=d.s<0&&E(e)?-0:0,d.e>-1&&(i=1/i),new z(l?1/i:i);F&&(i=a(F/h+2))}for(s?(r=new z(.5),l&&(e.s=1),f=E(e)):f=(o=Math.abs(+W(e)))%2,p=new z(R);;){if(f){if(!(p=p.times(d)).c)break;i?p.c.length>i&&(p.c.length=i):n&&(p=p.mod(t))}if(o){if(0===(o=c(o/2)))break;f=o%2}else if(Y(e=e.times(r),e.e+1,1),e.e>14)f=E(e);else{if(0==(o=+W(e)))break;f=o%2}d=d.times(d),i?d.c&&d.c.length>i&&(d.c.length=i):n&&(d=d.mod(t))}return n?p:(l&&(p=R.div(p)),t?p.mod(t):i?Y(p,F,k,void 0):p)},_.integerValue=function(e){var t=new z(this);return null==e?e=k:w(e,0,8),Y(t,t.e+1,e)},_.isEqualTo=_.eq=function(e,t){return 0===v(this,new z(e,t))},_.isFinite=function(){return!!this.c},_.isGreaterThan=_.gt=function(e,t){return v(this,new z(e,t))>0},_.isGreaterThanOrEqualTo=_.gte=function(e,t){return 1===(t=v(this,new z(e,t)))||0===t},_.isInteger=function(){return!!this.c&&m(this.e/h)>this.c.length-2},_.isLessThan=_.lt=function(e,t){return v(this,new z(e,t))<0},_.isLessThanOrEqualTo=_.lte=function(e,t){return-1===(t=v(this,new z(e,t)))||0===t},_.isNaN=function(){return!this.s},_.isNegative=function(){return this.s<0},_.isPositive=function(){return this.s>0},_.isZero=function(){return!!this.c&&0==this.c[0]},_.minus=function(e,t){var r,n,o,i,s=this,a=s.s;if(t=(e=new z(e,t)).s,!a||!t)return new z(NaN);if(a!=t)return e.s=-t,s.plus(e);var c=s.e/h,u=e.e/h,l=s.c,p=e.c;if(!c||!u){if(!l||!p)return l?(e.s=-t,e):new z(p?s:NaN);if(!l[0]||!p[0])return p[0]?(e.s=-t,e):new z(l[0]?s:3==k?-0:0)}if(c=m(c),u=m(u),l=l.slice(),a=c-u){for((i=a<0)?(a=-a,o=l):(u=c,o=p),o.reverse(),t=a;t--;o.push(0));o.reverse()}else for(n=(i=(a=l.length)<(t=p.length))?a:t,a=t=0;t0)for(;t--;l[r++]=0);for(t=f-1;n>a;){if(l[--n]=0;){for(r=0,d=S[o]%w,y=S[o]/w|0,i=o+(s=c);i>o;)r=((u=d*(u=x[--s]%w)+(a=y*u+(l=x[s]/w|0)*d)%w*w+b[i]+r)/v|0)+(a/w|0)+y*l,b[i--]=u%v;b[i]=r}return r?++n:b.splice(0,1),Z(e,b,n)},_.negated=function(){var e=new z(this);return e.s=-e.s||null,e},_.plus=function(e,t){var r,n=this,o=n.s;if(t=(e=new z(e,t)).s,!o||!t)return new z(NaN);if(o!=t)return e.s=-t,n.minus(e);var i=n.e/h,s=e.e/h,a=n.c,c=e.c;if(!i||!s){if(!a||!c)return new z(o/0);if(!a[0]||!c[0])return c[0]?e:new z(a[0]?n:0*o)}if(i=m(i),s=m(s),a=a.slice(),o=i-s){for(o>0?(s=i,r=c):(o=-o,r=a),r.reverse();o--;r.push(0));r.reverse()}for((o=a.length)-(t=c.length)<0&&(r=c,c=a,a=r,t=o),o=0;t;)o=(a[--t]=a[t]+c[t]+o)/f|0,a[t]=f===a[t]?0:a[t]%f;return o&&(a=[o].concat(a),++s),Z(e,a,s)},_.precision=_.sd=function(e,t){var r,n,o,i=this;if(null!=e&&e!==!!e)return w(e,1,y),null==t?t=k:w(t,0,8),Y(new z(i),e,t);if(!(r=i.c))return null;if(n=(o=r.length-1)*h+1,o=r[o]){for(;o%10==0;o/=10,n--);for(o=r[0];o>=10;o/=10,n++);}return e&&i.e+1>n&&(n=i.e+1),n},_.shiftedBy=function(e){return w(e,-9007199254740991,p),this.times("1e"+e)},_.squareRoot=_.sqrt=function(){var e,t,n,o,i,s=this,a=s.c,c=s.s,u=s.e,l=O+4,f=new z("0.5");if(1!==c||!a||!a[0])return new z(!c||c<0&&(!a||a[0])?NaN:a?s:1/0);if(0==(c=Math.sqrt(+W(s)))||c==1/0?(((t=b(a)).length+u)%2==0&&(t+="0"),c=Math.sqrt(+t),u=m((u+1)/2)-(u<0||u%2),n=new z(t=c==1/0?"5e"+u:(t=c.toExponential()).slice(0,t.indexOf("e")+1)+u)):n=new z(c+""),n.c[0])for((c=(u=n.e)+l)<3&&(c=0);;)if(i=n,n=f.times(i.plus(r(s,i,l,1))),b(i.c).slice(0,c)===(t=b(n.c)).slice(0,c)){if(n.e0&&g>0){for(i=g%a||a,f=d.substr(0,i);i0&&(f+=l+d.slice(i)),p&&(f="-"+f)}n=h?f+(r.decimalSeparator||"")+((c=+r.fractionGroupSize)?h.replace(new RegExp("\\d{"+c+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):h):f}return(r.prefix||"")+n+(r.suffix||"")},_.toFraction=function(e){var t,n,o,i,s,a,c,l,f,p,g,y,m=this,v=m.c;if(null!=e&&(!(c=new z(e)).isInteger()&&(c.c||1!==c.s)||c.lt(R)))throw Error(u+"Argument "+(c.isInteger()?"out of range: ":"not an integer: ")+W(c));if(!v)return new z(m);for(t=new z(R),f=n=new z(R),o=l=new z(R),y=b(v),s=t.e=y.length-m.e-1,t.c[0]=d[(a=s%h)<0?h+a:a],e=!e||c.comparedTo(t)>0?s>0?t:f:c,a=M,M=1/0,c=new z(y),l.c[0]=0;p=r(c,t,0,1),1!=(i=n.plus(p.times(o))).comparedTo(e);)n=o,o=i,f=l.plus(p.times(i=f)),l=i,t=c.minus(p.times(i=t)),c=i;return i=r(e.minus(n),o,0,1),l=l.plus(i.times(f)),n=n.plus(i.times(o)),l.s=f.s=m.s,g=r(f,o,s*=2,k).minus(m).abs().comparedTo(r(l,n,s,k).minus(m).abs())<1?[f,o]:[l,n],M=a,g},_.toNumber=function(){return+W(this)},_.toPrecision=function(e,t){return null!=e&&w(e,1,y),G(this,e,t,2)},_.toString=function(e){var t,r=this,o=r.s,i=r.e;return null===i?o?(t="Infinity",o<0&&(t="-"+t)):t="NaN":(null==e?t=i<=N||i>=L?x(b(r.c),i):S(b(r.c),i,"0"):10===e?t=S(b((r=Y(new z(r),O+i+1,k)).c),r.e,"0"):(w(e,2,H.length,"Base"),t=n(S(b(r.c),i,"0"),10,e,o,!0)),o<0&&r.c[0]&&(t="-"+t)),t},_.valueOf=_.toJSON=function(){return W(this)},_._isBigNumber=!0,null!=t&&z.set(t),z}(),i.default=i.BigNumber=i,void 0===(n=function(){return i}.call(t,r,t,e))||(e.exports=n)}()},8287:(e,t,r)=>{"use strict";var n=r(7526),o=r(251),i=r(4634);function s(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(e,t){if(s()=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|e}function d(e,t){if(c.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return F(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return D(e).length;default:if(n)return F(e).length;t=(""+t).toLowerCase(),n=!0}}function g(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return _(this,t,r);case"utf8":case"utf-8":return B(this,t,r);case"ascii":return P(this,t,r);case"latin1":case"binary":return C(this,t,r);case"base64":return I(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function y(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function m(e,t,r,n,o){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=o?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(o)return-1;r=e.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof t&&(t=c.from(t,n)),c.isBuffer(t))return 0===t.length?-1:b(e,t,r,n,o);if("number"==typeof t)return t&=255,c.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):b(e,[t],r,n,o);throw new TypeError("val must be string, number or Buffer")}function b(e,t,r,n,o){var i,s=1,a=e.length,c=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;s=2,a/=2,c/=2,r/=2}function u(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(o){var l=-1;for(i=r;ia&&(r=a-c),i=r;i>=0;i--){for(var f=!0,h=0;ho&&(n=o):n=o;var i=t.length;if(i%2!=0)throw new TypeError("Invalid hex string");n>i/2&&(n=i/2);for(var s=0;s>8,o=r%256,i.push(o),i.push(n);return i}(t,e.length-r),e,r,n)}function I(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function B(e,t,r){r=Math.min(e.length,r);for(var n=[],o=t;o239?4:u>223?3:u>191?2:1;if(o+f<=r)switch(f){case 1:u<128&&(l=u);break;case 2:128==(192&(i=e[o+1]))&&(c=(31&u)<<6|63&i)>127&&(l=c);break;case 3:i=e[o+1],s=e[o+2],128==(192&i)&&128==(192&s)&&(c=(15&u)<<12|(63&i)<<6|63&s)>2047&&(c<55296||c>57343)&&(l=c);break;case 4:i=e[o+1],s=e[o+2],a=e[o+3],128==(192&i)&&128==(192&s)&&128==(192&a)&&(c=(15&u)<<18|(63&i)<<12|(63&s)<<6|63&a)>65535&&c<1114112&&(l=c)}null===l?(l=65533,f=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),o+=f}return function(e){var t=e.length;if(t<=T)return String.fromCharCode.apply(String,e);for(var r="",n=0;n0&&(e=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(e+=" ... ")),""},c.prototype.compare=function(e,t,r,n,o){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),t<0||r>e.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&t>=r)return 0;if(n>=o)return-1;if(t>=r)return 1;if(this===e)return 0;for(var i=(o>>>=0)-(n>>>=0),s=(r>>>=0)-(t>>>=0),a=Math.min(i,s),u=this.slice(n,o),l=e.slice(t,r),f=0;fo)&&(r=o),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return v(this,e,t,r);case"utf8":case"utf-8":return w(this,e,t,r);case"ascii":return E(this,e,t,r);case"latin1":case"binary":return x(this,e,t,r);case"base64":return S(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,e,t,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var T=4096;function P(e,t,r){var n="";r=Math.min(e.length,r);for(var o=t;oo)&&(r=o);for(var i="",s=t;sr)throw new RangeError("Trying to access beyond buffer length")}function k(e,t,r,n,o,i){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||te.length)throw new RangeError("Index out of range")}function N(e,t,r,n){t<0&&(t=65535+t+1);for(var o=0,i=Math.min(e.length-r,2);o>>8*(n?o:1-o)}function L(e,t,r,n){t<0&&(t=4294967295+t+1);for(var o=0,i=Math.min(e.length-r,4);o>>8*(n?o:3-o)&255}function j(e,t,r,n,o,i){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function M(e,t,r,n,i){return i||j(e,0,r,4),o.write(e,t,r,n,23,4),r+4}function $(e,t,r,n,i){return i||j(e,0,r,8),o.write(e,t,r,n,52,8),r+8}c.prototype.slice=function(e,t){var r,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t0&&(o*=256);)n+=this[e+--t]*o;return n},c.prototype.readUInt8=function(e,t){return t||O(e,1,this.length),this[e]},c.prototype.readUInt16LE=function(e,t){return t||O(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUInt16BE=function(e,t){return t||O(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUInt32LE=function(e,t){return t||O(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUInt32BE=function(e,t){return t||O(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||O(e,t,this.length);for(var n=this[e],o=1,i=0;++i=(o*=128)&&(n-=Math.pow(2,8*t)),n},c.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||O(e,t,this.length);for(var n=t,o=1,i=this[e+--n];n>0&&(o*=256);)i+=this[e+--n]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},c.prototype.readInt8=function(e,t){return t||O(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){t||O(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt16BE=function(e,t){t||O(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt32LE=function(e,t){return t||O(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return t||O(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readFloatLE=function(e,t){return t||O(e,4,this.length),o.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return t||O(e,4,this.length),o.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return t||O(e,8,this.length),o.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return t||O(e,8,this.length),o.read(this,e,!1,52,8)},c.prototype.writeUIntLE=function(e,t,r,n){e=+e,t|=0,r|=0,n||k(this,e,t,r,Math.pow(2,8*r)-1,0);var o=1,i=0;for(this[t]=255&e;++i=0&&(i*=256);)this[t+o]=e/i&255;return t+r},c.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||k(this,e,t,1,255,0),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},c.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||k(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):N(this,e,t,!0),t+2},c.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||k(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):N(this,e,t,!1),t+2},c.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||k(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):L(this,e,t,!0),t+4},c.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||k(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):L(this,e,t,!1),t+4},c.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var o=Math.pow(2,8*r-1);k(this,e,t,r,o-1,-o)}var i=0,s=1,a=0;for(this[t]=255&e;++i>0)-a&255;return t+r},c.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var o=Math.pow(2,8*r-1);k(this,e,t,r,o-1,-o)}var i=r-1,s=1,a=0;for(this[t+i]=255&e;--i>=0&&(s*=256);)e<0&&0===a&&0!==this[t+i+1]&&(a=1),this[t+i]=(e/s>>0)-a&255;return t+r},c.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||k(this,e,t,1,127,-128),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||k(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):N(this,e,t,!0),t+2},c.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||k(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):N(this,e,t,!1),t+2},c.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||k(this,e,t,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):L(this,e,t,!0),t+4},c.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||k(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):L(this,e,t,!1),t+4},c.prototype.writeFloatLE=function(e,t,r){return M(this,e,t,!0,r)},c.prototype.writeFloatBE=function(e,t,r){return M(this,e,t,!1,r)},c.prototype.writeDoubleLE=function(e,t,r){return $(this,e,t,!0,r)},c.prototype.writeDoubleBE=function(e,t,r){return $(this,e,t,!1,r)},c.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t=0;--o)e[o+t]=this[o+r];else if(i<1e3||!c.TYPED_ARRAY_SUPPORT)for(o=0;o>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i55295&&r<57344){if(!o){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(s+1===n){(t-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function D(e){return n.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(U,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function H(e,t,r,n){for(var o=0;o=t.length||o>=e.length);++o)t[o+r]=e[o];return o}},8e3:e=>{var t=1e3,r=60*t,n=60*r,o=24*n;function i(e,t,r,n){var o=t>=1.5*r;return Math.round(e/r)+" "+n+(o?"s":"")}e.exports=function(e,s){s=s||{};var a,c,u=typeof e;if("string"===u&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var i=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(i){var s=parseFloat(i[1]);switch((i[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"weeks":case"week":case"w":return 6048e5*s;case"days":case"day":case"d":return s*o;case"hours":case"hour":case"hrs":case"hr":case"h":return s*n;case"minutes":case"minute":case"mins":case"min":case"m":return s*r;case"seconds":case"second":case"secs":case"sec":case"s":return s*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}(e);if("number"===u&&isFinite(e))return s.long?(a=e,(c=Math.abs(a))>=o?i(a,c,o,"day"):c>=n?i(a,c,n,"hour"):c>=r?i(a,c,r,"minute"):c>=t?i(a,c,t,"second"):a+" ms"):function(e){var i=Math.abs(e);return i>=o?Math.round(e/o)+"d":i>=n?Math.round(e/n)+"h":i>=r?Math.round(e/r)+"m":i>=t?Math.round(e/t)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},7833:(e,t,r)=>{t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const r="color: "+this.color;t.splice(1,0,r,"color: inherit");let n=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(n++,"%c"===e&&(o=n))})),t.splice(o,0,r)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},t.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=r(736)(t);const{formatters:n}=e.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},736:(e,t,r)=>{e.exports=function(e){function t(e){let r,o,i,s=null;function a(...e){if(!a.enabled)return;const n=a,o=Number(new Date),i=o-(r||o);n.diff=i,n.prev=r,n.curr=o,r=o,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let s=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((r,o)=>{if("%%"===r)return"%";s++;const i=t.formatters[o];if("function"==typeof i){const t=e[s];r=i.call(n,t),e.splice(s,1),s--}return r})),t.formatArgs.call(n,e),(n.log||t.log).apply(n,e)}return a.namespace=e,a.useColors=t.useColors(),a.color=t.selectColor(e),a.extend=n,a.destroy=t.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==s?s:(o!==t.namespaces&&(o=t.namespaces,i=t.enabled(e)),i),set:e=>{s=e}}),"function"==typeof t.init&&t.init(a),a}function n(e,r){const n=t(this.namespace+(void 0===r?":":r)+e);return n.log=this.log,n}function o(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){const e=[...t.names.map(o),...t.skips.map(o).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let r;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const n=("string"==typeof e?e:"").split(/[\s,]+/),o=n.length;for(r=0;r{t[r]=e[r]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let r=0;for(let t=0;t{"use strict";var t=Object.prototype.hasOwnProperty,r="~";function n(){}function o(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function i(e,t,n,i,s){if("function"!=typeof n)throw new TypeError("The listener must be a function");var a=new o(n,i||e,s),c=r?r+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],a]:e._events[c].push(a):(e._events[c]=a,e._eventsCount++),e}function s(e,t){0==--e._eventsCount?e._events=new n:delete e._events[t]}function a(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(r=!1)),a.prototype.eventNames=function(){var e,n,o=[];if(0===this._eventsCount)return o;for(n in e=this._events)t.call(e,n)&&o.push(r?n.slice(1):n);return Object.getOwnPropertySymbols?o.concat(Object.getOwnPropertySymbols(e)):o},a.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var o=0,i=n.length,s=new Array(i);o{"use strict";var t,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};t=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var o=Number.isNaN||function(e){return e!=e};function i(){i.init.call(this)}e.exports=i,e.exports.once=function(e,t){return new Promise((function(r,n){function o(r){e.removeListener(t,i),n(r)}function i(){"function"==typeof e.removeListener&&e.removeListener("error",o),r([].slice.call(arguments))}g(e,t,i,{once:!0}),"error"!==t&&function(e,t,r){"function"==typeof e.on&&g(e,"error",t,{once:!0})}(e,o)}))},i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var s=10;function a(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?i.defaultMaxListeners:e._maxListeners}function u(e,t,r,n){var o,i,s,u;if(a(r),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),i=e._events),s=i[t]),void 0===s)s=i[t]=r,++e._eventsCount;else if("function"==typeof s?s=i[t]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),(o=c(e))>0&&s.length>o&&!s.warned){s.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=s.length,u=l,console&&console.warn&&console.warn(u)}return e}function l(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},o=l.bind(n);return o.listener=r,n.wrapFn=o,o}function h(e,t,r){var n=e._events;if(void 0===n)return[];var o=n[t];return void 0===o?[]:"function"==typeof o?r?[o.listener||o]:[o]:r?function(e){for(var t=new Array(e.length),r=0;r0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var c=i[e];if(void 0===c)return!1;if("function"==typeof c)n(c,this,t);else{var u=c.length,l=d(c,u);for(r=0;r=0;i--)if(r[i]===t||r[i].listener===t){s=r[i].listener,o=i;break}if(o<0)return this;0===o?r.shift():function(e,t){for(;t+1=0;n--)this.removeListener(e,t[n]);return this},i.prototype.listeners=function(e){return h(this,e,!0)},i.prototype.rawListeners=function(e){return h(this,e,!1)},i.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},i.prototype.listenerCount=p,i.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},251:(e,t)=>{t.read=function(e,t,r,n,o){var i,s,a=8*o-n-1,c=(1<>1,l=-7,f=r?o-1:0,h=r?-1:1,p=e[t+f];for(f+=h,i=p&(1<<-l)-1,p>>=-l,l+=a;l>0;i=256*i+e[t+f],f+=h,l-=8);for(s=i&(1<<-l)-1,i>>=-l,l+=n;l>0;s=256*s+e[t+f],f+=h,l-=8);if(0===i)i=1-u;else{if(i===c)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,n),i-=u}return(p?-1:1)*s*Math.pow(2,i-n)},t.write=function(e,t,r,n,o,i){var s,a,c,u=8*i-o-1,l=(1<>1,h=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:i-1,d=n?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=l):(s=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-s))<1&&(s--,c*=2),(t+=s+f>=1?h/c:h*Math.pow(2,1-f))*c>=2&&(s++,c/=2),s+f>=l?(a=0,s=l):s+f>=1?(a=(t*c-1)*Math.pow(2,o),s+=f):(a=t*Math.pow(2,f-1)*Math.pow(2,o),s=0));o>=8;e[r+p]=255&a,p+=d,a/=256,o-=8);for(s=s<0;e[r+p]=255&s,p+=d,s/=256,u-=8);e[r+p-d]|=128*g}},4634:e=>{var t={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==t.call(e)}},6215:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidStatusCodeError=t.InvalidCertError=void 0;const n=Object.freeze({redirect:!0,expectStatusCode:200,headers:{},full:!1,keepAlive:!0,cors:!1,referrer:!1,sslAllowSelfSigned:!1,_redirectCount:0});class o extends Error{constructor(e,t){super(e),this.fingerprint256=t}}t.InvalidCertError=o;class i extends Error{constructor(e){super(`Request Failed. Status Code: ${e}`),this.statusCode=e}}function s(e,t){if(!t||"text"===t||"json"===t)try{let r=new TextDecoder("utf8",{fatal:!0}).decode(e);if("text"===t)return r;try{return JSON.parse(r)}catch(e){if("json"===t)throw e;return r}}catch(e){if("text"===t||"json"===t)throw e}return e}t.InvalidStatusCodeError=i;let a={};function c(e,t){let u={...n,...t};const l=r(105),f=r(917),h=r(7542),{promisify:p}=r(537),{resolve:d}=r(8835),g=!!/^https/.test(e);let y={method:u.method||"GET",headers:{"Accept-Encoding":"gzip, deflate, br"}};const m=e=>e.replace(/:| /g,"").toLowerCase();if(u.keepAlive){const e={keepAlive:!0,keepAliveMsecs:3e4,maxFreeSockets:1024,maxCachedSessions:1024},t=[g,g&&u.sslPinnedCertificates?.map((e=>m(e))).sort()].join();y.agent=a[t]||(a[t]=new(g?f:l).Agent(e))}return"json"===u.type&&(y.headers["Content-Type"]="application/json"),u.data&&(u.method||(y.method="POST"),y.body="json"===u.type?JSON.stringify(u.data):u.data),y.headers={...y.headers,...u.headers},u.sslAllowSelfSigned&&(y.rejectUnauthorized=!1),new Promise(((t,r)=>{const n=async t=>{if(t&&"DEPTH_ZERO_SELF_SIGNED_CERT"===t.code)try{await c(e,{...u,sslAllowSelfSigned:!0,sslPinnedCertificates:[]})}catch(e){e&&e.fingerprint256&&(t=new o(`Self-signed SSL certificate: ${e.fingerprint256}`,e.fingerprint256))}r(t)},a=(g?f:l).request(e,y,(o=>{o.on("error",n),(async()=>{try{t(await(async t=>{const r=t.statusCode;if(u.redirect&&300<=r&&r<400&&t.headers.location){if(10==u._redirectCount)throw new Error("Request failed. Too much redirects.");return u._redirectCount+=1,await c(d(e,t.headers.location),u)}if(u.expectStatusCode&&r!==u.expectStatusCode)throw t.resume(),new i(r);let n=[];for await(const e of t)n.push(e);let o=Buffer.concat(n);const a=t.headers["content-encoding"];"br"===a&&(o=await p(h.brotliDecompress)(o)),"gzip"!==a&&"deflate"!==a||(o=await p(h.unzip)(o));const l=s(o,u.type);return u.full?{headers:t.headers,status:r,body:l}:l})(o))}catch(e){r(e)}})()}));a.on("error",n);const b=u.sslPinnedCertificates?.map((e=>m(e))),v=e=>{const t=m(e.getPeerCertificate()?.fingerprint256||"");if((t||!e.isSessionReused())&&!b.includes(t))return a.emit("error",new o(`Invalid SSL certificate: ${t} Expected: ${b}`,t)),a.abort()};u.sslPinnedCertificates&&a.on("socket",(e=>{e.listeners("secureConnect").map((e=>(e.name||"").replace("bound ",""))).includes("mfetchSecureConnect")||e.on("secureConnect",v.bind(null,e))})),u.keepAlive&&a.setNoDelay(!0),y.body&&a.write(y.body),a.end()}))}const u=new Set(["Accept","Accept-Language","Content-Language","Content-Type"].map((e=>e.toLowerCase()))),l=new Set(["Accept-Charset","Accept-Encoding","Access-Control-Request-Headers","Access-Control-Request-Method","Connection","Content-Length","Cookie","Cookie2","Date","DNT","Expect","Host","Keep-Alive","Origin","Referer","TE","Trailer","Transfer-Encoding","Upgrade","Via"].map((e=>e.toLowerCase())));async function f(e,t){let r={...n,...t};const o=new Headers;"json"===r.type&&o.set("Content-Type","application/json");let a=new URL(e);if(a.username){const e=btoa(`${a.username}:${a.password}`);o.set("Authorization",`Basic ${e}`),a.username="",a.password=""}e=""+a;for(let e in r.headers){const t=e.toLowerCase();(u.has(t)||r.cors&&!l.has(t))&&o.set(e,r.headers[e])}let c={headers:o,redirect:r.redirect?"follow":"manual"};r.referrer||(c.referrerPolicy="no-referrer"),r.cors&&(c.mode="cors"),r.data&&(r.method||(c.method="POST"),c.body="json"===r.type?JSON.stringify(r.data):r.data);const f=await fetch(e,c);if(r.expectStatusCode&&f.status!==r.expectStatusCode)throw new i(f.status);const h=s(new Uint8Array(await f.arrayBuffer()),r.type);return r.full?{headers:Object.fromEntries(f.headers.entries()),status:f.status,body:h}:h}const h=!!("object"==typeof process&&process.versions&&process.versions.node&&process.versions.v8);t.default=function(e,t){return(h?c:f)(e,t)}},1843:(e,t,r)=>{"use strict";const{ErrorWithCause:n}=r(5832),{findCauseByReference:o,getErrorCause:i,messageWithCauses:s,stackWithCauses:a}=r(4306);e.exports={ErrorWithCause:n,findCauseByReference:o,getErrorCause:i,stackWithCauses:a,messageWithCauses:s}},5832:e=>{"use strict";class t extends Error{constructor(e,{cause:r}={}){super(e),this.name=t.name,r&&(this.cause=r),this.message=e}}e.exports={ErrorWithCause:t}},4306:e=>{"use strict";const t=e=>{if(e&&"object"==typeof e&&"cause"in e){if("function"==typeof e.cause){const t=e.cause();return t instanceof Error?t:void 0}return e.cause instanceof Error?e.cause:void 0}},r=(e,n)=>{if(!(e instanceof Error))return"";const o=e.stack||"";if(n.has(e))return o+"\ncauses have become circular...";const i=t(e);return i?(n.add(e),o+"\ncaused by: "+r(i,n)):o},n=(e,r,o)=>{if(!(e instanceof Error))return"";const i=o?"":e.message||"";if(r.has(e))return i+": ...";const s=t(e);if(s){r.add(e);const t="cause"in e&&"function"==typeof e.cause;return i+(t?"":": ")+n(s,r,t)}return i};e.exports={findCauseByReference:(e,r)=>{if(!e||!r)return;if(!(e instanceof Error))return;if(!(r.prototype instanceof Error)&&r!==Error)return;const n=new Set;let o=e;for(;o&&!n.has(o);){if(n.add(o),o instanceof r)return o;o=t(o)}},getErrorCause:t,stackWithCauses:e=>r(e,new Set),messageWithCauses:e=>n(e,new Set)}},1630:e=>{"use strict";function t(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,r,n,o){r=r||"&",n=n||"=";var i={};if("string"!=typeof e||0===e.length)return i;var s=/\+/g;e=e.split(r);var a=1e3;o&&"number"==typeof o.maxKeys&&(a=o.maxKeys);var c=e.length;a>0&&c>a&&(c=a);for(var u=0;u=0?(l=d.substr(0,g),f=d.substr(g+1)):(l=d,f=""),h=decodeURIComponent(l),p=decodeURIComponent(f),t(i,h)?Array.isArray(i[h])?i[h].push(p):i[h]=[i[h],p]:i[h]=p}return i}},9106:e=>{"use strict";var t=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,r,n,o){return r=r||"&",n=n||"=",null===e&&(e=void 0),"object"==typeof e?Object.keys(e).map((function(o){var i=encodeURIComponent(t(o))+n;return Array.isArray(e[o])?e[o].map((function(e){return i+encodeURIComponent(t(e))})).join(r):i+encodeURIComponent(t(e[o]))})).join(r):o?encodeURIComponent(t(o))+n+encodeURIComponent(t(e)):""}},7186:(e,t,r)=>{"use strict";t.decode=t.parse=r(1630),t.encode=t.stringify=r(9106)},3904:(e,t,r)=>{const n=Symbol("SemVer ANY");class o{static get ANY(){return n}constructor(e,t){if(t=i(t),e instanceof o){if(e.loose===!!t.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),u("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===n?this.value="":this.value=this.operator+this.semver.version,u("comp",this)}parse(e){const t=this.options.loose?s[a.COMPARATORLOOSE]:s[a.COMPARATOR],r=e.match(t);if(!r)throw new TypeError(`Invalid comparator: ${e}`);this.operator=void 0!==r[1]?r[1]:"","="===this.operator&&(this.operator=""),r[2]?this.semver=new l(r[2],this.options.loose):this.semver=n}toString(){return this.value}test(e){if(u("Comparator.test",e,this.options.loose),this.semver===n||e===n)return!0;if("string"==typeof e)try{e=new l(e,this.options)}catch(e){return!1}return c(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof o))throw new TypeError("a Comparator is required");return""===this.operator?""===this.value||new f(e.value,t).test(this.value):""===e.operator?""===e.value||new f(this.value,t).test(e.semver):!((t=i(t)).includePrerelease&&("<0.0.0-0"===this.value||"<0.0.0-0"===e.value)||!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))||(!this.operator.startsWith(">")||!e.operator.startsWith(">"))&&(!this.operator.startsWith("<")||!e.operator.startsWith("<"))&&(this.semver.version!==e.semver.version||!this.operator.includes("=")||!e.operator.includes("="))&&!(c(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))&&!(c(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}}e.exports=o;const i=r(8587),{safeRe:s,t:a}=r(9718),c=r(2111),u=r(7272),l=r(3908),f=r(8311)},8311:(e,t,r)=>{class n{constructor(e,t){if(t=i(t),e instanceof n)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new n(e.raw,t);if(e instanceof s)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map((e=>this.parseRange(e))).filter((e=>e.length)),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!y(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&m(e[0])){this.set=[e];break}}this.format()}format(){return this.range=this.set.map((e=>e.join(" ").trim())).join("||").trim(),this.range}toString(){return this.range}parseRange(e){const t=((this.options.includePrerelease&&d)|(this.options.loose&&g))+":"+e,r=o.get(t);if(r)return r;const n=this.options.loose,i=n?u[l.HYPHENRANGELOOSE]:u[l.HYPHENRANGE];e=e.replace(i,C(this.options.includePrerelease)),a("hyphen replace",e),e=e.replace(u[l.COMPARATORTRIM],f),a("comparator trim",e);let c=(e=(e=e.replace(u[l.TILDETRIM],h)).replace(u[l.CARETTRIM],p)).split(" ").map((e=>v(e,this.options))).join(" ").split(/\s+/).map((e=>P(e,this.options)));n&&(c=c.filter((e=>(a("loose invalid filter",e,this.options),!!e.match(u[l.COMPARATORLOOSE]))))),a("range list",c);const m=new Map,b=c.map((e=>new s(e,this.options)));for(const e of b){if(y(e))return[e];m.set(e.value,e)}m.size>1&&m.has("")&&m.delete("");const w=[...m.values()];return o.set(t,w),w}intersects(e,t){if(!(e instanceof n))throw new TypeError("a Range is required");return this.set.some((r=>b(r,t)&&e.set.some((e=>b(e,t)&&r.every((r=>e.every((e=>r.intersects(e,t)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new c(e,this.options)}catch(e){return!1}for(let t=0;t"<0.0.0-0"===e.value,m=e=>""===e.value,b=(e,t)=>{let r=!0;const n=e.slice();let o=n.pop();for(;r&&n.length;)r=n.every((e=>o.intersects(e,t))),o=n.pop();return r},v=(e,t)=>(a("comp",e,t),e=S(e,t),a("caret",e),e=E(e,t),a("tildes",e),e=I(e,t),a("xrange",e),e=T(e,t),a("stars",e),e),w=e=>!e||"x"===e.toLowerCase()||"*"===e,E=(e,t)=>e.trim().split(/\s+/).map((e=>x(e,t))).join(" "),x=(e,t)=>{const r=t.loose?u[l.TILDELOOSE]:u[l.TILDE];return e.replace(r,((t,r,n,o,i)=>{let s;return a("tilde",e,t,r,n,o,i),w(r)?s="":w(n)?s=`>=${r}.0.0 <${+r+1}.0.0-0`:w(o)?s=`>=${r}.${n}.0 <${r}.${+n+1}.0-0`:i?(a("replaceTilde pr",i),s=`>=${r}.${n}.${o}-${i} <${r}.${+n+1}.0-0`):s=`>=${r}.${n}.${o} <${r}.${+n+1}.0-0`,a("tilde return",s),s}))},S=(e,t)=>e.trim().split(/\s+/).map((e=>A(e,t))).join(" "),A=(e,t)=>{a("caret",e,t);const r=t.loose?u[l.CARETLOOSE]:u[l.CARET],n=t.includePrerelease?"-0":"";return e.replace(r,((t,r,o,i,s)=>{let c;return a("caret",e,t,r,o,i,s),w(r)?c="":w(o)?c=`>=${r}.0.0${n} <${+r+1}.0.0-0`:w(i)?c="0"===r?`>=${r}.${o}.0${n} <${r}.${+o+1}.0-0`:`>=${r}.${o}.0${n} <${+r+1}.0.0-0`:s?(a("replaceCaret pr",s),c="0"===r?"0"===o?`>=${r}.${o}.${i}-${s} <${r}.${o}.${+i+1}-0`:`>=${r}.${o}.${i}-${s} <${r}.${+o+1}.0-0`:`>=${r}.${o}.${i}-${s} <${+r+1}.0.0-0`):(a("no pr"),c="0"===r?"0"===o?`>=${r}.${o}.${i}${n} <${r}.${o}.${+i+1}-0`:`>=${r}.${o}.${i}${n} <${r}.${+o+1}.0-0`:`>=${r}.${o}.${i} <${+r+1}.0.0-0`),a("caret return",c),c}))},I=(e,t)=>(a("replaceXRanges",e,t),e.split(/\s+/).map((e=>B(e,t))).join(" ")),B=(e,t)=>{e=e.trim();const r=t.loose?u[l.XRANGELOOSE]:u[l.XRANGE];return e.replace(r,((r,n,o,i,s,c)=>{a("xRange",e,r,n,o,i,s,c);const u=w(o),l=u||w(i),f=l||w(s),h=f;return"="===n&&h&&(n=""),c=t.includePrerelease?"-0":"",u?r=">"===n||"<"===n?"<0.0.0-0":"*":n&&h?(l&&(i=0),s=0,">"===n?(n=">=",l?(o=+o+1,i=0,s=0):(i=+i+1,s=0)):"<="===n&&(n="<",l?o=+o+1:i=+i+1),"<"===n&&(c="-0"),r=`${n+o}.${i}.${s}${c}`):l?r=`>=${o}.0.0${c} <${+o+1}.0.0-0`:f&&(r=`>=${o}.${i}.0${c} <${o}.${+i+1}.0-0`),a("xRange return",r),r}))},T=(e,t)=>(a("replaceStars",e,t),e.trim().replace(u[l.STAR],"")),P=(e,t)=>(a("replaceGTE0",e,t),e.trim().replace(u[t.includePrerelease?l.GTE0PRE:l.GTE0],"")),C=e=>(t,r,n,o,i,s,a,c,u,l,f,h,p)=>`${r=w(n)?"":w(o)?`>=${n}.0.0${e?"-0":""}`:w(i)?`>=${n}.${o}.0${e?"-0":""}`:s?`>=${r}`:`>=${r}${e?"-0":""}`} ${c=w(u)?"":w(l)?`<${+u+1}.0.0-0`:w(f)?`<${u}.${+l+1}.0-0`:h?`<=${u}.${l}.${f}-${h}`:e?`<${u}.${l}.${+f+1}-0`:`<=${c}`}`.trim(),_=(e,t,r)=>{for(let r=0;r0){const n=e[r].semver;if(n.major===t.major&&n.minor===t.minor&&n.patch===t.patch)return!0}return!1}return!0}},3908:(e,t,r)=>{const n=r(7272),{MAX_LENGTH:o,MAX_SAFE_INTEGER:i}=r(6874),{safeRe:s,t:a}=r(9718),c=r(8587),{compareIdentifiers:u}=r(1123);class l{constructor(e,t){if(t=c(t),e instanceof l){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>o)throw new TypeError(`version is longer than ${o} characters`);n("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const r=e.trim().match(t.loose?s[a.LOOSE]:s[a.FULL]);if(!r)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>i||this.major<0)throw new TypeError("Invalid major version");if(this.minor>i||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>i||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t=0;)"number"==typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);if(-1===n){if(t===this.prerelease.join(".")&&!1===r)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let n=[t,e];!1===r&&(n=[t]),0===u(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=n):this.prerelease=n}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}e.exports=l},7414:(e,t,r)=>{const n=r(144);e.exports=(e,t)=>{const r=n(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null}},2111:(e,t,r)=>{const n=r(4641),o=r(3999),i=r(5580),s=r(4089),a=r(7059),c=r(5200);e.exports=(e,t,r,u)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e===r;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e!==r;case"":case"=":case"==":return n(e,r,u);case"!=":return o(e,r,u);case">":return i(e,r,u);case">=":return s(e,r,u);case"<":return a(e,r,u);case"<=":return c(e,r,u);default:throw new TypeError(`Invalid operator: ${t}`)}}},6170:(e,t,r)=>{const n=r(3908),o=r(144),{safeRe:i,t:s}=r(9718);e.exports=(e,t)=>{if(e instanceof n)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let r=null;if((t=t||{}).rtl){let t;for(;(t=i[s.COERCERTL].exec(e))&&(!r||r.index+r[0].length!==e.length);)r&&t.index+t[0].length===r.index+r[0].length||(r=t),i[s.COERCERTL].lastIndex=t.index+t[1].length+t[2].length;i[s.COERCERTL].lastIndex=-1}else r=e.match(i[s.COERCE]);return null===r?null:o(`${r[2]}.${r[3]||"0"}.${r[4]||"0"}`,t)}},909:(e,t,r)=>{const n=r(3908);e.exports=(e,t,r)=>{const o=new n(e,r),i=new n(t,r);return o.compare(i)||o.compareBuild(i)}},1763:(e,t,r)=>{const n=r(560);e.exports=(e,t)=>n(e,t,!0)},560:(e,t,r)=>{const n=r(3908);e.exports=(e,t,r)=>new n(e,r).compare(new n(t,r))},1832:(e,t,r)=>{const n=r(144);e.exports=(e,t)=>{const r=n(e,null,!0),o=n(t,null,!0),i=r.compare(o);if(0===i)return null;const s=i>0,a=s?r:o,c=s?o:r,u=!!a.prerelease.length;if(c.prerelease.length&&!u)return c.patch||c.minor?a.patch?"patch":a.minor?"minor":"major":"major";const l=u?"pre":"";return r.major!==o.major?l+"major":r.minor!==o.minor?l+"minor":r.patch!==o.patch?l+"patch":"prerelease"}},4641:(e,t,r)=>{const n=r(560);e.exports=(e,t,r)=>0===n(e,t,r)},5580:(e,t,r)=>{const n=r(560);e.exports=(e,t,r)=>n(e,t,r)>0},4089:(e,t,r)=>{const n=r(560);e.exports=(e,t,r)=>n(e,t,r)>=0},3007:(e,t,r)=>{const n=r(3908);e.exports=(e,t,r,o,i)=>{"string"==typeof r&&(i=o,o=r,r=void 0);try{return new n(e instanceof n?e.version:e,r).inc(t,o,i).version}catch(e){return null}}},7059:(e,t,r)=>{const n=r(560);e.exports=(e,t,r)=>n(e,t,r)<0},5200:(e,t,r)=>{const n=r(560);e.exports=(e,t,r)=>n(e,t,r)<=0},2938:(e,t,r)=>{const n=r(3908);e.exports=(e,t)=>new n(e,t).major},6254:(e,t,r)=>{const n=r(3908);e.exports=(e,t)=>new n(e,t).minor},3999:(e,t,r)=>{const n=r(560);e.exports=(e,t,r)=>0!==n(e,t,r)},144:(e,t,r)=>{const n=r(3908);e.exports=(e,t,r=!1)=>{if(e instanceof n)return e;try{return new n(e,t)}catch(e){if(!r)return null;throw e}}},4493:(e,t,r)=>{const n=r(3908);e.exports=(e,t)=>new n(e,t).patch},1729:(e,t,r)=>{const n=r(144);e.exports=(e,t)=>{const r=n(e,t);return r&&r.prerelease.length?r.prerelease:null}},9970:(e,t,r)=>{const n=r(560);e.exports=(e,t,r)=>n(t,e,r)},4277:(e,t,r)=>{const n=r(909);e.exports=(e,t)=>e.sort(((e,r)=>n(r,e,t)))},7638:(e,t,r)=>{const n=r(8311);e.exports=(e,t,r)=>{try{t=new n(t,r)}catch(e){return!1}return t.test(e)}},3927:(e,t,r)=>{const n=r(909);e.exports=(e,t)=>e.sort(((e,r)=>n(e,r,t)))},6953:(e,t,r)=>{const n=r(144);e.exports=(e,t)=>{const r=n(e,t);return r?r.version:null}},9589:(e,t,r)=>{const n=r(9718),o=r(6874),i=r(3908),s=r(1123),a=r(144),c=r(6953),u=r(7414),l=r(3007),f=r(1832),h=r(2938),p=r(6254),d=r(4493),g=r(1729),y=r(560),m=r(9970),b=r(1763),v=r(909),w=r(3927),E=r(4277),x=r(5580),S=r(7059),A=r(4641),I=r(3999),B=r(4089),T=r(5200),P=r(2111),C=r(6170),_=r(3904),R=r(8311),O=r(7638),k=r(7631),N=r(9628),L=r(270),j=r(1261),M=r(3874),$=r(7075),U=r(5571),F=r(5342),D=r(6780),H=r(2525),z=r(5032);e.exports={parse:a,valid:c,clean:u,inc:l,diff:f,major:h,minor:p,patch:d,prerelease:g,compare:y,rcompare:m,compareLoose:b,compareBuild:v,sort:w,rsort:E,gt:x,lt:S,eq:A,neq:I,gte:B,lte:T,cmp:P,coerce:C,Comparator:_,Range:R,satisfies:O,toComparators:k,maxSatisfying:N,minSatisfying:L,minVersion:j,validRange:M,outside:$,gtr:U,ltr:F,intersects:D,simplifyRange:H,subset:z,SemVer:i,re:n.re,src:n.src,tokens:n.t,SEMVER_SPEC_VERSION:o.SEMVER_SPEC_VERSION,RELEASE_TYPES:o.RELEASE_TYPES,compareIdentifiers:s.compareIdentifiers,rcompareIdentifiers:s.rcompareIdentifiers}},6874:e=>{const t=Number.MAX_SAFE_INTEGER||9007199254740991;e.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_INTEGER:t,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}},7272:e=>{const t="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};e.exports=t},1123:e=>{const t=/^[0-9]+$/,r=(e,r)=>{const n=t.test(e),o=t.test(r);return n&&o&&(e=+e,r=+r),e===r?0:n&&!o?-1:o&&!n?1:er(t,e)}},8587:e=>{const t=Object.freeze({loose:!0}),r=Object.freeze({});e.exports=e=>e?"object"!=typeof e?t:e:r},9718:(e,t,r)=>{const{MAX_SAFE_COMPONENT_LENGTH:n}=r(6874),o=r(7272),i=(t=e.exports={}).re=[],s=t.safeRe=[],a=t.src=[],c=t.t={};let u=0;const l=(e,t,r)=>{const n=t.split("\\s*").join("\\s{0,1}").split("\\s+").join("\\s"),l=u++;o(e,l,t),c[e]=l,a[l]=t,i[l]=new RegExp(t,r?"g":void 0),s[l]=new RegExp(n,r?"g":void 0)};l("NUMERICIDENTIFIER","0|[1-9]\\d*"),l("NUMERICIDENTIFIERLOOSE","[0-9]+"),l("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),l("MAINVERSION",`(${a[c.NUMERICIDENTIFIER]})\\.(${a[c.NUMERICIDENTIFIER]})\\.(${a[c.NUMERICIDENTIFIER]})`),l("MAINVERSIONLOOSE",`(${a[c.NUMERICIDENTIFIERLOOSE]})\\.(${a[c.NUMERICIDENTIFIERLOOSE]})\\.(${a[c.NUMERICIDENTIFIERLOOSE]})`),l("PRERELEASEIDENTIFIER",`(?:${a[c.NUMERICIDENTIFIER]}|${a[c.NONNUMERICIDENTIFIER]})`),l("PRERELEASEIDENTIFIERLOOSE",`(?:${a[c.NUMERICIDENTIFIERLOOSE]}|${a[c.NONNUMERICIDENTIFIER]})`),l("PRERELEASE",`(?:-(${a[c.PRERELEASEIDENTIFIER]}(?:\\.${a[c.PRERELEASEIDENTIFIER]})*))`),l("PRERELEASELOOSE",`(?:-?(${a[c.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${a[c.PRERELEASEIDENTIFIERLOOSE]})*))`),l("BUILDIDENTIFIER","[0-9A-Za-z-]+"),l("BUILD",`(?:\\+(${a[c.BUILDIDENTIFIER]}(?:\\.${a[c.BUILDIDENTIFIER]})*))`),l("FULLPLAIN",`v?${a[c.MAINVERSION]}${a[c.PRERELEASE]}?${a[c.BUILD]}?`),l("FULL",`^${a[c.FULLPLAIN]}$`),l("LOOSEPLAIN",`[v=\\s]*${a[c.MAINVERSIONLOOSE]}${a[c.PRERELEASELOOSE]}?${a[c.BUILD]}?`),l("LOOSE",`^${a[c.LOOSEPLAIN]}$`),l("GTLT","((?:<|>)?=?)"),l("XRANGEIDENTIFIERLOOSE",`${a[c.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),l("XRANGEIDENTIFIER",`${a[c.NUMERICIDENTIFIER]}|x|X|\\*`),l("XRANGEPLAIN",`[v=\\s]*(${a[c.XRANGEIDENTIFIER]})(?:\\.(${a[c.XRANGEIDENTIFIER]})(?:\\.(${a[c.XRANGEIDENTIFIER]})(?:${a[c.PRERELEASE]})?${a[c.BUILD]}?)?)?`),l("XRANGEPLAINLOOSE",`[v=\\s]*(${a[c.XRANGEIDENTIFIERLOOSE]})(?:\\.(${a[c.XRANGEIDENTIFIERLOOSE]})(?:\\.(${a[c.XRANGEIDENTIFIERLOOSE]})(?:${a[c.PRERELEASELOOSE]})?${a[c.BUILD]}?)?)?`),l("XRANGE",`^${a[c.GTLT]}\\s*${a[c.XRANGEPLAIN]}$`),l("XRANGELOOSE",`^${a[c.GTLT]}\\s*${a[c.XRANGEPLAINLOOSE]}$`),l("COERCE",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?(?:$|[^\\d])`),l("COERCERTL",a[c.COERCE],!0),l("LONETILDE","(?:~>?)"),l("TILDETRIM",`(\\s*)${a[c.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",l("TILDE",`^${a[c.LONETILDE]}${a[c.XRANGEPLAIN]}$`),l("TILDELOOSE",`^${a[c.LONETILDE]}${a[c.XRANGEPLAINLOOSE]}$`),l("LONECARET","(?:\\^)"),l("CARETTRIM",`(\\s*)${a[c.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",l("CARET",`^${a[c.LONECARET]}${a[c.XRANGEPLAIN]}$`),l("CARETLOOSE",`^${a[c.LONECARET]}${a[c.XRANGEPLAINLOOSE]}$`),l("COMPARATORLOOSE",`^${a[c.GTLT]}\\s*(${a[c.LOOSEPLAIN]})$|^$`),l("COMPARATOR",`^${a[c.GTLT]}\\s*(${a[c.FULLPLAIN]})$|^$`),l("COMPARATORTRIM",`(\\s*)${a[c.GTLT]}\\s*(${a[c.LOOSEPLAIN]}|${a[c.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",l("HYPHENRANGE",`^\\s*(${a[c.XRANGEPLAIN]})\\s+-\\s+(${a[c.XRANGEPLAIN]})\\s*$`),l("HYPHENRANGELOOSE",`^\\s*(${a[c.XRANGEPLAINLOOSE]})\\s+-\\s+(${a[c.XRANGEPLAINLOOSE]})\\s*$`),l("STAR","(<|>)?=?\\s*\\*"),l("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),l("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},8357:(e,t,r)=>{"use strict";const n=r(8799),o=Symbol("max"),i=Symbol("length"),s=Symbol("lengthCalculator"),a=Symbol("allowStale"),c=Symbol("maxAge"),u=Symbol("dispose"),l=Symbol("noDisposeOnSet"),f=Symbol("lruList"),h=Symbol("cache"),p=Symbol("updateAgeOnGet"),d=()=>1,g=(e,t,r)=>{const n=e[h].get(t);if(n){const t=n.value;if(y(e,t)){if(b(e,n),!e[a])return}else r&&(e[p]&&(n.value.now=Date.now()),e[f].unshiftNode(n));return t.value}},y=(e,t)=>{if(!t||!t.maxAge&&!e[c])return!1;const r=Date.now()-t.now;return t.maxAge?r>t.maxAge:e[c]&&r>e[c]},m=e=>{if(e[i]>e[o])for(let t=e[f].tail;e[i]>e[o]&&null!==t;){const r=t.prev;b(e,t),t=r}},b=(e,t)=>{if(t){const r=t.value;e[u]&&e[u](r.key,r.value),e[i]-=r.length,e[h].delete(r.key),e[f].removeNode(t)}};class v{constructor(e,t,r,n,o){this.key=e,this.value=t,this.length=r,this.now=n,this.maxAge=o||0}}const w=(e,t,r,n)=>{let o=r.value;y(e,o)&&(b(e,r),e[a]||(o=void 0)),o&&t.call(n,o.value,o.key,e)};e.exports=class{constructor(e){if("number"==typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!=typeof e.max||e.max<0))throw new TypeError("max must be a non-negative number");this[o]=e.max||1/0;const t=e.length||d;if(this[s]="function"!=typeof t?d:t,this[a]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw new TypeError("maxAge must be a number");this[c]=e.maxAge||0,this[u]=e.dispose,this[l]=e.noDisposeOnSet||!1,this[p]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[o]=e||1/0,m(this)}get max(){return this[o]}set allowStale(e){this[a]=!!e}get allowStale(){return this[a]}set maxAge(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[c]=e,m(this)}get maxAge(){return this[c]}set lengthCalculator(e){"function"!=typeof e&&(e=d),e!==this[s]&&(this[s]=e,this[i]=0,this[f].forEach((e=>{e.length=this[s](e.value,e.key),this[i]+=e.length}))),m(this)}get lengthCalculator(){return this[s]}get length(){return this[i]}get itemCount(){return this[f].length}rforEach(e,t){t=t||this;for(let r=this[f].tail;null!==r;){const n=r.prev;w(this,e,r,t),r=n}}forEach(e,t){t=t||this;for(let r=this[f].head;null!==r;){const n=r.next;w(this,e,r,t),r=n}}keys(){return this[f].toArray().map((e=>e.key))}values(){return this[f].toArray().map((e=>e.value))}reset(){this[u]&&this[f]&&this[f].length&&this[f].forEach((e=>this[u](e.key,e.value))),this[h]=new Map,this[f]=new n,this[i]=0}dump(){return this[f].map((e=>!y(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[f]}set(e,t,r){if((r=r||this[c])&&"number"!=typeof r)throw new TypeError("maxAge must be a number");const n=r?Date.now():0,a=this[s](t,e);if(this[h].has(e)){if(a>this[o])return b(this,this[h].get(e)),!1;const s=this[h].get(e).value;return this[u]&&(this[l]||this[u](e,s.value)),s.now=n,s.maxAge=r,s.value=t,this[i]+=a-s.length,s.length=a,this.get(e),m(this),!0}const p=new v(e,t,a,n,r);return p.length>this[o]?(this[u]&&this[u](e,t),!1):(this[i]+=p.length,this[f].unshift(p),this[h].set(e,this[f].head),m(this),!0)}has(e){if(!this[h].has(e))return!1;const t=this[h].get(e).value;return!y(this,t)}get(e){return g(this,e,!0)}peek(e){return g(this,e,!1)}pop(){const e=this[f].tail;return e?(b(this,e),e.value):null}del(e){b(this,this[h].get(e))}load(e){this.reset();const t=Date.now();for(let r=e.length-1;r>=0;r--){const n=e[r],o=n.e||0;if(0===o)this.set(n.k,n.v);else{const e=o-t;e>0&&this.set(n.k,n.v,e)}}}prune(){this[h].forEach(((e,t)=>g(this,t,!1)))}}},5571:(e,t,r)=>{const n=r(7075);e.exports=(e,t,r)=>n(e,t,">",r)},6780:(e,t,r)=>{const n=r(8311);e.exports=(e,t,r)=>(e=new n(e,r),t=new n(t,r),e.intersects(t,r))},5342:(e,t,r)=>{const n=r(7075);e.exports=(e,t,r)=>n(e,t,"<",r)},9628:(e,t,r)=>{const n=r(3908),o=r(8311);e.exports=(e,t,r)=>{let i=null,s=null,a=null;try{a=new o(t,r)}catch(e){return null}return e.forEach((e=>{a.test(e)&&(i&&-1!==s.compare(e)||(i=e,s=new n(i,r)))})),i}},270:(e,t,r)=>{const n=r(3908),o=r(8311);e.exports=(e,t,r)=>{let i=null,s=null,a=null;try{a=new o(t,r)}catch(e){return null}return e.forEach((e=>{a.test(e)&&(i&&1!==s.compare(e)||(i=e,s=new n(i,r)))})),i}},1261:(e,t,r)=>{const n=r(3908),o=r(8311),i=r(5580);e.exports=(e,t)=>{e=new o(e,t);let r=new n("0.0.0");if(e.test(r))return r;if(r=new n("0.0.0-0"),e.test(r))return r;r=null;for(let t=0;t{const t=new n(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":s&&!i(t,s)||(s=t);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}})),!s||r&&!i(r,s)||(r=s)}return r&&e.test(r)?r:null}},7075:(e,t,r)=>{const n=r(3908),o=r(3904),{ANY:i}=o,s=r(8311),a=r(7638),c=r(5580),u=r(7059),l=r(5200),f=r(4089);e.exports=(e,t,r,h)=>{let p,d,g,y,m;switch(e=new n(e,h),t=new s(t,h),r){case">":p=c,d=l,g=u,y=">",m=">=";break;case"<":p=u,d=f,g=c,y="<",m="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(a(e,t,h))return!1;for(let r=0;r{e.semver===i&&(e=new o(">=0.0.0")),s=s||e,a=a||e,p(e.semver,s.semver,h)?s=e:g(e.semver,a.semver,h)&&(a=e)})),s.operator===y||s.operator===m)return!1;if((!a.operator||a.operator===y)&&d(e,a.semver))return!1;if(a.operator===m&&g(e,a.semver))return!1}return!0}},2525:(e,t,r)=>{const n=r(7638),o=r(560);e.exports=(e,t,r)=>{const i=[];let s=null,a=null;const c=e.sort(((e,t)=>o(e,t,r)));for(const e of c)n(e,t,r)?(a=e,s||(s=e)):(a&&i.push([s,a]),a=null,s=null);s&&i.push([s,null]);const u=[];for(const[e,t]of i)e===t?u.push(e):t||e!==c[0]?t?e===c[0]?u.push(`<=${t}`):u.push(`${e} - ${t}`):u.push(`>=${e}`):u.push("*");const l=u.join(" || "),f="string"==typeof t.raw?t.raw:String(t);return l.length{const n=r(8311),o=r(3904),{ANY:i}=o,s=r(7638),a=r(560),c=[new o(">=0.0.0-0")],u=[new o(">=0.0.0")],l=(e,t,r)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===i){if(1===t.length&&t[0].semver===i)return!0;e=r.includePrerelease?c:u}if(1===t.length&&t[0].semver===i){if(r.includePrerelease)return!0;t=u}const n=new Set;let o,l,p,d,g,y,m;for(const t of e)">"===t.operator||">="===t.operator?o=f(o,t,r):"<"===t.operator||"<="===t.operator?l=h(l,t,r):n.add(t.semver);if(n.size>1)return null;if(o&&l){if(p=a(o.semver,l.semver,r),p>0)return null;if(0===p&&(">="!==o.operator||"<="!==l.operator))return null}for(const e of n){if(o&&!s(e,String(o),r))return null;if(l&&!s(e,String(l),r))return null;for(const n of t)if(!s(e,String(n),r))return!1;return!0}let b=!(!l||r.includePrerelease||!l.semver.prerelease.length)&&l.semver,v=!(!o||r.includePrerelease||!o.semver.prerelease.length)&&o.semver;b&&1===b.prerelease.length&&"<"===l.operator&&0===b.prerelease[0]&&(b=!1);for(const e of t){if(m=m||">"===e.operator||">="===e.operator,y=y||"<"===e.operator||"<="===e.operator,o)if(v&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===v.major&&e.semver.minor===v.minor&&e.semver.patch===v.patch&&(v=!1),">"===e.operator||">="===e.operator){if(d=f(o,e,r),d===e&&d!==o)return!1}else if(">="===o.operator&&!s(o.semver,String(e),r))return!1;if(l)if(b&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===b.major&&e.semver.minor===b.minor&&e.semver.patch===b.patch&&(b=!1),"<"===e.operator||"<="===e.operator){if(g=h(l,e,r),g===e&&g!==l)return!1}else if("<="===l.operator&&!s(l.semver,String(e),r))return!1;if(!e.operator&&(l||o)&&0!==p)return!1}return!(o&&y&&!l&&0!==p||l&&m&&!o&&0!==p||v||b)},f=(e,t,r)=>{if(!e)return t;const n=a(e.semver,t.semver,r);return n>0?e:n<0||">"===t.operator&&">="===e.operator?t:e},h=(e,t,r)=>{if(!e)return t;const n=a(e.semver,t.semver,r);return n<0?e:n>0||"<"===t.operator&&"<="===e.operator?t:e};e.exports=(e,t,r={})=>{if(e===t)return!0;e=new n(e,r),t=new n(t,r);let o=!1;e:for(const n of e.set){for(const e of t.set){const t=l(n,e,r);if(o=o||null!==t,t)continue e}if(o)return!1}return!0}},7631:(e,t,r)=>{const n=r(8311);e.exports=(e,t)=>new n(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")))},3874:(e,t,r)=>{const n=r(8311);e.exports=(e,t)=>{try{return new n(e,t).range||"*"}catch(e){return null}}},6386:function(e){!function(t,r){"use strict";e.exports?e.exports=r():(t.nacl||(t.nacl={}),t.nacl.util=r())}(this,(function(){"use strict";var e={};function t(e){if(!/^(?:[A-Za-z0-9+\/]{2}[A-Za-z0-9+\/]{2})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.test(e))throw new TypeError("invalid encoding")}return e.decodeUTF8=function(e){if("string"!=typeof e)throw new TypeError("expected string");var t,r=unescape(encodeURIComponent(e)),n=new Uint8Array(r.length);for(t=0;t{!function(e){"use strict";var t=function(e){var t,r=new Float64Array(16);if(e)for(t=0;t>24&255,e[t+1]=r>>16&255,e[t+2]=r>>8&255,e[t+3]=255&r,e[t+4]=n>>24&255,e[t+5]=n>>16&255,e[t+6]=n>>8&255,e[t+7]=255&n}function g(e,t,r,n,o){var i,s=0;for(i=0;i>>8)-1}function y(e,t,r,n){return g(e,t,r,n,16)}function m(e,t,r,n){return g(e,t,r,n,32)}function b(e,t,r,n){!function(e,t,r,n){for(var o,i=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,s=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,a=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,c=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,u=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,l=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,f=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,h=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,p=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,d=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,g=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,y=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,m=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,b=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,v=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,w=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,E=i,x=s,S=a,A=c,I=u,B=l,T=f,P=h,C=p,_=d,R=g,O=y,k=m,N=b,L=v,j=w,M=0;M<20;M+=2)E^=(o=(k^=(o=(C^=(o=(I^=(o=E+k|0)<<7|o>>>25)+E|0)<<9|o>>>23)+I|0)<<13|o>>>19)+C|0)<<18|o>>>14,B^=(o=(x^=(o=(N^=(o=(_^=(o=B+x|0)<<7|o>>>25)+B|0)<<9|o>>>23)+_|0)<<13|o>>>19)+N|0)<<18|o>>>14,R^=(o=(T^=(o=(S^=(o=(L^=(o=R+T|0)<<7|o>>>25)+R|0)<<9|o>>>23)+L|0)<<13|o>>>19)+S|0)<<18|o>>>14,j^=(o=(O^=(o=(P^=(o=(A^=(o=j+O|0)<<7|o>>>25)+j|0)<<9|o>>>23)+A|0)<<13|o>>>19)+P|0)<<18|o>>>14,E^=(o=(A^=(o=(S^=(o=(x^=(o=E+A|0)<<7|o>>>25)+E|0)<<9|o>>>23)+x|0)<<13|o>>>19)+S|0)<<18|o>>>14,B^=(o=(I^=(o=(P^=(o=(T^=(o=B+I|0)<<7|o>>>25)+B|0)<<9|o>>>23)+T|0)<<13|o>>>19)+P|0)<<18|o>>>14,R^=(o=(_^=(o=(C^=(o=(O^=(o=R+_|0)<<7|o>>>25)+R|0)<<9|o>>>23)+O|0)<<13|o>>>19)+C|0)<<18|o>>>14,j^=(o=(L^=(o=(N^=(o=(k^=(o=j+L|0)<<7|o>>>25)+j|0)<<9|o>>>23)+k|0)<<13|o>>>19)+N|0)<<18|o>>>14;E=E+i|0,x=x+s|0,S=S+a|0,A=A+c|0,I=I+u|0,B=B+l|0,T=T+f|0,P=P+h|0,C=C+p|0,_=_+d|0,R=R+g|0,O=O+y|0,k=k+m|0,N=N+b|0,L=L+v|0,j=j+w|0,e[0]=E>>>0&255,e[1]=E>>>8&255,e[2]=E>>>16&255,e[3]=E>>>24&255,e[4]=x>>>0&255,e[5]=x>>>8&255,e[6]=x>>>16&255,e[7]=x>>>24&255,e[8]=S>>>0&255,e[9]=S>>>8&255,e[10]=S>>>16&255,e[11]=S>>>24&255,e[12]=A>>>0&255,e[13]=A>>>8&255,e[14]=A>>>16&255,e[15]=A>>>24&255,e[16]=I>>>0&255,e[17]=I>>>8&255,e[18]=I>>>16&255,e[19]=I>>>24&255,e[20]=B>>>0&255,e[21]=B>>>8&255,e[22]=B>>>16&255,e[23]=B>>>24&255,e[24]=T>>>0&255,e[25]=T>>>8&255,e[26]=T>>>16&255,e[27]=T>>>24&255,e[28]=P>>>0&255,e[29]=P>>>8&255,e[30]=P>>>16&255,e[31]=P>>>24&255,e[32]=C>>>0&255,e[33]=C>>>8&255,e[34]=C>>>16&255,e[35]=C>>>24&255,e[36]=_>>>0&255,e[37]=_>>>8&255,e[38]=_>>>16&255,e[39]=_>>>24&255,e[40]=R>>>0&255,e[41]=R>>>8&255,e[42]=R>>>16&255,e[43]=R>>>24&255,e[44]=O>>>0&255,e[45]=O>>>8&255,e[46]=O>>>16&255,e[47]=O>>>24&255,e[48]=k>>>0&255,e[49]=k>>>8&255,e[50]=k>>>16&255,e[51]=k>>>24&255,e[52]=N>>>0&255,e[53]=N>>>8&255,e[54]=N>>>16&255,e[55]=N>>>24&255,e[56]=L>>>0&255,e[57]=L>>>8&255,e[58]=L>>>16&255,e[59]=L>>>24&255,e[60]=j>>>0&255,e[61]=j>>>8&255,e[62]=j>>>16&255,e[63]=j>>>24&255}(e,t,r,n)}function v(e,t,r,n){!function(e,t,r,n){for(var o,i=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,s=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,a=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,c=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,u=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,l=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,f=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,h=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,p=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,d=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,g=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,y=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,m=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,b=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,v=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,w=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,E=0;E<20;E+=2)i^=(o=(m^=(o=(p^=(o=(u^=(o=i+m|0)<<7|o>>>25)+i|0)<<9|o>>>23)+u|0)<<13|o>>>19)+p|0)<<18|o>>>14,l^=(o=(s^=(o=(b^=(o=(d^=(o=l+s|0)<<7|o>>>25)+l|0)<<9|o>>>23)+d|0)<<13|o>>>19)+b|0)<<18|o>>>14,g^=(o=(f^=(o=(a^=(o=(v^=(o=g+f|0)<<7|o>>>25)+g|0)<<9|o>>>23)+v|0)<<13|o>>>19)+a|0)<<18|o>>>14,w^=(o=(y^=(o=(h^=(o=(c^=(o=w+y|0)<<7|o>>>25)+w|0)<<9|o>>>23)+c|0)<<13|o>>>19)+h|0)<<18|o>>>14,i^=(o=(c^=(o=(a^=(o=(s^=(o=i+c|0)<<7|o>>>25)+i|0)<<9|o>>>23)+s|0)<<13|o>>>19)+a|0)<<18|o>>>14,l^=(o=(u^=(o=(h^=(o=(f^=(o=l+u|0)<<7|o>>>25)+l|0)<<9|o>>>23)+f|0)<<13|o>>>19)+h|0)<<18|o>>>14,g^=(o=(d^=(o=(p^=(o=(y^=(o=g+d|0)<<7|o>>>25)+g|0)<<9|o>>>23)+y|0)<<13|o>>>19)+p|0)<<18|o>>>14,w^=(o=(v^=(o=(b^=(o=(m^=(o=w+v|0)<<7|o>>>25)+w|0)<<9|o>>>23)+m|0)<<13|o>>>19)+b|0)<<18|o>>>14;e[0]=i>>>0&255,e[1]=i>>>8&255,e[2]=i>>>16&255,e[3]=i>>>24&255,e[4]=l>>>0&255,e[5]=l>>>8&255,e[6]=l>>>16&255,e[7]=l>>>24&255,e[8]=g>>>0&255,e[9]=g>>>8&255,e[10]=g>>>16&255,e[11]=g>>>24&255,e[12]=w>>>0&255,e[13]=w>>>8&255,e[14]=w>>>16&255,e[15]=w>>>24&255,e[16]=f>>>0&255,e[17]=f>>>8&255,e[18]=f>>>16&255,e[19]=f>>>24&255,e[20]=h>>>0&255,e[21]=h>>>8&255,e[22]=h>>>16&255,e[23]=h>>>24&255,e[24]=p>>>0&255,e[25]=p>>>8&255,e[26]=p>>>16&255,e[27]=p>>>24&255,e[28]=d>>>0&255,e[29]=d>>>8&255,e[30]=d>>>16&255,e[31]=d>>>24&255}(e,t,r,n)}var w=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function E(e,t,r,n,o,i,s){var a,c,u=new Uint8Array(16),l=new Uint8Array(64);for(c=0;c<16;c++)u[c]=0;for(c=0;c<8;c++)u[c]=i[c];for(;o>=64;){for(b(l,u,s,w),c=0;c<64;c++)e[t+c]=r[n+c]^l[c];for(a=1,c=8;c<16;c++)a=a+(255&u[c])|0,u[c]=255&a,a>>>=8;o-=64,t+=64,n+=64}if(o>0)for(b(l,u,s,w),c=0;c=64;){for(b(c,a,o,w),s=0;s<64;s++)e[t+s]=c[s];for(i=1,s=8;s<16;s++)i=i+(255&a[s])|0,a[s]=255&i,i>>>=8;r-=64,t+=64}if(r>0)for(b(c,a,o,w),s=0;s>>13|r<<3),n=255&e[4]|(255&e[5])<<8,this.r[2]=7939&(r>>>10|n<<6),o=255&e[6]|(255&e[7])<<8,this.r[3]=8191&(n>>>7|o<<9),i=255&e[8]|(255&e[9])<<8,this.r[4]=255&(o>>>4|i<<12),this.r[5]=i>>>1&8190,s=255&e[10]|(255&e[11])<<8,this.r[6]=8191&(i>>>14|s<<2),a=255&e[12]|(255&e[13])<<8,this.r[7]=8065&(s>>>11|a<<5),c=255&e[14]|(255&e[15])<<8,this.r[8]=8191&(a>>>8|c<<8),this.r[9]=c>>>5&127,this.pad[0]=255&e[16]|(255&e[17])<<8,this.pad[1]=255&e[18]|(255&e[19])<<8,this.pad[2]=255&e[20]|(255&e[21])<<8,this.pad[3]=255&e[22]|(255&e[23])<<8,this.pad[4]=255&e[24]|(255&e[25])<<8,this.pad[5]=255&e[26]|(255&e[27])<<8,this.pad[6]=255&e[28]|(255&e[29])<<8,this.pad[7]=255&e[30]|(255&e[31])<<8};function B(e,t,r,n,o,i){var s=new I(i);return s.update(r,n,o),s.finish(e,t),0}function T(e,t,r,n,o,i){var s=new Uint8Array(16);return B(s,0,r,n,o,i),y(e,t,s,0)}function P(e,t,r,n,o){var i;if(r<32)return-1;for(A(e,0,t,0,r,n,o),B(e,16,e,32,r-32,e),i=0;i<16;i++)e[i]=0;return 0}function C(e,t,r,n,o){var i,s=new Uint8Array(32);if(r<32)return-1;if(S(s,0,32,n,o),0!==T(t,16,t,32,r-32,s))return-1;for(A(e,0,t,0,r,n,o),i=0;i<32;i++)e[i]=0;return 0}function _(e,t){var r;for(r=0;r<16;r++)e[r]=0|t[r]}function R(e){var t,r,n=1;for(t=0;t<16;t++)r=e[t]+n+65535,n=Math.floor(r/65536),e[t]=r-65536*n;e[0]+=n-1+37*(n-1)}function O(e,t,r){for(var n,o=~(r-1),i=0;i<16;i++)n=o&(e[i]^t[i]),e[i]^=n,t[i]^=n}function k(e,r){var n,o,i,s=t(),a=t();for(n=0;n<16;n++)a[n]=r[n];for(R(a),R(a),R(a),o=0;o<2;o++){for(s[0]=a[0]-65517,n=1;n<15;n++)s[n]=a[n]-65535-(s[n-1]>>16&1),s[n-1]&=65535;s[15]=a[15]-32767-(s[14]>>16&1),i=s[15]>>16&1,s[14]&=65535,O(a,s,1-i)}for(n=0;n<16;n++)e[2*n]=255&a[n],e[2*n+1]=a[n]>>8}function N(e,t){var r=new Uint8Array(32),n=new Uint8Array(32);return k(r,e),k(n,t),m(r,0,n,0)}function L(e){var t=new Uint8Array(32);return k(t,e),1&t[0]}function j(e,t){var r;for(r=0;r<16;r++)e[r]=t[2*r]+(t[2*r+1]<<8);e[15]&=32767}function M(e,t,r){for(var n=0;n<16;n++)e[n]=t[n]+r[n]}function $(e,t,r){for(var n=0;n<16;n++)e[n]=t[n]-r[n]}function U(e,t,r){var n,o,i=0,s=0,a=0,c=0,u=0,l=0,f=0,h=0,p=0,d=0,g=0,y=0,m=0,b=0,v=0,w=0,E=0,x=0,S=0,A=0,I=0,B=0,T=0,P=0,C=0,_=0,R=0,O=0,k=0,N=0,L=0,j=r[0],M=r[1],$=r[2],U=r[3],F=r[4],D=r[5],H=r[6],z=r[7],G=r[8],V=r[9],Z=r[10],Y=r[11],W=r[12],J=r[13],q=r[14],K=r[15];i+=(n=t[0])*j,s+=n*M,a+=n*$,c+=n*U,u+=n*F,l+=n*D,f+=n*H,h+=n*z,p+=n*G,d+=n*V,g+=n*Z,y+=n*Y,m+=n*W,b+=n*J,v+=n*q,w+=n*K,s+=(n=t[1])*j,a+=n*M,c+=n*$,u+=n*U,l+=n*F,f+=n*D,h+=n*H,p+=n*z,d+=n*G,g+=n*V,y+=n*Z,m+=n*Y,b+=n*W,v+=n*J,w+=n*q,E+=n*K,a+=(n=t[2])*j,c+=n*M,u+=n*$,l+=n*U,f+=n*F,h+=n*D,p+=n*H,d+=n*z,g+=n*G,y+=n*V,m+=n*Z,b+=n*Y,v+=n*W,w+=n*J,E+=n*q,x+=n*K,c+=(n=t[3])*j,u+=n*M,l+=n*$,f+=n*U,h+=n*F,p+=n*D,d+=n*H,g+=n*z,y+=n*G,m+=n*V,b+=n*Z,v+=n*Y,w+=n*W,E+=n*J,x+=n*q,S+=n*K,u+=(n=t[4])*j,l+=n*M,f+=n*$,h+=n*U,p+=n*F,d+=n*D,g+=n*H,y+=n*z,m+=n*G,b+=n*V,v+=n*Z,w+=n*Y,E+=n*W,x+=n*J,S+=n*q,A+=n*K,l+=(n=t[5])*j,f+=n*M,h+=n*$,p+=n*U,d+=n*F,g+=n*D,y+=n*H,m+=n*z,b+=n*G,v+=n*V,w+=n*Z,E+=n*Y,x+=n*W,S+=n*J,A+=n*q,I+=n*K,f+=(n=t[6])*j,h+=n*M,p+=n*$,d+=n*U,g+=n*F,y+=n*D,m+=n*H,b+=n*z,v+=n*G,w+=n*V,E+=n*Z,x+=n*Y,S+=n*W,A+=n*J,I+=n*q,B+=n*K,h+=(n=t[7])*j,p+=n*M,d+=n*$,g+=n*U,y+=n*F,m+=n*D,b+=n*H,v+=n*z,w+=n*G,E+=n*V,x+=n*Z,S+=n*Y,A+=n*W,I+=n*J,B+=n*q,T+=n*K,p+=(n=t[8])*j,d+=n*M,g+=n*$,y+=n*U,m+=n*F,b+=n*D,v+=n*H,w+=n*z,E+=n*G,x+=n*V,S+=n*Z,A+=n*Y,I+=n*W,B+=n*J,T+=n*q,P+=n*K,d+=(n=t[9])*j,g+=n*M,y+=n*$,m+=n*U,b+=n*F,v+=n*D,w+=n*H,E+=n*z,x+=n*G,S+=n*V,A+=n*Z,I+=n*Y,B+=n*W,T+=n*J,P+=n*q,C+=n*K,g+=(n=t[10])*j,y+=n*M,m+=n*$,b+=n*U,v+=n*F,w+=n*D,E+=n*H,x+=n*z,S+=n*G,A+=n*V,I+=n*Z,B+=n*Y,T+=n*W,P+=n*J,C+=n*q,_+=n*K,y+=(n=t[11])*j,m+=n*M,b+=n*$,v+=n*U,w+=n*F,E+=n*D,x+=n*H,S+=n*z,A+=n*G,I+=n*V,B+=n*Z,T+=n*Y,P+=n*W,C+=n*J,_+=n*q,R+=n*K,m+=(n=t[12])*j,b+=n*M,v+=n*$,w+=n*U,E+=n*F,x+=n*D,S+=n*H,A+=n*z,I+=n*G,B+=n*V,T+=n*Z,P+=n*Y,C+=n*W,_+=n*J,R+=n*q,O+=n*K,b+=(n=t[13])*j,v+=n*M,w+=n*$,E+=n*U,x+=n*F,S+=n*D,A+=n*H,I+=n*z,B+=n*G,T+=n*V,P+=n*Z,C+=n*Y,_+=n*W,R+=n*J,O+=n*q,k+=n*K,v+=(n=t[14])*j,w+=n*M,E+=n*$,x+=n*U,S+=n*F,A+=n*D,I+=n*H,B+=n*z,T+=n*G,P+=n*V,C+=n*Z,_+=n*Y,R+=n*W,O+=n*J,k+=n*q,N+=n*K,w+=(n=t[15])*j,s+=38*(x+=n*$),a+=38*(S+=n*U),c+=38*(A+=n*F),u+=38*(I+=n*D),l+=38*(B+=n*H),f+=38*(T+=n*z),h+=38*(P+=n*G),p+=38*(C+=n*V),d+=38*(_+=n*Z),g+=38*(R+=n*Y),y+=38*(O+=n*W),m+=38*(k+=n*J),b+=38*(N+=n*q),v+=38*(L+=n*K),i=(n=(i+=38*(E+=n*M))+(o=1)+65535)-65536*(o=Math.floor(n/65536)),s=(n=s+o+65535)-65536*(o=Math.floor(n/65536)),a=(n=a+o+65535)-65536*(o=Math.floor(n/65536)),c=(n=c+o+65535)-65536*(o=Math.floor(n/65536)),u=(n=u+o+65535)-65536*(o=Math.floor(n/65536)),l=(n=l+o+65535)-65536*(o=Math.floor(n/65536)),f=(n=f+o+65535)-65536*(o=Math.floor(n/65536)),h=(n=h+o+65535)-65536*(o=Math.floor(n/65536)),p=(n=p+o+65535)-65536*(o=Math.floor(n/65536)),d=(n=d+o+65535)-65536*(o=Math.floor(n/65536)),g=(n=g+o+65535)-65536*(o=Math.floor(n/65536)),y=(n=y+o+65535)-65536*(o=Math.floor(n/65536)),m=(n=m+o+65535)-65536*(o=Math.floor(n/65536)),b=(n=b+o+65535)-65536*(o=Math.floor(n/65536)),v=(n=v+o+65535)-65536*(o=Math.floor(n/65536)),w=(n=w+o+65535)-65536*(o=Math.floor(n/65536)),i=(n=(i+=o-1+37*(o-1))+(o=1)+65535)-65536*(o=Math.floor(n/65536)),s=(n=s+o+65535)-65536*(o=Math.floor(n/65536)),a=(n=a+o+65535)-65536*(o=Math.floor(n/65536)),c=(n=c+o+65535)-65536*(o=Math.floor(n/65536)),u=(n=u+o+65535)-65536*(o=Math.floor(n/65536)),l=(n=l+o+65535)-65536*(o=Math.floor(n/65536)),f=(n=f+o+65535)-65536*(o=Math.floor(n/65536)),h=(n=h+o+65535)-65536*(o=Math.floor(n/65536)),p=(n=p+o+65535)-65536*(o=Math.floor(n/65536)),d=(n=d+o+65535)-65536*(o=Math.floor(n/65536)),g=(n=g+o+65535)-65536*(o=Math.floor(n/65536)),y=(n=y+o+65535)-65536*(o=Math.floor(n/65536)),m=(n=m+o+65535)-65536*(o=Math.floor(n/65536)),b=(n=b+o+65535)-65536*(o=Math.floor(n/65536)),v=(n=v+o+65535)-65536*(o=Math.floor(n/65536)),w=(n=w+o+65535)-65536*(o=Math.floor(n/65536)),i+=o-1+37*(o-1),e[0]=i,e[1]=s,e[2]=a,e[3]=c,e[4]=u,e[5]=l,e[6]=f,e[7]=h,e[8]=p,e[9]=d,e[10]=g,e[11]=y,e[12]=m,e[13]=b,e[14]=v,e[15]=w}function F(e,t){U(e,t,t)}function D(e,r){var n,o=t();for(n=0;n<16;n++)o[n]=r[n];for(n=253;n>=0;n--)F(o,o),2!==n&&4!==n&&U(o,o,r);for(n=0;n<16;n++)e[n]=o[n]}function H(e,r){var n,o=t();for(n=0;n<16;n++)o[n]=r[n];for(n=250;n>=0;n--)F(o,o),1!==n&&U(o,o,r);for(n=0;n<16;n++)e[n]=o[n]}function z(e,r,n){var o,i,s=new Uint8Array(32),a=new Float64Array(80),u=t(),l=t(),f=t(),h=t(),p=t(),d=t();for(i=0;i<31;i++)s[i]=r[i];for(s[31]=127&r[31]|64,s[0]&=248,j(a,n),i=0;i<16;i++)l[i]=a[i],h[i]=u[i]=f[i]=0;for(u[0]=h[0]=1,i=254;i>=0;--i)O(u,l,o=s[i>>>3]>>>(7&i)&1),O(f,h,o),M(p,u,f),$(u,u,f),M(f,l,h),$(l,l,h),F(h,p),F(d,u),U(u,f,u),U(f,l,p),M(p,u,f),$(u,u,f),F(l,u),$(f,h,d),U(u,f,c),M(u,u,h),U(f,f,u),U(u,h,d),U(h,l,a),F(l,p),O(u,l,o),O(f,h,o);for(i=0;i<16;i++)a[i+16]=u[i],a[i+32]=f[i],a[i+48]=l[i],a[i+64]=h[i];var g=a.subarray(32),y=a.subarray(16);return D(g,g),U(y,y,g),k(e,y),0}function G(e,t){return z(e,t,i)}function V(e,t){return n(t,32),G(e,t)}function Z(e,t,r){var n=new Uint8Array(32);return z(n,r,t),v(e,o,n,w)}I.prototype.blocks=function(e,t,r){for(var n,o,i,s,a,c,u,l,f,h,p,d,g,y,m,b,v,w,E,x=this.fin?0:2048,S=this.h[0],A=this.h[1],I=this.h[2],B=this.h[3],T=this.h[4],P=this.h[5],C=this.h[6],_=this.h[7],R=this.h[8],O=this.h[9],k=this.r[0],N=this.r[1],L=this.r[2],j=this.r[3],M=this.r[4],$=this.r[5],U=this.r[6],F=this.r[7],D=this.r[8],H=this.r[9];r>=16;)h=f=0,h+=(S+=8191&(n=255&e[t+0]|(255&e[t+1])<<8))*k,h+=(A+=8191&(n>>>13|(o=255&e[t+2]|(255&e[t+3])<<8)<<3))*(5*H),h+=(I+=8191&(o>>>10|(i=255&e[t+4]|(255&e[t+5])<<8)<<6))*(5*D),h+=(B+=8191&(i>>>7|(s=255&e[t+6]|(255&e[t+7])<<8)<<9))*(5*F),f=(h+=(T+=8191&(s>>>4|(a=255&e[t+8]|(255&e[t+9])<<8)<<12))*(5*U))>>>13,h&=8191,h+=(P+=a>>>1&8191)*(5*$),h+=(C+=8191&(a>>>14|(c=255&e[t+10]|(255&e[t+11])<<8)<<2))*(5*M),h+=(_+=8191&(c>>>11|(u=255&e[t+12]|(255&e[t+13])<<8)<<5))*(5*j),h+=(R+=8191&(u>>>8|(l=255&e[t+14]|(255&e[t+15])<<8)<<8))*(5*L),p=f+=(h+=(O+=l>>>5|x)*(5*N))>>>13,p+=S*N,p+=A*k,p+=I*(5*H),p+=B*(5*D),f=(p+=T*(5*F))>>>13,p&=8191,p+=P*(5*U),p+=C*(5*$),p+=_*(5*M),p+=R*(5*j),f+=(p+=O*(5*L))>>>13,p&=8191,d=f,d+=S*L,d+=A*N,d+=I*k,d+=B*(5*H),f=(d+=T*(5*D))>>>13,d&=8191,d+=P*(5*F),d+=C*(5*U),d+=_*(5*$),d+=R*(5*M),g=f+=(d+=O*(5*j))>>>13,g+=S*j,g+=A*L,g+=I*N,g+=B*k,f=(g+=T*(5*H))>>>13,g&=8191,g+=P*(5*D),g+=C*(5*F),g+=_*(5*U),g+=R*(5*$),y=f+=(g+=O*(5*M))>>>13,y+=S*M,y+=A*j,y+=I*L,y+=B*N,f=(y+=T*k)>>>13,y&=8191,y+=P*(5*H),y+=C*(5*D),y+=_*(5*F),y+=R*(5*U),m=f+=(y+=O*(5*$))>>>13,m+=S*$,m+=A*M,m+=I*j,m+=B*L,f=(m+=T*N)>>>13,m&=8191,m+=P*k,m+=C*(5*H),m+=_*(5*D),m+=R*(5*F),b=f+=(m+=O*(5*U))>>>13,b+=S*U,b+=A*$,b+=I*M,b+=B*j,f=(b+=T*L)>>>13,b&=8191,b+=P*N,b+=C*k,b+=_*(5*H),b+=R*(5*D),v=f+=(b+=O*(5*F))>>>13,v+=S*F,v+=A*U,v+=I*$,v+=B*M,f=(v+=T*j)>>>13,v&=8191,v+=P*L,v+=C*N,v+=_*k,v+=R*(5*H),w=f+=(v+=O*(5*D))>>>13,w+=S*D,w+=A*F,w+=I*U,w+=B*$,f=(w+=T*M)>>>13,w&=8191,w+=P*j,w+=C*L,w+=_*N,w+=R*k,E=f+=(w+=O*(5*H))>>>13,E+=S*H,E+=A*D,E+=I*F,E+=B*U,f=(E+=T*$)>>>13,E&=8191,E+=P*M,E+=C*j,E+=_*L,E+=R*N,S=h=8191&(f=(f=((f+=(E+=O*k)>>>13)<<2)+f|0)+(h&=8191)|0),A=p+=f>>>=13,I=d&=8191,B=g&=8191,T=y&=8191,P=m&=8191,C=b&=8191,_=v&=8191,R=w&=8191,O=E&=8191,t+=16,r-=16;this.h[0]=S,this.h[1]=A,this.h[2]=I,this.h[3]=B,this.h[4]=T,this.h[5]=P,this.h[6]=C,this.h[7]=_,this.h[8]=R,this.h[9]=O},I.prototype.finish=function(e,t){var r,n,o,i,s=new Uint16Array(10);if(this.leftover){for(i=this.leftover,this.buffer[i++]=1;i<16;i++)this.buffer[i]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(r=this.h[1]>>>13,this.h[1]&=8191,i=2;i<10;i++)this.h[i]+=r,r=this.h[i]>>>13,this.h[i]&=8191;for(this.h[0]+=5*r,r=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=r,r=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=r,s[0]=this.h[0]+5,r=s[0]>>>13,s[0]&=8191,i=1;i<10;i++)s[i]=this.h[i]+r,r=s[i]>>>13,s[i]&=8191;for(s[9]-=8192,n=(1^r)-1,i=0;i<10;i++)s[i]&=n;for(n=~n,i=0;i<10;i++)this.h[i]=this.h[i]&n|s[i];for(this.h[0]=65535&(this.h[0]|this.h[1]<<13),this.h[1]=65535&(this.h[1]>>>3|this.h[2]<<10),this.h[2]=65535&(this.h[2]>>>6|this.h[3]<<7),this.h[3]=65535&(this.h[3]>>>9|this.h[4]<<4),this.h[4]=65535&(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14),this.h[5]=65535&(this.h[6]>>>2|this.h[7]<<11),this.h[6]=65535&(this.h[7]>>>5|this.h[8]<<8),this.h[7]=65535&(this.h[8]>>>8|this.h[9]<<5),o=this.h[0]+this.pad[0],this.h[0]=65535&o,i=1;i<8;i++)o=(this.h[i]+this.pad[i]|0)+(o>>>16)|0,this.h[i]=65535&o;e[t+0]=this.h[0]>>>0&255,e[t+1]=this.h[0]>>>8&255,e[t+2]=this.h[1]>>>0&255,e[t+3]=this.h[1]>>>8&255,e[t+4]=this.h[2]>>>0&255,e[t+5]=this.h[2]>>>8&255,e[t+6]=this.h[3]>>>0&255,e[t+7]=this.h[3]>>>8&255,e[t+8]=this.h[4]>>>0&255,e[t+9]=this.h[4]>>>8&255,e[t+10]=this.h[5]>>>0&255,e[t+11]=this.h[5]>>>8&255,e[t+12]=this.h[6]>>>0&255,e[t+13]=this.h[6]>>>8&255,e[t+14]=this.h[7]>>>0&255,e[t+15]=this.h[7]>>>8&255},I.prototype.update=function(e,t,r){var n,o;if(this.leftover){for((o=16-this.leftover)>r&&(o=r),n=0;n=16&&(o=r-r%16,this.blocks(e,t,o),t+=o,r-=o),r){for(n=0;n=128;){for(x=0;x<16;x++)S=8*x+W,_[x]=r[S+0]<<24|r[S+1]<<16|r[S+2]<<8|r[S+3],R[x]=r[S+4]<<24|r[S+5]<<16|r[S+6]<<8|r[S+7];for(x=0;x<80;x++)if(o=O,i=k,s=N,a=L,c=j,u=M,l=$,h=F,p=D,d=H,g=z,y=G,m=V,b=Z,B=65535&(I=Y),T=I>>>16,P=65535&(A=U),C=A>>>16,B+=65535&(I=(G>>>14|j<<18)^(G>>>18|j<<14)^(j>>>9|G<<23)),T+=I>>>16,P+=65535&(A=(j>>>14|G<<18)^(j>>>18|G<<14)^(G>>>9|j<<23)),C+=A>>>16,B+=65535&(I=G&V^~G&Z),T+=I>>>16,P+=65535&(A=j&M^~j&$),C+=A>>>16,B+=65535&(I=J[2*x+1]),T+=I>>>16,P+=65535&(A=J[2*x]),C+=A>>>16,A=_[x%16],T+=(I=R[x%16])>>>16,P+=65535&A,C+=A>>>16,P+=(T+=(B+=65535&I)>>>16)>>>16,B=65535&(I=E=65535&B|T<<16),T=I>>>16,P=65535&(A=w=65535&P|(C+=P>>>16)<<16),C=A>>>16,B+=65535&(I=(F>>>28|O<<4)^(O>>>2|F<<30)^(O>>>7|F<<25)),T+=I>>>16,P+=65535&(A=(O>>>28|F<<4)^(F>>>2|O<<30)^(F>>>7|O<<25)),C+=A>>>16,T+=(I=F&D^F&H^D&H)>>>16,P+=65535&(A=O&k^O&N^k&N),C+=A>>>16,f=65535&(P+=(T+=(B+=65535&I)>>>16)>>>16)|(C+=P>>>16)<<16,v=65535&B|T<<16,B=65535&(I=g),T=I>>>16,P=65535&(A=a),C=A>>>16,T+=(I=E)>>>16,P+=65535&(A=w),C+=A>>>16,k=o,N=i,L=s,j=a=65535&(P+=(T+=(B+=65535&I)>>>16)>>>16)|(C+=P>>>16)<<16,M=c,$=u,U=l,O=f,D=h,H=p,z=d,G=g=65535&B|T<<16,V=y,Z=m,Y=b,F=v,x%16==15)for(S=0;S<16;S++)A=_[S],B=65535&(I=R[S]),T=I>>>16,P=65535&A,C=A>>>16,A=_[(S+9)%16],B+=65535&(I=R[(S+9)%16]),T+=I>>>16,P+=65535&A,C+=A>>>16,w=_[(S+1)%16],B+=65535&(I=((E=R[(S+1)%16])>>>1|w<<31)^(E>>>8|w<<24)^(E>>>7|w<<25)),T+=I>>>16,P+=65535&(A=(w>>>1|E<<31)^(w>>>8|E<<24)^w>>>7),C+=A>>>16,w=_[(S+14)%16],T+=(I=((E=R[(S+14)%16])>>>19|w<<13)^(w>>>29|E<<3)^(E>>>6|w<<26))>>>16,P+=65535&(A=(w>>>19|E<<13)^(E>>>29|w<<3)^w>>>6),C+=A>>>16,C+=(P+=(T+=(B+=65535&I)>>>16)>>>16)>>>16,_[S]=65535&P|C<<16,R[S]=65535&B|T<<16;B=65535&(I=F),T=I>>>16,P=65535&(A=O),C=A>>>16,A=e[0],T+=(I=t[0])>>>16,P+=65535&A,C+=A>>>16,C+=(P+=(T+=(B+=65535&I)>>>16)>>>16)>>>16,e[0]=O=65535&P|C<<16,t[0]=F=65535&B|T<<16,B=65535&(I=D),T=I>>>16,P=65535&(A=k),C=A>>>16,A=e[1],T+=(I=t[1])>>>16,P+=65535&A,C+=A>>>16,C+=(P+=(T+=(B+=65535&I)>>>16)>>>16)>>>16,e[1]=k=65535&P|C<<16,t[1]=D=65535&B|T<<16,B=65535&(I=H),T=I>>>16,P=65535&(A=N),C=A>>>16,A=e[2],T+=(I=t[2])>>>16,P+=65535&A,C+=A>>>16,C+=(P+=(T+=(B+=65535&I)>>>16)>>>16)>>>16,e[2]=N=65535&P|C<<16,t[2]=H=65535&B|T<<16,B=65535&(I=z),T=I>>>16,P=65535&(A=L),C=A>>>16,A=e[3],T+=(I=t[3])>>>16,P+=65535&A,C+=A>>>16,C+=(P+=(T+=(B+=65535&I)>>>16)>>>16)>>>16,e[3]=L=65535&P|C<<16,t[3]=z=65535&B|T<<16,B=65535&(I=G),T=I>>>16,P=65535&(A=j),C=A>>>16,A=e[4],T+=(I=t[4])>>>16,P+=65535&A,C+=A>>>16,C+=(P+=(T+=(B+=65535&I)>>>16)>>>16)>>>16,e[4]=j=65535&P|C<<16,t[4]=G=65535&B|T<<16,B=65535&(I=V),T=I>>>16,P=65535&(A=M),C=A>>>16,A=e[5],T+=(I=t[5])>>>16,P+=65535&A,C+=A>>>16,C+=(P+=(T+=(B+=65535&I)>>>16)>>>16)>>>16,e[5]=M=65535&P|C<<16,t[5]=V=65535&B|T<<16,B=65535&(I=Z),T=I>>>16,P=65535&(A=$),C=A>>>16,A=e[6],T+=(I=t[6])>>>16,P+=65535&A,C+=A>>>16,C+=(P+=(T+=(B+=65535&I)>>>16)>>>16)>>>16,e[6]=$=65535&P|C<<16,t[6]=Z=65535&B|T<<16,B=65535&(I=Y),T=I>>>16,P=65535&(A=U),C=A>>>16,A=e[7],T+=(I=t[7])>>>16,P+=65535&A,C+=A>>>16,C+=(P+=(T+=(B+=65535&I)>>>16)>>>16)>>>16,e[7]=U=65535&P|C<<16,t[7]=Y=65535&B|T<<16,W+=128,n-=128}return n}function K(e,t,r){var n,o=new Int32Array(8),i=new Int32Array(8),s=new Uint8Array(256),a=r;for(o[0]=1779033703,o[1]=3144134277,o[2]=1013904242,o[3]=2773480762,o[4]=1359893119,o[5]=2600822924,o[6]=528734635,o[7]=1541459225,i[0]=4089235720,i[1]=2227873595,i[2]=4271175723,i[3]=1595750129,i[4]=2917565137,i[5]=725511199,i[6]=4215389547,i[7]=327033209,q(o,i,t,r),r%=128,n=0;n=0;--o)Q(e,t,n=r[o/8|0]>>(7&o)&1),X(t,e),X(e,e),Q(e,t,n)}function re(e,r){var n=[t(),t(),t(),t()];_(n[0],f),_(n[1],h),_(n[2],a),U(n[3],f,h),te(e,n,r)}function ne(e,r,o){var i,s=new Uint8Array(64),a=[t(),t(),t(),t()];for(o||n(r,32),K(s,r,32),s[0]&=248,s[31]&=127,s[31]|=64,re(a,s),ee(e,a),i=0;i<32;i++)r[i+32]=e[i];return 0}var oe=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function ie(e,t){var r,n,o,i;for(n=63;n>=32;--n){for(r=0,o=n-32,i=n-12;o>4)*oe[o],r=t[o]>>8,t[o]&=255;for(o=0;o<32;o++)t[o]-=r*oe[o];for(n=0;n<32;n++)t[n+1]+=t[n]>>8,e[n]=255&t[n]}function se(e){var t,r=new Float64Array(64);for(t=0;t<64;t++)r[t]=e[t];for(t=0;t<64;t++)e[t]=0;ie(e,r)}function ae(e,r,n,o){var i,s,a=new Uint8Array(64),c=new Uint8Array(64),u=new Uint8Array(64),l=new Float64Array(64),f=[t(),t(),t(),t()];K(a,o,32),a[0]&=248,a[31]&=127,a[31]|=64;var h=n+64;for(i=0;i>7&&$(e[0],s,e[0]),U(e[3],e[0],e[1]),0)}(h,o))return-1;for(i=0;i=0},e.sign.keyPair=function(){var e=new Uint8Array(le),t=new Uint8Array(fe);return ne(e,t),{publicKey:e,secretKey:t}},e.sign.keyPair.fromSecretKey=function(e){if(pe(e),e.length!==fe)throw new Error("bad secret key size");for(var t=new Uint8Array(le),r=0;r= 0x80 (not a basic code point)","invalid-input":"Invalid input"},p=Math.floor,d=String.fromCharCode;function g(e){throw RangeError(h[e])}function y(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function m(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+y((e=e.replace(f,".")).split("."),t).join(".")}function b(e){for(var t,r,n=[],o=0,i=e.length;o=55296&&t<=56319&&o65535&&(t+=d((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+d(e)})).join("")}function w(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function E(e,t,r){var n=0;for(e=r?p(e/700):e>>1,e+=p(e/t);e>455;n+=c)e=p(e/35);return p(n+36*e/(e+38))}function x(e){var t,r,n,o,i,s,u,l,f,h,d,y=[],m=e.length,b=0,w=128,x=72;for((r=e.lastIndexOf("-"))<0&&(r=0),n=0;n=128&&g("not-basic"),y.push(e.charCodeAt(n));for(o=r>0?r+1:0;o=m&&g("invalid-input"),((l=(d=e.charCodeAt(o++))-48<10?d-22:d-65<26?d-65:d-97<26?d-97:c)>=c||l>p((a-b)/s))&&g("overflow"),b+=l*s,!(l<(f=u<=x?1:u>=x+26?26:u-x));u+=c)s>p(a/(h=c-f))&&g("overflow"),s*=h;x=E(b-i,t=y.length+1,0==i),p(b/t)>a-w&&g("overflow"),w+=p(b/t),b%=t,y.splice(b++,0,w)}return v(y)}function S(e){var t,r,n,o,i,s,u,l,f,h,y,m,v,x,S,A=[];for(m=(e=b(e)).length,t=128,r=0,i=72,s=0;s=t&&yp((a-r)/(v=n+1))&&g("overflow"),r+=(u-t)*v,t=u,s=0;sa&&g("overflow"),y==t){for(l=r,f=c;!(l<(h=f<=i?1:f>=i+26?26:f-i));f+=c)S=l-h,x=c-h,A.push(d(w(h+S%x,0))),l=p(S/x);A.push(d(w(l,0))),i=E(r,v,n==o),r=0,++n}++r,++t}return A.join("")}s={version:"1.3.2",ucs2:{decode:b,encode:v},decode:x,encode:S,toASCII:function(e){return m(e,(function(e){return l.test(e)?"xn--"+S(e):e}))},toUnicode:function(e){return m(e,(function(e){return u.test(e)?x(e.slice(4).toLowerCase()):e}))}},void 0===(n=function(){return s}.call(t,r,t,e))||(e.exports=n)}()},8835:(e,t,r)=>{var n=r(1270);function o(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}t.parse=m,t.resolve=function(e,t){return m(e,!1,!0).resolve(t)},t.resolveObject=function(e,t){return e?m(e,!1,!0).resolveObject(t):t},t.format=function(e){return b(e)&&(e=m(e)),e instanceof o?e.format():o.prototype.format.call(e)},t.Url=o;var i=/^([a-z0-9.+-]+:)/i,s=/:[0-9]*$/,a=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),c=["'"].concat(a),u=["%","/","?",";","#"].concat(c),l=["/","?","#"],f=/^[a-z0-9A-Z_-]{0,63}$/,h=/^([a-z0-9A-Z_-]{0,63})(.*)$/,p={javascript:!0,"javascript:":!0},d={javascript:!0,"javascript:":!0},g={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},y=r(7186);function m(e,t,r){if(e&&v(e)&&e instanceof o)return e;var n=new o;return n.parse(e,t,r),n}function b(e){return"string"==typeof e}function v(e){return"object"==typeof e&&null!==e}function w(e){return null===e}o.prototype.parse=function(e,t,r){if(!b(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var o=e;o=o.trim();var s=i.exec(o);if(s){var a=(s=s[0]).toLowerCase();this.protocol=a,o=o.substr(s.length)}if(r||s||o.match(/^\/\/[^@\/]+@[^@\/]+/)){var m="//"===o.substr(0,2);!m||s&&d[s]||(o=o.substr(2),this.slashes=!0)}if(!d[s]&&(m||s&&!g[s])){for(var v,w,E=-1,x=0;x127?P+="x":P+=T[C];if(!P.match(f)){var R=I.slice(0,x),O=I.slice(x+1),k=T.match(h);k&&(R.push(k[1]),O.unshift(k[2])),O.length&&(o="/"+O.join(".")+o),this.hostname=R.join(".");break}}}if(this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),!A){var N=this.hostname.split("."),L=[];for(x=0;x0)&&r.host.split("@"))&&(r.auth=E.shift(),r.host=r.hostname=E.shift())),r.search=e.search,r.query=e.query,w(r.pathname)&&w(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r;if(!f.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var p=f.slice(-1)[0],y=(r.host||e.host)&&("."===p||".."===p)||""===p,m=0,v=f.length;v>=0;v--)"."==(p=f[v])?f.splice(v,1):".."===p?(f.splice(v,1),m++):m&&(f.splice(v,1),m--);if(!u&&!l)for(;m--;m)f.unshift("..");!u||""===f[0]||f[0]&&"/"===f[0].charAt(0)||f.unshift(""),y&&"/"!==f.join("/").substr(-1)&&f.push("");var E,x=""===f[0]||f[0]&&"/"===f[0].charAt(0);return h&&(r.hostname=r.host=x?"":f.length?f.shift():"",(E=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=E.shift(),r.host=r.hostname=E.shift())),(u=u||r.host&&f.length)&&!x&&f.unshift(""),f.length?r.pathname=f.join("/"):(r.pathname=null,r.path=null),w(r.pathname)&&w(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},o.prototype.parseHost=function(){var e=this.host,t=s.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},6622:e=>{"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},1135:e=>{e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},537:(e,t,r)=>{var n=/%[sdj%]/g;t.format=function(e){if(!y(e)){for(var t=[],r=0;r=i)return e;switch(e){case"%s":return String(o[r++]);case"%d":return Number(o[r++]);case"%j":try{return JSON.stringify(o[r++])}catch(e){return"[Circular]"}default:return e}})),c=o[r];r=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),p(r)?n.showHidden=r:r&&t._extend(n,r),m(n.showHidden)&&(n.showHidden=!1),m(n.depth)&&(n.depth=2),m(n.colors)&&(n.colors=!1),m(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=a),u(n,e,n.depth)}function a(e,t){var r=s.styles[t];return r?"["+s.colors[r][0]+"m"+e+"["+s.colors[r][1]+"m":e}function c(e,t){return e}function u(e,r,n){if(e.customInspect&&r&&x(r.inspect)&&r.inspect!==t.inspect&&(!r.constructor||r.constructor.prototype!==r)){var o=r.inspect(n,e);return y(o)||(o=u(e,o,n)),o}var i=function(e,t){if(m(t))return e.stylize("undefined","undefined");if(y(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return g(t)?e.stylize(""+t,"number"):p(t)?e.stylize(""+t,"boolean"):d(t)?e.stylize("null","null"):void 0}(e,r);if(i)return i;var s=Object.keys(r),a=function(e){var t={};return e.forEach((function(e,r){t[e]=!0})),t}(s);if(e.showHidden&&(s=Object.getOwnPropertyNames(r)),E(r)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return l(r);if(0===s.length){if(x(r)){var c=r.name?": "+r.name:"";return e.stylize("[Function"+c+"]","special")}if(b(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(w(r))return e.stylize(Date.prototype.toString.call(r),"date");if(E(r))return l(r)}var v,S="",A=!1,I=["{","}"];return h(r)&&(A=!0,I=["[","]"]),x(r)&&(S=" [Function"+(r.name?": "+r.name:"")+"]"),b(r)&&(S=" "+RegExp.prototype.toString.call(r)),w(r)&&(S=" "+Date.prototype.toUTCString.call(r)),E(r)&&(S=" "+l(r)),0!==s.length||A&&0!=r.length?n<0?b(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special"):(e.seen.push(r),v=A?function(e,t,r,n,o){for(var i=[],s=0,a=t.length;s60?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}(v,S,I)):I[0]+S+I[1]}function l(e){return"["+Error.prototype.toString.call(e)+"]"}function f(e,t,r,n,o,i){var s,a,c;if((c=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]}).get?a=c.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):c.set&&(a=e.stylize("[Setter]","special")),T(n,o)||(s="["+o+"]"),a||(e.seen.indexOf(c.value)<0?(a=d(r)?u(e,c.value,null):u(e,c.value,r-1)).indexOf("\n")>-1&&(a=i?a.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+a.split("\n").map((function(e){return" "+e})).join("\n")):a=e.stylize("[Circular]","special")),m(s)){if(i&&o.match(/^\d+$/))return a;(s=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+a}function h(e){return Array.isArray(e)}function p(e){return"boolean"==typeof e}function d(e){return null===e}function g(e){return"number"==typeof e}function y(e){return"string"==typeof e}function m(e){return void 0===e}function b(e){return v(e)&&"[object RegExp]"===S(e)}function v(e){return"object"==typeof e&&null!==e}function w(e){return v(e)&&"[object Date]"===S(e)}function E(e){return v(e)&&("[object Error]"===S(e)||e instanceof Error)}function x(e){return"function"==typeof e}function S(e){return Object.prototype.toString.call(e)}function A(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(m(o)&&(o=process.env.NODE_DEBUG||""),e=e.toUpperCase(),!i[e])if(new RegExp("\\b"+e+"\\b","i").test(o)){var r=process.pid;i[e]=function(){var n=t.format.apply(t,arguments);console.error("%s %d: %s",e,r,n)}}else i[e]=function(){};return i[e]},t.inspect=s,s.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=h,t.isBoolean=p,t.isNull=d,t.isNullOrUndefined=function(e){return null==e},t.isNumber=g,t.isString=y,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=m,t.isRegExp=b,t.isObject=v,t.isDate=w,t.isError=E,t.isFunction=x,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=r(1135);var I=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function B(){var e=new Date,t=[A(e.getHours()),A(e.getMinutes()),A(e.getSeconds())].join(":");return[e.getDate(),I[e.getMonth()],t].join(" ")}function T(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){console.log("%s - %s",B(),t.format.apply(t,arguments))},t.inherits=r(6622),t._extend=function(e,t){if(!t||!v(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e}},259:e=>{"use strict";e.exports=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}},8799:(e,t,r)=>{"use strict";function n(e){var t=this;if(t instanceof n||(t=new n),t.tail=null,t.head=null,t.length=0,e&&"function"==typeof e.forEach)e.forEach((function(e){t.push(e)}));else if(arguments.length>0)for(var r=0,o=arguments.length;r1)r=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");n=this.head.next,r=this.head.value}for(var o=0;null!==n;o++)r=e(r,n.value,o),n=n.next;return r},n.prototype.reduceReverse=function(e,t){var r,n=this.tail;if(arguments.length>1)r=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");n=this.tail.prev,r=this.tail.value}for(var o=this.length-1;null!==n;o--)r=e(r,n.value,o),n=n.prev;return r},n.prototype.toArray=function(){for(var e=new Array(this.length),t=0,r=this.head;null!==r;t++)e[t]=r.value,r=r.next;return e},n.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,r=this.tail;null!==r;t++)e[t]=r.value,r=r.prev;return e},n.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new n;if(tthis.length&&(t=this.length);for(var o=0,i=this.head;null!==i&&othis.length&&(t=this.length);for(var o=this.length,i=this.tail;null!==i&&o>t;o--)i=i.prev;for(;null!==i&&o>e;o--,i=i.prev)r.push(i.value);return r},n.prototype.splice=function(e,t,...r){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var n=0,i=this.head;null!==i&&n{},105:()=>{},7542:()=>{},1281:()=>{},2150:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Struct:()=>l,StructError:()=>n,any:()=>I,array:()=>B,assert:()=>f,assign:()=>y,bigint:()=>T,boolean:()=>P,coerce:()=>q,create:()=>h,date:()=>C,defaulted:()=>K,define:()=>m,deprecated:()=>b,dynamic:()=>v,empty:()=>Q,enums:()=>_,func:()=>R,instance:()=>O,integer:()=>k,intersection:()=>N,is:()=>d,lazy:()=>w,literal:()=>L,map:()=>j,mask:()=>p,max:()=>te,min:()=>re,never:()=>M,nonempty:()=>ne,nullable:()=>$,number:()=>U,object:()=>F,omit:()=>E,optional:()=>D,partial:()=>x,pattern:()=>oe,pick:()=>S,record:()=>H,refine:()=>se,regexp:()=>z,set:()=>G,size:()=>ie,string:()=>V,struct:()=>A,trimmed:()=>X,tuple:()=>Z,type:()=>Y,union:()=>W,unknown:()=>J,validate:()=>g});class n extends TypeError{constructor(e,t){let r;const{message:n,explanation:o,...i}=e,{path:s}=e,a=0===s.length?n:`At path: ${s.join(".")} -- ${n}`;super(o??a),null!=o&&(this.cause=a),Object.assign(this,i),this.name=this.constructor.name,this.failures=()=>r??(r=[e,...t()])}}function o(e){return"object"==typeof e&&null!=e}function i(e){if("[object Object]"!==Object.prototype.toString.call(e))return!1;const t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function s(e){return"symbol"==typeof e?e.toString():"string"==typeof e?JSON.stringify(e):`${e}`}function a(e,t,r,n){if(!0===e)return;!1===e?e={}:"string"==typeof e&&(e={message:e});const{path:o,branch:i}=t,{type:a}=r,{refinement:c,message:u=`Expected a value of type \`${a}\`${c?` with refinement \`${c}\``:""}, but received: \`${s(n)}\``}=e;return{value:n,type:a,refinement:c,key:o[o.length-1],path:o,branch:i,...e,message:u}}function*c(e,t,r,n){var i;o(i=e)&&"function"==typeof i[Symbol.iterator]||(e=[e]);for(const o of e){const e=a(o,t,r,n);e&&(yield e)}}function*u(e,t,r={}){const{path:n=[],branch:i=[e],coerce:s=!1,mask:a=!1}=r,c={path:n,branch:i};if(s&&(e=t.coercer(e,c),a&&"type"!==t.type&&o(t.schema)&&o(e)&&!Array.isArray(e)))for(const r in e)void 0===t.schema[r]&&delete e[r];let l="valid";for(const n of t.validator(e,c))n.explanation=r.message,l="not_valid",yield[n,void 0];for(let[f,h,p]of t.entries(e,c)){const t=u(h,p,{path:void 0===f?n:[...n,f],branch:void 0===f?i:[...i,h],coerce:s,mask:a,message:r.message});for(const r of t)r[0]?(l=null!=r[0].refinement?"not_refined":"not_valid",yield[r[0],void 0]):s&&(h=r[1],void 0===f?e=h:e instanceof Map?e.set(f,h):e instanceof Set?e.add(h):o(e)&&(void 0!==h||f in e)&&(e[f]=h))}if("not_valid"!==l)for(const n of t.refiner(e,c))n.explanation=r.message,l="not_refined",yield[n,void 0];"valid"===l&&(yield[void 0,e])}class l{constructor(e){const{type:t,schema:r,validator:n,refiner:o,coercer:i=(e=>e),entries:s=function*(){}}=e;this.type=t,this.schema=r,this.entries=s,this.coercer=i,this.validator=n?(e,t)=>c(n(e,t),t,this,e):()=>[],this.refiner=o?(e,t)=>c(o(e,t),t,this,e):()=>[]}assert(e,t){return f(e,this,t)}create(e,t){return h(e,this,t)}is(e){return d(e,this)}mask(e,t){return p(e,this,t)}validate(e,t={}){return g(e,this,t)}}function f(e,t,r){const n=g(e,t,{message:r});if(n[0])throw n[0]}function h(e,t,r){const n=g(e,t,{coerce:!0,message:r});if(n[0])throw n[0];return n[1]}function p(e,t,r){const n=g(e,t,{coerce:!0,mask:!0,message:r});if(n[0])throw n[0];return n[1]}function d(e,t){return!g(e,t)[0]}function g(e,t,r={}){const o=u(e,t,r),i=function(e){const{done:t,value:r}=e.next();return t?void 0:r}(o);return i[0]?[new n(i[0],(function*(){for(const e of o)e[0]&&(yield e[0])})),void 0]:[void 0,i[1]]}function y(...e){const t="type"===e[0].type,r=e.map((e=>e.schema)),n=Object.assign({},...r);return t?Y(n):F(n)}function m(e,t){return new l({type:e,schema:null,validator:t})}function b(e,t){return new l({...e,refiner:(t,r)=>void 0===t||e.refiner(t,r),validator:(r,n)=>void 0===r||(t(r,n),e.validator(r,n))})}function v(e){return new l({type:"dynamic",schema:null,*entries(t,r){const n=e(t,r);yield*n.entries(t,r)},validator:(t,r)=>e(t,r).validator(t,r),coercer:(t,r)=>e(t,r).coercer(t,r),refiner:(t,r)=>e(t,r).refiner(t,r)})}function w(e){let t;return new l({type:"lazy",schema:null,*entries(r,n){t??(t=e()),yield*t.entries(r,n)},validator:(r,n)=>(t??(t=e()),t.validator(r,n)),coercer:(r,n)=>(t??(t=e()),t.coercer(r,n)),refiner:(r,n)=>(t??(t=e()),t.refiner(r,n))})}function E(e,t){const{schema:r}=e,n={...r};for(const e of t)delete n[e];return"type"===e.type?Y(n):F(n)}function x(e){const t=e instanceof l?{...e.schema}:{...e};for(const e in t)t[e]=D(t[e]);return F(t)}function S(e,t){const{schema:r}=e,n={};for(const e of t)n[e]=r[e];return F(n)}function A(e,t){return console.warn("superstruct@0.11 - The `struct` helper has been renamed to `define`."),m(e,t)}function I(){return m("any",(()=>!0))}function B(e){return new l({type:"array",schema:e,*entries(t){if(e&&Array.isArray(t))for(const[r,n]of t.entries())yield[r,n,e]},coercer:e=>Array.isArray(e)?e.slice():e,validator:e=>Array.isArray(e)||`Expected an array value, but received: ${s(e)}`})}function T(){return m("bigint",(e=>"bigint"==typeof e))}function P(){return m("boolean",(e=>"boolean"==typeof e))}function C(){return m("date",(e=>e instanceof Date&&!isNaN(e.getTime())||`Expected a valid \`Date\` object, but received: ${s(e)}`))}function _(e){const t={},r=e.map((e=>s(e))).join();for(const r of e)t[r]=r;return new l({type:"enums",schema:t,validator:t=>e.includes(t)||`Expected one of \`${r}\`, but received: ${s(t)}`})}function R(){return m("func",(e=>"function"==typeof e||`Expected a function, but received: ${s(e)}`))}function O(e){return m("instance",(t=>t instanceof e||`Expected a \`${e.name}\` instance, but received: ${s(t)}`))}function k(){return m("integer",(e=>"number"==typeof e&&!isNaN(e)&&Number.isInteger(e)||`Expected an integer, but received: ${s(e)}`))}function N(e){return new l({type:"intersection",schema:null,*entries(t,r){for(const n of e)yield*n.entries(t,r)},*validator(t,r){for(const n of e)yield*n.validator(t,r)},*refiner(t,r){for(const n of e)yield*n.refiner(t,r)}})}function L(e){const t=s(e),r=typeof e;return new l({type:"literal",schema:"string"===r||"number"===r||"boolean"===r?e:null,validator:r=>r===e||`Expected the literal \`${t}\`, but received: ${s(r)}`})}function j(e,t){return new l({type:"map",schema:null,*entries(r){if(e&&t&&r instanceof Map)for(const[n,o]of r.entries())yield[n,n,e],yield[n,o,t]},coercer:e=>e instanceof Map?new Map(e):e,validator:e=>e instanceof Map||`Expected a \`Map\` object, but received: ${s(e)}`})}function M(){return m("never",(()=>!1))}function $(e){return new l({...e,validator:(t,r)=>null===t||e.validator(t,r),refiner:(t,r)=>null===t||e.refiner(t,r)})}function U(){return m("number",(e=>"number"==typeof e&&!isNaN(e)||`Expected a number, but received: ${s(e)}`))}function F(e){const t=e?Object.keys(e):[],r=M();return new l({type:"object",schema:e||null,*entries(n){if(e&&o(n)){const o=new Set(Object.keys(n));for(const r of t)o.delete(r),yield[r,n[r],e[r]];for(const e of o)yield[e,n[e],r]}},validator:e=>o(e)||`Expected an object, but received: ${s(e)}`,coercer:e=>o(e)?{...e}:e})}function D(e){return new l({...e,validator:(t,r)=>void 0===t||e.validator(t,r),refiner:(t,r)=>void 0===t||e.refiner(t,r)})}function H(e,t){return new l({type:"record",schema:null,*entries(r){if(o(r))for(const n in r){const o=r[n];yield[n,n,e],yield[n,o,t]}},validator:e=>o(e)||`Expected an object, but received: ${s(e)}`})}function z(){return m("regexp",(e=>e instanceof RegExp))}function G(e){return new l({type:"set",schema:null,*entries(t){if(e&&t instanceof Set)for(const r of t)yield[r,r,e]},coercer:e=>e instanceof Set?new Set(e):e,validator:e=>e instanceof Set||`Expected a \`Set\` object, but received: ${s(e)}`})}function V(){return m("string",(e=>"string"==typeof e||`Expected a string, but received: ${s(e)}`))}function Z(e){const t=M();return new l({type:"tuple",schema:null,*entries(r){if(Array.isArray(r)){const n=Math.max(e.length,r.length);for(let o=0;oArray.isArray(e)||`Expected an array, but received: ${s(e)}`})}function Y(e){const t=Object.keys(e);return new l({type:"type",schema:e,*entries(r){if(o(r))for(const n of t)yield[n,r[n],e[n]]},validator:e=>o(e)||`Expected an object, but received: ${s(e)}`,coercer:e=>o(e)?{...e}:e})}function W(e){const t=e.map((e=>e.type)).join(" | ");return new l({type:"union",schema:null,coercer(t){for(const r of e){const[e,n]=r.validate(t,{coerce:!0});if(!e)return n}return t},validator(r,n){const o=[];for(const t of e){const[...e]=u(r,t,n),[i]=e;if(!i[0])return[];for(const[t]of e)t&&o.push(t)}return[`Expected the value to satisfy a union of \`${t}\`, but received: ${s(r)}`,...o]}})}function J(){return m("unknown",(()=>!0))}function q(e,t,r){return new l({...e,coercer:(n,o)=>d(n,t)?e.coercer(r(n,o),o):e.coercer(n,o)})}function K(e,t,r={}){return q(e,J(),(e=>{const n="function"==typeof t?t():t;if(void 0===e)return n;if(!r.strict&&i(e)&&i(n)){const t={...e};let r=!1;for(const e in n)void 0===t[e]&&(t[e]=n[e],r=!0);if(r)return t}return e}))}function X(e){return q(e,V(),(e=>e.trim()))}function Q(e){return se(e,"empty",(t=>{const r=ee(t);return 0===r||`Expected an empty ${e.type} but received one with a size of \`${r}\``}))}function ee(e){return e instanceof Map||e instanceof Set?e.size:e.length}function te(e,t,r={}){const{exclusive:n}=r;return se(e,"max",(r=>n?rn?r>t:r>=t||`Expected a ${e.type} greater than ${n?"":"or equal to "}${t} but received \`${r}\``))}function ne(e){return se(e,"nonempty",(t=>ee(t)>0||`Expected a nonempty ${e.type} but received an empty one`))}function oe(e,t){return se(e,"pattern",(r=>t.test(r)||`Expected a ${e.type} matching \`/${t.source}/\` but received "${r}"`))}function ie(e,t,r=t){const n=`Expected a ${e.type}`,o=t===r?`of \`${t}\``:`between \`${t}\` and \`${r}\``;return se(e,"size",(e=>{if("number"==typeof e||e instanceof Date)return t<=e&&e<=r||`${n} ${o} but received \`${e}\``;if(e instanceof Map||e instanceof Set){const{size:i}=e;return t<=i&&i<=r||`${n} with a size ${o} but received one with a size of \`${i}\``}{const{length:i}=e;return t<=i&&i<=r||`${n} with a length ${o} but received one with a length of \`${i}\``}}))}function se(e,t,r){return new l({...e,*refiner(n,o){yield*e.refiner(n,o);const i=c(r(n,o),o,e,n);for(const e of i)yield{...e,refinement:t}}})}}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={id:n,loaded:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.loaded=!0,i.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{"use strict";var e,t=r(228),n=(e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)},function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}),o=function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))},i=function(e,t){var r,n,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(c){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(s=0)),s;)try{if(r=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,n=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]t)throw new d({givenSize:g(e),maxSize:t})}function m(e,t={}){const{signed:r}=t;t.size&&y(e,{size:t.size});const n=BigInt(e);if(!r)return n;const o=(e.length-2)/2;return n<=(1n<<8n*BigInt(o)-1n)-1n?n:n-BigInt(`0x${"f".padStart(2*o,"f")}`)-1n}function b(e,t={}){return Number(m(e,t))}function v(e,t){return({exclude:r,format:n})=>({exclude:r,format:e=>{const o=t(e);if(r)for(const e of r)delete o[e];return{...o,...n(e)}},type:e})}const w={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559"};function E(e){const t={...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,chainId:e.chainId?b(e.chainId):void 0,gas:e.gas?BigInt(e.gas):void 0,gasPrice:e.gasPrice?BigInt(e.gasPrice):void 0,maxFeePerGas:e.maxFeePerGas?BigInt(e.maxFeePerGas):void 0,maxPriorityFeePerGas:e.maxPriorityFeePerGas?BigInt(e.maxPriorityFeePerGas):void 0,nonce:e.nonce?b(e.nonce):void 0,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,type:e.type?w[e.type]:void 0,typeHex:e.type?e.type:void 0,value:e.value?BigInt(e.value):void 0,v:e.v?BigInt(e.v):void 0};return t.yParity=(()=>{if(e.yParity)return Number(e.yParity);if("bigint"==typeof t.v){if(0n===t.v||27n===t.v)return 0;if(1n===t.v||28n===t.v)return 1;if(t.v>=35n)return t.v%2n===0n?1:0}})(),"legacy"===t.type&&(delete t.accessList,delete t.maxFeePerGas,delete t.maxPriorityFeePerGas,delete t.yParity),"eip2930"===t.type&&(delete t.maxFeePerGas,delete t.maxPriorityFeePerGas),t}const x=v("transaction",E);function S(e){const t=e.transactions?.map((e=>"string"==typeof e?e:E(e)));return{...e,baseFeePerGas:e.baseFeePerGas?BigInt(e.baseFeePerGas):null,difficulty:e.difficulty?BigInt(e.difficulty):void 0,gasLimit:e.gasLimit?BigInt(e.gasLimit):void 0,gasUsed:e.gasUsed?BigInt(e.gasUsed):void 0,hash:e.hash?e.hash:null,logsBloom:e.logsBloom?e.logsBloom:null,nonce:e.nonce?e.nonce:null,number:e.number?BigInt(e.number):null,size:e.size?BigInt(e.size):void 0,timestamp:e.timestamp?BigInt(e.timestamp):void 0,transactions:t,totalDifficulty:e.totalDifficulty?BigInt(e.totalDifficulty):null}}const A=v("block",S),I={"0x0":"reverted","0x1":"success"};function B(e){return{...e,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,contractAddress:e.contractAddress?e.contractAddress:null,cumulativeGasUsed:e.cumulativeGasUsed?BigInt(e.cumulativeGasUsed):null,effectiveGasPrice:e.effectiveGasPrice?BigInt(e.effectiveGasPrice):null,gasUsed:e.gasUsed?BigInt(e.gasUsed):null,logs:e.logs?e.logs.map((e=>function(e,{args:t,eventName:r}={}){return{...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,logIndex:e.logIndex?Number(e.logIndex):null,transactionHash:e.transactionHash?e.transactionHash:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,...r?{args:t,eventName:r}:{}}}(e))):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?b(e.transactionIndex):null,status:e.status?I[e.status]:null,type:e.type?w[e.type]||e.type:null}}const T=v("transactionReceipt",B),P={block:A({format(e){const t=e.transactions?.map((e=>{if("string"==typeof e)return e;const t=E(e);return"0x7e"===t.typeHex&&(t.isSystemTx=e.isSystemTx,t.mint=e.mint?m(e.mint):void 0,t.sourceHash=e.sourceHash,t.type="deposit"),t}));return{transactions:t,stateRoot:e.stateRoot}}}),transaction:x({format(e){const t={};return"0x7e"===e.type&&(t.isSystemTx=e.isSystemTx,t.mint=e.mint?m(e.mint):void 0,t.sourceHash=e.sourceHash,t.type="deposit"),t}}),transactionReceipt:T({format:e=>({l1GasPrice:e.l1GasPrice?m(e.l1GasPrice):null,l1GasUsed:e.l1GasUsed?m(e.l1GasUsed):null,l1Fee:e.l1Fee?m(e.l1Fee):null,l1FeeScalar:e.l1FeeScalar?Number(e.l1FeeScalar):null})})},C=a({id:8453,network:"base",name:"Base",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://base-mainnet.g.alchemy.com/v2"],webSocket:["wss://base-mainnet.g.alchemy.com/v2"]},infura:{http:["https://base-mainnet.infura.io/v3"],webSocket:["wss://base-mainnet.infura.io/ws/v3"]},default:{http:["https://mainnet.base.org"]},public:{http:["https://mainnet.base.org"]}},blockExplorers:{blockscout:{name:"Basescout",url:"https://base.blockscout.com"},default:{name:"Basescan",url:"https://basescan.org"},etherscan:{name:"Basescan",url:"https://basescan.org"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:5022}}},{formatters:P}),_=a({id:56,name:"BNB Smart Chain",network:"bsc",nativeCurrency:{decimals:18,name:"BNB",symbol:"BNB"},rpcUrls:{default:{http:["https://rpc.ankr.com/bsc"]},public:{http:["https://rpc.ankr.com/bsc"]}},blockExplorers:{etherscan:{name:"BscScan",url:"https://bscscan.com"},default:{name:"BscScan",url:"https://bscscan.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:15921452}}});class R extends f{constructor({size:e,targetSize:t,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (${e}) exceeds padding size (${t}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SizeExceedsPaddingSizeError"})}}function O(e,{dir:t,size:r=32}={}){return"string"==typeof e?function(e,{dir:t,size:r=32}={}){if(null===r)return e;const n=e.replace("0x","");if(n.length>2*r)throw new R({size:Math.ceil(n.length/2),targetSize:r,type:"hex"});return`0x${n["right"===t?"padEnd":"padStart"](2*r,"0")}`}(e,{dir:t,size:r}):function(e,{dir:t,size:r=32}={}){if(null===r)return e;if(e.length>r)throw new R({size:e.length,targetSize:r,type:"bytes"});const n=new Uint8Array(r);for(let o=0;ot.toString(16).padStart(2,"0")));function N(e,t={}){return"number"==typeof e||"bigint"==typeof e?j(e,t):"string"==typeof e?function(e,t={}){return L(M.encode(e),t)}(e,t):"boolean"==typeof e?function(e,t={}){const r=`0x${Number(e)}`;return"number"==typeof t.size?(y(r,{size:t.size}),O(r,{size:t.size})):r}(e,t):L(e,t)}function L(e,t={}){let r="";for(let t=0;ti||o"string"==typeof e?e:{...E(e),feeCurrency:e.feeCurrency,..."0x7b"!==e.type?{gatewayFee:e.gatewayFee?m(e.gatewayFee):null,gatewayFeeRecipient:e.gatewayFeeRecipient||null}:{}}));return{randomness:e.randomness,transactions:t}}}),transaction:x({format(e){const t={feeCurrency:e.feeCurrency};return"0x7b"===e.type?t.type="cip64":("0x7c"===e.type&&(t.type="cip42"),t.gatewayFee=e.gatewayFee?m(e.gatewayFee):null,t.gatewayFeeRecipient=e.gatewayFeeRecipient),t}}),transactionRequest:F({format(e){const t={feeCurrency:e.feeCurrency};return Z(e)?t.type="0x7b":(V(e)&&(t.type="0x7c"),t.gatewayFee=void 0!==e.gatewayFee?j(e.gatewayFee):void 0,t.gatewayFeeRecipient=e.gatewayFeeRecipient),t}})};class W extends f{constructor({address:e}){super(`Address "${e}" is invalid.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAddressError"})}}class J extends f{constructor({chainId:e}){super(`Chain ID "${e}" is invalid.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidChainIdError"})}}const q={ether:-9,wei:9};function K(e,t="wei"){return function(e,t){let r=e.toString();const n=r.startsWith("-");n&&(r=r.slice(1)),r=r.padStart(t,"0");let[o,i]=[r.slice(0,r.length-t),r.slice(r.length-t)];return i=i.replace(/(0+)$/,""),`${n?"-":""}${o||"0"}${i?`.${i}`:""}`}(e,q[t])}class X extends f{constructor({cause:e,message:t}={}){const r=t?.replace("execution reverted: ","")?.replace("execution reverted","");super(`Execution reverted ${r?`with reason: ${r}`:"for an unknown reason"}.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ExecutionRevertedError"})}}Object.defineProperty(X,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(X,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted/});class Q extends f{constructor({cause:e,maxFeePerGas:t}={}){super(`The fee cap (\`maxFeePerGas\`${t?` = ${K(t)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FeeCapTooHigh"})}}Object.defineProperty(Q,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/}),Object.defineProperty(class extends f{constructor({cause:e,maxFeePerGas:t}={}){super(`The fee cap (\`maxFeePerGas\`${t?` = ${K(t)}`:""} gwei) cannot be lower than the block base fee.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FeeCapTooLow"})}},"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/}),Object.defineProperty(class extends f{constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}is higher than the next one expected.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NonceTooHighError"})}},"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/}),Object.defineProperty(class extends f{constructor({cause:e,nonce:t}={}){super([`Nonce provided for the transaction ${t?`(${t}) `:""}is lower than the current nonce of the account.`,"Try increasing the nonce or find the latest nonce with `getTransactionCount`."].join("\n"),{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NonceTooLowError"})}},"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/}),Object.defineProperty(class extends f{constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}exceeds the maximum allowed nonce.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NonceMaxValueError"})}},"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/}),Object.defineProperty(class extends f{constructor({cause:e}={}){super(["The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account."].join("\n"),{cause:e,metaMessages:["This error could arise when the account does not have enough funds to:"," - pay for the total gas fee,"," - pay for the value to send."," ","The cost of the transaction is calculated as `gas * gas fee + value`, where:"," - `gas` is the amount of gas needed for transaction to execute,"," - `gas fee` is the gas fee,"," - `value` is the amount of ether to send to the recipient."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InsufficientFundsError"})}},"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds/}),Object.defineProperty(class extends f{constructor({cause:e,gas:t}={}){super(`The amount of gas ${t?`(${t}) `:""}provided for the transaction exceeds the limit allowed for the block.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"IntrinsicGasTooHighError"})}},"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/}),Object.defineProperty(class extends f{constructor({cause:e,gas:t}={}){super(`The amount of gas ${t?`(${t}) `:""}provided for the transaction is too low.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"IntrinsicGasTooLowError"})}},"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/}),Object.defineProperty(class extends f{constructor({cause:e}){super("The transaction type is not supported for this chain.",{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionTypeNotSupportedError"})}},"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});class ee extends f{constructor({cause:e,maxPriorityFeePerGas:t,maxFeePerGas:r}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${t?` = ${K(t)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${r?` = ${K(r)} gwei`:""}).`].join("\n"),{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TipAboveFeeCapError"})}}Object.defineProperty(ee,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max priority fee per gas higher than max fee per gas|tip higher than fee cap/});const te=/^0x[a-fA-F0-9]{40}$/;function re(e){return te.test(e)}function ne(e){return`0x${e.reduce(((e,t)=>e+t.replace("0x","")),"")}`}class oe extends f{constructor({offset:e}){super(`Offset \`${e}\` cannot be negative.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NegativeOffsetError"})}}class ie extends f{constructor({length:e,position:t}){super(`Position \`${t}\` is out of bounds (\`0 < position < ${e}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PositionOutOfBoundsError"})}}const se={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,assertPosition(e){if(e<0||e>this.bytes.length-1)throw new ie({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new oe({offset:e});const t=this.position-e;this.assertPosition(t),this.position=t},incrementPosition(e){if(e<0)throw new oe({offset:e});const t=this.position+e;this.assertPosition(t),this.position=t},inspectByte(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectBytes(e,t){const r=t??this.position;return this.assertPosition(r+e-1),this.bytes.subarray(r,r+e)},inspectUint8(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectUint16(e){const t=e??this.position;return this.assertPosition(t+1),this.dataView.getUint16(t)},inspectUint24(e){const t=e??this.position;return this.assertPosition(t+2),(this.dataView.getUint16(t)<<8)+this.dataView.getUint8(t+2)},inspectUint32(e){const t=e??this.position;return this.assertPosition(t+3),this.dataView.getUint32(t)},pushByte(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushBytes(e){this.assertPosition(this.position+e.length-1),this.bytes.set(e,this.position),this.position+=e.length},pushUint8(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushUint16(e){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,e),this.position+=2},pushUint24(e){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,e>>8),this.dataView.setUint8(this.position+2,255&e),this.position+=3},pushUint32(e){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,e),this.position+=4},readByte(){const e=this.inspectByte();return this.position++,e},readBytes(e){const t=this.inspectBytes(e);return this.position+=e,t},readUint8(){const e=this.inspectUint8();return this.position+=1,e},readUint16(){const e=this.inspectUint16();return this.position+=2,e},readUint24(){const e=this.inspectUint24();return this.position+=3,e},readUint32(){const e=this.inspectUint32();return this.position+=4,e},setPosition(e){this.assertPosition(e),this.position=e}};function ae(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:void 0}function ce(e,t="hex"){const r=ue(e),n=function(e){const t=Object.create(se);return t.bytes=e,t.dataView=new DataView(e.buffer,e.byteOffset,e.byteLength),t}(new Uint8Array(r.length));return r.encode(n),"hex"===t?L(n.bytes):n.bytes}function ue(e){return Array.isArray(e)?function(e){const t=e.reduce(((e,t)=>e+t.length),0),r=le(t);return{length:t<=55?1+t:1+r+t,encode(n){t<=55?n.pushByte(192+t):(n.pushByte(247+r),1===r?n.pushUint8(t):2===r?n.pushUint16(t):3===r?n.pushUint24(t):n.pushUint32(t));for(const{encode:t}of e)t(n)}}}(e.map((e=>ue(e)))):function(e){const t="string"==typeof e?function(e,t={}){let r=e;t.size&&(y(r,{size:t.size}),r=O(r,{dir:"right",size:t.size}));let n=r.slice(2);n.length%2&&(n=`0${n}`);const o=n.length/2,i=new Uint8Array(o);for(let e=0,t=0;evoid 0===t||!1===t?null:[e,t])).filter(Boolean),r=t.reduce(((e,[t])=>Math.max(e,t.length)),0);return t.map((([e,t])=>` ${`${e}:`.padEnd(r+1)} ${t}`)).join("\n")}class he extends f{constructor({v:e}){super(`Invalid \`v\` value "${e}". Expected 27 or 28.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidLegacyVError"})}}class pe extends f{constructor({transaction:e}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",fe(e),"}","","To infer the type, either provide:","- a `type` to the Transaction, or","- an EIP-1559 Transaction with `maxFeePerGas`, or","- an EIP-2930 Transaction with `gasPrice` & `accessList`, or","- a Legacy Transaction with `gasPrice`"]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSerializableTransactionError"})}}class de extends f{constructor({storageKey:e}){super(`Size for storage key "${e}" is invalid. Expected 32 bytes. Got ${Math.floor((e.length-2)/2)} bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidStorageKeySizeError"})}}function ge(e){if(!e||0===e.length)return[];const t=[];for(let r=0;rZ(e)?function(e,t){!function(e){const{chainId:t,maxPriorityFeePerGas:r,gasPrice:n,maxFeePerGas:o,to:i,feeCurrency:s}=e;if(t<=0)throw new J({chainId:t});if(i&&!re(i))throw new W({address:i});if(n)throw new f("`gasPrice` is not a valid CIP-64 Transaction attribute.");if(z(o)&&o>me)throw new Q({maxFeePerGas:o});if(z(r)&&z(o)&&r>o)throw new ee({maxFeePerGas:o,maxPriorityFeePerGas:r});if(z(s)&&!re(s))throw new f("`feeCurrency` MUST be a token address for CIP-64 transactions.");if(H(s))throw new f("`feeCurrency` must be provided for CIP-64 transactions.")}(e);const{chainId:r,gas:n,nonce:o,to:i,value:s,maxFeePerGas:a,maxPriorityFeePerGas:c,accessList:u,feeCurrency:l,data:h}=e,p=[N(r),o?N(o):"0x",c?N(c):"0x",a?N(a):"0x",n?N(n):"0x",i??"0x",s?N(s):"0x",h??"0x",ge(u),l];return t&&p.push(27n===t.v?"0x":N(1),D(t.r),D(t.s)),ne(["0x7b",ce(p)])}(e,t):V(e)?function(e,t){!function(e){const{chainId:t,maxPriorityFeePerGas:r,gasPrice:n,maxFeePerGas:o,to:i,feeCurrency:s,gatewayFee:a,gatewayFeeRecipient:c}=e;if(t<=0)throw new J({chainId:t});if(i&&!re(i))throw new W({address:i});if(n)throw new f("`gasPrice` is not a valid CIP-42 Transaction attribute.");if(z(o)&&o>me)throw new Q({maxFeePerGas:o});if(z(r)&&z(o)&&r>o)throw new ee({maxFeePerGas:o,maxPriorityFeePerGas:r});if(z(a)&&H(c)||z(c)&&H(a))throw new f("`gatewayFee` and `gatewayFeeRecipient` must be provided together.");if(z(s)&&!re(s))throw new f("`feeCurrency` MUST be a token address for CIP-42 transactions.");if(z(c)&&!re(c))throw new W(c);if(H(s)&&H(c))throw new f("Either `feeCurrency` or `gatewayFeeRecipient` must be provided for CIP-42 transactions.")}(e);const{chainId:r,gas:n,nonce:o,to:i,value:s,maxFeePerGas:a,maxPriorityFeePerGas:c,accessList:u,feeCurrency:l,gatewayFeeRecipient:h,gatewayFee:p,data:d}=e,g=[N(r),o?N(o):"0x",c?N(c):"0x",a?N(a):"0x",n?N(n):"0x",l??"0x",h??"0x",p?N(p):"0x",i??"0x",s?N(s):"0x",d??"0x",ge(u)];return t&&g.push(27n===t.v?"0x":N(1),D(t.r),D(t.s)),ne(["0x7c",ce(g)])}(e,t):function(e,t){const r=function(e){if(e.type)return e.type;if(void 0!==e.maxFeePerGas||void 0!==e.maxPriorityFeePerGas)return"eip1559";if(void 0!==e.gasPrice)return void 0!==e.accessList?"eip2930":"legacy";throw new pe({transaction:e})}(e);return"eip1559"===r?function(e,t){const{chainId:r,gas:n,nonce:o,to:i,value:s,maxFeePerGas:a,maxPriorityFeePerGas:c,accessList:u,data:l}=e;!function(e){const{chainId:t,maxPriorityFeePerGas:r,gasPrice:n,maxFeePerGas:o,to:i}=e;if(t<=0)throw new J({chainId:t});if(i&&!re(i))throw new W({address:i});if(n)throw new f("`gasPrice` is not a valid EIP-1559 Transaction attribute.");if(o&&o>2n**256n-1n)throw new Q({maxFeePerGas:o});if(r&&o&&r>o)throw new ee({maxFeePerGas:o,maxPriorityFeePerGas:r})}(e);const h=ge(u),p=[N(r),o?N(o):"0x",c?N(c):"0x",a?N(a):"0x",n?N(n):"0x",i??"0x",s?N(s):"0x",l??"0x",h];if(t){const e=0n===t.v?"0x":1n===t.v?N(1):27n===t.v?"0x":N(1);p.push(e,D(t.r),D(t.s))}return ne(["0x02",ce(p)])}(e,t):"eip2930"===r?function(e,t){const{chainId:r,gas:n,data:o,nonce:i,to:s,value:a,accessList:c,gasPrice:u}=e;!function(e){const{chainId:t,maxPriorityFeePerGas:r,gasPrice:n,maxFeePerGas:o,to:i}=e;if(t<=0)throw new J({chainId:t});if(i&&!re(i))throw new W({address:i});if(r||o)throw new f("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.");if(n&&n>2n**256n-1n)throw new Q({maxFeePerGas:n})}(e);const l=ge(c),h=[N(r),i?N(i):"0x",u?N(u):"0x",n?N(n):"0x",s??"0x",a?N(a):"0x",o??"0x",l];if(t){const e=0n===t.v?"0x":1n===t.v?N(1):27n===t.v?"0x":N(1);h.push(e,D(t.r),D(t.s))}return ne(["0x01",ce(h)])}(e,t):function(e,t){const{chainId:r=0,gas:n,data:o,nonce:i,to:s,value:a,gasPrice:c}=e;!function(e){const{chainId:t,maxPriorityFeePerGas:r,gasPrice:n,maxFeePerGas:o,to:i,accessList:s}=e;if(i&&!re(i))throw new W({address:i});if(void 0!==t&&t<=0)throw new J({chainId:t});if(r||o)throw new f("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.");if(n&&n>2n**256n-1n)throw new Q({maxFeePerGas:n});if(s)throw new f("`accessList` is not a valid Legacy Transaction attribute.")}(e);let u=[i?N(i):"0x",c?N(c):"0x",n?N(n):"0x",s??"0x",a?N(a):"0x",o??"0x"];if(t){const e=(()=>{if(r>0)return BigInt(2*r)+BigInt(35n+t.v-27n);if(t.v>=35n)return(t.v-35n)/2n>0?t.v:27n+(35n===t.v?0n:1n);const e=27n+(27n===t.v?0n:1n);if(t.v!==e)throw new he({v:t.v});return e})();u=[...u,N(e),t.r,t.s]}else r>0&&(u=[...u,N(r),"0x","0x"]);return ce(u)}(e,t)}(e,t)},me=2n**256n-1n,be=a({id:42220,name:"Celo",network:"celo",nativeCurrency:{decimals:18,name:"CELO",symbol:"CELO"},rpcUrls:{default:{http:["https://forno.celo.org"]},infura:{http:["https://celo-mainnet.infura.io/v3"]},public:{http:["https://forno.celo.org"]}},blockExplorers:{default:{name:"Celo Explorer",url:"https://explorer.celo.org/mainnet"},etherscan:{name:"CeloScan",url:"https://celoscan.io"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:13112599}},testnet:!1},{formatters:Y,serializers:ye}),ve=a({id:100,name:"Gnosis",network:"gnosis",nativeCurrency:{decimals:18,name:"Gnosis",symbol:"xDAI"},rpcUrls:{default:{http:["https://rpc.gnosischain.com"],webSocket:["wss://rpc.gnosischain.com/wss"]},public:{http:["https://rpc.gnosischain.com"],webSocket:["wss://rpc.gnosischain.com/wss"]}},blockExplorers:{etherscan:{name:"Gnosisscan",url:"https://gnosisscan.io"},default:{name:"Gnosis Chain Explorer",url:"https://blockscout.com/xdai/mainnet"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:21022491}}}),we=a({id:59144,name:"Linea Mainnet",network:"linea-mainnet",nativeCurrency:{name:"Linea Ether",symbol:"ETH",decimals:18},rpcUrls:{infura:{http:["https://linea-mainnet.infura.io/v3"],webSocket:["wss://linea-mainnet.infura.io/ws/v3"]},default:{http:["https://rpc.linea.build"],webSocket:["wss://rpc.linea.build"]},public:{http:["https://rpc.linea.build"],webSocket:["wss://rpc.linea.build"]}},blockExplorers:{default:{name:"Etherscan",url:"https://lineascan.build"},etherscan:{name:"Etherscan",url:"https://lineascan.build"},blockscout:{name:"Blockscout",url:"https://explorer.linea.build"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:42}},testnet:!1}),Ee=a({id:169,name:"Manta Pacific Mainnet",network:"manta",nativeCurrency:{decimals:18,name:"ETH",symbol:"ETH"},rpcUrls:{default:{http:["https://pacific-rpc.manta.network/http"]},public:{http:["https://pacific-rpc.manta.network/http"]}},blockExplorers:{etherscan:{name:"Manta Explorer",url:"https://pacific-explorer.manta.network"},default:{name:"Manta Explorer",url:"https://pacific-explorer.manta.network"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:332890}}}),xe=a({id:10,name:"OP Mainnet",network:"optimism",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://opt-mainnet.g.alchemy.com/v2"],webSocket:["wss://opt-mainnet.g.alchemy.com/v2"]},infura:{http:["https://optimism-mainnet.infura.io/v3"],webSocket:["wss://optimism-mainnet.infura.io/ws/v3"]},default:{http:["https://mainnet.optimism.io"]},public:{http:["https://mainnet.optimism.io"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://optimistic.etherscan.io"},default:{name:"Optimism Explorer",url:"https://explorer.optimism.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:4286263}}},{formatters:P}),Se=a({id:1,network:"homestead",name:"Ethereum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://eth-mainnet.g.alchemy.com/v2"],webSocket:["wss://eth-mainnet.g.alchemy.com/v2"]},infura:{http:["https://mainnet.infura.io/v3"],webSocket:["wss://mainnet.infura.io/ws/v3"]},default:{http:["https://cloudflare-eth.com"]},public:{http:["https://cloudflare-eth.com"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://etherscan.io"},default:{name:"Etherscan",url:"https://etherscan.io"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0xc0497E381f536Be9ce14B0dD3817cBcAe57d2F62",blockCreated:16966585},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14353601}}}),Ae=a({id:137,name:"Polygon",network:"matic",nativeCurrency:{name:"MATIC",symbol:"MATIC",decimals:18},rpcUrls:{alchemy:{http:["https://polygon-mainnet.g.alchemy.com/v2"],webSocket:["wss://polygon-mainnet.g.alchemy.com/v2"]},infura:{http:["https://polygon-mainnet.infura.io/v3"],webSocket:["wss://polygon-mainnet.infura.io/ws/v3"]},default:{http:["https://polygon-rpc.com"]},public:{http:["https://polygon-rpc.com"]}},blockExplorers:{etherscan:{name:"PolygonScan",url:"https://polygonscan.com"},default:{name:"PolygonScan",url:"https://polygonscan.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:25770160}}}),Ie=a({id:1101,name:"Polygon zkEVM",network:"polygon-zkevm",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://zkevm-rpc.com"]},public:{http:["https://zkevm-rpc.com"]}},blockExplorers:{default:{name:"PolygonScan",url:"https://zkevm.polygonscan.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:57746}}}),Be=a({id:7777777,name:"Zora",network:"zora",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.zora.energy"],webSocket:["wss://rpc.zora.energy"]},public:{http:["https://rpc.zora.energy"],webSocket:["wss://rpc.zora.energy"]}},blockExplorers:{default:{name:"Explorer",url:"https://explorer.zora.energy"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:5882}}},{formatters:P}),Te=a({id:31337,name:"Hardhat",network:"hardhat",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["http://127.0.0.1:8545"]},public:{http:["http://127.0.0.1:8545"]}}}),Pe=a({id:5,network:"goerli",name:"Goerli",nativeCurrency:{name:"Goerli Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://eth-goerli.g.alchemy.com/v2"],webSocket:["wss://eth-goerli.g.alchemy.com/v2"]},infura:{http:["https://goerli.infura.io/v3"],webSocket:["wss://goerli.infura.io/ws/v3"]},default:{http:["https://rpc.ankr.com/eth_goerli"]},public:{http:["https://rpc.ankr.com/eth_goerli"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://goerli.etherscan.io"},default:{name:"Etherscan",url:"https://goerli.etherscan.io"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0x56522D00C410a43BFfDF00a9A569489297385790",blockCreated:8765204},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:6507670}},testnet:!0}),Ce=a({id:11155111,network:"sepolia",name:"Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"SEP",decimals:18},rpcUrls:{alchemy:{http:["https://eth-sepolia.g.alchemy.com/v2"],webSocket:["wss://eth-sepolia.g.alchemy.com/v2"]},infura:{http:["https://sepolia.infura.io/v3"],webSocket:["wss://sepolia.infura.io/ws/v3"]},default:{http:["https://rpc.sepolia.org"]},public:{http:["https://rpc.sepolia.org"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://sepolia.etherscan.io"},default:{name:"Etherscan",url:"https://sepolia.etherscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:751532},ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0x21B000Fd62a880b2125A61e36a284BB757b76025",blockCreated:3914906}},testnet:!0}),_e=a({id:534352,name:"Scroll",network:"scroll",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.scroll.io"],webSocket:["wss://wss-rpc.scroll.io/ws"]},public:{http:["https://rpc.scroll.io"],webSocket:["wss://wss-rpc.scroll.io/ws"]}},blockExplorers:{default:{name:"Scrollscan",url:"https://scrollscan.com"},blockscout:{name:"Blockscout",url:"https://blockscout.scroll.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14}},testnet:!1}),Re=a({id:17e3,network:"holesky",name:"Holesky",nativeCurrency:{name:"Holesky Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://ethereum-holesky.publicnode.com"]},public:{http:["https://ethereum-holesky.publicnode.com"]}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:77}},testnet:!0}),Oe=a({id:420,name:"Optimism Goerli",network:"optimism-goerli",nativeCurrency:{name:"Goerli Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://opt-goerli.g.alchemy.com/v2"],webSocket:["wss://opt-goerli.g.alchemy.com/v2"]},infura:{http:["https://optimism-goerli.infura.io/v3"],webSocket:["wss://optimism-goerli.infura.io/ws/v3"]},default:{http:["https://goerli.optimism.io"]},public:{http:["https://goerli.optimism.io"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://goerli-optimism.etherscan.io"},default:{name:"Etherscan",url:"https://goerli-optimism.etherscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:49461}},testnet:!0},{formatters:P}),ke=a({id:11155420,name:"Optimism Sepolia",network:"optimism-sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://opt-sepolia.g.alchemy.com/v2"],webSocket:["wss://opt-sepolia.g.alchemy.com/v2"]},default:{http:["https://sepolia.optimism.io"]},public:{http:["https://sepolia.optimism.io"]}},blockExplorers:{blockscout:{name:"Blockscout",url:"https://optimism-sepolia.blockscout.com"},default:{name:"Blockscout",url:"https://optimism-sepolia.blockscout.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1620204}},testnet:!0},{formatters:P}),Ne=a({id:97,name:"Binance Smart Chain Testnet",network:"bsc-testnet",nativeCurrency:{decimals:18,name:"BNB",symbol:"tBNB"},rpcUrls:{default:{http:["https://data-seed-prebsc-1-s1.bnbchain.org:8545"]},public:{http:["https://data-seed-prebsc-1-s1.bnbchain.org:8545"]}},blockExplorers:{etherscan:{name:"BscScan",url:"https://testnet.bscscan.com"},default:{name:"BscScan",url:"https://testnet.bscscan.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:17422483}},testnet:!0}),Le=a({id:80001,name:"Polygon Mumbai",network:"maticmum",nativeCurrency:{name:"MATIC",symbol:"MATIC",decimals:18},rpcUrls:{alchemy:{http:["https://polygon-mumbai.g.alchemy.com/v2"],webSocket:["wss://polygon-mumbai.g.alchemy.com/v2"]},infura:{http:["https://polygon-mumbai.infura.io/v3"],webSocket:["wss://polygon-mumbai.infura.io/ws/v3"]},default:{http:["https://rpc.ankr.com/polygon_mumbai"]},public:{http:["https://rpc.ankr.com/polygon_mumbai"]}},blockExplorers:{etherscan:{name:"PolygonScan",url:"https://mumbai.polygonscan.com"},default:{name:"PolygonScan",url:"https://mumbai.polygonscan.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:25770160}},testnet:!0}),je=a({id:421613,name:"Arbitrum Goerli",network:"arbitrum-goerli",nativeCurrency:{name:"Arbitrum Goerli Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://arb-goerli.g.alchemy.com/v2"],webSocket:["wss://arb-goerli.g.alchemy.com/v2"]},infura:{http:["https://arbitrum-goerli.infura.io/v3"],webSocket:["wss://arbitrum-goerli.infura.io/ws/v3"]},default:{http:["https://goerli-rollup.arbitrum.io/rpc"]},public:{http:["https://goerli-rollup.arbitrum.io/rpc"]}},blockExplorers:{etherscan:{name:"Arbiscan",url:"https://goerli.arbiscan.io"},default:{name:"Arbiscan",url:"https://goerli.arbiscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:88114}},testnet:!0}),Me=a({id:421614,name:"Arbitrum Sepolia",network:"arbitrum-sepolia",nativeCurrency:{name:"Arbitrum Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://arb-sepolia.g.alchemy.com/v2"],webSocket:["wss://arb-sepolia.g.alchemy.com/v2"]},default:{http:["https://sepolia-rollup.arbitrum.io/rpc"]},public:{http:["https://sepolia-rollup.arbitrum.io/rpc"]}},blockExplorers:{etherscan:{name:"Arbiscan",url:"https://sepolia.arbiscan.io"},default:{name:"Arbiscan",url:"https://sepolia.arbiscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:81930}},testnet:!0}),$e=a({id:84532,network:"base-sepolia",name:"Base Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://base-sepolia.g.alchemy.com/v2"],webSocket:["wss://base-sepolia.g.alchemy.com/v2"]},default:{http:["https://sepolia.base.org"]},public:{http:["https://sepolia.base.org"]}},blockExplorers:{blockscout:{name:"Blockscout",url:"https://base-sepolia.blockscout.com"},default:{name:"Blockscout",url:"https://base-sepolia.blockscout.com"}},testnet:!0,sourceId:11155111},{formatters:P}),Ue=a({id:999,name:"Zora Goerli Testnet",network:"zora-testnet",nativeCurrency:{decimals:18,name:"Zora Goerli",symbol:"ETH"},rpcUrls:{default:{http:["https://testnet.rpc.zora.energy"],webSocket:["wss://testnet.rpc.zora.energy"]},public:{http:["https://testnet.rpc.zora.energy"],webSocket:["wss://testnet.rpc.zora.energy"]}},blockExplorers:{default:{name:"Explorer",url:"https://testnet.explorer.zora.energy"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:189123}},testnet:!0},{formatters:P}),Fe=a({id:999999999,name:"Zora Sepolia",network:"zora-sepolia",nativeCurrency:{decimals:18,name:"Zora Sepolia",symbol:"ETH"},rpcUrls:{default:{http:["https://sepolia.rpc.zora.energy"],webSocket:["wss://sepolia.rpc.zora.energy"]},public:{http:["https://sepolia.rpc.zora.energy"],webSocket:["wss://sepolia.rpc.zora.energy"]}},blockExplorers:{default:{name:"Zora Sepolia Explorer",url:"https://sepolia.explorer.zora.energy/"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:83160}},testnet:!0},{formatters:P}),De=a({id:250,name:"Fantom",network:"fantom",nativeCurrency:{decimals:18,name:"Fantom",symbol:"FTM"},rpcUrls:{default:{http:["https://rpc.ankr.com/fantom"]},public:{http:["https://rpc.ankr.com/fantom"]}},blockExplorers:{etherscan:{name:"FTMScan",url:"https://ftmscan.com"},default:{name:"FTMScan",url:"https://ftmscan.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:33001987}}}),He=a({id:16666e5,name:"Harmony One",network:"harmony",nativeCurrency:{name:"Harmony",symbol:"ONE",decimals:18},rpcUrls:{public:{http:["https://rpc.ankr.com/harmony"]},default:{http:["https://rpc.ankr.com/harmony"]}},blockExplorers:{default:{name:"Harmony Explorer",url:"https://explorer.harmony.one"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:24185753}}}),ze=a({id:1284,name:"Moonbeam",network:"moonbeam",nativeCurrency:{decimals:18,name:"GLMR",symbol:"GLMR"},rpcUrls:{public:{http:["https://moonbeam.public.blastapi.io"],webSocket:["wss://moonbeam.public.blastapi.io"]},default:{http:["https://moonbeam.public.blastapi.io"],webSocket:["wss://moonbeam.public.blastapi.io"]}},blockExplorers:{default:{name:"Moonscan",url:"https://moonscan.io"},etherscan:{name:"Moonscan",url:"https://moonscan.io"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:609002}},testnet:!1});var Ge,Ve;(Ve=Ge||(Ge={}))[Ve.arbitrum=c.id]="arbitrum",Ve[Ve.arbitrumNova=u.id]="arbitrumNova",Ve[Ve.avalanche=l.id]="avalanche",Ve[Ve.base=C.id]="base",Ve[Ve.bsc=_.id]="bsc",Ve[Ve.celo=be.id]="celo",Ve[Ve.gnosis=ve.id]="gnosis",Ve[Ve.linea=we.id]="linea",Ve[Ve.manta=Ee.id]="manta",Ve[Ve.optimism=xe.id]="optimism",Ve[Ve.mainnet=Se.id]="mainnet",Ve[Ve.polygon=Ae.id]="polygon",Ve[Ve.polygonZkEvm=Ie.id]="polygonZkEvm",Ve[Ve.rari=1380012617]="rari",Ve[Ve.zora=Be.id]="zora",Ve[Ve.hardhat=Te.id]="hardhat",Ve[Ve.hardhatOptimism=1338]="hardhatOptimism",Ve[Ve.goerli=Pe.id]="goerli",Ve[Ve.sepolia=Ce.id]="sepolia",Ve[Ve.scroll=_e.id]="scroll",Ve[Ve.holesky=Re.id]="holesky",Ve[Ve.optimismGoerli=Oe.id]="optimismGoerli",Ve[Ve.optimismSepolia=ke.id]="optimismSepolia",Ve[Ve.bscTestnet=Ne.id]="bscTestnet",Ve[Ve.polygonMumbai=Le.id]="polygonMumbai",Ve[Ve.arbitrumGoerli=je.id]="arbitrumGoerli",Ve[Ve.arbitrumSepolia=Me.id]="arbitrumSepolia",Ve[Ve.baseSepolia=$e.id]="baseSepolia",Ve[Ve.zoraTestnet=Ue.id]="zoraTestnet",Ve[Ve.zoraSepolia=Fe.id]="zoraSepolia",Ve[Ve.fantom=De.id]="fantom",Ve[Ve.harmonyOne=He.id]="harmonyOne",Ve[Ve.moonbeam=ze.id]="moonbeam",r(1594);var Ze=r(9213),Ye=r.n(Ze);function We(e){return e&&e.Math==Math?e:void 0}const Je="object"==typeof globalThis&&We(globalThis)||"object"==typeof window&&We(window)||"object"==typeof self&&We(self)||"object"==typeof r.g&&We(r.g)||function(){return this}()||{},qe=e=>{try{if(e){const t=new URL(e).host;return 0===t.indexOf("www.")?t.replace("www.",""):t}return""}catch(e){return""}};var Ke;!function(e){e.success="success",e.no_active_session="no_active_session",e.unsupported_network="unsupported_network",e.already_added="already_added",e.set_as_active="set_as_active",e.already_active="already_active"}(Ke||(Ke={}));var Xe;!function(e){e.eth_chainId="eth_chainId",e.eth_accounts="eth_accounts",e.eth_sendTransaction="eth_sendTransaction",e.eth_signTransaction="eth_signTransaction",e.personal_sign="personal_sign",e.eth_signTypedData="eth_signTypedData",e.eth_signTypedData_v3="eth_signTypedData_v3",e.eth_signTypedData_v4="eth_signTypedData_v4",e.eth_getCode="eth_getCode",e.wallet_addEthereumChain="wallet_addEthereumChain",e.wallet_switchEthereumChain="wallet_switchEthereumChain",e.eth_requestAccounts="eth_requestAccounts",e.eth_blockNumber="eth_blockNumber",e.eth_call="eth_call",e.eth_estimateGas="eth_estimateGas",e.personal_ecRecover="personal_ecRecover",e.eth_gasPrice="eth_gasPrice",e.eth_getBlockByNumber="eth_getBlockByNumber",e.eth_getBalance="eth_getBalance",e.eth_getTransactionByHash="eth_getTransactionByHash"}(Xe||(Xe={}));const Qe={available:"undefined"!=typeof window,name:"webviewMessenger",send:async(e,t,{id:r}={})=>(window.ReactNativeWebView.postMessage(JSON.stringify({topic:`> ${e}`,payload:t,id:r})),new Promise(((t,n)=>{const o=i=>{if(!function({id:e,topic:t,message:r}){if(r.topic===`< ${t}`&&(void 0===e||r.id===e)&&r.payload)return!0}({id:r,message:i.data,topic:e}))return;if(i.source!=window)return;window.removeEventListener("message",o);const{response:s,error:a}=i.data.payload;a&&n(new Error(a.message)),t(s)};window.addEventListener("message",o)}))),reply(e,t){const r=async r=>{if(!function({topic:e,message:t}){return!(!t.topic||"*"!==e&&t.topic!==`> ${e}`||"*"===e&&t.topic.startsWith("<"))}({message:r.data,topic:e}))return;if(r.source!=window)return;let n,o;try{o=await t(r.data.payload,{topic:r.data.topic,sender:r.source,id:r.data.id})}catch(e){n=e}const i=r.data.topic.replace(">","<");window.ReactNativeWebView.postMessage(JSON.stringify({topic:i,payload:{error:n,response:o},id:r.data.id}))};return window.addEventListener("message",r,!1),()=>window.removeEventListener("message",r)}},et=function({messenger:e,topic:t}){return e.available||console.error(`Messenger "${e.name}" is not available in this context.`),{send:async(r,{id:n})=>e.send(t,r,{id:n}),async reply(r){e.reply(t,r)}}}({messenger:Qe,topic:"providerRequest"}),tt=new s({backgroundMessenger:Qe,providerRequestTransport:et,onConstruct({emit:e}){if((e=>{try{return new URL(e),!0}catch(e){return!1}})(window.location.href)){const t=qe(window.location.href);Qe?.reply(`accountsChanged:${t}`,(async t=>{e("accountsChanged",[t])})),Qe?.reply(`chainChanged:${t}`,(async t=>{var r,n;e("chainChanged",(r=String(t),n=(e=>new(Ye())(e).toString(16))(r),n.startsWith("0x")?n:`0x${n}`))})),Qe?.reply(`disconnect:${t}`,(async()=>{e("disconnect",[])})),Qe?.reply(`connect:${t}`,(async t=>{e("connect",t)}))}}});(function(){const{doctype:e}=window.document;return!e||"html"===e.name})()&&function(){const e=[/\.xml$/u,/\.pdf$/u],t=window.location.pathname;for(let r=0;rwindow.dispatchEvent(t)))}({info:{icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMiIgaGVpZ2h0PSIzMiIgZmlsbD0ibm9uZSI+PGcgY2xpcC1wYXRoPSJ1cmwoI2EpIj48cGF0aCBmaWxsPSJ1cmwoI2IpIiBkPSJNMCAwaDMydjMySDB6Ii8+PHBhdGggZmlsbD0idXJsKCNjKSIgZD0iTTUuMzMzIDEwLjEzM2gxLjZjOC4yNDggMCAxNC45MzQgNi42ODYgMTQuOTM0IDE0LjkzNHYxLjZoMy4yYTEuNiAxLjYgMCAwIDAgMS42LTEuNmMwLTEwLjg5OS04LjgzNS0xOS43MzQtMTkuNzM0LTE5LjczNGExLjYgMS42IDAgMCAwLTEuNiAxLjZ2My4yWiIvPjxwYXRoIGZpbGw9InVybCgjZCkiIGQ9Ik0yMi40IDI1LjA2N2g0LjI2N2ExLjYgMS42IDAgMCAxLTEuNiAxLjZIMjIuNHYtMS42WiIvPjxwYXRoIGZpbGw9InVybCgjZSkiIGQ9Ik02LjkzMyA1LjMzM1Y5LjZoLTEuNlY2LjkzM2ExLjYgMS42IDAgMCAxIDEuNi0xLjZaIi8+PHBhdGggZmlsbD0idXJsKCNmKSIgZD0iTTUuMzMzIDkuNmgxLjZjOC41NDIgMCAxNS40NjcgNi45MjUgMTUuNDY3IDE1LjQ2N3YxLjZoLTQuOHYtMS42YzAtNS44OTEtNC43NzYtMTAuNjY3LTEwLjY2Ny0xMC42NjdoLTEuNlY5LjZaIi8+PHBhdGggZmlsbD0idXJsKCNnKSIgZD0iTTE4LjEzMyAyNS4wNjdIMjIuNHYxLjZoLTQuMjY3di0xLjZaIi8+PHBhdGggZmlsbD0idXJsKCNoKSIgZD0iTTUuMzMzIDEzLjg2N1Y5LjZoMS42djQuMjY3aC0xLjZaIi8+PHBhdGggZmlsbD0idXJsKCNpKSIgZD0iTTUuMzMzIDE2LjUzM2ExLjYgMS42IDAgMCAwIDEuNiAxLjYgNi45MzMgNi45MzMgMCAwIDEgNi45MzQgNi45MzQgMS42IDEuNiAwIDAgMCAxLjYgMS42aDIuNjY2di0xLjZjMC02LjE4Ni01LjAxNC0xMS4yLTExLjItMTEuMmgtMS42djIuNjY2WiIvPjxwYXRoIGZpbGw9InVybCgjaikiIGQ9Ik0xMy44NjcgMjUuMDY3aDQuMjY2djEuNmgtMi42NjZhMS42IDEuNiAwIDAgMS0xLjYtMS42WiIvPjxwYXRoIGZpbGw9InVybCgjaykiIGQ9Ik02LjkzMyAxOC4xMzNhMS42IDEuNiAwIDAgMS0xLjYtMS42di0yLjY2NmgxLjZ2NC4yNjZaIi8+PC9nPjxkZWZzPjxyYWRpYWxHcmFkaWVudCBpZD0iYyIgY3g9IjAiIGN5PSIwIiByPSIxIiBncmFkaWVudFRyYW5zZm9ybT0icm90YXRlKC05MCAxNiA5LjA2Nykgc2NhbGUoMTkuNzMzMykiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj48c3RvcCBvZmZzZXQ9Ii43NyIgc3RvcC1jb2xvcj0iI0ZGNDAwMCIvPjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzg3NTRDOSIvPjwvcmFkaWFsR3JhZGllbnQ+PHJhZGlhbEdyYWRpZW50IGlkPSJmIiBjeD0iMCIgY3k9IjAiIHI9IjEiIGdyYWRpZW50VHJhbnNmb3JtPSJyb3RhdGUoLTkwIDE2IDkuMDY3KSBzY2FsZSgxNS40NjY3KSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPjxzdG9wIG9mZnNldD0iLjcyNCIgc3RvcC1jb2xvcj0iI0ZGRjcwMCIvPjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iI0ZGOTkwMSIvPjwvcmFkaWFsR3JhZGllbnQ+PHJhZGlhbEdyYWRpZW50IGlkPSJpIiBjeD0iMCIgY3k9IjAiIHI9IjEiIGdyYWRpZW50VHJhbnNmb3JtPSJyb3RhdGUoLTkwIDE2IDkuMDY3KSBzY2FsZSgxMS4yKSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPjxzdG9wIG9mZnNldD0iLjU5NSIgc3RvcC1jb2xvcj0iIzBBRiIvPjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzAxREE0MCIvPjwvcmFkaWFsR3JhZGllbnQ+PHJhZGlhbEdyYWRpZW50IGlkPSJqIiBjeD0iMCIgY3k9IjAiIHI9IjEiIGdyYWRpZW50VHJhbnNmb3JtPSJtYXRyaXgoNC41MzMzMyAwIDAgMTIuMDg4OSAxMy42IDI1Ljg2NykiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj48c3RvcCBzdG9wLWNvbG9yPSIjMEFGIi8+PHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjMDFEQTQwIi8+PC9yYWRpYWxHcmFkaWVudD48cmFkaWFsR3JhZGllbnQgaWQ9ImsiIGN4PSIwIiBjeT0iMCIgcj0iMSIgZ3JhZGllbnRUcmFuc2Zvcm09Im1hdHJpeCgwIC00LjUzMzMzIDg1Ljk2NTQgMCA2LjEzMyAxOC40KSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPjxzdG9wIHN0b3AtY29sb3I9IiMwQUYiLz48c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiMwMURBNDAiLz48L3JhZGlhbEdyYWRpZW50PjxsaW5lYXJHcmFkaWVudCBpZD0iYiIgeDE9IjE2IiB4Mj0iMTYiIHkxPSIwIiB5Mj0iMzIiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj48c3RvcCBzdG9wLWNvbG9yPSIjMTc0Mjk5Ii8+PHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjMDAxRTU5Ii8+PC9saW5lYXJHcmFkaWVudD48bGluZWFyR3JhZGllbnQgaWQ9ImQiIHgxPSIyMi4xMzMiIHgyPSIyNi42NjciIHkxPSIyNS44NjciIHkyPSIyNS44NjciIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj48c3RvcCBzdG9wLWNvbG9yPSIjRkY0MDAwIi8+PHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjODc1NEM5Ii8+PC9saW5lYXJHcmFkaWVudD48bGluZWFyR3JhZGllbnQgaWQ9ImUiIHgxPSI2LjEzMyIgeDI9IjYuMTMzIiB5MT0iNS4zMzMiIHkyPSI5Ljg2NyIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPjxzdG9wIHN0b3AtY29sb3I9IiM4NzU0QzkiLz48c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiNGRjQwMDAiLz48L2xpbmVhckdyYWRpZW50PjxsaW5lYXJHcmFkaWVudCBpZD0iZyIgeDE9IjE4LjEzMyIgeDI9IjIyLjQiIHkxPSIyNS44NjciIHkyPSIyNS44NjciIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj48c3RvcCBzdG9wLWNvbG9yPSIjRkZGNzAwIi8+PHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjRkY5OTAxIi8+PC9saW5lYXJHcmFkaWVudD48bGluZWFyR3JhZGllbnQgaWQ9ImgiIHgxPSI2LjEzMyIgeDI9IjYuMTMzIiB5MT0iMTMuODY3IiB5Mj0iOS42IiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+PHN0b3Agc3RvcC1jb2xvcj0iI0ZGRjcwMCIvPjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iI0ZGOTkwMSIvPjwvbGluZWFyR3JhZGllbnQ+PGNsaXBQYXRoIGlkPSJhIj48cGF0aCBmaWxsPSIjZmZmIiBkPSJNMCAwaDMydjMySDB6Ii8+PC9jbGlwUGF0aD48L2RlZnM+PC9zdmc+",name:"Rainbow",rdns:"me.rainbow",uuid:function(){const e=Je,t=e.crypto||e.msCrypto;let r=()=>16*Math.random();try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(r=()=>t.getRandomValues(new Uint8Array(1))[0])}catch(e){}return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,(e=>(e^(15&r())>>e/4).toString(16)))}()},provider:tt}),Qe.reply("rainbow_ethereumChainEvent",(async({chainId:e,chainName:t,status:r,extensionUrl:n,host:o})=>{qe(window.location.href)===o&&alert("Should inject notification "+JSON.stringify({chainId:e,chainName:t,status:r,extensionUrl:n}))})),Qe.reply("rainbow_reload",(async()=>{window.location.reload()})),Object.defineProperties(window,{rainbow:{value:tt,configurable:!1,writable:!1},ethereum:{get:()=>window.walletRouter.currentProvider,set(e){window.walletRouter.addProvider(e)},configurable:!1},walletRouter:{value:{rainbowProvider:tt,lastInjectedProvider:window.ethereum,currentProvider:tt,providers:[tt,...window.ethereum?[window.ethereum]:[]],setDefaultProvider(e){if(e)window.walletRouter.currentProvider=window.rainbow;else{const e=window.walletRouter.lastInjectedProvider??window.ethereum;window.walletRouter.currentProvider=e}},addProvider(e){window.walletRouter.providers.includes(e)||window.walletRouter.providers.push(e),tt!==e&&(window.walletRouter.lastInjectedProvider=e)}},configurable:!1,writable:!1}}),window.rainbow.providers=window.walletRouter.providers,window.dispatchEvent(new Event("ethereum#initialized")),Qe.reply("rainbow_setDefaultProvider",(async({rainbowAsDefault:e})=>{window.walletRouter.setDefaultProvider(e)})))})()})(); \ No newline at end of file diff --git a/android/app/src/main/res/raw/injected_js_bundle.js b/android/app/src/main/res/raw/injected_js_bundle.js index 1b2d2cc727d..ab9407bccab 100644 --- a/android/app/src/main/res/raw/injected_js_bundle.js +++ b/android/app/src/main/res/raw/injected_js_bundle.js @@ -1,46430 +1,2 @@ /*! For license information please see InjectedJSBundle.js.LICENSE.txt */ -(() => { - var t = { - 9840: (t, e, r) => { - 'use strict'; - const i = e; - (i.bignum = r(5911)), - (i.define = r(9234).define), - (i.base = r(9913)), - (i.constants = r(7624)), - (i.decoders = r(4823)), - (i.encoders = r(3886)); - }, - 9234: (t, e, r) => { - 'use strict'; - const i = r(3886), - n = r(4823), - o = r(87); - function s(t, e) { - (this.name = t), (this.body = e), (this.decoders = {}), (this.encoders = {}); - } - (e.define = function (t, e) { - return new s(t, e); - }), - (s.prototype._createNamed = function (t) { - const e = this.name; - function r(t) { - this._initNamed(t, e); - } - return ( - o(r, t), - (r.prototype._initNamed = function (e, r) { - t.call(this, e, r); - }), - new r(this) - ); - }), - (s.prototype._getDecoder = function (t) { - return (t = t || 'der'), this.decoders.hasOwnProperty(t) || (this.decoders[t] = this._createNamed(n[t])), this.decoders[t]; - }), - (s.prototype.decode = function (t, e, r) { - return this._getDecoder(e).decode(t, r); - }), - (s.prototype._getEncoder = function (t) { - return (t = t || 'der'), this.encoders.hasOwnProperty(t) || (this.encoders[t] = this._createNamed(i[t])), this.encoders[t]; - }), - (s.prototype.encode = function (t, e, r) { - return this._getEncoder(e).encode(t, r); - }); - }, - 3370: (t, e, r) => { - 'use strict'; - const i = r(87), - n = r(7298).b, - o = r(1788).Buffer; - function s(t, e) { - n.call(this, e), o.isBuffer(t) ? ((this.base = t), (this.offset = 0), (this.length = t.length)) : this.error('Input not Buffer'); - } - function a(t, e) { - if (Array.isArray(t)) - (this.length = 0), - (this.value = t.map(function (t) { - return a.isEncoderBuffer(t) || (t = new a(t, e)), (this.length += t.length), t; - }, this)); - else if ('number' == typeof t) { - if (!(0 <= t && t <= 255)) return e.error('non-byte EncoderBuffer value'); - (this.value = t), (this.length = 1); - } else if ('string' == typeof t) (this.value = t), (this.length = o.byteLength(t)); - else { - if (!o.isBuffer(t)) return e.error('Unsupported type: ' + typeof t); - (this.value = t), (this.length = t.length); - } - } - i(s, n), - (e.C = s), - (s.isDecoderBuffer = function (t) { - return ( - t instanceof s || - ('object' == typeof t && - o.isBuffer(t.base) && - 'DecoderBuffer' === t.constructor.name && - 'number' == typeof t.offset && - 'number' == typeof t.length && - 'function' == typeof t.save && - 'function' == typeof t.restore && - 'function' == typeof t.isEmpty && - 'function' == typeof t.readUInt8 && - 'function' == typeof t.skip && - 'function' == typeof t.raw) - ); - }), - (s.prototype.save = function () { - return { offset: this.offset, reporter: n.prototype.save.call(this) }; - }), - (s.prototype.restore = function (t) { - const e = new s(this.base); - return (e.offset = t.offset), (e.length = this.offset), (this.offset = t.offset), n.prototype.restore.call(this, t.reporter), e; - }), - (s.prototype.isEmpty = function () { - return this.offset === this.length; - }), - (s.prototype.readUInt8 = function (t) { - return this.offset + 1 <= this.length ? this.base.readUInt8(this.offset++, !0) : this.error(t || 'DecoderBuffer overrun'); - }), - (s.prototype.skip = function (t, e) { - if (!(this.offset + t <= this.length)) return this.error(e || 'DecoderBuffer overrun'); - const r = new s(this.base); - return (r._reporterState = this._reporterState), (r.offset = this.offset), (r.length = this.offset + t), (this.offset += t), r; - }), - (s.prototype.raw = function (t) { - return this.base.slice(t ? t.offset : this.offset, this.length); - }), - (e.R = a), - (a.isEncoderBuffer = function (t) { - return ( - t instanceof a || - ('object' == typeof t && 'EncoderBuffer' === t.constructor.name && 'number' == typeof t.length && 'function' == typeof t.join) - ); - }), - (a.prototype.join = function (t, e) { - return ( - t || (t = o.alloc(this.length)), - e || (e = 0), - 0 === this.length || - (Array.isArray(this.value) - ? this.value.forEach(function (r) { - r.join(t, e), (e += r.length); - }) - : ('number' == typeof this.value - ? (t[e] = this.value) - : 'string' == typeof this.value - ? t.write(this.value, e) - : o.isBuffer(this.value) && this.value.copy(t, e), - (e += this.length))), - t - ); - }); - }, - 9913: (t, e, r) => { - 'use strict'; - const i = e; - (i.Reporter = r(7298).b), (i.DecoderBuffer = r(3370).C), (i.EncoderBuffer = r(3370).R), (i.Node = r(1388)); - }, - 1388: (t, e, r) => { - 'use strict'; - const i = r(7298).b, - n = r(3370).R, - o = r(3370).C, - s = r(7859), - a = [ - 'seq', - 'seqof', - 'set', - 'setof', - 'objid', - 'bool', - 'gentime', - 'utctime', - 'null_', - 'enum', - 'int', - 'objDesc', - 'bitstr', - 'bmpstr', - 'charstr', - 'genstr', - 'graphstr', - 'ia5str', - 'iso646str', - 'numstr', - 'octstr', - 'printstr', - 't61str', - 'unistr', - 'utf8str', - 'videostr', - ], - h = ['key', 'obj', 'use', 'optional', 'explicit', 'implicit', 'def', 'choice', 'any', 'contains'].concat(a); - function u(t, e, r) { - const i = {}; - (this._baseState = i), - (i.name = r), - (i.enc = t), - (i.parent = e || null), - (i.children = null), - (i.tag = null), - (i.args = null), - (i.reverseArgs = null), - (i.choice = null), - (i.optional = !1), - (i.any = !1), - (i.obj = !1), - (i.use = null), - (i.useDecoder = null), - (i.key = null), - (i.default = null), - (i.explicit = null), - (i.implicit = null), - (i.contains = null), - i.parent || ((i.children = []), this._wrap()); - } - t.exports = u; - const f = [ - 'enc', - 'parent', - 'children', - 'tag', - 'args', - 'reverseArgs', - 'choice', - 'optional', - 'any', - 'obj', - 'use', - 'alteredUse', - 'key', - 'default', - 'explicit', - 'implicit', - 'contains', - ]; - (u.prototype.clone = function () { - const t = this._baseState, - e = {}; - f.forEach(function (r) { - e[r] = t[r]; - }); - const r = new this.constructor(e.parent); - return (r._baseState = e), r; - }), - (u.prototype._wrap = function () { - const t = this._baseState; - h.forEach(function (e) { - this[e] = function () { - const r = new this.constructor(this); - return t.children.push(r), r[e].apply(r, arguments); - }; - }, this); - }), - (u.prototype._init = function (t) { - const e = this._baseState; - s(null === e.parent), - t.call(this), - (e.children = e.children.filter(function (t) { - return t._baseState.parent === this; - }, this)), - s.equal(e.children.length, 1, 'Root node can have only one child'); - }), - (u.prototype._useArgs = function (t) { - const e = this._baseState, - r = t.filter(function (t) { - return t instanceof this.constructor; - }, this); - (t = t.filter(function (t) { - return !(t instanceof this.constructor); - }, this)), - 0 !== r.length && - (s(null === e.children), - (e.children = r), - r.forEach(function (t) { - t._baseState.parent = this; - }, this)), - 0 !== t.length && - (s(null === e.args), - (e.args = t), - (e.reverseArgs = t.map(function (t) { - if ('object' != typeof t || t.constructor !== Object) return t; - const e = {}; - return ( - Object.keys(t).forEach(function (r) { - r == (0 | r) && (r |= 0); - const i = t[r]; - e[i] = r; - }), - e - ); - }))); - }), - [ - '_peekTag', - '_decodeTag', - '_use', - '_decodeStr', - '_decodeObjid', - '_decodeTime', - '_decodeNull', - '_decodeInt', - '_decodeBool', - '_decodeList', - '_encodeComposite', - '_encodeStr', - '_encodeObjid', - '_encodeTime', - '_encodeNull', - '_encodeInt', - '_encodeBool', - ].forEach(function (t) { - u.prototype[t] = function () { - const e = this._baseState; - throw new Error(t + ' not implemented for encoding: ' + e.enc); - }; - }), - a.forEach(function (t) { - u.prototype[t] = function () { - const e = this._baseState, - r = Array.prototype.slice.call(arguments); - return s(null === e.tag), (e.tag = t), this._useArgs(r), this; - }; - }), - (u.prototype.use = function (t) { - s(t); - const e = this._baseState; - return s(null === e.use), (e.use = t), this; - }), - (u.prototype.optional = function () { - return (this._baseState.optional = !0), this; - }), - (u.prototype.def = function (t) { - const e = this._baseState; - return s(null === e.default), (e.default = t), (e.optional = !0), this; - }), - (u.prototype.explicit = function (t) { - const e = this._baseState; - return s(null === e.explicit && null === e.implicit), (e.explicit = t), this; - }), - (u.prototype.implicit = function (t) { - const e = this._baseState; - return s(null === e.explicit && null === e.implicit), (e.implicit = t), this; - }), - (u.prototype.obj = function () { - const t = this._baseState, - e = Array.prototype.slice.call(arguments); - return (t.obj = !0), 0 !== e.length && this._useArgs(e), this; - }), - (u.prototype.key = function (t) { - const e = this._baseState; - return s(null === e.key), (e.key = t), this; - }), - (u.prototype.any = function () { - return (this._baseState.any = !0), this; - }), - (u.prototype.choice = function (t) { - const e = this._baseState; - return ( - s(null === e.choice), - (e.choice = t), - this._useArgs( - Object.keys(t).map(function (e) { - return t[e]; - }) - ), - this - ); - }), - (u.prototype.contains = function (t) { - const e = this._baseState; - return s(null === e.use), (e.contains = t), this; - }), - (u.prototype._decode = function (t, e) { - const r = this._baseState; - if (null === r.parent) return t.wrapResult(r.children[0]._decode(t, e)); - let i, - n = r.default, - s = !0, - a = null; - if ((null !== r.key && (a = t.enterKey(r.key)), r.optional)) { - let i = null; - if ( - (null !== r.explicit ? (i = r.explicit) : null !== r.implicit ? (i = r.implicit) : null !== r.tag && (i = r.tag), - null !== i || r.any) - ) { - if (((s = this._peekTag(t, i, r.any)), t.isError(s))) return s; - } else { - const i = t.save(); - try { - null === r.choice ? this._decodeGeneric(r.tag, t, e) : this._decodeChoice(t, e), (s = !0); - } catch (t) { - s = !1; - } - t.restore(i); - } - } - if ((r.obj && s && (i = t.enterObject()), s)) { - if (null !== r.explicit) { - const e = this._decodeTag(t, r.explicit); - if (t.isError(e)) return e; - t = e; - } - const i = t.offset; - if (null === r.use && null === r.choice) { - let e; - r.any && (e = t.save()); - const i = this._decodeTag(t, null !== r.implicit ? r.implicit : r.tag, r.any); - if (t.isError(i)) return i; - r.any ? (n = t.raw(e)) : (t = i); - } - if ( - (e && e.track && null !== r.tag && e.track(t.path(), i, t.length, 'tagged'), - e && e.track && null !== r.tag && e.track(t.path(), t.offset, t.length, 'content'), - r.any || (n = null === r.choice ? this._decodeGeneric(r.tag, t, e) : this._decodeChoice(t, e)), - t.isError(n)) - ) - return n; - if ( - (r.any || - null !== r.choice || - null === r.children || - r.children.forEach(function (r) { - r._decode(t, e); - }), - r.contains && ('octstr' === r.tag || 'bitstr' === r.tag)) - ) { - const i = new o(n); - n = this._getUse(r.contains, t._reporterState.obj)._decode(i, e); - } - } - return ( - r.obj && s && (n = t.leaveObject(i)), - null === r.key || (null === n && !0 !== s) ? null !== a && t.exitKey(a) : t.leaveKey(a, r.key, n), - n - ); - }), - (u.prototype._decodeGeneric = function (t, e, r) { - const i = this._baseState; - return 'seq' === t || 'set' === t - ? null - : 'seqof' === t || 'setof' === t - ? this._decodeList(e, t, i.args[0], r) - : /str$/.test(t) - ? this._decodeStr(e, t, r) - : 'objid' === t && i.args - ? this._decodeObjid(e, i.args[0], i.args[1], r) - : 'objid' === t - ? this._decodeObjid(e, null, null, r) - : 'gentime' === t || 'utctime' === t - ? this._decodeTime(e, t, r) - : 'null_' === t - ? this._decodeNull(e, r) - : 'bool' === t - ? this._decodeBool(e, r) - : 'objDesc' === t - ? this._decodeStr(e, t, r) - : 'int' === t || 'enum' === t - ? this._decodeInt(e, i.args && i.args[0], r) - : null !== i.use - ? this._getUse(i.use, e._reporterState.obj)._decode(e, r) - : e.error('unknown tag: ' + t); - }), - (u.prototype._getUse = function (t, e) { - const r = this._baseState; - return ( - (r.useDecoder = this._use(t, e)), - s(null === r.useDecoder._baseState.parent), - (r.useDecoder = r.useDecoder._baseState.children[0]), - r.implicit !== r.useDecoder._baseState.implicit && - ((r.useDecoder = r.useDecoder.clone()), (r.useDecoder._baseState.implicit = r.implicit)), - r.useDecoder - ); - }), - (u.prototype._decodeChoice = function (t, e) { - const r = this._baseState; - let i = null, - n = !1; - return ( - Object.keys(r.choice).some(function (o) { - const s = t.save(), - a = r.choice[o]; - try { - const r = a._decode(t, e); - if (t.isError(r)) return !1; - (i = { type: o, value: r }), (n = !0); - } catch (e) { - return t.restore(s), !1; - } - return !0; - }, this), - n ? i : t.error('Choice not matched') - ); - }), - (u.prototype._createEncoderBuffer = function (t) { - return new n(t, this.reporter); - }), - (u.prototype._encode = function (t, e, r) { - const i = this._baseState; - if (null !== i.default && i.default === t) return; - const n = this._encodeValue(t, e, r); - return void 0 === n || this._skipDefault(n, e, r) ? void 0 : n; - }), - (u.prototype._encodeValue = function (t, e, r) { - const n = this._baseState; - if (null === n.parent) return n.children[0]._encode(t, e || new i()); - let o = null; - if (((this.reporter = e), n.optional && void 0 === t)) { - if (null === n.default) return; - t = n.default; - } - let s = null, - a = !1; - if (n.any) o = this._createEncoderBuffer(t); - else if (n.choice) o = this._encodeChoice(t, e); - else if (n.contains) (s = this._getUse(n.contains, r)._encode(t, e)), (a = !0); - else if (n.children) - (s = n.children - .map(function (r) { - if ('null_' === r._baseState.tag) return r._encode(null, e, t); - if (null === r._baseState.key) return e.error('Child should have a key'); - const i = e.enterKey(r._baseState.key); - if ('object' != typeof t) return e.error('Child expected, but input is not object'); - const n = r._encode(t[r._baseState.key], e, t); - return e.leaveKey(i), n; - }, this) - .filter(function (t) { - return t; - })), - (s = this._createEncoderBuffer(s)); - else if ('seqof' === n.tag || 'setof' === n.tag) { - if (!n.args || 1 !== n.args.length) return e.error('Too many args for : ' + n.tag); - if (!Array.isArray(t)) return e.error('seqof/setof, but data is not Array'); - const r = this.clone(); - (r._baseState.implicit = null), - (s = this._createEncoderBuffer( - t.map(function (r) { - const i = this._baseState; - return this._getUse(i.args[0], t)._encode(r, e); - }, r) - )); - } else null !== n.use ? (o = this._getUse(n.use, r)._encode(t, e)) : ((s = this._encodePrimitive(n.tag, t)), (a = !0)); - if (!n.any && null === n.choice) { - const t = null !== n.implicit ? n.implicit : n.tag, - r = null === n.implicit ? 'universal' : 'context'; - null === t - ? null === n.use && e.error('Tag could be omitted only for .use()') - : null === n.use && (o = this._encodeComposite(t, a, r, s)); - } - return null !== n.explicit && (o = this._encodeComposite(n.explicit, !1, 'context', o)), o; - }), - (u.prototype._encodeChoice = function (t, e) { - const r = this._baseState, - i = r.choice[t.type]; - return i || s(!1, t.type + ' not found in ' + JSON.stringify(Object.keys(r.choice))), i._encode(t.value, e); - }), - (u.prototype._encodePrimitive = function (t, e) { - const r = this._baseState; - if (/str$/.test(t)) return this._encodeStr(e, t); - if ('objid' === t && r.args) return this._encodeObjid(e, r.reverseArgs[0], r.args[1]); - if ('objid' === t) return this._encodeObjid(e, null, null); - if ('gentime' === t || 'utctime' === t) return this._encodeTime(e, t); - if ('null_' === t) return this._encodeNull(); - if ('int' === t || 'enum' === t) return this._encodeInt(e, r.args && r.reverseArgs[0]); - if ('bool' === t) return this._encodeBool(e); - if ('objDesc' === t) return this._encodeStr(e, t); - throw new Error('Unsupported tag: ' + t); - }), - (u.prototype._isNumstr = function (t) { - return /^[0-9 ]*$/.test(t); - }), - (u.prototype._isPrintstr = function (t) { - return /^[A-Za-z0-9 '()+,-./:=?]*$/.test(t); - }); - }, - 7298: (t, e, r) => { - 'use strict'; - const i = r(87); - function n(t) { - this._reporterState = { obj: null, path: [], options: t || {}, errors: [] }; - } - function o(t, e) { - (this.path = t), this.rethrow(e); - } - (e.b = n), - (n.prototype.isError = function (t) { - return t instanceof o; - }), - (n.prototype.save = function () { - const t = this._reporterState; - return { obj: t.obj, pathLen: t.path.length }; - }), - (n.prototype.restore = function (t) { - const e = this._reporterState; - (e.obj = t.obj), (e.path = e.path.slice(0, t.pathLen)); - }), - (n.prototype.enterKey = function (t) { - return this._reporterState.path.push(t); - }), - (n.prototype.exitKey = function (t) { - const e = this._reporterState; - e.path = e.path.slice(0, t - 1); - }), - (n.prototype.leaveKey = function (t, e, r) { - const i = this._reporterState; - this.exitKey(t), null !== i.obj && (i.obj[e] = r); - }), - (n.prototype.path = function () { - return this._reporterState.path.join('/'); - }), - (n.prototype.enterObject = function () { - const t = this._reporterState, - e = t.obj; - return (t.obj = {}), e; - }), - (n.prototype.leaveObject = function (t) { - const e = this._reporterState, - r = e.obj; - return (e.obj = t), r; - }), - (n.prototype.error = function (t) { - let e; - const r = this._reporterState, - i = t instanceof o; - if ( - ((e = i - ? t - : new o( - r.path - .map(function (t) { - return '[' + JSON.stringify(t) + ']'; - }) - .join(''), - t.message || t, - t.stack - )), - !r.options.partial) - ) - throw e; - return i || r.errors.push(e), e; - }), - (n.prototype.wrapResult = function (t) { - const e = this._reporterState; - return e.options.partial ? { result: this.isError(t) ? null : t, errors: e.errors } : t; - }), - i(o, Error), - (o.prototype.rethrow = function (t) { - if ( - ((this.message = t + ' at: ' + (this.path || '(shallow)')), - Error.captureStackTrace && Error.captureStackTrace(this, o), - !this.stack) - ) - try { - throw new Error(this.message); - } catch (t) { - this.stack = t.stack; - } - return this; - }); - }, - 643: (t, e) => { - 'use strict'; - function r(t) { - const e = {}; - return ( - Object.keys(t).forEach(function (r) { - (0 | r) == r && (r |= 0); - const i = t[r]; - e[i] = r; - }), - e - ); - } - (e.tagClass = { 0: 'universal', 1: 'application', 2: 'context', 3: 'private' }), - (e.tagClassByName = r(e.tagClass)), - (e.tag = { - 0: 'end', - 1: 'bool', - 2: 'int', - 3: 'bitstr', - 4: 'octstr', - 5: 'null_', - 6: 'objid', - 7: 'objDesc', - 8: 'external', - 9: 'real', - 10: 'enum', - 11: 'embed', - 12: 'utf8str', - 13: 'relativeOid', - 16: 'seq', - 17: 'set', - 18: 'numstr', - 19: 'printstr', - 20: 't61str', - 21: 'videostr', - 22: 'ia5str', - 23: 'utctime', - 24: 'gentime', - 25: 'graphstr', - 26: 'iso646str', - 27: 'genstr', - 28: 'unistr', - 29: 'charstr', - 30: 'bmpstr', - }), - (e.tagByName = r(e.tag)); - }, - 7624: (t, e, r) => { - 'use strict'; - const i = e; - (i._reverse = function (t) { - const e = {}; - return ( - Object.keys(t).forEach(function (r) { - (0 | r) == r && (r |= 0); - const i = t[r]; - e[i] = r; - }), - e - ); - }), - (i.der = r(643)); - }, - 8306: (t, e, r) => { - 'use strict'; - const i = r(87), - n = r(5911), - o = r(3370).C, - s = r(1388), - a = r(643); - function h(t) { - (this.enc = 'der'), (this.name = t.name), (this.entity = t), (this.tree = new u()), this.tree._init(t.body); - } - function u(t) { - s.call(this, 'der', t); - } - function f(t, e) { - let r = t.readUInt8(e); - if (t.isError(r)) return r; - const i = a.tagClass[r >> 6], - n = 0 == (32 & r); - if (31 == (31 & r)) { - let i = r; - for (r = 0; 128 == (128 & i); ) { - if (((i = t.readUInt8(e)), t.isError(i))) return i; - (r <<= 7), (r |= 127 & i); - } - } else r &= 31; - return { cls: i, primitive: n, tag: r, tagStr: a.tag[r] }; - } - function c(t, e, r) { - let i = t.readUInt8(r); - if (t.isError(i)) return i; - if (!e && 128 === i) return null; - if (0 == (128 & i)) return i; - const n = 127 & i; - if (n > 4) return t.error('length octect is too long'); - i = 0; - for (let e = 0; e < n; e++) { - i <<= 8; - const e = t.readUInt8(r); - if (t.isError(e)) return e; - i |= e; - } - return i; - } - (t.exports = h), - (h.prototype.decode = function (t, e) { - return o.isDecoderBuffer(t) || (t = new o(t, e)), this.tree._decode(t, e); - }), - i(u, s), - (u.prototype._peekTag = function (t, e, r) { - if (t.isEmpty()) return !1; - const i = t.save(), - n = f(t, 'Failed to peek tag: "' + e + '"'); - return t.isError(n) ? n : (t.restore(i), n.tag === e || n.tagStr === e || n.tagStr + 'of' === e || r); - }), - (u.prototype._decodeTag = function (t, e, r) { - const i = f(t, 'Failed to decode tag of "' + e + '"'); - if (t.isError(i)) return i; - let n = c(t, i.primitive, 'Failed to get length of "' + e + '"'); - if (t.isError(n)) return n; - if (!r && i.tag !== e && i.tagStr !== e && i.tagStr + 'of' !== e) return t.error('Failed to match tag: "' + e + '"'); - if (i.primitive || null !== n) return t.skip(n, 'Failed to match body of: "' + e + '"'); - const o = t.save(), - s = this._skipUntilEnd(t, 'Failed to skip indefinite length body: "' + this.tag + '"'); - return t.isError(s) ? s : ((n = t.offset - o.offset), t.restore(o), t.skip(n, 'Failed to match body of: "' + e + '"')); - }), - (u.prototype._skipUntilEnd = function (t, e) { - for (;;) { - const r = f(t, e); - if (t.isError(r)) return r; - const i = c(t, r.primitive, e); - if (t.isError(i)) return i; - let n; - if (((n = r.primitive || null !== i ? t.skip(i) : this._skipUntilEnd(t, e)), t.isError(n))) return n; - if ('end' === r.tagStr) break; - } - }), - (u.prototype._decodeList = function (t, e, r, i) { - const n = []; - for (; !t.isEmpty(); ) { - const e = this._peekTag(t, 'end'); - if (t.isError(e)) return e; - const o = r.decode(t, 'der', i); - if (t.isError(o) && e) break; - n.push(o); - } - return n; - }), - (u.prototype._decodeStr = function (t, e) { - if ('bitstr' === e) { - const e = t.readUInt8(); - return t.isError(e) ? e : { unused: e, data: t.raw() }; - } - if ('bmpstr' === e) { - const e = t.raw(); - if (e.length % 2 == 1) return t.error('Decoding of string type: bmpstr length mismatch'); - let r = ''; - for (let t = 0; t < e.length / 2; t++) r += String.fromCharCode(e.readUInt16BE(2 * t)); - return r; - } - if ('numstr' === e) { - const e = t.raw().toString('ascii'); - return this._isNumstr(e) ? e : t.error('Decoding of string type: numstr unsupported characters'); - } - if ('octstr' === e) return t.raw(); - if ('objDesc' === e) return t.raw(); - if ('printstr' === e) { - const e = t.raw().toString('ascii'); - return this._isPrintstr(e) ? e : t.error('Decoding of string type: printstr unsupported characters'); - } - return /str$/.test(e) ? t.raw().toString() : t.error('Decoding of string type: ' + e + ' unsupported'); - }), - (u.prototype._decodeObjid = function (t, e, r) { - let i; - const n = []; - let o = 0, - s = 0; - for (; !t.isEmpty(); ) (s = t.readUInt8()), (o <<= 7), (o |= 127 & s), 0 == (128 & s) && (n.push(o), (o = 0)); - 128 & s && n.push(o); - const a = (n[0] / 40) | 0, - h = n[0] % 40; - if (((i = r ? n : [a, h].concat(n.slice(1))), e)) { - let t = e[i.join(' ')]; - void 0 === t && (t = e[i.join('.')]), void 0 !== t && (i = t); - } - return i; - }), - (u.prototype._decodeTime = function (t, e) { - const r = t.raw().toString(); - let i, n, o, s, a, h; - if ('gentime' === e) - (i = 0 | r.slice(0, 4)), - (n = 0 | r.slice(4, 6)), - (o = 0 | r.slice(6, 8)), - (s = 0 | r.slice(8, 10)), - (a = 0 | r.slice(10, 12)), - (h = 0 | r.slice(12, 14)); - else { - if ('utctime' !== e) return t.error('Decoding ' + e + ' time is not supported yet'); - (i = 0 | r.slice(0, 2)), - (n = 0 | r.slice(2, 4)), - (o = 0 | r.slice(4, 6)), - (s = 0 | r.slice(6, 8)), - (a = 0 | r.slice(8, 10)), - (h = 0 | r.slice(10, 12)), - (i = i < 70 ? 2e3 + i : 1900 + i); - } - return Date.UTC(i, n - 1, o, s, a, h, 0); - }), - (u.prototype._decodeNull = function () { - return null; - }), - (u.prototype._decodeBool = function (t) { - const e = t.readUInt8(); - return t.isError(e) ? e : 0 !== e; - }), - (u.prototype._decodeInt = function (t, e) { - const r = t.raw(); - let i = new n(r); - return e && (i = e[i.toString(10)] || i), i; - }), - (u.prototype._use = function (t, e) { - return 'function' == typeof t && (t = t(e)), t._getDecoder('der').tree; - }); - }, - 4823: (t, e, r) => { - 'use strict'; - const i = e; - (i.der = r(8306)), (i.pem = r(8033)); - }, - 8033: (t, e, r) => { - 'use strict'; - const i = r(87), - n = r(1788).Buffer, - o = r(8306); - function s(t) { - o.call(this, t), (this.enc = 'pem'); - } - i(s, o), - (t.exports = s), - (s.prototype.decode = function (t, e) { - const r = t.toString().split(/[\r\n]+/g), - i = e.label.toUpperCase(), - s = /^-----(BEGIN|END) ([^-]+)-----$/; - let a = -1, - h = -1; - for (let t = 0; t < r.length; t++) { - const e = r[t].match(s); - if (null !== e && e[2] === i) { - if (-1 !== a) { - if ('END' !== e[1]) break; - h = t; - break; - } - if ('BEGIN' !== e[1]) break; - a = t; - } - } - if (-1 === a || -1 === h) throw new Error('PEM section not found for: ' + i); - const u = r.slice(a + 1, h).join(''); - u.replace(/[^a-z0-9+/=]+/gi, ''); - const f = n.from(u, 'base64'); - return o.prototype.decode.call(this, f, e); - }); - }, - 1584: (t, e, r) => { - 'use strict'; - const i = r(87), - n = r(1788).Buffer, - o = r(1388), - s = r(643); - function a(t) { - (this.enc = 'der'), (this.name = t.name), (this.entity = t), (this.tree = new h()), this.tree._init(t.body); - } - function h(t) { - o.call(this, 'der', t); - } - function u(t) { - return t < 10 ? '0' + t : t; - } - (t.exports = a), - (a.prototype.encode = function (t, e) { - return this.tree._encode(t, e).join(); - }), - i(h, o), - (h.prototype._encodeComposite = function (t, e, r, i) { - const o = (function (t, e, r, i) { - let n; - if (('seqof' === t ? (t = 'seq') : 'setof' === t && (t = 'set'), s.tagByName.hasOwnProperty(t))) n = s.tagByName[t]; - else { - if ('number' != typeof t || (0 | t) !== t) return i.error('Unknown tag: ' + t); - n = t; - } - return n >= 31 - ? i.error('Multi-octet tag encoding unsupported') - : (e || (n |= 32), (n |= s.tagClassByName[r || 'universal'] << 6), n); - })(t, e, r, this.reporter); - if (i.length < 128) { - const t = n.alloc(2); - return (t[0] = o), (t[1] = i.length), this._createEncoderBuffer([t, i]); - } - let a = 1; - for (let t = i.length; t >= 256; t >>= 8) a++; - const h = n.alloc(2 + a); - (h[0] = o), (h[1] = 128 | a); - for (let t = 1 + a, e = i.length; e > 0; t--, e >>= 8) h[t] = 255 & e; - return this._createEncoderBuffer([h, i]); - }), - (h.prototype._encodeStr = function (t, e) { - if ('bitstr' === e) return this._createEncoderBuffer([0 | t.unused, t.data]); - if ('bmpstr' === e) { - const e = n.alloc(2 * t.length); - for (let r = 0; r < t.length; r++) e.writeUInt16BE(t.charCodeAt(r), 2 * r); - return this._createEncoderBuffer(e); - } - return 'numstr' === e - ? this._isNumstr(t) - ? this._createEncoderBuffer(t) - : this.reporter.error('Encoding of string type: numstr supports only digits and space') - : 'printstr' === e - ? this._isPrintstr(t) - ? this._createEncoderBuffer(t) - : this.reporter.error( - 'Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark' - ) - : /str$/.test(e) || 'objDesc' === e - ? this._createEncoderBuffer(t) - : this.reporter.error('Encoding of string type: ' + e + ' unsupported'); - }), - (h.prototype._encodeObjid = function (t, e, r) { - if ('string' == typeof t) { - if (!e) return this.reporter.error('string objid given, but no values map found'); - if (!e.hasOwnProperty(t)) return this.reporter.error('objid not found in values map'); - t = e[t].split(/[\s.]+/g); - for (let e = 0; e < t.length; e++) t[e] |= 0; - } else if (Array.isArray(t)) { - t = t.slice(); - for (let e = 0; e < t.length; e++) t[e] |= 0; - } - if (!Array.isArray(t)) return this.reporter.error('objid() should be either array or string, got: ' + JSON.stringify(t)); - if (!r) { - if (t[1] >= 40) return this.reporter.error('Second objid identifier OOB'); - t.splice(0, 2, 40 * t[0] + t[1]); - } - let i = 0; - for (let e = 0; e < t.length; e++) { - let r = t[e]; - for (i++; r >= 128; r >>= 7) i++; - } - const o = n.alloc(i); - let s = o.length - 1; - for (let e = t.length - 1; e >= 0; e--) { - let r = t[e]; - for (o[s--] = 127 & r; (r >>= 7) > 0; ) o[s--] = 128 | (127 & r); - } - return this._createEncoderBuffer(o); - }), - (h.prototype._encodeTime = function (t, e) { - let r; - const i = new Date(t); - return ( - 'gentime' === e - ? (r = [ - u(i.getUTCFullYear()), - u(i.getUTCMonth() + 1), - u(i.getUTCDate()), - u(i.getUTCHours()), - u(i.getUTCMinutes()), - u(i.getUTCSeconds()), - 'Z', - ].join('')) - : 'utctime' === e - ? (r = [ - u(i.getUTCFullYear() % 100), - u(i.getUTCMonth() + 1), - u(i.getUTCDate()), - u(i.getUTCHours()), - u(i.getUTCMinutes()), - u(i.getUTCSeconds()), - 'Z', - ].join('')) - : this.reporter.error('Encoding ' + e + ' time is not supported yet'), - this._encodeStr(r, 'octstr') - ); - }), - (h.prototype._encodeNull = function () { - return this._createEncoderBuffer(''); - }), - (h.prototype._encodeInt = function (t, e) { - if ('string' == typeof t) { - if (!e) return this.reporter.error('String int or enum given, but no values map'); - if (!e.hasOwnProperty(t)) return this.reporter.error("Values map doesn't contain: " + JSON.stringify(t)); - t = e[t]; - } - if ('number' != typeof t && !n.isBuffer(t)) { - const e = t.toArray(); - !t.sign && 128 & e[0] && e.unshift(0), (t = n.from(e)); - } - if (n.isBuffer(t)) { - let e = t.length; - 0 === t.length && e++; - const r = n.alloc(e); - return t.copy(r), 0 === t.length && (r[0] = 0), this._createEncoderBuffer(r); - } - if (t < 128) return this._createEncoderBuffer(t); - if (t < 256) return this._createEncoderBuffer([0, t]); - let r = 1; - for (let e = t; e >= 256; e >>= 8) r++; - const i = new Array(r); - for (let e = i.length - 1; e >= 0; e--) (i[e] = 255 & t), (t >>= 8); - return 128 & i[0] && i.unshift(0), this._createEncoderBuffer(n.from(i)); - }), - (h.prototype._encodeBool = function (t) { - return this._createEncoderBuffer(t ? 255 : 0); - }), - (h.prototype._use = function (t, e) { - return 'function' == typeof t && (t = t(e)), t._getEncoder('der').tree; - }), - (h.prototype._skipDefault = function (t, e, r) { - const i = this._baseState; - let n; - if (null === i.default) return !1; - const o = t.join(); - if ( - (void 0 === i.defaultBuffer && (i.defaultBuffer = this._encodeValue(i.default, e, r).join()), - o.length !== i.defaultBuffer.length) - ) - return !1; - for (n = 0; n < o.length; n++) if (o[n] !== i.defaultBuffer[n]) return !1; - return !0; - }); - }, - 3886: (t, e, r) => { - 'use strict'; - const i = e; - (i.der = r(1584)), (i.pem = r(6927)); - }, - 6927: (t, e, r) => { - 'use strict'; - const i = r(87), - n = r(1584); - function o(t) { - n.call(this, t), (this.enc = 'pem'); - } - i(o, n), - (t.exports = o), - (o.prototype.encode = function (t, e) { - const r = n.prototype.encode.call(this, t).toString('base64'), - i = ['-----BEGIN ' + e.label + '-----']; - for (let t = 0; t < r.length; t += 64) i.push(r.slice(t, t + 64)); - return i.push('-----END ' + e.label + '-----'), i.join('\n'); - }); - }, - 5911: function (t, e, r) { - !(function (t, e) { - 'use strict'; - function i(t, e) { - if (!t) throw new Error(e || 'Assertion failed'); - } - function n(t, e) { - t.super_ = e; - var r = function () {}; - (r.prototype = e.prototype), (t.prototype = new r()), (t.prototype.constructor = t); - } - function o(t, e, r) { - if (o.isBN(t)) return t; - (this.negative = 0), - (this.words = null), - (this.length = 0), - (this.red = null), - null !== t && (('le' !== e && 'be' !== e) || ((r = e), (e = 10)), this._init(t || 0, e || 10, r || 'be')); - } - var s; - 'object' == typeof t ? (t.exports = o) : (e.BN = o), (o.BN = o), (o.wordSize = 26); - try { - s = 'undefined' != typeof window && void 0 !== window.Buffer ? window.Buffer : r(2909).Buffer; - } catch (t) {} - function a(t, e) { - var r = t.charCodeAt(e); - return r >= 65 && r <= 70 ? r - 55 : r >= 97 && r <= 102 ? r - 87 : (r - 48) & 15; - } - function h(t, e, r) { - var i = a(t, r); - return r - 1 >= e && (i |= a(t, r - 1) << 4), i; - } - function u(t, e, r, i) { - for (var n = 0, o = Math.min(t.length, r), s = e; s < o; s++) { - var a = t.charCodeAt(s) - 48; - (n *= i), (n += a >= 49 ? a - 49 + 10 : a >= 17 ? a - 17 + 10 : a); - } - return n; - } - (o.isBN = function (t) { - return ( - t instanceof o || (null !== t && 'object' == typeof t && t.constructor.wordSize === o.wordSize && Array.isArray(t.words)) - ); - }), - (o.max = function (t, e) { - return t.cmp(e) > 0 ? t : e; - }), - (o.min = function (t, e) { - return t.cmp(e) < 0 ? t : e; - }), - (o.prototype._init = function (t, e, r) { - if ('number' == typeof t) return this._initNumber(t, e, r); - if ('object' == typeof t) return this._initArray(t, e, r); - 'hex' === e && (e = 16), i(e === (0 | e) && e >= 2 && e <= 36); - var n = 0; - '-' === (t = t.toString().replace(/\s+/g, ''))[0] && (n++, (this.negative = 1)), - n < t.length && - (16 === e ? this._parseHex(t, n, r) : (this._parseBase(t, e, n), 'le' === r && this._initArray(this.toArray(), e, r))); - }), - (o.prototype._initNumber = function (t, e, r) { - t < 0 && ((this.negative = 1), (t = -t)), - t < 67108864 - ? ((this.words = [67108863 & t]), (this.length = 1)) - : t < 4503599627370496 - ? ((this.words = [67108863 & t, (t / 67108864) & 67108863]), (this.length = 2)) - : (i(t < 9007199254740992), (this.words = [67108863 & t, (t / 67108864) & 67108863, 1]), (this.length = 3)), - 'le' === r && this._initArray(this.toArray(), e, r); - }), - (o.prototype._initArray = function (t, e, r) { - if ((i('number' == typeof t.length), t.length <= 0)) return (this.words = [0]), (this.length = 1), this; - (this.length = Math.ceil(t.length / 3)), (this.words = new Array(this.length)); - for (var n = 0; n < this.length; n++) this.words[n] = 0; - var o, - s, - a = 0; - if ('be' === r) - for (n = t.length - 1, o = 0; n >= 0; n -= 3) - (s = t[n] | (t[n - 1] << 8) | (t[n - 2] << 16)), - (this.words[o] |= (s << a) & 67108863), - (this.words[o + 1] = (s >>> (26 - a)) & 67108863), - (a += 24) >= 26 && ((a -= 26), o++); - else if ('le' === r) - for (n = 0, o = 0; n < t.length; n += 3) - (s = t[n] | (t[n + 1] << 8) | (t[n + 2] << 16)), - (this.words[o] |= (s << a) & 67108863), - (this.words[o + 1] = (s >>> (26 - a)) & 67108863), - (a += 24) >= 26 && ((a -= 26), o++); - return this.strip(); - }), - (o.prototype._parseHex = function (t, e, r) { - (this.length = Math.ceil((t.length - e) / 6)), (this.words = new Array(this.length)); - for (var i = 0; i < this.length; i++) this.words[i] = 0; - var n, - o = 0, - s = 0; - if ('be' === r) - for (i = t.length - 1; i >= e; i -= 2) - (n = h(t, e, i) << o), - (this.words[s] |= 67108863 & n), - o >= 18 ? ((o -= 18), (s += 1), (this.words[s] |= n >>> 26)) : (o += 8); - else - for (i = (t.length - e) % 2 == 0 ? e + 1 : e; i < t.length; i += 2) - (n = h(t, e, i) << o), - (this.words[s] |= 67108863 & n), - o >= 18 ? ((o -= 18), (s += 1), (this.words[s] |= n >>> 26)) : (o += 8); - this.strip(); - }), - (o.prototype._parseBase = function (t, e, r) { - (this.words = [0]), (this.length = 1); - for (var i = 0, n = 1; n <= 67108863; n *= e) i++; - i--, (n = (n / e) | 0); - for (var o = t.length - r, s = o % i, a = Math.min(o, o - s) + r, h = 0, f = r; f < a; f += i) - (h = u(t, f, f + i, e)), this.imuln(n), this.words[0] + h < 67108864 ? (this.words[0] += h) : this._iaddn(h); - if (0 !== s) { - var c = 1; - for (h = u(t, f, t.length, e), f = 0; f < s; f++) c *= e; - this.imuln(c), this.words[0] + h < 67108864 ? (this.words[0] += h) : this._iaddn(h); - } - this.strip(); - }), - (o.prototype.copy = function (t) { - t.words = new Array(this.length); - for (var e = 0; e < this.length; e++) t.words[e] = this.words[e]; - (t.length = this.length), (t.negative = this.negative), (t.red = this.red); - }), - (o.prototype.clone = function () { - var t = new o(null); - return this.copy(t), t; - }), - (o.prototype._expand = function (t) { - for (; this.length < t; ) this.words[this.length++] = 0; - return this; - }), - (o.prototype.strip = function () { - for (; this.length > 1 && 0 === this.words[this.length - 1]; ) this.length--; - return this._normSign(); - }), - (o.prototype._normSign = function () { - return 1 === this.length && 0 === this.words[0] && (this.negative = 0), this; - }), - (o.prototype.inspect = function () { - return (this.red ? ''; - }); - var f = [ - '', - '0', - '00', - '000', - '0000', - '00000', - '000000', - '0000000', - '00000000', - '000000000', - '0000000000', - '00000000000', - '000000000000', - '0000000000000', - '00000000000000', - '000000000000000', - '0000000000000000', - '00000000000000000', - '000000000000000000', - '0000000000000000000', - '00000000000000000000', - '000000000000000000000', - '0000000000000000000000', - '00000000000000000000000', - '000000000000000000000000', - '0000000000000000000000000', - ], - c = [0, 0, 25, 16, 12, 11, 10, 9, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5], - l = [ - 0, 0, 33554432, 43046721, 16777216, 48828125, 60466176, 40353607, 16777216, 43046721, 1e7, 19487171, 35831808, 62748517, - 7529536, 11390625, 16777216, 24137569, 34012224, 47045881, 64e6, 4084101, 5153632, 6436343, 7962624, 9765625, 11881376, - 14348907, 17210368, 20511149, 243e5, 28629151, 33554432, 39135393, 45435424, 52521875, 60466176, - ]; - function d(t, e, r) { - r.negative = e.negative ^ t.negative; - var i = (t.length + e.length) | 0; - (r.length = i), (i = (i - 1) | 0); - var n = 0 | t.words[0], - o = 0 | e.words[0], - s = n * o, - a = 67108863 & s, - h = (s / 67108864) | 0; - r.words[0] = a; - for (var u = 1; u < i; u++) { - for (var f = h >>> 26, c = 67108863 & h, l = Math.min(u, e.length - 1), d = Math.max(0, u - t.length + 1); d <= l; d++) { - var p = (u - d) | 0; - (f += ((s = (n = 0 | t.words[p]) * (o = 0 | e.words[d]) + c) / 67108864) | 0), (c = 67108863 & s); - } - (r.words[u] = 0 | c), (h = 0 | f); - } - return 0 !== h ? (r.words[u] = 0 | h) : r.length--, r.strip(); - } - (o.prototype.toString = function (t, e) { - var r; - if (((e = 0 | e || 1), 16 === (t = t || 10) || 'hex' === t)) { - r = ''; - for (var n = 0, o = 0, s = 0; s < this.length; s++) { - var a = this.words[s], - h = (16777215 & ((a << n) | o)).toString(16); - (r = 0 != (o = (a >>> (24 - n)) & 16777215) || s !== this.length - 1 ? f[6 - h.length] + h + r : h + r), - (n += 2) >= 26 && ((n -= 26), s--); - } - for (0 !== o && (r = o.toString(16) + r); r.length % e != 0; ) r = '0' + r; - return 0 !== this.negative && (r = '-' + r), r; - } - if (t === (0 | t) && t >= 2 && t <= 36) { - var u = c[t], - d = l[t]; - r = ''; - var p = this.clone(); - for (p.negative = 0; !p.isZero(); ) { - var m = p.modn(d).toString(t); - r = (p = p.idivn(d)).isZero() ? m + r : f[u - m.length] + m + r; - } - for (this.isZero() && (r = '0' + r); r.length % e != 0; ) r = '0' + r; - return 0 !== this.negative && (r = '-' + r), r; - } - i(!1, 'Base should be between 2 and 36'); - }), - (o.prototype.toNumber = function () { - var t = this.words[0]; - return ( - 2 === this.length - ? (t += 67108864 * this.words[1]) - : 3 === this.length && 1 === this.words[2] - ? (t += 4503599627370496 + 67108864 * this.words[1]) - : this.length > 2 && i(!1, 'Number can only safely store up to 53 bits'), - 0 !== this.negative ? -t : t - ); - }), - (o.prototype.toJSON = function () { - return this.toString(16); - }), - (o.prototype.toBuffer = function (t, e) { - return i(void 0 !== s), this.toArrayLike(s, t, e); - }), - (o.prototype.toArray = function (t, e) { - return this.toArrayLike(Array, t, e); - }), - (o.prototype.toArrayLike = function (t, e, r) { - var n = this.byteLength(), - o = r || Math.max(1, n); - i(n <= o, 'byte array longer than desired length'), i(o > 0, 'Requested array length <= 0'), this.strip(); - var s, - a, - h = 'le' === e, - u = new t(o), - f = this.clone(); - if (h) { - for (a = 0; !f.isZero(); a++) (s = f.andln(255)), f.iushrn(8), (u[a] = s); - for (; a < o; a++) u[a] = 0; - } else { - for (a = 0; a < o - n; a++) u[a] = 0; - for (a = 0; !f.isZero(); a++) (s = f.andln(255)), f.iushrn(8), (u[o - a - 1] = s); - } - return u; - }), - Math.clz32 - ? (o.prototype._countBits = function (t) { - return 32 - Math.clz32(t); - }) - : (o.prototype._countBits = function (t) { - var e = t, - r = 0; - return ( - e >= 4096 && ((r += 13), (e >>>= 13)), - e >= 64 && ((r += 7), (e >>>= 7)), - e >= 8 && ((r += 4), (e >>>= 4)), - e >= 2 && ((r += 2), (e >>>= 2)), - r + e - ); - }), - (o.prototype._zeroBits = function (t) { - if (0 === t) return 26; - var e = t, - r = 0; - return ( - 0 == (8191 & e) && ((r += 13), (e >>>= 13)), - 0 == (127 & e) && ((r += 7), (e >>>= 7)), - 0 == (15 & e) && ((r += 4), (e >>>= 4)), - 0 == (3 & e) && ((r += 2), (e >>>= 2)), - 0 == (1 & e) && r++, - r - ); - }), - (o.prototype.bitLength = function () { - var t = this.words[this.length - 1], - e = this._countBits(t); - return 26 * (this.length - 1) + e; - }), - (o.prototype.zeroBits = function () { - if (this.isZero()) return 0; - for (var t = 0, e = 0; e < this.length; e++) { - var r = this._zeroBits(this.words[e]); - if (((t += r), 26 !== r)) break; - } - return t; - }), - (o.prototype.byteLength = function () { - return Math.ceil(this.bitLength() / 8); - }), - (o.prototype.toTwos = function (t) { - return 0 !== this.negative ? this.abs().inotn(t).iaddn(1) : this.clone(); - }), - (o.prototype.fromTwos = function (t) { - return this.testn(t - 1) ? this.notn(t).iaddn(1).ineg() : this.clone(); - }), - (o.prototype.isNeg = function () { - return 0 !== this.negative; - }), - (o.prototype.neg = function () { - return this.clone().ineg(); - }), - (o.prototype.ineg = function () { - return this.isZero() || (this.negative ^= 1), this; - }), - (o.prototype.iuor = function (t) { - for (; this.length < t.length; ) this.words[this.length++] = 0; - for (var e = 0; e < t.length; e++) this.words[e] = this.words[e] | t.words[e]; - return this.strip(); - }), - (o.prototype.ior = function (t) { - return i(0 == (this.negative | t.negative)), this.iuor(t); - }), - (o.prototype.or = function (t) { - return this.length > t.length ? this.clone().ior(t) : t.clone().ior(this); - }), - (o.prototype.uor = function (t) { - return this.length > t.length ? this.clone().iuor(t) : t.clone().iuor(this); - }), - (o.prototype.iuand = function (t) { - var e; - e = this.length > t.length ? t : this; - for (var r = 0; r < e.length; r++) this.words[r] = this.words[r] & t.words[r]; - return (this.length = e.length), this.strip(); - }), - (o.prototype.iand = function (t) { - return i(0 == (this.negative | t.negative)), this.iuand(t); - }), - (o.prototype.and = function (t) { - return this.length > t.length ? this.clone().iand(t) : t.clone().iand(this); - }), - (o.prototype.uand = function (t) { - return this.length > t.length ? this.clone().iuand(t) : t.clone().iuand(this); - }), - (o.prototype.iuxor = function (t) { - var e, r; - this.length > t.length ? ((e = this), (r = t)) : ((e = t), (r = this)); - for (var i = 0; i < r.length; i++) this.words[i] = e.words[i] ^ r.words[i]; - if (this !== e) for (; i < e.length; i++) this.words[i] = e.words[i]; - return (this.length = e.length), this.strip(); - }), - (o.prototype.ixor = function (t) { - return i(0 == (this.negative | t.negative)), this.iuxor(t); - }), - (o.prototype.xor = function (t) { - return this.length > t.length ? this.clone().ixor(t) : t.clone().ixor(this); - }), - (o.prototype.uxor = function (t) { - return this.length > t.length ? this.clone().iuxor(t) : t.clone().iuxor(this); - }), - (o.prototype.inotn = function (t) { - i('number' == typeof t && t >= 0); - var e = 0 | Math.ceil(t / 26), - r = t % 26; - this._expand(e), r > 0 && e--; - for (var n = 0; n < e; n++) this.words[n] = 67108863 & ~this.words[n]; - return r > 0 && (this.words[n] = ~this.words[n] & (67108863 >> (26 - r))), this.strip(); - }), - (o.prototype.notn = function (t) { - return this.clone().inotn(t); - }), - (o.prototype.setn = function (t, e) { - i('number' == typeof t && t >= 0); - var r = (t / 26) | 0, - n = t % 26; - return this._expand(r + 1), (this.words[r] = e ? this.words[r] | (1 << n) : this.words[r] & ~(1 << n)), this.strip(); - }), - (o.prototype.iadd = function (t) { - var e, r, i; - if (0 !== this.negative && 0 === t.negative) - return (this.negative = 0), (e = this.isub(t)), (this.negative ^= 1), this._normSign(); - if (0 === this.negative && 0 !== t.negative) return (t.negative = 0), (e = this.isub(t)), (t.negative = 1), e._normSign(); - this.length > t.length ? ((r = this), (i = t)) : ((r = t), (i = this)); - for (var n = 0, o = 0; o < i.length; o++) - (e = (0 | r.words[o]) + (0 | i.words[o]) + n), (this.words[o] = 67108863 & e), (n = e >>> 26); - for (; 0 !== n && o < r.length; o++) (e = (0 | r.words[o]) + n), (this.words[o] = 67108863 & e), (n = e >>> 26); - if (((this.length = r.length), 0 !== n)) (this.words[this.length] = n), this.length++; - else if (r !== this) for (; o < r.length; o++) this.words[o] = r.words[o]; - return this; - }), - (o.prototype.add = function (t) { - var e; - return 0 !== t.negative && 0 === this.negative - ? ((t.negative = 0), (e = this.sub(t)), (t.negative ^= 1), e) - : 0 === t.negative && 0 !== this.negative - ? ((this.negative = 0), (e = t.sub(this)), (this.negative = 1), e) - : this.length > t.length - ? this.clone().iadd(t) - : t.clone().iadd(this); - }), - (o.prototype.isub = function (t) { - if (0 !== t.negative) { - t.negative = 0; - var e = this.iadd(t); - return (t.negative = 1), e._normSign(); - } - if (0 !== this.negative) return (this.negative = 0), this.iadd(t), (this.negative = 1), this._normSign(); - var r, - i, - n = this.cmp(t); - if (0 === n) return (this.negative = 0), (this.length = 1), (this.words[0] = 0), this; - n > 0 ? ((r = this), (i = t)) : ((r = t), (i = this)); - for (var o = 0, s = 0; s < i.length; s++) - (o = (e = (0 | r.words[s]) - (0 | i.words[s]) + o) >> 26), (this.words[s] = 67108863 & e); - for (; 0 !== o && s < r.length; s++) (o = (e = (0 | r.words[s]) + o) >> 26), (this.words[s] = 67108863 & e); - if (0 === o && s < r.length && r !== this) for (; s < r.length; s++) this.words[s] = r.words[s]; - return (this.length = Math.max(this.length, s)), r !== this && (this.negative = 1), this.strip(); - }), - (o.prototype.sub = function (t) { - return this.clone().isub(t); - }); - var p = function (t, e, r) { - var i, - n, - o, - s = t.words, - a = e.words, - h = r.words, - u = 0, - f = 0 | s[0], - c = 8191 & f, - l = f >>> 13, - d = 0 | s[1], - p = 8191 & d, - m = d >>> 13, - g = 0 | s[2], - b = 8191 & g, - y = g >>> 13, - v = 0 | s[3], - w = 8191 & v, - _ = v >>> 13, - M = 0 | s[4], - E = 8191 & M, - S = M >>> 13, - x = 0 | s[5], - A = 8191 & x, - k = x >>> 13, - R = 0 | s[6], - B = 8191 & R, - I = R >>> 13, - T = 0 | s[7], - P = 8191 & T, - O = T >>> 13, - L = 0 | s[8], - C = 8191 & L, - N = L >>> 13, - j = 0 | s[9], - U = 8191 & j, - D = j >>> 13, - z = 0 | a[0], - F = 8191 & z, - q = z >>> 13, - H = 0 | a[1], - $ = 8191 & H, - Z = H >>> 13, - G = 0 | a[2], - V = 8191 & G, - W = G >>> 13, - K = 0 | a[3], - Y = 8191 & K, - J = K >>> 13, - X = 0 | a[4], - Q = 8191 & X, - tt = X >>> 13, - et = 0 | a[5], - rt = 8191 & et, - it = et >>> 13, - nt = 0 | a[6], - ot = 8191 & nt, - st = nt >>> 13, - at = 0 | a[7], - ht = 8191 & at, - ut = at >>> 13, - ft = 0 | a[8], - ct = 8191 & ft, - lt = ft >>> 13, - dt = 0 | a[9], - pt = 8191 & dt, - mt = dt >>> 13; - (r.negative = t.negative ^ e.negative), (r.length = 19); - var gt = (((u + (i = Math.imul(c, F))) | 0) + ((8191 & (n = ((n = Math.imul(c, q)) + Math.imul(l, F)) | 0)) << 13)) | 0; - (u = ((((o = Math.imul(l, q)) + (n >>> 13)) | 0) + (gt >>> 26)) | 0), - (gt &= 67108863), - (i = Math.imul(p, F)), - (n = ((n = Math.imul(p, q)) + Math.imul(m, F)) | 0), - (o = Math.imul(m, q)); - var bt = - (((u + (i = (i + Math.imul(c, $)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, Z)) | 0) + Math.imul(l, $)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, Z)) | 0) + (n >>> 13)) | 0) + (bt >>> 26)) | 0), - (bt &= 67108863), - (i = Math.imul(b, F)), - (n = ((n = Math.imul(b, q)) + Math.imul(y, F)) | 0), - (o = Math.imul(y, q)), - (i = (i + Math.imul(p, $)) | 0), - (n = ((n = (n + Math.imul(p, Z)) | 0) + Math.imul(m, $)) | 0), - (o = (o + Math.imul(m, Z)) | 0); - var yt = - (((u + (i = (i + Math.imul(c, V)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, W)) | 0) + Math.imul(l, V)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, W)) | 0) + (n >>> 13)) | 0) + (yt >>> 26)) | 0), - (yt &= 67108863), - (i = Math.imul(w, F)), - (n = ((n = Math.imul(w, q)) + Math.imul(_, F)) | 0), - (o = Math.imul(_, q)), - (i = (i + Math.imul(b, $)) | 0), - (n = ((n = (n + Math.imul(b, Z)) | 0) + Math.imul(y, $)) | 0), - (o = (o + Math.imul(y, Z)) | 0), - (i = (i + Math.imul(p, V)) | 0), - (n = ((n = (n + Math.imul(p, W)) | 0) + Math.imul(m, V)) | 0), - (o = (o + Math.imul(m, W)) | 0); - var vt = - (((u + (i = (i + Math.imul(c, Y)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, J)) | 0) + Math.imul(l, Y)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, J)) | 0) + (n >>> 13)) | 0) + (vt >>> 26)) | 0), - (vt &= 67108863), - (i = Math.imul(E, F)), - (n = ((n = Math.imul(E, q)) + Math.imul(S, F)) | 0), - (o = Math.imul(S, q)), - (i = (i + Math.imul(w, $)) | 0), - (n = ((n = (n + Math.imul(w, Z)) | 0) + Math.imul(_, $)) | 0), - (o = (o + Math.imul(_, Z)) | 0), - (i = (i + Math.imul(b, V)) | 0), - (n = ((n = (n + Math.imul(b, W)) | 0) + Math.imul(y, V)) | 0), - (o = (o + Math.imul(y, W)) | 0), - (i = (i + Math.imul(p, Y)) | 0), - (n = ((n = (n + Math.imul(p, J)) | 0) + Math.imul(m, Y)) | 0), - (o = (o + Math.imul(m, J)) | 0); - var wt = - (((u + (i = (i + Math.imul(c, Q)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, tt)) | 0) + Math.imul(l, Q)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, tt)) | 0) + (n >>> 13)) | 0) + (wt >>> 26)) | 0), - (wt &= 67108863), - (i = Math.imul(A, F)), - (n = ((n = Math.imul(A, q)) + Math.imul(k, F)) | 0), - (o = Math.imul(k, q)), - (i = (i + Math.imul(E, $)) | 0), - (n = ((n = (n + Math.imul(E, Z)) | 0) + Math.imul(S, $)) | 0), - (o = (o + Math.imul(S, Z)) | 0), - (i = (i + Math.imul(w, V)) | 0), - (n = ((n = (n + Math.imul(w, W)) | 0) + Math.imul(_, V)) | 0), - (o = (o + Math.imul(_, W)) | 0), - (i = (i + Math.imul(b, Y)) | 0), - (n = ((n = (n + Math.imul(b, J)) | 0) + Math.imul(y, Y)) | 0), - (o = (o + Math.imul(y, J)) | 0), - (i = (i + Math.imul(p, Q)) | 0), - (n = ((n = (n + Math.imul(p, tt)) | 0) + Math.imul(m, Q)) | 0), - (o = (o + Math.imul(m, tt)) | 0); - var _t = - (((u + (i = (i + Math.imul(c, rt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, it)) | 0) + Math.imul(l, rt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, it)) | 0) + (n >>> 13)) | 0) + (_t >>> 26)) | 0), - (_t &= 67108863), - (i = Math.imul(B, F)), - (n = ((n = Math.imul(B, q)) + Math.imul(I, F)) | 0), - (o = Math.imul(I, q)), - (i = (i + Math.imul(A, $)) | 0), - (n = ((n = (n + Math.imul(A, Z)) | 0) + Math.imul(k, $)) | 0), - (o = (o + Math.imul(k, Z)) | 0), - (i = (i + Math.imul(E, V)) | 0), - (n = ((n = (n + Math.imul(E, W)) | 0) + Math.imul(S, V)) | 0), - (o = (o + Math.imul(S, W)) | 0), - (i = (i + Math.imul(w, Y)) | 0), - (n = ((n = (n + Math.imul(w, J)) | 0) + Math.imul(_, Y)) | 0), - (o = (o + Math.imul(_, J)) | 0), - (i = (i + Math.imul(b, Q)) | 0), - (n = ((n = (n + Math.imul(b, tt)) | 0) + Math.imul(y, Q)) | 0), - (o = (o + Math.imul(y, tt)) | 0), - (i = (i + Math.imul(p, rt)) | 0), - (n = ((n = (n + Math.imul(p, it)) | 0) + Math.imul(m, rt)) | 0), - (o = (o + Math.imul(m, it)) | 0); - var Mt = - (((u + (i = (i + Math.imul(c, ot)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, st)) | 0) + Math.imul(l, ot)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, st)) | 0) + (n >>> 13)) | 0) + (Mt >>> 26)) | 0), - (Mt &= 67108863), - (i = Math.imul(P, F)), - (n = ((n = Math.imul(P, q)) + Math.imul(O, F)) | 0), - (o = Math.imul(O, q)), - (i = (i + Math.imul(B, $)) | 0), - (n = ((n = (n + Math.imul(B, Z)) | 0) + Math.imul(I, $)) | 0), - (o = (o + Math.imul(I, Z)) | 0), - (i = (i + Math.imul(A, V)) | 0), - (n = ((n = (n + Math.imul(A, W)) | 0) + Math.imul(k, V)) | 0), - (o = (o + Math.imul(k, W)) | 0), - (i = (i + Math.imul(E, Y)) | 0), - (n = ((n = (n + Math.imul(E, J)) | 0) + Math.imul(S, Y)) | 0), - (o = (o + Math.imul(S, J)) | 0), - (i = (i + Math.imul(w, Q)) | 0), - (n = ((n = (n + Math.imul(w, tt)) | 0) + Math.imul(_, Q)) | 0), - (o = (o + Math.imul(_, tt)) | 0), - (i = (i + Math.imul(b, rt)) | 0), - (n = ((n = (n + Math.imul(b, it)) | 0) + Math.imul(y, rt)) | 0), - (o = (o + Math.imul(y, it)) | 0), - (i = (i + Math.imul(p, ot)) | 0), - (n = ((n = (n + Math.imul(p, st)) | 0) + Math.imul(m, ot)) | 0), - (o = (o + Math.imul(m, st)) | 0); - var Et = - (((u + (i = (i + Math.imul(c, ht)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, ut)) | 0) + Math.imul(l, ht)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, ut)) | 0) + (n >>> 13)) | 0) + (Et >>> 26)) | 0), - (Et &= 67108863), - (i = Math.imul(C, F)), - (n = ((n = Math.imul(C, q)) + Math.imul(N, F)) | 0), - (o = Math.imul(N, q)), - (i = (i + Math.imul(P, $)) | 0), - (n = ((n = (n + Math.imul(P, Z)) | 0) + Math.imul(O, $)) | 0), - (o = (o + Math.imul(O, Z)) | 0), - (i = (i + Math.imul(B, V)) | 0), - (n = ((n = (n + Math.imul(B, W)) | 0) + Math.imul(I, V)) | 0), - (o = (o + Math.imul(I, W)) | 0), - (i = (i + Math.imul(A, Y)) | 0), - (n = ((n = (n + Math.imul(A, J)) | 0) + Math.imul(k, Y)) | 0), - (o = (o + Math.imul(k, J)) | 0), - (i = (i + Math.imul(E, Q)) | 0), - (n = ((n = (n + Math.imul(E, tt)) | 0) + Math.imul(S, Q)) | 0), - (o = (o + Math.imul(S, tt)) | 0), - (i = (i + Math.imul(w, rt)) | 0), - (n = ((n = (n + Math.imul(w, it)) | 0) + Math.imul(_, rt)) | 0), - (o = (o + Math.imul(_, it)) | 0), - (i = (i + Math.imul(b, ot)) | 0), - (n = ((n = (n + Math.imul(b, st)) | 0) + Math.imul(y, ot)) | 0), - (o = (o + Math.imul(y, st)) | 0), - (i = (i + Math.imul(p, ht)) | 0), - (n = ((n = (n + Math.imul(p, ut)) | 0) + Math.imul(m, ht)) | 0), - (o = (o + Math.imul(m, ut)) | 0); - var St = - (((u + (i = (i + Math.imul(c, ct)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, lt)) | 0) + Math.imul(l, ct)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, lt)) | 0) + (n >>> 13)) | 0) + (St >>> 26)) | 0), - (St &= 67108863), - (i = Math.imul(U, F)), - (n = ((n = Math.imul(U, q)) + Math.imul(D, F)) | 0), - (o = Math.imul(D, q)), - (i = (i + Math.imul(C, $)) | 0), - (n = ((n = (n + Math.imul(C, Z)) | 0) + Math.imul(N, $)) | 0), - (o = (o + Math.imul(N, Z)) | 0), - (i = (i + Math.imul(P, V)) | 0), - (n = ((n = (n + Math.imul(P, W)) | 0) + Math.imul(O, V)) | 0), - (o = (o + Math.imul(O, W)) | 0), - (i = (i + Math.imul(B, Y)) | 0), - (n = ((n = (n + Math.imul(B, J)) | 0) + Math.imul(I, Y)) | 0), - (o = (o + Math.imul(I, J)) | 0), - (i = (i + Math.imul(A, Q)) | 0), - (n = ((n = (n + Math.imul(A, tt)) | 0) + Math.imul(k, Q)) | 0), - (o = (o + Math.imul(k, tt)) | 0), - (i = (i + Math.imul(E, rt)) | 0), - (n = ((n = (n + Math.imul(E, it)) | 0) + Math.imul(S, rt)) | 0), - (o = (o + Math.imul(S, it)) | 0), - (i = (i + Math.imul(w, ot)) | 0), - (n = ((n = (n + Math.imul(w, st)) | 0) + Math.imul(_, ot)) | 0), - (o = (o + Math.imul(_, st)) | 0), - (i = (i + Math.imul(b, ht)) | 0), - (n = ((n = (n + Math.imul(b, ut)) | 0) + Math.imul(y, ht)) | 0), - (o = (o + Math.imul(y, ut)) | 0), - (i = (i + Math.imul(p, ct)) | 0), - (n = ((n = (n + Math.imul(p, lt)) | 0) + Math.imul(m, ct)) | 0), - (o = (o + Math.imul(m, lt)) | 0); - var xt = - (((u + (i = (i + Math.imul(c, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, mt)) | 0) + Math.imul(l, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, mt)) | 0) + (n >>> 13)) | 0) + (xt >>> 26)) | 0), - (xt &= 67108863), - (i = Math.imul(U, $)), - (n = ((n = Math.imul(U, Z)) + Math.imul(D, $)) | 0), - (o = Math.imul(D, Z)), - (i = (i + Math.imul(C, V)) | 0), - (n = ((n = (n + Math.imul(C, W)) | 0) + Math.imul(N, V)) | 0), - (o = (o + Math.imul(N, W)) | 0), - (i = (i + Math.imul(P, Y)) | 0), - (n = ((n = (n + Math.imul(P, J)) | 0) + Math.imul(O, Y)) | 0), - (o = (o + Math.imul(O, J)) | 0), - (i = (i + Math.imul(B, Q)) | 0), - (n = ((n = (n + Math.imul(B, tt)) | 0) + Math.imul(I, Q)) | 0), - (o = (o + Math.imul(I, tt)) | 0), - (i = (i + Math.imul(A, rt)) | 0), - (n = ((n = (n + Math.imul(A, it)) | 0) + Math.imul(k, rt)) | 0), - (o = (o + Math.imul(k, it)) | 0), - (i = (i + Math.imul(E, ot)) | 0), - (n = ((n = (n + Math.imul(E, st)) | 0) + Math.imul(S, ot)) | 0), - (o = (o + Math.imul(S, st)) | 0), - (i = (i + Math.imul(w, ht)) | 0), - (n = ((n = (n + Math.imul(w, ut)) | 0) + Math.imul(_, ht)) | 0), - (o = (o + Math.imul(_, ut)) | 0), - (i = (i + Math.imul(b, ct)) | 0), - (n = ((n = (n + Math.imul(b, lt)) | 0) + Math.imul(y, ct)) | 0), - (o = (o + Math.imul(y, lt)) | 0); - var At = - (((u + (i = (i + Math.imul(p, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(p, mt)) | 0) + Math.imul(m, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(m, mt)) | 0) + (n >>> 13)) | 0) + (At >>> 26)) | 0), - (At &= 67108863), - (i = Math.imul(U, V)), - (n = ((n = Math.imul(U, W)) + Math.imul(D, V)) | 0), - (o = Math.imul(D, W)), - (i = (i + Math.imul(C, Y)) | 0), - (n = ((n = (n + Math.imul(C, J)) | 0) + Math.imul(N, Y)) | 0), - (o = (o + Math.imul(N, J)) | 0), - (i = (i + Math.imul(P, Q)) | 0), - (n = ((n = (n + Math.imul(P, tt)) | 0) + Math.imul(O, Q)) | 0), - (o = (o + Math.imul(O, tt)) | 0), - (i = (i + Math.imul(B, rt)) | 0), - (n = ((n = (n + Math.imul(B, it)) | 0) + Math.imul(I, rt)) | 0), - (o = (o + Math.imul(I, it)) | 0), - (i = (i + Math.imul(A, ot)) | 0), - (n = ((n = (n + Math.imul(A, st)) | 0) + Math.imul(k, ot)) | 0), - (o = (o + Math.imul(k, st)) | 0), - (i = (i + Math.imul(E, ht)) | 0), - (n = ((n = (n + Math.imul(E, ut)) | 0) + Math.imul(S, ht)) | 0), - (o = (o + Math.imul(S, ut)) | 0), - (i = (i + Math.imul(w, ct)) | 0), - (n = ((n = (n + Math.imul(w, lt)) | 0) + Math.imul(_, ct)) | 0), - (o = (o + Math.imul(_, lt)) | 0); - var kt = - (((u + (i = (i + Math.imul(b, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(b, mt)) | 0) + Math.imul(y, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(y, mt)) | 0) + (n >>> 13)) | 0) + (kt >>> 26)) | 0), - (kt &= 67108863), - (i = Math.imul(U, Y)), - (n = ((n = Math.imul(U, J)) + Math.imul(D, Y)) | 0), - (o = Math.imul(D, J)), - (i = (i + Math.imul(C, Q)) | 0), - (n = ((n = (n + Math.imul(C, tt)) | 0) + Math.imul(N, Q)) | 0), - (o = (o + Math.imul(N, tt)) | 0), - (i = (i + Math.imul(P, rt)) | 0), - (n = ((n = (n + Math.imul(P, it)) | 0) + Math.imul(O, rt)) | 0), - (o = (o + Math.imul(O, it)) | 0), - (i = (i + Math.imul(B, ot)) | 0), - (n = ((n = (n + Math.imul(B, st)) | 0) + Math.imul(I, ot)) | 0), - (o = (o + Math.imul(I, st)) | 0), - (i = (i + Math.imul(A, ht)) | 0), - (n = ((n = (n + Math.imul(A, ut)) | 0) + Math.imul(k, ht)) | 0), - (o = (o + Math.imul(k, ut)) | 0), - (i = (i + Math.imul(E, ct)) | 0), - (n = ((n = (n + Math.imul(E, lt)) | 0) + Math.imul(S, ct)) | 0), - (o = (o + Math.imul(S, lt)) | 0); - var Rt = - (((u + (i = (i + Math.imul(w, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(w, mt)) | 0) + Math.imul(_, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(_, mt)) | 0) + (n >>> 13)) | 0) + (Rt >>> 26)) | 0), - (Rt &= 67108863), - (i = Math.imul(U, Q)), - (n = ((n = Math.imul(U, tt)) + Math.imul(D, Q)) | 0), - (o = Math.imul(D, tt)), - (i = (i + Math.imul(C, rt)) | 0), - (n = ((n = (n + Math.imul(C, it)) | 0) + Math.imul(N, rt)) | 0), - (o = (o + Math.imul(N, it)) | 0), - (i = (i + Math.imul(P, ot)) | 0), - (n = ((n = (n + Math.imul(P, st)) | 0) + Math.imul(O, ot)) | 0), - (o = (o + Math.imul(O, st)) | 0), - (i = (i + Math.imul(B, ht)) | 0), - (n = ((n = (n + Math.imul(B, ut)) | 0) + Math.imul(I, ht)) | 0), - (o = (o + Math.imul(I, ut)) | 0), - (i = (i + Math.imul(A, ct)) | 0), - (n = ((n = (n + Math.imul(A, lt)) | 0) + Math.imul(k, ct)) | 0), - (o = (o + Math.imul(k, lt)) | 0); - var Bt = - (((u + (i = (i + Math.imul(E, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(E, mt)) | 0) + Math.imul(S, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(S, mt)) | 0) + (n >>> 13)) | 0) + (Bt >>> 26)) | 0), - (Bt &= 67108863), - (i = Math.imul(U, rt)), - (n = ((n = Math.imul(U, it)) + Math.imul(D, rt)) | 0), - (o = Math.imul(D, it)), - (i = (i + Math.imul(C, ot)) | 0), - (n = ((n = (n + Math.imul(C, st)) | 0) + Math.imul(N, ot)) | 0), - (o = (o + Math.imul(N, st)) | 0), - (i = (i + Math.imul(P, ht)) | 0), - (n = ((n = (n + Math.imul(P, ut)) | 0) + Math.imul(O, ht)) | 0), - (o = (o + Math.imul(O, ut)) | 0), - (i = (i + Math.imul(B, ct)) | 0), - (n = ((n = (n + Math.imul(B, lt)) | 0) + Math.imul(I, ct)) | 0), - (o = (o + Math.imul(I, lt)) | 0); - var It = - (((u + (i = (i + Math.imul(A, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(A, mt)) | 0) + Math.imul(k, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(k, mt)) | 0) + (n >>> 13)) | 0) + (It >>> 26)) | 0), - (It &= 67108863), - (i = Math.imul(U, ot)), - (n = ((n = Math.imul(U, st)) + Math.imul(D, ot)) | 0), - (o = Math.imul(D, st)), - (i = (i + Math.imul(C, ht)) | 0), - (n = ((n = (n + Math.imul(C, ut)) | 0) + Math.imul(N, ht)) | 0), - (o = (o + Math.imul(N, ut)) | 0), - (i = (i + Math.imul(P, ct)) | 0), - (n = ((n = (n + Math.imul(P, lt)) | 0) + Math.imul(O, ct)) | 0), - (o = (o + Math.imul(O, lt)) | 0); - var Tt = - (((u + (i = (i + Math.imul(B, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(B, mt)) | 0) + Math.imul(I, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(I, mt)) | 0) + (n >>> 13)) | 0) + (Tt >>> 26)) | 0), - (Tt &= 67108863), - (i = Math.imul(U, ht)), - (n = ((n = Math.imul(U, ut)) + Math.imul(D, ht)) | 0), - (o = Math.imul(D, ut)), - (i = (i + Math.imul(C, ct)) | 0), - (n = ((n = (n + Math.imul(C, lt)) | 0) + Math.imul(N, ct)) | 0), - (o = (o + Math.imul(N, lt)) | 0); - var Pt = - (((u + (i = (i + Math.imul(P, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(P, mt)) | 0) + Math.imul(O, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(O, mt)) | 0) + (n >>> 13)) | 0) + (Pt >>> 26)) | 0), - (Pt &= 67108863), - (i = Math.imul(U, ct)), - (n = ((n = Math.imul(U, lt)) + Math.imul(D, ct)) | 0), - (o = Math.imul(D, lt)); - var Ot = - (((u + (i = (i + Math.imul(C, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(C, mt)) | 0) + Math.imul(N, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(N, mt)) | 0) + (n >>> 13)) | 0) + (Ot >>> 26)) | 0), (Ot &= 67108863); - var Lt = (((u + (i = Math.imul(U, pt))) | 0) + ((8191 & (n = ((n = Math.imul(U, mt)) + Math.imul(D, pt)) | 0)) << 13)) | 0; - return ( - (u = ((((o = Math.imul(D, mt)) + (n >>> 13)) | 0) + (Lt >>> 26)) | 0), - (Lt &= 67108863), - (h[0] = gt), - (h[1] = bt), - (h[2] = yt), - (h[3] = vt), - (h[4] = wt), - (h[5] = _t), - (h[6] = Mt), - (h[7] = Et), - (h[8] = St), - (h[9] = xt), - (h[10] = At), - (h[11] = kt), - (h[12] = Rt), - (h[13] = Bt), - (h[14] = It), - (h[15] = Tt), - (h[16] = Pt), - (h[17] = Ot), - (h[18] = Lt), - 0 !== u && ((h[19] = u), r.length++), - r - ); - }; - function m(t, e, r) { - return new g().mulp(t, e, r); - } - function g(t, e) { - (this.x = t), (this.y = e); - } - Math.imul || (p = d), - (o.prototype.mulTo = function (t, e) { - var r, - i = this.length + t.length; - return ( - (r = - 10 === this.length && 10 === t.length - ? p(this, t, e) - : i < 63 - ? d(this, t, e) - : i < 1024 - ? (function (t, e, r) { - (r.negative = e.negative ^ t.negative), (r.length = t.length + e.length); - for (var i = 0, n = 0, o = 0; o < r.length - 1; o++) { - var s = n; - n = 0; - for (var a = 67108863 & i, h = Math.min(o, e.length - 1), u = Math.max(0, o - t.length + 1); u <= h; u++) { - var f = o - u, - c = (0 | t.words[f]) * (0 | e.words[u]), - l = 67108863 & c; - (a = 67108863 & (l = (l + a) | 0)), - (n += (s = ((s = (s + ((c / 67108864) | 0)) | 0) + (l >>> 26)) | 0) >>> 26), - (s &= 67108863); - } - (r.words[o] = a), (i = s), (s = n); - } - return 0 !== i ? (r.words[o] = i) : r.length--, r.strip(); - })(this, t, e) - : m(this, t, e)), - r - ); - }), - (g.prototype.makeRBT = function (t) { - for (var e = new Array(t), r = o.prototype._countBits(t) - 1, i = 0; i < t; i++) e[i] = this.revBin(i, r, t); - return e; - }), - (g.prototype.revBin = function (t, e, r) { - if (0 === t || t === r - 1) return t; - for (var i = 0, n = 0; n < e; n++) (i |= (1 & t) << (e - n - 1)), (t >>= 1); - return i; - }), - (g.prototype.permute = function (t, e, r, i, n, o) { - for (var s = 0; s < o; s++) (i[s] = e[t[s]]), (n[s] = r[t[s]]); - }), - (g.prototype.transform = function (t, e, r, i, n, o) { - this.permute(o, t, e, r, i, n); - for (var s = 1; s < n; s <<= 1) - for (var a = s << 1, h = Math.cos((2 * Math.PI) / a), u = Math.sin((2 * Math.PI) / a), f = 0; f < n; f += a) - for (var c = h, l = u, d = 0; d < s; d++) { - var p = r[f + d], - m = i[f + d], - g = r[f + d + s], - b = i[f + d + s], - y = c * g - l * b; - (b = c * b + l * g), - (g = y), - (r[f + d] = p + g), - (i[f + d] = m + b), - (r[f + d + s] = p - g), - (i[f + d + s] = m - b), - d !== a && ((y = h * c - u * l), (l = h * l + u * c), (c = y)); - } - }), - (g.prototype.guessLen13b = function (t, e) { - var r = 1 | Math.max(e, t), - i = 1 & r, - n = 0; - for (r = (r / 2) | 0; r; r >>>= 1) n++; - return 1 << (n + 1 + i); - }), - (g.prototype.conjugate = function (t, e, r) { - if (!(r <= 1)) - for (var i = 0; i < r / 2; i++) { - var n = t[i]; - (t[i] = t[r - i - 1]), (t[r - i - 1] = n), (n = e[i]), (e[i] = -e[r - i - 1]), (e[r - i - 1] = -n); - } - }), - (g.prototype.normalize13b = function (t, e) { - for (var r = 0, i = 0; i < e / 2; i++) { - var n = 8192 * Math.round(t[2 * i + 1] / e) + Math.round(t[2 * i] / e) + r; - (t[i] = 67108863 & n), (r = n < 67108864 ? 0 : (n / 67108864) | 0); - } - return t; - }), - (g.prototype.convert13b = function (t, e, r, n) { - for (var o = 0, s = 0; s < e; s++) - (o += 0 | t[s]), (r[2 * s] = 8191 & o), (o >>>= 13), (r[2 * s + 1] = 8191 & o), (o >>>= 13); - for (s = 2 * e; s < n; ++s) r[s] = 0; - i(0 === o), i(0 == (-8192 & o)); - }), - (g.prototype.stub = function (t) { - for (var e = new Array(t), r = 0; r < t; r++) e[r] = 0; - return e; - }), - (g.prototype.mulp = function (t, e, r) { - var i = 2 * this.guessLen13b(t.length, e.length), - n = this.makeRBT(i), - o = this.stub(i), - s = new Array(i), - a = new Array(i), - h = new Array(i), - u = new Array(i), - f = new Array(i), - c = new Array(i), - l = r.words; - (l.length = i), - this.convert13b(t.words, t.length, s, i), - this.convert13b(e.words, e.length, u, i), - this.transform(s, o, a, h, i, n), - this.transform(u, o, f, c, i, n); - for (var d = 0; d < i; d++) { - var p = a[d] * f[d] - h[d] * c[d]; - (h[d] = a[d] * c[d] + h[d] * f[d]), (a[d] = p); - } - return ( - this.conjugate(a, h, i), - this.transform(a, h, l, o, i, n), - this.conjugate(l, o, i), - this.normalize13b(l, i), - (r.negative = t.negative ^ e.negative), - (r.length = t.length + e.length), - r.strip() - ); - }), - (o.prototype.mul = function (t) { - var e = new o(null); - return (e.words = new Array(this.length + t.length)), this.mulTo(t, e); - }), - (o.prototype.mulf = function (t) { - var e = new o(null); - return (e.words = new Array(this.length + t.length)), m(this, t, e); - }), - (o.prototype.imul = function (t) { - return this.clone().mulTo(t, this); - }), - (o.prototype.imuln = function (t) { - i('number' == typeof t), i(t < 67108864); - for (var e = 0, r = 0; r < this.length; r++) { - var n = (0 | this.words[r]) * t, - o = (67108863 & n) + (67108863 & e); - (e >>= 26), (e += (n / 67108864) | 0), (e += o >>> 26), (this.words[r] = 67108863 & o); - } - return 0 !== e && ((this.words[r] = e), this.length++), this; - }), - (o.prototype.muln = function (t) { - return this.clone().imuln(t); - }), - (o.prototype.sqr = function () { - return this.mul(this); - }), - (o.prototype.isqr = function () { - return this.imul(this.clone()); - }), - (o.prototype.pow = function (t) { - var e = (function (t) { - for (var e = new Array(t.bitLength()), r = 0; r < e.length; r++) { - var i = (r / 26) | 0, - n = r % 26; - e[r] = (t.words[i] & (1 << n)) >>> n; - } - return e; - })(t); - if (0 === e.length) return new o(1); - for (var r = this, i = 0; i < e.length && 0 === e[i]; i++, r = r.sqr()); - if (++i < e.length) for (var n = r.sqr(); i < e.length; i++, n = n.sqr()) 0 !== e[i] && (r = r.mul(n)); - return r; - }), - (o.prototype.iushln = function (t) { - i('number' == typeof t && t >= 0); - var e, - r = t % 26, - n = (t - r) / 26, - o = (67108863 >>> (26 - r)) << (26 - r); - if (0 !== r) { - var s = 0; - for (e = 0; e < this.length; e++) { - var a = this.words[e] & o, - h = ((0 | this.words[e]) - a) << r; - (this.words[e] = h | s), (s = a >>> (26 - r)); - } - s && ((this.words[e] = s), this.length++); - } - if (0 !== n) { - for (e = this.length - 1; e >= 0; e--) this.words[e + n] = this.words[e]; - for (e = 0; e < n; e++) this.words[e] = 0; - this.length += n; - } - return this.strip(); - }), - (o.prototype.ishln = function (t) { - return i(0 === this.negative), this.iushln(t); - }), - (o.prototype.iushrn = function (t, e, r) { - var n; - i('number' == typeof t && t >= 0), (n = e ? (e - (e % 26)) / 26 : 0); - var o = t % 26, - s = Math.min((t - o) / 26, this.length), - a = 67108863 ^ ((67108863 >>> o) << o), - h = r; - if (((n -= s), (n = Math.max(0, n)), h)) { - for (var u = 0; u < s; u++) h.words[u] = this.words[u]; - h.length = s; - } - if (0 === s); - else if (this.length > s) for (this.length -= s, u = 0; u < this.length; u++) this.words[u] = this.words[u + s]; - else (this.words[0] = 0), (this.length = 1); - var f = 0; - for (u = this.length - 1; u >= 0 && (0 !== f || u >= n); u--) { - var c = 0 | this.words[u]; - (this.words[u] = (f << (26 - o)) | (c >>> o)), (f = c & a); - } - return h && 0 !== f && (h.words[h.length++] = f), 0 === this.length && ((this.words[0] = 0), (this.length = 1)), this.strip(); - }), - (o.prototype.ishrn = function (t, e, r) { - return i(0 === this.negative), this.iushrn(t, e, r); - }), - (o.prototype.shln = function (t) { - return this.clone().ishln(t); - }), - (o.prototype.ushln = function (t) { - return this.clone().iushln(t); - }), - (o.prototype.shrn = function (t) { - return this.clone().ishrn(t); - }), - (o.prototype.ushrn = function (t) { - return this.clone().iushrn(t); - }), - (o.prototype.testn = function (t) { - i('number' == typeof t && t >= 0); - var e = t % 26, - r = (t - e) / 26, - n = 1 << e; - return !(this.length <= r || !(this.words[r] & n)); - }), - (o.prototype.imaskn = function (t) { - i('number' == typeof t && t >= 0); - var e = t % 26, - r = (t - e) / 26; - if ((i(0 === this.negative, 'imaskn works only with positive numbers'), this.length <= r)) return this; - if ((0 !== e && r++, (this.length = Math.min(r, this.length)), 0 !== e)) { - var n = 67108863 ^ ((67108863 >>> e) << e); - this.words[this.length - 1] &= n; - } - return this.strip(); - }), - (o.prototype.maskn = function (t) { - return this.clone().imaskn(t); - }), - (o.prototype.iaddn = function (t) { - return ( - i('number' == typeof t), - i(t < 67108864), - t < 0 - ? this.isubn(-t) - : 0 !== this.negative - ? 1 === this.length && (0 | this.words[0]) < t - ? ((this.words[0] = t - (0 | this.words[0])), (this.negative = 0), this) - : ((this.negative = 0), this.isubn(t), (this.negative = 1), this) - : this._iaddn(t) - ); - }), - (o.prototype._iaddn = function (t) { - this.words[0] += t; - for (var e = 0; e < this.length && this.words[e] >= 67108864; e++) - (this.words[e] -= 67108864), e === this.length - 1 ? (this.words[e + 1] = 1) : this.words[e + 1]++; - return (this.length = Math.max(this.length, e + 1)), this; - }), - (o.prototype.isubn = function (t) { - if ((i('number' == typeof t), i(t < 67108864), t < 0)) return this.iaddn(-t); - if (0 !== this.negative) return (this.negative = 0), this.iaddn(t), (this.negative = 1), this; - if (((this.words[0] -= t), 1 === this.length && this.words[0] < 0)) (this.words[0] = -this.words[0]), (this.negative = 1); - else for (var e = 0; e < this.length && this.words[e] < 0; e++) (this.words[e] += 67108864), (this.words[e + 1] -= 1); - return this.strip(); - }), - (o.prototype.addn = function (t) { - return this.clone().iaddn(t); - }), - (o.prototype.subn = function (t) { - return this.clone().isubn(t); - }), - (o.prototype.iabs = function () { - return (this.negative = 0), this; - }), - (o.prototype.abs = function () { - return this.clone().iabs(); - }), - (o.prototype._ishlnsubmul = function (t, e, r) { - var n, - o, - s = t.length + r; - this._expand(s); - var a = 0; - for (n = 0; n < t.length; n++) { - o = (0 | this.words[n + r]) + a; - var h = (0 | t.words[n]) * e; - (a = ((o -= 67108863 & h) >> 26) - ((h / 67108864) | 0)), (this.words[n + r] = 67108863 & o); - } - for (; n < this.length - r; n++) (a = (o = (0 | this.words[n + r]) + a) >> 26), (this.words[n + r] = 67108863 & o); - if (0 === a) return this.strip(); - for (i(-1 === a), a = 0, n = 0; n < this.length; n++) - (a = (o = -(0 | this.words[n]) + a) >> 26), (this.words[n] = 67108863 & o); - return (this.negative = 1), this.strip(); - }), - (o.prototype._wordDiv = function (t, e) { - var r = (this.length, t.length), - i = this.clone(), - n = t, - s = 0 | n.words[n.length - 1]; - 0 != (r = 26 - this._countBits(s)) && ((n = n.ushln(r)), i.iushln(r), (s = 0 | n.words[n.length - 1])); - var a, - h = i.length - n.length; - if ('mod' !== e) { - ((a = new o(null)).length = h + 1), (a.words = new Array(a.length)); - for (var u = 0; u < a.length; u++) a.words[u] = 0; - } - var f = i.clone()._ishlnsubmul(n, 1, h); - 0 === f.negative && ((i = f), a && (a.words[h] = 1)); - for (var c = h - 1; c >= 0; c--) { - var l = 67108864 * (0 | i.words[n.length + c]) + (0 | i.words[n.length + c - 1]); - for (l = Math.min((l / s) | 0, 67108863), i._ishlnsubmul(n, l, c); 0 !== i.negative; ) - l--, (i.negative = 0), i._ishlnsubmul(n, 1, c), i.isZero() || (i.negative ^= 1); - a && (a.words[c] = l); - } - return a && a.strip(), i.strip(), 'div' !== e && 0 !== r && i.iushrn(r), { div: a || null, mod: i }; - }), - (o.prototype.divmod = function (t, e, r) { - return ( - i(!t.isZero()), - this.isZero() - ? { div: new o(0), mod: new o(0) } - : 0 !== this.negative && 0 === t.negative - ? ((a = this.neg().divmod(t, e)), - 'mod' !== e && (n = a.div.neg()), - 'div' !== e && ((s = a.mod.neg()), r && 0 !== s.negative && s.iadd(t)), - { div: n, mod: s }) - : 0 === this.negative && 0 !== t.negative - ? ((a = this.divmod(t.neg(), e)), 'mod' !== e && (n = a.div.neg()), { div: n, mod: a.mod }) - : 0 != (this.negative & t.negative) - ? ((a = this.neg().divmod(t.neg(), e)), - 'div' !== e && ((s = a.mod.neg()), r && 0 !== s.negative && s.isub(t)), - { div: a.div, mod: s }) - : t.length > this.length || this.cmp(t) < 0 - ? { div: new o(0), mod: this } - : 1 === t.length - ? 'div' === e - ? { div: this.divn(t.words[0]), mod: null } - : 'mod' === e - ? { div: null, mod: new o(this.modn(t.words[0])) } - : { div: this.divn(t.words[0]), mod: new o(this.modn(t.words[0])) } - : this._wordDiv(t, e) - ); - var n, s, a; - }), - (o.prototype.div = function (t) { - return this.divmod(t, 'div', !1).div; - }), - (o.prototype.mod = function (t) { - return this.divmod(t, 'mod', !1).mod; - }), - (o.prototype.umod = function (t) { - return this.divmod(t, 'mod', !0).mod; - }), - (o.prototype.divRound = function (t) { - var e = this.divmod(t); - if (e.mod.isZero()) return e.div; - var r = 0 !== e.div.negative ? e.mod.isub(t) : e.mod, - i = t.ushrn(1), - n = t.andln(1), - o = r.cmp(i); - return o < 0 || (1 === n && 0 === o) ? e.div : 0 !== e.div.negative ? e.div.isubn(1) : e.div.iaddn(1); - }), - (o.prototype.modn = function (t) { - i(t <= 67108863); - for (var e = (1 << 26) % t, r = 0, n = this.length - 1; n >= 0; n--) r = (e * r + (0 | this.words[n])) % t; - return r; - }), - (o.prototype.idivn = function (t) { - i(t <= 67108863); - for (var e = 0, r = this.length - 1; r >= 0; r--) { - var n = (0 | this.words[r]) + 67108864 * e; - (this.words[r] = (n / t) | 0), (e = n % t); - } - return this.strip(); - }), - (o.prototype.divn = function (t) { - return this.clone().idivn(t); - }), - (o.prototype.egcd = function (t) { - i(0 === t.negative), i(!t.isZero()); - var e = this, - r = t.clone(); - e = 0 !== e.negative ? e.umod(t) : e.clone(); - for (var n = new o(1), s = new o(0), a = new o(0), h = new o(1), u = 0; e.isEven() && r.isEven(); ) - e.iushrn(1), r.iushrn(1), ++u; - for (var f = r.clone(), c = e.clone(); !e.isZero(); ) { - for (var l = 0, d = 1; 0 == (e.words[0] & d) && l < 26; ++l, d <<= 1); - if (l > 0) for (e.iushrn(l); l-- > 0; ) (n.isOdd() || s.isOdd()) && (n.iadd(f), s.isub(c)), n.iushrn(1), s.iushrn(1); - for (var p = 0, m = 1; 0 == (r.words[0] & m) && p < 26; ++p, m <<= 1); - if (p > 0) for (r.iushrn(p); p-- > 0; ) (a.isOdd() || h.isOdd()) && (a.iadd(f), h.isub(c)), a.iushrn(1), h.iushrn(1); - e.cmp(r) >= 0 ? (e.isub(r), n.isub(a), s.isub(h)) : (r.isub(e), a.isub(n), h.isub(s)); - } - return { a, b: h, gcd: r.iushln(u) }; - }), - (o.prototype._invmp = function (t) { - i(0 === t.negative), i(!t.isZero()); - var e = this, - r = t.clone(); - e = 0 !== e.negative ? e.umod(t) : e.clone(); - for (var n, s = new o(1), a = new o(0), h = r.clone(); e.cmpn(1) > 0 && r.cmpn(1) > 0; ) { - for (var u = 0, f = 1; 0 == (e.words[0] & f) && u < 26; ++u, f <<= 1); - if (u > 0) for (e.iushrn(u); u-- > 0; ) s.isOdd() && s.iadd(h), s.iushrn(1); - for (var c = 0, l = 1; 0 == (r.words[0] & l) && c < 26; ++c, l <<= 1); - if (c > 0) for (r.iushrn(c); c-- > 0; ) a.isOdd() && a.iadd(h), a.iushrn(1); - e.cmp(r) >= 0 ? (e.isub(r), s.isub(a)) : (r.isub(e), a.isub(s)); - } - return (n = 0 === e.cmpn(1) ? s : a).cmpn(0) < 0 && n.iadd(t), n; - }), - (o.prototype.gcd = function (t) { - if (this.isZero()) return t.abs(); - if (t.isZero()) return this.abs(); - var e = this.clone(), - r = t.clone(); - (e.negative = 0), (r.negative = 0); - for (var i = 0; e.isEven() && r.isEven(); i++) e.iushrn(1), r.iushrn(1); - for (;;) { - for (; e.isEven(); ) e.iushrn(1); - for (; r.isEven(); ) r.iushrn(1); - var n = e.cmp(r); - if (n < 0) { - var o = e; - (e = r), (r = o); - } else if (0 === n || 0 === r.cmpn(1)) break; - e.isub(r); - } - return r.iushln(i); - }), - (o.prototype.invm = function (t) { - return this.egcd(t).a.umod(t); - }), - (o.prototype.isEven = function () { - return 0 == (1 & this.words[0]); - }), - (o.prototype.isOdd = function () { - return 1 == (1 & this.words[0]); - }), - (o.prototype.andln = function (t) { - return this.words[0] & t; - }), - (o.prototype.bincn = function (t) { - i('number' == typeof t); - var e = t % 26, - r = (t - e) / 26, - n = 1 << e; - if (this.length <= r) return this._expand(r + 1), (this.words[r] |= n), this; - for (var o = n, s = r; 0 !== o && s < this.length; s++) { - var a = 0 | this.words[s]; - (o = (a += o) >>> 26), (a &= 67108863), (this.words[s] = a); - } - return 0 !== o && ((this.words[s] = o), this.length++), this; - }), - (o.prototype.isZero = function () { - return 1 === this.length && 0 === this.words[0]; - }), - (o.prototype.cmpn = function (t) { - var e, - r = t < 0; - if (0 !== this.negative && !r) return -1; - if (0 === this.negative && r) return 1; - if ((this.strip(), this.length > 1)) e = 1; - else { - r && (t = -t), i(t <= 67108863, 'Number is too big'); - var n = 0 | this.words[0]; - e = n === t ? 0 : n < t ? -1 : 1; - } - return 0 !== this.negative ? 0 | -e : e; - }), - (o.prototype.cmp = function (t) { - if (0 !== this.negative && 0 === t.negative) return -1; - if (0 === this.negative && 0 !== t.negative) return 1; - var e = this.ucmp(t); - return 0 !== this.negative ? 0 | -e : e; - }), - (o.prototype.ucmp = function (t) { - if (this.length > t.length) return 1; - if (this.length < t.length) return -1; - for (var e = 0, r = this.length - 1; r >= 0; r--) { - var i = 0 | this.words[r], - n = 0 | t.words[r]; - if (i !== n) { - i < n ? (e = -1) : i > n && (e = 1); - break; - } - } - return e; - }), - (o.prototype.gtn = function (t) { - return 1 === this.cmpn(t); - }), - (o.prototype.gt = function (t) { - return 1 === this.cmp(t); - }), - (o.prototype.gten = function (t) { - return this.cmpn(t) >= 0; - }), - (o.prototype.gte = function (t) { - return this.cmp(t) >= 0; - }), - (o.prototype.ltn = function (t) { - return -1 === this.cmpn(t); - }), - (o.prototype.lt = function (t) { - return -1 === this.cmp(t); - }), - (o.prototype.lten = function (t) { - return this.cmpn(t) <= 0; - }), - (o.prototype.lte = function (t) { - return this.cmp(t) <= 0; - }), - (o.prototype.eqn = function (t) { - return 0 === this.cmpn(t); - }), - (o.prototype.eq = function (t) { - return 0 === this.cmp(t); - }), - (o.red = function (t) { - return new E(t); - }), - (o.prototype.toRed = function (t) { - return ( - i(!this.red, 'Already a number in reduction context'), - i(0 === this.negative, 'red works only with positives'), - t.convertTo(this)._forceRed(t) - ); - }), - (o.prototype.fromRed = function () { - return i(this.red, 'fromRed works only with numbers in reduction context'), this.red.convertFrom(this); - }), - (o.prototype._forceRed = function (t) { - return (this.red = t), this; - }), - (o.prototype.forceRed = function (t) { - return i(!this.red, 'Already a number in reduction context'), this._forceRed(t); - }), - (o.prototype.redAdd = function (t) { - return i(this.red, 'redAdd works only with red numbers'), this.red.add(this, t); - }), - (o.prototype.redIAdd = function (t) { - return i(this.red, 'redIAdd works only with red numbers'), this.red.iadd(this, t); - }), - (o.prototype.redSub = function (t) { - return i(this.red, 'redSub works only with red numbers'), this.red.sub(this, t); - }), - (o.prototype.redISub = function (t) { - return i(this.red, 'redISub works only with red numbers'), this.red.isub(this, t); - }), - (o.prototype.redShl = function (t) { - return i(this.red, 'redShl works only with red numbers'), this.red.shl(this, t); - }), - (o.prototype.redMul = function (t) { - return i(this.red, 'redMul works only with red numbers'), this.red._verify2(this, t), this.red.mul(this, t); - }), - (o.prototype.redIMul = function (t) { - return i(this.red, 'redMul works only with red numbers'), this.red._verify2(this, t), this.red.imul(this, t); - }), - (o.prototype.redSqr = function () { - return i(this.red, 'redSqr works only with red numbers'), this.red._verify1(this), this.red.sqr(this); - }), - (o.prototype.redISqr = function () { - return i(this.red, 'redISqr works only with red numbers'), this.red._verify1(this), this.red.isqr(this); - }), - (o.prototype.redSqrt = function () { - return i(this.red, 'redSqrt works only with red numbers'), this.red._verify1(this), this.red.sqrt(this); - }), - (o.prototype.redInvm = function () { - return i(this.red, 'redInvm works only with red numbers'), this.red._verify1(this), this.red.invm(this); - }), - (o.prototype.redNeg = function () { - return i(this.red, 'redNeg works only with red numbers'), this.red._verify1(this), this.red.neg(this); - }), - (o.prototype.redPow = function (t) { - return i(this.red && !t.red, 'redPow(normalNum)'), this.red._verify1(this), this.red.pow(this, t); - }); - var b = { k256: null, p224: null, p192: null, p25519: null }; - function y(t, e) { - (this.name = t), - (this.p = new o(e, 16)), - (this.n = this.p.bitLength()), - (this.k = new o(1).iushln(this.n).isub(this.p)), - (this.tmp = this._tmp()); - } - function v() { - y.call(this, 'k256', 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f'); - } - function w() { - y.call(this, 'p224', 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001'); - } - function _() { - y.call(this, 'p192', 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff'); - } - function M() { - y.call(this, '25519', '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed'); - } - function E(t) { - if ('string' == typeof t) { - var e = o._prime(t); - (this.m = e.p), (this.prime = e); - } else i(t.gtn(1), 'modulus must be greater than 1'), (this.m = t), (this.prime = null); - } - function S(t) { - E.call(this, t), - (this.shift = this.m.bitLength()), - this.shift % 26 != 0 && (this.shift += 26 - (this.shift % 26)), - (this.r = new o(1).iushln(this.shift)), - (this.r2 = this.imod(this.r.sqr())), - (this.rinv = this.r._invmp(this.m)), - (this.minv = this.rinv.mul(this.r).isubn(1).div(this.m)), - (this.minv = this.minv.umod(this.r)), - (this.minv = this.r.sub(this.minv)); - } - (y.prototype._tmp = function () { - var t = new o(null); - return (t.words = new Array(Math.ceil(this.n / 13))), t; - }), - (y.prototype.ireduce = function (t) { - var e, - r = t; - do { - this.split(r, this.tmp), (e = (r = (r = this.imulK(r)).iadd(this.tmp)).bitLength()); - } while (e > this.n); - var i = e < this.n ? -1 : r.ucmp(this.p); - return 0 === i ? ((r.words[0] = 0), (r.length = 1)) : i > 0 ? r.isub(this.p) : void 0 !== r.strip ? r.strip() : r._strip(), r; - }), - (y.prototype.split = function (t, e) { - t.iushrn(this.n, 0, e); - }), - (y.prototype.imulK = function (t) { - return t.imul(this.k); - }), - n(v, y), - (v.prototype.split = function (t, e) { - for (var r = 4194303, i = Math.min(t.length, 9), n = 0; n < i; n++) e.words[n] = t.words[n]; - if (((e.length = i), t.length <= 9)) return (t.words[0] = 0), void (t.length = 1); - var o = t.words[9]; - for (e.words[e.length++] = o & r, n = 10; n < t.length; n++) { - var s = 0 | t.words[n]; - (t.words[n - 10] = ((s & r) << 4) | (o >>> 22)), (o = s); - } - (o >>>= 22), (t.words[n - 10] = o), 0 === o && t.length > 10 ? (t.length -= 10) : (t.length -= 9); - }), - (v.prototype.imulK = function (t) { - (t.words[t.length] = 0), (t.words[t.length + 1] = 0), (t.length += 2); - for (var e = 0, r = 0; r < t.length; r++) { - var i = 0 | t.words[r]; - (e += 977 * i), (t.words[r] = 67108863 & e), (e = 64 * i + ((e / 67108864) | 0)); - } - return 0 === t.words[t.length - 1] && (t.length--, 0 === t.words[t.length - 1] && t.length--), t; - }), - n(w, y), - n(_, y), - n(M, y), - (M.prototype.imulK = function (t) { - for (var e = 0, r = 0; r < t.length; r++) { - var i = 19 * (0 | t.words[r]) + e, - n = 67108863 & i; - (i >>>= 26), (t.words[r] = n), (e = i); - } - return 0 !== e && (t.words[t.length++] = e), t; - }), - (o._prime = function (t) { - if (b[t]) return b[t]; - var e; - if ('k256' === t) e = new v(); - else if ('p224' === t) e = new w(); - else if ('p192' === t) e = new _(); - else { - if ('p25519' !== t) throw new Error('Unknown prime ' + t); - e = new M(); - } - return (b[t] = e), e; - }), - (E.prototype._verify1 = function (t) { - i(0 === t.negative, 'red works only with positives'), i(t.red, 'red works only with red numbers'); - }), - (E.prototype._verify2 = function (t, e) { - i(0 == (t.negative | e.negative), 'red works only with positives'), - i(t.red && t.red === e.red, 'red works only with red numbers'); - }), - (E.prototype.imod = function (t) { - return this.prime ? this.prime.ireduce(t)._forceRed(this) : t.umod(this.m)._forceRed(this); - }), - (E.prototype.neg = function (t) { - return t.isZero() ? t.clone() : this.m.sub(t)._forceRed(this); - }), - (E.prototype.add = function (t, e) { - this._verify2(t, e); - var r = t.add(e); - return r.cmp(this.m) >= 0 && r.isub(this.m), r._forceRed(this); - }), - (E.prototype.iadd = function (t, e) { - this._verify2(t, e); - var r = t.iadd(e); - return r.cmp(this.m) >= 0 && r.isub(this.m), r; - }), - (E.prototype.sub = function (t, e) { - this._verify2(t, e); - var r = t.sub(e); - return r.cmpn(0) < 0 && r.iadd(this.m), r._forceRed(this); - }), - (E.prototype.isub = function (t, e) { - this._verify2(t, e); - var r = t.isub(e); - return r.cmpn(0) < 0 && r.iadd(this.m), r; - }), - (E.prototype.shl = function (t, e) { - return this._verify1(t), this.imod(t.ushln(e)); - }), - (E.prototype.imul = function (t, e) { - return this._verify2(t, e), this.imod(t.imul(e)); - }), - (E.prototype.mul = function (t, e) { - return this._verify2(t, e), this.imod(t.mul(e)); - }), - (E.prototype.isqr = function (t) { - return this.imul(t, t.clone()); - }), - (E.prototype.sqr = function (t) { - return this.mul(t, t); - }), - (E.prototype.sqrt = function (t) { - if (t.isZero()) return t.clone(); - var e = this.m.andln(3); - if ((i(e % 2 == 1), 3 === e)) { - var r = this.m.add(new o(1)).iushrn(2); - return this.pow(t, r); - } - for (var n = this.m.subn(1), s = 0; !n.isZero() && 0 === n.andln(1); ) s++, n.iushrn(1); - i(!n.isZero()); - var a = new o(1).toRed(this), - h = a.redNeg(), - u = this.m.subn(1).iushrn(1), - f = this.m.bitLength(); - for (f = new o(2 * f * f).toRed(this); 0 !== this.pow(f, u).cmp(h); ) f.redIAdd(h); - for (var c = this.pow(f, n), l = this.pow(t, n.addn(1).iushrn(1)), d = this.pow(t, n), p = s; 0 !== d.cmp(a); ) { - for (var m = d, g = 0; 0 !== m.cmp(a); g++) m = m.redSqr(); - i(g < p); - var b = this.pow(c, new o(1).iushln(p - g - 1)); - (l = l.redMul(b)), (c = b.redSqr()), (d = d.redMul(c)), (p = g); - } - return l; - }), - (E.prototype.invm = function (t) { - var e = t._invmp(this.m); - return 0 !== e.negative ? ((e.negative = 0), this.imod(e).redNeg()) : this.imod(e); - }), - (E.prototype.pow = function (t, e) { - if (e.isZero()) return new o(1).toRed(this); - if (0 === e.cmpn(1)) return t.clone(); - var r = new Array(16); - (r[0] = new o(1).toRed(this)), (r[1] = t); - for (var i = 2; i < r.length; i++) r[i] = this.mul(r[i - 1], t); - var n = r[0], - s = 0, - a = 0, - h = e.bitLength() % 26; - for (0 === h && (h = 26), i = e.length - 1; i >= 0; i--) { - for (var u = e.words[i], f = h - 1; f >= 0; f--) { - var c = (u >> f) & 1; - n !== r[0] && (n = this.sqr(n)), - 0 !== c || 0 !== s - ? ((s <<= 1), (s |= c), (4 == ++a || (0 === i && 0 === f)) && ((n = this.mul(n, r[s])), (a = 0), (s = 0))) - : (a = 0); - } - h = 26; - } - return n; - }), - (E.prototype.convertTo = function (t) { - var e = t.umod(this.m); - return e === t ? e.clone() : e; - }), - (E.prototype.convertFrom = function (t) { - var e = t.clone(); - return (e.red = null), e; - }), - (o.mont = function (t) { - return new S(t); - }), - n(S, E), - (S.prototype.convertTo = function (t) { - return this.imod(t.ushln(this.shift)); - }), - (S.prototype.convertFrom = function (t) { - var e = this.imod(t.mul(this.rinv)); - return (e.red = null), e; - }), - (S.prototype.imul = function (t, e) { - if (t.isZero() || e.isZero()) return (t.words[0] = 0), (t.length = 1), t; - var r = t.imul(e), - i = r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m), - n = r.isub(i).iushrn(this.shift), - o = n; - return n.cmp(this.m) >= 0 ? (o = n.isub(this.m)) : n.cmpn(0) < 0 && (o = n.iadd(this.m)), o._forceRed(this); - }), - (S.prototype.mul = function (t, e) { - if (t.isZero() || e.isZero()) return new o(0)._forceRed(this); - var r = t.mul(e), - i = r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m), - n = r.isub(i).iushrn(this.shift), - s = n; - return n.cmp(this.m) >= 0 ? (s = n.isub(this.m)) : n.cmpn(0) < 0 && (s = n.iadd(this.m)), s._forceRed(this); - }), - (S.prototype.invm = function (t) { - return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this); - }); - })((t = r.nmd(t)), this); - }, - 4782: (t, e) => { - 'use strict'; - (e.byteLength = function (t) { - var e = a(t), - r = e[0], - i = e[1]; - return (3 * (r + i)) / 4 - i; - }), - (e.toByteArray = function (t) { - var e, - r, - o = a(t), - s = o[0], - h = o[1], - u = new n( - (function (t, e, r) { - return (3 * (e + r)) / 4 - r; - })(0, s, h) - ), - f = 0, - c = h > 0 ? s - 4 : s; - for (r = 0; r < c; r += 4) - (e = (i[t.charCodeAt(r)] << 18) | (i[t.charCodeAt(r + 1)] << 12) | (i[t.charCodeAt(r + 2)] << 6) | i[t.charCodeAt(r + 3)]), - (u[f++] = (e >> 16) & 255), - (u[f++] = (e >> 8) & 255), - (u[f++] = 255 & e); - return ( - 2 === h && ((e = (i[t.charCodeAt(r)] << 2) | (i[t.charCodeAt(r + 1)] >> 4)), (u[f++] = 255 & e)), - 1 === h && - ((e = (i[t.charCodeAt(r)] << 10) | (i[t.charCodeAt(r + 1)] << 4) | (i[t.charCodeAt(r + 2)] >> 2)), - (u[f++] = (e >> 8) & 255), - (u[f++] = 255 & e)), - u - ); - }), - (e.fromByteArray = function (t) { - for (var e, i = t.length, n = i % 3, o = [], s = 16383, a = 0, u = i - n; a < u; a += s) o.push(h(t, a, a + s > u ? u : a + s)); - return ( - 1 === n - ? ((e = t[i - 1]), o.push(r[e >> 2] + r[(e << 4) & 63] + '==')) - : 2 === n && ((e = (t[i - 2] << 8) + t[i - 1]), o.push(r[e >> 10] + r[(e >> 4) & 63] + r[(e << 2) & 63] + '=')), - o.join('') - ); - }); - for ( - var r = [], - i = [], - n = 'undefined' != typeof Uint8Array ? Uint8Array : Array, - o = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/', - s = 0; - s < 64; - ++s - ) - (r[s] = o[s]), (i[o.charCodeAt(s)] = s); - function a(t) { - var e = t.length; - if (e % 4 > 0) throw new Error('Invalid string. Length must be a multiple of 4'); - var r = t.indexOf('='); - return -1 === r && (r = e), [r, r === e ? 0 : 4 - (r % 4)]; - } - function h(t, e, i) { - for (var n, o, s = [], a = e; a < i; a += 3) - (n = ((t[a] << 16) & 16711680) + ((t[a + 1] << 8) & 65280) + (255 & t[a + 2])), - s.push(r[((o = n) >> 18) & 63] + r[(o >> 12) & 63] + r[(o >> 6) & 63] + r[63 & o]); - return s.join(''); - } - (i['-'.charCodeAt(0)] = 62), (i['_'.charCodeAt(0)] = 63); - }, - 3785: function (t, e, r) { - !(function (t, e) { - 'use strict'; - function i(t, e) { - if (!t) throw new Error(e || 'Assertion failed'); - } - function n(t, e) { - t.super_ = e; - var r = function () {}; - (r.prototype = e.prototype), (t.prototype = new r()), (t.prototype.constructor = t); - } - function o(t, e, r) { - if (o.isBN(t)) return t; - (this.negative = 0), - (this.words = null), - (this.length = 0), - (this.red = null), - null !== t && (('le' !== e && 'be' !== e) || ((r = e), (e = 10)), this._init(t || 0, e || 10, r || 'be')); - } - var s; - 'object' == typeof t ? (t.exports = o) : (e.BN = o), (o.BN = o), (o.wordSize = 26); - try { - s = 'undefined' != typeof window && void 0 !== window.Buffer ? window.Buffer : r(5545).Buffer; - } catch (t) {} - function a(t, e) { - var r = t.charCodeAt(e); - return r >= 48 && r <= 57 - ? r - 48 - : r >= 65 && r <= 70 - ? r - 55 - : r >= 97 && r <= 102 - ? r - 87 - : void i(!1, 'Invalid character in ' + t); - } - function h(t, e, r) { - var i = a(t, r); - return r - 1 >= e && (i |= a(t, r - 1) << 4), i; - } - function u(t, e, r, n) { - for (var o = 0, s = 0, a = Math.min(t.length, r), h = e; h < a; h++) { - var u = t.charCodeAt(h) - 48; - (o *= n), (s = u >= 49 ? u - 49 + 10 : u >= 17 ? u - 17 + 10 : u), i(u >= 0 && s < n, 'Invalid character'), (o += s); - } - return o; - } - function f(t, e) { - (t.words = e.words), (t.length = e.length), (t.negative = e.negative), (t.red = e.red); - } - if ( - ((o.isBN = function (t) { - return ( - t instanceof o || (null !== t && 'object' == typeof t && t.constructor.wordSize === o.wordSize && Array.isArray(t.words)) - ); - }), - (o.max = function (t, e) { - return t.cmp(e) > 0 ? t : e; - }), - (o.min = function (t, e) { - return t.cmp(e) < 0 ? t : e; - }), - (o.prototype._init = function (t, e, r) { - if ('number' == typeof t) return this._initNumber(t, e, r); - if ('object' == typeof t) return this._initArray(t, e, r); - 'hex' === e && (e = 16), i(e === (0 | e) && e >= 2 && e <= 36); - var n = 0; - '-' === (t = t.toString().replace(/\s+/g, ''))[0] && (n++, (this.negative = 1)), - n < t.length && - (16 === e ? this._parseHex(t, n, r) : (this._parseBase(t, e, n), 'le' === r && this._initArray(this.toArray(), e, r))); - }), - (o.prototype._initNumber = function (t, e, r) { - t < 0 && ((this.negative = 1), (t = -t)), - t < 67108864 - ? ((this.words = [67108863 & t]), (this.length = 1)) - : t < 4503599627370496 - ? ((this.words = [67108863 & t, (t / 67108864) & 67108863]), (this.length = 2)) - : (i(t < 9007199254740992), (this.words = [67108863 & t, (t / 67108864) & 67108863, 1]), (this.length = 3)), - 'le' === r && this._initArray(this.toArray(), e, r); - }), - (o.prototype._initArray = function (t, e, r) { - if ((i('number' == typeof t.length), t.length <= 0)) return (this.words = [0]), (this.length = 1), this; - (this.length = Math.ceil(t.length / 3)), (this.words = new Array(this.length)); - for (var n = 0; n < this.length; n++) this.words[n] = 0; - var o, - s, - a = 0; - if ('be' === r) - for (n = t.length - 1, o = 0; n >= 0; n -= 3) - (s = t[n] | (t[n - 1] << 8) | (t[n - 2] << 16)), - (this.words[o] |= (s << a) & 67108863), - (this.words[o + 1] = (s >>> (26 - a)) & 67108863), - (a += 24) >= 26 && ((a -= 26), o++); - else if ('le' === r) - for (n = 0, o = 0; n < t.length; n += 3) - (s = t[n] | (t[n + 1] << 8) | (t[n + 2] << 16)), - (this.words[o] |= (s << a) & 67108863), - (this.words[o + 1] = (s >>> (26 - a)) & 67108863), - (a += 24) >= 26 && ((a -= 26), o++); - return this._strip(); - }), - (o.prototype._parseHex = function (t, e, r) { - (this.length = Math.ceil((t.length - e) / 6)), (this.words = new Array(this.length)); - for (var i = 0; i < this.length; i++) this.words[i] = 0; - var n, - o = 0, - s = 0; - if ('be' === r) - for (i = t.length - 1; i >= e; i -= 2) - (n = h(t, e, i) << o), - (this.words[s] |= 67108863 & n), - o >= 18 ? ((o -= 18), (s += 1), (this.words[s] |= n >>> 26)) : (o += 8); - else - for (i = (t.length - e) % 2 == 0 ? e + 1 : e; i < t.length; i += 2) - (n = h(t, e, i) << o), - (this.words[s] |= 67108863 & n), - o >= 18 ? ((o -= 18), (s += 1), (this.words[s] |= n >>> 26)) : (o += 8); - this._strip(); - }), - (o.prototype._parseBase = function (t, e, r) { - (this.words = [0]), (this.length = 1); - for (var i = 0, n = 1; n <= 67108863; n *= e) i++; - i--, (n = (n / e) | 0); - for (var o = t.length - r, s = o % i, a = Math.min(o, o - s) + r, h = 0, f = r; f < a; f += i) - (h = u(t, f, f + i, e)), this.imuln(n), this.words[0] + h < 67108864 ? (this.words[0] += h) : this._iaddn(h); - if (0 !== s) { - var c = 1; - for (h = u(t, f, t.length, e), f = 0; f < s; f++) c *= e; - this.imuln(c), this.words[0] + h < 67108864 ? (this.words[0] += h) : this._iaddn(h); - } - this._strip(); - }), - (o.prototype.copy = function (t) { - t.words = new Array(this.length); - for (var e = 0; e < this.length; e++) t.words[e] = this.words[e]; - (t.length = this.length), (t.negative = this.negative), (t.red = this.red); - }), - (o.prototype._move = function (t) { - f(t, this); - }), - (o.prototype.clone = function () { - var t = new o(null); - return this.copy(t), t; - }), - (o.prototype._expand = function (t) { - for (; this.length < t; ) this.words[this.length++] = 0; - return this; - }), - (o.prototype._strip = function () { - for (; this.length > 1 && 0 === this.words[this.length - 1]; ) this.length--; - return this._normSign(); - }), - (o.prototype._normSign = function () { - return 1 === this.length && 0 === this.words[0] && (this.negative = 0), this; - }), - 'undefined' != typeof Symbol && 'function' == typeof Symbol.for) - ) - try { - o.prototype[Symbol.for('nodejs.util.inspect.custom')] = c; - } catch (t) { - o.prototype.inspect = c; - } - else o.prototype.inspect = c; - function c() { - return (this.red ? ''; - } - var l = [ - '', - '0', - '00', - '000', - '0000', - '00000', - '000000', - '0000000', - '00000000', - '000000000', - '0000000000', - '00000000000', - '000000000000', - '0000000000000', - '00000000000000', - '000000000000000', - '0000000000000000', - '00000000000000000', - '000000000000000000', - '0000000000000000000', - '00000000000000000000', - '000000000000000000000', - '0000000000000000000000', - '00000000000000000000000', - '000000000000000000000000', - '0000000000000000000000000', - ], - d = [0, 0, 25, 16, 12, 11, 10, 9, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5], - p = [ - 0, 0, 33554432, 43046721, 16777216, 48828125, 60466176, 40353607, 16777216, 43046721, 1e7, 19487171, 35831808, 62748517, - 7529536, 11390625, 16777216, 24137569, 34012224, 47045881, 64e6, 4084101, 5153632, 6436343, 7962624, 9765625, 11881376, - 14348907, 17210368, 20511149, 243e5, 28629151, 33554432, 39135393, 45435424, 52521875, 60466176, - ]; - function m(t, e, r) { - r.negative = e.negative ^ t.negative; - var i = (t.length + e.length) | 0; - (r.length = i), (i = (i - 1) | 0); - var n = 0 | t.words[0], - o = 0 | e.words[0], - s = n * o, - a = 67108863 & s, - h = (s / 67108864) | 0; - r.words[0] = a; - for (var u = 1; u < i; u++) { - for (var f = h >>> 26, c = 67108863 & h, l = Math.min(u, e.length - 1), d = Math.max(0, u - t.length + 1); d <= l; d++) { - var p = (u - d) | 0; - (f += ((s = (n = 0 | t.words[p]) * (o = 0 | e.words[d]) + c) / 67108864) | 0), (c = 67108863 & s); - } - (r.words[u] = 0 | c), (h = 0 | f); - } - return 0 !== h ? (r.words[u] = 0 | h) : r.length--, r._strip(); - } - (o.prototype.toString = function (t, e) { - var r; - if (((e = 0 | e || 1), 16 === (t = t || 10) || 'hex' === t)) { - r = ''; - for (var n = 0, o = 0, s = 0; s < this.length; s++) { - var a = this.words[s], - h = (16777215 & ((a << n) | o)).toString(16); - (o = (a >>> (24 - n)) & 16777215), - (n += 2) >= 26 && ((n -= 26), s--), - (r = 0 !== o || s !== this.length - 1 ? l[6 - h.length] + h + r : h + r); - } - for (0 !== o && (r = o.toString(16) + r); r.length % e != 0; ) r = '0' + r; - return 0 !== this.negative && (r = '-' + r), r; - } - if (t === (0 | t) && t >= 2 && t <= 36) { - var u = d[t], - f = p[t]; - r = ''; - var c = this.clone(); - for (c.negative = 0; !c.isZero(); ) { - var m = c.modrn(f).toString(t); - r = (c = c.idivn(f)).isZero() ? m + r : l[u - m.length] + m + r; - } - for (this.isZero() && (r = '0' + r); r.length % e != 0; ) r = '0' + r; - return 0 !== this.negative && (r = '-' + r), r; - } - i(!1, 'Base should be between 2 and 36'); - }), - (o.prototype.toNumber = function () { - var t = this.words[0]; - return ( - 2 === this.length - ? (t += 67108864 * this.words[1]) - : 3 === this.length && 1 === this.words[2] - ? (t += 4503599627370496 + 67108864 * this.words[1]) - : this.length > 2 && i(!1, 'Number can only safely store up to 53 bits'), - 0 !== this.negative ? -t : t - ); - }), - (o.prototype.toJSON = function () { - return this.toString(16, 2); - }), - s && - (o.prototype.toBuffer = function (t, e) { - return this.toArrayLike(s, t, e); - }), - (o.prototype.toArray = function (t, e) { - return this.toArrayLike(Array, t, e); - }), - (o.prototype.toArrayLike = function (t, e, r) { - this._strip(); - var n = this.byteLength(), - o = r || Math.max(1, n); - i(n <= o, 'byte array longer than desired length'), i(o > 0, 'Requested array length <= 0'); - var s = (function (t, e) { - return t.allocUnsafe ? t.allocUnsafe(e) : new t(e); - })(t, o); - return this['_toArrayLike' + ('le' === e ? 'LE' : 'BE')](s, n), s; - }), - (o.prototype._toArrayLikeLE = function (t, e) { - for (var r = 0, i = 0, n = 0, o = 0; n < this.length; n++) { - var s = (this.words[n] << o) | i; - (t[r++] = 255 & s), - r < t.length && (t[r++] = (s >> 8) & 255), - r < t.length && (t[r++] = (s >> 16) & 255), - 6 === o ? (r < t.length && (t[r++] = (s >> 24) & 255), (i = 0), (o = 0)) : ((i = s >>> 24), (o += 2)); - } - if (r < t.length) for (t[r++] = i; r < t.length; ) t[r++] = 0; - }), - (o.prototype._toArrayLikeBE = function (t, e) { - for (var r = t.length - 1, i = 0, n = 0, o = 0; n < this.length; n++) { - var s = (this.words[n] << o) | i; - (t[r--] = 255 & s), - r >= 0 && (t[r--] = (s >> 8) & 255), - r >= 0 && (t[r--] = (s >> 16) & 255), - 6 === o ? (r >= 0 && (t[r--] = (s >> 24) & 255), (i = 0), (o = 0)) : ((i = s >>> 24), (o += 2)); - } - if (r >= 0) for (t[r--] = i; r >= 0; ) t[r--] = 0; - }), - Math.clz32 - ? (o.prototype._countBits = function (t) { - return 32 - Math.clz32(t); - }) - : (o.prototype._countBits = function (t) { - var e = t, - r = 0; - return ( - e >= 4096 && ((r += 13), (e >>>= 13)), - e >= 64 && ((r += 7), (e >>>= 7)), - e >= 8 && ((r += 4), (e >>>= 4)), - e >= 2 && ((r += 2), (e >>>= 2)), - r + e - ); - }), - (o.prototype._zeroBits = function (t) { - if (0 === t) return 26; - var e = t, - r = 0; - return ( - 0 == (8191 & e) && ((r += 13), (e >>>= 13)), - 0 == (127 & e) && ((r += 7), (e >>>= 7)), - 0 == (15 & e) && ((r += 4), (e >>>= 4)), - 0 == (3 & e) && ((r += 2), (e >>>= 2)), - 0 == (1 & e) && r++, - r - ); - }), - (o.prototype.bitLength = function () { - var t = this.words[this.length - 1], - e = this._countBits(t); - return 26 * (this.length - 1) + e; - }), - (o.prototype.zeroBits = function () { - if (this.isZero()) return 0; - for (var t = 0, e = 0; e < this.length; e++) { - var r = this._zeroBits(this.words[e]); - if (((t += r), 26 !== r)) break; - } - return t; - }), - (o.prototype.byteLength = function () { - return Math.ceil(this.bitLength() / 8); - }), - (o.prototype.toTwos = function (t) { - return 0 !== this.negative ? this.abs().inotn(t).iaddn(1) : this.clone(); - }), - (o.prototype.fromTwos = function (t) { - return this.testn(t - 1) ? this.notn(t).iaddn(1).ineg() : this.clone(); - }), - (o.prototype.isNeg = function () { - return 0 !== this.negative; - }), - (o.prototype.neg = function () { - return this.clone().ineg(); - }), - (o.prototype.ineg = function () { - return this.isZero() || (this.negative ^= 1), this; - }), - (o.prototype.iuor = function (t) { - for (; this.length < t.length; ) this.words[this.length++] = 0; - for (var e = 0; e < t.length; e++) this.words[e] = this.words[e] | t.words[e]; - return this._strip(); - }), - (o.prototype.ior = function (t) { - return i(0 == (this.negative | t.negative)), this.iuor(t); - }), - (o.prototype.or = function (t) { - return this.length > t.length ? this.clone().ior(t) : t.clone().ior(this); - }), - (o.prototype.uor = function (t) { - return this.length > t.length ? this.clone().iuor(t) : t.clone().iuor(this); - }), - (o.prototype.iuand = function (t) { - var e; - e = this.length > t.length ? t : this; - for (var r = 0; r < e.length; r++) this.words[r] = this.words[r] & t.words[r]; - return (this.length = e.length), this._strip(); - }), - (o.prototype.iand = function (t) { - return i(0 == (this.negative | t.negative)), this.iuand(t); - }), - (o.prototype.and = function (t) { - return this.length > t.length ? this.clone().iand(t) : t.clone().iand(this); - }), - (o.prototype.uand = function (t) { - return this.length > t.length ? this.clone().iuand(t) : t.clone().iuand(this); - }), - (o.prototype.iuxor = function (t) { - var e, r; - this.length > t.length ? ((e = this), (r = t)) : ((e = t), (r = this)); - for (var i = 0; i < r.length; i++) this.words[i] = e.words[i] ^ r.words[i]; - if (this !== e) for (; i < e.length; i++) this.words[i] = e.words[i]; - return (this.length = e.length), this._strip(); - }), - (o.prototype.ixor = function (t) { - return i(0 == (this.negative | t.negative)), this.iuxor(t); - }), - (o.prototype.xor = function (t) { - return this.length > t.length ? this.clone().ixor(t) : t.clone().ixor(this); - }), - (o.prototype.uxor = function (t) { - return this.length > t.length ? this.clone().iuxor(t) : t.clone().iuxor(this); - }), - (o.prototype.inotn = function (t) { - i('number' == typeof t && t >= 0); - var e = 0 | Math.ceil(t / 26), - r = t % 26; - this._expand(e), r > 0 && e--; - for (var n = 0; n < e; n++) this.words[n] = 67108863 & ~this.words[n]; - return r > 0 && (this.words[n] = ~this.words[n] & (67108863 >> (26 - r))), this._strip(); - }), - (o.prototype.notn = function (t) { - return this.clone().inotn(t); - }), - (o.prototype.setn = function (t, e) { - i('number' == typeof t && t >= 0); - var r = (t / 26) | 0, - n = t % 26; - return this._expand(r + 1), (this.words[r] = e ? this.words[r] | (1 << n) : this.words[r] & ~(1 << n)), this._strip(); - }), - (o.prototype.iadd = function (t) { - var e, r, i; - if (0 !== this.negative && 0 === t.negative) - return (this.negative = 0), (e = this.isub(t)), (this.negative ^= 1), this._normSign(); - if (0 === this.negative && 0 !== t.negative) return (t.negative = 0), (e = this.isub(t)), (t.negative = 1), e._normSign(); - this.length > t.length ? ((r = this), (i = t)) : ((r = t), (i = this)); - for (var n = 0, o = 0; o < i.length; o++) - (e = (0 | r.words[o]) + (0 | i.words[o]) + n), (this.words[o] = 67108863 & e), (n = e >>> 26); - for (; 0 !== n && o < r.length; o++) (e = (0 | r.words[o]) + n), (this.words[o] = 67108863 & e), (n = e >>> 26); - if (((this.length = r.length), 0 !== n)) (this.words[this.length] = n), this.length++; - else if (r !== this) for (; o < r.length; o++) this.words[o] = r.words[o]; - return this; - }), - (o.prototype.add = function (t) { - var e; - return 0 !== t.negative && 0 === this.negative - ? ((t.negative = 0), (e = this.sub(t)), (t.negative ^= 1), e) - : 0 === t.negative && 0 !== this.negative - ? ((this.negative = 0), (e = t.sub(this)), (this.negative = 1), e) - : this.length > t.length - ? this.clone().iadd(t) - : t.clone().iadd(this); - }), - (o.prototype.isub = function (t) { - if (0 !== t.negative) { - t.negative = 0; - var e = this.iadd(t); - return (t.negative = 1), e._normSign(); - } - if (0 !== this.negative) return (this.negative = 0), this.iadd(t), (this.negative = 1), this._normSign(); - var r, - i, - n = this.cmp(t); - if (0 === n) return (this.negative = 0), (this.length = 1), (this.words[0] = 0), this; - n > 0 ? ((r = this), (i = t)) : ((r = t), (i = this)); - for (var o = 0, s = 0; s < i.length; s++) - (o = (e = (0 | r.words[s]) - (0 | i.words[s]) + o) >> 26), (this.words[s] = 67108863 & e); - for (; 0 !== o && s < r.length; s++) (o = (e = (0 | r.words[s]) + o) >> 26), (this.words[s] = 67108863 & e); - if (0 === o && s < r.length && r !== this) for (; s < r.length; s++) this.words[s] = r.words[s]; - return (this.length = Math.max(this.length, s)), r !== this && (this.negative = 1), this._strip(); - }), - (o.prototype.sub = function (t) { - return this.clone().isub(t); - }); - var g = function (t, e, r) { - var i, - n, - o, - s = t.words, - a = e.words, - h = r.words, - u = 0, - f = 0 | s[0], - c = 8191 & f, - l = f >>> 13, - d = 0 | s[1], - p = 8191 & d, - m = d >>> 13, - g = 0 | s[2], - b = 8191 & g, - y = g >>> 13, - v = 0 | s[3], - w = 8191 & v, - _ = v >>> 13, - M = 0 | s[4], - E = 8191 & M, - S = M >>> 13, - x = 0 | s[5], - A = 8191 & x, - k = x >>> 13, - R = 0 | s[6], - B = 8191 & R, - I = R >>> 13, - T = 0 | s[7], - P = 8191 & T, - O = T >>> 13, - L = 0 | s[8], - C = 8191 & L, - N = L >>> 13, - j = 0 | s[9], - U = 8191 & j, - D = j >>> 13, - z = 0 | a[0], - F = 8191 & z, - q = z >>> 13, - H = 0 | a[1], - $ = 8191 & H, - Z = H >>> 13, - G = 0 | a[2], - V = 8191 & G, - W = G >>> 13, - K = 0 | a[3], - Y = 8191 & K, - J = K >>> 13, - X = 0 | a[4], - Q = 8191 & X, - tt = X >>> 13, - et = 0 | a[5], - rt = 8191 & et, - it = et >>> 13, - nt = 0 | a[6], - ot = 8191 & nt, - st = nt >>> 13, - at = 0 | a[7], - ht = 8191 & at, - ut = at >>> 13, - ft = 0 | a[8], - ct = 8191 & ft, - lt = ft >>> 13, - dt = 0 | a[9], - pt = 8191 & dt, - mt = dt >>> 13; - (r.negative = t.negative ^ e.negative), (r.length = 19); - var gt = (((u + (i = Math.imul(c, F))) | 0) + ((8191 & (n = ((n = Math.imul(c, q)) + Math.imul(l, F)) | 0)) << 13)) | 0; - (u = ((((o = Math.imul(l, q)) + (n >>> 13)) | 0) + (gt >>> 26)) | 0), - (gt &= 67108863), - (i = Math.imul(p, F)), - (n = ((n = Math.imul(p, q)) + Math.imul(m, F)) | 0), - (o = Math.imul(m, q)); - var bt = - (((u + (i = (i + Math.imul(c, $)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, Z)) | 0) + Math.imul(l, $)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, Z)) | 0) + (n >>> 13)) | 0) + (bt >>> 26)) | 0), - (bt &= 67108863), - (i = Math.imul(b, F)), - (n = ((n = Math.imul(b, q)) + Math.imul(y, F)) | 0), - (o = Math.imul(y, q)), - (i = (i + Math.imul(p, $)) | 0), - (n = ((n = (n + Math.imul(p, Z)) | 0) + Math.imul(m, $)) | 0), - (o = (o + Math.imul(m, Z)) | 0); - var yt = - (((u + (i = (i + Math.imul(c, V)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, W)) | 0) + Math.imul(l, V)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, W)) | 0) + (n >>> 13)) | 0) + (yt >>> 26)) | 0), - (yt &= 67108863), - (i = Math.imul(w, F)), - (n = ((n = Math.imul(w, q)) + Math.imul(_, F)) | 0), - (o = Math.imul(_, q)), - (i = (i + Math.imul(b, $)) | 0), - (n = ((n = (n + Math.imul(b, Z)) | 0) + Math.imul(y, $)) | 0), - (o = (o + Math.imul(y, Z)) | 0), - (i = (i + Math.imul(p, V)) | 0), - (n = ((n = (n + Math.imul(p, W)) | 0) + Math.imul(m, V)) | 0), - (o = (o + Math.imul(m, W)) | 0); - var vt = - (((u + (i = (i + Math.imul(c, Y)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, J)) | 0) + Math.imul(l, Y)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, J)) | 0) + (n >>> 13)) | 0) + (vt >>> 26)) | 0), - (vt &= 67108863), - (i = Math.imul(E, F)), - (n = ((n = Math.imul(E, q)) + Math.imul(S, F)) | 0), - (o = Math.imul(S, q)), - (i = (i + Math.imul(w, $)) | 0), - (n = ((n = (n + Math.imul(w, Z)) | 0) + Math.imul(_, $)) | 0), - (o = (o + Math.imul(_, Z)) | 0), - (i = (i + Math.imul(b, V)) | 0), - (n = ((n = (n + Math.imul(b, W)) | 0) + Math.imul(y, V)) | 0), - (o = (o + Math.imul(y, W)) | 0), - (i = (i + Math.imul(p, Y)) | 0), - (n = ((n = (n + Math.imul(p, J)) | 0) + Math.imul(m, Y)) | 0), - (o = (o + Math.imul(m, J)) | 0); - var wt = - (((u + (i = (i + Math.imul(c, Q)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, tt)) | 0) + Math.imul(l, Q)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, tt)) | 0) + (n >>> 13)) | 0) + (wt >>> 26)) | 0), - (wt &= 67108863), - (i = Math.imul(A, F)), - (n = ((n = Math.imul(A, q)) + Math.imul(k, F)) | 0), - (o = Math.imul(k, q)), - (i = (i + Math.imul(E, $)) | 0), - (n = ((n = (n + Math.imul(E, Z)) | 0) + Math.imul(S, $)) | 0), - (o = (o + Math.imul(S, Z)) | 0), - (i = (i + Math.imul(w, V)) | 0), - (n = ((n = (n + Math.imul(w, W)) | 0) + Math.imul(_, V)) | 0), - (o = (o + Math.imul(_, W)) | 0), - (i = (i + Math.imul(b, Y)) | 0), - (n = ((n = (n + Math.imul(b, J)) | 0) + Math.imul(y, Y)) | 0), - (o = (o + Math.imul(y, J)) | 0), - (i = (i + Math.imul(p, Q)) | 0), - (n = ((n = (n + Math.imul(p, tt)) | 0) + Math.imul(m, Q)) | 0), - (o = (o + Math.imul(m, tt)) | 0); - var _t = - (((u + (i = (i + Math.imul(c, rt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, it)) | 0) + Math.imul(l, rt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, it)) | 0) + (n >>> 13)) | 0) + (_t >>> 26)) | 0), - (_t &= 67108863), - (i = Math.imul(B, F)), - (n = ((n = Math.imul(B, q)) + Math.imul(I, F)) | 0), - (o = Math.imul(I, q)), - (i = (i + Math.imul(A, $)) | 0), - (n = ((n = (n + Math.imul(A, Z)) | 0) + Math.imul(k, $)) | 0), - (o = (o + Math.imul(k, Z)) | 0), - (i = (i + Math.imul(E, V)) | 0), - (n = ((n = (n + Math.imul(E, W)) | 0) + Math.imul(S, V)) | 0), - (o = (o + Math.imul(S, W)) | 0), - (i = (i + Math.imul(w, Y)) | 0), - (n = ((n = (n + Math.imul(w, J)) | 0) + Math.imul(_, Y)) | 0), - (o = (o + Math.imul(_, J)) | 0), - (i = (i + Math.imul(b, Q)) | 0), - (n = ((n = (n + Math.imul(b, tt)) | 0) + Math.imul(y, Q)) | 0), - (o = (o + Math.imul(y, tt)) | 0), - (i = (i + Math.imul(p, rt)) | 0), - (n = ((n = (n + Math.imul(p, it)) | 0) + Math.imul(m, rt)) | 0), - (o = (o + Math.imul(m, it)) | 0); - var Mt = - (((u + (i = (i + Math.imul(c, ot)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, st)) | 0) + Math.imul(l, ot)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, st)) | 0) + (n >>> 13)) | 0) + (Mt >>> 26)) | 0), - (Mt &= 67108863), - (i = Math.imul(P, F)), - (n = ((n = Math.imul(P, q)) + Math.imul(O, F)) | 0), - (o = Math.imul(O, q)), - (i = (i + Math.imul(B, $)) | 0), - (n = ((n = (n + Math.imul(B, Z)) | 0) + Math.imul(I, $)) | 0), - (o = (o + Math.imul(I, Z)) | 0), - (i = (i + Math.imul(A, V)) | 0), - (n = ((n = (n + Math.imul(A, W)) | 0) + Math.imul(k, V)) | 0), - (o = (o + Math.imul(k, W)) | 0), - (i = (i + Math.imul(E, Y)) | 0), - (n = ((n = (n + Math.imul(E, J)) | 0) + Math.imul(S, Y)) | 0), - (o = (o + Math.imul(S, J)) | 0), - (i = (i + Math.imul(w, Q)) | 0), - (n = ((n = (n + Math.imul(w, tt)) | 0) + Math.imul(_, Q)) | 0), - (o = (o + Math.imul(_, tt)) | 0), - (i = (i + Math.imul(b, rt)) | 0), - (n = ((n = (n + Math.imul(b, it)) | 0) + Math.imul(y, rt)) | 0), - (o = (o + Math.imul(y, it)) | 0), - (i = (i + Math.imul(p, ot)) | 0), - (n = ((n = (n + Math.imul(p, st)) | 0) + Math.imul(m, ot)) | 0), - (o = (o + Math.imul(m, st)) | 0); - var Et = - (((u + (i = (i + Math.imul(c, ht)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, ut)) | 0) + Math.imul(l, ht)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, ut)) | 0) + (n >>> 13)) | 0) + (Et >>> 26)) | 0), - (Et &= 67108863), - (i = Math.imul(C, F)), - (n = ((n = Math.imul(C, q)) + Math.imul(N, F)) | 0), - (o = Math.imul(N, q)), - (i = (i + Math.imul(P, $)) | 0), - (n = ((n = (n + Math.imul(P, Z)) | 0) + Math.imul(O, $)) | 0), - (o = (o + Math.imul(O, Z)) | 0), - (i = (i + Math.imul(B, V)) | 0), - (n = ((n = (n + Math.imul(B, W)) | 0) + Math.imul(I, V)) | 0), - (o = (o + Math.imul(I, W)) | 0), - (i = (i + Math.imul(A, Y)) | 0), - (n = ((n = (n + Math.imul(A, J)) | 0) + Math.imul(k, Y)) | 0), - (o = (o + Math.imul(k, J)) | 0), - (i = (i + Math.imul(E, Q)) | 0), - (n = ((n = (n + Math.imul(E, tt)) | 0) + Math.imul(S, Q)) | 0), - (o = (o + Math.imul(S, tt)) | 0), - (i = (i + Math.imul(w, rt)) | 0), - (n = ((n = (n + Math.imul(w, it)) | 0) + Math.imul(_, rt)) | 0), - (o = (o + Math.imul(_, it)) | 0), - (i = (i + Math.imul(b, ot)) | 0), - (n = ((n = (n + Math.imul(b, st)) | 0) + Math.imul(y, ot)) | 0), - (o = (o + Math.imul(y, st)) | 0), - (i = (i + Math.imul(p, ht)) | 0), - (n = ((n = (n + Math.imul(p, ut)) | 0) + Math.imul(m, ht)) | 0), - (o = (o + Math.imul(m, ut)) | 0); - var St = - (((u + (i = (i + Math.imul(c, ct)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, lt)) | 0) + Math.imul(l, ct)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, lt)) | 0) + (n >>> 13)) | 0) + (St >>> 26)) | 0), - (St &= 67108863), - (i = Math.imul(U, F)), - (n = ((n = Math.imul(U, q)) + Math.imul(D, F)) | 0), - (o = Math.imul(D, q)), - (i = (i + Math.imul(C, $)) | 0), - (n = ((n = (n + Math.imul(C, Z)) | 0) + Math.imul(N, $)) | 0), - (o = (o + Math.imul(N, Z)) | 0), - (i = (i + Math.imul(P, V)) | 0), - (n = ((n = (n + Math.imul(P, W)) | 0) + Math.imul(O, V)) | 0), - (o = (o + Math.imul(O, W)) | 0), - (i = (i + Math.imul(B, Y)) | 0), - (n = ((n = (n + Math.imul(B, J)) | 0) + Math.imul(I, Y)) | 0), - (o = (o + Math.imul(I, J)) | 0), - (i = (i + Math.imul(A, Q)) | 0), - (n = ((n = (n + Math.imul(A, tt)) | 0) + Math.imul(k, Q)) | 0), - (o = (o + Math.imul(k, tt)) | 0), - (i = (i + Math.imul(E, rt)) | 0), - (n = ((n = (n + Math.imul(E, it)) | 0) + Math.imul(S, rt)) | 0), - (o = (o + Math.imul(S, it)) | 0), - (i = (i + Math.imul(w, ot)) | 0), - (n = ((n = (n + Math.imul(w, st)) | 0) + Math.imul(_, ot)) | 0), - (o = (o + Math.imul(_, st)) | 0), - (i = (i + Math.imul(b, ht)) | 0), - (n = ((n = (n + Math.imul(b, ut)) | 0) + Math.imul(y, ht)) | 0), - (o = (o + Math.imul(y, ut)) | 0), - (i = (i + Math.imul(p, ct)) | 0), - (n = ((n = (n + Math.imul(p, lt)) | 0) + Math.imul(m, ct)) | 0), - (o = (o + Math.imul(m, lt)) | 0); - var xt = - (((u + (i = (i + Math.imul(c, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, mt)) | 0) + Math.imul(l, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, mt)) | 0) + (n >>> 13)) | 0) + (xt >>> 26)) | 0), - (xt &= 67108863), - (i = Math.imul(U, $)), - (n = ((n = Math.imul(U, Z)) + Math.imul(D, $)) | 0), - (o = Math.imul(D, Z)), - (i = (i + Math.imul(C, V)) | 0), - (n = ((n = (n + Math.imul(C, W)) | 0) + Math.imul(N, V)) | 0), - (o = (o + Math.imul(N, W)) | 0), - (i = (i + Math.imul(P, Y)) | 0), - (n = ((n = (n + Math.imul(P, J)) | 0) + Math.imul(O, Y)) | 0), - (o = (o + Math.imul(O, J)) | 0), - (i = (i + Math.imul(B, Q)) | 0), - (n = ((n = (n + Math.imul(B, tt)) | 0) + Math.imul(I, Q)) | 0), - (o = (o + Math.imul(I, tt)) | 0), - (i = (i + Math.imul(A, rt)) | 0), - (n = ((n = (n + Math.imul(A, it)) | 0) + Math.imul(k, rt)) | 0), - (o = (o + Math.imul(k, it)) | 0), - (i = (i + Math.imul(E, ot)) | 0), - (n = ((n = (n + Math.imul(E, st)) | 0) + Math.imul(S, ot)) | 0), - (o = (o + Math.imul(S, st)) | 0), - (i = (i + Math.imul(w, ht)) | 0), - (n = ((n = (n + Math.imul(w, ut)) | 0) + Math.imul(_, ht)) | 0), - (o = (o + Math.imul(_, ut)) | 0), - (i = (i + Math.imul(b, ct)) | 0), - (n = ((n = (n + Math.imul(b, lt)) | 0) + Math.imul(y, ct)) | 0), - (o = (o + Math.imul(y, lt)) | 0); - var At = - (((u + (i = (i + Math.imul(p, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(p, mt)) | 0) + Math.imul(m, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(m, mt)) | 0) + (n >>> 13)) | 0) + (At >>> 26)) | 0), - (At &= 67108863), - (i = Math.imul(U, V)), - (n = ((n = Math.imul(U, W)) + Math.imul(D, V)) | 0), - (o = Math.imul(D, W)), - (i = (i + Math.imul(C, Y)) | 0), - (n = ((n = (n + Math.imul(C, J)) | 0) + Math.imul(N, Y)) | 0), - (o = (o + Math.imul(N, J)) | 0), - (i = (i + Math.imul(P, Q)) | 0), - (n = ((n = (n + Math.imul(P, tt)) | 0) + Math.imul(O, Q)) | 0), - (o = (o + Math.imul(O, tt)) | 0), - (i = (i + Math.imul(B, rt)) | 0), - (n = ((n = (n + Math.imul(B, it)) | 0) + Math.imul(I, rt)) | 0), - (o = (o + Math.imul(I, it)) | 0), - (i = (i + Math.imul(A, ot)) | 0), - (n = ((n = (n + Math.imul(A, st)) | 0) + Math.imul(k, ot)) | 0), - (o = (o + Math.imul(k, st)) | 0), - (i = (i + Math.imul(E, ht)) | 0), - (n = ((n = (n + Math.imul(E, ut)) | 0) + Math.imul(S, ht)) | 0), - (o = (o + Math.imul(S, ut)) | 0), - (i = (i + Math.imul(w, ct)) | 0), - (n = ((n = (n + Math.imul(w, lt)) | 0) + Math.imul(_, ct)) | 0), - (o = (o + Math.imul(_, lt)) | 0); - var kt = - (((u + (i = (i + Math.imul(b, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(b, mt)) | 0) + Math.imul(y, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(y, mt)) | 0) + (n >>> 13)) | 0) + (kt >>> 26)) | 0), - (kt &= 67108863), - (i = Math.imul(U, Y)), - (n = ((n = Math.imul(U, J)) + Math.imul(D, Y)) | 0), - (o = Math.imul(D, J)), - (i = (i + Math.imul(C, Q)) | 0), - (n = ((n = (n + Math.imul(C, tt)) | 0) + Math.imul(N, Q)) | 0), - (o = (o + Math.imul(N, tt)) | 0), - (i = (i + Math.imul(P, rt)) | 0), - (n = ((n = (n + Math.imul(P, it)) | 0) + Math.imul(O, rt)) | 0), - (o = (o + Math.imul(O, it)) | 0), - (i = (i + Math.imul(B, ot)) | 0), - (n = ((n = (n + Math.imul(B, st)) | 0) + Math.imul(I, ot)) | 0), - (o = (o + Math.imul(I, st)) | 0), - (i = (i + Math.imul(A, ht)) | 0), - (n = ((n = (n + Math.imul(A, ut)) | 0) + Math.imul(k, ht)) | 0), - (o = (o + Math.imul(k, ut)) | 0), - (i = (i + Math.imul(E, ct)) | 0), - (n = ((n = (n + Math.imul(E, lt)) | 0) + Math.imul(S, ct)) | 0), - (o = (o + Math.imul(S, lt)) | 0); - var Rt = - (((u + (i = (i + Math.imul(w, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(w, mt)) | 0) + Math.imul(_, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(_, mt)) | 0) + (n >>> 13)) | 0) + (Rt >>> 26)) | 0), - (Rt &= 67108863), - (i = Math.imul(U, Q)), - (n = ((n = Math.imul(U, tt)) + Math.imul(D, Q)) | 0), - (o = Math.imul(D, tt)), - (i = (i + Math.imul(C, rt)) | 0), - (n = ((n = (n + Math.imul(C, it)) | 0) + Math.imul(N, rt)) | 0), - (o = (o + Math.imul(N, it)) | 0), - (i = (i + Math.imul(P, ot)) | 0), - (n = ((n = (n + Math.imul(P, st)) | 0) + Math.imul(O, ot)) | 0), - (o = (o + Math.imul(O, st)) | 0), - (i = (i + Math.imul(B, ht)) | 0), - (n = ((n = (n + Math.imul(B, ut)) | 0) + Math.imul(I, ht)) | 0), - (o = (o + Math.imul(I, ut)) | 0), - (i = (i + Math.imul(A, ct)) | 0), - (n = ((n = (n + Math.imul(A, lt)) | 0) + Math.imul(k, ct)) | 0), - (o = (o + Math.imul(k, lt)) | 0); - var Bt = - (((u + (i = (i + Math.imul(E, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(E, mt)) | 0) + Math.imul(S, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(S, mt)) | 0) + (n >>> 13)) | 0) + (Bt >>> 26)) | 0), - (Bt &= 67108863), - (i = Math.imul(U, rt)), - (n = ((n = Math.imul(U, it)) + Math.imul(D, rt)) | 0), - (o = Math.imul(D, it)), - (i = (i + Math.imul(C, ot)) | 0), - (n = ((n = (n + Math.imul(C, st)) | 0) + Math.imul(N, ot)) | 0), - (o = (o + Math.imul(N, st)) | 0), - (i = (i + Math.imul(P, ht)) | 0), - (n = ((n = (n + Math.imul(P, ut)) | 0) + Math.imul(O, ht)) | 0), - (o = (o + Math.imul(O, ut)) | 0), - (i = (i + Math.imul(B, ct)) | 0), - (n = ((n = (n + Math.imul(B, lt)) | 0) + Math.imul(I, ct)) | 0), - (o = (o + Math.imul(I, lt)) | 0); - var It = - (((u + (i = (i + Math.imul(A, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(A, mt)) | 0) + Math.imul(k, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(k, mt)) | 0) + (n >>> 13)) | 0) + (It >>> 26)) | 0), - (It &= 67108863), - (i = Math.imul(U, ot)), - (n = ((n = Math.imul(U, st)) + Math.imul(D, ot)) | 0), - (o = Math.imul(D, st)), - (i = (i + Math.imul(C, ht)) | 0), - (n = ((n = (n + Math.imul(C, ut)) | 0) + Math.imul(N, ht)) | 0), - (o = (o + Math.imul(N, ut)) | 0), - (i = (i + Math.imul(P, ct)) | 0), - (n = ((n = (n + Math.imul(P, lt)) | 0) + Math.imul(O, ct)) | 0), - (o = (o + Math.imul(O, lt)) | 0); - var Tt = - (((u + (i = (i + Math.imul(B, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(B, mt)) | 0) + Math.imul(I, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(I, mt)) | 0) + (n >>> 13)) | 0) + (Tt >>> 26)) | 0), - (Tt &= 67108863), - (i = Math.imul(U, ht)), - (n = ((n = Math.imul(U, ut)) + Math.imul(D, ht)) | 0), - (o = Math.imul(D, ut)), - (i = (i + Math.imul(C, ct)) | 0), - (n = ((n = (n + Math.imul(C, lt)) | 0) + Math.imul(N, ct)) | 0), - (o = (o + Math.imul(N, lt)) | 0); - var Pt = - (((u + (i = (i + Math.imul(P, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(P, mt)) | 0) + Math.imul(O, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(O, mt)) | 0) + (n >>> 13)) | 0) + (Pt >>> 26)) | 0), - (Pt &= 67108863), - (i = Math.imul(U, ct)), - (n = ((n = Math.imul(U, lt)) + Math.imul(D, ct)) | 0), - (o = Math.imul(D, lt)); - var Ot = - (((u + (i = (i + Math.imul(C, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(C, mt)) | 0) + Math.imul(N, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(N, mt)) | 0) + (n >>> 13)) | 0) + (Ot >>> 26)) | 0), (Ot &= 67108863); - var Lt = (((u + (i = Math.imul(U, pt))) | 0) + ((8191 & (n = ((n = Math.imul(U, mt)) + Math.imul(D, pt)) | 0)) << 13)) | 0; - return ( - (u = ((((o = Math.imul(D, mt)) + (n >>> 13)) | 0) + (Lt >>> 26)) | 0), - (Lt &= 67108863), - (h[0] = gt), - (h[1] = bt), - (h[2] = yt), - (h[3] = vt), - (h[4] = wt), - (h[5] = _t), - (h[6] = Mt), - (h[7] = Et), - (h[8] = St), - (h[9] = xt), - (h[10] = At), - (h[11] = kt), - (h[12] = Rt), - (h[13] = Bt), - (h[14] = It), - (h[15] = Tt), - (h[16] = Pt), - (h[17] = Ot), - (h[18] = Lt), - 0 !== u && ((h[19] = u), r.length++), - r - ); - }; - function b(t, e, r) { - (r.negative = e.negative ^ t.negative), (r.length = t.length + e.length); - for (var i = 0, n = 0, o = 0; o < r.length - 1; o++) { - var s = n; - n = 0; - for (var a = 67108863 & i, h = Math.min(o, e.length - 1), u = Math.max(0, o - t.length + 1); u <= h; u++) { - var f = o - u, - c = (0 | t.words[f]) * (0 | e.words[u]), - l = 67108863 & c; - (a = 67108863 & (l = (l + a) | 0)), - (n += (s = ((s = (s + ((c / 67108864) | 0)) | 0) + (l >>> 26)) | 0) >>> 26), - (s &= 67108863); - } - (r.words[o] = a), (i = s), (s = n); - } - return 0 !== i ? (r.words[o] = i) : r.length--, r._strip(); - } - function y(t, e, r) { - return b(t, e, r); - } - function v(t, e) { - (this.x = t), (this.y = e); - } - Math.imul || (g = m), - (o.prototype.mulTo = function (t, e) { - var r = this.length + t.length; - return 10 === this.length && 10 === t.length - ? g(this, t, e) - : r < 63 - ? m(this, t, e) - : r < 1024 - ? b(this, t, e) - : y(this, t, e); - }), - (v.prototype.makeRBT = function (t) { - for (var e = new Array(t), r = o.prototype._countBits(t) - 1, i = 0; i < t; i++) e[i] = this.revBin(i, r, t); - return e; - }), - (v.prototype.revBin = function (t, e, r) { - if (0 === t || t === r - 1) return t; - for (var i = 0, n = 0; n < e; n++) (i |= (1 & t) << (e - n - 1)), (t >>= 1); - return i; - }), - (v.prototype.permute = function (t, e, r, i, n, o) { - for (var s = 0; s < o; s++) (i[s] = e[t[s]]), (n[s] = r[t[s]]); - }), - (v.prototype.transform = function (t, e, r, i, n, o) { - this.permute(o, t, e, r, i, n); - for (var s = 1; s < n; s <<= 1) - for (var a = s << 1, h = Math.cos((2 * Math.PI) / a), u = Math.sin((2 * Math.PI) / a), f = 0; f < n; f += a) - for (var c = h, l = u, d = 0; d < s; d++) { - var p = r[f + d], - m = i[f + d], - g = r[f + d + s], - b = i[f + d + s], - y = c * g - l * b; - (b = c * b + l * g), - (g = y), - (r[f + d] = p + g), - (i[f + d] = m + b), - (r[f + d + s] = p - g), - (i[f + d + s] = m - b), - d !== a && ((y = h * c - u * l), (l = h * l + u * c), (c = y)); - } - }), - (v.prototype.guessLen13b = function (t, e) { - var r = 1 | Math.max(e, t), - i = 1 & r, - n = 0; - for (r = (r / 2) | 0; r; r >>>= 1) n++; - return 1 << (n + 1 + i); - }), - (v.prototype.conjugate = function (t, e, r) { - if (!(r <= 1)) - for (var i = 0; i < r / 2; i++) { - var n = t[i]; - (t[i] = t[r - i - 1]), (t[r - i - 1] = n), (n = e[i]), (e[i] = -e[r - i - 1]), (e[r - i - 1] = -n); - } - }), - (v.prototype.normalize13b = function (t, e) { - for (var r = 0, i = 0; i < e / 2; i++) { - var n = 8192 * Math.round(t[2 * i + 1] / e) + Math.round(t[2 * i] / e) + r; - (t[i] = 67108863 & n), (r = n < 67108864 ? 0 : (n / 67108864) | 0); - } - return t; - }), - (v.prototype.convert13b = function (t, e, r, n) { - for (var o = 0, s = 0; s < e; s++) - (o += 0 | t[s]), (r[2 * s] = 8191 & o), (o >>>= 13), (r[2 * s + 1] = 8191 & o), (o >>>= 13); - for (s = 2 * e; s < n; ++s) r[s] = 0; - i(0 === o), i(0 == (-8192 & o)); - }), - (v.prototype.stub = function (t) { - for (var e = new Array(t), r = 0; r < t; r++) e[r] = 0; - return e; - }), - (v.prototype.mulp = function (t, e, r) { - var i = 2 * this.guessLen13b(t.length, e.length), - n = this.makeRBT(i), - o = this.stub(i), - s = new Array(i), - a = new Array(i), - h = new Array(i), - u = new Array(i), - f = new Array(i), - c = new Array(i), - l = r.words; - (l.length = i), - this.convert13b(t.words, t.length, s, i), - this.convert13b(e.words, e.length, u, i), - this.transform(s, o, a, h, i, n), - this.transform(u, o, f, c, i, n); - for (var d = 0; d < i; d++) { - var p = a[d] * f[d] - h[d] * c[d]; - (h[d] = a[d] * c[d] + h[d] * f[d]), (a[d] = p); - } - return ( - this.conjugate(a, h, i), - this.transform(a, h, l, o, i, n), - this.conjugate(l, o, i), - this.normalize13b(l, i), - (r.negative = t.negative ^ e.negative), - (r.length = t.length + e.length), - r._strip() - ); - }), - (o.prototype.mul = function (t) { - var e = new o(null); - return (e.words = new Array(this.length + t.length)), this.mulTo(t, e); - }), - (o.prototype.mulf = function (t) { - var e = new o(null); - return (e.words = new Array(this.length + t.length)), y(this, t, e); - }), - (o.prototype.imul = function (t) { - return this.clone().mulTo(t, this); - }), - (o.prototype.imuln = function (t) { - var e = t < 0; - e && (t = -t), i('number' == typeof t), i(t < 67108864); - for (var r = 0, n = 0; n < this.length; n++) { - var o = (0 | this.words[n]) * t, - s = (67108863 & o) + (67108863 & r); - (r >>= 26), (r += (o / 67108864) | 0), (r += s >>> 26), (this.words[n] = 67108863 & s); - } - return 0 !== r && ((this.words[n] = r), this.length++), e ? this.ineg() : this; - }), - (o.prototype.muln = function (t) { - return this.clone().imuln(t); - }), - (o.prototype.sqr = function () { - return this.mul(this); - }), - (o.prototype.isqr = function () { - return this.imul(this.clone()); - }), - (o.prototype.pow = function (t) { - var e = (function (t) { - for (var e = new Array(t.bitLength()), r = 0; r < e.length; r++) { - var i = (r / 26) | 0, - n = r % 26; - e[r] = (t.words[i] >>> n) & 1; - } - return e; - })(t); - if (0 === e.length) return new o(1); - for (var r = this, i = 0; i < e.length && 0 === e[i]; i++, r = r.sqr()); - if (++i < e.length) for (var n = r.sqr(); i < e.length; i++, n = n.sqr()) 0 !== e[i] && (r = r.mul(n)); - return r; - }), - (o.prototype.iushln = function (t) { - i('number' == typeof t && t >= 0); - var e, - r = t % 26, - n = (t - r) / 26, - o = (67108863 >>> (26 - r)) << (26 - r); - if (0 !== r) { - var s = 0; - for (e = 0; e < this.length; e++) { - var a = this.words[e] & o, - h = ((0 | this.words[e]) - a) << r; - (this.words[e] = h | s), (s = a >>> (26 - r)); - } - s && ((this.words[e] = s), this.length++); - } - if (0 !== n) { - for (e = this.length - 1; e >= 0; e--) this.words[e + n] = this.words[e]; - for (e = 0; e < n; e++) this.words[e] = 0; - this.length += n; - } - return this._strip(); - }), - (o.prototype.ishln = function (t) { - return i(0 === this.negative), this.iushln(t); - }), - (o.prototype.iushrn = function (t, e, r) { - var n; - i('number' == typeof t && t >= 0), (n = e ? (e - (e % 26)) / 26 : 0); - var o = t % 26, - s = Math.min((t - o) / 26, this.length), - a = 67108863 ^ ((67108863 >>> o) << o), - h = r; - if (((n -= s), (n = Math.max(0, n)), h)) { - for (var u = 0; u < s; u++) h.words[u] = this.words[u]; - h.length = s; - } - if (0 === s); - else if (this.length > s) for (this.length -= s, u = 0; u < this.length; u++) this.words[u] = this.words[u + s]; - else (this.words[0] = 0), (this.length = 1); - var f = 0; - for (u = this.length - 1; u >= 0 && (0 !== f || u >= n); u--) { - var c = 0 | this.words[u]; - (this.words[u] = (f << (26 - o)) | (c >>> o)), (f = c & a); - } - return ( - h && 0 !== f && (h.words[h.length++] = f), 0 === this.length && ((this.words[0] = 0), (this.length = 1)), this._strip() - ); - }), - (o.prototype.ishrn = function (t, e, r) { - return i(0 === this.negative), this.iushrn(t, e, r); - }), - (o.prototype.shln = function (t) { - return this.clone().ishln(t); - }), - (o.prototype.ushln = function (t) { - return this.clone().iushln(t); - }), - (o.prototype.shrn = function (t) { - return this.clone().ishrn(t); - }), - (o.prototype.ushrn = function (t) { - return this.clone().iushrn(t); - }), - (o.prototype.testn = function (t) { - i('number' == typeof t && t >= 0); - var e = t % 26, - r = (t - e) / 26, - n = 1 << e; - return !(this.length <= r || !(this.words[r] & n)); - }), - (o.prototype.imaskn = function (t) { - i('number' == typeof t && t >= 0); - var e = t % 26, - r = (t - e) / 26; - if ((i(0 === this.negative, 'imaskn works only with positive numbers'), this.length <= r)) return this; - if ((0 !== e && r++, (this.length = Math.min(r, this.length)), 0 !== e)) { - var n = 67108863 ^ ((67108863 >>> e) << e); - this.words[this.length - 1] &= n; - } - return this._strip(); - }), - (o.prototype.maskn = function (t) { - return this.clone().imaskn(t); - }), - (o.prototype.iaddn = function (t) { - return ( - i('number' == typeof t), - i(t < 67108864), - t < 0 - ? this.isubn(-t) - : 0 !== this.negative - ? 1 === this.length && (0 | this.words[0]) <= t - ? ((this.words[0] = t - (0 | this.words[0])), (this.negative = 0), this) - : ((this.negative = 0), this.isubn(t), (this.negative = 1), this) - : this._iaddn(t) - ); - }), - (o.prototype._iaddn = function (t) { - this.words[0] += t; - for (var e = 0; e < this.length && this.words[e] >= 67108864; e++) - (this.words[e] -= 67108864), e === this.length - 1 ? (this.words[e + 1] = 1) : this.words[e + 1]++; - return (this.length = Math.max(this.length, e + 1)), this; - }), - (o.prototype.isubn = function (t) { - if ((i('number' == typeof t), i(t < 67108864), t < 0)) return this.iaddn(-t); - if (0 !== this.negative) return (this.negative = 0), this.iaddn(t), (this.negative = 1), this; - if (((this.words[0] -= t), 1 === this.length && this.words[0] < 0)) (this.words[0] = -this.words[0]), (this.negative = 1); - else for (var e = 0; e < this.length && this.words[e] < 0; e++) (this.words[e] += 67108864), (this.words[e + 1] -= 1); - return this._strip(); - }), - (o.prototype.addn = function (t) { - return this.clone().iaddn(t); - }), - (o.prototype.subn = function (t) { - return this.clone().isubn(t); - }), - (o.prototype.iabs = function () { - return (this.negative = 0), this; - }), - (o.prototype.abs = function () { - return this.clone().iabs(); - }), - (o.prototype._ishlnsubmul = function (t, e, r) { - var n, - o, - s = t.length + r; - this._expand(s); - var a = 0; - for (n = 0; n < t.length; n++) { - o = (0 | this.words[n + r]) + a; - var h = (0 | t.words[n]) * e; - (a = ((o -= 67108863 & h) >> 26) - ((h / 67108864) | 0)), (this.words[n + r] = 67108863 & o); - } - for (; n < this.length - r; n++) (a = (o = (0 | this.words[n + r]) + a) >> 26), (this.words[n + r] = 67108863 & o); - if (0 === a) return this._strip(); - for (i(-1 === a), a = 0, n = 0; n < this.length; n++) - (a = (o = -(0 | this.words[n]) + a) >> 26), (this.words[n] = 67108863 & o); - return (this.negative = 1), this._strip(); - }), - (o.prototype._wordDiv = function (t, e) { - var r = (this.length, t.length), - i = this.clone(), - n = t, - s = 0 | n.words[n.length - 1]; - 0 != (r = 26 - this._countBits(s)) && ((n = n.ushln(r)), i.iushln(r), (s = 0 | n.words[n.length - 1])); - var a, - h = i.length - n.length; - if ('mod' !== e) { - ((a = new o(null)).length = h + 1), (a.words = new Array(a.length)); - for (var u = 0; u < a.length; u++) a.words[u] = 0; - } - var f = i.clone()._ishlnsubmul(n, 1, h); - 0 === f.negative && ((i = f), a && (a.words[h] = 1)); - for (var c = h - 1; c >= 0; c--) { - var l = 67108864 * (0 | i.words[n.length + c]) + (0 | i.words[n.length + c - 1]); - for (l = Math.min((l / s) | 0, 67108863), i._ishlnsubmul(n, l, c); 0 !== i.negative; ) - l--, (i.negative = 0), i._ishlnsubmul(n, 1, c), i.isZero() || (i.negative ^= 1); - a && (a.words[c] = l); - } - return a && a._strip(), i._strip(), 'div' !== e && 0 !== r && i.iushrn(r), { div: a || null, mod: i }; - }), - (o.prototype.divmod = function (t, e, r) { - return ( - i(!t.isZero()), - this.isZero() - ? { div: new o(0), mod: new o(0) } - : 0 !== this.negative && 0 === t.negative - ? ((a = this.neg().divmod(t, e)), - 'mod' !== e && (n = a.div.neg()), - 'div' !== e && ((s = a.mod.neg()), r && 0 !== s.negative && s.iadd(t)), - { div: n, mod: s }) - : 0 === this.negative && 0 !== t.negative - ? ((a = this.divmod(t.neg(), e)), 'mod' !== e && (n = a.div.neg()), { div: n, mod: a.mod }) - : 0 != (this.negative & t.negative) - ? ((a = this.neg().divmod(t.neg(), e)), - 'div' !== e && ((s = a.mod.neg()), r && 0 !== s.negative && s.isub(t)), - { div: a.div, mod: s }) - : t.length > this.length || this.cmp(t) < 0 - ? { div: new o(0), mod: this } - : 1 === t.length - ? 'div' === e - ? { div: this.divn(t.words[0]), mod: null } - : 'mod' === e - ? { div: null, mod: new o(this.modrn(t.words[0])) } - : { div: this.divn(t.words[0]), mod: new o(this.modrn(t.words[0])) } - : this._wordDiv(t, e) - ); - var n, s, a; - }), - (o.prototype.div = function (t) { - return this.divmod(t, 'div', !1).div; - }), - (o.prototype.mod = function (t) { - return this.divmod(t, 'mod', !1).mod; - }), - (o.prototype.umod = function (t) { - return this.divmod(t, 'mod', !0).mod; - }), - (o.prototype.divRound = function (t) { - var e = this.divmod(t); - if (e.mod.isZero()) return e.div; - var r = 0 !== e.div.negative ? e.mod.isub(t) : e.mod, - i = t.ushrn(1), - n = t.andln(1), - o = r.cmp(i); - return o < 0 || (1 === n && 0 === o) ? e.div : 0 !== e.div.negative ? e.div.isubn(1) : e.div.iaddn(1); - }), - (o.prototype.modrn = function (t) { - var e = t < 0; - e && (t = -t), i(t <= 67108863); - for (var r = (1 << 26) % t, n = 0, o = this.length - 1; o >= 0; o--) n = (r * n + (0 | this.words[o])) % t; - return e ? -n : n; - }), - (o.prototype.modn = function (t) { - return this.modrn(t); - }), - (o.prototype.idivn = function (t) { - var e = t < 0; - e && (t = -t), i(t <= 67108863); - for (var r = 0, n = this.length - 1; n >= 0; n--) { - var o = (0 | this.words[n]) + 67108864 * r; - (this.words[n] = (o / t) | 0), (r = o % t); - } - return this._strip(), e ? this.ineg() : this; - }), - (o.prototype.divn = function (t) { - return this.clone().idivn(t); - }), - (o.prototype.egcd = function (t) { - i(0 === t.negative), i(!t.isZero()); - var e = this, - r = t.clone(); - e = 0 !== e.negative ? e.umod(t) : e.clone(); - for (var n = new o(1), s = new o(0), a = new o(0), h = new o(1), u = 0; e.isEven() && r.isEven(); ) - e.iushrn(1), r.iushrn(1), ++u; - for (var f = r.clone(), c = e.clone(); !e.isZero(); ) { - for (var l = 0, d = 1; 0 == (e.words[0] & d) && l < 26; ++l, d <<= 1); - if (l > 0) for (e.iushrn(l); l-- > 0; ) (n.isOdd() || s.isOdd()) && (n.iadd(f), s.isub(c)), n.iushrn(1), s.iushrn(1); - for (var p = 0, m = 1; 0 == (r.words[0] & m) && p < 26; ++p, m <<= 1); - if (p > 0) for (r.iushrn(p); p-- > 0; ) (a.isOdd() || h.isOdd()) && (a.iadd(f), h.isub(c)), a.iushrn(1), h.iushrn(1); - e.cmp(r) >= 0 ? (e.isub(r), n.isub(a), s.isub(h)) : (r.isub(e), a.isub(n), h.isub(s)); - } - return { a, b: h, gcd: r.iushln(u) }; - }), - (o.prototype._invmp = function (t) { - i(0 === t.negative), i(!t.isZero()); - var e = this, - r = t.clone(); - e = 0 !== e.negative ? e.umod(t) : e.clone(); - for (var n, s = new o(1), a = new o(0), h = r.clone(); e.cmpn(1) > 0 && r.cmpn(1) > 0; ) { - for (var u = 0, f = 1; 0 == (e.words[0] & f) && u < 26; ++u, f <<= 1); - if (u > 0) for (e.iushrn(u); u-- > 0; ) s.isOdd() && s.iadd(h), s.iushrn(1); - for (var c = 0, l = 1; 0 == (r.words[0] & l) && c < 26; ++c, l <<= 1); - if (c > 0) for (r.iushrn(c); c-- > 0; ) a.isOdd() && a.iadd(h), a.iushrn(1); - e.cmp(r) >= 0 ? (e.isub(r), s.isub(a)) : (r.isub(e), a.isub(s)); - } - return (n = 0 === e.cmpn(1) ? s : a).cmpn(0) < 0 && n.iadd(t), n; - }), - (o.prototype.gcd = function (t) { - if (this.isZero()) return t.abs(); - if (t.isZero()) return this.abs(); - var e = this.clone(), - r = t.clone(); - (e.negative = 0), (r.negative = 0); - for (var i = 0; e.isEven() && r.isEven(); i++) e.iushrn(1), r.iushrn(1); - for (;;) { - for (; e.isEven(); ) e.iushrn(1); - for (; r.isEven(); ) r.iushrn(1); - var n = e.cmp(r); - if (n < 0) { - var o = e; - (e = r), (r = o); - } else if (0 === n || 0 === r.cmpn(1)) break; - e.isub(r); - } - return r.iushln(i); - }), - (o.prototype.invm = function (t) { - return this.egcd(t).a.umod(t); - }), - (o.prototype.isEven = function () { - return 0 == (1 & this.words[0]); - }), - (o.prototype.isOdd = function () { - return 1 == (1 & this.words[0]); - }), - (o.prototype.andln = function (t) { - return this.words[0] & t; - }), - (o.prototype.bincn = function (t) { - i('number' == typeof t); - var e = t % 26, - r = (t - e) / 26, - n = 1 << e; - if (this.length <= r) return this._expand(r + 1), (this.words[r] |= n), this; - for (var o = n, s = r; 0 !== o && s < this.length; s++) { - var a = 0 | this.words[s]; - (o = (a += o) >>> 26), (a &= 67108863), (this.words[s] = a); - } - return 0 !== o && ((this.words[s] = o), this.length++), this; - }), - (o.prototype.isZero = function () { - return 1 === this.length && 0 === this.words[0]; - }), - (o.prototype.cmpn = function (t) { - var e, - r = t < 0; - if (0 !== this.negative && !r) return -1; - if (0 === this.negative && r) return 1; - if ((this._strip(), this.length > 1)) e = 1; - else { - r && (t = -t), i(t <= 67108863, 'Number is too big'); - var n = 0 | this.words[0]; - e = n === t ? 0 : n < t ? -1 : 1; - } - return 0 !== this.negative ? 0 | -e : e; - }), - (o.prototype.cmp = function (t) { - if (0 !== this.negative && 0 === t.negative) return -1; - if (0 === this.negative && 0 !== t.negative) return 1; - var e = this.ucmp(t); - return 0 !== this.negative ? 0 | -e : e; - }), - (o.prototype.ucmp = function (t) { - if (this.length > t.length) return 1; - if (this.length < t.length) return -1; - for (var e = 0, r = this.length - 1; r >= 0; r--) { - var i = 0 | this.words[r], - n = 0 | t.words[r]; - if (i !== n) { - i < n ? (e = -1) : i > n && (e = 1); - break; - } - } - return e; - }), - (o.prototype.gtn = function (t) { - return 1 === this.cmpn(t); - }), - (o.prototype.gt = function (t) { - return 1 === this.cmp(t); - }), - (o.prototype.gten = function (t) { - return this.cmpn(t) >= 0; - }), - (o.prototype.gte = function (t) { - return this.cmp(t) >= 0; - }), - (o.prototype.ltn = function (t) { - return -1 === this.cmpn(t); - }), - (o.prototype.lt = function (t) { - return -1 === this.cmp(t); - }), - (o.prototype.lten = function (t) { - return this.cmpn(t) <= 0; - }), - (o.prototype.lte = function (t) { - return this.cmp(t) <= 0; - }), - (o.prototype.eqn = function (t) { - return 0 === this.cmpn(t); - }), - (o.prototype.eq = function (t) { - return 0 === this.cmp(t); - }), - (o.red = function (t) { - return new A(t); - }), - (o.prototype.toRed = function (t) { - return ( - i(!this.red, 'Already a number in reduction context'), - i(0 === this.negative, 'red works only with positives'), - t.convertTo(this)._forceRed(t) - ); - }), - (o.prototype.fromRed = function () { - return i(this.red, 'fromRed works only with numbers in reduction context'), this.red.convertFrom(this); - }), - (o.prototype._forceRed = function (t) { - return (this.red = t), this; - }), - (o.prototype.forceRed = function (t) { - return i(!this.red, 'Already a number in reduction context'), this._forceRed(t); - }), - (o.prototype.redAdd = function (t) { - return i(this.red, 'redAdd works only with red numbers'), this.red.add(this, t); - }), - (o.prototype.redIAdd = function (t) { - return i(this.red, 'redIAdd works only with red numbers'), this.red.iadd(this, t); - }), - (o.prototype.redSub = function (t) { - return i(this.red, 'redSub works only with red numbers'), this.red.sub(this, t); - }), - (o.prototype.redISub = function (t) { - return i(this.red, 'redISub works only with red numbers'), this.red.isub(this, t); - }), - (o.prototype.redShl = function (t) { - return i(this.red, 'redShl works only with red numbers'), this.red.shl(this, t); - }), - (o.prototype.redMul = function (t) { - return i(this.red, 'redMul works only with red numbers'), this.red._verify2(this, t), this.red.mul(this, t); - }), - (o.prototype.redIMul = function (t) { - return i(this.red, 'redMul works only with red numbers'), this.red._verify2(this, t), this.red.imul(this, t); - }), - (o.prototype.redSqr = function () { - return i(this.red, 'redSqr works only with red numbers'), this.red._verify1(this), this.red.sqr(this); - }), - (o.prototype.redISqr = function () { - return i(this.red, 'redISqr works only with red numbers'), this.red._verify1(this), this.red.isqr(this); - }), - (o.prototype.redSqrt = function () { - return i(this.red, 'redSqrt works only with red numbers'), this.red._verify1(this), this.red.sqrt(this); - }), - (o.prototype.redInvm = function () { - return i(this.red, 'redInvm works only with red numbers'), this.red._verify1(this), this.red.invm(this); - }), - (o.prototype.redNeg = function () { - return i(this.red, 'redNeg works only with red numbers'), this.red._verify1(this), this.red.neg(this); - }), - (o.prototype.redPow = function (t) { - return i(this.red && !t.red, 'redPow(normalNum)'), this.red._verify1(this), this.red.pow(this, t); - }); - var w = { k256: null, p224: null, p192: null, p25519: null }; - function _(t, e) { - (this.name = t), - (this.p = new o(e, 16)), - (this.n = this.p.bitLength()), - (this.k = new o(1).iushln(this.n).isub(this.p)), - (this.tmp = this._tmp()); - } - function M() { - _.call(this, 'k256', 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f'); - } - function E() { - _.call(this, 'p224', 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001'); - } - function S() { - _.call(this, 'p192', 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff'); - } - function x() { - _.call(this, '25519', '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed'); - } - function A(t) { - if ('string' == typeof t) { - var e = o._prime(t); - (this.m = e.p), (this.prime = e); - } else i(t.gtn(1), 'modulus must be greater than 1'), (this.m = t), (this.prime = null); - } - function k(t) { - A.call(this, t), - (this.shift = this.m.bitLength()), - this.shift % 26 != 0 && (this.shift += 26 - (this.shift % 26)), - (this.r = new o(1).iushln(this.shift)), - (this.r2 = this.imod(this.r.sqr())), - (this.rinv = this.r._invmp(this.m)), - (this.minv = this.rinv.mul(this.r).isubn(1).div(this.m)), - (this.minv = this.minv.umod(this.r)), - (this.minv = this.r.sub(this.minv)); - } - (_.prototype._tmp = function () { - var t = new o(null); - return (t.words = new Array(Math.ceil(this.n / 13))), t; - }), - (_.prototype.ireduce = function (t) { - var e, - r = t; - do { - this.split(r, this.tmp), (e = (r = (r = this.imulK(r)).iadd(this.tmp)).bitLength()); - } while (e > this.n); - var i = e < this.n ? -1 : r.ucmp(this.p); - return 0 === i ? ((r.words[0] = 0), (r.length = 1)) : i > 0 ? r.isub(this.p) : void 0 !== r.strip ? r.strip() : r._strip(), r; - }), - (_.prototype.split = function (t, e) { - t.iushrn(this.n, 0, e); - }), - (_.prototype.imulK = function (t) { - return t.imul(this.k); - }), - n(M, _), - (M.prototype.split = function (t, e) { - for (var r = 4194303, i = Math.min(t.length, 9), n = 0; n < i; n++) e.words[n] = t.words[n]; - if (((e.length = i), t.length <= 9)) return (t.words[0] = 0), void (t.length = 1); - var o = t.words[9]; - for (e.words[e.length++] = o & r, n = 10; n < t.length; n++) { - var s = 0 | t.words[n]; - (t.words[n - 10] = ((s & r) << 4) | (o >>> 22)), (o = s); - } - (o >>>= 22), (t.words[n - 10] = o), 0 === o && t.length > 10 ? (t.length -= 10) : (t.length -= 9); - }), - (M.prototype.imulK = function (t) { - (t.words[t.length] = 0), (t.words[t.length + 1] = 0), (t.length += 2); - for (var e = 0, r = 0; r < t.length; r++) { - var i = 0 | t.words[r]; - (e += 977 * i), (t.words[r] = 67108863 & e), (e = 64 * i + ((e / 67108864) | 0)); - } - return 0 === t.words[t.length - 1] && (t.length--, 0 === t.words[t.length - 1] && t.length--), t; - }), - n(E, _), - n(S, _), - n(x, _), - (x.prototype.imulK = function (t) { - for (var e = 0, r = 0; r < t.length; r++) { - var i = 19 * (0 | t.words[r]) + e, - n = 67108863 & i; - (i >>>= 26), (t.words[r] = n), (e = i); - } - return 0 !== e && (t.words[t.length++] = e), t; - }), - (o._prime = function (t) { - if (w[t]) return w[t]; - var e; - if ('k256' === t) e = new M(); - else if ('p224' === t) e = new E(); - else if ('p192' === t) e = new S(); - else { - if ('p25519' !== t) throw new Error('Unknown prime ' + t); - e = new x(); - } - return (w[t] = e), e; - }), - (A.prototype._verify1 = function (t) { - i(0 === t.negative, 'red works only with positives'), i(t.red, 'red works only with red numbers'); - }), - (A.prototype._verify2 = function (t, e) { - i(0 == (t.negative | e.negative), 'red works only with positives'), - i(t.red && t.red === e.red, 'red works only with red numbers'); - }), - (A.prototype.imod = function (t) { - return this.prime ? this.prime.ireduce(t)._forceRed(this) : (f(t, t.umod(this.m)._forceRed(this)), t); - }), - (A.prototype.neg = function (t) { - return t.isZero() ? t.clone() : this.m.sub(t)._forceRed(this); - }), - (A.prototype.add = function (t, e) { - this._verify2(t, e); - var r = t.add(e); - return r.cmp(this.m) >= 0 && r.isub(this.m), r._forceRed(this); - }), - (A.prototype.iadd = function (t, e) { - this._verify2(t, e); - var r = t.iadd(e); - return r.cmp(this.m) >= 0 && r.isub(this.m), r; - }), - (A.prototype.sub = function (t, e) { - this._verify2(t, e); - var r = t.sub(e); - return r.cmpn(0) < 0 && r.iadd(this.m), r._forceRed(this); - }), - (A.prototype.isub = function (t, e) { - this._verify2(t, e); - var r = t.isub(e); - return r.cmpn(0) < 0 && r.iadd(this.m), r; - }), - (A.prototype.shl = function (t, e) { - return this._verify1(t), this.imod(t.ushln(e)); - }), - (A.prototype.imul = function (t, e) { - return this._verify2(t, e), this.imod(t.imul(e)); - }), - (A.prototype.mul = function (t, e) { - return this._verify2(t, e), this.imod(t.mul(e)); - }), - (A.prototype.isqr = function (t) { - return this.imul(t, t.clone()); - }), - (A.prototype.sqr = function (t) { - return this.mul(t, t); - }), - (A.prototype.sqrt = function (t) { - if (t.isZero()) return t.clone(); - var e = this.m.andln(3); - if ((i(e % 2 == 1), 3 === e)) { - var r = this.m.add(new o(1)).iushrn(2); - return this.pow(t, r); - } - for (var n = this.m.subn(1), s = 0; !n.isZero() && 0 === n.andln(1); ) s++, n.iushrn(1); - i(!n.isZero()); - var a = new o(1).toRed(this), - h = a.redNeg(), - u = this.m.subn(1).iushrn(1), - f = this.m.bitLength(); - for (f = new o(2 * f * f).toRed(this); 0 !== this.pow(f, u).cmp(h); ) f.redIAdd(h); - for (var c = this.pow(f, n), l = this.pow(t, n.addn(1).iushrn(1)), d = this.pow(t, n), p = s; 0 !== d.cmp(a); ) { - for (var m = d, g = 0; 0 !== m.cmp(a); g++) m = m.redSqr(); - i(g < p); - var b = this.pow(c, new o(1).iushln(p - g - 1)); - (l = l.redMul(b)), (c = b.redSqr()), (d = d.redMul(c)), (p = g); - } - return l; - }), - (A.prototype.invm = function (t) { - var e = t._invmp(this.m); - return 0 !== e.negative ? ((e.negative = 0), this.imod(e).redNeg()) : this.imod(e); - }), - (A.prototype.pow = function (t, e) { - if (e.isZero()) return new o(1).toRed(this); - if (0 === e.cmpn(1)) return t.clone(); - var r = new Array(16); - (r[0] = new o(1).toRed(this)), (r[1] = t); - for (var i = 2; i < r.length; i++) r[i] = this.mul(r[i - 1], t); - var n = r[0], - s = 0, - a = 0, - h = e.bitLength() % 26; - for (0 === h && (h = 26), i = e.length - 1; i >= 0; i--) { - for (var u = e.words[i], f = h - 1; f >= 0; f--) { - var c = (u >> f) & 1; - n !== r[0] && (n = this.sqr(n)), - 0 !== c || 0 !== s - ? ((s <<= 1), (s |= c), (4 == ++a || (0 === i && 0 === f)) && ((n = this.mul(n, r[s])), (a = 0), (s = 0))) - : (a = 0); - } - h = 26; - } - return n; - }), - (A.prototype.convertTo = function (t) { - var e = t.umod(this.m); - return e === t ? e.clone() : e; - }), - (A.prototype.convertFrom = function (t) { - var e = t.clone(); - return (e.red = null), e; - }), - (o.mont = function (t) { - return new k(t); - }), - n(k, A), - (k.prototype.convertTo = function (t) { - return this.imod(t.ushln(this.shift)); - }), - (k.prototype.convertFrom = function (t) { - var e = this.imod(t.mul(this.rinv)); - return (e.red = null), e; - }), - (k.prototype.imul = function (t, e) { - if (t.isZero() || e.isZero()) return (t.words[0] = 0), (t.length = 1), t; - var r = t.imul(e), - i = r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m), - n = r.isub(i).iushrn(this.shift), - o = n; - return n.cmp(this.m) >= 0 ? (o = n.isub(this.m)) : n.cmpn(0) < 0 && (o = n.iadd(this.m)), o._forceRed(this); - }), - (k.prototype.mul = function (t, e) { - if (t.isZero() || e.isZero()) return new o(0)._forceRed(this); - var r = t.mul(e), - i = r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m), - n = r.isub(i).iushrn(this.shift), - s = n; - return n.cmp(this.m) >= 0 ? (s = n.isub(this.m)) : n.cmpn(0) < 0 && (s = n.iadd(this.m)), s._forceRed(this); - }), - (k.prototype.invm = function (t) { - return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this); - }); - })((t = r.nmd(t)), this); - }, - 9154: (t, e, r) => { - var i; - function n(t) { - this.rand = t; - } - if ( - ((t.exports = function (t) { - return i || (i = new n(null)), i.generate(t); - }), - (t.exports.Rand = n), - (n.prototype.generate = function (t) { - return this._rand(t); - }), - (n.prototype._rand = function (t) { - if (this.rand.getBytes) return this.rand.getBytes(t); - for (var e = new Uint8Array(t), r = 0; r < e.length; r++) e[r] = this.rand.getByte(); - return e; - }), - 'object' == typeof self) - ) - self.crypto && self.crypto.getRandomValues - ? (n.prototype._rand = function (t) { - var e = new Uint8Array(t); - return self.crypto.getRandomValues(e), e; - }) - : self.msCrypto && self.msCrypto.getRandomValues - ? (n.prototype._rand = function (t) { - var e = new Uint8Array(t); - return self.msCrypto.getRandomValues(e), e; - }) - : 'object' == typeof window && - (n.prototype._rand = function () { - throw new Error('Not implemented yet'); - }); - else - try { - var o = r(6047); - if ('function' != typeof o.randomBytes) throw new Error('Not supported'); - n.prototype._rand = function (t) { - return o.randomBytes(t); - }; - } catch (t) {} - }, - 238: (t, e, r) => { - var i = r(7172).Buffer; - function n(t) { - i.isBuffer(t) || (t = i.from(t)); - for (var e = (t.length / 4) | 0, r = new Array(e), n = 0; n < e; n++) r[n] = t.readUInt32BE(4 * n); - return r; - } - function o(t) { - for (; 0 < t.length; t++) t[0] = 0; - } - function s(t, e, r, i, n) { - for ( - var o, - s, - a, - h, - u = r[0], - f = r[1], - c = r[2], - l = r[3], - d = t[0] ^ e[0], - p = t[1] ^ e[1], - m = t[2] ^ e[2], - g = t[3] ^ e[3], - b = 4, - y = 1; - y < n; - y++ - ) - (o = u[d >>> 24] ^ f[(p >>> 16) & 255] ^ c[(m >>> 8) & 255] ^ l[255 & g] ^ e[b++]), - (s = u[p >>> 24] ^ f[(m >>> 16) & 255] ^ c[(g >>> 8) & 255] ^ l[255 & d] ^ e[b++]), - (a = u[m >>> 24] ^ f[(g >>> 16) & 255] ^ c[(d >>> 8) & 255] ^ l[255 & p] ^ e[b++]), - (h = u[g >>> 24] ^ f[(d >>> 16) & 255] ^ c[(p >>> 8) & 255] ^ l[255 & m] ^ e[b++]), - (d = o), - (p = s), - (m = a), - (g = h); - return ( - (o = ((i[d >>> 24] << 24) | (i[(p >>> 16) & 255] << 16) | (i[(m >>> 8) & 255] << 8) | i[255 & g]) ^ e[b++]), - (s = ((i[p >>> 24] << 24) | (i[(m >>> 16) & 255] << 16) | (i[(g >>> 8) & 255] << 8) | i[255 & d]) ^ e[b++]), - (a = ((i[m >>> 24] << 24) | (i[(g >>> 16) & 255] << 16) | (i[(d >>> 8) & 255] << 8) | i[255 & p]) ^ e[b++]), - (h = ((i[g >>> 24] << 24) | (i[(d >>> 16) & 255] << 16) | (i[(p >>> 8) & 255] << 8) | i[255 & m]) ^ e[b++]), - [(o >>>= 0), (s >>>= 0), (a >>>= 0), (h >>>= 0)] - ); - } - var a = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54], - h = (function () { - for (var t = new Array(256), e = 0; e < 256; e++) t[e] = e < 128 ? e << 1 : (e << 1) ^ 283; - for (var r = [], i = [], n = [[], [], [], []], o = [[], [], [], []], s = 0, a = 0, h = 0; h < 256; ++h) { - var u = a ^ (a << 1) ^ (a << 2) ^ (a << 3) ^ (a << 4); - (u = (u >>> 8) ^ (255 & u) ^ 99), (r[s] = u), (i[u] = s); - var f = t[s], - c = t[f], - l = t[c], - d = (257 * t[u]) ^ (16843008 * u); - (n[0][s] = (d << 24) | (d >>> 8)), - (n[1][s] = (d << 16) | (d >>> 16)), - (n[2][s] = (d << 8) | (d >>> 24)), - (n[3][s] = d), - (d = (16843009 * l) ^ (65537 * c) ^ (257 * f) ^ (16843008 * s)), - (o[0][u] = (d << 24) | (d >>> 8)), - (o[1][u] = (d << 16) | (d >>> 16)), - (o[2][u] = (d << 8) | (d >>> 24)), - (o[3][u] = d), - 0 === s ? (s = a = 1) : ((s = f ^ t[t[t[l ^ f]]]), (a ^= t[t[a]])); - } - return { SBOX: r, INV_SBOX: i, SUB_MIX: n, INV_SUB_MIX: o }; - })(); - function u(t) { - (this._key = n(t)), this._reset(); - } - (u.blockSize = 16), - (u.keySize = 32), - (u.prototype.blockSize = u.blockSize), - (u.prototype.keySize = u.keySize), - (u.prototype._reset = function () { - for (var t = this._key, e = t.length, r = e + 6, i = 4 * (r + 1), n = [], o = 0; o < e; o++) n[o] = t[o]; - for (o = e; o < i; o++) { - var s = n[o - 1]; - o % e == 0 - ? ((s = (s << 8) | (s >>> 24)), - (s = (h.SBOX[s >>> 24] << 24) | (h.SBOX[(s >>> 16) & 255] << 16) | (h.SBOX[(s >>> 8) & 255] << 8) | h.SBOX[255 & s]), - (s ^= a[(o / e) | 0] << 24)) - : e > 6 && - o % e == 4 && - (s = (h.SBOX[s >>> 24] << 24) | (h.SBOX[(s >>> 16) & 255] << 16) | (h.SBOX[(s >>> 8) & 255] << 8) | h.SBOX[255 & s]), - (n[o] = n[o - e] ^ s); - } - for (var u = [], f = 0; f < i; f++) { - var c = i - f, - l = n[c - (f % 4 ? 0 : 4)]; - u[f] = - f < 4 || c <= 4 - ? l - : h.INV_SUB_MIX[0][h.SBOX[l >>> 24]] ^ - h.INV_SUB_MIX[1][h.SBOX[(l >>> 16) & 255]] ^ - h.INV_SUB_MIX[2][h.SBOX[(l >>> 8) & 255]] ^ - h.INV_SUB_MIX[3][h.SBOX[255 & l]]; - } - (this._nRounds = r), (this._keySchedule = n), (this._invKeySchedule = u); - }), - (u.prototype.encryptBlockRaw = function (t) { - return s((t = n(t)), this._keySchedule, h.SUB_MIX, h.SBOX, this._nRounds); - }), - (u.prototype.encryptBlock = function (t) { - var e = this.encryptBlockRaw(t), - r = i.allocUnsafe(16); - return r.writeUInt32BE(e[0], 0), r.writeUInt32BE(e[1], 4), r.writeUInt32BE(e[2], 8), r.writeUInt32BE(e[3], 12), r; - }), - (u.prototype.decryptBlock = function (t) { - var e = (t = n(t))[1]; - (t[1] = t[3]), (t[3] = e); - var r = s(t, this._invKeySchedule, h.INV_SUB_MIX, h.INV_SBOX, this._nRounds), - o = i.allocUnsafe(16); - return o.writeUInt32BE(r[0], 0), o.writeUInt32BE(r[3], 4), o.writeUInt32BE(r[2], 8), o.writeUInt32BE(r[1], 12), o; - }), - (u.prototype.scrub = function () { - o(this._keySchedule), o(this._invKeySchedule), o(this._key); - }), - (t.exports.AES = u); - }, - 8587: (t, e, r) => { - var i = r(238), - n = r(7172).Buffer, - o = r(3081), - s = r(87), - a = r(1219), - h = r(7752), - u = r(3480); - function f(t, e, r, s) { - o.call(this); - var h = n.alloc(4, 0); - this._cipher = new i.AES(e); - var f = this._cipher.encryptBlock(h); - (this._ghash = new a(f)), - (r = (function (t, e, r) { - if (12 === e.length) return (t._finID = n.concat([e, n.from([0, 0, 0, 1])])), n.concat([e, n.from([0, 0, 0, 2])]); - var i = new a(r), - o = e.length, - s = o % 16; - i.update(e), s && ((s = 16 - s), i.update(n.alloc(s, 0))), i.update(n.alloc(8, 0)); - var h = 8 * o, - f = n.alloc(8); - f.writeUIntBE(h, 0, 8), i.update(f), (t._finID = i.state); - var c = n.from(t._finID); - return u(c), c; - })(this, r, f)), - (this._prev = n.from(r)), - (this._cache = n.allocUnsafe(0)), - (this._secCache = n.allocUnsafe(0)), - (this._decrypt = s), - (this._alen = 0), - (this._len = 0), - (this._mode = t), - (this._authTag = null), - (this._called = !1); - } - s(f, o), - (f.prototype._update = function (t) { - if (!this._called && this._alen) { - var e = 16 - (this._alen % 16); - e < 16 && ((e = n.alloc(e, 0)), this._ghash.update(e)); - } - this._called = !0; - var r = this._mode.encrypt(this, t); - return this._decrypt ? this._ghash.update(t) : this._ghash.update(r), (this._len += t.length), r; - }), - (f.prototype._final = function () { - if (this._decrypt && !this._authTag) throw new Error('Unsupported state or unable to authenticate data'); - var t = h(this._ghash.final(8 * this._alen, 8 * this._len), this._cipher.encryptBlock(this._finID)); - if ( - this._decrypt && - (function (t, e) { - var r = 0; - t.length !== e.length && r++; - for (var i = Math.min(t.length, e.length), n = 0; n < i; ++n) r += t[n] ^ e[n]; - return r; - })(t, this._authTag) - ) - throw new Error('Unsupported state or unable to authenticate data'); - (this._authTag = t), this._cipher.scrub(); - }), - (f.prototype.getAuthTag = function () { - if (this._decrypt || !n.isBuffer(this._authTag)) throw new Error('Attempting to get auth tag in unsupported state'); - return this._authTag; - }), - (f.prototype.setAuthTag = function (t) { - if (!this._decrypt) throw new Error('Attempting to set auth tag in unsupported state'); - this._authTag = t; - }), - (f.prototype.setAAD = function (t) { - if (this._called) throw new Error('Attempting to set AAD in unsupported state'); - this._ghash.update(t), (this._alen += t.length); - }), - (t.exports = f); - }, - 8901: (t, e, r) => { - var i = r(3615), - n = r(2576), - o = r(4636); - (e.createCipher = e.Cipher = i.createCipher), - (e.createCipheriv = e.Cipheriv = i.createCipheriv), - (e.createDecipher = e.Decipher = n.createDecipher), - (e.createDecipheriv = e.Decipheriv = n.createDecipheriv), - (e.listCiphers = e.getCiphers = - function () { - return Object.keys(o); - }); - }, - 2576: (t, e, r) => { - var i = r(8587), - n = r(7172).Buffer, - o = r(3834), - s = r(2385), - a = r(3081), - h = r(238), - u = r(5883); - function f(t, e, r) { - a.call(this), - (this._cache = new c()), - (this._last = void 0), - (this._cipher = new h.AES(e)), - (this._prev = n.from(r)), - (this._mode = t), - (this._autopadding = !0); - } - function c() { - this.cache = n.allocUnsafe(0); - } - function l(t, e, r) { - var a = o[t.toLowerCase()]; - if (!a) throw new TypeError('invalid suite type'); - if (('string' == typeof r && (r = n.from(r)), 'GCM' !== a.mode && r.length !== a.iv)) - throw new TypeError('invalid iv length ' + r.length); - if (('string' == typeof e && (e = n.from(e)), e.length !== a.key / 8)) throw new TypeError('invalid key length ' + e.length); - return 'stream' === a.type ? new s(a.module, e, r, !0) : 'auth' === a.type ? new i(a.module, e, r, !0) : new f(a.module, e, r); - } - r(87)(f, a), - (f.prototype._update = function (t) { - var e, r; - this._cache.add(t); - for (var i = []; (e = this._cache.get(this._autopadding)); ) (r = this._mode.decrypt(this, e)), i.push(r); - return n.concat(i); - }), - (f.prototype._final = function () { - var t = this._cache.flush(); - if (this._autopadding) - return (function (t) { - var e = t[15]; - if (e < 1 || e > 16) throw new Error('unable to decrypt data'); - for (var r = -1; ++r < e; ) if (t[r + (16 - e)] !== e) throw new Error('unable to decrypt data'); - if (16 !== e) return t.slice(0, 16 - e); - })(this._mode.decrypt(this, t)); - if (t) throw new Error('data not multiple of block length'); - }), - (f.prototype.setAutoPadding = function (t) { - return (this._autopadding = !!t), this; - }), - (c.prototype.add = function (t) { - this.cache = n.concat([this.cache, t]); - }), - (c.prototype.get = function (t) { - var e; - if (t) { - if (this.cache.length > 16) return (e = this.cache.slice(0, 16)), (this.cache = this.cache.slice(16)), e; - } else if (this.cache.length >= 16) return (e = this.cache.slice(0, 16)), (this.cache = this.cache.slice(16)), e; - return null; - }), - (c.prototype.flush = function () { - if (this.cache.length) return this.cache; - }), - (e.createDecipher = function (t, e) { - var r = o[t.toLowerCase()]; - if (!r) throw new TypeError('invalid suite type'); - var i = u(e, !1, r.key, r.iv); - return l(t, i.key, i.iv); - }), - (e.createDecipheriv = l); - }, - 3615: (t, e, r) => { - var i = r(3834), - n = r(8587), - o = r(7172).Buffer, - s = r(2385), - a = r(3081), - h = r(238), - u = r(5883); - function f(t, e, r) { - a.call(this), - (this._cache = new l()), - (this._cipher = new h.AES(e)), - (this._prev = o.from(r)), - (this._mode = t), - (this._autopadding = !0); - } - r(87)(f, a), - (f.prototype._update = function (t) { - var e, r; - this._cache.add(t); - for (var i = []; (e = this._cache.get()); ) (r = this._mode.encrypt(this, e)), i.push(r); - return o.concat(i); - }); - var c = o.alloc(16, 16); - function l() { - this.cache = o.allocUnsafe(0); - } - function d(t, e, r) { - var a = i[t.toLowerCase()]; - if (!a) throw new TypeError('invalid suite type'); - if (('string' == typeof e && (e = o.from(e)), e.length !== a.key / 8)) throw new TypeError('invalid key length ' + e.length); - if (('string' == typeof r && (r = o.from(r)), 'GCM' !== a.mode && r.length !== a.iv)) - throw new TypeError('invalid iv length ' + r.length); - return 'stream' === a.type ? new s(a.module, e, r) : 'auth' === a.type ? new n(a.module, e, r) : new f(a.module, e, r); - } - (f.prototype._final = function () { - var t = this._cache.flush(); - if (this._autopadding) return (t = this._mode.encrypt(this, t)), this._cipher.scrub(), t; - if (!t.equals(c)) throw (this._cipher.scrub(), new Error('data not multiple of block length')); - }), - (f.prototype.setAutoPadding = function (t) { - return (this._autopadding = !!t), this; - }), - (l.prototype.add = function (t) { - this.cache = o.concat([this.cache, t]); - }), - (l.prototype.get = function () { - if (this.cache.length > 15) { - var t = this.cache.slice(0, 16); - return (this.cache = this.cache.slice(16)), t; - } - return null; - }), - (l.prototype.flush = function () { - for (var t = 16 - this.cache.length, e = o.allocUnsafe(t), r = -1; ++r < t; ) e.writeUInt8(t, r); - return o.concat([this.cache, e]); - }), - (e.createCipheriv = d), - (e.createCipher = function (t, e) { - var r = i[t.toLowerCase()]; - if (!r) throw new TypeError('invalid suite type'); - var n = u(e, !1, r.key, r.iv); - return d(t, n.key, n.iv); - }); - }, - 1219: (t, e, r) => { - var i = r(7172).Buffer, - n = i.alloc(16, 0); - function o(t) { - var e = i.allocUnsafe(16); - return ( - e.writeUInt32BE(t[0] >>> 0, 0), - e.writeUInt32BE(t[1] >>> 0, 4), - e.writeUInt32BE(t[2] >>> 0, 8), - e.writeUInt32BE(t[3] >>> 0, 12), - e - ); - } - function s(t) { - (this.h = t), (this.state = i.alloc(16, 0)), (this.cache = i.allocUnsafe(0)); - } - (s.prototype.ghash = function (t) { - for (var e = -1; ++e < t.length; ) this.state[e] ^= t[e]; - this._multiply(); - }), - (s.prototype._multiply = function () { - for ( - var t, - e, - r, - i = [(t = this.h).readUInt32BE(0), t.readUInt32BE(4), t.readUInt32BE(8), t.readUInt32BE(12)], - n = [0, 0, 0, 0], - s = -1; - ++s < 128; - - ) { - for ( - 0 != (this.state[~~(s / 8)] & (1 << (7 - (s % 8)))) && ((n[0] ^= i[0]), (n[1] ^= i[1]), (n[2] ^= i[2]), (n[3] ^= i[3])), - r = 0 != (1 & i[3]), - e = 3; - e > 0; - e-- - ) - i[e] = (i[e] >>> 1) | ((1 & i[e - 1]) << 31); - (i[0] = i[0] >>> 1), r && (i[0] = i[0] ^ (225 << 24)); - } - this.state = o(n); - }), - (s.prototype.update = function (t) { - var e; - for (this.cache = i.concat([this.cache, t]); this.cache.length >= 16; ) - (e = this.cache.slice(0, 16)), (this.cache = this.cache.slice(16)), this.ghash(e); - }), - (s.prototype.final = function (t, e) { - return this.cache.length && this.ghash(i.concat([this.cache, n], 16)), this.ghash(o([0, t, 0, e])), this.state; - }), - (t.exports = s); - }, - 3480: t => { - t.exports = function (t) { - for (var e, r = t.length; r--; ) { - if (255 !== (e = t.readUInt8(r))) { - e++, t.writeUInt8(e, r); - break; - } - t.writeUInt8(0, r); - } - }; - }, - 6280: (t, e, r) => { - var i = r(7752); - (e.encrypt = function (t, e) { - var r = i(e, t._prev); - return (t._prev = t._cipher.encryptBlock(r)), t._prev; - }), - (e.decrypt = function (t, e) { - var r = t._prev; - t._prev = e; - var n = t._cipher.decryptBlock(e); - return i(n, r); - }); - }, - 392: (t, e, r) => { - var i = r(7172).Buffer, - n = r(7752); - function o(t, e, r) { - var o = e.length, - s = n(e, t._cache); - return (t._cache = t._cache.slice(o)), (t._prev = i.concat([t._prev, r ? e : s])), s; - } - e.encrypt = function (t, e, r) { - for (var n, s = i.allocUnsafe(0); e.length; ) { - if ( - (0 === t._cache.length && ((t._cache = t._cipher.encryptBlock(t._prev)), (t._prev = i.allocUnsafe(0))), - !(t._cache.length <= e.length)) - ) { - s = i.concat([s, o(t, e, r)]); - break; - } - (n = t._cache.length), (s = i.concat([s, o(t, e.slice(0, n), r)])), (e = e.slice(n)); - } - return s; - }; - }, - 5739: (t, e, r) => { - var i = r(7172).Buffer; - function n(t, e, r) { - for (var i, n, s = -1, a = 0; ++s < 8; ) - (i = e & (1 << (7 - s)) ? 128 : 0), - (a += (128 & (n = t._cipher.encryptBlock(t._prev)[0] ^ i)) >> s % 8), - (t._prev = o(t._prev, r ? i : n)); - return a; - } - function o(t, e) { - var r = t.length, - n = -1, - o = i.allocUnsafe(t.length); - for (t = i.concat([t, i.from([e])]); ++n < r; ) o[n] = (t[n] << 1) | (t[n + 1] >> 7); - return o; - } - e.encrypt = function (t, e, r) { - for (var o = e.length, s = i.allocUnsafe(o), a = -1; ++a < o; ) s[a] = n(t, e[a], r); - return s; - }; - }, - 2228: (t, e, r) => { - var i = r(7172).Buffer; - function n(t, e, r) { - var n = t._cipher.encryptBlock(t._prev)[0] ^ e; - return (t._prev = i.concat([t._prev.slice(1), i.from([r ? e : n])])), n; - } - e.encrypt = function (t, e, r) { - for (var o = e.length, s = i.allocUnsafe(o), a = -1; ++a < o; ) s[a] = n(t, e[a], r); - return s; - }; - }, - 2751: (t, e, r) => { - var i = r(7752), - n = r(7172).Buffer, - o = r(3480); - function s(t) { - var e = t._cipher.encryptBlockRaw(t._prev); - return o(t._prev), e; - } - e.encrypt = function (t, e) { - var r = Math.ceil(e.length / 16), - o = t._cache.length; - t._cache = n.concat([t._cache, n.allocUnsafe(16 * r)]); - for (var a = 0; a < r; a++) { - var h = s(t), - u = o + 16 * a; - t._cache.writeUInt32BE(h[0], u + 0), - t._cache.writeUInt32BE(h[1], u + 4), - t._cache.writeUInt32BE(h[2], u + 8), - t._cache.writeUInt32BE(h[3], u + 12); - } - var f = t._cache.slice(0, e.length); - return (t._cache = t._cache.slice(e.length)), i(e, f); - }; - }, - 2437: (t, e) => { - (e.encrypt = function (t, e) { - return t._cipher.encryptBlock(e); - }), - (e.decrypt = function (t, e) { - return t._cipher.decryptBlock(e); - }); - }, - 3834: (t, e, r) => { - var i = { ECB: r(2437), CBC: r(6280), CFB: r(392), CFB8: r(2228), CFB1: r(5739), OFB: r(8494), CTR: r(2751), GCM: r(2751) }, - n = r(4636); - for (var o in n) n[o].module = i[n[o].mode]; - t.exports = n; - }, - 8494: (t, e, r) => { - var i = r(7752); - function n(t) { - return (t._prev = t._cipher.encryptBlock(t._prev)), t._prev; - } - e.encrypt = function (t, e) { - for (; t._cache.length < e.length; ) t._cache = Buffer.concat([t._cache, n(t)]); - var r = t._cache.slice(0, e.length); - return (t._cache = t._cache.slice(e.length)), i(e, r); - }; - }, - 2385: (t, e, r) => { - var i = r(238), - n = r(7172).Buffer, - o = r(3081); - function s(t, e, r, s) { - o.call(this), - (this._cipher = new i.AES(e)), - (this._prev = n.from(r)), - (this._cache = n.allocUnsafe(0)), - (this._secCache = n.allocUnsafe(0)), - (this._decrypt = s), - (this._mode = t); - } - r(87)(s, o), - (s.prototype._update = function (t) { - return this._mode.encrypt(this, t, this._decrypt); - }), - (s.prototype._final = function () { - this._cipher.scrub(); - }), - (t.exports = s); - }, - 1240: (t, e, r) => { - var i = r(5681), - n = r(8901), - o = r(3834), - s = r(1035), - a = r(5883); - function h(t, e, r) { - if (((t = t.toLowerCase()), o[t])) return n.createCipheriv(t, e, r); - if (s[t]) return new i({ key: e, iv: r, mode: t }); - throw new TypeError('invalid suite type'); - } - function u(t, e, r) { - if (((t = t.toLowerCase()), o[t])) return n.createDecipheriv(t, e, r); - if (s[t]) return new i({ key: e, iv: r, mode: t, decrypt: !0 }); - throw new TypeError('invalid suite type'); - } - (e.createCipher = e.Cipher = - function (t, e) { - var r, i; - if (((t = t.toLowerCase()), o[t])) (r = o[t].key), (i = o[t].iv); - else { - if (!s[t]) throw new TypeError('invalid suite type'); - (r = 8 * s[t].key), (i = s[t].iv); - } - var n = a(e, !1, r, i); - return h(t, n.key, n.iv); - }), - (e.createCipheriv = e.Cipheriv = h), - (e.createDecipher = e.Decipher = - function (t, e) { - var r, i; - if (((t = t.toLowerCase()), o[t])) (r = o[t].key), (i = o[t].iv); - else { - if (!s[t]) throw new TypeError('invalid suite type'); - (r = 8 * s[t].key), (i = s[t].iv); - } - var n = a(e, !1, r, i); - return u(t, n.key, n.iv); - }), - (e.createDecipheriv = e.Decipheriv = u), - (e.listCiphers = e.getCiphers = - function () { - return Object.keys(s).concat(n.getCiphers()); - }); - }, - 5681: (t, e, r) => { - var i = r(3081), - n = r(7191), - o = r(87), - s = r(7172).Buffer, - a = { - 'des-ede3-cbc': n.CBC.instantiate(n.EDE), - 'des-ede3': n.EDE, - 'des-ede-cbc': n.CBC.instantiate(n.EDE), - 'des-ede': n.EDE, - 'des-cbc': n.CBC.instantiate(n.DES), - 'des-ecb': n.DES, - }; - function h(t) { - i.call(this); - var e, - r = t.mode.toLowerCase(), - n = a[r]; - e = t.decrypt ? 'decrypt' : 'encrypt'; - var o = t.key; - s.isBuffer(o) || (o = s.from(o)), ('des-ede' !== r && 'des-ede-cbc' !== r) || (o = s.concat([o, o.slice(0, 8)])); - var h = t.iv; - s.isBuffer(h) || (h = s.from(h)), (this._des = n.create({ key: o, iv: h, type: e })); - } - (a.des = a['des-cbc']), - (a.des3 = a['des-ede3-cbc']), - (t.exports = h), - o(h, i), - (h.prototype._update = function (t) { - return s.from(this._des.update(t)); - }), - (h.prototype._final = function () { - return s.from(this._des.final()); - }); - }, - 1035: (t, e) => { - (e['des-ecb'] = { key: 8, iv: 0 }), - (e['des-cbc'] = e.des = { key: 8, iv: 8 }), - (e['des-ede3-cbc'] = e.des3 = { key: 24, iv: 8 }), - (e['des-ede3'] = { key: 24, iv: 0 }), - (e['des-ede-cbc'] = { key: 16, iv: 8 }), - (e['des-ede'] = { key: 16, iv: 0 }); - }, - 7354: (t, e, r) => { - var i = r(3785), - n = r(4198); - function o(t) { - var e, - r = t.modulus.byteLength(); - do { - e = new i(n(r)); - } while (e.cmp(t.modulus) >= 0 || !e.umod(t.prime1) || !e.umod(t.prime2)); - return e; - } - function s(t, e) { - var r = (function (t) { - var e = o(t); - return { blinder: e.toRed(i.mont(t.modulus)).redPow(new i(t.publicExponent)).fromRed(), unblinder: e.invm(t.modulus) }; - })(e), - n = e.modulus.byteLength(), - s = new i(t).mul(r.blinder).umod(e.modulus), - a = s.toRed(i.mont(e.prime1)), - h = s.toRed(i.mont(e.prime2)), - u = e.coefficient, - f = e.prime1, - c = e.prime2, - l = a.redPow(e.exponent1).fromRed(), - d = h.redPow(e.exponent2).fromRed(), - p = l.isub(d).imul(u).umod(f).imul(c); - return d.iadd(p).imul(r.unblinder).umod(e.modulus).toArrayLike(Buffer, 'be', n); - } - (s.getr = o), (t.exports = s); - }, - 4905: (t, e, r) => { - t.exports = r(7536); - }, - 7545: (t, e, r) => { - var i = r(7172).Buffer, - n = r(7266), - o = r(9649), - s = r(87), - a = r(1528), - h = r(1566), - u = r(7536); - function f(t) { - o.Writable.call(this); - var e = u[t]; - if (!e) throw new Error('Unknown message digest'); - (this._hashType = e.hash), (this._hash = n(e.hash)), (this._tag = e.id), (this._signType = e.sign); - } - function c(t) { - o.Writable.call(this); - var e = u[t]; - if (!e) throw new Error('Unknown message digest'); - (this._hash = n(e.hash)), (this._tag = e.id), (this._signType = e.sign); - } - function l(t) { - return new f(t); - } - function d(t) { - return new c(t); - } - Object.keys(u).forEach(function (t) { - (u[t].id = i.from(u[t].id, 'hex')), (u[t.toLowerCase()] = u[t]); - }), - s(f, o.Writable), - (f.prototype._write = function (t, e, r) { - this._hash.update(t), r(); - }), - (f.prototype.update = function (t, e) { - return 'string' == typeof t && (t = i.from(t, e)), this._hash.update(t), this; - }), - (f.prototype.sign = function (t, e) { - this.end(); - var r = this._hash.digest(), - i = a(r, t, this._hashType, this._signType, this._tag); - return e ? i.toString(e) : i; - }), - s(c, o.Writable), - (c.prototype._write = function (t, e, r) { - this._hash.update(t), r(); - }), - (c.prototype.update = function (t, e) { - return 'string' == typeof t && (t = i.from(t, e)), this._hash.update(t), this; - }), - (c.prototype.verify = function (t, e, r) { - 'string' == typeof e && (e = i.from(e, r)), this.end(); - var n = this._hash.digest(); - return h(e, n, t, this._signType, this._tag); - }), - (t.exports = { Sign: l, Verify: d, createSign: l, createVerify: d }); - }, - 1528: (t, e, r) => { - var i = r(7172).Buffer, - n = r(2873), - o = r(7354), - s = r(9749).ec, - a = r(3785), - h = r(1463), - u = r(7330); - function f(t, e, r, o) { - if ((t = i.from(t.toArray())).length < e.byteLength()) { - var s = i.alloc(e.byteLength() - t.length); - t = i.concat([s, t]); - } - var a = r.length, - h = (function (t, e) { - t = (t = c(t, e)).mod(e); - var r = i.from(t.toArray()); - if (r.length < e.byteLength()) { - var n = i.alloc(e.byteLength() - r.length); - r = i.concat([n, r]); - } - return r; - })(r, e), - u = i.alloc(a); - u.fill(1); - var f = i.alloc(a); - return ( - (f = n(o, f) - .update(u) - .update(i.from([0])) - .update(t) - .update(h) - .digest()), - (u = n(o, f).update(u).digest()), - { - k: (f = n(o, f) - .update(u) - .update(i.from([1])) - .update(t) - .update(h) - .digest()), - v: (u = n(o, f).update(u).digest()), - } - ); - } - function c(t, e) { - var r = new a(t), - i = (t.length << 3) - e.bitLength(); - return i > 0 && r.ishrn(i), r; - } - function l(t, e, r) { - var o, s; - do { - for (o = i.alloc(0); 8 * o.length < t.bitLength(); ) (e.v = n(r, e.k).update(e.v).digest()), (o = i.concat([o, e.v])); - (s = c(o, t)), - (e.k = n(r, e.k) - .update(e.v) - .update(i.from([0])) - .digest()), - (e.v = n(r, e.k).update(e.v).digest()); - } while (-1 !== s.cmp(t)); - return s; - } - function d(t, e, r, i) { - return t.toRed(a.mont(r)).redPow(e).fromRed().mod(i); - } - (t.exports = function (t, e, r, n, p) { - var m = h(e); - if (m.curve) { - if ('ecdsa' !== n && 'ecdsa/rsa' !== n) throw new Error('wrong private key type'); - return (function (t, e) { - var r = u[e.curve.join('.')]; - if (!r) throw new Error('unknown curve ' + e.curve.join('.')); - var n = new s(r).keyFromPrivate(e.privateKey).sign(t); - return i.from(n.toDER()); - })(t, m); - } - if ('dsa' === m.type) { - if ('dsa' !== n) throw new Error('wrong private key type'); - return (function (t, e, r) { - for ( - var n, - o = e.params.priv_key, - s = e.params.p, - h = e.params.q, - u = e.params.g, - p = new a(0), - m = c(t, h).mod(h), - g = !1, - b = f(o, h, t, r); - !1 === g; - - ) - (p = d(u, (n = l(h, b, r)), s, h)), - 0 === - (g = n - .invm(h) - .imul(m.add(o.mul(p))) - .mod(h)).cmpn(0) && ((g = !1), (p = new a(0))); - return (function (t, e) { - (t = t.toArray()), (e = e.toArray()), 128 & t[0] && (t = [0].concat(t)), 128 & e[0] && (e = [0].concat(e)); - var r = [48, t.length + e.length + 4, 2, t.length]; - return (r = r.concat(t, [2, e.length], e)), i.from(r); - })(p, g); - })(t, m, r); - } - if ('rsa' !== n && 'ecdsa/rsa' !== n) throw new Error('wrong private key type'); - t = i.concat([p, t]); - for (var g = m.modulus.byteLength(), b = [0, 1]; t.length + b.length + 1 < g; ) b.push(255); - b.push(0); - for (var y = -1; ++y < t.length; ) b.push(t[y]); - return o(b, m); - }), - (t.exports.getKey = f), - (t.exports.makeKey = l); - }, - 1566: (t, e, r) => { - var i = r(7172).Buffer, - n = r(3785), - o = r(9749).ec, - s = r(1463), - a = r(7330); - function h(t, e) { - if (t.cmpn(0) <= 0) throw new Error('invalid sig'); - if (t.cmp(e) >= e) throw new Error('invalid sig'); - } - t.exports = function (t, e, r, u, f) { - var c = s(r); - if ('ec' === c.type) { - if ('ecdsa' !== u && 'ecdsa/rsa' !== u) throw new Error('wrong public key type'); - return (function (t, e, r) { - var i = a[r.data.algorithm.curve.join('.')]; - if (!i) throw new Error('unknown curve ' + r.data.algorithm.curve.join('.')); - var n = new o(i), - s = r.data.subjectPrivateKey.data; - return n.verify(e, t, s); - })(t, e, c); - } - if ('dsa' === c.type) { - if ('dsa' !== u) throw new Error('wrong public key type'); - return (function (t, e, r) { - var i = r.data.p, - o = r.data.q, - a = r.data.g, - u = r.data.pub_key, - f = s.signature.decode(t, 'der'), - c = f.s, - l = f.r; - h(c, o), h(l, o); - var d = n.mont(i), - p = c.invm(o); - return ( - 0 === - a - .toRed(d) - .redPow(new n(e).mul(p).mod(o)) - .fromRed() - .mul(u.toRed(d).redPow(l.mul(p).mod(o)).fromRed()) - .mod(i) - .mod(o) - .cmp(l) - ); - })(t, e, c); - } - if ('rsa' !== u && 'ecdsa/rsa' !== u) throw new Error('wrong public key type'); - e = i.concat([f, e]); - for (var l = c.modulus.byteLength(), d = [1], p = 0; e.length + d.length + 2 < l; ) d.push(255), p++; - d.push(0); - for (var m = -1; ++m < e.length; ) d.push(e[m]); - d = i.from(d); - var g = n.mont(c.modulus); - (t = (t = new n(t).toRed(g)).redPow(new n(c.publicExponent))), (t = i.from(t.fromRed().toArray())); - var b = p < 8 ? 1 : 0; - for (l = Math.min(t.length, d.length), t.length !== d.length && (b = 1), m = -1; ++m < l; ) b |= t[m] ^ d[m]; - return 0 === b; - }; - }, - 6244: t => { - 'use strict'; - var e = {}; - function r(t, r, i) { - i || (i = Error); - var n = (function (t) { - var e, i; - function n(e, i, n) { - return ( - t.call( - this, - (function (t, e, i) { - return 'string' == typeof r ? r : r(t, e, i); - })(e, i, n) - ) || this - ); - } - return (i = t), ((e = n).prototype = Object.create(i.prototype)), (e.prototype.constructor = e), (e.__proto__ = i), n; - })(i); - (n.prototype.name = i.name), (n.prototype.code = t), (e[t] = n); - } - function i(t, e) { - if (Array.isArray(t)) { - var r = t.length; - return ( - (t = t.map(function (t) { - return String(t); - })), - r > 2 - ? 'one of '.concat(e, ' ').concat(t.slice(0, r - 1).join(', '), ', or ') + t[r - 1] - : 2 === r - ? 'one of '.concat(e, ' ').concat(t[0], ' or ').concat(t[1]) - : 'of '.concat(e, ' ').concat(t[0]) - ); - } - return 'of '.concat(e, ' ').concat(String(t)); - } - r( - 'ERR_INVALID_OPT_VALUE', - function (t, e) { - return 'The value "' + e + '" is invalid for option "' + t + '"'; - }, - TypeError - ), - r( - 'ERR_INVALID_ARG_TYPE', - function (t, e, r) { - var n, o, s, a, h; - if ( - ('string' == typeof e && ((o = 'not '), e.substr(0, 4) === o) - ? ((n = 'must not be'), (e = e.replace(/^not /, ''))) - : (n = 'must be'), - (function (t, e, r) { - return (void 0 === r || r > t.length) && (r = t.length), t.substring(r - 9, r) === e; - })(t, ' argument')) - ) - s = 'The '.concat(t, ' ').concat(n, ' ').concat(i(e, 'type')); - else { - var u = ('number' != typeof h && (h = 0), h + 1 > (a = t).length || -1 === a.indexOf('.', h) ? 'argument' : 'property'); - s = 'The "'.concat(t, '" ').concat(u, ' ').concat(n, ' ').concat(i(e, 'type')); - } - return s + '. Received type '.concat(typeof r); - }, - TypeError - ), - r('ERR_STREAM_PUSH_AFTER_EOF', 'stream.push() after EOF'), - r('ERR_METHOD_NOT_IMPLEMENTED', function (t) { - return 'The ' + t + ' method is not implemented'; - }), - r('ERR_STREAM_PREMATURE_CLOSE', 'Premature close'), - r('ERR_STREAM_DESTROYED', function (t) { - return 'Cannot call ' + t + ' after a stream was destroyed'; - }), - r('ERR_MULTIPLE_CALLBACK', 'Callback called multiple times'), - r('ERR_STREAM_CANNOT_PIPE', 'Cannot pipe, not readable'), - r('ERR_STREAM_WRITE_AFTER_END', 'write after end'), - r('ERR_STREAM_NULL_VALUES', 'May not write null values to stream', TypeError), - r( - 'ERR_UNKNOWN_ENCODING', - function (t) { - return 'Unknown encoding: ' + t; - }, - TypeError - ), - r('ERR_STREAM_UNSHIFT_AFTER_END_EVENT', 'stream.unshift() after end event'), - (t.exports.q = e); - }, - 1278: (t, e, r) => { - 'use strict'; - var i = - Object.keys || - function (t) { - var e = []; - for (var r in t) e.push(r); - return e; - }; - t.exports = u; - var n = r(4581), - o = r(3); - r(87)(u, n); - for (var s = i(o.prototype), a = 0; a < s.length; a++) { - var h = s[a]; - u.prototype[h] || (u.prototype[h] = o.prototype[h]); - } - function u(t) { - if (!(this instanceof u)) return new u(t); - n.call(this, t), - o.call(this, t), - (this.allowHalfOpen = !0), - t && - (!1 === t.readable && (this.readable = !1), - !1 === t.writable && (this.writable = !1), - !1 === t.allowHalfOpen && ((this.allowHalfOpen = !1), this.once('end', f))); - } - function f() { - this._writableState.ended || process.nextTick(c, this); - } - function c(t) { - t.end(); - } - Object.defineProperty(u.prototype, 'writableHighWaterMark', { - enumerable: !1, - get: function () { - return this._writableState.highWaterMark; - }, - }), - Object.defineProperty(u.prototype, 'writableBuffer', { - enumerable: !1, - get: function () { - return this._writableState && this._writableState.getBuffer(); - }, - }), - Object.defineProperty(u.prototype, 'writableLength', { - enumerable: !1, - get: function () { - return this._writableState.length; - }, - }), - Object.defineProperty(u.prototype, 'destroyed', { - enumerable: !1, - get: function () { - return ( - void 0 !== this._readableState && - void 0 !== this._writableState && - this._readableState.destroyed && - this._writableState.destroyed - ); - }, - set: function (t) { - void 0 !== this._readableState && - void 0 !== this._writableState && - ((this._readableState.destroyed = t), (this._writableState.destroyed = t)); - }, - }); - }, - 8825: (t, e, r) => { - 'use strict'; - t.exports = n; - var i = r(8133); - function n(t) { - if (!(this instanceof n)) return new n(t); - i.call(this, t); - } - r(87)(n, i), - (n.prototype._transform = function (t, e, r) { - r(null, t); - }); - }, - 4581: (t, e, r) => { - 'use strict'; - var i; - (t.exports = S), (S.ReadableState = E), r(343).EventEmitter; - var n, - o = function (t, e) { - return t.listeners(e).length; - }, - s = r(6284), - a = r(816).Buffer, - h = r.g.Uint8Array || function () {}, - u = r(7021); - n = u && u.debuglog ? u.debuglog('stream') : function () {}; - var f, - c, - l, - d = r(77), - p = r(4602), - m = r(3189).getHighWaterMark, - g = r(6244).q, - b = g.ERR_INVALID_ARG_TYPE, - y = g.ERR_STREAM_PUSH_AFTER_EOF, - v = g.ERR_METHOD_NOT_IMPLEMENTED, - w = g.ERR_STREAM_UNSHIFT_AFTER_END_EVENT; - r(87)(S, s); - var _ = p.errorOrDestroy, - M = ['error', 'close', 'destroy', 'pause', 'resume']; - function E(t, e, n) { - (i = i || r(1278)), - (t = t || {}), - 'boolean' != typeof n && (n = e instanceof i), - (this.objectMode = !!t.objectMode), - n && (this.objectMode = this.objectMode || !!t.readableObjectMode), - (this.highWaterMark = m(this, t, 'readableHighWaterMark', n)), - (this.buffer = new d()), - (this.length = 0), - (this.pipes = null), - (this.pipesCount = 0), - (this.flowing = null), - (this.ended = !1), - (this.endEmitted = !1), - (this.reading = !1), - (this.sync = !0), - (this.needReadable = !1), - (this.emittedReadable = !1), - (this.readableListening = !1), - (this.resumeScheduled = !1), - (this.paused = !0), - (this.emitClose = !1 !== t.emitClose), - (this.autoDestroy = !!t.autoDestroy), - (this.destroyed = !1), - (this.defaultEncoding = t.defaultEncoding || 'utf8'), - (this.awaitDrain = 0), - (this.readingMore = !1), - (this.decoder = null), - (this.encoding = null), - t.encoding && (f || (f = r(4361).s), (this.decoder = new f(t.encoding)), (this.encoding = t.encoding)); - } - function S(t) { - if (((i = i || r(1278)), !(this instanceof S))) return new S(t); - var e = this instanceof i; - (this._readableState = new E(t, this, e)), - (this.readable = !0), - t && ('function' == typeof t.read && (this._read = t.read), 'function' == typeof t.destroy && (this._destroy = t.destroy)), - s.call(this); - } - function x(t, e, r, i, o) { - n('readableAddChunk', e); - var s, - u = t._readableState; - if (null === e) - (u.reading = !1), - (function (t, e) { - if ((n('onEofChunk'), !e.ended)) { - if (e.decoder) { - var r = e.decoder.end(); - r && r.length && (e.buffer.push(r), (e.length += e.objectMode ? 1 : r.length)); - } - (e.ended = !0), e.sync ? B(t) : ((e.needReadable = !1), e.emittedReadable || ((e.emittedReadable = !0), I(t))); - } - })(t, u); - else if ( - (o || - (s = (function (t, e) { - var r, i; - return ( - (i = e), - a.isBuffer(i) || - i instanceof h || - 'string' == typeof e || - void 0 === e || - t.objectMode || - (r = new b('chunk', ['string', 'Buffer', 'Uint8Array'], e)), - r - ); - })(u, e)), - s) - ) - _(t, s); - else if (u.objectMode || (e && e.length > 0)) - if ( - ('string' == typeof e || - u.objectMode || - Object.getPrototypeOf(e) === a.prototype || - (e = (function (t) { - return a.from(t); - })(e)), - i) - ) - u.endEmitted ? _(t, new w()) : A(t, u, e, !0); - else if (u.ended) _(t, new y()); - else { - if (u.destroyed) return !1; - (u.reading = !1), - u.decoder && !r ? ((e = u.decoder.write(e)), u.objectMode || 0 !== e.length ? A(t, u, e, !1) : T(t, u)) : A(t, u, e, !1); - } - else i || ((u.reading = !1), T(t, u)); - return !u.ended && (u.length < u.highWaterMark || 0 === u.length); - } - function A(t, e, r, i) { - e.flowing && 0 === e.length && !e.sync - ? ((e.awaitDrain = 0), t.emit('data', r)) - : ((e.length += e.objectMode ? 1 : r.length), i ? e.buffer.unshift(r) : e.buffer.push(r), e.needReadable && B(t)), - T(t, e); - } - Object.defineProperty(S.prototype, 'destroyed', { - enumerable: !1, - get: function () { - return void 0 !== this._readableState && this._readableState.destroyed; - }, - set: function (t) { - this._readableState && (this._readableState.destroyed = t); - }, - }), - (S.prototype.destroy = p.destroy), - (S.prototype._undestroy = p.undestroy), - (S.prototype._destroy = function (t, e) { - e(t); - }), - (S.prototype.push = function (t, e) { - var r, - i = this._readableState; - return ( - i.objectMode - ? (r = !0) - : 'string' == typeof t && ((e = e || i.defaultEncoding) !== i.encoding && ((t = a.from(t, e)), (e = '')), (r = !0)), - x(this, t, e, !1, r) - ); - }), - (S.prototype.unshift = function (t) { - return x(this, t, null, !0, !1); - }), - (S.prototype.isPaused = function () { - return !1 === this._readableState.flowing; - }), - (S.prototype.setEncoding = function (t) { - f || (f = r(4361).s); - var e = new f(t); - (this._readableState.decoder = e), (this._readableState.encoding = this._readableState.decoder.encoding); - for (var i = this._readableState.buffer.head, n = ''; null !== i; ) (n += e.write(i.data)), (i = i.next); - return ( - this._readableState.buffer.clear(), - '' !== n && this._readableState.buffer.push(n), - (this._readableState.length = n.length), - this - ); - }); - var k = 1073741824; - function R(t, e) { - return t <= 0 || (0 === e.length && e.ended) - ? 0 - : e.objectMode - ? 1 - : t != t - ? e.flowing && e.length - ? e.buffer.head.data.length - : e.length - : (t > e.highWaterMark && - (e.highWaterMark = (function (t) { - return ( - t >= k ? (t = k) : (t--, (t |= t >>> 1), (t |= t >>> 2), (t |= t >>> 4), (t |= t >>> 8), (t |= t >>> 16), t++), t - ); - })(t)), - t <= e.length ? t : e.ended ? e.length : ((e.needReadable = !0), 0)); - } - function B(t) { - var e = t._readableState; - n('emitReadable', e.needReadable, e.emittedReadable), - (e.needReadable = !1), - e.emittedReadable || (n('emitReadable', e.flowing), (e.emittedReadable = !0), process.nextTick(I, t)); - } - function I(t) { - var e = t._readableState; - n('emitReadable_', e.destroyed, e.length, e.ended), - e.destroyed || (!e.length && !e.ended) || (t.emit('readable'), (e.emittedReadable = !1)), - (e.needReadable = !e.flowing && !e.ended && e.length <= e.highWaterMark), - N(t); - } - function T(t, e) { - e.readingMore || ((e.readingMore = !0), process.nextTick(P, t, e)); - } - function P(t, e) { - for (; !e.reading && !e.ended && (e.length < e.highWaterMark || (e.flowing && 0 === e.length)); ) { - var r = e.length; - if ((n('maybeReadMore read 0'), t.read(0), r === e.length)) break; - } - e.readingMore = !1; - } - function O(t) { - var e = t._readableState; - (e.readableListening = t.listenerCount('readable') > 0), - e.resumeScheduled && !e.paused ? (e.flowing = !0) : t.listenerCount('data') > 0 && t.resume(); - } - function L(t) { - n('readable nexttick read 0'), t.read(0); - } - function C(t, e) { - n('resume', e.reading), - e.reading || t.read(0), - (e.resumeScheduled = !1), - t.emit('resume'), - N(t), - e.flowing && !e.reading && t.read(0); - } - function N(t) { - var e = t._readableState; - for (n('flow', e.flowing); e.flowing && null !== t.read(); ); - } - function j(t, e) { - return 0 === e.length - ? null - : (e.objectMode - ? (r = e.buffer.shift()) - : !t || t >= e.length - ? ((r = e.decoder ? e.buffer.join('') : 1 === e.buffer.length ? e.buffer.first() : e.buffer.concat(e.length)), - e.buffer.clear()) - : (r = e.buffer.consume(t, e.decoder)), - r); - var r; - } - function U(t) { - var e = t._readableState; - n('endReadable', e.endEmitted), e.endEmitted || ((e.ended = !0), process.nextTick(D, e, t)); - } - function D(t, e) { - if ( - (n('endReadableNT', t.endEmitted, t.length), - !t.endEmitted && 0 === t.length && ((t.endEmitted = !0), (e.readable = !1), e.emit('end'), t.autoDestroy)) - ) { - var r = e._writableState; - (!r || (r.autoDestroy && r.finished)) && e.destroy(); - } - } - function z(t, e) { - for (var r = 0, i = t.length; r < i; r++) if (t[r] === e) return r; - return -1; - } - (S.prototype.read = function (t) { - n('read', t), (t = parseInt(t, 10)); - var e = this._readableState, - r = t; - if ( - (0 !== t && (e.emittedReadable = !1), - 0 === t && e.needReadable && ((0 !== e.highWaterMark ? e.length >= e.highWaterMark : e.length > 0) || e.ended)) - ) - return n('read: emitReadable', e.length, e.ended), 0 === e.length && e.ended ? U(this) : B(this), null; - if (0 === (t = R(t, e)) && e.ended) return 0 === e.length && U(this), null; - var i, - o = e.needReadable; - return ( - n('need readable', o), - (0 === e.length || e.length - t < e.highWaterMark) && n('length less than watermark', (o = !0)), - e.ended || e.reading - ? n('reading or ended', (o = !1)) - : o && - (n('do read'), - (e.reading = !0), - (e.sync = !0), - 0 === e.length && (e.needReadable = !0), - this._read(e.highWaterMark), - (e.sync = !1), - e.reading || (t = R(r, e))), - null === (i = t > 0 ? j(t, e) : null) - ? ((e.needReadable = e.length <= e.highWaterMark), (t = 0)) - : ((e.length -= t), (e.awaitDrain = 0)), - 0 === e.length && (e.ended || (e.needReadable = !0), r !== t && e.ended && U(this)), - null !== i && this.emit('data', i), - i - ); - }), - (S.prototype._read = function (t) { - _(this, new v('_read()')); - }), - (S.prototype.pipe = function (t, e) { - var r = this, - i = this._readableState; - switch (i.pipesCount) { - case 0: - i.pipes = t; - break; - case 1: - i.pipes = [i.pipes, t]; - break; - default: - i.pipes.push(t); - } - (i.pipesCount += 1), n('pipe count=%d opts=%j', i.pipesCount, e); - var s = (e && !1 === e.end) || t === process.stdout || t === process.stderr ? p : a; - function a() { - n('onend'), t.end(); - } - i.endEmitted ? process.nextTick(s) : r.once('end', s), - t.on('unpipe', function e(o, s) { - n('onunpipe'), - o === r && - s && - !1 === s.hasUnpiped && - ((s.hasUnpiped = !0), - n('cleanup'), - t.removeListener('close', l), - t.removeListener('finish', d), - t.removeListener('drain', h), - t.removeListener('error', c), - t.removeListener('unpipe', e), - r.removeListener('end', a), - r.removeListener('end', p), - r.removeListener('data', f), - (u = !0), - !i.awaitDrain || (t._writableState && !t._writableState.needDrain) || h()); - }); - var h = (function (t) { - return function () { - var e = t._readableState; - n('pipeOnDrain', e.awaitDrain), - e.awaitDrain && e.awaitDrain--, - 0 === e.awaitDrain && o(t, 'data') && ((e.flowing = !0), N(t)); - }; - })(r); - t.on('drain', h); - var u = !1; - function f(e) { - n('ondata'); - var o = t.write(e); - n('dest.write', o), - !1 === o && - (((1 === i.pipesCount && i.pipes === t) || (i.pipesCount > 1 && -1 !== z(i.pipes, t))) && - !u && - (n('false write response, pause', i.awaitDrain), i.awaitDrain++), - r.pause()); - } - function c(e) { - n('onerror', e), p(), t.removeListener('error', c), 0 === o(t, 'error') && _(t, e); - } - function l() { - t.removeListener('finish', d), p(); - } - function d() { - n('onfinish'), t.removeListener('close', l), p(); - } - function p() { - n('unpipe'), r.unpipe(t); - } - return ( - r.on('data', f), - (function (t, e, r) { - if ('function' == typeof t.prependListener) return t.prependListener(e, r); - t._events && t._events[e] - ? Array.isArray(t._events[e]) - ? t._events[e].unshift(r) - : (t._events[e] = [r, t._events[e]]) - : t.on(e, r); - })(t, 'error', c), - t.once('close', l), - t.once('finish', d), - t.emit('pipe', r), - i.flowing || (n('pipe resume'), r.resume()), - t - ); - }), - (S.prototype.unpipe = function (t) { - var e = this._readableState, - r = { hasUnpiped: !1 }; - if (0 === e.pipesCount) return this; - if (1 === e.pipesCount) - return ( - (t && t !== e.pipes) || - (t || (t = e.pipes), (e.pipes = null), (e.pipesCount = 0), (e.flowing = !1), t && t.emit('unpipe', this, r)), - this - ); - if (!t) { - var i = e.pipes, - n = e.pipesCount; - (e.pipes = null), (e.pipesCount = 0), (e.flowing = !1); - for (var o = 0; o < n; o++) i[o].emit('unpipe', this, { hasUnpiped: !1 }); - return this; - } - var s = z(e.pipes, t); - return ( - -1 === s || - (e.pipes.splice(s, 1), (e.pipesCount -= 1), 1 === e.pipesCount && (e.pipes = e.pipes[0]), t.emit('unpipe', this, r)), - this - ); - }), - (S.prototype.on = function (t, e) { - var r = s.prototype.on.call(this, t, e), - i = this._readableState; - return ( - 'data' === t - ? ((i.readableListening = this.listenerCount('readable') > 0), !1 !== i.flowing && this.resume()) - : 'readable' === t && - (i.endEmitted || - i.readableListening || - ((i.readableListening = i.needReadable = !0), - (i.flowing = !1), - (i.emittedReadable = !1), - n('on readable', i.length, i.reading), - i.length ? B(this) : i.reading || process.nextTick(L, this))), - r - ); - }), - (S.prototype.addListener = S.prototype.on), - (S.prototype.removeListener = function (t, e) { - var r = s.prototype.removeListener.call(this, t, e); - return 'readable' === t && process.nextTick(O, this), r; - }), - (S.prototype.removeAllListeners = function (t) { - var e = s.prototype.removeAllListeners.apply(this, arguments); - return ('readable' !== t && void 0 !== t) || process.nextTick(O, this), e; - }), - (S.prototype.resume = function () { - var t = this._readableState; - return ( - t.flowing || - (n('resume'), - (t.flowing = !t.readableListening), - (function (t, e) { - e.resumeScheduled || ((e.resumeScheduled = !0), process.nextTick(C, t, e)); - })(this, t)), - (t.paused = !1), - this - ); - }), - (S.prototype.pause = function () { - return ( - n('call pause flowing=%j', this._readableState.flowing), - !1 !== this._readableState.flowing && (n('pause'), (this._readableState.flowing = !1), this.emit('pause')), - (this._readableState.paused = !0), - this - ); - }), - (S.prototype.wrap = function (t) { - var e = this, - r = this._readableState, - i = !1; - for (var o in (t.on('end', function () { - if ((n('wrapped end'), r.decoder && !r.ended)) { - var t = r.decoder.end(); - t && t.length && e.push(t); - } - e.push(null); - }), - t.on('data', function (o) { - n('wrapped data'), - r.decoder && (o = r.decoder.write(o)), - (r.objectMode && null == o) || ((r.objectMode || (o && o.length)) && (e.push(o) || ((i = !0), t.pause()))); - }), - t)) - void 0 === this[o] && - 'function' == typeof t[o] && - (this[o] = (function (e) { - return function () { - return t[e].apply(t, arguments); - }; - })(o)); - for (var s = 0; s < M.length; s++) t.on(M[s], this.emit.bind(this, M[s])); - return ( - (this._read = function (e) { - n('wrapped _read', e), i && ((i = !1), t.resume()); - }), - this - ); - }), - 'function' == typeof Symbol && - (S.prototype[Symbol.asyncIterator] = function () { - return void 0 === c && (c = r(2349)), c(this); - }), - Object.defineProperty(S.prototype, 'readableHighWaterMark', { - enumerable: !1, - get: function () { - return this._readableState.highWaterMark; - }, - }), - Object.defineProperty(S.prototype, 'readableBuffer', { - enumerable: !1, - get: function () { - return this._readableState && this._readableState.buffer; - }, - }), - Object.defineProperty(S.prototype, 'readableFlowing', { - enumerable: !1, - get: function () { - return this._readableState.flowing; - }, - set: function (t) { - this._readableState && (this._readableState.flowing = t); - }, - }), - (S._fromList = j), - Object.defineProperty(S.prototype, 'readableLength', { - enumerable: !1, - get: function () { - return this._readableState.length; - }, - }), - 'function' == typeof Symbol && - (S.from = function (t, e) { - return void 0 === l && (l = r(5677)), l(S, t, e); - }); - }, - 8133: (t, e, r) => { - 'use strict'; - t.exports = f; - var i = r(6244).q, - n = i.ERR_METHOD_NOT_IMPLEMENTED, - o = i.ERR_MULTIPLE_CALLBACK, - s = i.ERR_TRANSFORM_ALREADY_TRANSFORMING, - a = i.ERR_TRANSFORM_WITH_LENGTH_0, - h = r(1278); - function u(t, e) { - var r = this._transformState; - r.transforming = !1; - var i = r.writecb; - if (null === i) return this.emit('error', new o()); - (r.writechunk = null), (r.writecb = null), null != e && this.push(e), i(t); - var n = this._readableState; - (n.reading = !1), (n.needReadable || n.length < n.highWaterMark) && this._read(n.highWaterMark); - } - function f(t) { - if (!(this instanceof f)) return new f(t); - h.call(this, t), - (this._transformState = { - afterTransform: u.bind(this), - needTransform: !1, - transforming: !1, - writecb: null, - writechunk: null, - writeencoding: null, - }), - (this._readableState.needReadable = !0), - (this._readableState.sync = !1), - t && - ('function' == typeof t.transform && (this._transform = t.transform), - 'function' == typeof t.flush && (this._flush = t.flush)), - this.on('prefinish', c); - } - function c() { - var t = this; - 'function' != typeof this._flush || this._readableState.destroyed - ? l(this, null, null) - : this._flush(function (e, r) { - l(t, e, r); - }); - } - function l(t, e, r) { - if (e) return t.emit('error', e); - if ((null != r && t.push(r), t._writableState.length)) throw new a(); - if (t._transformState.transforming) throw new s(); - return t.push(null); - } - r(87)(f, h), - (f.prototype.push = function (t, e) { - return (this._transformState.needTransform = !1), h.prototype.push.call(this, t, e); - }), - (f.prototype._transform = function (t, e, r) { - r(new n('_transform()')); - }), - (f.prototype._write = function (t, e, r) { - var i = this._transformState; - if (((i.writecb = r), (i.writechunk = t), (i.writeencoding = e), !i.transforming)) { - var n = this._readableState; - (i.needTransform || n.needReadable || n.length < n.highWaterMark) && this._read(n.highWaterMark); - } - }), - (f.prototype._read = function (t) { - var e = this._transformState; - null === e.writechunk || e.transforming - ? (e.needTransform = !0) - : ((e.transforming = !0), this._transform(e.writechunk, e.writeencoding, e.afterTransform)); - }), - (f.prototype._destroy = function (t, e) { - h.prototype._destroy.call(this, t, function (t) { - e(t); - }); - }); - }, - 3: (t, e, r) => { - 'use strict'; - function i(t) { - var e = this; - (this.next = null), - (this.entry = null), - (this.finish = function () { - !(function (t, e, r) { - var i = t.entry; - for (t.entry = null; i; ) { - var n = i.callback; - e.pendingcb--, n(undefined), (i = i.next); - } - e.corkedRequestsFree.next = t; - })(e, t); - }); - } - var n; - (t.exports = S), (S.WritableState = E); - var o, - s = { deprecate: r(7451) }, - a = r(6284), - h = r(816).Buffer, - u = r.g.Uint8Array || function () {}, - f = r(4602), - c = r(3189).getHighWaterMark, - l = r(6244).q, - d = l.ERR_INVALID_ARG_TYPE, - p = l.ERR_METHOD_NOT_IMPLEMENTED, - m = l.ERR_MULTIPLE_CALLBACK, - g = l.ERR_STREAM_CANNOT_PIPE, - b = l.ERR_STREAM_DESTROYED, - y = l.ERR_STREAM_NULL_VALUES, - v = l.ERR_STREAM_WRITE_AFTER_END, - w = l.ERR_UNKNOWN_ENCODING, - _ = f.errorOrDestroy; - function M() {} - function E(t, e, o) { - (n = n || r(1278)), - (t = t || {}), - 'boolean' != typeof o && (o = e instanceof n), - (this.objectMode = !!t.objectMode), - o && (this.objectMode = this.objectMode || !!t.writableObjectMode), - (this.highWaterMark = c(this, t, 'writableHighWaterMark', o)), - (this.finalCalled = !1), - (this.needDrain = !1), - (this.ending = !1), - (this.ended = !1), - (this.finished = !1), - (this.destroyed = !1); - var s = !1 === t.decodeStrings; - (this.decodeStrings = !s), - (this.defaultEncoding = t.defaultEncoding || 'utf8'), - (this.length = 0), - (this.writing = !1), - (this.corked = 0), - (this.sync = !0), - (this.bufferProcessing = !1), - (this.onwrite = function (t) { - !(function (t, e) { - var r = t._writableState, - i = r.sync, - n = r.writecb; - if ('function' != typeof n) throw new m(); - if ( - ((function (t) { - (t.writing = !1), (t.writecb = null), (t.length -= t.writelen), (t.writelen = 0); - })(r), - e) - ) - !(function (t, e, r, i, n) { - --e.pendingcb, - r - ? (process.nextTick(n, i), process.nextTick(I, t, e), (t._writableState.errorEmitted = !0), _(t, i)) - : (n(i), (t._writableState.errorEmitted = !0), _(t, i), I(t, e)); - })(t, r, i, e, n); - else { - var o = R(r) || t.destroyed; - o || r.corked || r.bufferProcessing || !r.bufferedRequest || k(t, r), i ? process.nextTick(A, t, r, o, n) : A(t, r, o, n); - } - })(e, t); - }), - (this.writecb = null), - (this.writelen = 0), - (this.bufferedRequest = null), - (this.lastBufferedRequest = null), - (this.pendingcb = 0), - (this.prefinished = !1), - (this.errorEmitted = !1), - (this.emitClose = !1 !== t.emitClose), - (this.autoDestroy = !!t.autoDestroy), - (this.bufferedRequestCount = 0), - (this.corkedRequestsFree = new i(this)); - } - function S(t) { - var e = this instanceof (n = n || r(1278)); - if (!e && !o.call(S, this)) return new S(t); - (this._writableState = new E(t, this, e)), - (this.writable = !0), - t && - ('function' == typeof t.write && (this._write = t.write), - 'function' == typeof t.writev && (this._writev = t.writev), - 'function' == typeof t.destroy && (this._destroy = t.destroy), - 'function' == typeof t.final && (this._final = t.final)), - a.call(this); - } - function x(t, e, r, i, n, o, s) { - (e.writelen = i), - (e.writecb = s), - (e.writing = !0), - (e.sync = !0), - e.destroyed ? e.onwrite(new b('write')) : r ? t._writev(n, e.onwrite) : t._write(n, o, e.onwrite), - (e.sync = !1); - } - function A(t, e, r, i) { - r || - (function (t, e) { - 0 === e.length && e.needDrain && ((e.needDrain = !1), t.emit('drain')); - })(t, e), - e.pendingcb--, - i(), - I(t, e); - } - function k(t, e) { - e.bufferProcessing = !0; - var r = e.bufferedRequest; - if (t._writev && r && r.next) { - var n = e.bufferedRequestCount, - o = new Array(n), - s = e.corkedRequestsFree; - s.entry = r; - for (var a = 0, h = !0; r; ) (o[a] = r), r.isBuf || (h = !1), (r = r.next), (a += 1); - (o.allBuffers = h), - x(t, e, !0, e.length, o, '', s.finish), - e.pendingcb++, - (e.lastBufferedRequest = null), - s.next ? ((e.corkedRequestsFree = s.next), (s.next = null)) : (e.corkedRequestsFree = new i(e)), - (e.bufferedRequestCount = 0); - } else { - for (; r; ) { - var u = r.chunk, - f = r.encoding, - c = r.callback; - if ((x(t, e, !1, e.objectMode ? 1 : u.length, u, f, c), (r = r.next), e.bufferedRequestCount--, e.writing)) break; - } - null === r && (e.lastBufferedRequest = null); - } - (e.bufferedRequest = r), (e.bufferProcessing = !1); - } - function R(t) { - return t.ending && 0 === t.length && null === t.bufferedRequest && !t.finished && !t.writing; - } - function B(t, e) { - t._final(function (r) { - e.pendingcb--, r && _(t, r), (e.prefinished = !0), t.emit('prefinish'), I(t, e); - }); - } - function I(t, e) { - var r = R(e); - if ( - r && - ((function (t, e) { - e.prefinished || - e.finalCalled || - ('function' != typeof t._final || e.destroyed - ? ((e.prefinished = !0), t.emit('prefinish')) - : (e.pendingcb++, (e.finalCalled = !0), process.nextTick(B, t, e))); - })(t, e), - 0 === e.pendingcb && ((e.finished = !0), t.emit('finish'), e.autoDestroy)) - ) { - var i = t._readableState; - (!i || (i.autoDestroy && i.endEmitted)) && t.destroy(); - } - return r; - } - r(87)(S, a), - (E.prototype.getBuffer = function () { - for (var t = this.bufferedRequest, e = []; t; ) e.push(t), (t = t.next); - return e; - }), - (function () { - try { - Object.defineProperty(E.prototype, 'buffer', { - get: s.deprecate( - function () { - return this.getBuffer(); - }, - '_writableState.buffer is deprecated. Use _writableState.getBuffer instead.', - 'DEP0003' - ), - }); - } catch (t) {} - })(), - 'function' == typeof Symbol && Symbol.hasInstance && 'function' == typeof Function.prototype[Symbol.hasInstance] - ? ((o = Function.prototype[Symbol.hasInstance]), - Object.defineProperty(S, Symbol.hasInstance, { - value: function (t) { - return !!o.call(this, t) || (this === S && t && t._writableState instanceof E); - }, - })) - : (o = function (t) { - return t instanceof this; - }), - (S.prototype.pipe = function () { - _(this, new g()); - }), - (S.prototype.write = function (t, e, r) { - var i, - n = this._writableState, - o = !1, - s = !n.objectMode && ((i = t), h.isBuffer(i) || i instanceof u); - return ( - s && - !h.isBuffer(t) && - (t = (function (t) { - return h.from(t); - })(t)), - 'function' == typeof e && ((r = e), (e = null)), - s ? (e = 'buffer') : e || (e = n.defaultEncoding), - 'function' != typeof r && (r = M), - n.ending - ? (function (t, e) { - var r = new v(); - _(t, r), process.nextTick(e, r); - })(this, r) - : (s || - (function (t, e, r, i) { - var n; - return ( - null === r ? (n = new y()) : 'string' == typeof r || e.objectMode || (n = new d('chunk', ['string', 'Buffer'], r)), - !n || (_(t, n), process.nextTick(i, n), !1) - ); - })(this, n, t, r)) && - (n.pendingcb++, - (o = (function (t, e, r, i, n, o) { - if (!r) { - var s = (function (t, e, r) { - return t.objectMode || !1 === t.decodeStrings || 'string' != typeof e || (e = h.from(e, r)), e; - })(e, i, n); - i !== s && ((r = !0), (n = 'buffer'), (i = s)); - } - var a = e.objectMode ? 1 : i.length; - e.length += a; - var u = e.length < e.highWaterMark; - if ((u || (e.needDrain = !0), e.writing || e.corked)) { - var f = e.lastBufferedRequest; - (e.lastBufferedRequest = { chunk: i, encoding: n, isBuf: r, callback: o, next: null }), - f ? (f.next = e.lastBufferedRequest) : (e.bufferedRequest = e.lastBufferedRequest), - (e.bufferedRequestCount += 1); - } else x(t, e, !1, a, i, n, o); - return u; - })(this, n, s, t, e, r))), - o - ); - }), - (S.prototype.cork = function () { - this._writableState.corked++; - }), - (S.prototype.uncork = function () { - var t = this._writableState; - t.corked && (t.corked--, t.writing || t.corked || t.bufferProcessing || !t.bufferedRequest || k(this, t)); - }), - (S.prototype.setDefaultEncoding = function (t) { - if ( - ('string' == typeof t && (t = t.toLowerCase()), - !( - ['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf( - (t + '').toLowerCase() - ) > -1 - )) - ) - throw new w(t); - return (this._writableState.defaultEncoding = t), this; - }), - Object.defineProperty(S.prototype, 'writableBuffer', { - enumerable: !1, - get: function () { - return this._writableState && this._writableState.getBuffer(); - }, - }), - Object.defineProperty(S.prototype, 'writableHighWaterMark', { - enumerable: !1, - get: function () { - return this._writableState.highWaterMark; - }, - }), - (S.prototype._write = function (t, e, r) { - r(new p('_write()')); - }), - (S.prototype._writev = null), - (S.prototype.end = function (t, e, r) { - var i = this._writableState; - return ( - 'function' == typeof t ? ((r = t), (t = null), (e = null)) : 'function' == typeof e && ((r = e), (e = null)), - null != t && this.write(t, e), - i.corked && ((i.corked = 1), this.uncork()), - i.ending || - (function (t, e, r) { - (e.ending = !0), - I(t, e), - r && (e.finished ? process.nextTick(r) : t.once('finish', r)), - (e.ended = !0), - (t.writable = !1); - })(this, i, r), - this - ); - }), - Object.defineProperty(S.prototype, 'writableLength', { - enumerable: !1, - get: function () { - return this._writableState.length; - }, - }), - Object.defineProperty(S.prototype, 'destroyed', { - enumerable: !1, - get: function () { - return void 0 !== this._writableState && this._writableState.destroyed; - }, - set: function (t) { - this._writableState && (this._writableState.destroyed = t); - }, - }), - (S.prototype.destroy = f.destroy), - (S.prototype._undestroy = f.undestroy), - (S.prototype._destroy = function (t, e) { - e(t); - }); - }, - 2349: (t, e, r) => { - 'use strict'; - var i; - function n(t, e, r) { - return e in t ? Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : (t[e] = r), t; - } - var o = r(3311), - s = Symbol('lastResolve'), - a = Symbol('lastReject'), - h = Symbol('error'), - u = Symbol('ended'), - f = Symbol('lastPromise'), - c = Symbol('handlePromise'), - l = Symbol('stream'); - function d(t, e) { - return { value: t, done: e }; - } - function p(t) { - var e = t[s]; - if (null !== e) { - var r = t[l].read(); - null !== r && ((t[f] = null), (t[s] = null), (t[a] = null), e(d(r, !1))); - } - } - function m(t) { - process.nextTick(p, t); - } - var g = Object.getPrototypeOf(function () {}), - b = Object.setPrototypeOf( - (n( - (i = { - get stream() { - return this[l]; - }, - next: function () { - var t = this, - e = this[h]; - if (null !== e) return Promise.reject(e); - if (this[u]) return Promise.resolve(d(void 0, !0)); - if (this[l].destroyed) - return new Promise(function (e, r) { - process.nextTick(function () { - t[h] ? r(t[h]) : e(d(void 0, !0)); - }); - }); - var r, - i = this[f]; - if (i) - r = new Promise( - (function (t, e) { - return function (r, i) { - t.then(function () { - e[u] ? r(d(void 0, !0)) : e[c](r, i); - }, i); - }; - })(i, this) - ); - else { - var n = this[l].read(); - if (null !== n) return Promise.resolve(d(n, !1)); - r = new Promise(this[c]); - } - return (this[f] = r), r; - }, - }), - Symbol.asyncIterator, - function () { - return this; - } - ), - n(i, 'return', function () { - var t = this; - return new Promise(function (e, r) { - t[l].destroy(null, function (t) { - t ? r(t) : e(d(void 0, !0)); - }); - }); - }), - i), - g - ); - t.exports = function (t) { - var e, - r = Object.create( - b, - (n((e = {}), l, { value: t, writable: !0 }), - n(e, s, { value: null, writable: !0 }), - n(e, a, { value: null, writable: !0 }), - n(e, h, { value: null, writable: !0 }), - n(e, u, { value: t._readableState.endEmitted, writable: !0 }), - n(e, c, { - value: function (t, e) { - var i = r[l].read(); - i ? ((r[f] = null), (r[s] = null), (r[a] = null), t(d(i, !1))) : ((r[s] = t), (r[a] = e)); - }, - writable: !0, - }), - e) - ); - return ( - (r[f] = null), - o(t, function (t) { - if (t && 'ERR_STREAM_PREMATURE_CLOSE' !== t.code) { - var e = r[a]; - return null !== e && ((r[f] = null), (r[s] = null), (r[a] = null), e(t)), void (r[h] = t); - } - var i = r[s]; - null !== i && ((r[f] = null), (r[s] = null), (r[a] = null), i(d(void 0, !0))), (r[u] = !0); - }), - t.on('readable', m.bind(null, r)), - r - ); - }; - }, - 77: (t, e, r) => { - 'use strict'; - function i(t, e) { - var r = Object.keys(t); - if (Object.getOwnPropertySymbols) { - var i = Object.getOwnPropertySymbols(t); - e && - (i = i.filter(function (e) { - return Object.getOwnPropertyDescriptor(t, e).enumerable; - })), - r.push.apply(r, i); - } - return r; - } - function n(t, e, r) { - return e in t ? Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : (t[e] = r), t; - } - function o(t, e) { - for (var r = 0; r < e.length; r++) { - var i = e[r]; - (i.enumerable = i.enumerable || !1), - (i.configurable = !0), - 'value' in i && (i.writable = !0), - Object.defineProperty(t, i.key, i); - } - } - var s = r(816).Buffer, - a = r(4215).inspect, - h = (a && a.custom) || 'inspect'; - t.exports = (function () { - function t() { - !(function (t, e) { - if (!(t instanceof e)) throw new TypeError('Cannot call a class as a function'); - })(this, t), - (this.head = null), - (this.tail = null), - (this.length = 0); - } - var e, r; - return ( - (e = t), - (r = [ - { - key: 'push', - value: function (t) { - var e = { data: t, next: null }; - this.length > 0 ? (this.tail.next = e) : (this.head = e), (this.tail = e), ++this.length; - }, - }, - { - key: 'unshift', - value: function (t) { - var e = { data: t, next: this.head }; - 0 === this.length && (this.tail = e), (this.head = e), ++this.length; - }, - }, - { - key: 'shift', - value: function () { - if (0 !== this.length) { - var t = this.head.data; - return 1 === this.length ? (this.head = this.tail = null) : (this.head = this.head.next), --this.length, t; - } - }, - }, - { - key: 'clear', - value: function () { - (this.head = this.tail = null), (this.length = 0); - }, - }, - { - key: 'join', - value: function (t) { - if (0 === this.length) return ''; - for (var e = this.head, r = '' + e.data; (e = e.next); ) r += t + e.data; - return r; - }, - }, - { - key: 'concat', - value: function (t) { - if (0 === this.length) return s.alloc(0); - for (var e, r, i, n = s.allocUnsafe(t >>> 0), o = this.head, a = 0; o; ) - (e = o.data), (r = n), (i = a), s.prototype.copy.call(e, r, i), (a += o.data.length), (o = o.next); - return n; - }, - }, - { - key: 'consume', - value: function (t, e) { - var r; - return ( - t < this.head.data.length - ? ((r = this.head.data.slice(0, t)), (this.head.data = this.head.data.slice(t))) - : (r = t === this.head.data.length ? this.shift() : e ? this._getString(t) : this._getBuffer(t)), - r - ); - }, - }, - { - key: 'first', - value: function () { - return this.head.data; - }, - }, - { - key: '_getString', - value: function (t) { - var e = this.head, - r = 1, - i = e.data; - for (t -= i.length; (e = e.next); ) { - var n = e.data, - o = t > n.length ? n.length : t; - if ((o === n.length ? (i += n) : (i += n.slice(0, t)), 0 == (t -= o))) { - o === n.length - ? (++r, e.next ? (this.head = e.next) : (this.head = this.tail = null)) - : ((this.head = e), (e.data = n.slice(o))); - break; - } - ++r; - } - return (this.length -= r), i; - }, - }, - { - key: '_getBuffer', - value: function (t) { - var e = s.allocUnsafe(t), - r = this.head, - i = 1; - for (r.data.copy(e), t -= r.data.length; (r = r.next); ) { - var n = r.data, - o = t > n.length ? n.length : t; - if ((n.copy(e, e.length - t, 0, o), 0 == (t -= o))) { - o === n.length - ? (++i, r.next ? (this.head = r.next) : (this.head = this.tail = null)) - : ((this.head = r), (r.data = n.slice(o))); - break; - } - ++i; - } - return (this.length -= i), e; - }, - }, - { - key: h, - value: function (t, e) { - return a( - this, - (function (t) { - for (var e = 1; e < arguments.length; e++) { - var r = null != arguments[e] ? arguments[e] : {}; - e % 2 - ? i(Object(r), !0).forEach(function (e) { - n(t, e, r[e]); - }) - : Object.getOwnPropertyDescriptors - ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) - : i(Object(r)).forEach(function (e) { - Object.defineProperty(t, e, Object.getOwnPropertyDescriptor(r, e)); - }); - } - return t; - })({}, e, { depth: 0, customInspect: !1 }) - ); - }, - }, - ]), - r && o(e.prototype, r), - t - ); - })(); - }, - 4602: t => { - 'use strict'; - function e(t, e) { - i(t, e), r(t); - } - function r(t) { - (t._writableState && !t._writableState.emitClose) || (t._readableState && !t._readableState.emitClose) || t.emit('close'); - } - function i(t, e) { - t.emit('error', e); - } - t.exports = { - destroy: function (t, n) { - var o = this, - s = this._readableState && this._readableState.destroyed, - a = this._writableState && this._writableState.destroyed; - return s || a - ? (n - ? n(t) - : t && - (this._writableState - ? this._writableState.errorEmitted || ((this._writableState.errorEmitted = !0), process.nextTick(i, this, t)) - : process.nextTick(i, this, t)), - this) - : (this._readableState && (this._readableState.destroyed = !0), - this._writableState && (this._writableState.destroyed = !0), - this._destroy(t || null, function (t) { - !n && t - ? o._writableState - ? o._writableState.errorEmitted - ? process.nextTick(r, o) - : ((o._writableState.errorEmitted = !0), process.nextTick(e, o, t)) - : process.nextTick(e, o, t) - : n - ? (process.nextTick(r, o), n(t)) - : process.nextTick(r, o); - }), - this); - }, - undestroy: function () { - this._readableState && - ((this._readableState.destroyed = !1), - (this._readableState.reading = !1), - (this._readableState.ended = !1), - (this._readableState.endEmitted = !1)), - this._writableState && - ((this._writableState.destroyed = !1), - (this._writableState.ended = !1), - (this._writableState.ending = !1), - (this._writableState.finalCalled = !1), - (this._writableState.prefinished = !1), - (this._writableState.finished = !1), - (this._writableState.errorEmitted = !1)); - }, - errorOrDestroy: function (t, e) { - var r = t._readableState, - i = t._writableState; - (r && r.autoDestroy) || (i && i.autoDestroy) ? t.destroy(e) : t.emit('error', e); - }, - }; - }, - 3311: (t, e, r) => { - 'use strict'; - var i = r(6244).q.ERR_STREAM_PREMATURE_CLOSE; - function n() {} - t.exports = function t(e, r, o) { - if ('function' == typeof r) return t(e, null, r); - r || (r = {}), - (o = (function (t) { - var e = !1; - return function () { - if (!e) { - e = !0; - for (var r = arguments.length, i = new Array(r), n = 0; n < r; n++) i[n] = arguments[n]; - t.apply(this, i); - } - }; - })(o || n)); - var s = r.readable || (!1 !== r.readable && e.readable), - a = r.writable || (!1 !== r.writable && e.writable), - h = function () { - e.writable || f(); - }, - u = e._writableState && e._writableState.finished, - f = function () { - (a = !1), (u = !0), s || o.call(e); - }, - c = e._readableState && e._readableState.endEmitted, - l = function () { - (s = !1), (c = !0), a || o.call(e); - }, - d = function (t) { - o.call(e, t); - }, - p = function () { - var t; - return s && !c - ? ((e._readableState && e._readableState.ended) || (t = new i()), o.call(e, t)) - : a && !u - ? ((e._writableState && e._writableState.ended) || (t = new i()), o.call(e, t)) - : void 0; - }, - m = function () { - e.req.on('finish', f); - }; - return ( - (function (t) { - return t.setHeader && 'function' == typeof t.abort; - })(e) - ? (e.on('complete', f), e.on('abort', p), e.req ? m() : e.on('request', m)) - : a && !e._writableState && (e.on('end', h), e.on('close', h)), - e.on('end', l), - e.on('finish', f), - !1 !== r.error && e.on('error', d), - e.on('close', p), - function () { - e.removeListener('complete', f), - e.removeListener('abort', p), - e.removeListener('request', m), - e.req && e.req.removeListener('finish', f), - e.removeListener('end', h), - e.removeListener('close', h), - e.removeListener('finish', f), - e.removeListener('end', l), - e.removeListener('error', d), - e.removeListener('close', p); - } - ); - }; - }, - 5677: t => { - t.exports = function () { - throw new Error('Readable.from is not available in the browser'); - }; - }, - 6192: (t, e, r) => { - 'use strict'; - var i, - n = r(6244).q, - o = n.ERR_MISSING_ARGS, - s = n.ERR_STREAM_DESTROYED; - function a(t) { - if (t) throw t; - } - function h(t) { - t(); - } - function u(t, e) { - return t.pipe(e); - } - t.exports = function () { - for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++) e[n] = arguments[n]; - var f, - c = (function (t) { - return t.length ? ('function' != typeof t[t.length - 1] ? a : t.pop()) : a; - })(e); - if ((Array.isArray(e[0]) && (e = e[0]), e.length < 2)) throw new o('streams'); - var l = e.map(function (t, n) { - var o = n < e.length - 1; - return (function (t, e, n, o) { - o = (function (t) { - var e = !1; - return function () { - e || ((e = !0), t.apply(void 0, arguments)); - }; - })(o); - var a = !1; - t.on('close', function () { - a = !0; - }), - void 0 === i && (i = r(3311)), - i(t, { readable: e, writable: n }, function (t) { - if (t) return o(t); - (a = !0), o(); - }); - var h = !1; - return function (e) { - if (!a && !h) - return ( - (h = !0), - (function (t) { - return t.setHeader && 'function' == typeof t.abort; - })(t) - ? t.abort() - : 'function' == typeof t.destroy - ? t.destroy() - : void o(e || new s('pipe')) - ); - }; - })(t, o, n > 0, function (t) { - f || (f = t), t && l.forEach(h), o || (l.forEach(h), c(f)); - }); - }); - return e.reduce(u); - }; - }, - 3189: (t, e, r) => { - 'use strict'; - var i = r(6244).q.ERR_INVALID_OPT_VALUE; - t.exports = { - getHighWaterMark: function (t, e, r, n) { - var o = (function (t, e, r) { - return null != t.highWaterMark ? t.highWaterMark : e ? t[r] : null; - })(e, n, r); - if (null != o) { - if (!isFinite(o) || Math.floor(o) !== o || o < 0) throw new i(n ? r : 'highWaterMark', o); - return Math.floor(o); - } - return t.objectMode ? 16 : 16384; - }, - }; - }, - 6284: (t, e, r) => { - t.exports = r(343).EventEmitter; - }, - 9649: (t, e, r) => { - ((e = t.exports = r(4581)).Stream = e), - (e.Readable = e), - (e.Writable = r(3)), - (e.Duplex = r(1278)), - (e.Transform = r(8133)), - (e.PassThrough = r(8825)), - (e.finished = r(3311)), - (e.pipeline = r(6192)); - }, - 7752: t => { - t.exports = function (t, e) { - for (var r = Math.min(t.length, e.length), i = new Buffer(r), n = 0; n < r; ++n) i[n] = t[n] ^ e[n]; - return i; - }; - }, - 816: (t, e, r) => { - 'use strict'; - const i = r(4782), - n = r(8898), - o = 'function' == typeof Symbol && 'function' == typeof Symbol.for ? Symbol.for('nodejs.util.inspect.custom') : null; - (e.Buffer = h), - (e.SlowBuffer = function (t) { - return +t != t && (t = 0), h.alloc(+t); - }), - (e.INSPECT_MAX_BYTES = 50); - const s = 2147483647; - function a(t) { - if (t > s) throw new RangeError('The value "' + t + '" is invalid for option "size"'); - const e = new Uint8Array(t); - return Object.setPrototypeOf(e, h.prototype), e; - } - function h(t, e, r) { - if ('number' == typeof t) { - if ('string' == typeof e) throw new TypeError('The "string" argument must be of type string. Received type number'); - return c(t); - } - return u(t, e, r); - } - function u(t, e, r) { - if ('string' == typeof t) - return (function (t, e) { - if ((('string' == typeof e && '' !== e) || (e = 'utf8'), !h.isEncoding(e))) throw new TypeError('Unknown encoding: ' + e); - const r = 0 | m(t, e); - let i = a(r); - const n = i.write(t, e); - return n !== r && (i = i.slice(0, n)), i; - })(t, e); - if (ArrayBuffer.isView(t)) - return (function (t) { - if (K(t, Uint8Array)) { - const e = new Uint8Array(t); - return d(e.buffer, e.byteOffset, e.byteLength); - } - return l(t); - })(t); - if (null == t) - throw new TypeError( - 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type ' + typeof t - ); - if (K(t, ArrayBuffer) || (t && K(t.buffer, ArrayBuffer))) return d(t, e, r); - if ('undefined' != typeof SharedArrayBuffer && (K(t, SharedArrayBuffer) || (t && K(t.buffer, SharedArrayBuffer)))) - return d(t, e, r); - if ('number' == typeof t) throw new TypeError('The "value" argument must not be of type number. Received type number'); - const i = t.valueOf && t.valueOf(); - if (null != i && i !== t) return h.from(i, e, r); - const n = (function (t) { - if (h.isBuffer(t)) { - const e = 0 | p(t.length), - r = a(e); - return 0 === r.length || t.copy(r, 0, 0, e), r; - } - return void 0 !== t.length - ? 'number' != typeof t.length || Y(t.length) - ? a(0) - : l(t) - : 'Buffer' === t.type && Array.isArray(t.data) - ? l(t.data) - : void 0; - })(t); - if (n) return n; - if ('undefined' != typeof Symbol && null != Symbol.toPrimitive && 'function' == typeof t[Symbol.toPrimitive]) - return h.from(t[Symbol.toPrimitive]('string'), e, r); - throw new TypeError( - 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type ' + typeof t - ); - } - function f(t) { - if ('number' != typeof t) throw new TypeError('"size" argument must be of type number'); - if (t < 0) throw new RangeError('The value "' + t + '" is invalid for option "size"'); - } - function c(t) { - return f(t), a(t < 0 ? 0 : 0 | p(t)); - } - function l(t) { - const e = t.length < 0 ? 0 : 0 | p(t.length), - r = a(e); - for (let i = 0; i < e; i += 1) r[i] = 255 & t[i]; - return r; - } - function d(t, e, r) { - if (e < 0 || t.byteLength < e) throw new RangeError('"offset" is outside of buffer bounds'); - if (t.byteLength < e + (r || 0)) throw new RangeError('"length" is outside of buffer bounds'); - let i; - return ( - (i = void 0 === e && void 0 === r ? new Uint8Array(t) : void 0 === r ? new Uint8Array(t, e) : new Uint8Array(t, e, r)), - Object.setPrototypeOf(i, h.prototype), - i - ); - } - function p(t) { - if (t >= s) throw new RangeError('Attempt to allocate Buffer larger than maximum size: 0x' + s.toString(16) + ' bytes'); - return 0 | t; - } - function m(t, e) { - if (h.isBuffer(t)) return t.length; - if (ArrayBuffer.isView(t) || K(t, ArrayBuffer)) return t.byteLength; - if ('string' != typeof t) - throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + typeof t); - const r = t.length, - i = arguments.length > 2 && !0 === arguments[2]; - if (!i && 0 === r) return 0; - let n = !1; - for (;;) - switch (e) { - case 'ascii': - case 'latin1': - case 'binary': - return r; - case 'utf8': - case 'utf-8': - return G(t).length; - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return 2 * r; - case 'hex': - return r >>> 1; - case 'base64': - return V(t).length; - default: - if (n) return i ? -1 : G(t).length; - (e = ('' + e).toLowerCase()), (n = !0); - } - } - function g(t, e, r) { - let i = !1; - if (((void 0 === e || e < 0) && (e = 0), e > this.length)) return ''; - if (((void 0 === r || r > this.length) && (r = this.length), r <= 0)) return ''; - if ((r >>>= 0) <= (e >>>= 0)) return ''; - for (t || (t = 'utf8'); ; ) - switch (t) { - case 'hex': - return I(this, e, r); - case 'utf8': - case 'utf-8': - return A(this, e, r); - case 'ascii': - return R(this, e, r); - case 'latin1': - case 'binary': - return B(this, e, r); - case 'base64': - return x(this, e, r); - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return T(this, e, r); - default: - if (i) throw new TypeError('Unknown encoding: ' + t); - (t = (t + '').toLowerCase()), (i = !0); - } - } - function b(t, e, r) { - const i = t[e]; - (t[e] = t[r]), (t[r] = i); - } - function y(t, e, r, i, n) { - if (0 === t.length) return -1; - if ( - ('string' == typeof r ? ((i = r), (r = 0)) : r > 2147483647 ? (r = 2147483647) : r < -2147483648 && (r = -2147483648), - Y((r = +r)) && (r = n ? 0 : t.length - 1), - r < 0 && (r = t.length + r), - r >= t.length) - ) { - if (n) return -1; - r = t.length - 1; - } else if (r < 0) { - if (!n) return -1; - r = 0; - } - if (('string' == typeof e && (e = h.from(e, i)), h.isBuffer(e))) return 0 === e.length ? -1 : v(t, e, r, i, n); - if ('number' == typeof e) - return ( - (e &= 255), - 'function' == typeof Uint8Array.prototype.indexOf - ? n - ? Uint8Array.prototype.indexOf.call(t, e, r) - : Uint8Array.prototype.lastIndexOf.call(t, e, r) - : v(t, [e], r, i, n) - ); - throw new TypeError('val must be string, number or Buffer'); - } - function v(t, e, r, i, n) { - let o, - s = 1, - a = t.length, - h = e.length; - if (void 0 !== i && ('ucs2' === (i = String(i).toLowerCase()) || 'ucs-2' === i || 'utf16le' === i || 'utf-16le' === i)) { - if (t.length < 2 || e.length < 2) return -1; - (s = 2), (a /= 2), (h /= 2), (r /= 2); - } - function u(t, e) { - return 1 === s ? t[e] : t.readUInt16BE(e * s); - } - if (n) { - let i = -1; - for (o = r; o < a; o++) - if (u(t, o) === u(e, -1 === i ? 0 : o - i)) { - if ((-1 === i && (i = o), o - i + 1 === h)) return i * s; - } else -1 !== i && (o -= o - i), (i = -1); - } else - for (r + h > a && (r = a - h), o = r; o >= 0; o--) { - let r = !0; - for (let i = 0; i < h; i++) - if (u(t, o + i) !== u(e, i)) { - r = !1; - break; - } - if (r) return o; - } - return -1; - } - function w(t, e, r, i) { - r = Number(r) || 0; - const n = t.length - r; - i ? (i = Number(i)) > n && (i = n) : (i = n); - const o = e.length; - let s; - for (i > o / 2 && (i = o / 2), s = 0; s < i; ++s) { - const i = parseInt(e.substr(2 * s, 2), 16); - if (Y(i)) return s; - t[r + s] = i; - } - return s; - } - function _(t, e, r, i) { - return W(G(e, t.length - r), t, r, i); - } - function M(t, e, r, i) { - return W( - (function (t) { - const e = []; - for (let r = 0; r < t.length; ++r) e.push(255 & t.charCodeAt(r)); - return e; - })(e), - t, - r, - i - ); - } - function E(t, e, r, i) { - return W(V(e), t, r, i); - } - function S(t, e, r, i) { - return W( - (function (t, e) { - let r, i, n; - const o = []; - for (let s = 0; s < t.length && !((e -= 2) < 0); ++s) - (r = t.charCodeAt(s)), (i = r >> 8), (n = r % 256), o.push(n), o.push(i); - return o; - })(e, t.length - r), - t, - r, - i - ); - } - function x(t, e, r) { - return 0 === e && r === t.length ? i.fromByteArray(t) : i.fromByteArray(t.slice(e, r)); - } - function A(t, e, r) { - r = Math.min(t.length, r); - const i = []; - let n = e; - for (; n < r; ) { - const e = t[n]; - let o = null, - s = e > 239 ? 4 : e > 223 ? 3 : e > 191 ? 2 : 1; - if (n + s <= r) { - let r, i, a, h; - switch (s) { - case 1: - e < 128 && (o = e); - break; - case 2: - (r = t[n + 1]), 128 == (192 & r) && ((h = ((31 & e) << 6) | (63 & r)), h > 127 && (o = h)); - break; - case 3: - (r = t[n + 1]), - (i = t[n + 2]), - 128 == (192 & r) && - 128 == (192 & i) && - ((h = ((15 & e) << 12) | ((63 & r) << 6) | (63 & i)), h > 2047 && (h < 55296 || h > 57343) && (o = h)); - break; - case 4: - (r = t[n + 1]), - (i = t[n + 2]), - (a = t[n + 3]), - 128 == (192 & r) && - 128 == (192 & i) && - 128 == (192 & a) && - ((h = ((15 & e) << 18) | ((63 & r) << 12) | ((63 & i) << 6) | (63 & a)), h > 65535 && h < 1114112 && (o = h)); - } - } - null === o - ? ((o = 65533), (s = 1)) - : o > 65535 && ((o -= 65536), i.push(((o >>> 10) & 1023) | 55296), (o = 56320 | (1023 & o))), - i.push(o), - (n += s); - } - return (function (t) { - const e = t.length; - if (e <= k) return String.fromCharCode.apply(String, t); - let r = '', - i = 0; - for (; i < e; ) r += String.fromCharCode.apply(String, t.slice(i, (i += k))); - return r; - })(i); - } - (e.kMaxLength = s), - (h.TYPED_ARRAY_SUPPORT = (function () { - try { - const t = new Uint8Array(1), - e = { - foo: function () { - return 42; - }, - }; - return Object.setPrototypeOf(e, Uint8Array.prototype), Object.setPrototypeOf(t, e), 42 === t.foo(); - } catch (t) { - return !1; - } - })()), - h.TYPED_ARRAY_SUPPORT || - 'undefined' == typeof console || - 'function' != typeof console.error || - console.error( - 'This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.' - ), - Object.defineProperty(h.prototype, 'parent', { - enumerable: !0, - get: function () { - if (h.isBuffer(this)) return this.buffer; - }, - }), - Object.defineProperty(h.prototype, 'offset', { - enumerable: !0, - get: function () { - if (h.isBuffer(this)) return this.byteOffset; - }, - }), - (h.poolSize = 8192), - (h.from = function (t, e, r) { - return u(t, e, r); - }), - Object.setPrototypeOf(h.prototype, Uint8Array.prototype), - Object.setPrototypeOf(h, Uint8Array), - (h.alloc = function (t, e, r) { - return (function (t, e, r) { - return f(t), t <= 0 ? a(t) : void 0 !== e ? ('string' == typeof r ? a(t).fill(e, r) : a(t).fill(e)) : a(t); - })(t, e, r); - }), - (h.allocUnsafe = function (t) { - return c(t); - }), - (h.allocUnsafeSlow = function (t) { - return c(t); - }), - (h.isBuffer = function (t) { - return null != t && !0 === t._isBuffer && t !== h.prototype; - }), - (h.compare = function (t, e) { - if ( - (K(t, Uint8Array) && (t = h.from(t, t.offset, t.byteLength)), - K(e, Uint8Array) && (e = h.from(e, e.offset, e.byteLength)), - !h.isBuffer(t) || !h.isBuffer(e)) - ) - throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array'); - if (t === e) return 0; - let r = t.length, - i = e.length; - for (let n = 0, o = Math.min(r, i); n < o; ++n) - if (t[n] !== e[n]) { - (r = t[n]), (i = e[n]); - break; - } - return r < i ? -1 : i < r ? 1 : 0; - }), - (h.isEncoding = function (t) { - switch (String(t).toLowerCase()) { - case 'hex': - case 'utf8': - case 'utf-8': - case 'ascii': - case 'latin1': - case 'binary': - case 'base64': - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return !0; - default: - return !1; - } - }), - (h.concat = function (t, e) { - if (!Array.isArray(t)) throw new TypeError('"list" argument must be an Array of Buffers'); - if (0 === t.length) return h.alloc(0); - let r; - if (void 0 === e) for (e = 0, r = 0; r < t.length; ++r) e += t[r].length; - const i = h.allocUnsafe(e); - let n = 0; - for (r = 0; r < t.length; ++r) { - let e = t[r]; - if (K(e, Uint8Array)) - n + e.length > i.length ? (h.isBuffer(e) || (e = h.from(e)), e.copy(i, n)) : Uint8Array.prototype.set.call(i, e, n); - else { - if (!h.isBuffer(e)) throw new TypeError('"list" argument must be an Array of Buffers'); - e.copy(i, n); - } - n += e.length; - } - return i; - }), - (h.byteLength = m), - (h.prototype._isBuffer = !0), - (h.prototype.swap16 = function () { - const t = this.length; - if (t % 2 != 0) throw new RangeError('Buffer size must be a multiple of 16-bits'); - for (let e = 0; e < t; e += 2) b(this, e, e + 1); - return this; - }), - (h.prototype.swap32 = function () { - const t = this.length; - if (t % 4 != 0) throw new RangeError('Buffer size must be a multiple of 32-bits'); - for (let e = 0; e < t; e += 4) b(this, e, e + 3), b(this, e + 1, e + 2); - return this; - }), - (h.prototype.swap64 = function () { - const t = this.length; - if (t % 8 != 0) throw new RangeError('Buffer size must be a multiple of 64-bits'); - for (let e = 0; e < t; e += 8) b(this, e, e + 7), b(this, e + 1, e + 6), b(this, e + 2, e + 5), b(this, e + 3, e + 4); - return this; - }), - (h.prototype.toString = function () { - const t = this.length; - return 0 === t ? '' : 0 === arguments.length ? A(this, 0, t) : g.apply(this, arguments); - }), - (h.prototype.toLocaleString = h.prototype.toString), - (h.prototype.equals = function (t) { - if (!h.isBuffer(t)) throw new TypeError('Argument must be a Buffer'); - return this === t || 0 === h.compare(this, t); - }), - (h.prototype.inspect = function () { - let t = ''; - const r = e.INSPECT_MAX_BYTES; - return ( - (t = this.toString('hex', 0, r) - .replace(/(.{2})/g, '$1 ') - .trim()), - this.length > r && (t += ' ... '), - '' - ); - }), - o && (h.prototype[o] = h.prototype.inspect), - (h.prototype.compare = function (t, e, r, i, n) { - if ((K(t, Uint8Array) && (t = h.from(t, t.offset, t.byteLength)), !h.isBuffer(t))) - throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type ' + typeof t); - if ( - (void 0 === e && (e = 0), - void 0 === r && (r = t ? t.length : 0), - void 0 === i && (i = 0), - void 0 === n && (n = this.length), - e < 0 || r > t.length || i < 0 || n > this.length) - ) - throw new RangeError('out of range index'); - if (i >= n && e >= r) return 0; - if (i >= n) return -1; - if (e >= r) return 1; - if (this === t) return 0; - let o = (n >>>= 0) - (i >>>= 0), - s = (r >>>= 0) - (e >>>= 0); - const a = Math.min(o, s), - u = this.slice(i, n), - f = t.slice(e, r); - for (let t = 0; t < a; ++t) - if (u[t] !== f[t]) { - (o = u[t]), (s = f[t]); - break; - } - return o < s ? -1 : s < o ? 1 : 0; - }), - (h.prototype.includes = function (t, e, r) { - return -1 !== this.indexOf(t, e, r); - }), - (h.prototype.indexOf = function (t, e, r) { - return y(this, t, e, r, !0); - }), - (h.prototype.lastIndexOf = function (t, e, r) { - return y(this, t, e, r, !1); - }), - (h.prototype.write = function (t, e, r, i) { - if (void 0 === e) (i = 'utf8'), (r = this.length), (e = 0); - else if (void 0 === r && 'string' == typeof e) (i = e), (r = this.length), (e = 0); - else { - if (!isFinite(e)) throw new Error('Buffer.write(string, encoding, offset[, length]) is no longer supported'); - (e >>>= 0), isFinite(r) ? ((r >>>= 0), void 0 === i && (i = 'utf8')) : ((i = r), (r = void 0)); - } - const n = this.length - e; - if (((void 0 === r || r > n) && (r = n), (t.length > 0 && (r < 0 || e < 0)) || e > this.length)) - throw new RangeError('Attempt to write outside buffer bounds'); - i || (i = 'utf8'); - let o = !1; - for (;;) - switch (i) { - case 'hex': - return w(this, t, e, r); - case 'utf8': - case 'utf-8': - return _(this, t, e, r); - case 'ascii': - case 'latin1': - case 'binary': - return M(this, t, e, r); - case 'base64': - return E(this, t, e, r); - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return S(this, t, e, r); - default: - if (o) throw new TypeError('Unknown encoding: ' + i); - (i = ('' + i).toLowerCase()), (o = !0); - } - }), - (h.prototype.toJSON = function () { - return { type: 'Buffer', data: Array.prototype.slice.call(this._arr || this, 0) }; - }); - const k = 4096; - function R(t, e, r) { - let i = ''; - r = Math.min(t.length, r); - for (let n = e; n < r; ++n) i += String.fromCharCode(127 & t[n]); - return i; - } - function B(t, e, r) { - let i = ''; - r = Math.min(t.length, r); - for (let n = e; n < r; ++n) i += String.fromCharCode(t[n]); - return i; - } - function I(t, e, r) { - const i = t.length; - (!e || e < 0) && (e = 0), (!r || r < 0 || r > i) && (r = i); - let n = ''; - for (let i = e; i < r; ++i) n += J[t[i]]; - return n; - } - function T(t, e, r) { - const i = t.slice(e, r); - let n = ''; - for (let t = 0; t < i.length - 1; t += 2) n += String.fromCharCode(i[t] + 256 * i[t + 1]); - return n; - } - function P(t, e, r) { - if (t % 1 != 0 || t < 0) throw new RangeError('offset is not uint'); - if (t + e > r) throw new RangeError('Trying to access beyond buffer length'); - } - function O(t, e, r, i, n, o) { - if (!h.isBuffer(t)) throw new TypeError('"buffer" argument must be a Buffer instance'); - if (e > n || e < o) throw new RangeError('"value" argument is out of bounds'); - if (r + i > t.length) throw new RangeError('Index out of range'); - } - function L(t, e, r, i, n) { - q(e, i, n, t, r, 7); - let o = Number(e & BigInt(4294967295)); - (t[r++] = o), (o >>= 8), (t[r++] = o), (o >>= 8), (t[r++] = o), (o >>= 8), (t[r++] = o); - let s = Number((e >> BigInt(32)) & BigInt(4294967295)); - return (t[r++] = s), (s >>= 8), (t[r++] = s), (s >>= 8), (t[r++] = s), (s >>= 8), (t[r++] = s), r; - } - function C(t, e, r, i, n) { - q(e, i, n, t, r, 7); - let o = Number(e & BigInt(4294967295)); - (t[r + 7] = o), (o >>= 8), (t[r + 6] = o), (o >>= 8), (t[r + 5] = o), (o >>= 8), (t[r + 4] = o); - let s = Number((e >> BigInt(32)) & BigInt(4294967295)); - return (t[r + 3] = s), (s >>= 8), (t[r + 2] = s), (s >>= 8), (t[r + 1] = s), (s >>= 8), (t[r] = s), r + 8; - } - function N(t, e, r, i, n, o) { - if (r + i > t.length) throw new RangeError('Index out of range'); - if (r < 0) throw new RangeError('Index out of range'); - } - function j(t, e, r, i, o) { - return (e = +e), (r >>>= 0), o || N(t, 0, r, 4), n.write(t, e, r, i, 23, 4), r + 4; - } - function U(t, e, r, i, o) { - return (e = +e), (r >>>= 0), o || N(t, 0, r, 8), n.write(t, e, r, i, 52, 8), r + 8; - } - (h.prototype.slice = function (t, e) { - const r = this.length; - (t = ~~t) < 0 ? (t += r) < 0 && (t = 0) : t > r && (t = r), - (e = void 0 === e ? r : ~~e) < 0 ? (e += r) < 0 && (e = 0) : e > r && (e = r), - e < t && (e = t); - const i = this.subarray(t, e); - return Object.setPrototypeOf(i, h.prototype), i; - }), - (h.prototype.readUintLE = h.prototype.readUIntLE = - function (t, e, r) { - (t >>>= 0), (e >>>= 0), r || P(t, e, this.length); - let i = this[t], - n = 1, - o = 0; - for (; ++o < e && (n *= 256); ) i += this[t + o] * n; - return i; - }), - (h.prototype.readUintBE = h.prototype.readUIntBE = - function (t, e, r) { - (t >>>= 0), (e >>>= 0), r || P(t, e, this.length); - let i = this[t + --e], - n = 1; - for (; e > 0 && (n *= 256); ) i += this[t + --e] * n; - return i; - }), - (h.prototype.readUint8 = h.prototype.readUInt8 = - function (t, e) { - return (t >>>= 0), e || P(t, 1, this.length), this[t]; - }), - (h.prototype.readUint16LE = h.prototype.readUInt16LE = - function (t, e) { - return (t >>>= 0), e || P(t, 2, this.length), this[t] | (this[t + 1] << 8); - }), - (h.prototype.readUint16BE = h.prototype.readUInt16BE = - function (t, e) { - return (t >>>= 0), e || P(t, 2, this.length), (this[t] << 8) | this[t + 1]; - }), - (h.prototype.readUint32LE = h.prototype.readUInt32LE = - function (t, e) { - return (t >>>= 0), e || P(t, 4, this.length), (this[t] | (this[t + 1] << 8) | (this[t + 2] << 16)) + 16777216 * this[t + 3]; - }), - (h.prototype.readUint32BE = h.prototype.readUInt32BE = - function (t, e) { - return (t >>>= 0), e || P(t, 4, this.length), 16777216 * this[t] + ((this[t + 1] << 16) | (this[t + 2] << 8) | this[t + 3]); - }), - (h.prototype.readBigUInt64LE = X(function (t) { - H((t >>>= 0), 'offset'); - const e = this[t], - r = this[t + 7]; - (void 0 !== e && void 0 !== r) || $(t, this.length - 8); - const i = e + 256 * this[++t] + 65536 * this[++t] + this[++t] * 2 ** 24, - n = this[++t] + 256 * this[++t] + 65536 * this[++t] + r * 2 ** 24; - return BigInt(i) + (BigInt(n) << BigInt(32)); - })), - (h.prototype.readBigUInt64BE = X(function (t) { - H((t >>>= 0), 'offset'); - const e = this[t], - r = this[t + 7]; - (void 0 !== e && void 0 !== r) || $(t, this.length - 8); - const i = e * 2 ** 24 + 65536 * this[++t] + 256 * this[++t] + this[++t], - n = this[++t] * 2 ** 24 + 65536 * this[++t] + 256 * this[++t] + r; - return (BigInt(i) << BigInt(32)) + BigInt(n); - })), - (h.prototype.readIntLE = function (t, e, r) { - (t >>>= 0), (e >>>= 0), r || P(t, e, this.length); - let i = this[t], - n = 1, - o = 0; - for (; ++o < e && (n *= 256); ) i += this[t + o] * n; - return (n *= 128), i >= n && (i -= Math.pow(2, 8 * e)), i; - }), - (h.prototype.readIntBE = function (t, e, r) { - (t >>>= 0), (e >>>= 0), r || P(t, e, this.length); - let i = e, - n = 1, - o = this[t + --i]; - for (; i > 0 && (n *= 256); ) o += this[t + --i] * n; - return (n *= 128), o >= n && (o -= Math.pow(2, 8 * e)), o; - }), - (h.prototype.readInt8 = function (t, e) { - return (t >>>= 0), e || P(t, 1, this.length), 128 & this[t] ? -1 * (255 - this[t] + 1) : this[t]; - }), - (h.prototype.readInt16LE = function (t, e) { - (t >>>= 0), e || P(t, 2, this.length); - const r = this[t] | (this[t + 1] << 8); - return 32768 & r ? 4294901760 | r : r; - }), - (h.prototype.readInt16BE = function (t, e) { - (t >>>= 0), e || P(t, 2, this.length); - const r = this[t + 1] | (this[t] << 8); - return 32768 & r ? 4294901760 | r : r; - }), - (h.prototype.readInt32LE = function (t, e) { - return (t >>>= 0), e || P(t, 4, this.length), this[t] | (this[t + 1] << 8) | (this[t + 2] << 16) | (this[t + 3] << 24); - }), - (h.prototype.readInt32BE = function (t, e) { - return (t >>>= 0), e || P(t, 4, this.length), (this[t] << 24) | (this[t + 1] << 16) | (this[t + 2] << 8) | this[t + 3]; - }), - (h.prototype.readBigInt64LE = X(function (t) { - H((t >>>= 0), 'offset'); - const e = this[t], - r = this[t + 7]; - (void 0 !== e && void 0 !== r) || $(t, this.length - 8); - const i = this[t + 4] + 256 * this[t + 5] + 65536 * this[t + 6] + (r << 24); - return (BigInt(i) << BigInt(32)) + BigInt(e + 256 * this[++t] + 65536 * this[++t] + this[++t] * 2 ** 24); - })), - (h.prototype.readBigInt64BE = X(function (t) { - H((t >>>= 0), 'offset'); - const e = this[t], - r = this[t + 7]; - (void 0 !== e && void 0 !== r) || $(t, this.length - 8); - const i = (e << 24) + 65536 * this[++t] + 256 * this[++t] + this[++t]; - return (BigInt(i) << BigInt(32)) + BigInt(this[++t] * 2 ** 24 + 65536 * this[++t] + 256 * this[++t] + r); - })), - (h.prototype.readFloatLE = function (t, e) { - return (t >>>= 0), e || P(t, 4, this.length), n.read(this, t, !0, 23, 4); - }), - (h.prototype.readFloatBE = function (t, e) { - return (t >>>= 0), e || P(t, 4, this.length), n.read(this, t, !1, 23, 4); - }), - (h.prototype.readDoubleLE = function (t, e) { - return (t >>>= 0), e || P(t, 8, this.length), n.read(this, t, !0, 52, 8); - }), - (h.prototype.readDoubleBE = function (t, e) { - return (t >>>= 0), e || P(t, 8, this.length), n.read(this, t, !1, 52, 8); - }), - (h.prototype.writeUintLE = h.prototype.writeUIntLE = - function (t, e, r, i) { - (t = +t), (e >>>= 0), (r >>>= 0), i || O(this, t, e, r, Math.pow(2, 8 * r) - 1, 0); - let n = 1, - o = 0; - for (this[e] = 255 & t; ++o < r && (n *= 256); ) this[e + o] = (t / n) & 255; - return e + r; - }), - (h.prototype.writeUintBE = h.prototype.writeUIntBE = - function (t, e, r, i) { - (t = +t), (e >>>= 0), (r >>>= 0), i || O(this, t, e, r, Math.pow(2, 8 * r) - 1, 0); - let n = r - 1, - o = 1; - for (this[e + n] = 255 & t; --n >= 0 && (o *= 256); ) this[e + n] = (t / o) & 255; - return e + r; - }), - (h.prototype.writeUint8 = h.prototype.writeUInt8 = - function (t, e, r) { - return (t = +t), (e >>>= 0), r || O(this, t, e, 1, 255, 0), (this[e] = 255 & t), e + 1; - }), - (h.prototype.writeUint16LE = h.prototype.writeUInt16LE = - function (t, e, r) { - return (t = +t), (e >>>= 0), r || O(this, t, e, 2, 65535, 0), (this[e] = 255 & t), (this[e + 1] = t >>> 8), e + 2; - }), - (h.prototype.writeUint16BE = h.prototype.writeUInt16BE = - function (t, e, r) { - return (t = +t), (e >>>= 0), r || O(this, t, e, 2, 65535, 0), (this[e] = t >>> 8), (this[e + 1] = 255 & t), e + 2; - }), - (h.prototype.writeUint32LE = h.prototype.writeUInt32LE = - function (t, e, r) { - return ( - (t = +t), - (e >>>= 0), - r || O(this, t, e, 4, 4294967295, 0), - (this[e + 3] = t >>> 24), - (this[e + 2] = t >>> 16), - (this[e + 1] = t >>> 8), - (this[e] = 255 & t), - e + 4 - ); - }), - (h.prototype.writeUint32BE = h.prototype.writeUInt32BE = - function (t, e, r) { - return ( - (t = +t), - (e >>>= 0), - r || O(this, t, e, 4, 4294967295, 0), - (this[e] = t >>> 24), - (this[e + 1] = t >>> 16), - (this[e + 2] = t >>> 8), - (this[e + 3] = 255 & t), - e + 4 - ); - }), - (h.prototype.writeBigUInt64LE = X(function (t, e = 0) { - return L(this, t, e, BigInt(0), BigInt('0xffffffffffffffff')); - })), - (h.prototype.writeBigUInt64BE = X(function (t, e = 0) { - return C(this, t, e, BigInt(0), BigInt('0xffffffffffffffff')); - })), - (h.prototype.writeIntLE = function (t, e, r, i) { - if (((t = +t), (e >>>= 0), !i)) { - const i = Math.pow(2, 8 * r - 1); - O(this, t, e, r, i - 1, -i); - } - let n = 0, - o = 1, - s = 0; - for (this[e] = 255 & t; ++n < r && (o *= 256); ) - t < 0 && 0 === s && 0 !== this[e + n - 1] && (s = 1), (this[e + n] = (((t / o) >> 0) - s) & 255); - return e + r; - }), - (h.prototype.writeIntBE = function (t, e, r, i) { - if (((t = +t), (e >>>= 0), !i)) { - const i = Math.pow(2, 8 * r - 1); - O(this, t, e, r, i - 1, -i); - } - let n = r - 1, - o = 1, - s = 0; - for (this[e + n] = 255 & t; --n >= 0 && (o *= 256); ) - t < 0 && 0 === s && 0 !== this[e + n + 1] && (s = 1), (this[e + n] = (((t / o) >> 0) - s) & 255); - return e + r; - }), - (h.prototype.writeInt8 = function (t, e, r) { - return (t = +t), (e >>>= 0), r || O(this, t, e, 1, 127, -128), t < 0 && (t = 255 + t + 1), (this[e] = 255 & t), e + 1; - }), - (h.prototype.writeInt16LE = function (t, e, r) { - return (t = +t), (e >>>= 0), r || O(this, t, e, 2, 32767, -32768), (this[e] = 255 & t), (this[e + 1] = t >>> 8), e + 2; - }), - (h.prototype.writeInt16BE = function (t, e, r) { - return (t = +t), (e >>>= 0), r || O(this, t, e, 2, 32767, -32768), (this[e] = t >>> 8), (this[e + 1] = 255 & t), e + 2; - }), - (h.prototype.writeInt32LE = function (t, e, r) { - return ( - (t = +t), - (e >>>= 0), - r || O(this, t, e, 4, 2147483647, -2147483648), - (this[e] = 255 & t), - (this[e + 1] = t >>> 8), - (this[e + 2] = t >>> 16), - (this[e + 3] = t >>> 24), - e + 4 - ); - }), - (h.prototype.writeInt32BE = function (t, e, r) { - return ( - (t = +t), - (e >>>= 0), - r || O(this, t, e, 4, 2147483647, -2147483648), - t < 0 && (t = 4294967295 + t + 1), - (this[e] = t >>> 24), - (this[e + 1] = t >>> 16), - (this[e + 2] = t >>> 8), - (this[e + 3] = 255 & t), - e + 4 - ); - }), - (h.prototype.writeBigInt64LE = X(function (t, e = 0) { - return L(this, t, e, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff')); - })), - (h.prototype.writeBigInt64BE = X(function (t, e = 0) { - return C(this, t, e, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff')); - })), - (h.prototype.writeFloatLE = function (t, e, r) { - return j(this, t, e, !0, r); - }), - (h.prototype.writeFloatBE = function (t, e, r) { - return j(this, t, e, !1, r); - }), - (h.prototype.writeDoubleLE = function (t, e, r) { - return U(this, t, e, !0, r); - }), - (h.prototype.writeDoubleBE = function (t, e, r) { - return U(this, t, e, !1, r); - }), - (h.prototype.copy = function (t, e, r, i) { - if (!h.isBuffer(t)) throw new TypeError('argument should be a Buffer'); - if ( - (r || (r = 0), - i || 0 === i || (i = this.length), - e >= t.length && (e = t.length), - e || (e = 0), - i > 0 && i < r && (i = r), - i === r) - ) - return 0; - if (0 === t.length || 0 === this.length) return 0; - if (e < 0) throw new RangeError('targetStart out of bounds'); - if (r < 0 || r >= this.length) throw new RangeError('Index out of range'); - if (i < 0) throw new RangeError('sourceEnd out of bounds'); - i > this.length && (i = this.length), t.length - e < i - r && (i = t.length - e + r); - const n = i - r; - return ( - this === t && 'function' == typeof Uint8Array.prototype.copyWithin - ? this.copyWithin(e, r, i) - : Uint8Array.prototype.set.call(t, this.subarray(r, i), e), - n - ); - }), - (h.prototype.fill = function (t, e, r, i) { - if ('string' == typeof t) { - if ( - ('string' == typeof e ? ((i = e), (e = 0), (r = this.length)) : 'string' == typeof r && ((i = r), (r = this.length)), - void 0 !== i && 'string' != typeof i) - ) - throw new TypeError('encoding must be a string'); - if ('string' == typeof i && !h.isEncoding(i)) throw new TypeError('Unknown encoding: ' + i); - if (1 === t.length) { - const e = t.charCodeAt(0); - (('utf8' === i && e < 128) || 'latin1' === i) && (t = e); - } - } else 'number' == typeof t ? (t &= 255) : 'boolean' == typeof t && (t = Number(t)); - if (e < 0 || this.length < e || this.length < r) throw new RangeError('Out of range index'); - if (r <= e) return this; - let n; - if (((e >>>= 0), (r = void 0 === r ? this.length : r >>> 0), t || (t = 0), 'number' == typeof t)) - for (n = e; n < r; ++n) this[n] = t; - else { - const o = h.isBuffer(t) ? t : h.from(t, i), - s = o.length; - if (0 === s) throw new TypeError('The value "' + t + '" is invalid for argument "value"'); - for (n = 0; n < r - e; ++n) this[n + e] = o[n % s]; - } - return this; - }); - const D = {}; - function z(t, e, r) { - D[t] = class extends r { - constructor() { - super(), - Object.defineProperty(this, 'message', { value: e.apply(this, arguments), writable: !0, configurable: !0 }), - (this.name = `${this.name} [${t}]`), - this.stack, - delete this.name; - } - get code() { - return t; - } - set code(t) { - Object.defineProperty(this, 'code', { configurable: !0, enumerable: !0, value: t, writable: !0 }); - } - toString() { - return `${this.name} [${t}]: ${this.message}`; - } - }; - } - function F(t) { - let e = '', - r = t.length; - const i = '-' === t[0] ? 1 : 0; - for (; r >= i + 4; r -= 3) e = `_${t.slice(r - 3, r)}${e}`; - return `${t.slice(0, r)}${e}`; - } - function q(t, e, r, i, n, o) { - if (t > r || t < e) { - const i = 'bigint' == typeof e ? 'n' : ''; - let n; - throw ( - ((n = - o > 3 - ? 0 === e || e === BigInt(0) - ? `>= 0${i} and < 2${i} ** ${8 * (o + 1)}${i}` - : `>= -(2${i} ** ${8 * (o + 1) - 1}${i}) and < 2 ** ${8 * (o + 1) - 1}${i}` - : `>= ${e}${i} and <= ${r}${i}`), - new D.ERR_OUT_OF_RANGE('value', n, t)) - ); - } - !(function (t, e, r) { - H(e, 'offset'), (void 0 !== t[e] && void 0 !== t[e + r]) || $(e, t.length - (r + 1)); - })(i, n, o); - } - function H(t, e) { - if ('number' != typeof t) throw new D.ERR_INVALID_ARG_TYPE(e, 'number', t); - } - function $(t, e, r) { - if (Math.floor(t) !== t) throw (H(t, r), new D.ERR_OUT_OF_RANGE(r || 'offset', 'an integer', t)); - if (e < 0) throw new D.ERR_BUFFER_OUT_OF_BOUNDS(); - throw new D.ERR_OUT_OF_RANGE(r || 'offset', `>= ${r ? 1 : 0} and <= ${e}`, t); - } - z( - 'ERR_BUFFER_OUT_OF_BOUNDS', - function (t) { - return t ? `${t} is outside of buffer bounds` : 'Attempt to access memory outside buffer bounds'; - }, - RangeError - ), - z( - 'ERR_INVALID_ARG_TYPE', - function (t, e) { - return `The "${t}" argument must be of type number. Received type ${typeof e}`; - }, - TypeError - ), - z( - 'ERR_OUT_OF_RANGE', - function (t, e, r) { - let i = `The value of "${t}" is out of range.`, - n = r; - return ( - Number.isInteger(r) && Math.abs(r) > 2 ** 32 - ? (n = F(String(r))) - : 'bigint' == typeof r && - ((n = String(r)), (r > BigInt(2) ** BigInt(32) || r < -(BigInt(2) ** BigInt(32))) && (n = F(n)), (n += 'n')), - (i += ` It must be ${e}. Received ${n}`), - i - ); - }, - RangeError - ); - const Z = /[^+/0-9A-Za-z-_]/g; - function G(t, e) { - let r; - e = e || 1 / 0; - const i = t.length; - let n = null; - const o = []; - for (let s = 0; s < i; ++s) { - if (((r = t.charCodeAt(s)), r > 55295 && r < 57344)) { - if (!n) { - if (r > 56319) { - (e -= 3) > -1 && o.push(239, 191, 189); - continue; - } - if (s + 1 === i) { - (e -= 3) > -1 && o.push(239, 191, 189); - continue; - } - n = r; - continue; - } - if (r < 56320) { - (e -= 3) > -1 && o.push(239, 191, 189), (n = r); - continue; - } - r = 65536 + (((n - 55296) << 10) | (r - 56320)); - } else n && (e -= 3) > -1 && o.push(239, 191, 189); - if (((n = null), r < 128)) { - if ((e -= 1) < 0) break; - o.push(r); - } else if (r < 2048) { - if ((e -= 2) < 0) break; - o.push((r >> 6) | 192, (63 & r) | 128); - } else if (r < 65536) { - if ((e -= 3) < 0) break; - o.push((r >> 12) | 224, ((r >> 6) & 63) | 128, (63 & r) | 128); - } else { - if (!(r < 1114112)) throw new Error('Invalid code point'); - if ((e -= 4) < 0) break; - o.push((r >> 18) | 240, ((r >> 12) & 63) | 128, ((r >> 6) & 63) | 128, (63 & r) | 128); - } - } - return o; - } - function V(t) { - return i.toByteArray( - (function (t) { - if ((t = (t = t.split('=')[0]).trim().replace(Z, '')).length < 2) return ''; - for (; t.length % 4 != 0; ) t += '='; - return t; - })(t) - ); - } - function W(t, e, r, i) { - let n; - for (n = 0; n < i && !(n + r >= e.length || n >= t.length); ++n) e[n + r] = t[n]; - return n; - } - function K(t, e) { - return t instanceof e || (null != t && null != t.constructor && null != t.constructor.name && t.constructor.name === e.name); - } - function Y(t) { - return t != t; - } - const J = (function () { - const t = '0123456789abcdef', - e = new Array(256); - for (let r = 0; r < 16; ++r) { - const i = 16 * r; - for (let n = 0; n < 16; ++n) e[i + n] = t[r] + t[n]; - } - return e; - })(); - function X(t) { - return 'undefined' == typeof BigInt ? Q : t; - } - function Q() { - throw new Error('BigInt not supported'); - } - }, - 3081: (t, e, r) => { - var i = r(7172).Buffer, - n = r(3424).Transform, - o = r(4361).s; - function s(t) { - n.call(this), - (this.hashMode = 'string' == typeof t), - this.hashMode ? (this[t] = this._finalOrDigest) : (this.final = this._finalOrDigest), - this._final && ((this.__final = this._final), (this._final = null)), - (this._decoder = null), - (this._encoding = null); - } - r(87)(s, n), - (s.prototype.update = function (t, e, r) { - 'string' == typeof t && (t = i.from(t, e)); - var n = this._update(t); - return this.hashMode ? this : (r && (n = this._toString(n, r)), n); - }), - (s.prototype.setAutoPadding = function () {}), - (s.prototype.getAuthTag = function () { - throw new Error('trying to get auth tag in unsupported state'); - }), - (s.prototype.setAuthTag = function () { - throw new Error('trying to set auth tag in unsupported state'); - }), - (s.prototype.setAAD = function () { - throw new Error('trying to set aad in unsupported state'); - }), - (s.prototype._transform = function (t, e, r) { - var i; - try { - this.hashMode ? this._update(t) : this.push(this._update(t)); - } catch (t) { - i = t; - } finally { - r(i); - } - }), - (s.prototype._flush = function (t) { - var e; - try { - this.push(this.__final()); - } catch (t) { - e = t; - } - t(e); - }), - (s.prototype._finalOrDigest = function (t) { - var e = this.__final() || i.alloc(0); - return t && (e = this._toString(e, t, !0)), e; - }), - (s.prototype._toString = function (t, e, r) { - if ((this._decoder || ((this._decoder = new o(e)), (this._encoding = e)), this._encoding !== e)) - throw new Error("can't switch encodings"); - var i = this._decoder.write(t); - return r && (i += this._decoder.end()), i; - }), - (t.exports = s); - }, - 2220: (t, e, r) => { - var i = r(9749), - n = r(3626); - t.exports = function (t) { - return new s(t); - }; - var o = { - secp256k1: { name: 'secp256k1', byteLength: 32 }, - secp224r1: { name: 'p224', byteLength: 28 }, - prime256v1: { name: 'p256', byteLength: 32 }, - prime192v1: { name: 'p192', byteLength: 24 }, - ed25519: { name: 'ed25519', byteLength: 32 }, - secp384r1: { name: 'p384', byteLength: 48 }, - secp521r1: { name: 'p521', byteLength: 66 }, - }; - function s(t) { - (this.curveType = o[t]), - this.curveType || (this.curveType = { name: t }), - (this.curve = new i.ec(this.curveType.name)), - (this.keys = void 0); - } - function a(t, e, r) { - Array.isArray(t) || (t = t.toArray()); - var i = new Buffer(t); - if (r && i.length < r) { - var n = new Buffer(r - i.length); - n.fill(0), (i = Buffer.concat([n, i])); - } - return e ? i.toString(e) : i; - } - (o.p224 = o.secp224r1), - (o.p256 = o.secp256r1 = o.prime256v1), - (o.p192 = o.secp192r1 = o.prime192v1), - (o.p384 = o.secp384r1), - (o.p521 = o.secp521r1), - (s.prototype.generateKeys = function (t, e) { - return (this.keys = this.curve.genKeyPair()), this.getPublicKey(t, e); - }), - (s.prototype.computeSecret = function (t, e, r) { - return ( - (e = e || 'utf8'), - Buffer.isBuffer(t) || (t = new Buffer(t, e)), - a(this.curve.keyFromPublic(t).getPublic().mul(this.keys.getPrivate()).getX(), r, this.curveType.byteLength) - ); - }), - (s.prototype.getPublicKey = function (t, e) { - var r = this.keys.getPublic('compressed' === e, !0); - return 'hybrid' === e && (r[r.length - 1] % 2 ? (r[0] = 7) : (r[0] = 6)), a(r, t); - }), - (s.prototype.getPrivateKey = function (t) { - return a(this.keys.getPrivate(), t); - }), - (s.prototype.setPublicKey = function (t, e) { - return (e = e || 'utf8'), Buffer.isBuffer(t) || (t = new Buffer(t, e)), this.keys._importPublic(t), this; - }), - (s.prototype.setPrivateKey = function (t, e) { - (e = e || 'utf8'), Buffer.isBuffer(t) || (t = new Buffer(t, e)); - var r = new n(t); - return (r = r.toString(16)), (this.keys = this.curve.genKeyPair()), this.keys._importPrivate(r), this; - }); - }, - 3626: function (t, e, r) { - !(function (t, e) { - 'use strict'; - function i(t, e) { - if (!t) throw new Error(e || 'Assertion failed'); - } - function n(t, e) { - t.super_ = e; - var r = function () {}; - (r.prototype = e.prototype), (t.prototype = new r()), (t.prototype.constructor = t); - } - function o(t, e, r) { - if (o.isBN(t)) return t; - (this.negative = 0), - (this.words = null), - (this.length = 0), - (this.red = null), - null !== t && (('le' !== e && 'be' !== e) || ((r = e), (e = 10)), this._init(t || 0, e || 10, r || 'be')); - } - var s; - 'object' == typeof t ? (t.exports = o) : (e.BN = o), (o.BN = o), (o.wordSize = 26); - try { - s = 'undefined' != typeof window && void 0 !== window.Buffer ? window.Buffer : r(6611).Buffer; - } catch (t) {} - function a(t, e) { - var r = t.charCodeAt(e); - return r >= 65 && r <= 70 ? r - 55 : r >= 97 && r <= 102 ? r - 87 : (r - 48) & 15; - } - function h(t, e, r) { - var i = a(t, r); - return r - 1 >= e && (i |= a(t, r - 1) << 4), i; - } - function u(t, e, r, i) { - for (var n = 0, o = Math.min(t.length, r), s = e; s < o; s++) { - var a = t.charCodeAt(s) - 48; - (n *= i), (n += a >= 49 ? a - 49 + 10 : a >= 17 ? a - 17 + 10 : a); - } - return n; - } - (o.isBN = function (t) { - return ( - t instanceof o || (null !== t && 'object' == typeof t && t.constructor.wordSize === o.wordSize && Array.isArray(t.words)) - ); - }), - (o.max = function (t, e) { - return t.cmp(e) > 0 ? t : e; - }), - (o.min = function (t, e) { - return t.cmp(e) < 0 ? t : e; - }), - (o.prototype._init = function (t, e, r) { - if ('number' == typeof t) return this._initNumber(t, e, r); - if ('object' == typeof t) return this._initArray(t, e, r); - 'hex' === e && (e = 16), i(e === (0 | e) && e >= 2 && e <= 36); - var n = 0; - '-' === (t = t.toString().replace(/\s+/g, ''))[0] && (n++, (this.negative = 1)), - n < t.length && - (16 === e ? this._parseHex(t, n, r) : (this._parseBase(t, e, n), 'le' === r && this._initArray(this.toArray(), e, r))); - }), - (o.prototype._initNumber = function (t, e, r) { - t < 0 && ((this.negative = 1), (t = -t)), - t < 67108864 - ? ((this.words = [67108863 & t]), (this.length = 1)) - : t < 4503599627370496 - ? ((this.words = [67108863 & t, (t / 67108864) & 67108863]), (this.length = 2)) - : (i(t < 9007199254740992), (this.words = [67108863 & t, (t / 67108864) & 67108863, 1]), (this.length = 3)), - 'le' === r && this._initArray(this.toArray(), e, r); - }), - (o.prototype._initArray = function (t, e, r) { - if ((i('number' == typeof t.length), t.length <= 0)) return (this.words = [0]), (this.length = 1), this; - (this.length = Math.ceil(t.length / 3)), (this.words = new Array(this.length)); - for (var n = 0; n < this.length; n++) this.words[n] = 0; - var o, - s, - a = 0; - if ('be' === r) - for (n = t.length - 1, o = 0; n >= 0; n -= 3) - (s = t[n] | (t[n - 1] << 8) | (t[n - 2] << 16)), - (this.words[o] |= (s << a) & 67108863), - (this.words[o + 1] = (s >>> (26 - a)) & 67108863), - (a += 24) >= 26 && ((a -= 26), o++); - else if ('le' === r) - for (n = 0, o = 0; n < t.length; n += 3) - (s = t[n] | (t[n + 1] << 8) | (t[n + 2] << 16)), - (this.words[o] |= (s << a) & 67108863), - (this.words[o + 1] = (s >>> (26 - a)) & 67108863), - (a += 24) >= 26 && ((a -= 26), o++); - return this.strip(); - }), - (o.prototype._parseHex = function (t, e, r) { - (this.length = Math.ceil((t.length - e) / 6)), (this.words = new Array(this.length)); - for (var i = 0; i < this.length; i++) this.words[i] = 0; - var n, - o = 0, - s = 0; - if ('be' === r) - for (i = t.length - 1; i >= e; i -= 2) - (n = h(t, e, i) << o), - (this.words[s] |= 67108863 & n), - o >= 18 ? ((o -= 18), (s += 1), (this.words[s] |= n >>> 26)) : (o += 8); - else - for (i = (t.length - e) % 2 == 0 ? e + 1 : e; i < t.length; i += 2) - (n = h(t, e, i) << o), - (this.words[s] |= 67108863 & n), - o >= 18 ? ((o -= 18), (s += 1), (this.words[s] |= n >>> 26)) : (o += 8); - this.strip(); - }), - (o.prototype._parseBase = function (t, e, r) { - (this.words = [0]), (this.length = 1); - for (var i = 0, n = 1; n <= 67108863; n *= e) i++; - i--, (n = (n / e) | 0); - for (var o = t.length - r, s = o % i, a = Math.min(o, o - s) + r, h = 0, f = r; f < a; f += i) - (h = u(t, f, f + i, e)), this.imuln(n), this.words[0] + h < 67108864 ? (this.words[0] += h) : this._iaddn(h); - if (0 !== s) { - var c = 1; - for (h = u(t, f, t.length, e), f = 0; f < s; f++) c *= e; - this.imuln(c), this.words[0] + h < 67108864 ? (this.words[0] += h) : this._iaddn(h); - } - this.strip(); - }), - (o.prototype.copy = function (t) { - t.words = new Array(this.length); - for (var e = 0; e < this.length; e++) t.words[e] = this.words[e]; - (t.length = this.length), (t.negative = this.negative), (t.red = this.red); - }), - (o.prototype.clone = function () { - var t = new o(null); - return this.copy(t), t; - }), - (o.prototype._expand = function (t) { - for (; this.length < t; ) this.words[this.length++] = 0; - return this; - }), - (o.prototype.strip = function () { - for (; this.length > 1 && 0 === this.words[this.length - 1]; ) this.length--; - return this._normSign(); - }), - (o.prototype._normSign = function () { - return 1 === this.length && 0 === this.words[0] && (this.negative = 0), this; - }), - (o.prototype.inspect = function () { - return (this.red ? ''; - }); - var f = [ - '', - '0', - '00', - '000', - '0000', - '00000', - '000000', - '0000000', - '00000000', - '000000000', - '0000000000', - '00000000000', - '000000000000', - '0000000000000', - '00000000000000', - '000000000000000', - '0000000000000000', - '00000000000000000', - '000000000000000000', - '0000000000000000000', - '00000000000000000000', - '000000000000000000000', - '0000000000000000000000', - '00000000000000000000000', - '000000000000000000000000', - '0000000000000000000000000', - ], - c = [0, 0, 25, 16, 12, 11, 10, 9, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5], - l = [ - 0, 0, 33554432, 43046721, 16777216, 48828125, 60466176, 40353607, 16777216, 43046721, 1e7, 19487171, 35831808, 62748517, - 7529536, 11390625, 16777216, 24137569, 34012224, 47045881, 64e6, 4084101, 5153632, 6436343, 7962624, 9765625, 11881376, - 14348907, 17210368, 20511149, 243e5, 28629151, 33554432, 39135393, 45435424, 52521875, 60466176, - ]; - function d(t, e, r) { - r.negative = e.negative ^ t.negative; - var i = (t.length + e.length) | 0; - (r.length = i), (i = (i - 1) | 0); - var n = 0 | t.words[0], - o = 0 | e.words[0], - s = n * o, - a = 67108863 & s, - h = (s / 67108864) | 0; - r.words[0] = a; - for (var u = 1; u < i; u++) { - for (var f = h >>> 26, c = 67108863 & h, l = Math.min(u, e.length - 1), d = Math.max(0, u - t.length + 1); d <= l; d++) { - var p = (u - d) | 0; - (f += ((s = (n = 0 | t.words[p]) * (o = 0 | e.words[d]) + c) / 67108864) | 0), (c = 67108863 & s); - } - (r.words[u] = 0 | c), (h = 0 | f); - } - return 0 !== h ? (r.words[u] = 0 | h) : r.length--, r.strip(); - } - (o.prototype.toString = function (t, e) { - var r; - if (((e = 0 | e || 1), 16 === (t = t || 10) || 'hex' === t)) { - r = ''; - for (var n = 0, o = 0, s = 0; s < this.length; s++) { - var a = this.words[s], - h = (16777215 & ((a << n) | o)).toString(16); - (r = 0 != (o = (a >>> (24 - n)) & 16777215) || s !== this.length - 1 ? f[6 - h.length] + h + r : h + r), - (n += 2) >= 26 && ((n -= 26), s--); - } - for (0 !== o && (r = o.toString(16) + r); r.length % e != 0; ) r = '0' + r; - return 0 !== this.negative && (r = '-' + r), r; - } - if (t === (0 | t) && t >= 2 && t <= 36) { - var u = c[t], - d = l[t]; - r = ''; - var p = this.clone(); - for (p.negative = 0; !p.isZero(); ) { - var m = p.modn(d).toString(t); - r = (p = p.idivn(d)).isZero() ? m + r : f[u - m.length] + m + r; - } - for (this.isZero() && (r = '0' + r); r.length % e != 0; ) r = '0' + r; - return 0 !== this.negative && (r = '-' + r), r; - } - i(!1, 'Base should be between 2 and 36'); - }), - (o.prototype.toNumber = function () { - var t = this.words[0]; - return ( - 2 === this.length - ? (t += 67108864 * this.words[1]) - : 3 === this.length && 1 === this.words[2] - ? (t += 4503599627370496 + 67108864 * this.words[1]) - : this.length > 2 && i(!1, 'Number can only safely store up to 53 bits'), - 0 !== this.negative ? -t : t - ); - }), - (o.prototype.toJSON = function () { - return this.toString(16); - }), - (o.prototype.toBuffer = function (t, e) { - return i(void 0 !== s), this.toArrayLike(s, t, e); - }), - (o.prototype.toArray = function (t, e) { - return this.toArrayLike(Array, t, e); - }), - (o.prototype.toArrayLike = function (t, e, r) { - var n = this.byteLength(), - o = r || Math.max(1, n); - i(n <= o, 'byte array longer than desired length'), i(o > 0, 'Requested array length <= 0'), this.strip(); - var s, - a, - h = 'le' === e, - u = new t(o), - f = this.clone(); - if (h) { - for (a = 0; !f.isZero(); a++) (s = f.andln(255)), f.iushrn(8), (u[a] = s); - for (; a < o; a++) u[a] = 0; - } else { - for (a = 0; a < o - n; a++) u[a] = 0; - for (a = 0; !f.isZero(); a++) (s = f.andln(255)), f.iushrn(8), (u[o - a - 1] = s); - } - return u; - }), - Math.clz32 - ? (o.prototype._countBits = function (t) { - return 32 - Math.clz32(t); - }) - : (o.prototype._countBits = function (t) { - var e = t, - r = 0; - return ( - e >= 4096 && ((r += 13), (e >>>= 13)), - e >= 64 && ((r += 7), (e >>>= 7)), - e >= 8 && ((r += 4), (e >>>= 4)), - e >= 2 && ((r += 2), (e >>>= 2)), - r + e - ); - }), - (o.prototype._zeroBits = function (t) { - if (0 === t) return 26; - var e = t, - r = 0; - return ( - 0 == (8191 & e) && ((r += 13), (e >>>= 13)), - 0 == (127 & e) && ((r += 7), (e >>>= 7)), - 0 == (15 & e) && ((r += 4), (e >>>= 4)), - 0 == (3 & e) && ((r += 2), (e >>>= 2)), - 0 == (1 & e) && r++, - r - ); - }), - (o.prototype.bitLength = function () { - var t = this.words[this.length - 1], - e = this._countBits(t); - return 26 * (this.length - 1) + e; - }), - (o.prototype.zeroBits = function () { - if (this.isZero()) return 0; - for (var t = 0, e = 0; e < this.length; e++) { - var r = this._zeroBits(this.words[e]); - if (((t += r), 26 !== r)) break; - } - return t; - }), - (o.prototype.byteLength = function () { - return Math.ceil(this.bitLength() / 8); - }), - (o.prototype.toTwos = function (t) { - return 0 !== this.negative ? this.abs().inotn(t).iaddn(1) : this.clone(); - }), - (o.prototype.fromTwos = function (t) { - return this.testn(t - 1) ? this.notn(t).iaddn(1).ineg() : this.clone(); - }), - (o.prototype.isNeg = function () { - return 0 !== this.negative; - }), - (o.prototype.neg = function () { - return this.clone().ineg(); - }), - (o.prototype.ineg = function () { - return this.isZero() || (this.negative ^= 1), this; - }), - (o.prototype.iuor = function (t) { - for (; this.length < t.length; ) this.words[this.length++] = 0; - for (var e = 0; e < t.length; e++) this.words[e] = this.words[e] | t.words[e]; - return this.strip(); - }), - (o.prototype.ior = function (t) { - return i(0 == (this.negative | t.negative)), this.iuor(t); - }), - (o.prototype.or = function (t) { - return this.length > t.length ? this.clone().ior(t) : t.clone().ior(this); - }), - (o.prototype.uor = function (t) { - return this.length > t.length ? this.clone().iuor(t) : t.clone().iuor(this); - }), - (o.prototype.iuand = function (t) { - var e; - e = this.length > t.length ? t : this; - for (var r = 0; r < e.length; r++) this.words[r] = this.words[r] & t.words[r]; - return (this.length = e.length), this.strip(); - }), - (o.prototype.iand = function (t) { - return i(0 == (this.negative | t.negative)), this.iuand(t); - }), - (o.prototype.and = function (t) { - return this.length > t.length ? this.clone().iand(t) : t.clone().iand(this); - }), - (o.prototype.uand = function (t) { - return this.length > t.length ? this.clone().iuand(t) : t.clone().iuand(this); - }), - (o.prototype.iuxor = function (t) { - var e, r; - this.length > t.length ? ((e = this), (r = t)) : ((e = t), (r = this)); - for (var i = 0; i < r.length; i++) this.words[i] = e.words[i] ^ r.words[i]; - if (this !== e) for (; i < e.length; i++) this.words[i] = e.words[i]; - return (this.length = e.length), this.strip(); - }), - (o.prototype.ixor = function (t) { - return i(0 == (this.negative | t.negative)), this.iuxor(t); - }), - (o.prototype.xor = function (t) { - return this.length > t.length ? this.clone().ixor(t) : t.clone().ixor(this); - }), - (o.prototype.uxor = function (t) { - return this.length > t.length ? this.clone().iuxor(t) : t.clone().iuxor(this); - }), - (o.prototype.inotn = function (t) { - i('number' == typeof t && t >= 0); - var e = 0 | Math.ceil(t / 26), - r = t % 26; - this._expand(e), r > 0 && e--; - for (var n = 0; n < e; n++) this.words[n] = 67108863 & ~this.words[n]; - return r > 0 && (this.words[n] = ~this.words[n] & (67108863 >> (26 - r))), this.strip(); - }), - (o.prototype.notn = function (t) { - return this.clone().inotn(t); - }), - (o.prototype.setn = function (t, e) { - i('number' == typeof t && t >= 0); - var r = (t / 26) | 0, - n = t % 26; - return this._expand(r + 1), (this.words[r] = e ? this.words[r] | (1 << n) : this.words[r] & ~(1 << n)), this.strip(); - }), - (o.prototype.iadd = function (t) { - var e, r, i; - if (0 !== this.negative && 0 === t.negative) - return (this.negative = 0), (e = this.isub(t)), (this.negative ^= 1), this._normSign(); - if (0 === this.negative && 0 !== t.negative) return (t.negative = 0), (e = this.isub(t)), (t.negative = 1), e._normSign(); - this.length > t.length ? ((r = this), (i = t)) : ((r = t), (i = this)); - for (var n = 0, o = 0; o < i.length; o++) - (e = (0 | r.words[o]) + (0 | i.words[o]) + n), (this.words[o] = 67108863 & e), (n = e >>> 26); - for (; 0 !== n && o < r.length; o++) (e = (0 | r.words[o]) + n), (this.words[o] = 67108863 & e), (n = e >>> 26); - if (((this.length = r.length), 0 !== n)) (this.words[this.length] = n), this.length++; - else if (r !== this) for (; o < r.length; o++) this.words[o] = r.words[o]; - return this; - }), - (o.prototype.add = function (t) { - var e; - return 0 !== t.negative && 0 === this.negative - ? ((t.negative = 0), (e = this.sub(t)), (t.negative ^= 1), e) - : 0 === t.negative && 0 !== this.negative - ? ((this.negative = 0), (e = t.sub(this)), (this.negative = 1), e) - : this.length > t.length - ? this.clone().iadd(t) - : t.clone().iadd(this); - }), - (o.prototype.isub = function (t) { - if (0 !== t.negative) { - t.negative = 0; - var e = this.iadd(t); - return (t.negative = 1), e._normSign(); - } - if (0 !== this.negative) return (this.negative = 0), this.iadd(t), (this.negative = 1), this._normSign(); - var r, - i, - n = this.cmp(t); - if (0 === n) return (this.negative = 0), (this.length = 1), (this.words[0] = 0), this; - n > 0 ? ((r = this), (i = t)) : ((r = t), (i = this)); - for (var o = 0, s = 0; s < i.length; s++) - (o = (e = (0 | r.words[s]) - (0 | i.words[s]) + o) >> 26), (this.words[s] = 67108863 & e); - for (; 0 !== o && s < r.length; s++) (o = (e = (0 | r.words[s]) + o) >> 26), (this.words[s] = 67108863 & e); - if (0 === o && s < r.length && r !== this) for (; s < r.length; s++) this.words[s] = r.words[s]; - return (this.length = Math.max(this.length, s)), r !== this && (this.negative = 1), this.strip(); - }), - (o.prototype.sub = function (t) { - return this.clone().isub(t); - }); - var p = function (t, e, r) { - var i, - n, - o, - s = t.words, - a = e.words, - h = r.words, - u = 0, - f = 0 | s[0], - c = 8191 & f, - l = f >>> 13, - d = 0 | s[1], - p = 8191 & d, - m = d >>> 13, - g = 0 | s[2], - b = 8191 & g, - y = g >>> 13, - v = 0 | s[3], - w = 8191 & v, - _ = v >>> 13, - M = 0 | s[4], - E = 8191 & M, - S = M >>> 13, - x = 0 | s[5], - A = 8191 & x, - k = x >>> 13, - R = 0 | s[6], - B = 8191 & R, - I = R >>> 13, - T = 0 | s[7], - P = 8191 & T, - O = T >>> 13, - L = 0 | s[8], - C = 8191 & L, - N = L >>> 13, - j = 0 | s[9], - U = 8191 & j, - D = j >>> 13, - z = 0 | a[0], - F = 8191 & z, - q = z >>> 13, - H = 0 | a[1], - $ = 8191 & H, - Z = H >>> 13, - G = 0 | a[2], - V = 8191 & G, - W = G >>> 13, - K = 0 | a[3], - Y = 8191 & K, - J = K >>> 13, - X = 0 | a[4], - Q = 8191 & X, - tt = X >>> 13, - et = 0 | a[5], - rt = 8191 & et, - it = et >>> 13, - nt = 0 | a[6], - ot = 8191 & nt, - st = nt >>> 13, - at = 0 | a[7], - ht = 8191 & at, - ut = at >>> 13, - ft = 0 | a[8], - ct = 8191 & ft, - lt = ft >>> 13, - dt = 0 | a[9], - pt = 8191 & dt, - mt = dt >>> 13; - (r.negative = t.negative ^ e.negative), (r.length = 19); - var gt = (((u + (i = Math.imul(c, F))) | 0) + ((8191 & (n = ((n = Math.imul(c, q)) + Math.imul(l, F)) | 0)) << 13)) | 0; - (u = ((((o = Math.imul(l, q)) + (n >>> 13)) | 0) + (gt >>> 26)) | 0), - (gt &= 67108863), - (i = Math.imul(p, F)), - (n = ((n = Math.imul(p, q)) + Math.imul(m, F)) | 0), - (o = Math.imul(m, q)); - var bt = - (((u + (i = (i + Math.imul(c, $)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, Z)) | 0) + Math.imul(l, $)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, Z)) | 0) + (n >>> 13)) | 0) + (bt >>> 26)) | 0), - (bt &= 67108863), - (i = Math.imul(b, F)), - (n = ((n = Math.imul(b, q)) + Math.imul(y, F)) | 0), - (o = Math.imul(y, q)), - (i = (i + Math.imul(p, $)) | 0), - (n = ((n = (n + Math.imul(p, Z)) | 0) + Math.imul(m, $)) | 0), - (o = (o + Math.imul(m, Z)) | 0); - var yt = - (((u + (i = (i + Math.imul(c, V)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, W)) | 0) + Math.imul(l, V)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, W)) | 0) + (n >>> 13)) | 0) + (yt >>> 26)) | 0), - (yt &= 67108863), - (i = Math.imul(w, F)), - (n = ((n = Math.imul(w, q)) + Math.imul(_, F)) | 0), - (o = Math.imul(_, q)), - (i = (i + Math.imul(b, $)) | 0), - (n = ((n = (n + Math.imul(b, Z)) | 0) + Math.imul(y, $)) | 0), - (o = (o + Math.imul(y, Z)) | 0), - (i = (i + Math.imul(p, V)) | 0), - (n = ((n = (n + Math.imul(p, W)) | 0) + Math.imul(m, V)) | 0), - (o = (o + Math.imul(m, W)) | 0); - var vt = - (((u + (i = (i + Math.imul(c, Y)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, J)) | 0) + Math.imul(l, Y)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, J)) | 0) + (n >>> 13)) | 0) + (vt >>> 26)) | 0), - (vt &= 67108863), - (i = Math.imul(E, F)), - (n = ((n = Math.imul(E, q)) + Math.imul(S, F)) | 0), - (o = Math.imul(S, q)), - (i = (i + Math.imul(w, $)) | 0), - (n = ((n = (n + Math.imul(w, Z)) | 0) + Math.imul(_, $)) | 0), - (o = (o + Math.imul(_, Z)) | 0), - (i = (i + Math.imul(b, V)) | 0), - (n = ((n = (n + Math.imul(b, W)) | 0) + Math.imul(y, V)) | 0), - (o = (o + Math.imul(y, W)) | 0), - (i = (i + Math.imul(p, Y)) | 0), - (n = ((n = (n + Math.imul(p, J)) | 0) + Math.imul(m, Y)) | 0), - (o = (o + Math.imul(m, J)) | 0); - var wt = - (((u + (i = (i + Math.imul(c, Q)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, tt)) | 0) + Math.imul(l, Q)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, tt)) | 0) + (n >>> 13)) | 0) + (wt >>> 26)) | 0), - (wt &= 67108863), - (i = Math.imul(A, F)), - (n = ((n = Math.imul(A, q)) + Math.imul(k, F)) | 0), - (o = Math.imul(k, q)), - (i = (i + Math.imul(E, $)) | 0), - (n = ((n = (n + Math.imul(E, Z)) | 0) + Math.imul(S, $)) | 0), - (o = (o + Math.imul(S, Z)) | 0), - (i = (i + Math.imul(w, V)) | 0), - (n = ((n = (n + Math.imul(w, W)) | 0) + Math.imul(_, V)) | 0), - (o = (o + Math.imul(_, W)) | 0), - (i = (i + Math.imul(b, Y)) | 0), - (n = ((n = (n + Math.imul(b, J)) | 0) + Math.imul(y, Y)) | 0), - (o = (o + Math.imul(y, J)) | 0), - (i = (i + Math.imul(p, Q)) | 0), - (n = ((n = (n + Math.imul(p, tt)) | 0) + Math.imul(m, Q)) | 0), - (o = (o + Math.imul(m, tt)) | 0); - var _t = - (((u + (i = (i + Math.imul(c, rt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, it)) | 0) + Math.imul(l, rt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, it)) | 0) + (n >>> 13)) | 0) + (_t >>> 26)) | 0), - (_t &= 67108863), - (i = Math.imul(B, F)), - (n = ((n = Math.imul(B, q)) + Math.imul(I, F)) | 0), - (o = Math.imul(I, q)), - (i = (i + Math.imul(A, $)) | 0), - (n = ((n = (n + Math.imul(A, Z)) | 0) + Math.imul(k, $)) | 0), - (o = (o + Math.imul(k, Z)) | 0), - (i = (i + Math.imul(E, V)) | 0), - (n = ((n = (n + Math.imul(E, W)) | 0) + Math.imul(S, V)) | 0), - (o = (o + Math.imul(S, W)) | 0), - (i = (i + Math.imul(w, Y)) | 0), - (n = ((n = (n + Math.imul(w, J)) | 0) + Math.imul(_, Y)) | 0), - (o = (o + Math.imul(_, J)) | 0), - (i = (i + Math.imul(b, Q)) | 0), - (n = ((n = (n + Math.imul(b, tt)) | 0) + Math.imul(y, Q)) | 0), - (o = (o + Math.imul(y, tt)) | 0), - (i = (i + Math.imul(p, rt)) | 0), - (n = ((n = (n + Math.imul(p, it)) | 0) + Math.imul(m, rt)) | 0), - (o = (o + Math.imul(m, it)) | 0); - var Mt = - (((u + (i = (i + Math.imul(c, ot)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, st)) | 0) + Math.imul(l, ot)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, st)) | 0) + (n >>> 13)) | 0) + (Mt >>> 26)) | 0), - (Mt &= 67108863), - (i = Math.imul(P, F)), - (n = ((n = Math.imul(P, q)) + Math.imul(O, F)) | 0), - (o = Math.imul(O, q)), - (i = (i + Math.imul(B, $)) | 0), - (n = ((n = (n + Math.imul(B, Z)) | 0) + Math.imul(I, $)) | 0), - (o = (o + Math.imul(I, Z)) | 0), - (i = (i + Math.imul(A, V)) | 0), - (n = ((n = (n + Math.imul(A, W)) | 0) + Math.imul(k, V)) | 0), - (o = (o + Math.imul(k, W)) | 0), - (i = (i + Math.imul(E, Y)) | 0), - (n = ((n = (n + Math.imul(E, J)) | 0) + Math.imul(S, Y)) | 0), - (o = (o + Math.imul(S, J)) | 0), - (i = (i + Math.imul(w, Q)) | 0), - (n = ((n = (n + Math.imul(w, tt)) | 0) + Math.imul(_, Q)) | 0), - (o = (o + Math.imul(_, tt)) | 0), - (i = (i + Math.imul(b, rt)) | 0), - (n = ((n = (n + Math.imul(b, it)) | 0) + Math.imul(y, rt)) | 0), - (o = (o + Math.imul(y, it)) | 0), - (i = (i + Math.imul(p, ot)) | 0), - (n = ((n = (n + Math.imul(p, st)) | 0) + Math.imul(m, ot)) | 0), - (o = (o + Math.imul(m, st)) | 0); - var Et = - (((u + (i = (i + Math.imul(c, ht)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, ut)) | 0) + Math.imul(l, ht)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, ut)) | 0) + (n >>> 13)) | 0) + (Et >>> 26)) | 0), - (Et &= 67108863), - (i = Math.imul(C, F)), - (n = ((n = Math.imul(C, q)) + Math.imul(N, F)) | 0), - (o = Math.imul(N, q)), - (i = (i + Math.imul(P, $)) | 0), - (n = ((n = (n + Math.imul(P, Z)) | 0) + Math.imul(O, $)) | 0), - (o = (o + Math.imul(O, Z)) | 0), - (i = (i + Math.imul(B, V)) | 0), - (n = ((n = (n + Math.imul(B, W)) | 0) + Math.imul(I, V)) | 0), - (o = (o + Math.imul(I, W)) | 0), - (i = (i + Math.imul(A, Y)) | 0), - (n = ((n = (n + Math.imul(A, J)) | 0) + Math.imul(k, Y)) | 0), - (o = (o + Math.imul(k, J)) | 0), - (i = (i + Math.imul(E, Q)) | 0), - (n = ((n = (n + Math.imul(E, tt)) | 0) + Math.imul(S, Q)) | 0), - (o = (o + Math.imul(S, tt)) | 0), - (i = (i + Math.imul(w, rt)) | 0), - (n = ((n = (n + Math.imul(w, it)) | 0) + Math.imul(_, rt)) | 0), - (o = (o + Math.imul(_, it)) | 0), - (i = (i + Math.imul(b, ot)) | 0), - (n = ((n = (n + Math.imul(b, st)) | 0) + Math.imul(y, ot)) | 0), - (o = (o + Math.imul(y, st)) | 0), - (i = (i + Math.imul(p, ht)) | 0), - (n = ((n = (n + Math.imul(p, ut)) | 0) + Math.imul(m, ht)) | 0), - (o = (o + Math.imul(m, ut)) | 0); - var St = - (((u + (i = (i + Math.imul(c, ct)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, lt)) | 0) + Math.imul(l, ct)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, lt)) | 0) + (n >>> 13)) | 0) + (St >>> 26)) | 0), - (St &= 67108863), - (i = Math.imul(U, F)), - (n = ((n = Math.imul(U, q)) + Math.imul(D, F)) | 0), - (o = Math.imul(D, q)), - (i = (i + Math.imul(C, $)) | 0), - (n = ((n = (n + Math.imul(C, Z)) | 0) + Math.imul(N, $)) | 0), - (o = (o + Math.imul(N, Z)) | 0), - (i = (i + Math.imul(P, V)) | 0), - (n = ((n = (n + Math.imul(P, W)) | 0) + Math.imul(O, V)) | 0), - (o = (o + Math.imul(O, W)) | 0), - (i = (i + Math.imul(B, Y)) | 0), - (n = ((n = (n + Math.imul(B, J)) | 0) + Math.imul(I, Y)) | 0), - (o = (o + Math.imul(I, J)) | 0), - (i = (i + Math.imul(A, Q)) | 0), - (n = ((n = (n + Math.imul(A, tt)) | 0) + Math.imul(k, Q)) | 0), - (o = (o + Math.imul(k, tt)) | 0), - (i = (i + Math.imul(E, rt)) | 0), - (n = ((n = (n + Math.imul(E, it)) | 0) + Math.imul(S, rt)) | 0), - (o = (o + Math.imul(S, it)) | 0), - (i = (i + Math.imul(w, ot)) | 0), - (n = ((n = (n + Math.imul(w, st)) | 0) + Math.imul(_, ot)) | 0), - (o = (o + Math.imul(_, st)) | 0), - (i = (i + Math.imul(b, ht)) | 0), - (n = ((n = (n + Math.imul(b, ut)) | 0) + Math.imul(y, ht)) | 0), - (o = (o + Math.imul(y, ut)) | 0), - (i = (i + Math.imul(p, ct)) | 0), - (n = ((n = (n + Math.imul(p, lt)) | 0) + Math.imul(m, ct)) | 0), - (o = (o + Math.imul(m, lt)) | 0); - var xt = - (((u + (i = (i + Math.imul(c, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, mt)) | 0) + Math.imul(l, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, mt)) | 0) + (n >>> 13)) | 0) + (xt >>> 26)) | 0), - (xt &= 67108863), - (i = Math.imul(U, $)), - (n = ((n = Math.imul(U, Z)) + Math.imul(D, $)) | 0), - (o = Math.imul(D, Z)), - (i = (i + Math.imul(C, V)) | 0), - (n = ((n = (n + Math.imul(C, W)) | 0) + Math.imul(N, V)) | 0), - (o = (o + Math.imul(N, W)) | 0), - (i = (i + Math.imul(P, Y)) | 0), - (n = ((n = (n + Math.imul(P, J)) | 0) + Math.imul(O, Y)) | 0), - (o = (o + Math.imul(O, J)) | 0), - (i = (i + Math.imul(B, Q)) | 0), - (n = ((n = (n + Math.imul(B, tt)) | 0) + Math.imul(I, Q)) | 0), - (o = (o + Math.imul(I, tt)) | 0), - (i = (i + Math.imul(A, rt)) | 0), - (n = ((n = (n + Math.imul(A, it)) | 0) + Math.imul(k, rt)) | 0), - (o = (o + Math.imul(k, it)) | 0), - (i = (i + Math.imul(E, ot)) | 0), - (n = ((n = (n + Math.imul(E, st)) | 0) + Math.imul(S, ot)) | 0), - (o = (o + Math.imul(S, st)) | 0), - (i = (i + Math.imul(w, ht)) | 0), - (n = ((n = (n + Math.imul(w, ut)) | 0) + Math.imul(_, ht)) | 0), - (o = (o + Math.imul(_, ut)) | 0), - (i = (i + Math.imul(b, ct)) | 0), - (n = ((n = (n + Math.imul(b, lt)) | 0) + Math.imul(y, ct)) | 0), - (o = (o + Math.imul(y, lt)) | 0); - var At = - (((u + (i = (i + Math.imul(p, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(p, mt)) | 0) + Math.imul(m, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(m, mt)) | 0) + (n >>> 13)) | 0) + (At >>> 26)) | 0), - (At &= 67108863), - (i = Math.imul(U, V)), - (n = ((n = Math.imul(U, W)) + Math.imul(D, V)) | 0), - (o = Math.imul(D, W)), - (i = (i + Math.imul(C, Y)) | 0), - (n = ((n = (n + Math.imul(C, J)) | 0) + Math.imul(N, Y)) | 0), - (o = (o + Math.imul(N, J)) | 0), - (i = (i + Math.imul(P, Q)) | 0), - (n = ((n = (n + Math.imul(P, tt)) | 0) + Math.imul(O, Q)) | 0), - (o = (o + Math.imul(O, tt)) | 0), - (i = (i + Math.imul(B, rt)) | 0), - (n = ((n = (n + Math.imul(B, it)) | 0) + Math.imul(I, rt)) | 0), - (o = (o + Math.imul(I, it)) | 0), - (i = (i + Math.imul(A, ot)) | 0), - (n = ((n = (n + Math.imul(A, st)) | 0) + Math.imul(k, ot)) | 0), - (o = (o + Math.imul(k, st)) | 0), - (i = (i + Math.imul(E, ht)) | 0), - (n = ((n = (n + Math.imul(E, ut)) | 0) + Math.imul(S, ht)) | 0), - (o = (o + Math.imul(S, ut)) | 0), - (i = (i + Math.imul(w, ct)) | 0), - (n = ((n = (n + Math.imul(w, lt)) | 0) + Math.imul(_, ct)) | 0), - (o = (o + Math.imul(_, lt)) | 0); - var kt = - (((u + (i = (i + Math.imul(b, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(b, mt)) | 0) + Math.imul(y, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(y, mt)) | 0) + (n >>> 13)) | 0) + (kt >>> 26)) | 0), - (kt &= 67108863), - (i = Math.imul(U, Y)), - (n = ((n = Math.imul(U, J)) + Math.imul(D, Y)) | 0), - (o = Math.imul(D, J)), - (i = (i + Math.imul(C, Q)) | 0), - (n = ((n = (n + Math.imul(C, tt)) | 0) + Math.imul(N, Q)) | 0), - (o = (o + Math.imul(N, tt)) | 0), - (i = (i + Math.imul(P, rt)) | 0), - (n = ((n = (n + Math.imul(P, it)) | 0) + Math.imul(O, rt)) | 0), - (o = (o + Math.imul(O, it)) | 0), - (i = (i + Math.imul(B, ot)) | 0), - (n = ((n = (n + Math.imul(B, st)) | 0) + Math.imul(I, ot)) | 0), - (o = (o + Math.imul(I, st)) | 0), - (i = (i + Math.imul(A, ht)) | 0), - (n = ((n = (n + Math.imul(A, ut)) | 0) + Math.imul(k, ht)) | 0), - (o = (o + Math.imul(k, ut)) | 0), - (i = (i + Math.imul(E, ct)) | 0), - (n = ((n = (n + Math.imul(E, lt)) | 0) + Math.imul(S, ct)) | 0), - (o = (o + Math.imul(S, lt)) | 0); - var Rt = - (((u + (i = (i + Math.imul(w, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(w, mt)) | 0) + Math.imul(_, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(_, mt)) | 0) + (n >>> 13)) | 0) + (Rt >>> 26)) | 0), - (Rt &= 67108863), - (i = Math.imul(U, Q)), - (n = ((n = Math.imul(U, tt)) + Math.imul(D, Q)) | 0), - (o = Math.imul(D, tt)), - (i = (i + Math.imul(C, rt)) | 0), - (n = ((n = (n + Math.imul(C, it)) | 0) + Math.imul(N, rt)) | 0), - (o = (o + Math.imul(N, it)) | 0), - (i = (i + Math.imul(P, ot)) | 0), - (n = ((n = (n + Math.imul(P, st)) | 0) + Math.imul(O, ot)) | 0), - (o = (o + Math.imul(O, st)) | 0), - (i = (i + Math.imul(B, ht)) | 0), - (n = ((n = (n + Math.imul(B, ut)) | 0) + Math.imul(I, ht)) | 0), - (o = (o + Math.imul(I, ut)) | 0), - (i = (i + Math.imul(A, ct)) | 0), - (n = ((n = (n + Math.imul(A, lt)) | 0) + Math.imul(k, ct)) | 0), - (o = (o + Math.imul(k, lt)) | 0); - var Bt = - (((u + (i = (i + Math.imul(E, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(E, mt)) | 0) + Math.imul(S, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(S, mt)) | 0) + (n >>> 13)) | 0) + (Bt >>> 26)) | 0), - (Bt &= 67108863), - (i = Math.imul(U, rt)), - (n = ((n = Math.imul(U, it)) + Math.imul(D, rt)) | 0), - (o = Math.imul(D, it)), - (i = (i + Math.imul(C, ot)) | 0), - (n = ((n = (n + Math.imul(C, st)) | 0) + Math.imul(N, ot)) | 0), - (o = (o + Math.imul(N, st)) | 0), - (i = (i + Math.imul(P, ht)) | 0), - (n = ((n = (n + Math.imul(P, ut)) | 0) + Math.imul(O, ht)) | 0), - (o = (o + Math.imul(O, ut)) | 0), - (i = (i + Math.imul(B, ct)) | 0), - (n = ((n = (n + Math.imul(B, lt)) | 0) + Math.imul(I, ct)) | 0), - (o = (o + Math.imul(I, lt)) | 0); - var It = - (((u + (i = (i + Math.imul(A, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(A, mt)) | 0) + Math.imul(k, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(k, mt)) | 0) + (n >>> 13)) | 0) + (It >>> 26)) | 0), - (It &= 67108863), - (i = Math.imul(U, ot)), - (n = ((n = Math.imul(U, st)) + Math.imul(D, ot)) | 0), - (o = Math.imul(D, st)), - (i = (i + Math.imul(C, ht)) | 0), - (n = ((n = (n + Math.imul(C, ut)) | 0) + Math.imul(N, ht)) | 0), - (o = (o + Math.imul(N, ut)) | 0), - (i = (i + Math.imul(P, ct)) | 0), - (n = ((n = (n + Math.imul(P, lt)) | 0) + Math.imul(O, ct)) | 0), - (o = (o + Math.imul(O, lt)) | 0); - var Tt = - (((u + (i = (i + Math.imul(B, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(B, mt)) | 0) + Math.imul(I, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(I, mt)) | 0) + (n >>> 13)) | 0) + (Tt >>> 26)) | 0), - (Tt &= 67108863), - (i = Math.imul(U, ht)), - (n = ((n = Math.imul(U, ut)) + Math.imul(D, ht)) | 0), - (o = Math.imul(D, ut)), - (i = (i + Math.imul(C, ct)) | 0), - (n = ((n = (n + Math.imul(C, lt)) | 0) + Math.imul(N, ct)) | 0), - (o = (o + Math.imul(N, lt)) | 0); - var Pt = - (((u + (i = (i + Math.imul(P, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(P, mt)) | 0) + Math.imul(O, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(O, mt)) | 0) + (n >>> 13)) | 0) + (Pt >>> 26)) | 0), - (Pt &= 67108863), - (i = Math.imul(U, ct)), - (n = ((n = Math.imul(U, lt)) + Math.imul(D, ct)) | 0), - (o = Math.imul(D, lt)); - var Ot = - (((u + (i = (i + Math.imul(C, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(C, mt)) | 0) + Math.imul(N, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(N, mt)) | 0) + (n >>> 13)) | 0) + (Ot >>> 26)) | 0), (Ot &= 67108863); - var Lt = (((u + (i = Math.imul(U, pt))) | 0) + ((8191 & (n = ((n = Math.imul(U, mt)) + Math.imul(D, pt)) | 0)) << 13)) | 0; - return ( - (u = ((((o = Math.imul(D, mt)) + (n >>> 13)) | 0) + (Lt >>> 26)) | 0), - (Lt &= 67108863), - (h[0] = gt), - (h[1] = bt), - (h[2] = yt), - (h[3] = vt), - (h[4] = wt), - (h[5] = _t), - (h[6] = Mt), - (h[7] = Et), - (h[8] = St), - (h[9] = xt), - (h[10] = At), - (h[11] = kt), - (h[12] = Rt), - (h[13] = Bt), - (h[14] = It), - (h[15] = Tt), - (h[16] = Pt), - (h[17] = Ot), - (h[18] = Lt), - 0 !== u && ((h[19] = u), r.length++), - r - ); - }; - function m(t, e, r) { - return new g().mulp(t, e, r); - } - function g(t, e) { - (this.x = t), (this.y = e); - } - Math.imul || (p = d), - (o.prototype.mulTo = function (t, e) { - var r, - i = this.length + t.length; - return ( - (r = - 10 === this.length && 10 === t.length - ? p(this, t, e) - : i < 63 - ? d(this, t, e) - : i < 1024 - ? (function (t, e, r) { - (r.negative = e.negative ^ t.negative), (r.length = t.length + e.length); - for (var i = 0, n = 0, o = 0; o < r.length - 1; o++) { - var s = n; - n = 0; - for (var a = 67108863 & i, h = Math.min(o, e.length - 1), u = Math.max(0, o - t.length + 1); u <= h; u++) { - var f = o - u, - c = (0 | t.words[f]) * (0 | e.words[u]), - l = 67108863 & c; - (a = 67108863 & (l = (l + a) | 0)), - (n += (s = ((s = (s + ((c / 67108864) | 0)) | 0) + (l >>> 26)) | 0) >>> 26), - (s &= 67108863); - } - (r.words[o] = a), (i = s), (s = n); - } - return 0 !== i ? (r.words[o] = i) : r.length--, r.strip(); - })(this, t, e) - : m(this, t, e)), - r - ); - }), - (g.prototype.makeRBT = function (t) { - for (var e = new Array(t), r = o.prototype._countBits(t) - 1, i = 0; i < t; i++) e[i] = this.revBin(i, r, t); - return e; - }), - (g.prototype.revBin = function (t, e, r) { - if (0 === t || t === r - 1) return t; - for (var i = 0, n = 0; n < e; n++) (i |= (1 & t) << (e - n - 1)), (t >>= 1); - return i; - }), - (g.prototype.permute = function (t, e, r, i, n, o) { - for (var s = 0; s < o; s++) (i[s] = e[t[s]]), (n[s] = r[t[s]]); - }), - (g.prototype.transform = function (t, e, r, i, n, o) { - this.permute(o, t, e, r, i, n); - for (var s = 1; s < n; s <<= 1) - for (var a = s << 1, h = Math.cos((2 * Math.PI) / a), u = Math.sin((2 * Math.PI) / a), f = 0; f < n; f += a) - for (var c = h, l = u, d = 0; d < s; d++) { - var p = r[f + d], - m = i[f + d], - g = r[f + d + s], - b = i[f + d + s], - y = c * g - l * b; - (b = c * b + l * g), - (g = y), - (r[f + d] = p + g), - (i[f + d] = m + b), - (r[f + d + s] = p - g), - (i[f + d + s] = m - b), - d !== a && ((y = h * c - u * l), (l = h * l + u * c), (c = y)); - } - }), - (g.prototype.guessLen13b = function (t, e) { - var r = 1 | Math.max(e, t), - i = 1 & r, - n = 0; - for (r = (r / 2) | 0; r; r >>>= 1) n++; - return 1 << (n + 1 + i); - }), - (g.prototype.conjugate = function (t, e, r) { - if (!(r <= 1)) - for (var i = 0; i < r / 2; i++) { - var n = t[i]; - (t[i] = t[r - i - 1]), (t[r - i - 1] = n), (n = e[i]), (e[i] = -e[r - i - 1]), (e[r - i - 1] = -n); - } - }), - (g.prototype.normalize13b = function (t, e) { - for (var r = 0, i = 0; i < e / 2; i++) { - var n = 8192 * Math.round(t[2 * i + 1] / e) + Math.round(t[2 * i] / e) + r; - (t[i] = 67108863 & n), (r = n < 67108864 ? 0 : (n / 67108864) | 0); - } - return t; - }), - (g.prototype.convert13b = function (t, e, r, n) { - for (var o = 0, s = 0; s < e; s++) - (o += 0 | t[s]), (r[2 * s] = 8191 & o), (o >>>= 13), (r[2 * s + 1] = 8191 & o), (o >>>= 13); - for (s = 2 * e; s < n; ++s) r[s] = 0; - i(0 === o), i(0 == (-8192 & o)); - }), - (g.prototype.stub = function (t) { - for (var e = new Array(t), r = 0; r < t; r++) e[r] = 0; - return e; - }), - (g.prototype.mulp = function (t, e, r) { - var i = 2 * this.guessLen13b(t.length, e.length), - n = this.makeRBT(i), - o = this.stub(i), - s = new Array(i), - a = new Array(i), - h = new Array(i), - u = new Array(i), - f = new Array(i), - c = new Array(i), - l = r.words; - (l.length = i), - this.convert13b(t.words, t.length, s, i), - this.convert13b(e.words, e.length, u, i), - this.transform(s, o, a, h, i, n), - this.transform(u, o, f, c, i, n); - for (var d = 0; d < i; d++) { - var p = a[d] * f[d] - h[d] * c[d]; - (h[d] = a[d] * c[d] + h[d] * f[d]), (a[d] = p); - } - return ( - this.conjugate(a, h, i), - this.transform(a, h, l, o, i, n), - this.conjugate(l, o, i), - this.normalize13b(l, i), - (r.negative = t.negative ^ e.negative), - (r.length = t.length + e.length), - r.strip() - ); - }), - (o.prototype.mul = function (t) { - var e = new o(null); - return (e.words = new Array(this.length + t.length)), this.mulTo(t, e); - }), - (o.prototype.mulf = function (t) { - var e = new o(null); - return (e.words = new Array(this.length + t.length)), m(this, t, e); - }), - (o.prototype.imul = function (t) { - return this.clone().mulTo(t, this); - }), - (o.prototype.imuln = function (t) { - i('number' == typeof t), i(t < 67108864); - for (var e = 0, r = 0; r < this.length; r++) { - var n = (0 | this.words[r]) * t, - o = (67108863 & n) + (67108863 & e); - (e >>= 26), (e += (n / 67108864) | 0), (e += o >>> 26), (this.words[r] = 67108863 & o); - } - return 0 !== e && ((this.words[r] = e), this.length++), this; - }), - (o.prototype.muln = function (t) { - return this.clone().imuln(t); - }), - (o.prototype.sqr = function () { - return this.mul(this); - }), - (o.prototype.isqr = function () { - return this.imul(this.clone()); - }), - (o.prototype.pow = function (t) { - var e = (function (t) { - for (var e = new Array(t.bitLength()), r = 0; r < e.length; r++) { - var i = (r / 26) | 0, - n = r % 26; - e[r] = (t.words[i] & (1 << n)) >>> n; - } - return e; - })(t); - if (0 === e.length) return new o(1); - for (var r = this, i = 0; i < e.length && 0 === e[i]; i++, r = r.sqr()); - if (++i < e.length) for (var n = r.sqr(); i < e.length; i++, n = n.sqr()) 0 !== e[i] && (r = r.mul(n)); - return r; - }), - (o.prototype.iushln = function (t) { - i('number' == typeof t && t >= 0); - var e, - r = t % 26, - n = (t - r) / 26, - o = (67108863 >>> (26 - r)) << (26 - r); - if (0 !== r) { - var s = 0; - for (e = 0; e < this.length; e++) { - var a = this.words[e] & o, - h = ((0 | this.words[e]) - a) << r; - (this.words[e] = h | s), (s = a >>> (26 - r)); - } - s && ((this.words[e] = s), this.length++); - } - if (0 !== n) { - for (e = this.length - 1; e >= 0; e--) this.words[e + n] = this.words[e]; - for (e = 0; e < n; e++) this.words[e] = 0; - this.length += n; - } - return this.strip(); - }), - (o.prototype.ishln = function (t) { - return i(0 === this.negative), this.iushln(t); - }), - (o.prototype.iushrn = function (t, e, r) { - var n; - i('number' == typeof t && t >= 0), (n = e ? (e - (e % 26)) / 26 : 0); - var o = t % 26, - s = Math.min((t - o) / 26, this.length), - a = 67108863 ^ ((67108863 >>> o) << o), - h = r; - if (((n -= s), (n = Math.max(0, n)), h)) { - for (var u = 0; u < s; u++) h.words[u] = this.words[u]; - h.length = s; - } - if (0 === s); - else if (this.length > s) for (this.length -= s, u = 0; u < this.length; u++) this.words[u] = this.words[u + s]; - else (this.words[0] = 0), (this.length = 1); - var f = 0; - for (u = this.length - 1; u >= 0 && (0 !== f || u >= n); u--) { - var c = 0 | this.words[u]; - (this.words[u] = (f << (26 - o)) | (c >>> o)), (f = c & a); - } - return h && 0 !== f && (h.words[h.length++] = f), 0 === this.length && ((this.words[0] = 0), (this.length = 1)), this.strip(); - }), - (o.prototype.ishrn = function (t, e, r) { - return i(0 === this.negative), this.iushrn(t, e, r); - }), - (o.prototype.shln = function (t) { - return this.clone().ishln(t); - }), - (o.prototype.ushln = function (t) { - return this.clone().iushln(t); - }), - (o.prototype.shrn = function (t) { - return this.clone().ishrn(t); - }), - (o.prototype.ushrn = function (t) { - return this.clone().iushrn(t); - }), - (o.prototype.testn = function (t) { - i('number' == typeof t && t >= 0); - var e = t % 26, - r = (t - e) / 26, - n = 1 << e; - return !(this.length <= r || !(this.words[r] & n)); - }), - (o.prototype.imaskn = function (t) { - i('number' == typeof t && t >= 0); - var e = t % 26, - r = (t - e) / 26; - if ((i(0 === this.negative, 'imaskn works only with positive numbers'), this.length <= r)) return this; - if ((0 !== e && r++, (this.length = Math.min(r, this.length)), 0 !== e)) { - var n = 67108863 ^ ((67108863 >>> e) << e); - this.words[this.length - 1] &= n; - } - return this.strip(); - }), - (o.prototype.maskn = function (t) { - return this.clone().imaskn(t); - }), - (o.prototype.iaddn = function (t) { - return ( - i('number' == typeof t), - i(t < 67108864), - t < 0 - ? this.isubn(-t) - : 0 !== this.negative - ? 1 === this.length && (0 | this.words[0]) < t - ? ((this.words[0] = t - (0 | this.words[0])), (this.negative = 0), this) - : ((this.negative = 0), this.isubn(t), (this.negative = 1), this) - : this._iaddn(t) - ); - }), - (o.prototype._iaddn = function (t) { - this.words[0] += t; - for (var e = 0; e < this.length && this.words[e] >= 67108864; e++) - (this.words[e] -= 67108864), e === this.length - 1 ? (this.words[e + 1] = 1) : this.words[e + 1]++; - return (this.length = Math.max(this.length, e + 1)), this; - }), - (o.prototype.isubn = function (t) { - if ((i('number' == typeof t), i(t < 67108864), t < 0)) return this.iaddn(-t); - if (0 !== this.negative) return (this.negative = 0), this.iaddn(t), (this.negative = 1), this; - if (((this.words[0] -= t), 1 === this.length && this.words[0] < 0)) (this.words[0] = -this.words[0]), (this.negative = 1); - else for (var e = 0; e < this.length && this.words[e] < 0; e++) (this.words[e] += 67108864), (this.words[e + 1] -= 1); - return this.strip(); - }), - (o.prototype.addn = function (t) { - return this.clone().iaddn(t); - }), - (o.prototype.subn = function (t) { - return this.clone().isubn(t); - }), - (o.prototype.iabs = function () { - return (this.negative = 0), this; - }), - (o.prototype.abs = function () { - return this.clone().iabs(); - }), - (o.prototype._ishlnsubmul = function (t, e, r) { - var n, - o, - s = t.length + r; - this._expand(s); - var a = 0; - for (n = 0; n < t.length; n++) { - o = (0 | this.words[n + r]) + a; - var h = (0 | t.words[n]) * e; - (a = ((o -= 67108863 & h) >> 26) - ((h / 67108864) | 0)), (this.words[n + r] = 67108863 & o); - } - for (; n < this.length - r; n++) (a = (o = (0 | this.words[n + r]) + a) >> 26), (this.words[n + r] = 67108863 & o); - if (0 === a) return this.strip(); - for (i(-1 === a), a = 0, n = 0; n < this.length; n++) - (a = (o = -(0 | this.words[n]) + a) >> 26), (this.words[n] = 67108863 & o); - return (this.negative = 1), this.strip(); - }), - (o.prototype._wordDiv = function (t, e) { - var r = (this.length, t.length), - i = this.clone(), - n = t, - s = 0 | n.words[n.length - 1]; - 0 != (r = 26 - this._countBits(s)) && ((n = n.ushln(r)), i.iushln(r), (s = 0 | n.words[n.length - 1])); - var a, - h = i.length - n.length; - if ('mod' !== e) { - ((a = new o(null)).length = h + 1), (a.words = new Array(a.length)); - for (var u = 0; u < a.length; u++) a.words[u] = 0; - } - var f = i.clone()._ishlnsubmul(n, 1, h); - 0 === f.negative && ((i = f), a && (a.words[h] = 1)); - for (var c = h - 1; c >= 0; c--) { - var l = 67108864 * (0 | i.words[n.length + c]) + (0 | i.words[n.length + c - 1]); - for (l = Math.min((l / s) | 0, 67108863), i._ishlnsubmul(n, l, c); 0 !== i.negative; ) - l--, (i.negative = 0), i._ishlnsubmul(n, 1, c), i.isZero() || (i.negative ^= 1); - a && (a.words[c] = l); - } - return a && a.strip(), i.strip(), 'div' !== e && 0 !== r && i.iushrn(r), { div: a || null, mod: i }; - }), - (o.prototype.divmod = function (t, e, r) { - return ( - i(!t.isZero()), - this.isZero() - ? { div: new o(0), mod: new o(0) } - : 0 !== this.negative && 0 === t.negative - ? ((a = this.neg().divmod(t, e)), - 'mod' !== e && (n = a.div.neg()), - 'div' !== e && ((s = a.mod.neg()), r && 0 !== s.negative && s.iadd(t)), - { div: n, mod: s }) - : 0 === this.negative && 0 !== t.negative - ? ((a = this.divmod(t.neg(), e)), 'mod' !== e && (n = a.div.neg()), { div: n, mod: a.mod }) - : 0 != (this.negative & t.negative) - ? ((a = this.neg().divmod(t.neg(), e)), - 'div' !== e && ((s = a.mod.neg()), r && 0 !== s.negative && s.isub(t)), - { div: a.div, mod: s }) - : t.length > this.length || this.cmp(t) < 0 - ? { div: new o(0), mod: this } - : 1 === t.length - ? 'div' === e - ? { div: this.divn(t.words[0]), mod: null } - : 'mod' === e - ? { div: null, mod: new o(this.modn(t.words[0])) } - : { div: this.divn(t.words[0]), mod: new o(this.modn(t.words[0])) } - : this._wordDiv(t, e) - ); - var n, s, a; - }), - (o.prototype.div = function (t) { - return this.divmod(t, 'div', !1).div; - }), - (o.prototype.mod = function (t) { - return this.divmod(t, 'mod', !1).mod; - }), - (o.prototype.umod = function (t) { - return this.divmod(t, 'mod', !0).mod; - }), - (o.prototype.divRound = function (t) { - var e = this.divmod(t); - if (e.mod.isZero()) return e.div; - var r = 0 !== e.div.negative ? e.mod.isub(t) : e.mod, - i = t.ushrn(1), - n = t.andln(1), - o = r.cmp(i); - return o < 0 || (1 === n && 0 === o) ? e.div : 0 !== e.div.negative ? e.div.isubn(1) : e.div.iaddn(1); - }), - (o.prototype.modn = function (t) { - i(t <= 67108863); - for (var e = (1 << 26) % t, r = 0, n = this.length - 1; n >= 0; n--) r = (e * r + (0 | this.words[n])) % t; - return r; - }), - (o.prototype.idivn = function (t) { - i(t <= 67108863); - for (var e = 0, r = this.length - 1; r >= 0; r--) { - var n = (0 | this.words[r]) + 67108864 * e; - (this.words[r] = (n / t) | 0), (e = n % t); - } - return this.strip(); - }), - (o.prototype.divn = function (t) { - return this.clone().idivn(t); - }), - (o.prototype.egcd = function (t) { - i(0 === t.negative), i(!t.isZero()); - var e = this, - r = t.clone(); - e = 0 !== e.negative ? e.umod(t) : e.clone(); - for (var n = new o(1), s = new o(0), a = new o(0), h = new o(1), u = 0; e.isEven() && r.isEven(); ) - e.iushrn(1), r.iushrn(1), ++u; - for (var f = r.clone(), c = e.clone(); !e.isZero(); ) { - for (var l = 0, d = 1; 0 == (e.words[0] & d) && l < 26; ++l, d <<= 1); - if (l > 0) for (e.iushrn(l); l-- > 0; ) (n.isOdd() || s.isOdd()) && (n.iadd(f), s.isub(c)), n.iushrn(1), s.iushrn(1); - for (var p = 0, m = 1; 0 == (r.words[0] & m) && p < 26; ++p, m <<= 1); - if (p > 0) for (r.iushrn(p); p-- > 0; ) (a.isOdd() || h.isOdd()) && (a.iadd(f), h.isub(c)), a.iushrn(1), h.iushrn(1); - e.cmp(r) >= 0 ? (e.isub(r), n.isub(a), s.isub(h)) : (r.isub(e), a.isub(n), h.isub(s)); - } - return { a, b: h, gcd: r.iushln(u) }; - }), - (o.prototype._invmp = function (t) { - i(0 === t.negative), i(!t.isZero()); - var e = this, - r = t.clone(); - e = 0 !== e.negative ? e.umod(t) : e.clone(); - for (var n, s = new o(1), a = new o(0), h = r.clone(); e.cmpn(1) > 0 && r.cmpn(1) > 0; ) { - for (var u = 0, f = 1; 0 == (e.words[0] & f) && u < 26; ++u, f <<= 1); - if (u > 0) for (e.iushrn(u); u-- > 0; ) s.isOdd() && s.iadd(h), s.iushrn(1); - for (var c = 0, l = 1; 0 == (r.words[0] & l) && c < 26; ++c, l <<= 1); - if (c > 0) for (r.iushrn(c); c-- > 0; ) a.isOdd() && a.iadd(h), a.iushrn(1); - e.cmp(r) >= 0 ? (e.isub(r), s.isub(a)) : (r.isub(e), a.isub(s)); - } - return (n = 0 === e.cmpn(1) ? s : a).cmpn(0) < 0 && n.iadd(t), n; - }), - (o.prototype.gcd = function (t) { - if (this.isZero()) return t.abs(); - if (t.isZero()) return this.abs(); - var e = this.clone(), - r = t.clone(); - (e.negative = 0), (r.negative = 0); - for (var i = 0; e.isEven() && r.isEven(); i++) e.iushrn(1), r.iushrn(1); - for (;;) { - for (; e.isEven(); ) e.iushrn(1); - for (; r.isEven(); ) r.iushrn(1); - var n = e.cmp(r); - if (n < 0) { - var o = e; - (e = r), (r = o); - } else if (0 === n || 0 === r.cmpn(1)) break; - e.isub(r); - } - return r.iushln(i); - }), - (o.prototype.invm = function (t) { - return this.egcd(t).a.umod(t); - }), - (o.prototype.isEven = function () { - return 0 == (1 & this.words[0]); - }), - (o.prototype.isOdd = function () { - return 1 == (1 & this.words[0]); - }), - (o.prototype.andln = function (t) { - return this.words[0] & t; - }), - (o.prototype.bincn = function (t) { - i('number' == typeof t); - var e = t % 26, - r = (t - e) / 26, - n = 1 << e; - if (this.length <= r) return this._expand(r + 1), (this.words[r] |= n), this; - for (var o = n, s = r; 0 !== o && s < this.length; s++) { - var a = 0 | this.words[s]; - (o = (a += o) >>> 26), (a &= 67108863), (this.words[s] = a); - } - return 0 !== o && ((this.words[s] = o), this.length++), this; - }), - (o.prototype.isZero = function () { - return 1 === this.length && 0 === this.words[0]; - }), - (o.prototype.cmpn = function (t) { - var e, - r = t < 0; - if (0 !== this.negative && !r) return -1; - if (0 === this.negative && r) return 1; - if ((this.strip(), this.length > 1)) e = 1; - else { - r && (t = -t), i(t <= 67108863, 'Number is too big'); - var n = 0 | this.words[0]; - e = n === t ? 0 : n < t ? -1 : 1; - } - return 0 !== this.negative ? 0 | -e : e; - }), - (o.prototype.cmp = function (t) { - if (0 !== this.negative && 0 === t.negative) return -1; - if (0 === this.negative && 0 !== t.negative) return 1; - var e = this.ucmp(t); - return 0 !== this.negative ? 0 | -e : e; - }), - (o.prototype.ucmp = function (t) { - if (this.length > t.length) return 1; - if (this.length < t.length) return -1; - for (var e = 0, r = this.length - 1; r >= 0; r--) { - var i = 0 | this.words[r], - n = 0 | t.words[r]; - if (i !== n) { - i < n ? (e = -1) : i > n && (e = 1); - break; - } - } - return e; - }), - (o.prototype.gtn = function (t) { - return 1 === this.cmpn(t); - }), - (o.prototype.gt = function (t) { - return 1 === this.cmp(t); - }), - (o.prototype.gten = function (t) { - return this.cmpn(t) >= 0; - }), - (o.prototype.gte = function (t) { - return this.cmp(t) >= 0; - }), - (o.prototype.ltn = function (t) { - return -1 === this.cmpn(t); - }), - (o.prototype.lt = function (t) { - return -1 === this.cmp(t); - }), - (o.prototype.lten = function (t) { - return this.cmpn(t) <= 0; - }), - (o.prototype.lte = function (t) { - return this.cmp(t) <= 0; - }), - (o.prototype.eqn = function (t) { - return 0 === this.cmpn(t); - }), - (o.prototype.eq = function (t) { - return 0 === this.cmp(t); - }), - (o.red = function (t) { - return new E(t); - }), - (o.prototype.toRed = function (t) { - return ( - i(!this.red, 'Already a number in reduction context'), - i(0 === this.negative, 'red works only with positives'), - t.convertTo(this)._forceRed(t) - ); - }), - (o.prototype.fromRed = function () { - return i(this.red, 'fromRed works only with numbers in reduction context'), this.red.convertFrom(this); - }), - (o.prototype._forceRed = function (t) { - return (this.red = t), this; - }), - (o.prototype.forceRed = function (t) { - return i(!this.red, 'Already a number in reduction context'), this._forceRed(t); - }), - (o.prototype.redAdd = function (t) { - return i(this.red, 'redAdd works only with red numbers'), this.red.add(this, t); - }), - (o.prototype.redIAdd = function (t) { - return i(this.red, 'redIAdd works only with red numbers'), this.red.iadd(this, t); - }), - (o.prototype.redSub = function (t) { - return i(this.red, 'redSub works only with red numbers'), this.red.sub(this, t); - }), - (o.prototype.redISub = function (t) { - return i(this.red, 'redISub works only with red numbers'), this.red.isub(this, t); - }), - (o.prototype.redShl = function (t) { - return i(this.red, 'redShl works only with red numbers'), this.red.shl(this, t); - }), - (o.prototype.redMul = function (t) { - return i(this.red, 'redMul works only with red numbers'), this.red._verify2(this, t), this.red.mul(this, t); - }), - (o.prototype.redIMul = function (t) { - return i(this.red, 'redMul works only with red numbers'), this.red._verify2(this, t), this.red.imul(this, t); - }), - (o.prototype.redSqr = function () { - return i(this.red, 'redSqr works only with red numbers'), this.red._verify1(this), this.red.sqr(this); - }), - (o.prototype.redISqr = function () { - return i(this.red, 'redISqr works only with red numbers'), this.red._verify1(this), this.red.isqr(this); - }), - (o.prototype.redSqrt = function () { - return i(this.red, 'redSqrt works only with red numbers'), this.red._verify1(this), this.red.sqrt(this); - }), - (o.prototype.redInvm = function () { - return i(this.red, 'redInvm works only with red numbers'), this.red._verify1(this), this.red.invm(this); - }), - (o.prototype.redNeg = function () { - return i(this.red, 'redNeg works only with red numbers'), this.red._verify1(this), this.red.neg(this); - }), - (o.prototype.redPow = function (t) { - return i(this.red && !t.red, 'redPow(normalNum)'), this.red._verify1(this), this.red.pow(this, t); - }); - var b = { k256: null, p224: null, p192: null, p25519: null }; - function y(t, e) { - (this.name = t), - (this.p = new o(e, 16)), - (this.n = this.p.bitLength()), - (this.k = new o(1).iushln(this.n).isub(this.p)), - (this.tmp = this._tmp()); - } - function v() { - y.call(this, 'k256', 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f'); - } - function w() { - y.call(this, 'p224', 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001'); - } - function _() { - y.call(this, 'p192', 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff'); - } - function M() { - y.call(this, '25519', '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed'); - } - function E(t) { - if ('string' == typeof t) { - var e = o._prime(t); - (this.m = e.p), (this.prime = e); - } else i(t.gtn(1), 'modulus must be greater than 1'), (this.m = t), (this.prime = null); - } - function S(t) { - E.call(this, t), - (this.shift = this.m.bitLength()), - this.shift % 26 != 0 && (this.shift += 26 - (this.shift % 26)), - (this.r = new o(1).iushln(this.shift)), - (this.r2 = this.imod(this.r.sqr())), - (this.rinv = this.r._invmp(this.m)), - (this.minv = this.rinv.mul(this.r).isubn(1).div(this.m)), - (this.minv = this.minv.umod(this.r)), - (this.minv = this.r.sub(this.minv)); - } - (y.prototype._tmp = function () { - var t = new o(null); - return (t.words = new Array(Math.ceil(this.n / 13))), t; - }), - (y.prototype.ireduce = function (t) { - var e, - r = t; - do { - this.split(r, this.tmp), (e = (r = (r = this.imulK(r)).iadd(this.tmp)).bitLength()); - } while (e > this.n); - var i = e < this.n ? -1 : r.ucmp(this.p); - return 0 === i ? ((r.words[0] = 0), (r.length = 1)) : i > 0 ? r.isub(this.p) : void 0 !== r.strip ? r.strip() : r._strip(), r; - }), - (y.prototype.split = function (t, e) { - t.iushrn(this.n, 0, e); - }), - (y.prototype.imulK = function (t) { - return t.imul(this.k); - }), - n(v, y), - (v.prototype.split = function (t, e) { - for (var r = 4194303, i = Math.min(t.length, 9), n = 0; n < i; n++) e.words[n] = t.words[n]; - if (((e.length = i), t.length <= 9)) return (t.words[0] = 0), void (t.length = 1); - var o = t.words[9]; - for (e.words[e.length++] = o & r, n = 10; n < t.length; n++) { - var s = 0 | t.words[n]; - (t.words[n - 10] = ((s & r) << 4) | (o >>> 22)), (o = s); - } - (o >>>= 22), (t.words[n - 10] = o), 0 === o && t.length > 10 ? (t.length -= 10) : (t.length -= 9); - }), - (v.prototype.imulK = function (t) { - (t.words[t.length] = 0), (t.words[t.length + 1] = 0), (t.length += 2); - for (var e = 0, r = 0; r < t.length; r++) { - var i = 0 | t.words[r]; - (e += 977 * i), (t.words[r] = 67108863 & e), (e = 64 * i + ((e / 67108864) | 0)); - } - return 0 === t.words[t.length - 1] && (t.length--, 0 === t.words[t.length - 1] && t.length--), t; - }), - n(w, y), - n(_, y), - n(M, y), - (M.prototype.imulK = function (t) { - for (var e = 0, r = 0; r < t.length; r++) { - var i = 19 * (0 | t.words[r]) + e, - n = 67108863 & i; - (i >>>= 26), (t.words[r] = n), (e = i); - } - return 0 !== e && (t.words[t.length++] = e), t; - }), - (o._prime = function (t) { - if (b[t]) return b[t]; - var e; - if ('k256' === t) e = new v(); - else if ('p224' === t) e = new w(); - else if ('p192' === t) e = new _(); - else { - if ('p25519' !== t) throw new Error('Unknown prime ' + t); - e = new M(); - } - return (b[t] = e), e; - }), - (E.prototype._verify1 = function (t) { - i(0 === t.negative, 'red works only with positives'), i(t.red, 'red works only with red numbers'); - }), - (E.prototype._verify2 = function (t, e) { - i(0 == (t.negative | e.negative), 'red works only with positives'), - i(t.red && t.red === e.red, 'red works only with red numbers'); - }), - (E.prototype.imod = function (t) { - return this.prime ? this.prime.ireduce(t)._forceRed(this) : t.umod(this.m)._forceRed(this); - }), - (E.prototype.neg = function (t) { - return t.isZero() ? t.clone() : this.m.sub(t)._forceRed(this); - }), - (E.prototype.add = function (t, e) { - this._verify2(t, e); - var r = t.add(e); - return r.cmp(this.m) >= 0 && r.isub(this.m), r._forceRed(this); - }), - (E.prototype.iadd = function (t, e) { - this._verify2(t, e); - var r = t.iadd(e); - return r.cmp(this.m) >= 0 && r.isub(this.m), r; - }), - (E.prototype.sub = function (t, e) { - this._verify2(t, e); - var r = t.sub(e); - return r.cmpn(0) < 0 && r.iadd(this.m), r._forceRed(this); - }), - (E.prototype.isub = function (t, e) { - this._verify2(t, e); - var r = t.isub(e); - return r.cmpn(0) < 0 && r.iadd(this.m), r; - }), - (E.prototype.shl = function (t, e) { - return this._verify1(t), this.imod(t.ushln(e)); - }), - (E.prototype.imul = function (t, e) { - return this._verify2(t, e), this.imod(t.imul(e)); - }), - (E.prototype.mul = function (t, e) { - return this._verify2(t, e), this.imod(t.mul(e)); - }), - (E.prototype.isqr = function (t) { - return this.imul(t, t.clone()); - }), - (E.prototype.sqr = function (t) { - return this.mul(t, t); - }), - (E.prototype.sqrt = function (t) { - if (t.isZero()) return t.clone(); - var e = this.m.andln(3); - if ((i(e % 2 == 1), 3 === e)) { - var r = this.m.add(new o(1)).iushrn(2); - return this.pow(t, r); - } - for (var n = this.m.subn(1), s = 0; !n.isZero() && 0 === n.andln(1); ) s++, n.iushrn(1); - i(!n.isZero()); - var a = new o(1).toRed(this), - h = a.redNeg(), - u = this.m.subn(1).iushrn(1), - f = this.m.bitLength(); - for (f = new o(2 * f * f).toRed(this); 0 !== this.pow(f, u).cmp(h); ) f.redIAdd(h); - for (var c = this.pow(f, n), l = this.pow(t, n.addn(1).iushrn(1)), d = this.pow(t, n), p = s; 0 !== d.cmp(a); ) { - for (var m = d, g = 0; 0 !== m.cmp(a); g++) m = m.redSqr(); - i(g < p); - var b = this.pow(c, new o(1).iushln(p - g - 1)); - (l = l.redMul(b)), (c = b.redSqr()), (d = d.redMul(c)), (p = g); - } - return l; - }), - (E.prototype.invm = function (t) { - var e = t._invmp(this.m); - return 0 !== e.negative ? ((e.negative = 0), this.imod(e).redNeg()) : this.imod(e); - }), - (E.prototype.pow = function (t, e) { - if (e.isZero()) return new o(1).toRed(this); - if (0 === e.cmpn(1)) return t.clone(); - var r = new Array(16); - (r[0] = new o(1).toRed(this)), (r[1] = t); - for (var i = 2; i < r.length; i++) r[i] = this.mul(r[i - 1], t); - var n = r[0], - s = 0, - a = 0, - h = e.bitLength() % 26; - for (0 === h && (h = 26), i = e.length - 1; i >= 0; i--) { - for (var u = e.words[i], f = h - 1; f >= 0; f--) { - var c = (u >> f) & 1; - n !== r[0] && (n = this.sqr(n)), - 0 !== c || 0 !== s - ? ((s <<= 1), (s |= c), (4 == ++a || (0 === i && 0 === f)) && ((n = this.mul(n, r[s])), (a = 0), (s = 0))) - : (a = 0); - } - h = 26; - } - return n; - }), - (E.prototype.convertTo = function (t) { - var e = t.umod(this.m); - return e === t ? e.clone() : e; - }), - (E.prototype.convertFrom = function (t) { - var e = t.clone(); - return (e.red = null), e; - }), - (o.mont = function (t) { - return new S(t); - }), - n(S, E), - (S.prototype.convertTo = function (t) { - return this.imod(t.ushln(this.shift)); - }), - (S.prototype.convertFrom = function (t) { - var e = this.imod(t.mul(this.rinv)); - return (e.red = null), e; - }), - (S.prototype.imul = function (t, e) { - if (t.isZero() || e.isZero()) return (t.words[0] = 0), (t.length = 1), t; - var r = t.imul(e), - i = r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m), - n = r.isub(i).iushrn(this.shift), - o = n; - return n.cmp(this.m) >= 0 ? (o = n.isub(this.m)) : n.cmpn(0) < 0 && (o = n.iadd(this.m)), o._forceRed(this); - }), - (S.prototype.mul = function (t, e) { - if (t.isZero() || e.isZero()) return new o(0)._forceRed(this); - var r = t.mul(e), - i = r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m), - n = r.isub(i).iushrn(this.shift), - s = n; - return n.cmp(this.m) >= 0 ? (s = n.isub(this.m)) : n.cmpn(0) < 0 && (s = n.iadd(this.m)), s._forceRed(this); - }), - (S.prototype.invm = function (t) { - return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this); - }); - })((t = r.nmd(t)), this); - }, - 7266: (t, e, r) => { - 'use strict'; - var i = r(87), - n = r(9500), - o = r(6558), - s = r(4458), - a = r(3081); - function h(t) { - a.call(this, 'digest'), (this._hash = t); - } - i(h, a), - (h.prototype._update = function (t) { - this._hash.update(t); - }), - (h.prototype._final = function () { - return this._hash.digest(); - }), - (t.exports = function (t) { - return 'md5' === (t = t.toLowerCase()) ? new n() : 'rmd160' === t || 'ripemd160' === t ? new o() : new h(s(t)); - }); - }, - 7401: (t, e, r) => { - var i = r(9500); - t.exports = function (t) { - return new i().update(t).digest(); - }; - }, - 2873: (t, e, r) => { - 'use strict'; - var i = r(87), - n = r(3042), - o = r(3081), - s = r(7172).Buffer, - a = r(7401), - h = r(6558), - u = r(4458), - f = s.alloc(128); - function c(t, e) { - o.call(this, 'digest'), 'string' == typeof e && (e = s.from(e)); - var r = 'sha512' === t || 'sha384' === t ? 128 : 64; - (this._alg = t), - (this._key = e), - e.length > r ? (e = ('rmd160' === t ? new h() : u(t)).update(e).digest()) : e.length < r && (e = s.concat([e, f], r)); - for (var i = (this._ipad = s.allocUnsafe(r)), n = (this._opad = s.allocUnsafe(r)), a = 0; a < r; a++) - (i[a] = 54 ^ e[a]), (n[a] = 92 ^ e[a]); - (this._hash = 'rmd160' === t ? new h() : u(t)), this._hash.update(i); - } - i(c, o), - (c.prototype._update = function (t) { - this._hash.update(t); - }), - (c.prototype._final = function () { - var t = this._hash.digest(); - return ('rmd160' === this._alg ? new h() : u(this._alg)).update(this._opad).update(t).digest(); - }), - (t.exports = function (t, e) { - return 'rmd160' === (t = t.toLowerCase()) || 'ripemd160' === t ? new c('rmd160', e) : 'md5' === t ? new n(a, e) : new c(t, e); - }); - }, - 3042: (t, e, r) => { - 'use strict'; - var i = r(87), - n = r(7172).Buffer, - o = r(3081), - s = n.alloc(128), - a = 64; - function h(t, e) { - o.call(this, 'digest'), - 'string' == typeof e && (e = n.from(e)), - (this._alg = t), - (this._key = e), - e.length > a ? (e = t(e)) : e.length < a && (e = n.concat([e, s], a)); - for (var r = (this._ipad = n.allocUnsafe(a)), i = (this._opad = n.allocUnsafe(a)), h = 0; h < a; h++) - (r[h] = 54 ^ e[h]), (i[h] = 92 ^ e[h]); - this._hash = [r]; - } - i(h, o), - (h.prototype._update = function (t) { - this._hash.push(t); - }), - (h.prototype._final = function () { - var t = this._alg(n.concat(this._hash)); - return this._alg(n.concat([this._opad, t])); - }), - (t.exports = h); - }, - 2337: (t, e, r) => { - 'use strict'; - (e.randomBytes = e.rng = e.pseudoRandomBytes = e.prng = r(4198)), - (e.createHash = e.Hash = r(7266)), - (e.createHmac = e.Hmac = r(2873)); - var i = r(4905), - n = Object.keys(i), - o = ['sha1', 'sha224', 'sha256', 'sha384', 'sha512', 'md5', 'rmd160'].concat(n); - e.getHashes = function () { - return o; - }; - var s = r(41); - (e.pbkdf2 = s.pbkdf2), (e.pbkdf2Sync = s.pbkdf2Sync); - var a = r(1240); - (e.Cipher = a.Cipher), - (e.createCipher = a.createCipher), - (e.Cipheriv = a.Cipheriv), - (e.createCipheriv = a.createCipheriv), - (e.Decipher = a.Decipher), - (e.createDecipher = a.createDecipher), - (e.Decipheriv = a.Decipheriv), - (e.createDecipheriv = a.createDecipheriv), - (e.getCiphers = a.getCiphers), - (e.listCiphers = a.listCiphers); - var h = r(2834); - (e.DiffieHellmanGroup = h.DiffieHellmanGroup), - (e.createDiffieHellmanGroup = h.createDiffieHellmanGroup), - (e.getDiffieHellman = h.getDiffieHellman), - (e.createDiffieHellman = h.createDiffieHellman), - (e.DiffieHellman = h.DiffieHellman); - var u = r(7545); - (e.createSign = u.createSign), - (e.Sign = u.Sign), - (e.createVerify = u.createVerify), - (e.Verify = u.Verify), - (e.createECDH = r(2220)); - var f = r(9639); - (e.publicEncrypt = f.publicEncrypt), - (e.privateEncrypt = f.privateEncrypt), - (e.publicDecrypt = f.publicDecrypt), - (e.privateDecrypt = f.privateDecrypt); - var c = r(8519); - (e.randomFill = c.randomFill), - (e.randomFillSync = c.randomFillSync), - (e.createCredentials = function () { - throw new Error( - [ - 'sorry, createCredentials is not implemented yet', - 'we accept pull requests', - 'https://github.com/crypto-browserify/crypto-browserify', - ].join('\n') - ); - }), - (e.constants = { - DH_CHECK_P_NOT_SAFE_PRIME: 2, - DH_CHECK_P_NOT_PRIME: 1, - DH_UNABLE_TO_CHECK_GENERATOR: 4, - DH_NOT_SUITABLE_GENERATOR: 8, - NPN_ENABLED: 1, - ALPN_ENABLED: 1, - RSA_PKCS1_PADDING: 1, - RSA_SSLV23_PADDING: 2, - RSA_NO_PADDING: 3, - RSA_PKCS1_OAEP_PADDING: 4, - RSA_X931_PADDING: 5, - RSA_PKCS1_PSS_PADDING: 6, - POINT_CONVERSION_COMPRESSED: 2, - POINT_CONVERSION_UNCOMPRESSED: 4, - POINT_CONVERSION_HYBRID: 6, - }); - }, - 7191: (t, e, r) => { - 'use strict'; - (e.utils = r(5516)), (e.Cipher = r(4923)), (e.DES = r(225)), (e.CBC = r(8701)), (e.EDE = r(6540)); - }, - 8701: (t, e, r) => { - 'use strict'; - var i = r(7859), - n = r(87), - o = {}; - function s(t) { - i.equal(t.length, 8, 'Invalid IV length'), (this.iv = new Array(8)); - for (var e = 0; e < this.iv.length; e++) this.iv[e] = t[e]; - } - (e.instantiate = function (t) { - function e(e) { - t.call(this, e), this._cbcInit(); - } - n(e, t); - for (var r = Object.keys(o), i = 0; i < r.length; i++) { - var s = r[i]; - e.prototype[s] = o[s]; - } - return ( - (e.create = function (t) { - return new e(t); - }), - e - ); - }), - (o._cbcInit = function () { - var t = new s(this.options.iv); - this._cbcState = t; - }), - (o._update = function (t, e, r, i) { - var n = this._cbcState, - o = this.constructor.super_.prototype, - s = n.iv; - if ('encrypt' === this.type) { - for (var a = 0; a < this.blockSize; a++) s[a] ^= t[e + a]; - for (o._update.call(this, s, 0, r, i), a = 0; a < this.blockSize; a++) s[a] = r[i + a]; - } else { - for (o._update.call(this, t, e, r, i), a = 0; a < this.blockSize; a++) r[i + a] ^= s[a]; - for (a = 0; a < this.blockSize; a++) s[a] = t[e + a]; - } - }); - }, - 4923: (t, e, r) => { - 'use strict'; - var i = r(7859); - function n(t) { - (this.options = t), - (this.type = this.options.type), - (this.blockSize = 8), - this._init(), - (this.buffer = new Array(this.blockSize)), - (this.bufferOff = 0); - } - (t.exports = n), - (n.prototype._init = function () {}), - (n.prototype.update = function (t) { - return 0 === t.length ? [] : 'decrypt' === this.type ? this._updateDecrypt(t) : this._updateEncrypt(t); - }), - (n.prototype._buffer = function (t, e) { - for (var r = Math.min(this.buffer.length - this.bufferOff, t.length - e), i = 0; i < r; i++) - this.buffer[this.bufferOff + i] = t[e + i]; - return (this.bufferOff += r), r; - }), - (n.prototype._flushBuffer = function (t, e) { - return this._update(this.buffer, 0, t, e), (this.bufferOff = 0), this.blockSize; - }), - (n.prototype._updateEncrypt = function (t) { - var e = 0, - r = 0, - i = ((this.bufferOff + t.length) / this.blockSize) | 0, - n = new Array(i * this.blockSize); - 0 !== this.bufferOff && ((e += this._buffer(t, e)), this.bufferOff === this.buffer.length && (r += this._flushBuffer(n, r))); - for (var o = t.length - ((t.length - e) % this.blockSize); e < o; e += this.blockSize) - this._update(t, e, n, r), (r += this.blockSize); - for (; e < t.length; e++, this.bufferOff++) this.buffer[this.bufferOff] = t[e]; - return n; - }), - (n.prototype._updateDecrypt = function (t) { - for ( - var e = 0, r = 0, i = Math.ceil((this.bufferOff + t.length) / this.blockSize) - 1, n = new Array(i * this.blockSize); - i > 0; - i-- - ) - (e += this._buffer(t, e)), (r += this._flushBuffer(n, r)); - return (e += this._buffer(t, e)), n; - }), - (n.prototype.final = function (t) { - var e, r; - return ( - t && (e = this.update(t)), (r = 'encrypt' === this.type ? this._finalEncrypt() : this._finalDecrypt()), e ? e.concat(r) : r - ); - }), - (n.prototype._pad = function (t, e) { - if (0 === e) return !1; - for (; e < t.length; ) t[e++] = 0; - return !0; - }), - (n.prototype._finalEncrypt = function () { - if (!this._pad(this.buffer, this.bufferOff)) return []; - var t = new Array(this.blockSize); - return this._update(this.buffer, 0, t, 0), t; - }), - (n.prototype._unpad = function (t) { - return t; - }), - (n.prototype._finalDecrypt = function () { - i.equal(this.bufferOff, this.blockSize, 'Not enough data to decrypt'); - var t = new Array(this.blockSize); - return this._flushBuffer(t, 0), this._unpad(t); - }); - }, - 225: (t, e, r) => { - 'use strict'; - var i = r(7859), - n = r(87), - o = r(5516), - s = r(4923); - function a() { - (this.tmp = new Array(2)), (this.keys = null); - } - function h(t) { - s.call(this, t); - var e = new a(); - (this._desState = e), this.deriveKeys(e, t.key); - } - n(h, s), - (t.exports = h), - (h.create = function (t) { - return new h(t); - }); - var u = [1, 1, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 1]; - (h.prototype.deriveKeys = function (t, e) { - (t.keys = new Array(32)), i.equal(e.length, this.blockSize, 'Invalid key length'); - var r = o.readUInt32BE(e, 0), - n = o.readUInt32BE(e, 4); - o.pc1(r, n, t.tmp, 0), (r = t.tmp[0]), (n = t.tmp[1]); - for (var s = 0; s < t.keys.length; s += 2) { - var a = u[s >>> 1]; - (r = o.r28shl(r, a)), (n = o.r28shl(n, a)), o.pc2(r, n, t.keys, s); - } - }), - (h.prototype._update = function (t, e, r, i) { - var n = this._desState, - s = o.readUInt32BE(t, e), - a = o.readUInt32BE(t, e + 4); - o.ip(s, a, n.tmp, 0), - (s = n.tmp[0]), - (a = n.tmp[1]), - 'encrypt' === this.type ? this._encrypt(n, s, a, n.tmp, 0) : this._decrypt(n, s, a, n.tmp, 0), - (s = n.tmp[0]), - (a = n.tmp[1]), - o.writeUInt32BE(r, s, i), - o.writeUInt32BE(r, a, i + 4); - }), - (h.prototype._pad = function (t, e) { - for (var r = t.length - e, i = e; i < t.length; i++) t[i] = r; - return !0; - }), - (h.prototype._unpad = function (t) { - for (var e = t[t.length - 1], r = t.length - e; r < t.length; r++) i.equal(t[r], e); - return t.slice(0, t.length - e); - }), - (h.prototype._encrypt = function (t, e, r, i, n) { - for (var s = e, a = r, h = 0; h < t.keys.length; h += 2) { - var u = t.keys[h], - f = t.keys[h + 1]; - o.expand(a, t.tmp, 0), (u ^= t.tmp[0]), (f ^= t.tmp[1]); - var c = o.substitute(u, f), - l = a; - (a = (s ^ o.permute(c)) >>> 0), (s = l); - } - o.rip(a, s, i, n); - }), - (h.prototype._decrypt = function (t, e, r, i, n) { - for (var s = r, a = e, h = t.keys.length - 2; h >= 0; h -= 2) { - var u = t.keys[h], - f = t.keys[h + 1]; - o.expand(s, t.tmp, 0), (u ^= t.tmp[0]), (f ^= t.tmp[1]); - var c = o.substitute(u, f), - l = s; - (s = (a ^ o.permute(c)) >>> 0), (a = l); - } - o.rip(s, a, i, n); - }); - }, - 6540: (t, e, r) => { - 'use strict'; - var i = r(7859), - n = r(87), - o = r(4923), - s = r(225); - function a(t, e) { - i.equal(e.length, 24, 'Invalid key length'); - var r = e.slice(0, 8), - n = e.slice(8, 16), - o = e.slice(16, 24); - this.ciphers = - 'encrypt' === t - ? [s.create({ type: 'encrypt', key: r }), s.create({ type: 'decrypt', key: n }), s.create({ type: 'encrypt', key: o })] - : [s.create({ type: 'decrypt', key: o }), s.create({ type: 'encrypt', key: n }), s.create({ type: 'decrypt', key: r })]; - } - function h(t) { - o.call(this, t); - var e = new a(this.type, this.options.key); - this._edeState = e; - } - n(h, o), - (t.exports = h), - (h.create = function (t) { - return new h(t); - }), - (h.prototype._update = function (t, e, r, i) { - var n = this._edeState; - n.ciphers[0]._update(t, e, r, i), n.ciphers[1]._update(r, i, r, i), n.ciphers[2]._update(r, i, r, i); - }), - (h.prototype._pad = s.prototype._pad), - (h.prototype._unpad = s.prototype._unpad); - }, - 5516: (t, e) => { - 'use strict'; - (e.readUInt32BE = function (t, e) { - return ((t[0 + e] << 24) | (t[1 + e] << 16) | (t[2 + e] << 8) | t[3 + e]) >>> 0; - }), - (e.writeUInt32BE = function (t, e, r) { - (t[0 + r] = e >>> 24), (t[1 + r] = (e >>> 16) & 255), (t[2 + r] = (e >>> 8) & 255), (t[3 + r] = 255 & e); - }), - (e.ip = function (t, e, r, i) { - for (var n = 0, o = 0, s = 6; s >= 0; s -= 2) { - for (var a = 0; a <= 24; a += 8) (n <<= 1), (n |= (e >>> (a + s)) & 1); - for (a = 0; a <= 24; a += 8) (n <<= 1), (n |= (t >>> (a + s)) & 1); - } - for (s = 6; s >= 0; s -= 2) { - for (a = 1; a <= 25; a += 8) (o <<= 1), (o |= (e >>> (a + s)) & 1); - for (a = 1; a <= 25; a += 8) (o <<= 1), (o |= (t >>> (a + s)) & 1); - } - (r[i + 0] = n >>> 0), (r[i + 1] = o >>> 0); - }), - (e.rip = function (t, e, r, i) { - for (var n = 0, o = 0, s = 0; s < 4; s++) - for (var a = 24; a >= 0; a -= 8) (n <<= 1), (n |= (e >>> (a + s)) & 1), (n <<= 1), (n |= (t >>> (a + s)) & 1); - for (s = 4; s < 8; s++) - for (a = 24; a >= 0; a -= 8) (o <<= 1), (o |= (e >>> (a + s)) & 1), (o <<= 1), (o |= (t >>> (a + s)) & 1); - (r[i + 0] = n >>> 0), (r[i + 1] = o >>> 0); - }), - (e.pc1 = function (t, e, r, i) { - for (var n = 0, o = 0, s = 7; s >= 5; s--) { - for (var a = 0; a <= 24; a += 8) (n <<= 1), (n |= (e >> (a + s)) & 1); - for (a = 0; a <= 24; a += 8) (n <<= 1), (n |= (t >> (a + s)) & 1); - } - for (a = 0; a <= 24; a += 8) (n <<= 1), (n |= (e >> (a + s)) & 1); - for (s = 1; s <= 3; s++) { - for (a = 0; a <= 24; a += 8) (o <<= 1), (o |= (e >> (a + s)) & 1); - for (a = 0; a <= 24; a += 8) (o <<= 1), (o |= (t >> (a + s)) & 1); - } - for (a = 0; a <= 24; a += 8) (o <<= 1), (o |= (t >> (a + s)) & 1); - (r[i + 0] = n >>> 0), (r[i + 1] = o >>> 0); - }), - (e.r28shl = function (t, e) { - return ((t << e) & 268435455) | (t >>> (28 - e)); - }); - var r = [ - 14, 11, 17, 4, 27, 23, 25, 0, 13, 22, 7, 18, 5, 9, 16, 24, 2, 20, 12, 21, 1, 8, 15, 26, 15, 4, 25, 19, 9, 1, 26, 16, 5, 11, 23, 8, - 12, 7, 17, 0, 22, 3, 10, 14, 6, 20, 27, 24, - ]; - (e.pc2 = function (t, e, i, n) { - for (var o = 0, s = 0, a = r.length >>> 1, h = 0; h < a; h++) (o <<= 1), (o |= (t >>> r[h]) & 1); - for (h = a; h < r.length; h++) (s <<= 1), (s |= (e >>> r[h]) & 1); - (i[n + 0] = o >>> 0), (i[n + 1] = s >>> 0); - }), - (e.expand = function (t, e, r) { - var i = 0, - n = 0; - i = ((1 & t) << 5) | (t >>> 27); - for (var o = 23; o >= 15; o -= 4) (i <<= 6), (i |= (t >>> o) & 63); - for (o = 11; o >= 3; o -= 4) (n |= (t >>> o) & 63), (n <<= 6); - (n |= ((31 & t) << 1) | (t >>> 31)), (e[r + 0] = i >>> 0), (e[r + 1] = n >>> 0); - }); - var i = [ - 14, 0, 4, 15, 13, 7, 1, 4, 2, 14, 15, 2, 11, 13, 8, 1, 3, 10, 10, 6, 6, 12, 12, 11, 5, 9, 9, 5, 0, 3, 7, 8, 4, 15, 1, 12, 14, 8, - 8, 2, 13, 4, 6, 9, 2, 1, 11, 7, 15, 5, 12, 11, 9, 3, 7, 14, 3, 10, 10, 0, 5, 6, 0, 13, 15, 3, 1, 13, 8, 4, 14, 7, 6, 15, 11, 2, 3, - 8, 4, 14, 9, 12, 7, 0, 2, 1, 13, 10, 12, 6, 0, 9, 5, 11, 10, 5, 0, 13, 14, 8, 7, 10, 11, 1, 10, 3, 4, 15, 13, 4, 1, 2, 5, 11, 8, - 6, 12, 7, 6, 12, 9, 0, 3, 5, 2, 14, 15, 9, 10, 13, 0, 7, 9, 0, 14, 9, 6, 3, 3, 4, 15, 6, 5, 10, 1, 2, 13, 8, 12, 5, 7, 14, 11, 12, - 4, 11, 2, 15, 8, 1, 13, 1, 6, 10, 4, 13, 9, 0, 8, 6, 15, 9, 3, 8, 0, 7, 11, 4, 1, 15, 2, 14, 12, 3, 5, 11, 10, 5, 14, 2, 7, 12, 7, - 13, 13, 8, 14, 11, 3, 5, 0, 6, 6, 15, 9, 0, 10, 3, 1, 4, 2, 7, 8, 2, 5, 12, 11, 1, 12, 10, 4, 14, 15, 9, 10, 3, 6, 15, 9, 0, 0, 6, - 12, 10, 11, 1, 7, 13, 13, 8, 15, 9, 1, 4, 3, 5, 14, 11, 5, 12, 2, 7, 8, 2, 4, 14, 2, 14, 12, 11, 4, 2, 1, 12, 7, 4, 10, 7, 11, 13, - 6, 1, 8, 5, 5, 0, 3, 15, 15, 10, 13, 3, 0, 9, 14, 8, 9, 6, 4, 11, 2, 8, 1, 12, 11, 7, 10, 1, 13, 14, 7, 2, 8, 13, 15, 6, 9, 15, - 12, 0, 5, 9, 6, 10, 3, 4, 0, 5, 14, 3, 12, 10, 1, 15, 10, 4, 15, 2, 9, 7, 2, 12, 6, 9, 8, 5, 0, 6, 13, 1, 3, 13, 4, 14, 14, 0, 7, - 11, 5, 3, 11, 8, 9, 4, 14, 3, 15, 2, 5, 12, 2, 9, 8, 5, 12, 15, 3, 10, 7, 11, 0, 14, 4, 1, 10, 7, 1, 6, 13, 0, 11, 8, 6, 13, 4, - 13, 11, 0, 2, 11, 14, 7, 15, 4, 0, 9, 8, 1, 13, 10, 3, 14, 12, 3, 9, 5, 7, 12, 5, 2, 10, 15, 6, 8, 1, 6, 1, 6, 4, 11, 11, 13, 13, - 8, 12, 1, 3, 4, 7, 10, 14, 7, 10, 9, 15, 5, 6, 0, 8, 15, 0, 14, 5, 2, 9, 3, 2, 12, 13, 1, 2, 15, 8, 13, 4, 8, 6, 10, 15, 3, 11, 7, - 1, 4, 10, 12, 9, 5, 3, 6, 14, 11, 5, 0, 0, 14, 12, 9, 7, 2, 7, 2, 11, 1, 4, 14, 1, 7, 9, 4, 12, 10, 14, 8, 2, 13, 0, 15, 6, 12, - 10, 9, 13, 0, 15, 3, 3, 5, 5, 6, 8, 11, - ]; - e.substitute = function (t, e) { - for (var r = 0, n = 0; n < 4; n++) (r <<= 4), (r |= i[64 * n + ((t >>> (18 - 6 * n)) & 63)]); - for (n = 0; n < 4; n++) (r <<= 4), (r |= i[256 + 64 * n + ((e >>> (18 - 6 * n)) & 63)]); - return r >>> 0; - }; - var n = [16, 25, 12, 11, 3, 20, 4, 15, 31, 17, 9, 6, 27, 14, 1, 22, 30, 24, 8, 18, 0, 5, 29, 23, 13, 19, 2, 26, 10, 21, 28, 7]; - (e.permute = function (t) { - for (var e = 0, r = 0; r < n.length; r++) (e <<= 1), (e |= (t >>> n[r]) & 1); - return e >>> 0; - }), - (e.padSplit = function (t, e, r) { - for (var i = t.toString(2); i.length < e; ) i = '0' + i; - for (var n = [], o = 0; o < e; o += r) n.push(i.slice(o, o + r)); - return n.join(' '); - }); - }, - 2834: (t, e, r) => { - var i = r(5757), - n = r(7064), - o = r(1554), - s = { binary: !0, hex: !0, base64: !0 }; - (e.DiffieHellmanGroup = - e.createDiffieHellmanGroup = - e.getDiffieHellman = - function (t) { - var e = new Buffer(n[t].prime, 'hex'), - r = new Buffer(n[t].gen, 'hex'); - return new o(e, r); - }), - (e.createDiffieHellman = e.DiffieHellman = - function t(e, r, n, a) { - return Buffer.isBuffer(r) || void 0 === s[r] - ? t(e, 'binary', r, n) - : ((r = r || 'binary'), - (a = a || 'binary'), - (n = n || new Buffer([2])), - Buffer.isBuffer(n) || (n = new Buffer(n, a)), - 'number' == typeof e ? new o(i(e, n), n, !0) : (Buffer.isBuffer(e) || (e = new Buffer(e, r)), new o(e, n, !0))); - }); - }, - 1554: (t, e, r) => { - var i = r(3085), - n = new (r(8773))(), - o = new i(24), - s = new i(11), - a = new i(10), - h = new i(3), - u = new i(7), - f = r(5757), - c = r(4198); - function l(t, e) { - return (e = e || 'utf8'), Buffer.isBuffer(t) || (t = new Buffer(t, e)), (this._pub = new i(t)), this; - } - function d(t, e) { - return (e = e || 'utf8'), Buffer.isBuffer(t) || (t = new Buffer(t, e)), (this._priv = new i(t)), this; - } - t.exports = m; - var p = {}; - function m(t, e, r) { - this.setGenerator(e), - (this.__prime = new i(t)), - (this._prime = i.mont(this.__prime)), - (this._primeLen = t.length), - (this._pub = void 0), - (this._priv = void 0), - (this._primeCode = void 0), - r ? ((this.setPublicKey = l), (this.setPrivateKey = d)) : (this._primeCode = 8); - } - function g(t, e) { - var r = new Buffer(t.toArray()); - return e ? r.toString(e) : r; - } - Object.defineProperty(m.prototype, 'verifyError', { - enumerable: !0, - get: function () { - return ( - 'number' != typeof this._primeCode && - (this._primeCode = (function (t, e) { - var r = e.toString('hex'), - i = [r, t.toString(16)].join('_'); - if (i in p) return p[i]; - var c, - l = 0; - if (t.isEven() || !f.simpleSieve || !f.fermatTest(t) || !n.test(t)) - return (l += 1), (l += '02' === r || '05' === r ? 8 : 4), (p[i] = l), l; - switch ((n.test(t.shrn(1)) || (l += 2), r)) { - case '02': - t.mod(o).cmp(s) && (l += 8); - break; - case '05': - (c = t.mod(a)).cmp(h) && c.cmp(u) && (l += 8); - break; - default: - l += 4; - } - return (p[i] = l), l; - })(this.__prime, this.__gen)), - this._primeCode - ); - }, - }), - (m.prototype.generateKeys = function () { - return ( - this._priv || (this._priv = new i(c(this._primeLen))), - (this._pub = this._gen.toRed(this._prime).redPow(this._priv).fromRed()), - this.getPublicKey() - ); - }), - (m.prototype.computeSecret = function (t) { - var e = (t = (t = new i(t)).toRed(this._prime)).redPow(this._priv).fromRed(), - r = new Buffer(e.toArray()), - n = this.getPrime(); - if (r.length < n.length) { - var o = new Buffer(n.length - r.length); - o.fill(0), (r = Buffer.concat([o, r])); - } - return r; - }), - (m.prototype.getPublicKey = function (t) { - return g(this._pub, t); - }), - (m.prototype.getPrivateKey = function (t) { - return g(this._priv, t); - }), - (m.prototype.getPrime = function (t) { - return g(this.__prime, t); - }), - (m.prototype.getGenerator = function (t) { - return g(this._gen, t); - }), - (m.prototype.setGenerator = function (t, e) { - return (e = e || 'utf8'), Buffer.isBuffer(t) || (t = new Buffer(t, e)), (this.__gen = t), (this._gen = new i(t)), this; - }); - }, - 5757: (t, e, r) => { - var i = r(4198); - (t.exports = y), (y.simpleSieve = g), (y.fermatTest = b); - var n = r(3085), - o = new n(24), - s = new (r(8773))(), - a = new n(1), - h = new n(2), - u = new n(5), - f = (new n(16), new n(8), new n(10)), - c = new n(3), - l = (new n(7), new n(11)), - d = new n(4), - p = (new n(12), null); - function m() { - if (null !== p) return p; - var t = []; - t[0] = 2; - for (var e = 1, r = 3; r < 1048576; r += 2) { - for (var i = Math.ceil(Math.sqrt(r)), n = 0; n < e && t[n] <= i && r % t[n] != 0; n++); - (e !== n && t[n] <= i) || (t[e++] = r); - } - return (p = t), t; - } - function g(t) { - for (var e = m(), r = 0; r < e.length; r++) if (0 === t.modn(e[r])) return 0 === t.cmpn(e[r]); - return !0; - } - function b(t) { - var e = n.mont(t); - return 0 === h.toRed(e).redPow(t.subn(1)).fromRed().cmpn(1); - } - function y(t, e) { - if (t < 16) return new n(2 === e || 5 === e ? [140, 123] : [140, 39]); - var r, p; - for (e = new n(e); ; ) { - for (r = new n(i(Math.ceil(t / 8))); r.bitLength() > t; ) r.ishrn(1); - if ((r.isEven() && r.iadd(a), r.testn(1) || r.iadd(h), e.cmp(h))) { - if (!e.cmp(u)) for (; r.mod(f).cmp(c); ) r.iadd(d); - } else for (; r.mod(o).cmp(l); ) r.iadd(d); - if (g((p = r.shrn(1))) && g(r) && b(p) && b(r) && s.test(p) && s.test(r)) return r; - } - } - }, - 3085: function (t, e, r) { - !(function (t, e) { - 'use strict'; - function i(t, e) { - if (!t) throw new Error(e || 'Assertion failed'); - } - function n(t, e) { - t.super_ = e; - var r = function () {}; - (r.prototype = e.prototype), (t.prototype = new r()), (t.prototype.constructor = t); - } - function o(t, e, r) { - if (o.isBN(t)) return t; - (this.negative = 0), - (this.words = null), - (this.length = 0), - (this.red = null), - null !== t && (('le' !== e && 'be' !== e) || ((r = e), (e = 10)), this._init(t || 0, e || 10, r || 'be')); - } - var s; - 'object' == typeof t ? (t.exports = o) : (e.BN = o), (o.BN = o), (o.wordSize = 26); - try { - s = 'undefined' != typeof window && void 0 !== window.Buffer ? window.Buffer : r(1212).Buffer; - } catch (t) {} - function a(t, e) { - var r = t.charCodeAt(e); - return r >= 65 && r <= 70 ? r - 55 : r >= 97 && r <= 102 ? r - 87 : (r - 48) & 15; - } - function h(t, e, r) { - var i = a(t, r); - return r - 1 >= e && (i |= a(t, r - 1) << 4), i; - } - function u(t, e, r, i) { - for (var n = 0, o = Math.min(t.length, r), s = e; s < o; s++) { - var a = t.charCodeAt(s) - 48; - (n *= i), (n += a >= 49 ? a - 49 + 10 : a >= 17 ? a - 17 + 10 : a); - } - return n; - } - (o.isBN = function (t) { - return ( - t instanceof o || (null !== t && 'object' == typeof t && t.constructor.wordSize === o.wordSize && Array.isArray(t.words)) - ); - }), - (o.max = function (t, e) { - return t.cmp(e) > 0 ? t : e; - }), - (o.min = function (t, e) { - return t.cmp(e) < 0 ? t : e; - }), - (o.prototype._init = function (t, e, r) { - if ('number' == typeof t) return this._initNumber(t, e, r); - if ('object' == typeof t) return this._initArray(t, e, r); - 'hex' === e && (e = 16), i(e === (0 | e) && e >= 2 && e <= 36); - var n = 0; - '-' === (t = t.toString().replace(/\s+/g, ''))[0] && (n++, (this.negative = 1)), - n < t.length && - (16 === e ? this._parseHex(t, n, r) : (this._parseBase(t, e, n), 'le' === r && this._initArray(this.toArray(), e, r))); - }), - (o.prototype._initNumber = function (t, e, r) { - t < 0 && ((this.negative = 1), (t = -t)), - t < 67108864 - ? ((this.words = [67108863 & t]), (this.length = 1)) - : t < 4503599627370496 - ? ((this.words = [67108863 & t, (t / 67108864) & 67108863]), (this.length = 2)) - : (i(t < 9007199254740992), (this.words = [67108863 & t, (t / 67108864) & 67108863, 1]), (this.length = 3)), - 'le' === r && this._initArray(this.toArray(), e, r); - }), - (o.prototype._initArray = function (t, e, r) { - if ((i('number' == typeof t.length), t.length <= 0)) return (this.words = [0]), (this.length = 1), this; - (this.length = Math.ceil(t.length / 3)), (this.words = new Array(this.length)); - for (var n = 0; n < this.length; n++) this.words[n] = 0; - var o, - s, - a = 0; - if ('be' === r) - for (n = t.length - 1, o = 0; n >= 0; n -= 3) - (s = t[n] | (t[n - 1] << 8) | (t[n - 2] << 16)), - (this.words[o] |= (s << a) & 67108863), - (this.words[o + 1] = (s >>> (26 - a)) & 67108863), - (a += 24) >= 26 && ((a -= 26), o++); - else if ('le' === r) - for (n = 0, o = 0; n < t.length; n += 3) - (s = t[n] | (t[n + 1] << 8) | (t[n + 2] << 16)), - (this.words[o] |= (s << a) & 67108863), - (this.words[o + 1] = (s >>> (26 - a)) & 67108863), - (a += 24) >= 26 && ((a -= 26), o++); - return this.strip(); - }), - (o.prototype._parseHex = function (t, e, r) { - (this.length = Math.ceil((t.length - e) / 6)), (this.words = new Array(this.length)); - for (var i = 0; i < this.length; i++) this.words[i] = 0; - var n, - o = 0, - s = 0; - if ('be' === r) - for (i = t.length - 1; i >= e; i -= 2) - (n = h(t, e, i) << o), - (this.words[s] |= 67108863 & n), - o >= 18 ? ((o -= 18), (s += 1), (this.words[s] |= n >>> 26)) : (o += 8); - else - for (i = (t.length - e) % 2 == 0 ? e + 1 : e; i < t.length; i += 2) - (n = h(t, e, i) << o), - (this.words[s] |= 67108863 & n), - o >= 18 ? ((o -= 18), (s += 1), (this.words[s] |= n >>> 26)) : (o += 8); - this.strip(); - }), - (o.prototype._parseBase = function (t, e, r) { - (this.words = [0]), (this.length = 1); - for (var i = 0, n = 1; n <= 67108863; n *= e) i++; - i--, (n = (n / e) | 0); - for (var o = t.length - r, s = o % i, a = Math.min(o, o - s) + r, h = 0, f = r; f < a; f += i) - (h = u(t, f, f + i, e)), this.imuln(n), this.words[0] + h < 67108864 ? (this.words[0] += h) : this._iaddn(h); - if (0 !== s) { - var c = 1; - for (h = u(t, f, t.length, e), f = 0; f < s; f++) c *= e; - this.imuln(c), this.words[0] + h < 67108864 ? (this.words[0] += h) : this._iaddn(h); - } - this.strip(); - }), - (o.prototype.copy = function (t) { - t.words = new Array(this.length); - for (var e = 0; e < this.length; e++) t.words[e] = this.words[e]; - (t.length = this.length), (t.negative = this.negative), (t.red = this.red); - }), - (o.prototype.clone = function () { - var t = new o(null); - return this.copy(t), t; - }), - (o.prototype._expand = function (t) { - for (; this.length < t; ) this.words[this.length++] = 0; - return this; - }), - (o.prototype.strip = function () { - for (; this.length > 1 && 0 === this.words[this.length - 1]; ) this.length--; - return this._normSign(); - }), - (o.prototype._normSign = function () { - return 1 === this.length && 0 === this.words[0] && (this.negative = 0), this; - }), - (o.prototype.inspect = function () { - return (this.red ? ''; - }); - var f = [ - '', - '0', - '00', - '000', - '0000', - '00000', - '000000', - '0000000', - '00000000', - '000000000', - '0000000000', - '00000000000', - '000000000000', - '0000000000000', - '00000000000000', - '000000000000000', - '0000000000000000', - '00000000000000000', - '000000000000000000', - '0000000000000000000', - '00000000000000000000', - '000000000000000000000', - '0000000000000000000000', - '00000000000000000000000', - '000000000000000000000000', - '0000000000000000000000000', - ], - c = [0, 0, 25, 16, 12, 11, 10, 9, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5], - l = [ - 0, 0, 33554432, 43046721, 16777216, 48828125, 60466176, 40353607, 16777216, 43046721, 1e7, 19487171, 35831808, 62748517, - 7529536, 11390625, 16777216, 24137569, 34012224, 47045881, 64e6, 4084101, 5153632, 6436343, 7962624, 9765625, 11881376, - 14348907, 17210368, 20511149, 243e5, 28629151, 33554432, 39135393, 45435424, 52521875, 60466176, - ]; - function d(t, e, r) { - r.negative = e.negative ^ t.negative; - var i = (t.length + e.length) | 0; - (r.length = i), (i = (i - 1) | 0); - var n = 0 | t.words[0], - o = 0 | e.words[0], - s = n * o, - a = 67108863 & s, - h = (s / 67108864) | 0; - r.words[0] = a; - for (var u = 1; u < i; u++) { - for (var f = h >>> 26, c = 67108863 & h, l = Math.min(u, e.length - 1), d = Math.max(0, u - t.length + 1); d <= l; d++) { - var p = (u - d) | 0; - (f += ((s = (n = 0 | t.words[p]) * (o = 0 | e.words[d]) + c) / 67108864) | 0), (c = 67108863 & s); - } - (r.words[u] = 0 | c), (h = 0 | f); - } - return 0 !== h ? (r.words[u] = 0 | h) : r.length--, r.strip(); - } - (o.prototype.toString = function (t, e) { - var r; - if (((e = 0 | e || 1), 16 === (t = t || 10) || 'hex' === t)) { - r = ''; - for (var n = 0, o = 0, s = 0; s < this.length; s++) { - var a = this.words[s], - h = (16777215 & ((a << n) | o)).toString(16); - (r = 0 != (o = (a >>> (24 - n)) & 16777215) || s !== this.length - 1 ? f[6 - h.length] + h + r : h + r), - (n += 2) >= 26 && ((n -= 26), s--); - } - for (0 !== o && (r = o.toString(16) + r); r.length % e != 0; ) r = '0' + r; - return 0 !== this.negative && (r = '-' + r), r; - } - if (t === (0 | t) && t >= 2 && t <= 36) { - var u = c[t], - d = l[t]; - r = ''; - var p = this.clone(); - for (p.negative = 0; !p.isZero(); ) { - var m = p.modn(d).toString(t); - r = (p = p.idivn(d)).isZero() ? m + r : f[u - m.length] + m + r; - } - for (this.isZero() && (r = '0' + r); r.length % e != 0; ) r = '0' + r; - return 0 !== this.negative && (r = '-' + r), r; - } - i(!1, 'Base should be between 2 and 36'); - }), - (o.prototype.toNumber = function () { - var t = this.words[0]; - return ( - 2 === this.length - ? (t += 67108864 * this.words[1]) - : 3 === this.length && 1 === this.words[2] - ? (t += 4503599627370496 + 67108864 * this.words[1]) - : this.length > 2 && i(!1, 'Number can only safely store up to 53 bits'), - 0 !== this.negative ? -t : t - ); - }), - (o.prototype.toJSON = function () { - return this.toString(16); - }), - (o.prototype.toBuffer = function (t, e) { - return i(void 0 !== s), this.toArrayLike(s, t, e); - }), - (o.prototype.toArray = function (t, e) { - return this.toArrayLike(Array, t, e); - }), - (o.prototype.toArrayLike = function (t, e, r) { - var n = this.byteLength(), - o = r || Math.max(1, n); - i(n <= o, 'byte array longer than desired length'), i(o > 0, 'Requested array length <= 0'), this.strip(); - var s, - a, - h = 'le' === e, - u = new t(o), - f = this.clone(); - if (h) { - for (a = 0; !f.isZero(); a++) (s = f.andln(255)), f.iushrn(8), (u[a] = s); - for (; a < o; a++) u[a] = 0; - } else { - for (a = 0; a < o - n; a++) u[a] = 0; - for (a = 0; !f.isZero(); a++) (s = f.andln(255)), f.iushrn(8), (u[o - a - 1] = s); - } - return u; - }), - Math.clz32 - ? (o.prototype._countBits = function (t) { - return 32 - Math.clz32(t); - }) - : (o.prototype._countBits = function (t) { - var e = t, - r = 0; - return ( - e >= 4096 && ((r += 13), (e >>>= 13)), - e >= 64 && ((r += 7), (e >>>= 7)), - e >= 8 && ((r += 4), (e >>>= 4)), - e >= 2 && ((r += 2), (e >>>= 2)), - r + e - ); - }), - (o.prototype._zeroBits = function (t) { - if (0 === t) return 26; - var e = t, - r = 0; - return ( - 0 == (8191 & e) && ((r += 13), (e >>>= 13)), - 0 == (127 & e) && ((r += 7), (e >>>= 7)), - 0 == (15 & e) && ((r += 4), (e >>>= 4)), - 0 == (3 & e) && ((r += 2), (e >>>= 2)), - 0 == (1 & e) && r++, - r - ); - }), - (o.prototype.bitLength = function () { - var t = this.words[this.length - 1], - e = this._countBits(t); - return 26 * (this.length - 1) + e; - }), - (o.prototype.zeroBits = function () { - if (this.isZero()) return 0; - for (var t = 0, e = 0; e < this.length; e++) { - var r = this._zeroBits(this.words[e]); - if (((t += r), 26 !== r)) break; - } - return t; - }), - (o.prototype.byteLength = function () { - return Math.ceil(this.bitLength() / 8); - }), - (o.prototype.toTwos = function (t) { - return 0 !== this.negative ? this.abs().inotn(t).iaddn(1) : this.clone(); - }), - (o.prototype.fromTwos = function (t) { - return this.testn(t - 1) ? this.notn(t).iaddn(1).ineg() : this.clone(); - }), - (o.prototype.isNeg = function () { - return 0 !== this.negative; - }), - (o.prototype.neg = function () { - return this.clone().ineg(); - }), - (o.prototype.ineg = function () { - return this.isZero() || (this.negative ^= 1), this; - }), - (o.prototype.iuor = function (t) { - for (; this.length < t.length; ) this.words[this.length++] = 0; - for (var e = 0; e < t.length; e++) this.words[e] = this.words[e] | t.words[e]; - return this.strip(); - }), - (o.prototype.ior = function (t) { - return i(0 == (this.negative | t.negative)), this.iuor(t); - }), - (o.prototype.or = function (t) { - return this.length > t.length ? this.clone().ior(t) : t.clone().ior(this); - }), - (o.prototype.uor = function (t) { - return this.length > t.length ? this.clone().iuor(t) : t.clone().iuor(this); - }), - (o.prototype.iuand = function (t) { - var e; - e = this.length > t.length ? t : this; - for (var r = 0; r < e.length; r++) this.words[r] = this.words[r] & t.words[r]; - return (this.length = e.length), this.strip(); - }), - (o.prototype.iand = function (t) { - return i(0 == (this.negative | t.negative)), this.iuand(t); - }), - (o.prototype.and = function (t) { - return this.length > t.length ? this.clone().iand(t) : t.clone().iand(this); - }), - (o.prototype.uand = function (t) { - return this.length > t.length ? this.clone().iuand(t) : t.clone().iuand(this); - }), - (o.prototype.iuxor = function (t) { - var e, r; - this.length > t.length ? ((e = this), (r = t)) : ((e = t), (r = this)); - for (var i = 0; i < r.length; i++) this.words[i] = e.words[i] ^ r.words[i]; - if (this !== e) for (; i < e.length; i++) this.words[i] = e.words[i]; - return (this.length = e.length), this.strip(); - }), - (o.prototype.ixor = function (t) { - return i(0 == (this.negative | t.negative)), this.iuxor(t); - }), - (o.prototype.xor = function (t) { - return this.length > t.length ? this.clone().ixor(t) : t.clone().ixor(this); - }), - (o.prototype.uxor = function (t) { - return this.length > t.length ? this.clone().iuxor(t) : t.clone().iuxor(this); - }), - (o.prototype.inotn = function (t) { - i('number' == typeof t && t >= 0); - var e = 0 | Math.ceil(t / 26), - r = t % 26; - this._expand(e), r > 0 && e--; - for (var n = 0; n < e; n++) this.words[n] = 67108863 & ~this.words[n]; - return r > 0 && (this.words[n] = ~this.words[n] & (67108863 >> (26 - r))), this.strip(); - }), - (o.prototype.notn = function (t) { - return this.clone().inotn(t); - }), - (o.prototype.setn = function (t, e) { - i('number' == typeof t && t >= 0); - var r = (t / 26) | 0, - n = t % 26; - return this._expand(r + 1), (this.words[r] = e ? this.words[r] | (1 << n) : this.words[r] & ~(1 << n)), this.strip(); - }), - (o.prototype.iadd = function (t) { - var e, r, i; - if (0 !== this.negative && 0 === t.negative) - return (this.negative = 0), (e = this.isub(t)), (this.negative ^= 1), this._normSign(); - if (0 === this.negative && 0 !== t.negative) return (t.negative = 0), (e = this.isub(t)), (t.negative = 1), e._normSign(); - this.length > t.length ? ((r = this), (i = t)) : ((r = t), (i = this)); - for (var n = 0, o = 0; o < i.length; o++) - (e = (0 | r.words[o]) + (0 | i.words[o]) + n), (this.words[o] = 67108863 & e), (n = e >>> 26); - for (; 0 !== n && o < r.length; o++) (e = (0 | r.words[o]) + n), (this.words[o] = 67108863 & e), (n = e >>> 26); - if (((this.length = r.length), 0 !== n)) (this.words[this.length] = n), this.length++; - else if (r !== this) for (; o < r.length; o++) this.words[o] = r.words[o]; - return this; - }), - (o.prototype.add = function (t) { - var e; - return 0 !== t.negative && 0 === this.negative - ? ((t.negative = 0), (e = this.sub(t)), (t.negative ^= 1), e) - : 0 === t.negative && 0 !== this.negative - ? ((this.negative = 0), (e = t.sub(this)), (this.negative = 1), e) - : this.length > t.length - ? this.clone().iadd(t) - : t.clone().iadd(this); - }), - (o.prototype.isub = function (t) { - if (0 !== t.negative) { - t.negative = 0; - var e = this.iadd(t); - return (t.negative = 1), e._normSign(); - } - if (0 !== this.negative) return (this.negative = 0), this.iadd(t), (this.negative = 1), this._normSign(); - var r, - i, - n = this.cmp(t); - if (0 === n) return (this.negative = 0), (this.length = 1), (this.words[0] = 0), this; - n > 0 ? ((r = this), (i = t)) : ((r = t), (i = this)); - for (var o = 0, s = 0; s < i.length; s++) - (o = (e = (0 | r.words[s]) - (0 | i.words[s]) + o) >> 26), (this.words[s] = 67108863 & e); - for (; 0 !== o && s < r.length; s++) (o = (e = (0 | r.words[s]) + o) >> 26), (this.words[s] = 67108863 & e); - if (0 === o && s < r.length && r !== this) for (; s < r.length; s++) this.words[s] = r.words[s]; - return (this.length = Math.max(this.length, s)), r !== this && (this.negative = 1), this.strip(); - }), - (o.prototype.sub = function (t) { - return this.clone().isub(t); - }); - var p = function (t, e, r) { - var i, - n, - o, - s = t.words, - a = e.words, - h = r.words, - u = 0, - f = 0 | s[0], - c = 8191 & f, - l = f >>> 13, - d = 0 | s[1], - p = 8191 & d, - m = d >>> 13, - g = 0 | s[2], - b = 8191 & g, - y = g >>> 13, - v = 0 | s[3], - w = 8191 & v, - _ = v >>> 13, - M = 0 | s[4], - E = 8191 & M, - S = M >>> 13, - x = 0 | s[5], - A = 8191 & x, - k = x >>> 13, - R = 0 | s[6], - B = 8191 & R, - I = R >>> 13, - T = 0 | s[7], - P = 8191 & T, - O = T >>> 13, - L = 0 | s[8], - C = 8191 & L, - N = L >>> 13, - j = 0 | s[9], - U = 8191 & j, - D = j >>> 13, - z = 0 | a[0], - F = 8191 & z, - q = z >>> 13, - H = 0 | a[1], - $ = 8191 & H, - Z = H >>> 13, - G = 0 | a[2], - V = 8191 & G, - W = G >>> 13, - K = 0 | a[3], - Y = 8191 & K, - J = K >>> 13, - X = 0 | a[4], - Q = 8191 & X, - tt = X >>> 13, - et = 0 | a[5], - rt = 8191 & et, - it = et >>> 13, - nt = 0 | a[6], - ot = 8191 & nt, - st = nt >>> 13, - at = 0 | a[7], - ht = 8191 & at, - ut = at >>> 13, - ft = 0 | a[8], - ct = 8191 & ft, - lt = ft >>> 13, - dt = 0 | a[9], - pt = 8191 & dt, - mt = dt >>> 13; - (r.negative = t.negative ^ e.negative), (r.length = 19); - var gt = (((u + (i = Math.imul(c, F))) | 0) + ((8191 & (n = ((n = Math.imul(c, q)) + Math.imul(l, F)) | 0)) << 13)) | 0; - (u = ((((o = Math.imul(l, q)) + (n >>> 13)) | 0) + (gt >>> 26)) | 0), - (gt &= 67108863), - (i = Math.imul(p, F)), - (n = ((n = Math.imul(p, q)) + Math.imul(m, F)) | 0), - (o = Math.imul(m, q)); - var bt = - (((u + (i = (i + Math.imul(c, $)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, Z)) | 0) + Math.imul(l, $)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, Z)) | 0) + (n >>> 13)) | 0) + (bt >>> 26)) | 0), - (bt &= 67108863), - (i = Math.imul(b, F)), - (n = ((n = Math.imul(b, q)) + Math.imul(y, F)) | 0), - (o = Math.imul(y, q)), - (i = (i + Math.imul(p, $)) | 0), - (n = ((n = (n + Math.imul(p, Z)) | 0) + Math.imul(m, $)) | 0), - (o = (o + Math.imul(m, Z)) | 0); - var yt = - (((u + (i = (i + Math.imul(c, V)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, W)) | 0) + Math.imul(l, V)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, W)) | 0) + (n >>> 13)) | 0) + (yt >>> 26)) | 0), - (yt &= 67108863), - (i = Math.imul(w, F)), - (n = ((n = Math.imul(w, q)) + Math.imul(_, F)) | 0), - (o = Math.imul(_, q)), - (i = (i + Math.imul(b, $)) | 0), - (n = ((n = (n + Math.imul(b, Z)) | 0) + Math.imul(y, $)) | 0), - (o = (o + Math.imul(y, Z)) | 0), - (i = (i + Math.imul(p, V)) | 0), - (n = ((n = (n + Math.imul(p, W)) | 0) + Math.imul(m, V)) | 0), - (o = (o + Math.imul(m, W)) | 0); - var vt = - (((u + (i = (i + Math.imul(c, Y)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, J)) | 0) + Math.imul(l, Y)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, J)) | 0) + (n >>> 13)) | 0) + (vt >>> 26)) | 0), - (vt &= 67108863), - (i = Math.imul(E, F)), - (n = ((n = Math.imul(E, q)) + Math.imul(S, F)) | 0), - (o = Math.imul(S, q)), - (i = (i + Math.imul(w, $)) | 0), - (n = ((n = (n + Math.imul(w, Z)) | 0) + Math.imul(_, $)) | 0), - (o = (o + Math.imul(_, Z)) | 0), - (i = (i + Math.imul(b, V)) | 0), - (n = ((n = (n + Math.imul(b, W)) | 0) + Math.imul(y, V)) | 0), - (o = (o + Math.imul(y, W)) | 0), - (i = (i + Math.imul(p, Y)) | 0), - (n = ((n = (n + Math.imul(p, J)) | 0) + Math.imul(m, Y)) | 0), - (o = (o + Math.imul(m, J)) | 0); - var wt = - (((u + (i = (i + Math.imul(c, Q)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, tt)) | 0) + Math.imul(l, Q)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, tt)) | 0) + (n >>> 13)) | 0) + (wt >>> 26)) | 0), - (wt &= 67108863), - (i = Math.imul(A, F)), - (n = ((n = Math.imul(A, q)) + Math.imul(k, F)) | 0), - (o = Math.imul(k, q)), - (i = (i + Math.imul(E, $)) | 0), - (n = ((n = (n + Math.imul(E, Z)) | 0) + Math.imul(S, $)) | 0), - (o = (o + Math.imul(S, Z)) | 0), - (i = (i + Math.imul(w, V)) | 0), - (n = ((n = (n + Math.imul(w, W)) | 0) + Math.imul(_, V)) | 0), - (o = (o + Math.imul(_, W)) | 0), - (i = (i + Math.imul(b, Y)) | 0), - (n = ((n = (n + Math.imul(b, J)) | 0) + Math.imul(y, Y)) | 0), - (o = (o + Math.imul(y, J)) | 0), - (i = (i + Math.imul(p, Q)) | 0), - (n = ((n = (n + Math.imul(p, tt)) | 0) + Math.imul(m, Q)) | 0), - (o = (o + Math.imul(m, tt)) | 0); - var _t = - (((u + (i = (i + Math.imul(c, rt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, it)) | 0) + Math.imul(l, rt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, it)) | 0) + (n >>> 13)) | 0) + (_t >>> 26)) | 0), - (_t &= 67108863), - (i = Math.imul(B, F)), - (n = ((n = Math.imul(B, q)) + Math.imul(I, F)) | 0), - (o = Math.imul(I, q)), - (i = (i + Math.imul(A, $)) | 0), - (n = ((n = (n + Math.imul(A, Z)) | 0) + Math.imul(k, $)) | 0), - (o = (o + Math.imul(k, Z)) | 0), - (i = (i + Math.imul(E, V)) | 0), - (n = ((n = (n + Math.imul(E, W)) | 0) + Math.imul(S, V)) | 0), - (o = (o + Math.imul(S, W)) | 0), - (i = (i + Math.imul(w, Y)) | 0), - (n = ((n = (n + Math.imul(w, J)) | 0) + Math.imul(_, Y)) | 0), - (o = (o + Math.imul(_, J)) | 0), - (i = (i + Math.imul(b, Q)) | 0), - (n = ((n = (n + Math.imul(b, tt)) | 0) + Math.imul(y, Q)) | 0), - (o = (o + Math.imul(y, tt)) | 0), - (i = (i + Math.imul(p, rt)) | 0), - (n = ((n = (n + Math.imul(p, it)) | 0) + Math.imul(m, rt)) | 0), - (o = (o + Math.imul(m, it)) | 0); - var Mt = - (((u + (i = (i + Math.imul(c, ot)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, st)) | 0) + Math.imul(l, ot)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, st)) | 0) + (n >>> 13)) | 0) + (Mt >>> 26)) | 0), - (Mt &= 67108863), - (i = Math.imul(P, F)), - (n = ((n = Math.imul(P, q)) + Math.imul(O, F)) | 0), - (o = Math.imul(O, q)), - (i = (i + Math.imul(B, $)) | 0), - (n = ((n = (n + Math.imul(B, Z)) | 0) + Math.imul(I, $)) | 0), - (o = (o + Math.imul(I, Z)) | 0), - (i = (i + Math.imul(A, V)) | 0), - (n = ((n = (n + Math.imul(A, W)) | 0) + Math.imul(k, V)) | 0), - (o = (o + Math.imul(k, W)) | 0), - (i = (i + Math.imul(E, Y)) | 0), - (n = ((n = (n + Math.imul(E, J)) | 0) + Math.imul(S, Y)) | 0), - (o = (o + Math.imul(S, J)) | 0), - (i = (i + Math.imul(w, Q)) | 0), - (n = ((n = (n + Math.imul(w, tt)) | 0) + Math.imul(_, Q)) | 0), - (o = (o + Math.imul(_, tt)) | 0), - (i = (i + Math.imul(b, rt)) | 0), - (n = ((n = (n + Math.imul(b, it)) | 0) + Math.imul(y, rt)) | 0), - (o = (o + Math.imul(y, it)) | 0), - (i = (i + Math.imul(p, ot)) | 0), - (n = ((n = (n + Math.imul(p, st)) | 0) + Math.imul(m, ot)) | 0), - (o = (o + Math.imul(m, st)) | 0); - var Et = - (((u + (i = (i + Math.imul(c, ht)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, ut)) | 0) + Math.imul(l, ht)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, ut)) | 0) + (n >>> 13)) | 0) + (Et >>> 26)) | 0), - (Et &= 67108863), - (i = Math.imul(C, F)), - (n = ((n = Math.imul(C, q)) + Math.imul(N, F)) | 0), - (o = Math.imul(N, q)), - (i = (i + Math.imul(P, $)) | 0), - (n = ((n = (n + Math.imul(P, Z)) | 0) + Math.imul(O, $)) | 0), - (o = (o + Math.imul(O, Z)) | 0), - (i = (i + Math.imul(B, V)) | 0), - (n = ((n = (n + Math.imul(B, W)) | 0) + Math.imul(I, V)) | 0), - (o = (o + Math.imul(I, W)) | 0), - (i = (i + Math.imul(A, Y)) | 0), - (n = ((n = (n + Math.imul(A, J)) | 0) + Math.imul(k, Y)) | 0), - (o = (o + Math.imul(k, J)) | 0), - (i = (i + Math.imul(E, Q)) | 0), - (n = ((n = (n + Math.imul(E, tt)) | 0) + Math.imul(S, Q)) | 0), - (o = (o + Math.imul(S, tt)) | 0), - (i = (i + Math.imul(w, rt)) | 0), - (n = ((n = (n + Math.imul(w, it)) | 0) + Math.imul(_, rt)) | 0), - (o = (o + Math.imul(_, it)) | 0), - (i = (i + Math.imul(b, ot)) | 0), - (n = ((n = (n + Math.imul(b, st)) | 0) + Math.imul(y, ot)) | 0), - (o = (o + Math.imul(y, st)) | 0), - (i = (i + Math.imul(p, ht)) | 0), - (n = ((n = (n + Math.imul(p, ut)) | 0) + Math.imul(m, ht)) | 0), - (o = (o + Math.imul(m, ut)) | 0); - var St = - (((u + (i = (i + Math.imul(c, ct)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, lt)) | 0) + Math.imul(l, ct)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, lt)) | 0) + (n >>> 13)) | 0) + (St >>> 26)) | 0), - (St &= 67108863), - (i = Math.imul(U, F)), - (n = ((n = Math.imul(U, q)) + Math.imul(D, F)) | 0), - (o = Math.imul(D, q)), - (i = (i + Math.imul(C, $)) | 0), - (n = ((n = (n + Math.imul(C, Z)) | 0) + Math.imul(N, $)) | 0), - (o = (o + Math.imul(N, Z)) | 0), - (i = (i + Math.imul(P, V)) | 0), - (n = ((n = (n + Math.imul(P, W)) | 0) + Math.imul(O, V)) | 0), - (o = (o + Math.imul(O, W)) | 0), - (i = (i + Math.imul(B, Y)) | 0), - (n = ((n = (n + Math.imul(B, J)) | 0) + Math.imul(I, Y)) | 0), - (o = (o + Math.imul(I, J)) | 0), - (i = (i + Math.imul(A, Q)) | 0), - (n = ((n = (n + Math.imul(A, tt)) | 0) + Math.imul(k, Q)) | 0), - (o = (o + Math.imul(k, tt)) | 0), - (i = (i + Math.imul(E, rt)) | 0), - (n = ((n = (n + Math.imul(E, it)) | 0) + Math.imul(S, rt)) | 0), - (o = (o + Math.imul(S, it)) | 0), - (i = (i + Math.imul(w, ot)) | 0), - (n = ((n = (n + Math.imul(w, st)) | 0) + Math.imul(_, ot)) | 0), - (o = (o + Math.imul(_, st)) | 0), - (i = (i + Math.imul(b, ht)) | 0), - (n = ((n = (n + Math.imul(b, ut)) | 0) + Math.imul(y, ht)) | 0), - (o = (o + Math.imul(y, ut)) | 0), - (i = (i + Math.imul(p, ct)) | 0), - (n = ((n = (n + Math.imul(p, lt)) | 0) + Math.imul(m, ct)) | 0), - (o = (o + Math.imul(m, lt)) | 0); - var xt = - (((u + (i = (i + Math.imul(c, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, mt)) | 0) + Math.imul(l, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, mt)) | 0) + (n >>> 13)) | 0) + (xt >>> 26)) | 0), - (xt &= 67108863), - (i = Math.imul(U, $)), - (n = ((n = Math.imul(U, Z)) + Math.imul(D, $)) | 0), - (o = Math.imul(D, Z)), - (i = (i + Math.imul(C, V)) | 0), - (n = ((n = (n + Math.imul(C, W)) | 0) + Math.imul(N, V)) | 0), - (o = (o + Math.imul(N, W)) | 0), - (i = (i + Math.imul(P, Y)) | 0), - (n = ((n = (n + Math.imul(P, J)) | 0) + Math.imul(O, Y)) | 0), - (o = (o + Math.imul(O, J)) | 0), - (i = (i + Math.imul(B, Q)) | 0), - (n = ((n = (n + Math.imul(B, tt)) | 0) + Math.imul(I, Q)) | 0), - (o = (o + Math.imul(I, tt)) | 0), - (i = (i + Math.imul(A, rt)) | 0), - (n = ((n = (n + Math.imul(A, it)) | 0) + Math.imul(k, rt)) | 0), - (o = (o + Math.imul(k, it)) | 0), - (i = (i + Math.imul(E, ot)) | 0), - (n = ((n = (n + Math.imul(E, st)) | 0) + Math.imul(S, ot)) | 0), - (o = (o + Math.imul(S, st)) | 0), - (i = (i + Math.imul(w, ht)) | 0), - (n = ((n = (n + Math.imul(w, ut)) | 0) + Math.imul(_, ht)) | 0), - (o = (o + Math.imul(_, ut)) | 0), - (i = (i + Math.imul(b, ct)) | 0), - (n = ((n = (n + Math.imul(b, lt)) | 0) + Math.imul(y, ct)) | 0), - (o = (o + Math.imul(y, lt)) | 0); - var At = - (((u + (i = (i + Math.imul(p, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(p, mt)) | 0) + Math.imul(m, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(m, mt)) | 0) + (n >>> 13)) | 0) + (At >>> 26)) | 0), - (At &= 67108863), - (i = Math.imul(U, V)), - (n = ((n = Math.imul(U, W)) + Math.imul(D, V)) | 0), - (o = Math.imul(D, W)), - (i = (i + Math.imul(C, Y)) | 0), - (n = ((n = (n + Math.imul(C, J)) | 0) + Math.imul(N, Y)) | 0), - (o = (o + Math.imul(N, J)) | 0), - (i = (i + Math.imul(P, Q)) | 0), - (n = ((n = (n + Math.imul(P, tt)) | 0) + Math.imul(O, Q)) | 0), - (o = (o + Math.imul(O, tt)) | 0), - (i = (i + Math.imul(B, rt)) | 0), - (n = ((n = (n + Math.imul(B, it)) | 0) + Math.imul(I, rt)) | 0), - (o = (o + Math.imul(I, it)) | 0), - (i = (i + Math.imul(A, ot)) | 0), - (n = ((n = (n + Math.imul(A, st)) | 0) + Math.imul(k, ot)) | 0), - (o = (o + Math.imul(k, st)) | 0), - (i = (i + Math.imul(E, ht)) | 0), - (n = ((n = (n + Math.imul(E, ut)) | 0) + Math.imul(S, ht)) | 0), - (o = (o + Math.imul(S, ut)) | 0), - (i = (i + Math.imul(w, ct)) | 0), - (n = ((n = (n + Math.imul(w, lt)) | 0) + Math.imul(_, ct)) | 0), - (o = (o + Math.imul(_, lt)) | 0); - var kt = - (((u + (i = (i + Math.imul(b, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(b, mt)) | 0) + Math.imul(y, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(y, mt)) | 0) + (n >>> 13)) | 0) + (kt >>> 26)) | 0), - (kt &= 67108863), - (i = Math.imul(U, Y)), - (n = ((n = Math.imul(U, J)) + Math.imul(D, Y)) | 0), - (o = Math.imul(D, J)), - (i = (i + Math.imul(C, Q)) | 0), - (n = ((n = (n + Math.imul(C, tt)) | 0) + Math.imul(N, Q)) | 0), - (o = (o + Math.imul(N, tt)) | 0), - (i = (i + Math.imul(P, rt)) | 0), - (n = ((n = (n + Math.imul(P, it)) | 0) + Math.imul(O, rt)) | 0), - (o = (o + Math.imul(O, it)) | 0), - (i = (i + Math.imul(B, ot)) | 0), - (n = ((n = (n + Math.imul(B, st)) | 0) + Math.imul(I, ot)) | 0), - (o = (o + Math.imul(I, st)) | 0), - (i = (i + Math.imul(A, ht)) | 0), - (n = ((n = (n + Math.imul(A, ut)) | 0) + Math.imul(k, ht)) | 0), - (o = (o + Math.imul(k, ut)) | 0), - (i = (i + Math.imul(E, ct)) | 0), - (n = ((n = (n + Math.imul(E, lt)) | 0) + Math.imul(S, ct)) | 0), - (o = (o + Math.imul(S, lt)) | 0); - var Rt = - (((u + (i = (i + Math.imul(w, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(w, mt)) | 0) + Math.imul(_, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(_, mt)) | 0) + (n >>> 13)) | 0) + (Rt >>> 26)) | 0), - (Rt &= 67108863), - (i = Math.imul(U, Q)), - (n = ((n = Math.imul(U, tt)) + Math.imul(D, Q)) | 0), - (o = Math.imul(D, tt)), - (i = (i + Math.imul(C, rt)) | 0), - (n = ((n = (n + Math.imul(C, it)) | 0) + Math.imul(N, rt)) | 0), - (o = (o + Math.imul(N, it)) | 0), - (i = (i + Math.imul(P, ot)) | 0), - (n = ((n = (n + Math.imul(P, st)) | 0) + Math.imul(O, ot)) | 0), - (o = (o + Math.imul(O, st)) | 0), - (i = (i + Math.imul(B, ht)) | 0), - (n = ((n = (n + Math.imul(B, ut)) | 0) + Math.imul(I, ht)) | 0), - (o = (o + Math.imul(I, ut)) | 0), - (i = (i + Math.imul(A, ct)) | 0), - (n = ((n = (n + Math.imul(A, lt)) | 0) + Math.imul(k, ct)) | 0), - (o = (o + Math.imul(k, lt)) | 0); - var Bt = - (((u + (i = (i + Math.imul(E, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(E, mt)) | 0) + Math.imul(S, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(S, mt)) | 0) + (n >>> 13)) | 0) + (Bt >>> 26)) | 0), - (Bt &= 67108863), - (i = Math.imul(U, rt)), - (n = ((n = Math.imul(U, it)) + Math.imul(D, rt)) | 0), - (o = Math.imul(D, it)), - (i = (i + Math.imul(C, ot)) | 0), - (n = ((n = (n + Math.imul(C, st)) | 0) + Math.imul(N, ot)) | 0), - (o = (o + Math.imul(N, st)) | 0), - (i = (i + Math.imul(P, ht)) | 0), - (n = ((n = (n + Math.imul(P, ut)) | 0) + Math.imul(O, ht)) | 0), - (o = (o + Math.imul(O, ut)) | 0), - (i = (i + Math.imul(B, ct)) | 0), - (n = ((n = (n + Math.imul(B, lt)) | 0) + Math.imul(I, ct)) | 0), - (o = (o + Math.imul(I, lt)) | 0); - var It = - (((u + (i = (i + Math.imul(A, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(A, mt)) | 0) + Math.imul(k, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(k, mt)) | 0) + (n >>> 13)) | 0) + (It >>> 26)) | 0), - (It &= 67108863), - (i = Math.imul(U, ot)), - (n = ((n = Math.imul(U, st)) + Math.imul(D, ot)) | 0), - (o = Math.imul(D, st)), - (i = (i + Math.imul(C, ht)) | 0), - (n = ((n = (n + Math.imul(C, ut)) | 0) + Math.imul(N, ht)) | 0), - (o = (o + Math.imul(N, ut)) | 0), - (i = (i + Math.imul(P, ct)) | 0), - (n = ((n = (n + Math.imul(P, lt)) | 0) + Math.imul(O, ct)) | 0), - (o = (o + Math.imul(O, lt)) | 0); - var Tt = - (((u + (i = (i + Math.imul(B, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(B, mt)) | 0) + Math.imul(I, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(I, mt)) | 0) + (n >>> 13)) | 0) + (Tt >>> 26)) | 0), - (Tt &= 67108863), - (i = Math.imul(U, ht)), - (n = ((n = Math.imul(U, ut)) + Math.imul(D, ht)) | 0), - (o = Math.imul(D, ut)), - (i = (i + Math.imul(C, ct)) | 0), - (n = ((n = (n + Math.imul(C, lt)) | 0) + Math.imul(N, ct)) | 0), - (o = (o + Math.imul(N, lt)) | 0); - var Pt = - (((u + (i = (i + Math.imul(P, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(P, mt)) | 0) + Math.imul(O, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(O, mt)) | 0) + (n >>> 13)) | 0) + (Pt >>> 26)) | 0), - (Pt &= 67108863), - (i = Math.imul(U, ct)), - (n = ((n = Math.imul(U, lt)) + Math.imul(D, ct)) | 0), - (o = Math.imul(D, lt)); - var Ot = - (((u + (i = (i + Math.imul(C, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(C, mt)) | 0) + Math.imul(N, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(N, mt)) | 0) + (n >>> 13)) | 0) + (Ot >>> 26)) | 0), (Ot &= 67108863); - var Lt = (((u + (i = Math.imul(U, pt))) | 0) + ((8191 & (n = ((n = Math.imul(U, mt)) + Math.imul(D, pt)) | 0)) << 13)) | 0; - return ( - (u = ((((o = Math.imul(D, mt)) + (n >>> 13)) | 0) + (Lt >>> 26)) | 0), - (Lt &= 67108863), - (h[0] = gt), - (h[1] = bt), - (h[2] = yt), - (h[3] = vt), - (h[4] = wt), - (h[5] = _t), - (h[6] = Mt), - (h[7] = Et), - (h[8] = St), - (h[9] = xt), - (h[10] = At), - (h[11] = kt), - (h[12] = Rt), - (h[13] = Bt), - (h[14] = It), - (h[15] = Tt), - (h[16] = Pt), - (h[17] = Ot), - (h[18] = Lt), - 0 !== u && ((h[19] = u), r.length++), - r - ); - }; - function m(t, e, r) { - return new g().mulp(t, e, r); - } - function g(t, e) { - (this.x = t), (this.y = e); - } - Math.imul || (p = d), - (o.prototype.mulTo = function (t, e) { - var r, - i = this.length + t.length; - return ( - (r = - 10 === this.length && 10 === t.length - ? p(this, t, e) - : i < 63 - ? d(this, t, e) - : i < 1024 - ? (function (t, e, r) { - (r.negative = e.negative ^ t.negative), (r.length = t.length + e.length); - for (var i = 0, n = 0, o = 0; o < r.length - 1; o++) { - var s = n; - n = 0; - for (var a = 67108863 & i, h = Math.min(o, e.length - 1), u = Math.max(0, o - t.length + 1); u <= h; u++) { - var f = o - u, - c = (0 | t.words[f]) * (0 | e.words[u]), - l = 67108863 & c; - (a = 67108863 & (l = (l + a) | 0)), - (n += (s = ((s = (s + ((c / 67108864) | 0)) | 0) + (l >>> 26)) | 0) >>> 26), - (s &= 67108863); - } - (r.words[o] = a), (i = s), (s = n); - } - return 0 !== i ? (r.words[o] = i) : r.length--, r.strip(); - })(this, t, e) - : m(this, t, e)), - r - ); - }), - (g.prototype.makeRBT = function (t) { - for (var e = new Array(t), r = o.prototype._countBits(t) - 1, i = 0; i < t; i++) e[i] = this.revBin(i, r, t); - return e; - }), - (g.prototype.revBin = function (t, e, r) { - if (0 === t || t === r - 1) return t; - for (var i = 0, n = 0; n < e; n++) (i |= (1 & t) << (e - n - 1)), (t >>= 1); - return i; - }), - (g.prototype.permute = function (t, e, r, i, n, o) { - for (var s = 0; s < o; s++) (i[s] = e[t[s]]), (n[s] = r[t[s]]); - }), - (g.prototype.transform = function (t, e, r, i, n, o) { - this.permute(o, t, e, r, i, n); - for (var s = 1; s < n; s <<= 1) - for (var a = s << 1, h = Math.cos((2 * Math.PI) / a), u = Math.sin((2 * Math.PI) / a), f = 0; f < n; f += a) - for (var c = h, l = u, d = 0; d < s; d++) { - var p = r[f + d], - m = i[f + d], - g = r[f + d + s], - b = i[f + d + s], - y = c * g - l * b; - (b = c * b + l * g), - (g = y), - (r[f + d] = p + g), - (i[f + d] = m + b), - (r[f + d + s] = p - g), - (i[f + d + s] = m - b), - d !== a && ((y = h * c - u * l), (l = h * l + u * c), (c = y)); - } - }), - (g.prototype.guessLen13b = function (t, e) { - var r = 1 | Math.max(e, t), - i = 1 & r, - n = 0; - for (r = (r / 2) | 0; r; r >>>= 1) n++; - return 1 << (n + 1 + i); - }), - (g.prototype.conjugate = function (t, e, r) { - if (!(r <= 1)) - for (var i = 0; i < r / 2; i++) { - var n = t[i]; - (t[i] = t[r - i - 1]), (t[r - i - 1] = n), (n = e[i]), (e[i] = -e[r - i - 1]), (e[r - i - 1] = -n); - } - }), - (g.prototype.normalize13b = function (t, e) { - for (var r = 0, i = 0; i < e / 2; i++) { - var n = 8192 * Math.round(t[2 * i + 1] / e) + Math.round(t[2 * i] / e) + r; - (t[i] = 67108863 & n), (r = n < 67108864 ? 0 : (n / 67108864) | 0); - } - return t; - }), - (g.prototype.convert13b = function (t, e, r, n) { - for (var o = 0, s = 0; s < e; s++) - (o += 0 | t[s]), (r[2 * s] = 8191 & o), (o >>>= 13), (r[2 * s + 1] = 8191 & o), (o >>>= 13); - for (s = 2 * e; s < n; ++s) r[s] = 0; - i(0 === o), i(0 == (-8192 & o)); - }), - (g.prototype.stub = function (t) { - for (var e = new Array(t), r = 0; r < t; r++) e[r] = 0; - return e; - }), - (g.prototype.mulp = function (t, e, r) { - var i = 2 * this.guessLen13b(t.length, e.length), - n = this.makeRBT(i), - o = this.stub(i), - s = new Array(i), - a = new Array(i), - h = new Array(i), - u = new Array(i), - f = new Array(i), - c = new Array(i), - l = r.words; - (l.length = i), - this.convert13b(t.words, t.length, s, i), - this.convert13b(e.words, e.length, u, i), - this.transform(s, o, a, h, i, n), - this.transform(u, o, f, c, i, n); - for (var d = 0; d < i; d++) { - var p = a[d] * f[d] - h[d] * c[d]; - (h[d] = a[d] * c[d] + h[d] * f[d]), (a[d] = p); - } - return ( - this.conjugate(a, h, i), - this.transform(a, h, l, o, i, n), - this.conjugate(l, o, i), - this.normalize13b(l, i), - (r.negative = t.negative ^ e.negative), - (r.length = t.length + e.length), - r.strip() - ); - }), - (o.prototype.mul = function (t) { - var e = new o(null); - return (e.words = new Array(this.length + t.length)), this.mulTo(t, e); - }), - (o.prototype.mulf = function (t) { - var e = new o(null); - return (e.words = new Array(this.length + t.length)), m(this, t, e); - }), - (o.prototype.imul = function (t) { - return this.clone().mulTo(t, this); - }), - (o.prototype.imuln = function (t) { - i('number' == typeof t), i(t < 67108864); - for (var e = 0, r = 0; r < this.length; r++) { - var n = (0 | this.words[r]) * t, - o = (67108863 & n) + (67108863 & e); - (e >>= 26), (e += (n / 67108864) | 0), (e += o >>> 26), (this.words[r] = 67108863 & o); - } - return 0 !== e && ((this.words[r] = e), this.length++), this; - }), - (o.prototype.muln = function (t) { - return this.clone().imuln(t); - }), - (o.prototype.sqr = function () { - return this.mul(this); - }), - (o.prototype.isqr = function () { - return this.imul(this.clone()); - }), - (o.prototype.pow = function (t) { - var e = (function (t) { - for (var e = new Array(t.bitLength()), r = 0; r < e.length; r++) { - var i = (r / 26) | 0, - n = r % 26; - e[r] = (t.words[i] & (1 << n)) >>> n; - } - return e; - })(t); - if (0 === e.length) return new o(1); - for (var r = this, i = 0; i < e.length && 0 === e[i]; i++, r = r.sqr()); - if (++i < e.length) for (var n = r.sqr(); i < e.length; i++, n = n.sqr()) 0 !== e[i] && (r = r.mul(n)); - return r; - }), - (o.prototype.iushln = function (t) { - i('number' == typeof t && t >= 0); - var e, - r = t % 26, - n = (t - r) / 26, - o = (67108863 >>> (26 - r)) << (26 - r); - if (0 !== r) { - var s = 0; - for (e = 0; e < this.length; e++) { - var a = this.words[e] & o, - h = ((0 | this.words[e]) - a) << r; - (this.words[e] = h | s), (s = a >>> (26 - r)); - } - s && ((this.words[e] = s), this.length++); - } - if (0 !== n) { - for (e = this.length - 1; e >= 0; e--) this.words[e + n] = this.words[e]; - for (e = 0; e < n; e++) this.words[e] = 0; - this.length += n; - } - return this.strip(); - }), - (o.prototype.ishln = function (t) { - return i(0 === this.negative), this.iushln(t); - }), - (o.prototype.iushrn = function (t, e, r) { - var n; - i('number' == typeof t && t >= 0), (n = e ? (e - (e % 26)) / 26 : 0); - var o = t % 26, - s = Math.min((t - o) / 26, this.length), - a = 67108863 ^ ((67108863 >>> o) << o), - h = r; - if (((n -= s), (n = Math.max(0, n)), h)) { - for (var u = 0; u < s; u++) h.words[u] = this.words[u]; - h.length = s; - } - if (0 === s); - else if (this.length > s) for (this.length -= s, u = 0; u < this.length; u++) this.words[u] = this.words[u + s]; - else (this.words[0] = 0), (this.length = 1); - var f = 0; - for (u = this.length - 1; u >= 0 && (0 !== f || u >= n); u--) { - var c = 0 | this.words[u]; - (this.words[u] = (f << (26 - o)) | (c >>> o)), (f = c & a); - } - return h && 0 !== f && (h.words[h.length++] = f), 0 === this.length && ((this.words[0] = 0), (this.length = 1)), this.strip(); - }), - (o.prototype.ishrn = function (t, e, r) { - return i(0 === this.negative), this.iushrn(t, e, r); - }), - (o.prototype.shln = function (t) { - return this.clone().ishln(t); - }), - (o.prototype.ushln = function (t) { - return this.clone().iushln(t); - }), - (o.prototype.shrn = function (t) { - return this.clone().ishrn(t); - }), - (o.prototype.ushrn = function (t) { - return this.clone().iushrn(t); - }), - (o.prototype.testn = function (t) { - i('number' == typeof t && t >= 0); - var e = t % 26, - r = (t - e) / 26, - n = 1 << e; - return !(this.length <= r || !(this.words[r] & n)); - }), - (o.prototype.imaskn = function (t) { - i('number' == typeof t && t >= 0); - var e = t % 26, - r = (t - e) / 26; - if ((i(0 === this.negative, 'imaskn works only with positive numbers'), this.length <= r)) return this; - if ((0 !== e && r++, (this.length = Math.min(r, this.length)), 0 !== e)) { - var n = 67108863 ^ ((67108863 >>> e) << e); - this.words[this.length - 1] &= n; - } - return this.strip(); - }), - (o.prototype.maskn = function (t) { - return this.clone().imaskn(t); - }), - (o.prototype.iaddn = function (t) { - return ( - i('number' == typeof t), - i(t < 67108864), - t < 0 - ? this.isubn(-t) - : 0 !== this.negative - ? 1 === this.length && (0 | this.words[0]) < t - ? ((this.words[0] = t - (0 | this.words[0])), (this.negative = 0), this) - : ((this.negative = 0), this.isubn(t), (this.negative = 1), this) - : this._iaddn(t) - ); - }), - (o.prototype._iaddn = function (t) { - this.words[0] += t; - for (var e = 0; e < this.length && this.words[e] >= 67108864; e++) - (this.words[e] -= 67108864), e === this.length - 1 ? (this.words[e + 1] = 1) : this.words[e + 1]++; - return (this.length = Math.max(this.length, e + 1)), this; - }), - (o.prototype.isubn = function (t) { - if ((i('number' == typeof t), i(t < 67108864), t < 0)) return this.iaddn(-t); - if (0 !== this.negative) return (this.negative = 0), this.iaddn(t), (this.negative = 1), this; - if (((this.words[0] -= t), 1 === this.length && this.words[0] < 0)) (this.words[0] = -this.words[0]), (this.negative = 1); - else for (var e = 0; e < this.length && this.words[e] < 0; e++) (this.words[e] += 67108864), (this.words[e + 1] -= 1); - return this.strip(); - }), - (o.prototype.addn = function (t) { - return this.clone().iaddn(t); - }), - (o.prototype.subn = function (t) { - return this.clone().isubn(t); - }), - (o.prototype.iabs = function () { - return (this.negative = 0), this; - }), - (o.prototype.abs = function () { - return this.clone().iabs(); - }), - (o.prototype._ishlnsubmul = function (t, e, r) { - var n, - o, - s = t.length + r; - this._expand(s); - var a = 0; - for (n = 0; n < t.length; n++) { - o = (0 | this.words[n + r]) + a; - var h = (0 | t.words[n]) * e; - (a = ((o -= 67108863 & h) >> 26) - ((h / 67108864) | 0)), (this.words[n + r] = 67108863 & o); - } - for (; n < this.length - r; n++) (a = (o = (0 | this.words[n + r]) + a) >> 26), (this.words[n + r] = 67108863 & o); - if (0 === a) return this.strip(); - for (i(-1 === a), a = 0, n = 0; n < this.length; n++) - (a = (o = -(0 | this.words[n]) + a) >> 26), (this.words[n] = 67108863 & o); - return (this.negative = 1), this.strip(); - }), - (o.prototype._wordDiv = function (t, e) { - var r = (this.length, t.length), - i = this.clone(), - n = t, - s = 0 | n.words[n.length - 1]; - 0 != (r = 26 - this._countBits(s)) && ((n = n.ushln(r)), i.iushln(r), (s = 0 | n.words[n.length - 1])); - var a, - h = i.length - n.length; - if ('mod' !== e) { - ((a = new o(null)).length = h + 1), (a.words = new Array(a.length)); - for (var u = 0; u < a.length; u++) a.words[u] = 0; - } - var f = i.clone()._ishlnsubmul(n, 1, h); - 0 === f.negative && ((i = f), a && (a.words[h] = 1)); - for (var c = h - 1; c >= 0; c--) { - var l = 67108864 * (0 | i.words[n.length + c]) + (0 | i.words[n.length + c - 1]); - for (l = Math.min((l / s) | 0, 67108863), i._ishlnsubmul(n, l, c); 0 !== i.negative; ) - l--, (i.negative = 0), i._ishlnsubmul(n, 1, c), i.isZero() || (i.negative ^= 1); - a && (a.words[c] = l); - } - return a && a.strip(), i.strip(), 'div' !== e && 0 !== r && i.iushrn(r), { div: a || null, mod: i }; - }), - (o.prototype.divmod = function (t, e, r) { - return ( - i(!t.isZero()), - this.isZero() - ? { div: new o(0), mod: new o(0) } - : 0 !== this.negative && 0 === t.negative - ? ((a = this.neg().divmod(t, e)), - 'mod' !== e && (n = a.div.neg()), - 'div' !== e && ((s = a.mod.neg()), r && 0 !== s.negative && s.iadd(t)), - { div: n, mod: s }) - : 0 === this.negative && 0 !== t.negative - ? ((a = this.divmod(t.neg(), e)), 'mod' !== e && (n = a.div.neg()), { div: n, mod: a.mod }) - : 0 != (this.negative & t.negative) - ? ((a = this.neg().divmod(t.neg(), e)), - 'div' !== e && ((s = a.mod.neg()), r && 0 !== s.negative && s.isub(t)), - { div: a.div, mod: s }) - : t.length > this.length || this.cmp(t) < 0 - ? { div: new o(0), mod: this } - : 1 === t.length - ? 'div' === e - ? { div: this.divn(t.words[0]), mod: null } - : 'mod' === e - ? { div: null, mod: new o(this.modn(t.words[0])) } - : { div: this.divn(t.words[0]), mod: new o(this.modn(t.words[0])) } - : this._wordDiv(t, e) - ); - var n, s, a; - }), - (o.prototype.div = function (t) { - return this.divmod(t, 'div', !1).div; - }), - (o.prototype.mod = function (t) { - return this.divmod(t, 'mod', !1).mod; - }), - (o.prototype.umod = function (t) { - return this.divmod(t, 'mod', !0).mod; - }), - (o.prototype.divRound = function (t) { - var e = this.divmod(t); - if (e.mod.isZero()) return e.div; - var r = 0 !== e.div.negative ? e.mod.isub(t) : e.mod, - i = t.ushrn(1), - n = t.andln(1), - o = r.cmp(i); - return o < 0 || (1 === n && 0 === o) ? e.div : 0 !== e.div.negative ? e.div.isubn(1) : e.div.iaddn(1); - }), - (o.prototype.modn = function (t) { - i(t <= 67108863); - for (var e = (1 << 26) % t, r = 0, n = this.length - 1; n >= 0; n--) r = (e * r + (0 | this.words[n])) % t; - return r; - }), - (o.prototype.idivn = function (t) { - i(t <= 67108863); - for (var e = 0, r = this.length - 1; r >= 0; r--) { - var n = (0 | this.words[r]) + 67108864 * e; - (this.words[r] = (n / t) | 0), (e = n % t); - } - return this.strip(); - }), - (o.prototype.divn = function (t) { - return this.clone().idivn(t); - }), - (o.prototype.egcd = function (t) { - i(0 === t.negative), i(!t.isZero()); - var e = this, - r = t.clone(); - e = 0 !== e.negative ? e.umod(t) : e.clone(); - for (var n = new o(1), s = new o(0), a = new o(0), h = new o(1), u = 0; e.isEven() && r.isEven(); ) - e.iushrn(1), r.iushrn(1), ++u; - for (var f = r.clone(), c = e.clone(); !e.isZero(); ) { - for (var l = 0, d = 1; 0 == (e.words[0] & d) && l < 26; ++l, d <<= 1); - if (l > 0) for (e.iushrn(l); l-- > 0; ) (n.isOdd() || s.isOdd()) && (n.iadd(f), s.isub(c)), n.iushrn(1), s.iushrn(1); - for (var p = 0, m = 1; 0 == (r.words[0] & m) && p < 26; ++p, m <<= 1); - if (p > 0) for (r.iushrn(p); p-- > 0; ) (a.isOdd() || h.isOdd()) && (a.iadd(f), h.isub(c)), a.iushrn(1), h.iushrn(1); - e.cmp(r) >= 0 ? (e.isub(r), n.isub(a), s.isub(h)) : (r.isub(e), a.isub(n), h.isub(s)); - } - return { a, b: h, gcd: r.iushln(u) }; - }), - (o.prototype._invmp = function (t) { - i(0 === t.negative), i(!t.isZero()); - var e = this, - r = t.clone(); - e = 0 !== e.negative ? e.umod(t) : e.clone(); - for (var n, s = new o(1), a = new o(0), h = r.clone(); e.cmpn(1) > 0 && r.cmpn(1) > 0; ) { - for (var u = 0, f = 1; 0 == (e.words[0] & f) && u < 26; ++u, f <<= 1); - if (u > 0) for (e.iushrn(u); u-- > 0; ) s.isOdd() && s.iadd(h), s.iushrn(1); - for (var c = 0, l = 1; 0 == (r.words[0] & l) && c < 26; ++c, l <<= 1); - if (c > 0) for (r.iushrn(c); c-- > 0; ) a.isOdd() && a.iadd(h), a.iushrn(1); - e.cmp(r) >= 0 ? (e.isub(r), s.isub(a)) : (r.isub(e), a.isub(s)); - } - return (n = 0 === e.cmpn(1) ? s : a).cmpn(0) < 0 && n.iadd(t), n; - }), - (o.prototype.gcd = function (t) { - if (this.isZero()) return t.abs(); - if (t.isZero()) return this.abs(); - var e = this.clone(), - r = t.clone(); - (e.negative = 0), (r.negative = 0); - for (var i = 0; e.isEven() && r.isEven(); i++) e.iushrn(1), r.iushrn(1); - for (;;) { - for (; e.isEven(); ) e.iushrn(1); - for (; r.isEven(); ) r.iushrn(1); - var n = e.cmp(r); - if (n < 0) { - var o = e; - (e = r), (r = o); - } else if (0 === n || 0 === r.cmpn(1)) break; - e.isub(r); - } - return r.iushln(i); - }), - (o.prototype.invm = function (t) { - return this.egcd(t).a.umod(t); - }), - (o.prototype.isEven = function () { - return 0 == (1 & this.words[0]); - }), - (o.prototype.isOdd = function () { - return 1 == (1 & this.words[0]); - }), - (o.prototype.andln = function (t) { - return this.words[0] & t; - }), - (o.prototype.bincn = function (t) { - i('number' == typeof t); - var e = t % 26, - r = (t - e) / 26, - n = 1 << e; - if (this.length <= r) return this._expand(r + 1), (this.words[r] |= n), this; - for (var o = n, s = r; 0 !== o && s < this.length; s++) { - var a = 0 | this.words[s]; - (o = (a += o) >>> 26), (a &= 67108863), (this.words[s] = a); - } - return 0 !== o && ((this.words[s] = o), this.length++), this; - }), - (o.prototype.isZero = function () { - return 1 === this.length && 0 === this.words[0]; - }), - (o.prototype.cmpn = function (t) { - var e, - r = t < 0; - if (0 !== this.negative && !r) return -1; - if (0 === this.negative && r) return 1; - if ((this.strip(), this.length > 1)) e = 1; - else { - r && (t = -t), i(t <= 67108863, 'Number is too big'); - var n = 0 | this.words[0]; - e = n === t ? 0 : n < t ? -1 : 1; - } - return 0 !== this.negative ? 0 | -e : e; - }), - (o.prototype.cmp = function (t) { - if (0 !== this.negative && 0 === t.negative) return -1; - if (0 === this.negative && 0 !== t.negative) return 1; - var e = this.ucmp(t); - return 0 !== this.negative ? 0 | -e : e; - }), - (o.prototype.ucmp = function (t) { - if (this.length > t.length) return 1; - if (this.length < t.length) return -1; - for (var e = 0, r = this.length - 1; r >= 0; r--) { - var i = 0 | this.words[r], - n = 0 | t.words[r]; - if (i !== n) { - i < n ? (e = -1) : i > n && (e = 1); - break; - } - } - return e; - }), - (o.prototype.gtn = function (t) { - return 1 === this.cmpn(t); - }), - (o.prototype.gt = function (t) { - return 1 === this.cmp(t); - }), - (o.prototype.gten = function (t) { - return this.cmpn(t) >= 0; - }), - (o.prototype.gte = function (t) { - return this.cmp(t) >= 0; - }), - (o.prototype.ltn = function (t) { - return -1 === this.cmpn(t); - }), - (o.prototype.lt = function (t) { - return -1 === this.cmp(t); - }), - (o.prototype.lten = function (t) { - return this.cmpn(t) <= 0; - }), - (o.prototype.lte = function (t) { - return this.cmp(t) <= 0; - }), - (o.prototype.eqn = function (t) { - return 0 === this.cmpn(t); - }), - (o.prototype.eq = function (t) { - return 0 === this.cmp(t); - }), - (o.red = function (t) { - return new E(t); - }), - (o.prototype.toRed = function (t) { - return ( - i(!this.red, 'Already a number in reduction context'), - i(0 === this.negative, 'red works only with positives'), - t.convertTo(this)._forceRed(t) - ); - }), - (o.prototype.fromRed = function () { - return i(this.red, 'fromRed works only with numbers in reduction context'), this.red.convertFrom(this); - }), - (o.prototype._forceRed = function (t) { - return (this.red = t), this; - }), - (o.prototype.forceRed = function (t) { - return i(!this.red, 'Already a number in reduction context'), this._forceRed(t); - }), - (o.prototype.redAdd = function (t) { - return i(this.red, 'redAdd works only with red numbers'), this.red.add(this, t); - }), - (o.prototype.redIAdd = function (t) { - return i(this.red, 'redIAdd works only with red numbers'), this.red.iadd(this, t); - }), - (o.prototype.redSub = function (t) { - return i(this.red, 'redSub works only with red numbers'), this.red.sub(this, t); - }), - (o.prototype.redISub = function (t) { - return i(this.red, 'redISub works only with red numbers'), this.red.isub(this, t); - }), - (o.prototype.redShl = function (t) { - return i(this.red, 'redShl works only with red numbers'), this.red.shl(this, t); - }), - (o.prototype.redMul = function (t) { - return i(this.red, 'redMul works only with red numbers'), this.red._verify2(this, t), this.red.mul(this, t); - }), - (o.prototype.redIMul = function (t) { - return i(this.red, 'redMul works only with red numbers'), this.red._verify2(this, t), this.red.imul(this, t); - }), - (o.prototype.redSqr = function () { - return i(this.red, 'redSqr works only with red numbers'), this.red._verify1(this), this.red.sqr(this); - }), - (o.prototype.redISqr = function () { - return i(this.red, 'redISqr works only with red numbers'), this.red._verify1(this), this.red.isqr(this); - }), - (o.prototype.redSqrt = function () { - return i(this.red, 'redSqrt works only with red numbers'), this.red._verify1(this), this.red.sqrt(this); - }), - (o.prototype.redInvm = function () { - return i(this.red, 'redInvm works only with red numbers'), this.red._verify1(this), this.red.invm(this); - }), - (o.prototype.redNeg = function () { - return i(this.red, 'redNeg works only with red numbers'), this.red._verify1(this), this.red.neg(this); - }), - (o.prototype.redPow = function (t) { - return i(this.red && !t.red, 'redPow(normalNum)'), this.red._verify1(this), this.red.pow(this, t); - }); - var b = { k256: null, p224: null, p192: null, p25519: null }; - function y(t, e) { - (this.name = t), - (this.p = new o(e, 16)), - (this.n = this.p.bitLength()), - (this.k = new o(1).iushln(this.n).isub(this.p)), - (this.tmp = this._tmp()); - } - function v() { - y.call(this, 'k256', 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f'); - } - function w() { - y.call(this, 'p224', 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001'); - } - function _() { - y.call(this, 'p192', 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff'); - } - function M() { - y.call(this, '25519', '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed'); - } - function E(t) { - if ('string' == typeof t) { - var e = o._prime(t); - (this.m = e.p), (this.prime = e); - } else i(t.gtn(1), 'modulus must be greater than 1'), (this.m = t), (this.prime = null); - } - function S(t) { - E.call(this, t), - (this.shift = this.m.bitLength()), - this.shift % 26 != 0 && (this.shift += 26 - (this.shift % 26)), - (this.r = new o(1).iushln(this.shift)), - (this.r2 = this.imod(this.r.sqr())), - (this.rinv = this.r._invmp(this.m)), - (this.minv = this.rinv.mul(this.r).isubn(1).div(this.m)), - (this.minv = this.minv.umod(this.r)), - (this.minv = this.r.sub(this.minv)); - } - (y.prototype._tmp = function () { - var t = new o(null); - return (t.words = new Array(Math.ceil(this.n / 13))), t; - }), - (y.prototype.ireduce = function (t) { - var e, - r = t; - do { - this.split(r, this.tmp), (e = (r = (r = this.imulK(r)).iadd(this.tmp)).bitLength()); - } while (e > this.n); - var i = e < this.n ? -1 : r.ucmp(this.p); - return 0 === i ? ((r.words[0] = 0), (r.length = 1)) : i > 0 ? r.isub(this.p) : void 0 !== r.strip ? r.strip() : r._strip(), r; - }), - (y.prototype.split = function (t, e) { - t.iushrn(this.n, 0, e); - }), - (y.prototype.imulK = function (t) { - return t.imul(this.k); - }), - n(v, y), - (v.prototype.split = function (t, e) { - for (var r = 4194303, i = Math.min(t.length, 9), n = 0; n < i; n++) e.words[n] = t.words[n]; - if (((e.length = i), t.length <= 9)) return (t.words[0] = 0), void (t.length = 1); - var o = t.words[9]; - for (e.words[e.length++] = o & r, n = 10; n < t.length; n++) { - var s = 0 | t.words[n]; - (t.words[n - 10] = ((s & r) << 4) | (o >>> 22)), (o = s); - } - (o >>>= 22), (t.words[n - 10] = o), 0 === o && t.length > 10 ? (t.length -= 10) : (t.length -= 9); - }), - (v.prototype.imulK = function (t) { - (t.words[t.length] = 0), (t.words[t.length + 1] = 0), (t.length += 2); - for (var e = 0, r = 0; r < t.length; r++) { - var i = 0 | t.words[r]; - (e += 977 * i), (t.words[r] = 67108863 & e), (e = 64 * i + ((e / 67108864) | 0)); - } - return 0 === t.words[t.length - 1] && (t.length--, 0 === t.words[t.length - 1] && t.length--), t; - }), - n(w, y), - n(_, y), - n(M, y), - (M.prototype.imulK = function (t) { - for (var e = 0, r = 0; r < t.length; r++) { - var i = 19 * (0 | t.words[r]) + e, - n = 67108863 & i; - (i >>>= 26), (t.words[r] = n), (e = i); - } - return 0 !== e && (t.words[t.length++] = e), t; - }), - (o._prime = function (t) { - if (b[t]) return b[t]; - var e; - if ('k256' === t) e = new v(); - else if ('p224' === t) e = new w(); - else if ('p192' === t) e = new _(); - else { - if ('p25519' !== t) throw new Error('Unknown prime ' + t); - e = new M(); - } - return (b[t] = e), e; - }), - (E.prototype._verify1 = function (t) { - i(0 === t.negative, 'red works only with positives'), i(t.red, 'red works only with red numbers'); - }), - (E.prototype._verify2 = function (t, e) { - i(0 == (t.negative | e.negative), 'red works only with positives'), - i(t.red && t.red === e.red, 'red works only with red numbers'); - }), - (E.prototype.imod = function (t) { - return this.prime ? this.prime.ireduce(t)._forceRed(this) : t.umod(this.m)._forceRed(this); - }), - (E.prototype.neg = function (t) { - return t.isZero() ? t.clone() : this.m.sub(t)._forceRed(this); - }), - (E.prototype.add = function (t, e) { - this._verify2(t, e); - var r = t.add(e); - return r.cmp(this.m) >= 0 && r.isub(this.m), r._forceRed(this); - }), - (E.prototype.iadd = function (t, e) { - this._verify2(t, e); - var r = t.iadd(e); - return r.cmp(this.m) >= 0 && r.isub(this.m), r; - }), - (E.prototype.sub = function (t, e) { - this._verify2(t, e); - var r = t.sub(e); - return r.cmpn(0) < 0 && r.iadd(this.m), r._forceRed(this); - }), - (E.prototype.isub = function (t, e) { - this._verify2(t, e); - var r = t.isub(e); - return r.cmpn(0) < 0 && r.iadd(this.m), r; - }), - (E.prototype.shl = function (t, e) { - return this._verify1(t), this.imod(t.ushln(e)); - }), - (E.prototype.imul = function (t, e) { - return this._verify2(t, e), this.imod(t.imul(e)); - }), - (E.prototype.mul = function (t, e) { - return this._verify2(t, e), this.imod(t.mul(e)); - }), - (E.prototype.isqr = function (t) { - return this.imul(t, t.clone()); - }), - (E.prototype.sqr = function (t) { - return this.mul(t, t); - }), - (E.prototype.sqrt = function (t) { - if (t.isZero()) return t.clone(); - var e = this.m.andln(3); - if ((i(e % 2 == 1), 3 === e)) { - var r = this.m.add(new o(1)).iushrn(2); - return this.pow(t, r); - } - for (var n = this.m.subn(1), s = 0; !n.isZero() && 0 === n.andln(1); ) s++, n.iushrn(1); - i(!n.isZero()); - var a = new o(1).toRed(this), - h = a.redNeg(), - u = this.m.subn(1).iushrn(1), - f = this.m.bitLength(); - for (f = new o(2 * f * f).toRed(this); 0 !== this.pow(f, u).cmp(h); ) f.redIAdd(h); - for (var c = this.pow(f, n), l = this.pow(t, n.addn(1).iushrn(1)), d = this.pow(t, n), p = s; 0 !== d.cmp(a); ) { - for (var m = d, g = 0; 0 !== m.cmp(a); g++) m = m.redSqr(); - i(g < p); - var b = this.pow(c, new o(1).iushln(p - g - 1)); - (l = l.redMul(b)), (c = b.redSqr()), (d = d.redMul(c)), (p = g); - } - return l; - }), - (E.prototype.invm = function (t) { - var e = t._invmp(this.m); - return 0 !== e.negative ? ((e.negative = 0), this.imod(e).redNeg()) : this.imod(e); - }), - (E.prototype.pow = function (t, e) { - if (e.isZero()) return new o(1).toRed(this); - if (0 === e.cmpn(1)) return t.clone(); - var r = new Array(16); - (r[0] = new o(1).toRed(this)), (r[1] = t); - for (var i = 2; i < r.length; i++) r[i] = this.mul(r[i - 1], t); - var n = r[0], - s = 0, - a = 0, - h = e.bitLength() % 26; - for (0 === h && (h = 26), i = e.length - 1; i >= 0; i--) { - for (var u = e.words[i], f = h - 1; f >= 0; f--) { - var c = (u >> f) & 1; - n !== r[0] && (n = this.sqr(n)), - 0 !== c || 0 !== s - ? ((s <<= 1), (s |= c), (4 == ++a || (0 === i && 0 === f)) && ((n = this.mul(n, r[s])), (a = 0), (s = 0))) - : (a = 0); - } - h = 26; - } - return n; - }), - (E.prototype.convertTo = function (t) { - var e = t.umod(this.m); - return e === t ? e.clone() : e; - }), - (E.prototype.convertFrom = function (t) { - var e = t.clone(); - return (e.red = null), e; - }), - (o.mont = function (t) { - return new S(t); - }), - n(S, E), - (S.prototype.convertTo = function (t) { - return this.imod(t.ushln(this.shift)); - }), - (S.prototype.convertFrom = function (t) { - var e = this.imod(t.mul(this.rinv)); - return (e.red = null), e; - }), - (S.prototype.imul = function (t, e) { - if (t.isZero() || e.isZero()) return (t.words[0] = 0), (t.length = 1), t; - var r = t.imul(e), - i = r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m), - n = r.isub(i).iushrn(this.shift), - o = n; - return n.cmp(this.m) >= 0 ? (o = n.isub(this.m)) : n.cmpn(0) < 0 && (o = n.iadd(this.m)), o._forceRed(this); - }), - (S.prototype.mul = function (t, e) { - if (t.isZero() || e.isZero()) return new o(0)._forceRed(this); - var r = t.mul(e), - i = r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m), - n = r.isub(i).iushrn(this.shift), - s = n; - return n.cmp(this.m) >= 0 ? (s = n.isub(this.m)) : n.cmpn(0) < 0 && (s = n.iadd(this.m)), s._forceRed(this); - }), - (S.prototype.invm = function (t) { - return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this); - }); - })((t = r.nmd(t)), this); - }, - 9749: (t, e, r) => { - 'use strict'; - var i = e; - (i.version = r(312).i8), - (i.utils = r(3369)), - (i.rand = r(9154)), - (i.curve = r(1530)), - (i.curves = r(1044)), - (i.ec = r(2263)), - (i.eddsa = r(1680)); - }, - 763: (t, e, r) => { - 'use strict'; - var i = r(6083), - n = r(3369), - o = n.getNAF, - s = n.getJSF, - a = n.assert; - function h(t, e) { - (this.type = t), - (this.p = new i(e.p, 16)), - (this.red = e.prime ? i.red(e.prime) : i.mont(this.p)), - (this.zero = new i(0).toRed(this.red)), - (this.one = new i(1).toRed(this.red)), - (this.two = new i(2).toRed(this.red)), - (this.n = e.n && new i(e.n, 16)), - (this.g = e.g && this.pointFromJSON(e.g, e.gRed)), - (this._wnafT1 = new Array(4)), - (this._wnafT2 = new Array(4)), - (this._wnafT3 = new Array(4)), - (this._wnafT4 = new Array(4)), - (this._bitLength = this.n ? this.n.bitLength() : 0); - var r = this.n && this.p.div(this.n); - !r || r.cmpn(100) > 0 ? (this.redN = null) : ((this._maxwellTrick = !0), (this.redN = this.n.toRed(this.red))); - } - function u(t, e) { - (this.curve = t), (this.type = e), (this.precomputed = null); - } - (t.exports = h), - (h.prototype.point = function () { - throw new Error('Not implemented'); - }), - (h.prototype.validate = function () { - throw new Error('Not implemented'); - }), - (h.prototype._fixedNafMul = function (t, e) { - a(t.precomputed); - var r = t._getDoubles(), - i = o(e, 1, this._bitLength), - n = (1 << (r.step + 1)) - (r.step % 2 == 0 ? 2 : 1); - n /= 3; - var s, - h, - u = []; - for (s = 0; s < i.length; s += r.step) { - h = 0; - for (var f = s + r.step - 1; f >= s; f--) h = (h << 1) + i[f]; - u.push(h); - } - for (var c = this.jpoint(null, null, null), l = this.jpoint(null, null, null), d = n; d > 0; d--) { - for (s = 0; s < u.length; s++) - (h = u[s]) === d ? (l = l.mixedAdd(r.points[s])) : h === -d && (l = l.mixedAdd(r.points[s].neg())); - c = c.add(l); - } - return c.toP(); - }), - (h.prototype._wnafMul = function (t, e) { - var r = 4, - i = t._getNAFPoints(r); - r = i.wnd; - for (var n = i.points, s = o(e, r, this._bitLength), h = this.jpoint(null, null, null), u = s.length - 1; u >= 0; u--) { - for (var f = 0; u >= 0 && 0 === s[u]; u--) f++; - if ((u >= 0 && f++, (h = h.dblp(f)), u < 0)) break; - var c = s[u]; - a(0 !== c), - (h = - 'affine' === t.type - ? c > 0 - ? h.mixedAdd(n[(c - 1) >> 1]) - : h.mixedAdd(n[(-c - 1) >> 1].neg()) - : c > 0 - ? h.add(n[(c - 1) >> 1]) - : h.add(n[(-c - 1) >> 1].neg())); - } - return 'affine' === t.type ? h.toP() : h; - }), - (h.prototype._wnafMulAdd = function (t, e, r, i, n) { - var a, - h, - u, - f = this._wnafT1, - c = this._wnafT2, - l = this._wnafT3, - d = 0; - for (a = 0; a < i; a++) { - var p = (u = e[a])._getNAFPoints(t); - (f[a] = p.wnd), (c[a] = p.points); - } - for (a = i - 1; a >= 1; a -= 2) { - var m = a - 1, - g = a; - if (1 === f[m] && 1 === f[g]) { - var b = [e[m], null, null, e[g]]; - 0 === e[m].y.cmp(e[g].y) - ? ((b[1] = e[m].add(e[g])), (b[2] = e[m].toJ().mixedAdd(e[g].neg()))) - : 0 === e[m].y.cmp(e[g].y.redNeg()) - ? ((b[1] = e[m].toJ().mixedAdd(e[g])), (b[2] = e[m].add(e[g].neg()))) - : ((b[1] = e[m].toJ().mixedAdd(e[g])), (b[2] = e[m].toJ().mixedAdd(e[g].neg()))); - var y = [-3, -1, -5, -7, 0, 7, 5, 1, 3], - v = s(r[m], r[g]); - for (d = Math.max(v[0].length, d), l[m] = new Array(d), l[g] = new Array(d), h = 0; h < d; h++) { - var w = 0 | v[0][h], - _ = 0 | v[1][h]; - (l[m][h] = y[3 * (w + 1) + (_ + 1)]), (l[g][h] = 0), (c[m] = b); - } - } else - (l[m] = o(r[m], f[m], this._bitLength)), - (l[g] = o(r[g], f[g], this._bitLength)), - (d = Math.max(l[m].length, d)), - (d = Math.max(l[g].length, d)); - } - var M = this.jpoint(null, null, null), - E = this._wnafT4; - for (a = d; a >= 0; a--) { - for (var S = 0; a >= 0; ) { - var x = !0; - for (h = 0; h < i; h++) (E[h] = 0 | l[h][a]), 0 !== E[h] && (x = !1); - if (!x) break; - S++, a--; - } - if ((a >= 0 && S++, (M = M.dblp(S)), a < 0)) break; - for (h = 0; h < i; h++) { - var A = E[h]; - 0 !== A && - (A > 0 ? (u = c[h][(A - 1) >> 1]) : A < 0 && (u = c[h][(-A - 1) >> 1].neg()), - (M = 'affine' === u.type ? M.mixedAdd(u) : M.add(u))); - } - } - for (a = 0; a < i; a++) c[a] = null; - return n ? M : M.toP(); - }), - (h.BasePoint = u), - (u.prototype.eq = function () { - throw new Error('Not implemented'); - }), - (u.prototype.validate = function () { - return this.curve.validate(this); - }), - (h.prototype.decodePoint = function (t, e) { - t = n.toArray(t, e); - var r = this.p.byteLength(); - if ((4 === t[0] || 6 === t[0] || 7 === t[0]) && t.length - 1 == 2 * r) - return ( - 6 === t[0] ? a(t[t.length - 1] % 2 == 0) : 7 === t[0] && a(t[t.length - 1] % 2 == 1), - this.point(t.slice(1, 1 + r), t.slice(1 + r, 1 + 2 * r)) - ); - if ((2 === t[0] || 3 === t[0]) && t.length - 1 === r) return this.pointFromX(t.slice(1, 1 + r), 3 === t[0]); - throw new Error('Unknown point format'); - }), - (u.prototype.encodeCompressed = function (t) { - return this.encode(t, !0); - }), - (u.prototype._encode = function (t) { - var e = this.curve.p.byteLength(), - r = this.getX().toArray('be', e); - return t ? [this.getY().isEven() ? 2 : 3].concat(r) : [4].concat(r, this.getY().toArray('be', e)); - }), - (u.prototype.encode = function (t, e) { - return n.encode(this._encode(e), t); - }), - (u.prototype.precompute = function (t) { - if (this.precomputed) return this; - var e = { doubles: null, naf: null, beta: null }; - return ( - (e.naf = this._getNAFPoints(8)), - (e.doubles = this._getDoubles(4, t)), - (e.beta = this._getBeta()), - (this.precomputed = e), - this - ); - }), - (u.prototype._hasDoubles = function (t) { - if (!this.precomputed) return !1; - var e = this.precomputed.doubles; - return !!e && e.points.length >= Math.ceil((t.bitLength() + 1) / e.step); - }), - (u.prototype._getDoubles = function (t, e) { - if (this.precomputed && this.precomputed.doubles) return this.precomputed.doubles; - for (var r = [this], i = this, n = 0; n < e; n += t) { - for (var o = 0; o < t; o++) i = i.dbl(); - r.push(i); - } - return { step: t, points: r }; - }), - (u.prototype._getNAFPoints = function (t) { - if (this.precomputed && this.precomputed.naf) return this.precomputed.naf; - for (var e = [this], r = (1 << t) - 1, i = 1 === r ? null : this.dbl(), n = 1; n < r; n++) e[n] = e[n - 1].add(i); - return { wnd: t, points: e }; - }), - (u.prototype._getBeta = function () { - return null; - }), - (u.prototype.dblp = function (t) { - for (var e = this, r = 0; r < t; r++) e = e.dbl(); - return e; - }); - }, - 4239: (t, e, r) => { - 'use strict'; - var i = r(3369), - n = r(6083), - o = r(87), - s = r(763), - a = i.assert; - function h(t) { - (this.twisted = 1 != (0 | t.a)), - (this.mOneA = this.twisted && -1 == (0 | t.a)), - (this.extended = this.mOneA), - s.call(this, 'edwards', t), - (this.a = new n(t.a, 16).umod(this.red.m)), - (this.a = this.a.toRed(this.red)), - (this.c = new n(t.c, 16).toRed(this.red)), - (this.c2 = this.c.redSqr()), - (this.d = new n(t.d, 16).toRed(this.red)), - (this.dd = this.d.redAdd(this.d)), - a(!this.twisted || 0 === this.c.fromRed().cmpn(1)), - (this.oneC = 1 == (0 | t.c)); - } - function u(t, e, r, i, o) { - s.BasePoint.call(this, t, 'projective'), - null === e && null === r && null === i - ? ((this.x = this.curve.zero), - (this.y = this.curve.one), - (this.z = this.curve.one), - (this.t = this.curve.zero), - (this.zOne = !0)) - : ((this.x = new n(e, 16)), - (this.y = new n(r, 16)), - (this.z = i ? new n(i, 16) : this.curve.one), - (this.t = o && new n(o, 16)), - this.x.red || (this.x = this.x.toRed(this.curve.red)), - this.y.red || (this.y = this.y.toRed(this.curve.red)), - this.z.red || (this.z = this.z.toRed(this.curve.red)), - this.t && !this.t.red && (this.t = this.t.toRed(this.curve.red)), - (this.zOne = this.z === this.curve.one), - this.curve.extended && - !this.t && - ((this.t = this.x.redMul(this.y)), this.zOne || (this.t = this.t.redMul(this.z.redInvm())))); - } - o(h, s), - (t.exports = h), - (h.prototype._mulA = function (t) { - return this.mOneA ? t.redNeg() : this.a.redMul(t); - }), - (h.prototype._mulC = function (t) { - return this.oneC ? t : this.c.redMul(t); - }), - (h.prototype.jpoint = function (t, e, r, i) { - return this.point(t, e, r, i); - }), - (h.prototype.pointFromX = function (t, e) { - (t = new n(t, 16)).red || (t = t.toRed(this.red)); - var r = t.redSqr(), - i = this.c2.redSub(this.a.redMul(r)), - o = this.one.redSub(this.c2.redMul(this.d).redMul(r)), - s = i.redMul(o.redInvm()), - a = s.redSqrt(); - if (0 !== a.redSqr().redSub(s).cmp(this.zero)) throw new Error('invalid point'); - var h = a.fromRed().isOdd(); - return ((e && !h) || (!e && h)) && (a = a.redNeg()), this.point(t, a); - }), - (h.prototype.pointFromY = function (t, e) { - (t = new n(t, 16)).red || (t = t.toRed(this.red)); - var r = t.redSqr(), - i = r.redSub(this.c2), - o = r.redMul(this.d).redMul(this.c2).redSub(this.a), - s = i.redMul(o.redInvm()); - if (0 === s.cmp(this.zero)) { - if (e) throw new Error('invalid point'); - return this.point(this.zero, t); - } - var a = s.redSqrt(); - if (0 !== a.redSqr().redSub(s).cmp(this.zero)) throw new Error('invalid point'); - return a.fromRed().isOdd() !== e && (a = a.redNeg()), this.point(a, t); - }), - (h.prototype.validate = function (t) { - if (t.isInfinity()) return !0; - t.normalize(); - var e = t.x.redSqr(), - r = t.y.redSqr(), - i = e.redMul(this.a).redAdd(r), - n = this.c2.redMul(this.one.redAdd(this.d.redMul(e).redMul(r))); - return 0 === i.cmp(n); - }), - o(u, s.BasePoint), - (h.prototype.pointFromJSON = function (t) { - return u.fromJSON(this, t); - }), - (h.prototype.point = function (t, e, r, i) { - return new u(this, t, e, r, i); - }), - (u.fromJSON = function (t, e) { - return new u(t, e[0], e[1], e[2]); - }), - (u.prototype.inspect = function () { - return this.isInfinity() - ? '' - : ''; - }), - (u.prototype.isInfinity = function () { - return 0 === this.x.cmpn(0) && (0 === this.y.cmp(this.z) || (this.zOne && 0 === this.y.cmp(this.curve.c))); - }), - (u.prototype._extDbl = function () { - var t = this.x.redSqr(), - e = this.y.redSqr(), - r = this.z.redSqr(); - r = r.redIAdd(r); - var i = this.curve._mulA(t), - n = this.x.redAdd(this.y).redSqr().redISub(t).redISub(e), - o = i.redAdd(e), - s = o.redSub(r), - a = i.redSub(e), - h = n.redMul(s), - u = o.redMul(a), - f = n.redMul(a), - c = s.redMul(o); - return this.curve.point(h, u, c, f); - }), - (u.prototype._projDbl = function () { - var t, - e, - r, - i, - n, - o, - s = this.x.redAdd(this.y).redSqr(), - a = this.x.redSqr(), - h = this.y.redSqr(); - if (this.curve.twisted) { - var u = (i = this.curve._mulA(a)).redAdd(h); - this.zOne - ? ((t = s.redSub(a).redSub(h).redMul(u.redSub(this.curve.two))), - (e = u.redMul(i.redSub(h))), - (r = u.redSqr().redSub(u).redSub(u))) - : ((n = this.z.redSqr()), - (o = u.redSub(n).redISub(n)), - (t = s.redSub(a).redISub(h).redMul(o)), - (e = u.redMul(i.redSub(h))), - (r = u.redMul(o))); - } else - (i = a.redAdd(h)), - (n = this.curve._mulC(this.z).redSqr()), - (o = i.redSub(n).redSub(n)), - (t = this.curve._mulC(s.redISub(i)).redMul(o)), - (e = this.curve._mulC(i).redMul(a.redISub(h))), - (r = i.redMul(o)); - return this.curve.point(t, e, r); - }), - (u.prototype.dbl = function () { - return this.isInfinity() ? this : this.curve.extended ? this._extDbl() : this._projDbl(); - }), - (u.prototype._extAdd = function (t) { - var e = this.y.redSub(this.x).redMul(t.y.redSub(t.x)), - r = this.y.redAdd(this.x).redMul(t.y.redAdd(t.x)), - i = this.t.redMul(this.curve.dd).redMul(t.t), - n = this.z.redMul(t.z.redAdd(t.z)), - o = r.redSub(e), - s = n.redSub(i), - a = n.redAdd(i), - h = r.redAdd(e), - u = o.redMul(s), - f = a.redMul(h), - c = o.redMul(h), - l = s.redMul(a); - return this.curve.point(u, f, l, c); - }), - (u.prototype._projAdd = function (t) { - var e, - r, - i = this.z.redMul(t.z), - n = i.redSqr(), - o = this.x.redMul(t.x), - s = this.y.redMul(t.y), - a = this.curve.d.redMul(o).redMul(s), - h = n.redSub(a), - u = n.redAdd(a), - f = this.x.redAdd(this.y).redMul(t.x.redAdd(t.y)).redISub(o).redISub(s), - c = i.redMul(h).redMul(f); - return ( - this.curve.twisted - ? ((e = i.redMul(u).redMul(s.redSub(this.curve._mulA(o)))), (r = h.redMul(u))) - : ((e = i.redMul(u).redMul(s.redSub(o))), (r = this.curve._mulC(h).redMul(u))), - this.curve.point(c, e, r) - ); - }), - (u.prototype.add = function (t) { - return this.isInfinity() ? t : t.isInfinity() ? this : this.curve.extended ? this._extAdd(t) : this._projAdd(t); - }), - (u.prototype.mul = function (t) { - return this._hasDoubles(t) ? this.curve._fixedNafMul(this, t) : this.curve._wnafMul(this, t); - }), - (u.prototype.mulAdd = function (t, e, r) { - return this.curve._wnafMulAdd(1, [this, e], [t, r], 2, !1); - }), - (u.prototype.jmulAdd = function (t, e, r) { - return this.curve._wnafMulAdd(1, [this, e], [t, r], 2, !0); - }), - (u.prototype.normalize = function () { - if (this.zOne) return this; - var t = this.z.redInvm(); - return ( - (this.x = this.x.redMul(t)), - (this.y = this.y.redMul(t)), - this.t && (this.t = this.t.redMul(t)), - (this.z = this.curve.one), - (this.zOne = !0), - this - ); - }), - (u.prototype.neg = function () { - return this.curve.point(this.x.redNeg(), this.y, this.z, this.t && this.t.redNeg()); - }), - (u.prototype.getX = function () { - return this.normalize(), this.x.fromRed(); - }), - (u.prototype.getY = function () { - return this.normalize(), this.y.fromRed(); - }), - (u.prototype.eq = function (t) { - return this === t || (0 === this.getX().cmp(t.getX()) && 0 === this.getY().cmp(t.getY())); - }), - (u.prototype.eqXToP = function (t) { - var e = t.toRed(this.curve.red).redMul(this.z); - if (0 === this.x.cmp(e)) return !0; - for (var r = t.clone(), i = this.curve.redN.redMul(this.z); ; ) { - if ((r.iadd(this.curve.n), r.cmp(this.curve.p) >= 0)) return !1; - if ((e.redIAdd(i), 0 === this.x.cmp(e))) return !0; - } - }), - (u.prototype.toP = u.prototype.normalize), - (u.prototype.mixedAdd = u.prototype.add); - }, - 1530: (t, e, r) => { - 'use strict'; - var i = e; - (i.base = r(763)), (i.short = r(4560)), (i.mont = r(5974)), (i.edwards = r(4239)); - }, - 5974: (t, e, r) => { - 'use strict'; - var i = r(6083), - n = r(87), - o = r(763), - s = r(3369); - function a(t) { - o.call(this, 'mont', t), - (this.a = new i(t.a, 16).toRed(this.red)), - (this.b = new i(t.b, 16).toRed(this.red)), - (this.i4 = new i(4).toRed(this.red).redInvm()), - (this.two = new i(2).toRed(this.red)), - (this.a24 = this.i4.redMul(this.a.redAdd(this.two))); - } - function h(t, e, r) { - o.BasePoint.call(this, t, 'projective'), - null === e && null === r - ? ((this.x = this.curve.one), (this.z = this.curve.zero)) - : ((this.x = new i(e, 16)), - (this.z = new i(r, 16)), - this.x.red || (this.x = this.x.toRed(this.curve.red)), - this.z.red || (this.z = this.z.toRed(this.curve.red))); - } - n(a, o), - (t.exports = a), - (a.prototype.validate = function (t) { - var e = t.normalize().x, - r = e.redSqr(), - i = r.redMul(e).redAdd(r.redMul(this.a)).redAdd(e); - return 0 === i.redSqrt().redSqr().cmp(i); - }), - n(h, o.BasePoint), - (a.prototype.decodePoint = function (t, e) { - return this.point(s.toArray(t, e), 1); - }), - (a.prototype.point = function (t, e) { - return new h(this, t, e); - }), - (a.prototype.pointFromJSON = function (t) { - return h.fromJSON(this, t); - }), - (h.prototype.precompute = function () {}), - (h.prototype._encode = function () { - return this.getX().toArray('be', this.curve.p.byteLength()); - }), - (h.fromJSON = function (t, e) { - return new h(t, e[0], e[1] || t.one); - }), - (h.prototype.inspect = function () { - return this.isInfinity() - ? '' - : ''; - }), - (h.prototype.isInfinity = function () { - return 0 === this.z.cmpn(0); - }), - (h.prototype.dbl = function () { - var t = this.x.redAdd(this.z).redSqr(), - e = this.x.redSub(this.z).redSqr(), - r = t.redSub(e), - i = t.redMul(e), - n = r.redMul(e.redAdd(this.curve.a24.redMul(r))); - return this.curve.point(i, n); - }), - (h.prototype.add = function () { - throw new Error('Not supported on Montgomery curve'); - }), - (h.prototype.diffAdd = function (t, e) { - var r = this.x.redAdd(this.z), - i = this.x.redSub(this.z), - n = t.x.redAdd(t.z), - o = t.x.redSub(t.z).redMul(r), - s = n.redMul(i), - a = e.z.redMul(o.redAdd(s).redSqr()), - h = e.x.redMul(o.redISub(s).redSqr()); - return this.curve.point(a, h); - }), - (h.prototype.mul = function (t) { - for (var e = t.clone(), r = this, i = this.curve.point(null, null), n = []; 0 !== e.cmpn(0); e.iushrn(1)) n.push(e.andln(1)); - for (var o = n.length - 1; o >= 0; o--) - 0 === n[o] ? ((r = r.diffAdd(i, this)), (i = i.dbl())) : ((i = r.diffAdd(i, this)), (r = r.dbl())); - return i; - }), - (h.prototype.mulAdd = function () { - throw new Error('Not supported on Montgomery curve'); - }), - (h.prototype.jumlAdd = function () { - throw new Error('Not supported on Montgomery curve'); - }), - (h.prototype.eq = function (t) { - return 0 === this.getX().cmp(t.getX()); - }), - (h.prototype.normalize = function () { - return (this.x = this.x.redMul(this.z.redInvm())), (this.z = this.curve.one), this; - }), - (h.prototype.getX = function () { - return this.normalize(), this.x.fromRed(); - }); - }, - 4560: (t, e, r) => { - 'use strict'; - var i = r(3369), - n = r(6083), - o = r(87), - s = r(763), - a = i.assert; - function h(t) { - s.call(this, 'short', t), - (this.a = new n(t.a, 16).toRed(this.red)), - (this.b = new n(t.b, 16).toRed(this.red)), - (this.tinv = this.two.redInvm()), - (this.zeroA = 0 === this.a.fromRed().cmpn(0)), - (this.threeA = 0 === this.a.fromRed().sub(this.p).cmpn(-3)), - (this.endo = this._getEndomorphism(t)), - (this._endoWnafT1 = new Array(4)), - (this._endoWnafT2 = new Array(4)); - } - function u(t, e, r, i) { - s.BasePoint.call(this, t, 'affine'), - null === e && null === r - ? ((this.x = null), (this.y = null), (this.inf = !0)) - : ((this.x = new n(e, 16)), - (this.y = new n(r, 16)), - i && (this.x.forceRed(this.curve.red), this.y.forceRed(this.curve.red)), - this.x.red || (this.x = this.x.toRed(this.curve.red)), - this.y.red || (this.y = this.y.toRed(this.curve.red)), - (this.inf = !1)); - } - function f(t, e, r, i) { - s.BasePoint.call(this, t, 'jacobian'), - null === e && null === r && null === i - ? ((this.x = this.curve.one), (this.y = this.curve.one), (this.z = new n(0))) - : ((this.x = new n(e, 16)), (this.y = new n(r, 16)), (this.z = new n(i, 16))), - this.x.red || (this.x = this.x.toRed(this.curve.red)), - this.y.red || (this.y = this.y.toRed(this.curve.red)), - this.z.red || (this.z = this.z.toRed(this.curve.red)), - (this.zOne = this.z === this.curve.one); - } - o(h, s), - (t.exports = h), - (h.prototype._getEndomorphism = function (t) { - if (this.zeroA && this.g && this.n && 1 === this.p.modn(3)) { - var e, r; - if (t.beta) e = new n(t.beta, 16).toRed(this.red); - else { - var i = this._getEndoRoots(this.p); - e = (e = i[0].cmp(i[1]) < 0 ? i[0] : i[1]).toRed(this.red); - } - if (t.lambda) r = new n(t.lambda, 16); - else { - var o = this._getEndoRoots(this.n); - 0 === this.g.mul(o[0]).x.cmp(this.g.x.redMul(e)) - ? (r = o[0]) - : ((r = o[1]), a(0 === this.g.mul(r).x.cmp(this.g.x.redMul(e)))); - } - return { - beta: e, - lambda: r, - basis: t.basis - ? t.basis.map(function (t) { - return { a: new n(t.a, 16), b: new n(t.b, 16) }; - }) - : this._getEndoBasis(r), - }; - } - }), - (h.prototype._getEndoRoots = function (t) { - var e = t === this.p ? this.red : n.mont(t), - r = new n(2).toRed(e).redInvm(), - i = r.redNeg(), - o = new n(3).toRed(e).redNeg().redSqrt().redMul(r); - return [i.redAdd(o).fromRed(), i.redSub(o).fromRed()]; - }), - (h.prototype._getEndoBasis = function (t) { - for ( - var e, - r, - i, - o, - s, - a, - h, - u, - f, - c = this.n.ushrn(Math.floor(this.n.bitLength() / 2)), - l = t, - d = this.n.clone(), - p = new n(1), - m = new n(0), - g = new n(0), - b = new n(1), - y = 0; - 0 !== l.cmpn(0); - - ) { - var v = d.div(l); - (u = d.sub(v.mul(l))), (f = g.sub(v.mul(p))); - var w = b.sub(v.mul(m)); - if (!i && u.cmp(c) < 0) (e = h.neg()), (r = p), (i = u.neg()), (o = f); - else if (i && 2 == ++y) break; - (h = u), (d = l), (l = u), (g = p), (p = f), (b = m), (m = w); - } - (s = u.neg()), (a = f); - var _ = i.sqr().add(o.sqr()); - return ( - s.sqr().add(a.sqr()).cmp(_) >= 0 && ((s = e), (a = r)), - i.negative && ((i = i.neg()), (o = o.neg())), - s.negative && ((s = s.neg()), (a = a.neg())), - [ - { a: i, b: o }, - { a: s, b: a }, - ] - ); - }), - (h.prototype._endoSplit = function (t) { - var e = this.endo.basis, - r = e[0], - i = e[1], - n = i.b.mul(t).divRound(this.n), - o = r.b.neg().mul(t).divRound(this.n), - s = n.mul(r.a), - a = o.mul(i.a), - h = n.mul(r.b), - u = o.mul(i.b); - return { k1: t.sub(s).sub(a), k2: h.add(u).neg() }; - }), - (h.prototype.pointFromX = function (t, e) { - (t = new n(t, 16)).red || (t = t.toRed(this.red)); - var r = t.redSqr().redMul(t).redIAdd(t.redMul(this.a)).redIAdd(this.b), - i = r.redSqrt(); - if (0 !== i.redSqr().redSub(r).cmp(this.zero)) throw new Error('invalid point'); - var o = i.fromRed().isOdd(); - return ((e && !o) || (!e && o)) && (i = i.redNeg()), this.point(t, i); - }), - (h.prototype.validate = function (t) { - if (t.inf) return !0; - var e = t.x, - r = t.y, - i = this.a.redMul(e), - n = e.redSqr().redMul(e).redIAdd(i).redIAdd(this.b); - return 0 === r.redSqr().redISub(n).cmpn(0); - }), - (h.prototype._endoWnafMulAdd = function (t, e, r) { - for (var i = this._endoWnafT1, n = this._endoWnafT2, o = 0; o < t.length; o++) { - var s = this._endoSplit(e[o]), - a = t[o], - h = a._getBeta(); - s.k1.negative && (s.k1.ineg(), (a = a.neg(!0))), - s.k2.negative && (s.k2.ineg(), (h = h.neg(!0))), - (i[2 * o] = a), - (i[2 * o + 1] = h), - (n[2 * o] = s.k1), - (n[2 * o + 1] = s.k2); - } - for (var u = this._wnafMulAdd(1, i, n, 2 * o, r), f = 0; f < 2 * o; f++) (i[f] = null), (n[f] = null); - return u; - }), - o(u, s.BasePoint), - (h.prototype.point = function (t, e, r) { - return new u(this, t, e, r); - }), - (h.prototype.pointFromJSON = function (t, e) { - return u.fromJSON(this, t, e); - }), - (u.prototype._getBeta = function () { - if (this.curve.endo) { - var t = this.precomputed; - if (t && t.beta) return t.beta; - var e = this.curve.point(this.x.redMul(this.curve.endo.beta), this.y); - if (t) { - var r = this.curve, - i = function (t) { - return r.point(t.x.redMul(r.endo.beta), t.y); - }; - (t.beta = e), - (e.precomputed = { - beta: null, - naf: t.naf && { wnd: t.naf.wnd, points: t.naf.points.map(i) }, - doubles: t.doubles && { step: t.doubles.step, points: t.doubles.points.map(i) }, - }); - } - return e; - } - }), - (u.prototype.toJSON = function () { - return this.precomputed - ? [ - this.x, - this.y, - this.precomputed && { - doubles: this.precomputed.doubles && { - step: this.precomputed.doubles.step, - points: this.precomputed.doubles.points.slice(1), - }, - naf: this.precomputed.naf && { wnd: this.precomputed.naf.wnd, points: this.precomputed.naf.points.slice(1) }, - }, - ] - : [this.x, this.y]; - }), - (u.fromJSON = function (t, e, r) { - 'string' == typeof e && (e = JSON.parse(e)); - var i = t.point(e[0], e[1], r); - if (!e[2]) return i; - function n(e) { - return t.point(e[0], e[1], r); - } - var o = e[2]; - return ( - (i.precomputed = { - beta: null, - doubles: o.doubles && { step: o.doubles.step, points: [i].concat(o.doubles.points.map(n)) }, - naf: o.naf && { wnd: o.naf.wnd, points: [i].concat(o.naf.points.map(n)) }, - }), - i - ); - }), - (u.prototype.inspect = function () { - return this.isInfinity() - ? '' - : ''; - }), - (u.prototype.isInfinity = function () { - return this.inf; - }), - (u.prototype.add = function (t) { - if (this.inf) return t; - if (t.inf) return this; - if (this.eq(t)) return this.dbl(); - if (this.neg().eq(t)) return this.curve.point(null, null); - if (0 === this.x.cmp(t.x)) return this.curve.point(null, null); - var e = this.y.redSub(t.y); - 0 !== e.cmpn(0) && (e = e.redMul(this.x.redSub(t.x).redInvm())); - var r = e.redSqr().redISub(this.x).redISub(t.x), - i = e.redMul(this.x.redSub(r)).redISub(this.y); - return this.curve.point(r, i); - }), - (u.prototype.dbl = function () { - if (this.inf) return this; - var t = this.y.redAdd(this.y); - if (0 === t.cmpn(0)) return this.curve.point(null, null); - var e = this.curve.a, - r = this.x.redSqr(), - i = t.redInvm(), - n = r.redAdd(r).redIAdd(r).redIAdd(e).redMul(i), - o = n.redSqr().redISub(this.x.redAdd(this.x)), - s = n.redMul(this.x.redSub(o)).redISub(this.y); - return this.curve.point(o, s); - }), - (u.prototype.getX = function () { - return this.x.fromRed(); - }), - (u.prototype.getY = function () { - return this.y.fromRed(); - }), - (u.prototype.mul = function (t) { - return ( - (t = new n(t, 16)), - this.isInfinity() - ? this - : this._hasDoubles(t) - ? this.curve._fixedNafMul(this, t) - : this.curve.endo - ? this.curve._endoWnafMulAdd([this], [t]) - : this.curve._wnafMul(this, t) - ); - }), - (u.prototype.mulAdd = function (t, e, r) { - var i = [this, e], - n = [t, r]; - return this.curve.endo ? this.curve._endoWnafMulAdd(i, n) : this.curve._wnafMulAdd(1, i, n, 2); - }), - (u.prototype.jmulAdd = function (t, e, r) { - var i = [this, e], - n = [t, r]; - return this.curve.endo ? this.curve._endoWnafMulAdd(i, n, !0) : this.curve._wnafMulAdd(1, i, n, 2, !0); - }), - (u.prototype.eq = function (t) { - return this === t || (this.inf === t.inf && (this.inf || (0 === this.x.cmp(t.x) && 0 === this.y.cmp(t.y)))); - }), - (u.prototype.neg = function (t) { - if (this.inf) return this; - var e = this.curve.point(this.x, this.y.redNeg()); - if (t && this.precomputed) { - var r = this.precomputed, - i = function (t) { - return t.neg(); - }; - e.precomputed = { - naf: r.naf && { wnd: r.naf.wnd, points: r.naf.points.map(i) }, - doubles: r.doubles && { step: r.doubles.step, points: r.doubles.points.map(i) }, - }; - } - return e; - }), - (u.prototype.toJ = function () { - return this.inf ? this.curve.jpoint(null, null, null) : this.curve.jpoint(this.x, this.y, this.curve.one); - }), - o(f, s.BasePoint), - (h.prototype.jpoint = function (t, e, r) { - return new f(this, t, e, r); - }), - (f.prototype.toP = function () { - if (this.isInfinity()) return this.curve.point(null, null); - var t = this.z.redInvm(), - e = t.redSqr(), - r = this.x.redMul(e), - i = this.y.redMul(e).redMul(t); - return this.curve.point(r, i); - }), - (f.prototype.neg = function () { - return this.curve.jpoint(this.x, this.y.redNeg(), this.z); - }), - (f.prototype.add = function (t) { - if (this.isInfinity()) return t; - if (t.isInfinity()) return this; - var e = t.z.redSqr(), - r = this.z.redSqr(), - i = this.x.redMul(e), - n = t.x.redMul(r), - o = this.y.redMul(e.redMul(t.z)), - s = t.y.redMul(r.redMul(this.z)), - a = i.redSub(n), - h = o.redSub(s); - if (0 === a.cmpn(0)) return 0 !== h.cmpn(0) ? this.curve.jpoint(null, null, null) : this.dbl(); - var u = a.redSqr(), - f = u.redMul(a), - c = i.redMul(u), - l = h.redSqr().redIAdd(f).redISub(c).redISub(c), - d = h.redMul(c.redISub(l)).redISub(o.redMul(f)), - p = this.z.redMul(t.z).redMul(a); - return this.curve.jpoint(l, d, p); - }), - (f.prototype.mixedAdd = function (t) { - if (this.isInfinity()) return t.toJ(); - if (t.isInfinity()) return this; - var e = this.z.redSqr(), - r = this.x, - i = t.x.redMul(e), - n = this.y, - o = t.y.redMul(e).redMul(this.z), - s = r.redSub(i), - a = n.redSub(o); - if (0 === s.cmpn(0)) return 0 !== a.cmpn(0) ? this.curve.jpoint(null, null, null) : this.dbl(); - var h = s.redSqr(), - u = h.redMul(s), - f = r.redMul(h), - c = a.redSqr().redIAdd(u).redISub(f).redISub(f), - l = a.redMul(f.redISub(c)).redISub(n.redMul(u)), - d = this.z.redMul(s); - return this.curve.jpoint(c, l, d); - }), - (f.prototype.dblp = function (t) { - if (0 === t) return this; - if (this.isInfinity()) return this; - if (!t) return this.dbl(); - var e; - if (this.curve.zeroA || this.curve.threeA) { - var r = this; - for (e = 0; e < t; e++) r = r.dbl(); - return r; - } - var i = this.curve.a, - n = this.curve.tinv, - o = this.x, - s = this.y, - a = this.z, - h = a.redSqr().redSqr(), - u = s.redAdd(s); - for (e = 0; e < t; e++) { - var f = o.redSqr(), - c = u.redSqr(), - l = c.redSqr(), - d = f.redAdd(f).redIAdd(f).redIAdd(i.redMul(h)), - p = o.redMul(c), - m = d.redSqr().redISub(p.redAdd(p)), - g = p.redISub(m), - b = d.redMul(g); - b = b.redIAdd(b).redISub(l); - var y = u.redMul(a); - e + 1 < t && (h = h.redMul(l)), (o = m), (a = y), (u = b); - } - return this.curve.jpoint(o, u.redMul(n), a); - }), - (f.prototype.dbl = function () { - return this.isInfinity() ? this : this.curve.zeroA ? this._zeroDbl() : this.curve.threeA ? this._threeDbl() : this._dbl(); - }), - (f.prototype._zeroDbl = function () { - var t, e, r; - if (this.zOne) { - var i = this.x.redSqr(), - n = this.y.redSqr(), - o = n.redSqr(), - s = this.x.redAdd(n).redSqr().redISub(i).redISub(o); - s = s.redIAdd(s); - var a = i.redAdd(i).redIAdd(i), - h = a.redSqr().redISub(s).redISub(s), - u = o.redIAdd(o); - (u = (u = u.redIAdd(u)).redIAdd(u)), (t = h), (e = a.redMul(s.redISub(h)).redISub(u)), (r = this.y.redAdd(this.y)); - } else { - var f = this.x.redSqr(), - c = this.y.redSqr(), - l = c.redSqr(), - d = this.x.redAdd(c).redSqr().redISub(f).redISub(l); - d = d.redIAdd(d); - var p = f.redAdd(f).redIAdd(f), - m = p.redSqr(), - g = l.redIAdd(l); - (g = (g = g.redIAdd(g)).redIAdd(g)), - (t = m.redISub(d).redISub(d)), - (e = p.redMul(d.redISub(t)).redISub(g)), - (r = (r = this.y.redMul(this.z)).redIAdd(r)); - } - return this.curve.jpoint(t, e, r); - }), - (f.prototype._threeDbl = function () { - var t, e, r; - if (this.zOne) { - var i = this.x.redSqr(), - n = this.y.redSqr(), - o = n.redSqr(), - s = this.x.redAdd(n).redSqr().redISub(i).redISub(o); - s = s.redIAdd(s); - var a = i.redAdd(i).redIAdd(i).redIAdd(this.curve.a), - h = a.redSqr().redISub(s).redISub(s); - t = h; - var u = o.redIAdd(o); - (u = (u = u.redIAdd(u)).redIAdd(u)), (e = a.redMul(s.redISub(h)).redISub(u)), (r = this.y.redAdd(this.y)); - } else { - var f = this.z.redSqr(), - c = this.y.redSqr(), - l = this.x.redMul(c), - d = this.x.redSub(f).redMul(this.x.redAdd(f)); - d = d.redAdd(d).redIAdd(d); - var p = l.redIAdd(l), - m = (p = p.redIAdd(p)).redAdd(p); - (t = d.redSqr().redISub(m)), (r = this.y.redAdd(this.z).redSqr().redISub(c).redISub(f)); - var g = c.redSqr(); - (g = (g = (g = g.redIAdd(g)).redIAdd(g)).redIAdd(g)), (e = d.redMul(p.redISub(t)).redISub(g)); - } - return this.curve.jpoint(t, e, r); - }), - (f.prototype._dbl = function () { - var t = this.curve.a, - e = this.x, - r = this.y, - i = this.z, - n = i.redSqr().redSqr(), - o = e.redSqr(), - s = r.redSqr(), - a = o.redAdd(o).redIAdd(o).redIAdd(t.redMul(n)), - h = e.redAdd(e), - u = (h = h.redIAdd(h)).redMul(s), - f = a.redSqr().redISub(u.redAdd(u)), - c = u.redISub(f), - l = s.redSqr(); - l = (l = (l = l.redIAdd(l)).redIAdd(l)).redIAdd(l); - var d = a.redMul(c).redISub(l), - p = r.redAdd(r).redMul(i); - return this.curve.jpoint(f, d, p); - }), - (f.prototype.trpl = function () { - if (!this.curve.zeroA) return this.dbl().add(this); - var t = this.x.redSqr(), - e = this.y.redSqr(), - r = this.z.redSqr(), - i = e.redSqr(), - n = t.redAdd(t).redIAdd(t), - o = n.redSqr(), - s = this.x.redAdd(e).redSqr().redISub(t).redISub(i), - a = (s = (s = (s = s.redIAdd(s)).redAdd(s).redIAdd(s)).redISub(o)).redSqr(), - h = i.redIAdd(i); - h = (h = (h = h.redIAdd(h)).redIAdd(h)).redIAdd(h); - var u = n.redIAdd(s).redSqr().redISub(o).redISub(a).redISub(h), - f = e.redMul(u); - f = (f = f.redIAdd(f)).redIAdd(f); - var c = this.x.redMul(a).redISub(f); - c = (c = c.redIAdd(c)).redIAdd(c); - var l = this.y.redMul(u.redMul(h.redISub(u)).redISub(s.redMul(a))); - l = (l = (l = l.redIAdd(l)).redIAdd(l)).redIAdd(l); - var d = this.z.redAdd(s).redSqr().redISub(r).redISub(a); - return this.curve.jpoint(c, l, d); - }), - (f.prototype.mul = function (t, e) { - return (t = new n(t, e)), this.curve._wnafMul(this, t); - }), - (f.prototype.eq = function (t) { - if ('affine' === t.type) return this.eq(t.toJ()); - if (this === t) return !0; - var e = this.z.redSqr(), - r = t.z.redSqr(); - if (0 !== this.x.redMul(r).redISub(t.x.redMul(e)).cmpn(0)) return !1; - var i = e.redMul(this.z), - n = r.redMul(t.z); - return 0 === this.y.redMul(n).redISub(t.y.redMul(i)).cmpn(0); - }), - (f.prototype.eqXToP = function (t) { - var e = this.z.redSqr(), - r = t.toRed(this.curve.red).redMul(e); - if (0 === this.x.cmp(r)) return !0; - for (var i = t.clone(), n = this.curve.redN.redMul(e); ; ) { - if ((i.iadd(this.curve.n), i.cmp(this.curve.p) >= 0)) return !1; - if ((r.redIAdd(n), 0 === this.x.cmp(r))) return !0; - } - }), - (f.prototype.inspect = function () { - return this.isInfinity() - ? '' - : ''; - }), - (f.prototype.isInfinity = function () { - return 0 === this.z.cmpn(0); - }); - }, - 1044: (t, e, r) => { - 'use strict'; - var i, - n = e, - o = r(5294), - s = r(1530), - a = r(3369).assert; - function h(t) { - 'short' === t.type - ? (this.curve = new s.short(t)) - : 'edwards' === t.type - ? (this.curve = new s.edwards(t)) - : (this.curve = new s.mont(t)), - (this.g = this.curve.g), - (this.n = this.curve.n), - (this.hash = t.hash), - a(this.g.validate(), 'Invalid curve'), - a(this.g.mul(this.n).isInfinity(), 'Invalid curve, G*N != O'); - } - function u(t, e) { - Object.defineProperty(n, t, { - configurable: !0, - enumerable: !0, - get: function () { - var r = new h(e); - return Object.defineProperty(n, t, { configurable: !0, enumerable: !0, value: r }), r; - }, - }); - } - (n.PresetCurve = h), - u('p192', { - type: 'short', - prime: 'p192', - p: 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff', - a: 'ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc', - b: '64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1', - n: 'ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831', - hash: o.sha256, - gRed: !1, - g: ['188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012', '07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811'], - }), - u('p224', { - type: 'short', - prime: 'p224', - p: 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001', - a: 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe', - b: 'b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4', - n: 'ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d', - hash: o.sha256, - gRed: !1, - g: [ - 'b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21', - 'bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34', - ], - }), - u('p256', { - type: 'short', - prime: null, - p: 'ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff', - a: 'ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc', - b: '5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b', - n: 'ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551', - hash: o.sha256, - gRed: !1, - g: [ - '6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296', - '4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5', - ], - }), - u('p384', { - type: 'short', - prime: null, - p: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff', - a: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc', - b: 'b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef', - n: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973', - hash: o.sha384, - gRed: !1, - g: [ - 'aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7', - '3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f', - ], - }), - u('p521', { - type: 'short', - prime: null, - p: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff', - a: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc', - b: '00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00', - n: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409', - hash: o.sha512, - gRed: !1, - g: [ - '000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66', - '00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650', - ], - }), - u('curve25519', { - type: 'mont', - prime: 'p25519', - p: '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed', - a: '76d06', - b: '1', - n: '1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed', - hash: o.sha256, - gRed: !1, - g: ['9'], - }), - u('ed25519', { - type: 'edwards', - prime: 'p25519', - p: '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed', - a: '-1', - c: '1', - d: '52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3', - n: '1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed', - hash: o.sha256, - gRed: !1, - g: [ - '216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a', - '6666666666666666666666666666666666666666666666666666666666666658', - ], - }); - try { - i = r(8719); - } catch (t) { - i = void 0; - } - u('secp256k1', { - type: 'short', - prime: 'k256', - p: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f', - a: '0', - b: '7', - n: 'ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141', - h: '1', - hash: o.sha256, - beta: '7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee', - lambda: '5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72', - basis: [ - { a: '3086d221a7d46bcde86c90e49284eb15', b: '-e4437ed6010e88286f547fa90abfe4c3' }, - { a: '114ca50f7a8e2f3f657c1108d9d44cfd8', b: '3086d221a7d46bcde86c90e49284eb15' }, - ], - gRed: !1, - g: [ - '79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798', - '483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8', - i, - ], - }); - }, - 2263: (t, e, r) => { - 'use strict'; - var i = r(6083), - n = r(6513), - o = r(3369), - s = r(1044), - a = r(9154), - h = o.assert, - u = r(4093), - f = r(9758); - function c(t) { - if (!(this instanceof c)) return new c(t); - 'string' == typeof t && (h(Object.prototype.hasOwnProperty.call(s, t), 'Unknown curve ' + t), (t = s[t])), - t instanceof s.PresetCurve && (t = { curve: t }), - (this.curve = t.curve.curve), - (this.n = this.curve.n), - (this.nh = this.n.ushrn(1)), - (this.g = this.curve.g), - (this.g = t.curve.g), - this.g.precompute(t.curve.n.bitLength() + 1), - (this.hash = t.hash || t.curve.hash); - } - (t.exports = c), - (c.prototype.keyPair = function (t) { - return new u(this, t); - }), - (c.prototype.keyFromPrivate = function (t, e) { - return u.fromPrivate(this, t, e); - }), - (c.prototype.keyFromPublic = function (t, e) { - return u.fromPublic(this, t, e); - }), - (c.prototype.genKeyPair = function (t) { - t || (t = {}); - for ( - var e = new n({ - hash: this.hash, - pers: t.pers, - persEnc: t.persEnc || 'utf8', - entropy: t.entropy || a(this.hash.hmacStrength), - entropyEnc: (t.entropy && t.entropyEnc) || 'utf8', - nonce: this.n.toArray(), - }), - r = this.n.byteLength(), - o = this.n.sub(new i(2)); - ; - - ) { - var s = new i(e.generate(r)); - if (!(s.cmp(o) > 0)) return s.iaddn(1), this.keyFromPrivate(s); - } - }), - (c.prototype._truncateToN = function (t, e) { - var r = 8 * t.byteLength() - this.n.bitLength(); - return r > 0 && (t = t.ushrn(r)), !e && t.cmp(this.n) >= 0 ? t.sub(this.n) : t; - }), - (c.prototype.sign = function (t, e, r, o) { - 'object' == typeof r && ((o = r), (r = null)), - o || (o = {}), - (e = this.keyFromPrivate(e, r)), - (t = this._truncateToN(new i(t, 16))); - for ( - var s = this.n.byteLength(), - a = e.getPrivate().toArray('be', s), - h = t.toArray('be', s), - u = new n({ hash: this.hash, entropy: a, nonce: h, pers: o.pers, persEnc: o.persEnc || 'utf8' }), - c = this.n.sub(new i(1)), - l = 0; - ; - l++ - ) { - var d = o.k ? o.k(l) : new i(u.generate(this.n.byteLength())); - if (!((d = this._truncateToN(d, !0)).cmpn(1) <= 0 || d.cmp(c) >= 0)) { - var p = this.g.mul(d); - if (!p.isInfinity()) { - var m = p.getX(), - g = m.umod(this.n); - if (0 !== g.cmpn(0)) { - var b = d.invm(this.n).mul(g.mul(e.getPrivate()).iadd(t)); - if (0 !== (b = b.umod(this.n)).cmpn(0)) { - var y = (p.getY().isOdd() ? 1 : 0) | (0 !== m.cmp(g) ? 2 : 0); - return o.canonical && b.cmp(this.nh) > 0 && ((b = this.n.sub(b)), (y ^= 1)), new f({ r: g, s: b, recoveryParam: y }); - } - } - } - } - } - }), - (c.prototype.verify = function (t, e, r, n) { - (t = this._truncateToN(new i(t, 16))), (r = this.keyFromPublic(r, n)); - var o = (e = new f(e, 'hex')).r, - s = e.s; - if (o.cmpn(1) < 0 || o.cmp(this.n) >= 0) return !1; - if (s.cmpn(1) < 0 || s.cmp(this.n) >= 0) return !1; - var a, - h = s.invm(this.n), - u = h.mul(t).umod(this.n), - c = h.mul(o).umod(this.n); - return this.curve._maxwellTrick - ? !(a = this.g.jmulAdd(u, r.getPublic(), c)).isInfinity() && a.eqXToP(o) - : !(a = this.g.mulAdd(u, r.getPublic(), c)).isInfinity() && 0 === a.getX().umod(this.n).cmp(o); - }), - (c.prototype.recoverPubKey = function (t, e, r, n) { - h((3 & r) === r, 'The recovery param is more than two bits'), (e = new f(e, n)); - var o = this.n, - s = new i(t), - a = e.r, - u = e.s, - c = 1 & r, - l = r >> 1; - if (a.cmp(this.curve.p.umod(this.curve.n)) >= 0 && l) throw new Error('Unable to find sencond key candinate'); - a = l ? this.curve.pointFromX(a.add(this.curve.n), c) : this.curve.pointFromX(a, c); - var d = e.r.invm(o), - p = o.sub(s).mul(d).umod(o), - m = u.mul(d).umod(o); - return this.g.mulAdd(p, a, m); - }), - (c.prototype.getKeyRecoveryParam = function (t, e, r, i) { - if (null !== (e = new f(e, i)).recoveryParam) return e.recoveryParam; - for (var n = 0; n < 4; n++) { - var o; - try { - o = this.recoverPubKey(t, e, n); - } catch (t) { - continue; - } - if (o.eq(r)) return n; - } - throw new Error('Unable to find valid recovery factor'); - }); - }, - 4093: (t, e, r) => { - 'use strict'; - var i = r(6083), - n = r(3369).assert; - function o(t, e) { - (this.ec = t), - (this.priv = null), - (this.pub = null), - e.priv && this._importPrivate(e.priv, e.privEnc), - e.pub && this._importPublic(e.pub, e.pubEnc); - } - (t.exports = o), - (o.fromPublic = function (t, e, r) { - return e instanceof o ? e : new o(t, { pub: e, pubEnc: r }); - }), - (o.fromPrivate = function (t, e, r) { - return e instanceof o ? e : new o(t, { priv: e, privEnc: r }); - }), - (o.prototype.validate = function () { - var t = this.getPublic(); - return t.isInfinity() - ? { result: !1, reason: 'Invalid public key' } - : t.validate() - ? t.mul(this.ec.curve.n).isInfinity() - ? { result: !0, reason: null } - : { result: !1, reason: 'Public key * N != O' } - : { result: !1, reason: 'Public key is not a point' }; - }), - (o.prototype.getPublic = function (t, e) { - return ( - 'string' == typeof t && ((e = t), (t = null)), - this.pub || (this.pub = this.ec.g.mul(this.priv)), - e ? this.pub.encode(e, t) : this.pub - ); - }), - (o.prototype.getPrivate = function (t) { - return 'hex' === t ? this.priv.toString(16, 2) : this.priv; - }), - (o.prototype._importPrivate = function (t, e) { - (this.priv = new i(t, e || 16)), (this.priv = this.priv.umod(this.ec.curve.n)); - }), - (o.prototype._importPublic = function (t, e) { - if (t.x || t.y) - return ( - 'mont' === this.ec.curve.type - ? n(t.x, 'Need x coordinate') - : ('short' !== this.ec.curve.type && 'edwards' !== this.ec.curve.type) || n(t.x && t.y, 'Need both x and y coordinate'), - void (this.pub = this.ec.curve.point(t.x, t.y)) - ); - this.pub = this.ec.curve.decodePoint(t, e); - }), - (o.prototype.derive = function (t) { - return t.validate() || n(t.validate(), 'public point not validated'), t.mul(this.priv).getX(); - }), - (o.prototype.sign = function (t, e, r) { - return this.ec.sign(t, this, e, r); - }), - (o.prototype.verify = function (t, e) { - return this.ec.verify(t, e, this); - }), - (o.prototype.inspect = function () { - return ''; - }); - }, - 9758: (t, e, r) => { - 'use strict'; - var i = r(6083), - n = r(3369), - o = n.assert; - function s(t, e) { - if (t instanceof s) return t; - this._importDER(t, e) || - (o(t.r && t.s, 'Signature without r or s'), - (this.r = new i(t.r, 16)), - (this.s = new i(t.s, 16)), - void 0 === t.recoveryParam ? (this.recoveryParam = null) : (this.recoveryParam = t.recoveryParam)); - } - function a() { - this.place = 0; - } - function h(t, e) { - var r = t[e.place++]; - if (!(128 & r)) return r; - var i = 15 & r; - if (0 === i || i > 4) return !1; - for (var n = 0, o = 0, s = e.place; o < i; o++, s++) (n <<= 8), (n |= t[s]), (n >>>= 0); - return !(n <= 127) && ((e.place = s), n); - } - function u(t) { - for (var e = 0, r = t.length - 1; !t[e] && !(128 & t[e + 1]) && e < r; ) e++; - return 0 === e ? t : t.slice(e); - } - function f(t, e) { - if (e < 128) t.push(e); - else { - var r = 1 + ((Math.log(e) / Math.LN2) >>> 3); - for (t.push(128 | r); --r; ) t.push((e >>> (r << 3)) & 255); - t.push(e); - } - } - (t.exports = s), - (s.prototype._importDER = function (t, e) { - t = n.toArray(t, e); - var r = new a(); - if (48 !== t[r.place++]) return !1; - var o = h(t, r); - if (!1 === o) return !1; - if (o + r.place !== t.length) return !1; - if (2 !== t[r.place++]) return !1; - var s = h(t, r); - if (!1 === s) return !1; - var u = t.slice(r.place, s + r.place); - if (((r.place += s), 2 !== t[r.place++])) return !1; - var f = h(t, r); - if (!1 === f) return !1; - if (t.length !== f + r.place) return !1; - var c = t.slice(r.place, f + r.place); - if (0 === u[0]) { - if (!(128 & u[1])) return !1; - u = u.slice(1); - } - if (0 === c[0]) { - if (!(128 & c[1])) return !1; - c = c.slice(1); - } - return (this.r = new i(u)), (this.s = new i(c)), (this.recoveryParam = null), !0; - }), - (s.prototype.toDER = function (t) { - var e = this.r.toArray(), - r = this.s.toArray(); - for (128 & e[0] && (e = [0].concat(e)), 128 & r[0] && (r = [0].concat(r)), e = u(e), r = u(r); !(r[0] || 128 & r[1]); ) - r = r.slice(1); - var i = [2]; - f(i, e.length), (i = i.concat(e)).push(2), f(i, r.length); - var o = i.concat(r), - s = [48]; - return f(s, o.length), (s = s.concat(o)), n.encode(s, t); - }); - }, - 1680: (t, e, r) => { - 'use strict'; - var i = r(5294), - n = r(1044), - o = r(3369), - s = o.assert, - a = o.parseBytes, - h = r(6699), - u = r(4396); - function f(t) { - if ((s('ed25519' === t, 'only tested with ed25519 so far'), !(this instanceof f))) return new f(t); - (t = n[t].curve), - (this.curve = t), - (this.g = t.g), - this.g.precompute(t.n.bitLength() + 1), - (this.pointClass = t.point().constructor), - (this.encodingLength = Math.ceil(t.n.bitLength() / 8)), - (this.hash = i.sha512); - } - (t.exports = f), - (f.prototype.sign = function (t, e) { - t = a(t); - var r = this.keyFromSecret(e), - i = this.hashInt(r.messagePrefix(), t), - n = this.g.mul(i), - o = this.encodePoint(n), - s = this.hashInt(o, r.pubBytes(), t).mul(r.priv()), - h = i.add(s).umod(this.curve.n); - return this.makeSignature({ R: n, S: h, Rencoded: o }); - }), - (f.prototype.verify = function (t, e, r) { - (t = a(t)), (e = this.makeSignature(e)); - var i = this.keyFromPublic(r), - n = this.hashInt(e.Rencoded(), i.pubBytes(), t), - o = this.g.mul(e.S()); - return e.R().add(i.pub().mul(n)).eq(o); - }), - (f.prototype.hashInt = function () { - for (var t = this.hash(), e = 0; e < arguments.length; e++) t.update(arguments[e]); - return o.intFromLE(t.digest()).umod(this.curve.n); - }), - (f.prototype.keyFromPublic = function (t) { - return h.fromPublic(this, t); - }), - (f.prototype.keyFromSecret = function (t) { - return h.fromSecret(this, t); - }), - (f.prototype.makeSignature = function (t) { - return t instanceof u ? t : new u(this, t); - }), - (f.prototype.encodePoint = function (t) { - var e = t.getY().toArray('le', this.encodingLength); - return (e[this.encodingLength - 1] |= t.getX().isOdd() ? 128 : 0), e; - }), - (f.prototype.decodePoint = function (t) { - var e = (t = o.parseBytes(t)).length - 1, - r = t.slice(0, e).concat(-129 & t[e]), - i = 0 != (128 & t[e]), - n = o.intFromLE(r); - return this.curve.pointFromY(n, i); - }), - (f.prototype.encodeInt = function (t) { - return t.toArray('le', this.encodingLength); - }), - (f.prototype.decodeInt = function (t) { - return o.intFromLE(t); - }), - (f.prototype.isPoint = function (t) { - return t instanceof this.pointClass; - }); - }, - 6699: (t, e, r) => { - 'use strict'; - var i = r(3369), - n = i.assert, - o = i.parseBytes, - s = i.cachedProperty; - function a(t, e) { - (this.eddsa = t), (this._secret = o(e.secret)), t.isPoint(e.pub) ? (this._pub = e.pub) : (this._pubBytes = o(e.pub)); - } - (a.fromPublic = function (t, e) { - return e instanceof a ? e : new a(t, { pub: e }); - }), - (a.fromSecret = function (t, e) { - return e instanceof a ? e : new a(t, { secret: e }); - }), - (a.prototype.secret = function () { - return this._secret; - }), - s(a, 'pubBytes', function () { - return this.eddsa.encodePoint(this.pub()); - }), - s(a, 'pub', function () { - return this._pubBytes ? this.eddsa.decodePoint(this._pubBytes) : this.eddsa.g.mul(this.priv()); - }), - s(a, 'privBytes', function () { - var t = this.eddsa, - e = this.hash(), - r = t.encodingLength - 1, - i = e.slice(0, t.encodingLength); - return (i[0] &= 248), (i[r] &= 127), (i[r] |= 64), i; - }), - s(a, 'priv', function () { - return this.eddsa.decodeInt(this.privBytes()); - }), - s(a, 'hash', function () { - return this.eddsa.hash().update(this.secret()).digest(); - }), - s(a, 'messagePrefix', function () { - return this.hash().slice(this.eddsa.encodingLength); - }), - (a.prototype.sign = function (t) { - return n(this._secret, 'KeyPair can only verify'), this.eddsa.sign(t, this); - }), - (a.prototype.verify = function (t, e) { - return this.eddsa.verify(t, e, this); - }), - (a.prototype.getSecret = function (t) { - return n(this._secret, 'KeyPair is public only'), i.encode(this.secret(), t); - }), - (a.prototype.getPublic = function (t) { - return i.encode(this.pubBytes(), t); - }), - (t.exports = a); - }, - 4396: (t, e, r) => { - 'use strict'; - var i = r(6083), - n = r(3369), - o = n.assert, - s = n.cachedProperty, - a = n.parseBytes; - function h(t, e) { - (this.eddsa = t), - 'object' != typeof e && (e = a(e)), - Array.isArray(e) && (e = { R: e.slice(0, t.encodingLength), S: e.slice(t.encodingLength) }), - o(e.R && e.S, 'Signature without R or S'), - t.isPoint(e.R) && (this._R = e.R), - e.S instanceof i && (this._S = e.S), - (this._Rencoded = Array.isArray(e.R) ? e.R : e.Rencoded), - (this._Sencoded = Array.isArray(e.S) ? e.S : e.Sencoded); - } - s(h, 'S', function () { - return this.eddsa.decodeInt(this.Sencoded()); - }), - s(h, 'R', function () { - return this.eddsa.decodePoint(this.Rencoded()); - }), - s(h, 'Rencoded', function () { - return this.eddsa.encodePoint(this.R()); - }), - s(h, 'Sencoded', function () { - return this.eddsa.encodeInt(this.S()); - }), - (h.prototype.toBytes = function () { - return this.Rencoded().concat(this.Sencoded()); - }), - (h.prototype.toHex = function () { - return n.encode(this.toBytes(), 'hex').toUpperCase(); - }), - (t.exports = h); - }, - 8719: t => { - t.exports = { - doubles: { - step: 4, - points: [ - [ - 'e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a', - 'f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821', - ], - [ - '8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508', - '11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf', - ], - [ - '175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739', - 'd3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695', - ], - [ - '363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640', - '4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9', - ], - [ - '8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c', - '4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36', - ], - [ - '723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda', - '96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f', - ], - [ - 'eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa', - '5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999', - ], - [ - '100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0', - 'cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09', - ], - [ - 'e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d', - '9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d', - ], - [ - 'feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d', - 'e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088', - ], - [ - 'da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1', - '9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d', - ], - [ - '53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0', - '5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8', - ], - [ - '8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047', - '10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a', - ], - [ - '385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862', - '283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453', - ], - [ - '6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7', - '7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160', - ], - [ - '3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd', - '56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0', - ], - [ - '85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83', - '7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6', - ], - [ - '948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a', - '53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589', - ], - [ - '6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8', - 'bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17', - ], - [ - 'e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d', - '4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda', - ], - [ - 'e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725', - '7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd', - ], - [ - '213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754', - '4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2', - ], - [ - '4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c', - '17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6', - ], - [ - 'fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6', - '6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f', - ], - [ - '76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39', - 'c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01', - ], - [ - 'c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891', - '893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3', - ], - [ - 'd895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b', - 'febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f', - ], - [ - 'b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03', - '2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7', - ], - [ - 'e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d', - 'eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78', - ], - [ - 'a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070', - '7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1', - ], - [ - '90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4', - 'e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150', - ], - [ - '8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da', - '662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82', - ], - [ - 'e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11', - '1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc', - ], - [ - '8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e', - 'efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b', - ], - [ - 'e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41', - '2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51', - ], - [ - 'b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef', - '67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45', - ], - [ - 'd68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8', - 'db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120', - ], - [ - '324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d', - '648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84', - ], - [ - '4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96', - '35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d', - ], - [ - '9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd', - 'ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d', - ], - [ - '6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5', - '9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8', - ], - [ - 'a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266', - '40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8', - ], - [ - '7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71', - '34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac', - ], - [ - '928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac', - 'c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f', - ], - [ - '85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751', - '1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962', - ], - [ - 'ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e', - '493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907', - ], - [ - '827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241', - 'c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec', - ], - [ - 'eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3', - 'be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d', - ], - [ - 'e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f', - '4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414', - ], - [ - '1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19', - 'aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd', - ], - [ - '146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be', - 'b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0', - ], - [ - 'fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9', - '6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811', - ], - [ - 'da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2', - '8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1', - ], - [ - 'a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13', - '7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c', - ], - [ - '174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c', - 'ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73', - ], - [ - '959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba', - '2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd', - ], - [ - 'd2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151', - 'e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405', - ], - [ - '64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073', - 'd99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589', - ], - [ - '8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458', - '38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e', - ], - [ - '13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b', - '69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27', - ], - [ - 'bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366', - 'd3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1', - ], - [ - '8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa', - '40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482', - ], - [ - '8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0', - '620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945', - ], - [ - 'dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787', - '7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573', - ], - [ - 'f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e', - 'ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82', - ], - ], - }, - naf: { - wnd: 7, - points: [ - [ - 'f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9', - '388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672', - ], - [ - '2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4', - 'd8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6', - ], - [ - '5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc', - '6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da', - ], - [ - 'acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe', - 'cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37', - ], - [ - '774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb', - 'd984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b', - ], - [ - 'f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8', - 'ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81', - ], - [ - 'd7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e', - '581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58', - ], - [ - 'defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34', - '4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77', - ], - [ - '2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c', - '85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a', - ], - [ - '352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5', - '321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c', - ], - [ - '2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f', - '2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67', - ], - [ - '9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714', - '73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402', - ], - [ - 'daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729', - 'a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55', - ], - [ - 'c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db', - '2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482', - ], - [ - '6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4', - 'e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82', - ], - [ - '1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5', - 'b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396', - ], - [ - '605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479', - '2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49', - ], - [ - '62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d', - '80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf', - ], - [ - '80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f', - '1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a', - ], - [ - '7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb', - 'd0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7', - ], - [ - 'd528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9', - 'eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933', - ], - [ - '49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963', - '758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a', - ], - [ - '77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74', - '958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6', - ], - [ - 'f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530', - 'e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37', - ], - [ - '463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b', - '5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e', - ], - [ - 'f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247', - 'cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6', - ], - [ - 'caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1', - 'cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476', - ], - [ - '2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120', - '4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40', - ], - [ - '7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435', - '91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61', - ], - [ - '754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18', - '673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683', - ], - [ - 'e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8', - '59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5', - ], - [ - '186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb', - '3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b', - ], - [ - 'df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f', - '55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417', - ], - [ - '5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143', - 'efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868', - ], - [ - '290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba', - 'e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a', - ], - [ - 'af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45', - 'f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6', - ], - [ - '766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a', - '744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996', - ], - [ - '59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e', - 'c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e', - ], - [ - 'f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8', - 'e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d', - ], - [ - '7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c', - '30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2', - ], - [ - '948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519', - 'e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e', - ], - [ - '7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab', - '100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437', - ], - [ - '3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca', - 'ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311', - ], - [ - 'd3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf', - '8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4', - ], - [ - '1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610', - '68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575', - ], - [ - '733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4', - 'f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d', - ], - [ - '15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c', - 'd56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d', - ], - [ - 'a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940', - 'edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629', - ], - [ - 'e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980', - 'a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06', - ], - [ - '311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3', - '66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374', - ], - [ - '34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf', - '9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee', - ], - [ - 'f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63', - '4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1', - ], - [ - 'd7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448', - 'fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b', - ], - [ - '32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf', - '5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661', - ], - [ - '7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5', - '8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6', - ], - [ - 'ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6', - '8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e', - ], - [ - '16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5', - '5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d', - ], - [ - 'eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99', - 'f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc', - ], - [ - '78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51', - 'f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4', - ], - [ - '494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5', - '42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c', - ], - [ - 'a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5', - '204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b', - ], - [ - 'c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997', - '4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913', - ], - [ - '841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881', - '73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154', - ], - [ - '5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5', - '39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865', - ], - [ - '36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66', - 'd2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc', - ], - [ - '336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726', - 'ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224', - ], - [ - '8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede', - '6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e', - ], - [ - '1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94', - '60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6', - ], - [ - '85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31', - '3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511', - ], - [ - '29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51', - 'b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b', - ], - [ - 'a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252', - 'ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2', - ], - [ - '4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5', - 'cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c', - ], - [ - 'd24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b', - '6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3', - ], - [ - 'ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4', - '322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d', - ], - [ - 'af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f', - '6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700', - ], - [ - 'e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889', - '2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4', - ], - [ - '591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246', - 'b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196', - ], - [ - '11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984', - '998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4', - ], - [ - '3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a', - 'b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257', - ], - [ - 'cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030', - 'bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13', - ], - [ - 'c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197', - '6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096', - ], - [ - 'c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593', - 'c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38', - ], - [ - 'a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef', - '21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f', - ], - [ - '347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38', - '60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448', - ], - [ - 'da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a', - '49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a', - ], - [ - 'c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111', - '5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4', - ], - [ - '4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502', - '7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437', - ], - [ - '3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea', - 'be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7', - ], - [ - 'cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26', - '8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d', - ], - [ - 'b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986', - '39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a', - ], - [ - 'd4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e', - '62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54', - ], - [ - '48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4', - '25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77', - ], - [ - 'dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda', - 'ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517', - ], - [ - '6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859', - 'cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10', - ], - [ - 'e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f', - 'f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125', - ], - [ - 'eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c', - '6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e', - ], - [ - '13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942', - 'fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1', - ], - [ - 'ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a', - '1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2', - ], - [ - 'b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80', - '5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423', - ], - [ - 'ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d', - '438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8', - ], - [ - '8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1', - 'cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758', - ], - [ - '52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63', - 'c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375', - ], - [ - 'e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352', - '6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d', - ], - [ - '7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193', - 'ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec', - ], - [ - '5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00', - '9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0', - ], - [ - '32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58', - 'ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c', - ], - [ - 'e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7', - 'd3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4', - ], - [ - '8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8', - 'c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f', - ], - [ - '4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e', - '67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649', - ], - [ - '3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d', - 'cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826', - ], - [ - '674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b', - '299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5', - ], - [ - 'd32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f', - 'f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87', - ], - [ - '30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6', - '462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b', - ], - [ - 'be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297', - '62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc', - ], - [ - '93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a', - '7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c', - ], - [ - 'b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c', - 'ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f', - ], - [ - 'd5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52', - '4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a', - ], - [ - 'd3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb', - 'bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46', - ], - [ - '463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065', - 'bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f', - ], - [ - '7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917', - '603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03', - ], - [ - '74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9', - 'cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08', - ], - [ - '30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3', - '553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8', - ], - [ - '9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57', - '712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373', - ], - [ - '176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66', - 'ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3', - ], - [ - '75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8', - '9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8', - ], - [ - '809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721', - '9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1', - ], - [ - '1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180', - '4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9', - ], - ], - }, - }; - }, - 3369: (t, e, r) => { - 'use strict'; - var i = e, - n = r(6083), - o = r(7859), - s = r(2910); - (i.assert = o), - (i.toArray = s.toArray), - (i.zero2 = s.zero2), - (i.toHex = s.toHex), - (i.encode = s.encode), - (i.getNAF = function (t, e, r) { - var i = new Array(Math.max(t.bitLength(), r) + 1); - i.fill(0); - for (var n = 1 << (e + 1), o = t.clone(), s = 0; s < i.length; s++) { - var a, - h = o.andln(n - 1); - o.isOdd() ? ((a = h > (n >> 1) - 1 ? (n >> 1) - h : h), o.isubn(a)) : (a = 0), (i[s] = a), o.iushrn(1); - } - return i; - }), - (i.getJSF = function (t, e) { - var r = [[], []]; - (t = t.clone()), (e = e.clone()); - for (var i, n = 0, o = 0; t.cmpn(-n) > 0 || e.cmpn(-o) > 0; ) { - var s, - a, - h = (t.andln(3) + n) & 3, - u = (e.andln(3) + o) & 3; - 3 === h && (h = -1), - 3 === u && (u = -1), - (s = 0 == (1 & h) ? 0 : (3 != (i = (t.andln(7) + n) & 7) && 5 !== i) || 2 !== u ? h : -h), - r[0].push(s), - (a = 0 == (1 & u) ? 0 : (3 != (i = (e.andln(7) + o) & 7) && 5 !== i) || 2 !== h ? u : -u), - r[1].push(a), - 2 * n === s + 1 && (n = 1 - n), - 2 * o === a + 1 && (o = 1 - o), - t.iushrn(1), - e.iushrn(1); - } - return r; - }), - (i.cachedProperty = function (t, e, r) { - var i = '_' + e; - t.prototype[e] = function () { - return void 0 !== this[i] ? this[i] : (this[i] = r.call(this)); - }; - }), - (i.parseBytes = function (t) { - return 'string' == typeof t ? i.toArray(t, 'hex') : t; - }), - (i.intFromLE = function (t) { - return new n(t, 'hex', 'le'); - }); - }, - 6083: function (t, e, r) { - !(function (t, e) { - 'use strict'; - function i(t, e) { - if (!t) throw new Error(e || 'Assertion failed'); - } - function n(t, e) { - t.super_ = e; - var r = function () {}; - (r.prototype = e.prototype), (t.prototype = new r()), (t.prototype.constructor = t); - } - function o(t, e, r) { - if (o.isBN(t)) return t; - (this.negative = 0), - (this.words = null), - (this.length = 0), - (this.red = null), - null !== t && (('le' !== e && 'be' !== e) || ((r = e), (e = 10)), this._init(t || 0, e || 10, r || 'be')); - } - var s; - 'object' == typeof t ? (t.exports = o) : (e.BN = o), (o.BN = o), (o.wordSize = 26); - try { - s = 'undefined' != typeof window && void 0 !== window.Buffer ? window.Buffer : r(303).Buffer; - } catch (t) {} - function a(t, e) { - var r = t.charCodeAt(e); - return r >= 65 && r <= 70 ? r - 55 : r >= 97 && r <= 102 ? r - 87 : (r - 48) & 15; - } - function h(t, e, r) { - var i = a(t, r); - return r - 1 >= e && (i |= a(t, r - 1) << 4), i; - } - function u(t, e, r, i) { - for (var n = 0, o = Math.min(t.length, r), s = e; s < o; s++) { - var a = t.charCodeAt(s) - 48; - (n *= i), (n += a >= 49 ? a - 49 + 10 : a >= 17 ? a - 17 + 10 : a); - } - return n; - } - (o.isBN = function (t) { - return ( - t instanceof o || (null !== t && 'object' == typeof t && t.constructor.wordSize === o.wordSize && Array.isArray(t.words)) - ); - }), - (o.max = function (t, e) { - return t.cmp(e) > 0 ? t : e; - }), - (o.min = function (t, e) { - return t.cmp(e) < 0 ? t : e; - }), - (o.prototype._init = function (t, e, r) { - if ('number' == typeof t) return this._initNumber(t, e, r); - if ('object' == typeof t) return this._initArray(t, e, r); - 'hex' === e && (e = 16), i(e === (0 | e) && e >= 2 && e <= 36); - var n = 0; - '-' === (t = t.toString().replace(/\s+/g, ''))[0] && (n++, (this.negative = 1)), - n < t.length && - (16 === e ? this._parseHex(t, n, r) : (this._parseBase(t, e, n), 'le' === r && this._initArray(this.toArray(), e, r))); - }), - (o.prototype._initNumber = function (t, e, r) { - t < 0 && ((this.negative = 1), (t = -t)), - t < 67108864 - ? ((this.words = [67108863 & t]), (this.length = 1)) - : t < 4503599627370496 - ? ((this.words = [67108863 & t, (t / 67108864) & 67108863]), (this.length = 2)) - : (i(t < 9007199254740992), (this.words = [67108863 & t, (t / 67108864) & 67108863, 1]), (this.length = 3)), - 'le' === r && this._initArray(this.toArray(), e, r); - }), - (o.prototype._initArray = function (t, e, r) { - if ((i('number' == typeof t.length), t.length <= 0)) return (this.words = [0]), (this.length = 1), this; - (this.length = Math.ceil(t.length / 3)), (this.words = new Array(this.length)); - for (var n = 0; n < this.length; n++) this.words[n] = 0; - var o, - s, - a = 0; - if ('be' === r) - for (n = t.length - 1, o = 0; n >= 0; n -= 3) - (s = t[n] | (t[n - 1] << 8) | (t[n - 2] << 16)), - (this.words[o] |= (s << a) & 67108863), - (this.words[o + 1] = (s >>> (26 - a)) & 67108863), - (a += 24) >= 26 && ((a -= 26), o++); - else if ('le' === r) - for (n = 0, o = 0; n < t.length; n += 3) - (s = t[n] | (t[n + 1] << 8) | (t[n + 2] << 16)), - (this.words[o] |= (s << a) & 67108863), - (this.words[o + 1] = (s >>> (26 - a)) & 67108863), - (a += 24) >= 26 && ((a -= 26), o++); - return this.strip(); - }), - (o.prototype._parseHex = function (t, e, r) { - (this.length = Math.ceil((t.length - e) / 6)), (this.words = new Array(this.length)); - for (var i = 0; i < this.length; i++) this.words[i] = 0; - var n, - o = 0, - s = 0; - if ('be' === r) - for (i = t.length - 1; i >= e; i -= 2) - (n = h(t, e, i) << o), - (this.words[s] |= 67108863 & n), - o >= 18 ? ((o -= 18), (s += 1), (this.words[s] |= n >>> 26)) : (o += 8); - else - for (i = (t.length - e) % 2 == 0 ? e + 1 : e; i < t.length; i += 2) - (n = h(t, e, i) << o), - (this.words[s] |= 67108863 & n), - o >= 18 ? ((o -= 18), (s += 1), (this.words[s] |= n >>> 26)) : (o += 8); - this.strip(); - }), - (o.prototype._parseBase = function (t, e, r) { - (this.words = [0]), (this.length = 1); - for (var i = 0, n = 1; n <= 67108863; n *= e) i++; - i--, (n = (n / e) | 0); - for (var o = t.length - r, s = o % i, a = Math.min(o, o - s) + r, h = 0, f = r; f < a; f += i) - (h = u(t, f, f + i, e)), this.imuln(n), this.words[0] + h < 67108864 ? (this.words[0] += h) : this._iaddn(h); - if (0 !== s) { - var c = 1; - for (h = u(t, f, t.length, e), f = 0; f < s; f++) c *= e; - this.imuln(c), this.words[0] + h < 67108864 ? (this.words[0] += h) : this._iaddn(h); - } - this.strip(); - }), - (o.prototype.copy = function (t) { - t.words = new Array(this.length); - for (var e = 0; e < this.length; e++) t.words[e] = this.words[e]; - (t.length = this.length), (t.negative = this.negative), (t.red = this.red); - }), - (o.prototype.clone = function () { - var t = new o(null); - return this.copy(t), t; - }), - (o.prototype._expand = function (t) { - for (; this.length < t; ) this.words[this.length++] = 0; - return this; - }), - (o.prototype.strip = function () { - for (; this.length > 1 && 0 === this.words[this.length - 1]; ) this.length--; - return this._normSign(); - }), - (o.prototype._normSign = function () { - return 1 === this.length && 0 === this.words[0] && (this.negative = 0), this; - }), - (o.prototype.inspect = function () { - return (this.red ? ''; - }); - var f = [ - '', - '0', - '00', - '000', - '0000', - '00000', - '000000', - '0000000', - '00000000', - '000000000', - '0000000000', - '00000000000', - '000000000000', - '0000000000000', - '00000000000000', - '000000000000000', - '0000000000000000', - '00000000000000000', - '000000000000000000', - '0000000000000000000', - '00000000000000000000', - '000000000000000000000', - '0000000000000000000000', - '00000000000000000000000', - '000000000000000000000000', - '0000000000000000000000000', - ], - c = [0, 0, 25, 16, 12, 11, 10, 9, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5], - l = [ - 0, 0, 33554432, 43046721, 16777216, 48828125, 60466176, 40353607, 16777216, 43046721, 1e7, 19487171, 35831808, 62748517, - 7529536, 11390625, 16777216, 24137569, 34012224, 47045881, 64e6, 4084101, 5153632, 6436343, 7962624, 9765625, 11881376, - 14348907, 17210368, 20511149, 243e5, 28629151, 33554432, 39135393, 45435424, 52521875, 60466176, - ]; - function d(t, e, r) { - r.negative = e.negative ^ t.negative; - var i = (t.length + e.length) | 0; - (r.length = i), (i = (i - 1) | 0); - var n = 0 | t.words[0], - o = 0 | e.words[0], - s = n * o, - a = 67108863 & s, - h = (s / 67108864) | 0; - r.words[0] = a; - for (var u = 1; u < i; u++) { - for (var f = h >>> 26, c = 67108863 & h, l = Math.min(u, e.length - 1), d = Math.max(0, u - t.length + 1); d <= l; d++) { - var p = (u - d) | 0; - (f += ((s = (n = 0 | t.words[p]) * (o = 0 | e.words[d]) + c) / 67108864) | 0), (c = 67108863 & s); - } - (r.words[u] = 0 | c), (h = 0 | f); - } - return 0 !== h ? (r.words[u] = 0 | h) : r.length--, r.strip(); - } - (o.prototype.toString = function (t, e) { - var r; - if (((e = 0 | e || 1), 16 === (t = t || 10) || 'hex' === t)) { - r = ''; - for (var n = 0, o = 0, s = 0; s < this.length; s++) { - var a = this.words[s], - h = (16777215 & ((a << n) | o)).toString(16); - (r = 0 != (o = (a >>> (24 - n)) & 16777215) || s !== this.length - 1 ? f[6 - h.length] + h + r : h + r), - (n += 2) >= 26 && ((n -= 26), s--); - } - for (0 !== o && (r = o.toString(16) + r); r.length % e != 0; ) r = '0' + r; - return 0 !== this.negative && (r = '-' + r), r; - } - if (t === (0 | t) && t >= 2 && t <= 36) { - var u = c[t], - d = l[t]; - r = ''; - var p = this.clone(); - for (p.negative = 0; !p.isZero(); ) { - var m = p.modn(d).toString(t); - r = (p = p.idivn(d)).isZero() ? m + r : f[u - m.length] + m + r; - } - for (this.isZero() && (r = '0' + r); r.length % e != 0; ) r = '0' + r; - return 0 !== this.negative && (r = '-' + r), r; - } - i(!1, 'Base should be between 2 and 36'); - }), - (o.prototype.toNumber = function () { - var t = this.words[0]; - return ( - 2 === this.length - ? (t += 67108864 * this.words[1]) - : 3 === this.length && 1 === this.words[2] - ? (t += 4503599627370496 + 67108864 * this.words[1]) - : this.length > 2 && i(!1, 'Number can only safely store up to 53 bits'), - 0 !== this.negative ? -t : t - ); - }), - (o.prototype.toJSON = function () { - return this.toString(16); - }), - (o.prototype.toBuffer = function (t, e) { - return i(void 0 !== s), this.toArrayLike(s, t, e); - }), - (o.prototype.toArray = function (t, e) { - return this.toArrayLike(Array, t, e); - }), - (o.prototype.toArrayLike = function (t, e, r) { - var n = this.byteLength(), - o = r || Math.max(1, n); - i(n <= o, 'byte array longer than desired length'), i(o > 0, 'Requested array length <= 0'), this.strip(); - var s, - a, - h = 'le' === e, - u = new t(o), - f = this.clone(); - if (h) { - for (a = 0; !f.isZero(); a++) (s = f.andln(255)), f.iushrn(8), (u[a] = s); - for (; a < o; a++) u[a] = 0; - } else { - for (a = 0; a < o - n; a++) u[a] = 0; - for (a = 0; !f.isZero(); a++) (s = f.andln(255)), f.iushrn(8), (u[o - a - 1] = s); - } - return u; - }), - Math.clz32 - ? (o.prototype._countBits = function (t) { - return 32 - Math.clz32(t); - }) - : (o.prototype._countBits = function (t) { - var e = t, - r = 0; - return ( - e >= 4096 && ((r += 13), (e >>>= 13)), - e >= 64 && ((r += 7), (e >>>= 7)), - e >= 8 && ((r += 4), (e >>>= 4)), - e >= 2 && ((r += 2), (e >>>= 2)), - r + e - ); - }), - (o.prototype._zeroBits = function (t) { - if (0 === t) return 26; - var e = t, - r = 0; - return ( - 0 == (8191 & e) && ((r += 13), (e >>>= 13)), - 0 == (127 & e) && ((r += 7), (e >>>= 7)), - 0 == (15 & e) && ((r += 4), (e >>>= 4)), - 0 == (3 & e) && ((r += 2), (e >>>= 2)), - 0 == (1 & e) && r++, - r - ); - }), - (o.prototype.bitLength = function () { - var t = this.words[this.length - 1], - e = this._countBits(t); - return 26 * (this.length - 1) + e; - }), - (o.prototype.zeroBits = function () { - if (this.isZero()) return 0; - for (var t = 0, e = 0; e < this.length; e++) { - var r = this._zeroBits(this.words[e]); - if (((t += r), 26 !== r)) break; - } - return t; - }), - (o.prototype.byteLength = function () { - return Math.ceil(this.bitLength() / 8); - }), - (o.prototype.toTwos = function (t) { - return 0 !== this.negative ? this.abs().inotn(t).iaddn(1) : this.clone(); - }), - (o.prototype.fromTwos = function (t) { - return this.testn(t - 1) ? this.notn(t).iaddn(1).ineg() : this.clone(); - }), - (o.prototype.isNeg = function () { - return 0 !== this.negative; - }), - (o.prototype.neg = function () { - return this.clone().ineg(); - }), - (o.prototype.ineg = function () { - return this.isZero() || (this.negative ^= 1), this; - }), - (o.prototype.iuor = function (t) { - for (; this.length < t.length; ) this.words[this.length++] = 0; - for (var e = 0; e < t.length; e++) this.words[e] = this.words[e] | t.words[e]; - return this.strip(); - }), - (o.prototype.ior = function (t) { - return i(0 == (this.negative | t.negative)), this.iuor(t); - }), - (o.prototype.or = function (t) { - return this.length > t.length ? this.clone().ior(t) : t.clone().ior(this); - }), - (o.prototype.uor = function (t) { - return this.length > t.length ? this.clone().iuor(t) : t.clone().iuor(this); - }), - (o.prototype.iuand = function (t) { - var e; - e = this.length > t.length ? t : this; - for (var r = 0; r < e.length; r++) this.words[r] = this.words[r] & t.words[r]; - return (this.length = e.length), this.strip(); - }), - (o.prototype.iand = function (t) { - return i(0 == (this.negative | t.negative)), this.iuand(t); - }), - (o.prototype.and = function (t) { - return this.length > t.length ? this.clone().iand(t) : t.clone().iand(this); - }), - (o.prototype.uand = function (t) { - return this.length > t.length ? this.clone().iuand(t) : t.clone().iuand(this); - }), - (o.prototype.iuxor = function (t) { - var e, r; - this.length > t.length ? ((e = this), (r = t)) : ((e = t), (r = this)); - for (var i = 0; i < r.length; i++) this.words[i] = e.words[i] ^ r.words[i]; - if (this !== e) for (; i < e.length; i++) this.words[i] = e.words[i]; - return (this.length = e.length), this.strip(); - }), - (o.prototype.ixor = function (t) { - return i(0 == (this.negative | t.negative)), this.iuxor(t); - }), - (o.prototype.xor = function (t) { - return this.length > t.length ? this.clone().ixor(t) : t.clone().ixor(this); - }), - (o.prototype.uxor = function (t) { - return this.length > t.length ? this.clone().iuxor(t) : t.clone().iuxor(this); - }), - (o.prototype.inotn = function (t) { - i('number' == typeof t && t >= 0); - var e = 0 | Math.ceil(t / 26), - r = t % 26; - this._expand(e), r > 0 && e--; - for (var n = 0; n < e; n++) this.words[n] = 67108863 & ~this.words[n]; - return r > 0 && (this.words[n] = ~this.words[n] & (67108863 >> (26 - r))), this.strip(); - }), - (o.prototype.notn = function (t) { - return this.clone().inotn(t); - }), - (o.prototype.setn = function (t, e) { - i('number' == typeof t && t >= 0); - var r = (t / 26) | 0, - n = t % 26; - return this._expand(r + 1), (this.words[r] = e ? this.words[r] | (1 << n) : this.words[r] & ~(1 << n)), this.strip(); - }), - (o.prototype.iadd = function (t) { - var e, r, i; - if (0 !== this.negative && 0 === t.negative) - return (this.negative = 0), (e = this.isub(t)), (this.negative ^= 1), this._normSign(); - if (0 === this.negative && 0 !== t.negative) return (t.negative = 0), (e = this.isub(t)), (t.negative = 1), e._normSign(); - this.length > t.length ? ((r = this), (i = t)) : ((r = t), (i = this)); - for (var n = 0, o = 0; o < i.length; o++) - (e = (0 | r.words[o]) + (0 | i.words[o]) + n), (this.words[o] = 67108863 & e), (n = e >>> 26); - for (; 0 !== n && o < r.length; o++) (e = (0 | r.words[o]) + n), (this.words[o] = 67108863 & e), (n = e >>> 26); - if (((this.length = r.length), 0 !== n)) (this.words[this.length] = n), this.length++; - else if (r !== this) for (; o < r.length; o++) this.words[o] = r.words[o]; - return this; - }), - (o.prototype.add = function (t) { - var e; - return 0 !== t.negative && 0 === this.negative - ? ((t.negative = 0), (e = this.sub(t)), (t.negative ^= 1), e) - : 0 === t.negative && 0 !== this.negative - ? ((this.negative = 0), (e = t.sub(this)), (this.negative = 1), e) - : this.length > t.length - ? this.clone().iadd(t) - : t.clone().iadd(this); - }), - (o.prototype.isub = function (t) { - if (0 !== t.negative) { - t.negative = 0; - var e = this.iadd(t); - return (t.negative = 1), e._normSign(); - } - if (0 !== this.negative) return (this.negative = 0), this.iadd(t), (this.negative = 1), this._normSign(); - var r, - i, - n = this.cmp(t); - if (0 === n) return (this.negative = 0), (this.length = 1), (this.words[0] = 0), this; - n > 0 ? ((r = this), (i = t)) : ((r = t), (i = this)); - for (var o = 0, s = 0; s < i.length; s++) - (o = (e = (0 | r.words[s]) - (0 | i.words[s]) + o) >> 26), (this.words[s] = 67108863 & e); - for (; 0 !== o && s < r.length; s++) (o = (e = (0 | r.words[s]) + o) >> 26), (this.words[s] = 67108863 & e); - if (0 === o && s < r.length && r !== this) for (; s < r.length; s++) this.words[s] = r.words[s]; - return (this.length = Math.max(this.length, s)), r !== this && (this.negative = 1), this.strip(); - }), - (o.prototype.sub = function (t) { - return this.clone().isub(t); - }); - var p = function (t, e, r) { - var i, - n, - o, - s = t.words, - a = e.words, - h = r.words, - u = 0, - f = 0 | s[0], - c = 8191 & f, - l = f >>> 13, - d = 0 | s[1], - p = 8191 & d, - m = d >>> 13, - g = 0 | s[2], - b = 8191 & g, - y = g >>> 13, - v = 0 | s[3], - w = 8191 & v, - _ = v >>> 13, - M = 0 | s[4], - E = 8191 & M, - S = M >>> 13, - x = 0 | s[5], - A = 8191 & x, - k = x >>> 13, - R = 0 | s[6], - B = 8191 & R, - I = R >>> 13, - T = 0 | s[7], - P = 8191 & T, - O = T >>> 13, - L = 0 | s[8], - C = 8191 & L, - N = L >>> 13, - j = 0 | s[9], - U = 8191 & j, - D = j >>> 13, - z = 0 | a[0], - F = 8191 & z, - q = z >>> 13, - H = 0 | a[1], - $ = 8191 & H, - Z = H >>> 13, - G = 0 | a[2], - V = 8191 & G, - W = G >>> 13, - K = 0 | a[3], - Y = 8191 & K, - J = K >>> 13, - X = 0 | a[4], - Q = 8191 & X, - tt = X >>> 13, - et = 0 | a[5], - rt = 8191 & et, - it = et >>> 13, - nt = 0 | a[6], - ot = 8191 & nt, - st = nt >>> 13, - at = 0 | a[7], - ht = 8191 & at, - ut = at >>> 13, - ft = 0 | a[8], - ct = 8191 & ft, - lt = ft >>> 13, - dt = 0 | a[9], - pt = 8191 & dt, - mt = dt >>> 13; - (r.negative = t.negative ^ e.negative), (r.length = 19); - var gt = (((u + (i = Math.imul(c, F))) | 0) + ((8191 & (n = ((n = Math.imul(c, q)) + Math.imul(l, F)) | 0)) << 13)) | 0; - (u = ((((o = Math.imul(l, q)) + (n >>> 13)) | 0) + (gt >>> 26)) | 0), - (gt &= 67108863), - (i = Math.imul(p, F)), - (n = ((n = Math.imul(p, q)) + Math.imul(m, F)) | 0), - (o = Math.imul(m, q)); - var bt = - (((u + (i = (i + Math.imul(c, $)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, Z)) | 0) + Math.imul(l, $)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, Z)) | 0) + (n >>> 13)) | 0) + (bt >>> 26)) | 0), - (bt &= 67108863), - (i = Math.imul(b, F)), - (n = ((n = Math.imul(b, q)) + Math.imul(y, F)) | 0), - (o = Math.imul(y, q)), - (i = (i + Math.imul(p, $)) | 0), - (n = ((n = (n + Math.imul(p, Z)) | 0) + Math.imul(m, $)) | 0), - (o = (o + Math.imul(m, Z)) | 0); - var yt = - (((u + (i = (i + Math.imul(c, V)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, W)) | 0) + Math.imul(l, V)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, W)) | 0) + (n >>> 13)) | 0) + (yt >>> 26)) | 0), - (yt &= 67108863), - (i = Math.imul(w, F)), - (n = ((n = Math.imul(w, q)) + Math.imul(_, F)) | 0), - (o = Math.imul(_, q)), - (i = (i + Math.imul(b, $)) | 0), - (n = ((n = (n + Math.imul(b, Z)) | 0) + Math.imul(y, $)) | 0), - (o = (o + Math.imul(y, Z)) | 0), - (i = (i + Math.imul(p, V)) | 0), - (n = ((n = (n + Math.imul(p, W)) | 0) + Math.imul(m, V)) | 0), - (o = (o + Math.imul(m, W)) | 0); - var vt = - (((u + (i = (i + Math.imul(c, Y)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, J)) | 0) + Math.imul(l, Y)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, J)) | 0) + (n >>> 13)) | 0) + (vt >>> 26)) | 0), - (vt &= 67108863), - (i = Math.imul(E, F)), - (n = ((n = Math.imul(E, q)) + Math.imul(S, F)) | 0), - (o = Math.imul(S, q)), - (i = (i + Math.imul(w, $)) | 0), - (n = ((n = (n + Math.imul(w, Z)) | 0) + Math.imul(_, $)) | 0), - (o = (o + Math.imul(_, Z)) | 0), - (i = (i + Math.imul(b, V)) | 0), - (n = ((n = (n + Math.imul(b, W)) | 0) + Math.imul(y, V)) | 0), - (o = (o + Math.imul(y, W)) | 0), - (i = (i + Math.imul(p, Y)) | 0), - (n = ((n = (n + Math.imul(p, J)) | 0) + Math.imul(m, Y)) | 0), - (o = (o + Math.imul(m, J)) | 0); - var wt = - (((u + (i = (i + Math.imul(c, Q)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, tt)) | 0) + Math.imul(l, Q)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, tt)) | 0) + (n >>> 13)) | 0) + (wt >>> 26)) | 0), - (wt &= 67108863), - (i = Math.imul(A, F)), - (n = ((n = Math.imul(A, q)) + Math.imul(k, F)) | 0), - (o = Math.imul(k, q)), - (i = (i + Math.imul(E, $)) | 0), - (n = ((n = (n + Math.imul(E, Z)) | 0) + Math.imul(S, $)) | 0), - (o = (o + Math.imul(S, Z)) | 0), - (i = (i + Math.imul(w, V)) | 0), - (n = ((n = (n + Math.imul(w, W)) | 0) + Math.imul(_, V)) | 0), - (o = (o + Math.imul(_, W)) | 0), - (i = (i + Math.imul(b, Y)) | 0), - (n = ((n = (n + Math.imul(b, J)) | 0) + Math.imul(y, Y)) | 0), - (o = (o + Math.imul(y, J)) | 0), - (i = (i + Math.imul(p, Q)) | 0), - (n = ((n = (n + Math.imul(p, tt)) | 0) + Math.imul(m, Q)) | 0), - (o = (o + Math.imul(m, tt)) | 0); - var _t = - (((u + (i = (i + Math.imul(c, rt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, it)) | 0) + Math.imul(l, rt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, it)) | 0) + (n >>> 13)) | 0) + (_t >>> 26)) | 0), - (_t &= 67108863), - (i = Math.imul(B, F)), - (n = ((n = Math.imul(B, q)) + Math.imul(I, F)) | 0), - (o = Math.imul(I, q)), - (i = (i + Math.imul(A, $)) | 0), - (n = ((n = (n + Math.imul(A, Z)) | 0) + Math.imul(k, $)) | 0), - (o = (o + Math.imul(k, Z)) | 0), - (i = (i + Math.imul(E, V)) | 0), - (n = ((n = (n + Math.imul(E, W)) | 0) + Math.imul(S, V)) | 0), - (o = (o + Math.imul(S, W)) | 0), - (i = (i + Math.imul(w, Y)) | 0), - (n = ((n = (n + Math.imul(w, J)) | 0) + Math.imul(_, Y)) | 0), - (o = (o + Math.imul(_, J)) | 0), - (i = (i + Math.imul(b, Q)) | 0), - (n = ((n = (n + Math.imul(b, tt)) | 0) + Math.imul(y, Q)) | 0), - (o = (o + Math.imul(y, tt)) | 0), - (i = (i + Math.imul(p, rt)) | 0), - (n = ((n = (n + Math.imul(p, it)) | 0) + Math.imul(m, rt)) | 0), - (o = (o + Math.imul(m, it)) | 0); - var Mt = - (((u + (i = (i + Math.imul(c, ot)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, st)) | 0) + Math.imul(l, ot)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, st)) | 0) + (n >>> 13)) | 0) + (Mt >>> 26)) | 0), - (Mt &= 67108863), - (i = Math.imul(P, F)), - (n = ((n = Math.imul(P, q)) + Math.imul(O, F)) | 0), - (o = Math.imul(O, q)), - (i = (i + Math.imul(B, $)) | 0), - (n = ((n = (n + Math.imul(B, Z)) | 0) + Math.imul(I, $)) | 0), - (o = (o + Math.imul(I, Z)) | 0), - (i = (i + Math.imul(A, V)) | 0), - (n = ((n = (n + Math.imul(A, W)) | 0) + Math.imul(k, V)) | 0), - (o = (o + Math.imul(k, W)) | 0), - (i = (i + Math.imul(E, Y)) | 0), - (n = ((n = (n + Math.imul(E, J)) | 0) + Math.imul(S, Y)) | 0), - (o = (o + Math.imul(S, J)) | 0), - (i = (i + Math.imul(w, Q)) | 0), - (n = ((n = (n + Math.imul(w, tt)) | 0) + Math.imul(_, Q)) | 0), - (o = (o + Math.imul(_, tt)) | 0), - (i = (i + Math.imul(b, rt)) | 0), - (n = ((n = (n + Math.imul(b, it)) | 0) + Math.imul(y, rt)) | 0), - (o = (o + Math.imul(y, it)) | 0), - (i = (i + Math.imul(p, ot)) | 0), - (n = ((n = (n + Math.imul(p, st)) | 0) + Math.imul(m, ot)) | 0), - (o = (o + Math.imul(m, st)) | 0); - var Et = - (((u + (i = (i + Math.imul(c, ht)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, ut)) | 0) + Math.imul(l, ht)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, ut)) | 0) + (n >>> 13)) | 0) + (Et >>> 26)) | 0), - (Et &= 67108863), - (i = Math.imul(C, F)), - (n = ((n = Math.imul(C, q)) + Math.imul(N, F)) | 0), - (o = Math.imul(N, q)), - (i = (i + Math.imul(P, $)) | 0), - (n = ((n = (n + Math.imul(P, Z)) | 0) + Math.imul(O, $)) | 0), - (o = (o + Math.imul(O, Z)) | 0), - (i = (i + Math.imul(B, V)) | 0), - (n = ((n = (n + Math.imul(B, W)) | 0) + Math.imul(I, V)) | 0), - (o = (o + Math.imul(I, W)) | 0), - (i = (i + Math.imul(A, Y)) | 0), - (n = ((n = (n + Math.imul(A, J)) | 0) + Math.imul(k, Y)) | 0), - (o = (o + Math.imul(k, J)) | 0), - (i = (i + Math.imul(E, Q)) | 0), - (n = ((n = (n + Math.imul(E, tt)) | 0) + Math.imul(S, Q)) | 0), - (o = (o + Math.imul(S, tt)) | 0), - (i = (i + Math.imul(w, rt)) | 0), - (n = ((n = (n + Math.imul(w, it)) | 0) + Math.imul(_, rt)) | 0), - (o = (o + Math.imul(_, it)) | 0), - (i = (i + Math.imul(b, ot)) | 0), - (n = ((n = (n + Math.imul(b, st)) | 0) + Math.imul(y, ot)) | 0), - (o = (o + Math.imul(y, st)) | 0), - (i = (i + Math.imul(p, ht)) | 0), - (n = ((n = (n + Math.imul(p, ut)) | 0) + Math.imul(m, ht)) | 0), - (o = (o + Math.imul(m, ut)) | 0); - var St = - (((u + (i = (i + Math.imul(c, ct)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, lt)) | 0) + Math.imul(l, ct)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, lt)) | 0) + (n >>> 13)) | 0) + (St >>> 26)) | 0), - (St &= 67108863), - (i = Math.imul(U, F)), - (n = ((n = Math.imul(U, q)) + Math.imul(D, F)) | 0), - (o = Math.imul(D, q)), - (i = (i + Math.imul(C, $)) | 0), - (n = ((n = (n + Math.imul(C, Z)) | 0) + Math.imul(N, $)) | 0), - (o = (o + Math.imul(N, Z)) | 0), - (i = (i + Math.imul(P, V)) | 0), - (n = ((n = (n + Math.imul(P, W)) | 0) + Math.imul(O, V)) | 0), - (o = (o + Math.imul(O, W)) | 0), - (i = (i + Math.imul(B, Y)) | 0), - (n = ((n = (n + Math.imul(B, J)) | 0) + Math.imul(I, Y)) | 0), - (o = (o + Math.imul(I, J)) | 0), - (i = (i + Math.imul(A, Q)) | 0), - (n = ((n = (n + Math.imul(A, tt)) | 0) + Math.imul(k, Q)) | 0), - (o = (o + Math.imul(k, tt)) | 0), - (i = (i + Math.imul(E, rt)) | 0), - (n = ((n = (n + Math.imul(E, it)) | 0) + Math.imul(S, rt)) | 0), - (o = (o + Math.imul(S, it)) | 0), - (i = (i + Math.imul(w, ot)) | 0), - (n = ((n = (n + Math.imul(w, st)) | 0) + Math.imul(_, ot)) | 0), - (o = (o + Math.imul(_, st)) | 0), - (i = (i + Math.imul(b, ht)) | 0), - (n = ((n = (n + Math.imul(b, ut)) | 0) + Math.imul(y, ht)) | 0), - (o = (o + Math.imul(y, ut)) | 0), - (i = (i + Math.imul(p, ct)) | 0), - (n = ((n = (n + Math.imul(p, lt)) | 0) + Math.imul(m, ct)) | 0), - (o = (o + Math.imul(m, lt)) | 0); - var xt = - (((u + (i = (i + Math.imul(c, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, mt)) | 0) + Math.imul(l, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, mt)) | 0) + (n >>> 13)) | 0) + (xt >>> 26)) | 0), - (xt &= 67108863), - (i = Math.imul(U, $)), - (n = ((n = Math.imul(U, Z)) + Math.imul(D, $)) | 0), - (o = Math.imul(D, Z)), - (i = (i + Math.imul(C, V)) | 0), - (n = ((n = (n + Math.imul(C, W)) | 0) + Math.imul(N, V)) | 0), - (o = (o + Math.imul(N, W)) | 0), - (i = (i + Math.imul(P, Y)) | 0), - (n = ((n = (n + Math.imul(P, J)) | 0) + Math.imul(O, Y)) | 0), - (o = (o + Math.imul(O, J)) | 0), - (i = (i + Math.imul(B, Q)) | 0), - (n = ((n = (n + Math.imul(B, tt)) | 0) + Math.imul(I, Q)) | 0), - (o = (o + Math.imul(I, tt)) | 0), - (i = (i + Math.imul(A, rt)) | 0), - (n = ((n = (n + Math.imul(A, it)) | 0) + Math.imul(k, rt)) | 0), - (o = (o + Math.imul(k, it)) | 0), - (i = (i + Math.imul(E, ot)) | 0), - (n = ((n = (n + Math.imul(E, st)) | 0) + Math.imul(S, ot)) | 0), - (o = (o + Math.imul(S, st)) | 0), - (i = (i + Math.imul(w, ht)) | 0), - (n = ((n = (n + Math.imul(w, ut)) | 0) + Math.imul(_, ht)) | 0), - (o = (o + Math.imul(_, ut)) | 0), - (i = (i + Math.imul(b, ct)) | 0), - (n = ((n = (n + Math.imul(b, lt)) | 0) + Math.imul(y, ct)) | 0), - (o = (o + Math.imul(y, lt)) | 0); - var At = - (((u + (i = (i + Math.imul(p, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(p, mt)) | 0) + Math.imul(m, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(m, mt)) | 0) + (n >>> 13)) | 0) + (At >>> 26)) | 0), - (At &= 67108863), - (i = Math.imul(U, V)), - (n = ((n = Math.imul(U, W)) + Math.imul(D, V)) | 0), - (o = Math.imul(D, W)), - (i = (i + Math.imul(C, Y)) | 0), - (n = ((n = (n + Math.imul(C, J)) | 0) + Math.imul(N, Y)) | 0), - (o = (o + Math.imul(N, J)) | 0), - (i = (i + Math.imul(P, Q)) | 0), - (n = ((n = (n + Math.imul(P, tt)) | 0) + Math.imul(O, Q)) | 0), - (o = (o + Math.imul(O, tt)) | 0), - (i = (i + Math.imul(B, rt)) | 0), - (n = ((n = (n + Math.imul(B, it)) | 0) + Math.imul(I, rt)) | 0), - (o = (o + Math.imul(I, it)) | 0), - (i = (i + Math.imul(A, ot)) | 0), - (n = ((n = (n + Math.imul(A, st)) | 0) + Math.imul(k, ot)) | 0), - (o = (o + Math.imul(k, st)) | 0), - (i = (i + Math.imul(E, ht)) | 0), - (n = ((n = (n + Math.imul(E, ut)) | 0) + Math.imul(S, ht)) | 0), - (o = (o + Math.imul(S, ut)) | 0), - (i = (i + Math.imul(w, ct)) | 0), - (n = ((n = (n + Math.imul(w, lt)) | 0) + Math.imul(_, ct)) | 0), - (o = (o + Math.imul(_, lt)) | 0); - var kt = - (((u + (i = (i + Math.imul(b, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(b, mt)) | 0) + Math.imul(y, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(y, mt)) | 0) + (n >>> 13)) | 0) + (kt >>> 26)) | 0), - (kt &= 67108863), - (i = Math.imul(U, Y)), - (n = ((n = Math.imul(U, J)) + Math.imul(D, Y)) | 0), - (o = Math.imul(D, J)), - (i = (i + Math.imul(C, Q)) | 0), - (n = ((n = (n + Math.imul(C, tt)) | 0) + Math.imul(N, Q)) | 0), - (o = (o + Math.imul(N, tt)) | 0), - (i = (i + Math.imul(P, rt)) | 0), - (n = ((n = (n + Math.imul(P, it)) | 0) + Math.imul(O, rt)) | 0), - (o = (o + Math.imul(O, it)) | 0), - (i = (i + Math.imul(B, ot)) | 0), - (n = ((n = (n + Math.imul(B, st)) | 0) + Math.imul(I, ot)) | 0), - (o = (o + Math.imul(I, st)) | 0), - (i = (i + Math.imul(A, ht)) | 0), - (n = ((n = (n + Math.imul(A, ut)) | 0) + Math.imul(k, ht)) | 0), - (o = (o + Math.imul(k, ut)) | 0), - (i = (i + Math.imul(E, ct)) | 0), - (n = ((n = (n + Math.imul(E, lt)) | 0) + Math.imul(S, ct)) | 0), - (o = (o + Math.imul(S, lt)) | 0); - var Rt = - (((u + (i = (i + Math.imul(w, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(w, mt)) | 0) + Math.imul(_, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(_, mt)) | 0) + (n >>> 13)) | 0) + (Rt >>> 26)) | 0), - (Rt &= 67108863), - (i = Math.imul(U, Q)), - (n = ((n = Math.imul(U, tt)) + Math.imul(D, Q)) | 0), - (o = Math.imul(D, tt)), - (i = (i + Math.imul(C, rt)) | 0), - (n = ((n = (n + Math.imul(C, it)) | 0) + Math.imul(N, rt)) | 0), - (o = (o + Math.imul(N, it)) | 0), - (i = (i + Math.imul(P, ot)) | 0), - (n = ((n = (n + Math.imul(P, st)) | 0) + Math.imul(O, ot)) | 0), - (o = (o + Math.imul(O, st)) | 0), - (i = (i + Math.imul(B, ht)) | 0), - (n = ((n = (n + Math.imul(B, ut)) | 0) + Math.imul(I, ht)) | 0), - (o = (o + Math.imul(I, ut)) | 0), - (i = (i + Math.imul(A, ct)) | 0), - (n = ((n = (n + Math.imul(A, lt)) | 0) + Math.imul(k, ct)) | 0), - (o = (o + Math.imul(k, lt)) | 0); - var Bt = - (((u + (i = (i + Math.imul(E, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(E, mt)) | 0) + Math.imul(S, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(S, mt)) | 0) + (n >>> 13)) | 0) + (Bt >>> 26)) | 0), - (Bt &= 67108863), - (i = Math.imul(U, rt)), - (n = ((n = Math.imul(U, it)) + Math.imul(D, rt)) | 0), - (o = Math.imul(D, it)), - (i = (i + Math.imul(C, ot)) | 0), - (n = ((n = (n + Math.imul(C, st)) | 0) + Math.imul(N, ot)) | 0), - (o = (o + Math.imul(N, st)) | 0), - (i = (i + Math.imul(P, ht)) | 0), - (n = ((n = (n + Math.imul(P, ut)) | 0) + Math.imul(O, ht)) | 0), - (o = (o + Math.imul(O, ut)) | 0), - (i = (i + Math.imul(B, ct)) | 0), - (n = ((n = (n + Math.imul(B, lt)) | 0) + Math.imul(I, ct)) | 0), - (o = (o + Math.imul(I, lt)) | 0); - var It = - (((u + (i = (i + Math.imul(A, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(A, mt)) | 0) + Math.imul(k, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(k, mt)) | 0) + (n >>> 13)) | 0) + (It >>> 26)) | 0), - (It &= 67108863), - (i = Math.imul(U, ot)), - (n = ((n = Math.imul(U, st)) + Math.imul(D, ot)) | 0), - (o = Math.imul(D, st)), - (i = (i + Math.imul(C, ht)) | 0), - (n = ((n = (n + Math.imul(C, ut)) | 0) + Math.imul(N, ht)) | 0), - (o = (o + Math.imul(N, ut)) | 0), - (i = (i + Math.imul(P, ct)) | 0), - (n = ((n = (n + Math.imul(P, lt)) | 0) + Math.imul(O, ct)) | 0), - (o = (o + Math.imul(O, lt)) | 0); - var Tt = - (((u + (i = (i + Math.imul(B, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(B, mt)) | 0) + Math.imul(I, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(I, mt)) | 0) + (n >>> 13)) | 0) + (Tt >>> 26)) | 0), - (Tt &= 67108863), - (i = Math.imul(U, ht)), - (n = ((n = Math.imul(U, ut)) + Math.imul(D, ht)) | 0), - (o = Math.imul(D, ut)), - (i = (i + Math.imul(C, ct)) | 0), - (n = ((n = (n + Math.imul(C, lt)) | 0) + Math.imul(N, ct)) | 0), - (o = (o + Math.imul(N, lt)) | 0); - var Pt = - (((u + (i = (i + Math.imul(P, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(P, mt)) | 0) + Math.imul(O, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(O, mt)) | 0) + (n >>> 13)) | 0) + (Pt >>> 26)) | 0), - (Pt &= 67108863), - (i = Math.imul(U, ct)), - (n = ((n = Math.imul(U, lt)) + Math.imul(D, ct)) | 0), - (o = Math.imul(D, lt)); - var Ot = - (((u + (i = (i + Math.imul(C, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(C, mt)) | 0) + Math.imul(N, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(N, mt)) | 0) + (n >>> 13)) | 0) + (Ot >>> 26)) | 0), (Ot &= 67108863); - var Lt = (((u + (i = Math.imul(U, pt))) | 0) + ((8191 & (n = ((n = Math.imul(U, mt)) + Math.imul(D, pt)) | 0)) << 13)) | 0; - return ( - (u = ((((o = Math.imul(D, mt)) + (n >>> 13)) | 0) + (Lt >>> 26)) | 0), - (Lt &= 67108863), - (h[0] = gt), - (h[1] = bt), - (h[2] = yt), - (h[3] = vt), - (h[4] = wt), - (h[5] = _t), - (h[6] = Mt), - (h[7] = Et), - (h[8] = St), - (h[9] = xt), - (h[10] = At), - (h[11] = kt), - (h[12] = Rt), - (h[13] = Bt), - (h[14] = It), - (h[15] = Tt), - (h[16] = Pt), - (h[17] = Ot), - (h[18] = Lt), - 0 !== u && ((h[19] = u), r.length++), - r - ); - }; - function m(t, e, r) { - return new g().mulp(t, e, r); - } - function g(t, e) { - (this.x = t), (this.y = e); - } - Math.imul || (p = d), - (o.prototype.mulTo = function (t, e) { - var r, - i = this.length + t.length; - return ( - (r = - 10 === this.length && 10 === t.length - ? p(this, t, e) - : i < 63 - ? d(this, t, e) - : i < 1024 - ? (function (t, e, r) { - (r.negative = e.negative ^ t.negative), (r.length = t.length + e.length); - for (var i = 0, n = 0, o = 0; o < r.length - 1; o++) { - var s = n; - n = 0; - for (var a = 67108863 & i, h = Math.min(o, e.length - 1), u = Math.max(0, o - t.length + 1); u <= h; u++) { - var f = o - u, - c = (0 | t.words[f]) * (0 | e.words[u]), - l = 67108863 & c; - (a = 67108863 & (l = (l + a) | 0)), - (n += (s = ((s = (s + ((c / 67108864) | 0)) | 0) + (l >>> 26)) | 0) >>> 26), - (s &= 67108863); - } - (r.words[o] = a), (i = s), (s = n); - } - return 0 !== i ? (r.words[o] = i) : r.length--, r.strip(); - })(this, t, e) - : m(this, t, e)), - r - ); - }), - (g.prototype.makeRBT = function (t) { - for (var e = new Array(t), r = o.prototype._countBits(t) - 1, i = 0; i < t; i++) e[i] = this.revBin(i, r, t); - return e; - }), - (g.prototype.revBin = function (t, e, r) { - if (0 === t || t === r - 1) return t; - for (var i = 0, n = 0; n < e; n++) (i |= (1 & t) << (e - n - 1)), (t >>= 1); - return i; - }), - (g.prototype.permute = function (t, e, r, i, n, o) { - for (var s = 0; s < o; s++) (i[s] = e[t[s]]), (n[s] = r[t[s]]); - }), - (g.prototype.transform = function (t, e, r, i, n, o) { - this.permute(o, t, e, r, i, n); - for (var s = 1; s < n; s <<= 1) - for (var a = s << 1, h = Math.cos((2 * Math.PI) / a), u = Math.sin((2 * Math.PI) / a), f = 0; f < n; f += a) - for (var c = h, l = u, d = 0; d < s; d++) { - var p = r[f + d], - m = i[f + d], - g = r[f + d + s], - b = i[f + d + s], - y = c * g - l * b; - (b = c * b + l * g), - (g = y), - (r[f + d] = p + g), - (i[f + d] = m + b), - (r[f + d + s] = p - g), - (i[f + d + s] = m - b), - d !== a && ((y = h * c - u * l), (l = h * l + u * c), (c = y)); - } - }), - (g.prototype.guessLen13b = function (t, e) { - var r = 1 | Math.max(e, t), - i = 1 & r, - n = 0; - for (r = (r / 2) | 0; r; r >>>= 1) n++; - return 1 << (n + 1 + i); - }), - (g.prototype.conjugate = function (t, e, r) { - if (!(r <= 1)) - for (var i = 0; i < r / 2; i++) { - var n = t[i]; - (t[i] = t[r - i - 1]), (t[r - i - 1] = n), (n = e[i]), (e[i] = -e[r - i - 1]), (e[r - i - 1] = -n); - } - }), - (g.prototype.normalize13b = function (t, e) { - for (var r = 0, i = 0; i < e / 2; i++) { - var n = 8192 * Math.round(t[2 * i + 1] / e) + Math.round(t[2 * i] / e) + r; - (t[i] = 67108863 & n), (r = n < 67108864 ? 0 : (n / 67108864) | 0); - } - return t; - }), - (g.prototype.convert13b = function (t, e, r, n) { - for (var o = 0, s = 0; s < e; s++) - (o += 0 | t[s]), (r[2 * s] = 8191 & o), (o >>>= 13), (r[2 * s + 1] = 8191 & o), (o >>>= 13); - for (s = 2 * e; s < n; ++s) r[s] = 0; - i(0 === o), i(0 == (-8192 & o)); - }), - (g.prototype.stub = function (t) { - for (var e = new Array(t), r = 0; r < t; r++) e[r] = 0; - return e; - }), - (g.prototype.mulp = function (t, e, r) { - var i = 2 * this.guessLen13b(t.length, e.length), - n = this.makeRBT(i), - o = this.stub(i), - s = new Array(i), - a = new Array(i), - h = new Array(i), - u = new Array(i), - f = new Array(i), - c = new Array(i), - l = r.words; - (l.length = i), - this.convert13b(t.words, t.length, s, i), - this.convert13b(e.words, e.length, u, i), - this.transform(s, o, a, h, i, n), - this.transform(u, o, f, c, i, n); - for (var d = 0; d < i; d++) { - var p = a[d] * f[d] - h[d] * c[d]; - (h[d] = a[d] * c[d] + h[d] * f[d]), (a[d] = p); - } - return ( - this.conjugate(a, h, i), - this.transform(a, h, l, o, i, n), - this.conjugate(l, o, i), - this.normalize13b(l, i), - (r.negative = t.negative ^ e.negative), - (r.length = t.length + e.length), - r.strip() - ); - }), - (o.prototype.mul = function (t) { - var e = new o(null); - return (e.words = new Array(this.length + t.length)), this.mulTo(t, e); - }), - (o.prototype.mulf = function (t) { - var e = new o(null); - return (e.words = new Array(this.length + t.length)), m(this, t, e); - }), - (o.prototype.imul = function (t) { - return this.clone().mulTo(t, this); - }), - (o.prototype.imuln = function (t) { - i('number' == typeof t), i(t < 67108864); - for (var e = 0, r = 0; r < this.length; r++) { - var n = (0 | this.words[r]) * t, - o = (67108863 & n) + (67108863 & e); - (e >>= 26), (e += (n / 67108864) | 0), (e += o >>> 26), (this.words[r] = 67108863 & o); - } - return 0 !== e && ((this.words[r] = e), this.length++), this; - }), - (o.prototype.muln = function (t) { - return this.clone().imuln(t); - }), - (o.prototype.sqr = function () { - return this.mul(this); - }), - (o.prototype.isqr = function () { - return this.imul(this.clone()); - }), - (o.prototype.pow = function (t) { - var e = (function (t) { - for (var e = new Array(t.bitLength()), r = 0; r < e.length; r++) { - var i = (r / 26) | 0, - n = r % 26; - e[r] = (t.words[i] & (1 << n)) >>> n; - } - return e; - })(t); - if (0 === e.length) return new o(1); - for (var r = this, i = 0; i < e.length && 0 === e[i]; i++, r = r.sqr()); - if (++i < e.length) for (var n = r.sqr(); i < e.length; i++, n = n.sqr()) 0 !== e[i] && (r = r.mul(n)); - return r; - }), - (o.prototype.iushln = function (t) { - i('number' == typeof t && t >= 0); - var e, - r = t % 26, - n = (t - r) / 26, - o = (67108863 >>> (26 - r)) << (26 - r); - if (0 !== r) { - var s = 0; - for (e = 0; e < this.length; e++) { - var a = this.words[e] & o, - h = ((0 | this.words[e]) - a) << r; - (this.words[e] = h | s), (s = a >>> (26 - r)); - } - s && ((this.words[e] = s), this.length++); - } - if (0 !== n) { - for (e = this.length - 1; e >= 0; e--) this.words[e + n] = this.words[e]; - for (e = 0; e < n; e++) this.words[e] = 0; - this.length += n; - } - return this.strip(); - }), - (o.prototype.ishln = function (t) { - return i(0 === this.negative), this.iushln(t); - }), - (o.prototype.iushrn = function (t, e, r) { - var n; - i('number' == typeof t && t >= 0), (n = e ? (e - (e % 26)) / 26 : 0); - var o = t % 26, - s = Math.min((t - o) / 26, this.length), - a = 67108863 ^ ((67108863 >>> o) << o), - h = r; - if (((n -= s), (n = Math.max(0, n)), h)) { - for (var u = 0; u < s; u++) h.words[u] = this.words[u]; - h.length = s; - } - if (0 === s); - else if (this.length > s) for (this.length -= s, u = 0; u < this.length; u++) this.words[u] = this.words[u + s]; - else (this.words[0] = 0), (this.length = 1); - var f = 0; - for (u = this.length - 1; u >= 0 && (0 !== f || u >= n); u--) { - var c = 0 | this.words[u]; - (this.words[u] = (f << (26 - o)) | (c >>> o)), (f = c & a); - } - return h && 0 !== f && (h.words[h.length++] = f), 0 === this.length && ((this.words[0] = 0), (this.length = 1)), this.strip(); - }), - (o.prototype.ishrn = function (t, e, r) { - return i(0 === this.negative), this.iushrn(t, e, r); - }), - (o.prototype.shln = function (t) { - return this.clone().ishln(t); - }), - (o.prototype.ushln = function (t) { - return this.clone().iushln(t); - }), - (o.prototype.shrn = function (t) { - return this.clone().ishrn(t); - }), - (o.prototype.ushrn = function (t) { - return this.clone().iushrn(t); - }), - (o.prototype.testn = function (t) { - i('number' == typeof t && t >= 0); - var e = t % 26, - r = (t - e) / 26, - n = 1 << e; - return !(this.length <= r || !(this.words[r] & n)); - }), - (o.prototype.imaskn = function (t) { - i('number' == typeof t && t >= 0); - var e = t % 26, - r = (t - e) / 26; - if ((i(0 === this.negative, 'imaskn works only with positive numbers'), this.length <= r)) return this; - if ((0 !== e && r++, (this.length = Math.min(r, this.length)), 0 !== e)) { - var n = 67108863 ^ ((67108863 >>> e) << e); - this.words[this.length - 1] &= n; - } - return this.strip(); - }), - (o.prototype.maskn = function (t) { - return this.clone().imaskn(t); - }), - (o.prototype.iaddn = function (t) { - return ( - i('number' == typeof t), - i(t < 67108864), - t < 0 - ? this.isubn(-t) - : 0 !== this.negative - ? 1 === this.length && (0 | this.words[0]) < t - ? ((this.words[0] = t - (0 | this.words[0])), (this.negative = 0), this) - : ((this.negative = 0), this.isubn(t), (this.negative = 1), this) - : this._iaddn(t) - ); - }), - (o.prototype._iaddn = function (t) { - this.words[0] += t; - for (var e = 0; e < this.length && this.words[e] >= 67108864; e++) - (this.words[e] -= 67108864), e === this.length - 1 ? (this.words[e + 1] = 1) : this.words[e + 1]++; - return (this.length = Math.max(this.length, e + 1)), this; - }), - (o.prototype.isubn = function (t) { - if ((i('number' == typeof t), i(t < 67108864), t < 0)) return this.iaddn(-t); - if (0 !== this.negative) return (this.negative = 0), this.iaddn(t), (this.negative = 1), this; - if (((this.words[0] -= t), 1 === this.length && this.words[0] < 0)) (this.words[0] = -this.words[0]), (this.negative = 1); - else for (var e = 0; e < this.length && this.words[e] < 0; e++) (this.words[e] += 67108864), (this.words[e + 1] -= 1); - return this.strip(); - }), - (o.prototype.addn = function (t) { - return this.clone().iaddn(t); - }), - (o.prototype.subn = function (t) { - return this.clone().isubn(t); - }), - (o.prototype.iabs = function () { - return (this.negative = 0), this; - }), - (o.prototype.abs = function () { - return this.clone().iabs(); - }), - (o.prototype._ishlnsubmul = function (t, e, r) { - var n, - o, - s = t.length + r; - this._expand(s); - var a = 0; - for (n = 0; n < t.length; n++) { - o = (0 | this.words[n + r]) + a; - var h = (0 | t.words[n]) * e; - (a = ((o -= 67108863 & h) >> 26) - ((h / 67108864) | 0)), (this.words[n + r] = 67108863 & o); - } - for (; n < this.length - r; n++) (a = (o = (0 | this.words[n + r]) + a) >> 26), (this.words[n + r] = 67108863 & o); - if (0 === a) return this.strip(); - for (i(-1 === a), a = 0, n = 0; n < this.length; n++) - (a = (o = -(0 | this.words[n]) + a) >> 26), (this.words[n] = 67108863 & o); - return (this.negative = 1), this.strip(); - }), - (o.prototype._wordDiv = function (t, e) { - var r = (this.length, t.length), - i = this.clone(), - n = t, - s = 0 | n.words[n.length - 1]; - 0 != (r = 26 - this._countBits(s)) && ((n = n.ushln(r)), i.iushln(r), (s = 0 | n.words[n.length - 1])); - var a, - h = i.length - n.length; - if ('mod' !== e) { - ((a = new o(null)).length = h + 1), (a.words = new Array(a.length)); - for (var u = 0; u < a.length; u++) a.words[u] = 0; - } - var f = i.clone()._ishlnsubmul(n, 1, h); - 0 === f.negative && ((i = f), a && (a.words[h] = 1)); - for (var c = h - 1; c >= 0; c--) { - var l = 67108864 * (0 | i.words[n.length + c]) + (0 | i.words[n.length + c - 1]); - for (l = Math.min((l / s) | 0, 67108863), i._ishlnsubmul(n, l, c); 0 !== i.negative; ) - l--, (i.negative = 0), i._ishlnsubmul(n, 1, c), i.isZero() || (i.negative ^= 1); - a && (a.words[c] = l); - } - return a && a.strip(), i.strip(), 'div' !== e && 0 !== r && i.iushrn(r), { div: a || null, mod: i }; - }), - (o.prototype.divmod = function (t, e, r) { - return ( - i(!t.isZero()), - this.isZero() - ? { div: new o(0), mod: new o(0) } - : 0 !== this.negative && 0 === t.negative - ? ((a = this.neg().divmod(t, e)), - 'mod' !== e && (n = a.div.neg()), - 'div' !== e && ((s = a.mod.neg()), r && 0 !== s.negative && s.iadd(t)), - { div: n, mod: s }) - : 0 === this.negative && 0 !== t.negative - ? ((a = this.divmod(t.neg(), e)), 'mod' !== e && (n = a.div.neg()), { div: n, mod: a.mod }) - : 0 != (this.negative & t.negative) - ? ((a = this.neg().divmod(t.neg(), e)), - 'div' !== e && ((s = a.mod.neg()), r && 0 !== s.negative && s.isub(t)), - { div: a.div, mod: s }) - : t.length > this.length || this.cmp(t) < 0 - ? { div: new o(0), mod: this } - : 1 === t.length - ? 'div' === e - ? { div: this.divn(t.words[0]), mod: null } - : 'mod' === e - ? { div: null, mod: new o(this.modn(t.words[0])) } - : { div: this.divn(t.words[0]), mod: new o(this.modn(t.words[0])) } - : this._wordDiv(t, e) - ); - var n, s, a; - }), - (o.prototype.div = function (t) { - return this.divmod(t, 'div', !1).div; - }), - (o.prototype.mod = function (t) { - return this.divmod(t, 'mod', !1).mod; - }), - (o.prototype.umod = function (t) { - return this.divmod(t, 'mod', !0).mod; - }), - (o.prototype.divRound = function (t) { - var e = this.divmod(t); - if (e.mod.isZero()) return e.div; - var r = 0 !== e.div.negative ? e.mod.isub(t) : e.mod, - i = t.ushrn(1), - n = t.andln(1), - o = r.cmp(i); - return o < 0 || (1 === n && 0 === o) ? e.div : 0 !== e.div.negative ? e.div.isubn(1) : e.div.iaddn(1); - }), - (o.prototype.modn = function (t) { - i(t <= 67108863); - for (var e = (1 << 26) % t, r = 0, n = this.length - 1; n >= 0; n--) r = (e * r + (0 | this.words[n])) % t; - return r; - }), - (o.prototype.idivn = function (t) { - i(t <= 67108863); - for (var e = 0, r = this.length - 1; r >= 0; r--) { - var n = (0 | this.words[r]) + 67108864 * e; - (this.words[r] = (n / t) | 0), (e = n % t); - } - return this.strip(); - }), - (o.prototype.divn = function (t) { - return this.clone().idivn(t); - }), - (o.prototype.egcd = function (t) { - i(0 === t.negative), i(!t.isZero()); - var e = this, - r = t.clone(); - e = 0 !== e.negative ? e.umod(t) : e.clone(); - for (var n = new o(1), s = new o(0), a = new o(0), h = new o(1), u = 0; e.isEven() && r.isEven(); ) - e.iushrn(1), r.iushrn(1), ++u; - for (var f = r.clone(), c = e.clone(); !e.isZero(); ) { - for (var l = 0, d = 1; 0 == (e.words[0] & d) && l < 26; ++l, d <<= 1); - if (l > 0) for (e.iushrn(l); l-- > 0; ) (n.isOdd() || s.isOdd()) && (n.iadd(f), s.isub(c)), n.iushrn(1), s.iushrn(1); - for (var p = 0, m = 1; 0 == (r.words[0] & m) && p < 26; ++p, m <<= 1); - if (p > 0) for (r.iushrn(p); p-- > 0; ) (a.isOdd() || h.isOdd()) && (a.iadd(f), h.isub(c)), a.iushrn(1), h.iushrn(1); - e.cmp(r) >= 0 ? (e.isub(r), n.isub(a), s.isub(h)) : (r.isub(e), a.isub(n), h.isub(s)); - } - return { a, b: h, gcd: r.iushln(u) }; - }), - (o.prototype._invmp = function (t) { - i(0 === t.negative), i(!t.isZero()); - var e = this, - r = t.clone(); - e = 0 !== e.negative ? e.umod(t) : e.clone(); - for (var n, s = new o(1), a = new o(0), h = r.clone(); e.cmpn(1) > 0 && r.cmpn(1) > 0; ) { - for (var u = 0, f = 1; 0 == (e.words[0] & f) && u < 26; ++u, f <<= 1); - if (u > 0) for (e.iushrn(u); u-- > 0; ) s.isOdd() && s.iadd(h), s.iushrn(1); - for (var c = 0, l = 1; 0 == (r.words[0] & l) && c < 26; ++c, l <<= 1); - if (c > 0) for (r.iushrn(c); c-- > 0; ) a.isOdd() && a.iadd(h), a.iushrn(1); - e.cmp(r) >= 0 ? (e.isub(r), s.isub(a)) : (r.isub(e), a.isub(s)); - } - return (n = 0 === e.cmpn(1) ? s : a).cmpn(0) < 0 && n.iadd(t), n; - }), - (o.prototype.gcd = function (t) { - if (this.isZero()) return t.abs(); - if (t.isZero()) return this.abs(); - var e = this.clone(), - r = t.clone(); - (e.negative = 0), (r.negative = 0); - for (var i = 0; e.isEven() && r.isEven(); i++) e.iushrn(1), r.iushrn(1); - for (;;) { - for (; e.isEven(); ) e.iushrn(1); - for (; r.isEven(); ) r.iushrn(1); - var n = e.cmp(r); - if (n < 0) { - var o = e; - (e = r), (r = o); - } else if (0 === n || 0 === r.cmpn(1)) break; - e.isub(r); - } - return r.iushln(i); - }), - (o.prototype.invm = function (t) { - return this.egcd(t).a.umod(t); - }), - (o.prototype.isEven = function () { - return 0 == (1 & this.words[0]); - }), - (o.prototype.isOdd = function () { - return 1 == (1 & this.words[0]); - }), - (o.prototype.andln = function (t) { - return this.words[0] & t; - }), - (o.prototype.bincn = function (t) { - i('number' == typeof t); - var e = t % 26, - r = (t - e) / 26, - n = 1 << e; - if (this.length <= r) return this._expand(r + 1), (this.words[r] |= n), this; - for (var o = n, s = r; 0 !== o && s < this.length; s++) { - var a = 0 | this.words[s]; - (o = (a += o) >>> 26), (a &= 67108863), (this.words[s] = a); - } - return 0 !== o && ((this.words[s] = o), this.length++), this; - }), - (o.prototype.isZero = function () { - return 1 === this.length && 0 === this.words[0]; - }), - (o.prototype.cmpn = function (t) { - var e, - r = t < 0; - if (0 !== this.negative && !r) return -1; - if (0 === this.negative && r) return 1; - if ((this.strip(), this.length > 1)) e = 1; - else { - r && (t = -t), i(t <= 67108863, 'Number is too big'); - var n = 0 | this.words[0]; - e = n === t ? 0 : n < t ? -1 : 1; - } - return 0 !== this.negative ? 0 | -e : e; - }), - (o.prototype.cmp = function (t) { - if (0 !== this.negative && 0 === t.negative) return -1; - if (0 === this.negative && 0 !== t.negative) return 1; - var e = this.ucmp(t); - return 0 !== this.negative ? 0 | -e : e; - }), - (o.prototype.ucmp = function (t) { - if (this.length > t.length) return 1; - if (this.length < t.length) return -1; - for (var e = 0, r = this.length - 1; r >= 0; r--) { - var i = 0 | this.words[r], - n = 0 | t.words[r]; - if (i !== n) { - i < n ? (e = -1) : i > n && (e = 1); - break; - } - } - return e; - }), - (o.prototype.gtn = function (t) { - return 1 === this.cmpn(t); - }), - (o.prototype.gt = function (t) { - return 1 === this.cmp(t); - }), - (o.prototype.gten = function (t) { - return this.cmpn(t) >= 0; - }), - (o.prototype.gte = function (t) { - return this.cmp(t) >= 0; - }), - (o.prototype.ltn = function (t) { - return -1 === this.cmpn(t); - }), - (o.prototype.lt = function (t) { - return -1 === this.cmp(t); - }), - (o.prototype.lten = function (t) { - return this.cmpn(t) <= 0; - }), - (o.prototype.lte = function (t) { - return this.cmp(t) <= 0; - }), - (o.prototype.eqn = function (t) { - return 0 === this.cmpn(t); - }), - (o.prototype.eq = function (t) { - return 0 === this.cmp(t); - }), - (o.red = function (t) { - return new E(t); - }), - (o.prototype.toRed = function (t) { - return ( - i(!this.red, 'Already a number in reduction context'), - i(0 === this.negative, 'red works only with positives'), - t.convertTo(this)._forceRed(t) - ); - }), - (o.prototype.fromRed = function () { - return i(this.red, 'fromRed works only with numbers in reduction context'), this.red.convertFrom(this); - }), - (o.prototype._forceRed = function (t) { - return (this.red = t), this; - }), - (o.prototype.forceRed = function (t) { - return i(!this.red, 'Already a number in reduction context'), this._forceRed(t); - }), - (o.prototype.redAdd = function (t) { - return i(this.red, 'redAdd works only with red numbers'), this.red.add(this, t); - }), - (o.prototype.redIAdd = function (t) { - return i(this.red, 'redIAdd works only with red numbers'), this.red.iadd(this, t); - }), - (o.prototype.redSub = function (t) { - return i(this.red, 'redSub works only with red numbers'), this.red.sub(this, t); - }), - (o.prototype.redISub = function (t) { - return i(this.red, 'redISub works only with red numbers'), this.red.isub(this, t); - }), - (o.prototype.redShl = function (t) { - return i(this.red, 'redShl works only with red numbers'), this.red.shl(this, t); - }), - (o.prototype.redMul = function (t) { - return i(this.red, 'redMul works only with red numbers'), this.red._verify2(this, t), this.red.mul(this, t); - }), - (o.prototype.redIMul = function (t) { - return i(this.red, 'redMul works only with red numbers'), this.red._verify2(this, t), this.red.imul(this, t); - }), - (o.prototype.redSqr = function () { - return i(this.red, 'redSqr works only with red numbers'), this.red._verify1(this), this.red.sqr(this); - }), - (o.prototype.redISqr = function () { - return i(this.red, 'redISqr works only with red numbers'), this.red._verify1(this), this.red.isqr(this); - }), - (o.prototype.redSqrt = function () { - return i(this.red, 'redSqrt works only with red numbers'), this.red._verify1(this), this.red.sqrt(this); - }), - (o.prototype.redInvm = function () { - return i(this.red, 'redInvm works only with red numbers'), this.red._verify1(this), this.red.invm(this); - }), - (o.prototype.redNeg = function () { - return i(this.red, 'redNeg works only with red numbers'), this.red._verify1(this), this.red.neg(this); - }), - (o.prototype.redPow = function (t) { - return i(this.red && !t.red, 'redPow(normalNum)'), this.red._verify1(this), this.red.pow(this, t); - }); - var b = { k256: null, p224: null, p192: null, p25519: null }; - function y(t, e) { - (this.name = t), - (this.p = new o(e, 16)), - (this.n = this.p.bitLength()), - (this.k = new o(1).iushln(this.n).isub(this.p)), - (this.tmp = this._tmp()); - } - function v() { - y.call(this, 'k256', 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f'); - } - function w() { - y.call(this, 'p224', 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001'); - } - function _() { - y.call(this, 'p192', 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff'); - } - function M() { - y.call(this, '25519', '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed'); - } - function E(t) { - if ('string' == typeof t) { - var e = o._prime(t); - (this.m = e.p), (this.prime = e); - } else i(t.gtn(1), 'modulus must be greater than 1'), (this.m = t), (this.prime = null); - } - function S(t) { - E.call(this, t), - (this.shift = this.m.bitLength()), - this.shift % 26 != 0 && (this.shift += 26 - (this.shift % 26)), - (this.r = new o(1).iushln(this.shift)), - (this.r2 = this.imod(this.r.sqr())), - (this.rinv = this.r._invmp(this.m)), - (this.minv = this.rinv.mul(this.r).isubn(1).div(this.m)), - (this.minv = this.minv.umod(this.r)), - (this.minv = this.r.sub(this.minv)); - } - (y.prototype._tmp = function () { - var t = new o(null); - return (t.words = new Array(Math.ceil(this.n / 13))), t; - }), - (y.prototype.ireduce = function (t) { - var e, - r = t; - do { - this.split(r, this.tmp), (e = (r = (r = this.imulK(r)).iadd(this.tmp)).bitLength()); - } while (e > this.n); - var i = e < this.n ? -1 : r.ucmp(this.p); - return 0 === i ? ((r.words[0] = 0), (r.length = 1)) : i > 0 ? r.isub(this.p) : void 0 !== r.strip ? r.strip() : r._strip(), r; - }), - (y.prototype.split = function (t, e) { - t.iushrn(this.n, 0, e); - }), - (y.prototype.imulK = function (t) { - return t.imul(this.k); - }), - n(v, y), - (v.prototype.split = function (t, e) { - for (var r = 4194303, i = Math.min(t.length, 9), n = 0; n < i; n++) e.words[n] = t.words[n]; - if (((e.length = i), t.length <= 9)) return (t.words[0] = 0), void (t.length = 1); - var o = t.words[9]; - for (e.words[e.length++] = o & r, n = 10; n < t.length; n++) { - var s = 0 | t.words[n]; - (t.words[n - 10] = ((s & r) << 4) | (o >>> 22)), (o = s); - } - (o >>>= 22), (t.words[n - 10] = o), 0 === o && t.length > 10 ? (t.length -= 10) : (t.length -= 9); - }), - (v.prototype.imulK = function (t) { - (t.words[t.length] = 0), (t.words[t.length + 1] = 0), (t.length += 2); - for (var e = 0, r = 0; r < t.length; r++) { - var i = 0 | t.words[r]; - (e += 977 * i), (t.words[r] = 67108863 & e), (e = 64 * i + ((e / 67108864) | 0)); - } - return 0 === t.words[t.length - 1] && (t.length--, 0 === t.words[t.length - 1] && t.length--), t; - }), - n(w, y), - n(_, y), - n(M, y), - (M.prototype.imulK = function (t) { - for (var e = 0, r = 0; r < t.length; r++) { - var i = 19 * (0 | t.words[r]) + e, - n = 67108863 & i; - (i >>>= 26), (t.words[r] = n), (e = i); - } - return 0 !== e && (t.words[t.length++] = e), t; - }), - (o._prime = function (t) { - if (b[t]) return b[t]; - var e; - if ('k256' === t) e = new v(); - else if ('p224' === t) e = new w(); - else if ('p192' === t) e = new _(); - else { - if ('p25519' !== t) throw new Error('Unknown prime ' + t); - e = new M(); - } - return (b[t] = e), e; - }), - (E.prototype._verify1 = function (t) { - i(0 === t.negative, 'red works only with positives'), i(t.red, 'red works only with red numbers'); - }), - (E.prototype._verify2 = function (t, e) { - i(0 == (t.negative | e.negative), 'red works only with positives'), - i(t.red && t.red === e.red, 'red works only with red numbers'); - }), - (E.prototype.imod = function (t) { - return this.prime ? this.prime.ireduce(t)._forceRed(this) : t.umod(this.m)._forceRed(this); - }), - (E.prototype.neg = function (t) { - return t.isZero() ? t.clone() : this.m.sub(t)._forceRed(this); - }), - (E.prototype.add = function (t, e) { - this._verify2(t, e); - var r = t.add(e); - return r.cmp(this.m) >= 0 && r.isub(this.m), r._forceRed(this); - }), - (E.prototype.iadd = function (t, e) { - this._verify2(t, e); - var r = t.iadd(e); - return r.cmp(this.m) >= 0 && r.isub(this.m), r; - }), - (E.prototype.sub = function (t, e) { - this._verify2(t, e); - var r = t.sub(e); - return r.cmpn(0) < 0 && r.iadd(this.m), r._forceRed(this); - }), - (E.prototype.isub = function (t, e) { - this._verify2(t, e); - var r = t.isub(e); - return r.cmpn(0) < 0 && r.iadd(this.m), r; - }), - (E.prototype.shl = function (t, e) { - return this._verify1(t), this.imod(t.ushln(e)); - }), - (E.prototype.imul = function (t, e) { - return this._verify2(t, e), this.imod(t.imul(e)); - }), - (E.prototype.mul = function (t, e) { - return this._verify2(t, e), this.imod(t.mul(e)); - }), - (E.prototype.isqr = function (t) { - return this.imul(t, t.clone()); - }), - (E.prototype.sqr = function (t) { - return this.mul(t, t); - }), - (E.prototype.sqrt = function (t) { - if (t.isZero()) return t.clone(); - var e = this.m.andln(3); - if ((i(e % 2 == 1), 3 === e)) { - var r = this.m.add(new o(1)).iushrn(2); - return this.pow(t, r); - } - for (var n = this.m.subn(1), s = 0; !n.isZero() && 0 === n.andln(1); ) s++, n.iushrn(1); - i(!n.isZero()); - var a = new o(1).toRed(this), - h = a.redNeg(), - u = this.m.subn(1).iushrn(1), - f = this.m.bitLength(); - for (f = new o(2 * f * f).toRed(this); 0 !== this.pow(f, u).cmp(h); ) f.redIAdd(h); - for (var c = this.pow(f, n), l = this.pow(t, n.addn(1).iushrn(1)), d = this.pow(t, n), p = s; 0 !== d.cmp(a); ) { - for (var m = d, g = 0; 0 !== m.cmp(a); g++) m = m.redSqr(); - i(g < p); - var b = this.pow(c, new o(1).iushln(p - g - 1)); - (l = l.redMul(b)), (c = b.redSqr()), (d = d.redMul(c)), (p = g); - } - return l; - }), - (E.prototype.invm = function (t) { - var e = t._invmp(this.m); - return 0 !== e.negative ? ((e.negative = 0), this.imod(e).redNeg()) : this.imod(e); - }), - (E.prototype.pow = function (t, e) { - if (e.isZero()) return new o(1).toRed(this); - if (0 === e.cmpn(1)) return t.clone(); - var r = new Array(16); - (r[0] = new o(1).toRed(this)), (r[1] = t); - for (var i = 2; i < r.length; i++) r[i] = this.mul(r[i - 1], t); - var n = r[0], - s = 0, - a = 0, - h = e.bitLength() % 26; - for (0 === h && (h = 26), i = e.length - 1; i >= 0; i--) { - for (var u = e.words[i], f = h - 1; f >= 0; f--) { - var c = (u >> f) & 1; - n !== r[0] && (n = this.sqr(n)), - 0 !== c || 0 !== s - ? ((s <<= 1), (s |= c), (4 == ++a || (0 === i && 0 === f)) && ((n = this.mul(n, r[s])), (a = 0), (s = 0))) - : (a = 0); - } - h = 26; - } - return n; - }), - (E.prototype.convertTo = function (t) { - var e = t.umod(this.m); - return e === t ? e.clone() : e; - }), - (E.prototype.convertFrom = function (t) { - var e = t.clone(); - return (e.red = null), e; - }), - (o.mont = function (t) { - return new S(t); - }), - n(S, E), - (S.prototype.convertTo = function (t) { - return this.imod(t.ushln(this.shift)); - }), - (S.prototype.convertFrom = function (t) { - var e = this.imod(t.mul(this.rinv)); - return (e.red = null), e; - }), - (S.prototype.imul = function (t, e) { - if (t.isZero() || e.isZero()) return (t.words[0] = 0), (t.length = 1), t; - var r = t.imul(e), - i = r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m), - n = r.isub(i).iushrn(this.shift), - o = n; - return n.cmp(this.m) >= 0 ? (o = n.isub(this.m)) : n.cmpn(0) < 0 && (o = n.iadd(this.m)), o._forceRed(this); - }), - (S.prototype.mul = function (t, e) { - if (t.isZero() || e.isZero()) return new o(0)._forceRed(this); - var r = t.mul(e), - i = r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m), - n = r.isub(i).iushrn(this.shift), - s = n; - return n.cmp(this.m) >= 0 ? (s = n.isub(this.m)) : n.cmpn(0) < 0 && (s = n.iadd(this.m)), s._forceRed(this); - }), - (S.prototype.invm = function (t) { - return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this); - }); - })((t = r.nmd(t)), this); - }, - 343: t => { - 'use strict'; - var e, - r = 'object' == typeof Reflect ? Reflect : null, - i = - r && 'function' == typeof r.apply - ? r.apply - : function (t, e, r) { - return Function.prototype.apply.call(t, e, r); - }; - e = - r && 'function' == typeof r.ownKeys - ? r.ownKeys - : Object.getOwnPropertySymbols - ? function (t) { - return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t)); - } - : function (t) { - return Object.getOwnPropertyNames(t); - }; - var n = - Number.isNaN || - function (t) { - return t != t; - }; - function o() { - o.init.call(this); - } - (t.exports = o), - (t.exports.once = function (t, e) { - return new Promise(function (r, i) { - function n(r) { - t.removeListener(e, o), i(r); - } - function o() { - 'function' == typeof t.removeListener && t.removeListener('error', n), r([].slice.call(arguments)); - } - m(t, e, o, { once: !0 }), - 'error' !== e && - (function (t, e, r) { - 'function' == typeof t.on && m(t, 'error', e, { once: !0 }); - })(t, n); - }); - }), - (o.EventEmitter = o), - (o.prototype._events = void 0), - (o.prototype._eventsCount = 0), - (o.prototype._maxListeners = void 0); - var s = 10; - function a(t) { - if ('function' != typeof t) throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof t); - } - function h(t) { - return void 0 === t._maxListeners ? o.defaultMaxListeners : t._maxListeners; - } - function u(t, e, r, i) { - var n, o, s, u; - if ( - (a(r), - void 0 === (o = t._events) - ? ((o = t._events = Object.create(null)), (t._eventsCount = 0)) - : (void 0 !== o.newListener && (t.emit('newListener', e, r.listener ? r.listener : r), (o = t._events)), (s = o[e])), - void 0 === s) - ) - (s = o[e] = r), ++t._eventsCount; - else if ( - ('function' == typeof s ? (s = o[e] = i ? [r, s] : [s, r]) : i ? s.unshift(r) : s.push(r), - (n = h(t)) > 0 && s.length > n && !s.warned) - ) { - s.warned = !0; - var f = new Error( - 'Possible EventEmitter memory leak detected. ' + - s.length + - ' ' + - String(e) + - ' listeners added. Use emitter.setMaxListeners() to increase limit' - ); - (f.name = 'MaxListenersExceededWarning'), - (f.emitter = t), - (f.type = e), - (f.count = s.length), - (u = f), - console && console.warn && console.warn(u); - } - return t; - } - function f() { - if (!this.fired) - return ( - this.target.removeListener(this.type, this.wrapFn), - (this.fired = !0), - 0 === arguments.length ? this.listener.call(this.target) : this.listener.apply(this.target, arguments) - ); - } - function c(t, e, r) { - var i = { fired: !1, wrapFn: void 0, target: t, type: e, listener: r }, - n = f.bind(i); - return (n.listener = r), (i.wrapFn = n), n; - } - function l(t, e, r) { - var i = t._events; - if (void 0 === i) return []; - var n = i[e]; - return void 0 === n - ? [] - : 'function' == typeof n - ? r - ? [n.listener || n] - : [n] - : r - ? (function (t) { - for (var e = new Array(t.length), r = 0; r < e.length; ++r) e[r] = t[r].listener || t[r]; - return e; - })(n) - : p(n, n.length); - } - function d(t) { - var e = this._events; - if (void 0 !== e) { - var r = e[t]; - if ('function' == typeof r) return 1; - if (void 0 !== r) return r.length; - } - return 0; - } - function p(t, e) { - for (var r = new Array(e), i = 0; i < e; ++i) r[i] = t[i]; - return r; - } - function m(t, e, r, i) { - if ('function' == typeof t.on) i.once ? t.once(e, r) : t.on(e, r); - else { - if ('function' != typeof t.addEventListener) - throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof t); - t.addEventListener(e, function n(o) { - i.once && t.removeEventListener(e, n), r(o); - }); - } - } - Object.defineProperty(o, 'defaultMaxListeners', { - enumerable: !0, - get: function () { - return s; - }, - set: function (t) { - if ('number' != typeof t || t < 0 || n(t)) - throw new RangeError( - 'The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + t + '.' - ); - s = t; - }, - }), - (o.init = function () { - (void 0 !== this._events && this._events !== Object.getPrototypeOf(this)._events) || - ((this._events = Object.create(null)), (this._eventsCount = 0)), - (this._maxListeners = this._maxListeners || void 0); - }), - (o.prototype.setMaxListeners = function (t) { - if ('number' != typeof t || t < 0 || n(t)) - throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + t + '.'); - return (this._maxListeners = t), this; - }), - (o.prototype.getMaxListeners = function () { - return h(this); - }), - (o.prototype.emit = function (t) { - for (var e = [], r = 1; r < arguments.length; r++) e.push(arguments[r]); - var n = 'error' === t, - o = this._events; - if (void 0 !== o) n = n && void 0 === o.error; - else if (!n) return !1; - if (n) { - var s; - if ((e.length > 0 && (s = e[0]), s instanceof Error)) throw s; - var a = new Error('Unhandled error.' + (s ? ' (' + s.message + ')' : '')); - throw ((a.context = s), a); - } - var h = o[t]; - if (void 0 === h) return !1; - if ('function' == typeof h) i(h, this, e); - else { - var u = h.length, - f = p(h, u); - for (r = 0; r < u; ++r) i(f[r], this, e); - } - return !0; - }), - (o.prototype.addListener = function (t, e) { - return u(this, t, e, !1); - }), - (o.prototype.on = o.prototype.addListener), - (o.prototype.prependListener = function (t, e) { - return u(this, t, e, !0); - }), - (o.prototype.once = function (t, e) { - return a(e), this.on(t, c(this, t, e)), this; - }), - (o.prototype.prependOnceListener = function (t, e) { - return a(e), this.prependListener(t, c(this, t, e)), this; - }), - (o.prototype.removeListener = function (t, e) { - var r, i, n, o, s; - if ((a(e), void 0 === (i = this._events))) return this; - if (void 0 === (r = i[t])) return this; - if (r === e || r.listener === e) - 0 == --this._eventsCount - ? (this._events = Object.create(null)) - : (delete i[t], i.removeListener && this.emit('removeListener', t, r.listener || e)); - else if ('function' != typeof r) { - for (n = -1, o = r.length - 1; o >= 0; o--) - if (r[o] === e || r[o].listener === e) { - (s = r[o].listener), (n = o); - break; - } - if (n < 0) return this; - 0 === n - ? r.shift() - : (function (t, e) { - for (; e + 1 < t.length; e++) t[e] = t[e + 1]; - t.pop(); - })(r, n), - 1 === r.length && (i[t] = r[0]), - void 0 !== i.removeListener && this.emit('removeListener', t, s || e); - } - return this; - }), - (o.prototype.off = o.prototype.removeListener), - (o.prototype.removeAllListeners = function (t) { - var e, r, i; - if (void 0 === (r = this._events)) return this; - if (void 0 === r.removeListener) - return ( - 0 === arguments.length - ? ((this._events = Object.create(null)), (this._eventsCount = 0)) - : void 0 !== r[t] && (0 == --this._eventsCount ? (this._events = Object.create(null)) : delete r[t]), - this - ); - if (0 === arguments.length) { - var n, - o = Object.keys(r); - for (i = 0; i < o.length; ++i) 'removeListener' !== (n = o[i]) && this.removeAllListeners(n); - return this.removeAllListeners('removeListener'), (this._events = Object.create(null)), (this._eventsCount = 0), this; - } - if ('function' == typeof (e = r[t])) this.removeListener(t, e); - else if (void 0 !== e) for (i = e.length - 1; i >= 0; i--) this.removeListener(t, e[i]); - return this; - }), - (o.prototype.listeners = function (t) { - return l(this, t, !0); - }), - (o.prototype.rawListeners = function (t) { - return l(this, t, !1); - }), - (o.listenerCount = function (t, e) { - return 'function' == typeof t.listenerCount ? t.listenerCount(e) : d.call(t, e); - }), - (o.prototype.listenerCount = d), - (o.prototype.eventNames = function () { - return this._eventsCount > 0 ? e(this._events) : []; - }); - }, - 5883: (t, e, r) => { - var i = r(7172).Buffer, - n = r(9500); - t.exports = function (t, e, r, o) { - if ((i.isBuffer(t) || (t = i.from(t, 'binary')), e && (i.isBuffer(e) || (e = i.from(e, 'binary')), 8 !== e.length))) - throw new RangeError('salt should be Buffer with 8 byte length'); - for (var s = r / 8, a = i.alloc(s), h = i.alloc(o || 0), u = i.alloc(0); s > 0 || o > 0; ) { - var f = new n(); - f.update(u), f.update(t), e && f.update(e), (u = f.digest()); - var c = 0; - if (s > 0) { - var l = a.length - s; - (c = Math.min(s, u.length)), u.copy(a, l, 0, c), (s -= c); - } - if (c < u.length && o > 0) { - var d = h.length - o, - p = Math.min(o, u.length - c); - u.copy(h, d, c, c + p), (o -= p); - } - } - return u.fill(0), { key: a, iv: h }; - }; - }, - 6883: (t, e, r) => { - 'use strict'; - var i = r(7172).Buffer, - n = r(1457).Transform; - function o(t) { - n.call(this), - (this._block = i.allocUnsafe(t)), - (this._blockSize = t), - (this._blockOffset = 0), - (this._length = [0, 0, 0, 0]), - (this._finalized = !1); - } - r(87)(o, n), - (o.prototype._transform = function (t, e, r) { - var i = null; - try { - this.update(t, e); - } catch (t) { - i = t; - } - r(i); - }), - (o.prototype._flush = function (t) { - var e = null; - try { - this.push(this.digest()); - } catch (t) { - e = t; - } - t(e); - }), - (o.prototype.update = function (t, e) { - if ( - ((function (t, e) { - if (!i.isBuffer(t) && 'string' != typeof t) throw new TypeError('Data must be a string or a buffer'); - })(t), - this._finalized) - ) - throw new Error('Digest already called'); - i.isBuffer(t) || (t = i.from(t, e)); - for (var r = this._block, n = 0; this._blockOffset + t.length - n >= this._blockSize; ) { - for (var o = this._blockOffset; o < this._blockSize; ) r[o++] = t[n++]; - this._update(), (this._blockOffset = 0); - } - for (; n < t.length; ) r[this._blockOffset++] = t[n++]; - for (var s = 0, a = 8 * t.length; a > 0; ++s) - (this._length[s] += a), (a = (this._length[s] / 4294967296) | 0) > 0 && (this._length[s] -= 4294967296 * a); - return this; - }), - (o.prototype._update = function () { - throw new Error('_update is not implemented'); - }), - (o.prototype.digest = function (t) { - if (this._finalized) throw new Error('Digest already called'); - this._finalized = !0; - var e = this._digest(); - void 0 !== t && (e = e.toString(t)), this._block.fill(0), (this._blockOffset = 0); - for (var r = 0; r < 4; ++r) this._length[r] = 0; - return e; - }), - (o.prototype._digest = function () { - throw new Error('_digest is not implemented'); - }), - (t.exports = o); - }, - 4004: t => { - 'use strict'; - var e = {}; - function r(t, r, i) { - i || (i = Error); - var n = (function (t) { - var e, i; - function n(e, i, n) { - return ( - t.call( - this, - (function (t, e, i) { - return 'string' == typeof r ? r : r(t, e, i); - })(e, i, n) - ) || this - ); - } - return (i = t), ((e = n).prototype = Object.create(i.prototype)), (e.prototype.constructor = e), (e.__proto__ = i), n; - })(i); - (n.prototype.name = i.name), (n.prototype.code = t), (e[t] = n); - } - function i(t, e) { - if (Array.isArray(t)) { - var r = t.length; - return ( - (t = t.map(function (t) { - return String(t); - })), - r > 2 - ? 'one of '.concat(e, ' ').concat(t.slice(0, r - 1).join(', '), ', or ') + t[r - 1] - : 2 === r - ? 'one of '.concat(e, ' ').concat(t[0], ' or ').concat(t[1]) - : 'of '.concat(e, ' ').concat(t[0]) - ); - } - return 'of '.concat(e, ' ').concat(String(t)); - } - r( - 'ERR_INVALID_OPT_VALUE', - function (t, e) { - return 'The value "' + e + '" is invalid for option "' + t + '"'; - }, - TypeError - ), - r( - 'ERR_INVALID_ARG_TYPE', - function (t, e, r) { - var n, o, s, a, h; - if ( - ('string' == typeof e && ((o = 'not '), e.substr(0, 4) === o) - ? ((n = 'must not be'), (e = e.replace(/^not /, ''))) - : (n = 'must be'), - (function (t, e, r) { - return (void 0 === r || r > t.length) && (r = t.length), t.substring(r - 9, r) === e; - })(t, ' argument')) - ) - s = 'The '.concat(t, ' ').concat(n, ' ').concat(i(e, 'type')); - else { - var u = ('number' != typeof h && (h = 0), h + 1 > (a = t).length || -1 === a.indexOf('.', h) ? 'argument' : 'property'); - s = 'The "'.concat(t, '" ').concat(u, ' ').concat(n, ' ').concat(i(e, 'type')); - } - return s + '. Received type '.concat(typeof r); - }, - TypeError - ), - r('ERR_STREAM_PUSH_AFTER_EOF', 'stream.push() after EOF'), - r('ERR_METHOD_NOT_IMPLEMENTED', function (t) { - return 'The ' + t + ' method is not implemented'; - }), - r('ERR_STREAM_PREMATURE_CLOSE', 'Premature close'), - r('ERR_STREAM_DESTROYED', function (t) { - return 'Cannot call ' + t + ' after a stream was destroyed'; - }), - r('ERR_MULTIPLE_CALLBACK', 'Callback called multiple times'), - r('ERR_STREAM_CANNOT_PIPE', 'Cannot pipe, not readable'), - r('ERR_STREAM_WRITE_AFTER_END', 'write after end'), - r('ERR_STREAM_NULL_VALUES', 'May not write null values to stream', TypeError), - r( - 'ERR_UNKNOWN_ENCODING', - function (t) { - return 'Unknown encoding: ' + t; - }, - TypeError - ), - r('ERR_STREAM_UNSHIFT_AFTER_END_EVENT', 'stream.unshift() after end event'), - (t.exports.q = e); - }, - 1033: (t, e, r) => { - 'use strict'; - var i = - Object.keys || - function (t) { - var e = []; - for (var r in t) e.push(r); - return e; - }; - t.exports = u; - var n = r(767), - o = r(4608); - r(87)(u, n); - for (var s = i(o.prototype), a = 0; a < s.length; a++) { - var h = s[a]; - u.prototype[h] || (u.prototype[h] = o.prototype[h]); - } - function u(t) { - if (!(this instanceof u)) return new u(t); - n.call(this, t), - o.call(this, t), - (this.allowHalfOpen = !0), - t && - (!1 === t.readable && (this.readable = !1), - !1 === t.writable && (this.writable = !1), - !1 === t.allowHalfOpen && ((this.allowHalfOpen = !1), this.once('end', f))); - } - function f() { - this._writableState.ended || process.nextTick(c, this); - } - function c(t) { - t.end(); - } - Object.defineProperty(u.prototype, 'writableHighWaterMark', { - enumerable: !1, - get: function () { - return this._writableState.highWaterMark; - }, - }), - Object.defineProperty(u.prototype, 'writableBuffer', { - enumerable: !1, - get: function () { - return this._writableState && this._writableState.getBuffer(); - }, - }), - Object.defineProperty(u.prototype, 'writableLength', { - enumerable: !1, - get: function () { - return this._writableState.length; - }, - }), - Object.defineProperty(u.prototype, 'destroyed', { - enumerable: !1, - get: function () { - return ( - void 0 !== this._readableState && - void 0 !== this._writableState && - this._readableState.destroyed && - this._writableState.destroyed - ); - }, - set: function (t) { - void 0 !== this._readableState && - void 0 !== this._writableState && - ((this._readableState.destroyed = t), (this._writableState.destroyed = t)); - }, - }); - }, - 3546: (t, e, r) => { - 'use strict'; - t.exports = n; - var i = r(2637); - function n(t) { - if (!(this instanceof n)) return new n(t); - i.call(this, t); - } - r(87)(n, i), - (n.prototype._transform = function (t, e, r) { - r(null, t); - }); - }, - 767: (t, e, r) => { - 'use strict'; - var i; - (t.exports = S), (S.ReadableState = E), r(343).EventEmitter; - var n, - o = function (t, e) { - return t.listeners(e).length; - }, - s = r(4358), - a = r(816).Buffer, - h = r.g.Uint8Array || function () {}, - u = r(3967); - n = u && u.debuglog ? u.debuglog('stream') : function () {}; - var f, - c, - l, - d = r(8049), - p = r(9591), - m = r(7452).getHighWaterMark, - g = r(4004).q, - b = g.ERR_INVALID_ARG_TYPE, - y = g.ERR_STREAM_PUSH_AFTER_EOF, - v = g.ERR_METHOD_NOT_IMPLEMENTED, - w = g.ERR_STREAM_UNSHIFT_AFTER_END_EVENT; - r(87)(S, s); - var _ = p.errorOrDestroy, - M = ['error', 'close', 'destroy', 'pause', 'resume']; - function E(t, e, n) { - (i = i || r(1033)), - (t = t || {}), - 'boolean' != typeof n && (n = e instanceof i), - (this.objectMode = !!t.objectMode), - n && (this.objectMode = this.objectMode || !!t.readableObjectMode), - (this.highWaterMark = m(this, t, 'readableHighWaterMark', n)), - (this.buffer = new d()), - (this.length = 0), - (this.pipes = null), - (this.pipesCount = 0), - (this.flowing = null), - (this.ended = !1), - (this.endEmitted = !1), - (this.reading = !1), - (this.sync = !0), - (this.needReadable = !1), - (this.emittedReadable = !1), - (this.readableListening = !1), - (this.resumeScheduled = !1), - (this.paused = !0), - (this.emitClose = !1 !== t.emitClose), - (this.autoDestroy = !!t.autoDestroy), - (this.destroyed = !1), - (this.defaultEncoding = t.defaultEncoding || 'utf8'), - (this.awaitDrain = 0), - (this.readingMore = !1), - (this.decoder = null), - (this.encoding = null), - t.encoding && (f || (f = r(4361).s), (this.decoder = new f(t.encoding)), (this.encoding = t.encoding)); - } - function S(t) { - if (((i = i || r(1033)), !(this instanceof S))) return new S(t); - var e = this instanceof i; - (this._readableState = new E(t, this, e)), - (this.readable = !0), - t && ('function' == typeof t.read && (this._read = t.read), 'function' == typeof t.destroy && (this._destroy = t.destroy)), - s.call(this); - } - function x(t, e, r, i, o) { - n('readableAddChunk', e); - var s, - u = t._readableState; - if (null === e) - (u.reading = !1), - (function (t, e) { - if ((n('onEofChunk'), !e.ended)) { - if (e.decoder) { - var r = e.decoder.end(); - r && r.length && (e.buffer.push(r), (e.length += e.objectMode ? 1 : r.length)); - } - (e.ended = !0), e.sync ? B(t) : ((e.needReadable = !1), e.emittedReadable || ((e.emittedReadable = !0), I(t))); - } - })(t, u); - else if ( - (o || - (s = (function (t, e) { - var r, i; - return ( - (i = e), - a.isBuffer(i) || - i instanceof h || - 'string' == typeof e || - void 0 === e || - t.objectMode || - (r = new b('chunk', ['string', 'Buffer', 'Uint8Array'], e)), - r - ); - })(u, e)), - s) - ) - _(t, s); - else if (u.objectMode || (e && e.length > 0)) - if ( - ('string' == typeof e || - u.objectMode || - Object.getPrototypeOf(e) === a.prototype || - (e = (function (t) { - return a.from(t); - })(e)), - i) - ) - u.endEmitted ? _(t, new w()) : A(t, u, e, !0); - else if (u.ended) _(t, new y()); - else { - if (u.destroyed) return !1; - (u.reading = !1), - u.decoder && !r ? ((e = u.decoder.write(e)), u.objectMode || 0 !== e.length ? A(t, u, e, !1) : T(t, u)) : A(t, u, e, !1); - } - else i || ((u.reading = !1), T(t, u)); - return !u.ended && (u.length < u.highWaterMark || 0 === u.length); - } - function A(t, e, r, i) { - e.flowing && 0 === e.length && !e.sync - ? ((e.awaitDrain = 0), t.emit('data', r)) - : ((e.length += e.objectMode ? 1 : r.length), i ? e.buffer.unshift(r) : e.buffer.push(r), e.needReadable && B(t)), - T(t, e); - } - Object.defineProperty(S.prototype, 'destroyed', { - enumerable: !1, - get: function () { - return void 0 !== this._readableState && this._readableState.destroyed; - }, - set: function (t) { - this._readableState && (this._readableState.destroyed = t); - }, - }), - (S.prototype.destroy = p.destroy), - (S.prototype._undestroy = p.undestroy), - (S.prototype._destroy = function (t, e) { - e(t); - }), - (S.prototype.push = function (t, e) { - var r, - i = this._readableState; - return ( - i.objectMode - ? (r = !0) - : 'string' == typeof t && ((e = e || i.defaultEncoding) !== i.encoding && ((t = a.from(t, e)), (e = '')), (r = !0)), - x(this, t, e, !1, r) - ); - }), - (S.prototype.unshift = function (t) { - return x(this, t, null, !0, !1); - }), - (S.prototype.isPaused = function () { - return !1 === this._readableState.flowing; - }), - (S.prototype.setEncoding = function (t) { - f || (f = r(4361).s); - var e = new f(t); - (this._readableState.decoder = e), (this._readableState.encoding = this._readableState.decoder.encoding); - for (var i = this._readableState.buffer.head, n = ''; null !== i; ) (n += e.write(i.data)), (i = i.next); - return ( - this._readableState.buffer.clear(), - '' !== n && this._readableState.buffer.push(n), - (this._readableState.length = n.length), - this - ); - }); - var k = 1073741824; - function R(t, e) { - return t <= 0 || (0 === e.length && e.ended) - ? 0 - : e.objectMode - ? 1 - : t != t - ? e.flowing && e.length - ? e.buffer.head.data.length - : e.length - : (t > e.highWaterMark && - (e.highWaterMark = (function (t) { - return ( - t >= k ? (t = k) : (t--, (t |= t >>> 1), (t |= t >>> 2), (t |= t >>> 4), (t |= t >>> 8), (t |= t >>> 16), t++), t - ); - })(t)), - t <= e.length ? t : e.ended ? e.length : ((e.needReadable = !0), 0)); - } - function B(t) { - var e = t._readableState; - n('emitReadable', e.needReadable, e.emittedReadable), - (e.needReadable = !1), - e.emittedReadable || (n('emitReadable', e.flowing), (e.emittedReadable = !0), process.nextTick(I, t)); - } - function I(t) { - var e = t._readableState; - n('emitReadable_', e.destroyed, e.length, e.ended), - e.destroyed || (!e.length && !e.ended) || (t.emit('readable'), (e.emittedReadable = !1)), - (e.needReadable = !e.flowing && !e.ended && e.length <= e.highWaterMark), - N(t); - } - function T(t, e) { - e.readingMore || ((e.readingMore = !0), process.nextTick(P, t, e)); - } - function P(t, e) { - for (; !e.reading && !e.ended && (e.length < e.highWaterMark || (e.flowing && 0 === e.length)); ) { - var r = e.length; - if ((n('maybeReadMore read 0'), t.read(0), r === e.length)) break; - } - e.readingMore = !1; - } - function O(t) { - var e = t._readableState; - (e.readableListening = t.listenerCount('readable') > 0), - e.resumeScheduled && !e.paused ? (e.flowing = !0) : t.listenerCount('data') > 0 && t.resume(); - } - function L(t) { - n('readable nexttick read 0'), t.read(0); - } - function C(t, e) { - n('resume', e.reading), - e.reading || t.read(0), - (e.resumeScheduled = !1), - t.emit('resume'), - N(t), - e.flowing && !e.reading && t.read(0); - } - function N(t) { - var e = t._readableState; - for (n('flow', e.flowing); e.flowing && null !== t.read(); ); - } - function j(t, e) { - return 0 === e.length - ? null - : (e.objectMode - ? (r = e.buffer.shift()) - : !t || t >= e.length - ? ((r = e.decoder ? e.buffer.join('') : 1 === e.buffer.length ? e.buffer.first() : e.buffer.concat(e.length)), - e.buffer.clear()) - : (r = e.buffer.consume(t, e.decoder)), - r); - var r; - } - function U(t) { - var e = t._readableState; - n('endReadable', e.endEmitted), e.endEmitted || ((e.ended = !0), process.nextTick(D, e, t)); - } - function D(t, e) { - if ( - (n('endReadableNT', t.endEmitted, t.length), - !t.endEmitted && 0 === t.length && ((t.endEmitted = !0), (e.readable = !1), e.emit('end'), t.autoDestroy)) - ) { - var r = e._writableState; - (!r || (r.autoDestroy && r.finished)) && e.destroy(); - } - } - function z(t, e) { - for (var r = 0, i = t.length; r < i; r++) if (t[r] === e) return r; - return -1; - } - (S.prototype.read = function (t) { - n('read', t), (t = parseInt(t, 10)); - var e = this._readableState, - r = t; - if ( - (0 !== t && (e.emittedReadable = !1), - 0 === t && e.needReadable && ((0 !== e.highWaterMark ? e.length >= e.highWaterMark : e.length > 0) || e.ended)) - ) - return n('read: emitReadable', e.length, e.ended), 0 === e.length && e.ended ? U(this) : B(this), null; - if (0 === (t = R(t, e)) && e.ended) return 0 === e.length && U(this), null; - var i, - o = e.needReadable; - return ( - n('need readable', o), - (0 === e.length || e.length - t < e.highWaterMark) && n('length less than watermark', (o = !0)), - e.ended || e.reading - ? n('reading or ended', (o = !1)) - : o && - (n('do read'), - (e.reading = !0), - (e.sync = !0), - 0 === e.length && (e.needReadable = !0), - this._read(e.highWaterMark), - (e.sync = !1), - e.reading || (t = R(r, e))), - null === (i = t > 0 ? j(t, e) : null) - ? ((e.needReadable = e.length <= e.highWaterMark), (t = 0)) - : ((e.length -= t), (e.awaitDrain = 0)), - 0 === e.length && (e.ended || (e.needReadable = !0), r !== t && e.ended && U(this)), - null !== i && this.emit('data', i), - i - ); - }), - (S.prototype._read = function (t) { - _(this, new v('_read()')); - }), - (S.prototype.pipe = function (t, e) { - var r = this, - i = this._readableState; - switch (i.pipesCount) { - case 0: - i.pipes = t; - break; - case 1: - i.pipes = [i.pipes, t]; - break; - default: - i.pipes.push(t); - } - (i.pipesCount += 1), n('pipe count=%d opts=%j', i.pipesCount, e); - var s = (e && !1 === e.end) || t === process.stdout || t === process.stderr ? p : a; - function a() { - n('onend'), t.end(); - } - i.endEmitted ? process.nextTick(s) : r.once('end', s), - t.on('unpipe', function e(o, s) { - n('onunpipe'), - o === r && - s && - !1 === s.hasUnpiped && - ((s.hasUnpiped = !0), - n('cleanup'), - t.removeListener('close', l), - t.removeListener('finish', d), - t.removeListener('drain', h), - t.removeListener('error', c), - t.removeListener('unpipe', e), - r.removeListener('end', a), - r.removeListener('end', p), - r.removeListener('data', f), - (u = !0), - !i.awaitDrain || (t._writableState && !t._writableState.needDrain) || h()); - }); - var h = (function (t) { - return function () { - var e = t._readableState; - n('pipeOnDrain', e.awaitDrain), - e.awaitDrain && e.awaitDrain--, - 0 === e.awaitDrain && o(t, 'data') && ((e.flowing = !0), N(t)); - }; - })(r); - t.on('drain', h); - var u = !1; - function f(e) { - n('ondata'); - var o = t.write(e); - n('dest.write', o), - !1 === o && - (((1 === i.pipesCount && i.pipes === t) || (i.pipesCount > 1 && -1 !== z(i.pipes, t))) && - !u && - (n('false write response, pause', i.awaitDrain), i.awaitDrain++), - r.pause()); - } - function c(e) { - n('onerror', e), p(), t.removeListener('error', c), 0 === o(t, 'error') && _(t, e); - } - function l() { - t.removeListener('finish', d), p(); - } - function d() { - n('onfinish'), t.removeListener('close', l), p(); - } - function p() { - n('unpipe'), r.unpipe(t); - } - return ( - r.on('data', f), - (function (t, e, r) { - if ('function' == typeof t.prependListener) return t.prependListener(e, r); - t._events && t._events[e] - ? Array.isArray(t._events[e]) - ? t._events[e].unshift(r) - : (t._events[e] = [r, t._events[e]]) - : t.on(e, r); - })(t, 'error', c), - t.once('close', l), - t.once('finish', d), - t.emit('pipe', r), - i.flowing || (n('pipe resume'), r.resume()), - t - ); - }), - (S.prototype.unpipe = function (t) { - var e = this._readableState, - r = { hasUnpiped: !1 }; - if (0 === e.pipesCount) return this; - if (1 === e.pipesCount) - return ( - (t && t !== e.pipes) || - (t || (t = e.pipes), (e.pipes = null), (e.pipesCount = 0), (e.flowing = !1), t && t.emit('unpipe', this, r)), - this - ); - if (!t) { - var i = e.pipes, - n = e.pipesCount; - (e.pipes = null), (e.pipesCount = 0), (e.flowing = !1); - for (var o = 0; o < n; o++) i[o].emit('unpipe', this, { hasUnpiped: !1 }); - return this; - } - var s = z(e.pipes, t); - return ( - -1 === s || - (e.pipes.splice(s, 1), (e.pipesCount -= 1), 1 === e.pipesCount && (e.pipes = e.pipes[0]), t.emit('unpipe', this, r)), - this - ); - }), - (S.prototype.on = function (t, e) { - var r = s.prototype.on.call(this, t, e), - i = this._readableState; - return ( - 'data' === t - ? ((i.readableListening = this.listenerCount('readable') > 0), !1 !== i.flowing && this.resume()) - : 'readable' === t && - (i.endEmitted || - i.readableListening || - ((i.readableListening = i.needReadable = !0), - (i.flowing = !1), - (i.emittedReadable = !1), - n('on readable', i.length, i.reading), - i.length ? B(this) : i.reading || process.nextTick(L, this))), - r - ); - }), - (S.prototype.addListener = S.prototype.on), - (S.prototype.removeListener = function (t, e) { - var r = s.prototype.removeListener.call(this, t, e); - return 'readable' === t && process.nextTick(O, this), r; - }), - (S.prototype.removeAllListeners = function (t) { - var e = s.prototype.removeAllListeners.apply(this, arguments); - return ('readable' !== t && void 0 !== t) || process.nextTick(O, this), e; - }), - (S.prototype.resume = function () { - var t = this._readableState; - return ( - t.flowing || - (n('resume'), - (t.flowing = !t.readableListening), - (function (t, e) { - e.resumeScheduled || ((e.resumeScheduled = !0), process.nextTick(C, t, e)); - })(this, t)), - (t.paused = !1), - this - ); - }), - (S.prototype.pause = function () { - return ( - n('call pause flowing=%j', this._readableState.flowing), - !1 !== this._readableState.flowing && (n('pause'), (this._readableState.flowing = !1), this.emit('pause')), - (this._readableState.paused = !0), - this - ); - }), - (S.prototype.wrap = function (t) { - var e = this, - r = this._readableState, - i = !1; - for (var o in (t.on('end', function () { - if ((n('wrapped end'), r.decoder && !r.ended)) { - var t = r.decoder.end(); - t && t.length && e.push(t); - } - e.push(null); - }), - t.on('data', function (o) { - n('wrapped data'), - r.decoder && (o = r.decoder.write(o)), - (r.objectMode && null == o) || ((r.objectMode || (o && o.length)) && (e.push(o) || ((i = !0), t.pause()))); - }), - t)) - void 0 === this[o] && - 'function' == typeof t[o] && - (this[o] = (function (e) { - return function () { - return t[e].apply(t, arguments); - }; - })(o)); - for (var s = 0; s < M.length; s++) t.on(M[s], this.emit.bind(this, M[s])); - return ( - (this._read = function (e) { - n('wrapped _read', e), i && ((i = !1), t.resume()); - }), - this - ); - }), - 'function' == typeof Symbol && - (S.prototype[Symbol.asyncIterator] = function () { - return void 0 === c && (c = r(1519)), c(this); - }), - Object.defineProperty(S.prototype, 'readableHighWaterMark', { - enumerable: !1, - get: function () { - return this._readableState.highWaterMark; - }, - }), - Object.defineProperty(S.prototype, 'readableBuffer', { - enumerable: !1, - get: function () { - return this._readableState && this._readableState.buffer; - }, - }), - Object.defineProperty(S.prototype, 'readableFlowing', { - enumerable: !1, - get: function () { - return this._readableState.flowing; - }, - set: function (t) { - this._readableState && (this._readableState.flowing = t); - }, - }), - (S._fromList = j), - Object.defineProperty(S.prototype, 'readableLength', { - enumerable: !1, - get: function () { - return this._readableState.length; - }, - }), - 'function' == typeof Symbol && - (S.from = function (t, e) { - return void 0 === l && (l = r(8727)), l(S, t, e); - }); - }, - 2637: (t, e, r) => { - 'use strict'; - t.exports = f; - var i = r(4004).q, - n = i.ERR_METHOD_NOT_IMPLEMENTED, - o = i.ERR_MULTIPLE_CALLBACK, - s = i.ERR_TRANSFORM_ALREADY_TRANSFORMING, - a = i.ERR_TRANSFORM_WITH_LENGTH_0, - h = r(1033); - function u(t, e) { - var r = this._transformState; - r.transforming = !1; - var i = r.writecb; - if (null === i) return this.emit('error', new o()); - (r.writechunk = null), (r.writecb = null), null != e && this.push(e), i(t); - var n = this._readableState; - (n.reading = !1), (n.needReadable || n.length < n.highWaterMark) && this._read(n.highWaterMark); - } - function f(t) { - if (!(this instanceof f)) return new f(t); - h.call(this, t), - (this._transformState = { - afterTransform: u.bind(this), - needTransform: !1, - transforming: !1, - writecb: null, - writechunk: null, - writeencoding: null, - }), - (this._readableState.needReadable = !0), - (this._readableState.sync = !1), - t && - ('function' == typeof t.transform && (this._transform = t.transform), - 'function' == typeof t.flush && (this._flush = t.flush)), - this.on('prefinish', c); - } - function c() { - var t = this; - 'function' != typeof this._flush || this._readableState.destroyed - ? l(this, null, null) - : this._flush(function (e, r) { - l(t, e, r); - }); - } - function l(t, e, r) { - if (e) return t.emit('error', e); - if ((null != r && t.push(r), t._writableState.length)) throw new a(); - if (t._transformState.transforming) throw new s(); - return t.push(null); - } - r(87)(f, h), - (f.prototype.push = function (t, e) { - return (this._transformState.needTransform = !1), h.prototype.push.call(this, t, e); - }), - (f.prototype._transform = function (t, e, r) { - r(new n('_transform()')); - }), - (f.prototype._write = function (t, e, r) { - var i = this._transformState; - if (((i.writecb = r), (i.writechunk = t), (i.writeencoding = e), !i.transforming)) { - var n = this._readableState; - (i.needTransform || n.needReadable || n.length < n.highWaterMark) && this._read(n.highWaterMark); - } - }), - (f.prototype._read = function (t) { - var e = this._transformState; - null === e.writechunk || e.transforming - ? (e.needTransform = !0) - : ((e.transforming = !0), this._transform(e.writechunk, e.writeencoding, e.afterTransform)); - }), - (f.prototype._destroy = function (t, e) { - h.prototype._destroy.call(this, t, function (t) { - e(t); - }); - }); - }, - 4608: (t, e, r) => { - 'use strict'; - function i(t) { - var e = this; - (this.next = null), - (this.entry = null), - (this.finish = function () { - !(function (t, e, r) { - var i = t.entry; - for (t.entry = null; i; ) { - var n = i.callback; - e.pendingcb--, n(undefined), (i = i.next); - } - e.corkedRequestsFree.next = t; - })(e, t); - }); - } - var n; - (t.exports = S), (S.WritableState = E); - var o, - s = { deprecate: r(7451) }, - a = r(4358), - h = r(816).Buffer, - u = r.g.Uint8Array || function () {}, - f = r(9591), - c = r(7452).getHighWaterMark, - l = r(4004).q, - d = l.ERR_INVALID_ARG_TYPE, - p = l.ERR_METHOD_NOT_IMPLEMENTED, - m = l.ERR_MULTIPLE_CALLBACK, - g = l.ERR_STREAM_CANNOT_PIPE, - b = l.ERR_STREAM_DESTROYED, - y = l.ERR_STREAM_NULL_VALUES, - v = l.ERR_STREAM_WRITE_AFTER_END, - w = l.ERR_UNKNOWN_ENCODING, - _ = f.errorOrDestroy; - function M() {} - function E(t, e, o) { - (n = n || r(1033)), - (t = t || {}), - 'boolean' != typeof o && (o = e instanceof n), - (this.objectMode = !!t.objectMode), - o && (this.objectMode = this.objectMode || !!t.writableObjectMode), - (this.highWaterMark = c(this, t, 'writableHighWaterMark', o)), - (this.finalCalled = !1), - (this.needDrain = !1), - (this.ending = !1), - (this.ended = !1), - (this.finished = !1), - (this.destroyed = !1); - var s = !1 === t.decodeStrings; - (this.decodeStrings = !s), - (this.defaultEncoding = t.defaultEncoding || 'utf8'), - (this.length = 0), - (this.writing = !1), - (this.corked = 0), - (this.sync = !0), - (this.bufferProcessing = !1), - (this.onwrite = function (t) { - !(function (t, e) { - var r = t._writableState, - i = r.sync, - n = r.writecb; - if ('function' != typeof n) throw new m(); - if ( - ((function (t) { - (t.writing = !1), (t.writecb = null), (t.length -= t.writelen), (t.writelen = 0); - })(r), - e) - ) - !(function (t, e, r, i, n) { - --e.pendingcb, - r - ? (process.nextTick(n, i), process.nextTick(I, t, e), (t._writableState.errorEmitted = !0), _(t, i)) - : (n(i), (t._writableState.errorEmitted = !0), _(t, i), I(t, e)); - })(t, r, i, e, n); - else { - var o = R(r) || t.destroyed; - o || r.corked || r.bufferProcessing || !r.bufferedRequest || k(t, r), i ? process.nextTick(A, t, r, o, n) : A(t, r, o, n); - } - })(e, t); - }), - (this.writecb = null), - (this.writelen = 0), - (this.bufferedRequest = null), - (this.lastBufferedRequest = null), - (this.pendingcb = 0), - (this.prefinished = !1), - (this.errorEmitted = !1), - (this.emitClose = !1 !== t.emitClose), - (this.autoDestroy = !!t.autoDestroy), - (this.bufferedRequestCount = 0), - (this.corkedRequestsFree = new i(this)); - } - function S(t) { - var e = this instanceof (n = n || r(1033)); - if (!e && !o.call(S, this)) return new S(t); - (this._writableState = new E(t, this, e)), - (this.writable = !0), - t && - ('function' == typeof t.write && (this._write = t.write), - 'function' == typeof t.writev && (this._writev = t.writev), - 'function' == typeof t.destroy && (this._destroy = t.destroy), - 'function' == typeof t.final && (this._final = t.final)), - a.call(this); - } - function x(t, e, r, i, n, o, s) { - (e.writelen = i), - (e.writecb = s), - (e.writing = !0), - (e.sync = !0), - e.destroyed ? e.onwrite(new b('write')) : r ? t._writev(n, e.onwrite) : t._write(n, o, e.onwrite), - (e.sync = !1); - } - function A(t, e, r, i) { - r || - (function (t, e) { - 0 === e.length && e.needDrain && ((e.needDrain = !1), t.emit('drain')); - })(t, e), - e.pendingcb--, - i(), - I(t, e); - } - function k(t, e) { - e.bufferProcessing = !0; - var r = e.bufferedRequest; - if (t._writev && r && r.next) { - var n = e.bufferedRequestCount, - o = new Array(n), - s = e.corkedRequestsFree; - s.entry = r; - for (var a = 0, h = !0; r; ) (o[a] = r), r.isBuf || (h = !1), (r = r.next), (a += 1); - (o.allBuffers = h), - x(t, e, !0, e.length, o, '', s.finish), - e.pendingcb++, - (e.lastBufferedRequest = null), - s.next ? ((e.corkedRequestsFree = s.next), (s.next = null)) : (e.corkedRequestsFree = new i(e)), - (e.bufferedRequestCount = 0); - } else { - for (; r; ) { - var u = r.chunk, - f = r.encoding, - c = r.callback; - if ((x(t, e, !1, e.objectMode ? 1 : u.length, u, f, c), (r = r.next), e.bufferedRequestCount--, e.writing)) break; - } - null === r && (e.lastBufferedRequest = null); - } - (e.bufferedRequest = r), (e.bufferProcessing = !1); - } - function R(t) { - return t.ending && 0 === t.length && null === t.bufferedRequest && !t.finished && !t.writing; - } - function B(t, e) { - t._final(function (r) { - e.pendingcb--, r && _(t, r), (e.prefinished = !0), t.emit('prefinish'), I(t, e); - }); - } - function I(t, e) { - var r = R(e); - if ( - r && - ((function (t, e) { - e.prefinished || - e.finalCalled || - ('function' != typeof t._final || e.destroyed - ? ((e.prefinished = !0), t.emit('prefinish')) - : (e.pendingcb++, (e.finalCalled = !0), process.nextTick(B, t, e))); - })(t, e), - 0 === e.pendingcb && ((e.finished = !0), t.emit('finish'), e.autoDestroy)) - ) { - var i = t._readableState; - (!i || (i.autoDestroy && i.endEmitted)) && t.destroy(); - } - return r; - } - r(87)(S, a), - (E.prototype.getBuffer = function () { - for (var t = this.bufferedRequest, e = []; t; ) e.push(t), (t = t.next); - return e; - }), - (function () { - try { - Object.defineProperty(E.prototype, 'buffer', { - get: s.deprecate( - function () { - return this.getBuffer(); - }, - '_writableState.buffer is deprecated. Use _writableState.getBuffer instead.', - 'DEP0003' - ), - }); - } catch (t) {} - })(), - 'function' == typeof Symbol && Symbol.hasInstance && 'function' == typeof Function.prototype[Symbol.hasInstance] - ? ((o = Function.prototype[Symbol.hasInstance]), - Object.defineProperty(S, Symbol.hasInstance, { - value: function (t) { - return !!o.call(this, t) || (this === S && t && t._writableState instanceof E); - }, - })) - : (o = function (t) { - return t instanceof this; - }), - (S.prototype.pipe = function () { - _(this, new g()); - }), - (S.prototype.write = function (t, e, r) { - var i, - n = this._writableState, - o = !1, - s = !n.objectMode && ((i = t), h.isBuffer(i) || i instanceof u); - return ( - s && - !h.isBuffer(t) && - (t = (function (t) { - return h.from(t); - })(t)), - 'function' == typeof e && ((r = e), (e = null)), - s ? (e = 'buffer') : e || (e = n.defaultEncoding), - 'function' != typeof r && (r = M), - n.ending - ? (function (t, e) { - var r = new v(); - _(t, r), process.nextTick(e, r); - })(this, r) - : (s || - (function (t, e, r, i) { - var n; - return ( - null === r ? (n = new y()) : 'string' == typeof r || e.objectMode || (n = new d('chunk', ['string', 'Buffer'], r)), - !n || (_(t, n), process.nextTick(i, n), !1) - ); - })(this, n, t, r)) && - (n.pendingcb++, - (o = (function (t, e, r, i, n, o) { - if (!r) { - var s = (function (t, e, r) { - return t.objectMode || !1 === t.decodeStrings || 'string' != typeof e || (e = h.from(e, r)), e; - })(e, i, n); - i !== s && ((r = !0), (n = 'buffer'), (i = s)); - } - var a = e.objectMode ? 1 : i.length; - e.length += a; - var u = e.length < e.highWaterMark; - if ((u || (e.needDrain = !0), e.writing || e.corked)) { - var f = e.lastBufferedRequest; - (e.lastBufferedRequest = { chunk: i, encoding: n, isBuf: r, callback: o, next: null }), - f ? (f.next = e.lastBufferedRequest) : (e.bufferedRequest = e.lastBufferedRequest), - (e.bufferedRequestCount += 1); - } else x(t, e, !1, a, i, n, o); - return u; - })(this, n, s, t, e, r))), - o - ); - }), - (S.prototype.cork = function () { - this._writableState.corked++; - }), - (S.prototype.uncork = function () { - var t = this._writableState; - t.corked && (t.corked--, t.writing || t.corked || t.bufferProcessing || !t.bufferedRequest || k(this, t)); - }), - (S.prototype.setDefaultEncoding = function (t) { - if ( - ('string' == typeof t && (t = t.toLowerCase()), - !( - ['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf( - (t + '').toLowerCase() - ) > -1 - )) - ) - throw new w(t); - return (this._writableState.defaultEncoding = t), this; - }), - Object.defineProperty(S.prototype, 'writableBuffer', { - enumerable: !1, - get: function () { - return this._writableState && this._writableState.getBuffer(); - }, - }), - Object.defineProperty(S.prototype, 'writableHighWaterMark', { - enumerable: !1, - get: function () { - return this._writableState.highWaterMark; - }, - }), - (S.prototype._write = function (t, e, r) { - r(new p('_write()')); - }), - (S.prototype._writev = null), - (S.prototype.end = function (t, e, r) { - var i = this._writableState; - return ( - 'function' == typeof t ? ((r = t), (t = null), (e = null)) : 'function' == typeof e && ((r = e), (e = null)), - null != t && this.write(t, e), - i.corked && ((i.corked = 1), this.uncork()), - i.ending || - (function (t, e, r) { - (e.ending = !0), - I(t, e), - r && (e.finished ? process.nextTick(r) : t.once('finish', r)), - (e.ended = !0), - (t.writable = !1); - })(this, i, r), - this - ); - }), - Object.defineProperty(S.prototype, 'writableLength', { - enumerable: !1, - get: function () { - return this._writableState.length; - }, - }), - Object.defineProperty(S.prototype, 'destroyed', { - enumerable: !1, - get: function () { - return void 0 !== this._writableState && this._writableState.destroyed; - }, - set: function (t) { - this._writableState && (this._writableState.destroyed = t); - }, - }), - (S.prototype.destroy = f.destroy), - (S.prototype._undestroy = f.undestroy), - (S.prototype._destroy = function (t, e) { - e(t); - }); - }, - 1519: (t, e, r) => { - 'use strict'; - var i; - function n(t, e, r) { - return e in t ? Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : (t[e] = r), t; - } - var o = r(4413), - s = Symbol('lastResolve'), - a = Symbol('lastReject'), - h = Symbol('error'), - u = Symbol('ended'), - f = Symbol('lastPromise'), - c = Symbol('handlePromise'), - l = Symbol('stream'); - function d(t, e) { - return { value: t, done: e }; - } - function p(t) { - var e = t[s]; - if (null !== e) { - var r = t[l].read(); - null !== r && ((t[f] = null), (t[s] = null), (t[a] = null), e(d(r, !1))); - } - } - function m(t) { - process.nextTick(p, t); - } - var g = Object.getPrototypeOf(function () {}), - b = Object.setPrototypeOf( - (n( - (i = { - get stream() { - return this[l]; - }, - next: function () { - var t = this, - e = this[h]; - if (null !== e) return Promise.reject(e); - if (this[u]) return Promise.resolve(d(void 0, !0)); - if (this[l].destroyed) - return new Promise(function (e, r) { - process.nextTick(function () { - t[h] ? r(t[h]) : e(d(void 0, !0)); - }); - }); - var r, - i = this[f]; - if (i) - r = new Promise( - (function (t, e) { - return function (r, i) { - t.then(function () { - e[u] ? r(d(void 0, !0)) : e[c](r, i); - }, i); - }; - })(i, this) - ); - else { - var n = this[l].read(); - if (null !== n) return Promise.resolve(d(n, !1)); - r = new Promise(this[c]); - } - return (this[f] = r), r; - }, - }), - Symbol.asyncIterator, - function () { - return this; - } - ), - n(i, 'return', function () { - var t = this; - return new Promise(function (e, r) { - t[l].destroy(null, function (t) { - t ? r(t) : e(d(void 0, !0)); - }); - }); - }), - i), - g - ); - t.exports = function (t) { - var e, - r = Object.create( - b, - (n((e = {}), l, { value: t, writable: !0 }), - n(e, s, { value: null, writable: !0 }), - n(e, a, { value: null, writable: !0 }), - n(e, h, { value: null, writable: !0 }), - n(e, u, { value: t._readableState.endEmitted, writable: !0 }), - n(e, c, { - value: function (t, e) { - var i = r[l].read(); - i ? ((r[f] = null), (r[s] = null), (r[a] = null), t(d(i, !1))) : ((r[s] = t), (r[a] = e)); - }, - writable: !0, - }), - e) - ); - return ( - (r[f] = null), - o(t, function (t) { - if (t && 'ERR_STREAM_PREMATURE_CLOSE' !== t.code) { - var e = r[a]; - return null !== e && ((r[f] = null), (r[s] = null), (r[a] = null), e(t)), void (r[h] = t); - } - var i = r[s]; - null !== i && ((r[f] = null), (r[s] = null), (r[a] = null), i(d(void 0, !0))), (r[u] = !0); - }), - t.on('readable', m.bind(null, r)), - r - ); - }; - }, - 8049: (t, e, r) => { - 'use strict'; - function i(t, e) { - var r = Object.keys(t); - if (Object.getOwnPropertySymbols) { - var i = Object.getOwnPropertySymbols(t); - e && - (i = i.filter(function (e) { - return Object.getOwnPropertyDescriptor(t, e).enumerable; - })), - r.push.apply(r, i); - } - return r; - } - function n(t, e, r) { - return e in t ? Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : (t[e] = r), t; - } - function o(t, e) { - for (var r = 0; r < e.length; r++) { - var i = e[r]; - (i.enumerable = i.enumerable || !1), - (i.configurable = !0), - 'value' in i && (i.writable = !0), - Object.defineProperty(t, i.key, i); - } - } - var s = r(816).Buffer, - a = r(4318).inspect, - h = (a && a.custom) || 'inspect'; - t.exports = (function () { - function t() { - !(function (t, e) { - if (!(t instanceof e)) throw new TypeError('Cannot call a class as a function'); - })(this, t), - (this.head = null), - (this.tail = null), - (this.length = 0); - } - var e, r; - return ( - (e = t), - (r = [ - { - key: 'push', - value: function (t) { - var e = { data: t, next: null }; - this.length > 0 ? (this.tail.next = e) : (this.head = e), (this.tail = e), ++this.length; - }, - }, - { - key: 'unshift', - value: function (t) { - var e = { data: t, next: this.head }; - 0 === this.length && (this.tail = e), (this.head = e), ++this.length; - }, - }, - { - key: 'shift', - value: function () { - if (0 !== this.length) { - var t = this.head.data; - return 1 === this.length ? (this.head = this.tail = null) : (this.head = this.head.next), --this.length, t; - } - }, - }, - { - key: 'clear', - value: function () { - (this.head = this.tail = null), (this.length = 0); - }, - }, - { - key: 'join', - value: function (t) { - if (0 === this.length) return ''; - for (var e = this.head, r = '' + e.data; (e = e.next); ) r += t + e.data; - return r; - }, - }, - { - key: 'concat', - value: function (t) { - if (0 === this.length) return s.alloc(0); - for (var e, r, i, n = s.allocUnsafe(t >>> 0), o = this.head, a = 0; o; ) - (e = o.data), (r = n), (i = a), s.prototype.copy.call(e, r, i), (a += o.data.length), (o = o.next); - return n; - }, - }, - { - key: 'consume', - value: function (t, e) { - var r; - return ( - t < this.head.data.length - ? ((r = this.head.data.slice(0, t)), (this.head.data = this.head.data.slice(t))) - : (r = t === this.head.data.length ? this.shift() : e ? this._getString(t) : this._getBuffer(t)), - r - ); - }, - }, - { - key: 'first', - value: function () { - return this.head.data; - }, - }, - { - key: '_getString', - value: function (t) { - var e = this.head, - r = 1, - i = e.data; - for (t -= i.length; (e = e.next); ) { - var n = e.data, - o = t > n.length ? n.length : t; - if ((o === n.length ? (i += n) : (i += n.slice(0, t)), 0 == (t -= o))) { - o === n.length - ? (++r, e.next ? (this.head = e.next) : (this.head = this.tail = null)) - : ((this.head = e), (e.data = n.slice(o))); - break; - } - ++r; - } - return (this.length -= r), i; - }, - }, - { - key: '_getBuffer', - value: function (t) { - var e = s.allocUnsafe(t), - r = this.head, - i = 1; - for (r.data.copy(e), t -= r.data.length; (r = r.next); ) { - var n = r.data, - o = t > n.length ? n.length : t; - if ((n.copy(e, e.length - t, 0, o), 0 == (t -= o))) { - o === n.length - ? (++i, r.next ? (this.head = r.next) : (this.head = this.tail = null)) - : ((this.head = r), (r.data = n.slice(o))); - break; - } - ++i; - } - return (this.length -= i), e; - }, - }, - { - key: h, - value: function (t, e) { - return a( - this, - (function (t) { - for (var e = 1; e < arguments.length; e++) { - var r = null != arguments[e] ? arguments[e] : {}; - e % 2 - ? i(Object(r), !0).forEach(function (e) { - n(t, e, r[e]); - }) - : Object.getOwnPropertyDescriptors - ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) - : i(Object(r)).forEach(function (e) { - Object.defineProperty(t, e, Object.getOwnPropertyDescriptor(r, e)); - }); - } - return t; - })({}, e, { depth: 0, customInspect: !1 }) - ); - }, - }, - ]), - r && o(e.prototype, r), - t - ); - })(); - }, - 9591: t => { - 'use strict'; - function e(t, e) { - i(t, e), r(t); - } - function r(t) { - (t._writableState && !t._writableState.emitClose) || (t._readableState && !t._readableState.emitClose) || t.emit('close'); - } - function i(t, e) { - t.emit('error', e); - } - t.exports = { - destroy: function (t, n) { - var o = this, - s = this._readableState && this._readableState.destroyed, - a = this._writableState && this._writableState.destroyed; - return s || a - ? (n - ? n(t) - : t && - (this._writableState - ? this._writableState.errorEmitted || ((this._writableState.errorEmitted = !0), process.nextTick(i, this, t)) - : process.nextTick(i, this, t)), - this) - : (this._readableState && (this._readableState.destroyed = !0), - this._writableState && (this._writableState.destroyed = !0), - this._destroy(t || null, function (t) { - !n && t - ? o._writableState - ? o._writableState.errorEmitted - ? process.nextTick(r, o) - : ((o._writableState.errorEmitted = !0), process.nextTick(e, o, t)) - : process.nextTick(e, o, t) - : n - ? (process.nextTick(r, o), n(t)) - : process.nextTick(r, o); - }), - this); - }, - undestroy: function () { - this._readableState && - ((this._readableState.destroyed = !1), - (this._readableState.reading = !1), - (this._readableState.ended = !1), - (this._readableState.endEmitted = !1)), - this._writableState && - ((this._writableState.destroyed = !1), - (this._writableState.ended = !1), - (this._writableState.ending = !1), - (this._writableState.finalCalled = !1), - (this._writableState.prefinished = !1), - (this._writableState.finished = !1), - (this._writableState.errorEmitted = !1)); - }, - errorOrDestroy: function (t, e) { - var r = t._readableState, - i = t._writableState; - (r && r.autoDestroy) || (i && i.autoDestroy) ? t.destroy(e) : t.emit('error', e); - }, - }; - }, - 4413: (t, e, r) => { - 'use strict'; - var i = r(4004).q.ERR_STREAM_PREMATURE_CLOSE; - function n() {} - t.exports = function t(e, r, o) { - if ('function' == typeof r) return t(e, null, r); - r || (r = {}), - (o = (function (t) { - var e = !1; - return function () { - if (!e) { - e = !0; - for (var r = arguments.length, i = new Array(r), n = 0; n < r; n++) i[n] = arguments[n]; - t.apply(this, i); - } - }; - })(o || n)); - var s = r.readable || (!1 !== r.readable && e.readable), - a = r.writable || (!1 !== r.writable && e.writable), - h = function () { - e.writable || f(); - }, - u = e._writableState && e._writableState.finished, - f = function () { - (a = !1), (u = !0), s || o.call(e); - }, - c = e._readableState && e._readableState.endEmitted, - l = function () { - (s = !1), (c = !0), a || o.call(e); - }, - d = function (t) { - o.call(e, t); - }, - p = function () { - var t; - return s && !c - ? ((e._readableState && e._readableState.ended) || (t = new i()), o.call(e, t)) - : a && !u - ? ((e._writableState && e._writableState.ended) || (t = new i()), o.call(e, t)) - : void 0; - }, - m = function () { - e.req.on('finish', f); - }; - return ( - (function (t) { - return t.setHeader && 'function' == typeof t.abort; - })(e) - ? (e.on('complete', f), e.on('abort', p), e.req ? m() : e.on('request', m)) - : a && !e._writableState && (e.on('end', h), e.on('close', h)), - e.on('end', l), - e.on('finish', f), - !1 !== r.error && e.on('error', d), - e.on('close', p), - function () { - e.removeListener('complete', f), - e.removeListener('abort', p), - e.removeListener('request', m), - e.req && e.req.removeListener('finish', f), - e.removeListener('end', h), - e.removeListener('close', h), - e.removeListener('finish', f), - e.removeListener('end', l), - e.removeListener('error', d), - e.removeListener('close', p); - } - ); - }; - }, - 8727: t => { - t.exports = function () { - throw new Error('Readable.from is not available in the browser'); - }; - }, - 9638: (t, e, r) => { - 'use strict'; - var i, - n = r(4004).q, - o = n.ERR_MISSING_ARGS, - s = n.ERR_STREAM_DESTROYED; - function a(t) { - if (t) throw t; - } - function h(t) { - t(); - } - function u(t, e) { - return t.pipe(e); - } - t.exports = function () { - for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++) e[n] = arguments[n]; - var f, - c = (function (t) { - return t.length ? ('function' != typeof t[t.length - 1] ? a : t.pop()) : a; - })(e); - if ((Array.isArray(e[0]) && (e = e[0]), e.length < 2)) throw new o('streams'); - var l = e.map(function (t, n) { - var o = n < e.length - 1; - return (function (t, e, n, o) { - o = (function (t) { - var e = !1; - return function () { - e || ((e = !0), t.apply(void 0, arguments)); - }; - })(o); - var a = !1; - t.on('close', function () { - a = !0; - }), - void 0 === i && (i = r(4413)), - i(t, { readable: e, writable: n }, function (t) { - if (t) return o(t); - (a = !0), o(); - }); - var h = !1; - return function (e) { - if (!a && !h) - return ( - (h = !0), - (function (t) { - return t.setHeader && 'function' == typeof t.abort; - })(t) - ? t.abort() - : 'function' == typeof t.destroy - ? t.destroy() - : void o(e || new s('pipe')) - ); - }; - })(t, o, n > 0, function (t) { - f || (f = t), t && l.forEach(h), o || (l.forEach(h), c(f)); - }); - }); - return e.reduce(u); - }; - }, - 7452: (t, e, r) => { - 'use strict'; - var i = r(4004).q.ERR_INVALID_OPT_VALUE; - t.exports = { - getHighWaterMark: function (t, e, r, n) { - var o = (function (t, e, r) { - return null != t.highWaterMark ? t.highWaterMark : e ? t[r] : null; - })(e, n, r); - if (null != o) { - if (!isFinite(o) || Math.floor(o) !== o || o < 0) throw new i(n ? r : 'highWaterMark', o); - return Math.floor(o); - } - return t.objectMode ? 16 : 16384; - }, - }; - }, - 4358: (t, e, r) => { - t.exports = r(343).EventEmitter; - }, - 1457: (t, e, r) => { - ((e = t.exports = r(767)).Stream = e), - (e.Readable = e), - (e.Writable = r(4608)), - (e.Duplex = r(1033)), - (e.Transform = r(2637)), - (e.PassThrough = r(3546)), - (e.finished = r(4413)), - (e.pipeline = r(9638)); - }, - 5294: (t, e, r) => { - var i = e; - (i.utils = r(8626)), - (i.common = r(8717)), - (i.sha = r(2589)), - (i.ripemd = r(8978)), - (i.hmac = r(2750)), - (i.sha1 = i.sha.sha1), - (i.sha256 = i.sha.sha256), - (i.sha224 = i.sha.sha224), - (i.sha384 = i.sha.sha384), - (i.sha512 = i.sha.sha512), - (i.ripemd160 = i.ripemd.ripemd160); - }, - 8717: (t, e, r) => { - 'use strict'; - var i = r(8626), - n = r(7859); - function o() { - (this.pending = null), - (this.pendingTotal = 0), - (this.blockSize = this.constructor.blockSize), - (this.outSize = this.constructor.outSize), - (this.hmacStrength = this.constructor.hmacStrength), - (this.padLength = this.constructor.padLength / 8), - (this.endian = 'big'), - (this._delta8 = this.blockSize / 8), - (this._delta32 = this.blockSize / 32); - } - (e.BlockHash = o), - (o.prototype.update = function (t, e) { - if ( - ((t = i.toArray(t, e)), - this.pending ? (this.pending = this.pending.concat(t)) : (this.pending = t), - (this.pendingTotal += t.length), - this.pending.length >= this._delta8) - ) { - var r = (t = this.pending).length % this._delta8; - (this.pending = t.slice(t.length - r, t.length)), - 0 === this.pending.length && (this.pending = null), - (t = i.join32(t, 0, t.length - r, this.endian)); - for (var n = 0; n < t.length; n += this._delta32) this._update(t, n, n + this._delta32); - } - return this; - }), - (o.prototype.digest = function (t) { - return this.update(this._pad()), n(null === this.pending), this._digest(t); - }), - (o.prototype._pad = function () { - var t = this.pendingTotal, - e = this._delta8, - r = e - ((t + this.padLength) % e), - i = new Array(r + this.padLength); - i[0] = 128; - for (var n = 1; n < r; n++) i[n] = 0; - if (((t <<= 3), 'big' === this.endian)) { - for (var o = 8; o < this.padLength; o++) i[n++] = 0; - (i[n++] = 0), - (i[n++] = 0), - (i[n++] = 0), - (i[n++] = 0), - (i[n++] = (t >>> 24) & 255), - (i[n++] = (t >>> 16) & 255), - (i[n++] = (t >>> 8) & 255), - (i[n++] = 255 & t); - } else - for ( - i[n++] = 255 & t, - i[n++] = (t >>> 8) & 255, - i[n++] = (t >>> 16) & 255, - i[n++] = (t >>> 24) & 255, - i[n++] = 0, - i[n++] = 0, - i[n++] = 0, - i[n++] = 0, - o = 8; - o < this.padLength; - o++ - ) - i[n++] = 0; - return i; - }); - }, - 2750: (t, e, r) => { - 'use strict'; - var i = r(8626), - n = r(7859); - function o(t, e, r) { - if (!(this instanceof o)) return new o(t, e, r); - (this.Hash = t), - (this.blockSize = t.blockSize / 8), - (this.outSize = t.outSize / 8), - (this.inner = null), - (this.outer = null), - this._init(i.toArray(e, r)); - } - (t.exports = o), - (o.prototype._init = function (t) { - t.length > this.blockSize && (t = new this.Hash().update(t).digest()), n(t.length <= this.blockSize); - for (var e = t.length; e < this.blockSize; e++) t.push(0); - for (e = 0; e < t.length; e++) t[e] ^= 54; - for (this.inner = new this.Hash().update(t), e = 0; e < t.length; e++) t[e] ^= 106; - this.outer = new this.Hash().update(t); - }), - (o.prototype.update = function (t, e) { - return this.inner.update(t, e), this; - }), - (o.prototype.digest = function (t) { - return this.outer.update(this.inner.digest()), this.outer.digest(t); - }); - }, - 8978: (t, e, r) => { - 'use strict'; - var i = r(8626), - n = r(8717), - o = i.rotl32, - s = i.sum32, - a = i.sum32_3, - h = i.sum32_4, - u = n.BlockHash; - function f() { - if (!(this instanceof f)) return new f(); - u.call(this), (this.h = [1732584193, 4023233417, 2562383102, 271733878, 3285377520]), (this.endian = 'little'); - } - function c(t, e, r, i) { - return t <= 15 ? e ^ r ^ i : t <= 31 ? (e & r) | (~e & i) : t <= 47 ? (e | ~r) ^ i : t <= 63 ? (e & i) | (r & ~i) : e ^ (r | ~i); - } - function l(t) { - return t <= 15 ? 0 : t <= 31 ? 1518500249 : t <= 47 ? 1859775393 : t <= 63 ? 2400959708 : 2840853838; - } - function d(t) { - return t <= 15 ? 1352829926 : t <= 31 ? 1548603684 : t <= 47 ? 1836072691 : t <= 63 ? 2053994217 : 0; - } - i.inherits(f, u), - (e.ripemd160 = f), - (f.blockSize = 512), - (f.outSize = 160), - (f.hmacStrength = 192), - (f.padLength = 64), - (f.prototype._update = function (t, e) { - for ( - var r = this.h[0], i = this.h[1], n = this.h[2], u = this.h[3], f = this.h[4], y = r, v = i, w = n, _ = u, M = f, E = 0; - E < 80; - E++ - ) { - var S = s(o(h(r, c(E, i, n, u), t[p[E] + e], l(E)), g[E]), f); - (r = f), - (f = u), - (u = o(n, 10)), - (n = i), - (i = S), - (S = s(o(h(y, c(79 - E, v, w, _), t[m[E] + e], d(E)), b[E]), M)), - (y = M), - (M = _), - (_ = o(w, 10)), - (w = v), - (v = S); - } - (S = a(this.h[1], n, _)), - (this.h[1] = a(this.h[2], u, M)), - (this.h[2] = a(this.h[3], f, y)), - (this.h[3] = a(this.h[4], r, v)), - (this.h[4] = a(this.h[0], i, w)), - (this.h[0] = S); - }), - (f.prototype._digest = function (t) { - return 'hex' === t ? i.toHex32(this.h, 'little') : i.split32(this.h, 'little'); - }); - var p = [ - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8, 3, 10, 14, 4, 9, 15, - 8, 1, 2, 7, 0, 6, 13, 11, 5, 12, 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2, 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, - 11, 6, 15, 13, - ], - m = [ - 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2, 15, 5, 1, 3, 7, 14, - 6, 9, 11, 8, 12, 2, 10, 0, 4, 13, 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14, 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, - 0, 3, 9, 11, - ], - g = [ - 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12, 11, 13, 6, 7, - 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5, 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12, 9, 15, 5, 11, 6, 8, 13, 12, 5, - 12, 13, 14, 11, 8, 5, 6, - ], - b = [ - 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6, 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11, 9, 7, 15, 11, 8, - 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5, 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8, 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, - 6, 5, 15, 13, 11, 11, - ]; - }, - 2589: (t, e, r) => { - 'use strict'; - (e.sha1 = r(9330)), (e.sha224 = r(5168)), (e.sha256 = r(375)), (e.sha384 = r(8899)), (e.sha512 = r(790)); - }, - 9330: (t, e, r) => { - 'use strict'; - var i = r(8626), - n = r(8717), - o = r(8156), - s = i.rotl32, - a = i.sum32, - h = i.sum32_5, - u = o.ft_1, - f = n.BlockHash, - c = [1518500249, 1859775393, 2400959708, 3395469782]; - function l() { - if (!(this instanceof l)) return new l(); - f.call(this), (this.h = [1732584193, 4023233417, 2562383102, 271733878, 3285377520]), (this.W = new Array(80)); - } - i.inherits(l, f), - (t.exports = l), - (l.blockSize = 512), - (l.outSize = 160), - (l.hmacStrength = 80), - (l.padLength = 64), - (l.prototype._update = function (t, e) { - for (var r = this.W, i = 0; i < 16; i++) r[i] = t[e + i]; - for (; i < r.length; i++) r[i] = s(r[i - 3] ^ r[i - 8] ^ r[i - 14] ^ r[i - 16], 1); - var n = this.h[0], - o = this.h[1], - f = this.h[2], - l = this.h[3], - d = this.h[4]; - for (i = 0; i < r.length; i++) { - var p = ~~(i / 20), - m = h(s(n, 5), u(p, o, f, l), d, r[i], c[p]); - (d = l), (l = f), (f = s(o, 30)), (o = n), (n = m); - } - (this.h[0] = a(this.h[0], n)), - (this.h[1] = a(this.h[1], o)), - (this.h[2] = a(this.h[2], f)), - (this.h[3] = a(this.h[3], l)), - (this.h[4] = a(this.h[4], d)); - }), - (l.prototype._digest = function (t) { - return 'hex' === t ? i.toHex32(this.h, 'big') : i.split32(this.h, 'big'); - }); - }, - 5168: (t, e, r) => { - 'use strict'; - var i = r(8626), - n = r(375); - function o() { - if (!(this instanceof o)) return new o(); - n.call(this), (this.h = [3238371032, 914150663, 812702999, 4144912697, 4290775857, 1750603025, 1694076839, 3204075428]); - } - i.inherits(o, n), - (t.exports = o), - (o.blockSize = 512), - (o.outSize = 224), - (o.hmacStrength = 192), - (o.padLength = 64), - (o.prototype._digest = function (t) { - return 'hex' === t ? i.toHex32(this.h.slice(0, 7), 'big') : i.split32(this.h.slice(0, 7), 'big'); - }); - }, - 375: (t, e, r) => { - 'use strict'; - var i = r(8626), - n = r(8717), - o = r(8156), - s = r(7859), - a = i.sum32, - h = i.sum32_4, - u = i.sum32_5, - f = o.ch32, - c = o.maj32, - l = o.s0_256, - d = o.s1_256, - p = o.g0_256, - m = o.g1_256, - g = n.BlockHash, - b = [ - 1116352408, 1899447441, 3049323471, 3921009573, 961987163, 1508970993, 2453635748, 2870763221, 3624381080, 310598401, 607225278, - 1426881987, 1925078388, 2162078206, 2614888103, 3248222580, 3835390401, 4022224774, 264347078, 604807628, 770255983, 1249150122, - 1555081692, 1996064986, 2554220882, 2821834349, 2952996808, 3210313671, 3336571891, 3584528711, 113926993, 338241895, 666307205, - 773529912, 1294757372, 1396182291, 1695183700, 1986661051, 2177026350, 2456956037, 2730485921, 2820302411, 3259730800, - 3345764771, 3516065817, 3600352804, 4094571909, 275423344, 430227734, 506948616, 659060556, 883997877, 958139571, 1322822218, - 1537002063, 1747873779, 1955562222, 2024104815, 2227730452, 2361852424, 2428436474, 2756734187, 3204031479, 3329325298, - ]; - function y() { - if (!(this instanceof y)) return new y(); - g.call(this), - (this.h = [1779033703, 3144134277, 1013904242, 2773480762, 1359893119, 2600822924, 528734635, 1541459225]), - (this.k = b), - (this.W = new Array(64)); - } - i.inherits(y, g), - (t.exports = y), - (y.blockSize = 512), - (y.outSize = 256), - (y.hmacStrength = 192), - (y.padLength = 64), - (y.prototype._update = function (t, e) { - for (var r = this.W, i = 0; i < 16; i++) r[i] = t[e + i]; - for (; i < r.length; i++) r[i] = h(m(r[i - 2]), r[i - 7], p(r[i - 15]), r[i - 16]); - var n = this.h[0], - o = this.h[1], - g = this.h[2], - b = this.h[3], - y = this.h[4], - v = this.h[5], - w = this.h[6], - _ = this.h[7]; - for (s(this.k.length === r.length), i = 0; i < r.length; i++) { - var M = u(_, d(y), f(y, v, w), this.k[i], r[i]), - E = a(l(n), c(n, o, g)); - (_ = w), (w = v), (v = y), (y = a(b, M)), (b = g), (g = o), (o = n), (n = a(M, E)); - } - (this.h[0] = a(this.h[0], n)), - (this.h[1] = a(this.h[1], o)), - (this.h[2] = a(this.h[2], g)), - (this.h[3] = a(this.h[3], b)), - (this.h[4] = a(this.h[4], y)), - (this.h[5] = a(this.h[5], v)), - (this.h[6] = a(this.h[6], w)), - (this.h[7] = a(this.h[7], _)); - }), - (y.prototype._digest = function (t) { - return 'hex' === t ? i.toHex32(this.h, 'big') : i.split32(this.h, 'big'); - }); - }, - 8899: (t, e, r) => { - 'use strict'; - var i = r(8626), - n = r(790); - function o() { - if (!(this instanceof o)) return new o(); - n.call(this), - (this.h = [ - 3418070365, 3238371032, 1654270250, 914150663, 2438529370, 812702999, 355462360, 4144912697, 1731405415, 4290775857, - 2394180231, 1750603025, 3675008525, 1694076839, 1203062813, 3204075428, - ]); - } - i.inherits(o, n), - (t.exports = o), - (o.blockSize = 1024), - (o.outSize = 384), - (o.hmacStrength = 192), - (o.padLength = 128), - (o.prototype._digest = function (t) { - return 'hex' === t ? i.toHex32(this.h.slice(0, 12), 'big') : i.split32(this.h.slice(0, 12), 'big'); - }); - }, - 790: (t, e, r) => { - 'use strict'; - var i = r(8626), - n = r(8717), - o = r(7859), - s = i.rotr64_hi, - a = i.rotr64_lo, - h = i.shr64_hi, - u = i.shr64_lo, - f = i.sum64, - c = i.sum64_hi, - l = i.sum64_lo, - d = i.sum64_4_hi, - p = i.sum64_4_lo, - m = i.sum64_5_hi, - g = i.sum64_5_lo, - b = n.BlockHash, - y = [ - 1116352408, 3609767458, 1899447441, 602891725, 3049323471, 3964484399, 3921009573, 2173295548, 961987163, 4081628472, - 1508970993, 3053834265, 2453635748, 2937671579, 2870763221, 3664609560, 3624381080, 2734883394, 310598401, 1164996542, - 607225278, 1323610764, 1426881987, 3590304994, 1925078388, 4068182383, 2162078206, 991336113, 2614888103, 633803317, 3248222580, - 3479774868, 3835390401, 2666613458, 4022224774, 944711139, 264347078, 2341262773, 604807628, 2007800933, 770255983, 1495990901, - 1249150122, 1856431235, 1555081692, 3175218132, 1996064986, 2198950837, 2554220882, 3999719339, 2821834349, 766784016, - 2952996808, 2566594879, 3210313671, 3203337956, 3336571891, 1034457026, 3584528711, 2466948901, 113926993, 3758326383, - 338241895, 168717936, 666307205, 1188179964, 773529912, 1546045734, 1294757372, 1522805485, 1396182291, 2643833823, 1695183700, - 2343527390, 1986661051, 1014477480, 2177026350, 1206759142, 2456956037, 344077627, 2730485921, 1290863460, 2820302411, - 3158454273, 3259730800, 3505952657, 3345764771, 106217008, 3516065817, 3606008344, 3600352804, 1432725776, 4094571909, - 1467031594, 275423344, 851169720, 430227734, 3100823752, 506948616, 1363258195, 659060556, 3750685593, 883997877, 3785050280, - 958139571, 3318307427, 1322822218, 3812723403, 1537002063, 2003034995, 1747873779, 3602036899, 1955562222, 1575990012, - 2024104815, 1125592928, 2227730452, 2716904306, 2361852424, 442776044, 2428436474, 593698344, 2756734187, 3733110249, - 3204031479, 2999351573, 3329325298, 3815920427, 3391569614, 3928383900, 3515267271, 566280711, 3940187606, 3454069534, - 4118630271, 4000239992, 116418474, 1914138554, 174292421, 2731055270, 289380356, 3203993006, 460393269, 320620315, 685471733, - 587496836, 852142971, 1086792851, 1017036298, 365543100, 1126000580, 2618297676, 1288033470, 3409855158, 1501505948, 4234509866, - 1607167915, 987167468, 1816402316, 1246189591, - ]; - function v() { - if (!(this instanceof v)) return new v(); - b.call(this), - (this.h = [ - 1779033703, 4089235720, 3144134277, 2227873595, 1013904242, 4271175723, 2773480762, 1595750129, 1359893119, 2917565137, - 2600822924, 725511199, 528734635, 4215389547, 1541459225, 327033209, - ]), - (this.k = y), - (this.W = new Array(160)); - } - function w(t, e, r, i, n) { - var o = (t & r) ^ (~t & n); - return o < 0 && (o += 4294967296), o; - } - function _(t, e, r, i, n, o) { - var s = (e & i) ^ (~e & o); - return s < 0 && (s += 4294967296), s; - } - function M(t, e, r, i, n) { - var o = (t & r) ^ (t & n) ^ (r & n); - return o < 0 && (o += 4294967296), o; - } - function E(t, e, r, i, n, o) { - var s = (e & i) ^ (e & o) ^ (i & o); - return s < 0 && (s += 4294967296), s; - } - function S(t, e) { - var r = s(t, e, 28) ^ s(e, t, 2) ^ s(e, t, 7); - return r < 0 && (r += 4294967296), r; - } - function x(t, e) { - var r = a(t, e, 28) ^ a(e, t, 2) ^ a(e, t, 7); - return r < 0 && (r += 4294967296), r; - } - function A(t, e) { - var r = a(t, e, 14) ^ a(t, e, 18) ^ a(e, t, 9); - return r < 0 && (r += 4294967296), r; - } - function k(t, e) { - var r = s(t, e, 1) ^ s(t, e, 8) ^ h(t, e, 7); - return r < 0 && (r += 4294967296), r; - } - function R(t, e) { - var r = a(t, e, 1) ^ a(t, e, 8) ^ u(t, e, 7); - return r < 0 && (r += 4294967296), r; - } - function B(t, e) { - var r = a(t, e, 19) ^ a(e, t, 29) ^ u(t, e, 6); - return r < 0 && (r += 4294967296), r; - } - i.inherits(v, b), - (t.exports = v), - (v.blockSize = 1024), - (v.outSize = 512), - (v.hmacStrength = 192), - (v.padLength = 128), - (v.prototype._prepareBlock = function (t, e) { - for (var r = this.W, i = 0; i < 32; i++) r[i] = t[e + i]; - for (; i < r.length; i += 2) { - var n = - ((g = r[i - 4]), (b = r[i - 3]), (y = void 0), (y = s(g, b, 19) ^ s(b, g, 29) ^ h(g, b, 6)) < 0 && (y += 4294967296), y), - o = B(r[i - 4], r[i - 3]), - a = r[i - 14], - u = r[i - 13], - f = k(r[i - 30], r[i - 29]), - c = R(r[i - 30], r[i - 29]), - l = r[i - 32], - m = r[i - 31]; - (r[i] = d(n, o, a, u, f, c, l, m)), (r[i + 1] = p(n, o, a, u, f, c, l, m)); - } - var g, b, y; - }), - (v.prototype._update = function (t, e) { - this._prepareBlock(t, e); - var r, - i, - n, - a = this.W, - h = this.h[0], - u = this.h[1], - d = this.h[2], - p = this.h[3], - b = this.h[4], - y = this.h[5], - v = this.h[6], - k = this.h[7], - R = this.h[8], - B = this.h[9], - I = this.h[10], - T = this.h[11], - P = this.h[12], - O = this.h[13], - L = this.h[14], - C = this.h[15]; - o(this.k.length === a.length); - for (var N = 0; N < a.length; N += 2) { - var j = L, - U = C, - D = ((n = void 0), (n = s((r = R), (i = B), 14) ^ s(r, i, 18) ^ s(i, r, 9)) < 0 && (n += 4294967296), n), - z = A(R, B), - F = w(R, 0, I, 0, P), - q = _(0, B, 0, T, 0, O), - H = this.k[N], - $ = this.k[N + 1], - Z = a[N], - G = a[N + 1], - V = m(j, U, D, z, F, q, H, $, Z, G), - W = g(j, U, D, z, F, q, H, $, Z, G); - (j = S(h, u)), (U = x(h, u)), (D = M(h, 0, d, 0, b)), (z = E(0, u, 0, p, 0, y)); - var K = c(j, U, D, z), - Y = l(j, U, D, z); - (L = P), - (C = O), - (P = I), - (O = T), - (I = R), - (T = B), - (R = c(v, k, V, W)), - (B = l(k, k, V, W)), - (v = b), - (k = y), - (b = d), - (y = p), - (d = h), - (p = u), - (h = c(V, W, K, Y)), - (u = l(V, W, K, Y)); - } - f(this.h, 0, h, u), - f(this.h, 2, d, p), - f(this.h, 4, b, y), - f(this.h, 6, v, k), - f(this.h, 8, R, B), - f(this.h, 10, I, T), - f(this.h, 12, P, O), - f(this.h, 14, L, C); - }), - (v.prototype._digest = function (t) { - return 'hex' === t ? i.toHex32(this.h, 'big') : i.split32(this.h, 'big'); - }); - }, - 8156: (t, e, r) => { - 'use strict'; - var i = r(8626).rotr32; - function n(t, e, r) { - return (t & e) ^ (~t & r); - } - function o(t, e, r) { - return (t & e) ^ (t & r) ^ (e & r); - } - function s(t, e, r) { - return t ^ e ^ r; - } - (e.ft_1 = function (t, e, r, i) { - return 0 === t ? n(e, r, i) : 1 === t || 3 === t ? s(e, r, i) : 2 === t ? o(e, r, i) : void 0; - }), - (e.ch32 = n), - (e.maj32 = o), - (e.p32 = s), - (e.s0_256 = function (t) { - return i(t, 2) ^ i(t, 13) ^ i(t, 22); - }), - (e.s1_256 = function (t) { - return i(t, 6) ^ i(t, 11) ^ i(t, 25); - }), - (e.g0_256 = function (t) { - return i(t, 7) ^ i(t, 18) ^ (t >>> 3); - }), - (e.g1_256 = function (t) { - return i(t, 17) ^ i(t, 19) ^ (t >>> 10); - }); - }, - 8626: (t, e, r) => { - 'use strict'; - var i = r(7859), - n = r(87); - function o(t, e) { - return 55296 == (64512 & t.charCodeAt(e)) && !(e < 0 || e + 1 >= t.length) && 56320 == (64512 & t.charCodeAt(e + 1)); - } - function s(t) { - return ((t >>> 24) | ((t >>> 8) & 65280) | ((t << 8) & 16711680) | ((255 & t) << 24)) >>> 0; - } - function a(t) { - return 1 === t.length ? '0' + t : t; - } - function h(t) { - return 7 === t.length - ? '0' + t - : 6 === t.length - ? '00' + t - : 5 === t.length - ? '000' + t - : 4 === t.length - ? '0000' + t - : 3 === t.length - ? '00000' + t - : 2 === t.length - ? '000000' + t - : 1 === t.length - ? '0000000' + t - : t; - } - (e.inherits = n), - (e.toArray = function (t, e) { - if (Array.isArray(t)) return t.slice(); - if (!t) return []; - var r = []; - if ('string' == typeof t) - if (e) { - if ('hex' === e) - for ((t = t.replace(/[^a-z0-9]+/gi, '')).length % 2 != 0 && (t = '0' + t), n = 0; n < t.length; n += 2) - r.push(parseInt(t[n] + t[n + 1], 16)); - } else - for (var i = 0, n = 0; n < t.length; n++) { - var s = t.charCodeAt(n); - s < 128 - ? (r[i++] = s) - : s < 2048 - ? ((r[i++] = (s >> 6) | 192), (r[i++] = (63 & s) | 128)) - : o(t, n) - ? ((s = 65536 + ((1023 & s) << 10) + (1023 & t.charCodeAt(++n))), - (r[i++] = (s >> 18) | 240), - (r[i++] = ((s >> 12) & 63) | 128), - (r[i++] = ((s >> 6) & 63) | 128), - (r[i++] = (63 & s) | 128)) - : ((r[i++] = (s >> 12) | 224), (r[i++] = ((s >> 6) & 63) | 128), (r[i++] = (63 & s) | 128)); - } - else for (n = 0; n < t.length; n++) r[n] = 0 | t[n]; - return r; - }), - (e.toHex = function (t) { - for (var e = '', r = 0; r < t.length; r++) e += a(t[r].toString(16)); - return e; - }), - (e.htonl = s), - (e.toHex32 = function (t, e) { - for (var r = '', i = 0; i < t.length; i++) { - var n = t[i]; - 'little' === e && (n = s(n)), (r += h(n.toString(16))); - } - return r; - }), - (e.zero2 = a), - (e.zero8 = h), - (e.join32 = function (t, e, r, n) { - var o = r - e; - i(o % 4 == 0); - for (var s = new Array(o / 4), a = 0, h = e; a < s.length; a++, h += 4) { - var u; - (u = - 'big' === n - ? (t[h] << 24) | (t[h + 1] << 16) | (t[h + 2] << 8) | t[h + 3] - : (t[h + 3] << 24) | (t[h + 2] << 16) | (t[h + 1] << 8) | t[h]), - (s[a] = u >>> 0); - } - return s; - }), - (e.split32 = function (t, e) { - for (var r = new Array(4 * t.length), i = 0, n = 0; i < t.length; i++, n += 4) { - var o = t[i]; - 'big' === e - ? ((r[n] = o >>> 24), (r[n + 1] = (o >>> 16) & 255), (r[n + 2] = (o >>> 8) & 255), (r[n + 3] = 255 & o)) - : ((r[n + 3] = o >>> 24), (r[n + 2] = (o >>> 16) & 255), (r[n + 1] = (o >>> 8) & 255), (r[n] = 255 & o)); - } - return r; - }), - (e.rotr32 = function (t, e) { - return (t >>> e) | (t << (32 - e)); - }), - (e.rotl32 = function (t, e) { - return (t << e) | (t >>> (32 - e)); - }), - (e.sum32 = function (t, e) { - return (t + e) >>> 0; - }), - (e.sum32_3 = function (t, e, r) { - return (t + e + r) >>> 0; - }), - (e.sum32_4 = function (t, e, r, i) { - return (t + e + r + i) >>> 0; - }), - (e.sum32_5 = function (t, e, r, i, n) { - return (t + e + r + i + n) >>> 0; - }), - (e.sum64 = function (t, e, r, i) { - var n = t[e], - o = (i + t[e + 1]) >>> 0, - s = (o < i ? 1 : 0) + r + n; - (t[e] = s >>> 0), (t[e + 1] = o); - }), - (e.sum64_hi = function (t, e, r, i) { - return (((e + i) >>> 0 < e ? 1 : 0) + t + r) >>> 0; - }), - (e.sum64_lo = function (t, e, r, i) { - return (e + i) >>> 0; - }), - (e.sum64_4_hi = function (t, e, r, i, n, o, s, a) { - var h = 0, - u = e; - return ( - (h += (u = (u + i) >>> 0) < e ? 1 : 0), - (h += (u = (u + o) >>> 0) < o ? 1 : 0), - (t + r + n + s + (h += (u = (u + a) >>> 0) < a ? 1 : 0)) >>> 0 - ); - }), - (e.sum64_4_lo = function (t, e, r, i, n, o, s, a) { - return (e + i + o + a) >>> 0; - }), - (e.sum64_5_hi = function (t, e, r, i, n, o, s, a, h, u) { - var f = 0, - c = e; - return ( - (f += (c = (c + i) >>> 0) < e ? 1 : 0), - (f += (c = (c + o) >>> 0) < o ? 1 : 0), - (f += (c = (c + a) >>> 0) < a ? 1 : 0), - (t + r + n + s + h + (f += (c = (c + u) >>> 0) < u ? 1 : 0)) >>> 0 - ); - }), - (e.sum64_5_lo = function (t, e, r, i, n, o, s, a, h, u) { - return (e + i + o + a + u) >>> 0; - }), - (e.rotr64_hi = function (t, e, r) { - return ((e << (32 - r)) | (t >>> r)) >>> 0; - }), - (e.rotr64_lo = function (t, e, r) { - return ((t << (32 - r)) | (e >>> r)) >>> 0; - }), - (e.shr64_hi = function (t, e, r) { - return t >>> r; - }), - (e.shr64_lo = function (t, e, r) { - return ((t << (32 - r)) | (e >>> r)) >>> 0; - }); - }, - 6513: (t, e, r) => { - 'use strict'; - var i = r(5294), - n = r(2910), - o = r(7859); - function s(t) { - if (!(this instanceof s)) return new s(t); - (this.hash = t.hash), - (this.predResist = !!t.predResist), - (this.outLen = this.hash.outSize), - (this.minEntropy = t.minEntropy || this.hash.hmacStrength), - (this._reseed = null), - (this.reseedInterval = null), - (this.K = null), - (this.V = null); - var e = n.toArray(t.entropy, t.entropyEnc || 'hex'), - r = n.toArray(t.nonce, t.nonceEnc || 'hex'), - i = n.toArray(t.pers, t.persEnc || 'hex'); - o(e.length >= this.minEntropy / 8, 'Not enough entropy. Minimum is: ' + this.minEntropy + ' bits'), this._init(e, r, i); - } - (t.exports = s), - (s.prototype._init = function (t, e, r) { - var i = t.concat(e).concat(r); - (this.K = new Array(this.outLen / 8)), (this.V = new Array(this.outLen / 8)); - for (var n = 0; n < this.V.length; n++) (this.K[n] = 0), (this.V[n] = 1); - this._update(i), (this._reseed = 1), (this.reseedInterval = 281474976710656); - }), - (s.prototype._hmac = function () { - return new i.hmac(this.hash, this.K); - }), - (s.prototype._update = function (t) { - var e = this._hmac().update(this.V).update([0]); - t && (e = e.update(t)), - (this.K = e.digest()), - (this.V = this._hmac().update(this.V).digest()), - t && ((this.K = this._hmac().update(this.V).update([1]).update(t).digest()), (this.V = this._hmac().update(this.V).digest())); - }), - (s.prototype.reseed = function (t, e, r, i) { - 'string' != typeof e && ((i = r), (r = e), (e = null)), - (t = n.toArray(t, e)), - (r = n.toArray(r, i)), - o(t.length >= this.minEntropy / 8, 'Not enough entropy. Minimum is: ' + this.minEntropy + ' bits'), - this._update(t.concat(r || [])), - (this._reseed = 1); - }), - (s.prototype.generate = function (t, e, r, i) { - if (this._reseed > this.reseedInterval) throw new Error('Reseed is required'); - 'string' != typeof e && ((i = r), (r = e), (e = null)), r && ((r = n.toArray(r, i || 'hex')), this._update(r)); - for (var o = []; o.length < t; ) (this.V = this._hmac().update(this.V).digest()), (o = o.concat(this.V)); - var s = o.slice(0, t); - return this._update(r), this._reseed++, n.encode(s, e); - }); - }, - 8898: (t, e) => { - (e.read = function (t, e, r, i, n) { - var o, - s, - a = 8 * n - i - 1, - h = (1 << a) - 1, - u = h >> 1, - f = -7, - c = r ? n - 1 : 0, - l = r ? -1 : 1, - d = t[e + c]; - for (c += l, o = d & ((1 << -f) - 1), d >>= -f, f += a; f > 0; o = 256 * o + t[e + c], c += l, f -= 8); - for (s = o & ((1 << -f) - 1), o >>= -f, f += i; f > 0; s = 256 * s + t[e + c], c += l, f -= 8); - if (0 === o) o = 1 - u; - else { - if (o === h) return s ? NaN : (1 / 0) * (d ? -1 : 1); - (s += Math.pow(2, i)), (o -= u); - } - return (d ? -1 : 1) * s * Math.pow(2, o - i); - }), - (e.write = function (t, e, r, i, n, o) { - var s, - a, - h, - u = 8 * o - n - 1, - f = (1 << u) - 1, - c = f >> 1, - l = 23 === n ? Math.pow(2, -24) - Math.pow(2, -77) : 0, - d = i ? 0 : o - 1, - p = i ? 1 : -1, - m = e < 0 || (0 === e && 1 / e < 0) ? 1 : 0; - for ( - e = Math.abs(e), - isNaN(e) || e === 1 / 0 - ? ((a = isNaN(e) ? 1 : 0), (s = f)) - : ((s = Math.floor(Math.log(e) / Math.LN2)), - e * (h = Math.pow(2, -s)) < 1 && (s--, (h *= 2)), - (e += s + c >= 1 ? l / h : l * Math.pow(2, 1 - c)) * h >= 2 && (s++, (h /= 2)), - s + c >= f - ? ((a = 0), (s = f)) - : s + c >= 1 - ? ((a = (e * h - 1) * Math.pow(2, n)), (s += c)) - : ((a = e * Math.pow(2, c - 1) * Math.pow(2, n)), (s = 0))); - n >= 8; - t[r + d] = 255 & a, d += p, a /= 256, n -= 8 - ); - for (s = (s << n) | a, u += n; u > 0; t[r + d] = 255 & s, d += p, s /= 256, u -= 8); - t[r + d - p] |= 128 * m; - }); - }, - 87: t => { - 'function' == typeof Object.create - ? (t.exports = function (t, e) { - e && - ((t.super_ = e), - (t.prototype = Object.create(e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } }))); - }) - : (t.exports = function (t, e) { - if (e) { - t.super_ = e; - var r = function () {}; - (r.prototype = e.prototype), (t.prototype = new r()), (t.prototype.constructor = t); - } - }); - }, - 9500: (t, e, r) => { - 'use strict'; - var i = r(87), - n = r(6883), - o = r(7172).Buffer, - s = new Array(16); - function a() { - n.call(this, 64), (this._a = 1732584193), (this._b = 4023233417), (this._c = 2562383102), (this._d = 271733878); - } - function h(t, e) { - return (t << e) | (t >>> (32 - e)); - } - function u(t, e, r, i, n, o, s) { - return (h((t + ((e & r) | (~e & i)) + n + o) | 0, s) + e) | 0; - } - function f(t, e, r, i, n, o, s) { - return (h((t + ((e & i) | (r & ~i)) + n + o) | 0, s) + e) | 0; - } - function c(t, e, r, i, n, o, s) { - return (h((t + (e ^ r ^ i) + n + o) | 0, s) + e) | 0; - } - function l(t, e, r, i, n, o, s) { - return (h((t + (r ^ (e | ~i)) + n + o) | 0, s) + e) | 0; - } - i(a, n), - (a.prototype._update = function () { - for (var t = s, e = 0; e < 16; ++e) t[e] = this._block.readInt32LE(4 * e); - var r = this._a, - i = this._b, - n = this._c, - o = this._d; - (r = u(r, i, n, o, t[0], 3614090360, 7)), - (o = u(o, r, i, n, t[1], 3905402710, 12)), - (n = u(n, o, r, i, t[2], 606105819, 17)), - (i = u(i, n, o, r, t[3], 3250441966, 22)), - (r = u(r, i, n, o, t[4], 4118548399, 7)), - (o = u(o, r, i, n, t[5], 1200080426, 12)), - (n = u(n, o, r, i, t[6], 2821735955, 17)), - (i = u(i, n, o, r, t[7], 4249261313, 22)), - (r = u(r, i, n, o, t[8], 1770035416, 7)), - (o = u(o, r, i, n, t[9], 2336552879, 12)), - (n = u(n, o, r, i, t[10], 4294925233, 17)), - (i = u(i, n, o, r, t[11], 2304563134, 22)), - (r = u(r, i, n, o, t[12], 1804603682, 7)), - (o = u(o, r, i, n, t[13], 4254626195, 12)), - (n = u(n, o, r, i, t[14], 2792965006, 17)), - (r = f(r, (i = u(i, n, o, r, t[15], 1236535329, 22)), n, o, t[1], 4129170786, 5)), - (o = f(o, r, i, n, t[6], 3225465664, 9)), - (n = f(n, o, r, i, t[11], 643717713, 14)), - (i = f(i, n, o, r, t[0], 3921069994, 20)), - (r = f(r, i, n, o, t[5], 3593408605, 5)), - (o = f(o, r, i, n, t[10], 38016083, 9)), - (n = f(n, o, r, i, t[15], 3634488961, 14)), - (i = f(i, n, o, r, t[4], 3889429448, 20)), - (r = f(r, i, n, o, t[9], 568446438, 5)), - (o = f(o, r, i, n, t[14], 3275163606, 9)), - (n = f(n, o, r, i, t[3], 4107603335, 14)), - (i = f(i, n, o, r, t[8], 1163531501, 20)), - (r = f(r, i, n, o, t[13], 2850285829, 5)), - (o = f(o, r, i, n, t[2], 4243563512, 9)), - (n = f(n, o, r, i, t[7], 1735328473, 14)), - (r = c(r, (i = f(i, n, o, r, t[12], 2368359562, 20)), n, o, t[5], 4294588738, 4)), - (o = c(o, r, i, n, t[8], 2272392833, 11)), - (n = c(n, o, r, i, t[11], 1839030562, 16)), - (i = c(i, n, o, r, t[14], 4259657740, 23)), - (r = c(r, i, n, o, t[1], 2763975236, 4)), - (o = c(o, r, i, n, t[4], 1272893353, 11)), - (n = c(n, o, r, i, t[7], 4139469664, 16)), - (i = c(i, n, o, r, t[10], 3200236656, 23)), - (r = c(r, i, n, o, t[13], 681279174, 4)), - (o = c(o, r, i, n, t[0], 3936430074, 11)), - (n = c(n, o, r, i, t[3], 3572445317, 16)), - (i = c(i, n, o, r, t[6], 76029189, 23)), - (r = c(r, i, n, o, t[9], 3654602809, 4)), - (o = c(o, r, i, n, t[12], 3873151461, 11)), - (n = c(n, o, r, i, t[15], 530742520, 16)), - (r = l(r, (i = c(i, n, o, r, t[2], 3299628645, 23)), n, o, t[0], 4096336452, 6)), - (o = l(o, r, i, n, t[7], 1126891415, 10)), - (n = l(n, o, r, i, t[14], 2878612391, 15)), - (i = l(i, n, o, r, t[5], 4237533241, 21)), - (r = l(r, i, n, o, t[12], 1700485571, 6)), - (o = l(o, r, i, n, t[3], 2399980690, 10)), - (n = l(n, o, r, i, t[10], 4293915773, 15)), - (i = l(i, n, o, r, t[1], 2240044497, 21)), - (r = l(r, i, n, o, t[8], 1873313359, 6)), - (o = l(o, r, i, n, t[15], 4264355552, 10)), - (n = l(n, o, r, i, t[6], 2734768916, 15)), - (i = l(i, n, o, r, t[13], 1309151649, 21)), - (r = l(r, i, n, o, t[4], 4149444226, 6)), - (o = l(o, r, i, n, t[11], 3174756917, 10)), - (n = l(n, o, r, i, t[2], 718787259, 15)), - (i = l(i, n, o, r, t[9], 3951481745, 21)), - (this._a = (this._a + r) | 0), - (this._b = (this._b + i) | 0), - (this._c = (this._c + n) | 0), - (this._d = (this._d + o) | 0); - }), - (a.prototype._digest = function () { - (this._block[this._blockOffset++] = 128), - this._blockOffset > 56 && (this._block.fill(0, this._blockOffset, 64), this._update(), (this._blockOffset = 0)), - this._block.fill(0, this._blockOffset, 56), - this._block.writeUInt32LE(this._length[0], 56), - this._block.writeUInt32LE(this._length[1], 60), - this._update(); - var t = o.allocUnsafe(16); - return t.writeInt32LE(this._a, 0), t.writeInt32LE(this._b, 4), t.writeInt32LE(this._c, 8), t.writeInt32LE(this._d, 12), t; - }), - (t.exports = a); - }, - 8773: (t, e, r) => { - var i = r(7929), - n = r(9154); - function o(t) { - this.rand = t || new n.Rand(); - } - (t.exports = o), - (o.create = function (t) { - return new o(t); - }), - (o.prototype._randbelow = function (t) { - var e = t.bitLength(), - r = Math.ceil(e / 8); - do { - var n = new i(this.rand.generate(r)); - } while (n.cmp(t) >= 0); - return n; - }), - (o.prototype._randrange = function (t, e) { - var r = e.sub(t); - return t.add(this._randbelow(r)); - }), - (o.prototype.test = function (t, e, r) { - var n = t.bitLength(), - o = i.mont(t), - s = new i(1).toRed(o); - e || (e = Math.max(1, (n / 48) | 0)); - for (var a = t.subn(1), h = 0; !a.testn(h); h++); - for (var u = t.shrn(h), f = a.toRed(o); e > 0; e--) { - var c = this._randrange(new i(2), a); - r && r(c); - var l = c.toRed(o).redPow(u); - if (0 !== l.cmp(s) && 0 !== l.cmp(f)) { - for (var d = 1; d < h; d++) { - if (0 === (l = l.redSqr()).cmp(s)) return !1; - if (0 === l.cmp(f)) break; - } - if (d === h) return !1; - } - } - return !0; - }), - (o.prototype.getDivisor = function (t, e) { - var r = t.bitLength(), - n = i.mont(t), - o = new i(1).toRed(n); - e || (e = Math.max(1, (r / 48) | 0)); - for (var s = t.subn(1), a = 0; !s.testn(a); a++); - for (var h = t.shrn(a), u = s.toRed(n); e > 0; e--) { - var f = this._randrange(new i(2), s), - c = t.gcd(f); - if (0 !== c.cmpn(1)) return c; - var l = f.toRed(n).redPow(h); - if (0 !== l.cmp(o) && 0 !== l.cmp(u)) { - for (var d = 1; d < a; d++) { - if (0 === (l = l.redSqr()).cmp(o)) return l.fromRed().subn(1).gcd(t); - if (0 === l.cmp(u)) break; - } - if (d === a) return (l = l.redSqr()).fromRed().subn(1).gcd(t); - } - } - return !1; - }); - }, - 7929: function (t, e, r) { - !(function (t, e) { - 'use strict'; - function i(t, e) { - if (!t) throw new Error(e || 'Assertion failed'); - } - function n(t, e) { - t.super_ = e; - var r = function () {}; - (r.prototype = e.prototype), (t.prototype = new r()), (t.prototype.constructor = t); - } - function o(t, e, r) { - if (o.isBN(t)) return t; - (this.negative = 0), - (this.words = null), - (this.length = 0), - (this.red = null), - null !== t && (('le' !== e && 'be' !== e) || ((r = e), (e = 10)), this._init(t || 0, e || 10, r || 'be')); - } - var s; - 'object' == typeof t ? (t.exports = o) : (e.BN = o), (o.BN = o), (o.wordSize = 26); - try { - s = 'undefined' != typeof window && void 0 !== window.Buffer ? window.Buffer : r(7523).Buffer; - } catch (t) {} - function a(t, e) { - var r = t.charCodeAt(e); - return r >= 65 && r <= 70 ? r - 55 : r >= 97 && r <= 102 ? r - 87 : (r - 48) & 15; - } - function h(t, e, r) { - var i = a(t, r); - return r - 1 >= e && (i |= a(t, r - 1) << 4), i; - } - function u(t, e, r, i) { - for (var n = 0, o = Math.min(t.length, r), s = e; s < o; s++) { - var a = t.charCodeAt(s) - 48; - (n *= i), (n += a >= 49 ? a - 49 + 10 : a >= 17 ? a - 17 + 10 : a); - } - return n; - } - (o.isBN = function (t) { - return ( - t instanceof o || (null !== t && 'object' == typeof t && t.constructor.wordSize === o.wordSize && Array.isArray(t.words)) - ); - }), - (o.max = function (t, e) { - return t.cmp(e) > 0 ? t : e; - }), - (o.min = function (t, e) { - return t.cmp(e) < 0 ? t : e; - }), - (o.prototype._init = function (t, e, r) { - if ('number' == typeof t) return this._initNumber(t, e, r); - if ('object' == typeof t) return this._initArray(t, e, r); - 'hex' === e && (e = 16), i(e === (0 | e) && e >= 2 && e <= 36); - var n = 0; - '-' === (t = t.toString().replace(/\s+/g, ''))[0] && (n++, (this.negative = 1)), - n < t.length && - (16 === e ? this._parseHex(t, n, r) : (this._parseBase(t, e, n), 'le' === r && this._initArray(this.toArray(), e, r))); - }), - (o.prototype._initNumber = function (t, e, r) { - t < 0 && ((this.negative = 1), (t = -t)), - t < 67108864 - ? ((this.words = [67108863 & t]), (this.length = 1)) - : t < 4503599627370496 - ? ((this.words = [67108863 & t, (t / 67108864) & 67108863]), (this.length = 2)) - : (i(t < 9007199254740992), (this.words = [67108863 & t, (t / 67108864) & 67108863, 1]), (this.length = 3)), - 'le' === r && this._initArray(this.toArray(), e, r); - }), - (o.prototype._initArray = function (t, e, r) { - if ((i('number' == typeof t.length), t.length <= 0)) return (this.words = [0]), (this.length = 1), this; - (this.length = Math.ceil(t.length / 3)), (this.words = new Array(this.length)); - for (var n = 0; n < this.length; n++) this.words[n] = 0; - var o, - s, - a = 0; - if ('be' === r) - for (n = t.length - 1, o = 0; n >= 0; n -= 3) - (s = t[n] | (t[n - 1] << 8) | (t[n - 2] << 16)), - (this.words[o] |= (s << a) & 67108863), - (this.words[o + 1] = (s >>> (26 - a)) & 67108863), - (a += 24) >= 26 && ((a -= 26), o++); - else if ('le' === r) - for (n = 0, o = 0; n < t.length; n += 3) - (s = t[n] | (t[n + 1] << 8) | (t[n + 2] << 16)), - (this.words[o] |= (s << a) & 67108863), - (this.words[o + 1] = (s >>> (26 - a)) & 67108863), - (a += 24) >= 26 && ((a -= 26), o++); - return this.strip(); - }), - (o.prototype._parseHex = function (t, e, r) { - (this.length = Math.ceil((t.length - e) / 6)), (this.words = new Array(this.length)); - for (var i = 0; i < this.length; i++) this.words[i] = 0; - var n, - o = 0, - s = 0; - if ('be' === r) - for (i = t.length - 1; i >= e; i -= 2) - (n = h(t, e, i) << o), - (this.words[s] |= 67108863 & n), - o >= 18 ? ((o -= 18), (s += 1), (this.words[s] |= n >>> 26)) : (o += 8); - else - for (i = (t.length - e) % 2 == 0 ? e + 1 : e; i < t.length; i += 2) - (n = h(t, e, i) << o), - (this.words[s] |= 67108863 & n), - o >= 18 ? ((o -= 18), (s += 1), (this.words[s] |= n >>> 26)) : (o += 8); - this.strip(); - }), - (o.prototype._parseBase = function (t, e, r) { - (this.words = [0]), (this.length = 1); - for (var i = 0, n = 1; n <= 67108863; n *= e) i++; - i--, (n = (n / e) | 0); - for (var o = t.length - r, s = o % i, a = Math.min(o, o - s) + r, h = 0, f = r; f < a; f += i) - (h = u(t, f, f + i, e)), this.imuln(n), this.words[0] + h < 67108864 ? (this.words[0] += h) : this._iaddn(h); - if (0 !== s) { - var c = 1; - for (h = u(t, f, t.length, e), f = 0; f < s; f++) c *= e; - this.imuln(c), this.words[0] + h < 67108864 ? (this.words[0] += h) : this._iaddn(h); - } - this.strip(); - }), - (o.prototype.copy = function (t) { - t.words = new Array(this.length); - for (var e = 0; e < this.length; e++) t.words[e] = this.words[e]; - (t.length = this.length), (t.negative = this.negative), (t.red = this.red); - }), - (o.prototype.clone = function () { - var t = new o(null); - return this.copy(t), t; - }), - (o.prototype._expand = function (t) { - for (; this.length < t; ) this.words[this.length++] = 0; - return this; - }), - (o.prototype.strip = function () { - for (; this.length > 1 && 0 === this.words[this.length - 1]; ) this.length--; - return this._normSign(); - }), - (o.prototype._normSign = function () { - return 1 === this.length && 0 === this.words[0] && (this.negative = 0), this; - }), - (o.prototype.inspect = function () { - return (this.red ? ''; - }); - var f = [ - '', - '0', - '00', - '000', - '0000', - '00000', - '000000', - '0000000', - '00000000', - '000000000', - '0000000000', - '00000000000', - '000000000000', - '0000000000000', - '00000000000000', - '000000000000000', - '0000000000000000', - '00000000000000000', - '000000000000000000', - '0000000000000000000', - '00000000000000000000', - '000000000000000000000', - '0000000000000000000000', - '00000000000000000000000', - '000000000000000000000000', - '0000000000000000000000000', - ], - c = [0, 0, 25, 16, 12, 11, 10, 9, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5], - l = [ - 0, 0, 33554432, 43046721, 16777216, 48828125, 60466176, 40353607, 16777216, 43046721, 1e7, 19487171, 35831808, 62748517, - 7529536, 11390625, 16777216, 24137569, 34012224, 47045881, 64e6, 4084101, 5153632, 6436343, 7962624, 9765625, 11881376, - 14348907, 17210368, 20511149, 243e5, 28629151, 33554432, 39135393, 45435424, 52521875, 60466176, - ]; - function d(t, e, r) { - r.negative = e.negative ^ t.negative; - var i = (t.length + e.length) | 0; - (r.length = i), (i = (i - 1) | 0); - var n = 0 | t.words[0], - o = 0 | e.words[0], - s = n * o, - a = 67108863 & s, - h = (s / 67108864) | 0; - r.words[0] = a; - for (var u = 1; u < i; u++) { - for (var f = h >>> 26, c = 67108863 & h, l = Math.min(u, e.length - 1), d = Math.max(0, u - t.length + 1); d <= l; d++) { - var p = (u - d) | 0; - (f += ((s = (n = 0 | t.words[p]) * (o = 0 | e.words[d]) + c) / 67108864) | 0), (c = 67108863 & s); - } - (r.words[u] = 0 | c), (h = 0 | f); - } - return 0 !== h ? (r.words[u] = 0 | h) : r.length--, r.strip(); - } - (o.prototype.toString = function (t, e) { - var r; - if (((e = 0 | e || 1), 16 === (t = t || 10) || 'hex' === t)) { - r = ''; - for (var n = 0, o = 0, s = 0; s < this.length; s++) { - var a = this.words[s], - h = (16777215 & ((a << n) | o)).toString(16); - (r = 0 != (o = (a >>> (24 - n)) & 16777215) || s !== this.length - 1 ? f[6 - h.length] + h + r : h + r), - (n += 2) >= 26 && ((n -= 26), s--); - } - for (0 !== o && (r = o.toString(16) + r); r.length % e != 0; ) r = '0' + r; - return 0 !== this.negative && (r = '-' + r), r; - } - if (t === (0 | t) && t >= 2 && t <= 36) { - var u = c[t], - d = l[t]; - r = ''; - var p = this.clone(); - for (p.negative = 0; !p.isZero(); ) { - var m = p.modn(d).toString(t); - r = (p = p.idivn(d)).isZero() ? m + r : f[u - m.length] + m + r; - } - for (this.isZero() && (r = '0' + r); r.length % e != 0; ) r = '0' + r; - return 0 !== this.negative && (r = '-' + r), r; - } - i(!1, 'Base should be between 2 and 36'); - }), - (o.prototype.toNumber = function () { - var t = this.words[0]; - return ( - 2 === this.length - ? (t += 67108864 * this.words[1]) - : 3 === this.length && 1 === this.words[2] - ? (t += 4503599627370496 + 67108864 * this.words[1]) - : this.length > 2 && i(!1, 'Number can only safely store up to 53 bits'), - 0 !== this.negative ? -t : t - ); - }), - (o.prototype.toJSON = function () { - return this.toString(16); - }), - (o.prototype.toBuffer = function (t, e) { - return i(void 0 !== s), this.toArrayLike(s, t, e); - }), - (o.prototype.toArray = function (t, e) { - return this.toArrayLike(Array, t, e); - }), - (o.prototype.toArrayLike = function (t, e, r) { - var n = this.byteLength(), - o = r || Math.max(1, n); - i(n <= o, 'byte array longer than desired length'), i(o > 0, 'Requested array length <= 0'), this.strip(); - var s, - a, - h = 'le' === e, - u = new t(o), - f = this.clone(); - if (h) { - for (a = 0; !f.isZero(); a++) (s = f.andln(255)), f.iushrn(8), (u[a] = s); - for (; a < o; a++) u[a] = 0; - } else { - for (a = 0; a < o - n; a++) u[a] = 0; - for (a = 0; !f.isZero(); a++) (s = f.andln(255)), f.iushrn(8), (u[o - a - 1] = s); - } - return u; - }), - Math.clz32 - ? (o.prototype._countBits = function (t) { - return 32 - Math.clz32(t); - }) - : (o.prototype._countBits = function (t) { - var e = t, - r = 0; - return ( - e >= 4096 && ((r += 13), (e >>>= 13)), - e >= 64 && ((r += 7), (e >>>= 7)), - e >= 8 && ((r += 4), (e >>>= 4)), - e >= 2 && ((r += 2), (e >>>= 2)), - r + e - ); - }), - (o.prototype._zeroBits = function (t) { - if (0 === t) return 26; - var e = t, - r = 0; - return ( - 0 == (8191 & e) && ((r += 13), (e >>>= 13)), - 0 == (127 & e) && ((r += 7), (e >>>= 7)), - 0 == (15 & e) && ((r += 4), (e >>>= 4)), - 0 == (3 & e) && ((r += 2), (e >>>= 2)), - 0 == (1 & e) && r++, - r - ); - }), - (o.prototype.bitLength = function () { - var t = this.words[this.length - 1], - e = this._countBits(t); - return 26 * (this.length - 1) + e; - }), - (o.prototype.zeroBits = function () { - if (this.isZero()) return 0; - for (var t = 0, e = 0; e < this.length; e++) { - var r = this._zeroBits(this.words[e]); - if (((t += r), 26 !== r)) break; - } - return t; - }), - (o.prototype.byteLength = function () { - return Math.ceil(this.bitLength() / 8); - }), - (o.prototype.toTwos = function (t) { - return 0 !== this.negative ? this.abs().inotn(t).iaddn(1) : this.clone(); - }), - (o.prototype.fromTwos = function (t) { - return this.testn(t - 1) ? this.notn(t).iaddn(1).ineg() : this.clone(); - }), - (o.prototype.isNeg = function () { - return 0 !== this.negative; - }), - (o.prototype.neg = function () { - return this.clone().ineg(); - }), - (o.prototype.ineg = function () { - return this.isZero() || (this.negative ^= 1), this; - }), - (o.prototype.iuor = function (t) { - for (; this.length < t.length; ) this.words[this.length++] = 0; - for (var e = 0; e < t.length; e++) this.words[e] = this.words[e] | t.words[e]; - return this.strip(); - }), - (o.prototype.ior = function (t) { - return i(0 == (this.negative | t.negative)), this.iuor(t); - }), - (o.prototype.or = function (t) { - return this.length > t.length ? this.clone().ior(t) : t.clone().ior(this); - }), - (o.prototype.uor = function (t) { - return this.length > t.length ? this.clone().iuor(t) : t.clone().iuor(this); - }), - (o.prototype.iuand = function (t) { - var e; - e = this.length > t.length ? t : this; - for (var r = 0; r < e.length; r++) this.words[r] = this.words[r] & t.words[r]; - return (this.length = e.length), this.strip(); - }), - (o.prototype.iand = function (t) { - return i(0 == (this.negative | t.negative)), this.iuand(t); - }), - (o.prototype.and = function (t) { - return this.length > t.length ? this.clone().iand(t) : t.clone().iand(this); - }), - (o.prototype.uand = function (t) { - return this.length > t.length ? this.clone().iuand(t) : t.clone().iuand(this); - }), - (o.prototype.iuxor = function (t) { - var e, r; - this.length > t.length ? ((e = this), (r = t)) : ((e = t), (r = this)); - for (var i = 0; i < r.length; i++) this.words[i] = e.words[i] ^ r.words[i]; - if (this !== e) for (; i < e.length; i++) this.words[i] = e.words[i]; - return (this.length = e.length), this.strip(); - }), - (o.prototype.ixor = function (t) { - return i(0 == (this.negative | t.negative)), this.iuxor(t); - }), - (o.prototype.xor = function (t) { - return this.length > t.length ? this.clone().ixor(t) : t.clone().ixor(this); - }), - (o.prototype.uxor = function (t) { - return this.length > t.length ? this.clone().iuxor(t) : t.clone().iuxor(this); - }), - (o.prototype.inotn = function (t) { - i('number' == typeof t && t >= 0); - var e = 0 | Math.ceil(t / 26), - r = t % 26; - this._expand(e), r > 0 && e--; - for (var n = 0; n < e; n++) this.words[n] = 67108863 & ~this.words[n]; - return r > 0 && (this.words[n] = ~this.words[n] & (67108863 >> (26 - r))), this.strip(); - }), - (o.prototype.notn = function (t) { - return this.clone().inotn(t); - }), - (o.prototype.setn = function (t, e) { - i('number' == typeof t && t >= 0); - var r = (t / 26) | 0, - n = t % 26; - return this._expand(r + 1), (this.words[r] = e ? this.words[r] | (1 << n) : this.words[r] & ~(1 << n)), this.strip(); - }), - (o.prototype.iadd = function (t) { - var e, r, i; - if (0 !== this.negative && 0 === t.negative) - return (this.negative = 0), (e = this.isub(t)), (this.negative ^= 1), this._normSign(); - if (0 === this.negative && 0 !== t.negative) return (t.negative = 0), (e = this.isub(t)), (t.negative = 1), e._normSign(); - this.length > t.length ? ((r = this), (i = t)) : ((r = t), (i = this)); - for (var n = 0, o = 0; o < i.length; o++) - (e = (0 | r.words[o]) + (0 | i.words[o]) + n), (this.words[o] = 67108863 & e), (n = e >>> 26); - for (; 0 !== n && o < r.length; o++) (e = (0 | r.words[o]) + n), (this.words[o] = 67108863 & e), (n = e >>> 26); - if (((this.length = r.length), 0 !== n)) (this.words[this.length] = n), this.length++; - else if (r !== this) for (; o < r.length; o++) this.words[o] = r.words[o]; - return this; - }), - (o.prototype.add = function (t) { - var e; - return 0 !== t.negative && 0 === this.negative - ? ((t.negative = 0), (e = this.sub(t)), (t.negative ^= 1), e) - : 0 === t.negative && 0 !== this.negative - ? ((this.negative = 0), (e = t.sub(this)), (this.negative = 1), e) - : this.length > t.length - ? this.clone().iadd(t) - : t.clone().iadd(this); - }), - (o.prototype.isub = function (t) { - if (0 !== t.negative) { - t.negative = 0; - var e = this.iadd(t); - return (t.negative = 1), e._normSign(); - } - if (0 !== this.negative) return (this.negative = 0), this.iadd(t), (this.negative = 1), this._normSign(); - var r, - i, - n = this.cmp(t); - if (0 === n) return (this.negative = 0), (this.length = 1), (this.words[0] = 0), this; - n > 0 ? ((r = this), (i = t)) : ((r = t), (i = this)); - for (var o = 0, s = 0; s < i.length; s++) - (o = (e = (0 | r.words[s]) - (0 | i.words[s]) + o) >> 26), (this.words[s] = 67108863 & e); - for (; 0 !== o && s < r.length; s++) (o = (e = (0 | r.words[s]) + o) >> 26), (this.words[s] = 67108863 & e); - if (0 === o && s < r.length && r !== this) for (; s < r.length; s++) this.words[s] = r.words[s]; - return (this.length = Math.max(this.length, s)), r !== this && (this.negative = 1), this.strip(); - }), - (o.prototype.sub = function (t) { - return this.clone().isub(t); - }); - var p = function (t, e, r) { - var i, - n, - o, - s = t.words, - a = e.words, - h = r.words, - u = 0, - f = 0 | s[0], - c = 8191 & f, - l = f >>> 13, - d = 0 | s[1], - p = 8191 & d, - m = d >>> 13, - g = 0 | s[2], - b = 8191 & g, - y = g >>> 13, - v = 0 | s[3], - w = 8191 & v, - _ = v >>> 13, - M = 0 | s[4], - E = 8191 & M, - S = M >>> 13, - x = 0 | s[5], - A = 8191 & x, - k = x >>> 13, - R = 0 | s[6], - B = 8191 & R, - I = R >>> 13, - T = 0 | s[7], - P = 8191 & T, - O = T >>> 13, - L = 0 | s[8], - C = 8191 & L, - N = L >>> 13, - j = 0 | s[9], - U = 8191 & j, - D = j >>> 13, - z = 0 | a[0], - F = 8191 & z, - q = z >>> 13, - H = 0 | a[1], - $ = 8191 & H, - Z = H >>> 13, - G = 0 | a[2], - V = 8191 & G, - W = G >>> 13, - K = 0 | a[3], - Y = 8191 & K, - J = K >>> 13, - X = 0 | a[4], - Q = 8191 & X, - tt = X >>> 13, - et = 0 | a[5], - rt = 8191 & et, - it = et >>> 13, - nt = 0 | a[6], - ot = 8191 & nt, - st = nt >>> 13, - at = 0 | a[7], - ht = 8191 & at, - ut = at >>> 13, - ft = 0 | a[8], - ct = 8191 & ft, - lt = ft >>> 13, - dt = 0 | a[9], - pt = 8191 & dt, - mt = dt >>> 13; - (r.negative = t.negative ^ e.negative), (r.length = 19); - var gt = (((u + (i = Math.imul(c, F))) | 0) + ((8191 & (n = ((n = Math.imul(c, q)) + Math.imul(l, F)) | 0)) << 13)) | 0; - (u = ((((o = Math.imul(l, q)) + (n >>> 13)) | 0) + (gt >>> 26)) | 0), - (gt &= 67108863), - (i = Math.imul(p, F)), - (n = ((n = Math.imul(p, q)) + Math.imul(m, F)) | 0), - (o = Math.imul(m, q)); - var bt = - (((u + (i = (i + Math.imul(c, $)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, Z)) | 0) + Math.imul(l, $)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, Z)) | 0) + (n >>> 13)) | 0) + (bt >>> 26)) | 0), - (bt &= 67108863), - (i = Math.imul(b, F)), - (n = ((n = Math.imul(b, q)) + Math.imul(y, F)) | 0), - (o = Math.imul(y, q)), - (i = (i + Math.imul(p, $)) | 0), - (n = ((n = (n + Math.imul(p, Z)) | 0) + Math.imul(m, $)) | 0), - (o = (o + Math.imul(m, Z)) | 0); - var yt = - (((u + (i = (i + Math.imul(c, V)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, W)) | 0) + Math.imul(l, V)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, W)) | 0) + (n >>> 13)) | 0) + (yt >>> 26)) | 0), - (yt &= 67108863), - (i = Math.imul(w, F)), - (n = ((n = Math.imul(w, q)) + Math.imul(_, F)) | 0), - (o = Math.imul(_, q)), - (i = (i + Math.imul(b, $)) | 0), - (n = ((n = (n + Math.imul(b, Z)) | 0) + Math.imul(y, $)) | 0), - (o = (o + Math.imul(y, Z)) | 0), - (i = (i + Math.imul(p, V)) | 0), - (n = ((n = (n + Math.imul(p, W)) | 0) + Math.imul(m, V)) | 0), - (o = (o + Math.imul(m, W)) | 0); - var vt = - (((u + (i = (i + Math.imul(c, Y)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, J)) | 0) + Math.imul(l, Y)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, J)) | 0) + (n >>> 13)) | 0) + (vt >>> 26)) | 0), - (vt &= 67108863), - (i = Math.imul(E, F)), - (n = ((n = Math.imul(E, q)) + Math.imul(S, F)) | 0), - (o = Math.imul(S, q)), - (i = (i + Math.imul(w, $)) | 0), - (n = ((n = (n + Math.imul(w, Z)) | 0) + Math.imul(_, $)) | 0), - (o = (o + Math.imul(_, Z)) | 0), - (i = (i + Math.imul(b, V)) | 0), - (n = ((n = (n + Math.imul(b, W)) | 0) + Math.imul(y, V)) | 0), - (o = (o + Math.imul(y, W)) | 0), - (i = (i + Math.imul(p, Y)) | 0), - (n = ((n = (n + Math.imul(p, J)) | 0) + Math.imul(m, Y)) | 0), - (o = (o + Math.imul(m, J)) | 0); - var wt = - (((u + (i = (i + Math.imul(c, Q)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, tt)) | 0) + Math.imul(l, Q)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, tt)) | 0) + (n >>> 13)) | 0) + (wt >>> 26)) | 0), - (wt &= 67108863), - (i = Math.imul(A, F)), - (n = ((n = Math.imul(A, q)) + Math.imul(k, F)) | 0), - (o = Math.imul(k, q)), - (i = (i + Math.imul(E, $)) | 0), - (n = ((n = (n + Math.imul(E, Z)) | 0) + Math.imul(S, $)) | 0), - (o = (o + Math.imul(S, Z)) | 0), - (i = (i + Math.imul(w, V)) | 0), - (n = ((n = (n + Math.imul(w, W)) | 0) + Math.imul(_, V)) | 0), - (o = (o + Math.imul(_, W)) | 0), - (i = (i + Math.imul(b, Y)) | 0), - (n = ((n = (n + Math.imul(b, J)) | 0) + Math.imul(y, Y)) | 0), - (o = (o + Math.imul(y, J)) | 0), - (i = (i + Math.imul(p, Q)) | 0), - (n = ((n = (n + Math.imul(p, tt)) | 0) + Math.imul(m, Q)) | 0), - (o = (o + Math.imul(m, tt)) | 0); - var _t = - (((u + (i = (i + Math.imul(c, rt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, it)) | 0) + Math.imul(l, rt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, it)) | 0) + (n >>> 13)) | 0) + (_t >>> 26)) | 0), - (_t &= 67108863), - (i = Math.imul(B, F)), - (n = ((n = Math.imul(B, q)) + Math.imul(I, F)) | 0), - (o = Math.imul(I, q)), - (i = (i + Math.imul(A, $)) | 0), - (n = ((n = (n + Math.imul(A, Z)) | 0) + Math.imul(k, $)) | 0), - (o = (o + Math.imul(k, Z)) | 0), - (i = (i + Math.imul(E, V)) | 0), - (n = ((n = (n + Math.imul(E, W)) | 0) + Math.imul(S, V)) | 0), - (o = (o + Math.imul(S, W)) | 0), - (i = (i + Math.imul(w, Y)) | 0), - (n = ((n = (n + Math.imul(w, J)) | 0) + Math.imul(_, Y)) | 0), - (o = (o + Math.imul(_, J)) | 0), - (i = (i + Math.imul(b, Q)) | 0), - (n = ((n = (n + Math.imul(b, tt)) | 0) + Math.imul(y, Q)) | 0), - (o = (o + Math.imul(y, tt)) | 0), - (i = (i + Math.imul(p, rt)) | 0), - (n = ((n = (n + Math.imul(p, it)) | 0) + Math.imul(m, rt)) | 0), - (o = (o + Math.imul(m, it)) | 0); - var Mt = - (((u + (i = (i + Math.imul(c, ot)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, st)) | 0) + Math.imul(l, ot)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, st)) | 0) + (n >>> 13)) | 0) + (Mt >>> 26)) | 0), - (Mt &= 67108863), - (i = Math.imul(P, F)), - (n = ((n = Math.imul(P, q)) + Math.imul(O, F)) | 0), - (o = Math.imul(O, q)), - (i = (i + Math.imul(B, $)) | 0), - (n = ((n = (n + Math.imul(B, Z)) | 0) + Math.imul(I, $)) | 0), - (o = (o + Math.imul(I, Z)) | 0), - (i = (i + Math.imul(A, V)) | 0), - (n = ((n = (n + Math.imul(A, W)) | 0) + Math.imul(k, V)) | 0), - (o = (o + Math.imul(k, W)) | 0), - (i = (i + Math.imul(E, Y)) | 0), - (n = ((n = (n + Math.imul(E, J)) | 0) + Math.imul(S, Y)) | 0), - (o = (o + Math.imul(S, J)) | 0), - (i = (i + Math.imul(w, Q)) | 0), - (n = ((n = (n + Math.imul(w, tt)) | 0) + Math.imul(_, Q)) | 0), - (o = (o + Math.imul(_, tt)) | 0), - (i = (i + Math.imul(b, rt)) | 0), - (n = ((n = (n + Math.imul(b, it)) | 0) + Math.imul(y, rt)) | 0), - (o = (o + Math.imul(y, it)) | 0), - (i = (i + Math.imul(p, ot)) | 0), - (n = ((n = (n + Math.imul(p, st)) | 0) + Math.imul(m, ot)) | 0), - (o = (o + Math.imul(m, st)) | 0); - var Et = - (((u + (i = (i + Math.imul(c, ht)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, ut)) | 0) + Math.imul(l, ht)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, ut)) | 0) + (n >>> 13)) | 0) + (Et >>> 26)) | 0), - (Et &= 67108863), - (i = Math.imul(C, F)), - (n = ((n = Math.imul(C, q)) + Math.imul(N, F)) | 0), - (o = Math.imul(N, q)), - (i = (i + Math.imul(P, $)) | 0), - (n = ((n = (n + Math.imul(P, Z)) | 0) + Math.imul(O, $)) | 0), - (o = (o + Math.imul(O, Z)) | 0), - (i = (i + Math.imul(B, V)) | 0), - (n = ((n = (n + Math.imul(B, W)) | 0) + Math.imul(I, V)) | 0), - (o = (o + Math.imul(I, W)) | 0), - (i = (i + Math.imul(A, Y)) | 0), - (n = ((n = (n + Math.imul(A, J)) | 0) + Math.imul(k, Y)) | 0), - (o = (o + Math.imul(k, J)) | 0), - (i = (i + Math.imul(E, Q)) | 0), - (n = ((n = (n + Math.imul(E, tt)) | 0) + Math.imul(S, Q)) | 0), - (o = (o + Math.imul(S, tt)) | 0), - (i = (i + Math.imul(w, rt)) | 0), - (n = ((n = (n + Math.imul(w, it)) | 0) + Math.imul(_, rt)) | 0), - (o = (o + Math.imul(_, it)) | 0), - (i = (i + Math.imul(b, ot)) | 0), - (n = ((n = (n + Math.imul(b, st)) | 0) + Math.imul(y, ot)) | 0), - (o = (o + Math.imul(y, st)) | 0), - (i = (i + Math.imul(p, ht)) | 0), - (n = ((n = (n + Math.imul(p, ut)) | 0) + Math.imul(m, ht)) | 0), - (o = (o + Math.imul(m, ut)) | 0); - var St = - (((u + (i = (i + Math.imul(c, ct)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, lt)) | 0) + Math.imul(l, ct)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, lt)) | 0) + (n >>> 13)) | 0) + (St >>> 26)) | 0), - (St &= 67108863), - (i = Math.imul(U, F)), - (n = ((n = Math.imul(U, q)) + Math.imul(D, F)) | 0), - (o = Math.imul(D, q)), - (i = (i + Math.imul(C, $)) | 0), - (n = ((n = (n + Math.imul(C, Z)) | 0) + Math.imul(N, $)) | 0), - (o = (o + Math.imul(N, Z)) | 0), - (i = (i + Math.imul(P, V)) | 0), - (n = ((n = (n + Math.imul(P, W)) | 0) + Math.imul(O, V)) | 0), - (o = (o + Math.imul(O, W)) | 0), - (i = (i + Math.imul(B, Y)) | 0), - (n = ((n = (n + Math.imul(B, J)) | 0) + Math.imul(I, Y)) | 0), - (o = (o + Math.imul(I, J)) | 0), - (i = (i + Math.imul(A, Q)) | 0), - (n = ((n = (n + Math.imul(A, tt)) | 0) + Math.imul(k, Q)) | 0), - (o = (o + Math.imul(k, tt)) | 0), - (i = (i + Math.imul(E, rt)) | 0), - (n = ((n = (n + Math.imul(E, it)) | 0) + Math.imul(S, rt)) | 0), - (o = (o + Math.imul(S, it)) | 0), - (i = (i + Math.imul(w, ot)) | 0), - (n = ((n = (n + Math.imul(w, st)) | 0) + Math.imul(_, ot)) | 0), - (o = (o + Math.imul(_, st)) | 0), - (i = (i + Math.imul(b, ht)) | 0), - (n = ((n = (n + Math.imul(b, ut)) | 0) + Math.imul(y, ht)) | 0), - (o = (o + Math.imul(y, ut)) | 0), - (i = (i + Math.imul(p, ct)) | 0), - (n = ((n = (n + Math.imul(p, lt)) | 0) + Math.imul(m, ct)) | 0), - (o = (o + Math.imul(m, lt)) | 0); - var xt = - (((u + (i = (i + Math.imul(c, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, mt)) | 0) + Math.imul(l, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, mt)) | 0) + (n >>> 13)) | 0) + (xt >>> 26)) | 0), - (xt &= 67108863), - (i = Math.imul(U, $)), - (n = ((n = Math.imul(U, Z)) + Math.imul(D, $)) | 0), - (o = Math.imul(D, Z)), - (i = (i + Math.imul(C, V)) | 0), - (n = ((n = (n + Math.imul(C, W)) | 0) + Math.imul(N, V)) | 0), - (o = (o + Math.imul(N, W)) | 0), - (i = (i + Math.imul(P, Y)) | 0), - (n = ((n = (n + Math.imul(P, J)) | 0) + Math.imul(O, Y)) | 0), - (o = (o + Math.imul(O, J)) | 0), - (i = (i + Math.imul(B, Q)) | 0), - (n = ((n = (n + Math.imul(B, tt)) | 0) + Math.imul(I, Q)) | 0), - (o = (o + Math.imul(I, tt)) | 0), - (i = (i + Math.imul(A, rt)) | 0), - (n = ((n = (n + Math.imul(A, it)) | 0) + Math.imul(k, rt)) | 0), - (o = (o + Math.imul(k, it)) | 0), - (i = (i + Math.imul(E, ot)) | 0), - (n = ((n = (n + Math.imul(E, st)) | 0) + Math.imul(S, ot)) | 0), - (o = (o + Math.imul(S, st)) | 0), - (i = (i + Math.imul(w, ht)) | 0), - (n = ((n = (n + Math.imul(w, ut)) | 0) + Math.imul(_, ht)) | 0), - (o = (o + Math.imul(_, ut)) | 0), - (i = (i + Math.imul(b, ct)) | 0), - (n = ((n = (n + Math.imul(b, lt)) | 0) + Math.imul(y, ct)) | 0), - (o = (o + Math.imul(y, lt)) | 0); - var At = - (((u + (i = (i + Math.imul(p, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(p, mt)) | 0) + Math.imul(m, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(m, mt)) | 0) + (n >>> 13)) | 0) + (At >>> 26)) | 0), - (At &= 67108863), - (i = Math.imul(U, V)), - (n = ((n = Math.imul(U, W)) + Math.imul(D, V)) | 0), - (o = Math.imul(D, W)), - (i = (i + Math.imul(C, Y)) | 0), - (n = ((n = (n + Math.imul(C, J)) | 0) + Math.imul(N, Y)) | 0), - (o = (o + Math.imul(N, J)) | 0), - (i = (i + Math.imul(P, Q)) | 0), - (n = ((n = (n + Math.imul(P, tt)) | 0) + Math.imul(O, Q)) | 0), - (o = (o + Math.imul(O, tt)) | 0), - (i = (i + Math.imul(B, rt)) | 0), - (n = ((n = (n + Math.imul(B, it)) | 0) + Math.imul(I, rt)) | 0), - (o = (o + Math.imul(I, it)) | 0), - (i = (i + Math.imul(A, ot)) | 0), - (n = ((n = (n + Math.imul(A, st)) | 0) + Math.imul(k, ot)) | 0), - (o = (o + Math.imul(k, st)) | 0), - (i = (i + Math.imul(E, ht)) | 0), - (n = ((n = (n + Math.imul(E, ut)) | 0) + Math.imul(S, ht)) | 0), - (o = (o + Math.imul(S, ut)) | 0), - (i = (i + Math.imul(w, ct)) | 0), - (n = ((n = (n + Math.imul(w, lt)) | 0) + Math.imul(_, ct)) | 0), - (o = (o + Math.imul(_, lt)) | 0); - var kt = - (((u + (i = (i + Math.imul(b, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(b, mt)) | 0) + Math.imul(y, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(y, mt)) | 0) + (n >>> 13)) | 0) + (kt >>> 26)) | 0), - (kt &= 67108863), - (i = Math.imul(U, Y)), - (n = ((n = Math.imul(U, J)) + Math.imul(D, Y)) | 0), - (o = Math.imul(D, J)), - (i = (i + Math.imul(C, Q)) | 0), - (n = ((n = (n + Math.imul(C, tt)) | 0) + Math.imul(N, Q)) | 0), - (o = (o + Math.imul(N, tt)) | 0), - (i = (i + Math.imul(P, rt)) | 0), - (n = ((n = (n + Math.imul(P, it)) | 0) + Math.imul(O, rt)) | 0), - (o = (o + Math.imul(O, it)) | 0), - (i = (i + Math.imul(B, ot)) | 0), - (n = ((n = (n + Math.imul(B, st)) | 0) + Math.imul(I, ot)) | 0), - (o = (o + Math.imul(I, st)) | 0), - (i = (i + Math.imul(A, ht)) | 0), - (n = ((n = (n + Math.imul(A, ut)) | 0) + Math.imul(k, ht)) | 0), - (o = (o + Math.imul(k, ut)) | 0), - (i = (i + Math.imul(E, ct)) | 0), - (n = ((n = (n + Math.imul(E, lt)) | 0) + Math.imul(S, ct)) | 0), - (o = (o + Math.imul(S, lt)) | 0); - var Rt = - (((u + (i = (i + Math.imul(w, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(w, mt)) | 0) + Math.imul(_, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(_, mt)) | 0) + (n >>> 13)) | 0) + (Rt >>> 26)) | 0), - (Rt &= 67108863), - (i = Math.imul(U, Q)), - (n = ((n = Math.imul(U, tt)) + Math.imul(D, Q)) | 0), - (o = Math.imul(D, tt)), - (i = (i + Math.imul(C, rt)) | 0), - (n = ((n = (n + Math.imul(C, it)) | 0) + Math.imul(N, rt)) | 0), - (o = (o + Math.imul(N, it)) | 0), - (i = (i + Math.imul(P, ot)) | 0), - (n = ((n = (n + Math.imul(P, st)) | 0) + Math.imul(O, ot)) | 0), - (o = (o + Math.imul(O, st)) | 0), - (i = (i + Math.imul(B, ht)) | 0), - (n = ((n = (n + Math.imul(B, ut)) | 0) + Math.imul(I, ht)) | 0), - (o = (o + Math.imul(I, ut)) | 0), - (i = (i + Math.imul(A, ct)) | 0), - (n = ((n = (n + Math.imul(A, lt)) | 0) + Math.imul(k, ct)) | 0), - (o = (o + Math.imul(k, lt)) | 0); - var Bt = - (((u + (i = (i + Math.imul(E, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(E, mt)) | 0) + Math.imul(S, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(S, mt)) | 0) + (n >>> 13)) | 0) + (Bt >>> 26)) | 0), - (Bt &= 67108863), - (i = Math.imul(U, rt)), - (n = ((n = Math.imul(U, it)) + Math.imul(D, rt)) | 0), - (o = Math.imul(D, it)), - (i = (i + Math.imul(C, ot)) | 0), - (n = ((n = (n + Math.imul(C, st)) | 0) + Math.imul(N, ot)) | 0), - (o = (o + Math.imul(N, st)) | 0), - (i = (i + Math.imul(P, ht)) | 0), - (n = ((n = (n + Math.imul(P, ut)) | 0) + Math.imul(O, ht)) | 0), - (o = (o + Math.imul(O, ut)) | 0), - (i = (i + Math.imul(B, ct)) | 0), - (n = ((n = (n + Math.imul(B, lt)) | 0) + Math.imul(I, ct)) | 0), - (o = (o + Math.imul(I, lt)) | 0); - var It = - (((u + (i = (i + Math.imul(A, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(A, mt)) | 0) + Math.imul(k, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(k, mt)) | 0) + (n >>> 13)) | 0) + (It >>> 26)) | 0), - (It &= 67108863), - (i = Math.imul(U, ot)), - (n = ((n = Math.imul(U, st)) + Math.imul(D, ot)) | 0), - (o = Math.imul(D, st)), - (i = (i + Math.imul(C, ht)) | 0), - (n = ((n = (n + Math.imul(C, ut)) | 0) + Math.imul(N, ht)) | 0), - (o = (o + Math.imul(N, ut)) | 0), - (i = (i + Math.imul(P, ct)) | 0), - (n = ((n = (n + Math.imul(P, lt)) | 0) + Math.imul(O, ct)) | 0), - (o = (o + Math.imul(O, lt)) | 0); - var Tt = - (((u + (i = (i + Math.imul(B, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(B, mt)) | 0) + Math.imul(I, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(I, mt)) | 0) + (n >>> 13)) | 0) + (Tt >>> 26)) | 0), - (Tt &= 67108863), - (i = Math.imul(U, ht)), - (n = ((n = Math.imul(U, ut)) + Math.imul(D, ht)) | 0), - (o = Math.imul(D, ut)), - (i = (i + Math.imul(C, ct)) | 0), - (n = ((n = (n + Math.imul(C, lt)) | 0) + Math.imul(N, ct)) | 0), - (o = (o + Math.imul(N, lt)) | 0); - var Pt = - (((u + (i = (i + Math.imul(P, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(P, mt)) | 0) + Math.imul(O, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(O, mt)) | 0) + (n >>> 13)) | 0) + (Pt >>> 26)) | 0), - (Pt &= 67108863), - (i = Math.imul(U, ct)), - (n = ((n = Math.imul(U, lt)) + Math.imul(D, ct)) | 0), - (o = Math.imul(D, lt)); - var Ot = - (((u + (i = (i + Math.imul(C, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(C, mt)) | 0) + Math.imul(N, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(N, mt)) | 0) + (n >>> 13)) | 0) + (Ot >>> 26)) | 0), (Ot &= 67108863); - var Lt = (((u + (i = Math.imul(U, pt))) | 0) + ((8191 & (n = ((n = Math.imul(U, mt)) + Math.imul(D, pt)) | 0)) << 13)) | 0; - return ( - (u = ((((o = Math.imul(D, mt)) + (n >>> 13)) | 0) + (Lt >>> 26)) | 0), - (Lt &= 67108863), - (h[0] = gt), - (h[1] = bt), - (h[2] = yt), - (h[3] = vt), - (h[4] = wt), - (h[5] = _t), - (h[6] = Mt), - (h[7] = Et), - (h[8] = St), - (h[9] = xt), - (h[10] = At), - (h[11] = kt), - (h[12] = Rt), - (h[13] = Bt), - (h[14] = It), - (h[15] = Tt), - (h[16] = Pt), - (h[17] = Ot), - (h[18] = Lt), - 0 !== u && ((h[19] = u), r.length++), - r - ); - }; - function m(t, e, r) { - return new g().mulp(t, e, r); - } - function g(t, e) { - (this.x = t), (this.y = e); - } - Math.imul || (p = d), - (o.prototype.mulTo = function (t, e) { - var r, - i = this.length + t.length; - return ( - (r = - 10 === this.length && 10 === t.length - ? p(this, t, e) - : i < 63 - ? d(this, t, e) - : i < 1024 - ? (function (t, e, r) { - (r.negative = e.negative ^ t.negative), (r.length = t.length + e.length); - for (var i = 0, n = 0, o = 0; o < r.length - 1; o++) { - var s = n; - n = 0; - for (var a = 67108863 & i, h = Math.min(o, e.length - 1), u = Math.max(0, o - t.length + 1); u <= h; u++) { - var f = o - u, - c = (0 | t.words[f]) * (0 | e.words[u]), - l = 67108863 & c; - (a = 67108863 & (l = (l + a) | 0)), - (n += (s = ((s = (s + ((c / 67108864) | 0)) | 0) + (l >>> 26)) | 0) >>> 26), - (s &= 67108863); - } - (r.words[o] = a), (i = s), (s = n); - } - return 0 !== i ? (r.words[o] = i) : r.length--, r.strip(); - })(this, t, e) - : m(this, t, e)), - r - ); - }), - (g.prototype.makeRBT = function (t) { - for (var e = new Array(t), r = o.prototype._countBits(t) - 1, i = 0; i < t; i++) e[i] = this.revBin(i, r, t); - return e; - }), - (g.prototype.revBin = function (t, e, r) { - if (0 === t || t === r - 1) return t; - for (var i = 0, n = 0; n < e; n++) (i |= (1 & t) << (e - n - 1)), (t >>= 1); - return i; - }), - (g.prototype.permute = function (t, e, r, i, n, o) { - for (var s = 0; s < o; s++) (i[s] = e[t[s]]), (n[s] = r[t[s]]); - }), - (g.prototype.transform = function (t, e, r, i, n, o) { - this.permute(o, t, e, r, i, n); - for (var s = 1; s < n; s <<= 1) - for (var a = s << 1, h = Math.cos((2 * Math.PI) / a), u = Math.sin((2 * Math.PI) / a), f = 0; f < n; f += a) - for (var c = h, l = u, d = 0; d < s; d++) { - var p = r[f + d], - m = i[f + d], - g = r[f + d + s], - b = i[f + d + s], - y = c * g - l * b; - (b = c * b + l * g), - (g = y), - (r[f + d] = p + g), - (i[f + d] = m + b), - (r[f + d + s] = p - g), - (i[f + d + s] = m - b), - d !== a && ((y = h * c - u * l), (l = h * l + u * c), (c = y)); - } - }), - (g.prototype.guessLen13b = function (t, e) { - var r = 1 | Math.max(e, t), - i = 1 & r, - n = 0; - for (r = (r / 2) | 0; r; r >>>= 1) n++; - return 1 << (n + 1 + i); - }), - (g.prototype.conjugate = function (t, e, r) { - if (!(r <= 1)) - for (var i = 0; i < r / 2; i++) { - var n = t[i]; - (t[i] = t[r - i - 1]), (t[r - i - 1] = n), (n = e[i]), (e[i] = -e[r - i - 1]), (e[r - i - 1] = -n); - } - }), - (g.prototype.normalize13b = function (t, e) { - for (var r = 0, i = 0; i < e / 2; i++) { - var n = 8192 * Math.round(t[2 * i + 1] / e) + Math.round(t[2 * i] / e) + r; - (t[i] = 67108863 & n), (r = n < 67108864 ? 0 : (n / 67108864) | 0); - } - return t; - }), - (g.prototype.convert13b = function (t, e, r, n) { - for (var o = 0, s = 0; s < e; s++) - (o += 0 | t[s]), (r[2 * s] = 8191 & o), (o >>>= 13), (r[2 * s + 1] = 8191 & o), (o >>>= 13); - for (s = 2 * e; s < n; ++s) r[s] = 0; - i(0 === o), i(0 == (-8192 & o)); - }), - (g.prototype.stub = function (t) { - for (var e = new Array(t), r = 0; r < t; r++) e[r] = 0; - return e; - }), - (g.prototype.mulp = function (t, e, r) { - var i = 2 * this.guessLen13b(t.length, e.length), - n = this.makeRBT(i), - o = this.stub(i), - s = new Array(i), - a = new Array(i), - h = new Array(i), - u = new Array(i), - f = new Array(i), - c = new Array(i), - l = r.words; - (l.length = i), - this.convert13b(t.words, t.length, s, i), - this.convert13b(e.words, e.length, u, i), - this.transform(s, o, a, h, i, n), - this.transform(u, o, f, c, i, n); - for (var d = 0; d < i; d++) { - var p = a[d] * f[d] - h[d] * c[d]; - (h[d] = a[d] * c[d] + h[d] * f[d]), (a[d] = p); - } - return ( - this.conjugate(a, h, i), - this.transform(a, h, l, o, i, n), - this.conjugate(l, o, i), - this.normalize13b(l, i), - (r.negative = t.negative ^ e.negative), - (r.length = t.length + e.length), - r.strip() - ); - }), - (o.prototype.mul = function (t) { - var e = new o(null); - return (e.words = new Array(this.length + t.length)), this.mulTo(t, e); - }), - (o.prototype.mulf = function (t) { - var e = new o(null); - return (e.words = new Array(this.length + t.length)), m(this, t, e); - }), - (o.prototype.imul = function (t) { - return this.clone().mulTo(t, this); - }), - (o.prototype.imuln = function (t) { - i('number' == typeof t), i(t < 67108864); - for (var e = 0, r = 0; r < this.length; r++) { - var n = (0 | this.words[r]) * t, - o = (67108863 & n) + (67108863 & e); - (e >>= 26), (e += (n / 67108864) | 0), (e += o >>> 26), (this.words[r] = 67108863 & o); - } - return 0 !== e && ((this.words[r] = e), this.length++), this; - }), - (o.prototype.muln = function (t) { - return this.clone().imuln(t); - }), - (o.prototype.sqr = function () { - return this.mul(this); - }), - (o.prototype.isqr = function () { - return this.imul(this.clone()); - }), - (o.prototype.pow = function (t) { - var e = (function (t) { - for (var e = new Array(t.bitLength()), r = 0; r < e.length; r++) { - var i = (r / 26) | 0, - n = r % 26; - e[r] = (t.words[i] & (1 << n)) >>> n; - } - return e; - })(t); - if (0 === e.length) return new o(1); - for (var r = this, i = 0; i < e.length && 0 === e[i]; i++, r = r.sqr()); - if (++i < e.length) for (var n = r.sqr(); i < e.length; i++, n = n.sqr()) 0 !== e[i] && (r = r.mul(n)); - return r; - }), - (o.prototype.iushln = function (t) { - i('number' == typeof t && t >= 0); - var e, - r = t % 26, - n = (t - r) / 26, - o = (67108863 >>> (26 - r)) << (26 - r); - if (0 !== r) { - var s = 0; - for (e = 0; e < this.length; e++) { - var a = this.words[e] & o, - h = ((0 | this.words[e]) - a) << r; - (this.words[e] = h | s), (s = a >>> (26 - r)); - } - s && ((this.words[e] = s), this.length++); - } - if (0 !== n) { - for (e = this.length - 1; e >= 0; e--) this.words[e + n] = this.words[e]; - for (e = 0; e < n; e++) this.words[e] = 0; - this.length += n; - } - return this.strip(); - }), - (o.prototype.ishln = function (t) { - return i(0 === this.negative), this.iushln(t); - }), - (o.prototype.iushrn = function (t, e, r) { - var n; - i('number' == typeof t && t >= 0), (n = e ? (e - (e % 26)) / 26 : 0); - var o = t % 26, - s = Math.min((t - o) / 26, this.length), - a = 67108863 ^ ((67108863 >>> o) << o), - h = r; - if (((n -= s), (n = Math.max(0, n)), h)) { - for (var u = 0; u < s; u++) h.words[u] = this.words[u]; - h.length = s; - } - if (0 === s); - else if (this.length > s) for (this.length -= s, u = 0; u < this.length; u++) this.words[u] = this.words[u + s]; - else (this.words[0] = 0), (this.length = 1); - var f = 0; - for (u = this.length - 1; u >= 0 && (0 !== f || u >= n); u--) { - var c = 0 | this.words[u]; - (this.words[u] = (f << (26 - o)) | (c >>> o)), (f = c & a); - } - return h && 0 !== f && (h.words[h.length++] = f), 0 === this.length && ((this.words[0] = 0), (this.length = 1)), this.strip(); - }), - (o.prototype.ishrn = function (t, e, r) { - return i(0 === this.negative), this.iushrn(t, e, r); - }), - (o.prototype.shln = function (t) { - return this.clone().ishln(t); - }), - (o.prototype.ushln = function (t) { - return this.clone().iushln(t); - }), - (o.prototype.shrn = function (t) { - return this.clone().ishrn(t); - }), - (o.prototype.ushrn = function (t) { - return this.clone().iushrn(t); - }), - (o.prototype.testn = function (t) { - i('number' == typeof t && t >= 0); - var e = t % 26, - r = (t - e) / 26, - n = 1 << e; - return !(this.length <= r || !(this.words[r] & n)); - }), - (o.prototype.imaskn = function (t) { - i('number' == typeof t && t >= 0); - var e = t % 26, - r = (t - e) / 26; - if ((i(0 === this.negative, 'imaskn works only with positive numbers'), this.length <= r)) return this; - if ((0 !== e && r++, (this.length = Math.min(r, this.length)), 0 !== e)) { - var n = 67108863 ^ ((67108863 >>> e) << e); - this.words[this.length - 1] &= n; - } - return this.strip(); - }), - (o.prototype.maskn = function (t) { - return this.clone().imaskn(t); - }), - (o.prototype.iaddn = function (t) { - return ( - i('number' == typeof t), - i(t < 67108864), - t < 0 - ? this.isubn(-t) - : 0 !== this.negative - ? 1 === this.length && (0 | this.words[0]) < t - ? ((this.words[0] = t - (0 | this.words[0])), (this.negative = 0), this) - : ((this.negative = 0), this.isubn(t), (this.negative = 1), this) - : this._iaddn(t) - ); - }), - (o.prototype._iaddn = function (t) { - this.words[0] += t; - for (var e = 0; e < this.length && this.words[e] >= 67108864; e++) - (this.words[e] -= 67108864), e === this.length - 1 ? (this.words[e + 1] = 1) : this.words[e + 1]++; - return (this.length = Math.max(this.length, e + 1)), this; - }), - (o.prototype.isubn = function (t) { - if ((i('number' == typeof t), i(t < 67108864), t < 0)) return this.iaddn(-t); - if (0 !== this.negative) return (this.negative = 0), this.iaddn(t), (this.negative = 1), this; - if (((this.words[0] -= t), 1 === this.length && this.words[0] < 0)) (this.words[0] = -this.words[0]), (this.negative = 1); - else for (var e = 0; e < this.length && this.words[e] < 0; e++) (this.words[e] += 67108864), (this.words[e + 1] -= 1); - return this.strip(); - }), - (o.prototype.addn = function (t) { - return this.clone().iaddn(t); - }), - (o.prototype.subn = function (t) { - return this.clone().isubn(t); - }), - (o.prototype.iabs = function () { - return (this.negative = 0), this; - }), - (o.prototype.abs = function () { - return this.clone().iabs(); - }), - (o.prototype._ishlnsubmul = function (t, e, r) { - var n, - o, - s = t.length + r; - this._expand(s); - var a = 0; - for (n = 0; n < t.length; n++) { - o = (0 | this.words[n + r]) + a; - var h = (0 | t.words[n]) * e; - (a = ((o -= 67108863 & h) >> 26) - ((h / 67108864) | 0)), (this.words[n + r] = 67108863 & o); - } - for (; n < this.length - r; n++) (a = (o = (0 | this.words[n + r]) + a) >> 26), (this.words[n + r] = 67108863 & o); - if (0 === a) return this.strip(); - for (i(-1 === a), a = 0, n = 0; n < this.length; n++) - (a = (o = -(0 | this.words[n]) + a) >> 26), (this.words[n] = 67108863 & o); - return (this.negative = 1), this.strip(); - }), - (o.prototype._wordDiv = function (t, e) { - var r = (this.length, t.length), - i = this.clone(), - n = t, - s = 0 | n.words[n.length - 1]; - 0 != (r = 26 - this._countBits(s)) && ((n = n.ushln(r)), i.iushln(r), (s = 0 | n.words[n.length - 1])); - var a, - h = i.length - n.length; - if ('mod' !== e) { - ((a = new o(null)).length = h + 1), (a.words = new Array(a.length)); - for (var u = 0; u < a.length; u++) a.words[u] = 0; - } - var f = i.clone()._ishlnsubmul(n, 1, h); - 0 === f.negative && ((i = f), a && (a.words[h] = 1)); - for (var c = h - 1; c >= 0; c--) { - var l = 67108864 * (0 | i.words[n.length + c]) + (0 | i.words[n.length + c - 1]); - for (l = Math.min((l / s) | 0, 67108863), i._ishlnsubmul(n, l, c); 0 !== i.negative; ) - l--, (i.negative = 0), i._ishlnsubmul(n, 1, c), i.isZero() || (i.negative ^= 1); - a && (a.words[c] = l); - } - return a && a.strip(), i.strip(), 'div' !== e && 0 !== r && i.iushrn(r), { div: a || null, mod: i }; - }), - (o.prototype.divmod = function (t, e, r) { - return ( - i(!t.isZero()), - this.isZero() - ? { div: new o(0), mod: new o(0) } - : 0 !== this.negative && 0 === t.negative - ? ((a = this.neg().divmod(t, e)), - 'mod' !== e && (n = a.div.neg()), - 'div' !== e && ((s = a.mod.neg()), r && 0 !== s.negative && s.iadd(t)), - { div: n, mod: s }) - : 0 === this.negative && 0 !== t.negative - ? ((a = this.divmod(t.neg(), e)), 'mod' !== e && (n = a.div.neg()), { div: n, mod: a.mod }) - : 0 != (this.negative & t.negative) - ? ((a = this.neg().divmod(t.neg(), e)), - 'div' !== e && ((s = a.mod.neg()), r && 0 !== s.negative && s.isub(t)), - { div: a.div, mod: s }) - : t.length > this.length || this.cmp(t) < 0 - ? { div: new o(0), mod: this } - : 1 === t.length - ? 'div' === e - ? { div: this.divn(t.words[0]), mod: null } - : 'mod' === e - ? { div: null, mod: new o(this.modn(t.words[0])) } - : { div: this.divn(t.words[0]), mod: new o(this.modn(t.words[0])) } - : this._wordDiv(t, e) - ); - var n, s, a; - }), - (o.prototype.div = function (t) { - return this.divmod(t, 'div', !1).div; - }), - (o.prototype.mod = function (t) { - return this.divmod(t, 'mod', !1).mod; - }), - (o.prototype.umod = function (t) { - return this.divmod(t, 'mod', !0).mod; - }), - (o.prototype.divRound = function (t) { - var e = this.divmod(t); - if (e.mod.isZero()) return e.div; - var r = 0 !== e.div.negative ? e.mod.isub(t) : e.mod, - i = t.ushrn(1), - n = t.andln(1), - o = r.cmp(i); - return o < 0 || (1 === n && 0 === o) ? e.div : 0 !== e.div.negative ? e.div.isubn(1) : e.div.iaddn(1); - }), - (o.prototype.modn = function (t) { - i(t <= 67108863); - for (var e = (1 << 26) % t, r = 0, n = this.length - 1; n >= 0; n--) r = (e * r + (0 | this.words[n])) % t; - return r; - }), - (o.prototype.idivn = function (t) { - i(t <= 67108863); - for (var e = 0, r = this.length - 1; r >= 0; r--) { - var n = (0 | this.words[r]) + 67108864 * e; - (this.words[r] = (n / t) | 0), (e = n % t); - } - return this.strip(); - }), - (o.prototype.divn = function (t) { - return this.clone().idivn(t); - }), - (o.prototype.egcd = function (t) { - i(0 === t.negative), i(!t.isZero()); - var e = this, - r = t.clone(); - e = 0 !== e.negative ? e.umod(t) : e.clone(); - for (var n = new o(1), s = new o(0), a = new o(0), h = new o(1), u = 0; e.isEven() && r.isEven(); ) - e.iushrn(1), r.iushrn(1), ++u; - for (var f = r.clone(), c = e.clone(); !e.isZero(); ) { - for (var l = 0, d = 1; 0 == (e.words[0] & d) && l < 26; ++l, d <<= 1); - if (l > 0) for (e.iushrn(l); l-- > 0; ) (n.isOdd() || s.isOdd()) && (n.iadd(f), s.isub(c)), n.iushrn(1), s.iushrn(1); - for (var p = 0, m = 1; 0 == (r.words[0] & m) && p < 26; ++p, m <<= 1); - if (p > 0) for (r.iushrn(p); p-- > 0; ) (a.isOdd() || h.isOdd()) && (a.iadd(f), h.isub(c)), a.iushrn(1), h.iushrn(1); - e.cmp(r) >= 0 ? (e.isub(r), n.isub(a), s.isub(h)) : (r.isub(e), a.isub(n), h.isub(s)); - } - return { a, b: h, gcd: r.iushln(u) }; - }), - (o.prototype._invmp = function (t) { - i(0 === t.negative), i(!t.isZero()); - var e = this, - r = t.clone(); - e = 0 !== e.negative ? e.umod(t) : e.clone(); - for (var n, s = new o(1), a = new o(0), h = r.clone(); e.cmpn(1) > 0 && r.cmpn(1) > 0; ) { - for (var u = 0, f = 1; 0 == (e.words[0] & f) && u < 26; ++u, f <<= 1); - if (u > 0) for (e.iushrn(u); u-- > 0; ) s.isOdd() && s.iadd(h), s.iushrn(1); - for (var c = 0, l = 1; 0 == (r.words[0] & l) && c < 26; ++c, l <<= 1); - if (c > 0) for (r.iushrn(c); c-- > 0; ) a.isOdd() && a.iadd(h), a.iushrn(1); - e.cmp(r) >= 0 ? (e.isub(r), s.isub(a)) : (r.isub(e), a.isub(s)); - } - return (n = 0 === e.cmpn(1) ? s : a).cmpn(0) < 0 && n.iadd(t), n; - }), - (o.prototype.gcd = function (t) { - if (this.isZero()) return t.abs(); - if (t.isZero()) return this.abs(); - var e = this.clone(), - r = t.clone(); - (e.negative = 0), (r.negative = 0); - for (var i = 0; e.isEven() && r.isEven(); i++) e.iushrn(1), r.iushrn(1); - for (;;) { - for (; e.isEven(); ) e.iushrn(1); - for (; r.isEven(); ) r.iushrn(1); - var n = e.cmp(r); - if (n < 0) { - var o = e; - (e = r), (r = o); - } else if (0 === n || 0 === r.cmpn(1)) break; - e.isub(r); - } - return r.iushln(i); - }), - (o.prototype.invm = function (t) { - return this.egcd(t).a.umod(t); - }), - (o.prototype.isEven = function () { - return 0 == (1 & this.words[0]); - }), - (o.prototype.isOdd = function () { - return 1 == (1 & this.words[0]); - }), - (o.prototype.andln = function (t) { - return this.words[0] & t; - }), - (o.prototype.bincn = function (t) { - i('number' == typeof t); - var e = t % 26, - r = (t - e) / 26, - n = 1 << e; - if (this.length <= r) return this._expand(r + 1), (this.words[r] |= n), this; - for (var o = n, s = r; 0 !== o && s < this.length; s++) { - var a = 0 | this.words[s]; - (o = (a += o) >>> 26), (a &= 67108863), (this.words[s] = a); - } - return 0 !== o && ((this.words[s] = o), this.length++), this; - }), - (o.prototype.isZero = function () { - return 1 === this.length && 0 === this.words[0]; - }), - (o.prototype.cmpn = function (t) { - var e, - r = t < 0; - if (0 !== this.negative && !r) return -1; - if (0 === this.negative && r) return 1; - if ((this.strip(), this.length > 1)) e = 1; - else { - r && (t = -t), i(t <= 67108863, 'Number is too big'); - var n = 0 | this.words[0]; - e = n === t ? 0 : n < t ? -1 : 1; - } - return 0 !== this.negative ? 0 | -e : e; - }), - (o.prototype.cmp = function (t) { - if (0 !== this.negative && 0 === t.negative) return -1; - if (0 === this.negative && 0 !== t.negative) return 1; - var e = this.ucmp(t); - return 0 !== this.negative ? 0 | -e : e; - }), - (o.prototype.ucmp = function (t) { - if (this.length > t.length) return 1; - if (this.length < t.length) return -1; - for (var e = 0, r = this.length - 1; r >= 0; r--) { - var i = 0 | this.words[r], - n = 0 | t.words[r]; - if (i !== n) { - i < n ? (e = -1) : i > n && (e = 1); - break; - } - } - return e; - }), - (o.prototype.gtn = function (t) { - return 1 === this.cmpn(t); - }), - (o.prototype.gt = function (t) { - return 1 === this.cmp(t); - }), - (o.prototype.gten = function (t) { - return this.cmpn(t) >= 0; - }), - (o.prototype.gte = function (t) { - return this.cmp(t) >= 0; - }), - (o.prototype.ltn = function (t) { - return -1 === this.cmpn(t); - }), - (o.prototype.lt = function (t) { - return -1 === this.cmp(t); - }), - (o.prototype.lten = function (t) { - return this.cmpn(t) <= 0; - }), - (o.prototype.lte = function (t) { - return this.cmp(t) <= 0; - }), - (o.prototype.eqn = function (t) { - return 0 === this.cmpn(t); - }), - (o.prototype.eq = function (t) { - return 0 === this.cmp(t); - }), - (o.red = function (t) { - return new E(t); - }), - (o.prototype.toRed = function (t) { - return ( - i(!this.red, 'Already a number in reduction context'), - i(0 === this.negative, 'red works only with positives'), - t.convertTo(this)._forceRed(t) - ); - }), - (o.prototype.fromRed = function () { - return i(this.red, 'fromRed works only with numbers in reduction context'), this.red.convertFrom(this); - }), - (o.prototype._forceRed = function (t) { - return (this.red = t), this; - }), - (o.prototype.forceRed = function (t) { - return i(!this.red, 'Already a number in reduction context'), this._forceRed(t); - }), - (o.prototype.redAdd = function (t) { - return i(this.red, 'redAdd works only with red numbers'), this.red.add(this, t); - }), - (o.prototype.redIAdd = function (t) { - return i(this.red, 'redIAdd works only with red numbers'), this.red.iadd(this, t); - }), - (o.prototype.redSub = function (t) { - return i(this.red, 'redSub works only with red numbers'), this.red.sub(this, t); - }), - (o.prototype.redISub = function (t) { - return i(this.red, 'redISub works only with red numbers'), this.red.isub(this, t); - }), - (o.prototype.redShl = function (t) { - return i(this.red, 'redShl works only with red numbers'), this.red.shl(this, t); - }), - (o.prototype.redMul = function (t) { - return i(this.red, 'redMul works only with red numbers'), this.red._verify2(this, t), this.red.mul(this, t); - }), - (o.prototype.redIMul = function (t) { - return i(this.red, 'redMul works only with red numbers'), this.red._verify2(this, t), this.red.imul(this, t); - }), - (o.prototype.redSqr = function () { - return i(this.red, 'redSqr works only with red numbers'), this.red._verify1(this), this.red.sqr(this); - }), - (o.prototype.redISqr = function () { - return i(this.red, 'redISqr works only with red numbers'), this.red._verify1(this), this.red.isqr(this); - }), - (o.prototype.redSqrt = function () { - return i(this.red, 'redSqrt works only with red numbers'), this.red._verify1(this), this.red.sqrt(this); - }), - (o.prototype.redInvm = function () { - return i(this.red, 'redInvm works only with red numbers'), this.red._verify1(this), this.red.invm(this); - }), - (o.prototype.redNeg = function () { - return i(this.red, 'redNeg works only with red numbers'), this.red._verify1(this), this.red.neg(this); - }), - (o.prototype.redPow = function (t) { - return i(this.red && !t.red, 'redPow(normalNum)'), this.red._verify1(this), this.red.pow(this, t); - }); - var b = { k256: null, p224: null, p192: null, p25519: null }; - function y(t, e) { - (this.name = t), - (this.p = new o(e, 16)), - (this.n = this.p.bitLength()), - (this.k = new o(1).iushln(this.n).isub(this.p)), - (this.tmp = this._tmp()); - } - function v() { - y.call(this, 'k256', 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f'); - } - function w() { - y.call(this, 'p224', 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001'); - } - function _() { - y.call(this, 'p192', 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff'); - } - function M() { - y.call(this, '25519', '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed'); - } - function E(t) { - if ('string' == typeof t) { - var e = o._prime(t); - (this.m = e.p), (this.prime = e); - } else i(t.gtn(1), 'modulus must be greater than 1'), (this.m = t), (this.prime = null); - } - function S(t) { - E.call(this, t), - (this.shift = this.m.bitLength()), - this.shift % 26 != 0 && (this.shift += 26 - (this.shift % 26)), - (this.r = new o(1).iushln(this.shift)), - (this.r2 = this.imod(this.r.sqr())), - (this.rinv = this.r._invmp(this.m)), - (this.minv = this.rinv.mul(this.r).isubn(1).div(this.m)), - (this.minv = this.minv.umod(this.r)), - (this.minv = this.r.sub(this.minv)); - } - (y.prototype._tmp = function () { - var t = new o(null); - return (t.words = new Array(Math.ceil(this.n / 13))), t; - }), - (y.prototype.ireduce = function (t) { - var e, - r = t; - do { - this.split(r, this.tmp), (e = (r = (r = this.imulK(r)).iadd(this.tmp)).bitLength()); - } while (e > this.n); - var i = e < this.n ? -1 : r.ucmp(this.p); - return 0 === i ? ((r.words[0] = 0), (r.length = 1)) : i > 0 ? r.isub(this.p) : void 0 !== r.strip ? r.strip() : r._strip(), r; - }), - (y.prototype.split = function (t, e) { - t.iushrn(this.n, 0, e); - }), - (y.prototype.imulK = function (t) { - return t.imul(this.k); - }), - n(v, y), - (v.prototype.split = function (t, e) { - for (var r = 4194303, i = Math.min(t.length, 9), n = 0; n < i; n++) e.words[n] = t.words[n]; - if (((e.length = i), t.length <= 9)) return (t.words[0] = 0), void (t.length = 1); - var o = t.words[9]; - for (e.words[e.length++] = o & r, n = 10; n < t.length; n++) { - var s = 0 | t.words[n]; - (t.words[n - 10] = ((s & r) << 4) | (o >>> 22)), (o = s); - } - (o >>>= 22), (t.words[n - 10] = o), 0 === o && t.length > 10 ? (t.length -= 10) : (t.length -= 9); - }), - (v.prototype.imulK = function (t) { - (t.words[t.length] = 0), (t.words[t.length + 1] = 0), (t.length += 2); - for (var e = 0, r = 0; r < t.length; r++) { - var i = 0 | t.words[r]; - (e += 977 * i), (t.words[r] = 67108863 & e), (e = 64 * i + ((e / 67108864) | 0)); - } - return 0 === t.words[t.length - 1] && (t.length--, 0 === t.words[t.length - 1] && t.length--), t; - }), - n(w, y), - n(_, y), - n(M, y), - (M.prototype.imulK = function (t) { - for (var e = 0, r = 0; r < t.length; r++) { - var i = 19 * (0 | t.words[r]) + e, - n = 67108863 & i; - (i >>>= 26), (t.words[r] = n), (e = i); - } - return 0 !== e && (t.words[t.length++] = e), t; - }), - (o._prime = function (t) { - if (b[t]) return b[t]; - var e; - if ('k256' === t) e = new v(); - else if ('p224' === t) e = new w(); - else if ('p192' === t) e = new _(); - else { - if ('p25519' !== t) throw new Error('Unknown prime ' + t); - e = new M(); - } - return (b[t] = e), e; - }), - (E.prototype._verify1 = function (t) { - i(0 === t.negative, 'red works only with positives'), i(t.red, 'red works only with red numbers'); - }), - (E.prototype._verify2 = function (t, e) { - i(0 == (t.negative | e.negative), 'red works only with positives'), - i(t.red && t.red === e.red, 'red works only with red numbers'); - }), - (E.prototype.imod = function (t) { - return this.prime ? this.prime.ireduce(t)._forceRed(this) : t.umod(this.m)._forceRed(this); - }), - (E.prototype.neg = function (t) { - return t.isZero() ? t.clone() : this.m.sub(t)._forceRed(this); - }), - (E.prototype.add = function (t, e) { - this._verify2(t, e); - var r = t.add(e); - return r.cmp(this.m) >= 0 && r.isub(this.m), r._forceRed(this); - }), - (E.prototype.iadd = function (t, e) { - this._verify2(t, e); - var r = t.iadd(e); - return r.cmp(this.m) >= 0 && r.isub(this.m), r; - }), - (E.prototype.sub = function (t, e) { - this._verify2(t, e); - var r = t.sub(e); - return r.cmpn(0) < 0 && r.iadd(this.m), r._forceRed(this); - }), - (E.prototype.isub = function (t, e) { - this._verify2(t, e); - var r = t.isub(e); - return r.cmpn(0) < 0 && r.iadd(this.m), r; - }), - (E.prototype.shl = function (t, e) { - return this._verify1(t), this.imod(t.ushln(e)); - }), - (E.prototype.imul = function (t, e) { - return this._verify2(t, e), this.imod(t.imul(e)); - }), - (E.prototype.mul = function (t, e) { - return this._verify2(t, e), this.imod(t.mul(e)); - }), - (E.prototype.isqr = function (t) { - return this.imul(t, t.clone()); - }), - (E.prototype.sqr = function (t) { - return this.mul(t, t); - }), - (E.prototype.sqrt = function (t) { - if (t.isZero()) return t.clone(); - var e = this.m.andln(3); - if ((i(e % 2 == 1), 3 === e)) { - var r = this.m.add(new o(1)).iushrn(2); - return this.pow(t, r); - } - for (var n = this.m.subn(1), s = 0; !n.isZero() && 0 === n.andln(1); ) s++, n.iushrn(1); - i(!n.isZero()); - var a = new o(1).toRed(this), - h = a.redNeg(), - u = this.m.subn(1).iushrn(1), - f = this.m.bitLength(); - for (f = new o(2 * f * f).toRed(this); 0 !== this.pow(f, u).cmp(h); ) f.redIAdd(h); - for (var c = this.pow(f, n), l = this.pow(t, n.addn(1).iushrn(1)), d = this.pow(t, n), p = s; 0 !== d.cmp(a); ) { - for (var m = d, g = 0; 0 !== m.cmp(a); g++) m = m.redSqr(); - i(g < p); - var b = this.pow(c, new o(1).iushln(p - g - 1)); - (l = l.redMul(b)), (c = b.redSqr()), (d = d.redMul(c)), (p = g); - } - return l; - }), - (E.prototype.invm = function (t) { - var e = t._invmp(this.m); - return 0 !== e.negative ? ((e.negative = 0), this.imod(e).redNeg()) : this.imod(e); - }), - (E.prototype.pow = function (t, e) { - if (e.isZero()) return new o(1).toRed(this); - if (0 === e.cmpn(1)) return t.clone(); - var r = new Array(16); - (r[0] = new o(1).toRed(this)), (r[1] = t); - for (var i = 2; i < r.length; i++) r[i] = this.mul(r[i - 1], t); - var n = r[0], - s = 0, - a = 0, - h = e.bitLength() % 26; - for (0 === h && (h = 26), i = e.length - 1; i >= 0; i--) { - for (var u = e.words[i], f = h - 1; f >= 0; f--) { - var c = (u >> f) & 1; - n !== r[0] && (n = this.sqr(n)), - 0 !== c || 0 !== s - ? ((s <<= 1), (s |= c), (4 == ++a || (0 === i && 0 === f)) && ((n = this.mul(n, r[s])), (a = 0), (s = 0))) - : (a = 0); - } - h = 26; - } - return n; - }), - (E.prototype.convertTo = function (t) { - var e = t.umod(this.m); - return e === t ? e.clone() : e; - }), - (E.prototype.convertFrom = function (t) { - var e = t.clone(); - return (e.red = null), e; - }), - (o.mont = function (t) { - return new S(t); - }), - n(S, E), - (S.prototype.convertTo = function (t) { - return this.imod(t.ushln(this.shift)); - }), - (S.prototype.convertFrom = function (t) { - var e = this.imod(t.mul(this.rinv)); - return (e.red = null), e; - }), - (S.prototype.imul = function (t, e) { - if (t.isZero() || e.isZero()) return (t.words[0] = 0), (t.length = 1), t; - var r = t.imul(e), - i = r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m), - n = r.isub(i).iushrn(this.shift), - o = n; - return n.cmp(this.m) >= 0 ? (o = n.isub(this.m)) : n.cmpn(0) < 0 && (o = n.iadd(this.m)), o._forceRed(this); - }), - (S.prototype.mul = function (t, e) { - if (t.isZero() || e.isZero()) return new o(0)._forceRed(this); - var r = t.mul(e), - i = r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m), - n = r.isub(i).iushrn(this.shift), - s = n; - return n.cmp(this.m) >= 0 ? (s = n.isub(this.m)) : n.cmpn(0) < 0 && (s = n.iadd(this.m)), s._forceRed(this); - }), - (S.prototype.invm = function (t) { - return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this); - }); - })((t = r.nmd(t)), this); - }, - 7859: t => { - function e(t, e) { - if (!t) throw new Error(e || 'Assertion failed'); - } - (t.exports = e), - (e.equal = function (t, e, r) { - if (t != e) throw new Error(r || 'Assertion failed: ' + t + ' != ' + e); - }); - }, - 2910: (t, e) => { - 'use strict'; - var r = e; - function i(t) { - return 1 === t.length ? '0' + t : t; - } - function n(t) { - for (var e = '', r = 0; r < t.length; r++) e += i(t[r].toString(16)); - return e; - } - (r.toArray = function (t, e) { - if (Array.isArray(t)) return t.slice(); - if (!t) return []; - var r = []; - if ('string' != typeof t) { - for (var i = 0; i < t.length; i++) r[i] = 0 | t[i]; - return r; - } - if ('hex' === e) - for ((t = t.replace(/[^a-z0-9]+/gi, '')).length % 2 != 0 && (t = '0' + t), i = 0; i < t.length; i += 2) - r.push(parseInt(t[i] + t[i + 1], 16)); - else - for (i = 0; i < t.length; i++) { - var n = t.charCodeAt(i), - o = n >> 8, - s = 255 & n; - o ? r.push(o, s) : r.push(s); - } - return r; - }), - (r.zero2 = i), - (r.toHex = n), - (r.encode = function (t, e) { - return 'hex' === e ? n(t) : t; - }); - }, - 8481: (t, e, r) => { - 'use strict'; - var i = r(9840); - e.certificate = r(6939); - var n = i.define('RSAPrivateKey', function () { - this.seq().obj( - this.key('version').int(), - this.key('modulus').int(), - this.key('publicExponent').int(), - this.key('privateExponent').int(), - this.key('prime1').int(), - this.key('prime2').int(), - this.key('exponent1').int(), - this.key('exponent2').int(), - this.key('coefficient').int() - ); - }); - e.RSAPrivateKey = n; - var o = i.define('RSAPublicKey', function () { - this.seq().obj(this.key('modulus').int(), this.key('publicExponent').int()); - }); - e.RSAPublicKey = o; - var s = i.define('SubjectPublicKeyInfo', function () { - this.seq().obj(this.key('algorithm').use(a), this.key('subjectPublicKey').bitstr()); - }); - e.PublicKey = s; - var a = i.define('AlgorithmIdentifier', function () { - this.seq().obj( - this.key('algorithm').objid(), - this.key('none').null_().optional(), - this.key('curve').objid().optional(), - this.key('params').seq().obj(this.key('p').int(), this.key('q').int(), this.key('g').int()).optional() - ); - }), - h = i.define('PrivateKeyInfo', function () { - this.seq().obj(this.key('version').int(), this.key('algorithm').use(a), this.key('subjectPrivateKey').octstr()); - }); - e.PrivateKey = h; - var u = i.define('EncryptedPrivateKeyInfo', function () { - this.seq().obj( - this.key('algorithm') - .seq() - .obj( - this.key('id').objid(), - this.key('decrypt') - .seq() - .obj( - this.key('kde') - .seq() - .obj(this.key('id').objid(), this.key('kdeparams').seq().obj(this.key('salt').octstr(), this.key('iters').int())), - this.key('cipher').seq().obj(this.key('algo').objid(), this.key('iv').octstr()) - ) - ), - this.key('subjectPrivateKey').octstr() - ); - }); - e.EncryptedPrivateKey = u; - var f = i.define('DSAPrivateKey', function () { - this.seq().obj( - this.key('version').int(), - this.key('p').int(), - this.key('q').int(), - this.key('g').int(), - this.key('pub_key').int(), - this.key('priv_key').int() - ); - }); - (e.DSAPrivateKey = f), - (e.DSAparam = i.define('DSAparam', function () { - this.int(); - })); - var c = i.define('ECPrivateKey', function () { - this.seq().obj( - this.key('version').int(), - this.key('privateKey').octstr(), - this.key('parameters').optional().explicit(0).use(l), - this.key('publicKey').optional().explicit(1).bitstr() - ); - }); - e.ECPrivateKey = c; - var l = i.define('ECParameters', function () { - this.choice({ namedCurve: this.objid() }); - }); - e.signature = i.define('signature', function () { - this.seq().obj(this.key('r').int(), this.key('s').int()); - }); - }, - 6939: (t, e, r) => { - 'use strict'; - var i = r(9840), - n = i.define('Time', function () { - this.choice({ utcTime: this.utctime(), generalTime: this.gentime() }); - }), - o = i.define('AttributeTypeValue', function () { - this.seq().obj(this.key('type').objid(), this.key('value').any()); - }), - s = i.define('AlgorithmIdentifier', function () { - this.seq().obj(this.key('algorithm').objid(), this.key('parameters').optional(), this.key('curve').objid().optional()); - }), - a = i.define('SubjectPublicKeyInfo', function () { - this.seq().obj(this.key('algorithm').use(s), this.key('subjectPublicKey').bitstr()); - }), - h = i.define('RelativeDistinguishedName', function () { - this.setof(o); - }), - u = i.define('RDNSequence', function () { - this.seqof(h); - }), - f = i.define('Name', function () { - this.choice({ rdnSequence: this.use(u) }); - }), - c = i.define('Validity', function () { - this.seq().obj(this.key('notBefore').use(n), this.key('notAfter').use(n)); - }), - l = i.define('Extension', function () { - this.seq().obj(this.key('extnID').objid(), this.key('critical').bool().def(!1), this.key('extnValue').octstr()); - }), - d = i.define('TBSCertificate', function () { - this.seq().obj( - this.key('version').explicit(0).int().optional(), - this.key('serialNumber').int(), - this.key('signature').use(s), - this.key('issuer').use(f), - this.key('validity').use(c), - this.key('subject').use(f), - this.key('subjectPublicKeyInfo').use(a), - this.key('issuerUniqueID').implicit(1).bitstr().optional(), - this.key('subjectUniqueID').implicit(2).bitstr().optional(), - this.key('extensions').explicit(3).seqof(l).optional() - ); - }), - p = i.define('X509Certificate', function () { - this.seq().obj(this.key('tbsCertificate').use(d), this.key('signatureAlgorithm').use(s), this.key('signatureValue').bitstr()); - }); - t.exports = p; - }, - 1412: (t, e, r) => { - var i = /Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m, - n = /^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m, - o = /^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m, - s = r(5883), - a = r(8901), - h = r(7172).Buffer; - t.exports = function (t, e) { - var r, - u = t.toString(), - f = u.match(i); - if (f) { - var c = 'aes' + f[1], - l = h.from(f[2], 'hex'), - d = h.from(f[3].replace(/[\r\n]/g, ''), 'base64'), - p = s(e, l.slice(0, 8), parseInt(f[1], 10)).key, - m = [], - g = a.createDecipheriv(c, p, l); - m.push(g.update(d)), m.push(g.final()), (r = h.concat(m)); - } else { - var b = u.match(o); - r = h.from(b[2].replace(/[\r\n]/g, ''), 'base64'); - } - return { tag: u.match(n)[1], data: r }; - }; - }, - 1463: (t, e, r) => { - var i = r(8481), - n = r(1095), - o = r(1412), - s = r(8901), - a = r(41), - h = r(7172).Buffer; - function u(t) { - var e; - 'object' != typeof t || h.isBuffer(t) || ((e = t.passphrase), (t = t.key)), 'string' == typeof t && (t = h.from(t)); - var r, - u, - f = o(t, e), - c = f.tag, - l = f.data; - switch (c) { - case 'CERTIFICATE': - u = i.certificate.decode(l, 'der').tbsCertificate.subjectPublicKeyInfo; - case 'PUBLIC KEY': - switch ((u || (u = i.PublicKey.decode(l, 'der')), (r = u.algorithm.algorithm.join('.')))) { - case '1.2.840.113549.1.1.1': - return i.RSAPublicKey.decode(u.subjectPublicKey.data, 'der'); - case '1.2.840.10045.2.1': - return (u.subjectPrivateKey = u.subjectPublicKey), { type: 'ec', data: u }; - case '1.2.840.10040.4.1': - return ( - (u.algorithm.params.pub_key = i.DSAparam.decode(u.subjectPublicKey.data, 'der')), - { type: 'dsa', data: u.algorithm.params } - ); - default: - throw new Error('unknown key id ' + r); - } - case 'ENCRYPTED PRIVATE KEY': - l = (function (t, e) { - var r = t.algorithm.decrypt.kde.kdeparams.salt, - i = parseInt(t.algorithm.decrypt.kde.kdeparams.iters.toString(), 10), - o = n[t.algorithm.decrypt.cipher.algo.join('.')], - u = t.algorithm.decrypt.cipher.iv, - f = t.subjectPrivateKey, - c = parseInt(o.split('-')[1], 10) / 8, - l = a.pbkdf2Sync(e, r, i, c, 'sha1'), - d = s.createDecipheriv(o, l, u), - p = []; - return p.push(d.update(f)), p.push(d.final()), h.concat(p); - })((l = i.EncryptedPrivateKey.decode(l, 'der')), e); - case 'PRIVATE KEY': - switch ((r = (u = i.PrivateKey.decode(l, 'der')).algorithm.algorithm.join('.'))) { - case '1.2.840.113549.1.1.1': - return i.RSAPrivateKey.decode(u.subjectPrivateKey, 'der'); - case '1.2.840.10045.2.1': - return { curve: u.algorithm.curve, privateKey: i.ECPrivateKey.decode(u.subjectPrivateKey, 'der').privateKey }; - case '1.2.840.10040.4.1': - return ( - (u.algorithm.params.priv_key = i.DSAparam.decode(u.subjectPrivateKey, 'der')), - { type: 'dsa', params: u.algorithm.params } - ); - default: - throw new Error('unknown key id ' + r); - } - case 'RSA PUBLIC KEY': - return i.RSAPublicKey.decode(l, 'der'); - case 'RSA PRIVATE KEY': - return i.RSAPrivateKey.decode(l, 'der'); - case 'DSA PRIVATE KEY': - return { type: 'dsa', params: i.DSAPrivateKey.decode(l, 'der') }; - case 'EC PRIVATE KEY': - return { curve: (l = i.ECPrivateKey.decode(l, 'der')).parameters.value, privateKey: l.privateKey }; - default: - throw new Error('unknown key type ' + c); - } - } - (t.exports = u), (u.signature = i.signature); - }, - 41: (t, e, r) => { - (e.pbkdf2 = r(6394)), (e.pbkdf2Sync = r(4355)); - }, - 6394: (t, e, r) => { - var i, - n, - o = r(7172).Buffer, - s = r(2642), - a = r(2703), - h = r(4355), - u = r(3819), - f = r.g.crypto && r.g.crypto.subtle, - c = { - 'sha': 'SHA-1', - 'sha-1': 'SHA-1', - 'sha1': 'SHA-1', - 'sha256': 'SHA-256', - 'sha-256': 'SHA-256', - 'sha384': 'SHA-384', - 'sha-384': 'SHA-384', - 'sha-512': 'SHA-512', - 'sha512': 'SHA-512', - }, - l = []; - function d() { - return ( - n || - (n = - r.g.process && r.g.process.nextTick - ? r.g.process.nextTick - : r.g.queueMicrotask - ? r.g.queueMicrotask - : r.g.setImmediate - ? r.g.setImmediate - : r.g.setTimeout) - ); - } - function p(t, e, r, i, n) { - return f - .importKey('raw', t, { name: 'PBKDF2' }, !1, ['deriveBits']) - .then(function (t) { - return f.deriveBits({ name: 'PBKDF2', salt: e, iterations: r, hash: { name: n } }, t, i << 3); - }) - .then(function (t) { - return o.from(t); - }); - } - t.exports = function (t, e, n, m, g, b) { - 'function' == typeof g && ((b = g), (g = void 0)); - var y = c[(g = g || 'sha1').toLowerCase()]; - if (y && 'function' == typeof r.g.Promise) { - if ((s(n, m), (t = u(t, a, 'Password')), (e = u(e, a, 'Salt')), 'function' != typeof b)) - throw new Error('No callback provided to pbkdf2'); - !(function (t, e) { - t.then( - function (t) { - d()(function () { - e(null, t); - }); - }, - function (t) { - d()(function () { - e(t); - }); - } - ); - })( - (function (t) { - if (r.g.process && !r.g.process.browser) return Promise.resolve(!1); - if (!f || !f.importKey || !f.deriveBits) return Promise.resolve(!1); - if (void 0 !== l[t]) return l[t]; - var e = p((i = i || o.alloc(8)), i, 10, 128, t) - .then(function () { - return !0; - }) - .catch(function () { - return !1; - }); - return (l[t] = e), e; - })(y).then(function (r) { - return r ? p(t, e, n, m, y) : h(t, e, n, m, g); - }), - b - ); - } else - d()(function () { - var r; - try { - r = h(t, e, n, m, g); - } catch (t) { - return b(t); - } - b(null, r); - }); - }; - }, - 2703: (t, e, r) => { - var i; - (i = - r.g.process && r.g.process.browser - ? 'utf-8' - : r.g.process && r.g.process.version - ? parseInt(process.version.split('.')[0].slice(1), 10) >= 6 - ? 'utf-8' - : 'binary' - : 'utf-8'), - (t.exports = i); - }, - 2642: t => { - var e = Math.pow(2, 30) - 1; - t.exports = function (t, r) { - if ('number' != typeof t) throw new TypeError('Iterations not a number'); - if (t < 0) throw new TypeError('Bad iterations'); - if ('number' != typeof r) throw new TypeError('Key length not a number'); - if (r < 0 || r > e || r != r) throw new TypeError('Bad key length'); - }; - }, - 4355: (t, e, r) => { - var i = r(7401), - n = r(6558), - o = r(4458), - s = r(7172).Buffer, - a = r(2642), - h = r(2703), - u = r(3819), - f = s.alloc(128), - c = { md5: 16, sha1: 20, sha224: 28, sha256: 32, sha384: 48, sha512: 64, rmd160: 20, ripemd160: 20 }; - function l(t, e, r) { - var a = (function (t) { - return 'rmd160' === t || 'ripemd160' === t - ? function (t) { - return new n().update(t).digest(); - } - : 'md5' === t - ? i - : function (e) { - return o(t).update(e).digest(); - }; - })(t), - h = 'sha512' === t || 'sha384' === t ? 128 : 64; - e.length > h ? (e = a(e)) : e.length < h && (e = s.concat([e, f], h)); - for (var u = s.allocUnsafe(h + c[t]), l = s.allocUnsafe(h + c[t]), d = 0; d < h; d++) (u[d] = 54 ^ e[d]), (l[d] = 92 ^ e[d]); - var p = s.allocUnsafe(h + r + 4); - u.copy(p, 0, 0, h), - (this.ipad1 = p), - (this.ipad2 = u), - (this.opad = l), - (this.alg = t), - (this.blocksize = h), - (this.hash = a), - (this.size = c[t]); - } - (l.prototype.run = function (t, e) { - return t.copy(e, this.blocksize), this.hash(e).copy(this.opad, this.blocksize), this.hash(this.opad); - }), - (t.exports = function (t, e, r, i, n) { - a(r, i); - var o = new l((n = n || 'sha1'), (t = u(t, h, 'Password')), (e = u(e, h, 'Salt')).length), - f = s.allocUnsafe(i), - d = s.allocUnsafe(e.length + 4); - e.copy(d, 0, 0, e.length); - for (var p = 0, m = c[n], g = Math.ceil(i / m), b = 1; b <= g; b++) { - d.writeUInt32BE(b, e.length); - for (var y = o.run(d, o.ipad1), v = y, w = 1; w < r; w++) { - v = o.run(v, o.ipad2); - for (var _ = 0; _ < m; _++) y[_] ^= v[_]; - } - y.copy(f, p), (p += m); - } - return f; - }); - }, - 3819: (t, e, r) => { - var i = r(7172).Buffer; - t.exports = function (t, e, r) { - if (i.isBuffer(t)) return t; - if ('string' == typeof t) return i.from(t, e); - if (ArrayBuffer.isView(t)) return i.from(t.buffer); - throw new TypeError(r + ' must be a string, a Buffer, a typed array or a DataView'); - }; - }, - 9639: (t, e, r) => { - (e.publicEncrypt = r(9881)), - (e.privateDecrypt = r(2619)), - (e.privateEncrypt = function (t, r) { - return e.publicEncrypt(t, r, !0); - }), - (e.publicDecrypt = function (t, r) { - return e.privateDecrypt(t, r, !0); - }); - }, - 1697: (t, e, r) => { - var i = r(7266), - n = r(7172).Buffer; - function o(t) { - var e = n.allocUnsafe(4); - return e.writeUInt32BE(t, 0), e; - } - t.exports = function (t, e) { - for (var r, s = n.alloc(0), a = 0; s.length < e; ) (r = o(a++)), (s = n.concat([s, i('sha1').update(t).update(r).digest()])); - return s.slice(0, e); - }; - }, - 9492: function (t, e, r) { - !(function (t, e) { - 'use strict'; - function i(t, e) { - if (!t) throw new Error(e || 'Assertion failed'); - } - function n(t, e) { - t.super_ = e; - var r = function () {}; - (r.prototype = e.prototype), (t.prototype = new r()), (t.prototype.constructor = t); - } - function o(t, e, r) { - if (o.isBN(t)) return t; - (this.negative = 0), - (this.words = null), - (this.length = 0), - (this.red = null), - null !== t && (('le' !== e && 'be' !== e) || ((r = e), (e = 10)), this._init(t || 0, e || 10, r || 'be')); - } - var s; - 'object' == typeof t ? (t.exports = o) : (e.BN = o), (o.BN = o), (o.wordSize = 26); - try { - s = 'undefined' != typeof window && void 0 !== window.Buffer ? window.Buffer : r(4282).Buffer; - } catch (t) {} - function a(t, e) { - var r = t.charCodeAt(e); - return r >= 65 && r <= 70 ? r - 55 : r >= 97 && r <= 102 ? r - 87 : (r - 48) & 15; - } - function h(t, e, r) { - var i = a(t, r); - return r - 1 >= e && (i |= a(t, r - 1) << 4), i; - } - function u(t, e, r, i) { - for (var n = 0, o = Math.min(t.length, r), s = e; s < o; s++) { - var a = t.charCodeAt(s) - 48; - (n *= i), (n += a >= 49 ? a - 49 + 10 : a >= 17 ? a - 17 + 10 : a); - } - return n; - } - (o.isBN = function (t) { - return ( - t instanceof o || (null !== t && 'object' == typeof t && t.constructor.wordSize === o.wordSize && Array.isArray(t.words)) - ); - }), - (o.max = function (t, e) { - return t.cmp(e) > 0 ? t : e; - }), - (o.min = function (t, e) { - return t.cmp(e) < 0 ? t : e; - }), - (o.prototype._init = function (t, e, r) { - if ('number' == typeof t) return this._initNumber(t, e, r); - if ('object' == typeof t) return this._initArray(t, e, r); - 'hex' === e && (e = 16), i(e === (0 | e) && e >= 2 && e <= 36); - var n = 0; - '-' === (t = t.toString().replace(/\s+/g, ''))[0] && (n++, (this.negative = 1)), - n < t.length && - (16 === e ? this._parseHex(t, n, r) : (this._parseBase(t, e, n), 'le' === r && this._initArray(this.toArray(), e, r))); - }), - (o.prototype._initNumber = function (t, e, r) { - t < 0 && ((this.negative = 1), (t = -t)), - t < 67108864 - ? ((this.words = [67108863 & t]), (this.length = 1)) - : t < 4503599627370496 - ? ((this.words = [67108863 & t, (t / 67108864) & 67108863]), (this.length = 2)) - : (i(t < 9007199254740992), (this.words = [67108863 & t, (t / 67108864) & 67108863, 1]), (this.length = 3)), - 'le' === r && this._initArray(this.toArray(), e, r); - }), - (o.prototype._initArray = function (t, e, r) { - if ((i('number' == typeof t.length), t.length <= 0)) return (this.words = [0]), (this.length = 1), this; - (this.length = Math.ceil(t.length / 3)), (this.words = new Array(this.length)); - for (var n = 0; n < this.length; n++) this.words[n] = 0; - var o, - s, - a = 0; - if ('be' === r) - for (n = t.length - 1, o = 0; n >= 0; n -= 3) - (s = t[n] | (t[n - 1] << 8) | (t[n - 2] << 16)), - (this.words[o] |= (s << a) & 67108863), - (this.words[o + 1] = (s >>> (26 - a)) & 67108863), - (a += 24) >= 26 && ((a -= 26), o++); - else if ('le' === r) - for (n = 0, o = 0; n < t.length; n += 3) - (s = t[n] | (t[n + 1] << 8) | (t[n + 2] << 16)), - (this.words[o] |= (s << a) & 67108863), - (this.words[o + 1] = (s >>> (26 - a)) & 67108863), - (a += 24) >= 26 && ((a -= 26), o++); - return this.strip(); - }), - (o.prototype._parseHex = function (t, e, r) { - (this.length = Math.ceil((t.length - e) / 6)), (this.words = new Array(this.length)); - for (var i = 0; i < this.length; i++) this.words[i] = 0; - var n, - o = 0, - s = 0; - if ('be' === r) - for (i = t.length - 1; i >= e; i -= 2) - (n = h(t, e, i) << o), - (this.words[s] |= 67108863 & n), - o >= 18 ? ((o -= 18), (s += 1), (this.words[s] |= n >>> 26)) : (o += 8); - else - for (i = (t.length - e) % 2 == 0 ? e + 1 : e; i < t.length; i += 2) - (n = h(t, e, i) << o), - (this.words[s] |= 67108863 & n), - o >= 18 ? ((o -= 18), (s += 1), (this.words[s] |= n >>> 26)) : (o += 8); - this.strip(); - }), - (o.prototype._parseBase = function (t, e, r) { - (this.words = [0]), (this.length = 1); - for (var i = 0, n = 1; n <= 67108863; n *= e) i++; - i--, (n = (n / e) | 0); - for (var o = t.length - r, s = o % i, a = Math.min(o, o - s) + r, h = 0, f = r; f < a; f += i) - (h = u(t, f, f + i, e)), this.imuln(n), this.words[0] + h < 67108864 ? (this.words[0] += h) : this._iaddn(h); - if (0 !== s) { - var c = 1; - for (h = u(t, f, t.length, e), f = 0; f < s; f++) c *= e; - this.imuln(c), this.words[0] + h < 67108864 ? (this.words[0] += h) : this._iaddn(h); - } - this.strip(); - }), - (o.prototype.copy = function (t) { - t.words = new Array(this.length); - for (var e = 0; e < this.length; e++) t.words[e] = this.words[e]; - (t.length = this.length), (t.negative = this.negative), (t.red = this.red); - }), - (o.prototype.clone = function () { - var t = new o(null); - return this.copy(t), t; - }), - (o.prototype._expand = function (t) { - for (; this.length < t; ) this.words[this.length++] = 0; - return this; - }), - (o.prototype.strip = function () { - for (; this.length > 1 && 0 === this.words[this.length - 1]; ) this.length--; - return this._normSign(); - }), - (o.prototype._normSign = function () { - return 1 === this.length && 0 === this.words[0] && (this.negative = 0), this; - }), - (o.prototype.inspect = function () { - return (this.red ? ''; - }); - var f = [ - '', - '0', - '00', - '000', - '0000', - '00000', - '000000', - '0000000', - '00000000', - '000000000', - '0000000000', - '00000000000', - '000000000000', - '0000000000000', - '00000000000000', - '000000000000000', - '0000000000000000', - '00000000000000000', - '000000000000000000', - '0000000000000000000', - '00000000000000000000', - '000000000000000000000', - '0000000000000000000000', - '00000000000000000000000', - '000000000000000000000000', - '0000000000000000000000000', - ], - c = [0, 0, 25, 16, 12, 11, 10, 9, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5], - l = [ - 0, 0, 33554432, 43046721, 16777216, 48828125, 60466176, 40353607, 16777216, 43046721, 1e7, 19487171, 35831808, 62748517, - 7529536, 11390625, 16777216, 24137569, 34012224, 47045881, 64e6, 4084101, 5153632, 6436343, 7962624, 9765625, 11881376, - 14348907, 17210368, 20511149, 243e5, 28629151, 33554432, 39135393, 45435424, 52521875, 60466176, - ]; - function d(t, e, r) { - r.negative = e.negative ^ t.negative; - var i = (t.length + e.length) | 0; - (r.length = i), (i = (i - 1) | 0); - var n = 0 | t.words[0], - o = 0 | e.words[0], - s = n * o, - a = 67108863 & s, - h = (s / 67108864) | 0; - r.words[0] = a; - for (var u = 1; u < i; u++) { - for (var f = h >>> 26, c = 67108863 & h, l = Math.min(u, e.length - 1), d = Math.max(0, u - t.length + 1); d <= l; d++) { - var p = (u - d) | 0; - (f += ((s = (n = 0 | t.words[p]) * (o = 0 | e.words[d]) + c) / 67108864) | 0), (c = 67108863 & s); - } - (r.words[u] = 0 | c), (h = 0 | f); - } - return 0 !== h ? (r.words[u] = 0 | h) : r.length--, r.strip(); - } - (o.prototype.toString = function (t, e) { - var r; - if (((e = 0 | e || 1), 16 === (t = t || 10) || 'hex' === t)) { - r = ''; - for (var n = 0, o = 0, s = 0; s < this.length; s++) { - var a = this.words[s], - h = (16777215 & ((a << n) | o)).toString(16); - (r = 0 != (o = (a >>> (24 - n)) & 16777215) || s !== this.length - 1 ? f[6 - h.length] + h + r : h + r), - (n += 2) >= 26 && ((n -= 26), s--); - } - for (0 !== o && (r = o.toString(16) + r); r.length % e != 0; ) r = '0' + r; - return 0 !== this.negative && (r = '-' + r), r; - } - if (t === (0 | t) && t >= 2 && t <= 36) { - var u = c[t], - d = l[t]; - r = ''; - var p = this.clone(); - for (p.negative = 0; !p.isZero(); ) { - var m = p.modn(d).toString(t); - r = (p = p.idivn(d)).isZero() ? m + r : f[u - m.length] + m + r; - } - for (this.isZero() && (r = '0' + r); r.length % e != 0; ) r = '0' + r; - return 0 !== this.negative && (r = '-' + r), r; - } - i(!1, 'Base should be between 2 and 36'); - }), - (o.prototype.toNumber = function () { - var t = this.words[0]; - return ( - 2 === this.length - ? (t += 67108864 * this.words[1]) - : 3 === this.length && 1 === this.words[2] - ? (t += 4503599627370496 + 67108864 * this.words[1]) - : this.length > 2 && i(!1, 'Number can only safely store up to 53 bits'), - 0 !== this.negative ? -t : t - ); - }), - (o.prototype.toJSON = function () { - return this.toString(16); - }), - (o.prototype.toBuffer = function (t, e) { - return i(void 0 !== s), this.toArrayLike(s, t, e); - }), - (o.prototype.toArray = function (t, e) { - return this.toArrayLike(Array, t, e); - }), - (o.prototype.toArrayLike = function (t, e, r) { - var n = this.byteLength(), - o = r || Math.max(1, n); - i(n <= o, 'byte array longer than desired length'), i(o > 0, 'Requested array length <= 0'), this.strip(); - var s, - a, - h = 'le' === e, - u = new t(o), - f = this.clone(); - if (h) { - for (a = 0; !f.isZero(); a++) (s = f.andln(255)), f.iushrn(8), (u[a] = s); - for (; a < o; a++) u[a] = 0; - } else { - for (a = 0; a < o - n; a++) u[a] = 0; - for (a = 0; !f.isZero(); a++) (s = f.andln(255)), f.iushrn(8), (u[o - a - 1] = s); - } - return u; - }), - Math.clz32 - ? (o.prototype._countBits = function (t) { - return 32 - Math.clz32(t); - }) - : (o.prototype._countBits = function (t) { - var e = t, - r = 0; - return ( - e >= 4096 && ((r += 13), (e >>>= 13)), - e >= 64 && ((r += 7), (e >>>= 7)), - e >= 8 && ((r += 4), (e >>>= 4)), - e >= 2 && ((r += 2), (e >>>= 2)), - r + e - ); - }), - (o.prototype._zeroBits = function (t) { - if (0 === t) return 26; - var e = t, - r = 0; - return ( - 0 == (8191 & e) && ((r += 13), (e >>>= 13)), - 0 == (127 & e) && ((r += 7), (e >>>= 7)), - 0 == (15 & e) && ((r += 4), (e >>>= 4)), - 0 == (3 & e) && ((r += 2), (e >>>= 2)), - 0 == (1 & e) && r++, - r - ); - }), - (o.prototype.bitLength = function () { - var t = this.words[this.length - 1], - e = this._countBits(t); - return 26 * (this.length - 1) + e; - }), - (o.prototype.zeroBits = function () { - if (this.isZero()) return 0; - for (var t = 0, e = 0; e < this.length; e++) { - var r = this._zeroBits(this.words[e]); - if (((t += r), 26 !== r)) break; - } - return t; - }), - (o.prototype.byteLength = function () { - return Math.ceil(this.bitLength() / 8); - }), - (o.prototype.toTwos = function (t) { - return 0 !== this.negative ? this.abs().inotn(t).iaddn(1) : this.clone(); - }), - (o.prototype.fromTwos = function (t) { - return this.testn(t - 1) ? this.notn(t).iaddn(1).ineg() : this.clone(); - }), - (o.prototype.isNeg = function () { - return 0 !== this.negative; - }), - (o.prototype.neg = function () { - return this.clone().ineg(); - }), - (o.prototype.ineg = function () { - return this.isZero() || (this.negative ^= 1), this; - }), - (o.prototype.iuor = function (t) { - for (; this.length < t.length; ) this.words[this.length++] = 0; - for (var e = 0; e < t.length; e++) this.words[e] = this.words[e] | t.words[e]; - return this.strip(); - }), - (o.prototype.ior = function (t) { - return i(0 == (this.negative | t.negative)), this.iuor(t); - }), - (o.prototype.or = function (t) { - return this.length > t.length ? this.clone().ior(t) : t.clone().ior(this); - }), - (o.prototype.uor = function (t) { - return this.length > t.length ? this.clone().iuor(t) : t.clone().iuor(this); - }), - (o.prototype.iuand = function (t) { - var e; - e = this.length > t.length ? t : this; - for (var r = 0; r < e.length; r++) this.words[r] = this.words[r] & t.words[r]; - return (this.length = e.length), this.strip(); - }), - (o.prototype.iand = function (t) { - return i(0 == (this.negative | t.negative)), this.iuand(t); - }), - (o.prototype.and = function (t) { - return this.length > t.length ? this.clone().iand(t) : t.clone().iand(this); - }), - (o.prototype.uand = function (t) { - return this.length > t.length ? this.clone().iuand(t) : t.clone().iuand(this); - }), - (o.prototype.iuxor = function (t) { - var e, r; - this.length > t.length ? ((e = this), (r = t)) : ((e = t), (r = this)); - for (var i = 0; i < r.length; i++) this.words[i] = e.words[i] ^ r.words[i]; - if (this !== e) for (; i < e.length; i++) this.words[i] = e.words[i]; - return (this.length = e.length), this.strip(); - }), - (o.prototype.ixor = function (t) { - return i(0 == (this.negative | t.negative)), this.iuxor(t); - }), - (o.prototype.xor = function (t) { - return this.length > t.length ? this.clone().ixor(t) : t.clone().ixor(this); - }), - (o.prototype.uxor = function (t) { - return this.length > t.length ? this.clone().iuxor(t) : t.clone().iuxor(this); - }), - (o.prototype.inotn = function (t) { - i('number' == typeof t && t >= 0); - var e = 0 | Math.ceil(t / 26), - r = t % 26; - this._expand(e), r > 0 && e--; - for (var n = 0; n < e; n++) this.words[n] = 67108863 & ~this.words[n]; - return r > 0 && (this.words[n] = ~this.words[n] & (67108863 >> (26 - r))), this.strip(); - }), - (o.prototype.notn = function (t) { - return this.clone().inotn(t); - }), - (o.prototype.setn = function (t, e) { - i('number' == typeof t && t >= 0); - var r = (t / 26) | 0, - n = t % 26; - return this._expand(r + 1), (this.words[r] = e ? this.words[r] | (1 << n) : this.words[r] & ~(1 << n)), this.strip(); - }), - (o.prototype.iadd = function (t) { - var e, r, i; - if (0 !== this.negative && 0 === t.negative) - return (this.negative = 0), (e = this.isub(t)), (this.negative ^= 1), this._normSign(); - if (0 === this.negative && 0 !== t.negative) return (t.negative = 0), (e = this.isub(t)), (t.negative = 1), e._normSign(); - this.length > t.length ? ((r = this), (i = t)) : ((r = t), (i = this)); - for (var n = 0, o = 0; o < i.length; o++) - (e = (0 | r.words[o]) + (0 | i.words[o]) + n), (this.words[o] = 67108863 & e), (n = e >>> 26); - for (; 0 !== n && o < r.length; o++) (e = (0 | r.words[o]) + n), (this.words[o] = 67108863 & e), (n = e >>> 26); - if (((this.length = r.length), 0 !== n)) (this.words[this.length] = n), this.length++; - else if (r !== this) for (; o < r.length; o++) this.words[o] = r.words[o]; - return this; - }), - (o.prototype.add = function (t) { - var e; - return 0 !== t.negative && 0 === this.negative - ? ((t.negative = 0), (e = this.sub(t)), (t.negative ^= 1), e) - : 0 === t.negative && 0 !== this.negative - ? ((this.negative = 0), (e = t.sub(this)), (this.negative = 1), e) - : this.length > t.length - ? this.clone().iadd(t) - : t.clone().iadd(this); - }), - (o.prototype.isub = function (t) { - if (0 !== t.negative) { - t.negative = 0; - var e = this.iadd(t); - return (t.negative = 1), e._normSign(); - } - if (0 !== this.negative) return (this.negative = 0), this.iadd(t), (this.negative = 1), this._normSign(); - var r, - i, - n = this.cmp(t); - if (0 === n) return (this.negative = 0), (this.length = 1), (this.words[0] = 0), this; - n > 0 ? ((r = this), (i = t)) : ((r = t), (i = this)); - for (var o = 0, s = 0; s < i.length; s++) - (o = (e = (0 | r.words[s]) - (0 | i.words[s]) + o) >> 26), (this.words[s] = 67108863 & e); - for (; 0 !== o && s < r.length; s++) (o = (e = (0 | r.words[s]) + o) >> 26), (this.words[s] = 67108863 & e); - if (0 === o && s < r.length && r !== this) for (; s < r.length; s++) this.words[s] = r.words[s]; - return (this.length = Math.max(this.length, s)), r !== this && (this.negative = 1), this.strip(); - }), - (o.prototype.sub = function (t) { - return this.clone().isub(t); - }); - var p = function (t, e, r) { - var i, - n, - o, - s = t.words, - a = e.words, - h = r.words, - u = 0, - f = 0 | s[0], - c = 8191 & f, - l = f >>> 13, - d = 0 | s[1], - p = 8191 & d, - m = d >>> 13, - g = 0 | s[2], - b = 8191 & g, - y = g >>> 13, - v = 0 | s[3], - w = 8191 & v, - _ = v >>> 13, - M = 0 | s[4], - E = 8191 & M, - S = M >>> 13, - x = 0 | s[5], - A = 8191 & x, - k = x >>> 13, - R = 0 | s[6], - B = 8191 & R, - I = R >>> 13, - T = 0 | s[7], - P = 8191 & T, - O = T >>> 13, - L = 0 | s[8], - C = 8191 & L, - N = L >>> 13, - j = 0 | s[9], - U = 8191 & j, - D = j >>> 13, - z = 0 | a[0], - F = 8191 & z, - q = z >>> 13, - H = 0 | a[1], - $ = 8191 & H, - Z = H >>> 13, - G = 0 | a[2], - V = 8191 & G, - W = G >>> 13, - K = 0 | a[3], - Y = 8191 & K, - J = K >>> 13, - X = 0 | a[4], - Q = 8191 & X, - tt = X >>> 13, - et = 0 | a[5], - rt = 8191 & et, - it = et >>> 13, - nt = 0 | a[6], - ot = 8191 & nt, - st = nt >>> 13, - at = 0 | a[7], - ht = 8191 & at, - ut = at >>> 13, - ft = 0 | a[8], - ct = 8191 & ft, - lt = ft >>> 13, - dt = 0 | a[9], - pt = 8191 & dt, - mt = dt >>> 13; - (r.negative = t.negative ^ e.negative), (r.length = 19); - var gt = (((u + (i = Math.imul(c, F))) | 0) + ((8191 & (n = ((n = Math.imul(c, q)) + Math.imul(l, F)) | 0)) << 13)) | 0; - (u = ((((o = Math.imul(l, q)) + (n >>> 13)) | 0) + (gt >>> 26)) | 0), - (gt &= 67108863), - (i = Math.imul(p, F)), - (n = ((n = Math.imul(p, q)) + Math.imul(m, F)) | 0), - (o = Math.imul(m, q)); - var bt = - (((u + (i = (i + Math.imul(c, $)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, Z)) | 0) + Math.imul(l, $)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, Z)) | 0) + (n >>> 13)) | 0) + (bt >>> 26)) | 0), - (bt &= 67108863), - (i = Math.imul(b, F)), - (n = ((n = Math.imul(b, q)) + Math.imul(y, F)) | 0), - (o = Math.imul(y, q)), - (i = (i + Math.imul(p, $)) | 0), - (n = ((n = (n + Math.imul(p, Z)) | 0) + Math.imul(m, $)) | 0), - (o = (o + Math.imul(m, Z)) | 0); - var yt = - (((u + (i = (i + Math.imul(c, V)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, W)) | 0) + Math.imul(l, V)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, W)) | 0) + (n >>> 13)) | 0) + (yt >>> 26)) | 0), - (yt &= 67108863), - (i = Math.imul(w, F)), - (n = ((n = Math.imul(w, q)) + Math.imul(_, F)) | 0), - (o = Math.imul(_, q)), - (i = (i + Math.imul(b, $)) | 0), - (n = ((n = (n + Math.imul(b, Z)) | 0) + Math.imul(y, $)) | 0), - (o = (o + Math.imul(y, Z)) | 0), - (i = (i + Math.imul(p, V)) | 0), - (n = ((n = (n + Math.imul(p, W)) | 0) + Math.imul(m, V)) | 0), - (o = (o + Math.imul(m, W)) | 0); - var vt = - (((u + (i = (i + Math.imul(c, Y)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, J)) | 0) + Math.imul(l, Y)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, J)) | 0) + (n >>> 13)) | 0) + (vt >>> 26)) | 0), - (vt &= 67108863), - (i = Math.imul(E, F)), - (n = ((n = Math.imul(E, q)) + Math.imul(S, F)) | 0), - (o = Math.imul(S, q)), - (i = (i + Math.imul(w, $)) | 0), - (n = ((n = (n + Math.imul(w, Z)) | 0) + Math.imul(_, $)) | 0), - (o = (o + Math.imul(_, Z)) | 0), - (i = (i + Math.imul(b, V)) | 0), - (n = ((n = (n + Math.imul(b, W)) | 0) + Math.imul(y, V)) | 0), - (o = (o + Math.imul(y, W)) | 0), - (i = (i + Math.imul(p, Y)) | 0), - (n = ((n = (n + Math.imul(p, J)) | 0) + Math.imul(m, Y)) | 0), - (o = (o + Math.imul(m, J)) | 0); - var wt = - (((u + (i = (i + Math.imul(c, Q)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, tt)) | 0) + Math.imul(l, Q)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, tt)) | 0) + (n >>> 13)) | 0) + (wt >>> 26)) | 0), - (wt &= 67108863), - (i = Math.imul(A, F)), - (n = ((n = Math.imul(A, q)) + Math.imul(k, F)) | 0), - (o = Math.imul(k, q)), - (i = (i + Math.imul(E, $)) | 0), - (n = ((n = (n + Math.imul(E, Z)) | 0) + Math.imul(S, $)) | 0), - (o = (o + Math.imul(S, Z)) | 0), - (i = (i + Math.imul(w, V)) | 0), - (n = ((n = (n + Math.imul(w, W)) | 0) + Math.imul(_, V)) | 0), - (o = (o + Math.imul(_, W)) | 0), - (i = (i + Math.imul(b, Y)) | 0), - (n = ((n = (n + Math.imul(b, J)) | 0) + Math.imul(y, Y)) | 0), - (o = (o + Math.imul(y, J)) | 0), - (i = (i + Math.imul(p, Q)) | 0), - (n = ((n = (n + Math.imul(p, tt)) | 0) + Math.imul(m, Q)) | 0), - (o = (o + Math.imul(m, tt)) | 0); - var _t = - (((u + (i = (i + Math.imul(c, rt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, it)) | 0) + Math.imul(l, rt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, it)) | 0) + (n >>> 13)) | 0) + (_t >>> 26)) | 0), - (_t &= 67108863), - (i = Math.imul(B, F)), - (n = ((n = Math.imul(B, q)) + Math.imul(I, F)) | 0), - (o = Math.imul(I, q)), - (i = (i + Math.imul(A, $)) | 0), - (n = ((n = (n + Math.imul(A, Z)) | 0) + Math.imul(k, $)) | 0), - (o = (o + Math.imul(k, Z)) | 0), - (i = (i + Math.imul(E, V)) | 0), - (n = ((n = (n + Math.imul(E, W)) | 0) + Math.imul(S, V)) | 0), - (o = (o + Math.imul(S, W)) | 0), - (i = (i + Math.imul(w, Y)) | 0), - (n = ((n = (n + Math.imul(w, J)) | 0) + Math.imul(_, Y)) | 0), - (o = (o + Math.imul(_, J)) | 0), - (i = (i + Math.imul(b, Q)) | 0), - (n = ((n = (n + Math.imul(b, tt)) | 0) + Math.imul(y, Q)) | 0), - (o = (o + Math.imul(y, tt)) | 0), - (i = (i + Math.imul(p, rt)) | 0), - (n = ((n = (n + Math.imul(p, it)) | 0) + Math.imul(m, rt)) | 0), - (o = (o + Math.imul(m, it)) | 0); - var Mt = - (((u + (i = (i + Math.imul(c, ot)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, st)) | 0) + Math.imul(l, ot)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, st)) | 0) + (n >>> 13)) | 0) + (Mt >>> 26)) | 0), - (Mt &= 67108863), - (i = Math.imul(P, F)), - (n = ((n = Math.imul(P, q)) + Math.imul(O, F)) | 0), - (o = Math.imul(O, q)), - (i = (i + Math.imul(B, $)) | 0), - (n = ((n = (n + Math.imul(B, Z)) | 0) + Math.imul(I, $)) | 0), - (o = (o + Math.imul(I, Z)) | 0), - (i = (i + Math.imul(A, V)) | 0), - (n = ((n = (n + Math.imul(A, W)) | 0) + Math.imul(k, V)) | 0), - (o = (o + Math.imul(k, W)) | 0), - (i = (i + Math.imul(E, Y)) | 0), - (n = ((n = (n + Math.imul(E, J)) | 0) + Math.imul(S, Y)) | 0), - (o = (o + Math.imul(S, J)) | 0), - (i = (i + Math.imul(w, Q)) | 0), - (n = ((n = (n + Math.imul(w, tt)) | 0) + Math.imul(_, Q)) | 0), - (o = (o + Math.imul(_, tt)) | 0), - (i = (i + Math.imul(b, rt)) | 0), - (n = ((n = (n + Math.imul(b, it)) | 0) + Math.imul(y, rt)) | 0), - (o = (o + Math.imul(y, it)) | 0), - (i = (i + Math.imul(p, ot)) | 0), - (n = ((n = (n + Math.imul(p, st)) | 0) + Math.imul(m, ot)) | 0), - (o = (o + Math.imul(m, st)) | 0); - var Et = - (((u + (i = (i + Math.imul(c, ht)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, ut)) | 0) + Math.imul(l, ht)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, ut)) | 0) + (n >>> 13)) | 0) + (Et >>> 26)) | 0), - (Et &= 67108863), - (i = Math.imul(C, F)), - (n = ((n = Math.imul(C, q)) + Math.imul(N, F)) | 0), - (o = Math.imul(N, q)), - (i = (i + Math.imul(P, $)) | 0), - (n = ((n = (n + Math.imul(P, Z)) | 0) + Math.imul(O, $)) | 0), - (o = (o + Math.imul(O, Z)) | 0), - (i = (i + Math.imul(B, V)) | 0), - (n = ((n = (n + Math.imul(B, W)) | 0) + Math.imul(I, V)) | 0), - (o = (o + Math.imul(I, W)) | 0), - (i = (i + Math.imul(A, Y)) | 0), - (n = ((n = (n + Math.imul(A, J)) | 0) + Math.imul(k, Y)) | 0), - (o = (o + Math.imul(k, J)) | 0), - (i = (i + Math.imul(E, Q)) | 0), - (n = ((n = (n + Math.imul(E, tt)) | 0) + Math.imul(S, Q)) | 0), - (o = (o + Math.imul(S, tt)) | 0), - (i = (i + Math.imul(w, rt)) | 0), - (n = ((n = (n + Math.imul(w, it)) | 0) + Math.imul(_, rt)) | 0), - (o = (o + Math.imul(_, it)) | 0), - (i = (i + Math.imul(b, ot)) | 0), - (n = ((n = (n + Math.imul(b, st)) | 0) + Math.imul(y, ot)) | 0), - (o = (o + Math.imul(y, st)) | 0), - (i = (i + Math.imul(p, ht)) | 0), - (n = ((n = (n + Math.imul(p, ut)) | 0) + Math.imul(m, ht)) | 0), - (o = (o + Math.imul(m, ut)) | 0); - var St = - (((u + (i = (i + Math.imul(c, ct)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, lt)) | 0) + Math.imul(l, ct)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, lt)) | 0) + (n >>> 13)) | 0) + (St >>> 26)) | 0), - (St &= 67108863), - (i = Math.imul(U, F)), - (n = ((n = Math.imul(U, q)) + Math.imul(D, F)) | 0), - (o = Math.imul(D, q)), - (i = (i + Math.imul(C, $)) | 0), - (n = ((n = (n + Math.imul(C, Z)) | 0) + Math.imul(N, $)) | 0), - (o = (o + Math.imul(N, Z)) | 0), - (i = (i + Math.imul(P, V)) | 0), - (n = ((n = (n + Math.imul(P, W)) | 0) + Math.imul(O, V)) | 0), - (o = (o + Math.imul(O, W)) | 0), - (i = (i + Math.imul(B, Y)) | 0), - (n = ((n = (n + Math.imul(B, J)) | 0) + Math.imul(I, Y)) | 0), - (o = (o + Math.imul(I, J)) | 0), - (i = (i + Math.imul(A, Q)) | 0), - (n = ((n = (n + Math.imul(A, tt)) | 0) + Math.imul(k, Q)) | 0), - (o = (o + Math.imul(k, tt)) | 0), - (i = (i + Math.imul(E, rt)) | 0), - (n = ((n = (n + Math.imul(E, it)) | 0) + Math.imul(S, rt)) | 0), - (o = (o + Math.imul(S, it)) | 0), - (i = (i + Math.imul(w, ot)) | 0), - (n = ((n = (n + Math.imul(w, st)) | 0) + Math.imul(_, ot)) | 0), - (o = (o + Math.imul(_, st)) | 0), - (i = (i + Math.imul(b, ht)) | 0), - (n = ((n = (n + Math.imul(b, ut)) | 0) + Math.imul(y, ht)) | 0), - (o = (o + Math.imul(y, ut)) | 0), - (i = (i + Math.imul(p, ct)) | 0), - (n = ((n = (n + Math.imul(p, lt)) | 0) + Math.imul(m, ct)) | 0), - (o = (o + Math.imul(m, lt)) | 0); - var xt = - (((u + (i = (i + Math.imul(c, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(c, mt)) | 0) + Math.imul(l, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(l, mt)) | 0) + (n >>> 13)) | 0) + (xt >>> 26)) | 0), - (xt &= 67108863), - (i = Math.imul(U, $)), - (n = ((n = Math.imul(U, Z)) + Math.imul(D, $)) | 0), - (o = Math.imul(D, Z)), - (i = (i + Math.imul(C, V)) | 0), - (n = ((n = (n + Math.imul(C, W)) | 0) + Math.imul(N, V)) | 0), - (o = (o + Math.imul(N, W)) | 0), - (i = (i + Math.imul(P, Y)) | 0), - (n = ((n = (n + Math.imul(P, J)) | 0) + Math.imul(O, Y)) | 0), - (o = (o + Math.imul(O, J)) | 0), - (i = (i + Math.imul(B, Q)) | 0), - (n = ((n = (n + Math.imul(B, tt)) | 0) + Math.imul(I, Q)) | 0), - (o = (o + Math.imul(I, tt)) | 0), - (i = (i + Math.imul(A, rt)) | 0), - (n = ((n = (n + Math.imul(A, it)) | 0) + Math.imul(k, rt)) | 0), - (o = (o + Math.imul(k, it)) | 0), - (i = (i + Math.imul(E, ot)) | 0), - (n = ((n = (n + Math.imul(E, st)) | 0) + Math.imul(S, ot)) | 0), - (o = (o + Math.imul(S, st)) | 0), - (i = (i + Math.imul(w, ht)) | 0), - (n = ((n = (n + Math.imul(w, ut)) | 0) + Math.imul(_, ht)) | 0), - (o = (o + Math.imul(_, ut)) | 0), - (i = (i + Math.imul(b, ct)) | 0), - (n = ((n = (n + Math.imul(b, lt)) | 0) + Math.imul(y, ct)) | 0), - (o = (o + Math.imul(y, lt)) | 0); - var At = - (((u + (i = (i + Math.imul(p, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(p, mt)) | 0) + Math.imul(m, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(m, mt)) | 0) + (n >>> 13)) | 0) + (At >>> 26)) | 0), - (At &= 67108863), - (i = Math.imul(U, V)), - (n = ((n = Math.imul(U, W)) + Math.imul(D, V)) | 0), - (o = Math.imul(D, W)), - (i = (i + Math.imul(C, Y)) | 0), - (n = ((n = (n + Math.imul(C, J)) | 0) + Math.imul(N, Y)) | 0), - (o = (o + Math.imul(N, J)) | 0), - (i = (i + Math.imul(P, Q)) | 0), - (n = ((n = (n + Math.imul(P, tt)) | 0) + Math.imul(O, Q)) | 0), - (o = (o + Math.imul(O, tt)) | 0), - (i = (i + Math.imul(B, rt)) | 0), - (n = ((n = (n + Math.imul(B, it)) | 0) + Math.imul(I, rt)) | 0), - (o = (o + Math.imul(I, it)) | 0), - (i = (i + Math.imul(A, ot)) | 0), - (n = ((n = (n + Math.imul(A, st)) | 0) + Math.imul(k, ot)) | 0), - (o = (o + Math.imul(k, st)) | 0), - (i = (i + Math.imul(E, ht)) | 0), - (n = ((n = (n + Math.imul(E, ut)) | 0) + Math.imul(S, ht)) | 0), - (o = (o + Math.imul(S, ut)) | 0), - (i = (i + Math.imul(w, ct)) | 0), - (n = ((n = (n + Math.imul(w, lt)) | 0) + Math.imul(_, ct)) | 0), - (o = (o + Math.imul(_, lt)) | 0); - var kt = - (((u + (i = (i + Math.imul(b, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(b, mt)) | 0) + Math.imul(y, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(y, mt)) | 0) + (n >>> 13)) | 0) + (kt >>> 26)) | 0), - (kt &= 67108863), - (i = Math.imul(U, Y)), - (n = ((n = Math.imul(U, J)) + Math.imul(D, Y)) | 0), - (o = Math.imul(D, J)), - (i = (i + Math.imul(C, Q)) | 0), - (n = ((n = (n + Math.imul(C, tt)) | 0) + Math.imul(N, Q)) | 0), - (o = (o + Math.imul(N, tt)) | 0), - (i = (i + Math.imul(P, rt)) | 0), - (n = ((n = (n + Math.imul(P, it)) | 0) + Math.imul(O, rt)) | 0), - (o = (o + Math.imul(O, it)) | 0), - (i = (i + Math.imul(B, ot)) | 0), - (n = ((n = (n + Math.imul(B, st)) | 0) + Math.imul(I, ot)) | 0), - (o = (o + Math.imul(I, st)) | 0), - (i = (i + Math.imul(A, ht)) | 0), - (n = ((n = (n + Math.imul(A, ut)) | 0) + Math.imul(k, ht)) | 0), - (o = (o + Math.imul(k, ut)) | 0), - (i = (i + Math.imul(E, ct)) | 0), - (n = ((n = (n + Math.imul(E, lt)) | 0) + Math.imul(S, ct)) | 0), - (o = (o + Math.imul(S, lt)) | 0); - var Rt = - (((u + (i = (i + Math.imul(w, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(w, mt)) | 0) + Math.imul(_, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(_, mt)) | 0) + (n >>> 13)) | 0) + (Rt >>> 26)) | 0), - (Rt &= 67108863), - (i = Math.imul(U, Q)), - (n = ((n = Math.imul(U, tt)) + Math.imul(D, Q)) | 0), - (o = Math.imul(D, tt)), - (i = (i + Math.imul(C, rt)) | 0), - (n = ((n = (n + Math.imul(C, it)) | 0) + Math.imul(N, rt)) | 0), - (o = (o + Math.imul(N, it)) | 0), - (i = (i + Math.imul(P, ot)) | 0), - (n = ((n = (n + Math.imul(P, st)) | 0) + Math.imul(O, ot)) | 0), - (o = (o + Math.imul(O, st)) | 0), - (i = (i + Math.imul(B, ht)) | 0), - (n = ((n = (n + Math.imul(B, ut)) | 0) + Math.imul(I, ht)) | 0), - (o = (o + Math.imul(I, ut)) | 0), - (i = (i + Math.imul(A, ct)) | 0), - (n = ((n = (n + Math.imul(A, lt)) | 0) + Math.imul(k, ct)) | 0), - (o = (o + Math.imul(k, lt)) | 0); - var Bt = - (((u + (i = (i + Math.imul(E, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(E, mt)) | 0) + Math.imul(S, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(S, mt)) | 0) + (n >>> 13)) | 0) + (Bt >>> 26)) | 0), - (Bt &= 67108863), - (i = Math.imul(U, rt)), - (n = ((n = Math.imul(U, it)) + Math.imul(D, rt)) | 0), - (o = Math.imul(D, it)), - (i = (i + Math.imul(C, ot)) | 0), - (n = ((n = (n + Math.imul(C, st)) | 0) + Math.imul(N, ot)) | 0), - (o = (o + Math.imul(N, st)) | 0), - (i = (i + Math.imul(P, ht)) | 0), - (n = ((n = (n + Math.imul(P, ut)) | 0) + Math.imul(O, ht)) | 0), - (o = (o + Math.imul(O, ut)) | 0), - (i = (i + Math.imul(B, ct)) | 0), - (n = ((n = (n + Math.imul(B, lt)) | 0) + Math.imul(I, ct)) | 0), - (o = (o + Math.imul(I, lt)) | 0); - var It = - (((u + (i = (i + Math.imul(A, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(A, mt)) | 0) + Math.imul(k, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(k, mt)) | 0) + (n >>> 13)) | 0) + (It >>> 26)) | 0), - (It &= 67108863), - (i = Math.imul(U, ot)), - (n = ((n = Math.imul(U, st)) + Math.imul(D, ot)) | 0), - (o = Math.imul(D, st)), - (i = (i + Math.imul(C, ht)) | 0), - (n = ((n = (n + Math.imul(C, ut)) | 0) + Math.imul(N, ht)) | 0), - (o = (o + Math.imul(N, ut)) | 0), - (i = (i + Math.imul(P, ct)) | 0), - (n = ((n = (n + Math.imul(P, lt)) | 0) + Math.imul(O, ct)) | 0), - (o = (o + Math.imul(O, lt)) | 0); - var Tt = - (((u + (i = (i + Math.imul(B, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(B, mt)) | 0) + Math.imul(I, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(I, mt)) | 0) + (n >>> 13)) | 0) + (Tt >>> 26)) | 0), - (Tt &= 67108863), - (i = Math.imul(U, ht)), - (n = ((n = Math.imul(U, ut)) + Math.imul(D, ht)) | 0), - (o = Math.imul(D, ut)), - (i = (i + Math.imul(C, ct)) | 0), - (n = ((n = (n + Math.imul(C, lt)) | 0) + Math.imul(N, ct)) | 0), - (o = (o + Math.imul(N, lt)) | 0); - var Pt = - (((u + (i = (i + Math.imul(P, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(P, mt)) | 0) + Math.imul(O, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(O, mt)) | 0) + (n >>> 13)) | 0) + (Pt >>> 26)) | 0), - (Pt &= 67108863), - (i = Math.imul(U, ct)), - (n = ((n = Math.imul(U, lt)) + Math.imul(D, ct)) | 0), - (o = Math.imul(D, lt)); - var Ot = - (((u + (i = (i + Math.imul(C, pt)) | 0)) | 0) + - ((8191 & (n = ((n = (n + Math.imul(C, mt)) | 0) + Math.imul(N, pt)) | 0)) << 13)) | - 0; - (u = ((((o = (o + Math.imul(N, mt)) | 0) + (n >>> 13)) | 0) + (Ot >>> 26)) | 0), (Ot &= 67108863); - var Lt = (((u + (i = Math.imul(U, pt))) | 0) + ((8191 & (n = ((n = Math.imul(U, mt)) + Math.imul(D, pt)) | 0)) << 13)) | 0; - return ( - (u = ((((o = Math.imul(D, mt)) + (n >>> 13)) | 0) + (Lt >>> 26)) | 0), - (Lt &= 67108863), - (h[0] = gt), - (h[1] = bt), - (h[2] = yt), - (h[3] = vt), - (h[4] = wt), - (h[5] = _t), - (h[6] = Mt), - (h[7] = Et), - (h[8] = St), - (h[9] = xt), - (h[10] = At), - (h[11] = kt), - (h[12] = Rt), - (h[13] = Bt), - (h[14] = It), - (h[15] = Tt), - (h[16] = Pt), - (h[17] = Ot), - (h[18] = Lt), - 0 !== u && ((h[19] = u), r.length++), - r - ); - }; - function m(t, e, r) { - return new g().mulp(t, e, r); - } - function g(t, e) { - (this.x = t), (this.y = e); - } - Math.imul || (p = d), - (o.prototype.mulTo = function (t, e) { - var r, - i = this.length + t.length; - return ( - (r = - 10 === this.length && 10 === t.length - ? p(this, t, e) - : i < 63 - ? d(this, t, e) - : i < 1024 - ? (function (t, e, r) { - (r.negative = e.negative ^ t.negative), (r.length = t.length + e.length); - for (var i = 0, n = 0, o = 0; o < r.length - 1; o++) { - var s = n; - n = 0; - for (var a = 67108863 & i, h = Math.min(o, e.length - 1), u = Math.max(0, o - t.length + 1); u <= h; u++) { - var f = o - u, - c = (0 | t.words[f]) * (0 | e.words[u]), - l = 67108863 & c; - (a = 67108863 & (l = (l + a) | 0)), - (n += (s = ((s = (s + ((c / 67108864) | 0)) | 0) + (l >>> 26)) | 0) >>> 26), - (s &= 67108863); - } - (r.words[o] = a), (i = s), (s = n); - } - return 0 !== i ? (r.words[o] = i) : r.length--, r.strip(); - })(this, t, e) - : m(this, t, e)), - r - ); - }), - (g.prototype.makeRBT = function (t) { - for (var e = new Array(t), r = o.prototype._countBits(t) - 1, i = 0; i < t; i++) e[i] = this.revBin(i, r, t); - return e; - }), - (g.prototype.revBin = function (t, e, r) { - if (0 === t || t === r - 1) return t; - for (var i = 0, n = 0; n < e; n++) (i |= (1 & t) << (e - n - 1)), (t >>= 1); - return i; - }), - (g.prototype.permute = function (t, e, r, i, n, o) { - for (var s = 0; s < o; s++) (i[s] = e[t[s]]), (n[s] = r[t[s]]); - }), - (g.prototype.transform = function (t, e, r, i, n, o) { - this.permute(o, t, e, r, i, n); - for (var s = 1; s < n; s <<= 1) - for (var a = s << 1, h = Math.cos((2 * Math.PI) / a), u = Math.sin((2 * Math.PI) / a), f = 0; f < n; f += a) - for (var c = h, l = u, d = 0; d < s; d++) { - var p = r[f + d], - m = i[f + d], - g = r[f + d + s], - b = i[f + d + s], - y = c * g - l * b; - (b = c * b + l * g), - (g = y), - (r[f + d] = p + g), - (i[f + d] = m + b), - (r[f + d + s] = p - g), - (i[f + d + s] = m - b), - d !== a && ((y = h * c - u * l), (l = h * l + u * c), (c = y)); - } - }), - (g.prototype.guessLen13b = function (t, e) { - var r = 1 | Math.max(e, t), - i = 1 & r, - n = 0; - for (r = (r / 2) | 0; r; r >>>= 1) n++; - return 1 << (n + 1 + i); - }), - (g.prototype.conjugate = function (t, e, r) { - if (!(r <= 1)) - for (var i = 0; i < r / 2; i++) { - var n = t[i]; - (t[i] = t[r - i - 1]), (t[r - i - 1] = n), (n = e[i]), (e[i] = -e[r - i - 1]), (e[r - i - 1] = -n); - } - }), - (g.prototype.normalize13b = function (t, e) { - for (var r = 0, i = 0; i < e / 2; i++) { - var n = 8192 * Math.round(t[2 * i + 1] / e) + Math.round(t[2 * i] / e) + r; - (t[i] = 67108863 & n), (r = n < 67108864 ? 0 : (n / 67108864) | 0); - } - return t; - }), - (g.prototype.convert13b = function (t, e, r, n) { - for (var o = 0, s = 0; s < e; s++) - (o += 0 | t[s]), (r[2 * s] = 8191 & o), (o >>>= 13), (r[2 * s + 1] = 8191 & o), (o >>>= 13); - for (s = 2 * e; s < n; ++s) r[s] = 0; - i(0 === o), i(0 == (-8192 & o)); - }), - (g.prototype.stub = function (t) { - for (var e = new Array(t), r = 0; r < t; r++) e[r] = 0; - return e; - }), - (g.prototype.mulp = function (t, e, r) { - var i = 2 * this.guessLen13b(t.length, e.length), - n = this.makeRBT(i), - o = this.stub(i), - s = new Array(i), - a = new Array(i), - h = new Array(i), - u = new Array(i), - f = new Array(i), - c = new Array(i), - l = r.words; - (l.length = i), - this.convert13b(t.words, t.length, s, i), - this.convert13b(e.words, e.length, u, i), - this.transform(s, o, a, h, i, n), - this.transform(u, o, f, c, i, n); - for (var d = 0; d < i; d++) { - var p = a[d] * f[d] - h[d] * c[d]; - (h[d] = a[d] * c[d] + h[d] * f[d]), (a[d] = p); - } - return ( - this.conjugate(a, h, i), - this.transform(a, h, l, o, i, n), - this.conjugate(l, o, i), - this.normalize13b(l, i), - (r.negative = t.negative ^ e.negative), - (r.length = t.length + e.length), - r.strip() - ); - }), - (o.prototype.mul = function (t) { - var e = new o(null); - return (e.words = new Array(this.length + t.length)), this.mulTo(t, e); - }), - (o.prototype.mulf = function (t) { - var e = new o(null); - return (e.words = new Array(this.length + t.length)), m(this, t, e); - }), - (o.prototype.imul = function (t) { - return this.clone().mulTo(t, this); - }), - (o.prototype.imuln = function (t) { - i('number' == typeof t), i(t < 67108864); - for (var e = 0, r = 0; r < this.length; r++) { - var n = (0 | this.words[r]) * t, - o = (67108863 & n) + (67108863 & e); - (e >>= 26), (e += (n / 67108864) | 0), (e += o >>> 26), (this.words[r] = 67108863 & o); - } - return 0 !== e && ((this.words[r] = e), this.length++), this; - }), - (o.prototype.muln = function (t) { - return this.clone().imuln(t); - }), - (o.prototype.sqr = function () { - return this.mul(this); - }), - (o.prototype.isqr = function () { - return this.imul(this.clone()); - }), - (o.prototype.pow = function (t) { - var e = (function (t) { - for (var e = new Array(t.bitLength()), r = 0; r < e.length; r++) { - var i = (r / 26) | 0, - n = r % 26; - e[r] = (t.words[i] & (1 << n)) >>> n; - } - return e; - })(t); - if (0 === e.length) return new o(1); - for (var r = this, i = 0; i < e.length && 0 === e[i]; i++, r = r.sqr()); - if (++i < e.length) for (var n = r.sqr(); i < e.length; i++, n = n.sqr()) 0 !== e[i] && (r = r.mul(n)); - return r; - }), - (o.prototype.iushln = function (t) { - i('number' == typeof t && t >= 0); - var e, - r = t % 26, - n = (t - r) / 26, - o = (67108863 >>> (26 - r)) << (26 - r); - if (0 !== r) { - var s = 0; - for (e = 0; e < this.length; e++) { - var a = this.words[e] & o, - h = ((0 | this.words[e]) - a) << r; - (this.words[e] = h | s), (s = a >>> (26 - r)); - } - s && ((this.words[e] = s), this.length++); - } - if (0 !== n) { - for (e = this.length - 1; e >= 0; e--) this.words[e + n] = this.words[e]; - for (e = 0; e < n; e++) this.words[e] = 0; - this.length += n; - } - return this.strip(); - }), - (o.prototype.ishln = function (t) { - return i(0 === this.negative), this.iushln(t); - }), - (o.prototype.iushrn = function (t, e, r) { - var n; - i('number' == typeof t && t >= 0), (n = e ? (e - (e % 26)) / 26 : 0); - var o = t % 26, - s = Math.min((t - o) / 26, this.length), - a = 67108863 ^ ((67108863 >>> o) << o), - h = r; - if (((n -= s), (n = Math.max(0, n)), h)) { - for (var u = 0; u < s; u++) h.words[u] = this.words[u]; - h.length = s; - } - if (0 === s); - else if (this.length > s) for (this.length -= s, u = 0; u < this.length; u++) this.words[u] = this.words[u + s]; - else (this.words[0] = 0), (this.length = 1); - var f = 0; - for (u = this.length - 1; u >= 0 && (0 !== f || u >= n); u--) { - var c = 0 | this.words[u]; - (this.words[u] = (f << (26 - o)) | (c >>> o)), (f = c & a); - } - return h && 0 !== f && (h.words[h.length++] = f), 0 === this.length && ((this.words[0] = 0), (this.length = 1)), this.strip(); - }), - (o.prototype.ishrn = function (t, e, r) { - return i(0 === this.negative), this.iushrn(t, e, r); - }), - (o.prototype.shln = function (t) { - return this.clone().ishln(t); - }), - (o.prototype.ushln = function (t) { - return this.clone().iushln(t); - }), - (o.prototype.shrn = function (t) { - return this.clone().ishrn(t); - }), - (o.prototype.ushrn = function (t) { - return this.clone().iushrn(t); - }), - (o.prototype.testn = function (t) { - i('number' == typeof t && t >= 0); - var e = t % 26, - r = (t - e) / 26, - n = 1 << e; - return !(this.length <= r || !(this.words[r] & n)); - }), - (o.prototype.imaskn = function (t) { - i('number' == typeof t && t >= 0); - var e = t % 26, - r = (t - e) / 26; - if ((i(0 === this.negative, 'imaskn works only with positive numbers'), this.length <= r)) return this; - if ((0 !== e && r++, (this.length = Math.min(r, this.length)), 0 !== e)) { - var n = 67108863 ^ ((67108863 >>> e) << e); - this.words[this.length - 1] &= n; - } - return this.strip(); - }), - (o.prototype.maskn = function (t) { - return this.clone().imaskn(t); - }), - (o.prototype.iaddn = function (t) { - return ( - i('number' == typeof t), - i(t < 67108864), - t < 0 - ? this.isubn(-t) - : 0 !== this.negative - ? 1 === this.length && (0 | this.words[0]) < t - ? ((this.words[0] = t - (0 | this.words[0])), (this.negative = 0), this) - : ((this.negative = 0), this.isubn(t), (this.negative = 1), this) - : this._iaddn(t) - ); - }), - (o.prototype._iaddn = function (t) { - this.words[0] += t; - for (var e = 0; e < this.length && this.words[e] >= 67108864; e++) - (this.words[e] -= 67108864), e === this.length - 1 ? (this.words[e + 1] = 1) : this.words[e + 1]++; - return (this.length = Math.max(this.length, e + 1)), this; - }), - (o.prototype.isubn = function (t) { - if ((i('number' == typeof t), i(t < 67108864), t < 0)) return this.iaddn(-t); - if (0 !== this.negative) return (this.negative = 0), this.iaddn(t), (this.negative = 1), this; - if (((this.words[0] -= t), 1 === this.length && this.words[0] < 0)) (this.words[0] = -this.words[0]), (this.negative = 1); - else for (var e = 0; e < this.length && this.words[e] < 0; e++) (this.words[e] += 67108864), (this.words[e + 1] -= 1); - return this.strip(); - }), - (o.prototype.addn = function (t) { - return this.clone().iaddn(t); - }), - (o.prototype.subn = function (t) { - return this.clone().isubn(t); - }), - (o.prototype.iabs = function () { - return (this.negative = 0), this; - }), - (o.prototype.abs = function () { - return this.clone().iabs(); - }), - (o.prototype._ishlnsubmul = function (t, e, r) { - var n, - o, - s = t.length + r; - this._expand(s); - var a = 0; - for (n = 0; n < t.length; n++) { - o = (0 | this.words[n + r]) + a; - var h = (0 | t.words[n]) * e; - (a = ((o -= 67108863 & h) >> 26) - ((h / 67108864) | 0)), (this.words[n + r] = 67108863 & o); - } - for (; n < this.length - r; n++) (a = (o = (0 | this.words[n + r]) + a) >> 26), (this.words[n + r] = 67108863 & o); - if (0 === a) return this.strip(); - for (i(-1 === a), a = 0, n = 0; n < this.length; n++) - (a = (o = -(0 | this.words[n]) + a) >> 26), (this.words[n] = 67108863 & o); - return (this.negative = 1), this.strip(); - }), - (o.prototype._wordDiv = function (t, e) { - var r = (this.length, t.length), - i = this.clone(), - n = t, - s = 0 | n.words[n.length - 1]; - 0 != (r = 26 - this._countBits(s)) && ((n = n.ushln(r)), i.iushln(r), (s = 0 | n.words[n.length - 1])); - var a, - h = i.length - n.length; - if ('mod' !== e) { - ((a = new o(null)).length = h + 1), (a.words = new Array(a.length)); - for (var u = 0; u < a.length; u++) a.words[u] = 0; - } - var f = i.clone()._ishlnsubmul(n, 1, h); - 0 === f.negative && ((i = f), a && (a.words[h] = 1)); - for (var c = h - 1; c >= 0; c--) { - var l = 67108864 * (0 | i.words[n.length + c]) + (0 | i.words[n.length + c - 1]); - for (l = Math.min((l / s) | 0, 67108863), i._ishlnsubmul(n, l, c); 0 !== i.negative; ) - l--, (i.negative = 0), i._ishlnsubmul(n, 1, c), i.isZero() || (i.negative ^= 1); - a && (a.words[c] = l); - } - return a && a.strip(), i.strip(), 'div' !== e && 0 !== r && i.iushrn(r), { div: a || null, mod: i }; - }), - (o.prototype.divmod = function (t, e, r) { - return ( - i(!t.isZero()), - this.isZero() - ? { div: new o(0), mod: new o(0) } - : 0 !== this.negative && 0 === t.negative - ? ((a = this.neg().divmod(t, e)), - 'mod' !== e && (n = a.div.neg()), - 'div' !== e && ((s = a.mod.neg()), r && 0 !== s.negative && s.iadd(t)), - { div: n, mod: s }) - : 0 === this.negative && 0 !== t.negative - ? ((a = this.divmod(t.neg(), e)), 'mod' !== e && (n = a.div.neg()), { div: n, mod: a.mod }) - : 0 != (this.negative & t.negative) - ? ((a = this.neg().divmod(t.neg(), e)), - 'div' !== e && ((s = a.mod.neg()), r && 0 !== s.negative && s.isub(t)), - { div: a.div, mod: s }) - : t.length > this.length || this.cmp(t) < 0 - ? { div: new o(0), mod: this } - : 1 === t.length - ? 'div' === e - ? { div: this.divn(t.words[0]), mod: null } - : 'mod' === e - ? { div: null, mod: new o(this.modn(t.words[0])) } - : { div: this.divn(t.words[0]), mod: new o(this.modn(t.words[0])) } - : this._wordDiv(t, e) - ); - var n, s, a; - }), - (o.prototype.div = function (t) { - return this.divmod(t, 'div', !1).div; - }), - (o.prototype.mod = function (t) { - return this.divmod(t, 'mod', !1).mod; - }), - (o.prototype.umod = function (t) { - return this.divmod(t, 'mod', !0).mod; - }), - (o.prototype.divRound = function (t) { - var e = this.divmod(t); - if (e.mod.isZero()) return e.div; - var r = 0 !== e.div.negative ? e.mod.isub(t) : e.mod, - i = t.ushrn(1), - n = t.andln(1), - o = r.cmp(i); - return o < 0 || (1 === n && 0 === o) ? e.div : 0 !== e.div.negative ? e.div.isubn(1) : e.div.iaddn(1); - }), - (o.prototype.modn = function (t) { - i(t <= 67108863); - for (var e = (1 << 26) % t, r = 0, n = this.length - 1; n >= 0; n--) r = (e * r + (0 | this.words[n])) % t; - return r; - }), - (o.prototype.idivn = function (t) { - i(t <= 67108863); - for (var e = 0, r = this.length - 1; r >= 0; r--) { - var n = (0 | this.words[r]) + 67108864 * e; - (this.words[r] = (n / t) | 0), (e = n % t); - } - return this.strip(); - }), - (o.prototype.divn = function (t) { - return this.clone().idivn(t); - }), - (o.prototype.egcd = function (t) { - i(0 === t.negative), i(!t.isZero()); - var e = this, - r = t.clone(); - e = 0 !== e.negative ? e.umod(t) : e.clone(); - for (var n = new o(1), s = new o(0), a = new o(0), h = new o(1), u = 0; e.isEven() && r.isEven(); ) - e.iushrn(1), r.iushrn(1), ++u; - for (var f = r.clone(), c = e.clone(); !e.isZero(); ) { - for (var l = 0, d = 1; 0 == (e.words[0] & d) && l < 26; ++l, d <<= 1); - if (l > 0) for (e.iushrn(l); l-- > 0; ) (n.isOdd() || s.isOdd()) && (n.iadd(f), s.isub(c)), n.iushrn(1), s.iushrn(1); - for (var p = 0, m = 1; 0 == (r.words[0] & m) && p < 26; ++p, m <<= 1); - if (p > 0) for (r.iushrn(p); p-- > 0; ) (a.isOdd() || h.isOdd()) && (a.iadd(f), h.isub(c)), a.iushrn(1), h.iushrn(1); - e.cmp(r) >= 0 ? (e.isub(r), n.isub(a), s.isub(h)) : (r.isub(e), a.isub(n), h.isub(s)); - } - return { a, b: h, gcd: r.iushln(u) }; - }), - (o.prototype._invmp = function (t) { - i(0 === t.negative), i(!t.isZero()); - var e = this, - r = t.clone(); - e = 0 !== e.negative ? e.umod(t) : e.clone(); - for (var n, s = new o(1), a = new o(0), h = r.clone(); e.cmpn(1) > 0 && r.cmpn(1) > 0; ) { - for (var u = 0, f = 1; 0 == (e.words[0] & f) && u < 26; ++u, f <<= 1); - if (u > 0) for (e.iushrn(u); u-- > 0; ) s.isOdd() && s.iadd(h), s.iushrn(1); - for (var c = 0, l = 1; 0 == (r.words[0] & l) && c < 26; ++c, l <<= 1); - if (c > 0) for (r.iushrn(c); c-- > 0; ) a.isOdd() && a.iadd(h), a.iushrn(1); - e.cmp(r) >= 0 ? (e.isub(r), s.isub(a)) : (r.isub(e), a.isub(s)); - } - return (n = 0 === e.cmpn(1) ? s : a).cmpn(0) < 0 && n.iadd(t), n; - }), - (o.prototype.gcd = function (t) { - if (this.isZero()) return t.abs(); - if (t.isZero()) return this.abs(); - var e = this.clone(), - r = t.clone(); - (e.negative = 0), (r.negative = 0); - for (var i = 0; e.isEven() && r.isEven(); i++) e.iushrn(1), r.iushrn(1); - for (;;) { - for (; e.isEven(); ) e.iushrn(1); - for (; r.isEven(); ) r.iushrn(1); - var n = e.cmp(r); - if (n < 0) { - var o = e; - (e = r), (r = o); - } else if (0 === n || 0 === r.cmpn(1)) break; - e.isub(r); - } - return r.iushln(i); - }), - (o.prototype.invm = function (t) { - return this.egcd(t).a.umod(t); - }), - (o.prototype.isEven = function () { - return 0 == (1 & this.words[0]); - }), - (o.prototype.isOdd = function () { - return 1 == (1 & this.words[0]); - }), - (o.prototype.andln = function (t) { - return this.words[0] & t; - }), - (o.prototype.bincn = function (t) { - i('number' == typeof t); - var e = t % 26, - r = (t - e) / 26, - n = 1 << e; - if (this.length <= r) return this._expand(r + 1), (this.words[r] |= n), this; - for (var o = n, s = r; 0 !== o && s < this.length; s++) { - var a = 0 | this.words[s]; - (o = (a += o) >>> 26), (a &= 67108863), (this.words[s] = a); - } - return 0 !== o && ((this.words[s] = o), this.length++), this; - }), - (o.prototype.isZero = function () { - return 1 === this.length && 0 === this.words[0]; - }), - (o.prototype.cmpn = function (t) { - var e, - r = t < 0; - if (0 !== this.negative && !r) return -1; - if (0 === this.negative && r) return 1; - if ((this.strip(), this.length > 1)) e = 1; - else { - r && (t = -t), i(t <= 67108863, 'Number is too big'); - var n = 0 | this.words[0]; - e = n === t ? 0 : n < t ? -1 : 1; - } - return 0 !== this.negative ? 0 | -e : e; - }), - (o.prototype.cmp = function (t) { - if (0 !== this.negative && 0 === t.negative) return -1; - if (0 === this.negative && 0 !== t.negative) return 1; - var e = this.ucmp(t); - return 0 !== this.negative ? 0 | -e : e; - }), - (o.prototype.ucmp = function (t) { - if (this.length > t.length) return 1; - if (this.length < t.length) return -1; - for (var e = 0, r = this.length - 1; r >= 0; r--) { - var i = 0 | this.words[r], - n = 0 | t.words[r]; - if (i !== n) { - i < n ? (e = -1) : i > n && (e = 1); - break; - } - } - return e; - }), - (o.prototype.gtn = function (t) { - return 1 === this.cmpn(t); - }), - (o.prototype.gt = function (t) { - return 1 === this.cmp(t); - }), - (o.prototype.gten = function (t) { - return this.cmpn(t) >= 0; - }), - (o.prototype.gte = function (t) { - return this.cmp(t) >= 0; - }), - (o.prototype.ltn = function (t) { - return -1 === this.cmpn(t); - }), - (o.prototype.lt = function (t) { - return -1 === this.cmp(t); - }), - (o.prototype.lten = function (t) { - return this.cmpn(t) <= 0; - }), - (o.prototype.lte = function (t) { - return this.cmp(t) <= 0; - }), - (o.prototype.eqn = function (t) { - return 0 === this.cmpn(t); - }), - (o.prototype.eq = function (t) { - return 0 === this.cmp(t); - }), - (o.red = function (t) { - return new E(t); - }), - (o.prototype.toRed = function (t) { - return ( - i(!this.red, 'Already a number in reduction context'), - i(0 === this.negative, 'red works only with positives'), - t.convertTo(this)._forceRed(t) - ); - }), - (o.prototype.fromRed = function () { - return i(this.red, 'fromRed works only with numbers in reduction context'), this.red.convertFrom(this); - }), - (o.prototype._forceRed = function (t) { - return (this.red = t), this; - }), - (o.prototype.forceRed = function (t) { - return i(!this.red, 'Already a number in reduction context'), this._forceRed(t); - }), - (o.prototype.redAdd = function (t) { - return i(this.red, 'redAdd works only with red numbers'), this.red.add(this, t); - }), - (o.prototype.redIAdd = function (t) { - return i(this.red, 'redIAdd works only with red numbers'), this.red.iadd(this, t); - }), - (o.prototype.redSub = function (t) { - return i(this.red, 'redSub works only with red numbers'), this.red.sub(this, t); - }), - (o.prototype.redISub = function (t) { - return i(this.red, 'redISub works only with red numbers'), this.red.isub(this, t); - }), - (o.prototype.redShl = function (t) { - return i(this.red, 'redShl works only with red numbers'), this.red.shl(this, t); - }), - (o.prototype.redMul = function (t) { - return i(this.red, 'redMul works only with red numbers'), this.red._verify2(this, t), this.red.mul(this, t); - }), - (o.prototype.redIMul = function (t) { - return i(this.red, 'redMul works only with red numbers'), this.red._verify2(this, t), this.red.imul(this, t); - }), - (o.prototype.redSqr = function () { - return i(this.red, 'redSqr works only with red numbers'), this.red._verify1(this), this.red.sqr(this); - }), - (o.prototype.redISqr = function () { - return i(this.red, 'redISqr works only with red numbers'), this.red._verify1(this), this.red.isqr(this); - }), - (o.prototype.redSqrt = function () { - return i(this.red, 'redSqrt works only with red numbers'), this.red._verify1(this), this.red.sqrt(this); - }), - (o.prototype.redInvm = function () { - return i(this.red, 'redInvm works only with red numbers'), this.red._verify1(this), this.red.invm(this); - }), - (o.prototype.redNeg = function () { - return i(this.red, 'redNeg works only with red numbers'), this.red._verify1(this), this.red.neg(this); - }), - (o.prototype.redPow = function (t) { - return i(this.red && !t.red, 'redPow(normalNum)'), this.red._verify1(this), this.red.pow(this, t); - }); - var b = { k256: null, p224: null, p192: null, p25519: null }; - function y(t, e) { - (this.name = t), - (this.p = new o(e, 16)), - (this.n = this.p.bitLength()), - (this.k = new o(1).iushln(this.n).isub(this.p)), - (this.tmp = this._tmp()); - } - function v() { - y.call(this, 'k256', 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f'); - } - function w() { - y.call(this, 'p224', 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001'); - } - function _() { - y.call(this, 'p192', 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff'); - } - function M() { - y.call(this, '25519', '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed'); - } - function E(t) { - if ('string' == typeof t) { - var e = o._prime(t); - (this.m = e.p), (this.prime = e); - } else i(t.gtn(1), 'modulus must be greater than 1'), (this.m = t), (this.prime = null); - } - function S(t) { - E.call(this, t), - (this.shift = this.m.bitLength()), - this.shift % 26 != 0 && (this.shift += 26 - (this.shift % 26)), - (this.r = new o(1).iushln(this.shift)), - (this.r2 = this.imod(this.r.sqr())), - (this.rinv = this.r._invmp(this.m)), - (this.minv = this.rinv.mul(this.r).isubn(1).div(this.m)), - (this.minv = this.minv.umod(this.r)), - (this.minv = this.r.sub(this.minv)); - } - (y.prototype._tmp = function () { - var t = new o(null); - return (t.words = new Array(Math.ceil(this.n / 13))), t; - }), - (y.prototype.ireduce = function (t) { - var e, - r = t; - do { - this.split(r, this.tmp), (e = (r = (r = this.imulK(r)).iadd(this.tmp)).bitLength()); - } while (e > this.n); - var i = e < this.n ? -1 : r.ucmp(this.p); - return 0 === i ? ((r.words[0] = 0), (r.length = 1)) : i > 0 ? r.isub(this.p) : void 0 !== r.strip ? r.strip() : r._strip(), r; - }), - (y.prototype.split = function (t, e) { - t.iushrn(this.n, 0, e); - }), - (y.prototype.imulK = function (t) { - return t.imul(this.k); - }), - n(v, y), - (v.prototype.split = function (t, e) { - for (var r = 4194303, i = Math.min(t.length, 9), n = 0; n < i; n++) e.words[n] = t.words[n]; - if (((e.length = i), t.length <= 9)) return (t.words[0] = 0), void (t.length = 1); - var o = t.words[9]; - for (e.words[e.length++] = o & r, n = 10; n < t.length; n++) { - var s = 0 | t.words[n]; - (t.words[n - 10] = ((s & r) << 4) | (o >>> 22)), (o = s); - } - (o >>>= 22), (t.words[n - 10] = o), 0 === o && t.length > 10 ? (t.length -= 10) : (t.length -= 9); - }), - (v.prototype.imulK = function (t) { - (t.words[t.length] = 0), (t.words[t.length + 1] = 0), (t.length += 2); - for (var e = 0, r = 0; r < t.length; r++) { - var i = 0 | t.words[r]; - (e += 977 * i), (t.words[r] = 67108863 & e), (e = 64 * i + ((e / 67108864) | 0)); - } - return 0 === t.words[t.length - 1] && (t.length--, 0 === t.words[t.length - 1] && t.length--), t; - }), - n(w, y), - n(_, y), - n(M, y), - (M.prototype.imulK = function (t) { - for (var e = 0, r = 0; r < t.length; r++) { - var i = 19 * (0 | t.words[r]) + e, - n = 67108863 & i; - (i >>>= 26), (t.words[r] = n), (e = i); - } - return 0 !== e && (t.words[t.length++] = e), t; - }), - (o._prime = function (t) { - if (b[t]) return b[t]; - var e; - if ('k256' === t) e = new v(); - else if ('p224' === t) e = new w(); - else if ('p192' === t) e = new _(); - else { - if ('p25519' !== t) throw new Error('Unknown prime ' + t); - e = new M(); - } - return (b[t] = e), e; - }), - (E.prototype._verify1 = function (t) { - i(0 === t.negative, 'red works only with positives'), i(t.red, 'red works only with red numbers'); - }), - (E.prototype._verify2 = function (t, e) { - i(0 == (t.negative | e.negative), 'red works only with positives'), - i(t.red && t.red === e.red, 'red works only with red numbers'); - }), - (E.prototype.imod = function (t) { - return this.prime ? this.prime.ireduce(t)._forceRed(this) : t.umod(this.m)._forceRed(this); - }), - (E.prototype.neg = function (t) { - return t.isZero() ? t.clone() : this.m.sub(t)._forceRed(this); - }), - (E.prototype.add = function (t, e) { - this._verify2(t, e); - var r = t.add(e); - return r.cmp(this.m) >= 0 && r.isub(this.m), r._forceRed(this); - }), - (E.prototype.iadd = function (t, e) { - this._verify2(t, e); - var r = t.iadd(e); - return r.cmp(this.m) >= 0 && r.isub(this.m), r; - }), - (E.prototype.sub = function (t, e) { - this._verify2(t, e); - var r = t.sub(e); - return r.cmpn(0) < 0 && r.iadd(this.m), r._forceRed(this); - }), - (E.prototype.isub = function (t, e) { - this._verify2(t, e); - var r = t.isub(e); - return r.cmpn(0) < 0 && r.iadd(this.m), r; - }), - (E.prototype.shl = function (t, e) { - return this._verify1(t), this.imod(t.ushln(e)); - }), - (E.prototype.imul = function (t, e) { - return this._verify2(t, e), this.imod(t.imul(e)); - }), - (E.prototype.mul = function (t, e) { - return this._verify2(t, e), this.imod(t.mul(e)); - }), - (E.prototype.isqr = function (t) { - return this.imul(t, t.clone()); - }), - (E.prototype.sqr = function (t) { - return this.mul(t, t); - }), - (E.prototype.sqrt = function (t) { - if (t.isZero()) return t.clone(); - var e = this.m.andln(3); - if ((i(e % 2 == 1), 3 === e)) { - var r = this.m.add(new o(1)).iushrn(2); - return this.pow(t, r); - } - for (var n = this.m.subn(1), s = 0; !n.isZero() && 0 === n.andln(1); ) s++, n.iushrn(1); - i(!n.isZero()); - var a = new o(1).toRed(this), - h = a.redNeg(), - u = this.m.subn(1).iushrn(1), - f = this.m.bitLength(); - for (f = new o(2 * f * f).toRed(this); 0 !== this.pow(f, u).cmp(h); ) f.redIAdd(h); - for (var c = this.pow(f, n), l = this.pow(t, n.addn(1).iushrn(1)), d = this.pow(t, n), p = s; 0 !== d.cmp(a); ) { - for (var m = d, g = 0; 0 !== m.cmp(a); g++) m = m.redSqr(); - i(g < p); - var b = this.pow(c, new o(1).iushln(p - g - 1)); - (l = l.redMul(b)), (c = b.redSqr()), (d = d.redMul(c)), (p = g); - } - return l; - }), - (E.prototype.invm = function (t) { - var e = t._invmp(this.m); - return 0 !== e.negative ? ((e.negative = 0), this.imod(e).redNeg()) : this.imod(e); - }), - (E.prototype.pow = function (t, e) { - if (e.isZero()) return new o(1).toRed(this); - if (0 === e.cmpn(1)) return t.clone(); - var r = new Array(16); - (r[0] = new o(1).toRed(this)), (r[1] = t); - for (var i = 2; i < r.length; i++) r[i] = this.mul(r[i - 1], t); - var n = r[0], - s = 0, - a = 0, - h = e.bitLength() % 26; - for (0 === h && (h = 26), i = e.length - 1; i >= 0; i--) { - for (var u = e.words[i], f = h - 1; f >= 0; f--) { - var c = (u >> f) & 1; - n !== r[0] && (n = this.sqr(n)), - 0 !== c || 0 !== s - ? ((s <<= 1), (s |= c), (4 == ++a || (0 === i && 0 === f)) && ((n = this.mul(n, r[s])), (a = 0), (s = 0))) - : (a = 0); - } - h = 26; - } - return n; - }), - (E.prototype.convertTo = function (t) { - var e = t.umod(this.m); - return e === t ? e.clone() : e; - }), - (E.prototype.convertFrom = function (t) { - var e = t.clone(); - return (e.red = null), e; - }), - (o.mont = function (t) { - return new S(t); - }), - n(S, E), - (S.prototype.convertTo = function (t) { - return this.imod(t.ushln(this.shift)); - }), - (S.prototype.convertFrom = function (t) { - var e = this.imod(t.mul(this.rinv)); - return (e.red = null), e; - }), - (S.prototype.imul = function (t, e) { - if (t.isZero() || e.isZero()) return (t.words[0] = 0), (t.length = 1), t; - var r = t.imul(e), - i = r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m), - n = r.isub(i).iushrn(this.shift), - o = n; - return n.cmp(this.m) >= 0 ? (o = n.isub(this.m)) : n.cmpn(0) < 0 && (o = n.iadd(this.m)), o._forceRed(this); - }), - (S.prototype.mul = function (t, e) { - if (t.isZero() || e.isZero()) return new o(0)._forceRed(this); - var r = t.mul(e), - i = r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m), - n = r.isub(i).iushrn(this.shift), - s = n; - return n.cmp(this.m) >= 0 ? (s = n.isub(this.m)) : n.cmpn(0) < 0 && (s = n.iadd(this.m)), s._forceRed(this); - }), - (S.prototype.invm = function (t) { - return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this); - }); - })((t = r.nmd(t)), this); - }, - 2619: (t, e, r) => { - var i = r(1463), - n = r(1697), - o = r(6107), - s = r(9492), - a = r(7354), - h = r(7266), - u = r(6756), - f = r(7172).Buffer; - t.exports = function (t, e, r) { - var c; - c = t.padding ? t.padding : r ? 1 : 4; - var l, - d = i(t), - p = d.modulus.byteLength(); - if (e.length > p || new s(e).cmp(d.modulus) >= 0) throw new Error('decryption error'); - l = r ? u(new s(e), d) : a(e, d); - var m = f.alloc(p - l.length); - if (((l = f.concat([m, l], p)), 4 === c)) - return (function (t, e) { - var r = t.modulus.byteLength(), - i = h('sha1').update(f.alloc(0)).digest(), - s = i.length; - if (0 !== e[0]) throw new Error('decryption error'); - var a = e.slice(1, s + 1), - u = e.slice(s + 1), - c = o(a, n(u, s)), - l = o(u, n(c, r - s - 1)); - if ( - (function (t, e) { - (t = f.from(t)), (e = f.from(e)); - var r = 0, - i = t.length; - t.length !== e.length && (r++, (i = Math.min(t.length, e.length))); - for (var n = -1; ++n < i; ) r += t[n] ^ e[n]; - return r; - })(i, l.slice(0, s)) - ) - throw new Error('decryption error'); - for (var d = s; 0 === l[d]; ) d++; - if (1 !== l[d++]) throw new Error('decryption error'); - return l.slice(d); - })(d, l); - if (1 === c) - return (function (t, e, r) { - for (var i = e.slice(0, 2), n = 2, o = 0; 0 !== e[n++]; ) - if (n >= e.length) { - o++; - break; - } - var s = e.slice(2, n - 1); - if (((('0002' !== i.toString('hex') && !r) || ('0001' !== i.toString('hex') && r)) && o++, s.length < 8 && o++, o)) - throw new Error('decryption error'); - return e.slice(n); - })(0, l, r); - if (3 === c) return l; - throw new Error('unknown padding'); - }; - }, - 9881: (t, e, r) => { - var i = r(1463), - n = r(4198), - o = r(7266), - s = r(1697), - a = r(6107), - h = r(9492), - u = r(6756), - f = r(7354), - c = r(7172).Buffer; - t.exports = function (t, e, r) { - var l; - l = t.padding ? t.padding : r ? 1 : 4; - var d, - p = i(t); - if (4 === l) - d = (function (t, e) { - var r = t.modulus.byteLength(), - i = e.length, - u = o('sha1').update(c.alloc(0)).digest(), - f = u.length, - l = 2 * f; - if (i > r - l - 2) throw new Error('message too long'); - var d = c.alloc(r - i - l - 2), - p = r - f - 1, - m = n(f), - g = a(c.concat([u, d, c.alloc(1, 1), e], p), s(m, p)), - b = a(m, s(g, f)); - return new h(c.concat([c.alloc(1), b, g], r)); - })(p, e); - else if (1 === l) - d = (function (t, e, r) { - var i, - o = e.length, - s = t.modulus.byteLength(); - if (o > s - 11) throw new Error('message too long'); - return ( - (i = r - ? c.alloc(s - o - 3, 255) - : (function (t) { - for (var e, r = c.allocUnsafe(t), i = 0, o = n(2 * t), s = 0; i < t; ) - s === o.length && ((o = n(2 * t)), (s = 0)), (e = o[s++]) && (r[i++] = e); - return r; - })(s - o - 3)), - new h(c.concat([c.from([0, r ? 1 : 2]), i, c.alloc(1), e], s)) - ); - })(p, e, r); - else { - if (3 !== l) throw new Error('unknown padding'); - if ((d = new h(e)).cmp(p.modulus) >= 0) throw new Error('data too long for modulus'); - } - return r ? f(d, p) : u(d, p); - }; - }, - 6756: (t, e, r) => { - var i = r(9492), - n = r(7172).Buffer; - t.exports = function (t, e) { - return n.from(t.toRed(i.mont(e.modulus)).redPow(new i(e.publicExponent)).fromRed().toArray()); - }; - }, - 6107: t => { - t.exports = function (t, e) { - for (var r = t.length, i = -1; ++i < r; ) t[i] ^= e[i]; - return t; - }; - }, - 4198: (t, e, r) => { - 'use strict'; - var i = 65536, - n = r(7172).Buffer, - o = r.g.crypto || r.g.msCrypto; - o && o.getRandomValues - ? (t.exports = function (t, e) { - if (t > 4294967295) throw new RangeError('requested too many random bytes'); - var r = n.allocUnsafe(t); - if (t > 0) - if (t > i) for (var s = 0; s < t; s += i) o.getRandomValues(r.slice(s, s + i)); - else o.getRandomValues(r); - return 'function' == typeof e - ? process.nextTick(function () { - e(null, r); - }) - : r; - }) - : (t.exports = function () { - throw new Error( - 'Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11' - ); - }); - }, - 8519: (t, e, r) => { - 'use strict'; - function i() { - throw new Error('secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11'); - } - var n = r(7172), - o = r(4198), - s = n.Buffer, - a = n.kMaxLength, - h = r.g.crypto || r.g.msCrypto, - u = Math.pow(2, 32) - 1; - function f(t, e) { - if ('number' != typeof t || t != t) throw new TypeError('offset must be a number'); - if (t > u || t < 0) throw new TypeError('offset must be a uint32'); - if (t > a || t > e) throw new RangeError('offset out of range'); - } - function c(t, e, r) { - if ('number' != typeof t || t != t) throw new TypeError('size must be a number'); - if (t > u || t < 0) throw new TypeError('size must be a uint32'); - if (t + e > r || t > a) throw new RangeError('buffer too small'); - } - function l(t, e, r, i) { - if (process.browser) { - var n = t.buffer, - s = new Uint8Array(n, e, r); - return ( - h.getRandomValues(s), - i - ? void process.nextTick(function () { - i(null, t); - }) - : t - ); - } - if (!i) return o(r).copy(t, e), t; - o(r, function (r, n) { - if (r) return i(r); - n.copy(t, e), i(null, t); - }); - } - (h && h.getRandomValues) || !process.browser - ? ((e.randomFill = function (t, e, i, n) { - if (!(s.isBuffer(t) || t instanceof r.g.Uint8Array)) throw new TypeError('"buf" argument must be a Buffer or Uint8Array'); - if ('function' == typeof e) (n = e), (e = 0), (i = t.length); - else if ('function' == typeof i) (n = i), (i = t.length - e); - else if ('function' != typeof n) throw new TypeError('"cb" argument must be a function'); - return f(e, t.length), c(i, e, t.length), l(t, e, i, n); - }), - (e.randomFillSync = function (t, e, i) { - if ((void 0 === e && (e = 0), !(s.isBuffer(t) || t instanceof r.g.Uint8Array))) - throw new TypeError('"buf" argument must be a Buffer or Uint8Array'); - return f(e, t.length), void 0 === i && (i = t.length - e), c(i, e, t.length), l(t, e, i); - })) - : ((e.randomFill = i), (e.randomFillSync = i)); - }, - 6558: (t, e, r) => { - 'use strict'; - var i = r(816).Buffer, - n = r(87), - o = r(6883), - s = new Array(16), - a = [ - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8, 3, 10, 14, 4, 9, 15, - 8, 1, 2, 7, 0, 6, 13, 11, 5, 12, 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2, 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, - 11, 6, 15, 13, - ], - h = [ - 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2, 15, 5, 1, 3, 7, 14, - 6, 9, 11, 8, 12, 2, 10, 0, 4, 13, 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14, 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, - 0, 3, 9, 11, - ], - u = [ - 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12, 11, 13, 6, 7, - 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5, 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12, 9, 15, 5, 11, 6, 8, 13, 12, 5, - 12, 13, 14, 11, 8, 5, 6, - ], - f = [ - 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6, 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11, 9, 7, 15, 11, 8, - 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5, 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8, 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, - 6, 5, 15, 13, 11, 11, - ], - c = [0, 1518500249, 1859775393, 2400959708, 2840853838], - l = [1352829926, 1548603684, 1836072691, 2053994217, 0]; - function d() { - o.call(this, 64), - (this._a = 1732584193), - (this._b = 4023233417), - (this._c = 2562383102), - (this._d = 271733878), - (this._e = 3285377520); - } - function p(t, e) { - return (t << e) | (t >>> (32 - e)); - } - function m(t, e, r, i, n, o, s, a) { - return (p((t + (e ^ r ^ i) + o + s) | 0, a) + n) | 0; - } - function g(t, e, r, i, n, o, s, a) { - return (p((t + ((e & r) | (~e & i)) + o + s) | 0, a) + n) | 0; - } - function b(t, e, r, i, n, o, s, a) { - return (p((t + ((e | ~r) ^ i) + o + s) | 0, a) + n) | 0; - } - function y(t, e, r, i, n, o, s, a) { - return (p((t + ((e & i) | (r & ~i)) + o + s) | 0, a) + n) | 0; - } - function v(t, e, r, i, n, o, s, a) { - return (p((t + (e ^ (r | ~i)) + o + s) | 0, a) + n) | 0; - } - n(d, o), - (d.prototype._update = function () { - for (var t = s, e = 0; e < 16; ++e) t[e] = this._block.readInt32LE(4 * e); - for ( - var r = 0 | this._a, - i = 0 | this._b, - n = 0 | this._c, - o = 0 | this._d, - d = 0 | this._e, - w = 0 | this._a, - _ = 0 | this._b, - M = 0 | this._c, - E = 0 | this._d, - S = 0 | this._e, - x = 0; - x < 80; - x += 1 - ) { - var A, k; - x < 16 - ? ((A = m(r, i, n, o, d, t[a[x]], c[0], u[x])), (k = v(w, _, M, E, S, t[h[x]], l[0], f[x]))) - : x < 32 - ? ((A = g(r, i, n, o, d, t[a[x]], c[1], u[x])), (k = y(w, _, M, E, S, t[h[x]], l[1], f[x]))) - : x < 48 - ? ((A = b(r, i, n, o, d, t[a[x]], c[2], u[x])), (k = b(w, _, M, E, S, t[h[x]], l[2], f[x]))) - : x < 64 - ? ((A = y(r, i, n, o, d, t[a[x]], c[3], u[x])), (k = g(w, _, M, E, S, t[h[x]], l[3], f[x]))) - : ((A = v(r, i, n, o, d, t[a[x]], c[4], u[x])), (k = m(w, _, M, E, S, t[h[x]], l[4], f[x]))), - (r = d), - (d = o), - (o = p(n, 10)), - (n = i), - (i = A), - (w = S), - (S = E), - (E = p(M, 10)), - (M = _), - (_ = k); - } - var R = (this._b + n + E) | 0; - (this._b = (this._c + o + S) | 0), - (this._c = (this._d + d + w) | 0), - (this._d = (this._e + r + _) | 0), - (this._e = (this._a + i + M) | 0), - (this._a = R); - }), - (d.prototype._digest = function () { - (this._block[this._blockOffset++] = 128), - this._blockOffset > 56 && (this._block.fill(0, this._blockOffset, 64), this._update(), (this._blockOffset = 0)), - this._block.fill(0, this._blockOffset, 56), - this._block.writeUInt32LE(this._length[0], 56), - this._block.writeUInt32LE(this._length[1], 60), - this._update(); - var t = i.alloc ? i.alloc(20) : new i(20); - return ( - t.writeInt32LE(this._a, 0), - t.writeInt32LE(this._b, 4), - t.writeInt32LE(this._c, 8), - t.writeInt32LE(this._d, 12), - t.writeInt32LE(this._e, 16), - t - ); - }), - (t.exports = d); - }, - 7172: (t, e, r) => { - var i = r(816), - n = i.Buffer; - function o(t, e) { - for (var r in t) e[r] = t[r]; - } - function s(t, e, r) { - return n(t, e, r); - } - n.from && n.alloc && n.allocUnsafe && n.allocUnsafeSlow ? (t.exports = i) : (o(i, e), (e.Buffer = s)), - (s.prototype = Object.create(n.prototype)), - o(n, s), - (s.from = function (t, e, r) { - if ('number' == typeof t) throw new TypeError('Argument must not be a number'); - return n(t, e, r); - }), - (s.alloc = function (t, e, r) { - if ('number' != typeof t) throw new TypeError('Argument must be a number'); - var i = n(t); - return void 0 !== e ? ('string' == typeof r ? i.fill(e, r) : i.fill(e)) : i.fill(0), i; - }), - (s.allocUnsafe = function (t) { - if ('number' != typeof t) throw new TypeError('Argument must be a number'); - return n(t); - }), - (s.allocUnsafeSlow = function (t) { - if ('number' != typeof t) throw new TypeError('Argument must be a number'); - return i.SlowBuffer(t); - }); - }, - 1788: (t, e, r) => { - 'use strict'; - var i, - n = r(816), - o = n.Buffer, - s = {}; - for (i in n) n.hasOwnProperty(i) && 'SlowBuffer' !== i && 'Buffer' !== i && (s[i] = n[i]); - var a = (s.Buffer = {}); - for (i in o) o.hasOwnProperty(i) && 'allocUnsafe' !== i && 'allocUnsafeSlow' !== i && (a[i] = o[i]); - if ( - ((s.Buffer.prototype = o.prototype), - (a.from && a.from !== Uint8Array.from) || - (a.from = function (t, e, r) { - if ('number' == typeof t) throw new TypeError('The "value" argument must not be of type number. Received type ' + typeof t); - if (t && void 0 === t.length) - throw new TypeError( - 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type ' + - typeof t - ); - return o(t, e, r); - }), - a.alloc || - (a.alloc = function (t, e, r) { - if ('number' != typeof t) throw new TypeError('The "size" argument must be of type number. Received type ' + typeof t); - if (t < 0 || t >= 2 * (1 << 30)) throw new RangeError('The value "' + t + '" is invalid for option "size"'); - var i = o(t); - return e && 0 !== e.length ? ('string' == typeof r ? i.fill(e, r) : i.fill(e)) : i.fill(0), i; - }), - !s.kStringMaxLength) - ) - try { - s.kStringMaxLength = process.binding('buffer').kStringMaxLength; - } catch (t) {} - s.constants || - ((s.constants = { MAX_LENGTH: s.kMaxLength }), s.kStringMaxLength && (s.constants.MAX_STRING_LENGTH = s.kStringMaxLength)), - (t.exports = s); - }, - 8423: (t, e, r) => { - var i = r(7172).Buffer; - function n(t, e) { - (this._block = i.alloc(t)), (this._finalSize = e), (this._blockSize = t), (this._len = 0); - } - (n.prototype.update = function (t, e) { - 'string' == typeof t && ((e = e || 'utf8'), (t = i.from(t, e))); - for (var r = this._block, n = this._blockSize, o = t.length, s = this._len, a = 0; a < o; ) { - for (var h = s % n, u = Math.min(o - a, n - h), f = 0; f < u; f++) r[h + f] = t[a + f]; - (a += u), (s += u) % n == 0 && this._update(r); - } - return (this._len += o), this; - }), - (n.prototype.digest = function (t) { - var e = this._len % this._blockSize; - (this._block[e] = 128), this._block.fill(0, e + 1), e >= this._finalSize && (this._update(this._block), this._block.fill(0)); - var r = 8 * this._len; - if (r <= 4294967295) this._block.writeUInt32BE(r, this._blockSize - 4); - else { - var i = (4294967295 & r) >>> 0, - n = (r - i) / 4294967296; - this._block.writeUInt32BE(n, this._blockSize - 8), this._block.writeUInt32BE(i, this._blockSize - 4); - } - this._update(this._block); - var o = this._hash(); - return t ? o.toString(t) : o; - }), - (n.prototype._update = function () { - throw new Error('_update must be implemented by subclass'); - }), - (t.exports = n); - }, - 4458: (t, e, r) => { - var i = (t.exports = function (t) { - t = t.toLowerCase(); - var e = i[t]; - if (!e) throw new Error(t + ' is not supported (we accept pull requests)'); - return new e(); - }); - (i.sha = r(3608)), (i.sha1 = r(6533)), (i.sha224 = r(8203)), (i.sha256 = r(9541)), (i.sha384 = r(1389)), (i.sha512 = r(6282)); - }, - 3608: (t, e, r) => { - var i = r(87), - n = r(8423), - o = r(7172).Buffer, - s = [1518500249, 1859775393, -1894007588, -899497514], - a = new Array(80); - function h() { - this.init(), (this._w = a), n.call(this, 64, 56); - } - function u(t) { - return (t << 30) | (t >>> 2); - } - function f(t, e, r, i) { - return 0 === t ? (e & r) | (~e & i) : 2 === t ? (e & r) | (e & i) | (r & i) : e ^ r ^ i; - } - i(h, n), - (h.prototype.init = function () { - return ( - (this._a = 1732584193), (this._b = 4023233417), (this._c = 2562383102), (this._d = 271733878), (this._e = 3285377520), this - ); - }), - (h.prototype._update = function (t) { - for ( - var e, r = this._w, i = 0 | this._a, n = 0 | this._b, o = 0 | this._c, a = 0 | this._d, h = 0 | this._e, c = 0; - c < 16; - ++c - ) - r[c] = t.readInt32BE(4 * c); - for (; c < 80; ++c) r[c] = r[c - 3] ^ r[c - 8] ^ r[c - 14] ^ r[c - 16]; - for (var l = 0; l < 80; ++l) { - var d = ~~(l / 20), - p = 0 | ((((e = i) << 5) | (e >>> 27)) + f(d, n, o, a) + h + r[l] + s[d]); - (h = a), (a = o), (o = u(n)), (n = i), (i = p); - } - (this._a = (i + this._a) | 0), - (this._b = (n + this._b) | 0), - (this._c = (o + this._c) | 0), - (this._d = (a + this._d) | 0), - (this._e = (h + this._e) | 0); - }), - (h.prototype._hash = function () { - var t = o.allocUnsafe(20); - return ( - t.writeInt32BE(0 | this._a, 0), - t.writeInt32BE(0 | this._b, 4), - t.writeInt32BE(0 | this._c, 8), - t.writeInt32BE(0 | this._d, 12), - t.writeInt32BE(0 | this._e, 16), - t - ); - }), - (t.exports = h); - }, - 6533: (t, e, r) => { - var i = r(87), - n = r(8423), - o = r(7172).Buffer, - s = [1518500249, 1859775393, -1894007588, -899497514], - a = new Array(80); - function h() { - this.init(), (this._w = a), n.call(this, 64, 56); - } - function u(t) { - return (t << 5) | (t >>> 27); - } - function f(t) { - return (t << 30) | (t >>> 2); - } - function c(t, e, r, i) { - return 0 === t ? (e & r) | (~e & i) : 2 === t ? (e & r) | (e & i) | (r & i) : e ^ r ^ i; - } - i(h, n), - (h.prototype.init = function () { - return ( - (this._a = 1732584193), (this._b = 4023233417), (this._c = 2562383102), (this._d = 271733878), (this._e = 3285377520), this - ); - }), - (h.prototype._update = function (t) { - for ( - var e, r = this._w, i = 0 | this._a, n = 0 | this._b, o = 0 | this._c, a = 0 | this._d, h = 0 | this._e, l = 0; - l < 16; - ++l - ) - r[l] = t.readInt32BE(4 * l); - for (; l < 80; ++l) r[l] = ((e = r[l - 3] ^ r[l - 8] ^ r[l - 14] ^ r[l - 16]) << 1) | (e >>> 31); - for (var d = 0; d < 80; ++d) { - var p = ~~(d / 20), - m = (u(i) + c(p, n, o, a) + h + r[d] + s[p]) | 0; - (h = a), (a = o), (o = f(n)), (n = i), (i = m); - } - (this._a = (i + this._a) | 0), - (this._b = (n + this._b) | 0), - (this._c = (o + this._c) | 0), - (this._d = (a + this._d) | 0), - (this._e = (h + this._e) | 0); - }), - (h.prototype._hash = function () { - var t = o.allocUnsafe(20); - return ( - t.writeInt32BE(0 | this._a, 0), - t.writeInt32BE(0 | this._b, 4), - t.writeInt32BE(0 | this._c, 8), - t.writeInt32BE(0 | this._d, 12), - t.writeInt32BE(0 | this._e, 16), - t - ); - }), - (t.exports = h); - }, - 8203: (t, e, r) => { - var i = r(87), - n = r(9541), - o = r(8423), - s = r(7172).Buffer, - a = new Array(64); - function h() { - this.init(), (this._w = a), o.call(this, 64, 56); - } - i(h, n), - (h.prototype.init = function () { - return ( - (this._a = 3238371032), - (this._b = 914150663), - (this._c = 812702999), - (this._d = 4144912697), - (this._e = 4290775857), - (this._f = 1750603025), - (this._g = 1694076839), - (this._h = 3204075428), - this - ); - }), - (h.prototype._hash = function () { - var t = s.allocUnsafe(28); - return ( - t.writeInt32BE(this._a, 0), - t.writeInt32BE(this._b, 4), - t.writeInt32BE(this._c, 8), - t.writeInt32BE(this._d, 12), - t.writeInt32BE(this._e, 16), - t.writeInt32BE(this._f, 20), - t.writeInt32BE(this._g, 24), - t - ); - }), - (t.exports = h); - }, - 9541: (t, e, r) => { - var i = r(87), - n = r(8423), - o = r(7172).Buffer, - s = [ - 1116352408, 1899447441, 3049323471, 3921009573, 961987163, 1508970993, 2453635748, 2870763221, 3624381080, 310598401, 607225278, - 1426881987, 1925078388, 2162078206, 2614888103, 3248222580, 3835390401, 4022224774, 264347078, 604807628, 770255983, 1249150122, - 1555081692, 1996064986, 2554220882, 2821834349, 2952996808, 3210313671, 3336571891, 3584528711, 113926993, 338241895, 666307205, - 773529912, 1294757372, 1396182291, 1695183700, 1986661051, 2177026350, 2456956037, 2730485921, 2820302411, 3259730800, - 3345764771, 3516065817, 3600352804, 4094571909, 275423344, 430227734, 506948616, 659060556, 883997877, 958139571, 1322822218, - 1537002063, 1747873779, 1955562222, 2024104815, 2227730452, 2361852424, 2428436474, 2756734187, 3204031479, 3329325298, - ], - a = new Array(64); - function h() { - this.init(), (this._w = a), n.call(this, 64, 56); - } - function u(t, e, r) { - return r ^ (t & (e ^ r)); - } - function f(t, e, r) { - return (t & e) | (r & (t | e)); - } - function c(t) { - return ((t >>> 2) | (t << 30)) ^ ((t >>> 13) | (t << 19)) ^ ((t >>> 22) | (t << 10)); - } - function l(t) { - return ((t >>> 6) | (t << 26)) ^ ((t >>> 11) | (t << 21)) ^ ((t >>> 25) | (t << 7)); - } - function d(t) { - return ((t >>> 7) | (t << 25)) ^ ((t >>> 18) | (t << 14)) ^ (t >>> 3); - } - i(h, n), - (h.prototype.init = function () { - return ( - (this._a = 1779033703), - (this._b = 3144134277), - (this._c = 1013904242), - (this._d = 2773480762), - (this._e = 1359893119), - (this._f = 2600822924), - (this._g = 528734635), - (this._h = 1541459225), - this - ); - }), - (h.prototype._update = function (t) { - for ( - var e, - r = this._w, - i = 0 | this._a, - n = 0 | this._b, - o = 0 | this._c, - a = 0 | this._d, - h = 0 | this._e, - p = 0 | this._f, - m = 0 | this._g, - g = 0 | this._h, - b = 0; - b < 16; - ++b - ) - r[b] = t.readInt32BE(4 * b); - for (; b < 64; ++b) - r[b] = - 0 | (((((e = r[b - 2]) >>> 17) | (e << 15)) ^ ((e >>> 19) | (e << 13)) ^ (e >>> 10)) + r[b - 7] + d(r[b - 15]) + r[b - 16]); - for (var y = 0; y < 64; ++y) { - var v = (g + l(h) + u(h, p, m) + s[y] + r[y]) | 0, - w = (c(i) + f(i, n, o)) | 0; - (g = m), (m = p), (p = h), (h = (a + v) | 0), (a = o), (o = n), (n = i), (i = (v + w) | 0); - } - (this._a = (i + this._a) | 0), - (this._b = (n + this._b) | 0), - (this._c = (o + this._c) | 0), - (this._d = (a + this._d) | 0), - (this._e = (h + this._e) | 0), - (this._f = (p + this._f) | 0), - (this._g = (m + this._g) | 0), - (this._h = (g + this._h) | 0); - }), - (h.prototype._hash = function () { - var t = o.allocUnsafe(32); - return ( - t.writeInt32BE(this._a, 0), - t.writeInt32BE(this._b, 4), - t.writeInt32BE(this._c, 8), - t.writeInt32BE(this._d, 12), - t.writeInt32BE(this._e, 16), - t.writeInt32BE(this._f, 20), - t.writeInt32BE(this._g, 24), - t.writeInt32BE(this._h, 28), - t - ); - }), - (t.exports = h); - }, - 1389: (t, e, r) => { - var i = r(87), - n = r(6282), - o = r(8423), - s = r(7172).Buffer, - a = new Array(160); - function h() { - this.init(), (this._w = a), o.call(this, 128, 112); - } - i(h, n), - (h.prototype.init = function () { - return ( - (this._ah = 3418070365), - (this._bh = 1654270250), - (this._ch = 2438529370), - (this._dh = 355462360), - (this._eh = 1731405415), - (this._fh = 2394180231), - (this._gh = 3675008525), - (this._hh = 1203062813), - (this._al = 3238371032), - (this._bl = 914150663), - (this._cl = 812702999), - (this._dl = 4144912697), - (this._el = 4290775857), - (this._fl = 1750603025), - (this._gl = 1694076839), - (this._hl = 3204075428), - this - ); - }), - (h.prototype._hash = function () { - var t = s.allocUnsafe(48); - function e(e, r, i) { - t.writeInt32BE(e, i), t.writeInt32BE(r, i + 4); - } - return ( - e(this._ah, this._al, 0), - e(this._bh, this._bl, 8), - e(this._ch, this._cl, 16), - e(this._dh, this._dl, 24), - e(this._eh, this._el, 32), - e(this._fh, this._fl, 40), - t - ); - }), - (t.exports = h); - }, - 6282: (t, e, r) => { - var i = r(87), - n = r(8423), - o = r(7172).Buffer, - s = [ - 1116352408, 3609767458, 1899447441, 602891725, 3049323471, 3964484399, 3921009573, 2173295548, 961987163, 4081628472, - 1508970993, 3053834265, 2453635748, 2937671579, 2870763221, 3664609560, 3624381080, 2734883394, 310598401, 1164996542, - 607225278, 1323610764, 1426881987, 3590304994, 1925078388, 4068182383, 2162078206, 991336113, 2614888103, 633803317, 3248222580, - 3479774868, 3835390401, 2666613458, 4022224774, 944711139, 264347078, 2341262773, 604807628, 2007800933, 770255983, 1495990901, - 1249150122, 1856431235, 1555081692, 3175218132, 1996064986, 2198950837, 2554220882, 3999719339, 2821834349, 766784016, - 2952996808, 2566594879, 3210313671, 3203337956, 3336571891, 1034457026, 3584528711, 2466948901, 113926993, 3758326383, - 338241895, 168717936, 666307205, 1188179964, 773529912, 1546045734, 1294757372, 1522805485, 1396182291, 2643833823, 1695183700, - 2343527390, 1986661051, 1014477480, 2177026350, 1206759142, 2456956037, 344077627, 2730485921, 1290863460, 2820302411, - 3158454273, 3259730800, 3505952657, 3345764771, 106217008, 3516065817, 3606008344, 3600352804, 1432725776, 4094571909, - 1467031594, 275423344, 851169720, 430227734, 3100823752, 506948616, 1363258195, 659060556, 3750685593, 883997877, 3785050280, - 958139571, 3318307427, 1322822218, 3812723403, 1537002063, 2003034995, 1747873779, 3602036899, 1955562222, 1575990012, - 2024104815, 1125592928, 2227730452, 2716904306, 2361852424, 442776044, 2428436474, 593698344, 2756734187, 3733110249, - 3204031479, 2999351573, 3329325298, 3815920427, 3391569614, 3928383900, 3515267271, 566280711, 3940187606, 3454069534, - 4118630271, 4000239992, 116418474, 1914138554, 174292421, 2731055270, 289380356, 3203993006, 460393269, 320620315, 685471733, - 587496836, 852142971, 1086792851, 1017036298, 365543100, 1126000580, 2618297676, 1288033470, 3409855158, 1501505948, 4234509866, - 1607167915, 987167468, 1816402316, 1246189591, - ], - a = new Array(160); - function h() { - this.init(), (this._w = a), n.call(this, 128, 112); - } - function u(t, e, r) { - return r ^ (t & (e ^ r)); - } - function f(t, e, r) { - return (t & e) | (r & (t | e)); - } - function c(t, e) { - return ((t >>> 28) | (e << 4)) ^ ((e >>> 2) | (t << 30)) ^ ((e >>> 7) | (t << 25)); - } - function l(t, e) { - return ((t >>> 14) | (e << 18)) ^ ((t >>> 18) | (e << 14)) ^ ((e >>> 9) | (t << 23)); - } - function d(t, e) { - return ((t >>> 1) | (e << 31)) ^ ((t >>> 8) | (e << 24)) ^ (t >>> 7); - } - function p(t, e) { - return ((t >>> 1) | (e << 31)) ^ ((t >>> 8) | (e << 24)) ^ ((t >>> 7) | (e << 25)); - } - function m(t, e) { - return ((t >>> 19) | (e << 13)) ^ ((e >>> 29) | (t << 3)) ^ (t >>> 6); - } - function g(t, e) { - return ((t >>> 19) | (e << 13)) ^ ((e >>> 29) | (t << 3)) ^ ((t >>> 6) | (e << 26)); - } - function b(t, e) { - return t >>> 0 < e >>> 0 ? 1 : 0; - } - i(h, n), - (h.prototype.init = function () { - return ( - (this._ah = 1779033703), - (this._bh = 3144134277), - (this._ch = 1013904242), - (this._dh = 2773480762), - (this._eh = 1359893119), - (this._fh = 2600822924), - (this._gh = 528734635), - (this._hh = 1541459225), - (this._al = 4089235720), - (this._bl = 2227873595), - (this._cl = 4271175723), - (this._dl = 1595750129), - (this._el = 2917565137), - (this._fl = 725511199), - (this._gl = 4215389547), - (this._hl = 327033209), - this - ); - }), - (h.prototype._update = function (t) { - for ( - var e = this._w, - r = 0 | this._ah, - i = 0 | this._bh, - n = 0 | this._ch, - o = 0 | this._dh, - a = 0 | this._eh, - h = 0 | this._fh, - y = 0 | this._gh, - v = 0 | this._hh, - w = 0 | this._al, - _ = 0 | this._bl, - M = 0 | this._cl, - E = 0 | this._dl, - S = 0 | this._el, - x = 0 | this._fl, - A = 0 | this._gl, - k = 0 | this._hl, - R = 0; - R < 32; - R += 2 - ) - (e[R] = t.readInt32BE(4 * R)), (e[R + 1] = t.readInt32BE(4 * R + 4)); - for (; R < 160; R += 2) { - var B = e[R - 30], - I = e[R - 30 + 1], - T = d(B, I), - P = p(I, B), - O = m((B = e[R - 4]), (I = e[R - 4 + 1])), - L = g(I, B), - C = e[R - 14], - N = e[R - 14 + 1], - j = e[R - 32], - U = e[R - 32 + 1], - D = (P + N) | 0, - z = (T + C + b(D, P)) | 0; - (z = ((z = (z + O + b((D = (D + L) | 0), L)) | 0) + j + b((D = (D + U) | 0), U)) | 0), (e[R] = z), (e[R + 1] = D); - } - for (var F = 0; F < 160; F += 2) { - (z = e[F]), (D = e[F + 1]); - var q = f(r, i, n), - H = f(w, _, M), - $ = c(r, w), - Z = c(w, r), - G = l(a, S), - V = l(S, a), - W = s[F], - K = s[F + 1], - Y = u(a, h, y), - J = u(S, x, A), - X = (k + V) | 0, - Q = (v + G + b(X, k)) | 0; - Q = ((Q = ((Q = (Q + Y + b((X = (X + J) | 0), J)) | 0) + W + b((X = (X + K) | 0), K)) | 0) + z + b((X = (X + D) | 0), D)) | 0; - var tt = (Z + H) | 0, - et = ($ + q + b(tt, Z)) | 0; - (v = y), - (k = A), - (y = h), - (A = x), - (h = a), - (x = S), - (a = (o + Q + b((S = (E + X) | 0), E)) | 0), - (o = n), - (E = M), - (n = i), - (M = _), - (i = r), - (_ = w), - (r = (Q + et + b((w = (X + tt) | 0), X)) | 0); - } - (this._al = (this._al + w) | 0), - (this._bl = (this._bl + _) | 0), - (this._cl = (this._cl + M) | 0), - (this._dl = (this._dl + E) | 0), - (this._el = (this._el + S) | 0), - (this._fl = (this._fl + x) | 0), - (this._gl = (this._gl + A) | 0), - (this._hl = (this._hl + k) | 0), - (this._ah = (this._ah + r + b(this._al, w)) | 0), - (this._bh = (this._bh + i + b(this._bl, _)) | 0), - (this._ch = (this._ch + n + b(this._cl, M)) | 0), - (this._dh = (this._dh + o + b(this._dl, E)) | 0), - (this._eh = (this._eh + a + b(this._el, S)) | 0), - (this._fh = (this._fh + h + b(this._fl, x)) | 0), - (this._gh = (this._gh + y + b(this._gl, A)) | 0), - (this._hh = (this._hh + v + b(this._hl, k)) | 0); - }), - (h.prototype._hash = function () { - var t = o.allocUnsafe(64); - function e(e, r, i) { - t.writeInt32BE(e, i), t.writeInt32BE(r, i + 4); - } - return ( - e(this._ah, this._al, 0), - e(this._bh, this._bl, 8), - e(this._ch, this._cl, 16), - e(this._dh, this._dl, 24), - e(this._eh, this._el, 32), - e(this._fh, this._fl, 40), - e(this._gh, this._gl, 48), - e(this._hh, this._hl, 56), - t - ); - }), - (t.exports = h); - }, - 3424: (t, e, r) => { - t.exports = n; - var i = r(343).EventEmitter; - function n() { - i.call(this); - } - r(87)(n, i), - (n.Readable = r(3610)), - (n.Writable = r(5163)), - (n.Duplex = r(8863)), - (n.Transform = r(5081)), - (n.PassThrough = r(5117)), - (n.finished = r(1791)), - (n.pipeline = r(4297)), - (n.Stream = n), - (n.prototype.pipe = function (t, e) { - var r = this; - function n(e) { - t.writable && !1 === t.write(e) && r.pause && r.pause(); - } - function o() { - r.readable && r.resume && r.resume(); - } - r.on('data', n), t.on('drain', o), t._isStdio || (e && !1 === e.end) || (r.on('end', a), r.on('close', h)); - var s = !1; - function a() { - s || ((s = !0), t.end()); - } - function h() { - s || ((s = !0), 'function' == typeof t.destroy && t.destroy()); - } - function u(t) { - if ((f(), 0 === i.listenerCount(this, 'error'))) throw t; - } - function f() { - r.removeListener('data', n), - t.removeListener('drain', o), - r.removeListener('end', a), - r.removeListener('close', h), - r.removeListener('error', u), - t.removeListener('error', u), - r.removeListener('end', f), - r.removeListener('close', f), - t.removeListener('close', f); - } - return r.on('error', u), t.on('error', u), r.on('end', f), r.on('close', f), t.on('close', f), t.emit('pipe', r), t; - }); - }, - 5319: t => { - 'use strict'; - var e = {}; - function r(t, r, i) { - i || (i = Error); - var n = (function (t) { - var e, i; - function n(e, i, n) { - return ( - t.call( - this, - (function (t, e, i) { - return 'string' == typeof r ? r : r(t, e, i); - })(e, i, n) - ) || this - ); - } - return (i = t), ((e = n).prototype = Object.create(i.prototype)), (e.prototype.constructor = e), (e.__proto__ = i), n; - })(i); - (n.prototype.name = i.name), (n.prototype.code = t), (e[t] = n); - } - function i(t, e) { - if (Array.isArray(t)) { - var r = t.length; - return ( - (t = t.map(function (t) { - return String(t); - })), - r > 2 - ? 'one of '.concat(e, ' ').concat(t.slice(0, r - 1).join(', '), ', or ') + t[r - 1] - : 2 === r - ? 'one of '.concat(e, ' ').concat(t[0], ' or ').concat(t[1]) - : 'of '.concat(e, ' ').concat(t[0]) - ); - } - return 'of '.concat(e, ' ').concat(String(t)); - } - r( - 'ERR_INVALID_OPT_VALUE', - function (t, e) { - return 'The value "' + e + '" is invalid for option "' + t + '"'; - }, - TypeError - ), - r( - 'ERR_INVALID_ARG_TYPE', - function (t, e, r) { - var n, o, s, a, h; - if ( - ('string' == typeof e && ((o = 'not '), e.substr(0, 4) === o) - ? ((n = 'must not be'), (e = e.replace(/^not /, ''))) - : (n = 'must be'), - (function (t, e, r) { - return (void 0 === r || r > t.length) && (r = t.length), t.substring(r - 9, r) === e; - })(t, ' argument')) - ) - s = 'The '.concat(t, ' ').concat(n, ' ').concat(i(e, 'type')); - else { - var u = ('number' != typeof h && (h = 0), h + 1 > (a = t).length || -1 === a.indexOf('.', h) ? 'argument' : 'property'); - s = 'The "'.concat(t, '" ').concat(u, ' ').concat(n, ' ').concat(i(e, 'type')); - } - return s + '. Received type '.concat(typeof r); - }, - TypeError - ), - r('ERR_STREAM_PUSH_AFTER_EOF', 'stream.push() after EOF'), - r('ERR_METHOD_NOT_IMPLEMENTED', function (t) { - return 'The ' + t + ' method is not implemented'; - }), - r('ERR_STREAM_PREMATURE_CLOSE', 'Premature close'), - r('ERR_STREAM_DESTROYED', function (t) { - return 'Cannot call ' + t + ' after a stream was destroyed'; - }), - r('ERR_MULTIPLE_CALLBACK', 'Callback called multiple times'), - r('ERR_STREAM_CANNOT_PIPE', 'Cannot pipe, not readable'), - r('ERR_STREAM_WRITE_AFTER_END', 'write after end'), - r('ERR_STREAM_NULL_VALUES', 'May not write null values to stream', TypeError), - r( - 'ERR_UNKNOWN_ENCODING', - function (t) { - return 'Unknown encoding: ' + t; - }, - TypeError - ), - r('ERR_STREAM_UNSHIFT_AFTER_END_EVENT', 'stream.unshift() after end event'), - (t.exports.q = e); - }, - 8863: (t, e, r) => { - 'use strict'; - var i = - Object.keys || - function (t) { - var e = []; - for (var r in t) e.push(r); - return e; - }; - t.exports = u; - var n = r(3610), - o = r(5163); - r(87)(u, n); - for (var s = i(o.prototype), a = 0; a < s.length; a++) { - var h = s[a]; - u.prototype[h] || (u.prototype[h] = o.prototype[h]); - } - function u(t) { - if (!(this instanceof u)) return new u(t); - n.call(this, t), - o.call(this, t), - (this.allowHalfOpen = !0), - t && - (!1 === t.readable && (this.readable = !1), - !1 === t.writable && (this.writable = !1), - !1 === t.allowHalfOpen && ((this.allowHalfOpen = !1), this.once('end', f))); - } - function f() { - this._writableState.ended || process.nextTick(c, this); - } - function c(t) { - t.end(); - } - Object.defineProperty(u.prototype, 'writableHighWaterMark', { - enumerable: !1, - get: function () { - return this._writableState.highWaterMark; - }, - }), - Object.defineProperty(u.prototype, 'writableBuffer', { - enumerable: !1, - get: function () { - return this._writableState && this._writableState.getBuffer(); - }, - }), - Object.defineProperty(u.prototype, 'writableLength', { - enumerable: !1, - get: function () { - return this._writableState.length; - }, - }), - Object.defineProperty(u.prototype, 'destroyed', { - enumerable: !1, - get: function () { - return ( - void 0 !== this._readableState && - void 0 !== this._writableState && - this._readableState.destroyed && - this._writableState.destroyed - ); - }, - set: function (t) { - void 0 !== this._readableState && - void 0 !== this._writableState && - ((this._readableState.destroyed = t), (this._writableState.destroyed = t)); - }, - }); - }, - 5117: (t, e, r) => { - 'use strict'; - t.exports = n; - var i = r(5081); - function n(t) { - if (!(this instanceof n)) return new n(t); - i.call(this, t); - } - r(87)(n, i), - (n.prototype._transform = function (t, e, r) { - r(null, t); - }); - }, - 3610: (t, e, r) => { - 'use strict'; - var i; - (t.exports = S), (S.ReadableState = E), r(343).EventEmitter; - var n, - o = function (t, e) { - return t.listeners(e).length; - }, - s = r(801), - a = r(816).Buffer, - h = - (void 0 !== r.g ? r.g : 'undefined' != typeof window ? window : 'undefined' != typeof self ? self : {}).Uint8Array || - function () {}, - u = r(7702); - n = u && u.debuglog ? u.debuglog('stream') : function () {}; - var f, - c, - l, - d = r(3667), - p = r(4382), - m = r(9693).getHighWaterMark, - g = r(5319).q, - b = g.ERR_INVALID_ARG_TYPE, - y = g.ERR_STREAM_PUSH_AFTER_EOF, - v = g.ERR_METHOD_NOT_IMPLEMENTED, - w = g.ERR_STREAM_UNSHIFT_AFTER_END_EVENT; - r(87)(S, s); - var _ = p.errorOrDestroy, - M = ['error', 'close', 'destroy', 'pause', 'resume']; - function E(t, e, n) { - (i = i || r(8863)), - (t = t || {}), - 'boolean' != typeof n && (n = e instanceof i), - (this.objectMode = !!t.objectMode), - n && (this.objectMode = this.objectMode || !!t.readableObjectMode), - (this.highWaterMark = m(this, t, 'readableHighWaterMark', n)), - (this.buffer = new d()), - (this.length = 0), - (this.pipes = null), - (this.pipesCount = 0), - (this.flowing = null), - (this.ended = !1), - (this.endEmitted = !1), - (this.reading = !1), - (this.sync = !0), - (this.needReadable = !1), - (this.emittedReadable = !1), - (this.readableListening = !1), - (this.resumeScheduled = !1), - (this.paused = !0), - (this.emitClose = !1 !== t.emitClose), - (this.autoDestroy = !!t.autoDestroy), - (this.destroyed = !1), - (this.defaultEncoding = t.defaultEncoding || 'utf8'), - (this.awaitDrain = 0), - (this.readingMore = !1), - (this.decoder = null), - (this.encoding = null), - t.encoding && (f || (f = r(4361).s), (this.decoder = new f(t.encoding)), (this.encoding = t.encoding)); - } - function S(t) { - if (((i = i || r(8863)), !(this instanceof S))) return new S(t); - var e = this instanceof i; - (this._readableState = new E(t, this, e)), - (this.readable = !0), - t && ('function' == typeof t.read && (this._read = t.read), 'function' == typeof t.destroy && (this._destroy = t.destroy)), - s.call(this); - } - function x(t, e, r, i, o) { - n('readableAddChunk', e); - var s, - u = t._readableState; - if (null === e) - (u.reading = !1), - (function (t, e) { - if ((n('onEofChunk'), !e.ended)) { - if (e.decoder) { - var r = e.decoder.end(); - r && r.length && (e.buffer.push(r), (e.length += e.objectMode ? 1 : r.length)); - } - (e.ended = !0), e.sync ? B(t) : ((e.needReadable = !1), e.emittedReadable || ((e.emittedReadable = !0), I(t))); - } - })(t, u); - else if ( - (o || - (s = (function (t, e) { - var r, i; - return ( - (i = e), - a.isBuffer(i) || - i instanceof h || - 'string' == typeof e || - void 0 === e || - t.objectMode || - (r = new b('chunk', ['string', 'Buffer', 'Uint8Array'], e)), - r - ); - })(u, e)), - s) - ) - _(t, s); - else if (u.objectMode || (e && e.length > 0)) - if ( - ('string' == typeof e || - u.objectMode || - Object.getPrototypeOf(e) === a.prototype || - (e = (function (t) { - return a.from(t); - })(e)), - i) - ) - u.endEmitted ? _(t, new w()) : A(t, u, e, !0); - else if (u.ended) _(t, new y()); - else { - if (u.destroyed) return !1; - (u.reading = !1), - u.decoder && !r ? ((e = u.decoder.write(e)), u.objectMode || 0 !== e.length ? A(t, u, e, !1) : T(t, u)) : A(t, u, e, !1); - } - else i || ((u.reading = !1), T(t, u)); - return !u.ended && (u.length < u.highWaterMark || 0 === u.length); - } - function A(t, e, r, i) { - e.flowing && 0 === e.length && !e.sync - ? ((e.awaitDrain = 0), t.emit('data', r)) - : ((e.length += e.objectMode ? 1 : r.length), i ? e.buffer.unshift(r) : e.buffer.push(r), e.needReadable && B(t)), - T(t, e); - } - Object.defineProperty(S.prototype, 'destroyed', { - enumerable: !1, - get: function () { - return void 0 !== this._readableState && this._readableState.destroyed; - }, - set: function (t) { - this._readableState && (this._readableState.destroyed = t); - }, - }), - (S.prototype.destroy = p.destroy), - (S.prototype._undestroy = p.undestroy), - (S.prototype._destroy = function (t, e) { - e(t); - }), - (S.prototype.push = function (t, e) { - var r, - i = this._readableState; - return ( - i.objectMode - ? (r = !0) - : 'string' == typeof t && ((e = e || i.defaultEncoding) !== i.encoding && ((t = a.from(t, e)), (e = '')), (r = !0)), - x(this, t, e, !1, r) - ); - }), - (S.prototype.unshift = function (t) { - return x(this, t, null, !0, !1); - }), - (S.prototype.isPaused = function () { - return !1 === this._readableState.flowing; - }), - (S.prototype.setEncoding = function (t) { - f || (f = r(4361).s); - var e = new f(t); - (this._readableState.decoder = e), (this._readableState.encoding = this._readableState.decoder.encoding); - for (var i = this._readableState.buffer.head, n = ''; null !== i; ) (n += e.write(i.data)), (i = i.next); - return ( - this._readableState.buffer.clear(), - '' !== n && this._readableState.buffer.push(n), - (this._readableState.length = n.length), - this - ); - }); - var k = 1073741824; - function R(t, e) { - return t <= 0 || (0 === e.length && e.ended) - ? 0 - : e.objectMode - ? 1 - : t != t - ? e.flowing && e.length - ? e.buffer.head.data.length - : e.length - : (t > e.highWaterMark && - (e.highWaterMark = (function (t) { - return ( - t >= k ? (t = k) : (t--, (t |= t >>> 1), (t |= t >>> 2), (t |= t >>> 4), (t |= t >>> 8), (t |= t >>> 16), t++), t - ); - })(t)), - t <= e.length ? t : e.ended ? e.length : ((e.needReadable = !0), 0)); - } - function B(t) { - var e = t._readableState; - n('emitReadable', e.needReadable, e.emittedReadable), - (e.needReadable = !1), - e.emittedReadable || (n('emitReadable', e.flowing), (e.emittedReadable = !0), process.nextTick(I, t)); - } - function I(t) { - var e = t._readableState; - n('emitReadable_', e.destroyed, e.length, e.ended), - e.destroyed || (!e.length && !e.ended) || (t.emit('readable'), (e.emittedReadable = !1)), - (e.needReadable = !e.flowing && !e.ended && e.length <= e.highWaterMark), - N(t); - } - function T(t, e) { - e.readingMore || ((e.readingMore = !0), process.nextTick(P, t, e)); - } - function P(t, e) { - for (; !e.reading && !e.ended && (e.length < e.highWaterMark || (e.flowing && 0 === e.length)); ) { - var r = e.length; - if ((n('maybeReadMore read 0'), t.read(0), r === e.length)) break; - } - e.readingMore = !1; - } - function O(t) { - var e = t._readableState; - (e.readableListening = t.listenerCount('readable') > 0), - e.resumeScheduled && !e.paused ? (e.flowing = !0) : t.listenerCount('data') > 0 && t.resume(); - } - function L(t) { - n('readable nexttick read 0'), t.read(0); - } - function C(t, e) { - n('resume', e.reading), - e.reading || t.read(0), - (e.resumeScheduled = !1), - t.emit('resume'), - N(t), - e.flowing && !e.reading && t.read(0); - } - function N(t) { - var e = t._readableState; - for (n('flow', e.flowing); e.flowing && null !== t.read(); ); - } - function j(t, e) { - return 0 === e.length - ? null - : (e.objectMode - ? (r = e.buffer.shift()) - : !t || t >= e.length - ? ((r = e.decoder ? e.buffer.join('') : 1 === e.buffer.length ? e.buffer.first() : e.buffer.concat(e.length)), - e.buffer.clear()) - : (r = e.buffer.consume(t, e.decoder)), - r); - var r; - } - function U(t) { - var e = t._readableState; - n('endReadable', e.endEmitted), e.endEmitted || ((e.ended = !0), process.nextTick(D, e, t)); - } - function D(t, e) { - if ( - (n('endReadableNT', t.endEmitted, t.length), - !t.endEmitted && 0 === t.length && ((t.endEmitted = !0), (e.readable = !1), e.emit('end'), t.autoDestroy)) - ) { - var r = e._writableState; - (!r || (r.autoDestroy && r.finished)) && e.destroy(); - } - } - function z(t, e) { - for (var r = 0, i = t.length; r < i; r++) if (t[r] === e) return r; - return -1; - } - (S.prototype.read = function (t) { - n('read', t), (t = parseInt(t, 10)); - var e = this._readableState, - r = t; - if ( - (0 !== t && (e.emittedReadable = !1), - 0 === t && e.needReadable && ((0 !== e.highWaterMark ? e.length >= e.highWaterMark : e.length > 0) || e.ended)) - ) - return n('read: emitReadable', e.length, e.ended), 0 === e.length && e.ended ? U(this) : B(this), null; - if (0 === (t = R(t, e)) && e.ended) return 0 === e.length && U(this), null; - var i, - o = e.needReadable; - return ( - n('need readable', o), - (0 === e.length || e.length - t < e.highWaterMark) && n('length less than watermark', (o = !0)), - e.ended || e.reading - ? n('reading or ended', (o = !1)) - : o && - (n('do read'), - (e.reading = !0), - (e.sync = !0), - 0 === e.length && (e.needReadable = !0), - this._read(e.highWaterMark), - (e.sync = !1), - e.reading || (t = R(r, e))), - null === (i = t > 0 ? j(t, e) : null) - ? ((e.needReadable = e.length <= e.highWaterMark), (t = 0)) - : ((e.length -= t), (e.awaitDrain = 0)), - 0 === e.length && (e.ended || (e.needReadable = !0), r !== t && e.ended && U(this)), - null !== i && this.emit('data', i), - i - ); - }), - (S.prototype._read = function (t) { - _(this, new v('_read()')); - }), - (S.prototype.pipe = function (t, e) { - var r = this, - i = this._readableState; - switch (i.pipesCount) { - case 0: - i.pipes = t; - break; - case 1: - i.pipes = [i.pipes, t]; - break; - default: - i.pipes.push(t); - } - (i.pipesCount += 1), n('pipe count=%d opts=%j', i.pipesCount, e); - var s = (e && !1 === e.end) || t === process.stdout || t === process.stderr ? p : a; - function a() { - n('onend'), t.end(); - } - i.endEmitted ? process.nextTick(s) : r.once('end', s), - t.on('unpipe', function e(o, s) { - n('onunpipe'), - o === r && - s && - !1 === s.hasUnpiped && - ((s.hasUnpiped = !0), - n('cleanup'), - t.removeListener('close', l), - t.removeListener('finish', d), - t.removeListener('drain', h), - t.removeListener('error', c), - t.removeListener('unpipe', e), - r.removeListener('end', a), - r.removeListener('end', p), - r.removeListener('data', f), - (u = !0), - !i.awaitDrain || (t._writableState && !t._writableState.needDrain) || h()); - }); - var h = (function (t) { - return function () { - var e = t._readableState; - n('pipeOnDrain', e.awaitDrain), - e.awaitDrain && e.awaitDrain--, - 0 === e.awaitDrain && o(t, 'data') && ((e.flowing = !0), N(t)); - }; - })(r); - t.on('drain', h); - var u = !1; - function f(e) { - n('ondata'); - var o = t.write(e); - n('dest.write', o), - !1 === o && - (((1 === i.pipesCount && i.pipes === t) || (i.pipesCount > 1 && -1 !== z(i.pipes, t))) && - !u && - (n('false write response, pause', i.awaitDrain), i.awaitDrain++), - r.pause()); - } - function c(e) { - n('onerror', e), p(), t.removeListener('error', c), 0 === o(t, 'error') && _(t, e); - } - function l() { - t.removeListener('finish', d), p(); - } - function d() { - n('onfinish'), t.removeListener('close', l), p(); - } - function p() { - n('unpipe'), r.unpipe(t); - } - return ( - r.on('data', f), - (function (t, e, r) { - if ('function' == typeof t.prependListener) return t.prependListener(e, r); - t._events && t._events[e] - ? Array.isArray(t._events[e]) - ? t._events[e].unshift(r) - : (t._events[e] = [r, t._events[e]]) - : t.on(e, r); - })(t, 'error', c), - t.once('close', l), - t.once('finish', d), - t.emit('pipe', r), - i.flowing || (n('pipe resume'), r.resume()), - t - ); - }), - (S.prototype.unpipe = function (t) { - var e = this._readableState, - r = { hasUnpiped: !1 }; - if (0 === e.pipesCount) return this; - if (1 === e.pipesCount) - return ( - (t && t !== e.pipes) || - (t || (t = e.pipes), (e.pipes = null), (e.pipesCount = 0), (e.flowing = !1), t && t.emit('unpipe', this, r)), - this - ); - if (!t) { - var i = e.pipes, - n = e.pipesCount; - (e.pipes = null), (e.pipesCount = 0), (e.flowing = !1); - for (var o = 0; o < n; o++) i[o].emit('unpipe', this, { hasUnpiped: !1 }); - return this; - } - var s = z(e.pipes, t); - return ( - -1 === s || - (e.pipes.splice(s, 1), (e.pipesCount -= 1), 1 === e.pipesCount && (e.pipes = e.pipes[0]), t.emit('unpipe', this, r)), - this - ); - }), - (S.prototype.on = function (t, e) { - var r = s.prototype.on.call(this, t, e), - i = this._readableState; - return ( - 'data' === t - ? ((i.readableListening = this.listenerCount('readable') > 0), !1 !== i.flowing && this.resume()) - : 'readable' === t && - (i.endEmitted || - i.readableListening || - ((i.readableListening = i.needReadable = !0), - (i.flowing = !1), - (i.emittedReadable = !1), - n('on readable', i.length, i.reading), - i.length ? B(this) : i.reading || process.nextTick(L, this))), - r - ); - }), - (S.prototype.addListener = S.prototype.on), - (S.prototype.removeListener = function (t, e) { - var r = s.prototype.removeListener.call(this, t, e); - return 'readable' === t && process.nextTick(O, this), r; - }), - (S.prototype.removeAllListeners = function (t) { - var e = s.prototype.removeAllListeners.apply(this, arguments); - return ('readable' !== t && void 0 !== t) || process.nextTick(O, this), e; - }), - (S.prototype.resume = function () { - var t = this._readableState; - return ( - t.flowing || - (n('resume'), - (t.flowing = !t.readableListening), - (function (t, e) { - e.resumeScheduled || ((e.resumeScheduled = !0), process.nextTick(C, t, e)); - })(this, t)), - (t.paused = !1), - this - ); - }), - (S.prototype.pause = function () { - return ( - n('call pause flowing=%j', this._readableState.flowing), - !1 !== this._readableState.flowing && (n('pause'), (this._readableState.flowing = !1), this.emit('pause')), - (this._readableState.paused = !0), - this - ); - }), - (S.prototype.wrap = function (t) { - var e = this, - r = this._readableState, - i = !1; - for (var o in (t.on('end', function () { - if ((n('wrapped end'), r.decoder && !r.ended)) { - var t = r.decoder.end(); - t && t.length && e.push(t); - } - e.push(null); - }), - t.on('data', function (o) { - n('wrapped data'), - r.decoder && (o = r.decoder.write(o)), - (r.objectMode && null == o) || ((r.objectMode || (o && o.length)) && (e.push(o) || ((i = !0), t.pause()))); - }), - t)) - void 0 === this[o] && - 'function' == typeof t[o] && - (this[o] = (function (e) { - return function () { - return t[e].apply(t, arguments); - }; - })(o)); - for (var s = 0; s < M.length; s++) t.on(M[s], this.emit.bind(this, M[s])); - return ( - (this._read = function (e) { - n('wrapped _read', e), i && ((i = !1), t.resume()); - }), - this - ); - }), - 'function' == typeof Symbol && - (S.prototype[Symbol.asyncIterator] = function () { - return void 0 === c && (c = r(6473)), c(this); - }), - Object.defineProperty(S.prototype, 'readableHighWaterMark', { - enumerable: !1, - get: function () { - return this._readableState.highWaterMark; - }, - }), - Object.defineProperty(S.prototype, 'readableBuffer', { - enumerable: !1, - get: function () { - return this._readableState && this._readableState.buffer; - }, - }), - Object.defineProperty(S.prototype, 'readableFlowing', { - enumerable: !1, - get: function () { - return this._readableState.flowing; - }, - set: function (t) { - this._readableState && (this._readableState.flowing = t); - }, - }), - (S._fromList = j), - Object.defineProperty(S.prototype, 'readableLength', { - enumerable: !1, - get: function () { - return this._readableState.length; - }, - }), - 'function' == typeof Symbol && - (S.from = function (t, e) { - return void 0 === l && (l = r(2867)), l(S, t, e); - }); - }, - 5081: (t, e, r) => { - 'use strict'; - t.exports = f; - var i = r(5319).q, - n = i.ERR_METHOD_NOT_IMPLEMENTED, - o = i.ERR_MULTIPLE_CALLBACK, - s = i.ERR_TRANSFORM_ALREADY_TRANSFORMING, - a = i.ERR_TRANSFORM_WITH_LENGTH_0, - h = r(8863); - function u(t, e) { - var r = this._transformState; - r.transforming = !1; - var i = r.writecb; - if (null === i) return this.emit('error', new o()); - (r.writechunk = null), (r.writecb = null), null != e && this.push(e), i(t); - var n = this._readableState; - (n.reading = !1), (n.needReadable || n.length < n.highWaterMark) && this._read(n.highWaterMark); - } - function f(t) { - if (!(this instanceof f)) return new f(t); - h.call(this, t), - (this._transformState = { - afterTransform: u.bind(this), - needTransform: !1, - transforming: !1, - writecb: null, - writechunk: null, - writeencoding: null, - }), - (this._readableState.needReadable = !0), - (this._readableState.sync = !1), - t && - ('function' == typeof t.transform && (this._transform = t.transform), - 'function' == typeof t.flush && (this._flush = t.flush)), - this.on('prefinish', c); - } - function c() { - var t = this; - 'function' != typeof this._flush || this._readableState.destroyed - ? l(this, null, null) - : this._flush(function (e, r) { - l(t, e, r); - }); - } - function l(t, e, r) { - if (e) return t.emit('error', e); - if ((null != r && t.push(r), t._writableState.length)) throw new a(); - if (t._transformState.transforming) throw new s(); - return t.push(null); - } - r(87)(f, h), - (f.prototype.push = function (t, e) { - return (this._transformState.needTransform = !1), h.prototype.push.call(this, t, e); - }), - (f.prototype._transform = function (t, e, r) { - r(new n('_transform()')); - }), - (f.prototype._write = function (t, e, r) { - var i = this._transformState; - if (((i.writecb = r), (i.writechunk = t), (i.writeencoding = e), !i.transforming)) { - var n = this._readableState; - (i.needTransform || n.needReadable || n.length < n.highWaterMark) && this._read(n.highWaterMark); - } - }), - (f.prototype._read = function (t) { - var e = this._transformState; - null === e.writechunk || e.transforming - ? (e.needTransform = !0) - : ((e.transforming = !0), this._transform(e.writechunk, e.writeencoding, e.afterTransform)); - }), - (f.prototype._destroy = function (t, e) { - h.prototype._destroy.call(this, t, function (t) { - e(t); - }); - }); - }, - 5163: (t, e, r) => { - 'use strict'; - function i(t) { - var e = this; - (this.next = null), - (this.entry = null), - (this.finish = function () { - !(function (t, e, r) { - var i = t.entry; - for (t.entry = null; i; ) { - var n = i.callback; - e.pendingcb--, n(undefined), (i = i.next); - } - e.corkedRequestsFree.next = t; - })(e, t); - }); - } - var n; - (t.exports = S), (S.WritableState = E); - var o, - s = { deprecate: r(7451) }, - a = r(801), - h = r(816).Buffer, - u = - (void 0 !== r.g ? r.g : 'undefined' != typeof window ? window : 'undefined' != typeof self ? self : {}).Uint8Array || - function () {}, - f = r(4382), - c = r(9693).getHighWaterMark, - l = r(5319).q, - d = l.ERR_INVALID_ARG_TYPE, - p = l.ERR_METHOD_NOT_IMPLEMENTED, - m = l.ERR_MULTIPLE_CALLBACK, - g = l.ERR_STREAM_CANNOT_PIPE, - b = l.ERR_STREAM_DESTROYED, - y = l.ERR_STREAM_NULL_VALUES, - v = l.ERR_STREAM_WRITE_AFTER_END, - w = l.ERR_UNKNOWN_ENCODING, - _ = f.errorOrDestroy; - function M() {} - function E(t, e, o) { - (n = n || r(8863)), - (t = t || {}), - 'boolean' != typeof o && (o = e instanceof n), - (this.objectMode = !!t.objectMode), - o && (this.objectMode = this.objectMode || !!t.writableObjectMode), - (this.highWaterMark = c(this, t, 'writableHighWaterMark', o)), - (this.finalCalled = !1), - (this.needDrain = !1), - (this.ending = !1), - (this.ended = !1), - (this.finished = !1), - (this.destroyed = !1); - var s = !1 === t.decodeStrings; - (this.decodeStrings = !s), - (this.defaultEncoding = t.defaultEncoding || 'utf8'), - (this.length = 0), - (this.writing = !1), - (this.corked = 0), - (this.sync = !0), - (this.bufferProcessing = !1), - (this.onwrite = function (t) { - !(function (t, e) { - var r = t._writableState, - i = r.sync, - n = r.writecb; - if ('function' != typeof n) throw new m(); - if ( - ((function (t) { - (t.writing = !1), (t.writecb = null), (t.length -= t.writelen), (t.writelen = 0); - })(r), - e) - ) - !(function (t, e, r, i, n) { - --e.pendingcb, - r - ? (process.nextTick(n, i), process.nextTick(I, t, e), (t._writableState.errorEmitted = !0), _(t, i)) - : (n(i), (t._writableState.errorEmitted = !0), _(t, i), I(t, e)); - })(t, r, i, e, n); - else { - var o = R(r) || t.destroyed; - o || r.corked || r.bufferProcessing || !r.bufferedRequest || k(t, r), i ? process.nextTick(A, t, r, o, n) : A(t, r, o, n); - } - })(e, t); - }), - (this.writecb = null), - (this.writelen = 0), - (this.bufferedRequest = null), - (this.lastBufferedRequest = null), - (this.pendingcb = 0), - (this.prefinished = !1), - (this.errorEmitted = !1), - (this.emitClose = !1 !== t.emitClose), - (this.autoDestroy = !!t.autoDestroy), - (this.bufferedRequestCount = 0), - (this.corkedRequestsFree = new i(this)); - } - function S(t) { - var e = this instanceof (n = n || r(8863)); - if (!e && !o.call(S, this)) return new S(t); - (this._writableState = new E(t, this, e)), - (this.writable = !0), - t && - ('function' == typeof t.write && (this._write = t.write), - 'function' == typeof t.writev && (this._writev = t.writev), - 'function' == typeof t.destroy && (this._destroy = t.destroy), - 'function' == typeof t.final && (this._final = t.final)), - a.call(this); - } - function x(t, e, r, i, n, o, s) { - (e.writelen = i), - (e.writecb = s), - (e.writing = !0), - (e.sync = !0), - e.destroyed ? e.onwrite(new b('write')) : r ? t._writev(n, e.onwrite) : t._write(n, o, e.onwrite), - (e.sync = !1); - } - function A(t, e, r, i) { - r || - (function (t, e) { - 0 === e.length && e.needDrain && ((e.needDrain = !1), t.emit('drain')); - })(t, e), - e.pendingcb--, - i(), - I(t, e); - } - function k(t, e) { - e.bufferProcessing = !0; - var r = e.bufferedRequest; - if (t._writev && r && r.next) { - var n = e.bufferedRequestCount, - o = new Array(n), - s = e.corkedRequestsFree; - s.entry = r; - for (var a = 0, h = !0; r; ) (o[a] = r), r.isBuf || (h = !1), (r = r.next), (a += 1); - (o.allBuffers = h), - x(t, e, !0, e.length, o, '', s.finish), - e.pendingcb++, - (e.lastBufferedRequest = null), - s.next ? ((e.corkedRequestsFree = s.next), (s.next = null)) : (e.corkedRequestsFree = new i(e)), - (e.bufferedRequestCount = 0); - } else { - for (; r; ) { - var u = r.chunk, - f = r.encoding, - c = r.callback; - if ((x(t, e, !1, e.objectMode ? 1 : u.length, u, f, c), (r = r.next), e.bufferedRequestCount--, e.writing)) break; - } - null === r && (e.lastBufferedRequest = null); - } - (e.bufferedRequest = r), (e.bufferProcessing = !1); - } - function R(t) { - return t.ending && 0 === t.length && null === t.bufferedRequest && !t.finished && !t.writing; - } - function B(t, e) { - t._final(function (r) { - e.pendingcb--, r && _(t, r), (e.prefinished = !0), t.emit('prefinish'), I(t, e); - }); - } - function I(t, e) { - var r = R(e); - if ( - r && - ((function (t, e) { - e.prefinished || - e.finalCalled || - ('function' != typeof t._final || e.destroyed - ? ((e.prefinished = !0), t.emit('prefinish')) - : (e.pendingcb++, (e.finalCalled = !0), process.nextTick(B, t, e))); - })(t, e), - 0 === e.pendingcb && ((e.finished = !0), t.emit('finish'), e.autoDestroy)) - ) { - var i = t._readableState; - (!i || (i.autoDestroy && i.endEmitted)) && t.destroy(); - } - return r; - } - r(87)(S, a), - (E.prototype.getBuffer = function () { - for (var t = this.bufferedRequest, e = []; t; ) e.push(t), (t = t.next); - return e; - }), - (function () { - try { - Object.defineProperty(E.prototype, 'buffer', { - get: s.deprecate( - function () { - return this.getBuffer(); - }, - '_writableState.buffer is deprecated. Use _writableState.getBuffer instead.', - 'DEP0003' - ), - }); - } catch (t) {} - })(), - 'function' == typeof Symbol && Symbol.hasInstance && 'function' == typeof Function.prototype[Symbol.hasInstance] - ? ((o = Function.prototype[Symbol.hasInstance]), - Object.defineProperty(S, Symbol.hasInstance, { - value: function (t) { - return !!o.call(this, t) || (this === S && t && t._writableState instanceof E); - }, - })) - : (o = function (t) { - return t instanceof this; - }), - (S.prototype.pipe = function () { - _(this, new g()); - }), - (S.prototype.write = function (t, e, r) { - var i, - n = this._writableState, - o = !1, - s = !n.objectMode && ((i = t), h.isBuffer(i) || i instanceof u); - return ( - s && - !h.isBuffer(t) && - (t = (function (t) { - return h.from(t); - })(t)), - 'function' == typeof e && ((r = e), (e = null)), - s ? (e = 'buffer') : e || (e = n.defaultEncoding), - 'function' != typeof r && (r = M), - n.ending - ? (function (t, e) { - var r = new v(); - _(t, r), process.nextTick(e, r); - })(this, r) - : (s || - (function (t, e, r, i) { - var n; - return ( - null === r ? (n = new y()) : 'string' == typeof r || e.objectMode || (n = new d('chunk', ['string', 'Buffer'], r)), - !n || (_(t, n), process.nextTick(i, n), !1) - ); - })(this, n, t, r)) && - (n.pendingcb++, - (o = (function (t, e, r, i, n, o) { - if (!r) { - var s = (function (t, e, r) { - return t.objectMode || !1 === t.decodeStrings || 'string' != typeof e || (e = h.from(e, r)), e; - })(e, i, n); - i !== s && ((r = !0), (n = 'buffer'), (i = s)); - } - var a = e.objectMode ? 1 : i.length; - e.length += a; - var u = e.length < e.highWaterMark; - if ((u || (e.needDrain = !0), e.writing || e.corked)) { - var f = e.lastBufferedRequest; - (e.lastBufferedRequest = { chunk: i, encoding: n, isBuf: r, callback: o, next: null }), - f ? (f.next = e.lastBufferedRequest) : (e.bufferedRequest = e.lastBufferedRequest), - (e.bufferedRequestCount += 1); - } else x(t, e, !1, a, i, n, o); - return u; - })(this, n, s, t, e, r))), - o - ); - }), - (S.prototype.cork = function () { - this._writableState.corked++; - }), - (S.prototype.uncork = function () { - var t = this._writableState; - t.corked && (t.corked--, t.writing || t.corked || t.bufferProcessing || !t.bufferedRequest || k(this, t)); - }), - (S.prototype.setDefaultEncoding = function (t) { - if ( - ('string' == typeof t && (t = t.toLowerCase()), - !( - ['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf( - (t + '').toLowerCase() - ) > -1 - )) - ) - throw new w(t); - return (this._writableState.defaultEncoding = t), this; - }), - Object.defineProperty(S.prototype, 'writableBuffer', { - enumerable: !1, - get: function () { - return this._writableState && this._writableState.getBuffer(); - }, - }), - Object.defineProperty(S.prototype, 'writableHighWaterMark', { - enumerable: !1, - get: function () { - return this._writableState.highWaterMark; - }, - }), - (S.prototype._write = function (t, e, r) { - r(new p('_write()')); - }), - (S.prototype._writev = null), - (S.prototype.end = function (t, e, r) { - var i = this._writableState; - return ( - 'function' == typeof t ? ((r = t), (t = null), (e = null)) : 'function' == typeof e && ((r = e), (e = null)), - null != t && this.write(t, e), - i.corked && ((i.corked = 1), this.uncork()), - i.ending || - (function (t, e, r) { - (e.ending = !0), - I(t, e), - r && (e.finished ? process.nextTick(r) : t.once('finish', r)), - (e.ended = !0), - (t.writable = !1); - })(this, i, r), - this - ); - }), - Object.defineProperty(S.prototype, 'writableLength', { - enumerable: !1, - get: function () { - return this._writableState.length; - }, - }), - Object.defineProperty(S.prototype, 'destroyed', { - enumerable: !1, - get: function () { - return void 0 !== this._writableState && this._writableState.destroyed; - }, - set: function (t) { - this._writableState && (this._writableState.destroyed = t); - }, - }), - (S.prototype.destroy = f.destroy), - (S.prototype._undestroy = f.undestroy), - (S.prototype._destroy = function (t, e) { - e(t); - }); - }, - 6473: (t, e, r) => { - 'use strict'; - var i; - function n(t, e, r) { - return ( - (e = (function (t) { - var e = (function (t, e) { - if ('object' != typeof t || null === t) return t; - var r = t[Symbol.toPrimitive]; - if (void 0 !== r) { - var i = r.call(t, 'string'); - if ('object' != typeof i) return i; - throw new TypeError('@@toPrimitive must return a primitive value.'); - } - return String(t); - })(t); - return 'symbol' == typeof e ? e : String(e); - })(e)) in t - ? Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }) - : (t[e] = r), - t - ); - } - var o = r(1791), - s = Symbol('lastResolve'), - a = Symbol('lastReject'), - h = Symbol('error'), - u = Symbol('ended'), - f = Symbol('lastPromise'), - c = Symbol('handlePromise'), - l = Symbol('stream'); - function d(t, e) { - return { value: t, done: e }; - } - function p(t) { - var e = t[s]; - if (null !== e) { - var r = t[l].read(); - null !== r && ((t[f] = null), (t[s] = null), (t[a] = null), e(d(r, !1))); - } - } - function m(t) { - process.nextTick(p, t); - } - var g = Object.getPrototypeOf(function () {}), - b = Object.setPrototypeOf( - (n( - (i = { - get stream() { - return this[l]; - }, - next: function () { - var t = this, - e = this[h]; - if (null !== e) return Promise.reject(e); - if (this[u]) return Promise.resolve(d(void 0, !0)); - if (this[l].destroyed) - return new Promise(function (e, r) { - process.nextTick(function () { - t[h] ? r(t[h]) : e(d(void 0, !0)); - }); - }); - var r, - i = this[f]; - if (i) - r = new Promise( - (function (t, e) { - return function (r, i) { - t.then(function () { - e[u] ? r(d(void 0, !0)) : e[c](r, i); - }, i); - }; - })(i, this) - ); - else { - var n = this[l].read(); - if (null !== n) return Promise.resolve(d(n, !1)); - r = new Promise(this[c]); - } - return (this[f] = r), r; - }, - }), - Symbol.asyncIterator, - function () { - return this; - } - ), - n(i, 'return', function () { - var t = this; - return new Promise(function (e, r) { - t[l].destroy(null, function (t) { - t ? r(t) : e(d(void 0, !0)); - }); - }); - }), - i), - g - ); - t.exports = function (t) { - var e, - r = Object.create( - b, - (n((e = {}), l, { value: t, writable: !0 }), - n(e, s, { value: null, writable: !0 }), - n(e, a, { value: null, writable: !0 }), - n(e, h, { value: null, writable: !0 }), - n(e, u, { value: t._readableState.endEmitted, writable: !0 }), - n(e, c, { - value: function (t, e) { - var i = r[l].read(); - i ? ((r[f] = null), (r[s] = null), (r[a] = null), t(d(i, !1))) : ((r[s] = t), (r[a] = e)); - }, - writable: !0, - }), - e) - ); - return ( - (r[f] = null), - o(t, function (t) { - if (t && 'ERR_STREAM_PREMATURE_CLOSE' !== t.code) { - var e = r[a]; - return null !== e && ((r[f] = null), (r[s] = null), (r[a] = null), e(t)), void (r[h] = t); - } - var i = r[s]; - null !== i && ((r[f] = null), (r[s] = null), (r[a] = null), i(d(void 0, !0))), (r[u] = !0); - }), - t.on('readable', m.bind(null, r)), - r - ); - }; - }, - 3667: (t, e, r) => { - 'use strict'; - function i(t, e) { - var r = Object.keys(t); - if (Object.getOwnPropertySymbols) { - var i = Object.getOwnPropertySymbols(t); - e && - (i = i.filter(function (e) { - return Object.getOwnPropertyDescriptor(t, e).enumerable; - })), - r.push.apply(r, i); - } - return r; - } - function n(t) { - for (var e = 1; e < arguments.length; e++) { - var r = null != arguments[e] ? arguments[e] : {}; - e % 2 - ? i(Object(r), !0).forEach(function (e) { - o(t, e, r[e]); - }) - : Object.getOwnPropertyDescriptors - ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) - : i(Object(r)).forEach(function (e) { - Object.defineProperty(t, e, Object.getOwnPropertyDescriptor(r, e)); - }); - } - return t; - } - function o(t, e, r) { - return ( - (e = a(e)) in t ? Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : (t[e] = r), t - ); - } - function s(t, e) { - for (var r = 0; r < e.length; r++) { - var i = e[r]; - (i.enumerable = i.enumerable || !1), - (i.configurable = !0), - 'value' in i && (i.writable = !0), - Object.defineProperty(t, a(i.key), i); - } - } - function a(t) { - var e = (function (t, e) { - if ('object' != typeof t || null === t) return t; - var r = t[Symbol.toPrimitive]; - if (void 0 !== r) { - var i = r.call(t, 'string'); - if ('object' != typeof i) return i; - throw new TypeError('@@toPrimitive must return a primitive value.'); - } - return String(t); - })(t); - return 'symbol' == typeof e ? e : String(e); - } - var h = r(816).Buffer, - u = r(3927).inspect, - f = (u && u.custom) || 'inspect'; - t.exports = (function () { - function t() { - !(function (t, e) { - if (!(t instanceof e)) throw new TypeError('Cannot call a class as a function'); - })(this, t), - (this.head = null), - (this.tail = null), - (this.length = 0); - } - var e, r; - return ( - (e = t), - (r = [ - { - key: 'push', - value: function (t) { - var e = { data: t, next: null }; - this.length > 0 ? (this.tail.next = e) : (this.head = e), (this.tail = e), ++this.length; - }, - }, - { - key: 'unshift', - value: function (t) { - var e = { data: t, next: this.head }; - 0 === this.length && (this.tail = e), (this.head = e), ++this.length; - }, - }, - { - key: 'shift', - value: function () { - if (0 !== this.length) { - var t = this.head.data; - return 1 === this.length ? (this.head = this.tail = null) : (this.head = this.head.next), --this.length, t; - } - }, - }, - { - key: 'clear', - value: function () { - (this.head = this.tail = null), (this.length = 0); - }, - }, - { - key: 'join', - value: function (t) { - if (0 === this.length) return ''; - for (var e = this.head, r = '' + e.data; (e = e.next); ) r += t + e.data; - return r; - }, - }, - { - key: 'concat', - value: function (t) { - if (0 === this.length) return h.alloc(0); - for (var e, r, i, n = h.allocUnsafe(t >>> 0), o = this.head, s = 0; o; ) - (e = o.data), (r = n), (i = s), h.prototype.copy.call(e, r, i), (s += o.data.length), (o = o.next); - return n; - }, - }, - { - key: 'consume', - value: function (t, e) { - var r; - return ( - t < this.head.data.length - ? ((r = this.head.data.slice(0, t)), (this.head.data = this.head.data.slice(t))) - : (r = t === this.head.data.length ? this.shift() : e ? this._getString(t) : this._getBuffer(t)), - r - ); - }, - }, - { - key: 'first', - value: function () { - return this.head.data; - }, - }, - { - key: '_getString', - value: function (t) { - var e = this.head, - r = 1, - i = e.data; - for (t -= i.length; (e = e.next); ) { - var n = e.data, - o = t > n.length ? n.length : t; - if ((o === n.length ? (i += n) : (i += n.slice(0, t)), 0 == (t -= o))) { - o === n.length - ? (++r, e.next ? (this.head = e.next) : (this.head = this.tail = null)) - : ((this.head = e), (e.data = n.slice(o))); - break; - } - ++r; - } - return (this.length -= r), i; - }, - }, - { - key: '_getBuffer', - value: function (t) { - var e = h.allocUnsafe(t), - r = this.head, - i = 1; - for (r.data.copy(e), t -= r.data.length; (r = r.next); ) { - var n = r.data, - o = t > n.length ? n.length : t; - if ((n.copy(e, e.length - t, 0, o), 0 == (t -= o))) { - o === n.length - ? (++i, r.next ? (this.head = r.next) : (this.head = this.tail = null)) - : ((this.head = r), (r.data = n.slice(o))); - break; - } - ++i; - } - return (this.length -= i), e; - }, - }, - { - key: f, - value: function (t, e) { - return u(this, n(n({}, e), {}, { depth: 0, customInspect: !1 })); - }, - }, - ]) && s(e.prototype, r), - Object.defineProperty(e, 'prototype', { writable: !1 }), - t - ); - })(); - }, - 4382: t => { - 'use strict'; - function e(t, e) { - i(t, e), r(t); - } - function r(t) { - (t._writableState && !t._writableState.emitClose) || (t._readableState && !t._readableState.emitClose) || t.emit('close'); - } - function i(t, e) { - t.emit('error', e); - } - t.exports = { - destroy: function (t, n) { - var o = this, - s = this._readableState && this._readableState.destroyed, - a = this._writableState && this._writableState.destroyed; - return s || a - ? (n - ? n(t) - : t && - (this._writableState - ? this._writableState.errorEmitted || ((this._writableState.errorEmitted = !0), process.nextTick(i, this, t)) - : process.nextTick(i, this, t)), - this) - : (this._readableState && (this._readableState.destroyed = !0), - this._writableState && (this._writableState.destroyed = !0), - this._destroy(t || null, function (t) { - !n && t - ? o._writableState - ? o._writableState.errorEmitted - ? process.nextTick(r, o) - : ((o._writableState.errorEmitted = !0), process.nextTick(e, o, t)) - : process.nextTick(e, o, t) - : n - ? (process.nextTick(r, o), n(t)) - : process.nextTick(r, o); - }), - this); - }, - undestroy: function () { - this._readableState && - ((this._readableState.destroyed = !1), - (this._readableState.reading = !1), - (this._readableState.ended = !1), - (this._readableState.endEmitted = !1)), - this._writableState && - ((this._writableState.destroyed = !1), - (this._writableState.ended = !1), - (this._writableState.ending = !1), - (this._writableState.finalCalled = !1), - (this._writableState.prefinished = !1), - (this._writableState.finished = !1), - (this._writableState.errorEmitted = !1)); - }, - errorOrDestroy: function (t, e) { - var r = t._readableState, - i = t._writableState; - (r && r.autoDestroy) || (i && i.autoDestroy) ? t.destroy(e) : t.emit('error', e); - }, - }; - }, - 1791: (t, e, r) => { - 'use strict'; - var i = r(5319).q.ERR_STREAM_PREMATURE_CLOSE; - function n() {} - t.exports = function t(e, r, o) { - if ('function' == typeof r) return t(e, null, r); - r || (r = {}), - (o = (function (t) { - var e = !1; - return function () { - if (!e) { - e = !0; - for (var r = arguments.length, i = new Array(r), n = 0; n < r; n++) i[n] = arguments[n]; - t.apply(this, i); - } - }; - })(o || n)); - var s = r.readable || (!1 !== r.readable && e.readable), - a = r.writable || (!1 !== r.writable && e.writable), - h = function () { - e.writable || f(); - }, - u = e._writableState && e._writableState.finished, - f = function () { - (a = !1), (u = !0), s || o.call(e); - }, - c = e._readableState && e._readableState.endEmitted, - l = function () { - (s = !1), (c = !0), a || o.call(e); - }, - d = function (t) { - o.call(e, t); - }, - p = function () { - var t; - return s && !c - ? ((e._readableState && e._readableState.ended) || (t = new i()), o.call(e, t)) - : a && !u - ? ((e._writableState && e._writableState.ended) || (t = new i()), o.call(e, t)) - : void 0; - }, - m = function () { - e.req.on('finish', f); - }; - return ( - (function (t) { - return t.setHeader && 'function' == typeof t.abort; - })(e) - ? (e.on('complete', f), e.on('abort', p), e.req ? m() : e.on('request', m)) - : a && !e._writableState && (e.on('end', h), e.on('close', h)), - e.on('end', l), - e.on('finish', f), - !1 !== r.error && e.on('error', d), - e.on('close', p), - function () { - e.removeListener('complete', f), - e.removeListener('abort', p), - e.removeListener('request', m), - e.req && e.req.removeListener('finish', f), - e.removeListener('end', h), - e.removeListener('close', h), - e.removeListener('finish', f), - e.removeListener('end', l), - e.removeListener('error', d), - e.removeListener('close', p); - } - ); - }; - }, - 2867: t => { - t.exports = function () { - throw new Error('Readable.from is not available in the browser'); - }; - }, - 4297: (t, e, r) => { - 'use strict'; - var i, - n = r(5319).q, - o = n.ERR_MISSING_ARGS, - s = n.ERR_STREAM_DESTROYED; - function a(t) { - if (t) throw t; - } - function h(t) { - t(); - } - function u(t, e) { - return t.pipe(e); - } - t.exports = function () { - for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++) e[n] = arguments[n]; - var f, - c = (function (t) { - return t.length ? ('function' != typeof t[t.length - 1] ? a : t.pop()) : a; - })(e); - if ((Array.isArray(e[0]) && (e = e[0]), e.length < 2)) throw new o('streams'); - var l = e.map(function (t, n) { - var o = n < e.length - 1; - return (function (t, e, n, o) { - o = (function (t) { - var e = !1; - return function () { - e || ((e = !0), t.apply(void 0, arguments)); - }; - })(o); - var a = !1; - t.on('close', function () { - a = !0; - }), - void 0 === i && (i = r(1791)), - i(t, { readable: e, writable: n }, function (t) { - if (t) return o(t); - (a = !0), o(); - }); - var h = !1; - return function (e) { - if (!a && !h) - return ( - (h = !0), - (function (t) { - return t.setHeader && 'function' == typeof t.abort; - })(t) - ? t.abort() - : 'function' == typeof t.destroy - ? t.destroy() - : void o(e || new s('pipe')) - ); - }; - })(t, o, n > 0, function (t) { - f || (f = t), t && l.forEach(h), o || (l.forEach(h), c(f)); - }); - }); - return e.reduce(u); - }; - }, - 9693: (t, e, r) => { - 'use strict'; - var i = r(5319).q.ERR_INVALID_OPT_VALUE; - t.exports = { - getHighWaterMark: function (t, e, r, n) { - var o = (function (t, e, r) { - return null != t.highWaterMark ? t.highWaterMark : e ? t[r] : null; - })(e, n, r); - if (null != o) { - if (!isFinite(o) || Math.floor(o) !== o || o < 0) throw new i(n ? r : 'highWaterMark', o); - return Math.floor(o); - } - return t.objectMode ? 16 : 16384; - }, - }; - }, - 801: (t, e, r) => { - t.exports = r(343).EventEmitter; - }, - 4361: (t, e, r) => { - 'use strict'; - var i = r(7172).Buffer, - n = - i.isEncoding || - function (t) { - switch ((t = '' + t) && t.toLowerCase()) { - case 'hex': - case 'utf8': - case 'utf-8': - case 'ascii': - case 'binary': - case 'base64': - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - case 'raw': - return !0; - default: - return !1; - } - }; - function o(t) { - var e; - switch ( - ((this.encoding = (function (t) { - var e = (function (t) { - if (!t) return 'utf8'; - for (var e; ; ) - switch (t) { - case 'utf8': - case 'utf-8': - return 'utf8'; - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return 'utf16le'; - case 'latin1': - case 'binary': - return 'latin1'; - case 'base64': - case 'ascii': - case 'hex': - return t; - default: - if (e) return; - (t = ('' + t).toLowerCase()), (e = !0); - } - })(t); - if ('string' != typeof e && (i.isEncoding === n || !n(t))) throw new Error('Unknown encoding: ' + t); - return e || t; - })(t)), - this.encoding) - ) { - case 'utf16le': - (this.text = h), (this.end = u), (e = 4); - break; - case 'utf8': - (this.fillLast = a), (e = 4); - break; - case 'base64': - (this.text = f), (this.end = c), (e = 3); - break; - default: - return (this.write = l), void (this.end = d); - } - (this.lastNeed = 0), (this.lastTotal = 0), (this.lastChar = i.allocUnsafe(e)); - } - function s(t) { - return t <= 127 ? 0 : t >> 5 == 6 ? 2 : t >> 4 == 14 ? 3 : t >> 3 == 30 ? 4 : t >> 6 == 2 ? -1 : -2; - } - function a(t) { - var e = this.lastTotal - this.lastNeed, - r = (function (t, e, r) { - if (128 != (192 & e[0])) return (t.lastNeed = 0), '�'; - if (t.lastNeed > 1 && e.length > 1) { - if (128 != (192 & e[1])) return (t.lastNeed = 1), '�'; - if (t.lastNeed > 2 && e.length > 2 && 128 != (192 & e[2])) return (t.lastNeed = 2), '�'; - } - })(this, t); - return void 0 !== r - ? r - : this.lastNeed <= t.length - ? (t.copy(this.lastChar, e, 0, this.lastNeed), this.lastChar.toString(this.encoding, 0, this.lastTotal)) - : (t.copy(this.lastChar, e, 0, t.length), void (this.lastNeed -= t.length)); - } - function h(t, e) { - if ((t.length - e) % 2 == 0) { - var r = t.toString('utf16le', e); - if (r) { - var i = r.charCodeAt(r.length - 1); - if (i >= 55296 && i <= 56319) - return ( - (this.lastNeed = 2), - (this.lastTotal = 4), - (this.lastChar[0] = t[t.length - 2]), - (this.lastChar[1] = t[t.length - 1]), - r.slice(0, -1) - ); - } - return r; - } - return (this.lastNeed = 1), (this.lastTotal = 2), (this.lastChar[0] = t[t.length - 1]), t.toString('utf16le', e, t.length - 1); - } - function u(t) { - var e = t && t.length ? this.write(t) : ''; - if (this.lastNeed) { - var r = this.lastTotal - this.lastNeed; - return e + this.lastChar.toString('utf16le', 0, r); - } - return e; - } - function f(t, e) { - var r = (t.length - e) % 3; - return 0 === r - ? t.toString('base64', e) - : ((this.lastNeed = 3 - r), - (this.lastTotal = 3), - 1 === r ? (this.lastChar[0] = t[t.length - 1]) : ((this.lastChar[0] = t[t.length - 2]), (this.lastChar[1] = t[t.length - 1])), - t.toString('base64', e, t.length - r)); - } - function c(t) { - var e = t && t.length ? this.write(t) : ''; - return this.lastNeed ? e + this.lastChar.toString('base64', 0, 3 - this.lastNeed) : e; - } - function l(t) { - return t.toString(this.encoding); - } - function d(t) { - return t && t.length ? this.write(t) : ''; - } - (e.s = o), - (o.prototype.write = function (t) { - if (0 === t.length) return ''; - var e, r; - if (this.lastNeed) { - if (void 0 === (e = this.fillLast(t))) return ''; - (r = this.lastNeed), (this.lastNeed = 0); - } else r = 0; - return r < t.length ? (e ? e + this.text(t, r) : this.text(t, r)) : e || ''; - }), - (o.prototype.end = function (t) { - var e = t && t.length ? this.write(t) : ''; - return this.lastNeed ? e + '�' : e; - }), - (o.prototype.text = function (t, e) { - var r = (function (t, e, r) { - var i = e.length - 1; - if (i < r) return 0; - var n = s(e[i]); - return n >= 0 - ? (n > 0 && (t.lastNeed = n - 1), n) - : --i < r || -2 === n - ? 0 - : (n = s(e[i])) >= 0 - ? (n > 0 && (t.lastNeed = n - 2), n) - : --i < r || -2 === n - ? 0 - : (n = s(e[i])) >= 0 - ? (n > 0 && (2 === n ? (n = 0) : (t.lastNeed = n - 3)), n) - : 0; - })(this, t, e); - if (!this.lastNeed) return t.toString('utf8', e); - this.lastTotal = r; - var i = t.length - (r - this.lastNeed); - return t.copy(this.lastChar, 0, i), t.toString('utf8', e, i); - }), - (o.prototype.fillLast = function (t) { - if (this.lastNeed <= t.length) - return ( - t.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed), - this.lastChar.toString(this.encoding, 0, this.lastTotal) - ); - t.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, t.length), (this.lastNeed -= t.length); - }); - }, - 7451: (t, e, r) => { - function i(t) { - try { - if (!r.g.localStorage) return !1; - } catch (t) { - return !1; - } - var e = r.g.localStorage[t]; - return null != e && 'true' === String(e).toLowerCase(); - } - t.exports = function (t, e) { - if (i('noDeprecation')) return t; - var r = !1; - return function () { - if (!r) { - if (i('throwDeprecation')) throw new Error(e); - i('traceDeprecation') ? console.trace(e) : console.warn(e), (r = !0); - } - return t.apply(this, arguments); - }; - }; - }, - 5507: (t, e) => { - 'use strict'; - function r(t) { - if (Array.isArray(t)) { - const e = []; - let i = 0; - for (let n = 0; n < t.length; n++) { - const o = r(t[n]); - e.push(o), (i += o.length); - } - return l(o(i, 192), ...e); - } - const e = g(t); - return 1 === e.length && e[0] < 128 ? e : l(o(e.length, 128), e); - } - function i(t, e, r) { - if (r > t.length) throw new Error('invalid RLP (safeSlice): end slice of Uint8Array out-of-bounds'); - return t.slice(e, r); - } - function n(t) { - if (0 === t[0]) throw new Error('invalid RLP: extra zeros'); - return f(u(t)); - } - function o(t, e) { - if (t < 56) return Uint8Array.from([t + e]); - const r = p(t), - i = p(e + 55 + r.length / 2); - return Uint8Array.from(c(i + r)); - } - function s(t, e = !1) { - if (null == t || 0 === t.length) return Uint8Array.from([]); - const r = a(g(t)); - if (e) return r; - if (0 !== r.remainder.length) throw new Error('invalid RLP: remainder must be zero'); - return r.data; - } - function a(t) { - let e, r, o, s, h; - const u = [], - f = t[0]; - if (f <= 127) return { data: t.slice(0, 1), remainder: t.slice(1) }; - if (f <= 183) { - if (((e = f - 127), (o = 128 === f ? Uint8Array.from([]) : i(t, 1, e)), 2 === e && o[0] < 128)) - throw new Error('invalid RLP encoding: invalid prefix, single byte < 0x80 are not prefixed'); - return { data: o, remainder: t.slice(e) }; - } - if (f <= 191) { - if (((r = f - 182), t.length - 1 < r)) throw new Error('invalid RLP: not enough bytes for string length'); - if (((e = n(i(t, 1, r))), e <= 55)) throw new Error('invalid RLP: expected string length to be greater than 55'); - return (o = i(t, r, e + r)), { data: o, remainder: t.slice(e + r) }; - } - if (f <= 247) { - for (e = f - 191, s = i(t, 1, e); s.length; ) (h = a(s)), u.push(h.data), (s = h.remainder); - return { data: u, remainder: t.slice(e) }; - } - { - if (((r = f - 246), (e = n(i(t, 1, r))), e < 56)) throw new Error('invalid RLP: encoded list too short'); - const o = r + e; - if (o > t.length) throw new Error('invalid RLP: total length is larger than the data'); - for (s = i(t, r, o); s.length; ) (h = a(s)), u.push(h.data), (s = h.remainder); - return { data: u, remainder: t.slice(o) }; - } - } - Object.defineProperty(e, '__esModule', { value: !0 }), - (e.RLP = e.utils = e.decode = e.encode = void 0), - (e.encode = r), - (e.decode = s); - const h = Array.from({ length: 256 }, (t, e) => e.toString(16).padStart(2, '0')); - function u(t) { - let e = ''; - for (let r = 0; r < t.length; r++) e += h[t[r]]; - return e; - } - function f(t) { - const e = Number.parseInt(t, 16); - if (Number.isNaN(e)) throw new Error('Invalid byte sequence'); - return e; - } - function c(t) { - if ('string' != typeof t) throw new TypeError('hexToBytes: expected string, got ' + typeof t); - if (t.length % 2) throw new Error('hexToBytes: received invalid unpadded hex'); - const e = new Uint8Array(t.length / 2); - for (let r = 0; r < e.length; r++) { - const i = 2 * r; - e[r] = f(t.slice(i, i + 2)); - } - return e; - } - function l(...t) { - if (1 === t.length) return t[0]; - const e = t.reduce((t, e) => t + e.length, 0), - r = new Uint8Array(e); - for (let e = 0, i = 0; e < t.length; e++) { - const n = t[e]; - r.set(n, i), (i += n.length); - } - return r; - } - function d(t) { - return new TextEncoder().encode(t); - } - function p(t) { - if (t < 0) throw new Error('Invalid integer as argument, must be unsigned!'); - const e = t.toString(16); - return e.length % 2 ? `0${e}` : e; - } - function m(t) { - return t.length >= 2 && '0' === t[0] && 'x' === t[1]; - } - function g(t) { - if (t instanceof Uint8Array) return t; - if ('string' == typeof t) - return m(t) ? c((e = 'string' != typeof (r = t) ? r : m(r) ? r.slice(2) : r).length % 2 ? `0${e}` : e) : d(t); - var e, r; - if ('number' == typeof t || 'bigint' == typeof t) return t ? c(p(t)) : Uint8Array.from([]); - if (null == t) return Uint8Array.from([]); - throw new Error('toBytes: received unsupported type ' + typeof t); - } - (e.utils = { bytesToHex: u, concatBytes: l, hexToBytes: c, utf8ToBytes: d }), (e.RLP = { encode: r, decode: s }); - }, - 8e3: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), - (e.accountBodyToRLP = - e.accountBodyToSlim = - e.accountBodyFromSlim = - e.isZeroAddress = - e.zeroAddress = - e.importPublic = - e.privateToAddress = - e.privateToPublic = - e.publicToAddress = - e.pubToAddress = - e.isValidPublic = - e.isValidPrivate = - e.generateAddress2 = - e.generateAddress = - e.isValidChecksumAddress = - e.toChecksumAddress = - e.isValidAddress = - e.Account = - void 0); - const i = r(5507), - n = r(1906), - o = r(6579), - s = r(2820), - a = r(8289), - h = r(6219), - u = r(8480), - f = r(4712), - c = BigInt(0); - class l { - constructor(t = c, e = c, r = h.KECCAK256_RLP, i = h.KECCAK256_NULL) { - (this.nonce = t), (this.balance = e), (this.storageRoot = r), (this.codeHash = i), this._validate(); - } - static fromAccountData(t) { - const { nonce: e, balance: r, storageRoot: i, codeHash: n } = t; - return new l( - void 0 !== e ? (0, a.bufferToBigInt)((0, a.toBuffer)(e)) : void 0, - void 0 !== r ? (0, a.bufferToBigInt)((0, a.toBuffer)(r)) : void 0, - void 0 !== i ? (0, a.toBuffer)(i) : void 0, - void 0 !== n ? (0, a.toBuffer)(n) : void 0 - ); - } - static fromRlpSerializedAccount(t) { - const e = (0, a.arrToBufArr)(i.RLP.decode(Uint8Array.from(t))); - if (!Array.isArray(e)) throw new Error('Invalid serialized account input. Must be array'); - return this.fromValuesArray(e); - } - static fromValuesArray(t) { - const [e, r, i, n] = t; - return new l((0, a.bufferToBigInt)(e), (0, a.bufferToBigInt)(r), i, n); - } - _validate() { - if (this.nonce < c) throw new Error('nonce must be greater than zero'); - if (this.balance < c) throw new Error('balance must be greater than zero'); - if (32 !== this.storageRoot.length) throw new Error('storageRoot must have a length of 32'); - if (32 !== this.codeHash.length) throw new Error('codeHash must have a length of 32'); - } - raw() { - return [ - (0, a.bigIntToUnpaddedBuffer)(this.nonce), - (0, a.bigIntToUnpaddedBuffer)(this.balance), - this.storageRoot, - this.codeHash, - ]; - } - serialize() { - return Buffer.from(i.RLP.encode((0, a.bufArrToArr)(this.raw()))); - } - isContract() { - return !this.codeHash.equals(h.KECCAK256_NULL); - } - isEmpty() { - return this.balance === c && this.nonce === c && this.codeHash.equals(h.KECCAK256_NULL); - } - } - function d(t) { - const [e, r, i, n] = t; - return [ - e, - r, - 0 === (0, a.arrToBufArr)(i).length ? h.KECCAK256_RLP : i, - 0 === (0, a.arrToBufArr)(n).length ? h.KECCAK256_NULL : n, - ]; - } - (e.Account = l), - (e.isValidAddress = function (t) { - try { - (0, u.assertIsString)(t); - } catch (t) { - return !1; - } - return /^0x[0-9a-fA-F]{40}$/.test(t); - }), - (e.toChecksumAddress = function (t, e) { - (0, u.assertIsHexString)(t); - const r = (0, f.stripHexPrefix)(t).toLowerCase(); - let i = ''; - void 0 !== e && (i = (0, a.bufferToBigInt)((0, a.toBuffer)(e)).toString() + '0x'); - const o = Buffer.from(i + r, 'utf8'), - h = (0, s.bytesToHex)((0, n.keccak256)(o)); - let c = '0x'; - for (let t = 0; t < r.length; t++) parseInt(h[t], 16) >= 8 ? (c += r[t].toUpperCase()) : (c += r[t]); - return c; - }), - (e.isValidChecksumAddress = function (t, r) { - return (0, e.isValidAddress)(t) && (0, e.toChecksumAddress)(t, r) === t; - }), - (e.generateAddress = function (t, e) { - return ( - (0, u.assertIsBuffer)(t), - (0, u.assertIsBuffer)(e), - (0, a.bufferToBigInt)(e) === BigInt(0) - ? Buffer.from((0, n.keccak256)(i.RLP.encode((0, a.bufArrToArr)([t, null])))).slice(-20) - : Buffer.from((0, n.keccak256)(i.RLP.encode((0, a.bufArrToArr)([t, e])))).slice(-20) - ); - }), - (e.generateAddress2 = function (t, e, r) { - if (((0, u.assertIsBuffer)(t), (0, u.assertIsBuffer)(e), (0, u.assertIsBuffer)(r), 20 !== t.length)) - throw new Error('Expected from to be of length 20'); - if (32 !== e.length) throw new Error('Expected salt to be of length 32'); - const i = (0, n.keccak256)(Buffer.concat([Buffer.from('ff', 'hex'), t, e, (0, n.keccak256)(r)])); - return (0, a.toBuffer)(i).slice(-20); - }), - (e.isValidPrivate = function (t) { - return o.secp256k1.utils.isValidPrivateKey(t); - }), - (e.isValidPublic = function (t, e = !1) { - if (((0, u.assertIsBuffer)(t), 64 === t.length)) - try { - return o.secp256k1.ProjectivePoint.fromHex(Buffer.concat([Buffer.from([4]), t])), !0; - } catch (t) { - return !1; - } - if (!e) return !1; - try { - return o.secp256k1.ProjectivePoint.fromHex(t), !0; - } catch (t) { - return !1; - } - }), - (e.pubToAddress = function (t, e = !1) { - if ( - ((0, u.assertIsBuffer)(t), - e && 64 !== t.length && (t = Buffer.from(o.secp256k1.ProjectivePoint.fromHex(t).toRawBytes(!1).slice(1))), - 64 !== t.length) - ) - throw new Error('Expected pubKey to be of length 64'); - return Buffer.from((0, n.keccak256)(t)).slice(-20); - }), - (e.publicToAddress = e.pubToAddress), - (e.privateToPublic = function (t) { - return (0, u.assertIsBuffer)(t), Buffer.from(o.secp256k1.ProjectivePoint.fromPrivateKey(t).toRawBytes(!1).slice(1)); - }), - (e.privateToAddress = function (t) { - return (0, e.publicToAddress)((0, e.privateToPublic)(t)); - }), - (e.importPublic = function (t) { - return ( - (0, u.assertIsBuffer)(t), - 64 !== t.length && (t = Buffer.from(o.secp256k1.ProjectivePoint.fromHex(t).toRawBytes(!1).slice(1))), - t - ); - }), - (e.zeroAddress = function () { - const t = (0, a.zeros)(20); - return (0, a.bufferToHex)(t); - }), - (e.isZeroAddress = function (t) { - try { - (0, u.assertIsString)(t); - } catch (t) { - return !1; - } - return (0, e.zeroAddress)() === t; - }), - (e.accountBodyFromSlim = d); - const p = new Uint8Array(0); - (e.accountBodyToSlim = function (t) { - const [e, r, i, n] = t; - return [e, r, (0, a.arrToBufArr)(i).equals(h.KECCAK256_RLP) ? p : i, (0, a.arrToBufArr)(n).equals(h.KECCAK256_NULL) ? p : n]; - }), - (e.accountBodyToRLP = function (t, e = !0) { - const r = e ? d(t) : t; - return (0, a.arrToBufArr)(i.RLP.encode(r)); - }); - }, - 3415: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), (e.Address = void 0); - const i = r(8e3), - n = r(8289); - class o { - constructor(t) { - if (20 !== t.length) throw new Error('Invalid address length'); - this.buf = t; - } - static zero() { - return new o((0, n.zeros)(20)); - } - static fromString(t) { - if (!(0, i.isValidAddress)(t)) throw new Error('Invalid address'); - return new o((0, n.toBuffer)(t)); - } - static fromPublicKey(t) { - if (!Buffer.isBuffer(t)) throw new Error('Public key should be Buffer'); - const e = (0, i.pubToAddress)(t); - return new o(e); - } - static fromPrivateKey(t) { - if (!Buffer.isBuffer(t)) throw new Error('Private key should be Buffer'); - const e = (0, i.privateToAddress)(t); - return new o(e); - } - static generate(t, e) { - if ('bigint' != typeof e) throw new Error('Expected nonce to be a bigint'); - return new o((0, i.generateAddress)(t.buf, (0, n.bigIntToBuffer)(e))); - } - static generate2(t, e, r) { - if (!Buffer.isBuffer(e)) throw new Error('Expected salt to be a Buffer'); - if (!Buffer.isBuffer(r)) throw new Error('Expected initCode to be a Buffer'); - return new o((0, i.generateAddress2)(t.buf, e, r)); - } - equals(t) { - return this.buf.equals(t.buf); - } - isZero() { - return this.equals(o.zero()); - } - isPrecompileOrSystemAddress() { - const t = (0, n.bufferToBigInt)(this.buf), - e = BigInt(0), - r = BigInt('0xffff'); - return t >= e && t <= r; - } - toString() { - return '0x' + this.buf.toString('hex'); - } - toBuffer() { - return Buffer.from(this.buf); - } - } - e.Address = o; - }, - 7285: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), (e.AsyncEventEmitter = void 0); - const i = r(7187); - class n extends i.EventEmitter { - emit(t, ...e) { - let [r, i] = e; - const n = this; - let o = n._events[t] ?? []; - return ( - void 0 === i && 'function' == typeof r && ((i = r), (r = void 0)), - ('newListener' !== t && 'removeListener' !== t) || ((r = { event: r, fn: i }), (i = void 0)), - (o = Array.isArray(o) ? o : [o]), - (async function (t, e, r) { - let i; - for await (const n of e) - try { - n.length < 2 - ? n.call(t, r) - : await new Promise((e, i) => { - n.call(t, r, t => { - t ? i(t) : e(); - }); - }); - } catch (t) { - i = t; - } - if (i) throw i; - })(n, o.slice(), r) - .then(i) - .catch(i), - n.listenerCount(t) > 0 - ); - } - once(t, e) { - const r = this; - let i; - if ('function' != typeof e) throw new TypeError('listener must be a function'); - return ( - (i = - e.length >= 2 - ? function (n, o) { - r.removeListener(t, i), e(n, o); - } - : function (n) { - r.removeListener(t, i), e(n, i); - }), - r.on(t, i), - r - ); - } - first(t, e) { - let r = this._events[t] ?? []; - if ('function' != typeof e) throw new TypeError('listener must be a function'); - return Array.isArray(r) || (this._events[t] = r = [r]), r.unshift(e), this; - } - before(t, e, r) { - return this.beforeOrAfter(t, e, r); - } - after(t, e, r) { - return this.beforeOrAfter(t, e, r, 'after'); - } - beforeOrAfter(t, e, r, i) { - let n, - o, - s = this._events[t] ?? []; - const a = 'after' === i ? 1 : 0; - if ('function' != typeof r) throw new TypeError('listener must be a function'); - if ('function' != typeof e) throw new TypeError('target must be a function'); - for (Array.isArray(s) || (this._events[t] = s = [s]), o = s.length, n = s.length; n--; ) - if (s[n] === e) { - o = n + a; - break; - } - return s.splice(o, 0, r), this; - } - on(t, e) { - return super.on(t, e); - } - addListener(t, e) { - return super.addListener(t, e); - } - prependListener(t, e) { - return super.prependListener(t, e); - } - prependOnceListener(t, e) { - return super.prependOnceListener(t, e); - } - removeAllListeners(t) { - return super.removeAllListeners(t); - } - removeListener(t, e) { - return super.removeListener(t, e); - } - eventNames() { - return super.eventNames(); - } - listeners(t) { - return super.listeners(t); - } - listenerCount(t) { - return super.listenerCount(t); - } - getMaxListeners() { - return super.getMaxListeners(); - } - setMaxListeners(t) { - return super.setMaxListeners(t); - } - } - e.AsyncEventEmitter = n; - }, - 8289: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), - (e.intToUnpaddedBuffer = - e.bigIntToUnpaddedBuffer = - e.bigIntToHex = - e.bufArrToArr = - e.arrToBufArr = - e.validateNoLeadingZeroes = - e.baToJSON = - e.toUtf8 = - e.short = - e.addHexPrefix = - e.toUnsigned = - e.fromSigned = - e.bufferToInt = - e.bigIntToBuffer = - e.bufferToBigInt = - e.bufferToHex = - e.toBuffer = - e.unpadHexString = - e.unpadArray = - e.unpadBuffer = - e.setLengthRight = - e.setLengthLeft = - e.zeros = - e.intToBuffer = - e.intToHex = - void 0); - const i = r(8480), - n = r(4712); - (e.intToHex = function (t) { - if (!Number.isSafeInteger(t) || t < 0) throw new Error(`Received an invalid integer type: ${t}`); - return `0x${t.toString(16)}`; - }), - (e.intToBuffer = function (t) { - const r = (0, e.intToHex)(t); - return Buffer.from((0, n.padToEven)(r.slice(2)), 'hex'); - }), - (e.zeros = function (t) { - return Buffer.allocUnsafe(t).fill(0); - }); - const o = function (t, r, i) { - const n = (0, e.zeros)(r); - return i ? (t.length < r ? (t.copy(n), n) : t.slice(0, r)) : t.length < r ? (t.copy(n, r - t.length), n) : t.slice(-r); - }; - (e.setLengthLeft = function (t, e) { - return (0, i.assertIsBuffer)(t), o(t, e, !1); - }), - (e.setLengthRight = function (t, e) { - return (0, i.assertIsBuffer)(t), o(t, e, !0); - }); - const s = function (t) { - let e = t[0]; - for (; t.length > 0 && '0' === e.toString(); ) e = (t = t.slice(1))[0]; - return t; - }; - function a(t) { - const r = (0, e.bufferToHex)(t); - return '0x' === r ? BigInt(0) : BigInt(r); - } - function h(t) { - return (0, e.toBuffer)('0x' + t.toString(16)); - } - (e.unpadBuffer = function (t) { - return (0, i.assertIsBuffer)(t), s(t); - }), - (e.unpadArray = function (t) { - return (0, i.assertIsArray)(t), s(t); - }), - (e.unpadHexString = function (t) { - return (0, i.assertIsHexString)(t), (t = (0, n.stripHexPrefix)(t)), '0x' + s(t); - }), - (e.toBuffer = function (t) { - if (null == t) return Buffer.allocUnsafe(0); - if (Buffer.isBuffer(t)) return Buffer.from(t); - if (Array.isArray(t) || t instanceof Uint8Array) return Buffer.from(t); - if ('string' == typeof t) { - if (!(0, n.isHexString)(t)) - throw new Error( - `Cannot convert string to buffer. toBuffer only supports 0x-prefixed hex strings and this string was given: ${t}` - ); - return Buffer.from((0, n.padToEven)((0, n.stripHexPrefix)(t)), 'hex'); - } - if ('number' == typeof t) return (0, e.intToBuffer)(t); - if ('bigint' == typeof t) { - if (t < BigInt(0)) throw new Error(`Cannot convert negative bigint to buffer. Given: ${t}`); - let e = t.toString(16); - return e.length % 2 && (e = '0' + e), Buffer.from(e, 'hex'); - } - if (t.toArray) return Buffer.from(t.toArray()); - if (t.toBuffer) return Buffer.from(t.toBuffer()); - throw new Error('invalid type'); - }), - (e.bufferToHex = function (t) { - return '0x' + (t = (0, e.toBuffer)(t)).toString('hex'); - }), - (e.bufferToBigInt = a), - (e.bigIntToBuffer = h), - (e.bufferToInt = function (t) { - const e = Number(a(t)); - if (!Number.isSafeInteger(e)) throw new Error('Number exceeds 53 bits'); - return e; - }), - (e.fromSigned = function (t) { - return BigInt.asIntN(256, a(t)); - }), - (e.toUnsigned = function (t) { - return h(BigInt.asUintN(256, t)); - }), - (e.addHexPrefix = function (t) { - return 'string' != typeof t || (0, n.isHexPrefixed)(t) ? t : '0x' + t; - }), - (e.short = function (t, e = 50) { - const r = Buffer.isBuffer(t) ? t.toString('hex') : t; - return r.length <= e ? r : r.slice(0, e) + '…'; - }), - (e.toUtf8 = function (t) { - if ((t = (0, n.stripHexPrefix)(t)).length % 2 != 0) throw new Error('Invalid non-even hex string input for toUtf8() provided'); - return Buffer.from(t.replace(/^(00)+|(00)+$/g, ''), 'hex').toString('utf8'); - }), - (e.baToJSON = function (t) { - if (Buffer.isBuffer(t)) return `0x${t.toString('hex')}`; - if (t instanceof Array) { - const r = []; - for (let i = 0; i < t.length; i++) r.push((0, e.baToJSON)(t[i])); - return r; - } - }), - (e.validateNoLeadingZeroes = function (t) { - for (const [e, r] of Object.entries(t)) - if (void 0 !== r && r.length > 0 && 0 === r[0]) - throw new Error(`${e} cannot have leading zeroes, received: ${r.toString('hex')}`); - }), - (e.arrToBufArr = function t(e) { - return Array.isArray(e) ? e.map(e => t(e)) : Buffer.from(e); - }), - (e.bufArrToArr = function t(e) { - return Array.isArray(e) ? e.map(e => t(e)) : Uint8Array.from(e ?? []); - }), - (e.bigIntToHex = t => '0x' + t.toString(16)), - (e.bigIntToUnpaddedBuffer = function (t) { - return (0, e.unpadBuffer)(h(t)); - }), - (e.intToUnpaddedBuffer = function (t) { - return (0, e.unpadBuffer)((0, e.intToBuffer)(t)); - }); - }, - 6219: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), - (e.MAX_WITHDRAWALS_PER_PAYLOAD = - e.RLP_EMPTY_STRING = - e.KECCAK256_RLP = - e.KECCAK256_RLP_S = - e.KECCAK256_RLP_ARRAY = - e.KECCAK256_RLP_ARRAY_S = - e.KECCAK256_NULL = - e.KECCAK256_NULL_S = - e.TWO_POW256 = - e.SECP256K1_ORDER_DIV_2 = - e.SECP256K1_ORDER = - e.MAX_INTEGER_BIGINT = - e.MAX_INTEGER = - e.MAX_UINT64 = - void 0); - const i = r(8764), - n = r(6579); - (e.MAX_UINT64 = BigInt('0xffffffffffffffff')), - (e.MAX_INTEGER = BigInt('0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff')), - (e.MAX_INTEGER_BIGINT = BigInt('115792089237316195423570985008687907853269984665640564039457584007913129639935')), - (e.SECP256K1_ORDER = n.secp256k1.CURVE.n), - (e.SECP256K1_ORDER_DIV_2 = n.secp256k1.CURVE.n / BigInt(2)), - (e.TWO_POW256 = BigInt('0x10000000000000000000000000000000000000000000000000000000000000000')), - (e.KECCAK256_NULL_S = 'c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470'), - (e.KECCAK256_NULL = i.Buffer.from(e.KECCAK256_NULL_S, 'hex')), - (e.KECCAK256_RLP_ARRAY_S = '1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347'), - (e.KECCAK256_RLP_ARRAY = i.Buffer.from(e.KECCAK256_RLP_ARRAY_S, 'hex')), - (e.KECCAK256_RLP_S = '56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421'), - (e.KECCAK256_RLP = i.Buffer.from(e.KECCAK256_RLP_S, 'hex')), - (e.RLP_EMPTY_STRING = i.Buffer.from([128])), - (e.MAX_WITHDRAWALS_PER_PAYLOAD = 16); - }, - 3791: (t, e) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), - (e.compactBytesToNibbles = e.bytesToNibbles = e.nibblesToCompactBytes = e.nibblesToBytes = e.hasTerminator = void 0), - (e.hasTerminator = t => t.length > 0 && 16 === t[t.length - 1]), - (e.nibblesToBytes = (t, e) => { - for (let r = 0, i = 0; i < t.length; r += 1, i += 2) e[r] = (t[i] << 4) | t[i + 1]; - }), - (e.nibblesToCompactBytes = t => { - let r = 0; - (0, e.hasTerminator)(t) && ((r = 1), (t = t.subarray(0, t.length - 1))); - const i = new Uint8Array(t.length / 2 + 1); - return ( - (i[0] = r << 5), - 1 == (1 & t.length) && ((i[0] |= 16), (i[0] |= t[0]), (t = t.subarray(1))), - (0, e.nibblesToBytes)(t, i.subarray(1)), - i - ); - }), - (e.bytesToNibbles = t => { - const e = 2 * t.length + 1, - r = new Uint8Array(e); - for (let e = 0; e < t.length; e++) { - const i = t[e]; - (r[2 * e] = i / 16), (r[2 * e + 1] = i % 16); - } - return (r[e - 1] = 16), r; - }), - (e.compactBytesToNibbles = t => { - if (0 === t.length) return t; - let r = (0, e.bytesToNibbles)(t); - r[0] < 2 && (r = r.subarray(0, r.length - 1)); - const i = 2 - (1 & r[0]); - return r.subarray(i); - }); - }, - 8480: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), - (e.assertIsString = e.assertIsArray = e.assertIsBuffer = e.assertIsHexString = void 0); - const i = r(4712); - (e.assertIsHexString = function (t) { - if (!(0, i.isHexString)(t)) throw new Error(`This method only supports 0x-prefixed hex strings but input was: ${t}`); - }), - (e.assertIsBuffer = function (t) { - if (!Buffer.isBuffer(t)) throw new Error(`This method only supports Buffer but input was: ${t}`); - }), - (e.assertIsArray = function (t) { - if (!Array.isArray(t)) throw new Error(`This method only supports number arrays but input was: ${t}`); - }), - (e.assertIsString = function (t) { - if ('string' != typeof t) throw new Error(`This method only supports strings but input was: ${t}`); - }); - }, - 2730: function (t, e, r) { - 'use strict'; - var i = - (this && this.__createBinding) || - (Object.create - ? function (t, e, r, i) { - void 0 === i && (i = r); - var n = Object.getOwnPropertyDescriptor(e, r); - (n && !('get' in n ? !e.__esModule : n.writable || n.configurable)) || - (n = { - enumerable: !0, - get: function () { - return e[r]; - }, - }), - Object.defineProperty(t, i, n); - } - : function (t, e, r, i) { - void 0 === i && (i = r), (t[i] = e[r]); - }), - n = - (this && this.__exportStar) || - function (t, e) { - for (var r in t) 'default' === r || Object.prototype.hasOwnProperty.call(e, r) || i(e, t, r); - }; - Object.defineProperty(e, '__esModule', { value: !0 }), - (e.toAscii = - e.stripHexPrefix = - e.padToEven = - e.isHexString = - e.isHexPrefixed = - e.getKeys = - e.getBinarySize = - e.fromUtf8 = - e.fromAscii = - e.arrayContainsArray = - void 0), - n(r(6219), e), - n(r(4554), e), - n(r(8e3), e), - n(r(3415), e), - n(r(4683), e), - n(r(5026), e), - n(r(8289), e), - n(r(1200), e), - n(r(3791), e), - n(r(7285), e); - var o = r(4712); - Object.defineProperty(e, 'arrayContainsArray', { - enumerable: !0, - get: function () { - return o.arrayContainsArray; - }, - }), - Object.defineProperty(e, 'fromAscii', { - enumerable: !0, - get: function () { - return o.fromAscii; - }, - }), - Object.defineProperty(e, 'fromUtf8', { - enumerable: !0, - get: function () { - return o.fromUtf8; - }, - }), - Object.defineProperty(e, 'getBinarySize', { - enumerable: !0, - get: function () { - return o.getBinarySize; - }, - }), - Object.defineProperty(e, 'getKeys', { - enumerable: !0, - get: function () { - return o.getKeys; - }, - }), - Object.defineProperty(e, 'isHexPrefixed', { - enumerable: !0, - get: function () { - return o.isHexPrefixed; - }, - }), - Object.defineProperty(e, 'isHexString', { - enumerable: !0, - get: function () { - return o.isHexString; - }, - }), - Object.defineProperty(e, 'padToEven', { - enumerable: !0, - get: function () { - return o.padToEven; - }, - }), - Object.defineProperty(e, 'stripHexPrefix', { - enumerable: !0, - get: function () { - return o.stripHexPrefix; - }, - }), - Object.defineProperty(e, 'toAscii', { - enumerable: !0, - get: function () { - return o.toAscii; - }, - }), - n(r(3543), e), - n(r(438), e); - }, - 4712: (t, e) => { - 'use strict'; - function r(t) { - if ('string' != typeof t) throw new Error("[isHexPrefixed] input must be type 'string', received type " + typeof t); - return '0' === t[0] && 'x' === t[1]; - } - function i(t) { - let e = t; - if ('string' != typeof e) throw new Error("[padToEven] value must be type 'string', received " + typeof e); - return e.length % 2 && (e = `0${e}`), e; - } - Object.defineProperty(e, '__esModule', { value: !0 }), - (e.isHexString = - e.getKeys = - e.fromAscii = - e.fromUtf8 = - e.toAscii = - e.arrayContainsArray = - e.getBinarySize = - e.padToEven = - e.stripHexPrefix = - e.isHexPrefixed = - void 0), - (e.isHexPrefixed = r), - (e.stripHexPrefix = t => { - if ('string' != typeof t) throw new Error("[stripHexPrefix] input must be type 'string', received " + typeof t); - return r(t) ? t.slice(2) : t; - }), - (e.padToEven = i), - (e.getBinarySize = function (t) { - if ('string' != typeof t) throw new Error("[getBinarySize] method requires input type 'string', received " + typeof t); - return Buffer.byteLength(t, 'utf8'); - }), - (e.arrayContainsArray = function (t, e, r) { - if (!0 !== Array.isArray(t)) - throw new Error(`[arrayContainsArray] method requires input 'superset' to be an array, got type '${typeof t}'`); - if (!0 !== Array.isArray(e)) - throw new Error(`[arrayContainsArray] method requires input 'subset' to be an array, got type '${typeof e}'`); - return e[!0 === r ? 'some' : 'every'](e => t.indexOf(e) >= 0); - }), - (e.toAscii = function (t) { - let e = '', - r = 0; - const i = t.length; - for ('0x' === t.substring(0, 2) && (r = 2); r < i; r += 2) { - const i = parseInt(t.substr(r, 2), 16); - e += String.fromCharCode(i); - } - return e; - }), - (e.fromUtf8 = function (t) { - return `0x${i(Buffer.from(t, 'utf8').toString('hex')).replace(/^0+|0+$/g, '')}`; - }), - (e.fromAscii = function (t) { - let e = ''; - for (let r = 0; r < t.length; r++) { - const i = t.charCodeAt(r).toString(16); - e += i.length < 2 ? `0${i}` : i; - } - return `0x${e}`; - }), - (e.getKeys = function (t, e, r) { - if (!Array.isArray(t)) throw new Error("[getKeys] method expects input 'params' to be an array, got " + typeof t); - if ('string' != typeof e) throw new Error("[getKeys] method expects input 'key' to be type 'string', got " + typeof t); - const i = []; - for (let n = 0; n < t.length; n++) { - let o = t[n][e]; - if (!0 !== r || o) { - if ('string' != typeof o) throw new Error("invalid abi - expected type 'string', received " + typeof o); - } else o = ''; - i.push(o); - } - return i; - }), - (e.isHexString = function (t, e) { - return !('string' != typeof t || !t.match(/^0x[0-9A-Fa-f]*$/) || (void 0 !== e && e > 0 && t.length !== 2 + 2 * e)); - }); - }, - 3543: (t, e) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), - (e.Lock = void 0), - (e.Lock = class { - constructor() { - (this.permits = 1), (this.promiseResolverQueue = []); - } - async acquire() { - return this.permits > 0 ? ((this.permits -= 1), Promise.resolve(!0)) : new Promise(t => this.promiseResolverQueue.push(t)); - } - release() { - if (((this.permits += 1), this.permits > 1 && this.promiseResolverQueue.length > 0)) - console.warn('Lock.permits should never be > 0 when there is someone waiting.'); - else if (1 === this.permits && this.promiseResolverQueue.length > 0) { - this.permits -= 1; - const t = this.promiseResolverQueue.shift(); - t && t(!0); - } - } - }); - }, - 438: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), (e.getProvider = e.fetchFromProvider = void 0); - const i = r(4898); - (e.fetchFromProvider = async (t, e) => - ( - await (0, i.default)(t, { - headers: { 'content-type': 'application/json' }, - type: 'json', - data: { method: e.method, params: e.params, jsonrpc: '2.0', id: 1 }, - }) - ).result), - (e.getProvider = t => { - if ('string' == typeof t) return t; - if (void 0 !== t?.connection?.url) return t.connection.url; - throw new Error('Must provide valid provider URL or Web3Provider'); - }); - }, - 5026: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), - (e.hashPersonalMessage = e.isValidSignature = e.fromRpcSig = e.toCompactSig = e.toRpcSig = e.ecrecover = e.ecsign = void 0); - const i = r(1906), - n = r(6579), - o = r(8289), - s = r(6219), - a = r(8480); - function h(t, e) { - return t === BigInt(0) || t === BigInt(1) ? t : void 0 === e ? t - BigInt(27) : t - (e * BigInt(2) + BigInt(35)); - } - function u(t) { - return t === BigInt(0) || t === BigInt(1); - } - (e.ecsign = function (t, e, r) { - const i = n.secp256k1.sign(t, e), - o = i.toCompactRawBytes(); - return { - r: Buffer.from(o.slice(0, 32)), - s: Buffer.from(o.slice(32, 64)), - v: void 0 === r ? BigInt(i.recovery + 27) : BigInt(i.recovery + 35) + BigInt(r) * BigInt(2), - }; - }), - (e.ecrecover = function (t, e, r, i, s) { - const a = Buffer.concat([(0, o.setLengthLeft)(r, 32), (0, o.setLengthLeft)(i, 32)], 64), - f = h(e, s); - if (!u(f)) throw new Error('Invalid signature v value'); - const c = n.secp256k1.Signature.fromCompact(a).addRecoveryBit(Number(f)).recoverPublicKey(t); - return Buffer.from(c.toRawBytes(!1).slice(1)); - }), - (e.toRpcSig = function (t, e, r, i) { - if (!u(h(t, i))) throw new Error('Invalid signature v value'); - return (0, o.bufferToHex)(Buffer.concat([(0, o.setLengthLeft)(e, 32), (0, o.setLengthLeft)(r, 32), (0, o.toBuffer)(t)])); - }), - (e.toCompactSig = function (t, e, r, i) { - if (!u(h(t, i))) throw new Error('Invalid signature v value'); - let n = r; - return ( - ((t > BigInt(28) && t % BigInt(2) === BigInt(1)) || t === BigInt(1) || t === BigInt(28)) && - ((n = Buffer.from(r)), (n[0] |= 128)), - (0, o.bufferToHex)(Buffer.concat([(0, o.setLengthLeft)(e, 32), (0, o.setLengthLeft)(n, 32)])) - ); - }), - (e.fromRpcSig = function (t) { - const e = (0, o.toBuffer)(t); - let r, i, n; - if (e.length >= 65) (r = e.slice(0, 32)), (i = e.slice(32, 64)), (n = (0, o.bufferToBigInt)(e.slice(64))); - else { - if (64 !== e.length) throw new Error('Invalid signature length'); - (r = e.slice(0, 32)), (i = e.slice(32, 64)), (n = BigInt((0, o.bufferToInt)(e.slice(32, 33)) >> 7)), (i[0] &= 127); - } - return n < 27 && (n += BigInt(27)), { v: n, r, s: i }; - }), - (e.isValidSignature = function (t, e, r, i = !0, n) { - if (32 !== e.length || 32 !== r.length) return !1; - if (!u(h(t, n))) return !1; - const a = (0, o.bufferToBigInt)(e), - f = (0, o.bufferToBigInt)(r); - return !( - a === BigInt(0) || - a >= s.SECP256K1_ORDER || - f === BigInt(0) || - f >= s.SECP256K1_ORDER || - (i && f >= s.SECP256K1_ORDER_DIV_2) - ); - }), - (e.hashPersonalMessage = function (t) { - (0, a.assertIsBuffer)(t); - const e = Buffer.from(`Ethereum Signed Message:\n${t.length}`, 'utf-8'); - return Buffer.from((0, i.keccak256)(Buffer.concat([e, t]))); - }); - }, - 1200: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), (e.toType = e.TypeOutput = void 0); - const i = r(8289), - n = r(4712); - var o; - !(function (t) { - (t[(t.Number = 0)] = 'Number'), - (t[(t.BigInt = 1)] = 'BigInt'), - (t[(t.Buffer = 2)] = 'Buffer'), - (t[(t.PrefixedHexString = 3)] = 'PrefixedHexString'); - })((o = e.TypeOutput || (e.TypeOutput = {}))), - (e.toType = function (t, e) { - if (null === t) return null; - if (void 0 === t) return; - if ('string' == typeof t && !(0, n.isHexString)(t)) throw new Error(`A string must be provided with a 0x-prefix, given: ${t}`); - if ('number' == typeof t && !Number.isSafeInteger(t)) - throw new Error('The provided number is greater than MAX_SAFE_INTEGER (please use an alternative input type)'); - const r = (0, i.toBuffer)(t); - switch (e) { - case o.Buffer: - return r; - case o.BigInt: - return (0, i.bufferToBigInt)(r); - case o.Number: { - const t = (0, i.bufferToBigInt)(r); - if (t > BigInt(Number.MAX_SAFE_INTEGER)) - throw new Error('The provided number is greater than MAX_SAFE_INTEGER (please use an alternative output type)'); - return Number(t); - } - case o.PrefixedHexString: - return (0, i.bufferToHex)(r); - default: - throw new Error('unknown outputType'); - } - }); - }, - 4554: (t, e) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), (e.GWEI_TO_WEI = void 0), (e.GWEI_TO_WEI = BigInt(1e9)); - }, - 4683: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), (e.Withdrawal = void 0); - const i = r(3415), - n = r(8289), - o = r(1200); - class s { - constructor(t, e, r, i) { - (this.index = t), (this.validatorIndex = e), (this.address = r), (this.amount = i); - } - static fromWithdrawalData(t) { - const { index: e, validatorIndex: r, address: n, amount: a } = t, - h = (0, o.toType)(e, o.TypeOutput.BigInt), - u = (0, o.toType)(r, o.TypeOutput.BigInt), - f = new i.Address((0, o.toType)(n, o.TypeOutput.Buffer)), - c = (0, o.toType)(a, o.TypeOutput.BigInt); - return new s(h, u, f, c); - } - static fromValuesArray(t) { - if (4 !== t.length) throw Error(`Invalid withdrawalArray length expected=4 actual=${t.length}`); - const [e, r, i, n] = t; - return s.fromWithdrawalData({ index: e, validatorIndex: r, address: i, amount: n }); - } - static toBufferArray(t) { - const { index: e, validatorIndex: r, address: n, amount: s } = t, - a = (0, o.toType)(e, o.TypeOutput.BigInt) === BigInt(0) ? Buffer.alloc(0) : (0, o.toType)(e, o.TypeOutput.Buffer), - h = (0, o.toType)(r, o.TypeOutput.BigInt) === BigInt(0) ? Buffer.alloc(0) : (0, o.toType)(r, o.TypeOutput.Buffer); - let u; - return ( - (u = n instanceof i.Address ? n.buf : (0, o.toType)(n, o.TypeOutput.Buffer)), - [a, h, u, (0, o.toType)(s, o.TypeOutput.BigInt) === BigInt(0) ? Buffer.alloc(0) : (0, o.toType)(s, o.TypeOutput.Buffer)] - ); - } - raw() { - return s.toBufferArray(this); - } - toValue() { - return { index: this.index, validatorIndex: this.validatorIndex, address: this.address.buf, amount: this.amount }; - } - toJSON() { - return { - index: (0, n.bigIntToHex)(this.index), - validatorIndex: (0, n.bigIntToHex)(this.validatorIndex), - address: '0x' + this.address.buf.toString('hex'), - amount: (0, n.bigIntToHex)(this.amount), - }; - } - } - e.Withdrawal = s; - }, - 1614: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), (e.createCurve = e.getHash = void 0); - const i = r(9569), - n = r(8089), - o = r(7602); - function s(t) { - return { hash: t, hmac: (e, ...r) => (0, i.hmac)(t, e, (0, n.concatBytes)(...r)), randomBytes: n.randomBytes }; - } - (e.getHash = s), - (e.createCurve = function (t, e) { - const r = e => (0, o.weierstrass)({ ...t, ...s(e) }); - return Object.freeze({ ...r(e), create: r }); - }); - }, - 6861: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), (e.validateBasic = e.wNAF = void 0); - const i = r(3818), - n = r(9309), - o = BigInt(0), - s = BigInt(1); - (e.wNAF = function (t, e) { - const r = (t, e) => { - const r = e.negate(); - return t ? r : e; - }, - i = t => ({ windows: Math.ceil(e / t) + 1, windowSize: 2 ** (t - 1) }); - return { - constTimeNegate: r, - unsafeLadder(e, r) { - let i = t.ZERO, - n = e; - for (; r > o; ) r & s && (i = i.add(n)), (n = n.double()), (r >>= s); - return i; - }, - precomputeWindow(t, e) { - const { windows: r, windowSize: n } = i(e), - o = []; - let s = t, - a = s; - for (let t = 0; t < r; t++) { - (a = s), o.push(a); - for (let t = 1; t < n; t++) (a = a.add(s)), o.push(a); - s = a.double(); - } - return o; - }, - wNAF(e, n, o) { - const { windows: a, windowSize: h } = i(e); - let u = t.ZERO, - f = t.BASE; - const c = BigInt(2 ** e - 1), - l = 2 ** e, - d = BigInt(e); - for (let t = 0; t < a; t++) { - const e = t * h; - let i = Number(o & c); - (o >>= d), i > h && ((i -= l), (o += s)); - const a = e, - p = e + Math.abs(i) - 1, - m = t % 2 != 0, - g = i < 0; - 0 === i ? (f = f.add(r(m, n[a]))) : (u = u.add(r(g, n[p]))); - } - return { p: u, f }; - }, - wNAFCached(t, e, r, i) { - const n = t._WINDOW_SIZE || 1; - let o = e.get(t); - return o || ((o = this.precomputeWindow(t, n)), 1 !== n && e.set(t, i(o))), this.wNAF(n, o, r); - }, - }; - }), - (e.validateBasic = function (t) { - return ( - (0, i.validateField)(t.Fp), - (0, n.validateObject)( - t, - { n: 'bigint', h: 'bigint', Gx: 'field', Gy: 'field' }, - { nBitLength: 'isSafeInteger', nByteLength: 'isSafeInteger' } - ), - Object.freeze({ ...(0, i.nLength)(t.n, t.nBitLength), ...t, p: t.Fp.ORDER }) - ); - }); - }, - 5984: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), - (e.createHasher = e.isogenyMap = e.hash_to_field = e.expand_message_xof = e.expand_message_xmd = void 0); - const i = r(3818), - n = r(9309), - o = n.bytesToNumberBE; - function s(t, e) { - if (t < 0 || t >= 1 << (8 * e)) throw new Error(`bad I2OSP call: value=${t} length=${e}`); - const r = Array.from({ length: e }).fill(0); - for (let i = e - 1; i >= 0; i--) (r[i] = 255 & t), (t >>>= 8); - return new Uint8Array(r); - } - function a(t, e) { - const r = new Uint8Array(t.length); - for (let i = 0; i < t.length; i++) r[i] = t[i] ^ e[i]; - return r; - } - function h(t) { - if (!(0, n.isBytes)(t)) throw new Error('Uint8Array expected'); - } - function u(t) { - if (!Number.isSafeInteger(t)) throw new Error('number expected'); - } - function f(t, e, r, i) { - h(t), h(e), u(r), e.length > 255 && (e = i((0, n.concatBytes)((0, n.utf8ToBytes)('H2C-OVERSIZE-DST-'), e))); - const { outputLen: o, blockLen: f } = i, - c = Math.ceil(r / o); - if (c > 255) throw new Error('Invalid xmd length'); - const l = (0, n.concatBytes)(e, s(e.length, 1)), - d = s(0, f), - p = s(r, 2), - m = new Array(c), - g = i((0, n.concatBytes)(d, t, p, s(0, 1), l)); - m[0] = i((0, n.concatBytes)(g, s(1, 1), l)); - for (let t = 1; t <= c; t++) { - const e = [a(g, m[t - 1]), s(t + 1, 1), l]; - m[t] = i((0, n.concatBytes)(...e)); - } - return (0, n.concatBytes)(...m).slice(0, r); - } - function c(t, e, r, i, o) { - if ((h(t), h(e), u(r), e.length > 255)) { - const t = Math.ceil((2 * i) / 8); - e = o - .create({ dkLen: t }) - .update((0, n.utf8ToBytes)('H2C-OVERSIZE-DST-')) - .update(e) - .digest(); - } - if (r > 65535 || e.length > 255) throw new Error('expand_message_xof: invalid lenInBytes'); - return o.create({ dkLen: r }).update(t).update(s(r, 2)).update(e).update(s(e.length, 1)).digest(); - } - function l(t, e, r) { - (0, n.validateObject)(r, { DST: 'stringOrUint8Array', p: 'bigint', m: 'isSafeInteger', k: 'isSafeInteger', hash: 'hash' }); - const { p: s, k: a, m: l, hash: d, expand: p, DST: m } = r; - h(t), u(e); - const g = (function (t) { - if ((0, n.isBytes)(t)) return t; - if ('string' == typeof t) return (0, n.utf8ToBytes)(t); - throw new Error('DST must be Uint8Array or string'); - })(m), - b = s.toString(2).length, - y = Math.ceil((b + a) / 8), - v = e * l * y; - let w; - if ('xmd' === p) w = f(t, g, v, d); - else if ('xof' === p) w = c(t, g, v, a, d); - else { - if ('_internal_pass' !== p) throw new Error('expand must be "xmd" or "xof"'); - w = t; - } - const _ = new Array(e); - for (let t = 0; t < e; t++) { - const e = new Array(l); - for (let r = 0; r < l; r++) { - const n = y * (r + t * l), - a = w.subarray(n, n + y); - e[r] = (0, i.mod)(o(a), s); - } - _[t] = e; - } - return _; - } - (e.expand_message_xmd = f), - (e.expand_message_xof = c), - (e.hash_to_field = l), - (e.isogenyMap = function (t, e) { - const r = e.map(t => Array.from(t).reverse()); - return (e, i) => { - const [n, o, s, a] = r.map(r => r.reduce((r, i) => t.add(t.mul(r, e), i))); - return (e = t.div(n, o)), (i = t.mul(i, t.div(s, a))), { x: e, y: i }; - }; - }), - (e.createHasher = function (t, e, r) { - if ('function' != typeof e) throw new Error('mapToCurve() must be defined'); - return { - hashToCurve(i, n) { - const o = l(i, 2, { ...r, DST: r.DST, ...n }), - s = t.fromAffine(e(o[0])), - a = t.fromAffine(e(o[1])), - h = s.add(a).clearCofactor(); - return h.assertValidity(), h; - }, - encodeToCurve(i, n) { - const o = l(i, 1, { ...r, DST: r.encodeDST, ...n }), - s = t.fromAffine(e(o[0])).clearCofactor(); - return s.assertValidity(), s; - }, - }; - }); - }, - 3818: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), - (e.mapHashToField = - e.getMinHashLength = - e.getFieldBytesLength = - e.hashToPrivateScalar = - e.FpSqrtEven = - e.FpSqrtOdd = - e.Field = - e.nLength = - e.FpIsSquare = - e.FpDiv = - e.FpInvertBatch = - e.FpPow = - e.validateField = - e.isNegativeLE = - e.FpSqrt = - e.tonelliShanks = - e.invert = - e.pow2 = - e.pow = - e.mod = - void 0); - const i = r(9309), - n = BigInt(0), - o = BigInt(1), - s = BigInt(2), - a = BigInt(3), - h = BigInt(4), - u = BigInt(5), - f = BigInt(8); - function c(t, e) { - const r = t % e; - return r >= n ? r : e + r; - } - function l(t, e, r) { - if (r <= n || e < n) throw new Error('Expected power/modulo > 0'); - if (r === o) return n; - let i = o; - for (; e > n; ) e & o && (i = (i * t) % r), (t = (t * t) % r), (e >>= o); - return i; - } - function d(t, e) { - if (t === n || e <= n) throw new Error(`invert: expected positive integers, got n=${t} mod=${e}`); - let r = c(t, e), - i = e, - s = n, - a = o, - h = o, - u = n; - for (; r !== n; ) { - const t = i / r, - e = i % r, - n = s - h * t, - o = a - u * t; - (i = r), (r = e), (s = h), (a = u), (h = n), (u = o); - } - if (i !== o) throw new Error('invert: does not exist'); - return c(s, e); - } - function p(t) { - const e = (t - o) / s; - let r, i, a; - for (r = t - o, i = 0; r % s === n; r /= s, i++); - for (a = s; a < t && l(a, e, t) !== t - o; a++); - if (1 === i) { - const e = (t + o) / h; - return function (t, r) { - const i = t.pow(r, e); - if (!t.eql(t.sqr(i), r)) throw new Error('Cannot find square root'); - return i; - }; - } - const u = (r + o) / s; - return function (t, n) { - if (t.pow(n, e) === t.neg(t.ONE)) throw new Error('Cannot find square root'); - let s = i, - h = t.pow(t.mul(t.ONE, a), r), - f = t.pow(n, u), - c = t.pow(n, r); - for (; !t.eql(c, t.ONE); ) { - if (t.eql(c, t.ZERO)) return t.ZERO; - let e = 1; - for (let r = t.sqr(c); e < s && !t.eql(r, t.ONE); e++) r = t.sqr(r); - const r = t.pow(h, o << BigInt(s - e - 1)); - (h = t.sqr(r)), (f = t.mul(f, r)), (c = t.mul(c, h)), (s = e); - } - return f; - }; - } - function m(t) { - if (t % h === a) { - const e = (t + o) / h; - return function (t, r) { - const i = t.pow(r, e); - if (!t.eql(t.sqr(i), r)) throw new Error('Cannot find square root'); - return i; - }; - } - if (t % f === u) { - const e = (t - u) / f; - return function (t, r) { - const i = t.mul(r, s), - n = t.pow(i, e), - o = t.mul(r, n), - a = t.mul(t.mul(o, s), n), - h = t.mul(o, t.sub(a, t.ONE)); - if (!t.eql(t.sqr(h), r)) throw new Error('Cannot find square root'); - return h; - }; - } - return p(t); - } - BigInt(9), - BigInt(16), - (e.mod = c), - (e.pow = l), - (e.pow2 = function (t, e, r) { - let i = t; - for (; e-- > n; ) (i *= i), (i %= r); - return i; - }), - (e.invert = d), - (e.tonelliShanks = p), - (e.FpSqrt = m), - (e.isNegativeLE = (t, e) => (c(t, e) & o) === o); - const g = [ - 'create', - 'isValid', - 'is0', - 'neg', - 'inv', - 'sqrt', - 'sqr', - 'eql', - 'add', - 'sub', - 'mul', - 'pow', - 'div', - 'addN', - 'subN', - 'mulN', - 'sqrN', - ]; - function b(t, e, r) { - if (r < n) throw new Error('Expected power > 0'); - if (r === n) return t.ONE; - if (r === o) return e; - let i = t.ONE, - s = e; - for (; r > n; ) r & o && (i = t.mul(i, s)), (s = t.sqr(s)), (r >>= o); - return i; - } - function y(t, e) { - const r = new Array(e.length), - i = e.reduce((e, i, n) => (t.is0(i) ? e : ((r[n] = e), t.mul(e, i))), t.ONE), - n = t.inv(i); - return e.reduceRight((e, i, n) => (t.is0(i) ? e : ((r[n] = t.mul(e, r[n])), t.mul(e, i))), n), r; - } - function v(t, e) { - const r = void 0 !== e ? e : t.toString(2).length; - return { nBitLength: r, nByteLength: Math.ceil(r / 8) }; - } - function w(t) { - if ('bigint' != typeof t) throw new Error('field order must be bigint'); - const e = t.toString(2).length; - return Math.ceil(e / 8); - } - function _(t) { - const e = w(t); - return e + Math.ceil(e / 2); - } - (e.validateField = function (t) { - const e = g.reduce((t, e) => ((t[e] = 'function'), t), { - ORDER: 'bigint', - MASK: 'bigint', - BYTES: 'isSafeInteger', - BITS: 'isSafeInteger', - }); - return (0, i.validateObject)(t, e); - }), - (e.FpPow = b), - (e.FpInvertBatch = y), - (e.FpDiv = function (t, e, r) { - return t.mul(e, 'bigint' == typeof r ? d(r, t.ORDER) : t.inv(r)); - }), - (e.FpIsSquare = function (t) { - const e = (t.ORDER - o) / s; - return r => { - const i = t.pow(r, e); - return t.eql(i, t.ZERO) || t.eql(i, t.ONE); - }; - }), - (e.nLength = v), - (e.Field = function (t, e, r = !1, s = {}) { - if (t <= n) throw new Error(`Expected Field ORDER > 0, got ${t}`); - const { nBitLength: a, nByteLength: h } = v(t, e); - if (h > 2048) throw new Error('Field lengths over 2048 bytes are not supported'); - const u = m(t), - f = Object.freeze({ - ORDER: t, - BITS: a, - BYTES: h, - MASK: (0, i.bitMask)(a), - ZERO: n, - ONE: o, - create: e => c(e, t), - isValid: e => { - if ('bigint' != typeof e) throw new Error('Invalid field element: expected bigint, got ' + typeof e); - return n <= e && e < t; - }, - is0: t => t === n, - isOdd: t => (t & o) === o, - neg: e => c(-e, t), - eql: (t, e) => t === e, - sqr: e => c(e * e, t), - add: (e, r) => c(e + r, t), - sub: (e, r) => c(e - r, t), - mul: (e, r) => c(e * r, t), - pow: (t, e) => b(f, t, e), - div: (e, r) => c(e * d(r, t), t), - sqrN: t => t * t, - addN: (t, e) => t + e, - subN: (t, e) => t - e, - mulN: (t, e) => t * e, - inv: e => d(e, t), - sqrt: s.sqrt || (t => u(f, t)), - invertBatch: t => y(f, t), - cmov: (t, e, r) => (r ? e : t), - toBytes: t => (r ? (0, i.numberToBytesLE)(t, h) : (0, i.numberToBytesBE)(t, h)), - fromBytes: t => { - if (t.length !== h) throw new Error(`Fp.fromBytes: expected ${h}, got ${t.length}`); - return r ? (0, i.bytesToNumberLE)(t) : (0, i.bytesToNumberBE)(t); - }, - }); - return Object.freeze(f); - }), - (e.FpSqrtOdd = function (t, e) { - if (!t.isOdd) throw new Error("Field doesn't have isOdd"); - const r = t.sqrt(e); - return t.isOdd(r) ? r : t.neg(r); - }), - (e.FpSqrtEven = function (t, e) { - if (!t.isOdd) throw new Error("Field doesn't have isOdd"); - const r = t.sqrt(e); - return t.isOdd(r) ? t.neg(r) : r; - }), - (e.hashToPrivateScalar = function (t, e, r = !1) { - const n = (t = (0, i.ensureBytes)('privateHash', t)).length, - s = v(e).nByteLength + 8; - if (s < 24 || n < s || n > 1024) throw new Error(`hashToPrivateScalar: expected ${s}-1024 bytes of input, got ${n}`); - return c(r ? (0, i.bytesToNumberLE)(t) : (0, i.bytesToNumberBE)(t), e - o) + o; - }), - (e.getFieldBytesLength = w), - (e.getMinHashLength = _), - (e.mapHashToField = function (t, e, r = !1) { - const n = t.length, - s = w(e), - a = _(e); - if (n < 16 || n < a || n > 1024) throw new Error(`expected ${a}-1024 bytes of input, got ${n}`); - const h = c(r ? (0, i.bytesToNumberBE)(t) : (0, i.bytesToNumberLE)(t), e - o) + o; - return r ? (0, i.numberToBytesLE)(h, s) : (0, i.numberToBytesBE)(h, s); - }); - }, - 9309: (t, e) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), - (e.validateObject = - e.createHmacDrbg = - e.bitMask = - e.bitSet = - e.bitGet = - e.bitLen = - e.utf8ToBytes = - e.equalBytes = - e.concatBytes = - e.ensureBytes = - e.numberToVarBytesBE = - e.numberToBytesLE = - e.numberToBytesBE = - e.bytesToNumberLE = - e.bytesToNumberBE = - e.hexToBytes = - e.hexToNumber = - e.numberToHexUnpadded = - e.bytesToHex = - e.isBytes = - void 0); - const r = BigInt(0), - i = BigInt(1), - n = BigInt(2); - function o(t) { - return t instanceof Uint8Array || (null != t && 'object' == typeof t && 'Uint8Array' === t.constructor.name); - } - e.isBytes = o; - const s = Array.from({ length: 256 }, (t, e) => e.toString(16).padStart(2, '0')); - function a(t) { - if (!o(t)) throw new Error('Uint8Array expected'); - let e = ''; - for (let r = 0; r < t.length; r++) e += s[t[r]]; - return e; - } - function h(t) { - const e = t.toString(16); - return 1 & e.length ? `0${e}` : e; - } - function u(t) { - if ('string' != typeof t) throw new Error('hex string expected, got ' + typeof t); - return BigInt('' === t ? '0' : `0x${t}`); - } - (e.bytesToHex = a), (e.numberToHexUnpadded = h), (e.hexToNumber = u); - const f = { _0: 48, _9: 57, _A: 65, _F: 70, _a: 97, _f: 102 }; - function c(t) { - return t >= f._0 && t <= f._9 - ? t - f._0 - : t >= f._A && t <= f._F - ? t - (f._A - 10) - : t >= f._a && t <= f._f - ? t - (f._a - 10) - : void 0; - } - function l(t) { - if ('string' != typeof t) throw new Error('hex string expected, got ' + typeof t); - const e = t.length, - r = e / 2; - if (e % 2) throw new Error('padded hex string expected, got unpadded hex of length ' + e); - const i = new Uint8Array(r); - for (let e = 0, n = 0; e < r; e++, n += 2) { - const r = c(t.charCodeAt(n)), - o = c(t.charCodeAt(n + 1)); - if (void 0 === r || void 0 === o) { - const e = t[n] + t[n + 1]; - throw new Error('hex string expected, got non-hex character "' + e + '" at index ' + n); - } - i[e] = 16 * r + o; - } - return i; - } - function d(t, e) { - return l(t.toString(16).padStart(2 * e, '0')); - } - function p(...t) { - let e = 0; - for (let r = 0; r < t.length; r++) { - const i = t[r]; - if (!o(i)) throw new Error('Uint8Array expected'); - e += i.length; - } - let r = new Uint8Array(e), - i = 0; - for (let e = 0; e < t.length; e++) { - const n = t[e]; - r.set(n, i), (i += n.length); - } - return r; - } - (e.hexToBytes = l), - (e.bytesToNumberBE = function (t) { - return u(a(t)); - }), - (e.bytesToNumberLE = function (t) { - if (!o(t)) throw new Error('Uint8Array expected'); - return u(a(Uint8Array.from(t).reverse())); - }), - (e.numberToBytesBE = d), - (e.numberToBytesLE = function (t, e) { - return d(t, e).reverse(); - }), - (e.numberToVarBytesBE = function (t) { - return l(h(t)); - }), - (e.ensureBytes = function (t, e, r) { - let i; - if ('string' == typeof e) - try { - i = l(e); - } catch (r) { - throw new Error(`${t} must be valid hex string, got "${e}". Cause: ${r}`); - } - else { - if (!o(e)) throw new Error(`${t} must be hex string or Uint8Array`); - i = Uint8Array.from(e); - } - const n = i.length; - if ('number' == typeof r && n !== r) throw new Error(`${t} expected ${r} bytes, got ${n}`); - return i; - }), - (e.concatBytes = p), - (e.equalBytes = function (t, e) { - if (t.length !== e.length) return !1; - let r = 0; - for (let i = 0; i < t.length; i++) r |= t[i] ^ e[i]; - return 0 === r; - }), - (e.utf8ToBytes = function (t) { - if ('string' != typeof t) throw new Error('utf8ToBytes expected string, got ' + typeof t); - return new Uint8Array(new TextEncoder().encode(t)); - }), - (e.bitLen = function (t) { - let e; - for (e = 0; t > r; t >>= i, e += 1); - return e; - }), - (e.bitGet = function (t, e) { - return (t >> BigInt(e)) & i; - }), - (e.bitSet = (t, e, n) => t | ((n ? i : r) << BigInt(e))), - (e.bitMask = t => (n << BigInt(t - 1)) - i); - const m = t => new Uint8Array(t), - g = t => Uint8Array.from(t); - e.createHmacDrbg = function (t, e, r) { - if ('number' != typeof t || t < 2) throw new Error('hashLen must be a number'); - if ('number' != typeof e || e < 2) throw new Error('qByteLen must be a number'); - if ('function' != typeof r) throw new Error('hmacFn must be a function'); - let i = m(t), - n = m(t), - o = 0; - const s = () => { - i.fill(1), n.fill(0), (o = 0); - }, - a = (...t) => r(n, i, ...t), - h = (t = m()) => { - (n = a(g([0]), t)), (i = a()), 0 !== t.length && ((n = a(g([1]), t)), (i = a())); - }, - u = () => { - if (o++ >= 1e3) throw new Error('drbg: tried 1000 values'); - let t = 0; - const r = []; - for (; t < e; ) { - i = a(); - const e = i.slice(); - r.push(e), (t += i.length); - } - return p(...r); - }; - return (t, e) => { - let r; - for (s(), h(t); !(r = e(u())); ) h(); - return s(), r; - }; - }; - const b = { - bigint: t => 'bigint' == typeof t, - function: t => 'function' == typeof t, - boolean: t => 'boolean' == typeof t, - string: t => 'string' == typeof t, - stringOrUint8Array: t => 'string' == typeof t || o(t), - isSafeInteger: t => Number.isSafeInteger(t), - array: t => Array.isArray(t), - field: (t, e) => e.Fp.isValid(t), - hash: t => 'function' == typeof t && Number.isSafeInteger(t.outputLen), - }; - e.validateObject = function (t, e, r = {}) { - const i = (e, r, i) => { - const n = b[r]; - if ('function' != typeof n) throw new Error(`Invalid validator "${r}", expected function`); - const o = t[e]; - if (!((i && void 0 === o) || n(o, t))) throw new Error(`Invalid param ${String(e)}=${o} (${typeof o}), expected ${r}`); - }; - for (const [t, r] of Object.entries(e)) i(t, r, !1); - for (const [t, e] of Object.entries(r)) i(t, e, !0); - return t; - }; - }, - 7602: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), - (e.mapToCurveSimpleSWU = e.SWUFpSqrtRatio = e.weierstrass = e.weierstrassPoints = e.DER = void 0); - const i = r(3818), - n = r(9309), - o = r(9309), - s = r(6861), - { bytesToNumberBE: a, hexToBytes: h } = n; - e.DER = { - Err: class extends Error { - constructor(t = '') { - super(t); - } - }, - _parseInt(t) { - const { Err: r } = e.DER; - if (t.length < 2 || 2 !== t[0]) throw new r('Invalid signature integer tag'); - const i = t[1], - n = t.subarray(2, i + 2); - if (!i || n.length !== i) throw new r('Invalid signature integer: wrong length'); - if (128 & n[0]) throw new r('Invalid signature integer: negative'); - if (0 === n[0] && !(128 & n[1])) throw new r('Invalid signature integer: unnecessary leading zero'); - return { d: a(n), l: t.subarray(i + 2) }; - }, - toSig(t) { - const { Err: r } = e.DER, - i = 'string' == typeof t ? h(t) : t; - if (!n.isBytes(i)) throw new Error('ui8a expected'); - let o = i.length; - if (o < 2 || 48 != i[0]) throw new r('Invalid signature tag'); - if (i[1] !== o - 2) throw new r('Invalid signature: incorrect length'); - const { d: s, l: a } = e.DER._parseInt(i.subarray(2)), - { d: u, l: f } = e.DER._parseInt(a); - if (f.length) throw new r('Invalid signature: left bytes after parsing'); - return { r: s, s: u }; - }, - hexFromSig(t) { - const e = t => (8 & Number.parseInt(t[0], 16) ? '00' + t : t), - r = t => { - const e = t.toString(16); - return 1 & e.length ? `0${e}` : e; - }, - i = e(r(t.s)), - n = e(r(t.r)), - o = i.length / 2, - s = n.length / 2, - a = r(o), - h = r(s); - return `30${r(s + o + 4)}02${h}${n}02${a}${i}`; - }, - }; - const u = BigInt(0), - f = BigInt(1), - c = BigInt(2), - l = BigInt(3), - d = BigInt(4); - function p(t) { - const e = (function (t) { - const e = (0, s.validateBasic)(t); - n.validateObject( - e, - { a: 'field', b: 'field' }, - { - allowedPrivateKeyLengths: 'array', - wrapPrivateKey: 'boolean', - isTorsionFree: 'function', - clearCofactor: 'function', - allowInfinityPoint: 'boolean', - fromBytes: 'function', - toBytes: 'function', - } - ); - const { endo: r, Fp: i, a: o } = e; - if (r) { - if (!i.eql(o, i.ZERO)) throw new Error('Endomorphism can only be defined for Koblitz curves that have a=0'); - if ('object' != typeof r || 'bigint' != typeof r.beta || 'function' != typeof r.splitScalar) - throw new Error('Expected endomorphism with beta: bigint and splitScalar: function'); - } - return Object.freeze({ ...e }); - })(t), - { Fp: r } = e, - a = - e.toBytes || - ((t, e, i) => { - const o = e.toAffine(); - return n.concatBytes(Uint8Array.from([4]), r.toBytes(o.x), r.toBytes(o.y)); - }), - h = - e.fromBytes || - (t => { - const e = t.subarray(1); - return { x: r.fromBytes(e.subarray(0, r.BYTES)), y: r.fromBytes(e.subarray(r.BYTES, 2 * r.BYTES)) }; - }); - function c(t) { - const { a: i, b: n } = e, - o = r.sqr(t), - s = r.mul(o, t); - return r.add(r.add(s, r.mul(t, i)), n); - } - if (!r.eql(r.sqr(e.Gy), c(e.Gx))) throw new Error('bad generator point: equation left != right'); - function d(t) { - return 'bigint' == typeof t && u < t && t < e.n; - } - function p(t) { - if (!d(t)) throw new Error('Expected valid bigint: 0 < bigint < curve.n'); - } - function m(t) { - const { allowedPrivateKeyLengths: r, nByteLength: s, wrapPrivateKey: a, n: h } = e; - if (r && 'bigint' != typeof t) { - if ((n.isBytes(t) && (t = n.bytesToHex(t)), 'string' != typeof t || !r.includes(t.length))) throw new Error('Invalid key'); - t = t.padStart(2 * s, '0'); - } - let u; - try { - u = 'bigint' == typeof t ? t : n.bytesToNumberBE((0, o.ensureBytes)('private key', t, s)); - } catch (e) { - throw new Error(`private key must be ${s} bytes, hex or bigint, not ${typeof t}`); - } - return a && (u = i.mod(u, h)), p(u), u; - } - const g = new Map(); - function b(t) { - if (!(t instanceof y)) throw new Error('ProjectivePoint expected'); - } - class y { - constructor(t, e, i) { - if (((this.px = t), (this.py = e), (this.pz = i), null == t || !r.isValid(t))) throw new Error('x required'); - if (null == e || !r.isValid(e)) throw new Error('y required'); - if (null == i || !r.isValid(i)) throw new Error('z required'); - } - static fromAffine(t) { - const { x: e, y: i } = t || {}; - if (!t || !r.isValid(e) || !r.isValid(i)) throw new Error('invalid affine point'); - if (t instanceof y) throw new Error('projective point not allowed'); - const n = t => r.eql(t, r.ZERO); - return n(e) && n(i) ? y.ZERO : new y(e, i, r.ONE); - } - get x() { - return this.toAffine().x; - } - get y() { - return this.toAffine().y; - } - static normalizeZ(t) { - const e = r.invertBatch(t.map(t => t.pz)); - return t.map((t, r) => t.toAffine(e[r])).map(y.fromAffine); - } - static fromHex(t) { - const e = y.fromAffine(h((0, o.ensureBytes)('pointHex', t))); - return e.assertValidity(), e; - } - static fromPrivateKey(t) { - return y.BASE.multiply(m(t)); - } - _setWindowSize(t) { - (this._WINDOW_SIZE = t), g.delete(this); - } - assertValidity() { - if (this.is0()) { - if (e.allowInfinityPoint && !r.is0(this.py)) return; - throw new Error('bad point: ZERO'); - } - const { x: t, y: i } = this.toAffine(); - if (!r.isValid(t) || !r.isValid(i)) throw new Error('bad point: x or y not FE'); - const n = r.sqr(i), - o = c(t); - if (!r.eql(n, o)) throw new Error('bad point: equation left != right'); - if (!this.isTorsionFree()) throw new Error('bad point: not in prime-order subgroup'); - } - hasEvenY() { - const { y: t } = this.toAffine(); - if (r.isOdd) return !r.isOdd(t); - throw new Error("Field doesn't support isOdd"); - } - equals(t) { - b(t); - const { px: e, py: i, pz: n } = this, - { px: o, py: s, pz: a } = t, - h = r.eql(r.mul(e, a), r.mul(o, n)), - u = r.eql(r.mul(i, a), r.mul(s, n)); - return h && u; - } - negate() { - return new y(this.px, r.neg(this.py), this.pz); - } - double() { - const { a: t, b: i } = e, - n = r.mul(i, l), - { px: o, py: s, pz: a } = this; - let h = r.ZERO, - u = r.ZERO, - f = r.ZERO, - c = r.mul(o, o), - d = r.mul(s, s), - p = r.mul(a, a), - m = r.mul(o, s); - return ( - (m = r.add(m, m)), - (f = r.mul(o, a)), - (f = r.add(f, f)), - (h = r.mul(t, f)), - (u = r.mul(n, p)), - (u = r.add(h, u)), - (h = r.sub(d, u)), - (u = r.add(d, u)), - (u = r.mul(h, u)), - (h = r.mul(m, h)), - (f = r.mul(n, f)), - (p = r.mul(t, p)), - (m = r.sub(c, p)), - (m = r.mul(t, m)), - (m = r.add(m, f)), - (f = r.add(c, c)), - (c = r.add(f, c)), - (c = r.add(c, p)), - (c = r.mul(c, m)), - (u = r.add(u, c)), - (p = r.mul(s, a)), - (p = r.add(p, p)), - (c = r.mul(p, m)), - (h = r.sub(h, c)), - (f = r.mul(p, d)), - (f = r.add(f, f)), - (f = r.add(f, f)), - new y(h, u, f) - ); - } - add(t) { - b(t); - const { px: i, py: n, pz: o } = this, - { px: s, py: a, pz: h } = t; - let u = r.ZERO, - f = r.ZERO, - c = r.ZERO; - const d = e.a, - p = r.mul(e.b, l); - let m = r.mul(i, s), - g = r.mul(n, a), - v = r.mul(o, h), - w = r.add(i, n), - _ = r.add(s, a); - (w = r.mul(w, _)), (_ = r.add(m, g)), (w = r.sub(w, _)), (_ = r.add(i, o)); - let M = r.add(s, h); - return ( - (_ = r.mul(_, M)), - (M = r.add(m, v)), - (_ = r.sub(_, M)), - (M = r.add(n, o)), - (u = r.add(a, h)), - (M = r.mul(M, u)), - (u = r.add(g, v)), - (M = r.sub(M, u)), - (c = r.mul(d, _)), - (u = r.mul(p, v)), - (c = r.add(u, c)), - (u = r.sub(g, c)), - (c = r.add(g, c)), - (f = r.mul(u, c)), - (g = r.add(m, m)), - (g = r.add(g, m)), - (v = r.mul(d, v)), - (_ = r.mul(p, _)), - (g = r.add(g, v)), - (v = r.sub(m, v)), - (v = r.mul(d, v)), - (_ = r.add(_, v)), - (m = r.mul(g, _)), - (f = r.add(f, m)), - (m = r.mul(M, _)), - (u = r.mul(w, u)), - (u = r.sub(u, m)), - (m = r.mul(w, g)), - (c = r.mul(M, c)), - (c = r.add(c, m)), - new y(u, f, c) - ); - } - subtract(t) { - return this.add(t.negate()); - } - is0() { - return this.equals(y.ZERO); - } - wNAF(t) { - return w.wNAFCached(this, g, t, t => { - const e = r.invertBatch(t.map(t => t.pz)); - return t.map((t, r) => t.toAffine(e[r])).map(y.fromAffine); - }); - } - multiplyUnsafe(t) { - const i = y.ZERO; - if (t === u) return i; - if ((p(t), t === f)) return this; - const { endo: n } = e; - if (!n) return w.unsafeLadder(this, t); - let { k1neg: o, k1: s, k2neg: a, k2: h } = n.splitScalar(t), - c = i, - l = i, - d = this; - for (; s > u || h > u; ) s & f && (c = c.add(d)), h & f && (l = l.add(d)), (d = d.double()), (s >>= f), (h >>= f); - return o && (c = c.negate()), a && (l = l.negate()), (l = new y(r.mul(l.px, n.beta), l.py, l.pz)), c.add(l); - } - multiply(t) { - p(t); - let i, - n, - o = t; - const { endo: s } = e; - if (s) { - const { k1neg: t, k1: e, k2neg: a, k2: h } = s.splitScalar(o); - let { p: u, f } = this.wNAF(e), - { p: c, f: l } = this.wNAF(h); - (u = w.constTimeNegate(t, u)), - (c = w.constTimeNegate(a, c)), - (c = new y(r.mul(c.px, s.beta), c.py, c.pz)), - (i = u.add(c)), - (n = f.add(l)); - } else { - const { p: t, f: e } = this.wNAF(o); - (i = t), (n = e); - } - return y.normalizeZ([i, n])[0]; - } - multiplyAndAddUnsafe(t, e, r) { - const i = y.BASE, - n = (t, e) => (e !== u && e !== f && t.equals(i) ? t.multiply(e) : t.multiplyUnsafe(e)), - o = n(this, e).add(n(t, r)); - return o.is0() ? void 0 : o; - } - toAffine(t) { - const { px: e, py: i, pz: n } = this, - o = this.is0(); - null == t && (t = o ? r.ONE : r.inv(n)); - const s = r.mul(e, t), - a = r.mul(i, t), - h = r.mul(n, t); - if (o) return { x: r.ZERO, y: r.ZERO }; - if (!r.eql(h, r.ONE)) throw new Error('invZ was invalid'); - return { x: s, y: a }; - } - isTorsionFree() { - const { h: t, isTorsionFree: r } = e; - if (t === f) return !0; - if (r) return r(y, this); - throw new Error('isTorsionFree() has not been declared for the elliptic curve'); - } - clearCofactor() { - const { h: t, clearCofactor: r } = e; - return t === f ? this : r ? r(y, this) : this.multiplyUnsafe(e.h); - } - toRawBytes(t = !0) { - return this.assertValidity(), a(y, this, t); - } - toHex(t = !0) { - return n.bytesToHex(this.toRawBytes(t)); - } - } - (y.BASE = new y(e.Gx, e.Gy, r.ONE)), (y.ZERO = new y(r.ZERO, r.ONE, r.ZERO)); - const v = e.nBitLength, - w = (0, s.wNAF)(y, e.endo ? Math.ceil(v / 2) : v); - return { CURVE: e, ProjectivePoint: y, normPrivateKeyToScalar: m, weierstrassEquation: c, isWithinCurveOrder: d }; - } - function m(t, e) { - const r = t.ORDER; - let i = u; - for (let t = r - f; t % c === u; t /= c) i += f; - const n = i, - o = c << (n - f - f), - s = o * c, - a = (r - f) / s, - h = (a - f) / c, - p = s - f, - m = o, - g = t.pow(e, a), - b = t.pow(e, (a + f) / c); - let y = (e, r) => { - let i = g, - o = t.pow(r, p), - s = t.sqr(o); - s = t.mul(s, r); - let a = t.mul(e, s); - (a = t.pow(a, h)), (a = t.mul(a, o)), (o = t.mul(a, r)), (s = t.mul(a, e)); - let u = t.mul(s, o); - a = t.pow(u, m); - let l = t.eql(a, t.ONE); - (o = t.mul(s, b)), (a = t.mul(u, i)), (s = t.cmov(o, s, l)), (u = t.cmov(a, u, l)); - for (let e = n; e > f; e--) { - let r = e - c; - r = c << (r - f); - let n = t.pow(u, r); - const a = t.eql(n, t.ONE); - (o = t.mul(s, i)), (i = t.mul(i, i)), (n = t.mul(u, i)), (s = t.cmov(o, s, a)), (u = t.cmov(n, u, a)); - } - return { isValid: l, value: s }; - }; - if (t.ORDER % d === l) { - const r = (t.ORDER - l) / d, - i = t.sqrt(t.neg(e)); - y = (e, n) => { - let o = t.sqr(n); - const s = t.mul(e, n); - o = t.mul(o, s); - let a = t.pow(o, r); - a = t.mul(a, s); - const h = t.mul(a, i), - u = t.mul(t.sqr(a), n), - f = t.eql(u, e); - return { isValid: f, value: t.cmov(h, a, f) }; - }; - } - return y; - } - (e.weierstrassPoints = p), - (e.weierstrass = function (t) { - const r = (function (t) { - const e = (0, s.validateBasic)(t); - return ( - n.validateObject( - e, - { hash: 'hash', hmac: 'function', randomBytes: 'function' }, - { bits2int: 'function', bits2int_modN: 'function', lowS: 'boolean' } - ), - Object.freeze({ lowS: !0, ...e }) - ); - })(t), - { Fp: a, n: h } = r, - c = a.BYTES + 1, - l = 2 * a.BYTES + 1; - function d(t) { - return i.mod(t, h); - } - function m(t) { - return i.invert(t, h); - } - const { - ProjectivePoint: g, - normPrivateKeyToScalar: b, - weierstrassEquation: y, - isWithinCurveOrder: v, - } = p({ - ...r, - toBytes(t, e, r) { - const i = e.toAffine(), - o = a.toBytes(i.x), - s = n.concatBytes; - return r ? s(Uint8Array.from([e.hasEvenY() ? 2 : 3]), o) : s(Uint8Array.from([4]), o, a.toBytes(i.y)); - }, - fromBytes(t) { - const e = t.length, - r = t[0], - i = t.subarray(1); - if (e !== c || (2 !== r && 3 !== r)) { - if (e === l && 4 === r) - return { x: a.fromBytes(i.subarray(0, a.BYTES)), y: a.fromBytes(i.subarray(a.BYTES, 2 * a.BYTES)) }; - throw new Error(`Point of length ${e} was invalid. Expected ${c} compressed bytes or ${l} uncompressed bytes`); - } - { - const t = n.bytesToNumberBE(i); - if (!(u < (o = t) && o < a.ORDER)) throw new Error('Point is not on curve'); - const e = y(t); - let s = a.sqrt(e); - return (1 == (1 & r)) != ((s & f) === f) && (s = a.neg(s)), { x: t, y: s }; - } - var o; - }, - }), - w = t => n.bytesToHex(n.numberToBytesBE(t, r.nByteLength)); - function _(t) { - return t > h >> f; - } - const M = (t, e, r) => n.bytesToNumberBE(t.slice(e, r)); - class E { - constructor(t, e, r) { - (this.r = t), (this.s = e), (this.recovery = r), this.assertValidity(); - } - static fromCompact(t) { - const e = r.nByteLength; - return (t = (0, o.ensureBytes)('compactSignature', t, 2 * e)), new E(M(t, 0, e), M(t, e, 2 * e)); - } - static fromDER(t) { - const { r, s: i } = e.DER.toSig((0, o.ensureBytes)('DER', t)); - return new E(r, i); - } - assertValidity() { - if (!v(this.r)) throw new Error('r must be 0 < r < CURVE.n'); - if (!v(this.s)) throw new Error('s must be 0 < s < CURVE.n'); - } - addRecoveryBit(t) { - return new E(this.r, this.s, t); - } - recoverPublicKey(t) { - const { r: e, s: i, recovery: n } = this, - s = k((0, o.ensureBytes)('msgHash', t)); - if (null == n || ![0, 1, 2, 3].includes(n)) throw new Error('recovery id invalid'); - const h = 2 === n || 3 === n ? e + r.n : e; - if (h >= a.ORDER) throw new Error('recovery id 2 or 3 invalid'); - const u = 0 == (1 & n) ? '02' : '03', - f = g.fromHex(u + w(h)), - c = m(h), - l = d(-s * c), - p = d(i * c), - b = g.BASE.multiplyAndAddUnsafe(f, l, p); - if (!b) throw new Error('point at infinify'); - return b.assertValidity(), b; - } - hasHighS() { - return _(this.s); - } - normalizeS() { - return this.hasHighS() ? new E(this.r, d(-this.s), this.recovery) : this; - } - toDERRawBytes() { - return n.hexToBytes(this.toDERHex()); - } - toDERHex() { - return e.DER.hexFromSig({ r: this.r, s: this.s }); - } - toCompactRawBytes() { - return n.hexToBytes(this.toCompactHex()); - } - toCompactHex() { - return w(this.r) + w(this.s); - } - } - const S = { - isValidPrivateKey(t) { - try { - return b(t), !0; - } catch (t) { - return !1; - } - }, - normPrivateKeyToScalar: b, - randomPrivateKey: () => { - const t = i.getMinHashLength(r.n); - return i.mapHashToField(r.randomBytes(t), r.n); - }, - precompute: (t = 8, e = g.BASE) => (e._setWindowSize(t), e.multiply(BigInt(3)), e), - }; - function x(t) { - const e = n.isBytes(t), - r = 'string' == typeof t, - i = (e || r) && t.length; - return e ? i === c || i === l : r ? i === 2 * c || i === 2 * l : t instanceof g; - } - const A = - r.bits2int || - function (t) { - const e = n.bytesToNumberBE(t), - i = 8 * t.length - r.nBitLength; - return i > 0 ? e >> BigInt(i) : e; - }, - k = - r.bits2int_modN || - function (t) { - return d(A(t)); - }, - R = n.bitMask(r.nBitLength); - function B(t) { - if ('bigint' != typeof t) throw new Error('bigint expected'); - if (!(u <= t && t < R)) throw new Error(`bigint expected < 2^${r.nBitLength}`); - return n.numberToBytesBE(t, r.nByteLength); - } - const I = { lowS: r.lowS, prehash: !1 }, - T = { lowS: r.lowS, prehash: !1 }; - return ( - g.BASE._setWindowSize(8), - { - CURVE: r, - getPublicKey: function (t, e = !0) { - return g.fromPrivateKey(t).toRawBytes(e); - }, - getSharedSecret: function (t, e, r = !0) { - if (x(t)) throw new Error('first arg must be private key'); - if (!x(e)) throw new Error('second arg must be public key'); - return g.fromHex(e).multiply(b(t)).toRawBytes(r); - }, - sign: function (t, e, i = I) { - const { seed: s, k2sig: h } = (function (t, e, i = I) { - if (['recovered', 'canonical'].some(t => t in i)) throw new Error('sign() legacy options not supported'); - const { hash: s, randomBytes: h } = r; - let { lowS: c, prehash: l, extraEntropy: p } = i; - null == c && (c = !0), - (t = (0, o.ensureBytes)('msgHash', t)), - l && (t = (0, o.ensureBytes)('prehashed msgHash', s(t))); - const y = k(t), - w = b(e), - M = [B(w), B(y)]; - if (null != p) { - const t = !0 === p ? h(a.BYTES) : p; - M.push((0, o.ensureBytes)('extraEntropy', t)); - } - const S = n.concatBytes(...M), - x = y; - return { - seed: S, - k2sig: function (t) { - const e = A(t); - if (!v(e)) return; - const r = m(e), - i = g.BASE.multiply(e).toAffine(), - n = d(i.x); - if (n === u) return; - const o = d(r * d(x + n * w)); - if (o === u) return; - let s = (i.x === n ? 0 : 2) | Number(i.y & f), - a = o; - return ( - c && - _(o) && - ((a = (function (t) { - return _(t) ? d(-t) : t; - })(o)), - (s ^= 1)), - new E(n, a, s) - ); - }, - }; - })(t, e, i), - c = r; - return n.createHmacDrbg(c.hash.outputLen, c.nByteLength, c.hmac)(s, h); - }, - verify: function (t, i, s, a = T) { - const h = t; - if (((i = (0, o.ensureBytes)('msgHash', i)), (s = (0, o.ensureBytes)('publicKey', s)), 'strict' in a)) - throw new Error('options.strict was renamed to lowS'); - const { lowS: u, prehash: f } = a; - let c, l; - try { - if ('string' == typeof h || n.isBytes(h)) - try { - c = E.fromDER(h); - } catch (t) { - if (!(t instanceof e.DER.Err)) throw t; - c = E.fromCompact(h); - } - else { - if ('object' != typeof h || 'bigint' != typeof h.r || 'bigint' != typeof h.s) throw new Error('PARSE'); - { - const { r: t, s: e } = h; - c = new E(t, e); - } - } - l = g.fromHex(s); - } catch (t) { - if ('PARSE' === t.message) throw new Error('signature must be Signature instance, Uint8Array or hex string'); - return !1; - } - if (u && c.hasHighS()) return !1; - f && (i = r.hash(i)); - const { r: p, s: b } = c, - y = k(i), - v = m(b), - w = d(y * v), - _ = d(p * v), - M = g.BASE.multiplyAndAddUnsafe(l, w, _)?.toAffine(); - return !!M && d(M.x) === p; - }, - ProjectivePoint: g, - Signature: E, - utils: S, - } - ); - }), - (e.SWUFpSqrtRatio = m), - (e.mapToCurveSimpleSWU = function (t, e) { - if ((i.validateField(t), !t.isValid(e.A) || !t.isValid(e.B) || !t.isValid(e.Z))) - throw new Error('mapToCurveSimpleSWU: invalid opts'); - const r = m(t, e.Z); - if (!t.isOdd) throw new Error('Fp.isOdd is not implemented!'); - return i => { - let n, o, s, a, h, u, f, c; - (n = t.sqr(i)), - (n = t.mul(n, e.Z)), - (o = t.sqr(n)), - (o = t.add(o, n)), - (s = t.add(o, t.ONE)), - (s = t.mul(s, e.B)), - (a = t.cmov(e.Z, t.neg(o), !t.eql(o, t.ZERO))), - (a = t.mul(a, e.A)), - (o = t.sqr(s)), - (u = t.sqr(a)), - (h = t.mul(u, e.A)), - (o = t.add(o, h)), - (o = t.mul(o, s)), - (u = t.mul(u, a)), - (h = t.mul(u, e.B)), - (o = t.add(o, h)), - (f = t.mul(n, s)); - const { isValid: l, value: d } = r(o, u); - (c = t.mul(n, i)), (c = t.mul(c, d)), (f = t.cmov(f, s, l)), (c = t.cmov(c, d, l)); - const p = t.isOdd(i) === t.isOdd(c); - return (c = t.cmov(t.neg(c), c, p)), (f = t.div(f, a)), { x: f, y: c }; - }; - }); - }, - 3532: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), (e.encodeToCurve = e.hashToCurve = e.schnorr = e.secp256k1 = void 0); - const i = r(3061), - n = r(8089), - o = r(3818), - s = r(7602), - a = r(9309), - h = r(5984), - u = r(1614), - f = BigInt('0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f'), - c = BigInt('0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141'), - l = BigInt(1), - d = BigInt(2), - p = (t, e) => (t + e / d) / e; - function m(t) { - const e = f, - r = BigInt(3), - i = BigInt(6), - n = BigInt(11), - s = BigInt(22), - a = BigInt(23), - h = BigInt(44), - u = BigInt(88), - c = (t * t * t) % e, - l = (c * c * t) % e, - p = ((0, o.pow2)(l, r, e) * l) % e, - m = ((0, o.pow2)(p, r, e) * l) % e, - b = ((0, o.pow2)(m, d, e) * c) % e, - y = ((0, o.pow2)(b, n, e) * b) % e, - v = ((0, o.pow2)(y, s, e) * y) % e, - w = ((0, o.pow2)(v, h, e) * v) % e, - _ = ((0, o.pow2)(w, u, e) * w) % e, - M = ((0, o.pow2)(_, h, e) * v) % e, - E = ((0, o.pow2)(M, r, e) * l) % e, - S = ((0, o.pow2)(E, a, e) * y) % e, - x = ((0, o.pow2)(S, i, e) * c) % e, - A = (0, o.pow2)(x, d, e); - if (!g.eql(g.sqr(A), t)) throw new Error('Cannot find square root'); - return A; - } - const g = (0, o.Field)(f, void 0, void 0, { sqrt: m }); - e.secp256k1 = (0, u.createCurve)( - { - a: BigInt(0), - b: BigInt(7), - Fp: g, - n: c, - Gx: BigInt('55066263022277343669578718895168534326250603453777594175500187360389116729240'), - Gy: BigInt('32670510020758816978083085130507043184471273380659243275938904335757337482424'), - h: BigInt(1), - lowS: !0, - endo: { - beta: BigInt('0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee'), - splitScalar: t => { - const e = c, - r = BigInt('0x3086d221a7d46bcde86c90e49284eb15'), - i = -l * BigInt('0xe4437ed6010e88286f547fa90abfe4c3'), - n = BigInt('0x114ca50f7a8e2f3f657c1108d9d44cfd8'), - s = r, - a = BigInt('0x100000000000000000000000000000000'), - h = p(s * t, e), - u = p(-i * t, e); - let f = (0, o.mod)(t - h * r - u * n, e), - d = (0, o.mod)(-h * i - u * s, e); - const m = f > a, - g = d > a; - if ((m && (f = e - f), g && (d = e - d), f > a || d > a)) throw new Error('splitScalar: Endomorphism failed, k=' + t); - return { k1neg: m, k1: f, k2neg: g, k2: d }; - }, - }, - }, - i.sha256 - ); - const b = BigInt(0), - y = t => 'bigint' == typeof t && b < t && t < f, - v = t => 'bigint' == typeof t && b < t && t < c, - w = {}; - function _(t, ...e) { - let r = w[t]; - if (void 0 === r) { - const e = (0, i.sha256)(Uint8Array.from(t, t => t.charCodeAt(0))); - (r = (0, a.concatBytes)(e, e)), (w[t] = r); - } - return (0, i.sha256)((0, a.concatBytes)(r, ...e)); - } - const M = t => t.toRawBytes(!0).slice(1), - E = t => (0, a.numberToBytesBE)(t, 32), - S = t => (0, o.mod)(t, f), - x = t => (0, o.mod)(t, c), - A = e.secp256k1.ProjectivePoint, - k = (t, e, r) => A.BASE.multiplyAndAddUnsafe(t, e, r); - function R(t) { - let r = e.secp256k1.utils.normPrivateKeyToScalar(t), - i = A.fromPrivateKey(r); - return { scalar: i.hasEvenY() ? r : x(-r), bytes: M(i) }; - } - function B(t) { - if (!y(t)) throw new Error('bad x: need 0 < x < p'); - const e = S(t * t); - let r = m(S(e * t + BigInt(7))); - r % d !== b && (r = S(-r)); - const i = new A(t, r, l); - return i.assertValidity(), i; - } - function I(...t) { - return x((0, a.bytesToNumberBE)(_('BIP0340/challenge', ...t))); - } - function T(t, e, r) { - const i = (0, a.ensureBytes)('signature', t, 64), - n = (0, a.ensureBytes)('message', e), - o = (0, a.ensureBytes)('publicKey', r, 32); - try { - const t = B((0, a.bytesToNumberBE)(o)), - e = (0, a.bytesToNumberBE)(i.subarray(0, 32)); - if (!y(e)) return !1; - const r = (0, a.bytesToNumberBE)(i.subarray(32, 64)); - if (!v(r)) return !1; - const s = I(E(e), M(t), n), - h = k(t, r, x(-s)); - return !(!h || !h.hasEvenY() || h.toAffine().x !== e); - } catch (t) { - return !1; - } - } - e.schnorr = { - getPublicKey: function (t) { - return R(t).bytes; - }, - sign: function (t, e, r = (0, n.randomBytes)(32)) { - const i = (0, a.ensureBytes)('message', t), - { bytes: o, scalar: s } = R(e), - h = (0, a.ensureBytes)('auxRand', r, 32), - u = E(s ^ (0, a.bytesToNumberBE)(_('BIP0340/aux', h))), - f = _('BIP0340/nonce', u, o, i), - c = x((0, a.bytesToNumberBE)(f)); - if (c === b) throw new Error('sign failed: k is zero'); - const { bytes: l, scalar: d } = R(c), - p = I(l, o, i), - m = new Uint8Array(64); - if ((m.set(l, 0), m.set(E(x(d + p * s)), 32), !T(m, i, o))) throw new Error('sign: Invalid signature produced'); - return m; - }, - verify: T, - utils: { - randomPrivateKey: e.secp256k1.utils.randomPrivateKey, - lift_x: B, - pointToBytes: M, - numberToBytesBE: a.numberToBytesBE, - bytesToNumberBE: a.bytesToNumberBE, - taggedHash: _, - mod: o.mod, - }, - }; - const P = (() => - (0, h.isogenyMap)( - g, - [ - [ - '0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7', - '0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581', - '0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262', - '0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c', - ], - [ - '0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b', - '0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14', - '0x0000000000000000000000000000000000000000000000000000000000000001', - ], - [ - '0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c', - '0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3', - '0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931', - '0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84', - ], - [ - '0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b', - '0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573', - '0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f', - '0x0000000000000000000000000000000000000000000000000000000000000001', - ], - ].map(t => t.map(t => BigInt(t))) - ))(), - O = (() => - (0, s.mapToCurveSimpleSWU)(g, { - A: BigInt('0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533'), - B: BigInt('1771'), - Z: g.create(BigInt('-11')), - }))(), - L = (() => - (0, h.createHasher)( - e.secp256k1.ProjectivePoint, - t => { - const { x: e, y: r } = O(g.create(t[0])); - return P(e, r); - }, - { - DST: 'secp256k1_XMD:SHA-256_SSWU_RO_', - encodeDST: 'secp256k1_XMD:SHA-256_SSWU_NU_', - p: g.ORDER, - m: 1, - k: 128, - expand: 'xmd', - hash: i.sha256, - } - ))(); - (e.hashToCurve = L.hashToCurve), (e.encodeToCurve = L.encodeToCurve); - }, - 1906: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), (e.keccak512 = e.keccak384 = e.keccak256 = e.keccak224 = void 0); - const i = r(5426), - n = r(2820); - (e.keccak224 = (0, n.wrapHash)(i.keccak_224)), - (e.keccak256 = (() => { - const t = (0, n.wrapHash)(i.keccak_256); - return (t.create = i.keccak_256.create), t; - })()), - (e.keccak384 = (0, n.wrapHash)(i.keccak_384)), - (e.keccak512 = (0, n.wrapHash)(i.keccak_512)); - }, - 6579: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), (e.secp256k1 = void 0); - var i = r(3532); - Object.defineProperty(e, 'secp256k1', { - enumerable: !0, - get: function () { - return i.secp256k1; - }, - }); - }, - 2820: function (t, e, r) { - 'use strict'; - t = r.nmd(t); - var i = - (this && this.__importDefault) || - function (t) { - return t && t.__esModule ? t : { default: t }; - }; - Object.defineProperty(e, '__esModule', { value: !0 }), - (e.crypto = - e.wrapHash = - e.equalsBytes = - e.hexToBytes = - e.bytesToUtf8 = - e.utf8ToBytes = - e.createView = - e.concatBytes = - e.toHex = - e.bytesToHex = - e.assertBytes = - e.assertBool = - void 0); - const n = i(r(7320)), - o = r(8089), - s = n.default.bool; - e.assertBool = s; - const a = n.default.bytes; - e.assertBytes = a; - var h = r(8089); - Object.defineProperty(e, 'bytesToHex', { - enumerable: !0, - get: function () { - return h.bytesToHex; - }, - }), - Object.defineProperty(e, 'toHex', { - enumerable: !0, - get: function () { - return h.bytesToHex; - }, - }), - Object.defineProperty(e, 'concatBytes', { - enumerable: !0, - get: function () { - return h.concatBytes; - }, - }), - Object.defineProperty(e, 'createView', { - enumerable: !0, - get: function () { - return h.createView; - }, - }), - Object.defineProperty(e, 'utf8ToBytes', { - enumerable: !0, - get: function () { - return h.utf8ToBytes; - }, - }), - (e.bytesToUtf8 = function (t) { - if (!(t instanceof Uint8Array)) throw new TypeError('bytesToUtf8 expected Uint8Array, got ' + typeof t); - return new TextDecoder().decode(t); - }), - (e.hexToBytes = function (t) { - const e = t.startsWith('0x') ? t.substring(2) : t; - return (0, o.hexToBytes)(e); - }), - (e.equalsBytes = function (t, e) { - if (t.length !== e.length) return !1; - for (let r = 0; r < t.length; r++) if (t[r] !== e[r]) return !1; - return !0; - }), - (e.wrapHash = function (t) { - return e => (n.default.bytes(e), t(e)); - }), - (e.crypto = (() => { - const e = 'object' == typeof globalThis && 'crypto' in globalThis ? globalThis.crypto : void 0, - r = 'function' == typeof t.require && t.require.bind(t); - return { node: r && !e ? r('crypto') : void 0, web: e }; - })()); - }, - 280: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), - (e.decodeSingle = e.decode = e.encodePacked = e.encodeSingle = e.encode = void 0); - const i = r(2451), - n = r(2858), - o = r(3763); - (e.encode = (t, e, r, i) => { - try { - return (0, o.pack)({ types: t, values: e, packed: r, tight: i }); - } catch (t) { - if (t instanceof n.ParserError) throw new n.ParserError(`Unable to encode value: ${t.message}`, t); - throw new n.ParserError(`An unexpected error occurred: ${(0, n.getErrorMessage)(t)}`, t); - } - }), - (e.encodeSingle = (t, r) => (0, e.encode)([t], [r])), - (e.encodePacked = (t, r, i) => (0, e.encode)(t, r, !0, i)), - (e.decode = (t, e) => { - const r = (0, i.createBytes)(e); - try { - return (0, o.unpack)(t, r); - } catch (t) { - if (t instanceof n.ParserError) throw new n.ParserError(`Unable to decode value: ${t.message}`, t); - throw new n.ParserError(`An unexpected error occurred: ${(0, n.getErrorMessage)(t)}`, t); - } - }), - (e.decodeSingle = (t, r) => { - const o = (0, e.decode)([t], r); - return (0, i.assert)(1 === o.length, new n.ParserError('Decoded value array has unexpected length.')), o[0]; - }); - }, - 2858: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), (e.ParserError = e.getErrorStack = e.getErrorMessage = void 0); - const i = r(2451); - (e.getErrorMessage = t => - 'string' == typeof t - ? t - : t instanceof Error || ((0, i.isObject)(t) && (0, i.hasProperty)(t, 'message') && 'string' == typeof t.message) - ? t.message - : 'Unknown error.'), - (e.getErrorStack = t => { - if (t instanceof Error) return t.stack; - }); - class n extends Error { - constructor(t, r) { - super(t), (this.name = 'ParserError'); - const i = (0, e.getErrorStack)(r); - i && (this.stack = i); - } - } - e.ParserError = n; - }, - 8009: function (t, e, r) { - 'use strict'; - var i = - (this && this.__createBinding) || - (Object.create - ? function (t, e, r, i) { - void 0 === i && (i = r); - var n = Object.getOwnPropertyDescriptor(e, r); - (n && !('get' in n ? !e.__esModule : n.writable || n.configurable)) || - (n = { - enumerable: !0, - get: function () { - return e[r]; - }, - }), - Object.defineProperty(t, i, n); - } - : function (t, e, r, i) { - void 0 === i && (i = r), (t[i] = e[r]); - }), - n = - (this && this.__exportStar) || - function (t, e) { - for (var r in t) 'default' === r || Object.prototype.hasOwnProperty.call(e, r) || i(e, t, r); - }; - Object.defineProperty(e, '__esModule', { value: !0 }), n(r(280), e), n(r(2858), e), n(r(3307), e); - }, - 8119: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), (e.iterate = void 0); - const i = r(2451); - e.iterate = function* (t, e = 32) { - for (let r = 0; r < t.length; r += e) { - const n = t => { - (0, i.assert)(t >= 0, 'Cannot skip a negative number of bytes.'), - (0, i.assert)(t % e == 0, 'Length must be a multiple of the size.'), - (r += t); - }, - o = t.subarray(r); - yield { skip: n, value: o }; - } - return { skip: () => {}, value: new Uint8Array() }; - }; - }, - 3763: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), (e.unpack = e.pack = e.isDynamicParser = e.getParser = void 0); - const i = r(2451), - n = r(2858), - o = r(8119), - s = r(8986), - a = r(3742); - (e.getParser = t => { - const e = { - address: s.address, - array: s.array, - bool: s.bool, - bytes: s.bytes, - fixedBytes: s.fixedBytes, - function: s.fn, - number: s.number, - string: s.string, - tuple: s.tuple, - }, - r = e[t]; - if (r) return r; - const i = Object.values(e).find(e => e.isType(t)); - if (i) return i; - throw new n.ParserError(`The type "${t}" is not supported.`); - }), - (e.isDynamicParser = (t, e) => { - const { isDynamic: r } = t; - return 'function' == typeof r ? r(e) : r; - }), - (e.pack = ({ types: t, values: r, packed: o = !1, tight: s = !1, arrayPacked: h = !1, byteArray: u = new Uint8Array() }) => { - (0, i.assert)( - t.length === r.length, - new n.ParserError(`The number of types (${t.length}) does not match the number of values (${r.length}).`) - ); - const { - staticBuffer: f, - dynamicBuffer: c, - pointers: l, - } = t.reduce( - ({ staticBuffer: t, dynamicBuffer: n, pointers: a }, u, f) => { - const c = (0, e.getParser)(u), - l = r[f]; - return o || h || !(0, e.isDynamicParser)(c, u) - ? { staticBuffer: c.encode({ buffer: t, value: l, type: u, packed: o, tight: s }), dynamicBuffer: n, pointers: a } - : { - staticBuffer: (0, i.concatBytes)([t, new Uint8Array(32)]), - dynamicBuffer: c.encode({ buffer: n, value: l, type: u, packed: o, tight: s }), - pointers: [...a, { position: t.length, pointer: n.length }], - }; - }, - { staticBuffer: new Uint8Array(), dynamicBuffer: new Uint8Array(), pointers: [] } - ); - (0, i.assert)((!o && !h) || 0 === c.length, new n.ParserError('Invalid pack state.')); - const d = f.length, - p = l.reduce((t, { pointer: e, position: r }) => { - const n = (0, a.padStart)((0, i.numberToBytes)(d + e)); - return (0, a.set)(t, n, r); - }, f); - return (0, i.concatBytes)([u, p, c]); - }), - (e.unpack = (t, r) => { - const s = (0, o.iterate)(r); - return t.map(t => { - const { - value: { value: o, skip: a }, - done: h, - } = s.next(); - (0, i.assert)( - !h, - new n.ParserError( - `The encoded value is invalid for the provided types. Reached end of buffer while attempting to parse "${t}".` - ) - ); - const u = (0, e.getParser)(t); - if ((0, e.isDynamicParser)(u, t)) { - const e = (0, i.bytesToNumber)(o.subarray(0, 32)), - n = r.subarray(e); - return u.decode({ type: t, value: n, skip: a }); - } - return u.decode({ type: t, value: o, skip: a }); - }); - }); - }, - 4192: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), (e.address = e.getAddress = void 0); - const i = r(2451), - n = r(2858), - o = r(3742); - (e.getAddress = t => { - const e = (0, i.createBytes)(t); - return ( - (0, i.assert)( - e.length <= 20, - new n.ParserError(`Invalid address value. Expected address to be 20 bytes long, but received ${e.length} bytes.`) - ), - (0, o.padStart)(e, 20) - ); - }), - (e.address = { - isDynamic: !1, - isType: t => 'address' === t, - getByteLength: () => 32, - encode({ buffer: t, value: r, packed: n }) { - const s = (0, e.getAddress)(r); - if (n) return (0, i.concatBytes)([t, s]); - const a = (0, o.padStart)(s); - return (0, i.concatBytes)([t, a]); - }, - decode: ({ value: t }) => (0, i.add0x)((0, i.bytesToHex)(t.slice(12, 32))), - }); - }, - 8763: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), (e.array = e.getTupleType = e.getArrayType = e.isArrayType = void 0); - const i = r(2451), - n = r(2858), - o = r(3763), - s = r(3742), - a = r(4400), - h = r(8772), - u = /^(?.*)\[(?\d*?)\]$/u; - (e.isArrayType = t => u.test(t)), - (e.getArrayType = t => { - const e = t.match(u); - return ( - (0, i.assert)(e?.groups?.type, new n.ParserError(`Invalid array type. Expected an array type, but received "${t}".`)), - [e.groups.type, e.groups.length ? parseInt(e.groups.length, 10) : void 0] - ); - }), - (e.getTupleType = (t, e) => `(${new Array(e).fill(t).join(',')})`), - (e.array = { - isDynamic(t) { - const [r, i] = (0, e.getArrayType)(t); - return void 0 === i || (0, o.isDynamicParser)((0, o.getParser)(r), r); - }, - isType: t => (0, e.isArrayType)(t), - getByteLength(t) { - (0, i.assert)((0, e.isArrayType)(t), new n.ParserError(`Expected an array type, but received "${t}".`)); - const [r, s] = (0, e.getArrayType)(t); - return (0, o.isDynamicParser)(this, t) || void 0 === s ? 32 : h.tuple.getByteLength((0, e.getTupleType)(r, s)); - }, - encode({ type: t, buffer: r, value: u, packed: f, tight: c }) { - const [l, d] = (0, e.getArrayType)(t); - if ( - ((0, i.assert)(!f || !(0, e.isArrayType)(l), new n.ParserError('Cannot pack nested arrays.')), - f && (0, o.isDynamicParser)((0, o.getParser)(l), l)) - ) - return (0, o.pack)({ types: new Array(u.length).fill(l), values: u, byteArray: r, packed: f, arrayPacked: !0, tight: c }); - if (d) - return ( - (0, i.assert)( - d === u.length, - new n.ParserError(`Array length does not match type length. Expected a length of ${d}, but received ${u.length}.`) - ), - h.tuple.encode({ type: (0, e.getTupleType)(l, d), buffer: r, value: u, packed: a.fixedBytes.isType(l) && c, tight: c }) - ); - if (f) - return (0, o.pack)({ - types: new Array(u.length).fill(l), - values: u, - byteArray: r, - packed: a.fixedBytes.isType(l) && c, - arrayPacked: !0, - tight: c, - }); - const p = (0, s.padStart)((0, i.numberToBytes)(u.length)); - return (0, o.pack)({ - types: new Array(u.length).fill(l), - values: u, - byteArray: (0, i.concatBytes)([r, p]), - packed: f, - tight: c, - }); - }, - decode({ type: t, value: r, ...s }) { - const [a, u] = (0, e.getArrayType)(t); - if (u) { - const t = h.tuple.decode({ type: (0, e.getTupleType)(a, u), value: r, ...s }); - return ( - (0, i.assert)( - t.length === u, - new n.ParserError(`Array length does not match type length. Expected a length of ${u}, but received ${t.length}.`) - ), - t - ); - } - const f = (0, i.bytesToNumber)(r.subarray(0, 32)); - return (0, o.unpack)(new Array(f).fill(a), r.subarray(32)); - }, - }); - }, - 1299: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), (e.bool = e.getBooleanValue = void 0); - const i = r(2451), - n = r(7884), - o = r(2858), - s = r(8325), - a = (0, n.coerce)((0, n.boolean)(), (0, n.union)([(0, n.literal)('true'), (0, n.literal)('false')]), t => 'true' === t); - (e.getBooleanValue = t => { - try { - return (0, n.create)(t, a) ? BigInt(1) : BigInt(0); - } catch { - throw new o.ParserError( - `Invalid boolean value. Expected a boolean literal, or the string "true" or "false", but received "${t}".` - ); - } - }), - (e.bool = { - isDynamic: !1, - isType: t => 'bool' === t, - getByteLength: () => 32, - encode({ buffer: t, value: r, packed: n, tight: o }) { - const a = (0, e.getBooleanValue)(r); - return n - ? (0, i.concatBytes)([t, (0, i.bigIntToBytes)(a)]) - : s.number.encode({ type: 'uint256', buffer: t, value: a, packed: n, tight: o }); - }, - decode: t => s.number.decode({ ...t, type: 'uint256' }) === BigInt(1), - }); - }, - 7378: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), (e.bytes = void 0); - const i = r(2451), - n = r(3742); - e.bytes = { - isDynamic: !0, - isType: t => 'bytes' === t, - getByteLength: () => 32, - encode({ buffer: t, value: e, packed: r }) { - const o = (0, i.createBytes)(e); - if (r) return (0, i.concatBytes)([t, o]); - const s = 32 * Math.ceil(o.byteLength / 32); - return (0, i.concatBytes)([t, (0, n.padStart)((0, i.numberToBytes)(o.byteLength)), (0, n.padEnd)(o, s)]); - }, - decode({ value: t }) { - const e = t.subarray(0, 32), - r = (0, i.bytesToNumber)(e); - return t.slice(32, 32 + r); - }, - }; - }, - 4400: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), (e.fixedBytes = e.getByteLength = void 0); - const i = r(2451), - n = r(2858), - o = r(3742), - s = /^bytes([0-9]{1,2})$/u; - (e.getByteLength = t => { - const e = t.match(s)?.[1]; - (0, i.assert)(e, `Invalid byte length. Expected a number between 1 and 32, but received "${t}".`); - const r = Number(e); - return ( - (0, i.assert)( - r > 0 && r <= 32, - new n.ParserError(`Invalid byte length. Expected a number between 1 and 32, but received "${t}".`) - ), - r - ); - }), - (e.fixedBytes = { - isDynamic: !1, - isType: t => s.test(t), - getByteLength: () => 32, - encode({ type: t, buffer: r, value: s, packed: a }) { - const h = (0, e.getByteLength)(t), - u = (0, i.createBytes)(s); - return ( - (0, i.assert)( - u.length <= h, - new n.ParserError(`Expected a value of length ${h}, but received a value of length ${u.length}.`) - ), - a ? (0, i.concatBytes)([r, (0, o.padEnd)(u, h)]) : (0, i.concatBytes)([r, (0, o.padEnd)(u)]) - ); - }, - decode({ type: t, value: r }) { - const i = (0, e.getByteLength)(t); - return r.slice(0, i); - }, - }); - }, - 9129: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), (e.fn = e.getFunction = void 0); - const i = r(2451), - n = r(7884), - o = r(2858), - s = r(4400), - a = (0, n.coerce)( - (0, n.object)({ address: i.StrictHexStruct, selector: i.StrictHexStruct }), - (0, n.union)([i.StrictHexStruct, (0, n.instance)(Uint8Array)]), - t => { - const e = (0, i.createBytes)(t); - return ( - (0, i.assert)( - 24 === e.length, - new o.ParserError(`Invalid Solidity function. Expected function to be 24 bytes long, but received ${e.length} bytes.`) - ), - { address: (0, i.bytesToHex)(e.subarray(0, 20)), selector: (0, i.bytesToHex)(e.subarray(20, 24)) } - ); - } - ); - (e.getFunction = t => { - const e = (0, n.create)(t, a); - return (0, i.concatBytes)([(0, i.hexToBytes)(e.address), (0, i.hexToBytes)(e.selector)]); - }), - (e.fn = { - isDynamic: !1, - isType: t => 'function' === t, - getByteLength: () => 32, - encode({ buffer: t, value: r, packed: i, tight: n }) { - const o = (0, e.getFunction)(r); - return s.fixedBytes.encode({ type: 'bytes24', buffer: t, value: o, packed: i, tight: n }); - }, - decode: ({ value: t }) => ({ address: (0, i.bytesToHex)(t.slice(0, 20)), selector: (0, i.bytesToHex)(t.slice(20, 24)) }), - }); - }, - 8986: function (t, e, r) { - 'use strict'; - var i = - (this && this.__createBinding) || - (Object.create - ? function (t, e, r, i) { - void 0 === i && (i = r); - var n = Object.getOwnPropertyDescriptor(e, r); - (n && !('get' in n ? !e.__esModule : n.writable || n.configurable)) || - (n = { - enumerable: !0, - get: function () { - return e[r]; - }, - }), - Object.defineProperty(t, i, n); - } - : function (t, e, r, i) { - void 0 === i && (i = r), (t[i] = e[r]); - }), - n = - (this && this.__exportStar) || - function (t, e) { - for (var r in t) 'default' === r || Object.prototype.hasOwnProperty.call(e, r) || i(e, t, r); - }; - Object.defineProperty(e, '__esModule', { value: !0 }), - n(r(4192), e), - n(r(8763), e), - n(r(1299), e), - n(r(7378), e), - n(r(4400), e), - n(r(9129), e), - n(r(8325), e), - n(r(8012), e), - n(r(1869), e), - n(r(8772), e); - }, - 8325: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), - (e.number = e.getBigInt = e.assertNumberLength = e.getLength = e.isSigned = void 0); - const i = r(2451), - n = r(2858), - o = r(3742), - s = /^u?int(?[0-9]*)?$/u; - (e.isSigned = t => !t.startsWith('u')), - (e.getLength = t => { - if ('int' === t || 'uint' === t) return 256; - const e = t.match(s); - (0, i.assert)(e?.groups?.length, new n.ParserError(`Invalid number type. Expected a number type, but received "${t}".`)); - const r = parseInt(e.groups.length, 10); - return ( - (0, i.assert)( - r >= 8 && r <= 256, - new n.ParserError(`Invalid number length. Expected a number between 8 and 256, but received "${t}".`) - ), - (0, i.assert)(r % 8 == 0, new n.ParserError(`Invalid number length. Expected a multiple of 8, but received "${t}".`)), - r - ); - }), - (e.assertNumberLength = (t, r) => { - const o = (0, e.getLength)(r), - s = BigInt(2) ** BigInt(o - ((0, e.isSigned)(r) ? 1 : 0)) - BigInt(1); - (0, e.isSigned)(r) - ? (0, i.assert)(t >= -(s + BigInt(1)) && t <= s, new n.ParserError(`Number "${t}" is out of range for type "${r}".`)) - : (0, i.assert)(t <= s, new n.ParserError(`Number "${t}" is out of range for type "${r}".`)); - }), - (e.getBigInt = t => { - try { - return (0, i.createBigInt)(t); - } catch { - throw new n.ParserError(`Invalid number. Expected a valid number value, but received "${t}".`); - } - }), - (e.number = { - isDynamic: !1, - isType: t => s.test(t), - getByteLength: () => 32, - encode({ type: t, buffer: r, value: n, packed: s }) { - const a = (0, e.getBigInt)(n); - if (((0, e.assertNumberLength)(a, t), (0, e.isSigned)(t))) { - if (s) { - const n = (0, e.getLength)(t) / 8; - return (0, i.concatBytes)([r, (0, i.signedBigIntToBytes)(a, n)]); - } - return (0, i.concatBytes)([r, (0, o.padStart)((0, i.signedBigIntToBytes)(a, 32))]); - } - if (s) { - const n = (0, e.getLength)(t) / 8; - return (0, i.concatBytes)([r, (0, o.padStart)((0, i.bigIntToBytes)(a), n)]); - } - return (0, i.concatBytes)([r, (0, o.padStart)((0, i.bigIntToBytes)(a))]); - }, - decode({ type: t, value: r }) { - const n = r.subarray(0, 32); - if ((0, e.isSigned)(t)) { - const r = (0, i.bytesToSignedBigInt)(n); - return (0, e.assertNumberLength)(r, t), r; - } - const o = (0, i.bytesToBigInt)(n); - return (0, e.assertNumberLength)(o, t), o; - }, - }); - }, - 8012: (t, e) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }); - }, - 1869: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), (e.string = void 0); - const i = r(2451), - n = r(7378); - e.string = { - isDynamic: !0, - isType: t => 'string' === t, - getByteLength: () => 32, - encode: ({ buffer: t, value: e, packed: r, tight: o }) => - n.bytes.encode({ type: 'bytes', buffer: t, value: (0, i.stringToBytes)(e), packed: r, tight: o }), - decode: t => (0, i.bytesToString)(n.bytes.decode(t)), - }; - }, - 8772: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), (e.tuple = e.getTupleElements = void 0); - const i = r(2451), - n = r(2858), - o = r(3763), - s = /^\((.+)\)$/u; - (e.getTupleElements = t => { - (0, i.assert)( - t.startsWith('(') && t.endsWith(')'), - new n.ParserError(`Invalid tuple type. Expected tuple type, but received "${t}".`) - ); - const e = []; - let r = '', - o = 0; - for (let i = 1; i < t.length - 1; i++) { - const n = t[i]; - ',' === n && 0 === o ? (e.push(r.trim()), (r = '')) : ((r += n), '(' === n ? (o += 1) : ')' === n && (o -= 1)); - } - return r.trim() && e.push(r.trim()), e; - }), - (e.tuple = { - isDynamic: t => - (0, e.getTupleElements)(t).some(t => { - const e = (0, o.getParser)(t); - return (0, o.isDynamicParser)(e, t); - }), - isType: t => (t => s.test(t))(t), - getByteLength(t) { - return (0, o.isDynamicParser)(this, t) - ? 32 - : (0, e.getTupleElements)(t).reduce((t, e) => t + (0, o.getParser)(e).getByteLength(e), 0); - }, - encode({ type: t, buffer: r, value: i, packed: n, tight: s }) { - const a = (0, e.getTupleElements)(t); - return (0, o.pack)({ types: a, values: i, byteArray: r, packed: n, tight: s }); - }, - decode({ type: t, value: r, skip: i }) { - const n = (0, e.getTupleElements)(t); - return i(this.getByteLength(t) - 32), (0, o.unpack)(n, r); - }, - }); - }, - 4460: (t, e) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }); - }, - 3307: function (t, e, r) { - 'use strict'; - var i = - (this && this.__createBinding) || - (Object.create - ? function (t, e, r, i) { - void 0 === i && (i = r); - var n = Object.getOwnPropertyDescriptor(e, r); - (n && !('get' in n ? !e.__esModule : n.writable || n.configurable)) || - (n = { - enumerable: !0, - get: function () { - return e[r]; - }, - }), - Object.defineProperty(t, i, n); - } - : function (t, e, r, i) { - void 0 === i && (i = r), (t[i] = e[r]); - }), - n = - (this && this.__exportStar) || - function (t, e) { - for (var r in t) 'default' === r || Object.prototype.hasOwnProperty.call(e, r) || i(e, t, r); - }; - Object.defineProperty(e, '__esModule', { value: !0 }), n(r(4460), e); - }, - 4979: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), (e.padEnd = e.padStart = e.set = void 0); - const i = r(2451); - (e.set = (t, e, r) => (0, i.concatBytes)([t.subarray(0, r), e, t.subarray(r + e.length)])), - (e.padStart = (t, e = 32) => { - const r = new Uint8Array(Math.max(e - t.length, 0)).fill(0); - return (0, i.concatBytes)([r, t]); - }), - (e.padEnd = (t, e = 32) => { - const r = new Uint8Array(Math.max(e - t.length, 0)).fill(0); - return (0, i.concatBytes)([t, r]); - }); - }, - 3742: function (t, e, r) { - 'use strict'; - var i = - (this && this.__createBinding) || - (Object.create - ? function (t, e, r, i) { - void 0 === i && (i = r); - var n = Object.getOwnPropertyDescriptor(e, r); - (n && !('get' in n ? !e.__esModule : n.writable || n.configurable)) || - (n = { - enumerable: !0, - get: function () { - return e[r]; - }, - }), - Object.defineProperty(t, i, n); - } - : function (t, e, r, i) { - void 0 === i && (i = r), (t[i] = e[r]); - }), - n = - (this && this.__exportStar) || - function (t, e) { - for (var r in t) 'default' === r || Object.prototype.hasOwnProperty.call(e, r) || i(e, t, r); - }; - Object.defineProperty(e, '__esModule', { value: !0 }), n(r(4979), e); - }, - 6982: function (t, e, r) { - 'use strict'; - var i = - (this && this.__createBinding) || - (Object.create - ? function (t, e, r, i) { - void 0 === i && (i = r); - var n = Object.getOwnPropertyDescriptor(e, r); - (n && !('get' in n ? !e.__esModule : n.writable || n.configurable)) || - (n = { - enumerable: !0, - get: function () { - return e[r]; - }, - }), - Object.defineProperty(t, i, n); - } - : function (t, e, r, i) { - void 0 === i && (i = r), (t[i] = e[r]); - }), - n = - (this && this.__setModuleDefault) || - (Object.create - ? function (t, e) { - Object.defineProperty(t, 'default', { enumerable: !0, value: e }); - } - : function (t, e) { - t.default = e; - }), - o = - (this && this.__importStar) || - function (t) { - if (t && t.__esModule) return t; - var e = {}; - if (null != t) for (var r in t) 'default' !== r && Object.prototype.hasOwnProperty.call(t, r) && i(e, t, r); - return n(e, t), e; - }; - Object.defineProperty(e, '__esModule', { value: !0 }), - (e.getEncryptionPublicKey = e.decryptSafely = e.decrypt = e.encryptSafely = e.encrypt = void 0); - const s = o(r(780)), - a = o(r(6885)), - h = r(3275); - function u({ publicKey: t, data: e, version: r }) { - if ((0, h.isNullish)(t)) throw new Error('Missing publicKey parameter'); - if ((0, h.isNullish)(e)) throw new Error('Missing data parameter'); - if ((0, h.isNullish)(r)) throw new Error('Missing version parameter'); - if ('x25519-xsalsa20-poly1305' === r) { - if ('string' != typeof e) throw new Error('Message data must be given as a string'); - const r = s.box.keyPair(); - let i; - try { - i = a.decodeBase64(t); - } catch (t) { - throw new Error('Bad public key'); - } - const n = a.decodeUTF8(e), - o = s.randomBytes(s.box.nonceLength), - h = s.box(n, o, i, r.secretKey); - return { - version: 'x25519-xsalsa20-poly1305', - nonce: a.encodeBase64(o), - ephemPublicKey: a.encodeBase64(r.publicKey), - ciphertext: a.encodeBase64(h), - }; - } - throw new Error('Encryption type/version not supported'); - } - function f({ encryptedData: t, privateKey: e }) { - if ((0, h.isNullish)(t)) throw new Error('Missing encryptedData parameter'); - if ((0, h.isNullish)(e)) throw new Error('Missing privateKey parameter'); - if ('x25519-xsalsa20-poly1305' === t.version) { - const r = c(e), - i = s.box.keyPair.fromSecretKey(r).secretKey, - n = a.decodeBase64(t.nonce), - o = a.decodeBase64(t.ciphertext), - h = a.decodeBase64(t.ephemPublicKey), - u = s.box.open(o, n, h, i); - try { - if (!u) throw new Error(); - const t = a.encodeUTF8(u); - if (!t) throw new Error(); - return t; - } catch (t) { - if (t && 'string' == typeof t.message && t.message.length) throw new Error(`Decryption failed: ${t.message}`); - throw new Error('Decryption failed.'); - } - } - throw new Error('Encryption type/version not supported.'); - } - function c(t) { - const e = Buffer.from(t, 'hex').toString('base64'); - return a.decodeBase64(e); - } - (e.encrypt = u), - (e.encryptSafely = function ({ publicKey: t, data: e, version: r }) { - if ((0, h.isNullish)(t)) throw new Error('Missing publicKey parameter'); - if ((0, h.isNullish)(e)) throw new Error('Missing data parameter'); - if ((0, h.isNullish)(r)) throw new Error('Missing version parameter'); - if ('object' == typeof e && e && 'toJSON' in e) - throw new Error('Cannot encrypt with toJSON property. Please remove toJSON property'); - const i = { data: e, padding: '' }, - n = Buffer.byteLength(JSON.stringify(i), 'utf-8') % 2048; - let o = 0; - return n > 0 && (o = 2048 - n - 16), (i.padding = '0'.repeat(o)), u({ publicKey: t, data: JSON.stringify(i), version: r }); - }), - (e.decrypt = f), - (e.decryptSafely = function ({ encryptedData: t, privateKey: e }) { - if ((0, h.isNullish)(t)) throw new Error('Missing encryptedData parameter'); - if ((0, h.isNullish)(e)) throw new Error('Missing privateKey parameter'); - return JSON.parse(f({ encryptedData: t, privateKey: e })).data; - }), - (e.getEncryptionPublicKey = function (t) { - const e = c(t), - r = s.box.keyPair.fromSecretKey(e).publicKey; - return a.encodeBase64(r); - }); - }, - 1091: function (t, e, r) { - 'use strict'; - var i = - (this && this.__createBinding) || - (Object.create - ? function (t, e, r, i) { - void 0 === i && (i = r); - var n = Object.getOwnPropertyDescriptor(e, r); - (n && !('get' in n ? !e.__esModule : n.writable || n.configurable)) || - (n = { - enumerable: !0, - get: function () { - return e[r]; - }, - }), - Object.defineProperty(t, i, n); - } - : function (t, e, r, i) { - void 0 === i && (i = r), (t[i] = e[r]); - }), - n = - (this && this.__exportStar) || - function (t, e) { - for (var r in t) 'default' === r || Object.prototype.hasOwnProperty.call(e, r) || i(e, t, r); - }; - Object.defineProperty(e, '__esModule', { value: !0 }), - (e.normalize = e.concatSig = void 0), - n(r(3066), e), - n(r(2853), e), - n(r(6982), e); - var o = r(3275); - Object.defineProperty(e, 'concatSig', { - enumerable: !0, - get: function () { - return o.concatSig; - }, - }), - Object.defineProperty(e, 'normalize', { - enumerable: !0, - get: function () { - return o.normalize; - }, - }); - }, - 3066: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), (e.extractPublicKey = e.recoverPersonalSignature = e.personalSign = void 0); - const i = r(2730), - n = r(3275); - function o(t, e) { - const r = (0, i.hashPersonalMessage)((0, n.legacyToBuffer)(t)); - return (0, n.recoverPublicKey)(r, e); - } - (e.personalSign = function ({ privateKey: t, data: e }) { - if ((0, n.isNullish)(e)) throw new Error('Missing data parameter'); - if ((0, n.isNullish)(t)) throw new Error('Missing privateKey parameter'); - const r = (0, n.legacyToBuffer)(e), - o = (0, i.hashPersonalMessage)(r), - s = (0, i.ecsign)(o, t); - return (0, n.concatSig)((0, i.toBuffer)(s.v), s.r, s.s); - }), - (e.recoverPersonalSignature = function ({ data: t, signature: e }) { - if ((0, n.isNullish)(t)) throw new Error('Missing data parameter'); - if ((0, n.isNullish)(e)) throw new Error('Missing signature parameter'); - const r = o(t, e), - s = (0, i.publicToAddress)(r); - return (0, i.bufferToHex)(s); - }), - (e.extractPublicKey = function ({ data: t, signature: e }) { - if ((0, n.isNullish)(t)) throw new Error('Missing data parameter'); - if ((0, n.isNullish)(e)) throw new Error('Missing signature parameter'); - return `0x${o(t, e).toString('hex')}`; - }); - }, - 2853: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), - (e.recoverTypedSignature = - e.signTypedData = - e.typedSignatureHash = - e.TypedDataUtils = - e.TYPED_MESSAGE_SCHEMA = - e.SignTypedDataVersion = - void 0); - const i = r(2730), - n = r(8009), - o = r(8986), - s = r(3742), - a = r(2451), - h = r(2145), - u = r(3275); - var f; - function c(t, e) { - if (!Object.keys(f).includes(t)) throw new Error(`Invalid version: '${t}'`); - if (e && !e.includes(t)) throw new Error(`SignTypedDataVersion not allowed: '${t}'. Allowed versions are: ${e.join(', ')}`); - } - function l(t, e) { - (0, a.assert)(null !== e, `Unable to encode value: Invalid number. Expected a valid number value, but received "${e}".`); - const r = BigInt(e), - i = (0, o.getLength)(t), - n = BigInt(2) ** BigInt(i) - BigInt(1); - return (0, a.assert)(r >= -n && r <= n, `Unable to encode value: Number "${e}" is out of range for type "${t}".`), r; - } - function d(t) { - let e = BigInt(0); - for (let r = 0; r < t.length; r++) { - const i = BigInt(t.charCodeAt(r) - 48); - (e *= BigInt(10)), (e += i >= 49 ? i - BigInt(49) + BigInt(10) : i >= 17 ? i - BigInt(17) + BigInt(10) : i); - } - return (0, s.padStart)((0, a.bigIntToBytes)(e), 20); - } - function p(t, e, r, o, u) { - if ((c(u, [f.V3, f.V4]), void 0 !== t[r])) - return [ - 'bytes32', - u === f.V4 && null == o - ? '0x0000000000000000000000000000000000000000000000000000000000000000' - : (0, i.arrToBufArr)((0, h.keccak256)(m(r, o, t, u))), - ]; - if ('function' === r) throw new Error('Unsupported or invalid type: "function"'); - if (void 0 === o) throw new Error(`missing value for field ${e} of type ${r}`); - if ('address' === r) { - if ('number' == typeof o) return ['address', (0, s.padStart)((0, a.numberToBytes)(o), 20)]; - if ((0, a.isStrictHexString)(o)) return ['address', (0, a.add0x)(o)]; - if ('string' == typeof o) return ['address', d(o).subarray(0, 20)]; - } - if ('bool' === r) return ['bool', Boolean(o)]; - if ('bytes' === r) - return ( - 'number' == typeof o - ? (o = (0, a.numberToBytes)(o)) - : (0, a.isStrictHexString)(o) || '0x' === o - ? (o = (0, a.hexToBytes)(o)) - : 'string' == typeof o && (o = (0, a.stringToBytes)(o)), - ['bytes32', (0, i.arrToBufArr)((0, h.keccak256)(o))] - ); - if (r.startsWith('bytes') && 'bytes' !== r && !r.includes('[')) - return 'number' == typeof o - ? o < 0 - ? ['bytes32', new Uint8Array(32)] - : ['bytes32', (0, a.bigIntToBytes)(BigInt(o))] - : (0, a.isStrictHexString)(o) - ? ['bytes32', (0, a.hexToBytes)(o)] - : ['bytes32', o]; - if (r.startsWith('int') && !r.includes('[')) { - const t = l(r, o); - return t >= BigInt(0) ? ['uint256', t] : ['int256', t]; - } - if ('string' === r) - return ( - (o = 'number' == typeof o ? (0, a.numberToBytes)(o) : (0, a.stringToBytes)(null != o ? o : '')), - ['bytes32', (0, i.arrToBufArr)((0, h.keccak256)(o))] - ); - if (r.endsWith(']')) { - if (u === f.V3) throw new Error('Arrays are unimplemented in encodeData; use V4 extension'); - const s = r.slice(0, r.lastIndexOf('[')), - a = o.map(r => p(t, e, s, r, u)); - return [ - 'bytes32', - (0, i.arrToBufArr)( - (0, h.keccak256)( - (0, n.encode)( - a.map(([t]) => t), - a.map(([, t]) => t) - ) - ) - ), - ]; - } - return [r, o]; - } - function m(t, e, r, o) { - c(o, [f.V3, f.V4]); - const s = ['bytes32'], - a = [v(t, r)]; - for (const i of r[t]) { - if (o === f.V3 && void 0 === e[i.name]) continue; - const [t, n] = p(r, i.name, i.type, e[i.name], o); - s.push(t), a.push(n); - } - return (0, i.arrToBufArr)((0, n.encode)(s, a)); - } - function g(t, e) { - let r = ''; - const i = b(t, e); - i.delete(t); - const n = [t, ...Array.from(i).sort()]; - for (const t of n) { - if (!e[t]) throw new Error(`No type definition specified: ${t}`); - r += `${t}(${e[t].map(({ name: t, type: e }) => `${e} ${t}`).join(',')})`; - } - return r; - } - function b(t, e, r = new Set()) { - if ('string' != typeof t) throw new Error(`Invalid findTypeDependencies input ${JSON.stringify(t)}`); - const i = t.match(/^\w*/u); - if ((([t] = i), r.has(t) || void 0 === e[t])) return r; - r.add(t); - for (const i of e[t]) b(i.type, e, r); - return r; - } - function y(t, e, r, n) { - c(n, [f.V3, f.V4]); - const o = m(t, e, r, n), - s = (0, h.keccak256)(o); - return (0, i.arrToBufArr)(s); - } - function v(t, e) { - const r = (0, a.stringToBytes)(g(t, e)); - return (0, i.arrToBufArr)((0, h.keccak256)(r)); - } - function w(t) { - const r = {}; - for (const i in e.TYPED_MESSAGE_SCHEMA.properties) t[i] && (r[i] = t[i]); - return 'types' in r && (r.types = Object.assign({ EIP712Domain: [] }, r.types)), r; - } - function _(t, e) { - c(e, [f.V3, f.V4]); - const r = w(t), - { domain: i } = r; - return y('EIP712Domain', i, { EIP712Domain: r.types.EIP712Domain }, e); - } - function M(t, e) { - if ((0, o.isArrayType)(t) && Array.isArray(e)) { - const [r] = (0, o.getArrayType)(t); - return e.map(t => M(r, t)); - } - if ('address' === t) { - if ('number' == typeof e) return (0, s.padStart)((0, a.numberToBytes)(e), 20); - if ((0, a.isStrictHexString)(e)) return (0, s.padStart)((0, a.hexToBytes)(e).subarray(0, 20), 20); - if (e instanceof Uint8Array) return (0, s.padStart)(e.subarray(0, 20), 20); - } - if ('bool' === t) return Boolean(e); - if (t.startsWith('bytes') && 'bytes' !== t) { - const r = (0, o.getByteLength)(t); - if ('number' == typeof e) return e < 0 ? new Uint8Array() : (0, a.numberToBytes)(e).subarray(0, r); - if ((0, a.isStrictHexString)(e)) return (0, a.hexToBytes)(e).subarray(0, r); - if (e instanceof Uint8Array) return e.subarray(0, r); - } - if (t.startsWith('uint') && 'number' == typeof e) return Math.abs(e); - if (t.startsWith('int') && 'number' == typeof e) { - const r = (0, o.getLength)(t); - return BigInt.asIntN(r, BigInt(e)); - } - return e; - } - function E(t, e) { - return e.map(e => { - if ('string' == typeof e || 'number' == typeof e || 'bigint' == typeof e) { - const r = l(t, e); - if (r >= BigInt(0)) return (0, s.padStart)((0, a.bigIntToBytes)(r), 32); - const i = (0, o.getLength)(t), - n = BigInt.asIntN(i, r); - return (0, a.signedBigIntToBytes)(n, 32); - } - return e; - }); - } - function S(t) { - const e = new Error('Expect argument to be non-empty array'); - if ('object' != typeof t || !('length' in t) || !t.length) throw e; - const r = t.map(({ name: t, type: e, value: r }) => { - if ('address[]' === e) - return { - name: t, - type: 'bytes32[]', - value: - ((i = r), - i.map(t => - 'number' == typeof t - ? (0, s.padStart)((0, a.numberToBytes)(t), 32) - : (0, a.isStrictHexString)(t) - ? (0, s.padStart)((0, a.hexToBytes)(t).subarray(0, 32), 32) - : t instanceof Uint8Array - ? (0, s.padStart)(t.subarray(0, 32), 32) - : t - )), - }; - var i; - if (e.startsWith('int') && (0, o.isArrayType)(e)) { - const [i, n] = (0, o.getArrayType)(e); - return { name: t, type: `bytes32[${null != n ? n : ''}]`, value: E(i, r) }; - } - return { name: t, type: e, value: M(e, r) }; - }), - f = r.map(t => ('bytes' !== t.type ? t.value : (0, u.legacyToBuffer)(t.value))), - c = r.map(t => { - if ('function' === t.type) throw new Error('Unsupported or invalid type: "function"'); - return t.type; - }), - l = t.map(t => { - if (!t.name) throw e; - return `${t.type} ${t.name}`; - }); - return (0, i.arrToBufArr)( - (0, h.keccak256)( - (0, n.encodePacked)( - ['bytes32', 'bytes32'], - [(0, h.keccak256)((0, n.encodePacked)(['string[]'], [l], !0)), (0, h.keccak256)((0, n.encodePacked)(c, f, !0))] - ) - ) - ); - } - !(function (t) { - (t.V1 = 'V1'), (t.V3 = 'V3'), (t.V4 = 'V4'); - })((f = e.SignTypedDataVersion || (e.SignTypedDataVersion = {}))), - (e.TYPED_MESSAGE_SCHEMA = { - type: 'object', - properties: { - types: { - type: 'object', - additionalProperties: { - type: 'array', - items: { type: 'object', properties: { name: { type: 'string' }, type: { type: 'string' } }, required: ['name', 'type'] }, - }, - }, - primaryType: { type: 'string' }, - domain: { type: 'object' }, - message: { type: 'object' }, - }, - required: ['types', 'primaryType', 'domain', 'message'], - }), - (e.TypedDataUtils = { - encodeData: m, - encodeType: g, - findTypeDependencies: b, - hashStruct: y, - hashType: v, - sanitizeData: w, - eip712Hash: function (t, e) { - c(e, [f.V3, f.V4]); - const r = w(t), - n = [(0, a.hexToBytes)('1901')]; - return ( - n.push(_(t, e)), - 'EIP712Domain' !== r.primaryType && n.push(y(r.primaryType, r.message, r.types, e)), - (0, i.arrToBufArr)((0, h.keccak256)((0, a.concatBytes)(n))) - ); - }, - eip712DomainHash: _, - }), - (e.typedSignatureHash = function (t) { - const e = S(t); - return (0, a.bytesToHex)(e); - }), - (e.signTypedData = function ({ privateKey: t, data: r, version: n }) { - if ((c(n), (0, u.isNullish)(r))) throw new Error('Missing data parameter'); - if ((0, u.isNullish)(t)) throw new Error('Missing private key parameter'); - const o = n === f.V1 ? S(r) : e.TypedDataUtils.eip712Hash(r, n), - s = (0, i.ecsign)(o, t); - return (0, u.concatSig)((0, i.arrToBufArr)((0, a.bigIntToBytes)(s.v)), s.r, s.s); - }), - (e.recoverTypedSignature = function ({ data: t, signature: r, version: n }) { - if ((c(n), (0, u.isNullish)(t))) throw new Error('Missing data parameter'); - if ((0, u.isNullish)(r)) throw new Error('Missing signature parameter'); - const o = n === f.V1 ? S(t) : e.TypedDataUtils.eip712Hash(t, n), - s = (0, u.recoverPublicKey)(o, r), - h = (0, i.publicToAddress)(s); - return (0, a.bytesToHex)(h); - }); - }, - 3275: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), - (e.normalize = e.recoverPublicKey = e.concatSig = e.legacyToBuffer = e.isNullish = e.padWithZeroes = void 0); - const i = r(2730), - n = r(2451); - function o(t, e) { - if ('' !== t && !/^[a-f0-9]+$/iu.test(t)) throw new Error(`Expected an unprefixed hex string. Received: ${t}`); - if (e < 0) throw new Error(`Expected a non-negative integer target length. Received: ${e}`); - return String.prototype.padStart.call(t, e, '0'); - } - function s(t) { - return null == t; - } - (e.padWithZeroes = o), - (e.isNullish = s), - (e.legacyToBuffer = function (t) { - return 'string' != typeof t || (0, i.isHexString)(t) ? (0, i.toBuffer)(t) : Buffer.from(t); - }), - (e.concatSig = function (t, e, r) { - const s = (0, i.fromSigned)(e), - a = (0, i.fromSigned)(r), - h = (0, i.bufferToInt)(t), - u = o((0, i.toUnsigned)(s).toString('hex'), 64), - f = o((0, i.toUnsigned)(a).toString('hex'), 64), - c = (0, n.remove0x)((0, n.numberToHex)(h)); - return (0, n.add0x)(u.concat(f, c)); - }), - (e.recoverPublicKey = function (t, e) { - const r = (0, i.fromRpcSig)(e); - return (0, i.ecrecover)(t, r.v, r.r, r.s); - }), - (e.normalize = function (t) { - if (!s(t)) { - if ('number' == typeof t) { - if (t < 0) return '0x'; - const e = (0, n.numberToBytes)(t); - t = (0, n.bytesToHex)(e); - } - if ('string' != typeof t) { - let e = 'eth-sig-util.normalize() requires hex string or integer input.'; - throw ((e += ` received ${typeof t}: ${t}`), new Error(e)); - } - return (0, n.add0x)(t.toLowerCase()); - } - }); - }, - 2145: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), (e.keccak512 = e.keccak384 = e.keccak256 = e.keccak224 = void 0); - const i = r(5426), - n = r(664); - (e.keccak224 = (0, n.wrapHash)(i.keccak_224)), - (e.keccak256 = (() => { - const t = (0, n.wrapHash)(i.keccak_256); - return (t.create = i.keccak_256.create), t; - })()), - (e.keccak384 = (0, n.wrapHash)(i.keccak_384)), - (e.keccak512 = (0, n.wrapHash)(i.keccak_512)); - }, - 664: function (t, e, r) { - 'use strict'; - t = r.nmd(t); - var i = - (this && this.__importDefault) || - function (t) { - return t && t.__esModule ? t : { default: t }; - }; - Object.defineProperty(e, '__esModule', { value: !0 }), - (e.crypto = - e.wrapHash = - e.equalsBytes = - e.hexToBytes = - e.bytesToUtf8 = - e.utf8ToBytes = - e.createView = - e.concatBytes = - e.toHex = - e.bytesToHex = - e.assertBytes = - e.assertBool = - void 0); - const n = i(r(7320)), - o = r(8089), - s = n.default.bool; - e.assertBool = s; - const a = n.default.bytes; - e.assertBytes = a; - var h = r(8089); - Object.defineProperty(e, 'bytesToHex', { - enumerable: !0, - get: function () { - return h.bytesToHex; - }, - }), - Object.defineProperty(e, 'toHex', { - enumerable: !0, - get: function () { - return h.bytesToHex; - }, - }), - Object.defineProperty(e, 'concatBytes', { - enumerable: !0, - get: function () { - return h.concatBytes; - }, - }), - Object.defineProperty(e, 'createView', { - enumerable: !0, - get: function () { - return h.createView; - }, - }), - Object.defineProperty(e, 'utf8ToBytes', { - enumerable: !0, - get: function () { - return h.utf8ToBytes; - }, - }), - (e.bytesToUtf8 = function (t) { - if (!(t instanceof Uint8Array)) throw new TypeError('bytesToUtf8 expected Uint8Array, got ' + typeof t); - return new TextDecoder().decode(t); - }), - (e.hexToBytes = function (t) { - const e = t.startsWith('0x') ? t.substring(2) : t; - return (0, o.hexToBytes)(e); - }), - (e.equalsBytes = function (t, e) { - if (t.length !== e.length) return !1; - for (let r = 0; r < t.length; r++) if (t[r] !== e[r]) return !1; - return !0; - }), - (e.wrapHash = function (t) { - return e => (n.default.bytes(e), t(e)); - }), - (e.crypto = (() => { - const e = 'object' == typeof globalThis && 'crypto' in globalThis ? globalThis.crypto : void 0, - r = 'function' == typeof t.require && t.require.bind(t); - return { node: r && !e ? r('crypto') : void 0, web: e }; - })()); - }, - 708: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }); - var i, - n = ((i = r(1227)) && i.__esModule ? i : { default: i }).default.call(void 0, 'metamask'); - (e.createProjectLogger = function (t) { - return n.extend(t); - }), - (e.createModuleLogger = function (t, e) { - return t.extend(e); - }); - }, - 4466: (t, e) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }); - var r = (t, e, r) => { - if (!e.has(t)) throw TypeError('Cannot ' + r); - }; - (e.__privateGet = (t, e, i) => (r(t, e, 'read from private field'), i ? i.call(t) : e.get(t))), - (e.__privateAdd = (t, e, r) => { - if (e.has(t)) throw TypeError('Cannot add the same private member more than once'); - e instanceof WeakSet ? e.add(t) : e.set(t, r); - }), - (e.__privateSet = (t, e, i, n) => (r(t, e, 'write to private field'), n ? n.call(t, i) : e.set(t, i), i)); - }, - 3889: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }); - var i = r(593), - n = r(1249), - o = r(7884), - s = o.refine.call( - void 0, - o.string.call(void 0), - 'Version', - t => null !== n.valid.call(void 0, t) || `Expected SemVer version, got "${t}"` - ), - a = o.refine.call( - void 0, - o.string.call(void 0), - 'Version range', - t => null !== n.validRange.call(void 0, t) || `Expected SemVer range, got "${t}"` - ); - (e.VersionStruct = s), - (e.VersionRangeStruct = a), - (e.isValidSemVerVersion = function (t) { - return o.is.call(void 0, t, s); - }), - (e.isValidSemVerRange = function (t) { - return o.is.call(void 0, t, a); - }), - (e.assertIsSemVerVersion = function (t) { - i.assertStruct.call(void 0, t, s); - }), - (e.assertIsSemVerRange = function (t) { - i.assertStruct.call(void 0, t, a); - }), - (e.gtVersion = function (t, e) { - return n.gt.call(void 0, t, e); - }), - (e.gtRange = function (t, e) { - return n.gtr.call(void 0, t, e); - }), - (e.satisfiesVersionRange = function (t, e) { - return n.satisfies.call(void 0, t, e, { includePrerelease: !0 }); - }); - }, - 6587: (t, e) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), - (e.createDeferredPromise = function ({ suppressUnhandledRejection: t = !1 } = {}) { - let e, r; - const i = new Promise((t, i) => { - (e = t), (r = i); - }); - return t && i.catch(t => {}), { promise: i, resolve: e, reject: r }; - }); - }, - 5671: (t, e) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }); - var r = (t => ( - (t[(t.Millisecond = 1)] = 'Millisecond'), - (t[(t.Second = 1e3)] = 'Second'), - (t[(t.Minute = 6e4)] = 'Minute'), - (t[(t.Hour = 36e5)] = 'Hour'), - (t[(t.Day = 864e5)] = 'Day'), - (t[(t.Week = 6048e5)] = 'Week'), - (t[(t.Year = 31536e6)] = 'Year'), - t - ))(r || {}), - i = (t, e) => { - if (!(t => Number.isInteger(t) && t >= 0)(t)) throw new Error(`"${e}" must be a non-negative integer. Received: "${t}".`); - }; - (e.Duration = r), - (e.inMilliseconds = function (t, e) { - return i(t, 'count'), t * e; - }), - (e.timeSince = function (t) { - return i(t, 'timestamp'), Date.now() - t; - }); - }, - 7479: () => {}, - 5217: (t, e, r) => { - 'use strict'; - function i(t, e) { - return null != t ? t : e(); - } - Object.defineProperty(e, '__esModule', { value: !0 }); - var n = r(593), - o = r(7884); - e.base64 = (t, e = {}) => { - const r = i(e.paddingRequired, () => !1), - s = i(e.characterSet, () => 'base64'); - let a, h; - return ( - 'base64' === s ? (a = String.raw`[A-Za-z0-9+\/]`) : (n.assert.call(void 0, 'base64url' === s), (a = String.raw`[-_A-Za-z0-9]`)), - (h = r - ? new RegExp(`^(?:${a}{4})*(?:${a}{3}=|${a}{2}==)?$`, 'u') - : new RegExp(`^(?:${a}{4})*(?:${a}{2,3}|${a}{3}=|${a}{2}==)?$`, 'u')), - o.pattern.call(void 0, t, h) - ); - }; - }, - 593: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }); - var i = r(2173), - n = r(7884); - function o(t, e) { - return Boolean( - 'string' == - typeof (function (t) { - let e, - r = t[0], - i = 1; - for (; i < t.length; ) { - const n = t[i], - o = t[i + 1]; - if (((i += 2), ('optionalAccess' === n || 'optionalCall' === n) && null == r)) return; - 'access' === n || 'optionalAccess' === n - ? ((e = r), (r = o(r))) - : ('call' !== n && 'optionalCall' !== n) || ((r = o((...t) => r.call(e, ...t))), (e = void 0)); - } - return r; - })([t, 'optionalAccess', t => t.prototype, 'optionalAccess', t => t.constructor, 'optionalAccess', t => t.name]) - ) - ? new t({ message: e }) - : t({ message: e }); - } - var s = class extends Error { - constructor(t) { - super(t.message), (this.code = 'ERR_ASSERTION'); - } - }; - (e.AssertionError = s), - (e.assert = function (t, e = 'Assertion failed.', r = s) { - if (!t) { - if (e instanceof Error) throw e; - throw o(r, e); - } - }), - (e.assertStruct = function (t, e, r = 'Assertion failed', a = s) { - try { - n.assert.call(void 0, t, e); - } catch (t) { - throw o( - a, - `${r}: ${(function (t) { - return i.getErrorMessage.call(void 0, t).replace(/\.$/u, ''); - })(t)}.` - ); - } - }), - (e.assertExhaustive = function (t) { - throw new Error('Invalid branch reached. Should be detected during compilation.'); - }); - }, - 9162: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }); - var i = r(2591), - n = r(593), - o = r(7884), - s = o.union.call(void 0, [o.number.call(void 0), o.bigint.call(void 0), o.string.call(void 0), i.StrictHexStruct]), - a = o.coerce.call(void 0, o.number.call(void 0), s, Number), - h = o.coerce.call(void 0, o.bigint.call(void 0), s, BigInt), - u = - (o.union.call(void 0, [i.StrictHexStruct, o.instance.call(void 0, Uint8Array)]), - o.coerce.call(void 0, o.instance.call(void 0, Uint8Array), o.union.call(void 0, [i.StrictHexStruct]), i.hexToBytes)), - f = o.coerce.call(void 0, i.StrictHexStruct, o.instance.call(void 0, Uint8Array), i.bytesToHex); - (e.createNumber = function (t) { - try { - const e = o.create.call(void 0, t, a); - return n.assert.call(void 0, Number.isFinite(e), `Expected a number-like value, got "${t}".`), e; - } catch (e) { - if (e instanceof o.StructError) throw new Error(`Expected a number-like value, got "${t}".`); - throw e; - } - }), - (e.createBigInt = function (t) { - try { - return o.create.call(void 0, t, h); - } catch (t) { - if (t instanceof o.StructError) throw new Error(`Expected a number-like value, got "${String(t.value)}".`); - throw t; - } - }), - (e.createBytes = function (t) { - if ('string' == typeof t && '0x' === t.toLowerCase()) return new Uint8Array(); - try { - return o.create.call(void 0, t, u); - } catch (t) { - if (t instanceof o.StructError) throw new Error(`Expected a bytes-like value, got "${String(t.value)}".`); - throw t; - } - }), - (e.createHex = function (t) { - if ((t instanceof Uint8Array && 0 === t.length) || ('string' == typeof t && '0x' === t.toLowerCase())) return '0x'; - try { - return o.create.call(void 0, t, f); - } catch (t) { - if (t instanceof o.StructError) throw new Error(`Expected a bytes-like value, got "${String(t.value)}".`); - throw t; - } - }); - }, - 6815: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }); - var i = r(5217), - n = r(7884), - o = n.size.call(void 0, i.base64.call(void 0, n.string.call(void 0), { paddingRequired: !0 }), 44, 44); - e.ChecksumStruct = o; - }, - 5174: () => {}, - 2173: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }); - var i = r(2706), - n = r(905); - function o(t) { - return 'object' == typeof t && null !== t && 'code' in t; - } - function s(t) { - return 'object' == typeof t && null !== t && 'message' in t; - } - (e.isErrorWithCode = o), - (e.isErrorWithMessage = s), - (e.isErrorWithStack = function (t) { - return 'object' == typeof t && null !== t && 'stack' in t; - }), - (e.getErrorMessage = function (t) { - return s(t) && 'string' == typeof t.message ? t.message : i.isNullOrUndefined.call(void 0, t) ? '' : String(t); - }), - (e.wrapError = function (t, e) { - if ((r = t) instanceof Error || (i.isObject.call(void 0, r) && 'Error' === r.constructor.name)) { - let r; - return ( - (r = 2 === Error.length ? new Error(e, { cause: t }) : new (0, n.ErrorWithCause)(e, { cause: t })), - o(t) && (r.code = t.code), - r - ); - } - var r; - return e.length > 0 ? new Error(`${String(t)}: ${e}`) : new Error(String(t)); - }); - }, - 3356: () => {}, - 8657: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }); - var i = r(593), - n = r(2706), - o = r(7884), - s = t => o.object.call(void 0, t); - function a({ path: t, branch: e }) { - const r = t[t.length - 1]; - return n.hasProperty.call(void 0, e[e.length - 2], r); - } - function h(t) { - return new (0, o.Struct)({ - ...t, - type: `optional ${t.type}`, - validator: (e, r) => !a(r) || t.validator(e, r), - refiner: (e, r) => !a(r) || t.refiner(e, r), - }); - } - var u = o.union.call(void 0, [ - o.literal.call(void 0, null), - o.boolean.call(void 0), - o.define.call(void 0, 'finite number', t => o.is.call(void 0, t, o.number.call(void 0)) && Number.isFinite(t)), - o.string.call(void 0), - o.array.call( - void 0, - o.lazy.call(void 0, () => u) - ), - o.record.call( - void 0, - o.string.call(void 0), - o.lazy.call(void 0, () => u) - ), - ]), - f = o.coerce.call( - void 0, - u, - o.any.call(void 0), - t => ( - i.assertStruct.call(void 0, t, u), - JSON.parse( - JSON.stringify(t, (t, e) => { - if ('__proto__' !== t && 'constructor' !== t) return e; - }) - ) - ) - ); - function c(t) { - return o.create.call(void 0, t, f); - } - var l = o.literal.call(void 0, '2.0'), - d = o.nullable.call(void 0, o.union.call(void 0, [o.number.call(void 0), o.string.call(void 0)])), - p = s({ code: o.integer.call(void 0), message: o.string.call(void 0), data: h(f), stack: h(o.string.call(void 0)) }), - m = o.union.call(void 0, [o.record.call(void 0, o.string.call(void 0), f), o.array.call(void 0, f)]), - g = s({ id: d, jsonrpc: l, method: o.string.call(void 0), params: h(m) }), - b = s({ jsonrpc: l, method: o.string.call(void 0), params: h(m) }), - y = o.object.call(void 0, { - id: d, - jsonrpc: l, - result: o.optional.call(void 0, o.unknown.call(void 0)), - error: o.optional.call(void 0, p), - }), - v = s({ id: d, jsonrpc: l, result: f }), - w = s({ id: d, jsonrpc: l, error: p }), - _ = o.union.call(void 0, [v, w]); - (e.object = s), - (e.exactOptional = h), - (e.UnsafeJsonStruct = u), - (e.JsonStruct = f), - (e.isValidJson = function (t) { - try { - return c(t), !0; - } catch (t) { - return !1; - } - }), - (e.getSafeJson = c), - (e.getJsonSize = function (t) { - i.assertStruct.call(void 0, t, f, 'Invalid JSON value'); - const e = JSON.stringify(t); - return new TextEncoder().encode(e).byteLength; - }), - (e.jsonrpc2 = '2.0'), - (e.JsonRpcVersionStruct = l), - (e.JsonRpcIdStruct = d), - (e.JsonRpcErrorStruct = p), - (e.JsonRpcParamsStruct = m), - (e.JsonRpcRequestStruct = g), - (e.JsonRpcNotificationStruct = b), - (e.isJsonRpcNotification = function (t) { - return o.is.call(void 0, t, b); - }), - (e.assertIsJsonRpcNotification = function (t, e) { - i.assertStruct.call(void 0, t, b, 'Invalid JSON-RPC notification', e); - }), - (e.isJsonRpcRequest = function (t) { - return o.is.call(void 0, t, g); - }), - (e.assertIsJsonRpcRequest = function (t, e) { - i.assertStruct.call(void 0, t, g, 'Invalid JSON-RPC request', e); - }), - (e.PendingJsonRpcResponseStruct = y), - (e.JsonRpcSuccessStruct = v), - (e.JsonRpcFailureStruct = w), - (e.JsonRpcResponseStruct = _), - (e.isPendingJsonRpcResponse = function (t) { - return o.is.call(void 0, t, y); - }), - (e.assertIsPendingJsonRpcResponse = function (t, e) { - i.assertStruct.call(void 0, t, y, 'Invalid pending JSON-RPC response', e); - }), - (e.isJsonRpcResponse = function (t) { - return o.is.call(void 0, t, _); - }), - (e.assertIsJsonRpcResponse = function (t, e) { - i.assertStruct.call(void 0, t, _, 'Invalid JSON-RPC response', e); - }), - (e.isJsonRpcSuccess = function (t) { - return o.is.call(void 0, t, v); - }), - (e.assertIsJsonRpcSuccess = function (t, e) { - i.assertStruct.call(void 0, t, v, 'Invalid JSON-RPC success response', e); - }), - (e.isJsonRpcFailure = function (t) { - return o.is.call(void 0, t, w); - }), - (e.assertIsJsonRpcFailure = function (t, e) { - i.assertStruct.call(void 0, t, w, 'Invalid JSON-RPC failure response', e); - }), - (e.isJsonRpcError = function (t) { - return o.is.call(void 0, t, p); - }), - (e.assertIsJsonRpcError = function (t, e) { - i.assertStruct.call(void 0, t, p, 'Invalid JSON-RPC error', e); - }), - (e.getJsonRpcIdValidator = function (t) { - const { - permitEmptyString: e, - permitFractions: r, - permitNull: i, - } = { permitEmptyString: !0, permitFractions: !1, permitNull: !0, ...t }; - return t => - Boolean( - ('number' == typeof t && (r || Number.isInteger(t))) || ('string' == typeof t && (e || t.length > 0)) || (i && null === t) - ); - }); - }, - 2591: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }); - var i = r(593), - n = r(5426), - o = r(7884), - s = r(4927), - a = 48, - h = 58, - u = 87, - f = (function () { - const t = []; - return () => { - if (0 === t.length) for (let e = 0; e < 256; e++) t.push(e.toString(16).padStart(2, '0')); - return t; - }; - })(); - function c(t) { - return t instanceof Uint8Array; - } - function l(t) { - i.assert.call(void 0, c(t), 'Value must be a Uint8Array.'); - } - function d(t) { - if ((l(t), 0 === t.length)) return '0x'; - const e = f(), - r = new Array(t.length); - for (let i = 0; i < t.length; i++) r[i] = e[t[i]]; - return B(r.join('')); - } - function p(t) { - l(t); - const e = d(t); - return BigInt(e); - } - function m(t) { - if ( - '0x' === - (function (t) { - let e, - r = t[0], - i = 1; - for (; i < t.length; ) { - const n = t[i], - o = t[i + 1]; - if (((i += 2), ('optionalAccess' === n || 'optionalCall' === n) && null == r)) return; - 'access' === n || 'optionalAccess' === n - ? ((e = r), (r = o(r))) - : ('call' !== n && 'optionalCall' !== n) || ((r = o((...t) => r.call(e, ...t))), (e = void 0)); - } - return r; - })([t, 'optionalAccess', t => t.toLowerCase, 'optionalCall', t => t()]) - ) - return new Uint8Array(); - A(t); - const e = I(t).toLowerCase(), - r = e.length % 2 == 0 ? e : `0${e}`, - i = new Uint8Array(r.length / 2); - for (let t = 0; t < i.length; t++) { - const e = r.charCodeAt(2 * t), - n = r.charCodeAt(2 * t + 1), - o = e - (e < h ? a : u), - s = n - (n < h ? a : u); - i[t] = 16 * o + s; - } - return i; - } - function g(t) { - return ( - i.assert.call(void 0, 'bigint' == typeof t, 'Value must be a bigint.'), - i.assert.call(void 0, t >= BigInt(0), 'Value must be a non-negative bigint.'), - m(t.toString(16)) - ); - } - function b(t) { - return ( - i.assert.call(void 0, 'number' == typeof t, 'Value must be a number.'), - i.assert.call(void 0, t >= 0, 'Value must be a non-negative number.'), - i.assert.call(void 0, Number.isSafeInteger(t), 'Value is not a safe integer. Use `bigIntToBytes` instead.'), - m(t.toString(16)) - ); - } - function y(t) { - return i.assert.call(void 0, 'string' == typeof t, 'Value must be a string.'), new TextEncoder().encode(t); - } - function v(t) { - if ('bigint' == typeof t) return g(t); - if ('number' == typeof t) return b(t); - if ('string' == typeof t) return t.startsWith('0x') ? m(t) : y(t); - if (c(t)) return t; - throw new TypeError(`Unsupported value type: "${typeof t}".`); - } - var w = o.pattern.call(void 0, o.string.call(void 0), /^(?:0x)?[0-9a-f]+$/iu), - _ = o.pattern.call(void 0, o.string.call(void 0), /^0x[0-9a-f]+$/iu), - M = o.pattern.call(void 0, o.string.call(void 0), /^0x[0-9a-f]{40}$/u), - E = o.pattern.call(void 0, o.string.call(void 0), /^0x[0-9a-fA-F]{40}$/u); - function S(t) { - return o.is.call(void 0, t, w); - } - function x(t) { - return o.is.call(void 0, t, _); - } - function A(t) { - i.assert.call(void 0, S(t), 'Value must be a hexadecimal string.'); - } - function k(t) { - i.assert.call(void 0, o.is.call(void 0, t, E), 'Invalid hex address.'); - const e = I(t.toLowerCase()), - r = I(d(n.keccak_256.call(void 0, e))); - return `0x${e - .split('') - .map((t, e) => { - const n = r[e]; - return ( - i.assert.call(void 0, o.is.call(void 0, n, o.string.call(void 0)), 'Hash shorter than address.'), - parseInt(n, 16) > 7 ? t.toUpperCase() : t - ); - }) - .join('')}`; - } - function R(t) { - return !!o.is.call(void 0, t, E) && k(t) === t; - } - function B(t) { - return t.startsWith('0x') ? t : t.startsWith('0X') ? `0x${t.substring(2)}` : `0x${t}`; - } - function I(t) { - return t.startsWith('0x') || t.startsWith('0X') ? t.substring(2) : t; - } - (e.HexStruct = w), - (e.StrictHexStruct = _), - (e.HexAddressStruct = M), - (e.HexChecksumAddressStruct = E), - (e.isHexString = S), - (e.isStrictHexString = x), - (e.assertIsHexString = A), - (e.assertIsStrictHexString = function (t) { - i.assert.call(void 0, x(t), 'Value must be a hexadecimal string, starting with "0x".'); - }), - (e.isValidHexAddress = function (t) { - return o.is.call(void 0, t, M) || R(t); - }), - (e.getChecksumAddress = k), - (e.isValidChecksumAddress = R), - (e.add0x = B), - (e.remove0x = I), - (e.isBytes = c), - (e.assertIsBytes = l), - (e.bytesToHex = d), - (e.bytesToBigInt = p), - (e.bytesToSignedBigInt = function (t) { - l(t); - let e = BigInt(0); - for (const r of t) e = (e << BigInt(8)) + BigInt(r); - return BigInt.asIntN(8 * t.length, e); - }), - (e.bytesToNumber = function (t) { - l(t); - const e = p(t); - return ( - i.assert.call(void 0, e <= BigInt(Number.MAX_SAFE_INTEGER), 'Number is not a safe integer. Use `bytesToBigInt` instead.'), - Number(e) - ); - }), - (e.bytesToString = function (t) { - return l(t), new TextDecoder().decode(t); - }), - (e.bytesToBase64 = function (t) { - return l(t), s.base64.encode(t); - }), - (e.hexToBytes = m), - (e.bigIntToBytes = g), - (e.signedBigIntToBytes = function (t, e) { - i.assert.call(void 0, 'bigint' == typeof t, 'Value must be a bigint.'), - i.assert.call(void 0, 'number' == typeof e, 'Byte length must be a number.'), - i.assert.call(void 0, e > 0, 'Byte length must be greater than 0.'), - i.assert.call( - void 0, - (function (t, e) { - i.assert.call(void 0, e > 0); - const r = t >> BigInt(31); - return !(((~t & r) + (t & ~r)) >> BigInt(8 * e - 1)); - })(t, e), - 'Byte length is too small to represent the given value.' - ); - let r = t; - const n = new Uint8Array(e); - for (let t = 0; t < n.length; t++) (n[t] = Number(BigInt.asUintN(8, r))), (r >>= BigInt(8)); - return n.reverse(); - }), - (e.numberToBytes = b), - (e.stringToBytes = y), - (e.base64ToBytes = function (t) { - return i.assert.call(void 0, 'string' == typeof t, 'Value must be a string.'), s.base64.decode(t); - }), - (e.valueToBytes = v), - (e.concatBytes = function (t) { - const e = new Array(t.length); - let r = 0; - for (let i = 0; i < t.length; i++) { - const n = v(t[i]); - (e[i] = n), (r += n.length); - } - const i = new Uint8Array(r); - for (let t = 0, r = 0; t < e.length; t++) i.set(e[t], r), (r += e[t].length); - return i; - }), - (e.createDataView = function (t) { - if ('undefined' != typeof Buffer && t instanceof Buffer) { - const e = t.buffer.slice(t.byteOffset, t.byteOffset + t.byteLength); - return new DataView(e); - } - return new DataView(t.buffer, t.byteOffset, t.byteLength); - }); - }, - 2706: (t, e) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }); - var r = (t => ( - (t[(t.Null = 4)] = 'Null'), - (t[(t.Comma = 1)] = 'Comma'), - (t[(t.Wrapper = 1)] = 'Wrapper'), - (t[(t.True = 4)] = 'True'), - (t[(t.False = 5)] = 'False'), - (t[(t.Quote = 1)] = 'Quote'), - (t[(t.Colon = 1)] = 'Colon'), - (t[(t.Date = 24)] = 'Date'), - t - ))(r || {}), - i = /"|\\|\n|\r|\t/gu; - function n(t) { - return t.charCodeAt(0) <= 127; - } - (e.isNonEmptyArray = function (t) { - return Array.isArray(t) && t.length > 0; - }), - (e.isNullOrUndefined = function (t) { - return null == t; - }), - (e.isObject = function (t) { - return Boolean(t) && 'object' == typeof t && !Array.isArray(t); - }), - (e.hasProperty = (t, e) => Object.hasOwnProperty.call(t, e)), - (e.getKnownPropertyNames = function (t) { - return Object.getOwnPropertyNames(t); - }), - (e.JsonSize = r), - (e.ESCAPE_CHARACTERS_REGEXP = i), - (e.isPlainObject = function (t) { - if ('object' != typeof t || null === t) return !1; - try { - let e = t; - for (; null !== Object.getPrototypeOf(e); ) e = Object.getPrototypeOf(e); - return Object.getPrototypeOf(t) === e; - } catch (t) { - return !1; - } - }), - (e.isASCII = n), - (e.calculateStringSize = function (t) { - return t.split('').reduce((t, e) => (n(e) ? t + 1 : t + 2), 0) + ((e = t.match(i)), () => [], null != e ? e : []).length; - var e; - }), - (e.calculateNumberSize = function (t) { - return t.toString().length; - }); - }, - 3006: () => {}, - 7847: (t, e, r) => { - 'use strict'; - function i(t) { - let e, - r = t[0], - i = 1; - for (; i < t.length; ) { - const n = t[i], - o = t[i + 1]; - if (((i += 2), ('optionalAccess' === n || 'optionalCall' === n) && null == r)) return; - 'access' === n || 'optionalAccess' === n - ? ((e = r), (r = o(r))) - : ('call' !== n && 'optionalCall' !== n) || ((r = o((...t) => r.call(e, ...t))), (e = void 0)); - } - return r; - } - Object.defineProperty(e, '__esModule', { value: !0 }); - var n = r(7884), - o = /^(?[-a-z0-9]{3,8}):(?[-_a-zA-Z0-9]{1,32})$/u, - s = /^[-a-z0-9]{3,8}$/u, - a = /^[-_a-zA-Z0-9]{1,32}$/u, - h = /^(?(?[-a-z0-9]{3,8}):(?[-_a-zA-Z0-9]{1,32})):(?[-.%a-zA-Z0-9]{1,128})$/u, - u = /^[-.%a-zA-Z0-9]{1,128}$/u, - f = n.pattern.call(void 0, n.string.call(void 0), o), - c = n.pattern.call(void 0, n.string.call(void 0), s), - l = n.pattern.call(void 0, n.string.call(void 0), a), - d = n.pattern.call(void 0, n.string.call(void 0), h), - p = n.pattern.call(void 0, n.string.call(void 0), u); - (e.CAIP_CHAIN_ID_REGEX = o), - (e.CAIP_NAMESPACE_REGEX = s), - (e.CAIP_REFERENCE_REGEX = a), - (e.CAIP_ACCOUNT_ID_REGEX = h), - (e.CAIP_ACCOUNT_ADDRESS_REGEX = u), - (e.CaipChainIdStruct = f), - (e.CaipNamespaceStruct = c), - (e.CaipReferenceStruct = l), - (e.CaipAccountIdStruct = d), - (e.CaipAccountAddressStruct = p), - (e.isCaipChainId = function (t) { - return n.is.call(void 0, t, f); - }), - (e.isCaipNamespace = function (t) { - return n.is.call(void 0, t, c); - }), - (e.isCaipReference = function (t) { - return n.is.call(void 0, t, l); - }), - (e.isCaipAccountId = function (t) { - return n.is.call(void 0, t, d); - }), - (e.isCaipAccountAddress = function (t) { - return n.is.call(void 0, t, p); - }), - (e.parseCaipChainId = function (t) { - const e = o.exec(t); - if (!i([e, 'optionalAccess', t => t.groups])) throw new Error('Invalid CAIP chain ID.'); - return { namespace: e.groups.namespace, reference: e.groups.reference }; - }), - (e.parseCaipAccountId = function (t) { - const e = h.exec(t); - if (!i([e, 'optionalAccess', t => t.groups])) throw new Error('Invalid CAIP account ID.'); - return { - address: e.groups.accountAddress, - chainId: e.groups.chainId, - chain: { namespace: e.groups.namespace, reference: e.groups.reference }, - }; - }); - }, - 9123: () => {}, - 1866: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }); - var i = r(2591), - n = r(593); - (e.numberToHex = t => ( - n.assert.call(void 0, 'number' == typeof t, 'Value must be a number.'), - n.assert.call(void 0, t >= 0, 'Value must be a non-negative number.'), - n.assert.call(void 0, Number.isSafeInteger(t), 'Value is not a safe integer. Use `bigIntToHex` instead.'), - i.add0x.call(void 0, t.toString(16)) - )), - (e.bigIntToHex = t => ( - n.assert.call(void 0, 'bigint' == typeof t, 'Value must be a bigint.'), - n.assert.call(void 0, t >= 0, 'Value must be a non-negative bigint.'), - i.add0x.call(void 0, t.toString(16)) - )), - (e.hexToNumber = t => { - i.assertIsHexString.call(void 0, t); - const e = parseInt(t, 16); - return n.assert.call(void 0, Number.isSafeInteger(e), 'Value is not a safe integer. Use `hexToBigInt` instead.'), e; - }), - (e.hexToBigInt = t => (i.assertIsHexString.call(void 0, t), BigInt(i.add0x.call(void 0, t)))); - }, - 1322: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }); - var i, - n, - o = r(4466), - s = class { - constructor(t) { - o.__privateAdd.call(void 0, this, i, void 0), o.__privateSet.call(void 0, this, i, new Map(t)), Object.freeze(this); - } - get size() { - return o.__privateGet.call(void 0, this, i).size; - } - [Symbol.iterator]() { - return o.__privateGet.call(void 0, this, i)[Symbol.iterator](); - } - entries() { - return o.__privateGet.call(void 0, this, i).entries(); - } - forEach(t, e) { - return o.__privateGet.call(void 0, this, i).forEach((r, i, n) => t.call(e, r, i, this)); - } - get(t) { - return o.__privateGet.call(void 0, this, i).get(t); - } - has(t) { - return o.__privateGet.call(void 0, this, i).has(t); - } - keys() { - return o.__privateGet.call(void 0, this, i).keys(); - } - values() { - return o.__privateGet.call(void 0, this, i).values(); - } - toString() { - return `FrozenMap(${this.size}) {${this.size > 0 ? ` ${[...this.entries()].map(([t, e]) => `${String(t)} => ${String(e)}`).join(', ')} ` : ''}}`; - } - }; - i = new WeakMap(); - var a = class { - constructor(t) { - o.__privateAdd.call(void 0, this, n, void 0), o.__privateSet.call(void 0, this, n, new Set(t)), Object.freeze(this); - } - get size() { - return o.__privateGet.call(void 0, this, n).size; - } - [Symbol.iterator]() { - return o.__privateGet.call(void 0, this, n)[Symbol.iterator](); - } - entries() { - return o.__privateGet.call(void 0, this, n).entries(); - } - forEach(t, e) { - return o.__privateGet.call(void 0, this, n).forEach((r, i, n) => t.call(e, r, i, this)); - } - has(t) { - return o.__privateGet.call(void 0, this, n).has(t); - } - keys() { - return o.__privateGet.call(void 0, this, n).keys(); - } - values() { - return o.__privateGet.call(void 0, this, n).values(); - } - toString() { - return `FrozenSet(${this.size}) {${this.size > 0 ? ` ${[...this.values()].map(t => String(t)).join(', ')} ` : ''}}`; - } - }; - (n = new WeakMap()), - Object.freeze(s), - Object.freeze(s.prototype), - Object.freeze(a), - Object.freeze(a.prototype), - (e.FrozenMap = s), - (e.FrozenSet = a); - }, - 2451: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), r(7479); - var i = r(1866); - r(3356); - var n = r(6587), - o = r(5671); - r(9123); - var s = r(3889), - a = r(8657); - r(3006); - var h = r(708), - u = r(7847), - f = r(6815), - c = r(5217), - l = r(9162), - d = r(2591), - p = r(593), - m = r(2173), - g = r(2706), - b = r(1322); - r(4466), - r(5174), - (e.AssertionError = p.AssertionError), - (e.CAIP_ACCOUNT_ADDRESS_REGEX = u.CAIP_ACCOUNT_ADDRESS_REGEX), - (e.CAIP_ACCOUNT_ID_REGEX = u.CAIP_ACCOUNT_ID_REGEX), - (e.CAIP_CHAIN_ID_REGEX = u.CAIP_CHAIN_ID_REGEX), - (e.CAIP_NAMESPACE_REGEX = u.CAIP_NAMESPACE_REGEX), - (e.CAIP_REFERENCE_REGEX = u.CAIP_REFERENCE_REGEX), - (e.CaipAccountAddressStruct = u.CaipAccountAddressStruct), - (e.CaipAccountIdStruct = u.CaipAccountIdStruct), - (e.CaipChainIdStruct = u.CaipChainIdStruct), - (e.CaipNamespaceStruct = u.CaipNamespaceStruct), - (e.CaipReferenceStruct = u.CaipReferenceStruct), - (e.ChecksumStruct = f.ChecksumStruct), - (e.Duration = o.Duration), - (e.ESCAPE_CHARACTERS_REGEXP = g.ESCAPE_CHARACTERS_REGEXP), - (e.FrozenMap = b.FrozenMap), - (e.FrozenSet = b.FrozenSet), - (e.HexAddressStruct = d.HexAddressStruct), - (e.HexChecksumAddressStruct = d.HexChecksumAddressStruct), - (e.HexStruct = d.HexStruct), - (e.JsonRpcErrorStruct = a.JsonRpcErrorStruct), - (e.JsonRpcFailureStruct = a.JsonRpcFailureStruct), - (e.JsonRpcIdStruct = a.JsonRpcIdStruct), - (e.JsonRpcNotificationStruct = a.JsonRpcNotificationStruct), - (e.JsonRpcParamsStruct = a.JsonRpcParamsStruct), - (e.JsonRpcRequestStruct = a.JsonRpcRequestStruct), - (e.JsonRpcResponseStruct = a.JsonRpcResponseStruct), - (e.JsonRpcSuccessStruct = a.JsonRpcSuccessStruct), - (e.JsonRpcVersionStruct = a.JsonRpcVersionStruct), - (e.JsonSize = g.JsonSize), - (e.JsonStruct = a.JsonStruct), - (e.PendingJsonRpcResponseStruct = a.PendingJsonRpcResponseStruct), - (e.StrictHexStruct = d.StrictHexStruct), - (e.UnsafeJsonStruct = a.UnsafeJsonStruct), - (e.VersionRangeStruct = s.VersionRangeStruct), - (e.VersionStruct = s.VersionStruct), - (e.add0x = d.add0x), - (e.assert = p.assert), - (e.assertExhaustive = p.assertExhaustive), - (e.assertIsBytes = d.assertIsBytes), - (e.assertIsHexString = d.assertIsHexString), - (e.assertIsJsonRpcError = a.assertIsJsonRpcError), - (e.assertIsJsonRpcFailure = a.assertIsJsonRpcFailure), - (e.assertIsJsonRpcNotification = a.assertIsJsonRpcNotification), - (e.assertIsJsonRpcRequest = a.assertIsJsonRpcRequest), - (e.assertIsJsonRpcResponse = a.assertIsJsonRpcResponse), - (e.assertIsJsonRpcSuccess = a.assertIsJsonRpcSuccess), - (e.assertIsPendingJsonRpcResponse = a.assertIsPendingJsonRpcResponse), - (e.assertIsSemVerRange = s.assertIsSemVerRange), - (e.assertIsSemVerVersion = s.assertIsSemVerVersion), - (e.assertIsStrictHexString = d.assertIsStrictHexString), - (e.assertStruct = p.assertStruct), - (e.base64 = c.base64), - (e.base64ToBytes = d.base64ToBytes), - (e.bigIntToBytes = d.bigIntToBytes), - (e.bigIntToHex = i.bigIntToHex), - (e.bytesToBase64 = d.bytesToBase64), - (e.bytesToBigInt = d.bytesToBigInt), - (e.bytesToHex = d.bytesToHex), - (e.bytesToNumber = d.bytesToNumber), - (e.bytesToSignedBigInt = d.bytesToSignedBigInt), - (e.bytesToString = d.bytesToString), - (e.calculateNumberSize = g.calculateNumberSize), - (e.calculateStringSize = g.calculateStringSize), - (e.concatBytes = d.concatBytes), - (e.createBigInt = l.createBigInt), - (e.createBytes = l.createBytes), - (e.createDataView = d.createDataView), - (e.createDeferredPromise = n.createDeferredPromise), - (e.createHex = l.createHex), - (e.createModuleLogger = h.createModuleLogger), - (e.createNumber = l.createNumber), - (e.createProjectLogger = h.createProjectLogger), - (e.exactOptional = a.exactOptional), - (e.getChecksumAddress = d.getChecksumAddress), - (e.getErrorMessage = m.getErrorMessage), - (e.getJsonRpcIdValidator = a.getJsonRpcIdValidator), - (e.getJsonSize = a.getJsonSize), - (e.getKnownPropertyNames = g.getKnownPropertyNames), - (e.getSafeJson = a.getSafeJson), - (e.gtRange = s.gtRange), - (e.gtVersion = s.gtVersion), - (e.hasProperty = g.hasProperty), - (e.hexToBigInt = i.hexToBigInt), - (e.hexToBytes = d.hexToBytes), - (e.hexToNumber = i.hexToNumber), - (e.inMilliseconds = o.inMilliseconds), - (e.isASCII = g.isASCII), - (e.isBytes = d.isBytes), - (e.isCaipAccountAddress = u.isCaipAccountAddress), - (e.isCaipAccountId = u.isCaipAccountId), - (e.isCaipChainId = u.isCaipChainId), - (e.isCaipNamespace = u.isCaipNamespace), - (e.isCaipReference = u.isCaipReference), - (e.isErrorWithCode = m.isErrorWithCode), - (e.isErrorWithMessage = m.isErrorWithMessage), - (e.isErrorWithStack = m.isErrorWithStack), - (e.isHexString = d.isHexString), - (e.isJsonRpcError = a.isJsonRpcError), - (e.isJsonRpcFailure = a.isJsonRpcFailure), - (e.isJsonRpcNotification = a.isJsonRpcNotification), - (e.isJsonRpcRequest = a.isJsonRpcRequest), - (e.isJsonRpcResponse = a.isJsonRpcResponse), - (e.isJsonRpcSuccess = a.isJsonRpcSuccess), - (e.isNonEmptyArray = g.isNonEmptyArray), - (e.isNullOrUndefined = g.isNullOrUndefined), - (e.isObject = g.isObject), - (e.isPendingJsonRpcResponse = a.isPendingJsonRpcResponse), - (e.isPlainObject = g.isPlainObject), - (e.isStrictHexString = d.isStrictHexString), - (e.isValidChecksumAddress = d.isValidChecksumAddress), - (e.isValidHexAddress = d.isValidHexAddress), - (e.isValidJson = a.isValidJson), - (e.isValidSemVerRange = s.isValidSemVerRange), - (e.isValidSemVerVersion = s.isValidSemVerVersion), - (e.jsonrpc2 = a.jsonrpc2), - (e.numberToBytes = d.numberToBytes), - (e.numberToHex = i.numberToHex), - (e.object = a.object), - (e.parseCaipAccountId = u.parseCaipAccountId), - (e.parseCaipChainId = u.parseCaipChainId), - (e.remove0x = d.remove0x), - (e.satisfiesVersionRange = s.satisfiesVersionRange), - (e.signedBigIntToBytes = d.signedBigIntToBytes), - (e.stringToBytes = d.stringToBytes), - (e.timeSince = o.timeSince), - (e.valueToBytes = d.valueToBytes), - (e.wrapError = m.wrapError); - }, - 4927: (t, e) => { - 'use strict'; - function r(t) { - if (!Number.isSafeInteger(t)) throw new Error(`Wrong integer: ${t}`); - } - function i(t) { - return t instanceof Uint8Array || (null != t && 'object' == typeof t && 'Uint8Array' === t.constructor.name); - } - function n(...t) { - const e = t => t, - r = (t, e) => r => t(e(r)); - return { encode: t.map(t => t.encode).reduceRight(r, e), decode: t.map(t => t.decode).reduce(r, e) }; - } - function o(t) { - return { - encode: e => { - if (!Array.isArray(e) || (e.length && 'number' != typeof e[0])) - throw new Error('alphabet.encode input should be an array of numbers'); - return e.map(e => { - if ((r(e), e < 0 || e >= t.length)) throw new Error(`Digit index outside alphabet: ${e} (alphabet: ${t.length})`); - return t[e]; - }); - }, - decode: e => { - if (!Array.isArray(e) || (e.length && 'string' != typeof e[0])) - throw new Error('alphabet.decode input should be array of strings'); - return e.map(e => { - if ('string' != typeof e) throw new Error(`alphabet.decode: not string element=${e}`); - const r = t.indexOf(e); - if (-1 === r) throw new Error(`Unknown letter: "${e}". Allowed: ${t}`); - return r; - }); - }, - }; - } - function s(t = '') { - if ('string' != typeof t) throw new Error('join separator should be string'); - return { - encode: e => { - if (!Array.isArray(e) || (e.length && 'string' != typeof e[0])) - throw new Error('join.encode input should be array of strings'); - for (let t of e) if ('string' != typeof t) throw new Error(`join.encode: non-string input=${t}`); - return e.join(t); - }, - decode: e => { - if ('string' != typeof e) throw new Error('join.decode input should be string'); - return e.split(t); - }, - }; - } - function a(t, e = '=') { - if ((r(t), 'string' != typeof e)) throw new Error('padding chr should be string'); - return { - encode(r) { - if (!Array.isArray(r) || (r.length && 'string' != typeof r[0])) - throw new Error('padding.encode input should be array of strings'); - for (let t of r) if ('string' != typeof t) throw new Error(`padding.encode: non-string input=${t}`); - for (; (r.length * t) % 8; ) r.push(e); - return r; - }, - decode(r) { - if (!Array.isArray(r) || (r.length && 'string' != typeof r[0])) - throw new Error('padding.encode input should be array of strings'); - for (let t of r) if ('string' != typeof t) throw new Error(`padding.decode: non-string input=${t}`); - let i = r.length; - if ((i * t) % 8) throw new Error('Invalid padding: string should have whole number of bytes'); - for (; i > 0 && r[i - 1] === e; i--) - if (!(((i - 1) * t) % 8)) throw new Error('Invalid padding: string has too much padding'); - return r.slice(0, i); - }, - }; - } - function h(t) { - if ('function' != typeof t) throw new Error('normalize fn should be function'); - return { encode: t => t, decode: e => t(e) }; - } - function u(t, e, i) { - if (e < 2) throw new Error(`convertRadix: wrong from=${e}, base cannot be less than 2`); - if (i < 2) throw new Error(`convertRadix: wrong to=${i}, base cannot be less than 2`); - if (!Array.isArray(t)) throw new Error('convertRadix: data should be array'); - if (!t.length) return []; - let n = 0; - const o = [], - s = Array.from(t); - for ( - s.forEach(t => { - if ((r(t), t < 0 || t >= e)) throw new Error(`Wrong integer: ${t}`); - }); - ; - - ) { - let t = 0, - r = !0; - for (let o = n; o < s.length; o++) { - const a = s[o], - h = e * t + a; - if (!Number.isSafeInteger(h) || (e * t) / e !== t || h - a != e * t) throw new Error('convertRadix: carry overflow'); - t = h % i; - const u = Math.floor(h / i); - if (((s[o] = u), !Number.isSafeInteger(u) || u * i + t !== h)) throw new Error('convertRadix: carry overflow'); - r && (u ? (r = !1) : (n = o)); - } - if ((o.push(t), r)) break; - } - for (let e = 0; e < t.length - 1 && 0 === t[e]; e++) o.push(0); - return o.reverse(); - } - Object.defineProperty(e, '__esModule', { value: !0 }), - (e.bytes = - e.stringToBytes = - e.str = - e.bytesToString = - e.hex = - e.utf8 = - e.bech32m = - e.bech32 = - e.base58check = - e.createBase58check = - e.base58xmr = - e.base58xrp = - e.base58flickr = - e.base58 = - e.base64urlnopad = - e.base64url = - e.base64 = - e.base32crockford = - e.base32hex = - e.base32 = - e.base16 = - e.utils = - e.assertNumber = - void 0), - (e.assertNumber = r); - const f = (t, e) => (e ? f(e, t % e) : t), - c = (t, e) => t + (e - f(t, e)); - function l(t, e, i, n) { - if (!Array.isArray(t)) throw new Error('convertRadix2: data should be array'); - if (e <= 0 || e > 32) throw new Error(`convertRadix2: wrong from=${e}`); - if (i <= 0 || i > 32) throw new Error(`convertRadix2: wrong to=${i}`); - if (c(e, i) > 32) throw new Error(`convertRadix2: carry overflow from=${e} to=${i} carryBits=${c(e, i)}`); - let o = 0, - s = 0; - const a = 2 ** i - 1, - h = []; - for (const n of t) { - if ((r(n), n >= 2 ** e)) throw new Error(`convertRadix2: invalid data word=${n} from=${e}`); - if (((o = (o << e) | n), s + e > 32)) throw new Error(`convertRadix2: carry overflow pos=${s} from=${e}`); - for (s += e; s >= i; s -= i) h.push(((o >> (s - i)) & a) >>> 0); - o &= 2 ** s - 1; - } - if (((o = (o << (i - s)) & a), !n && s >= e)) throw new Error('Excess padding'); - if (!n && o) throw new Error(`Non-zero padding: ${o}`); - return n && s > 0 && h.push(o >>> 0), h; - } - function d(t) { - return ( - r(t), - { - encode: e => { - if (!i(e)) throw new Error('radix.encode input should be Uint8Array'); - return u(Array.from(e), 256, t); - }, - decode: e => { - if (!Array.isArray(e) || (e.length && 'number' != typeof e[0])) - throw new Error('radix.decode input should be array of numbers'); - return Uint8Array.from(u(e, t, 256)); - }, - } - ); - } - function p(t, e = !1) { - if ((r(t), t <= 0 || t > 32)) throw new Error('radix2: bits should be in (0..32]'); - if (c(8, t) > 32 || c(t, 8) > 32) throw new Error('radix2: carry overflow'); - return { - encode: r => { - if (!i(r)) throw new Error('radix2.encode input should be Uint8Array'); - return l(Array.from(r), 8, t, !e); - }, - decode: r => { - if (!Array.isArray(r) || (r.length && 'number' != typeof r[0])) - throw new Error('radix2.decode input should be array of numbers'); - return Uint8Array.from(l(r, t, 8, e)); - }, - }; - } - function m(t) { - if ('function' != typeof t) throw new Error('unsafeWrapper fn should be function'); - return function (...e) { - try { - return t.apply(null, e); - } catch (t) {} - }; - } - function g(t, e) { - if ((r(t), 'function' != typeof e)) throw new Error('checksum fn should be function'); - return { - encode(r) { - if (!i(r)) throw new Error('checksum.encode: input should be Uint8Array'); - const n = e(r).slice(0, t), - o = new Uint8Array(r.length + t); - return o.set(r), o.set(n, r.length), o; - }, - decode(r) { - if (!i(r)) throw new Error('checksum.decode: input should be Uint8Array'); - const n = r.slice(0, -t), - o = e(n).slice(0, t), - s = r.slice(-t); - for (let e = 0; e < t; e++) if (o[e] !== s[e]) throw new Error('Invalid checksum'); - return n; - }, - }; - } - (e.utils = { alphabet: o, chain: n, checksum: g, convertRadix: u, convertRadix2: l, radix: d, radix2: p, join: s, padding: a }), - (e.base16 = n(p(4), o('0123456789ABCDEF'), s(''))), - (e.base32 = n(p(5), o('ABCDEFGHIJKLMNOPQRSTUVWXYZ234567'), a(5), s(''))), - (e.base32hex = n(p(5), o('0123456789ABCDEFGHIJKLMNOPQRSTUV'), a(5), s(''))), - (e.base32crockford = n( - p(5), - o('0123456789ABCDEFGHJKMNPQRSTVWXYZ'), - s(''), - h(t => t.toUpperCase().replace(/O/g, '0').replace(/[IL]/g, '1')) - )), - (e.base64 = n(p(6), o('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'), a(6), s(''))), - (e.base64url = n(p(6), o('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_'), a(6), s(''))), - (e.base64urlnopad = n(p(6), o('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_'), s(''))); - const b = t => n(d(58), o(t), s('')); - (e.base58 = b('123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz')), - (e.base58flickr = b('123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ')), - (e.base58xrp = b('rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz')); - const y = [0, 2, 3, 5, 6, 7, 9, 10, 11]; - (e.base58xmr = { - encode(t) { - let r = ''; - for (let i = 0; i < t.length; i += 8) { - const n = t.subarray(i, i + 8); - r += e.base58.encode(n).padStart(y[n.length], '1'); - } - return r; - }, - decode(t) { - let r = []; - for (let i = 0; i < t.length; i += 11) { - const n = t.slice(i, i + 11), - o = y.indexOf(n.length), - s = e.base58.decode(n); - for (let t = 0; t < s.length - o; t++) if (0 !== s[t]) throw new Error('base58xmr: wrong padding'); - r = r.concat(Array.from(s.slice(s.length - o))); - } - return Uint8Array.from(r); - }, - }), - (e.createBase58check = t => - n( - g(4, e => t(t(e))), - e.base58 - )), - (e.base58check = e.createBase58check); - const v = n(o('qpzry9x8gf2tvdw0s3jn54khce6mua7l'), s('')), - w = [996825010, 642813549, 513874426, 1027748829, 705979059]; - function _(t) { - const e = t >> 25; - let r = (33554431 & t) << 5; - for (let t = 0; t < w.length; t++) 1 == ((e >> t) & 1) && (r ^= w[t]); - return r; - } - function M(t, e, r = 1) { - const i = t.length; - let n = 1; - for (let e = 0; e < i; e++) { - const r = t.charCodeAt(e); - if (r < 33 || r > 126) throw new Error(`Invalid prefix (${t})`); - n = _(n) ^ (r >> 5); - } - n = _(n); - for (let e = 0; e < i; e++) n = _(n) ^ (31 & t.charCodeAt(e)); - for (let t of e) n = _(n) ^ t; - for (let t = 0; t < 6; t++) n = _(n); - return (n ^= r), v.encode(l([n % 2 ** 30], 30, 5, !1)); - } - function E(t) { - const e = 'bech32' === t ? 1 : 734539939, - r = p(5), - i = r.decode, - n = r.encode, - o = m(i); - function s(t, r = 90) { - if ('string' != typeof t) throw new Error('bech32.decode input should be string, not ' + typeof t); - if (t.length < 8 || (!1 !== r && t.length > r)) - throw new TypeError(`Wrong string length: ${t.length} (${t}). Expected (8..${r})`); - const i = t.toLowerCase(); - if (t !== i && t !== t.toUpperCase()) throw new Error('String must be lowercase or uppercase'); - const n = (t = i).lastIndexOf('1'); - if (0 === n || -1 === n) throw new Error('Letter "1" must be present between prefix and data only'); - const o = t.slice(0, n), - s = t.slice(n + 1); - if (s.length < 6) throw new Error('Data must be at least 6 characters long'); - const a = v.decode(s).slice(0, -6), - h = M(o, a, e); - if (!s.endsWith(h)) throw new Error(`Invalid checksum in ${t}: expected "${h}"`); - return { prefix: o, words: a }; - } - return { - encode: function (t, r, i = 90) { - if ('string' != typeof t) throw new Error('bech32.encode prefix should be string, not ' + typeof t); - if (!Array.isArray(r) || (r.length && 'number' != typeof r[0])) - throw new Error('bech32.encode words should be array of numbers, not ' + typeof r); - const n = t.length + 7 + r.length; - if (!1 !== i && n > i) throw new TypeError(`Length ${n} exceeds limit ${i}`); - const o = t.toLowerCase(), - s = M(o, r, e); - return `${o}1${v.encode(r)}${s}`; - }, - decode: s, - decodeToBytes: function (t) { - const { prefix: e, words: r } = s(t, !1); - return { prefix: e, words: r, bytes: i(r) }; - }, - decodeUnsafe: m(s), - fromWords: i, - fromWordsUnsafe: o, - toWords: n, - }; - } - (e.bech32 = E('bech32')), - (e.bech32m = E('bech32m')), - (e.utf8 = { encode: t => new TextDecoder().decode(t), decode: t => new TextEncoder().encode(t) }), - (e.hex = n( - p(4), - o('0123456789abcdef'), - s(''), - h(t => { - if ('string' != typeof t || t.length % 2) - throw new TypeError(`hex.decode: expected string, got ${typeof t} with length ${t.length}`); - return t.toLowerCase(); - }) - )); - const S = { - utf8: e.utf8, - hex: e.hex, - base16: e.base16, - base32: e.base32, - base64: e.base64, - base64url: e.base64url, - base58: e.base58, - base58xmr: e.base58xmr, - }, - x = 'Invalid encoding type. Available types: utf8, hex, base16, base32, base64, base64url, base58, base58xmr'; - (e.bytesToString = (t, e) => { - if ('string' != typeof t || !S.hasOwnProperty(t)) throw new TypeError(x); - if (!i(e)) throw new TypeError('bytesToString() expects Uint8Array'); - return S[t].encode(e); - }), - (e.str = e.bytesToString), - (e.stringToBytes = (t, e) => { - if (!S.hasOwnProperty(t)) throw new TypeError(x); - if ('string' != typeof e) throw new TypeError('stringToBytes() expects string'); - return S[t].decode(e); - }), - (e.bytes = e.stringToBytes); - }, - 7320: (t, e) => { - 'use strict'; - function r(t) { - if (!Number.isSafeInteger(t) || t < 0) throw new Error(`Wrong positive integer: ${t}`); - } - function i(t) { - if ('boolean' != typeof t) throw new Error(`Expected boolean, not ${t}`); - } - function n(t, ...e) { - if (!((r = t) instanceof Uint8Array || (null != r && 'object' == typeof r && 'Uint8Array' === r.constructor.name))) - throw new Error('Expected Uint8Array'); - var r; - if (e.length > 0 && !e.includes(t.length)) throw new Error(`Expected Uint8Array of length ${e}, not of length=${t.length}`); - } - function o(t) { - if ('function' != typeof t || 'function' != typeof t.create) throw new Error('Hash should be wrapped by utils.wrapConstructor'); - r(t.outputLen), r(t.blockLen); - } - function s(t, e = !0) { - if (t.destroyed) throw new Error('Hash instance has been destroyed'); - if (e && t.finished) throw new Error('Hash#digest() has already been called'); - } - function a(t, e) { - n(t); - const r = e.outputLen; - if (t.length < r) throw new Error(`digestInto() expects output buffer of length at least ${r}`); - } - Object.defineProperty(e, '__esModule', { value: !0 }), - (e.output = e.exists = e.hash = e.bytes = e.bool = e.number = void 0), - (e.number = r), - (e.bool = i), - (e.bytes = n), - (e.hash = o), - (e.exists = s), - (e.output = a); - const h = { number: r, bool: i, bytes: n, hash: o, exists: s, output: a }; - e.default = h; - }, - 7505: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), (e.SHA2 = void 0); - const i = r(7320), - n = r(8089); - class o extends n.Hash { - constructor(t, e, r, i) { - super(), - (this.blockLen = t), - (this.outputLen = e), - (this.padOffset = r), - (this.isLE = i), - (this.finished = !1), - (this.length = 0), - (this.pos = 0), - (this.destroyed = !1), - (this.buffer = new Uint8Array(t)), - (this.view = (0, n.createView)(this.buffer)); - } - update(t) { - (0, i.exists)(this); - const { view: e, buffer: r, blockLen: o } = this, - s = (t = (0, n.toBytes)(t)).length; - for (let i = 0; i < s; ) { - const a = Math.min(o - this.pos, s - i); - if (a !== o) - r.set(t.subarray(i, i + a), this.pos), (this.pos += a), (i += a), this.pos === o && (this.process(e, 0), (this.pos = 0)); - else { - const e = (0, n.createView)(t); - for (; o <= s - i; i += o) this.process(e, i); - } - } - return (this.length += t.length), this.roundClean(), this; - } - digestInto(t) { - (0, i.exists)(this), (0, i.output)(t, this), (this.finished = !0); - const { buffer: e, view: r, blockLen: o, isLE: s } = this; - let { pos: a } = this; - (e[a++] = 128), this.buffer.subarray(a).fill(0), this.padOffset > o - a && (this.process(r, 0), (a = 0)); - for (let t = a; t < o; t++) e[t] = 0; - !(function (t, e, r, i) { - if ('function' == typeof t.setBigUint64) return t.setBigUint64(e, r, i); - const n = BigInt(32), - o = BigInt(4294967295), - s = Number((r >> n) & o), - a = Number(r & o), - h = i ? 4 : 0, - u = i ? 0 : 4; - t.setUint32(e + h, s, i), t.setUint32(e + u, a, i); - })(r, o - 8, BigInt(8 * this.length), s), - this.process(r, 0); - const h = (0, n.createView)(t), - u = this.outputLen; - if (u % 4) throw new Error('_sha2: outputLen should be aligned to 32bit'); - const f = u / 4, - c = this.get(); - if (f > c.length) throw new Error('_sha2: outputLen bigger than state'); - for (let t = 0; t < f; t++) h.setUint32(4 * t, c[t], s); - } - digest() { - const { buffer: t, outputLen: e } = this; - this.digestInto(t); - const r = t.slice(0, e); - return this.destroy(), r; - } - _cloneInto(t) { - t || (t = new this.constructor()), t.set(...this.get()); - const { blockLen: e, buffer: r, length: i, finished: n, destroyed: o, pos: s } = this; - return (t.length = i), (t.pos = s), (t.finished = n), (t.destroyed = o), i % e && t.buffer.set(r), t; - } - } - e.SHA2 = o; - }, - 6873: (t, e) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), - (e.add5L = - e.add5H = - e.add4H = - e.add4L = - e.add3H = - e.add3L = - e.add = - e.rotlBL = - e.rotlBH = - e.rotlSL = - e.rotlSH = - e.rotr32L = - e.rotr32H = - e.rotrBL = - e.rotrBH = - e.rotrSL = - e.rotrSH = - e.shrSL = - e.shrSH = - e.toBig = - e.split = - e.fromBig = - void 0); - const r = BigInt(2 ** 32 - 1), - i = BigInt(32); - function n(t, e = !1) { - return e ? { h: Number(t & r), l: Number((t >> i) & r) } : { h: 0 | Number((t >> i) & r), l: 0 | Number(t & r) }; - } - function o(t, e = !1) { - let r = new Uint32Array(t.length), - i = new Uint32Array(t.length); - for (let o = 0; o < t.length; o++) { - const { h: s, l: a } = n(t[o], e); - [r[o], i[o]] = [s, a]; - } - return [r, i]; - } - (e.fromBig = n), (e.split = o); - const s = (t, e) => (BigInt(t >>> 0) << i) | BigInt(e >>> 0); - e.toBig = s; - const a = (t, e, r) => t >>> r; - e.shrSH = a; - const h = (t, e, r) => (t << (32 - r)) | (e >>> r); - e.shrSL = h; - const u = (t, e, r) => (t >>> r) | (e << (32 - r)); - e.rotrSH = u; - const f = (t, e, r) => (t << (32 - r)) | (e >>> r); - e.rotrSL = f; - const c = (t, e, r) => (t << (64 - r)) | (e >>> (r - 32)); - e.rotrBH = c; - const l = (t, e, r) => (t >>> (r - 32)) | (e << (64 - r)); - e.rotrBL = l; - const d = (t, e) => e; - e.rotr32H = d; - const p = (t, e) => t; - e.rotr32L = p; - const m = (t, e, r) => (t << r) | (e >>> (32 - r)); - e.rotlSH = m; - const g = (t, e, r) => (e << r) | (t >>> (32 - r)); - e.rotlSL = g; - const b = (t, e, r) => (e << (r - 32)) | (t >>> (64 - r)); - e.rotlBH = b; - const y = (t, e, r) => (t << (r - 32)) | (e >>> (64 - r)); - function v(t, e, r, i) { - const n = (e >>> 0) + (i >>> 0); - return { h: (t + r + ((n / 2 ** 32) | 0)) | 0, l: 0 | n }; - } - (e.rotlBL = y), (e.add = v); - const w = (t, e, r) => (t >>> 0) + (e >>> 0) + (r >>> 0); - e.add3L = w; - const _ = (t, e, r, i) => (e + r + i + ((t / 2 ** 32) | 0)) | 0; - e.add3H = _; - const M = (t, e, r, i) => (t >>> 0) + (e >>> 0) + (r >>> 0) + (i >>> 0); - e.add4L = M; - const E = (t, e, r, i, n) => (e + r + i + n + ((t / 2 ** 32) | 0)) | 0; - e.add4H = E; - const S = (t, e, r, i, n) => (t >>> 0) + (e >>> 0) + (r >>> 0) + (i >>> 0) + (n >>> 0); - e.add5L = S; - const x = (t, e, r, i, n, o) => (e + r + i + n + o + ((t / 2 ** 32) | 0)) | 0; - e.add5H = x; - const A = { - fromBig: n, - split: o, - toBig: s, - shrSH: a, - shrSL: h, - rotrSH: u, - rotrSL: f, - rotrBH: c, - rotrBL: l, - rotr32H: d, - rotr32L: p, - rotlSH: m, - rotlSL: g, - rotlBH: b, - rotlBL: y, - add: v, - add3L: w, - add3H: _, - add4L: M, - add4H: E, - add5H: x, - add5L: S, - }; - e.default = A; - }, - 1945: (t, e) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), - (e.crypto = void 0), - (e.crypto = 'object' == typeof globalThis && 'crypto' in globalThis ? globalThis.crypto : void 0); - }, - 9569: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), (e.hmac = e.HMAC = void 0); - const i = r(7320), - n = r(8089); - class o extends n.Hash { - constructor(t, e) { - super(), (this.finished = !1), (this.destroyed = !1), (0, i.hash)(t); - const r = (0, n.toBytes)(e); - if (((this.iHash = t.create()), 'function' != typeof this.iHash.update)) - throw new Error('Expected instance of class which extends utils.Hash'); - (this.blockLen = this.iHash.blockLen), (this.outputLen = this.iHash.outputLen); - const o = this.blockLen, - s = new Uint8Array(o); - s.set(r.length > o ? t.create().update(r).digest() : r); - for (let t = 0; t < s.length; t++) s[t] ^= 54; - this.iHash.update(s), (this.oHash = t.create()); - for (let t = 0; t < s.length; t++) s[t] ^= 106; - this.oHash.update(s), s.fill(0); - } - update(t) { - return (0, i.exists)(this), this.iHash.update(t), this; - } - digestInto(t) { - (0, i.exists)(this), - (0, i.bytes)(t, this.outputLen), - (this.finished = !0), - this.iHash.digestInto(t), - this.oHash.update(t), - this.oHash.digestInto(t), - this.destroy(); - } - digest() { - const t = new Uint8Array(this.oHash.outputLen); - return this.digestInto(t), t; - } - _cloneInto(t) { - t || (t = Object.create(Object.getPrototypeOf(this), {})); - const { oHash: e, iHash: r, finished: i, destroyed: n, blockLen: o, outputLen: s } = this; - return ( - (t.finished = i), - (t.destroyed = n), - (t.blockLen = o), - (t.outputLen = s), - (t.oHash = e._cloneInto(t.oHash)), - (t.iHash = r._cloneInto(t.iHash)), - t - ); - } - destroy() { - (this.destroyed = !0), this.oHash.destroy(), this.iHash.destroy(); - } - } - (e.HMAC = o), (e.hmac = (t, e, r) => new o(t, e).update(r).digest()), (e.hmac.create = (t, e) => new o(t, e)); - }, - 3061: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), (e.sha224 = e.sha256 = void 0); - const i = r(7505), - n = r(8089), - o = (t, e, r) => (t & e) ^ (t & r) ^ (e & r), - s = new Uint32Array([ - 1116352408, 1899447441, 3049323471, 3921009573, 961987163, 1508970993, 2453635748, 2870763221, 3624381080, 310598401, 607225278, - 1426881987, 1925078388, 2162078206, 2614888103, 3248222580, 3835390401, 4022224774, 264347078, 604807628, 770255983, 1249150122, - 1555081692, 1996064986, 2554220882, 2821834349, 2952996808, 3210313671, 3336571891, 3584528711, 113926993, 338241895, 666307205, - 773529912, 1294757372, 1396182291, 1695183700, 1986661051, 2177026350, 2456956037, 2730485921, 2820302411, 3259730800, - 3345764771, 3516065817, 3600352804, 4094571909, 275423344, 430227734, 506948616, 659060556, 883997877, 958139571, 1322822218, - 1537002063, 1747873779, 1955562222, 2024104815, 2227730452, 2361852424, 2428436474, 2756734187, 3204031479, 3329325298, - ]), - a = new Uint32Array([1779033703, 3144134277, 1013904242, 2773480762, 1359893119, 2600822924, 528734635, 1541459225]), - h = new Uint32Array(64); - class u extends i.SHA2 { - constructor() { - super(64, 32, 8, !1), - (this.A = 0 | a[0]), - (this.B = 0 | a[1]), - (this.C = 0 | a[2]), - (this.D = 0 | a[3]), - (this.E = 0 | a[4]), - (this.F = 0 | a[5]), - (this.G = 0 | a[6]), - (this.H = 0 | a[7]); - } - get() { - const { A: t, B: e, C: r, D: i, E: n, F: o, G: s, H: a } = this; - return [t, e, r, i, n, o, s, a]; - } - set(t, e, r, i, n, o, s, a) { - (this.A = 0 | t), - (this.B = 0 | e), - (this.C = 0 | r), - (this.D = 0 | i), - (this.E = 0 | n), - (this.F = 0 | o), - (this.G = 0 | s), - (this.H = 0 | a); - } - process(t, e) { - for (let r = 0; r < 16; r++, e += 4) h[r] = t.getUint32(e, !1); - for (let t = 16; t < 64; t++) { - const e = h[t - 15], - r = h[t - 2], - i = (0, n.rotr)(e, 7) ^ (0, n.rotr)(e, 18) ^ (e >>> 3), - o = (0, n.rotr)(r, 17) ^ (0, n.rotr)(r, 19) ^ (r >>> 10); - h[t] = (o + h[t - 7] + i + h[t - 16]) | 0; - } - let { A: r, B: i, C: a, D: u, E: f, F: c, G: l, H: d } = this; - for (let t = 0; t < 64; t++) { - const e = (d + ((0, n.rotr)(f, 6) ^ (0, n.rotr)(f, 11) ^ (0, n.rotr)(f, 25)) + (((p = f) & c) ^ (~p & l)) + s[t] + h[t]) | 0, - m = (((0, n.rotr)(r, 2) ^ (0, n.rotr)(r, 13) ^ (0, n.rotr)(r, 22)) + o(r, i, a)) | 0; - (d = l), (l = c), (c = f), (f = (u + e) | 0), (u = a), (a = i), (i = r), (r = (e + m) | 0); - } - var p; - (r = (r + this.A) | 0), - (i = (i + this.B) | 0), - (a = (a + this.C) | 0), - (u = (u + this.D) | 0), - (f = (f + this.E) | 0), - (c = (c + this.F) | 0), - (l = (l + this.G) | 0), - (d = (d + this.H) | 0), - this.set(r, i, a, u, f, c, l, d); - } - roundClean() { - h.fill(0); - } - destroy() { - this.set(0, 0, 0, 0, 0, 0, 0, 0), this.buffer.fill(0); - } - } - class f extends u { - constructor() { - super(), - (this.A = -1056596264), - (this.B = 914150663), - (this.C = 812702999), - (this.D = -150054599), - (this.E = -4191439), - (this.F = 1750603025), - (this.G = 1694076839), - (this.H = -1090891868), - (this.outputLen = 28); - } - } - (e.sha256 = (0, n.wrapConstructor)(() => new u())), (e.sha224 = (0, n.wrapConstructor)(() => new f())); - }, - 5426: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), - (e.shake256 = - e.shake128 = - e.keccak_512 = - e.keccak_384 = - e.keccak_256 = - e.keccak_224 = - e.sha3_512 = - e.sha3_384 = - e.sha3_256 = - e.sha3_224 = - e.Keccak = - e.keccakP = - void 0); - const i = r(7320), - n = r(6873), - o = r(8089), - [s, a, h] = [[], [], []], - u = BigInt(0), - f = BigInt(1), - c = BigInt(2), - l = BigInt(7), - d = BigInt(256), - p = BigInt(113); - for (let t = 0, e = f, r = 1, i = 0; t < 24; t++) { - ([r, i] = [i, (2 * r + 3 * i) % 5]), s.push(2 * (5 * i + r)), a.push((((t + 1) * (t + 2)) / 2) % 64); - let n = u; - for (let t = 0; t < 7; t++) (e = ((e << f) ^ ((e >> l) * p)) % d), e & c && (n ^= f << ((f << BigInt(t)) - f)); - h.push(n); - } - const [m, g] = (0, n.split)(h, !0), - b = (t, e, r) => (r > 32 ? (0, n.rotlBH)(t, e, r) : (0, n.rotlSH)(t, e, r)), - y = (t, e, r) => (r > 32 ? (0, n.rotlBL)(t, e, r) : (0, n.rotlSL)(t, e, r)); - function v(t, e = 24) { - const r = new Uint32Array(10); - for (let i = 24 - e; i < 24; i++) { - for (let e = 0; e < 10; e++) r[e] = t[e] ^ t[e + 10] ^ t[e + 20] ^ t[e + 30] ^ t[e + 40]; - for (let e = 0; e < 10; e += 2) { - const i = (e + 8) % 10, - n = (e + 2) % 10, - o = r[n], - s = r[n + 1], - a = b(o, s, 1) ^ r[i], - h = y(o, s, 1) ^ r[i + 1]; - for (let r = 0; r < 50; r += 10) (t[e + r] ^= a), (t[e + r + 1] ^= h); - } - let e = t[2], - n = t[3]; - for (let r = 0; r < 24; r++) { - const i = a[r], - o = b(e, n, i), - h = y(e, n, i), - u = s[r]; - (e = t[u]), (n = t[u + 1]), (t[u] = o), (t[u + 1] = h); - } - for (let e = 0; e < 50; e += 10) { - for (let i = 0; i < 10; i++) r[i] = t[e + i]; - for (let i = 0; i < 10; i++) t[e + i] ^= ~r[(i + 2) % 10] & r[(i + 4) % 10]; - } - (t[0] ^= m[i]), (t[1] ^= g[i]); - } - r.fill(0); - } - e.keccakP = v; - class w extends o.Hash { - constructor(t, e, r, n = !1, s = 24) { - if ( - (super(), - (this.blockLen = t), - (this.suffix = e), - (this.outputLen = r), - (this.enableXOF = n), - (this.rounds = s), - (this.pos = 0), - (this.posOut = 0), - (this.finished = !1), - (this.destroyed = !1), - (0, i.number)(r), - 0 >= this.blockLen || this.blockLen >= 200) - ) - throw new Error('Sha3 supports only keccak-f1600 function'); - (this.state = new Uint8Array(200)), (this.state32 = (0, o.u32)(this.state)); - } - keccak() { - v(this.state32, this.rounds), (this.posOut = 0), (this.pos = 0); - } - update(t) { - (0, i.exists)(this); - const { blockLen: e, state: r } = this, - n = (t = (0, o.toBytes)(t)).length; - for (let i = 0; i < n; ) { - const o = Math.min(e - this.pos, n - i); - for (let e = 0; e < o; e++) r[this.pos++] ^= t[i++]; - this.pos === e && this.keccak(); - } - return this; - } - finish() { - if (this.finished) return; - this.finished = !0; - const { state: t, suffix: e, pos: r, blockLen: i } = this; - (t[r] ^= e), 0 != (128 & e) && r === i - 1 && this.keccak(), (t[i - 1] ^= 128), this.keccak(); - } - writeInto(t) { - (0, i.exists)(this, !1), (0, i.bytes)(t), this.finish(); - const e = this.state, - { blockLen: r } = this; - for (let i = 0, n = t.length; i < n; ) { - this.posOut >= r && this.keccak(); - const o = Math.min(r - this.posOut, n - i); - t.set(e.subarray(this.posOut, this.posOut + o), i), (this.posOut += o), (i += o); - } - return t; - } - xofInto(t) { - if (!this.enableXOF) throw new Error('XOF is not possible for this instance'); - return this.writeInto(t); - } - xof(t) { - return (0, i.number)(t), this.xofInto(new Uint8Array(t)); - } - digestInto(t) { - if (((0, i.output)(t, this), this.finished)) throw new Error('digest() was already called'); - return this.writeInto(t), this.destroy(), t; - } - digest() { - return this.digestInto(new Uint8Array(this.outputLen)); - } - destroy() { - (this.destroyed = !0), this.state.fill(0); - } - _cloneInto(t) { - const { blockLen: e, suffix: r, outputLen: i, rounds: n, enableXOF: o } = this; - return ( - t || (t = new w(e, r, i, o, n)), - t.state32.set(this.state32), - (t.pos = this.pos), - (t.posOut = this.posOut), - (t.finished = this.finished), - (t.rounds = n), - (t.suffix = r), - (t.outputLen = i), - (t.enableXOF = o), - (t.destroyed = this.destroyed), - t - ); - } - } - e.Keccak = w; - const _ = (t, e, r) => (0, o.wrapConstructor)(() => new w(e, t, r)); - (e.sha3_224 = _(6, 144, 28)), - (e.sha3_256 = _(6, 136, 32)), - (e.sha3_384 = _(6, 104, 48)), - (e.sha3_512 = _(6, 72, 64)), - (e.keccak_224 = _(1, 144, 28)), - (e.keccak_256 = _(1, 136, 32)), - (e.keccak_384 = _(1, 104, 48)), - (e.keccak_512 = _(1, 72, 64)); - const M = (t, e, r) => (0, o.wrapXOFConstructorWithOpts)((i = {}) => new w(e, t, void 0 === i.dkLen ? r : i.dkLen, !0)); - (e.shake128 = M(31, 168, 16)), (e.shake256 = M(31, 136, 32)); - }, - 8089: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), - (e.randomBytes = - e.wrapXOFConstructorWithOpts = - e.wrapConstructorWithOpts = - e.wrapConstructor = - e.checkOpts = - e.Hash = - e.concatBytes = - e.toBytes = - e.utf8ToBytes = - e.asyncLoop = - e.nextTick = - e.hexToBytes = - e.bytesToHex = - e.isLE = - e.rotr = - e.createView = - e.u32 = - e.u8 = - void 0); - const i = r(1945); - function n(t) { - return t instanceof Uint8Array || (null != t && 'object' == typeof t && 'Uint8Array' === t.constructor.name); - } - if ( - ((e.u8 = t => new Uint8Array(t.buffer, t.byteOffset, t.byteLength)), - (e.u32 = t => new Uint32Array(t.buffer, t.byteOffset, Math.floor(t.byteLength / 4))), - (e.createView = t => new DataView(t.buffer, t.byteOffset, t.byteLength)), - (e.rotr = (t, e) => (t << (32 - e)) | (t >>> e)), - (e.isLE = 68 === new Uint8Array(new Uint32Array([287454020]).buffer)[0]), - !e.isLE) - ) - throw new Error('Non little-endian hardware is not supported'); - const o = Array.from({ length: 256 }, (t, e) => e.toString(16).padStart(2, '0')); - e.bytesToHex = function (t) { - if (!n(t)) throw new Error('Uint8Array expected'); - let e = ''; - for (let r = 0; r < t.length; r++) e += o[t[r]]; - return e; - }; - const s = 48, - a = 57, - h = 65, - u = 70, - f = 97, - c = 102; - function l(t) { - return t >= s && t <= a ? t - s : t >= h && t <= u ? t - (h - 10) : t >= f && t <= c ? t - (f - 10) : void 0; - } - function d(t) { - if ('string' != typeof t) throw new Error('utf8ToBytes expected string, got ' + typeof t); - return new Uint8Array(new TextEncoder().encode(t)); - } - function p(t) { - if (('string' == typeof t && (t = d(t)), !n(t))) throw new Error('expected Uint8Array, got ' + typeof t); - return t; - } - (e.hexToBytes = function (t) { - if ('string' != typeof t) throw new Error('hex string expected, got ' + typeof t); - const e = t.length, - r = e / 2; - if (e % 2) throw new Error('padded hex string expected, got unpadded hex of length ' + e); - const i = new Uint8Array(r); - for (let e = 0, n = 0; e < r; e++, n += 2) { - const r = l(t.charCodeAt(n)), - o = l(t.charCodeAt(n + 1)); - if (void 0 === r || void 0 === o) { - const e = t[n] + t[n + 1]; - throw new Error('hex string expected, got non-hex character "' + e + '" at index ' + n); - } - i[e] = 16 * r + o; - } - return i; - }), - (e.nextTick = async () => {}), - (e.asyncLoop = async function (t, r, i) { - let n = Date.now(); - for (let o = 0; o < t; o++) { - i(o); - const t = Date.now() - n; - (t >= 0 && t < r) || (await (0, e.nextTick)(), (n += t)); - } - }), - (e.utf8ToBytes = d), - (e.toBytes = p), - (e.concatBytes = function (...t) { - let e = 0; - for (let r = 0; r < t.length; r++) { - const i = t[r]; - if (!n(i)) throw new Error('Uint8Array expected'); - e += i.length; - } - const r = new Uint8Array(e); - for (let e = 0, i = 0; e < t.length; e++) { - const n = t[e]; - r.set(n, i), (i += n.length); - } - return r; - }), - (e.Hash = class { - clone() { - return this._cloneInto(); - } - }); - const m = {}.toString; - (e.checkOpts = function (t, e) { - if (void 0 !== e && '[object Object]' !== m.call(e)) throw new Error('Options should be object or undefined'); - return Object.assign(t, e); - }), - (e.wrapConstructor = function (t) { - const e = e => t().update(p(e)).digest(), - r = t(); - return (e.outputLen = r.outputLen), (e.blockLen = r.blockLen), (e.create = () => t()), e; - }), - (e.wrapConstructorWithOpts = function (t) { - const e = (e, r) => t(r).update(p(e)).digest(), - r = t({}); - return (e.outputLen = r.outputLen), (e.blockLen = r.blockLen), (e.create = e => t(e)), e; - }), - (e.wrapXOFConstructorWithOpts = function (t) { - const e = (e, r) => t(r).update(p(e)).digest(), - r = t({}); - return (e.outputLen = r.outputLen), (e.blockLen = r.blockLen), (e.create = e => t(e)), e; - }), - (e.randomBytes = function (t = 32) { - if (i.crypto && 'function' == typeof i.crypto.getRandomValues) return i.crypto.getRandomValues(new Uint8Array(t)); - throw new Error('crypto.getRandomValues must be defined'); - }); - }, - 9899: (t, e, r) => { - var i = t.exports, - n = (r(7187).EventEmitter, r(8290)), - o = r(8575); - (i.request = function (t, e) { - if ( - ('string' == typeof t && (t = o.parse(t)), - t || (t = {}), - t.host || t.port || (t.port = 80), - !t.host && t.hostname && (t.host = t.hostname), - t.protocol || (t.scheme ? (t.protocol = t.scheme + ':') : (t.protocol = 'http:')), - !t.host) - ) - throw new Error('missing host'); - /:/.test(t.host) && (t.port || (t.port = t.host.split(':')[1]), (t.host = t.host.split(':')[0])), - t.port || (t.port = 'https:' == t.protocol ? 443 : 80); - var r = new n(new XMLHttpRequest(), t); - return e && r.on('response', e), r; - }), - (i.get = function (t, e) { - t.method = 'GET'; - var r = i.request(t, e); - return r.end(), r; - }), - (i.Agent = function () {}), - (i.Agent.defaultMaxSockets = 4), - (i.STATUS_CODES = { - 100: 'Continue', - 101: 'Switching Protocols', - 102: 'Processing', - 200: 'OK', - 201: 'Created', - 202: 'Accepted', - 203: 'Non-Authoritative Information', - 204: 'No Content', - 205: 'Reset Content', - 206: 'Partial Content', - 207: 'Multi-Status', - 300: 'Multiple Choices', - 301: 'Moved Permanently', - 302: 'Moved Temporarily', - 303: 'See Other', - 304: 'Not Modified', - 305: 'Use Proxy', - 307: 'Temporary Redirect', - 400: 'Bad Request', - 401: 'Unauthorized', - 402: 'Payment Required', - 403: 'Forbidden', - 404: 'Not Found', - 405: 'Method Not Allowed', - 406: 'Not Acceptable', - 407: 'Proxy Authentication Required', - 408: 'Request Time-out', - 409: 'Conflict', - 410: 'Gone', - 411: 'Length Required', - 412: 'Precondition Failed', - 413: 'Request Entity Too Large', - 414: 'Request-URI Too Large', - 415: 'Unsupported Media Type', - 416: 'Requested Range Not Satisfiable', - 417: 'Expectation Failed', - 418: "I'm a teapot", - 422: 'Unprocessable Entity', - 423: 'Locked', - 424: 'Failed Dependency', - 425: 'Unordered Collection', - 426: 'Upgrade Required', - 428: 'Precondition Required', - 429: 'Too Many Requests', - 431: 'Request Header Fields Too Large', - 500: 'Internal Server Error', - 501: 'Not Implemented', - 502: 'Bad Gateway', - 503: 'Service Unavailable', - 504: 'Gateway Time-out', - 505: 'HTTP Version Not Supported', - 506: 'Variant Also Negotiates', - 507: 'Insufficient Storage', - 509: 'Bandwidth Limit Exceeded', - 510: 'Not Extended', - 511: 'Network Authentication Required', - }); - }, - 8290: (t, e, r) => { - var i = r(2830), - n = r(7630), - o = r(4188), - s = r(5717), - a = (t.exports = function (t, e) { - var r = this; - (r.writable = !0), - (r.xhr = t), - (r.body = []), - (r.uri = (e.protocol || 'http:') + '//' + e.host + (e.port ? ':' + e.port : '') + (e.path || '/')), - void 0 === e.withCredentials && (e.withCredentials = !0); - try { - t.withCredentials = e.withCredentials; - } catch (t) {} - if (e.responseType) - try { - t.responseType = e.responseType; - } catch (t) {} - if ( - (t.open(e.method || 'GET', r.uri, !0), - (t.onerror = function (t) { - r.emit('error', new Error('Network error')); - }), - (r._headers = {}), - e.headers) - ) - for (var i = h(e.headers), s = 0; s < i.length; s++) { - var a = i[s]; - if (r.isSafeRequestHeader(a)) { - var u = e.headers[a]; - r.setHeader(a, u); - } - } - e.auth && this.setHeader('Authorization', 'Basic ' + o.btoa(e.auth)); - var f = new n(); - f.on('close', function () { - r.emit('close'); - }), - f.on('ready', function () { - r.emit('response', f); - }), - f.on('error', function (t) { - r.emit('error', t); - }), - (t.onreadystatechange = function () { - t.__aborted || f.handle(t); - }); - }); - s(a, i), - (a.prototype.setHeader = function (t, e) { - this._headers[t.toLowerCase()] = e; - }), - (a.prototype.getHeader = function (t) { - return this._headers[t.toLowerCase()]; - }), - (a.prototype.removeHeader = function (t) { - delete this._headers[t.toLowerCase()]; - }), - (a.prototype.write = function (t) { - this.body.push(t); - }), - (a.prototype.destroy = function (t) { - (this.xhr.__aborted = !0), this.xhr.abort(), this.emit('close'); - }), - (a.prototype.end = function (t) { - void 0 !== t && this.body.push(t); - for (var e = h(this._headers), r = 0; r < e.length; r++) { - var i = e[r], - n = this._headers[i]; - if (u(n)) for (var o = 0; o < n.length; o++) this.xhr.setRequestHeader(i, n[o]); - else this.xhr.setRequestHeader(i, n); - } - if (0 === this.body.length) this.xhr.send(''); - else if ('string' == typeof this.body[0]) this.xhr.send(this.body.join('')); - else if (u(this.body[0])) { - var s = []; - for (r = 0; r < this.body.length; r++) s.push.apply(s, this.body[r]); - this.xhr.send(s); - } else if (/Array/.test(Object.prototype.toString.call(this.body[0]))) { - var a = 0; - for (r = 0; r < this.body.length; r++) a += this.body[r].length; - s = new this.body[0].constructor(a); - var f = 0; - for (r = 0; r < this.body.length; r++) { - var l = this.body[r]; - for (o = 0; o < l.length; o++) s[f++] = l[o]; - } - this.xhr.send(s); - } else if (c(this.body[0])) this.xhr.send(this.body[0]); - else { - for (s = '', r = 0; r < this.body.length; r++) s += this.body[r].toString(); - this.xhr.send(s); - } - }), - (a.unsafeHeaders = [ - 'accept-charset', - 'accept-encoding', - 'access-control-request-headers', - 'access-control-request-method', - 'connection', - 'content-length', - 'cookie', - 'cookie2', - 'content-transfer-encoding', - 'date', - 'expect', - 'host', - 'keep-alive', - 'origin', - 'referer', - 'te', - 'trailer', - 'transfer-encoding', - 'upgrade', - 'user-agent', - 'via', - ]), - (a.prototype.isSafeRequestHeader = function (t) { - return !!t && -1 === f(a.unsafeHeaders, t.toLowerCase()); - }); - var h = - Object.keys || - function (t) { - var e = []; - for (var r in t) e.push(r); - return e; - }, - u = - Array.isArray || - function (t) { - return '[object Array]' === Object.prototype.toString.call(t); - }, - f = function (t, e) { - if (t.indexOf) return t.indexOf(e); - for (var r = 0; r < t.length; r++) if (t[r] === e) return r; - return -1; - }, - c = function (t) { - return ( - ('undefined' != typeof Blob && t instanceof Blob) || - ('undefined' != typeof ArrayBuffer && t instanceof ArrayBuffer) || - ('undefined' != typeof FormData && t instanceof FormData) || - void 0 - ); - }; - }, - 7630: (t, e, r) => { - var i = r(2830), - n = r(9539), - o = (t.exports = function (t) { - (this.offset = 0), (this.readable = !0); - }); - n.inherits(o, i); - var s = { streaming: !0, status2: !0 }; - function a(t) { - for (var e = t.getAllResponseHeaders().split(/\r?\n/), r = {}, i = 0; i < e.length; i++) { - var n = e[i]; - if ('' !== n) { - var o = n.match(/^([^:]+):\s*(.*)/); - if (o) { - var s = o[1].toLowerCase(), - a = o[2]; - void 0 !== r[s] ? (h(r[s]) ? r[s].push(a) : (r[s] = [r[s], a])) : (r[s] = a); - } else r[n] = !0; - } - } - return r; - } - (o.prototype.getResponse = function (t) { - var e = String(t.responseType).toLowerCase(); - return 'blob' === e ? t.responseBlob || t.response : 'arraybuffer' === e ? t.response : t.responseText; - }), - (o.prototype.getHeader = function (t) { - return this.headers[t.toLowerCase()]; - }), - (o.prototype.handle = function (t) { - if (2 === t.readyState && s.status2) { - try { - (this.statusCode = t.status), (this.headers = a(t)); - } catch (t) { - s.status2 = !1; - } - s.status2 && this.emit('ready'); - } else if (s.streaming && 3 === t.readyState) { - try { - this.statusCode || ((this.statusCode = t.status), (this.headers = a(t)), this.emit('ready')); - } catch (t) {} - try { - this._emitData(t); - } catch (t) { - s.streaming = !1; - } - } else - 4 === t.readyState && - (this.statusCode || ((this.statusCode = t.status), this.emit('ready')), - this._emitData(t), - t.error ? this.emit('error', this.getResponse(t)) : this.emit('end'), - this.emit('close')); - }), - (o.prototype._emitData = function (t) { - var e = this.getResponse(t); - e.length > this.offset && (this.emit('data', new Buffer(e.slice(this.offset))), (this.offset = e.length)); - }); - var h = - Array.isArray || - function (t) { - return '[object Array]' === Object.prototype.toString.call(t); - }; - }, - 4188: (t, e) => { - !(function () { - var t = e, - r = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='; - function i(t) { - this.message = t; - } - (i.prototype = new Error()), - (i.prototype.name = 'InvalidCharacterError'), - t.btoa || - (t.btoa = function (t) { - for (var e, n, o = 0, s = r, a = ''; t.charAt(0 | o) || ((s = '='), o % 1); a += s.charAt(63 & (e >> (8 - (o % 1) * 8)))) { - if ((n = t.charCodeAt((o += 3 / 4))) > 255) - throw new i("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range."); - e = (e << 8) | n; - } - return a; - }), - t.atob || - (t.atob = function (t) { - if ((t = t.replace(/=+$/, '')).length % 4 == 1) - throw new i("'atob' failed: The string to be decoded is not correctly encoded."); - for ( - var e, n, o = 0, s = 0, a = ''; - (n = t.charAt(s++)); - ~n && ((e = o % 4 ? 64 * e + n : n), o++ % 4) ? (a += String.fromCharCode(255 & (e >> ((-2 * o) & 6)))) : 0 - ) - n = r.indexOf(n); - return a; - }); - })(); - }, - 8583: (t, e, r) => { - 'use strict'; - var i = r(7418); - function n(t, e) { - if (t === e) return 0; - for (var r = t.length, i = e.length, n = 0, o = Math.min(r, i); n < o; ++n) - if (t[n] !== e[n]) { - (r = t[n]), (i = e[n]); - break; - } - return r < i ? -1 : i < r ? 1 : 0; - } - function o(t) { - return r.g.Buffer && 'function' == typeof r.g.Buffer.isBuffer ? r.g.Buffer.isBuffer(t) : !(null == t || !t._isBuffer); - } - var s = r(69), - a = Object.prototype.hasOwnProperty, - h = Array.prototype.slice, - u = 'foo' === function () {}.name; - function f(t) { - return Object.prototype.toString.call(t); - } - function c(t) { - return ( - !o(t) && - 'function' == typeof r.g.ArrayBuffer && - ('function' == typeof ArrayBuffer.isView - ? ArrayBuffer.isView(t) - : !!t && (t instanceof DataView || !!(t.buffer && t.buffer instanceof ArrayBuffer))) - ); - } - var l = (t.exports = y), - d = /\s*function\s+([^\(\s]*)\s*/; - function p(t) { - if (s.isFunction(t)) { - if (u) return t.name; - var e = t.toString().match(d); - return e && e[1]; - } - } - function m(t, e) { - return 'string' == typeof t ? (t.length < e ? t : t.slice(0, e)) : t; - } - function g(t) { - if (u || !s.isFunction(t)) return s.inspect(t); - var e = p(t); - return '[Function' + (e ? ': ' + e : '') + ']'; - } - function b(t, e, r, i, n) { - throw new l.AssertionError({ message: r, actual: t, expected: e, operator: i, stackStartFunction: n }); - } - function y(t, e) { - t || b(t, !0, e, '==', l.ok); - } - function v(t, e, r, i) { - if (t === e) return !0; - if (o(t) && o(e)) return 0 === n(t, e); - if (s.isDate(t) && s.isDate(e)) return t.getTime() === e.getTime(); - if (s.isRegExp(t) && s.isRegExp(e)) - return ( - t.source === e.source && - t.global === e.global && - t.multiline === e.multiline && - t.lastIndex === e.lastIndex && - t.ignoreCase === e.ignoreCase - ); - if ((null !== t && 'object' == typeof t) || (null !== e && 'object' == typeof e)) { - if (c(t) && c(e) && f(t) === f(e) && !(t instanceof Float32Array || t instanceof Float64Array)) - return 0 === n(new Uint8Array(t.buffer), new Uint8Array(e.buffer)); - if (o(t) !== o(e)) return !1; - var a = (i = i || { actual: [], expected: [] }).actual.indexOf(t); - return ( - (-1 !== a && a === i.expected.indexOf(e)) || - (i.actual.push(t), - i.expected.push(e), - (function (t, e, r, i) { - if (null == t || null == e) return !1; - if (s.isPrimitive(t) || s.isPrimitive(e)) return t === e; - if (r && Object.getPrototypeOf(t) !== Object.getPrototypeOf(e)) return !1; - var n = w(t), - o = w(e); - if ((n && !o) || (!n && o)) return !1; - if (n) return v((t = h.call(t)), (e = h.call(e)), r); - var a, - u, - f = E(t), - c = E(e); - if (f.length !== c.length) return !1; - for (f.sort(), c.sort(), u = f.length - 1; u >= 0; u--) if (f[u] !== c[u]) return !1; - for (u = f.length - 1; u >= 0; u--) if (!v(t[(a = f[u])], e[a], r, i)) return !1; - return !0; - })(t, e, r, i)) - ); - } - return r ? t === e : t == e; - } - function w(t) { - return '[object Arguments]' == Object.prototype.toString.call(t); - } - function _(t, e) { - if (!t || !e) return !1; - if ('[object RegExp]' == Object.prototype.toString.call(e)) return e.test(t); - try { - if (t instanceof e) return !0; - } catch (t) {} - return !Error.isPrototypeOf(e) && !0 === e.call({}, t); - } - function M(t, e, r, i) { - var n; - if ('function' != typeof e) throw new TypeError('"block" argument must be a function'); - 'string' == typeof r && ((i = r), (r = null)), - (n = (function (t) { - var e; - try { - t(); - } catch (t) { - e = t; - } - return e; - })(e)), - (i = (r && r.name ? ' (' + r.name + ').' : '.') + (i ? ' ' + i : '.')), - t && !n && b(n, r, 'Missing expected exception' + i); - var o = 'string' == typeof i, - a = !t && n && !r; - if ( - (((!t && s.isError(n) && o && _(n, r)) || a) && b(n, r, 'Got unwanted exception' + i), (t && n && r && !_(n, r)) || (!t && n)) - ) - throw n; - } - (l.AssertionError = function (t) { - (this.name = 'AssertionError'), - (this.actual = t.actual), - (this.expected = t.expected), - (this.operator = t.operator), - t.message - ? ((this.message = t.message), (this.generatedMessage = !1)) - : ((this.message = (function (t) { - return m(g(t.actual), 128) + ' ' + t.operator + ' ' + m(g(t.expected), 128); - })(this)), - (this.generatedMessage = !0)); - var e = t.stackStartFunction || b; - if (Error.captureStackTrace) Error.captureStackTrace(this, e); - else { - var r = new Error(); - if (r.stack) { - var i = r.stack, - n = p(e), - o = i.indexOf('\n' + n); - if (o >= 0) { - var s = i.indexOf('\n', o + 1); - i = i.substring(s + 1); - } - this.stack = i; - } - } - }), - s.inherits(l.AssertionError, Error), - (l.fail = b), - (l.ok = y), - (l.equal = function (t, e, r) { - t != e && b(t, e, r, '==', l.equal); - }), - (l.notEqual = function (t, e, r) { - t == e && b(t, e, r, '!=', l.notEqual); - }), - (l.deepEqual = function (t, e, r) { - v(t, e, !1) || b(t, e, r, 'deepEqual', l.deepEqual); - }), - (l.deepStrictEqual = function (t, e, r) { - v(t, e, !0) || b(t, e, r, 'deepStrictEqual', l.deepStrictEqual); - }), - (l.notDeepEqual = function (t, e, r) { - v(t, e, !1) && b(t, e, r, 'notDeepEqual', l.notDeepEqual); - }), - (l.notDeepStrictEqual = function t(e, r, i) { - v(e, r, !0) && b(e, r, i, 'notDeepStrictEqual', t); - }), - (l.strictEqual = function (t, e, r) { - t !== e && b(t, e, r, '===', l.strictEqual); - }), - (l.notStrictEqual = function (t, e, r) { - t === e && b(t, e, r, '!==', l.notStrictEqual); - }), - (l.throws = function (t, e, r) { - M(!0, t, e, r); - }), - (l.doesNotThrow = function (t, e, r) { - M(!1, t, e, r); - }), - (l.ifError = function (t) { - if (t) throw t; - }), - (l.strict = i( - function t(e, r) { - e || b(e, !0, r, '==', t); - }, - l, - { equal: l.strictEqual, deepEqual: l.deepStrictEqual, notEqual: l.notStrictEqual, notDeepEqual: l.notDeepStrictEqual } - )), - (l.strict.strict = l.strict); - var E = - Object.keys || - function (t) { - var e = []; - for (var r in t) a.call(t, r) && e.push(r); - return e; - }; - }, - 6076: t => { - 'function' == typeof Object.create - ? (t.exports = function (t, e) { - (t.super_ = e), - (t.prototype = Object.create(e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } })); - }) - : (t.exports = function (t, e) { - t.super_ = e; - var r = function () {}; - (r.prototype = e.prototype), (t.prototype = new r()), (t.prototype.constructor = t); - }); - }, - 2014: t => { - t.exports = function (t) { - return ( - t && 'object' == typeof t && 'function' == typeof t.copy && 'function' == typeof t.fill && 'function' == typeof t.readUInt8 - ); - }; - }, - 69: (t, e, r) => { - var i = /%[sdj%]/g; - (e.format = function (t) { - if (!g(t)) { - for (var e = [], r = 0; r < arguments.length; r++) e.push(s(arguments[r])); - return e.join(' '); - } - r = 1; - for ( - var n = arguments, - o = n.length, - a = String(t).replace(i, function (t) { - if ('%%' === t) return '%'; - if (r >= o) return t; - switch (t) { - case '%s': - return String(n[r++]); - case '%d': - return Number(n[r++]); - case '%j': - try { - return JSON.stringify(n[r++]); - } catch (t) { - return '[Circular]'; - } - default: - return t; - } - }), - h = n[r]; - r < o; - h = n[++r] - ) - p(h) || !v(h) ? (a += ' ' + h) : (a += ' ' + s(h)); - return a; - }), - (e.deprecate = function (t, i) { - if (b(r.g.process)) - return function () { - return e.deprecate(t, i).apply(this, arguments); - }; - if (!0 === process.noDeprecation) return t; - var n = !1; - return function () { - if (!n) { - if (process.throwDeprecation) throw new Error(i); - process.traceDeprecation ? console.trace(i) : console.error(i), (n = !0); - } - return t.apply(this, arguments); - }; - }); - var n, - o = {}; - function s(t, r) { - var i = { seen: [], stylize: h }; - return ( - arguments.length >= 3 && (i.depth = arguments[2]), - arguments.length >= 4 && (i.colors = arguments[3]), - d(r) ? (i.showHidden = r) : r && e._extend(i, r), - b(i.showHidden) && (i.showHidden = !1), - b(i.depth) && (i.depth = 2), - b(i.colors) && (i.colors = !1), - b(i.customInspect) && (i.customInspect = !0), - i.colors && (i.stylize = a), - u(i, t, i.depth) - ); - } - function a(t, e) { - var r = s.styles[e]; - return r ? '[' + s.colors[r][0] + 'm' + t + '[' + s.colors[r][1] + 'm' : t; - } - function h(t, e) { - return t; - } - function u(t, r, i) { - if (t.customInspect && r && M(r.inspect) && r.inspect !== e.inspect && (!r.constructor || r.constructor.prototype !== r)) { - var n = r.inspect(i, t); - return g(n) || (n = u(t, n, i)), n; - } - var o = (function (t, e) { - if (b(e)) return t.stylize('undefined', 'undefined'); - if (g(e)) { - var r = "'" + JSON.stringify(e).replace(/^"|"$/g, '').replace(/'/g, "\\'").replace(/\\"/g, '"') + "'"; - return t.stylize(r, 'string'); - } - return m(e) ? t.stylize('' + e, 'number') : d(e) ? t.stylize('' + e, 'boolean') : p(e) ? t.stylize('null', 'null') : void 0; - })(t, r); - if (o) return o; - var s = Object.keys(r), - a = (function (t) { - var e = {}; - return ( - t.forEach(function (t, r) { - e[t] = !0; - }), - e - ); - })(s); - if ((t.showHidden && (s = Object.getOwnPropertyNames(r)), _(r) && (s.indexOf('message') >= 0 || s.indexOf('description') >= 0))) - return f(r); - if (0 === s.length) { - if (M(r)) { - var h = r.name ? ': ' + r.name : ''; - return t.stylize('[Function' + h + ']', 'special'); - } - if (y(r)) return t.stylize(RegExp.prototype.toString.call(r), 'regexp'); - if (w(r)) return t.stylize(Date.prototype.toString.call(r), 'date'); - if (_(r)) return f(r); - } - var v, - E = '', - S = !1, - x = ['{', '}']; - return ( - l(r) && ((S = !0), (x = ['[', ']'])), - M(r) && (E = ' [Function' + (r.name ? ': ' + r.name : '') + ']'), - y(r) && (E = ' ' + RegExp.prototype.toString.call(r)), - w(r) && (E = ' ' + Date.prototype.toUTCString.call(r)), - _(r) && (E = ' ' + f(r)), - 0 !== s.length || (S && 0 != r.length) - ? i < 0 - ? y(r) - ? t.stylize(RegExp.prototype.toString.call(r), 'regexp') - : t.stylize('[Object]', 'special') - : (t.seen.push(r), - (v = S - ? (function (t, e, r, i, n) { - for (var o = [], s = 0, a = e.length; s < a; ++s) - A(e, String(s)) ? o.push(c(t, e, r, i, String(s), !0)) : o.push(''); - return ( - n.forEach(function (n) { - n.match(/^\d+$/) || o.push(c(t, e, r, i, n, !0)); - }), - o - ); - })(t, r, i, a, s) - : s.map(function (e) { - return c(t, r, i, a, e, S); - })), - t.seen.pop(), - (function (t, e, r) { - return t.reduce(function (t, e) { - return e.indexOf('\n'), t + e.replace(/\u001b\[\d\d?m/g, '').length + 1; - }, 0) > 60 - ? r[0] + ('' === e ? '' : e + '\n ') + ' ' + t.join(',\n ') + ' ' + r[1] - : r[0] + e + ' ' + t.join(', ') + ' ' + r[1]; - })(v, E, x)) - : x[0] + E + x[1] - ); - } - function f(t) { - return '[' + Error.prototype.toString.call(t) + ']'; - } - function c(t, e, r, i, n, o) { - var s, a, h; - if ( - ((h = Object.getOwnPropertyDescriptor(e, n) || { value: e[n] }).get - ? (a = h.set ? t.stylize('[Getter/Setter]', 'special') : t.stylize('[Getter]', 'special')) - : h.set && (a = t.stylize('[Setter]', 'special')), - A(i, n) || (s = '[' + n + ']'), - a || - (t.seen.indexOf(h.value) < 0 - ? (a = p(r) ? u(t, h.value, null) : u(t, h.value, r - 1)).indexOf('\n') > -1 && - (a = o - ? a - .split('\n') - .map(function (t) { - return ' ' + t; - }) - .join('\n') - .substr(2) - : '\n' + - a - .split('\n') - .map(function (t) { - return ' ' + t; - }) - .join('\n')) - : (a = t.stylize('[Circular]', 'special'))), - b(s)) - ) { - if (o && n.match(/^\d+$/)) return a; - (s = JSON.stringify('' + n)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/) - ? ((s = s.substr(1, s.length - 2)), (s = t.stylize(s, 'name'))) - : ((s = s - .replace(/'/g, "\\'") - .replace(/\\"/g, '"') - .replace(/(^"|"$)/g, "'")), - (s = t.stylize(s, 'string'))); - } - return s + ': ' + a; - } - function l(t) { - return Array.isArray(t); - } - function d(t) { - return 'boolean' == typeof t; - } - function p(t) { - return null === t; - } - function m(t) { - return 'number' == typeof t; - } - function g(t) { - return 'string' == typeof t; - } - function b(t) { - return void 0 === t; - } - function y(t) { - return v(t) && '[object RegExp]' === E(t); - } - function v(t) { - return 'object' == typeof t && null !== t; - } - function w(t) { - return v(t) && '[object Date]' === E(t); - } - function _(t) { - return v(t) && ('[object Error]' === E(t) || t instanceof Error); - } - function M(t) { - return 'function' == typeof t; - } - function E(t) { - return Object.prototype.toString.call(t); - } - function S(t) { - return t < 10 ? '0' + t.toString(10) : t.toString(10); - } - (e.debuglog = function (t) { - if ((b(n) && (n = process.env.NODE_DEBUG || ''), (t = t.toUpperCase()), !o[t])) - if (new RegExp('\\b' + t + '\\b', 'i').test(n)) { - var r = process.pid; - o[t] = function () { - var i = e.format.apply(e, arguments); - console.error('%s %d: %s', t, r, i); - }; - } else o[t] = function () {}; - return o[t]; - }), - (e.inspect = s), - (s.colors = { - bold: [1, 22], - italic: [3, 23], - underline: [4, 24], - inverse: [7, 27], - white: [37, 39], - grey: [90, 39], - black: [30, 39], - blue: [34, 39], - cyan: [36, 39], - green: [32, 39], - magenta: [35, 39], - red: [31, 39], - yellow: [33, 39], - }), - (s.styles = { - special: 'cyan', - number: 'yellow', - boolean: 'yellow', - undefined: 'grey', - null: 'bold', - string: 'green', - date: 'magenta', - regexp: 'red', - }), - (e.isArray = l), - (e.isBoolean = d), - (e.isNull = p), - (e.isNullOrUndefined = function (t) { - return null == t; - }), - (e.isNumber = m), - (e.isString = g), - (e.isSymbol = function (t) { - return 'symbol' == typeof t; - }), - (e.isUndefined = b), - (e.isRegExp = y), - (e.isObject = v), - (e.isDate = w), - (e.isError = _), - (e.isFunction = M), - (e.isPrimitive = function (t) { - return ( - null === t || 'boolean' == typeof t || 'number' == typeof t || 'string' == typeof t || 'symbol' == typeof t || void 0 === t - ); - }), - (e.isBuffer = r(2014)); - var x = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']; - function A(t, e) { - return Object.prototype.hasOwnProperty.call(t, e); - } - (e.log = function () { - var t, r; - console.log( - '%s - %s', - ((r = [S((t = new Date()).getHours()), S(t.getMinutes()), S(t.getSeconds())].join(':')), - [t.getDate(), x[t.getMonth()], r].join(' ')), - e.format.apply(e, arguments) - ); - }), - (e.inherits = r(6076)), - (e._extend = function (t, e) { - if (!e || !v(e)) return t; - for (var r = Object.keys(e), i = r.length; i--; ) t[r[i]] = e[r[i]]; - return t; - }); - }, - 9742: (t, e) => { - 'use strict'; - (e.byteLength = function (t) { - var e = a(t), - r = e[0], - i = e[1]; - return (3 * (r + i)) / 4 - i; - }), - (e.toByteArray = function (t) { - var e, - r, - o = a(t), - s = o[0], - h = o[1], - u = new n( - (function (t, e, r) { - return (3 * (e + r)) / 4 - r; - })(0, s, h) - ), - f = 0, - c = h > 0 ? s - 4 : s; - for (r = 0; r < c; r += 4) - (e = (i[t.charCodeAt(r)] << 18) | (i[t.charCodeAt(r + 1)] << 12) | (i[t.charCodeAt(r + 2)] << 6) | i[t.charCodeAt(r + 3)]), - (u[f++] = (e >> 16) & 255), - (u[f++] = (e >> 8) & 255), - (u[f++] = 255 & e); - return ( - 2 === h && ((e = (i[t.charCodeAt(r)] << 2) | (i[t.charCodeAt(r + 1)] >> 4)), (u[f++] = 255 & e)), - 1 === h && - ((e = (i[t.charCodeAt(r)] << 10) | (i[t.charCodeAt(r + 1)] << 4) | (i[t.charCodeAt(r + 2)] >> 2)), - (u[f++] = (e >> 8) & 255), - (u[f++] = 255 & e)), - u - ); - }), - (e.fromByteArray = function (t) { - for (var e, i = t.length, n = i % 3, o = [], s = 16383, a = 0, u = i - n; a < u; a += s) o.push(h(t, a, a + s > u ? u : a + s)); - return ( - 1 === n - ? ((e = t[i - 1]), o.push(r[e >> 2] + r[(e << 4) & 63] + '==')) - : 2 === n && ((e = (t[i - 2] << 8) + t[i - 1]), o.push(r[e >> 10] + r[(e >> 4) & 63] + r[(e << 2) & 63] + '=')), - o.join('') - ); - }); - for ( - var r = [], - i = [], - n = 'undefined' != typeof Uint8Array ? Uint8Array : Array, - o = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/', - s = 0; - s < 64; - ++s - ) - (r[s] = o[s]), (i[o.charCodeAt(s)] = s); - function a(t) { - var e = t.length; - if (e % 4 > 0) throw new Error('Invalid string. Length must be a multiple of 4'); - var r = t.indexOf('='); - return -1 === r && (r = e), [r, r === e ? 0 : 4 - (r % 4)]; - } - function h(t, e, i) { - for (var n, o, s = [], a = e; a < i; a += 3) - (n = ((t[a] << 16) & 16711680) + ((t[a + 1] << 8) & 65280) + (255 & t[a + 2])), - s.push(r[((o = n) >> 18) & 63] + r[(o >> 12) & 63] + r[(o >> 6) & 63] + r[63 & o]); - return s.join(''); - } - (i['-'.charCodeAt(0)] = 62), (i['_'.charCodeAt(0)] = 63); - }, - 6907: (t, e) => { - 'use strict'; - var r = 'undefined' != typeof Uint8Array && 'undefined' != typeof Uint16Array && 'undefined' != typeof Int32Array; - (e.assign = function (t) { - for (var e = Array.prototype.slice.call(arguments, 1); e.length; ) { - var r = e.shift(); - if (r) { - if ('object' != typeof r) throw new TypeError(r + 'must be non-object'); - for (var i in r) r.hasOwnProperty(i) && (t[i] = r[i]); - } - } - return t; - }), - (e.shrinkBuf = function (t, e) { - return t.length === e ? t : t.subarray ? t.subarray(0, e) : ((t.length = e), t); - }); - var i = { - arraySet: function (t, e, r, i, n) { - if (e.subarray && t.subarray) t.set(e.subarray(r, r + i), n); - else for (var o = 0; o < i; o++) t[n + o] = e[r + o]; - }, - flattenChunks: function (t) { - var e, r, i, n, o, s; - for (i = 0, e = 0, r = t.length; e < r; e++) i += t[e].length; - for (s = new Uint8Array(i), n = 0, e = 0, r = t.length; e < r; e++) (o = t[e]), s.set(o, n), (n += o.length); - return s; - }, - }, - n = { - arraySet: function (t, e, r, i, n) { - for (var o = 0; o < i; o++) t[n + o] = e[r + o]; - }, - flattenChunks: function (t) { - return [].concat.apply([], t); - }, - }; - (e.setTyped = function (t) { - t - ? ((e.Buf8 = Uint8Array), (e.Buf16 = Uint16Array), (e.Buf32 = Int32Array), e.assign(e, i)) - : ((e.Buf8 = Array), (e.Buf16 = Array), (e.Buf32 = Array), e.assign(e, n)); - }), - e.setTyped(r); - }, - 7575: t => { - 'use strict'; - t.exports = function (t, e, r, i) { - for (var n = (65535 & t) | 0, o = ((t >>> 16) & 65535) | 0, s = 0; 0 !== r; ) { - r -= s = r > 2e3 ? 2e3 : r; - do { - o = (o + (n = (n + e[i++]) | 0)) | 0; - } while (--s); - (n %= 65521), (o %= 65521); - } - return n | (o << 16) | 0; - }; - }, - 7162: t => { - 'use strict'; - t.exports = { - Z_NO_FLUSH: 0, - Z_PARTIAL_FLUSH: 1, - Z_SYNC_FLUSH: 2, - Z_FULL_FLUSH: 3, - Z_FINISH: 4, - Z_BLOCK: 5, - Z_TREES: 6, - Z_OK: 0, - Z_STREAM_END: 1, - Z_NEED_DICT: 2, - Z_ERRNO: -1, - Z_STREAM_ERROR: -2, - Z_DATA_ERROR: -3, - Z_BUF_ERROR: -5, - Z_NO_COMPRESSION: 0, - Z_BEST_SPEED: 1, - Z_BEST_COMPRESSION: 9, - Z_DEFAULT_COMPRESSION: -1, - Z_FILTERED: 1, - Z_HUFFMAN_ONLY: 2, - Z_RLE: 3, - Z_FIXED: 4, - Z_DEFAULT_STRATEGY: 0, - Z_BINARY: 0, - Z_TEXT: 1, - Z_UNKNOWN: 2, - Z_DEFLATED: 8, - }; - }, - 631: t => { - 'use strict'; - var e = (function () { - for (var t, e = [], r = 0; r < 256; r++) { - t = r; - for (var i = 0; i < 8; i++) t = 1 & t ? 3988292384 ^ (t >>> 1) : t >>> 1; - e[r] = t; - } - return e; - })(); - t.exports = function (t, r, i, n) { - var o = e, - s = n + i; - t ^= -1; - for (var a = n; a < s; a++) t = (t >>> 8) ^ o[255 & (t ^ r[a])]; - return -1 ^ t; - }; - }, - 2233: (t, e, r) => { - 'use strict'; - var i, - n = r(6907), - o = r(1339), - s = r(7575), - a = r(631), - h = r(9364), - u = 0, - f = 0, - c = -2, - l = 2, - d = 8, - p = 286, - m = 30, - g = 19, - b = 2 * p + 1, - y = 15, - v = 3, - w = 258, - _ = w + v + 1, - M = 42, - E = 103, - S = 113, - x = 666; - function A(t, e) { - return (t.msg = h[e]), e; - } - function k(t) { - return (t << 1) - (t > 4 ? 9 : 0); - } - function R(t) { - for (var e = t.length; --e >= 0; ) t[e] = 0; - } - function B(t) { - var e = t.state, - r = e.pending; - r > t.avail_out && (r = t.avail_out), - 0 !== r && - (n.arraySet(t.output, e.pending_buf, e.pending_out, r, t.next_out), - (t.next_out += r), - (e.pending_out += r), - (t.total_out += r), - (t.avail_out -= r), - (e.pending -= r), - 0 === e.pending && (e.pending_out = 0)); - } - function I(t, e) { - o._tr_flush_block(t, t.block_start >= 0 ? t.block_start : -1, t.strstart - t.block_start, e), - (t.block_start = t.strstart), - B(t.strm); - } - function T(t, e) { - t.pending_buf[t.pending++] = e; - } - function P(t, e) { - (t.pending_buf[t.pending++] = (e >>> 8) & 255), (t.pending_buf[t.pending++] = 255 & e); - } - function O(t, e) { - var r, - i, - n = t.max_chain_length, - o = t.strstart, - s = t.prev_length, - a = t.nice_match, - h = t.strstart > t.w_size - _ ? t.strstart - (t.w_size - _) : 0, - u = t.window, - f = t.w_mask, - c = t.prev, - l = t.strstart + w, - d = u[o + s - 1], - p = u[o + s]; - t.prev_length >= t.good_match && (n >>= 2), a > t.lookahead && (a = t.lookahead); - do { - if (u[(r = e) + s] === p && u[r + s - 1] === d && u[r] === u[o] && u[++r] === u[o + 1]) { - (o += 2), r++; - do {} while ( - u[++o] === u[++r] && - u[++o] === u[++r] && - u[++o] === u[++r] && - u[++o] === u[++r] && - u[++o] === u[++r] && - u[++o] === u[++r] && - u[++o] === u[++r] && - u[++o] === u[++r] && - o < l - ); - if (((i = w - (l - o)), (o = l - w), i > s)) { - if (((t.match_start = e), (s = i), i >= a)) break; - (d = u[o + s - 1]), (p = u[o + s]); - } - } - } while ((e = c[e & f]) > h && 0 != --n); - return s <= t.lookahead ? s : t.lookahead; - } - function L(t) { - var e, - r, - i, - o, - h, - u, - f, - c, - l, - d, - p = t.w_size; - do { - if (((o = t.window_size - t.lookahead - t.strstart), t.strstart >= p + (p - _))) { - n.arraySet(t.window, t.window, p, p, 0), (t.match_start -= p), (t.strstart -= p), (t.block_start -= p), (e = r = t.hash_size); - do { - (i = t.head[--e]), (t.head[e] = i >= p ? i - p : 0); - } while (--r); - e = r = p; - do { - (i = t.prev[--e]), (t.prev[e] = i >= p ? i - p : 0); - } while (--r); - o += p; - } - if (0 === t.strm.avail_in) break; - if ( - ((u = t.strm), - (f = t.window), - (c = t.strstart + t.lookahead), - (l = o), - (d = void 0), - (d = u.avail_in) > l && (d = l), - (r = - 0 === d - ? 0 - : ((u.avail_in -= d), - n.arraySet(f, u.input, u.next_in, d, c), - 1 === u.state.wrap ? (u.adler = s(u.adler, f, d, c)) : 2 === u.state.wrap && (u.adler = a(u.adler, f, d, c)), - (u.next_in += d), - (u.total_in += d), - d)), - (t.lookahead += r), - t.lookahead + t.insert >= v) - ) - for ( - h = t.strstart - t.insert, t.ins_h = t.window[h], t.ins_h = ((t.ins_h << t.hash_shift) ^ t.window[h + 1]) & t.hash_mask; - t.insert && - ((t.ins_h = ((t.ins_h << t.hash_shift) ^ t.window[h + v - 1]) & t.hash_mask), - (t.prev[h & t.w_mask] = t.head[t.ins_h]), - (t.head[t.ins_h] = h), - h++, - t.insert--, - !(t.lookahead + t.insert < v)); - - ); - } while (t.lookahead < _ && 0 !== t.strm.avail_in); - } - function C(t, e) { - for (var r, i; ; ) { - if (t.lookahead < _) { - if ((L(t), t.lookahead < _ && e === u)) return 1; - if (0 === t.lookahead) break; - } - if ( - ((r = 0), - t.lookahead >= v && - ((t.ins_h = ((t.ins_h << t.hash_shift) ^ t.window[t.strstart + v - 1]) & t.hash_mask), - (r = t.prev[t.strstart & t.w_mask] = t.head[t.ins_h]), - (t.head[t.ins_h] = t.strstart)), - 0 !== r && t.strstart - r <= t.w_size - _ && (t.match_length = O(t, r)), - t.match_length >= v) - ) - if ( - ((i = o._tr_tally(t, t.strstart - t.match_start, t.match_length - v)), - (t.lookahead -= t.match_length), - t.match_length <= t.max_lazy_match && t.lookahead >= v) - ) { - t.match_length--; - do { - t.strstart++, - (t.ins_h = ((t.ins_h << t.hash_shift) ^ t.window[t.strstart + v - 1]) & t.hash_mask), - (r = t.prev[t.strstart & t.w_mask] = t.head[t.ins_h]), - (t.head[t.ins_h] = t.strstart); - } while (0 != --t.match_length); - t.strstart++; - } else - (t.strstart += t.match_length), - (t.match_length = 0), - (t.ins_h = t.window[t.strstart]), - (t.ins_h = ((t.ins_h << t.hash_shift) ^ t.window[t.strstart + 1]) & t.hash_mask); - else (i = o._tr_tally(t, 0, t.window[t.strstart])), t.lookahead--, t.strstart++; - if (i && (I(t, !1), 0 === t.strm.avail_out)) return 1; - } - return ( - (t.insert = t.strstart < v - 1 ? t.strstart : v - 1), - 4 === e ? (I(t, !0), 0 === t.strm.avail_out ? 3 : 4) : t.last_lit && (I(t, !1), 0 === t.strm.avail_out) ? 1 : 2 - ); - } - function N(t, e) { - for (var r, i, n; ; ) { - if (t.lookahead < _) { - if ((L(t), t.lookahead < _ && e === u)) return 1; - if (0 === t.lookahead) break; - } - if ( - ((r = 0), - t.lookahead >= v && - ((t.ins_h = ((t.ins_h << t.hash_shift) ^ t.window[t.strstart + v - 1]) & t.hash_mask), - (r = t.prev[t.strstart & t.w_mask] = t.head[t.ins_h]), - (t.head[t.ins_h] = t.strstart)), - (t.prev_length = t.match_length), - (t.prev_match = t.match_start), - (t.match_length = v - 1), - 0 !== r && - t.prev_length < t.max_lazy_match && - t.strstart - r <= t.w_size - _ && - ((t.match_length = O(t, r)), - t.match_length <= 5 && - (1 === t.strategy || (t.match_length === v && t.strstart - t.match_start > 4096)) && - (t.match_length = v - 1)), - t.prev_length >= v && t.match_length <= t.prev_length) - ) { - (n = t.strstart + t.lookahead - v), - (i = o._tr_tally(t, t.strstart - 1 - t.prev_match, t.prev_length - v)), - (t.lookahead -= t.prev_length - 1), - (t.prev_length -= 2); - do { - ++t.strstart <= n && - ((t.ins_h = ((t.ins_h << t.hash_shift) ^ t.window[t.strstart + v - 1]) & t.hash_mask), - (r = t.prev[t.strstart & t.w_mask] = t.head[t.ins_h]), - (t.head[t.ins_h] = t.strstart)); - } while (0 != --t.prev_length); - if (((t.match_available = 0), (t.match_length = v - 1), t.strstart++, i && (I(t, !1), 0 === t.strm.avail_out))) return 1; - } else if (t.match_available) { - if (((i = o._tr_tally(t, 0, t.window[t.strstart - 1])) && I(t, !1), t.strstart++, t.lookahead--, 0 === t.strm.avail_out)) - return 1; - } else (t.match_available = 1), t.strstart++, t.lookahead--; - } - return ( - t.match_available && ((i = o._tr_tally(t, 0, t.window[t.strstart - 1])), (t.match_available = 0)), - (t.insert = t.strstart < v - 1 ? t.strstart : v - 1), - 4 === e ? (I(t, !0), 0 === t.strm.avail_out ? 3 : 4) : t.last_lit && (I(t, !1), 0 === t.strm.avail_out) ? 1 : 2 - ); - } - function j(t, e, r, i, n) { - (this.good_length = t), (this.max_lazy = e), (this.nice_length = r), (this.max_chain = i), (this.func = n); - } - function U() { - (this.strm = null), - (this.status = 0), - (this.pending_buf = null), - (this.pending_buf_size = 0), - (this.pending_out = 0), - (this.pending = 0), - (this.wrap = 0), - (this.gzhead = null), - (this.gzindex = 0), - (this.method = d), - (this.last_flush = -1), - (this.w_size = 0), - (this.w_bits = 0), - (this.w_mask = 0), - (this.window = null), - (this.window_size = 0), - (this.prev = null), - (this.head = null), - (this.ins_h = 0), - (this.hash_size = 0), - (this.hash_bits = 0), - (this.hash_mask = 0), - (this.hash_shift = 0), - (this.block_start = 0), - (this.match_length = 0), - (this.prev_match = 0), - (this.match_available = 0), - (this.strstart = 0), - (this.match_start = 0), - (this.lookahead = 0), - (this.prev_length = 0), - (this.max_chain_length = 0), - (this.max_lazy_match = 0), - (this.level = 0), - (this.strategy = 0), - (this.good_match = 0), - (this.nice_match = 0), - (this.dyn_ltree = new n.Buf16(2 * b)), - (this.dyn_dtree = new n.Buf16(2 * (2 * m + 1))), - (this.bl_tree = new n.Buf16(2 * (2 * g + 1))), - R(this.dyn_ltree), - R(this.dyn_dtree), - R(this.bl_tree), - (this.l_desc = null), - (this.d_desc = null), - (this.bl_desc = null), - (this.bl_count = new n.Buf16(y + 1)), - (this.heap = new n.Buf16(2 * p + 1)), - R(this.heap), - (this.heap_len = 0), - (this.heap_max = 0), - (this.depth = new n.Buf16(2 * p + 1)), - R(this.depth), - (this.l_buf = 0), - (this.lit_bufsize = 0), - (this.last_lit = 0), - (this.d_buf = 0), - (this.opt_len = 0), - (this.static_len = 0), - (this.matches = 0), - (this.insert = 0), - (this.bi_buf = 0), - (this.bi_valid = 0); - } - function D(t) { - var e; - return t && t.state - ? ((t.total_in = t.total_out = 0), - (t.data_type = l), - ((e = t.state).pending = 0), - (e.pending_out = 0), - e.wrap < 0 && (e.wrap = -e.wrap), - (e.status = e.wrap ? M : S), - (t.adler = 2 === e.wrap ? 0 : 1), - (e.last_flush = u), - o._tr_init(e), - f) - : A(t, c); - } - function z(t) { - var e, - r = D(t); - return ( - r === f && - (((e = t.state).window_size = 2 * e.w_size), - R(e.head), - (e.max_lazy_match = i[e.level].max_lazy), - (e.good_match = i[e.level].good_length), - (e.nice_match = i[e.level].nice_length), - (e.max_chain_length = i[e.level].max_chain), - (e.strstart = 0), - (e.block_start = 0), - (e.lookahead = 0), - (e.insert = 0), - (e.match_length = e.prev_length = v - 1), - (e.match_available = 0), - (e.ins_h = 0)), - r - ); - } - function F(t, e, r, i, o, s) { - if (!t) return c; - var a = 1; - if ( - (-1 === e && (e = 6), - i < 0 ? ((a = 0), (i = -i)) : i > 15 && ((a = 2), (i -= 16)), - o < 1 || o > 9 || r !== d || i < 8 || i > 15 || e < 0 || e > 9 || s < 0 || s > 4) - ) - return A(t, c); - 8 === i && (i = 9); - var h = new U(); - return ( - (t.state = h), - (h.strm = t), - (h.wrap = a), - (h.gzhead = null), - (h.w_bits = i), - (h.w_size = 1 << h.w_bits), - (h.w_mask = h.w_size - 1), - (h.hash_bits = o + 7), - (h.hash_size = 1 << h.hash_bits), - (h.hash_mask = h.hash_size - 1), - (h.hash_shift = ~~((h.hash_bits + v - 1) / v)), - (h.window = new n.Buf8(2 * h.w_size)), - (h.head = new n.Buf16(h.hash_size)), - (h.prev = new n.Buf16(h.w_size)), - (h.lit_bufsize = 1 << (o + 6)), - (h.pending_buf_size = 4 * h.lit_bufsize), - (h.pending_buf = new n.Buf8(h.pending_buf_size)), - (h.d_buf = 1 * h.lit_bufsize), - (h.l_buf = 3 * h.lit_bufsize), - (h.level = e), - (h.strategy = s), - (h.method = r), - z(t) - ); - } - (i = [ - new j(0, 0, 0, 0, function (t, e) { - var r = 65535; - for (r > t.pending_buf_size - 5 && (r = t.pending_buf_size - 5); ; ) { - if (t.lookahead <= 1) { - if ((L(t), 0 === t.lookahead && e === u)) return 1; - if (0 === t.lookahead) break; - } - (t.strstart += t.lookahead), (t.lookahead = 0); - var i = t.block_start + r; - if ( - (0 === t.strstart || t.strstart >= i) && - ((t.lookahead = t.strstart - i), (t.strstart = i), I(t, !1), 0 === t.strm.avail_out) - ) - return 1; - if (t.strstart - t.block_start >= t.w_size - _ && (I(t, !1), 0 === t.strm.avail_out)) return 1; - } - return ( - (t.insert = 0), - 4 === e ? (I(t, !0), 0 === t.strm.avail_out ? 3 : 4) : (t.strstart > t.block_start && (I(t, !1), t.strm.avail_out), 1) - ); - }), - new j(4, 4, 8, 4, C), - new j(4, 5, 16, 8, C), - new j(4, 6, 32, 32, C), - new j(4, 4, 16, 16, N), - new j(8, 16, 32, 32, N), - new j(8, 16, 128, 128, N), - new j(8, 32, 128, 256, N), - new j(32, 128, 258, 1024, N), - new j(32, 258, 258, 4096, N), - ]), - (e.deflateInit = function (t, e) { - return F(t, e, d, 15, 8, 0); - }), - (e.deflateInit2 = F), - (e.deflateReset = z), - (e.deflateResetKeep = D), - (e.deflateSetHeader = function (t, e) { - return t && t.state ? (2 !== t.state.wrap ? c : ((t.state.gzhead = e), f)) : c; - }), - (e.deflate = function (t, e) { - var r, n, s, h; - if (!t || !t.state || e > 5 || e < 0) return t ? A(t, c) : c; - if (((n = t.state), !t.output || (!t.input && 0 !== t.avail_in) || (n.status === x && 4 !== e))) - return A(t, 0 === t.avail_out ? -5 : c); - if (((n.strm = t), (r = n.last_flush), (n.last_flush = e), n.status === M)) - if (2 === n.wrap) - (t.adler = 0), - T(n, 31), - T(n, 139), - T(n, 8), - n.gzhead - ? (T( - n, - (n.gzhead.text ? 1 : 0) + - (n.gzhead.hcrc ? 2 : 0) + - (n.gzhead.extra ? 4 : 0) + - (n.gzhead.name ? 8 : 0) + - (n.gzhead.comment ? 16 : 0) - ), - T(n, 255 & n.gzhead.time), - T(n, (n.gzhead.time >> 8) & 255), - T(n, (n.gzhead.time >> 16) & 255), - T(n, (n.gzhead.time >> 24) & 255), - T(n, 9 === n.level ? 2 : n.strategy >= 2 || n.level < 2 ? 4 : 0), - T(n, 255 & n.gzhead.os), - n.gzhead.extra && - n.gzhead.extra.length && - (T(n, 255 & n.gzhead.extra.length), T(n, (n.gzhead.extra.length >> 8) & 255)), - n.gzhead.hcrc && (t.adler = a(t.adler, n.pending_buf, n.pending, 0)), - (n.gzindex = 0), - (n.status = 69)) - : (T(n, 0), - T(n, 0), - T(n, 0), - T(n, 0), - T(n, 0), - T(n, 9 === n.level ? 2 : n.strategy >= 2 || n.level < 2 ? 4 : 0), - T(n, 3), - (n.status = S)); - else { - var l = (d + ((n.w_bits - 8) << 4)) << 8; - (l |= (n.strategy >= 2 || n.level < 2 ? 0 : n.level < 6 ? 1 : 6 === n.level ? 2 : 3) << 6), - 0 !== n.strstart && (l |= 32), - (l += 31 - (l % 31)), - (n.status = S), - P(n, l), - 0 !== n.strstart && (P(n, t.adler >>> 16), P(n, 65535 & t.adler)), - (t.adler = 1); - } - if (69 === n.status) - if (n.gzhead.extra) { - for ( - s = n.pending; - n.gzindex < (65535 & n.gzhead.extra.length) && - (n.pending !== n.pending_buf_size || - (n.gzhead.hcrc && n.pending > s && (t.adler = a(t.adler, n.pending_buf, n.pending - s, s)), - B(t), - (s = n.pending), - n.pending !== n.pending_buf_size)); - - ) - T(n, 255 & n.gzhead.extra[n.gzindex]), n.gzindex++; - n.gzhead.hcrc && n.pending > s && (t.adler = a(t.adler, n.pending_buf, n.pending - s, s)), - n.gzindex === n.gzhead.extra.length && ((n.gzindex = 0), (n.status = 73)); - } else n.status = 73; - if (73 === n.status) - if (n.gzhead.name) { - s = n.pending; - do { - if ( - n.pending === n.pending_buf_size && - (n.gzhead.hcrc && n.pending > s && (t.adler = a(t.adler, n.pending_buf, n.pending - s, s)), - B(t), - (s = n.pending), - n.pending === n.pending_buf_size) - ) { - h = 1; - break; - } - (h = n.gzindex < n.gzhead.name.length ? 255 & n.gzhead.name.charCodeAt(n.gzindex++) : 0), T(n, h); - } while (0 !== h); - n.gzhead.hcrc && n.pending > s && (t.adler = a(t.adler, n.pending_buf, n.pending - s, s)), - 0 === h && ((n.gzindex = 0), (n.status = 91)); - } else n.status = 91; - if (91 === n.status) - if (n.gzhead.comment) { - s = n.pending; - do { - if ( - n.pending === n.pending_buf_size && - (n.gzhead.hcrc && n.pending > s && (t.adler = a(t.adler, n.pending_buf, n.pending - s, s)), - B(t), - (s = n.pending), - n.pending === n.pending_buf_size) - ) { - h = 1; - break; - } - (h = n.gzindex < n.gzhead.comment.length ? 255 & n.gzhead.comment.charCodeAt(n.gzindex++) : 0), T(n, h); - } while (0 !== h); - n.gzhead.hcrc && n.pending > s && (t.adler = a(t.adler, n.pending_buf, n.pending - s, s)), 0 === h && (n.status = E); - } else n.status = E; - if ( - (n.status === E && - (n.gzhead.hcrc - ? (n.pending + 2 > n.pending_buf_size && B(t), - n.pending + 2 <= n.pending_buf_size && (T(n, 255 & t.adler), T(n, (t.adler >> 8) & 255), (t.adler = 0), (n.status = S))) - : (n.status = S)), - 0 !== n.pending) - ) { - if ((B(t), 0 === t.avail_out)) return (n.last_flush = -1), f; - } else if (0 === t.avail_in && k(e) <= k(r) && 4 !== e) return A(t, -5); - if (n.status === x && 0 !== t.avail_in) return A(t, -5); - if (0 !== t.avail_in || 0 !== n.lookahead || (e !== u && n.status !== x)) { - var p = - 2 === n.strategy - ? (function (t, e) { - for (var r; ; ) { - if (0 === t.lookahead && (L(t), 0 === t.lookahead)) { - if (e === u) return 1; - break; - } - if ( - ((t.match_length = 0), - (r = o._tr_tally(t, 0, t.window[t.strstart])), - t.lookahead--, - t.strstart++, - r && (I(t, !1), 0 === t.strm.avail_out)) - ) - return 1; - } - return ( - (t.insert = 0), - 4 === e ? (I(t, !0), 0 === t.strm.avail_out ? 3 : 4) : t.last_lit && (I(t, !1), 0 === t.strm.avail_out) ? 1 : 2 - ); - })(n, e) - : 3 === n.strategy - ? (function (t, e) { - for (var r, i, n, s, a = t.window; ; ) { - if (t.lookahead <= w) { - if ((L(t), t.lookahead <= w && e === u)) return 1; - if (0 === t.lookahead) break; - } - if ( - ((t.match_length = 0), - t.lookahead >= v && t.strstart > 0 && (i = a[(n = t.strstart - 1)]) === a[++n] && i === a[++n] && i === a[++n]) - ) { - s = t.strstart + w; - do {} while ( - i === a[++n] && - i === a[++n] && - i === a[++n] && - i === a[++n] && - i === a[++n] && - i === a[++n] && - i === a[++n] && - i === a[++n] && - n < s - ); - (t.match_length = w - (s - n)), t.match_length > t.lookahead && (t.match_length = t.lookahead); - } - if ( - (t.match_length >= v - ? ((r = o._tr_tally(t, 1, t.match_length - v)), - (t.lookahead -= t.match_length), - (t.strstart += t.match_length), - (t.match_length = 0)) - : ((r = o._tr_tally(t, 0, t.window[t.strstart])), t.lookahead--, t.strstart++), - r && (I(t, !1), 0 === t.strm.avail_out)) - ) - return 1; - } - return ( - (t.insert = 0), - 4 === e ? (I(t, !0), 0 === t.strm.avail_out ? 3 : 4) : t.last_lit && (I(t, !1), 0 === t.strm.avail_out) ? 1 : 2 - ); - })(n, e) - : i[n.level].func(n, e); - if (((3 !== p && 4 !== p) || (n.status = x), 1 === p || 3 === p)) return 0 === t.avail_out && (n.last_flush = -1), f; - if ( - 2 === p && - (1 === e - ? o._tr_align(n) - : 5 !== e && - (o._tr_stored_block(n, 0, 0, !1), - 3 === e && (R(n.head), 0 === n.lookahead && ((n.strstart = 0), (n.block_start = 0), (n.insert = 0)))), - B(t), - 0 === t.avail_out) - ) - return (n.last_flush = -1), f; - } - return 4 !== e - ? f - : n.wrap <= 0 - ? 1 - : (2 === n.wrap - ? (T(n, 255 & t.adler), - T(n, (t.adler >> 8) & 255), - T(n, (t.adler >> 16) & 255), - T(n, (t.adler >> 24) & 255), - T(n, 255 & t.total_in), - T(n, (t.total_in >> 8) & 255), - T(n, (t.total_in >> 16) & 255), - T(n, (t.total_in >> 24) & 255)) - : (P(n, t.adler >>> 16), P(n, 65535 & t.adler)), - B(t), - n.wrap > 0 && (n.wrap = -n.wrap), - 0 !== n.pending ? f : 1); - }), - (e.deflateEnd = function (t) { - var e; - return t && t.state - ? (e = t.state.status) !== M && 69 !== e && 73 !== e && 91 !== e && e !== E && e !== S && e !== x - ? A(t, c) - : ((t.state = null), e === S ? A(t, -3) : f) - : c; - }), - (e.deflateSetDictionary = function (t, e) { - var r, - i, - o, - a, - h, - u, - l, - d, - p = e.length; - if (!t || !t.state) return c; - if (2 === (a = (r = t.state).wrap) || (1 === a && r.status !== M) || r.lookahead) return c; - for ( - 1 === a && (t.adler = s(t.adler, e, p, 0)), - r.wrap = 0, - p >= r.w_size && - (0 === a && (R(r.head), (r.strstart = 0), (r.block_start = 0), (r.insert = 0)), - (d = new n.Buf8(r.w_size)), - n.arraySet(d, e, p - r.w_size, r.w_size, 0), - (e = d), - (p = r.w_size)), - h = t.avail_in, - u = t.next_in, - l = t.input, - t.avail_in = p, - t.next_in = 0, - t.input = e, - L(r); - r.lookahead >= v; - - ) { - (i = r.strstart), (o = r.lookahead - (v - 1)); - do { - (r.ins_h = ((r.ins_h << r.hash_shift) ^ r.window[i + v - 1]) & r.hash_mask), - (r.prev[i & r.w_mask] = r.head[r.ins_h]), - (r.head[r.ins_h] = i), - i++; - } while (--o); - (r.strstart = i), (r.lookahead = v - 1), L(r); - } - return ( - (r.strstart += r.lookahead), - (r.block_start = r.strstart), - (r.insert = r.lookahead), - (r.lookahead = 0), - (r.match_length = r.prev_length = v - 1), - (r.match_available = 0), - (t.next_in = u), - (t.input = l), - (t.avail_in = h), - (r.wrap = a), - f - ); - }), - (e.deflateInfo = 'pako deflate (from Nodeca project)'); - }, - 6438: t => { - 'use strict'; - t.exports = function (t, e) { - var r, i, n, o, s, a, h, u, f, c, l, d, p, m, g, b, y, v, w, _, M, E, S, x, A; - (r = t.state), - (i = t.next_in), - (x = t.input), - (n = i + (t.avail_in - 5)), - (o = t.next_out), - (A = t.output), - (s = o - (e - t.avail_out)), - (a = o + (t.avail_out - 257)), - (h = r.dmax), - (u = r.wsize), - (f = r.whave), - (c = r.wnext), - (l = r.window), - (d = r.hold), - (p = r.bits), - (m = r.lencode), - (g = r.distcode), - (b = (1 << r.lenbits) - 1), - (y = (1 << r.distbits) - 1); - t: do { - p < 15 && ((d += x[i++] << p), (p += 8), (d += x[i++] << p), (p += 8)), (v = m[d & b]); - e: for (;;) { - if (((d >>>= w = v >>> 24), (p -= w), 0 == (w = (v >>> 16) & 255))) A[o++] = 65535 & v; - else { - if (!(16 & w)) { - if (0 == (64 & w)) { - v = m[(65535 & v) + (d & ((1 << w) - 1))]; - continue e; - } - if (32 & w) { - r.mode = 12; - break t; - } - (t.msg = 'invalid literal/length code'), (r.mode = 30); - break t; - } - (_ = 65535 & v), - (w &= 15) && (p < w && ((d += x[i++] << p), (p += 8)), (_ += d & ((1 << w) - 1)), (d >>>= w), (p -= w)), - p < 15 && ((d += x[i++] << p), (p += 8), (d += x[i++] << p), (p += 8)), - (v = g[d & y]); - r: for (;;) { - if (((d >>>= w = v >>> 24), (p -= w), !(16 & (w = (v >>> 16) & 255)))) { - if (0 == (64 & w)) { - v = g[(65535 & v) + (d & ((1 << w) - 1))]; - continue r; - } - (t.msg = 'invalid distance code'), (r.mode = 30); - break t; - } - if ( - ((M = 65535 & v), - p < (w &= 15) && ((d += x[i++] << p), (p += 8) < w && ((d += x[i++] << p), (p += 8))), - (M += d & ((1 << w) - 1)) > h) - ) { - (t.msg = 'invalid distance too far back'), (r.mode = 30); - break t; - } - if (((d >>>= w), (p -= w), M > (w = o - s))) { - if ((w = M - w) > f && r.sane) { - (t.msg = 'invalid distance too far back'), (r.mode = 30); - break t; - } - if (((E = 0), (S = l), 0 === c)) { - if (((E += u - w), w < _)) { - _ -= w; - do { - A[o++] = l[E++]; - } while (--w); - (E = o - M), (S = A); - } - } else if (c < w) { - if (((E += u + c - w), (w -= c) < _)) { - _ -= w; - do { - A[o++] = l[E++]; - } while (--w); - if (((E = 0), c < _)) { - _ -= w = c; - do { - A[o++] = l[E++]; - } while (--w); - (E = o - M), (S = A); - } - } - } else if (((E += c - w), w < _)) { - _ -= w; - do { - A[o++] = l[E++]; - } while (--w); - (E = o - M), (S = A); - } - for (; _ > 2; ) (A[o++] = S[E++]), (A[o++] = S[E++]), (A[o++] = S[E++]), (_ -= 3); - _ && ((A[o++] = S[E++]), _ > 1 && (A[o++] = S[E++])); - } else { - E = o - M; - do { - (A[o++] = A[E++]), (A[o++] = A[E++]), (A[o++] = A[E++]), (_ -= 3); - } while (_ > 2); - _ && ((A[o++] = A[E++]), _ > 1 && (A[o++] = A[E++])); - } - break; - } - } - break; - } - } while (i < n && o < a); - (i -= _ = p >> 3), - (d &= (1 << (p -= _ << 3)) - 1), - (t.next_in = i), - (t.next_out = o), - (t.avail_in = i < n ? n - i + 5 : 5 - (i - n)), - (t.avail_out = o < a ? a - o + 257 : 257 - (o - a)), - (r.hold = d), - (r.bits = p); - }; - }, - 3001: (t, e, r) => { - 'use strict'; - var i = r(6907), - n = r(7575), - o = r(631), - s = r(6438), - a = r(1375), - h = 0, - u = -2, - f = 1, - c = 12, - l = 30, - d = 852, - p = 592; - function m(t) { - return ((t >>> 24) & 255) + ((t >>> 8) & 65280) + ((65280 & t) << 8) + ((255 & t) << 24); - } - function g() { - (this.mode = 0), - (this.last = !1), - (this.wrap = 0), - (this.havedict = !1), - (this.flags = 0), - (this.dmax = 0), - (this.check = 0), - (this.total = 0), - (this.head = null), - (this.wbits = 0), - (this.wsize = 0), - (this.whave = 0), - (this.wnext = 0), - (this.window = null), - (this.hold = 0), - (this.bits = 0), - (this.length = 0), - (this.offset = 0), - (this.extra = 0), - (this.lencode = null), - (this.distcode = null), - (this.lenbits = 0), - (this.distbits = 0), - (this.ncode = 0), - (this.nlen = 0), - (this.ndist = 0), - (this.have = 0), - (this.next = null), - (this.lens = new i.Buf16(320)), - (this.work = new i.Buf16(288)), - (this.lendyn = null), - (this.distdyn = null), - (this.sane = 0), - (this.back = 0), - (this.was = 0); - } - function b(t) { - var e; - return t && t.state - ? ((e = t.state), - (t.total_in = t.total_out = e.total = 0), - (t.msg = ''), - e.wrap && (t.adler = 1 & e.wrap), - (e.mode = f), - (e.last = 0), - (e.havedict = 0), - (e.dmax = 32768), - (e.head = null), - (e.hold = 0), - (e.bits = 0), - (e.lencode = e.lendyn = new i.Buf32(d)), - (e.distcode = e.distdyn = new i.Buf32(p)), - (e.sane = 1), - (e.back = -1), - h) - : u; - } - function y(t) { - var e; - return t && t.state ? (((e = t.state).wsize = 0), (e.whave = 0), (e.wnext = 0), b(t)) : u; - } - function v(t, e) { - var r, i; - return t && t.state - ? ((i = t.state), - e < 0 ? ((r = 0), (e = -e)) : ((r = 1 + (e >> 4)), e < 48 && (e &= 15)), - e && (e < 8 || e > 15) ? u : (null !== i.window && i.wbits !== e && (i.window = null), (i.wrap = r), (i.wbits = e), y(t))) - : u; - } - function w(t, e) { - var r, i; - return t ? ((i = new g()), (t.state = i), (i.window = null), (r = v(t, e)) !== h && (t.state = null), r) : u; - } - var _, - M, - E = !0; - function S(t) { - if (E) { - var e; - for (_ = new i.Buf32(512), M = new i.Buf32(32), e = 0; e < 144; ) t.lens[e++] = 8; - for (; e < 256; ) t.lens[e++] = 9; - for (; e < 280; ) t.lens[e++] = 7; - for (; e < 288; ) t.lens[e++] = 8; - for (a(1, t.lens, 0, 288, _, 0, t.work, { bits: 9 }), e = 0; e < 32; ) t.lens[e++] = 5; - a(2, t.lens, 0, 32, M, 0, t.work, { bits: 5 }), (E = !1); - } - (t.lencode = _), (t.lenbits = 9), (t.distcode = M), (t.distbits = 5); - } - function x(t, e, r, n) { - var o, - s = t.state; - return ( - null === s.window && ((s.wsize = 1 << s.wbits), (s.wnext = 0), (s.whave = 0), (s.window = new i.Buf8(s.wsize))), - n >= s.wsize - ? (i.arraySet(s.window, e, r - s.wsize, s.wsize, 0), (s.wnext = 0), (s.whave = s.wsize)) - : ((o = s.wsize - s.wnext) > n && (o = n), - i.arraySet(s.window, e, r - n, o, s.wnext), - (n -= o) - ? (i.arraySet(s.window, e, r - n, n, 0), (s.wnext = n), (s.whave = s.wsize)) - : ((s.wnext += o), s.wnext === s.wsize && (s.wnext = 0), s.whave < s.wsize && (s.whave += o))), - 0 - ); - } - (e.inflateReset = y), - (e.inflateReset2 = v), - (e.inflateResetKeep = b), - (e.inflateInit = function (t) { - return w(t, 15); - }), - (e.inflateInit2 = w), - (e.inflate = function (t, e) { - var r, - d, - p, - g, - b, - y, - v, - w, - _, - M, - E, - A, - k, - R, - B, - I, - T, - P, - O, - L, - C, - N, - j, - U, - D = 0, - z = new i.Buf8(4), - F = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]; - if (!t || !t.state || !t.output || (!t.input && 0 !== t.avail_in)) return u; - (r = t.state).mode === c && (r.mode = 13), - (b = t.next_out), - (p = t.output), - (v = t.avail_out), - (g = t.next_in), - (d = t.input), - (y = t.avail_in), - (w = r.hold), - (_ = r.bits), - (M = y), - (E = v), - (N = h); - t: for (;;) - switch (r.mode) { - case f: - if (0 === r.wrap) { - r.mode = 13; - break; - } - for (; _ < 16; ) { - if (0 === y) break t; - y--, (w += d[g++] << _), (_ += 8); - } - if (2 & r.wrap && 35615 === w) { - (r.check = 0), - (z[0] = 255 & w), - (z[1] = (w >>> 8) & 255), - (r.check = o(r.check, z, 2, 0)), - (w = 0), - (_ = 0), - (r.mode = 2); - break; - } - if (((r.flags = 0), r.head && (r.head.done = !1), !(1 & r.wrap) || (((255 & w) << 8) + (w >> 8)) % 31)) { - (t.msg = 'incorrect header check'), (r.mode = l); - break; - } - if (8 != (15 & w)) { - (t.msg = 'unknown compression method'), (r.mode = l); - break; - } - if (((_ -= 4), (C = 8 + (15 & (w >>>= 4))), 0 === r.wbits)) r.wbits = C; - else if (C > r.wbits) { - (t.msg = 'invalid window size'), (r.mode = l); - break; - } - (r.dmax = 1 << C), (t.adler = r.check = 1), (r.mode = 512 & w ? 10 : c), (w = 0), (_ = 0); - break; - case 2: - for (; _ < 16; ) { - if (0 === y) break t; - y--, (w += d[g++] << _), (_ += 8); - } - if (((r.flags = w), 8 != (255 & r.flags))) { - (t.msg = 'unknown compression method'), (r.mode = l); - break; - } - if (57344 & r.flags) { - (t.msg = 'unknown header flags set'), (r.mode = l); - break; - } - r.head && (r.head.text = (w >> 8) & 1), - 512 & r.flags && ((z[0] = 255 & w), (z[1] = (w >>> 8) & 255), (r.check = o(r.check, z, 2, 0))), - (w = 0), - (_ = 0), - (r.mode = 3); - case 3: - for (; _ < 32; ) { - if (0 === y) break t; - y--, (w += d[g++] << _), (_ += 8); - } - r.head && (r.head.time = w), - 512 & r.flags && - ((z[0] = 255 & w), - (z[1] = (w >>> 8) & 255), - (z[2] = (w >>> 16) & 255), - (z[3] = (w >>> 24) & 255), - (r.check = o(r.check, z, 4, 0))), - (w = 0), - (_ = 0), - (r.mode = 4); - case 4: - for (; _ < 16; ) { - if (0 === y) break t; - y--, (w += d[g++] << _), (_ += 8); - } - r.head && ((r.head.xflags = 255 & w), (r.head.os = w >> 8)), - 512 & r.flags && ((z[0] = 255 & w), (z[1] = (w >>> 8) & 255), (r.check = o(r.check, z, 2, 0))), - (w = 0), - (_ = 0), - (r.mode = 5); - case 5: - if (1024 & r.flags) { - for (; _ < 16; ) { - if (0 === y) break t; - y--, (w += d[g++] << _), (_ += 8); - } - (r.length = w), - r.head && (r.head.extra_len = w), - 512 & r.flags && ((z[0] = 255 & w), (z[1] = (w >>> 8) & 255), (r.check = o(r.check, z, 2, 0))), - (w = 0), - (_ = 0); - } else r.head && (r.head.extra = null); - r.mode = 6; - case 6: - if ( - 1024 & r.flags && - ((A = r.length) > y && (A = y), - A && - (r.head && - ((C = r.head.extra_len - r.length), - r.head.extra || (r.head.extra = new Array(r.head.extra_len)), - i.arraySet(r.head.extra, d, g, A, C)), - 512 & r.flags && (r.check = o(r.check, d, A, g)), - (y -= A), - (g += A), - (r.length -= A)), - r.length) - ) - break t; - (r.length = 0), (r.mode = 7); - case 7: - if (2048 & r.flags) { - if (0 === y) break t; - A = 0; - do { - (C = d[g + A++]), r.head && C && r.length < 65536 && (r.head.name += String.fromCharCode(C)); - } while (C && A < y); - if ((512 & r.flags && (r.check = o(r.check, d, A, g)), (y -= A), (g += A), C)) break t; - } else r.head && (r.head.name = null); - (r.length = 0), (r.mode = 8); - case 8: - if (4096 & r.flags) { - if (0 === y) break t; - A = 0; - do { - (C = d[g + A++]), r.head && C && r.length < 65536 && (r.head.comment += String.fromCharCode(C)); - } while (C && A < y); - if ((512 & r.flags && (r.check = o(r.check, d, A, g)), (y -= A), (g += A), C)) break t; - } else r.head && (r.head.comment = null); - r.mode = 9; - case 9: - if (512 & r.flags) { - for (; _ < 16; ) { - if (0 === y) break t; - y--, (w += d[g++] << _), (_ += 8); - } - if (w !== (65535 & r.check)) { - (t.msg = 'header crc mismatch'), (r.mode = l); - break; - } - (w = 0), (_ = 0); - } - r.head && ((r.head.hcrc = (r.flags >> 9) & 1), (r.head.done = !0)), (t.adler = r.check = 0), (r.mode = c); - break; - case 10: - for (; _ < 32; ) { - if (0 === y) break t; - y--, (w += d[g++] << _), (_ += 8); - } - (t.adler = r.check = m(w)), (w = 0), (_ = 0), (r.mode = 11); - case 11: - if (0 === r.havedict) - return (t.next_out = b), (t.avail_out = v), (t.next_in = g), (t.avail_in = y), (r.hold = w), (r.bits = _), 2; - (t.adler = r.check = 1), (r.mode = c); - case c: - if (5 === e || 6 === e) break t; - case 13: - if (r.last) { - (w >>>= 7 & _), (_ -= 7 & _), (r.mode = 27); - break; - } - for (; _ < 3; ) { - if (0 === y) break t; - y--, (w += d[g++] << _), (_ += 8); - } - switch (((r.last = 1 & w), (_ -= 1), 3 & (w >>>= 1))) { - case 0: - r.mode = 14; - break; - case 1: - if ((S(r), (r.mode = 20), 6 === e)) { - (w >>>= 2), (_ -= 2); - break t; - } - break; - case 2: - r.mode = 17; - break; - case 3: - (t.msg = 'invalid block type'), (r.mode = l); - } - (w >>>= 2), (_ -= 2); - break; - case 14: - for (w >>>= 7 & _, _ -= 7 & _; _ < 32; ) { - if (0 === y) break t; - y--, (w += d[g++] << _), (_ += 8); - } - if ((65535 & w) != ((w >>> 16) ^ 65535)) { - (t.msg = 'invalid stored block lengths'), (r.mode = l); - break; - } - if (((r.length = 65535 & w), (w = 0), (_ = 0), (r.mode = 15), 6 === e)) break t; - case 15: - r.mode = 16; - case 16: - if ((A = r.length)) { - if ((A > y && (A = y), A > v && (A = v), 0 === A)) break t; - i.arraySet(p, d, g, A, b), (y -= A), (g += A), (v -= A), (b += A), (r.length -= A); - break; - } - r.mode = c; - break; - case 17: - for (; _ < 14; ) { - if (0 === y) break t; - y--, (w += d[g++] << _), (_ += 8); - } - if ( - ((r.nlen = 257 + (31 & w)), - (w >>>= 5), - (_ -= 5), - (r.ndist = 1 + (31 & w)), - (w >>>= 5), - (_ -= 5), - (r.ncode = 4 + (15 & w)), - (w >>>= 4), - (_ -= 4), - r.nlen > 286 || r.ndist > 30) - ) { - (t.msg = 'too many length or distance symbols'), (r.mode = l); - break; - } - (r.have = 0), (r.mode = 18); - case 18: - for (; r.have < r.ncode; ) { - for (; _ < 3; ) { - if (0 === y) break t; - y--, (w += d[g++] << _), (_ += 8); - } - (r.lens[F[r.have++]] = 7 & w), (w >>>= 3), (_ -= 3); - } - for (; r.have < 19; ) r.lens[F[r.have++]] = 0; - if ( - ((r.lencode = r.lendyn), - (r.lenbits = 7), - (j = { bits: r.lenbits }), - (N = a(0, r.lens, 0, 19, r.lencode, 0, r.work, j)), - (r.lenbits = j.bits), - N) - ) { - (t.msg = 'invalid code lengths set'), (r.mode = l); - break; - } - (r.have = 0), (r.mode = 19); - case 19: - for (; r.have < r.nlen + r.ndist; ) { - for (; (I = ((D = r.lencode[w & ((1 << r.lenbits) - 1)]) >>> 16) & 255), (T = 65535 & D), !((B = D >>> 24) <= _); ) { - if (0 === y) break t; - y--, (w += d[g++] << _), (_ += 8); - } - if (T < 16) (w >>>= B), (_ -= B), (r.lens[r.have++] = T); - else { - if (16 === T) { - for (U = B + 2; _ < U; ) { - if (0 === y) break t; - y--, (w += d[g++] << _), (_ += 8); - } - if (((w >>>= B), (_ -= B), 0 === r.have)) { - (t.msg = 'invalid bit length repeat'), (r.mode = l); - break; - } - (C = r.lens[r.have - 1]), (A = 3 + (3 & w)), (w >>>= 2), (_ -= 2); - } else if (17 === T) { - for (U = B + 3; _ < U; ) { - if (0 === y) break t; - y--, (w += d[g++] << _), (_ += 8); - } - (_ -= B), (C = 0), (A = 3 + (7 & (w >>>= B))), (w >>>= 3), (_ -= 3); - } else { - for (U = B + 7; _ < U; ) { - if (0 === y) break t; - y--, (w += d[g++] << _), (_ += 8); - } - (_ -= B), (C = 0), (A = 11 + (127 & (w >>>= B))), (w >>>= 7), (_ -= 7); - } - if (r.have + A > r.nlen + r.ndist) { - (t.msg = 'invalid bit length repeat'), (r.mode = l); - break; - } - for (; A--; ) r.lens[r.have++] = C; - } - } - if (r.mode === l) break; - if (0 === r.lens[256]) { - (t.msg = 'invalid code -- missing end-of-block'), (r.mode = l); - break; - } - if ( - ((r.lenbits = 9), - (j = { bits: r.lenbits }), - (N = a(1, r.lens, 0, r.nlen, r.lencode, 0, r.work, j)), - (r.lenbits = j.bits), - N) - ) { - (t.msg = 'invalid literal/lengths set'), (r.mode = l); - break; - } - if ( - ((r.distbits = 6), - (r.distcode = r.distdyn), - (j = { bits: r.distbits }), - (N = a(2, r.lens, r.nlen, r.ndist, r.distcode, 0, r.work, j)), - (r.distbits = j.bits), - N) - ) { - (t.msg = 'invalid distances set'), (r.mode = l); - break; - } - if (((r.mode = 20), 6 === e)) break t; - case 20: - r.mode = 21; - case 21: - if (y >= 6 && v >= 258) { - (t.next_out = b), - (t.avail_out = v), - (t.next_in = g), - (t.avail_in = y), - (r.hold = w), - (r.bits = _), - s(t, E), - (b = t.next_out), - (p = t.output), - (v = t.avail_out), - (g = t.next_in), - (d = t.input), - (y = t.avail_in), - (w = r.hold), - (_ = r.bits), - r.mode === c && (r.back = -1); - break; - } - for ( - r.back = 0; - (I = ((D = r.lencode[w & ((1 << r.lenbits) - 1)]) >>> 16) & 255), (T = 65535 & D), !((B = D >>> 24) <= _); - - ) { - if (0 === y) break t; - y--, (w += d[g++] << _), (_ += 8); - } - if (I && 0 == (240 & I)) { - for ( - P = B, O = I, L = T; - (I = ((D = r.lencode[L + ((w & ((1 << (P + O)) - 1)) >> P)]) >>> 16) & 255), - (T = 65535 & D), - !(P + (B = D >>> 24) <= _); - - ) { - if (0 === y) break t; - y--, (w += d[g++] << _), (_ += 8); - } - (w >>>= P), (_ -= P), (r.back += P); - } - if (((w >>>= B), (_ -= B), (r.back += B), (r.length = T), 0 === I)) { - r.mode = 26; - break; - } - if (32 & I) { - (r.back = -1), (r.mode = c); - break; - } - if (64 & I) { - (t.msg = 'invalid literal/length code'), (r.mode = l); - break; - } - (r.extra = 15 & I), (r.mode = 22); - case 22: - if (r.extra) { - for (U = r.extra; _ < U; ) { - if (0 === y) break t; - y--, (w += d[g++] << _), (_ += 8); - } - (r.length += w & ((1 << r.extra) - 1)), (w >>>= r.extra), (_ -= r.extra), (r.back += r.extra); - } - (r.was = r.length), (r.mode = 23); - case 23: - for (; (I = ((D = r.distcode[w & ((1 << r.distbits) - 1)]) >>> 16) & 255), (T = 65535 & D), !((B = D >>> 24) <= _); ) { - if (0 === y) break t; - y--, (w += d[g++] << _), (_ += 8); - } - if (0 == (240 & I)) { - for ( - P = B, O = I, L = T; - (I = ((D = r.distcode[L + ((w & ((1 << (P + O)) - 1)) >> P)]) >>> 16) & 255), - (T = 65535 & D), - !(P + (B = D >>> 24) <= _); - - ) { - if (0 === y) break t; - y--, (w += d[g++] << _), (_ += 8); - } - (w >>>= P), (_ -= P), (r.back += P); - } - if (((w >>>= B), (_ -= B), (r.back += B), 64 & I)) { - (t.msg = 'invalid distance code'), (r.mode = l); - break; - } - (r.offset = T), (r.extra = 15 & I), (r.mode = 24); - case 24: - if (r.extra) { - for (U = r.extra; _ < U; ) { - if (0 === y) break t; - y--, (w += d[g++] << _), (_ += 8); - } - (r.offset += w & ((1 << r.extra) - 1)), (w >>>= r.extra), (_ -= r.extra), (r.back += r.extra); - } - if (r.offset > r.dmax) { - (t.msg = 'invalid distance too far back'), (r.mode = l); - break; - } - r.mode = 25; - case 25: - if (0 === v) break t; - if (((A = E - v), r.offset > A)) { - if ((A = r.offset - A) > r.whave && r.sane) { - (t.msg = 'invalid distance too far back'), (r.mode = l); - break; - } - A > r.wnext ? ((A -= r.wnext), (k = r.wsize - A)) : (k = r.wnext - A), A > r.length && (A = r.length), (R = r.window); - } else (R = p), (k = b - r.offset), (A = r.length); - A > v && (A = v), (v -= A), (r.length -= A); - do { - p[b++] = R[k++]; - } while (--A); - 0 === r.length && (r.mode = 21); - break; - case 26: - if (0 === v) break t; - (p[b++] = r.length), v--, (r.mode = 21); - break; - case 27: - if (r.wrap) { - for (; _ < 32; ) { - if (0 === y) break t; - y--, (w |= d[g++] << _), (_ += 8); - } - if ( - ((E -= v), - (t.total_out += E), - (r.total += E), - E && (t.adler = r.check = r.flags ? o(r.check, p, E, b - E) : n(r.check, p, E, b - E)), - (E = v), - (r.flags ? w : m(w)) !== r.check) - ) { - (t.msg = 'incorrect data check'), (r.mode = l); - break; - } - (w = 0), (_ = 0); - } - r.mode = 28; - case 28: - if (r.wrap && r.flags) { - for (; _ < 32; ) { - if (0 === y) break t; - y--, (w += d[g++] << _), (_ += 8); - } - if (w !== (4294967295 & r.total)) { - (t.msg = 'incorrect length check'), (r.mode = l); - break; - } - (w = 0), (_ = 0); - } - r.mode = 29; - case 29: - N = 1; - break t; - case l: - N = -3; - break t; - case 31: - return -4; - default: - return u; - } - return ( - (t.next_out = b), - (t.avail_out = v), - (t.next_in = g), - (t.avail_in = y), - (r.hold = w), - (r.bits = _), - (r.wsize || (E !== t.avail_out && r.mode < l && (r.mode < 27 || 4 !== e))) && x(t, t.output, t.next_out, E - t.avail_out) - ? ((r.mode = 31), -4) - : ((M -= t.avail_in), - (E -= t.avail_out), - (t.total_in += M), - (t.total_out += E), - (r.total += E), - r.wrap && E && (t.adler = r.check = r.flags ? o(r.check, p, E, t.next_out - E) : n(r.check, p, E, t.next_out - E)), - (t.data_type = r.bits + (r.last ? 64 : 0) + (r.mode === c ? 128 : 0) + (20 === r.mode || 15 === r.mode ? 256 : 0)), - ((0 === M && 0 === E) || 4 === e) && N === h && (N = -5), - N) - ); - }), - (e.inflateEnd = function (t) { - if (!t || !t.state) return u; - var e = t.state; - return e.window && (e.window = null), (t.state = null), h; - }), - (e.inflateGetHeader = function (t, e) { - var r; - return t && t.state ? (0 == (2 & (r = t.state).wrap) ? u : ((r.head = e), (e.done = !1), h)) : u; - }), - (e.inflateSetDictionary = function (t, e) { - var r, - i = e.length; - return t && t.state - ? 0 !== (r = t.state).wrap && 11 !== r.mode - ? u - : 11 === r.mode && n(1, e, i, 0) !== r.check - ? -3 - : x(t, e, i, i) - ? ((r.mode = 31), -4) - : ((r.havedict = 1), h) - : u; - }), - (e.inflateInfo = 'pako inflate (from Nodeca project)'); - }, - 1375: (t, e, r) => { - 'use strict'; - var i = r(6907), - n = [3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0], - o = [16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78], - s = [ - 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, - 16385, 24577, 0, 0, - ], - a = [ - 16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, 28, 28, 29, 29, 64, 64, - ]; - t.exports = function (t, e, r, h, u, f, c, l) { - var d, - p, - m, - g, - b, - y, - v, - w, - _, - M = l.bits, - E = 0, - S = 0, - x = 0, - A = 0, - k = 0, - R = 0, - B = 0, - I = 0, - T = 0, - P = 0, - O = null, - L = 0, - C = new i.Buf16(16), - N = new i.Buf16(16), - j = null, - U = 0; - for (E = 0; E <= 15; E++) C[E] = 0; - for (S = 0; S < h; S++) C[e[r + S]]++; - for (k = M, A = 15; A >= 1 && 0 === C[A]; A--); - if ((k > A && (k = A), 0 === A)) return (u[f++] = 20971520), (u[f++] = 20971520), (l.bits = 1), 0; - for (x = 1; x < A && 0 === C[x]; x++); - for (k < x && (k = x), I = 1, E = 1; E <= 15; E++) if (((I <<= 1), (I -= C[E]) < 0)) return -1; - if (I > 0 && (0 === t || 1 !== A)) return -1; - for (N[1] = 0, E = 1; E < 15; E++) N[E + 1] = N[E] + C[E]; - for (S = 0; S < h; S++) 0 !== e[r + S] && (c[N[e[r + S]]++] = S); - if ( - (0 === t - ? ((O = j = c), (y = 19)) - : 1 === t - ? ((O = n), (L -= 257), (j = o), (U -= 257), (y = 256)) - : ((O = s), (j = a), (y = -1)), - (P = 0), - (S = 0), - (E = x), - (b = f), - (R = k), - (B = 0), - (m = -1), - (g = (T = 1 << k) - 1), - (1 === t && T > 852) || (2 === t && T > 592)) - ) - return 1; - for (;;) { - (v = E - B), - c[S] < y ? ((w = 0), (_ = c[S])) : c[S] > y ? ((w = j[U + c[S]]), (_ = O[L + c[S]])) : ((w = 96), (_ = 0)), - (d = 1 << (E - B)), - (x = p = 1 << R); - do { - u[b + (P >> B) + (p -= d)] = (v << 24) | (w << 16) | _ | 0; - } while (0 !== p); - for (d = 1 << (E - 1); P & d; ) d >>= 1; - if ((0 !== d ? ((P &= d - 1), (P += d)) : (P = 0), S++, 0 == --C[E])) { - if (E === A) break; - E = e[r + c[S]]; - } - if (E > k && (P & g) !== m) { - for (0 === B && (B = k), b += x, I = 1 << (R = E - B); R + B < A && !((I -= C[R + B]) <= 0); ) R++, (I <<= 1); - if (((T += 1 << R), (1 === t && T > 852) || (2 === t && T > 592))) return 1; - u[(m = P & g)] = (k << 24) | (R << 16) | (b - f) | 0; - } - } - return 0 !== P && (u[b + P] = ((E - B) << 24) | (64 << 16) | 0), (l.bits = k), 0; - }; - }, - 9364: t => { - 'use strict'; - t.exports = { - '2': 'need dictionary', - '1': 'stream end', - '0': '', - '-1': 'file error', - '-2': 'stream error', - '-3': 'data error', - '-4': 'insufficient memory', - '-5': 'buffer error', - '-6': 'incompatible version', - }; - }, - 1339: (t, e, r) => { - 'use strict'; - var i = r(6907); - function n(t) { - for (var e = t.length; --e >= 0; ) t[e] = 0; - } - var o = 256, - s = 286, - a = 30, - h = 15, - u = 16, - f = [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0], - c = [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13], - l = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7], - d = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15], - p = new Array(576); - n(p); - var m = new Array(60); - n(m); - var g = new Array(512); - n(g); - var b = new Array(256); - n(b); - var y = new Array(29); - n(y); - var v, - w, - _, - M = new Array(a); - function E(t, e, r, i, n) { - (this.static_tree = t), - (this.extra_bits = e), - (this.extra_base = r), - (this.elems = i), - (this.max_length = n), - (this.has_stree = t && t.length); - } - function S(t, e) { - (this.dyn_tree = t), (this.max_code = 0), (this.stat_desc = e); - } - function x(t) { - return t < 256 ? g[t] : g[256 + (t >>> 7)]; - } - function A(t, e) { - (t.pending_buf[t.pending++] = 255 & e), (t.pending_buf[t.pending++] = (e >>> 8) & 255); - } - function k(t, e, r) { - t.bi_valid > u - r - ? ((t.bi_buf |= (e << t.bi_valid) & 65535), A(t, t.bi_buf), (t.bi_buf = e >> (u - t.bi_valid)), (t.bi_valid += r - u)) - : ((t.bi_buf |= (e << t.bi_valid) & 65535), (t.bi_valid += r)); - } - function R(t, e, r) { - k(t, r[2 * e], r[2 * e + 1]); - } - function B(t, e) { - var r = 0; - do { - (r |= 1 & t), (t >>>= 1), (r <<= 1); - } while (--e > 0); - return r >>> 1; - } - function I(t, e, r) { - var i, - n, - o = new Array(h + 1), - s = 0; - for (i = 1; i <= h; i++) o[i] = s = (s + r[i - 1]) << 1; - for (n = 0; n <= e; n++) { - var a = t[2 * n + 1]; - 0 !== a && (t[2 * n] = B(o[a]++, a)); - } - } - function T(t) { - var e; - for (e = 0; e < s; e++) t.dyn_ltree[2 * e] = 0; - for (e = 0; e < a; e++) t.dyn_dtree[2 * e] = 0; - for (e = 0; e < 19; e++) t.bl_tree[2 * e] = 0; - (t.dyn_ltree[512] = 1), (t.opt_len = t.static_len = 0), (t.last_lit = t.matches = 0); - } - function P(t) { - t.bi_valid > 8 ? A(t, t.bi_buf) : t.bi_valid > 0 && (t.pending_buf[t.pending++] = t.bi_buf), (t.bi_buf = 0), (t.bi_valid = 0); - } - function O(t, e, r, i) { - var n = 2 * e, - o = 2 * r; - return t[n] < t[o] || (t[n] === t[o] && i[e] <= i[r]); - } - function L(t, e, r) { - for ( - var i = t.heap[r], n = r << 1; - n <= t.heap_len && (n < t.heap_len && O(e, t.heap[n + 1], t.heap[n], t.depth) && n++, !O(e, i, t.heap[n], t.depth)); - - ) - (t.heap[r] = t.heap[n]), (r = n), (n <<= 1); - t.heap[r] = i; - } - function C(t, e, r) { - var i, - n, - s, - a, - h = 0; - if (0 !== t.last_lit) - do { - (i = (t.pending_buf[t.d_buf + 2 * h] << 8) | t.pending_buf[t.d_buf + 2 * h + 1]), - (n = t.pending_buf[t.l_buf + h]), - h++, - 0 === i - ? R(t, n, e) - : (R(t, (s = b[n]) + o + 1, e), - 0 !== (a = f[s]) && k(t, (n -= y[s]), a), - R(t, (s = x(--i)), r), - 0 !== (a = c[s]) && k(t, (i -= M[s]), a)); - } while (h < t.last_lit); - R(t, 256, e); - } - function N(t, e) { - var r, - i, - n, - o = e.dyn_tree, - s = e.stat_desc.static_tree, - a = e.stat_desc.has_stree, - u = e.stat_desc.elems, - f = -1; - for (t.heap_len = 0, t.heap_max = 573, r = 0; r < u; r++) - 0 !== o[2 * r] ? ((t.heap[++t.heap_len] = f = r), (t.depth[r] = 0)) : (o[2 * r + 1] = 0); - for (; t.heap_len < 2; ) - (o[2 * (n = t.heap[++t.heap_len] = f < 2 ? ++f : 0)] = 1), (t.depth[n] = 0), t.opt_len--, a && (t.static_len -= s[2 * n + 1]); - for (e.max_code = f, r = t.heap_len >> 1; r >= 1; r--) L(t, o, r); - n = u; - do { - (r = t.heap[1]), - (t.heap[1] = t.heap[t.heap_len--]), - L(t, o, 1), - (i = t.heap[1]), - (t.heap[--t.heap_max] = r), - (t.heap[--t.heap_max] = i), - (o[2 * n] = o[2 * r] + o[2 * i]), - (t.depth[n] = (t.depth[r] >= t.depth[i] ? t.depth[r] : t.depth[i]) + 1), - (o[2 * r + 1] = o[2 * i + 1] = n), - (t.heap[1] = n++), - L(t, o, 1); - } while (t.heap_len >= 2); - (t.heap[--t.heap_max] = t.heap[1]), - (function (t, e) { - var r, - i, - n, - o, - s, - a, - u = e.dyn_tree, - f = e.max_code, - c = e.stat_desc.static_tree, - l = e.stat_desc.has_stree, - d = e.stat_desc.extra_bits, - p = e.stat_desc.extra_base, - m = e.stat_desc.max_length, - g = 0; - for (o = 0; o <= h; o++) t.bl_count[o] = 0; - for (u[2 * t.heap[t.heap_max] + 1] = 0, r = t.heap_max + 1; r < 573; r++) - (o = u[2 * u[2 * (i = t.heap[r]) + 1] + 1] + 1) > m && ((o = m), g++), - (u[2 * i + 1] = o), - i > f || - (t.bl_count[o]++, - (s = 0), - i >= p && (s = d[i - p]), - (a = u[2 * i]), - (t.opt_len += a * (o + s)), - l && (t.static_len += a * (c[2 * i + 1] + s))); - if (0 !== g) { - do { - for (o = m - 1; 0 === t.bl_count[o]; ) o--; - t.bl_count[o]--, (t.bl_count[o + 1] += 2), t.bl_count[m]--, (g -= 2); - } while (g > 0); - for (o = m; 0 !== o; o--) - for (i = t.bl_count[o]; 0 !== i; ) - (n = t.heap[--r]) > f || - (u[2 * n + 1] !== o && ((t.opt_len += (o - u[2 * n + 1]) * u[2 * n]), (u[2 * n + 1] = o)), i--); - } - })(t, e), - I(o, f, t.bl_count); - } - function j(t, e, r) { - var i, - n, - o = -1, - s = e[1], - a = 0, - h = 7, - u = 4; - for (0 === s && ((h = 138), (u = 3)), e[2 * (r + 1) + 1] = 65535, i = 0; i <= r; i++) - (n = s), - (s = e[2 * (i + 1) + 1]), - (++a < h && n === s) || - (a < u - ? (t.bl_tree[2 * n] += a) - : 0 !== n - ? (n !== o && t.bl_tree[2 * n]++, t.bl_tree[32]++) - : a <= 10 - ? t.bl_tree[34]++ - : t.bl_tree[36]++, - (a = 0), - (o = n), - 0 === s ? ((h = 138), (u = 3)) : n === s ? ((h = 6), (u = 3)) : ((h = 7), (u = 4))); - } - function U(t, e, r) { - var i, - n, - o = -1, - s = e[1], - a = 0, - h = 7, - u = 4; - for (0 === s && ((h = 138), (u = 3)), i = 0; i <= r; i++) - if (((n = s), (s = e[2 * (i + 1) + 1]), !(++a < h && n === s))) { - if (a < u) - do { - R(t, n, t.bl_tree); - } while (0 != --a); - else - 0 !== n - ? (n !== o && (R(t, n, t.bl_tree), a--), R(t, 16, t.bl_tree), k(t, a - 3, 2)) - : a <= 10 - ? (R(t, 17, t.bl_tree), k(t, a - 3, 3)) - : (R(t, 18, t.bl_tree), k(t, a - 11, 7)); - (a = 0), (o = n), 0 === s ? ((h = 138), (u = 3)) : n === s ? ((h = 6), (u = 3)) : ((h = 7), (u = 4)); - } - } - n(M); - var D = !1; - function z(t, e, r, n) { - k(t, 0 + (n ? 1 : 0), 3), - (function (t, e, r, n) { - P(t), A(t, r), A(t, ~r), i.arraySet(t.pending_buf, t.window, e, r, t.pending), (t.pending += r); - })(t, e, r); - } - (e._tr_init = function (t) { - D || - ((function () { - var t, - e, - r, - i, - n, - o = new Array(h + 1); - for (r = 0, i = 0; i < 28; i++) for (y[i] = r, t = 0; t < 1 << f[i]; t++) b[r++] = i; - for (b[r - 1] = i, n = 0, i = 0; i < 16; i++) for (M[i] = n, t = 0; t < 1 << c[i]; t++) g[n++] = i; - for (n >>= 7; i < a; i++) for (M[i] = n << 7, t = 0; t < 1 << (c[i] - 7); t++) g[256 + n++] = i; - for (e = 0; e <= h; e++) o[e] = 0; - for (t = 0; t <= 143; ) (p[2 * t + 1] = 8), t++, o[8]++; - for (; t <= 255; ) (p[2 * t + 1] = 9), t++, o[9]++; - for (; t <= 279; ) (p[2 * t + 1] = 7), t++, o[7]++; - for (; t <= 287; ) (p[2 * t + 1] = 8), t++, o[8]++; - for (I(p, 287, o), t = 0; t < a; t++) (m[2 * t + 1] = 5), (m[2 * t] = B(t, 5)); - (v = new E(p, f, 257, s, h)), (w = new E(m, c, 0, a, h)), (_ = new E(new Array(0), l, 0, 19, 7)); - })(), - (D = !0)), - (t.l_desc = new S(t.dyn_ltree, v)), - (t.d_desc = new S(t.dyn_dtree, w)), - (t.bl_desc = new S(t.bl_tree, _)), - (t.bi_buf = 0), - (t.bi_valid = 0), - T(t); - }), - (e._tr_stored_block = z), - (e._tr_flush_block = function (t, e, r, i) { - var n, - s, - a = 0; - t.level > 0 - ? (2 === t.strm.data_type && - (t.strm.data_type = (function (t) { - var e, - r = 4093624447; - for (e = 0; e <= 31; e++, r >>>= 1) if (1 & r && 0 !== t.dyn_ltree[2 * e]) return 0; - if (0 !== t.dyn_ltree[18] || 0 !== t.dyn_ltree[20] || 0 !== t.dyn_ltree[26]) return 1; - for (e = 32; e < o; e++) if (0 !== t.dyn_ltree[2 * e]) return 1; - return 0; - })(t)), - N(t, t.l_desc), - N(t, t.d_desc), - (a = (function (t) { - var e; - for ( - j(t, t.dyn_ltree, t.l_desc.max_code), j(t, t.dyn_dtree, t.d_desc.max_code), N(t, t.bl_desc), e = 18; - e >= 3 && 0 === t.bl_tree[2 * d[e] + 1]; - e-- - ); - return (t.opt_len += 3 * (e + 1) + 5 + 5 + 4), e; - })(t)), - (n = (t.opt_len + 3 + 7) >>> 3), - (s = (t.static_len + 3 + 7) >>> 3) <= n && (n = s)) - : (n = s = r + 5), - r + 4 <= n && -1 !== e - ? z(t, e, r, i) - : 4 === t.strategy || s === n - ? (k(t, 2 + (i ? 1 : 0), 3), C(t, p, m)) - : (k(t, 4 + (i ? 1 : 0), 3), - (function (t, e, r, i) { - var n; - for (k(t, e - 257, 5), k(t, r - 1, 5), k(t, i - 4, 4), n = 0; n < i; n++) k(t, t.bl_tree[2 * d[n] + 1], 3); - U(t, t.dyn_ltree, e - 1), U(t, t.dyn_dtree, r - 1); - })(t, t.l_desc.max_code + 1, t.d_desc.max_code + 1, a + 1), - C(t, t.dyn_ltree, t.dyn_dtree)), - T(t), - i && P(t); - }), - (e._tr_tally = function (t, e, r) { - return ( - (t.pending_buf[t.d_buf + 2 * t.last_lit] = (e >>> 8) & 255), - (t.pending_buf[t.d_buf + 2 * t.last_lit + 1] = 255 & e), - (t.pending_buf[t.l_buf + t.last_lit] = 255 & r), - t.last_lit++, - 0 === e ? t.dyn_ltree[2 * r]++ : (t.matches++, e--, t.dyn_ltree[2 * (b[r] + o + 1)]++, t.dyn_dtree[2 * x(e)]++), - t.last_lit === t.lit_bufsize - 1 - ); - }), - (e._tr_align = function (t) { - k(t, 2, 3), - R(t, 256, p), - (function (t) { - 16 === t.bi_valid - ? (A(t, t.bi_buf), (t.bi_buf = 0), (t.bi_valid = 0)) - : t.bi_valid >= 8 && ((t.pending_buf[t.pending++] = 255 & t.bi_buf), (t.bi_buf >>= 8), (t.bi_valid -= 8)); - })(t); - }); - }, - 4860: t => { - 'use strict'; - t.exports = function () { - (this.input = null), - (this.next_in = 0), - (this.avail_in = 0), - (this.total_in = 0), - (this.output = null), - (this.next_out = 0), - (this.avail_out = 0), - (this.total_out = 0), - (this.msg = ''), - (this.state = null), - (this.data_type = 2), - (this.adler = 0); - }; - }, - 2080: (t, e, r) => { - var i = r(9364), - n = r(4860), - o = r(2233), - s = r(3001), - a = r(7162); - for (var h in a) e[h] = a[h]; - function u(t) { - if (t < e.DEFLATE || t > e.UNZIP) throw new TypeError('Bad argument'); - (this.mode = t), - (this.init_done = !1), - (this.write_in_progress = !1), - (this.pending_close = !1), - (this.windowBits = 0), - (this.level = 0), - (this.memLevel = 0), - (this.strategy = 0), - (this.dictionary = null); - } - function f(t, e) { - for (var r = 0; r < t.length; r++) this[e + r] = t[r]; - } - (e.NONE = 0), - (e.DEFLATE = 1), - (e.INFLATE = 2), - (e.GZIP = 3), - (e.GUNZIP = 4), - (e.DEFLATERAW = 5), - (e.INFLATERAW = 6), - (e.UNZIP = 7), - (u.prototype.init = function (t, r, i, a, h) { - switch ( - ((this.windowBits = t), - (this.level = r), - (this.memLevel = i), - (this.strategy = a), - (this.mode !== e.GZIP && this.mode !== e.GUNZIP) || (this.windowBits += 16), - this.mode === e.UNZIP && (this.windowBits += 32), - (this.mode !== e.DEFLATERAW && this.mode !== e.INFLATERAW) || (this.windowBits = -this.windowBits), - (this.strm = new n()), - this.mode) - ) { - case e.DEFLATE: - case e.GZIP: - case e.DEFLATERAW: - var u = o.deflateInit2(this.strm, this.level, e.Z_DEFLATED, this.windowBits, this.memLevel, this.strategy); - break; - case e.INFLATE: - case e.GUNZIP: - case e.INFLATERAW: - case e.UNZIP: - u = s.inflateInit2(this.strm, this.windowBits); - break; - default: - throw new Error('Unknown mode ' + this.mode); - } - u === e.Z_OK ? ((this.write_in_progress = !1), (this.init_done = !0)) : this._error(u); - }), - (u.prototype.params = function () { - throw new Error('deflateParams Not supported'); - }), - (u.prototype._writeCheck = function () { - if (!this.init_done) throw new Error('write before init'); - if (this.mode === e.NONE) throw new Error('already finalized'); - if (this.write_in_progress) throw new Error('write already in progress'); - if (this.pending_close) throw new Error('close is pending'); - }), - (u.prototype.write = function (t, e, r, i, n, o, s) { - this._writeCheck(), (this.write_in_progress = !0); - var a = this; - return ( - process.nextTick(function () { - a.write_in_progress = !1; - var h = a._write(t, e, r, i, n, o, s); - a.callback(h[0], h[1]), a.pending_close && a.close(); - }), - this - ); - }), - (u.prototype.writeSync = function (t, e, r, i, n, o, s) { - return this._writeCheck(), this._write(t, e, r, i, n, o, s); - }), - (u.prototype._write = function (t, r, i, n, a, h, u) { - if ( - ((this.write_in_progress = !0), - t !== e.Z_NO_FLUSH && - t !== e.Z_PARTIAL_FLUSH && - t !== e.Z_SYNC_FLUSH && - t !== e.Z_FULL_FLUSH && - t !== e.Z_FINISH && - t !== e.Z_BLOCK) - ) - throw new Error('Invalid flush value'); - null == r && ((r = new Buffer(0)), (n = 0), (i = 0)), a._set ? (a.set = a._set) : (a.set = f); - var c = this.strm; - switch (((c.avail_in = n), (c.input = r), (c.next_in = i), (c.avail_out = u), (c.output = a), (c.next_out = h), this.mode)) { - case e.DEFLATE: - case e.GZIP: - case e.DEFLATERAW: - var l = o.deflate(c, t); - break; - case e.UNZIP: - case e.INFLATE: - case e.GUNZIP: - case e.INFLATERAW: - l = s.inflate(c, t); - break; - default: - throw new Error('Unknown mode ' + this.mode); - } - return l !== e.Z_STREAM_END && l !== e.Z_OK && this._error(l), (this.write_in_progress = !1), [c.avail_in, c.avail_out]; - }), - (u.prototype.close = function () { - this.write_in_progress - ? (this.pending_close = !0) - : ((this.pending_close = !1), - this.mode === e.DEFLATE || this.mode === e.GZIP || this.mode === e.DEFLATERAW - ? o.deflateEnd(this.strm) - : s.inflateEnd(this.strm), - (this.mode = e.NONE)); - }), - (u.prototype.reset = function () { - switch (this.mode) { - case e.DEFLATE: - case e.DEFLATERAW: - var t = o.deflateReset(this.strm); - break; - case e.INFLATE: - case e.INFLATERAW: - t = s.inflateReset(this.strm); - } - t !== e.Z_OK && this._error(t); - }), - (u.prototype._error = function (t) { - this.onerror(i[t] + ': ' + this.strm.msg, t), (this.write_in_progress = !1), this.pending_close && this.close(); - }), - (e.Zlib = u); - }, - 9173: (t, e, r) => { - var i = r(4219), - n = r(2080), - o = r(9539), - s = r(8583).ok; - function a(t, e, r) { - var i = [], - n = 0; - function o() { - for (var e; null !== (e = t.read()); ) i.push(e), (n += e.length); - t.once('readable', o); - } - function s() { - var e = Buffer.concat(i, n); - (i = []), r(null, e), t.close(); - } - t.on('error', function (e) { - t.removeListener('end', s), t.removeListener('readable', o), r(e); - }), - t.on('end', s), - t.end(e), - o(); - } - function h(t, e) { - if (('string' == typeof e && (e = new Buffer(e)), !Buffer.isBuffer(e))) throw new TypeError('Not a string or buffer'); - var r = n.Z_FINISH; - return t._processChunk(e, r); - } - function u(t) { - if (!(this instanceof u)) return new u(t); - g.call(this, t, n.DEFLATE); - } - function f(t) { - if (!(this instanceof f)) return new f(t); - g.call(this, t, n.INFLATE); - } - function c(t) { - if (!(this instanceof c)) return new c(t); - g.call(this, t, n.GZIP); - } - function l(t) { - if (!(this instanceof l)) return new l(t); - g.call(this, t, n.GUNZIP); - } - function d(t) { - if (!(this instanceof d)) return new d(t); - g.call(this, t, n.DEFLATERAW); - } - function p(t) { - if (!(this instanceof p)) return new p(t); - g.call(this, t, n.INFLATERAW); - } - function m(t) { - if (!(this instanceof m)) return new m(t); - g.call(this, t, n.UNZIP); - } - function g(t, r) { - if ( - ((this._opts = t = t || {}), - (this._chunkSize = t.chunkSize || e.Z_DEFAULT_CHUNK), - i.call(this, t), - t.flush && - t.flush !== n.Z_NO_FLUSH && - t.flush !== n.Z_PARTIAL_FLUSH && - t.flush !== n.Z_SYNC_FLUSH && - t.flush !== n.Z_FULL_FLUSH && - t.flush !== n.Z_FINISH && - t.flush !== n.Z_BLOCK) - ) - throw new Error('Invalid flush flag: ' + t.flush); - if (((this._flushFlag = t.flush || n.Z_NO_FLUSH), t.chunkSize && (t.chunkSize < e.Z_MIN_CHUNK || t.chunkSize > e.Z_MAX_CHUNK))) - throw new Error('Invalid chunk size: ' + t.chunkSize); - if (t.windowBits && (t.windowBits < e.Z_MIN_WINDOWBITS || t.windowBits > e.Z_MAX_WINDOWBITS)) - throw new Error('Invalid windowBits: ' + t.windowBits); - if (t.level && (t.level < e.Z_MIN_LEVEL || t.level > e.Z_MAX_LEVEL)) throw new Error('Invalid compression level: ' + t.level); - if (t.memLevel && (t.memLevel < e.Z_MIN_MEMLEVEL || t.memLevel > e.Z_MAX_MEMLEVEL)) - throw new Error('Invalid memLevel: ' + t.memLevel); - if ( - t.strategy && - t.strategy != e.Z_FILTERED && - t.strategy != e.Z_HUFFMAN_ONLY && - t.strategy != e.Z_RLE && - t.strategy != e.Z_FIXED && - t.strategy != e.Z_DEFAULT_STRATEGY - ) - throw new Error('Invalid strategy: ' + t.strategy); - if (t.dictionary && !Buffer.isBuffer(t.dictionary)) throw new Error('Invalid dictionary: it should be a Buffer instance'); - this._binding = new n.Zlib(r); - var o = this; - (this._hadError = !1), - (this._binding.onerror = function (t, r) { - (o._binding = null), (o._hadError = !0); - var i = new Error(t); - (i.errno = r), (i.code = e.codes[r]), o.emit('error', i); - }); - var s = e.Z_DEFAULT_COMPRESSION; - 'number' == typeof t.level && (s = t.level); - var a = e.Z_DEFAULT_STRATEGY; - 'number' == typeof t.strategy && (a = t.strategy), - this._binding.init(t.windowBits || e.Z_DEFAULT_WINDOWBITS, s, t.memLevel || e.Z_DEFAULT_MEMLEVEL, a, t.dictionary), - (this._buffer = new Buffer(this._chunkSize)), - (this._offset = 0), - (this._closed = !1), - (this._level = s), - (this._strategy = a), - this.once('end', this.close); - } - (n.Z_MIN_WINDOWBITS = 8), - (n.Z_MAX_WINDOWBITS = 15), - (n.Z_DEFAULT_WINDOWBITS = 15), - (n.Z_MIN_CHUNK = 64), - (n.Z_MAX_CHUNK = 1 / 0), - (n.Z_DEFAULT_CHUNK = 16384), - (n.Z_MIN_MEMLEVEL = 1), - (n.Z_MAX_MEMLEVEL = 9), - (n.Z_DEFAULT_MEMLEVEL = 8), - (n.Z_MIN_LEVEL = -1), - (n.Z_MAX_LEVEL = 9), - (n.Z_DEFAULT_LEVEL = n.Z_DEFAULT_COMPRESSION), - Object.keys(n).forEach(function (t) { - t.match(/^Z/) && (e[t] = n[t]); - }), - (e.codes = { - Z_OK: n.Z_OK, - Z_STREAM_END: n.Z_STREAM_END, - Z_NEED_DICT: n.Z_NEED_DICT, - Z_ERRNO: n.Z_ERRNO, - Z_STREAM_ERROR: n.Z_STREAM_ERROR, - Z_DATA_ERROR: n.Z_DATA_ERROR, - Z_MEM_ERROR: n.Z_MEM_ERROR, - Z_BUF_ERROR: n.Z_BUF_ERROR, - Z_VERSION_ERROR: n.Z_VERSION_ERROR, - }), - Object.keys(e.codes).forEach(function (t) { - e.codes[e.codes[t]] = t; - }), - (e.Deflate = u), - (e.Inflate = f), - (e.Gzip = c), - (e.Gunzip = l), - (e.DeflateRaw = d), - (e.InflateRaw = p), - (e.Unzip = m), - (e.createDeflate = function (t) { - return new u(t); - }), - (e.createInflate = function (t) { - return new f(t); - }), - (e.createDeflateRaw = function (t) { - return new d(t); - }), - (e.createInflateRaw = function (t) { - return new p(t); - }), - (e.createGzip = function (t) { - return new c(t); - }), - (e.createGunzip = function (t) { - return new l(t); - }), - (e.createUnzip = function (t) { - return new m(t); - }), - (e.deflate = function (t, e, r) { - return 'function' == typeof e && ((r = e), (e = {})), a(new u(e), t, r); - }), - (e.deflateSync = function (t, e) { - return h(new u(e), t); - }), - (e.gzip = function (t, e, r) { - return 'function' == typeof e && ((r = e), (e = {})), a(new c(e), t, r); - }), - (e.gzipSync = function (t, e) { - return h(new c(e), t); - }), - (e.deflateRaw = function (t, e, r) { - return 'function' == typeof e && ((r = e), (e = {})), a(new d(e), t, r); - }), - (e.deflateRawSync = function (t, e) { - return h(new d(e), t); - }), - (e.unzip = function (t, e, r) { - return 'function' == typeof e && ((r = e), (e = {})), a(new m(e), t, r); - }), - (e.unzipSync = function (t, e) { - return h(new m(e), t); - }), - (e.inflate = function (t, e, r) { - return 'function' == typeof e && ((r = e), (e = {})), a(new f(e), t, r); - }), - (e.inflateSync = function (t, e) { - return h(new f(e), t); - }), - (e.gunzip = function (t, e, r) { - return 'function' == typeof e && ((r = e), (e = {})), a(new l(e), t, r); - }), - (e.gunzipSync = function (t, e) { - return h(new l(e), t); - }), - (e.inflateRaw = function (t, e, r) { - return 'function' == typeof e && ((r = e), (e = {})), a(new p(e), t, r); - }), - (e.inflateRawSync = function (t, e) { - return h(new p(e), t); - }), - o.inherits(g, i), - (g.prototype.params = function (t, r, i) { - if (t < e.Z_MIN_LEVEL || t > e.Z_MAX_LEVEL) throw new RangeError('Invalid compression level: ' + t); - if (r != e.Z_FILTERED && r != e.Z_HUFFMAN_ONLY && r != e.Z_RLE && r != e.Z_FIXED && r != e.Z_DEFAULT_STRATEGY) - throw new TypeError('Invalid strategy: ' + r); - if (this._level !== t || this._strategy !== r) { - var o = this; - this.flush(n.Z_SYNC_FLUSH, function () { - o._binding.params(t, r), o._hadError || ((o._level = t), (o._strategy = r), i && i()); - }); - } else process.nextTick(i); - }), - (g.prototype.reset = function () { - return this._binding.reset(); - }), - (g.prototype._flush = function (t) { - this._transform(new Buffer(0), '', t); - }), - (g.prototype.flush = function (t, e) { - var r = this._writableState; - if ((('function' == typeof t || (void 0 === t && !e)) && ((e = t), (t = n.Z_FULL_FLUSH)), r.ended)) e && process.nextTick(e); - else if (r.ending) e && this.once('end', e); - else if (r.needDrain) { - var i = this; - this.once('drain', function () { - i.flush(e); - }); - } else (this._flushFlag = t), this.write(new Buffer(0), '', e); - }), - (g.prototype.close = function (t) { - if ((t && process.nextTick(t), !this._closed)) { - (this._closed = !0), this._binding.close(); - var e = this; - process.nextTick(function () { - e.emit('close'); - }); - } - }), - (g.prototype._transform = function (t, e, r) { - var i, - o = this._writableState, - s = (o.ending || o.ended) && (!t || o.length === t.length); - if (null === !t && !Buffer.isBuffer(t)) return r(new Error('invalid input')); - s ? (i = n.Z_FINISH) : ((i = this._flushFlag), t.length >= o.length && (this._flushFlag = this._opts.flush || n.Z_NO_FLUSH)), - this._processChunk(t, i, r); - }), - (g.prototype._processChunk = function (t, e, r) { - var i = t && t.length, - n = this._chunkSize - this._offset, - o = 0, - a = this, - h = 'function' == typeof r; - if (!h) { - var u, - f = [], - c = 0; - this.on('error', function (t) { - u = t; - }); - do { - var l = this._binding.writeSync(e, t, o, i, this._buffer, this._offset, n); - } while (!this._hadError && m(l[0], l[1])); - if (this._hadError) throw u; - var d = Buffer.concat(f, c); - return this.close(), d; - } - var p = this._binding.write(e, t, o, i, this._buffer, this._offset, n); - function m(u, l) { - if (!a._hadError) { - var d = n - l; - if ((s(d >= 0, 'have should not go down'), d > 0)) { - var p = a._buffer.slice(a._offset, a._offset + d); - (a._offset += d), h ? a.push(p) : (f.push(p), (c += p.length)); - } - if ( - ((0 === l || a._offset >= a._chunkSize) && ((n = a._chunkSize), (a._offset = 0), (a._buffer = new Buffer(a._chunkSize))), - 0 === l) - ) { - if (((o += i - u), (i = u), !h)) return !0; - var g = a._binding.write(e, t, o, i, a._buffer, a._offset, a._chunkSize); - return (g.callback = m), void (g.buffer = t); - } - if (!h) return !1; - r(); - } - } - (p.buffer = t), (p.callback = m); - }), - o.inherits(u, g), - o.inherits(f, g), - o.inherits(c, g), - o.inherits(l, g), - o.inherits(d, g), - o.inherits(p, g), - o.inherits(m, g); - }, - 8764: (t, e, r) => { - 'use strict'; - var i = r(9742), - n = r(645), - o = r(5826); - function s() { - return h.TYPED_ARRAY_SUPPORT ? 2147483647 : 1073741823; - } - function a(t, e) { - if (s() < e) throw new RangeError('Invalid typed array length'); - return ( - h.TYPED_ARRAY_SUPPORT ? ((t = new Uint8Array(e)).__proto__ = h.prototype) : (null === t && (t = new h(e)), (t.length = e)), t - ); - } - function h(t, e, r) { - if (!(h.TYPED_ARRAY_SUPPORT || this instanceof h)) return new h(t, e, r); - if ('number' == typeof t) { - if ('string' == typeof e) throw new Error('If encoding is specified then the first argument must be a string'); - return c(this, t); - } - return u(this, t, e, r); - } - function u(t, e, r, i) { - if ('number' == typeof e) throw new TypeError('"value" argument must not be a number'); - return 'undefined' != typeof ArrayBuffer && e instanceof ArrayBuffer - ? (function (t, e, r, i) { - if ((e.byteLength, r < 0 || e.byteLength < r)) throw new RangeError("'offset' is out of bounds"); - if (e.byteLength < r + (i || 0)) throw new RangeError("'length' is out of bounds"); - return ( - (e = void 0 === r && void 0 === i ? new Uint8Array(e) : void 0 === i ? new Uint8Array(e, r) : new Uint8Array(e, r, i)), - h.TYPED_ARRAY_SUPPORT ? ((t = e).__proto__ = h.prototype) : (t = l(t, e)), - t - ); - })(t, e, r, i) - : 'string' == typeof e - ? (function (t, e, r) { - if ((('string' == typeof r && '' !== r) || (r = 'utf8'), !h.isEncoding(r))) - throw new TypeError('"encoding" must be a valid string encoding'); - var i = 0 | p(e, r), - n = (t = a(t, i)).write(e, r); - return n !== i && (t = t.slice(0, n)), t; - })(t, e, r) - : (function (t, e) { - if (h.isBuffer(e)) { - var r = 0 | d(e.length); - return 0 === (t = a(t, r)).length || e.copy(t, 0, 0, r), t; - } - if (e) { - if (('undefined' != typeof ArrayBuffer && e.buffer instanceof ArrayBuffer) || 'length' in e) - return 'number' != typeof e.length || (i = e.length) != i ? a(t, 0) : l(t, e); - if ('Buffer' === e.type && o(e.data)) return l(t, e.data); - } - var i; - throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.'); - })(t, e); - } - function f(t) { - if ('number' != typeof t) throw new TypeError('"size" argument must be a number'); - if (t < 0) throw new RangeError('"size" argument must not be negative'); - } - function c(t, e) { - if ((f(e), (t = a(t, e < 0 ? 0 : 0 | d(e))), !h.TYPED_ARRAY_SUPPORT)) for (var r = 0; r < e; ++r) t[r] = 0; - return t; - } - function l(t, e) { - var r = e.length < 0 ? 0 : 0 | d(e.length); - t = a(t, r); - for (var i = 0; i < r; i += 1) t[i] = 255 & e[i]; - return t; - } - function d(t) { - if (t >= s()) throw new RangeError('Attempt to allocate Buffer larger than maximum size: 0x' + s().toString(16) + ' bytes'); - return 0 | t; - } - function p(t, e) { - if (h.isBuffer(t)) return t.length; - if ( - 'undefined' != typeof ArrayBuffer && - 'function' == typeof ArrayBuffer.isView && - (ArrayBuffer.isView(t) || t instanceof ArrayBuffer) - ) - return t.byteLength; - 'string' != typeof t && (t = '' + t); - var r = t.length; - if (0 === r) return 0; - for (var i = !1; ; ) - switch (e) { - case 'ascii': - case 'latin1': - case 'binary': - return r; - case 'utf8': - case 'utf-8': - case void 0: - return z(t).length; - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return 2 * r; - case 'hex': - return r >>> 1; - case 'base64': - return F(t).length; - default: - if (i) return z(t).length; - (e = ('' + e).toLowerCase()), (i = !0); - } - } - function m(t, e, r) { - var i = !1; - if (((void 0 === e || e < 0) && (e = 0), e > this.length)) return ''; - if (((void 0 === r || r > this.length) && (r = this.length), r <= 0)) return ''; - if ((r >>>= 0) <= (e >>>= 0)) return ''; - for (t || (t = 'utf8'); ; ) - switch (t) { - case 'hex': - return I(this, e, r); - case 'utf8': - case 'utf-8': - return A(this, e, r); - case 'ascii': - return R(this, e, r); - case 'latin1': - case 'binary': - return B(this, e, r); - case 'base64': - return x(this, e, r); - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return T(this, e, r); - default: - if (i) throw new TypeError('Unknown encoding: ' + t); - (t = (t + '').toLowerCase()), (i = !0); - } - } - function g(t, e, r) { - var i = t[e]; - (t[e] = t[r]), (t[r] = i); - } - function b(t, e, r, i, n) { - if (0 === t.length) return -1; - if ( - ('string' == typeof r ? ((i = r), (r = 0)) : r > 2147483647 ? (r = 2147483647) : r < -2147483648 && (r = -2147483648), - (r = +r), - isNaN(r) && (r = n ? 0 : t.length - 1), - r < 0 && (r = t.length + r), - r >= t.length) - ) { - if (n) return -1; - r = t.length - 1; - } else if (r < 0) { - if (!n) return -1; - r = 0; - } - if (('string' == typeof e && (e = h.from(e, i)), h.isBuffer(e))) return 0 === e.length ? -1 : y(t, e, r, i, n); - if ('number' == typeof e) - return ( - (e &= 255), - h.TYPED_ARRAY_SUPPORT && 'function' == typeof Uint8Array.prototype.indexOf - ? n - ? Uint8Array.prototype.indexOf.call(t, e, r) - : Uint8Array.prototype.lastIndexOf.call(t, e, r) - : y(t, [e], r, i, n) - ); - throw new TypeError('val must be string, number or Buffer'); - } - function y(t, e, r, i, n) { - var o, - s = 1, - a = t.length, - h = e.length; - if (void 0 !== i && ('ucs2' === (i = String(i).toLowerCase()) || 'ucs-2' === i || 'utf16le' === i || 'utf-16le' === i)) { - if (t.length < 2 || e.length < 2) return -1; - (s = 2), (a /= 2), (h /= 2), (r /= 2); - } - function u(t, e) { - return 1 === s ? t[e] : t.readUInt16BE(e * s); - } - if (n) { - var f = -1; - for (o = r; o < a; o++) - if (u(t, o) === u(e, -1 === f ? 0 : o - f)) { - if ((-1 === f && (f = o), o - f + 1 === h)) return f * s; - } else -1 !== f && (o -= o - f), (f = -1); - } else - for (r + h > a && (r = a - h), o = r; o >= 0; o--) { - for (var c = !0, l = 0; l < h; l++) - if (u(t, o + l) !== u(e, l)) { - c = !1; - break; - } - if (c) return o; - } - return -1; - } - function v(t, e, r, i) { - r = Number(r) || 0; - var n = t.length - r; - i ? (i = Number(i)) > n && (i = n) : (i = n); - var o = e.length; - if (o % 2 != 0) throw new TypeError('Invalid hex string'); - i > o / 2 && (i = o / 2); - for (var s = 0; s < i; ++s) { - var a = parseInt(e.substr(2 * s, 2), 16); - if (isNaN(a)) return s; - t[r + s] = a; - } - return s; - } - function w(t, e, r, i) { - return q(z(e, t.length - r), t, r, i); - } - function _(t, e, r, i) { - return q( - (function (t) { - for (var e = [], r = 0; r < t.length; ++r) e.push(255 & t.charCodeAt(r)); - return e; - })(e), - t, - r, - i - ); - } - function M(t, e, r, i) { - return _(t, e, r, i); - } - function E(t, e, r, i) { - return q(F(e), t, r, i); - } - function S(t, e, r, i) { - return q( - (function (t, e) { - for (var r, i, n, o = [], s = 0; s < t.length && !((e -= 2) < 0); ++s) - (i = (r = t.charCodeAt(s)) >> 8), (n = r % 256), o.push(n), o.push(i); - return o; - })(e, t.length - r), - t, - r, - i - ); - } - function x(t, e, r) { - return 0 === e && r === t.length ? i.fromByteArray(t) : i.fromByteArray(t.slice(e, r)); - } - function A(t, e, r) { - r = Math.min(t.length, r); - for (var i = [], n = e; n < r; ) { - var o, - s, - a, - h, - u = t[n], - f = null, - c = u > 239 ? 4 : u > 223 ? 3 : u > 191 ? 2 : 1; - if (n + c <= r) - switch (c) { - case 1: - u < 128 && (f = u); - break; - case 2: - 128 == (192 & (o = t[n + 1])) && (h = ((31 & u) << 6) | (63 & o)) > 127 && (f = h); - break; - case 3: - (o = t[n + 1]), - (s = t[n + 2]), - 128 == (192 & o) && - 128 == (192 & s) && - (h = ((15 & u) << 12) | ((63 & o) << 6) | (63 & s)) > 2047 && - (h < 55296 || h > 57343) && - (f = h); - break; - case 4: - (o = t[n + 1]), - (s = t[n + 2]), - (a = t[n + 3]), - 128 == (192 & o) && - 128 == (192 & s) && - 128 == (192 & a) && - (h = ((15 & u) << 18) | ((63 & o) << 12) | ((63 & s) << 6) | (63 & a)) > 65535 && - h < 1114112 && - (f = h); - } - null === f - ? ((f = 65533), (c = 1)) - : f > 65535 && ((f -= 65536), i.push(((f >>> 10) & 1023) | 55296), (f = 56320 | (1023 & f))), - i.push(f), - (n += c); - } - return (function (t) { - var e = t.length; - if (e <= k) return String.fromCharCode.apply(String, t); - for (var r = '', i = 0; i < e; ) r += String.fromCharCode.apply(String, t.slice(i, (i += k))); - return r; - })(i); - } - (e.Buffer = h), - (e.SlowBuffer = function (t) { - return +t != t && (t = 0), h.alloc(+t); - }), - (e.INSPECT_MAX_BYTES = 50), - (h.TYPED_ARRAY_SUPPORT = - void 0 !== r.g.TYPED_ARRAY_SUPPORT - ? r.g.TYPED_ARRAY_SUPPORT - : (function () { - try { - var t = new Uint8Array(1); - return ( - (t.__proto__ = { - __proto__: Uint8Array.prototype, - foo: function () { - return 42; - }, - }), - 42 === t.foo() && 'function' == typeof t.subarray && 0 === t.subarray(1, 1).byteLength - ); - } catch (t) { - return !1; - } - })()), - (e.kMaxLength = s()), - (h.poolSize = 8192), - (h._augment = function (t) { - return (t.__proto__ = h.prototype), t; - }), - (h.from = function (t, e, r) { - return u(null, t, e, r); - }), - h.TYPED_ARRAY_SUPPORT && - ((h.prototype.__proto__ = Uint8Array.prototype), - (h.__proto__ = Uint8Array), - 'undefined' != typeof Symbol && - Symbol.species && - h[Symbol.species] === h && - Object.defineProperty(h, Symbol.species, { value: null, configurable: !0 })), - (h.alloc = function (t, e, r) { - return (function (t, e, r, i) { - return f(e), e <= 0 ? a(t, e) : void 0 !== r ? ('string' == typeof i ? a(t, e).fill(r, i) : a(t, e).fill(r)) : a(t, e); - })(null, t, e, r); - }), - (h.allocUnsafe = function (t) { - return c(null, t); - }), - (h.allocUnsafeSlow = function (t) { - return c(null, t); - }), - (h.isBuffer = function (t) { - return !(null == t || !t._isBuffer); - }), - (h.compare = function (t, e) { - if (!h.isBuffer(t) || !h.isBuffer(e)) throw new TypeError('Arguments must be Buffers'); - if (t === e) return 0; - for (var r = t.length, i = e.length, n = 0, o = Math.min(r, i); n < o; ++n) - if (t[n] !== e[n]) { - (r = t[n]), (i = e[n]); - break; - } - return r < i ? -1 : i < r ? 1 : 0; - }), - (h.isEncoding = function (t) { - switch (String(t).toLowerCase()) { - case 'hex': - case 'utf8': - case 'utf-8': - case 'ascii': - case 'latin1': - case 'binary': - case 'base64': - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return !0; - default: - return !1; - } - }), - (h.concat = function (t, e) { - if (!o(t)) throw new TypeError('"list" argument must be an Array of Buffers'); - if (0 === t.length) return h.alloc(0); - var r; - if (void 0 === e) for (e = 0, r = 0; r < t.length; ++r) e += t[r].length; - var i = h.allocUnsafe(e), - n = 0; - for (r = 0; r < t.length; ++r) { - var s = t[r]; - if (!h.isBuffer(s)) throw new TypeError('"list" argument must be an Array of Buffers'); - s.copy(i, n), (n += s.length); - } - return i; - }), - (h.byteLength = p), - (h.prototype._isBuffer = !0), - (h.prototype.swap16 = function () { - var t = this.length; - if (t % 2 != 0) throw new RangeError('Buffer size must be a multiple of 16-bits'); - for (var e = 0; e < t; e += 2) g(this, e, e + 1); - return this; - }), - (h.prototype.swap32 = function () { - var t = this.length; - if (t % 4 != 0) throw new RangeError('Buffer size must be a multiple of 32-bits'); - for (var e = 0; e < t; e += 4) g(this, e, e + 3), g(this, e + 1, e + 2); - return this; - }), - (h.prototype.swap64 = function () { - var t = this.length; - if (t % 8 != 0) throw new RangeError('Buffer size must be a multiple of 64-bits'); - for (var e = 0; e < t; e += 8) g(this, e, e + 7), g(this, e + 1, e + 6), g(this, e + 2, e + 5), g(this, e + 3, e + 4); - return this; - }), - (h.prototype.toString = function () { - var t = 0 | this.length; - return 0 === t ? '' : 0 === arguments.length ? A(this, 0, t) : m.apply(this, arguments); - }), - (h.prototype.equals = function (t) { - if (!h.isBuffer(t)) throw new TypeError('Argument must be a Buffer'); - return this === t || 0 === h.compare(this, t); - }), - (h.prototype.inspect = function () { - var t = '', - r = e.INSPECT_MAX_BYTES; - return ( - this.length > 0 && ((t = this.toString('hex', 0, r).match(/.{2}/g).join(' ')), this.length > r && (t += ' ... ')), - '' - ); - }), - (h.prototype.compare = function (t, e, r, i, n) { - if (!h.isBuffer(t)) throw new TypeError('Argument must be a Buffer'); - if ( - (void 0 === e && (e = 0), - void 0 === r && (r = t ? t.length : 0), - void 0 === i && (i = 0), - void 0 === n && (n = this.length), - e < 0 || r > t.length || i < 0 || n > this.length) - ) - throw new RangeError('out of range index'); - if (i >= n && e >= r) return 0; - if (i >= n) return -1; - if (e >= r) return 1; - if (this === t) return 0; - for ( - var o = (n >>>= 0) - (i >>>= 0), - s = (r >>>= 0) - (e >>>= 0), - a = Math.min(o, s), - u = this.slice(i, n), - f = t.slice(e, r), - c = 0; - c < a; - ++c - ) - if (u[c] !== f[c]) { - (o = u[c]), (s = f[c]); - break; - } - return o < s ? -1 : s < o ? 1 : 0; - }), - (h.prototype.includes = function (t, e, r) { - return -1 !== this.indexOf(t, e, r); - }), - (h.prototype.indexOf = function (t, e, r) { - return b(this, t, e, r, !0); - }), - (h.prototype.lastIndexOf = function (t, e, r) { - return b(this, t, e, r, !1); - }), - (h.prototype.write = function (t, e, r, i) { - if (void 0 === e) (i = 'utf8'), (r = this.length), (e = 0); - else if (void 0 === r && 'string' == typeof e) (i = e), (r = this.length), (e = 0); - else { - if (!isFinite(e)) throw new Error('Buffer.write(string, encoding, offset[, length]) is no longer supported'); - (e |= 0), isFinite(r) ? ((r |= 0), void 0 === i && (i = 'utf8')) : ((i = r), (r = void 0)); - } - var n = this.length - e; - if (((void 0 === r || r > n) && (r = n), (t.length > 0 && (r < 0 || e < 0)) || e > this.length)) - throw new RangeError('Attempt to write outside buffer bounds'); - i || (i = 'utf8'); - for (var o = !1; ; ) - switch (i) { - case 'hex': - return v(this, t, e, r); - case 'utf8': - case 'utf-8': - return w(this, t, e, r); - case 'ascii': - return _(this, t, e, r); - case 'latin1': - case 'binary': - return M(this, t, e, r); - case 'base64': - return E(this, t, e, r); - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return S(this, t, e, r); - default: - if (o) throw new TypeError('Unknown encoding: ' + i); - (i = ('' + i).toLowerCase()), (o = !0); - } - }), - (h.prototype.toJSON = function () { - return { type: 'Buffer', data: Array.prototype.slice.call(this._arr || this, 0) }; - }); - var k = 4096; - function R(t, e, r) { - var i = ''; - r = Math.min(t.length, r); - for (var n = e; n < r; ++n) i += String.fromCharCode(127 & t[n]); - return i; - } - function B(t, e, r) { - var i = ''; - r = Math.min(t.length, r); - for (var n = e; n < r; ++n) i += String.fromCharCode(t[n]); - return i; - } - function I(t, e, r) { - var i, - n = t.length; - (!e || e < 0) && (e = 0), (!r || r < 0 || r > n) && (r = n); - for (var o = '', s = e; s < r; ++s) o += (i = t[s]) < 16 ? '0' + i.toString(16) : i.toString(16); - return o; - } - function T(t, e, r) { - for (var i = t.slice(e, r), n = '', o = 0; o < i.length; o += 2) n += String.fromCharCode(i[o] + 256 * i[o + 1]); - return n; - } - function P(t, e, r) { - if (t % 1 != 0 || t < 0) throw new RangeError('offset is not uint'); - if (t + e > r) throw new RangeError('Trying to access beyond buffer length'); - } - function O(t, e, r, i, n, o) { - if (!h.isBuffer(t)) throw new TypeError('"buffer" argument must be a Buffer instance'); - if (e > n || e < o) throw new RangeError('"value" argument is out of bounds'); - if (r + i > t.length) throw new RangeError('Index out of range'); - } - function L(t, e, r, i) { - e < 0 && (e = 65535 + e + 1); - for (var n = 0, o = Math.min(t.length - r, 2); n < o; ++n) - t[r + n] = (e & (255 << (8 * (i ? n : 1 - n)))) >>> (8 * (i ? n : 1 - n)); - } - function C(t, e, r, i) { - e < 0 && (e = 4294967295 + e + 1); - for (var n = 0, o = Math.min(t.length - r, 4); n < o; ++n) t[r + n] = (e >>> (8 * (i ? n : 3 - n))) & 255; - } - function N(t, e, r, i, n, o) { - if (r + i > t.length) throw new RangeError('Index out of range'); - if (r < 0) throw new RangeError('Index out of range'); - } - function j(t, e, r, i, o) { - return o || N(t, 0, r, 4), n.write(t, e, r, i, 23, 4), r + 4; - } - function U(t, e, r, i, o) { - return o || N(t, 0, r, 8), n.write(t, e, r, i, 52, 8), r + 8; - } - (h.prototype.slice = function (t, e) { - var r, - i = this.length; - if ( - ((t = ~~t) < 0 ? (t += i) < 0 && (t = 0) : t > i && (t = i), - (e = void 0 === e ? i : ~~e) < 0 ? (e += i) < 0 && (e = 0) : e > i && (e = i), - e < t && (e = t), - h.TYPED_ARRAY_SUPPORT) - ) - (r = this.subarray(t, e)).__proto__ = h.prototype; - else { - var n = e - t; - r = new h(n, void 0); - for (var o = 0; o < n; ++o) r[o] = this[o + t]; - } - return r; - }), - (h.prototype.readUIntLE = function (t, e, r) { - (t |= 0), (e |= 0), r || P(t, e, this.length); - for (var i = this[t], n = 1, o = 0; ++o < e && (n *= 256); ) i += this[t + o] * n; - return i; - }), - (h.prototype.readUIntBE = function (t, e, r) { - (t |= 0), (e |= 0), r || P(t, e, this.length); - for (var i = this[t + --e], n = 1; e > 0 && (n *= 256); ) i += this[t + --e] * n; - return i; - }), - (h.prototype.readUInt8 = function (t, e) { - return e || P(t, 1, this.length), this[t]; - }), - (h.prototype.readUInt16LE = function (t, e) { - return e || P(t, 2, this.length), this[t] | (this[t + 1] << 8); - }), - (h.prototype.readUInt16BE = function (t, e) { - return e || P(t, 2, this.length), (this[t] << 8) | this[t + 1]; - }), - (h.prototype.readUInt32LE = function (t, e) { - return e || P(t, 4, this.length), (this[t] | (this[t + 1] << 8) | (this[t + 2] << 16)) + 16777216 * this[t + 3]; - }), - (h.prototype.readUInt32BE = function (t, e) { - return e || P(t, 4, this.length), 16777216 * this[t] + ((this[t + 1] << 16) | (this[t + 2] << 8) | this[t + 3]); - }), - (h.prototype.readIntLE = function (t, e, r) { - (t |= 0), (e |= 0), r || P(t, e, this.length); - for (var i = this[t], n = 1, o = 0; ++o < e && (n *= 256); ) i += this[t + o] * n; - return i >= (n *= 128) && (i -= Math.pow(2, 8 * e)), i; - }), - (h.prototype.readIntBE = function (t, e, r) { - (t |= 0), (e |= 0), r || P(t, e, this.length); - for (var i = e, n = 1, o = this[t + --i]; i > 0 && (n *= 256); ) o += this[t + --i] * n; - return o >= (n *= 128) && (o -= Math.pow(2, 8 * e)), o; - }), - (h.prototype.readInt8 = function (t, e) { - return e || P(t, 1, this.length), 128 & this[t] ? -1 * (255 - this[t] + 1) : this[t]; - }), - (h.prototype.readInt16LE = function (t, e) { - e || P(t, 2, this.length); - var r = this[t] | (this[t + 1] << 8); - return 32768 & r ? 4294901760 | r : r; - }), - (h.prototype.readInt16BE = function (t, e) { - e || P(t, 2, this.length); - var r = this[t + 1] | (this[t] << 8); - return 32768 & r ? 4294901760 | r : r; - }), - (h.prototype.readInt32LE = function (t, e) { - return e || P(t, 4, this.length), this[t] | (this[t + 1] << 8) | (this[t + 2] << 16) | (this[t + 3] << 24); - }), - (h.prototype.readInt32BE = function (t, e) { - return e || P(t, 4, this.length), (this[t] << 24) | (this[t + 1] << 16) | (this[t + 2] << 8) | this[t + 3]; - }), - (h.prototype.readFloatLE = function (t, e) { - return e || P(t, 4, this.length), n.read(this, t, !0, 23, 4); - }), - (h.prototype.readFloatBE = function (t, e) { - return e || P(t, 4, this.length), n.read(this, t, !1, 23, 4); - }), - (h.prototype.readDoubleLE = function (t, e) { - return e || P(t, 8, this.length), n.read(this, t, !0, 52, 8); - }), - (h.prototype.readDoubleBE = function (t, e) { - return e || P(t, 8, this.length), n.read(this, t, !1, 52, 8); - }), - (h.prototype.writeUIntLE = function (t, e, r, i) { - (t = +t), (e |= 0), (r |= 0), i || O(this, t, e, r, Math.pow(2, 8 * r) - 1, 0); - var n = 1, - o = 0; - for (this[e] = 255 & t; ++o < r && (n *= 256); ) this[e + o] = (t / n) & 255; - return e + r; - }), - (h.prototype.writeUIntBE = function (t, e, r, i) { - (t = +t), (e |= 0), (r |= 0), i || O(this, t, e, r, Math.pow(2, 8 * r) - 1, 0); - var n = r - 1, - o = 1; - for (this[e + n] = 255 & t; --n >= 0 && (o *= 256); ) this[e + n] = (t / o) & 255; - return e + r; - }), - (h.prototype.writeUInt8 = function (t, e, r) { - return ( - (t = +t), (e |= 0), r || O(this, t, e, 1, 255, 0), h.TYPED_ARRAY_SUPPORT || (t = Math.floor(t)), (this[e] = 255 & t), e + 1 - ); - }), - (h.prototype.writeUInt16LE = function (t, e, r) { - return ( - (t = +t), - (e |= 0), - r || O(this, t, e, 2, 65535, 0), - h.TYPED_ARRAY_SUPPORT ? ((this[e] = 255 & t), (this[e + 1] = t >>> 8)) : L(this, t, e, !0), - e + 2 - ); - }), - (h.prototype.writeUInt16BE = function (t, e, r) { - return ( - (t = +t), - (e |= 0), - r || O(this, t, e, 2, 65535, 0), - h.TYPED_ARRAY_SUPPORT ? ((this[e] = t >>> 8), (this[e + 1] = 255 & t)) : L(this, t, e, !1), - e + 2 - ); - }), - (h.prototype.writeUInt32LE = function (t, e, r) { - return ( - (t = +t), - (e |= 0), - r || O(this, t, e, 4, 4294967295, 0), - h.TYPED_ARRAY_SUPPORT - ? ((this[e + 3] = t >>> 24), (this[e + 2] = t >>> 16), (this[e + 1] = t >>> 8), (this[e] = 255 & t)) - : C(this, t, e, !0), - e + 4 - ); - }), - (h.prototype.writeUInt32BE = function (t, e, r) { - return ( - (t = +t), - (e |= 0), - r || O(this, t, e, 4, 4294967295, 0), - h.TYPED_ARRAY_SUPPORT - ? ((this[e] = t >>> 24), (this[e + 1] = t >>> 16), (this[e + 2] = t >>> 8), (this[e + 3] = 255 & t)) - : C(this, t, e, !1), - e + 4 - ); - }), - (h.prototype.writeIntLE = function (t, e, r, i) { - if (((t = +t), (e |= 0), !i)) { - var n = Math.pow(2, 8 * r - 1); - O(this, t, e, r, n - 1, -n); - } - var o = 0, - s = 1, - a = 0; - for (this[e] = 255 & t; ++o < r && (s *= 256); ) - t < 0 && 0 === a && 0 !== this[e + o - 1] && (a = 1), (this[e + o] = (((t / s) >> 0) - a) & 255); - return e + r; - }), - (h.prototype.writeIntBE = function (t, e, r, i) { - if (((t = +t), (e |= 0), !i)) { - var n = Math.pow(2, 8 * r - 1); - O(this, t, e, r, n - 1, -n); - } - var o = r - 1, - s = 1, - a = 0; - for (this[e + o] = 255 & t; --o >= 0 && (s *= 256); ) - t < 0 && 0 === a && 0 !== this[e + o + 1] && (a = 1), (this[e + o] = (((t / s) >> 0) - a) & 255); - return e + r; - }), - (h.prototype.writeInt8 = function (t, e, r) { - return ( - (t = +t), - (e |= 0), - r || O(this, t, e, 1, 127, -128), - h.TYPED_ARRAY_SUPPORT || (t = Math.floor(t)), - t < 0 && (t = 255 + t + 1), - (this[e] = 255 & t), - e + 1 - ); - }), - (h.prototype.writeInt16LE = function (t, e, r) { - return ( - (t = +t), - (e |= 0), - r || O(this, t, e, 2, 32767, -32768), - h.TYPED_ARRAY_SUPPORT ? ((this[e] = 255 & t), (this[e + 1] = t >>> 8)) : L(this, t, e, !0), - e + 2 - ); - }), - (h.prototype.writeInt16BE = function (t, e, r) { - return ( - (t = +t), - (e |= 0), - r || O(this, t, e, 2, 32767, -32768), - h.TYPED_ARRAY_SUPPORT ? ((this[e] = t >>> 8), (this[e + 1] = 255 & t)) : L(this, t, e, !1), - e + 2 - ); - }), - (h.prototype.writeInt32LE = function (t, e, r) { - return ( - (t = +t), - (e |= 0), - r || O(this, t, e, 4, 2147483647, -2147483648), - h.TYPED_ARRAY_SUPPORT - ? ((this[e] = 255 & t), (this[e + 1] = t >>> 8), (this[e + 2] = t >>> 16), (this[e + 3] = t >>> 24)) - : C(this, t, e, !0), - e + 4 - ); - }), - (h.prototype.writeInt32BE = function (t, e, r) { - return ( - (t = +t), - (e |= 0), - r || O(this, t, e, 4, 2147483647, -2147483648), - t < 0 && (t = 4294967295 + t + 1), - h.TYPED_ARRAY_SUPPORT - ? ((this[e] = t >>> 24), (this[e + 1] = t >>> 16), (this[e + 2] = t >>> 8), (this[e + 3] = 255 & t)) - : C(this, t, e, !1), - e + 4 - ); - }), - (h.prototype.writeFloatLE = function (t, e, r) { - return j(this, t, e, !0, r); - }), - (h.prototype.writeFloatBE = function (t, e, r) { - return j(this, t, e, !1, r); - }), - (h.prototype.writeDoubleLE = function (t, e, r) { - return U(this, t, e, !0, r); - }), - (h.prototype.writeDoubleBE = function (t, e, r) { - return U(this, t, e, !1, r); - }), - (h.prototype.copy = function (t, e, r, i) { - if ( - (r || (r = 0), - i || 0 === i || (i = this.length), - e >= t.length && (e = t.length), - e || (e = 0), - i > 0 && i < r && (i = r), - i === r) - ) - return 0; - if (0 === t.length || 0 === this.length) return 0; - if (e < 0) throw new RangeError('targetStart out of bounds'); - if (r < 0 || r >= this.length) throw new RangeError('sourceStart out of bounds'); - if (i < 0) throw new RangeError('sourceEnd out of bounds'); - i > this.length && (i = this.length), t.length - e < i - r && (i = t.length - e + r); - var n, - o = i - r; - if (this === t && r < e && e < i) for (n = o - 1; n >= 0; --n) t[n + e] = this[n + r]; - else if (o < 1e3 || !h.TYPED_ARRAY_SUPPORT) for (n = 0; n < o; ++n) t[n + e] = this[n + r]; - else Uint8Array.prototype.set.call(t, this.subarray(r, r + o), e); - return o; - }), - (h.prototype.fill = function (t, e, r, i) { - if ('string' == typeof t) { - if ( - ('string' == typeof e ? ((i = e), (e = 0), (r = this.length)) : 'string' == typeof r && ((i = r), (r = this.length)), - 1 === t.length) - ) { - var n = t.charCodeAt(0); - n < 256 && (t = n); - } - if (void 0 !== i && 'string' != typeof i) throw new TypeError('encoding must be a string'); - if ('string' == typeof i && !h.isEncoding(i)) throw new TypeError('Unknown encoding: ' + i); - } else 'number' == typeof t && (t &= 255); - if (e < 0 || this.length < e || this.length < r) throw new RangeError('Out of range index'); - if (r <= e) return this; - var o; - if (((e >>>= 0), (r = void 0 === r ? this.length : r >>> 0), t || (t = 0), 'number' == typeof t)) - for (o = e; o < r; ++o) this[o] = t; - else { - var s = h.isBuffer(t) ? t : z(new h(t, i).toString()), - a = s.length; - for (o = 0; o < r - e; ++o) this[o + e] = s[o % a]; - } - return this; - }); - var D = /[^+\/0-9A-Za-z-_]/g; - function z(t, e) { - var r; - e = e || 1 / 0; - for (var i = t.length, n = null, o = [], s = 0; s < i; ++s) { - if ((r = t.charCodeAt(s)) > 55295 && r < 57344) { - if (!n) { - if (r > 56319) { - (e -= 3) > -1 && o.push(239, 191, 189); - continue; - } - if (s + 1 === i) { - (e -= 3) > -1 && o.push(239, 191, 189); - continue; - } - n = r; - continue; - } - if (r < 56320) { - (e -= 3) > -1 && o.push(239, 191, 189), (n = r); - continue; - } - r = 65536 + (((n - 55296) << 10) | (r - 56320)); - } else n && (e -= 3) > -1 && o.push(239, 191, 189); - if (((n = null), r < 128)) { - if ((e -= 1) < 0) break; - o.push(r); - } else if (r < 2048) { - if ((e -= 2) < 0) break; - o.push((r >> 6) | 192, (63 & r) | 128); - } else if (r < 65536) { - if ((e -= 3) < 0) break; - o.push((r >> 12) | 224, ((r >> 6) & 63) | 128, (63 & r) | 128); - } else { - if (!(r < 1114112)) throw new Error('Invalid code point'); - if ((e -= 4) < 0) break; - o.push((r >> 18) | 240, ((r >> 12) & 63) | 128, ((r >> 6) & 63) | 128, (63 & r) | 128); - } - } - return o; - } - function F(t) { - return i.toByteArray( - (function (t) { - if ( - (t = (function (t) { - return t.trim ? t.trim() : t.replace(/^\s+|\s+$/g, ''); - })(t).replace(D, '')).length < 2 - ) - return ''; - for (; t.length % 4 != 0; ) t += '='; - return t; - })(t) - ); - } - function q(t, e, r, i) { - for (var n = 0; n < i && !(n + r >= e.length || n >= t.length); ++n) e[n + r] = t[n]; - return n; - } - }, - 6497: (t, e, r) => { - function i(t) { - return Object.prototype.toString.call(t); - } - (e.isArray = function (t) { - return Array.isArray ? Array.isArray(t) : '[object Array]' === i(t); - }), - (e.isBoolean = function (t) { - return 'boolean' == typeof t; - }), - (e.isNull = function (t) { - return null === t; - }), - (e.isNullOrUndefined = function (t) { - return null == t; - }), - (e.isNumber = function (t) { - return 'number' == typeof t; - }), - (e.isString = function (t) { - return 'string' == typeof t; - }), - (e.isSymbol = function (t) { - return 'symbol' == typeof t; - }), - (e.isUndefined = function (t) { - return void 0 === t; - }), - (e.isRegExp = function (t) { - return '[object RegExp]' === i(t); - }), - (e.isObject = function (t) { - return 'object' == typeof t && null !== t; - }), - (e.isDate = function (t) { - return '[object Date]' === i(t); - }), - (e.isError = function (t) { - return '[object Error]' === i(t) || t instanceof Error; - }), - (e.isFunction = function (t) { - return 'function' == typeof t; - }), - (e.isPrimitive = function (t) { - return ( - null === t || 'boolean' == typeof t || 'number' == typeof t || 'string' == typeof t || 'symbol' == typeof t || void 0 === t - ); - }), - (e.isBuffer = r(8764).Buffer.isBuffer); - }, - 9435: t => { - var e = 1e3, - r = 60 * e, - i = 60 * r, - n = 24 * i; - function o(t, e, r, i) { - var n = e >= 1.5 * r; - return Math.round(t / r) + ' ' + i + (n ? 's' : ''); - } - t.exports = function (t, s) { - s = s || {}; - var a, - h, - u = typeof t; - if ('string' === u && t.length > 0) - return (function (t) { - if (!((t = String(t)).length > 100)) { - var o = - /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec( - t - ); - if (o) { - var s = parseFloat(o[1]); - switch ((o[2] || 'ms').toLowerCase()) { - case 'years': - case 'year': - case 'yrs': - case 'yr': - case 'y': - return 315576e5 * s; - case 'weeks': - case 'week': - case 'w': - return 6048e5 * s; - case 'days': - case 'day': - case 'd': - return s * n; - case 'hours': - case 'hour': - case 'hrs': - case 'hr': - case 'h': - return s * i; - case 'minutes': - case 'minute': - case 'mins': - case 'min': - case 'm': - return s * r; - case 'seconds': - case 'second': - case 'secs': - case 'sec': - case 's': - return s * e; - case 'milliseconds': - case 'millisecond': - case 'msecs': - case 'msec': - case 'ms': - return s; - default: - return; - } - } - } - })(t); - if ('number' === u && isFinite(t)) - return s.long - ? ((a = t), - (h = Math.abs(a)) >= n - ? o(a, h, n, 'day') - : h >= i - ? o(a, h, i, 'hour') - : h >= r - ? o(a, h, r, 'minute') - : h >= e - ? o(a, h, e, 'second') - : a + ' ms') - : (function (t) { - var o = Math.abs(t); - return o >= n - ? Math.round(t / n) + 'd' - : o >= i - ? Math.round(t / i) + 'h' - : o >= r - ? Math.round(t / r) + 'm' - : o >= e - ? Math.round(t / e) + 's' - : t + 'ms'; - })(t); - throw new Error('val is not a non-empty string or a valid number. val=' + JSON.stringify(t)); - }; - }, - 1227: (t, e, r) => { - (e.formatArgs = function (e) { - if ( - ((e[0] = - (this.useColors ? '%c' : '') + - this.namespace + - (this.useColors ? ' %c' : ' ') + - e[0] + - (this.useColors ? '%c ' : ' ') + - '+' + - t.exports.humanize(this.diff)), - !this.useColors) - ) - return; - const r = 'color: ' + this.color; - e.splice(1, 0, r, 'color: inherit'); - let i = 0, - n = 0; - e[0].replace(/%[a-zA-Z%]/g, t => { - '%%' !== t && (i++, '%c' === t && (n = i)); - }), - e.splice(n, 0, r); - }), - (e.save = function (t) { - try { - t ? e.storage.setItem('debug', t) : e.storage.removeItem('debug'); - } catch (t) {} - }), - (e.load = function () { - let t; - try { - t = e.storage.getItem('debug'); - } catch (t) {} - return !t && 'undefined' != typeof process && 'env' in process && (t = process.env.DEBUG), t; - }), - (e.useColors = function () { - return ( - !('undefined' == typeof window || !window.process || ('renderer' !== window.process.type && !window.process.__nwjs)) || - (('undefined' == typeof navigator || - !navigator.userAgent || - !navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) && - (('undefined' != typeof document && - document.documentElement && - document.documentElement.style && - document.documentElement.style.WebkitAppearance) || - ('undefined' != typeof window && - window.console && - (window.console.firebug || (window.console.exception && window.console.table))) || - ('undefined' != typeof navigator && - navigator.userAgent && - navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && - parseInt(RegExp.$1, 10) >= 31) || - ('undefined' != typeof navigator && - navigator.userAgent && - navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)))) - ); - }), - (e.storage = (function () { - try { - return localStorage; - } catch (t) {} - })()), - (e.destroy = (() => { - let t = !1; - return () => { - t || - ((t = !0), - console.warn( - 'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.' - )); - }; - })()), - (e.colors = [ - '#0000CC', - '#0000FF', - '#0033CC', - '#0033FF', - '#0066CC', - '#0066FF', - '#0099CC', - '#0099FF', - '#00CC00', - '#00CC33', - '#00CC66', - '#00CC99', - '#00CCCC', - '#00CCFF', - '#3300CC', - '#3300FF', - '#3333CC', - '#3333FF', - '#3366CC', - '#3366FF', - '#3399CC', - '#3399FF', - '#33CC00', - '#33CC33', - '#33CC66', - '#33CC99', - '#33CCCC', - '#33CCFF', - '#6600CC', - '#6600FF', - '#6633CC', - '#6633FF', - '#66CC00', - '#66CC33', - '#9900CC', - '#9900FF', - '#9933CC', - '#9933FF', - '#99CC00', - '#99CC33', - '#CC0000', - '#CC0033', - '#CC0066', - '#CC0099', - '#CC00CC', - '#CC00FF', - '#CC3300', - '#CC3333', - '#CC3366', - '#CC3399', - '#CC33CC', - '#CC33FF', - '#CC6600', - '#CC6633', - '#CC9900', - '#CC9933', - '#CCCC00', - '#CCCC33', - '#FF0000', - '#FF0033', - '#FF0066', - '#FF0099', - '#FF00CC', - '#FF00FF', - '#FF3300', - '#FF3333', - '#FF3366', - '#FF3399', - '#FF33CC', - '#FF33FF', - '#FF6600', - '#FF6633', - '#FF9900', - '#FF9933', - '#FFCC00', - '#FFCC33', - ]), - (e.log = console.debug || console.log || (() => {})), - (t.exports = r(2447)(e)); - const { formatters: i } = t.exports; - i.j = function (t) { - try { - return JSON.stringify(t); - } catch (t) { - return '[UnexpectedJSONParseError]: ' + t.message; - } - }; - }, - 2447: (t, e, r) => { - t.exports = function (t) { - function e(t) { - let r, - n, - o, - s = null; - function a(...t) { - if (!a.enabled) return; - const i = a, - n = Number(new Date()), - o = n - (r || n); - (i.diff = o), (i.prev = r), (i.curr = n), (r = n), (t[0] = e.coerce(t[0])), 'string' != typeof t[0] && t.unshift('%O'); - let s = 0; - (t[0] = t[0].replace(/%([a-zA-Z%])/g, (r, n) => { - if ('%%' === r) return '%'; - s++; - const o = e.formatters[n]; - if ('function' == typeof o) { - const e = t[s]; - (r = o.call(i, e)), t.splice(s, 1), s--; - } - return r; - })), - e.formatArgs.call(i, t), - (i.log || e.log).apply(i, t); - } - return ( - (a.namespace = t), - (a.useColors = e.useColors()), - (a.color = e.selectColor(t)), - (a.extend = i), - (a.destroy = e.destroy), - Object.defineProperty(a, 'enabled', { - enumerable: !0, - configurable: !1, - get: () => (null !== s ? s : (n !== e.namespaces && ((n = e.namespaces), (o = e.enabled(t))), o)), - set: t => { - s = t; - }, - }), - 'function' == typeof e.init && e.init(a), - a - ); - } - function i(t, r) { - const i = e(this.namespace + (void 0 === r ? ':' : r) + t); - return (i.log = this.log), i; - } - function n(t) { - return t - .toString() - .substring(2, t.toString().length - 2) - .replace(/\.\*\?$/, '*'); - } - return ( - (e.debug = e), - (e.default = e), - (e.coerce = function (t) { - return t instanceof Error ? t.stack || t.message : t; - }), - (e.disable = function () { - const t = [...e.names.map(n), ...e.skips.map(n).map(t => '-' + t)].join(','); - return e.enable(''), t; - }), - (e.enable = function (t) { - let r; - e.save(t), (e.namespaces = t), (e.names = []), (e.skips = []); - const i = ('string' == typeof t ? t : '').split(/[\s,]+/), - n = i.length; - for (r = 0; r < n; r++) - i[r] && - ('-' === (t = i[r].replace(/\*/g, '.*?'))[0] - ? e.skips.push(new RegExp('^' + t.slice(1) + '$')) - : e.names.push(new RegExp('^' + t + '$'))); - }), - (e.enabled = function (t) { - if ('*' === t[t.length - 1]) return !0; - let r, i; - for (r = 0, i = e.skips.length; r < i; r++) if (e.skips[r].test(t)) return !1; - for (r = 0, i = e.names.length; r < i; r++) if (e.names[r].test(t)) return !0; - return !1; - }), - (e.humanize = r(9435)), - (e.destroy = function () { - console.warn( - 'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.' - ); - }), - Object.keys(t).forEach(r => { - e[r] = t[r]; - }), - (e.names = []), - (e.skips = []), - (e.formatters = {}), - (e.selectColor = function (t) { - let r = 0; - for (let e = 0; e < t.length; e++) (r = (r << 5) - r + t.charCodeAt(e)), (r |= 0); - return e.colors[Math.abs(r) % e.colors.length]; - }), - e.enable(e.load()), - e - ); - }; - }, - 6729: t => { - 'use strict'; - var e = Object.prototype.hasOwnProperty, - r = '~'; - function i() {} - function n(t, e, r) { - (this.fn = t), (this.context = e), (this.once = r || !1); - } - function o(t, e, i, o, s) { - if ('function' != typeof i) throw new TypeError('The listener must be a function'); - var a = new n(i, o || t, s), - h = r ? r + e : e; - return ( - t._events[h] - ? t._events[h].fn - ? (t._events[h] = [t._events[h], a]) - : t._events[h].push(a) - : ((t._events[h] = a), t._eventsCount++), - t - ); - } - function s(t, e) { - 0 == --t._eventsCount ? (t._events = new i()) : delete t._events[e]; - } - function a() { - (this._events = new i()), (this._eventsCount = 0); - } - Object.create && ((i.prototype = Object.create(null)), new i().__proto__ || (r = !1)), - (a.prototype.eventNames = function () { - var t, - i, - n = []; - if (0 === this._eventsCount) return n; - for (i in (t = this._events)) e.call(t, i) && n.push(r ? i.slice(1) : i); - return Object.getOwnPropertySymbols ? n.concat(Object.getOwnPropertySymbols(t)) : n; - }), - (a.prototype.listeners = function (t) { - var e = r ? r + t : t, - i = this._events[e]; - if (!i) return []; - if (i.fn) return [i.fn]; - for (var n = 0, o = i.length, s = new Array(o); n < o; n++) s[n] = i[n].fn; - return s; - }), - (a.prototype.listenerCount = function (t) { - var e = r ? r + t : t, - i = this._events[e]; - return i ? (i.fn ? 1 : i.length) : 0; - }), - (a.prototype.emit = function (t, e, i, n, o, s) { - var a = r ? r + t : t; - if (!this._events[a]) return !1; - var h, - u, - f = this._events[a], - c = arguments.length; - if (f.fn) { - switch ((f.once && this.removeListener(t, f.fn, void 0, !0), c)) { - case 1: - return f.fn.call(f.context), !0; - case 2: - return f.fn.call(f.context, e), !0; - case 3: - return f.fn.call(f.context, e, i), !0; - case 4: - return f.fn.call(f.context, e, i, n), !0; - case 5: - return f.fn.call(f.context, e, i, n, o), !0; - case 6: - return f.fn.call(f.context, e, i, n, o, s), !0; - } - for (u = 1, h = new Array(c - 1); u < c; u++) h[u - 1] = arguments[u]; - f.fn.apply(f.context, h); - } else { - var l, - d = f.length; - for (u = 0; u < d; u++) - switch ((f[u].once && this.removeListener(t, f[u].fn, void 0, !0), c)) { - case 1: - f[u].fn.call(f[u].context); - break; - case 2: - f[u].fn.call(f[u].context, e); - break; - case 3: - f[u].fn.call(f[u].context, e, i); - break; - case 4: - f[u].fn.call(f[u].context, e, i, n); - break; - default: - if (!h) for (l = 1, h = new Array(c - 1); l < c; l++) h[l - 1] = arguments[l]; - f[u].fn.apply(f[u].context, h); - } - } - return !0; - }), - (a.prototype.on = function (t, e, r) { - return o(this, t, e, r, !1); - }), - (a.prototype.once = function (t, e, r) { - return o(this, t, e, r, !0); - }), - (a.prototype.removeListener = function (t, e, i, n) { - var o = r ? r + t : t; - if (!this._events[o]) return this; - if (!e) return s(this, o), this; - var a = this._events[o]; - if (a.fn) a.fn !== e || (n && !a.once) || (i && a.context !== i) || s(this, o); - else { - for (var h = 0, u = [], f = a.length; h < f; h++) - (a[h].fn !== e || (n && !a[h].once) || (i && a[h].context !== i)) && u.push(a[h]); - u.length ? (this._events[o] = 1 === u.length ? u[0] : u) : s(this, o); - } - return this; - }), - (a.prototype.removeAllListeners = function (t) { - var e; - return t ? ((e = r ? r + t : t), this._events[e] && s(this, e)) : ((this._events = new i()), (this._eventsCount = 0)), this; - }), - (a.prototype.off = a.prototype.removeListener), - (a.prototype.addListener = a.prototype.on), - (a.prefixed = r), - (a.EventEmitter = a), - (t.exports = a); - }, - 7187: t => { - 'use strict'; - var e, - r = 'object' == typeof Reflect ? Reflect : null, - i = - r && 'function' == typeof r.apply - ? r.apply - : function (t, e, r) { - return Function.prototype.apply.call(t, e, r); - }; - e = - r && 'function' == typeof r.ownKeys - ? r.ownKeys - : Object.getOwnPropertySymbols - ? function (t) { - return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t)); - } - : function (t) { - return Object.getOwnPropertyNames(t); - }; - var n = - Number.isNaN || - function (t) { - return t != t; - }; - function o() { - o.init.call(this); - } - (t.exports = o), - (t.exports.once = function (t, e) { - return new Promise(function (r, i) { - function n(r) { - t.removeListener(e, o), i(r); - } - function o() { - 'function' == typeof t.removeListener && t.removeListener('error', n), r([].slice.call(arguments)); - } - m(t, e, o, { once: !0 }), - 'error' !== e && - (function (t, e, r) { - 'function' == typeof t.on && m(t, 'error', e, { once: !0 }); - })(t, n); - }); - }), - (o.EventEmitter = o), - (o.prototype._events = void 0), - (o.prototype._eventsCount = 0), - (o.prototype._maxListeners = void 0); - var s = 10; - function a(t) { - if ('function' != typeof t) throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof t); - } - function h(t) { - return void 0 === t._maxListeners ? o.defaultMaxListeners : t._maxListeners; - } - function u(t, e, r, i) { - var n, o, s, u; - if ( - (a(r), - void 0 === (o = t._events) - ? ((o = t._events = Object.create(null)), (t._eventsCount = 0)) - : (void 0 !== o.newListener && (t.emit('newListener', e, r.listener ? r.listener : r), (o = t._events)), (s = o[e])), - void 0 === s) - ) - (s = o[e] = r), ++t._eventsCount; - else if ( - ('function' == typeof s ? (s = o[e] = i ? [r, s] : [s, r]) : i ? s.unshift(r) : s.push(r), - (n = h(t)) > 0 && s.length > n && !s.warned) - ) { - s.warned = !0; - var f = new Error( - 'Possible EventEmitter memory leak detected. ' + - s.length + - ' ' + - String(e) + - ' listeners added. Use emitter.setMaxListeners() to increase limit' - ); - (f.name = 'MaxListenersExceededWarning'), - (f.emitter = t), - (f.type = e), - (f.count = s.length), - (u = f), - console && console.warn && console.warn(u); - } - return t; - } - function f() { - if (!this.fired) - return ( - this.target.removeListener(this.type, this.wrapFn), - (this.fired = !0), - 0 === arguments.length ? this.listener.call(this.target) : this.listener.apply(this.target, arguments) - ); - } - function c(t, e, r) { - var i = { fired: !1, wrapFn: void 0, target: t, type: e, listener: r }, - n = f.bind(i); - return (n.listener = r), (i.wrapFn = n), n; - } - function l(t, e, r) { - var i = t._events; - if (void 0 === i) return []; - var n = i[e]; - return void 0 === n - ? [] - : 'function' == typeof n - ? r - ? [n.listener || n] - : [n] - : r - ? (function (t) { - for (var e = new Array(t.length), r = 0; r < e.length; ++r) e[r] = t[r].listener || t[r]; - return e; - })(n) - : p(n, n.length); - } - function d(t) { - var e = this._events; - if (void 0 !== e) { - var r = e[t]; - if ('function' == typeof r) return 1; - if (void 0 !== r) return r.length; - } - return 0; - } - function p(t, e) { - for (var r = new Array(e), i = 0; i < e; ++i) r[i] = t[i]; - return r; - } - function m(t, e, r, i) { - if ('function' == typeof t.on) i.once ? t.once(e, r) : t.on(e, r); - else { - if ('function' != typeof t.addEventListener) - throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof t); - t.addEventListener(e, function n(o) { - i.once && t.removeEventListener(e, n), r(o); - }); - } - } - Object.defineProperty(o, 'defaultMaxListeners', { - enumerable: !0, - get: function () { - return s; - }, - set: function (t) { - if ('number' != typeof t || t < 0 || n(t)) - throw new RangeError( - 'The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + t + '.' - ); - s = t; - }, - }), - (o.init = function () { - (void 0 !== this._events && this._events !== Object.getPrototypeOf(this)._events) || - ((this._events = Object.create(null)), (this._eventsCount = 0)), - (this._maxListeners = this._maxListeners || void 0); - }), - (o.prototype.setMaxListeners = function (t) { - if ('number' != typeof t || t < 0 || n(t)) - throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + t + '.'); - return (this._maxListeners = t), this; - }), - (o.prototype.getMaxListeners = function () { - return h(this); - }), - (o.prototype.emit = function (t) { - for (var e = [], r = 1; r < arguments.length; r++) e.push(arguments[r]); - var n = 'error' === t, - o = this._events; - if (void 0 !== o) n = n && void 0 === o.error; - else if (!n) return !1; - if (n) { - var s; - if ((e.length > 0 && (s = e[0]), s instanceof Error)) throw s; - var a = new Error('Unhandled error.' + (s ? ' (' + s.message + ')' : '')); - throw ((a.context = s), a); - } - var h = o[t]; - if (void 0 === h) return !1; - if ('function' == typeof h) i(h, this, e); - else { - var u = h.length, - f = p(h, u); - for (r = 0; r < u; ++r) i(f[r], this, e); - } - return !0; - }), - (o.prototype.addListener = function (t, e) { - return u(this, t, e, !1); - }), - (o.prototype.on = o.prototype.addListener), - (o.prototype.prependListener = function (t, e) { - return u(this, t, e, !0); - }), - (o.prototype.once = function (t, e) { - return a(e), this.on(t, c(this, t, e)), this; - }), - (o.prototype.prependOnceListener = function (t, e) { - return a(e), this.prependListener(t, c(this, t, e)), this; - }), - (o.prototype.removeListener = function (t, e) { - var r, i, n, o, s; - if ((a(e), void 0 === (i = this._events))) return this; - if (void 0 === (r = i[t])) return this; - if (r === e || r.listener === e) - 0 == --this._eventsCount - ? (this._events = Object.create(null)) - : (delete i[t], i.removeListener && this.emit('removeListener', t, r.listener || e)); - else if ('function' != typeof r) { - for (n = -1, o = r.length - 1; o >= 0; o--) - if (r[o] === e || r[o].listener === e) { - (s = r[o].listener), (n = o); - break; - } - if (n < 0) return this; - 0 === n - ? r.shift() - : (function (t, e) { - for (; e + 1 < t.length; e++) t[e] = t[e + 1]; - t.pop(); - })(r, n), - 1 === r.length && (i[t] = r[0]), - void 0 !== i.removeListener && this.emit('removeListener', t, s || e); - } - return this; - }), - (o.prototype.off = o.prototype.removeListener), - (o.prototype.removeAllListeners = function (t) { - var e, r, i; - if (void 0 === (r = this._events)) return this; - if (void 0 === r.removeListener) - return ( - 0 === arguments.length - ? ((this._events = Object.create(null)), (this._eventsCount = 0)) - : void 0 !== r[t] && (0 == --this._eventsCount ? (this._events = Object.create(null)) : delete r[t]), - this - ); - if (0 === arguments.length) { - var n, - o = Object.keys(r); - for (i = 0; i < o.length; ++i) 'removeListener' !== (n = o[i]) && this.removeAllListeners(n); - return this.removeAllListeners('removeListener'), (this._events = Object.create(null)), (this._eventsCount = 0), this; - } - if ('function' == typeof (e = r[t])) this.removeListener(t, e); - else if (void 0 !== e) for (i = e.length - 1; i >= 0; i--) this.removeListener(t, e[i]); - return this; - }), - (o.prototype.listeners = function (t) { - return l(this, t, !0); - }), - (o.prototype.rawListeners = function (t) { - return l(this, t, !1); - }), - (o.listenerCount = function (t, e) { - return 'function' == typeof t.listenerCount ? t.listenerCount(e) : d.call(t, e); - }), - (o.prototype.listenerCount = d), - (o.prototype.eventNames = function () { - return this._eventsCount > 0 ? e(this._events) : []; - }); - }, - 9267: (t, e, r) => { - var i = r(9899), - n = t.exports; - for (var o in i) i.hasOwnProperty(o) && (n[o] = i[o]); - n.request = function (t, e) { - return t || (t = {}), (t.scheme = 'https'), (t.protocol = 'https:'), i.request.call(this, t, e); - }; - }, - 645: (t, e) => { - (e.read = function (t, e, r, i, n) { - var o, - s, - a = 8 * n - i - 1, - h = (1 << a) - 1, - u = h >> 1, - f = -7, - c = r ? n - 1 : 0, - l = r ? -1 : 1, - d = t[e + c]; - for (c += l, o = d & ((1 << -f) - 1), d >>= -f, f += a; f > 0; o = 256 * o + t[e + c], c += l, f -= 8); - for (s = o & ((1 << -f) - 1), o >>= -f, f += i; f > 0; s = 256 * s + t[e + c], c += l, f -= 8); - if (0 === o) o = 1 - u; - else { - if (o === h) return s ? NaN : (1 / 0) * (d ? -1 : 1); - (s += Math.pow(2, i)), (o -= u); - } - return (d ? -1 : 1) * s * Math.pow(2, o - i); - }), - (e.write = function (t, e, r, i, n, o) { - var s, - a, - h, - u = 8 * o - n - 1, - f = (1 << u) - 1, - c = f >> 1, - l = 23 === n ? Math.pow(2, -24) - Math.pow(2, -77) : 0, - d = i ? 0 : o - 1, - p = i ? 1 : -1, - m = e < 0 || (0 === e && 1 / e < 0) ? 1 : 0; - for ( - e = Math.abs(e), - isNaN(e) || e === 1 / 0 - ? ((a = isNaN(e) ? 1 : 0), (s = f)) - : ((s = Math.floor(Math.log(e) / Math.LN2)), - e * (h = Math.pow(2, -s)) < 1 && (s--, (h *= 2)), - (e += s + c >= 1 ? l / h : l * Math.pow(2, 1 - c)) * h >= 2 && (s++, (h /= 2)), - s + c >= f - ? ((a = 0), (s = f)) - : s + c >= 1 - ? ((a = (e * h - 1) * Math.pow(2, n)), (s += c)) - : ((a = e * Math.pow(2, c - 1) * Math.pow(2, n)), (s = 0))); - n >= 8; - t[r + d] = 255 & a, d += p, a /= 256, n -= 8 - ); - for (s = (s << n) | a, u += n; u > 0; t[r + d] = 255 & s, d += p, s /= 256, u -= 8); - t[r + d - p] |= 128 * m; - }); - }, - 5717: t => { - 'function' == typeof Object.create - ? (t.exports = function (t, e) { - e && - ((t.super_ = e), - (t.prototype = Object.create(e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } }))); - }) - : (t.exports = function (t, e) { - if (e) { - t.super_ = e; - var r = function () {}; - (r.prototype = e.prototype), (t.prototype = new r()), (t.prototype.constructor = t); - } - }); - }, - 5826: t => { - var e = {}.toString; - t.exports = - Array.isArray || - function (t) { - return '[object Array]' == e.call(t); - }; - }, - 4898: (t, e, r) => { - 'use strict'; - Object.defineProperty(e, '__esModule', { value: !0 }), (e.InvalidStatusCodeError = e.InvalidCertError = void 0); - const i = Object.freeze({ - redirect: !0, - expectStatusCode: 200, - headers: {}, - full: !1, - keepAlive: !0, - cors: !1, - referrer: !1, - sslAllowSelfSigned: !1, - _redirectCount: 0, - }); - class n extends Error { - constructor(t, e) { - super(t), (this.fingerprint256 = e); - } - } - e.InvalidCertError = n; - class o extends Error { - constructor(t) { - super(`Request Failed. Status Code: ${t}`), (this.statusCode = t); - } - } - function s(t, e) { - if (!e || 'text' === e || 'json' === e) - try { - let r = new TextDecoder('utf8', { fatal: !0 }).decode(t); - if ('text' === e) return r; - try { - return JSON.parse(r); - } catch (t) { - if ('json' === e) throw t; - return r; - } - } catch (t) { - if ('text' === e || 'json' === e) throw t; - } - return t; - } - e.InvalidStatusCodeError = o; - let a = {}; - function h(t, e) { - let u = { ...i, ...e }; - const f = r(9899), - c = r(9267), - l = r(9173), - { promisify: d } = r(9539), - { resolve: p } = r(8575), - m = !!/^https/.test(t); - let g = { method: u.method || 'GET', headers: { 'Accept-Encoding': 'gzip, deflate, br' } }; - const b = t => t.replace(/:| /g, '').toLowerCase(); - if (u.keepAlive) { - const t = { keepAlive: !0, keepAliveMsecs: 3e4, maxFreeSockets: 1024, maxCachedSessions: 1024 }, - e = [m, m && u.sslPinnedCertificates?.map(t => b(t)).sort()].join(); - g.agent = a[e] || (a[e] = new (m ? c : f).Agent(t)); - } - return ( - 'json' === u.type && (g.headers['Content-Type'] = 'application/json'), - u.data && (u.method || (g.method = 'POST'), (g.body = 'json' === u.type ? JSON.stringify(u.data) : u.data)), - (g.headers = { ...g.headers, ...u.headers }), - u.sslAllowSelfSigned && (g.rejectUnauthorized = !1), - new Promise((e, r) => { - const i = async e => { - if (e && 'DEPTH_ZERO_SELF_SIGNED_CERT' === e.code) - try { - await h(t, { ...u, sslAllowSelfSigned: !0, sslPinnedCertificates: [] }); - } catch (t) { - t && t.fingerprint256 && (e = new n(`Self-signed SSL certificate: ${t.fingerprint256}`, t.fingerprint256)); - } - r(e); - }, - a = (m ? c : f).request(t, g, n => { - n.on('error', i), - (async () => { - try { - e( - await (async e => { - const r = e.statusCode; - if (u.redirect && 300 <= r && r < 400 && e.headers.location) { - if (10 == u._redirectCount) throw new Error('Request failed. Too much redirects.'); - return (u._redirectCount += 1), await h(p(t, e.headers.location), u); - } - if (u.expectStatusCode && r !== u.expectStatusCode) throw (e.resume(), new o(r)); - let i = []; - for await (const t of e) i.push(t); - let n = Buffer.concat(i); - const a = e.headers['content-encoding']; - 'br' === a && (n = await d(l.brotliDecompress)(n)), - ('gzip' !== a && 'deflate' !== a) || (n = await d(l.unzip)(n)); - const f = s(n, u.type); - return u.full ? { headers: e.headers, status: r, body: f } : f; - })(n) - ); - } catch (t) { - r(t); - } - })(); - }); - a.on('error', i); - const y = u.sslPinnedCertificates?.map(t => b(t)), - v = t => { - const e = b(t.getPeerCertificate()?.fingerprint256 || ''); - if ((e || !t.isSessionReused()) && !y.includes(e)) - return a.emit('error', new n(`Invalid SSL certificate: ${e} Expected: ${y}`, e)), a.abort(); - }; - u.sslPinnedCertificates && - a.on('socket', t => { - t - .listeners('secureConnect') - .map(t => (t.name || '').replace('bound ', '')) - .includes('mfetchSecureConnect') || t.on('secureConnect', v.bind(null, t)); - }), - u.keepAlive && a.setNoDelay(!0), - g.body && a.write(g.body), - a.end(); - }) - ); - } - const u = new Set(['Accept', 'Accept-Language', 'Content-Language', 'Content-Type'].map(t => t.toLowerCase())), - f = new Set( - [ - 'Accept-Charset', - 'Accept-Encoding', - 'Access-Control-Request-Headers', - 'Access-Control-Request-Method', - 'Connection', - 'Content-Length', - 'Cookie', - 'Cookie2', - 'Date', - 'DNT', - 'Expect', - 'Host', - 'Keep-Alive', - 'Origin', - 'Referer', - 'TE', - 'Trailer', - 'Transfer-Encoding', - 'Upgrade', - 'Via', - ].map(t => t.toLowerCase()) - ); - async function c(t, e) { - let r = { ...i, ...e }; - const n = new Headers(); - 'json' === r.type && n.set('Content-Type', 'application/json'); - let a = new URL(t); - if (a.username) { - const t = btoa(`${a.username}:${a.password}`); - n.set('Authorization', `Basic ${t}`), (a.username = ''), (a.password = ''); - } - t = '' + a; - for (let t in r.headers) { - const e = t.toLowerCase(); - (u.has(e) || (r.cors && !f.has(e))) && n.set(t, r.headers[t]); - } - let h = { headers: n, redirect: r.redirect ? 'follow' : 'manual' }; - r.referrer || (h.referrerPolicy = 'no-referrer'), - r.cors && (h.mode = 'cors'), - r.data && (r.method || (h.method = 'POST'), (h.body = 'json' === r.type ? JSON.stringify(r.data) : r.data)); - const c = await fetch(t, h); - if (r.expectStatusCode && c.status !== r.expectStatusCode) throw new o(c.status); - const l = s(new Uint8Array(await c.arrayBuffer()), r.type); - return r.full ? { headers: Object.fromEntries(c.headers.entries()), status: c.status, body: l } : l; - } - const l = !!('object' == typeof process && process.versions && process.versions.node && process.versions.v8); - e.default = function (t, e) { - return (l ? h : c)(t, e); - }; - }, - 7418: t => { - 'use strict'; - var e = Object.getOwnPropertySymbols, - r = Object.prototype.hasOwnProperty, - i = Object.prototype.propertyIsEnumerable; - t.exports = (function () { - try { - if (!Object.assign) return !1; - var t = new String('abc'); - if (((t[5] = 'de'), '5' === Object.getOwnPropertyNames(t)[0])) return !1; - for (var e = {}, r = 0; r < 10; r++) e['_' + String.fromCharCode(r)] = r; - if ( - '0123456789' !== - Object.getOwnPropertyNames(e) - .map(function (t) { - return e[t]; - }) - .join('') - ) - return !1; - var i = {}; - return ( - 'abcdefghijklmnopqrst'.split('').forEach(function (t) { - i[t] = t; - }), - 'abcdefghijklmnopqrst' === Object.keys(Object.assign({}, i)).join('') - ); - } catch (t) { - return !1; - } - })() - ? Object.assign - : function (t, n) { - for ( - var o, - s, - a = (function (t) { - if (null == t) throw new TypeError('Object.assign cannot be called with null or undefined'); - return Object(t); - })(t), - h = 1; - h < arguments.length; - h++ - ) { - for (var u in (o = Object(arguments[h]))) r.call(o, u) && (a[u] = o[u]); - if (e) { - s = e(o); - for (var f = 0; f < s.length; f++) i.call(o, s[f]) && (a[s[f]] = o[s[f]]); - } - } - return a; - }; - }, - 905: (t, e, r) => { - 'use strict'; - const { ErrorWithCause: i } = r(5409), - { findCauseByReference: n, getErrorCause: o, messageWithCauses: s, stackWithCauses: a } = r(8920); - t.exports = { ErrorWithCause: i, findCauseByReference: n, getErrorCause: o, stackWithCauses: a, messageWithCauses: s }; - }, - 5409: t => { - 'use strict'; - class e extends Error { - constructor(t, { cause: r } = {}) { - super(t), (this.name = e.name), r && (this.cause = r), (this.message = t); - } - } - t.exports = { ErrorWithCause: e }; - }, - 8920: t => { - 'use strict'; - const e = t => { - if (t && 'object' == typeof t && 'cause' in t) { - if ('function' == typeof t.cause) { - const e = t.cause(); - return e instanceof Error ? e : void 0; - } - return t.cause instanceof Error ? t.cause : void 0; - } - }, - r = (t, i) => { - if (!(t instanceof Error)) return ''; - const n = t.stack || ''; - if (i.has(t)) return n + '\ncauses have become circular...'; - const o = e(t); - return o ? (i.add(t), n + '\ncaused by: ' + r(o, i)) : n; - }, - i = (t, r, n) => { - if (!(t instanceof Error)) return ''; - const o = n ? '' : t.message || ''; - if (r.has(t)) return o + ': ...'; - const s = e(t); - if (s) { - r.add(t); - const e = 'cause' in t && 'function' == typeof t.cause; - return o + (e ? '' : ': ') + i(s, r, e); - } - return o; - }; - t.exports = { - findCauseByReference: (t, r) => { - if (!t || !r) return; - if (!(t instanceof Error)) return; - if (!(r.prototype instanceof Error) && r !== Error) return; - const i = new Set(); - let n = t; - for (; n && !i.has(n); ) { - if ((i.add(n), n instanceof r)) return n; - n = e(n); - } - }, - getErrorCause: e, - stackWithCauses: t => r(t, new Set()), - messageWithCauses: t => i(t, new Set()), - }; - }, - 9335: t => { - 'use strict'; - function e(t, e) { - return Object.prototype.hasOwnProperty.call(t, e); - } - t.exports = function (t, i, n, o) { - (i = i || '&'), (n = n || '='); - var s = {}; - if ('string' != typeof t || 0 === t.length) return s; - var a = /\+/g; - t = t.split(i); - var h = 1e3; - o && 'number' == typeof o.maxKeys && (h = o.maxKeys); - var u = t.length; - h > 0 && u > h && (u = h); - for (var f = 0; f < u; ++f) { - var c, - l, - d, - p, - m = t[f].replace(a, '%20'), - g = m.indexOf(n); - g >= 0 ? ((c = m.substr(0, g)), (l = m.substr(g + 1))) : ((c = m), (l = '')), - (d = decodeURIComponent(c)), - (p = decodeURIComponent(l)), - e(s, d) ? (r(s[d]) ? s[d].push(p) : (s[d] = [s[d], p])) : (s[d] = p); - } - return s; - }; - var r = - Array.isArray || - function (t) { - return '[object Array]' === Object.prototype.toString.call(t); - }; - }, - 8795: t => { - 'use strict'; - var e = function (t) { - switch (typeof t) { - case 'string': - return t; - case 'boolean': - return t ? 'true' : 'false'; - case 'number': - return isFinite(t) ? t : ''; - default: - return ''; - } - }; - t.exports = function (t, o, s, a) { - return ( - (o = o || '&'), - (s = s || '='), - null === t && (t = void 0), - 'object' == typeof t - ? i(n(t), function (n) { - var a = encodeURIComponent(e(n)) + s; - return r(t[n]) - ? i(t[n], function (t) { - return a + encodeURIComponent(e(t)); - }).join(o) - : a + encodeURIComponent(e(t[n])); - }).join(o) - : a - ? encodeURIComponent(e(a)) + s + encodeURIComponent(e(t)) - : '' - ); - }; - var r = - Array.isArray || - function (t) { - return '[object Array]' === Object.prototype.toString.call(t); - }; - function i(t, e) { - if (t.map) return t.map(e); - for (var r = [], i = 0; i < t.length; i++) r.push(e(t[i], i)); - return r; - } - var n = - Object.keys || - function (t) { - var e = []; - for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.push(r); - return e; - }; - }, - 7735: (t, e, r) => { - 'use strict'; - (e.decode = e.parse = r(9335)), (e.encode = e.stringify = r(8795)); - }, - 6666: (t, e, r) => { - t.exports = r(6753); - }, - 6753: (t, e, r) => { - t.exports = a; - var i = - Object.keys || - function (t) { - var e = []; - for (var r in t) e.push(r); - return e; - }, - n = r(6497); - n.inherits = r(5717); - var o = r(9481), - s = r(4229); - function a(t) { - if (!(this instanceof a)) return new a(t); - o.call(this, t), - s.call(this, t), - t && !1 === t.readable && (this.readable = !1), - t && !1 === t.writable && (this.writable = !1), - (this.allowHalfOpen = !0), - t && !1 === t.allowHalfOpen && (this.allowHalfOpen = !1), - this.once('end', h); - } - function h() { - this.allowHalfOpen || this._writableState.ended || process.nextTick(this.end.bind(this)); - } - n.inherits(a, o), - (function (t, e) { - for (var r = 0, i = t.length; r < i; r++) (n = t[r]), a.prototype[n] || (a.prototype[n] = s.prototype[n]); - var n; - })(i(s.prototype)); - }, - 2725: (t, e, r) => { - t.exports = o; - var i = r(4605), - n = r(6497); - function o(t) { - if (!(this instanceof o)) return new o(t); - i.call(this, t); - } - (n.inherits = r(5717)), - n.inherits(o, i), - (o.prototype._transform = function (t, e, r) { - r(null, t); - }); - }, - 9481: (t, e, r) => { - t.exports = c; - var i = r(5309), - n = r(8764).Buffer; - c.ReadableState = f; - var o = r(7187).EventEmitter; - o.listenerCount || - (o.listenerCount = function (t, e) { - return t.listeners(e).length; - }); - var s, - a = r(2830), - h = r(6497); - h.inherits = r(5717); - var u = r(9539); - function f(t, e) { - var i = r(6753), - n = (t = t || {}).highWaterMark, - o = t.objectMode ? 16 : 16384; - (this.highWaterMark = n || 0 === n ? n : o), - (this.highWaterMark = ~~this.highWaterMark), - (this.buffer = []), - (this.length = 0), - (this.pipes = null), - (this.pipesCount = 0), - (this.flowing = null), - (this.ended = !1), - (this.endEmitted = !1), - (this.reading = !1), - (this.sync = !0), - (this.needReadable = !1), - (this.emittedReadable = !1), - (this.readableListening = !1), - (this.objectMode = !!t.objectMode), - e instanceof i && (this.objectMode = this.objectMode || !!t.readableObjectMode), - (this.defaultEncoding = t.defaultEncoding || 'utf8'), - (this.ranOut = !1), - (this.awaitDrain = 0), - (this.readingMore = !1), - (this.decoder = null), - (this.encoding = null), - t.encoding && (s || (s = r(6941).s), (this.decoder = new s(t.encoding)), (this.encoding = t.encoding)); - } - function c(t) { - if ((r(6753), !(this instanceof c))) return new c(t); - (this._readableState = new f(t, this)), (this.readable = !0), a.call(this); - } - function l(t, e, r, i, n) { - var o = (function (t, e) { - var r = null; - return ( - h.isBuffer(e) || - h.isString(e) || - h.isNullOrUndefined(e) || - t.objectMode || - (r = new TypeError('Invalid non-string/buffer chunk')), - r - ); - })(e, r); - if (o) t.emit('error', o); - else if (h.isNullOrUndefined(r)) - (e.reading = !1), - e.ended || - (function (t, e) { - if (e.decoder && !e.ended) { - var r = e.decoder.end(); - r && r.length && (e.buffer.push(r), (e.length += e.objectMode ? 1 : r.length)); - } - (e.ended = !0), m(t); - })(t, e); - else if (e.objectMode || (r && r.length > 0)) - if (e.ended && !n) { - var s = new Error('stream.push() after EOF'); - t.emit('error', s); - } else - e.endEmitted && n - ? ((s = new Error('stream.unshift() after end event')), t.emit('error', s)) - : (!e.decoder || n || i || (r = e.decoder.write(r)), - n || (e.reading = !1), - e.flowing && 0 === e.length && !e.sync - ? (t.emit('data', r), t.read(0)) - : ((e.length += e.objectMode ? 1 : r.length), n ? e.buffer.unshift(r) : e.buffer.push(r), e.needReadable && m(t)), - (function (t, e) { - e.readingMore || - ((e.readingMore = !0), - process.nextTick(function () { - !(function (t, e) { - for ( - var r = e.length; - !e.reading && - !e.flowing && - !e.ended && - e.length < e.highWaterMark && - (u('maybeReadMore read 0'), t.read(0), r !== e.length); - - ) - r = e.length; - e.readingMore = !1; - })(t, e); - })); - })(t, e)); - else n || (e.reading = !1); - return (function (t) { - return !t.ended && (t.needReadable || t.length < t.highWaterMark || 0 === t.length); - })(e); - } - (u = u && u.debuglog ? u.debuglog('stream') : function () {}), - h.inherits(c, a), - (c.prototype.push = function (t, e) { - var r = this._readableState; - return ( - h.isString(t) && !r.objectMode && (e = e || r.defaultEncoding) !== r.encoding && ((t = new n(t, e)), (e = '')), - l(this, r, t, e, !1) - ); - }), - (c.prototype.unshift = function (t) { - return l(this, this._readableState, t, '', !0); - }), - (c.prototype.setEncoding = function (t) { - return s || (s = r(6941).s), (this._readableState.decoder = new s(t)), (this._readableState.encoding = t), this; - }); - var d = 8388608; - function p(t, e) { - return 0 === e.length && e.ended - ? 0 - : e.objectMode - ? 0 === t - ? 0 - : 1 - : isNaN(t) || h.isNull(t) - ? e.flowing && e.buffer.length - ? e.buffer[0].length - : e.length - : t <= 0 - ? 0 - : (t > e.highWaterMark && - (e.highWaterMark = (function (t) { - if (t >= d) t = d; - else { - t--; - for (var e = 1; e < 32; e <<= 1) t |= t >> e; - t++; - } - return t; - })(t)), - t > e.length ? (e.ended ? e.length : ((e.needReadable = !0), 0)) : t); - } - function m(t) { - var e = t._readableState; - (e.needReadable = !1), - e.emittedReadable || - (u('emitReadable', e.flowing), - (e.emittedReadable = !0), - e.sync - ? process.nextTick(function () { - g(t); - }) - : g(t)); - } - function g(t) { - u('emit readable'), t.emit('readable'), b(t); - } - function b(t) { - var e = t._readableState; - if ((u('flow', e.flowing), e.flowing)) - do { - var r = t.read(); - } while (null !== r && e.flowing); - } - function y(t, e) { - var r, - i = e.buffer, - o = e.length, - s = !!e.decoder, - a = !!e.objectMode; - if (0 === i.length) return null; - if (0 === o) r = null; - else if (a) r = i.shift(); - else if (!t || t >= o) (r = s ? i.join('') : n.concat(i, o)), (i.length = 0); - else if (t < i[0].length) (r = (c = i[0]).slice(0, t)), (i[0] = c.slice(t)); - else if (t === i[0].length) r = i.shift(); - else { - r = s ? '' : new n(t); - for (var h = 0, u = 0, f = i.length; u < f && h < t; u++) { - var c = i[0], - l = Math.min(t - h, c.length); - s ? (r += c.slice(0, l)) : c.copy(r, h, 0, l), l < c.length ? (i[0] = c.slice(l)) : i.shift(), (h += l); - } - } - return r; - } - function v(t) { - var e = t._readableState; - if (e.length > 0) throw new Error('endReadable called on non-empty stream'); - e.endEmitted || - ((e.ended = !0), - process.nextTick(function () { - e.endEmitted || 0 !== e.length || ((e.endEmitted = !0), (t.readable = !1), t.emit('end')); - })); - } - (c.prototype.read = function (t) { - u('read', t); - var e = this._readableState, - r = t; - if ( - ((!h.isNumber(t) || t > 0) && (e.emittedReadable = !1), 0 === t && e.needReadable && (e.length >= e.highWaterMark || e.ended)) - ) - return u('read: emitReadable', e.length, e.ended), 0 === e.length && e.ended ? v(this) : m(this), null; - if (0 === (t = p(t, e)) && e.ended) return 0 === e.length && v(this), null; - var i, - n = e.needReadable; - return ( - u('need readable', n), - (0 === e.length || e.length - t < e.highWaterMark) && u('length less than watermark', (n = !0)), - (e.ended || e.reading) && u('reading or ended', (n = !1)), - n && - (u('do read'), - (e.reading = !0), - (e.sync = !0), - 0 === e.length && (e.needReadable = !0), - this._read(e.highWaterMark), - (e.sync = !1)), - n && !e.reading && (t = p(r, e)), - (i = t > 0 ? y(t, e) : null), - h.isNull(i) && ((e.needReadable = !0), (t = 0)), - (e.length -= t), - 0 !== e.length || e.ended || (e.needReadable = !0), - r !== t && e.ended && 0 === e.length && v(this), - h.isNull(i) || this.emit('data', i), - i - ); - }), - (c.prototype._read = function (t) { - this.emit('error', new Error('not implemented')); - }), - (c.prototype.pipe = function (t, e) { - var r = this, - n = this._readableState; - switch (n.pipesCount) { - case 0: - n.pipes = t; - break; - case 1: - n.pipes = [n.pipes, t]; - break; - default: - n.pipes.push(t); - } - (n.pipesCount += 1), u('pipe count=%d opts=%j', n.pipesCount, e); - var s = (e && !1 === e.end) || t === process.stdout || t === process.stderr ? c : h; - function a(t) { - u('onunpipe'), t === r && c(); - } - function h() { - u('onend'), t.end(); - } - n.endEmitted ? process.nextTick(s) : r.once('end', s), t.on('unpipe', a); - var f = (function (t) { - return function () { - var e = t._readableState; - u('pipeOnDrain', e.awaitDrain), - e.awaitDrain && e.awaitDrain--, - 0 === e.awaitDrain && o.listenerCount(t, 'data') && ((e.flowing = !0), b(t)); - }; - })(r); - function c() { - u('cleanup'), - t.removeListener('close', p), - t.removeListener('finish', m), - t.removeListener('drain', f), - t.removeListener('error', d), - t.removeListener('unpipe', a), - r.removeListener('end', h), - r.removeListener('end', c), - r.removeListener('data', l), - !n.awaitDrain || (t._writableState && !t._writableState.needDrain) || f(); - } - function l(e) { - u('ondata'), - !1 === t.write(e) && - (u('false write response, pause', r._readableState.awaitDrain), r._readableState.awaitDrain++, r.pause()); - } - function d(e) { - u('onerror', e), g(), t.removeListener('error', d), 0 === o.listenerCount(t, 'error') && t.emit('error', e); - } - function p() { - t.removeListener('finish', m), g(); - } - function m() { - u('onfinish'), t.removeListener('close', p), g(); - } - function g() { - u('unpipe'), r.unpipe(t); - } - return ( - t.on('drain', f), - r.on('data', l), - t._events && t._events.error - ? i(t._events.error) - ? t._events.error.unshift(d) - : (t._events.error = [d, t._events.error]) - : t.on('error', d), - t.once('close', p), - t.once('finish', m), - t.emit('pipe', r), - n.flowing || (u('pipe resume'), r.resume()), - t - ); - }), - (c.prototype.unpipe = function (t) { - var e = this._readableState; - if (0 === e.pipesCount) return this; - if (1 === e.pipesCount) - return ( - (t && t !== e.pipes) || - (t || (t = e.pipes), (e.pipes = null), (e.pipesCount = 0), (e.flowing = !1), t && t.emit('unpipe', this)), - this - ); - if (!t) { - var r = e.pipes, - i = e.pipesCount; - (e.pipes = null), (e.pipesCount = 0), (e.flowing = !1); - for (var n = 0; n < i; n++) r[n].emit('unpipe', this); - return this; - } - return ( - -1 === - (n = (function (t, e) { - for (var r = 0, i = t.length; r < i; r++) if (t[r] === e) return r; - return -1; - })(e.pipes, t)) || - (e.pipes.splice(n, 1), (e.pipesCount -= 1), 1 === e.pipesCount && (e.pipes = e.pipes[0]), t.emit('unpipe', this)), - this - ); - }), - (c.prototype.on = function (t, e) { - var r = a.prototype.on.call(this, t, e); - if (('data' === t && !1 !== this._readableState.flowing && this.resume(), 'readable' === t && this.readable)) { - var i = this._readableState; - if (!i.readableListening) - if (((i.readableListening = !0), (i.emittedReadable = !1), (i.needReadable = !0), i.reading)) i.length && m(this); - else { - var n = this; - process.nextTick(function () { - u('readable nexttick read 0'), n.read(0); - }); - } - } - return r; - }), - (c.prototype.addListener = c.prototype.on), - (c.prototype.resume = function () { - var t = this._readableState; - return ( - t.flowing || - (u('resume'), - (t.flowing = !0), - t.reading || (u('resume read 0'), this.read(0)), - (function (t, e) { - e.resumeScheduled || - ((e.resumeScheduled = !0), - process.nextTick(function () { - !(function (t, e) { - (e.resumeScheduled = !1), t.emit('resume'), b(t), e.flowing && !e.reading && t.read(0); - })(t, e); - })); - })(this, t)), - this - ); - }), - (c.prototype.pause = function () { - return ( - u('call pause flowing=%j', this._readableState.flowing), - !1 !== this._readableState.flowing && (u('pause'), (this._readableState.flowing = !1), this.emit('pause')), - this - ); - }), - (c.prototype.wrap = function (t) { - var e = this._readableState, - r = !1, - i = this; - for (var n in (t.on('end', function () { - if ((u('wrapped end'), e.decoder && !e.ended)) { - var t = e.decoder.end(); - t && t.length && i.push(t); - } - i.push(null); - }), - t.on('data', function (n) { - u('wrapped data'), - e.decoder && (n = e.decoder.write(n)), - n && (e.objectMode || n.length) && (i.push(n) || ((r = !0), t.pause())); - }), - t)) - h.isFunction(t[n]) && - h.isUndefined(this[n]) && - (this[n] = (function (e) { - return function () { - return t[e].apply(t, arguments); - }; - })(n)); - return ( - (function (e, r) { - for (var n = 0, o = e.length; n < o; n++) (s = e[n]), t.on(s, i.emit.bind(i, s)); - var s; - })(['error', 'close', 'destroy', 'pause', 'resume']), - (i._read = function (e) { - u('wrapped _read', e), r && ((r = !1), t.resume()); - }), - i - ); - }), - (c._fromList = y); - }, - 4605: (t, e, r) => { - t.exports = s; - var i = r(6753), - n = r(6497); - function o(t, e) { - (this.afterTransform = function (t, r) { - return (function (t, e, r) { - var i = t._transformState; - i.transforming = !1; - var o = i.writecb; - if (!o) return t.emit('error', new Error('no writecb in Transform class')); - (i.writechunk = null), (i.writecb = null), n.isNullOrUndefined(r) || t.push(r), o && o(e); - var s = t._readableState; - (s.reading = !1), (s.needReadable || s.length < s.highWaterMark) && t._read(s.highWaterMark); - })(e, t, r); - }), - (this.needTransform = !1), - (this.transforming = !1), - (this.writecb = null), - (this.writechunk = null); - } - function s(t) { - if (!(this instanceof s)) return new s(t); - i.call(this, t), (this._transformState = new o(t, this)); - var e = this; - (this._readableState.needReadable = !0), - (this._readableState.sync = !1), - this.once('prefinish', function () { - n.isFunction(this._flush) - ? this._flush(function (t) { - a(e, t); - }) - : a(e); - }); - } - function a(t, e) { - if (e) return t.emit('error', e); - var r = t._writableState, - i = t._transformState; - if (r.length) throw new Error('calling transform done when ws.length != 0'); - if (i.transforming) throw new Error('calling transform done when still transforming'); - return t.push(null); - } - (n.inherits = r(5717)), - n.inherits(s, i), - (s.prototype.push = function (t, e) { - return (this._transformState.needTransform = !1), i.prototype.push.call(this, t, e); - }), - (s.prototype._transform = function (t, e, r) { - throw new Error('not implemented'); - }), - (s.prototype._write = function (t, e, r) { - var i = this._transformState; - if (((i.writecb = r), (i.writechunk = t), (i.writeencoding = e), !i.transforming)) { - var n = this._readableState; - (i.needTransform || n.needReadable || n.length < n.highWaterMark) && this._read(n.highWaterMark); - } - }), - (s.prototype._read = function (t) { - var e = this._transformState; - n.isNull(e.writechunk) || !e.writecb || e.transforming - ? (e.needTransform = !0) - : ((e.transforming = !0), this._transform(e.writechunk, e.writeencoding, e.afterTransform)); - }); - }, - 4229: (t, e, r) => { - t.exports = h; - var i = r(8764).Buffer; - h.WritableState = a; - var n = r(6497); - n.inherits = r(5717); - var o = r(2830); - function s(t, e, r) { - (this.chunk = t), (this.encoding = e), (this.callback = r); - } - function a(t, e) { - var i = r(6753), - n = (t = t || {}).highWaterMark, - o = t.objectMode ? 16 : 16384; - (this.highWaterMark = n || 0 === n ? n : o), - (this.objectMode = !!t.objectMode), - e instanceof i && (this.objectMode = this.objectMode || !!t.writableObjectMode), - (this.highWaterMark = ~~this.highWaterMark), - (this.needDrain = !1), - (this.ending = !1), - (this.ended = !1), - (this.finished = !1); - var s = !1 === t.decodeStrings; - (this.decodeStrings = !s), - (this.defaultEncoding = t.defaultEncoding || 'utf8'), - (this.length = 0), - (this.writing = !1), - (this.corked = 0), - (this.sync = !0), - (this.bufferProcessing = !1), - (this.onwrite = function (t) { - !(function (t, e) { - var r = t._writableState, - i = r.sync, - n = r.writecb; - if ( - ((function (t) { - (t.writing = !1), (t.writecb = null), (t.length -= t.writelen), (t.writelen = 0); - })(r), - e) - ) - !(function (t, e, r, i, n) { - r - ? process.nextTick(function () { - e.pendingcb--, n(i); - }) - : (e.pendingcb--, n(i)), - (t._writableState.errorEmitted = !0), - t.emit('error', i); - })(t, r, i, e, n); - else { - var o = l(0, r); - o || r.corked || r.bufferProcessing || !r.buffer.length || c(t, r), - i - ? process.nextTick(function () { - f(t, r, o, n); - }) - : f(t, r, o, n); - } - })(e, t); - }), - (this.writecb = null), - (this.writelen = 0), - (this.buffer = []), - (this.pendingcb = 0), - (this.prefinished = !1), - (this.errorEmitted = !1); - } - function h(t) { - var e = r(6753); - if (!(this instanceof h || this instanceof e)) return new h(t); - (this._writableState = new a(t, this)), (this.writable = !0), o.call(this); - } - function u(t, e, r, i, n, o, s) { - (e.writelen = i), - (e.writecb = s), - (e.writing = !0), - (e.sync = !0), - r ? t._writev(n, e.onwrite) : t._write(n, o, e.onwrite), - (e.sync = !1); - } - function f(t, e, r, i) { - r || - (function (t, e) { - 0 === e.length && e.needDrain && ((e.needDrain = !1), t.emit('drain')); - })(t, e), - e.pendingcb--, - i(), - p(t, e); - } - function c(t, e) { - if (((e.bufferProcessing = !0), t._writev && e.buffer.length > 1)) { - for (var r = [], i = 0; i < e.buffer.length; i++) r.push(e.buffer[i].callback); - e.pendingcb++, - u(t, e, !0, e.length, e.buffer, '', function (t) { - for (var i = 0; i < r.length; i++) e.pendingcb--, r[i](t); - }), - (e.buffer = []); - } else { - for (i = 0; i < e.buffer.length; i++) { - var n = e.buffer[i], - o = n.chunk, - s = n.encoding, - a = n.callback, - h = e.objectMode ? 1 : o.length; - if ((u(t, e, !1, h, o, s, a), e.writing)) { - i++; - break; - } - } - i < e.buffer.length ? (e.buffer = e.buffer.slice(i)) : (e.buffer.length = 0); - } - e.bufferProcessing = !1; - } - function l(t, e) { - return e.ending && 0 === e.length && !e.finished && !e.writing; - } - function d(t, e) { - e.prefinished || ((e.prefinished = !0), t.emit('prefinish')); - } - function p(t, e) { - var r = l(0, e); - return r && (0 === e.pendingcb ? (d(t, e), (e.finished = !0), t.emit('finish')) : d(t, e)), r; - } - n.inherits(h, o), - (h.prototype.pipe = function () { - this.emit('error', new Error('Cannot pipe. Not readable.')); - }), - (h.prototype.write = function (t, e, r) { - var o = this._writableState, - a = !1; - return ( - n.isFunction(e) && ((r = e), (e = null)), - n.isBuffer(t) ? (e = 'buffer') : e || (e = o.defaultEncoding), - n.isFunction(r) || (r = function () {}), - o.ended - ? (function (t, e, r) { - var i = new Error('write after end'); - t.emit('error', i), - process.nextTick(function () { - r(i); - }); - })(this, 0, r) - : (function (t, e, r, i) { - var o = !0; - if (!(n.isBuffer(r) || n.isString(r) || n.isNullOrUndefined(r) || e.objectMode)) { - var s = new TypeError('Invalid non-string/buffer chunk'); - t.emit('error', s), - process.nextTick(function () { - i(s); - }), - (o = !1); - } - return o; - })(this, o, t, r) && - (o.pendingcb++, - (a = (function (t, e, r, o, a) { - (r = (function (t, e, r) { - return !t.objectMode && !1 !== t.decodeStrings && n.isString(e) && (e = new i(e, r)), e; - })(e, r, o)), - n.isBuffer(r) && (o = 'buffer'); - var h = e.objectMode ? 1 : r.length; - e.length += h; - var f = e.length < e.highWaterMark; - return f || (e.needDrain = !0), e.writing || e.corked ? e.buffer.push(new s(r, o, a)) : u(t, e, !1, h, r, o, a), f; - })(this, o, t, e, r))), - a - ); - }), - (h.prototype.cork = function () { - this._writableState.corked++; - }), - (h.prototype.uncork = function () { - var t = this._writableState; - t.corked && (t.corked--, t.writing || t.corked || t.finished || t.bufferProcessing || !t.buffer.length || c(this, t)); - }), - (h.prototype._write = function (t, e, r) { - r(new Error('not implemented')); - }), - (h.prototype._writev = null), - (h.prototype.end = function (t, e, r) { - var i = this._writableState; - n.isFunction(t) ? ((r = t), (t = null), (e = null)) : n.isFunction(e) && ((r = e), (e = null)), - n.isNullOrUndefined(t) || this.write(t, e), - i.corked && ((i.corked = 1), this.uncork()), - i.ending || - i.finished || - (function (t, e, r) { - (e.ending = !0), p(t, e), r && (e.finished ? process.nextTick(r) : t.once('finish', r)), (e.ended = !0); - })(this, i, r); - }); - }, - 5309: t => { - t.exports = - Array.isArray || - function (t) { - return '[object Array]' == Object.prototype.toString.call(t); - }; - }, - 5799: (t, e, r) => { - t.exports = r(2725); - }, - 1451: (t, e, r) => { - ((e = t.exports = r(9481)).Stream = r(2830)), - (e.Readable = e), - (e.Writable = r(4229)), - (e.Duplex = r(6753)), - (e.Transform = r(4605)), - (e.PassThrough = r(2725)), - process.browser || 'disable' !== process.env.READABLE_STREAM || (t.exports = r(2830)); - }, - 4219: (t, e, r) => { - t.exports = r(4605); - }, - 9909: (t, e, r) => { - t.exports = r(4229); - }, - 2257: (t, e, r) => { - const i = Symbol('SemVer ANY'); - class n { - static get ANY() { - return i; - } - constructor(t, e) { - if (((e = o(e)), t instanceof n)) { - if (t.loose === !!e.loose) return t; - t = t.value; - } - (t = t.trim().split(/\s+/).join(' ')), - u('comparator', t, e), - (this.options = e), - (this.loose = !!e.loose), - this.parse(t), - this.semver === i ? (this.value = '') : (this.value = this.operator + this.semver.version), - u('comp', this); - } - parse(t) { - const e = this.options.loose ? s[a.COMPARATORLOOSE] : s[a.COMPARATOR], - r = t.match(e); - if (!r) throw new TypeError(`Invalid comparator: ${t}`); - (this.operator = void 0 !== r[1] ? r[1] : ''), - '=' === this.operator && (this.operator = ''), - r[2] ? (this.semver = new f(r[2], this.options.loose)) : (this.semver = i); - } - toString() { - return this.value; - } - test(t) { - if ((u('Comparator.test', t, this.options.loose), this.semver === i || t === i)) return !0; - if ('string' == typeof t) - try { - t = new f(t, this.options); - } catch (t) { - return !1; - } - return h(t, this.operator, this.semver, this.options); - } - intersects(t, e) { - if (!(t instanceof n)) throw new TypeError('a Comparator is required'); - return '' === this.operator - ? '' === this.value || new c(t.value, e).test(this.value) - : '' === t.operator - ? '' === t.value || new c(this.value, e).test(t.semver) - : !( - ((e = o(e)).includePrerelease && ('<0.0.0-0' === this.value || '<0.0.0-0' === t.value)) || - (!e.includePrerelease && (this.value.startsWith('<0.0.0') || t.value.startsWith('<0.0.0'))) || - ((!this.operator.startsWith('>') || !t.operator.startsWith('>')) && - (!this.operator.startsWith('<') || !t.operator.startsWith('<')) && - (this.semver.version !== t.semver.version || !this.operator.includes('=') || !t.operator.includes('=')) && - !(h(this.semver, '<', t.semver, e) && this.operator.startsWith('>') && t.operator.startsWith('<')) && - !(h(this.semver, '>', t.semver, e) && this.operator.startsWith('<') && t.operator.startsWith('>'))) - ); - } - } - t.exports = n; - const o = r(2893), - { safeRe: s, t: a } = r(5765), - h = r(7539), - u = r(4225), - f = r(6376), - c = r(6902); - }, - 6902: (t, e, r) => { - class i { - constructor(t, e) { - if (((e = o(e)), t instanceof i)) - return t.loose === !!e.loose && t.includePrerelease === !!e.includePrerelease ? t : new i(t.raw, e); - if (t instanceof s) return (this.raw = t.value), (this.set = [[t]]), this.format(), this; - if ( - ((this.options = e), - (this.loose = !!e.loose), - (this.includePrerelease = !!e.includePrerelease), - (this.raw = t.trim().split(/\s+/).join(' ')), - (this.set = this.raw - .split('||') - .map(t => this.parseRange(t)) - .filter(t => t.length)), - !this.set.length) - ) - throw new TypeError(`Invalid SemVer Range: ${this.raw}`); - if (this.set.length > 1) { - const t = this.set[0]; - if (((this.set = this.set.filter(t => !g(t[0]))), 0 === this.set.length)) this.set = [t]; - else if (this.set.length > 1) - for (const t of this.set) - if (1 === t.length && b(t[0])) { - this.set = [t]; - break; - } - } - this.format(); - } - format() { - return ( - (this.range = this.set - .map(t => t.join(' ').trim()) - .join('||') - .trim()), - this.range - ); - } - toString() { - return this.range; - } - parseRange(t) { - const e = ((this.options.includePrerelease && p) | (this.options.loose && m)) + ':' + t, - r = n.get(e); - if (r) return r; - const i = this.options.loose, - o = i ? u[f.HYPHENRANGELOOSE] : u[f.HYPHENRANGE]; - (t = t.replace(o, B(this.options.includePrerelease))), - a('hyphen replace', t), - (t = t.replace(u[f.COMPARATORTRIM], c)), - a('comparator trim', t); - let h = (t = (t = t.replace(u[f.TILDETRIM], l)).replace(u[f.CARETTRIM], d)) - .split(' ') - .map(t => v(t, this.options)) - .join(' ') - .split(/\s+/) - .map(t => R(t, this.options)); - i && (h = h.filter(t => (a('loose invalid filter', t, this.options), !!t.match(u[f.COMPARATORLOOSE])))), a('range list', h); - const b = new Map(), - y = h.map(t => new s(t, this.options)); - for (const t of y) { - if (g(t)) return [t]; - b.set(t.value, t); - } - b.size > 1 && b.has('') && b.delete(''); - const w = [...b.values()]; - return n.set(e, w), w; - } - intersects(t, e) { - if (!(t instanceof i)) throw new TypeError('a Range is required'); - return this.set.some(r => y(r, e) && t.set.some(t => y(t, e) && r.every(r => t.every(t => r.intersects(t, e))))); - } - test(t) { - if (!t) return !1; - if ('string' == typeof t) - try { - t = new h(t, this.options); - } catch (t) { - return !1; - } - for (let e = 0; e < this.set.length; e++) if (I(this.set[e], t, this.options)) return !0; - return !1; - } - } - t.exports = i; - const n = new (r(6062))({ max: 1e3 }), - o = r(2893), - s = r(2257), - a = r(4225), - h = r(6376), - { safeRe: u, t: f, comparatorTrimReplace: c, tildeTrimReplace: l, caretTrimReplace: d } = r(5765), - { FLAG_INCLUDE_PRERELEASE: p, FLAG_LOOSE: m } = r(3295), - g = t => '<0.0.0-0' === t.value, - b = t => '' === t.value, - y = (t, e) => { - let r = !0; - const i = t.slice(); - let n = i.pop(); - for (; r && i.length; ) (r = i.every(t => n.intersects(t, e))), (n = i.pop()); - return r; - }, - v = (t, e) => ( - a('comp', t, e), - (t = E(t, e)), - a('caret', t), - (t = _(t, e)), - a('tildes', t), - (t = x(t, e)), - a('xrange', t), - (t = k(t, e)), - a('stars', t), - t - ), - w = t => !t || 'x' === t.toLowerCase() || '*' === t, - _ = (t, e) => - t - .trim() - .split(/\s+/) - .map(t => M(t, e)) - .join(' '), - M = (t, e) => { - const r = e.loose ? u[f.TILDELOOSE] : u[f.TILDE]; - return t.replace(r, (e, r, i, n, o) => { - let s; - return ( - a('tilde', t, e, r, i, n, o), - w(r) - ? (s = '') - : w(i) - ? (s = `>=${r}.0.0 <${+r + 1}.0.0-0`) - : w(n) - ? (s = `>=${r}.${i}.0 <${r}.${+i + 1}.0-0`) - : o - ? (a('replaceTilde pr', o), (s = `>=${r}.${i}.${n}-${o} <${r}.${+i + 1}.0-0`)) - : (s = `>=${r}.${i}.${n} <${r}.${+i + 1}.0-0`), - a('tilde return', s), - s - ); - }); - }, - E = (t, e) => - t - .trim() - .split(/\s+/) - .map(t => S(t, e)) - .join(' '), - S = (t, e) => { - a('caret', t, e); - const r = e.loose ? u[f.CARETLOOSE] : u[f.CARET], - i = e.includePrerelease ? '-0' : ''; - return t.replace(r, (e, r, n, o, s) => { - let h; - return ( - a('caret', t, e, r, n, o, s), - w(r) - ? (h = '') - : w(n) - ? (h = `>=${r}.0.0${i} <${+r + 1}.0.0-0`) - : w(o) - ? (h = '0' === r ? `>=${r}.${n}.0${i} <${r}.${+n + 1}.0-0` : `>=${r}.${n}.0${i} <${+r + 1}.0.0-0`) - : s - ? (a('replaceCaret pr', s), - (h = - '0' === r - ? '0' === n - ? `>=${r}.${n}.${o}-${s} <${r}.${n}.${+o + 1}-0` - : `>=${r}.${n}.${o}-${s} <${r}.${+n + 1}.0-0` - : `>=${r}.${n}.${o}-${s} <${+r + 1}.0.0-0`)) - : (a('no pr'), - (h = - '0' === r - ? '0' === n - ? `>=${r}.${n}.${o}${i} <${r}.${n}.${+o + 1}-0` - : `>=${r}.${n}.${o}${i} <${r}.${+n + 1}.0-0` - : `>=${r}.${n}.${o} <${+r + 1}.0.0-0`)), - a('caret return', h), - h - ); - }); - }, - x = (t, e) => ( - a('replaceXRanges', t, e), - t - .split(/\s+/) - .map(t => A(t, e)) - .join(' ') - ), - A = (t, e) => { - t = t.trim(); - const r = e.loose ? u[f.XRANGELOOSE] : u[f.XRANGE]; - return t.replace(r, (r, i, n, o, s, h) => { - a('xRange', t, r, i, n, o, s, h); - const u = w(n), - f = u || w(o), - c = f || w(s), - l = c; - return ( - '=' === i && l && (i = ''), - (h = e.includePrerelease ? '-0' : ''), - u - ? (r = '>' === i || '<' === i ? '<0.0.0-0' : '*') - : i && l - ? (f && (o = 0), - (s = 0), - '>' === i - ? ((i = '>='), f ? ((n = +n + 1), (o = 0), (s = 0)) : ((o = +o + 1), (s = 0))) - : '<=' === i && ((i = '<'), f ? (n = +n + 1) : (o = +o + 1)), - '<' === i && (h = '-0'), - (r = `${i + n}.${o}.${s}${h}`)) - : f - ? (r = `>=${n}.0.0${h} <${+n + 1}.0.0-0`) - : c && (r = `>=${n}.${o}.0${h} <${n}.${+o + 1}.0-0`), - a('xRange return', r), - r - ); - }); - }, - k = (t, e) => (a('replaceStars', t, e), t.trim().replace(u[f.STAR], '')), - R = (t, e) => (a('replaceGTE0', t, e), t.trim().replace(u[e.includePrerelease ? f.GTE0PRE : f.GTE0], '')), - B = t => (e, r, i, n, o, s, a, h, u, f, c, l, d) => - `${(r = w(i) ? '' : w(n) ? `>=${i}.0.0${t ? '-0' : ''}` : w(o) ? `>=${i}.${n}.0${t ? '-0' : ''}` : s ? `>=${r}` : `>=${r}${t ? '-0' : ''}`)} ${(h = w(u) ? '' : w(f) ? `<${+u + 1}.0.0-0` : w(c) ? `<${u}.${+f + 1}.0-0` : l ? `<=${u}.${f}.${c}-${l}` : t ? `<${u}.${f}.${+c + 1}-0` : `<=${h}`)}`.trim(), - I = (t, e, r) => { - for (let r = 0; r < t.length; r++) if (!t[r].test(e)) return !1; - if (e.prerelease.length && !r.includePrerelease) { - for (let r = 0; r < t.length; r++) - if ((a(t[r].semver), t[r].semver !== s.ANY && t[r].semver.prerelease.length > 0)) { - const i = t[r].semver; - if (i.major === e.major && i.minor === e.minor && i.patch === e.patch) return !0; - } - return !1; - } - return !0; - }; - }, - 6376: (t, e, r) => { - const i = r(4225), - { MAX_LENGTH: n, MAX_SAFE_INTEGER: o } = r(3295), - { safeRe: s, t: a } = r(5765), - h = r(2893), - { compareIdentifiers: u } = r(6742); - class f { - constructor(t, e) { - if (((e = h(e)), t instanceof f)) { - if (t.loose === !!e.loose && t.includePrerelease === !!e.includePrerelease) return t; - t = t.version; - } else if ('string' != typeof t) throw new TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`); - if (t.length > n) throw new TypeError(`version is longer than ${n} characters`); - i('SemVer', t, e), (this.options = e), (this.loose = !!e.loose), (this.includePrerelease = !!e.includePrerelease); - const r = t.trim().match(e.loose ? s[a.LOOSE] : s[a.FULL]); - if (!r) throw new TypeError(`Invalid Version: ${t}`); - if (((this.raw = t), (this.major = +r[1]), (this.minor = +r[2]), (this.patch = +r[3]), this.major > o || this.major < 0)) - throw new TypeError('Invalid major version'); - if (this.minor > o || this.minor < 0) throw new TypeError('Invalid minor version'); - if (this.patch > o || this.patch < 0) throw new TypeError('Invalid patch version'); - r[4] - ? (this.prerelease = r[4].split('.').map(t => { - if (/^[0-9]+$/.test(t)) { - const e = +t; - if (e >= 0 && e < o) return e; - } - return t; - })) - : (this.prerelease = []), - (this.build = r[5] ? r[5].split('.') : []), - this.format(); - } - format() { - return ( - (this.version = `${this.major}.${this.minor}.${this.patch}`), - this.prerelease.length && (this.version += `-${this.prerelease.join('.')}`), - this.version - ); - } - toString() { - return this.version; - } - compare(t) { - if ((i('SemVer.compare', this.version, this.options, t), !(t instanceof f))) { - if ('string' == typeof t && t === this.version) return 0; - t = new f(t, this.options); - } - return t.version === this.version ? 0 : this.compareMain(t) || this.comparePre(t); - } - compareMain(t) { - return ( - t instanceof f || (t = new f(t, this.options)), u(this.major, t.major) || u(this.minor, t.minor) || u(this.patch, t.patch) - ); - } - comparePre(t) { - if ((t instanceof f || (t = new f(t, this.options)), this.prerelease.length && !t.prerelease.length)) return -1; - if (!this.prerelease.length && t.prerelease.length) return 1; - if (!this.prerelease.length && !t.prerelease.length) return 0; - let e = 0; - do { - const r = this.prerelease[e], - n = t.prerelease[e]; - if ((i('prerelease compare', e, r, n), void 0 === r && void 0 === n)) return 0; - if (void 0 === n) return 1; - if (void 0 === r) return -1; - if (r !== n) return u(r, n); - } while (++e); - } - compareBuild(t) { - t instanceof f || (t = new f(t, this.options)); - let e = 0; - do { - const r = this.build[e], - n = t.build[e]; - if ((i('prerelease compare', e, r, n), void 0 === r && void 0 === n)) return 0; - if (void 0 === n) return 1; - if (void 0 === r) return -1; - if (r !== n) return u(r, n); - } while (++e); - } - inc(t, e, r) { - switch (t) { - case 'premajor': - (this.prerelease.length = 0), (this.patch = 0), (this.minor = 0), this.major++, this.inc('pre', e, r); - break; - case 'preminor': - (this.prerelease.length = 0), (this.patch = 0), this.minor++, this.inc('pre', e, r); - break; - case 'prepatch': - (this.prerelease.length = 0), this.inc('patch', e, r), this.inc('pre', e, r); - break; - case 'prerelease': - 0 === this.prerelease.length && this.inc('patch', e, r), this.inc('pre', e, r); - break; - case 'major': - (0 === this.minor && 0 === this.patch && 0 !== this.prerelease.length) || this.major++, - (this.minor = 0), - (this.patch = 0), - (this.prerelease = []); - break; - case 'minor': - (0 === this.patch && 0 !== this.prerelease.length) || this.minor++, (this.patch = 0), (this.prerelease = []); - break; - case 'patch': - 0 === this.prerelease.length && this.patch++, (this.prerelease = []); - break; - case 'pre': { - const t = Number(r) ? 1 : 0; - if (!e && !1 === r) throw new Error('invalid increment argument: identifier is empty'); - if (0 === this.prerelease.length) this.prerelease = [t]; - else { - let i = this.prerelease.length; - for (; --i >= 0; ) 'number' == typeof this.prerelease[i] && (this.prerelease[i]++, (i = -2)); - if (-1 === i) { - if (e === this.prerelease.join('.') && !1 === r) - throw new Error('invalid increment argument: identifier already exists'); - this.prerelease.push(t); - } - } - if (e) { - let i = [e, t]; - !1 === r && (i = [e]), - 0 === u(this.prerelease[0], e) ? isNaN(this.prerelease[1]) && (this.prerelease = i) : (this.prerelease = i); - } - break; - } - default: - throw new Error(`invalid increment argument: ${t}`); - } - return (this.raw = this.format()), this.build.length && (this.raw += `+${this.build.join('.')}`), this; - } - } - t.exports = f; - }, - 3507: (t, e, r) => { - const i = r(3959); - t.exports = (t, e) => { - const r = i(t.trim().replace(/^[=v]+/, ''), e); - return r ? r.version : null; - }; - }, - 7539: (t, e, r) => { - const i = r(8718), - n = r(1194), - o = r(1312), - s = r(5903), - a = r(1544), - h = r(2056); - t.exports = (t, e, r, u) => { - switch (e) { - case '===': - return 'object' == typeof t && (t = t.version), 'object' == typeof r && (r = r.version), t === r; - case '!==': - return 'object' == typeof t && (t = t.version), 'object' == typeof r && (r = r.version), t !== r; - case '': - case '=': - case '==': - return i(t, r, u); - case '!=': - return n(t, r, u); - case '>': - return o(t, r, u); - case '>=': - return s(t, r, u); - case '<': - return a(t, r, u); - case '<=': - return h(t, r, u); - default: - throw new TypeError(`Invalid operator: ${e}`); - } - }; - }, - 9038: (t, e, r) => { - const i = r(6376), - n = r(3959), - { safeRe: o, t: s } = r(5765); - t.exports = (t, e) => { - if (t instanceof i) return t; - if (('number' == typeof t && (t = String(t)), 'string' != typeof t)) return null; - let r = null; - if ((e = e || {}).rtl) { - let e; - for (; (e = o[s.COERCERTL].exec(t)) && (!r || r.index + r[0].length !== t.length); ) - (r && e.index + e[0].length === r.index + r[0].length) || (r = e), - (o[s.COERCERTL].lastIndex = e.index + e[1].length + e[2].length); - o[s.COERCERTL].lastIndex = -1; - } else r = t.match(o[s.COERCE]); - return null === r ? null : n(`${r[2]}.${r[3] || '0'}.${r[4] || '0'}`, e); - }; - }, - 8880: (t, e, r) => { - const i = r(6376); - t.exports = (t, e, r) => { - const n = new i(t, r), - o = new i(e, r); - return n.compare(o) || n.compareBuild(o); - }; - }, - 7880: (t, e, r) => { - const i = r(6269); - t.exports = (t, e) => i(t, e, !0); - }, - 6269: (t, e, r) => { - const i = r(6376); - t.exports = (t, e, r) => new i(t, r).compare(new i(e, r)); - }, - 2378: (t, e, r) => { - const i = r(3959); - t.exports = (t, e) => { - const r = i(t, null, !0), - n = i(e, null, !0), - o = r.compare(n); - if (0 === o) return null; - const s = o > 0, - a = s ? r : n, - h = s ? n : r, - u = !!a.prerelease.length; - if (h.prerelease.length && !u) return h.patch || h.minor ? (a.patch ? 'patch' : a.minor ? 'minor' : 'major') : 'major'; - const f = u ? 'pre' : ''; - return r.major !== n.major ? f + 'major' : r.minor !== n.minor ? f + 'minor' : r.patch !== n.patch ? f + 'patch' : 'prerelease'; - }; - }, - 8718: (t, e, r) => { - const i = r(6269); - t.exports = (t, e, r) => 0 === i(t, e, r); - }, - 1312: (t, e, r) => { - const i = r(6269); - t.exports = (t, e, r) => i(t, e, r) > 0; - }, - 5903: (t, e, r) => { - const i = r(6269); - t.exports = (t, e, r) => i(t, e, r) >= 0; - }, - 253: (t, e, r) => { - const i = r(6376); - t.exports = (t, e, r, n, o) => { - 'string' == typeof r && ((o = n), (n = r), (r = void 0)); - try { - return new i(t instanceof i ? t.version : t, r).inc(e, n, o).version; - } catch (t) { - return null; - } - }; - }, - 1544: (t, e, r) => { - const i = r(6269); - t.exports = (t, e, r) => i(t, e, r) < 0; - }, - 2056: (t, e, r) => { - const i = r(6269); - t.exports = (t, e, r) => i(t, e, r) <= 0; - }, - 8679: (t, e, r) => { - const i = r(6376); - t.exports = (t, e) => new i(t, e).major; - }, - 7789: (t, e, r) => { - const i = r(6376); - t.exports = (t, e) => new i(t, e).minor; - }, - 1194: (t, e, r) => { - const i = r(6269); - t.exports = (t, e, r) => 0 !== i(t, e, r); - }, - 3959: (t, e, r) => { - const i = r(6376); - t.exports = (t, e, r = !1) => { - if (t instanceof i) return t; - try { - return new i(t, e); - } catch (t) { - if (!r) return null; - throw t; - } - }; - }, - 2358: (t, e, r) => { - const i = r(6376); - t.exports = (t, e) => new i(t, e).patch; - }, - 7559: (t, e, r) => { - const i = r(3959); - t.exports = (t, e) => { - const r = i(t, e); - return r && r.prerelease.length ? r.prerelease : null; - }; - }, - 9795: (t, e, r) => { - const i = r(6269); - t.exports = (t, e, r) => i(e, t, r); - }, - 3657: (t, e, r) => { - const i = r(8880); - t.exports = (t, e) => t.sort((t, r) => i(r, t, e)); - }, - 5712: (t, e, r) => { - const i = r(6902); - t.exports = (t, e, r) => { - try { - e = new i(e, r); - } catch (t) { - return !1; - } - return e.test(t); - }; - }, - 1100: (t, e, r) => { - const i = r(8880); - t.exports = (t, e) => t.sort((t, r) => i(t, r, e)); - }, - 6397: (t, e, r) => { - const i = r(3959); - t.exports = (t, e) => { - const r = i(t, e); - return r ? r.version : null; - }; - }, - 1249: (t, e, r) => { - const i = r(5765), - n = r(3295), - o = r(6376), - s = r(6742), - a = r(3959), - h = r(6397), - u = r(3507), - f = r(253), - c = r(2378), - l = r(8679), - d = r(7789), - p = r(2358), - m = r(7559), - g = r(6269), - b = r(9795), - y = r(7880), - v = r(8880), - w = r(1100), - _ = r(3657), - M = r(1312), - E = r(1544), - S = r(8718), - x = r(1194), - A = r(5903), - k = r(2056), - R = r(7539), - B = r(9038), - I = r(2257), - T = r(6902), - P = r(5712), - O = r(1042), - L = r(5775), - C = r(1657), - N = r(5316), - j = r(9042), - U = r(6826), - D = r(7606), - z = r(32), - F = r(2937), - q = r(7908), - H = r(799); - t.exports = { - parse: a, - valid: h, - clean: u, - inc: f, - diff: c, - major: l, - minor: d, - patch: p, - prerelease: m, - compare: g, - rcompare: b, - compareLoose: y, - compareBuild: v, - sort: w, - rsort: _, - gt: M, - lt: E, - eq: S, - neq: x, - gte: A, - lte: k, - cmp: R, - coerce: B, - Comparator: I, - Range: T, - satisfies: P, - toComparators: O, - maxSatisfying: L, - minSatisfying: C, - minVersion: N, - validRange: j, - outside: U, - gtr: D, - ltr: z, - intersects: F, - simplifyRange: q, - subset: H, - SemVer: o, - re: i.re, - src: i.src, - tokens: i.t, - SEMVER_SPEC_VERSION: n.SEMVER_SPEC_VERSION, - RELEASE_TYPES: n.RELEASE_TYPES, - compareIdentifiers: s.compareIdentifiers, - rcompareIdentifiers: s.rcompareIdentifiers, - }; - }, - 3295: t => { - const e = Number.MAX_SAFE_INTEGER || 9007199254740991; - t.exports = { - MAX_LENGTH: 256, - MAX_SAFE_COMPONENT_LENGTH: 16, - MAX_SAFE_INTEGER: e, - RELEASE_TYPES: ['major', 'premajor', 'minor', 'preminor', 'patch', 'prepatch', 'prerelease'], - SEMVER_SPEC_VERSION: '2.0.0', - FLAG_INCLUDE_PRERELEASE: 1, - FLAG_LOOSE: 2, - }; - }, - 4225: t => { - const e = - 'object' == typeof process && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) - ? (...t) => console.error('SEMVER', ...t) - : () => {}; - t.exports = e; - }, - 6742: t => { - const e = /^[0-9]+$/, - r = (t, r) => { - const i = e.test(t), - n = e.test(r); - return i && n && ((t = +t), (r = +r)), t === r ? 0 : i && !n ? -1 : n && !i ? 1 : t < r ? -1 : 1; - }; - t.exports = { compareIdentifiers: r, rcompareIdentifiers: (t, e) => r(e, t) }; - }, - 2893: t => { - const e = Object.freeze({ loose: !0 }), - r = Object.freeze({}); - t.exports = t => (t ? ('object' != typeof t ? e : t) : r); - }, - 5765: (t, e, r) => { - const { MAX_SAFE_COMPONENT_LENGTH: i } = r(3295), - n = r(4225), - o = ((e = t.exports = {}).re = []), - s = (e.safeRe = []), - a = (e.src = []), - h = (e.t = {}); - let u = 0; - const f = (t, e, r) => { - const i = e.split('\\s*').join('\\s{0,1}').split('\\s+').join('\\s'), - f = u++; - n(t, f, e), (h[t] = f), (a[f] = e), (o[f] = new RegExp(e, r ? 'g' : void 0)), (s[f] = new RegExp(i, r ? 'g' : void 0)); - }; - f('NUMERICIDENTIFIER', '0|[1-9]\\d*'), - f('NUMERICIDENTIFIERLOOSE', '[0-9]+'), - f('NONNUMERICIDENTIFIER', '\\d*[a-zA-Z-][a-zA-Z0-9-]*'), - f('MAINVERSION', `(${a[h.NUMERICIDENTIFIER]})\\.(${a[h.NUMERICIDENTIFIER]})\\.(${a[h.NUMERICIDENTIFIER]})`), - f('MAINVERSIONLOOSE', `(${a[h.NUMERICIDENTIFIERLOOSE]})\\.(${a[h.NUMERICIDENTIFIERLOOSE]})\\.(${a[h.NUMERICIDENTIFIERLOOSE]})`), - f('PRERELEASEIDENTIFIER', `(?:${a[h.NUMERICIDENTIFIER]}|${a[h.NONNUMERICIDENTIFIER]})`), - f('PRERELEASEIDENTIFIERLOOSE', `(?:${a[h.NUMERICIDENTIFIERLOOSE]}|${a[h.NONNUMERICIDENTIFIER]})`), - f('PRERELEASE', `(?:-(${a[h.PRERELEASEIDENTIFIER]}(?:\\.${a[h.PRERELEASEIDENTIFIER]})*))`), - f('PRERELEASELOOSE', `(?:-?(${a[h.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${a[h.PRERELEASEIDENTIFIERLOOSE]})*))`), - f('BUILDIDENTIFIER', '[0-9A-Za-z-]+'), - f('BUILD', `(?:\\+(${a[h.BUILDIDENTIFIER]}(?:\\.${a[h.BUILDIDENTIFIER]})*))`), - f('FULLPLAIN', `v?${a[h.MAINVERSION]}${a[h.PRERELEASE]}?${a[h.BUILD]}?`), - f('FULL', `^${a[h.FULLPLAIN]}$`), - f('LOOSEPLAIN', `[v=\\s]*${a[h.MAINVERSIONLOOSE]}${a[h.PRERELEASELOOSE]}?${a[h.BUILD]}?`), - f('LOOSE', `^${a[h.LOOSEPLAIN]}$`), - f('GTLT', '((?:<|>)?=?)'), - f('XRANGEIDENTIFIERLOOSE', `${a[h.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`), - f('XRANGEIDENTIFIER', `${a[h.NUMERICIDENTIFIER]}|x|X|\\*`), - f( - 'XRANGEPLAIN', - `[v=\\s]*(${a[h.XRANGEIDENTIFIER]})(?:\\.(${a[h.XRANGEIDENTIFIER]})(?:\\.(${a[h.XRANGEIDENTIFIER]})(?:${a[h.PRERELEASE]})?${a[h.BUILD]}?)?)?` - ), - f( - 'XRANGEPLAINLOOSE', - `[v=\\s]*(${a[h.XRANGEIDENTIFIERLOOSE]})(?:\\.(${a[h.XRANGEIDENTIFIERLOOSE]})(?:\\.(${a[h.XRANGEIDENTIFIERLOOSE]})(?:${a[h.PRERELEASELOOSE]})?${a[h.BUILD]}?)?)?` - ), - f('XRANGE', `^${a[h.GTLT]}\\s*${a[h.XRANGEPLAIN]}$`), - f('XRANGELOOSE', `^${a[h.GTLT]}\\s*${a[h.XRANGEPLAINLOOSE]}$`), - f('COERCE', `(^|[^\\d])(\\d{1,${i}})(?:\\.(\\d{1,${i}}))?(?:\\.(\\d{1,${i}}))?(?:$|[^\\d])`), - f('COERCERTL', a[h.COERCE], !0), - f('LONETILDE', '(?:~>?)'), - f('TILDETRIM', `(\\s*)${a[h.LONETILDE]}\\s+`, !0), - (e.tildeTrimReplace = '$1~'), - f('TILDE', `^${a[h.LONETILDE]}${a[h.XRANGEPLAIN]}$`), - f('TILDELOOSE', `^${a[h.LONETILDE]}${a[h.XRANGEPLAINLOOSE]}$`), - f('LONECARET', '(?:\\^)'), - f('CARETTRIM', `(\\s*)${a[h.LONECARET]}\\s+`, !0), - (e.caretTrimReplace = '$1^'), - f('CARET', `^${a[h.LONECARET]}${a[h.XRANGEPLAIN]}$`), - f('CARETLOOSE', `^${a[h.LONECARET]}${a[h.XRANGEPLAINLOOSE]}$`), - f('COMPARATORLOOSE', `^${a[h.GTLT]}\\s*(${a[h.LOOSEPLAIN]})$|^$`), - f('COMPARATOR', `^${a[h.GTLT]}\\s*(${a[h.FULLPLAIN]})$|^$`), - f('COMPARATORTRIM', `(\\s*)${a[h.GTLT]}\\s*(${a[h.LOOSEPLAIN]}|${a[h.XRANGEPLAIN]})`, !0), - (e.comparatorTrimReplace = '$1$2$3'), - f('HYPHENRANGE', `^\\s*(${a[h.XRANGEPLAIN]})\\s+-\\s+(${a[h.XRANGEPLAIN]})\\s*$`), - f('HYPHENRANGELOOSE', `^\\s*(${a[h.XRANGEPLAINLOOSE]})\\s+-\\s+(${a[h.XRANGEPLAINLOOSE]})\\s*$`), - f('STAR', '(<|>)?=?\\s*\\*'), - f('GTE0', '^\\s*>=\\s*0\\.0\\.0\\s*$'), - f('GTE0PRE', '^\\s*>=\\s*0\\.0\\.0-0\\s*$'); - }, - 6062: (t, e, r) => { - 'use strict'; - const i = r(4411), - n = Symbol('max'), - o = Symbol('length'), - s = Symbol('lengthCalculator'), - a = Symbol('allowStale'), - h = Symbol('maxAge'), - u = Symbol('dispose'), - f = Symbol('noDisposeOnSet'), - c = Symbol('lruList'), - l = Symbol('cache'), - d = Symbol('updateAgeOnGet'), - p = () => 1, - m = (t, e, r) => { - const i = t[l].get(e); - if (i) { - const e = i.value; - if (g(t, e)) { - if ((y(t, i), !t[a])) return; - } else r && (t[d] && (i.value.now = Date.now()), t[c].unshiftNode(i)); - return e.value; - } - }, - g = (t, e) => { - if (!e || (!e.maxAge && !t[h])) return !1; - const r = Date.now() - e.now; - return e.maxAge ? r > e.maxAge : t[h] && r > t[h]; - }, - b = t => { - if (t[o] > t[n]) - for (let e = t[c].tail; t[o] > t[n] && null !== e; ) { - const r = e.prev; - y(t, e), (e = r); - } - }, - y = (t, e) => { - if (e) { - const r = e.value; - t[u] && t[u](r.key, r.value), (t[o] -= r.length), t[l].delete(r.key), t[c].removeNode(e); - } - }; - class v { - constructor(t, e, r, i, n) { - (this.key = t), (this.value = e), (this.length = r), (this.now = i), (this.maxAge = n || 0); - } - } - const w = (t, e, r, i) => { - let n = r.value; - g(t, n) && (y(t, r), t[a] || (n = void 0)), n && e.call(i, n.value, n.key, t); - }; - t.exports = class { - constructor(t) { - if (('number' == typeof t && (t = { max: t }), t || (t = {}), t.max && ('number' != typeof t.max || t.max < 0))) - throw new TypeError('max must be a non-negative number'); - this[n] = t.max || 1 / 0; - const e = t.length || p; - if (((this[s] = 'function' != typeof e ? p : e), (this[a] = t.stale || !1), t.maxAge && 'number' != typeof t.maxAge)) - throw new TypeError('maxAge must be a number'); - (this[h] = t.maxAge || 0), - (this[u] = t.dispose), - (this[f] = t.noDisposeOnSet || !1), - (this[d] = t.updateAgeOnGet || !1), - this.reset(); - } - set max(t) { - if ('number' != typeof t || t < 0) throw new TypeError('max must be a non-negative number'); - (this[n] = t || 1 / 0), b(this); - } - get max() { - return this[n]; - } - set allowStale(t) { - this[a] = !!t; - } - get allowStale() { - return this[a]; - } - set maxAge(t) { - if ('number' != typeof t) throw new TypeError('maxAge must be a non-negative number'); - (this[h] = t), b(this); - } - get maxAge() { - return this[h]; - } - set lengthCalculator(t) { - 'function' != typeof t && (t = p), - t !== this[s] && - ((this[s] = t), - (this[o] = 0), - this[c].forEach(t => { - (t.length = this[s](t.value, t.key)), (this[o] += t.length); - })), - b(this); - } - get lengthCalculator() { - return this[s]; - } - get length() { - return this[o]; - } - get itemCount() { - return this[c].length; - } - rforEach(t, e) { - e = e || this; - for (let r = this[c].tail; null !== r; ) { - const i = r.prev; - w(this, t, r, e), (r = i); - } - } - forEach(t, e) { - e = e || this; - for (let r = this[c].head; null !== r; ) { - const i = r.next; - w(this, t, r, e), (r = i); - } - } - keys() { - return this[c].toArray().map(t => t.key); - } - values() { - return this[c].toArray().map(t => t.value); - } - reset() { - this[u] && this[c] && this[c].length && this[c].forEach(t => this[u](t.key, t.value)), - (this[l] = new Map()), - (this[c] = new i()), - (this[o] = 0); - } - dump() { - return this[c] - .map(t => !g(this, t) && { k: t.key, v: t.value, e: t.now + (t.maxAge || 0) }) - .toArray() - .filter(t => t); - } - dumpLru() { - return this[c]; - } - set(t, e, r) { - if ((r = r || this[h]) && 'number' != typeof r) throw new TypeError('maxAge must be a number'); - const i = r ? Date.now() : 0, - a = this[s](e, t); - if (this[l].has(t)) { - if (a > this[n]) return y(this, this[l].get(t)), !1; - const s = this[l].get(t).value; - return ( - this[u] && (this[f] || this[u](t, s.value)), - (s.now = i), - (s.maxAge = r), - (s.value = e), - (this[o] += a - s.length), - (s.length = a), - this.get(t), - b(this), - !0 - ); - } - const d = new v(t, e, a, i, r); - return d.length > this[n] - ? (this[u] && this[u](t, e), !1) - : ((this[o] += d.length), this[c].unshift(d), this[l].set(t, this[c].head), b(this), !0); - } - has(t) { - if (!this[l].has(t)) return !1; - const e = this[l].get(t).value; - return !g(this, e); - } - get(t) { - return m(this, t, !0); - } - peek(t) { - return m(this, t, !1); - } - pop() { - const t = this[c].tail; - return t ? (y(this, t), t.value) : null; - } - del(t) { - y(this, this[l].get(t)); - } - load(t) { - this.reset(); - const e = Date.now(); - for (let r = t.length - 1; r >= 0; r--) { - const i = t[r], - n = i.e || 0; - if (0 === n) this.set(i.k, i.v); - else { - const t = n - e; - t > 0 && this.set(i.k, i.v, t); - } - } - } - prune() { - this[l].forEach((t, e) => m(this, e, !1)); - } - }; - }, - 7606: (t, e, r) => { - const i = r(6826); - t.exports = (t, e, r) => i(t, e, '>', r); - }, - 2937: (t, e, r) => { - const i = r(6902); - t.exports = (t, e, r) => ((t = new i(t, r)), (e = new i(e, r)), t.intersects(e, r)); - }, - 32: (t, e, r) => { - const i = r(6826); - t.exports = (t, e, r) => i(t, e, '<', r); - }, - 5775: (t, e, r) => { - const i = r(6376), - n = r(6902); - t.exports = (t, e, r) => { - let o = null, - s = null, - a = null; - try { - a = new n(e, r); - } catch (t) { - return null; - } - return ( - t.forEach(t => { - a.test(t) && ((o && -1 !== s.compare(t)) || ((o = t), (s = new i(o, r)))); - }), - o - ); - }; - }, - 1657: (t, e, r) => { - const i = r(6376), - n = r(6902); - t.exports = (t, e, r) => { - let o = null, - s = null, - a = null; - try { - a = new n(e, r); - } catch (t) { - return null; - } - return ( - t.forEach(t => { - a.test(t) && ((o && 1 !== s.compare(t)) || ((o = t), (s = new i(o, r)))); - }), - o - ); - }; - }, - 5316: (t, e, r) => { - const i = r(6376), - n = r(6902), - o = r(1312); - t.exports = (t, e) => { - t = new n(t, e); - let r = new i('0.0.0'); - if (t.test(r)) return r; - if (((r = new i('0.0.0-0')), t.test(r))) return r; - r = null; - for (let e = 0; e < t.set.length; ++e) { - const n = t.set[e]; - let s = null; - n.forEach(t => { - const e = new i(t.semver.version); - switch (t.operator) { - case '>': - 0 === e.prerelease.length ? e.patch++ : e.prerelease.push(0), (e.raw = e.format()); - case '': - case '>=': - (s && !o(e, s)) || (s = e); - break; - case '<': - case '<=': - break; - default: - throw new Error(`Unexpected operation: ${t.operator}`); - } - }), - !s || (r && !o(r, s)) || (r = s); - } - return r && t.test(r) ? r : null; - }; - }, - 6826: (t, e, r) => { - const i = r(6376), - n = r(2257), - { ANY: o } = n, - s = r(6902), - a = r(5712), - h = r(1312), - u = r(1544), - f = r(2056), - c = r(5903); - t.exports = (t, e, r, l) => { - let d, p, m, g, b; - switch (((t = new i(t, l)), (e = new s(e, l)), r)) { - case '>': - (d = h), (p = f), (m = u), (g = '>'), (b = '>='); - break; - case '<': - (d = u), (p = c), (m = h), (g = '<'), (b = '<='); - break; - default: - throw new TypeError('Must provide a hilo val of "<" or ">"'); - } - if (a(t, e, l)) return !1; - for (let r = 0; r < e.set.length; ++r) { - const i = e.set[r]; - let s = null, - a = null; - if ( - (i.forEach(t => { - t.semver === o && (t = new n('>=0.0.0')), - (s = s || t), - (a = a || t), - d(t.semver, s.semver, l) ? (s = t) : m(t.semver, a.semver, l) && (a = t); - }), - s.operator === g || s.operator === b) - ) - return !1; - if ((!a.operator || a.operator === g) && p(t, a.semver)) return !1; - if (a.operator === b && m(t, a.semver)) return !1; - } - return !0; - }; - }, - 7908: (t, e, r) => { - const i = r(5712), - n = r(6269); - t.exports = (t, e, r) => { - const o = []; - let s = null, - a = null; - const h = t.sort((t, e) => n(t, e, r)); - for (const t of h) i(t, e, r) ? ((a = t), s || (s = t)) : (a && o.push([s, a]), (a = null), (s = null)); - s && o.push([s, null]); - const u = []; - for (const [t, e] of o) - t === e - ? u.push(t) - : e || t !== h[0] - ? e - ? t === h[0] - ? u.push(`<=${e}`) - : u.push(`${t} - ${e}`) - : u.push(`>=${t}`) - : u.push('*'); - const f = u.join(' || '), - c = 'string' == typeof e.raw ? e.raw : String(e); - return f.length < c.length ? f : e; - }; - }, - 799: (t, e, r) => { - const i = r(6902), - n = r(2257), - { ANY: o } = n, - s = r(5712), - a = r(6269), - h = [new n('>=0.0.0-0')], - u = [new n('>=0.0.0')], - f = (t, e, r) => { - if (t === e) return !0; - if (1 === t.length && t[0].semver === o) { - if (1 === e.length && e[0].semver === o) return !0; - t = r.includePrerelease ? h : u; - } - if (1 === e.length && e[0].semver === o) { - if (r.includePrerelease) return !0; - e = u; - } - const i = new Set(); - let n, f, d, p, m, g, b; - for (const e of t) - '>' === e.operator || '>=' === e.operator - ? (n = c(n, e, r)) - : '<' === e.operator || '<=' === e.operator - ? (f = l(f, e, r)) - : i.add(e.semver); - if (i.size > 1) return null; - if (n && f) { - if (((d = a(n.semver, f.semver, r)), d > 0)) return null; - if (0 === d && ('>=' !== n.operator || '<=' !== f.operator)) return null; - } - for (const t of i) { - if (n && !s(t, String(n), r)) return null; - if (f && !s(t, String(f), r)) return null; - for (const i of e) if (!s(t, String(i), r)) return !1; - return !0; - } - let y = !(!f || r.includePrerelease || !f.semver.prerelease.length) && f.semver, - v = !(!n || r.includePrerelease || !n.semver.prerelease.length) && n.semver; - y && 1 === y.prerelease.length && '<' === f.operator && 0 === y.prerelease[0] && (y = !1); - for (const t of e) { - if (((b = b || '>' === t.operator || '>=' === t.operator), (g = g || '<' === t.operator || '<=' === t.operator), n)) - if ( - (v && - t.semver.prerelease && - t.semver.prerelease.length && - t.semver.major === v.major && - t.semver.minor === v.minor && - t.semver.patch === v.patch && - (v = !1), - '>' === t.operator || '>=' === t.operator) - ) { - if (((p = c(n, t, r)), p === t && p !== n)) return !1; - } else if ('>=' === n.operator && !s(n.semver, String(t), r)) return !1; - if (f) - if ( - (y && - t.semver.prerelease && - t.semver.prerelease.length && - t.semver.major === y.major && - t.semver.minor === y.minor && - t.semver.patch === y.patch && - (y = !1), - '<' === t.operator || '<=' === t.operator) - ) { - if (((m = l(f, t, r)), m === t && m !== f)) return !1; - } else if ('<=' === f.operator && !s(f.semver, String(t), r)) return !1; - if (!t.operator && (f || n) && 0 !== d) return !1; - } - return !((n && g && !f && 0 !== d) || (f && b && !n && 0 !== d) || v || y); - }, - c = (t, e, r) => { - if (!t) return e; - const i = a(t.semver, e.semver, r); - return i > 0 ? t : i < 0 || ('>' === e.operator && '>=' === t.operator) ? e : t; - }, - l = (t, e, r) => { - if (!t) return e; - const i = a(t.semver, e.semver, r); - return i < 0 ? t : i > 0 || ('<' === e.operator && '<=' === t.operator) ? e : t; - }; - t.exports = (t, e, r = {}) => { - if (t === e) return !0; - (t = new i(t, r)), (e = new i(e, r)); - let n = !1; - t: for (const i of t.set) { - for (const t of e.set) { - const e = f(i, t, r); - if (((n = n || null !== e), e)) continue t; - } - if (n) return !1; - } - return !0; - }; - }, - 1042: (t, e, r) => { - const i = r(6902); - t.exports = (t, e) => - new i(t, e).set.map(t => - t - .map(t => t.value) - .join(' ') - .trim() - .split(' ') - ); - }, - 9042: (t, e, r) => { - const i = r(6902); - t.exports = (t, e) => { - try { - return new i(t, e).range || '*'; - } catch (t) { - return null; - } - }; - }, - 2830: (t, e, r) => { - t.exports = n; - var i = r(7187).EventEmitter; - function n() { - i.call(this); - } - r(5717)(n, i), - (n.Readable = r(1451)), - (n.Writable = r(9909)), - (n.Duplex = r(6666)), - (n.Transform = r(4219)), - (n.PassThrough = r(5799)), - (n.Stream = n), - (n.prototype.pipe = function (t, e) { - var r = this; - function n(e) { - t.writable && !1 === t.write(e) && r.pause && r.pause(); - } - function o() { - r.readable && r.resume && r.resume(); - } - r.on('data', n), t.on('drain', o), t._isStdio || (e && !1 === e.end) || (r.on('end', a), r.on('close', h)); - var s = !1; - function a() { - s || ((s = !0), t.end()); - } - function h() { - s || ((s = !0), 'function' == typeof t.destroy && t.destroy()); - } - function u(t) { - if ((f(), 0 === i.listenerCount(this, 'error'))) throw t; - } - function f() { - r.removeListener('data', n), - t.removeListener('drain', o), - r.removeListener('end', a), - r.removeListener('close', h), - r.removeListener('error', u), - t.removeListener('error', u), - r.removeListener('end', f), - r.removeListener('close', f), - t.removeListener('close', f); - } - return r.on('error', u), t.on('error', u), r.on('end', f), r.on('close', f), t.on('close', f), t.emit('pipe', r), t; - }); - }, - 6941: (t, e, r) => { - var i = r(8764).Buffer, - n = - i.isEncoding || - function (t) { - switch (t && t.toLowerCase()) { - case 'hex': - case 'utf8': - case 'utf-8': - case 'ascii': - case 'binary': - case 'base64': - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - case 'raw': - return !0; - default: - return !1; - } - }, - o = (e.s = function (t) { - switch ( - ((this.encoding = (t || 'utf8').toLowerCase().replace(/[-_]/, '')), - (function (t) { - if (t && !n(t)) throw new Error('Unknown encoding: ' + t); - })(t), - this.encoding) - ) { - case 'utf8': - this.surrogateSize = 3; - break; - case 'ucs2': - case 'utf16le': - (this.surrogateSize = 2), (this.detectIncompleteChar = a); - break; - case 'base64': - (this.surrogateSize = 3), (this.detectIncompleteChar = h); - break; - default: - return void (this.write = s); - } - (this.charBuffer = new i(6)), (this.charReceived = 0), (this.charLength = 0); - }); - function s(t) { - return t.toString(this.encoding); - } - function a(t) { - (this.charReceived = t.length % 2), (this.charLength = this.charReceived ? 2 : 0); - } - function h(t) { - (this.charReceived = t.length % 3), (this.charLength = this.charReceived ? 3 : 0); - } - (o.prototype.write = function (t) { - for (var e = ''; this.charLength; ) { - var r = t.length >= this.charLength - this.charReceived ? this.charLength - this.charReceived : t.length; - if ((t.copy(this.charBuffer, this.charReceived, 0, r), (this.charReceived += r), this.charReceived < this.charLength)) - return ''; - if ( - ((t = t.slice(r, t.length)), - !( - (i = (e = this.charBuffer.slice(0, this.charLength).toString(this.encoding)).charCodeAt(e.length - 1)) >= 55296 && - i <= 56319 - )) - ) { - if (((this.charReceived = this.charLength = 0), 0 === t.length)) return e; - break; - } - (this.charLength += this.surrogateSize), (e = ''); - } - this.detectIncompleteChar(t); - var i, - n = t.length; - if ( - (this.charLength && (t.copy(this.charBuffer, 0, t.length - this.charReceived, n), (n -= this.charReceived)), - (n = (e += t.toString(this.encoding, 0, n)).length - 1), - (i = e.charCodeAt(n)) >= 55296 && i <= 56319) - ) { - var o = this.surrogateSize; - return ( - (this.charLength += o), - (this.charReceived += o), - this.charBuffer.copy(this.charBuffer, o, 0, o), - t.copy(this.charBuffer, 0, 0, o), - e.substring(0, n) - ); - } - return e; - }), - (o.prototype.detectIncompleteChar = function (t) { - for (var e = t.length >= 3 ? 3 : t.length; e > 0; e--) { - var r = t[t.length - e]; - if (1 == e && r >> 5 == 6) { - this.charLength = 2; - break; - } - if (e <= 2 && r >> 4 == 14) { - this.charLength = 3; - break; - } - if (e <= 3 && r >> 3 == 30) { - this.charLength = 4; - break; - } - } - this.charReceived = e; - }), - (o.prototype.end = function (t) { - var e = ''; - if ((t && t.length && (e = this.write(t)), this.charReceived)) { - var r = this.charReceived, - i = this.charBuffer, - n = this.encoding; - e += i.slice(0, r).toString(n); - } - return e; - }); - }, - 6885: function (t) { - !(function (e, r) { - 'use strict'; - t.exports ? (t.exports = r()) : (e.nacl || (e.nacl = {}), (e.nacl.util = r())); - })(this, function () { - 'use strict'; - var t = {}; - function e(t) { - if (!/^(?:[A-Za-z0-9+\/]{2}[A-Za-z0-9+\/]{2})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.test(t)) - throw new TypeError('invalid encoding'); - } - return ( - (t.decodeUTF8 = function (t) { - if ('string' != typeof t) throw new TypeError('expected string'); - var e, - r = unescape(encodeURIComponent(t)), - i = new Uint8Array(r.length); - for (e = 0; e < r.length; e++) i[e] = r.charCodeAt(e); - return i; - }), - (t.encodeUTF8 = function (t) { - var e, - r = []; - for (e = 0; e < t.length; e++) r.push(String.fromCharCode(t[e])); - return decodeURIComponent(escape(r.join(''))); - }), - 'undefined' == typeof atob - ? void 0 !== Buffer.from - ? ((t.encodeBase64 = function (t) { - return Buffer.from(t).toString('base64'); - }), - (t.decodeBase64 = function (t) { - return e(t), new Uint8Array(Array.prototype.slice.call(Buffer.from(t, 'base64'), 0)); - })) - : ((t.encodeBase64 = function (t) { - return new Buffer(t).toString('base64'); - }), - (t.decodeBase64 = function (t) { - return e(t), new Uint8Array(Array.prototype.slice.call(new Buffer(t, 'base64'), 0)); - })) - : ((t.encodeBase64 = function (t) { - var e, - r = [], - i = t.length; - for (e = 0; e < i; e++) r.push(String.fromCharCode(t[e])); - return btoa(r.join('')); - }), - (t.decodeBase64 = function (t) { - e(t); - var r, - i = atob(t), - n = new Uint8Array(i.length); - for (r = 0; r < i.length; r++) n[r] = i.charCodeAt(r); - return n; - })), - t - ); - }); - }, - 780: (t, e, r) => { - !(function (t) { - 'use strict'; - var e = function (t) { - var e, - r = new Float64Array(16); - if (t) for (e = 0; e < t.length; e++) r[e] = t[e]; - return r; - }, - i = function () { - throw new Error('no PRNG'); - }, - n = new Uint8Array(16), - o = new Uint8Array(32); - o[0] = 9; - var s = e(), - a = e([1]), - h = e([56129, 1]), - u = e([30883, 4953, 19914, 30187, 55467, 16705, 2637, 112, 59544, 30585, 16505, 36039, 65139, 11119, 27886, 20995]), - f = e([61785, 9906, 39828, 60374, 45398, 33411, 5274, 224, 53552, 61171, 33010, 6542, 64743, 22239, 55772, 9222]), - c = e([54554, 36645, 11616, 51542, 42930, 38181, 51040, 26924, 56412, 64982, 57905, 49316, 21502, 52590, 14035, 8553]), - l = e([26200, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214]), - d = e([41136, 18958, 6951, 50414, 58488, 44335, 6150, 12099, 55207, 15867, 153, 11085, 57099, 20417, 9344, 11139]); - function p(t, e, r, i) { - (t[e] = (r >> 24) & 255), - (t[e + 1] = (r >> 16) & 255), - (t[e + 2] = (r >> 8) & 255), - (t[e + 3] = 255 & r), - (t[e + 4] = (i >> 24) & 255), - (t[e + 5] = (i >> 16) & 255), - (t[e + 6] = (i >> 8) & 255), - (t[e + 7] = 255 & i); - } - function m(t, e, r, i, n) { - var o, - s = 0; - for (o = 0; o < n; o++) s |= t[e + o] ^ r[i + o]; - return (1 & ((s - 1) >>> 8)) - 1; - } - function g(t, e, r, i) { - return m(t, e, r, i, 16); - } - function b(t, e, r, i) { - return m(t, e, r, i, 32); - } - function y(t, e, r, i) { - !(function (t, e, r, i) { - for ( - var n, - o = (255 & i[0]) | ((255 & i[1]) << 8) | ((255 & i[2]) << 16) | ((255 & i[3]) << 24), - s = (255 & r[0]) | ((255 & r[1]) << 8) | ((255 & r[2]) << 16) | ((255 & r[3]) << 24), - a = (255 & r[4]) | ((255 & r[5]) << 8) | ((255 & r[6]) << 16) | ((255 & r[7]) << 24), - h = (255 & r[8]) | ((255 & r[9]) << 8) | ((255 & r[10]) << 16) | ((255 & r[11]) << 24), - u = (255 & r[12]) | ((255 & r[13]) << 8) | ((255 & r[14]) << 16) | ((255 & r[15]) << 24), - f = (255 & i[4]) | ((255 & i[5]) << 8) | ((255 & i[6]) << 16) | ((255 & i[7]) << 24), - c = (255 & e[0]) | ((255 & e[1]) << 8) | ((255 & e[2]) << 16) | ((255 & e[3]) << 24), - l = (255 & e[4]) | ((255 & e[5]) << 8) | ((255 & e[6]) << 16) | ((255 & e[7]) << 24), - d = (255 & e[8]) | ((255 & e[9]) << 8) | ((255 & e[10]) << 16) | ((255 & e[11]) << 24), - p = (255 & e[12]) | ((255 & e[13]) << 8) | ((255 & e[14]) << 16) | ((255 & e[15]) << 24), - m = (255 & i[8]) | ((255 & i[9]) << 8) | ((255 & i[10]) << 16) | ((255 & i[11]) << 24), - g = (255 & r[16]) | ((255 & r[17]) << 8) | ((255 & r[18]) << 16) | ((255 & r[19]) << 24), - b = (255 & r[20]) | ((255 & r[21]) << 8) | ((255 & r[22]) << 16) | ((255 & r[23]) << 24), - y = (255 & r[24]) | ((255 & r[25]) << 8) | ((255 & r[26]) << 16) | ((255 & r[27]) << 24), - v = (255 & r[28]) | ((255 & r[29]) << 8) | ((255 & r[30]) << 16) | ((255 & r[31]) << 24), - w = (255 & i[12]) | ((255 & i[13]) << 8) | ((255 & i[14]) << 16) | ((255 & i[15]) << 24), - _ = o, - M = s, - E = a, - S = h, - x = u, - A = f, - k = c, - R = l, - B = d, - I = p, - T = m, - P = g, - O = b, - L = y, - C = v, - N = w, - j = 0; - j < 20; - j += 2 - ) - (_ ^= - ((n = - ((O ^= - ((n = ((B ^= ((n = ((x ^= ((n = (_ + O) | 0) << 7) | (n >>> 25)) + _) | 0) << 9) | (n >>> 23)) + x) | 0) << 13) | - (n >>> 19)) + - B) | - 0) << - 18) | - (n >>> 14)), - (A ^= - ((n = - ((M ^= - ((n = ((L ^= ((n = ((I ^= ((n = (A + M) | 0) << 7) | (n >>> 25)) + A) | 0) << 9) | (n >>> 23)) + I) | 0) << 13) | - (n >>> 19)) + - L) | - 0) << - 18) | - (n >>> 14)), - (T ^= - ((n = - ((k ^= - ((n = ((E ^= ((n = ((C ^= ((n = (T + k) | 0) << 7) | (n >>> 25)) + T) | 0) << 9) | (n >>> 23)) + C) | 0) << 13) | - (n >>> 19)) + - E) | - 0) << - 18) | - (n >>> 14)), - (N ^= - ((n = - ((P ^= - ((n = ((R ^= ((n = ((S ^= ((n = (N + P) | 0) << 7) | (n >>> 25)) + N) | 0) << 9) | (n >>> 23)) + S) | 0) << 13) | - (n >>> 19)) + - R) | - 0) << - 18) | - (n >>> 14)), - (_ ^= - ((n = - ((S ^= - ((n = ((E ^= ((n = ((M ^= ((n = (_ + S) | 0) << 7) | (n >>> 25)) + _) | 0) << 9) | (n >>> 23)) + M) | 0) << 13) | - (n >>> 19)) + - E) | - 0) << - 18) | - (n >>> 14)), - (A ^= - ((n = - ((x ^= - ((n = ((R ^= ((n = ((k ^= ((n = (A + x) | 0) << 7) | (n >>> 25)) + A) | 0) << 9) | (n >>> 23)) + k) | 0) << 13) | - (n >>> 19)) + - R) | - 0) << - 18) | - (n >>> 14)), - (T ^= - ((n = - ((I ^= - ((n = ((B ^= ((n = ((P ^= ((n = (T + I) | 0) << 7) | (n >>> 25)) + T) | 0) << 9) | (n >>> 23)) + P) | 0) << 13) | - (n >>> 19)) + - B) | - 0) << - 18) | - (n >>> 14)), - (N ^= - ((n = - ((C ^= - ((n = ((L ^= ((n = ((O ^= ((n = (N + C) | 0) << 7) | (n >>> 25)) + N) | 0) << 9) | (n >>> 23)) + O) | 0) << 13) | - (n >>> 19)) + - L) | - 0) << - 18) | - (n >>> 14)); - (_ = (_ + o) | 0), - (M = (M + s) | 0), - (E = (E + a) | 0), - (S = (S + h) | 0), - (x = (x + u) | 0), - (A = (A + f) | 0), - (k = (k + c) | 0), - (R = (R + l) | 0), - (B = (B + d) | 0), - (I = (I + p) | 0), - (T = (T + m) | 0), - (P = (P + g) | 0), - (O = (O + b) | 0), - (L = (L + y) | 0), - (C = (C + v) | 0), - (N = (N + w) | 0), - (t[0] = (_ >>> 0) & 255), - (t[1] = (_ >>> 8) & 255), - (t[2] = (_ >>> 16) & 255), - (t[3] = (_ >>> 24) & 255), - (t[4] = (M >>> 0) & 255), - (t[5] = (M >>> 8) & 255), - (t[6] = (M >>> 16) & 255), - (t[7] = (M >>> 24) & 255), - (t[8] = (E >>> 0) & 255), - (t[9] = (E >>> 8) & 255), - (t[10] = (E >>> 16) & 255), - (t[11] = (E >>> 24) & 255), - (t[12] = (S >>> 0) & 255), - (t[13] = (S >>> 8) & 255), - (t[14] = (S >>> 16) & 255), - (t[15] = (S >>> 24) & 255), - (t[16] = (x >>> 0) & 255), - (t[17] = (x >>> 8) & 255), - (t[18] = (x >>> 16) & 255), - (t[19] = (x >>> 24) & 255), - (t[20] = (A >>> 0) & 255), - (t[21] = (A >>> 8) & 255), - (t[22] = (A >>> 16) & 255), - (t[23] = (A >>> 24) & 255), - (t[24] = (k >>> 0) & 255), - (t[25] = (k >>> 8) & 255), - (t[26] = (k >>> 16) & 255), - (t[27] = (k >>> 24) & 255), - (t[28] = (R >>> 0) & 255), - (t[29] = (R >>> 8) & 255), - (t[30] = (R >>> 16) & 255), - (t[31] = (R >>> 24) & 255), - (t[32] = (B >>> 0) & 255), - (t[33] = (B >>> 8) & 255), - (t[34] = (B >>> 16) & 255), - (t[35] = (B >>> 24) & 255), - (t[36] = (I >>> 0) & 255), - (t[37] = (I >>> 8) & 255), - (t[38] = (I >>> 16) & 255), - (t[39] = (I >>> 24) & 255), - (t[40] = (T >>> 0) & 255), - (t[41] = (T >>> 8) & 255), - (t[42] = (T >>> 16) & 255), - (t[43] = (T >>> 24) & 255), - (t[44] = (P >>> 0) & 255), - (t[45] = (P >>> 8) & 255), - (t[46] = (P >>> 16) & 255), - (t[47] = (P >>> 24) & 255), - (t[48] = (O >>> 0) & 255), - (t[49] = (O >>> 8) & 255), - (t[50] = (O >>> 16) & 255), - (t[51] = (O >>> 24) & 255), - (t[52] = (L >>> 0) & 255), - (t[53] = (L >>> 8) & 255), - (t[54] = (L >>> 16) & 255), - (t[55] = (L >>> 24) & 255), - (t[56] = (C >>> 0) & 255), - (t[57] = (C >>> 8) & 255), - (t[58] = (C >>> 16) & 255), - (t[59] = (C >>> 24) & 255), - (t[60] = (N >>> 0) & 255), - (t[61] = (N >>> 8) & 255), - (t[62] = (N >>> 16) & 255), - (t[63] = (N >>> 24) & 255); - })(t, e, r, i); - } - function v(t, e, r, i) { - !(function (t, e, r, i) { - for ( - var n, - o = (255 & i[0]) | ((255 & i[1]) << 8) | ((255 & i[2]) << 16) | ((255 & i[3]) << 24), - s = (255 & r[0]) | ((255 & r[1]) << 8) | ((255 & r[2]) << 16) | ((255 & r[3]) << 24), - a = (255 & r[4]) | ((255 & r[5]) << 8) | ((255 & r[6]) << 16) | ((255 & r[7]) << 24), - h = (255 & r[8]) | ((255 & r[9]) << 8) | ((255 & r[10]) << 16) | ((255 & r[11]) << 24), - u = (255 & r[12]) | ((255 & r[13]) << 8) | ((255 & r[14]) << 16) | ((255 & r[15]) << 24), - f = (255 & i[4]) | ((255 & i[5]) << 8) | ((255 & i[6]) << 16) | ((255 & i[7]) << 24), - c = (255 & e[0]) | ((255 & e[1]) << 8) | ((255 & e[2]) << 16) | ((255 & e[3]) << 24), - l = (255 & e[4]) | ((255 & e[5]) << 8) | ((255 & e[6]) << 16) | ((255 & e[7]) << 24), - d = (255 & e[8]) | ((255 & e[9]) << 8) | ((255 & e[10]) << 16) | ((255 & e[11]) << 24), - p = (255 & e[12]) | ((255 & e[13]) << 8) | ((255 & e[14]) << 16) | ((255 & e[15]) << 24), - m = (255 & i[8]) | ((255 & i[9]) << 8) | ((255 & i[10]) << 16) | ((255 & i[11]) << 24), - g = (255 & r[16]) | ((255 & r[17]) << 8) | ((255 & r[18]) << 16) | ((255 & r[19]) << 24), - b = (255 & r[20]) | ((255 & r[21]) << 8) | ((255 & r[22]) << 16) | ((255 & r[23]) << 24), - y = (255 & r[24]) | ((255 & r[25]) << 8) | ((255 & r[26]) << 16) | ((255 & r[27]) << 24), - v = (255 & r[28]) | ((255 & r[29]) << 8) | ((255 & r[30]) << 16) | ((255 & r[31]) << 24), - w = (255 & i[12]) | ((255 & i[13]) << 8) | ((255 & i[14]) << 16) | ((255 & i[15]) << 24), - _ = 0; - _ < 20; - _ += 2 - ) - (o ^= - ((n = - ((b ^= - ((n = ((d ^= ((n = ((u ^= ((n = (o + b) | 0) << 7) | (n >>> 25)) + o) | 0) << 9) | (n >>> 23)) + u) | 0) << 13) | - (n >>> 19)) + - d) | - 0) << - 18) | - (n >>> 14)), - (f ^= - ((n = - ((s ^= - ((n = ((y ^= ((n = ((p ^= ((n = (f + s) | 0) << 7) | (n >>> 25)) + f) | 0) << 9) | (n >>> 23)) + p) | 0) << 13) | - (n >>> 19)) + - y) | - 0) << - 18) | - (n >>> 14)), - (m ^= - ((n = - ((c ^= - ((n = ((a ^= ((n = ((v ^= ((n = (m + c) | 0) << 7) | (n >>> 25)) + m) | 0) << 9) | (n >>> 23)) + v) | 0) << 13) | - (n >>> 19)) + - a) | - 0) << - 18) | - (n >>> 14)), - (w ^= - ((n = - ((g ^= - ((n = ((l ^= ((n = ((h ^= ((n = (w + g) | 0) << 7) | (n >>> 25)) + w) | 0) << 9) | (n >>> 23)) + h) | 0) << 13) | - (n >>> 19)) + - l) | - 0) << - 18) | - (n >>> 14)), - (o ^= - ((n = - ((h ^= - ((n = ((a ^= ((n = ((s ^= ((n = (o + h) | 0) << 7) | (n >>> 25)) + o) | 0) << 9) | (n >>> 23)) + s) | 0) << 13) | - (n >>> 19)) + - a) | - 0) << - 18) | - (n >>> 14)), - (f ^= - ((n = - ((u ^= - ((n = ((l ^= ((n = ((c ^= ((n = (f + u) | 0) << 7) | (n >>> 25)) + f) | 0) << 9) | (n >>> 23)) + c) | 0) << 13) | - (n >>> 19)) + - l) | - 0) << - 18) | - (n >>> 14)), - (m ^= - ((n = - ((p ^= - ((n = ((d ^= ((n = ((g ^= ((n = (m + p) | 0) << 7) | (n >>> 25)) + m) | 0) << 9) | (n >>> 23)) + g) | 0) << 13) | - (n >>> 19)) + - d) | - 0) << - 18) | - (n >>> 14)), - (w ^= - ((n = - ((v ^= - ((n = ((y ^= ((n = ((b ^= ((n = (w + v) | 0) << 7) | (n >>> 25)) + w) | 0) << 9) | (n >>> 23)) + b) | 0) << 13) | - (n >>> 19)) + - y) | - 0) << - 18) | - (n >>> 14)); - (t[0] = (o >>> 0) & 255), - (t[1] = (o >>> 8) & 255), - (t[2] = (o >>> 16) & 255), - (t[3] = (o >>> 24) & 255), - (t[4] = (f >>> 0) & 255), - (t[5] = (f >>> 8) & 255), - (t[6] = (f >>> 16) & 255), - (t[7] = (f >>> 24) & 255), - (t[8] = (m >>> 0) & 255), - (t[9] = (m >>> 8) & 255), - (t[10] = (m >>> 16) & 255), - (t[11] = (m >>> 24) & 255), - (t[12] = (w >>> 0) & 255), - (t[13] = (w >>> 8) & 255), - (t[14] = (w >>> 16) & 255), - (t[15] = (w >>> 24) & 255), - (t[16] = (c >>> 0) & 255), - (t[17] = (c >>> 8) & 255), - (t[18] = (c >>> 16) & 255), - (t[19] = (c >>> 24) & 255), - (t[20] = (l >>> 0) & 255), - (t[21] = (l >>> 8) & 255), - (t[22] = (l >>> 16) & 255), - (t[23] = (l >>> 24) & 255), - (t[24] = (d >>> 0) & 255), - (t[25] = (d >>> 8) & 255), - (t[26] = (d >>> 16) & 255), - (t[27] = (d >>> 24) & 255), - (t[28] = (p >>> 0) & 255), - (t[29] = (p >>> 8) & 255), - (t[30] = (p >>> 16) & 255), - (t[31] = (p >>> 24) & 255); - })(t, e, r, i); - } - var w = new Uint8Array([101, 120, 112, 97, 110, 100, 32, 51, 50, 45, 98, 121, 116, 101, 32, 107]); - function _(t, e, r, i, n, o, s) { - var a, - h, - u = new Uint8Array(16), - f = new Uint8Array(64); - for (h = 0; h < 16; h++) u[h] = 0; - for (h = 0; h < 8; h++) u[h] = o[h]; - for (; n >= 64; ) { - for (y(f, u, s, w), h = 0; h < 64; h++) t[e + h] = r[i + h] ^ f[h]; - for (a = 1, h = 8; h < 16; h++) (a = (a + (255 & u[h])) | 0), (u[h] = 255 & a), (a >>>= 8); - (n -= 64), (e += 64), (i += 64); - } - if (n > 0) for (y(f, u, s, w), h = 0; h < n; h++) t[e + h] = r[i + h] ^ f[h]; - return 0; - } - function M(t, e, r, i, n) { - var o, - s, - a = new Uint8Array(16), - h = new Uint8Array(64); - for (s = 0; s < 16; s++) a[s] = 0; - for (s = 0; s < 8; s++) a[s] = i[s]; - for (; r >= 64; ) { - for (y(h, a, n, w), s = 0; s < 64; s++) t[e + s] = h[s]; - for (o = 1, s = 8; s < 16; s++) (o = (o + (255 & a[s])) | 0), (a[s] = 255 & o), (o >>>= 8); - (r -= 64), (e += 64); - } - if (r > 0) for (y(h, a, n, w), s = 0; s < r; s++) t[e + s] = h[s]; - return 0; - } - function E(t, e, r, i, n) { - var o = new Uint8Array(32); - v(o, i, n, w); - for (var s = new Uint8Array(8), a = 0; a < 8; a++) s[a] = i[a + 16]; - return M(t, e, r, s, o); - } - function S(t, e, r, i, n, o, s) { - var a = new Uint8Array(32); - v(a, o, s, w); - for (var h = new Uint8Array(8), u = 0; u < 8; u++) h[u] = o[u + 16]; - return _(t, e, r, i, n, h, a); - } - var x = function (t) { - var e, r, i, n, o, s, a, h; - (this.buffer = new Uint8Array(16)), - (this.r = new Uint16Array(10)), - (this.h = new Uint16Array(10)), - (this.pad = new Uint16Array(8)), - (this.leftover = 0), - (this.fin = 0), - (e = (255 & t[0]) | ((255 & t[1]) << 8)), - (this.r[0] = 8191 & e), - (r = (255 & t[2]) | ((255 & t[3]) << 8)), - (this.r[1] = 8191 & ((e >>> 13) | (r << 3))), - (i = (255 & t[4]) | ((255 & t[5]) << 8)), - (this.r[2] = 7939 & ((r >>> 10) | (i << 6))), - (n = (255 & t[6]) | ((255 & t[7]) << 8)), - (this.r[3] = 8191 & ((i >>> 7) | (n << 9))), - (o = (255 & t[8]) | ((255 & t[9]) << 8)), - (this.r[4] = 255 & ((n >>> 4) | (o << 12))), - (this.r[5] = (o >>> 1) & 8190), - (s = (255 & t[10]) | ((255 & t[11]) << 8)), - (this.r[6] = 8191 & ((o >>> 14) | (s << 2))), - (a = (255 & t[12]) | ((255 & t[13]) << 8)), - (this.r[7] = 8065 & ((s >>> 11) | (a << 5))), - (h = (255 & t[14]) | ((255 & t[15]) << 8)), - (this.r[8] = 8191 & ((a >>> 8) | (h << 8))), - (this.r[9] = (h >>> 5) & 127), - (this.pad[0] = (255 & t[16]) | ((255 & t[17]) << 8)), - (this.pad[1] = (255 & t[18]) | ((255 & t[19]) << 8)), - (this.pad[2] = (255 & t[20]) | ((255 & t[21]) << 8)), - (this.pad[3] = (255 & t[22]) | ((255 & t[23]) << 8)), - (this.pad[4] = (255 & t[24]) | ((255 & t[25]) << 8)), - (this.pad[5] = (255 & t[26]) | ((255 & t[27]) << 8)), - (this.pad[6] = (255 & t[28]) | ((255 & t[29]) << 8)), - (this.pad[7] = (255 & t[30]) | ((255 & t[31]) << 8)); - }; - function A(t, e, r, i, n, o) { - var s = new x(o); - return s.update(r, i, n), s.finish(t, e), 0; - } - function k(t, e, r, i, n, o) { - var s = new Uint8Array(16); - return A(s, 0, r, i, n, o), g(t, e, s, 0); - } - function R(t, e, r, i, n) { - var o; - if (r < 32) return -1; - for (S(t, 0, e, 0, r, i, n), A(t, 16, t, 32, r - 32, t), o = 0; o < 16; o++) t[o] = 0; - return 0; - } - function B(t, e, r, i, n) { - var o, - s = new Uint8Array(32); - if (r < 32) return -1; - if ((E(s, 0, 32, i, n), 0 !== k(e, 16, e, 32, r - 32, s))) return -1; - for (S(t, 0, e, 0, r, i, n), o = 0; o < 32; o++) t[o] = 0; - return 0; - } - function I(t, e) { - var r; - for (r = 0; r < 16; r++) t[r] = 0 | e[r]; - } - function T(t) { - var e, - r, - i = 1; - for (e = 0; e < 16; e++) (r = t[e] + i + 65535), (i = Math.floor(r / 65536)), (t[e] = r - 65536 * i); - t[0] += i - 1 + 37 * (i - 1); - } - function P(t, e, r) { - for (var i, n = ~(r - 1), o = 0; o < 16; o++) (i = n & (t[o] ^ e[o])), (t[o] ^= i), (e[o] ^= i); - } - function O(t, r) { - var i, - n, - o, - s = e(), - a = e(); - for (i = 0; i < 16; i++) a[i] = r[i]; - for (T(a), T(a), T(a), n = 0; n < 2; n++) { - for (s[0] = a[0] - 65517, i = 1; i < 15; i++) (s[i] = a[i] - 65535 - ((s[i - 1] >> 16) & 1)), (s[i - 1] &= 65535); - (s[15] = a[15] - 32767 - ((s[14] >> 16) & 1)), (o = (s[15] >> 16) & 1), (s[14] &= 65535), P(a, s, 1 - o); - } - for (i = 0; i < 16; i++) (t[2 * i] = 255 & a[i]), (t[2 * i + 1] = a[i] >> 8); - } - function L(t, e) { - var r = new Uint8Array(32), - i = new Uint8Array(32); - return O(r, t), O(i, e), b(r, 0, i, 0); - } - function C(t) { - var e = new Uint8Array(32); - return O(e, t), 1 & e[0]; - } - function N(t, e) { - var r; - for (r = 0; r < 16; r++) t[r] = e[2 * r] + (e[2 * r + 1] << 8); - t[15] &= 32767; - } - function j(t, e, r) { - for (var i = 0; i < 16; i++) t[i] = e[i] + r[i]; - } - function U(t, e, r) { - for (var i = 0; i < 16; i++) t[i] = e[i] - r[i]; - } - function D(t, e, r) { - var i, - n, - o = 0, - s = 0, - a = 0, - h = 0, - u = 0, - f = 0, - c = 0, - l = 0, - d = 0, - p = 0, - m = 0, - g = 0, - b = 0, - y = 0, - v = 0, - w = 0, - _ = 0, - M = 0, - E = 0, - S = 0, - x = 0, - A = 0, - k = 0, - R = 0, - B = 0, - I = 0, - T = 0, - P = 0, - O = 0, - L = 0, - C = 0, - N = r[0], - j = r[1], - U = r[2], - D = r[3], - z = r[4], - F = r[5], - q = r[6], - H = r[7], - $ = r[8], - Z = r[9], - G = r[10], - V = r[11], - W = r[12], - K = r[13], - Y = r[14], - J = r[15]; - (o += (i = e[0]) * N), - (s += i * j), - (a += i * U), - (h += i * D), - (u += i * z), - (f += i * F), - (c += i * q), - (l += i * H), - (d += i * $), - (p += i * Z), - (m += i * G), - (g += i * V), - (b += i * W), - (y += i * K), - (v += i * Y), - (w += i * J), - (s += (i = e[1]) * N), - (a += i * j), - (h += i * U), - (u += i * D), - (f += i * z), - (c += i * F), - (l += i * q), - (d += i * H), - (p += i * $), - (m += i * Z), - (g += i * G), - (b += i * V), - (y += i * W), - (v += i * K), - (w += i * Y), - (_ += i * J), - (a += (i = e[2]) * N), - (h += i * j), - (u += i * U), - (f += i * D), - (c += i * z), - (l += i * F), - (d += i * q), - (p += i * H), - (m += i * $), - (g += i * Z), - (b += i * G), - (y += i * V), - (v += i * W), - (w += i * K), - (_ += i * Y), - (M += i * J), - (h += (i = e[3]) * N), - (u += i * j), - (f += i * U), - (c += i * D), - (l += i * z), - (d += i * F), - (p += i * q), - (m += i * H), - (g += i * $), - (b += i * Z), - (y += i * G), - (v += i * V), - (w += i * W), - (_ += i * K), - (M += i * Y), - (E += i * J), - (u += (i = e[4]) * N), - (f += i * j), - (c += i * U), - (l += i * D), - (d += i * z), - (p += i * F), - (m += i * q), - (g += i * H), - (b += i * $), - (y += i * Z), - (v += i * G), - (w += i * V), - (_ += i * W), - (M += i * K), - (E += i * Y), - (S += i * J), - (f += (i = e[5]) * N), - (c += i * j), - (l += i * U), - (d += i * D), - (p += i * z), - (m += i * F), - (g += i * q), - (b += i * H), - (y += i * $), - (v += i * Z), - (w += i * G), - (_ += i * V), - (M += i * W), - (E += i * K), - (S += i * Y), - (x += i * J), - (c += (i = e[6]) * N), - (l += i * j), - (d += i * U), - (p += i * D), - (m += i * z), - (g += i * F), - (b += i * q), - (y += i * H), - (v += i * $), - (w += i * Z), - (_ += i * G), - (M += i * V), - (E += i * W), - (S += i * K), - (x += i * Y), - (A += i * J), - (l += (i = e[7]) * N), - (d += i * j), - (p += i * U), - (m += i * D), - (g += i * z), - (b += i * F), - (y += i * q), - (v += i * H), - (w += i * $), - (_ += i * Z), - (M += i * G), - (E += i * V), - (S += i * W), - (x += i * K), - (A += i * Y), - (k += i * J), - (d += (i = e[8]) * N), - (p += i * j), - (m += i * U), - (g += i * D), - (b += i * z), - (y += i * F), - (v += i * q), - (w += i * H), - (_ += i * $), - (M += i * Z), - (E += i * G), - (S += i * V), - (x += i * W), - (A += i * K), - (k += i * Y), - (R += i * J), - (p += (i = e[9]) * N), - (m += i * j), - (g += i * U), - (b += i * D), - (y += i * z), - (v += i * F), - (w += i * q), - (_ += i * H), - (M += i * $), - (E += i * Z), - (S += i * G), - (x += i * V), - (A += i * W), - (k += i * K), - (R += i * Y), - (B += i * J), - (m += (i = e[10]) * N), - (g += i * j), - (b += i * U), - (y += i * D), - (v += i * z), - (w += i * F), - (_ += i * q), - (M += i * H), - (E += i * $), - (S += i * Z), - (x += i * G), - (A += i * V), - (k += i * W), - (R += i * K), - (B += i * Y), - (I += i * J), - (g += (i = e[11]) * N), - (b += i * j), - (y += i * U), - (v += i * D), - (w += i * z), - (_ += i * F), - (M += i * q), - (E += i * H), - (S += i * $), - (x += i * Z), - (A += i * G), - (k += i * V), - (R += i * W), - (B += i * K), - (I += i * Y), - (T += i * J), - (b += (i = e[12]) * N), - (y += i * j), - (v += i * U), - (w += i * D), - (_ += i * z), - (M += i * F), - (E += i * q), - (S += i * H), - (x += i * $), - (A += i * Z), - (k += i * G), - (R += i * V), - (B += i * W), - (I += i * K), - (T += i * Y), - (P += i * J), - (y += (i = e[13]) * N), - (v += i * j), - (w += i * U), - (_ += i * D), - (M += i * z), - (E += i * F), - (S += i * q), - (x += i * H), - (A += i * $), - (k += i * Z), - (R += i * G), - (B += i * V), - (I += i * W), - (T += i * K), - (P += i * Y), - (O += i * J), - (v += (i = e[14]) * N), - (w += i * j), - (_ += i * U), - (M += i * D), - (E += i * z), - (S += i * F), - (x += i * q), - (A += i * H), - (k += i * $), - (R += i * Z), - (B += i * G), - (I += i * V), - (T += i * W), - (P += i * K), - (O += i * Y), - (L += i * J), - (w += (i = e[15]) * N), - (s += 38 * (M += i * U)), - (a += 38 * (E += i * D)), - (h += 38 * (S += i * z)), - (u += 38 * (x += i * F)), - (f += 38 * (A += i * q)), - (c += 38 * (k += i * H)), - (l += 38 * (R += i * $)), - (d += 38 * (B += i * Z)), - (p += 38 * (I += i * G)), - (m += 38 * (T += i * V)), - (g += 38 * (P += i * W)), - (b += 38 * (O += i * K)), - (y += 38 * (L += i * Y)), - (v += 38 * (C += i * J)), - (o = (i = (o += 38 * (_ += i * j)) + (n = 1) + 65535) - 65536 * (n = Math.floor(i / 65536))), - (s = (i = s + n + 65535) - 65536 * (n = Math.floor(i / 65536))), - (a = (i = a + n + 65535) - 65536 * (n = Math.floor(i / 65536))), - (h = (i = h + n + 65535) - 65536 * (n = Math.floor(i / 65536))), - (u = (i = u + n + 65535) - 65536 * (n = Math.floor(i / 65536))), - (f = (i = f + n + 65535) - 65536 * (n = Math.floor(i / 65536))), - (c = (i = c + n + 65535) - 65536 * (n = Math.floor(i / 65536))), - (l = (i = l + n + 65535) - 65536 * (n = Math.floor(i / 65536))), - (d = (i = d + n + 65535) - 65536 * (n = Math.floor(i / 65536))), - (p = (i = p + n + 65535) - 65536 * (n = Math.floor(i / 65536))), - (m = (i = m + n + 65535) - 65536 * (n = Math.floor(i / 65536))), - (g = (i = g + n + 65535) - 65536 * (n = Math.floor(i / 65536))), - (b = (i = b + n + 65535) - 65536 * (n = Math.floor(i / 65536))), - (y = (i = y + n + 65535) - 65536 * (n = Math.floor(i / 65536))), - (v = (i = v + n + 65535) - 65536 * (n = Math.floor(i / 65536))), - (w = (i = w + n + 65535) - 65536 * (n = Math.floor(i / 65536))), - (o = (i = (o += n - 1 + 37 * (n - 1)) + (n = 1) + 65535) - 65536 * (n = Math.floor(i / 65536))), - (s = (i = s + n + 65535) - 65536 * (n = Math.floor(i / 65536))), - (a = (i = a + n + 65535) - 65536 * (n = Math.floor(i / 65536))), - (h = (i = h + n + 65535) - 65536 * (n = Math.floor(i / 65536))), - (u = (i = u + n + 65535) - 65536 * (n = Math.floor(i / 65536))), - (f = (i = f + n + 65535) - 65536 * (n = Math.floor(i / 65536))), - (c = (i = c + n + 65535) - 65536 * (n = Math.floor(i / 65536))), - (l = (i = l + n + 65535) - 65536 * (n = Math.floor(i / 65536))), - (d = (i = d + n + 65535) - 65536 * (n = Math.floor(i / 65536))), - (p = (i = p + n + 65535) - 65536 * (n = Math.floor(i / 65536))), - (m = (i = m + n + 65535) - 65536 * (n = Math.floor(i / 65536))), - (g = (i = g + n + 65535) - 65536 * (n = Math.floor(i / 65536))), - (b = (i = b + n + 65535) - 65536 * (n = Math.floor(i / 65536))), - (y = (i = y + n + 65535) - 65536 * (n = Math.floor(i / 65536))), - (v = (i = v + n + 65535) - 65536 * (n = Math.floor(i / 65536))), - (w = (i = w + n + 65535) - 65536 * (n = Math.floor(i / 65536))), - (o += n - 1 + 37 * (n - 1)), - (t[0] = o), - (t[1] = s), - (t[2] = a), - (t[3] = h), - (t[4] = u), - (t[5] = f), - (t[6] = c), - (t[7] = l), - (t[8] = d), - (t[9] = p), - (t[10] = m), - (t[11] = g), - (t[12] = b), - (t[13] = y), - (t[14] = v), - (t[15] = w); - } - function z(t, e) { - D(t, e, e); - } - function F(t, r) { - var i, - n = e(); - for (i = 0; i < 16; i++) n[i] = r[i]; - for (i = 253; i >= 0; i--) z(n, n), 2 !== i && 4 !== i && D(n, n, r); - for (i = 0; i < 16; i++) t[i] = n[i]; - } - function q(t, r) { - var i, - n = e(); - for (i = 0; i < 16; i++) n[i] = r[i]; - for (i = 250; i >= 0; i--) z(n, n), 1 !== i && D(n, n, r); - for (i = 0; i < 16; i++) t[i] = n[i]; - } - function H(t, r, i) { - var n, - o, - s = new Uint8Array(32), - a = new Float64Array(80), - u = e(), - f = e(), - c = e(), - l = e(), - d = e(), - p = e(); - for (o = 0; o < 31; o++) s[o] = r[o]; - for (s[31] = (127 & r[31]) | 64, s[0] &= 248, N(a, i), o = 0; o < 16; o++) (f[o] = a[o]), (l[o] = u[o] = c[o] = 0); - for (u[0] = l[0] = 1, o = 254; o >= 0; --o) - P(u, f, (n = (s[o >>> 3] >>> (7 & o)) & 1)), - P(c, l, n), - j(d, u, c), - U(u, u, c), - j(c, f, l), - U(f, f, l), - z(l, d), - z(p, u), - D(u, c, u), - D(c, f, d), - j(d, u, c), - U(u, u, c), - z(f, u), - U(c, l, p), - D(u, c, h), - j(u, u, l), - D(c, c, u), - D(u, l, p), - D(l, f, a), - z(f, d), - P(u, f, n), - P(c, l, n); - for (o = 0; o < 16; o++) (a[o + 16] = u[o]), (a[o + 32] = c[o]), (a[o + 48] = f[o]), (a[o + 64] = l[o]); - var m = a.subarray(32), - g = a.subarray(16); - return F(m, m), D(g, g, m), O(t, g), 0; - } - function $(t, e) { - return H(t, e, o); - } - function Z(t, e) { - return i(e, 32), $(t, e); - } - function G(t, e, r) { - var i = new Uint8Array(32); - return H(i, r, e), v(t, n, i, w); - } - (x.prototype.blocks = function (t, e, r) { - for ( - var i, - n, - o, - s, - a, - h, - u, - f, - c, - l, - d, - p, - m, - g, - b, - y, - v, - w, - _, - M = this.fin ? 0 : 2048, - E = this.h[0], - S = this.h[1], - x = this.h[2], - A = this.h[3], - k = this.h[4], - R = this.h[5], - B = this.h[6], - I = this.h[7], - T = this.h[8], - P = this.h[9], - O = this.r[0], - L = this.r[1], - C = this.r[2], - N = this.r[3], - j = this.r[4], - U = this.r[5], - D = this.r[6], - z = this.r[7], - F = this.r[8], - q = this.r[9]; - r >= 16; - - ) - (l = c = 0), - (l += (E += 8191 & (i = (255 & t[e + 0]) | ((255 & t[e + 1]) << 8))) * O), - (l += (S += 8191 & ((i >>> 13) | ((n = (255 & t[e + 2]) | ((255 & t[e + 3]) << 8)) << 3))) * (5 * q)), - (l += (x += 8191 & ((n >>> 10) | ((o = (255 & t[e + 4]) | ((255 & t[e + 5]) << 8)) << 6))) * (5 * F)), - (l += (A += 8191 & ((o >>> 7) | ((s = (255 & t[e + 6]) | ((255 & t[e + 7]) << 8)) << 9))) * (5 * z)), - (c = (l += (k += 8191 & ((s >>> 4) | ((a = (255 & t[e + 8]) | ((255 & t[e + 9]) << 8)) << 12))) * (5 * D)) >>> 13), - (l &= 8191), - (l += (R += (a >>> 1) & 8191) * (5 * U)), - (l += (B += 8191 & ((a >>> 14) | ((h = (255 & t[e + 10]) | ((255 & t[e + 11]) << 8)) << 2))) * (5 * j)), - (l += (I += 8191 & ((h >>> 11) | ((u = (255 & t[e + 12]) | ((255 & t[e + 13]) << 8)) << 5))) * (5 * N)), - (l += (T += 8191 & ((u >>> 8) | ((f = (255 & t[e + 14]) | ((255 & t[e + 15]) << 8)) << 8))) * (5 * C)), - (d = c += (l += (P += (f >>> 5) | M) * (5 * L)) >>> 13), - (d += E * L), - (d += S * O), - (d += x * (5 * q)), - (d += A * (5 * F)), - (c = (d += k * (5 * z)) >>> 13), - (d &= 8191), - (d += R * (5 * D)), - (d += B * (5 * U)), - (d += I * (5 * j)), - (d += T * (5 * N)), - (c += (d += P * (5 * C)) >>> 13), - (d &= 8191), - (p = c), - (p += E * C), - (p += S * L), - (p += x * O), - (p += A * (5 * q)), - (c = (p += k * (5 * F)) >>> 13), - (p &= 8191), - (p += R * (5 * z)), - (p += B * (5 * D)), - (p += I * (5 * U)), - (p += T * (5 * j)), - (m = c += (p += P * (5 * N)) >>> 13), - (m += E * N), - (m += S * C), - (m += x * L), - (m += A * O), - (c = (m += k * (5 * q)) >>> 13), - (m &= 8191), - (m += R * (5 * F)), - (m += B * (5 * z)), - (m += I * (5 * D)), - (m += T * (5 * U)), - (g = c += (m += P * (5 * j)) >>> 13), - (g += E * j), - (g += S * N), - (g += x * C), - (g += A * L), - (c = (g += k * O) >>> 13), - (g &= 8191), - (g += R * (5 * q)), - (g += B * (5 * F)), - (g += I * (5 * z)), - (g += T * (5 * D)), - (b = c += (g += P * (5 * U)) >>> 13), - (b += E * U), - (b += S * j), - (b += x * N), - (b += A * C), - (c = (b += k * L) >>> 13), - (b &= 8191), - (b += R * O), - (b += B * (5 * q)), - (b += I * (5 * F)), - (b += T * (5 * z)), - (y = c += (b += P * (5 * D)) >>> 13), - (y += E * D), - (y += S * U), - (y += x * j), - (y += A * N), - (c = (y += k * C) >>> 13), - (y &= 8191), - (y += R * L), - (y += B * O), - (y += I * (5 * q)), - (y += T * (5 * F)), - (v = c += (y += P * (5 * z)) >>> 13), - (v += E * z), - (v += S * D), - (v += x * U), - (v += A * j), - (c = (v += k * N) >>> 13), - (v &= 8191), - (v += R * C), - (v += B * L), - (v += I * O), - (v += T * (5 * q)), - (w = c += (v += P * (5 * F)) >>> 13), - (w += E * F), - (w += S * z), - (w += x * D), - (w += A * U), - (c = (w += k * j) >>> 13), - (w &= 8191), - (w += R * N), - (w += B * C), - (w += I * L), - (w += T * O), - (_ = c += (w += P * (5 * q)) >>> 13), - (_ += E * q), - (_ += S * F), - (_ += x * z), - (_ += A * D), - (c = (_ += k * U) >>> 13), - (_ &= 8191), - (_ += R * j), - (_ += B * N), - (_ += I * C), - (_ += T * L), - (E = l = 8191 & (c = ((c = (((c += (_ += P * O) >>> 13) << 2) + c) | 0) + (l &= 8191)) | 0)), - (S = d += c >>>= 13), - (x = p &= 8191), - (A = m &= 8191), - (k = g &= 8191), - (R = b &= 8191), - (B = y &= 8191), - (I = v &= 8191), - (T = w &= 8191), - (P = _ &= 8191), - (e += 16), - (r -= 16); - (this.h[0] = E), - (this.h[1] = S), - (this.h[2] = x), - (this.h[3] = A), - (this.h[4] = k), - (this.h[5] = R), - (this.h[6] = B), - (this.h[7] = I), - (this.h[8] = T), - (this.h[9] = P); - }), - (x.prototype.finish = function (t, e) { - var r, - i, - n, - o, - s = new Uint16Array(10); - if (this.leftover) { - for (o = this.leftover, this.buffer[o++] = 1; o < 16; o++) this.buffer[o] = 0; - (this.fin = 1), this.blocks(this.buffer, 0, 16); - } - for (r = this.h[1] >>> 13, this.h[1] &= 8191, o = 2; o < 10; o++) - (this.h[o] += r), (r = this.h[o] >>> 13), (this.h[o] &= 8191); - for ( - this.h[0] += 5 * r, - r = this.h[0] >>> 13, - this.h[0] &= 8191, - this.h[1] += r, - r = this.h[1] >>> 13, - this.h[1] &= 8191, - this.h[2] += r, - s[0] = this.h[0] + 5, - r = s[0] >>> 13, - s[0] &= 8191, - o = 1; - o < 10; - o++ - ) - (s[o] = this.h[o] + r), (r = s[o] >>> 13), (s[o] &= 8191); - for (s[9] -= 8192, i = (1 ^ r) - 1, o = 0; o < 10; o++) s[o] &= i; - for (i = ~i, o = 0; o < 10; o++) this.h[o] = (this.h[o] & i) | s[o]; - for ( - this.h[0] = 65535 & (this.h[0] | (this.h[1] << 13)), - this.h[1] = 65535 & ((this.h[1] >>> 3) | (this.h[2] << 10)), - this.h[2] = 65535 & ((this.h[2] >>> 6) | (this.h[3] << 7)), - this.h[3] = 65535 & ((this.h[3] >>> 9) | (this.h[4] << 4)), - this.h[4] = 65535 & ((this.h[4] >>> 12) | (this.h[5] << 1) | (this.h[6] << 14)), - this.h[5] = 65535 & ((this.h[6] >>> 2) | (this.h[7] << 11)), - this.h[6] = 65535 & ((this.h[7] >>> 5) | (this.h[8] << 8)), - this.h[7] = 65535 & ((this.h[8] >>> 8) | (this.h[9] << 5)), - n = this.h[0] + this.pad[0], - this.h[0] = 65535 & n, - o = 1; - o < 8; - o++ - ) - (n = (((this.h[o] + this.pad[o]) | 0) + (n >>> 16)) | 0), (this.h[o] = 65535 & n); - (t[e + 0] = (this.h[0] >>> 0) & 255), - (t[e + 1] = (this.h[0] >>> 8) & 255), - (t[e + 2] = (this.h[1] >>> 0) & 255), - (t[e + 3] = (this.h[1] >>> 8) & 255), - (t[e + 4] = (this.h[2] >>> 0) & 255), - (t[e + 5] = (this.h[2] >>> 8) & 255), - (t[e + 6] = (this.h[3] >>> 0) & 255), - (t[e + 7] = (this.h[3] >>> 8) & 255), - (t[e + 8] = (this.h[4] >>> 0) & 255), - (t[e + 9] = (this.h[4] >>> 8) & 255), - (t[e + 10] = (this.h[5] >>> 0) & 255), - (t[e + 11] = (this.h[5] >>> 8) & 255), - (t[e + 12] = (this.h[6] >>> 0) & 255), - (t[e + 13] = (this.h[6] >>> 8) & 255), - (t[e + 14] = (this.h[7] >>> 0) & 255), - (t[e + 15] = (this.h[7] >>> 8) & 255); - }), - (x.prototype.update = function (t, e, r) { - var i, n; - if (this.leftover) { - for ((n = 16 - this.leftover) > r && (n = r), i = 0; i < n; i++) this.buffer[this.leftover + i] = t[e + i]; - if (((r -= n), (e += n), (this.leftover += n), this.leftover < 16)) return; - this.blocks(this.buffer, 0, 16), (this.leftover = 0); - } - if ((r >= 16 && ((n = r - (r % 16)), this.blocks(t, e, n), (e += n), (r -= n)), r)) { - for (i = 0; i < r; i++) this.buffer[this.leftover + i] = t[e + i]; - this.leftover += r; - } - }); - var V = R, - W = B, - K = [ - 1116352408, 3609767458, 1899447441, 602891725, 3049323471, 3964484399, 3921009573, 2173295548, 961987163, 4081628472, - 1508970993, 3053834265, 2453635748, 2937671579, 2870763221, 3664609560, 3624381080, 2734883394, 310598401, 1164996542, - 607225278, 1323610764, 1426881987, 3590304994, 1925078388, 4068182383, 2162078206, 991336113, 2614888103, 633803317, - 3248222580, 3479774868, 3835390401, 2666613458, 4022224774, 944711139, 264347078, 2341262773, 604807628, 2007800933, - 770255983, 1495990901, 1249150122, 1856431235, 1555081692, 3175218132, 1996064986, 2198950837, 2554220882, 3999719339, - 2821834349, 766784016, 2952996808, 2566594879, 3210313671, 3203337956, 3336571891, 1034457026, 3584528711, 2466948901, - 113926993, 3758326383, 338241895, 168717936, 666307205, 1188179964, 773529912, 1546045734, 1294757372, 1522805485, 1396182291, - 2643833823, 1695183700, 2343527390, 1986661051, 1014477480, 2177026350, 1206759142, 2456956037, 344077627, 2730485921, - 1290863460, 2820302411, 3158454273, 3259730800, 3505952657, 3345764771, 106217008, 3516065817, 3606008344, 3600352804, - 1432725776, 4094571909, 1467031594, 275423344, 851169720, 430227734, 3100823752, 506948616, 1363258195, 659060556, 3750685593, - 883997877, 3785050280, 958139571, 3318307427, 1322822218, 3812723403, 1537002063, 2003034995, 1747873779, 3602036899, - 1955562222, 1575990012, 2024104815, 1125592928, 2227730452, 2716904306, 2361852424, 442776044, 2428436474, 593698344, - 2756734187, 3733110249, 3204031479, 2999351573, 3329325298, 3815920427, 3391569614, 3928383900, 3515267271, 566280711, - 3940187606, 3454069534, 4118630271, 4000239992, 116418474, 1914138554, 174292421, 2731055270, 289380356, 3203993006, - 460393269, 320620315, 685471733, 587496836, 852142971, 1086792851, 1017036298, 365543100, 1126000580, 2618297676, 1288033470, - 3409855158, 1501505948, 4234509866, 1607167915, 987167468, 1816402316, 1246189591, - ]; - function Y(t, e, r, i) { - for ( - var n, - o, - s, - a, - h, - u, - f, - c, - l, - d, - p, - m, - g, - b, - y, - v, - w, - _, - M, - E, - S, - x, - A, - k, - R, - B, - I = new Int32Array(16), - T = new Int32Array(16), - P = t[0], - O = t[1], - L = t[2], - C = t[3], - N = t[4], - j = t[5], - U = t[6], - D = t[7], - z = e[0], - F = e[1], - q = e[2], - H = e[3], - $ = e[4], - Z = e[5], - G = e[6], - V = e[7], - W = 0; - i >= 128; - - ) { - for (M = 0; M < 16; M++) - (E = 8 * M + W), - (I[M] = (r[E + 0] << 24) | (r[E + 1] << 16) | (r[E + 2] << 8) | r[E + 3]), - (T[M] = (r[E + 4] << 24) | (r[E + 5] << 16) | (r[E + 6] << 8) | r[E + 7]); - for (M = 0; M < 80; M++) - if ( - ((n = P), - (o = O), - (s = L), - (a = C), - (h = N), - (u = j), - (f = U), - (l = z), - (d = F), - (p = q), - (m = H), - (g = $), - (b = Z), - (y = G), - (A = 65535 & (x = V)), - (k = x >>> 16), - (R = 65535 & (S = D)), - (B = S >>> 16), - (A += 65535 & (x = (($ >>> 14) | (N << 18)) ^ (($ >>> 18) | (N << 14)) ^ ((N >>> 9) | ($ << 23)))), - (k += x >>> 16), - (R += 65535 & (S = ((N >>> 14) | ($ << 18)) ^ ((N >>> 18) | ($ << 14)) ^ (($ >>> 9) | (N << 23)))), - (B += S >>> 16), - (A += 65535 & (x = ($ & Z) ^ (~$ & G))), - (k += x >>> 16), - (R += 65535 & (S = (N & j) ^ (~N & U))), - (B += S >>> 16), - (S = K[2 * M]), - (A += 65535 & (x = K[2 * M + 1])), - (k += x >>> 16), - (R += 65535 & S), - (B += S >>> 16), - (S = I[M % 16]), - (k += (x = T[M % 16]) >>> 16), - (R += 65535 & S), - (B += S >>> 16), - (R += (k += (A += 65535 & x) >>> 16) >>> 16), - (A = 65535 & (x = _ = (65535 & A) | (k << 16))), - (k = x >>> 16), - (R = 65535 & (S = w = (65535 & R) | ((B += R >>> 16) << 16))), - (B = S >>> 16), - (A += 65535 & (x = ((z >>> 28) | (P << 4)) ^ ((P >>> 2) | (z << 30)) ^ ((P >>> 7) | (z << 25)))), - (k += x >>> 16), - (R += 65535 & (S = ((P >>> 28) | (z << 4)) ^ ((z >>> 2) | (P << 30)) ^ ((z >>> 7) | (P << 25)))), - (B += S >>> 16), - (k += (x = (z & F) ^ (z & q) ^ (F & q)) >>> 16), - (R += 65535 & (S = (P & O) ^ (P & L) ^ (O & L))), - (B += S >>> 16), - (c = (65535 & (R += (k += (A += 65535 & x) >>> 16) >>> 16)) | ((B += R >>> 16) << 16)), - (v = (65535 & A) | (k << 16)), - (A = 65535 & (x = m)), - (k = x >>> 16), - (R = 65535 & (S = a)), - (B = S >>> 16), - (k += (x = _) >>> 16), - (R += 65535 & (S = w)), - (B += S >>> 16), - (O = n), - (L = o), - (C = s), - (N = a = (65535 & (R += (k += (A += 65535 & x) >>> 16) >>> 16)) | ((B += R >>> 16) << 16)), - (j = h), - (U = u), - (D = f), - (P = c), - (F = l), - (q = d), - (H = p), - ($ = m = (65535 & A) | (k << 16)), - (Z = g), - (G = b), - (V = y), - (z = v), - M % 16 == 15) - ) - for (E = 0; E < 16; E++) - (S = I[E]), - (A = 65535 & (x = T[E])), - (k = x >>> 16), - (R = 65535 & S), - (B = S >>> 16), - (S = I[(E + 9) % 16]), - (A += 65535 & (x = T[(E + 9) % 16])), - (k += x >>> 16), - (R += 65535 & S), - (B += S >>> 16), - (w = I[(E + 1) % 16]), - (A += 65535 & (x = (((_ = T[(E + 1) % 16]) >>> 1) | (w << 31)) ^ ((_ >>> 8) | (w << 24)) ^ ((_ >>> 7) | (w << 25)))), - (k += x >>> 16), - (R += 65535 & (S = ((w >>> 1) | (_ << 31)) ^ ((w >>> 8) | (_ << 24)) ^ (w >>> 7))), - (B += S >>> 16), - (w = I[(E + 14) % 16]), - (k += (x = (((_ = T[(E + 14) % 16]) >>> 19) | (w << 13)) ^ ((w >>> 29) | (_ << 3)) ^ ((_ >>> 6) | (w << 26))) >>> 16), - (R += 65535 & (S = ((w >>> 19) | (_ << 13)) ^ ((_ >>> 29) | (w << 3)) ^ (w >>> 6))), - (B += S >>> 16), - (B += (R += (k += (A += 65535 & x) >>> 16) >>> 16) >>> 16), - (I[E] = (65535 & R) | (B << 16)), - (T[E] = (65535 & A) | (k << 16)); - (A = 65535 & (x = z)), - (k = x >>> 16), - (R = 65535 & (S = P)), - (B = S >>> 16), - (S = t[0]), - (k += (x = e[0]) >>> 16), - (R += 65535 & S), - (B += S >>> 16), - (B += (R += (k += (A += 65535 & x) >>> 16) >>> 16) >>> 16), - (t[0] = P = (65535 & R) | (B << 16)), - (e[0] = z = (65535 & A) | (k << 16)), - (A = 65535 & (x = F)), - (k = x >>> 16), - (R = 65535 & (S = O)), - (B = S >>> 16), - (S = t[1]), - (k += (x = e[1]) >>> 16), - (R += 65535 & S), - (B += S >>> 16), - (B += (R += (k += (A += 65535 & x) >>> 16) >>> 16) >>> 16), - (t[1] = O = (65535 & R) | (B << 16)), - (e[1] = F = (65535 & A) | (k << 16)), - (A = 65535 & (x = q)), - (k = x >>> 16), - (R = 65535 & (S = L)), - (B = S >>> 16), - (S = t[2]), - (k += (x = e[2]) >>> 16), - (R += 65535 & S), - (B += S >>> 16), - (B += (R += (k += (A += 65535 & x) >>> 16) >>> 16) >>> 16), - (t[2] = L = (65535 & R) | (B << 16)), - (e[2] = q = (65535 & A) | (k << 16)), - (A = 65535 & (x = H)), - (k = x >>> 16), - (R = 65535 & (S = C)), - (B = S >>> 16), - (S = t[3]), - (k += (x = e[3]) >>> 16), - (R += 65535 & S), - (B += S >>> 16), - (B += (R += (k += (A += 65535 & x) >>> 16) >>> 16) >>> 16), - (t[3] = C = (65535 & R) | (B << 16)), - (e[3] = H = (65535 & A) | (k << 16)), - (A = 65535 & (x = $)), - (k = x >>> 16), - (R = 65535 & (S = N)), - (B = S >>> 16), - (S = t[4]), - (k += (x = e[4]) >>> 16), - (R += 65535 & S), - (B += S >>> 16), - (B += (R += (k += (A += 65535 & x) >>> 16) >>> 16) >>> 16), - (t[4] = N = (65535 & R) | (B << 16)), - (e[4] = $ = (65535 & A) | (k << 16)), - (A = 65535 & (x = Z)), - (k = x >>> 16), - (R = 65535 & (S = j)), - (B = S >>> 16), - (S = t[5]), - (k += (x = e[5]) >>> 16), - (R += 65535 & S), - (B += S >>> 16), - (B += (R += (k += (A += 65535 & x) >>> 16) >>> 16) >>> 16), - (t[5] = j = (65535 & R) | (B << 16)), - (e[5] = Z = (65535 & A) | (k << 16)), - (A = 65535 & (x = G)), - (k = x >>> 16), - (R = 65535 & (S = U)), - (B = S >>> 16), - (S = t[6]), - (k += (x = e[6]) >>> 16), - (R += 65535 & S), - (B += S >>> 16), - (B += (R += (k += (A += 65535 & x) >>> 16) >>> 16) >>> 16), - (t[6] = U = (65535 & R) | (B << 16)), - (e[6] = G = (65535 & A) | (k << 16)), - (A = 65535 & (x = V)), - (k = x >>> 16), - (R = 65535 & (S = D)), - (B = S >>> 16), - (S = t[7]), - (k += (x = e[7]) >>> 16), - (R += 65535 & S), - (B += S >>> 16), - (B += (R += (k += (A += 65535 & x) >>> 16) >>> 16) >>> 16), - (t[7] = D = (65535 & R) | (B << 16)), - (e[7] = V = (65535 & A) | (k << 16)), - (W += 128), - (i -= 128); - } - return i; - } - function J(t, e, r) { - var i, - n = new Int32Array(8), - o = new Int32Array(8), - s = new Uint8Array(256), - a = r; - for ( - n[0] = 1779033703, - n[1] = 3144134277, - n[2] = 1013904242, - n[3] = 2773480762, - n[4] = 1359893119, - n[5] = 2600822924, - n[6] = 528734635, - n[7] = 1541459225, - o[0] = 4089235720, - o[1] = 2227873595, - o[2] = 4271175723, - o[3] = 1595750129, - o[4] = 2917565137, - o[5] = 725511199, - o[6] = 4215389547, - o[7] = 327033209, - Y(n, o, e, r), - r %= 128, - i = 0; - i < r; - i++ - ) - s[i] = e[a - r + i]; - for ( - s[r] = 128, s[(r = 256 - 128 * (r < 112 ? 1 : 0)) - 9] = 0, p(s, r - 8, (a / 536870912) | 0, a << 3), Y(n, o, s, r), i = 0; - i < 8; - i++ - ) - p(t, 8 * i, n[i], o[i]); - return 0; - } - function X(t, r) { - var i = e(), - n = e(), - o = e(), - s = e(), - a = e(), - h = e(), - u = e(), - c = e(), - l = e(); - U(i, t[1], t[0]), - U(l, r[1], r[0]), - D(i, i, l), - j(n, t[0], t[1]), - j(l, r[0], r[1]), - D(n, n, l), - D(o, t[3], r[3]), - D(o, o, f), - D(s, t[2], r[2]), - j(s, s, s), - U(a, n, i), - U(h, s, o), - j(u, s, o), - j(c, n, i), - D(t[0], a, h), - D(t[1], c, u), - D(t[2], u, h), - D(t[3], a, c); - } - function Q(t, e, r) { - var i; - for (i = 0; i < 4; i++) P(t[i], e[i], r); - } - function tt(t, r) { - var i = e(), - n = e(), - o = e(); - F(o, r[2]), D(i, r[0], o), D(n, r[1], o), O(t, n), (t[31] ^= C(i) << 7); - } - function et(t, e, r) { - var i, n; - for (I(t[0], s), I(t[1], a), I(t[2], a), I(t[3], s), n = 255; n >= 0; --n) - Q(t, e, (i = (r[(n / 8) | 0] >> (7 & n)) & 1)), X(e, t), X(t, t), Q(t, e, i); - } - function rt(t, r) { - var i = [e(), e(), e(), e()]; - I(i[0], c), I(i[1], l), I(i[2], a), D(i[3], c, l), et(t, i, r); - } - function it(t, r, n) { - var o, - s = new Uint8Array(64), - a = [e(), e(), e(), e()]; - for (n || i(r, 32), J(s, r, 32), s[0] &= 248, s[31] &= 127, s[31] |= 64, rt(a, s), tt(t, a), o = 0; o < 32; o++) - r[o + 32] = t[o]; - return 0; - } - var nt = new Float64Array([ - 237, 211, 245, 92, 26, 99, 18, 88, 214, 156, 247, 162, 222, 249, 222, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, - ]); - function ot(t, e) { - var r, i, n, o; - for (i = 63; i >= 32; --i) { - for (r = 0, n = i - 32, o = i - 12; n < o; ++n) - (e[n] += r - 16 * e[i] * nt[n - (i - 32)]), (r = Math.floor((e[n] + 128) / 256)), (e[n] -= 256 * r); - (e[n] += r), (e[i] = 0); - } - for (r = 0, n = 0; n < 32; n++) (e[n] += r - (e[31] >> 4) * nt[n]), (r = e[n] >> 8), (e[n] &= 255); - for (n = 0; n < 32; n++) e[n] -= r * nt[n]; - for (i = 0; i < 32; i++) (e[i + 1] += e[i] >> 8), (t[i] = 255 & e[i]); - } - function st(t) { - var e, - r = new Float64Array(64); - for (e = 0; e < 64; e++) r[e] = t[e]; - for (e = 0; e < 64; e++) t[e] = 0; - ot(t, r); - } - function at(t, r, i, n) { - var o, - s, - a = new Uint8Array(64), - h = new Uint8Array(64), - u = new Uint8Array(64), - f = new Float64Array(64), - c = [e(), e(), e(), e()]; - J(a, n, 32), (a[0] &= 248), (a[31] &= 127), (a[31] |= 64); - var l = i + 64; - for (o = 0; o < i; o++) t[64 + o] = r[o]; - for (o = 0; o < 32; o++) t[32 + o] = a[32 + o]; - for (J(u, t.subarray(32), i + 32), st(u), rt(c, u), tt(t, c), o = 32; o < 64; o++) t[o] = n[o]; - for (J(h, t, i + 64), st(h), o = 0; o < 64; o++) f[o] = 0; - for (o = 0; o < 32; o++) f[o] = u[o]; - for (o = 0; o < 32; o++) for (s = 0; s < 32; s++) f[o + s] += h[o] * a[s]; - return ot(t.subarray(32), f), l; - } - function ht(t, r, i, n) { - var o, - h = new Uint8Array(32), - f = new Uint8Array(64), - c = [e(), e(), e(), e()], - l = [e(), e(), e(), e()]; - if (i < 64) return -1; - if ( - (function (t, r) { - var i = e(), - n = e(), - o = e(), - h = e(), - f = e(), - c = e(), - l = e(); - return ( - I(t[2], a), - N(t[1], r), - z(o, t[1]), - D(h, o, u), - U(o, o, t[2]), - j(h, t[2], h), - z(f, h), - z(c, f), - D(l, c, f), - D(i, l, o), - D(i, i, h), - q(i, i), - D(i, i, o), - D(i, i, h), - D(i, i, h), - D(t[0], i, h), - z(n, t[0]), - D(n, n, h), - L(n, o) && D(t[0], t[0], d), - z(n, t[0]), - D(n, n, h), - L(n, o) ? -1 : (C(t[0]) === r[31] >> 7 && U(t[0], s, t[0]), D(t[3], t[0], t[1]), 0) - ); - })(l, n) - ) - return -1; - for (o = 0; o < i; o++) t[o] = r[o]; - for (o = 0; o < 32; o++) t[o + 32] = n[o]; - if ((J(f, t, i), st(f), et(c, l, f), rt(l, r.subarray(32)), X(c, l), tt(h, c), (i -= 64), b(r, 0, h, 0))) { - for (o = 0; o < i; o++) t[o] = 0; - return -1; - } - for (o = 0; o < i; o++) t[o] = r[o + 64]; - return i; - } - var ut = 64, - ft = 32, - ct = 64; - function lt(t, e) { - if (32 !== t.length) throw new Error('bad key size'); - if (24 !== e.length) throw new Error('bad nonce size'); - } - function dt() { - for (var t = 0; t < arguments.length; t++) - if (!(arguments[t] instanceof Uint8Array)) throw new TypeError('unexpected type, use Uint8Array'); - } - function pt(t) { - for (var e = 0; e < t.length; e++) t[e] = 0; - } - (t.lowlevel = { - crypto_core_hsalsa20: v, - crypto_stream_xor: S, - crypto_stream: E, - crypto_stream_salsa20_xor: _, - crypto_stream_salsa20: M, - crypto_onetimeauth: A, - crypto_onetimeauth_verify: k, - crypto_verify_16: g, - crypto_verify_32: b, - crypto_secretbox: R, - crypto_secretbox_open: B, - crypto_scalarmult: H, - crypto_scalarmult_base: $, - crypto_box_beforenm: G, - crypto_box_afternm: V, - crypto_box: function (t, e, r, i, n, o) { - var s = new Uint8Array(32); - return G(s, n, o), V(t, e, r, i, s); - }, - crypto_box_open: function (t, e, r, i, n, o) { - var s = new Uint8Array(32); - return G(s, n, o), W(t, e, r, i, s); - }, - crypto_box_keypair: Z, - crypto_hash: J, - crypto_sign: at, - crypto_sign_keypair: it, - crypto_sign_open: ht, - crypto_secretbox_KEYBYTES: 32, - crypto_secretbox_NONCEBYTES: 24, - crypto_secretbox_ZEROBYTES: 32, - crypto_secretbox_BOXZEROBYTES: 16, - crypto_scalarmult_BYTES: 32, - crypto_scalarmult_SCALARBYTES: 32, - crypto_box_PUBLICKEYBYTES: 32, - crypto_box_SECRETKEYBYTES: 32, - crypto_box_BEFORENMBYTES: 32, - crypto_box_NONCEBYTES: 24, - crypto_box_ZEROBYTES: 32, - crypto_box_BOXZEROBYTES: 16, - crypto_sign_BYTES: ut, - crypto_sign_PUBLICKEYBYTES: ft, - crypto_sign_SECRETKEYBYTES: ct, - crypto_sign_SEEDBYTES: 32, - crypto_hash_BYTES: 64, - gf: e, - D: u, - L: nt, - pack25519: O, - unpack25519: N, - M: D, - A: j, - S: z, - Z: U, - pow2523: q, - add: X, - set25519: I, - modL: ot, - scalarmult: et, - scalarbase: rt, - }), - (t.randomBytes = function (t) { - var e = new Uint8Array(t); - return i(e, t), e; - }), - (t.secretbox = function (t, e, r) { - dt(t, e, r), lt(r, e); - for (var i = new Uint8Array(32 + t.length), n = new Uint8Array(i.length), o = 0; o < t.length; o++) i[o + 32] = t[o]; - return R(n, i, i.length, e, r), n.subarray(16); - }), - (t.secretbox.open = function (t, e, r) { - dt(t, e, r), lt(r, e); - for (var i = new Uint8Array(16 + t.length), n = new Uint8Array(i.length), o = 0; o < t.length; o++) i[o + 16] = t[o]; - return i.length < 32 || 0 !== B(n, i, i.length, e, r) ? null : n.subarray(32); - }), - (t.secretbox.keyLength = 32), - (t.secretbox.nonceLength = 24), - (t.secretbox.overheadLength = 16), - (t.scalarMult = function (t, e) { - if ((dt(t, e), 32 !== t.length)) throw new Error('bad n size'); - if (32 !== e.length) throw new Error('bad p size'); - var r = new Uint8Array(32); - return H(r, t, e), r; - }), - (t.scalarMult.base = function (t) { - if ((dt(t), 32 !== t.length)) throw new Error('bad n size'); - var e = new Uint8Array(32); - return $(e, t), e; - }), - (t.scalarMult.scalarLength = 32), - (t.scalarMult.groupElementLength = 32), - (t.box = function (e, r, i, n) { - var o = t.box.before(i, n); - return t.secretbox(e, r, o); - }), - (t.box.before = function (t, e) { - dt(t, e), - (function (t, e) { - if (32 !== t.length) throw new Error('bad public key size'); - if (32 !== e.length) throw new Error('bad secret key size'); - })(t, e); - var r = new Uint8Array(32); - return G(r, t, e), r; - }), - (t.box.after = t.secretbox), - (t.box.open = function (e, r, i, n) { - var o = t.box.before(i, n); - return t.secretbox.open(e, r, o); - }), - (t.box.open.after = t.secretbox.open), - (t.box.keyPair = function () { - var t = new Uint8Array(32), - e = new Uint8Array(32); - return Z(t, e), { publicKey: t, secretKey: e }; - }), - (t.box.keyPair.fromSecretKey = function (t) { - if ((dt(t), 32 !== t.length)) throw new Error('bad secret key size'); - var e = new Uint8Array(32); - return $(e, t), { publicKey: e, secretKey: new Uint8Array(t) }; - }), - (t.box.publicKeyLength = 32), - (t.box.secretKeyLength = 32), - (t.box.sharedKeyLength = 32), - (t.box.nonceLength = 24), - (t.box.overheadLength = t.secretbox.overheadLength), - (t.sign = function (t, e) { - if ((dt(t, e), e.length !== ct)) throw new Error('bad secret key size'); - var r = new Uint8Array(ut + t.length); - return at(r, t, t.length, e), r; - }), - (t.sign.open = function (t, e) { - if ((dt(t, e), e.length !== ft)) throw new Error('bad public key size'); - var r = new Uint8Array(t.length), - i = ht(r, t, t.length, e); - if (i < 0) return null; - for (var n = new Uint8Array(i), o = 0; o < n.length; o++) n[o] = r[o]; - return n; - }), - (t.sign.detached = function (e, r) { - for (var i = t.sign(e, r), n = new Uint8Array(ut), o = 0; o < n.length; o++) n[o] = i[o]; - return n; - }), - (t.sign.detached.verify = function (t, e, r) { - if ((dt(t, e, r), e.length !== ut)) throw new Error('bad signature size'); - if (r.length !== ft) throw new Error('bad public key size'); - var i, - n = new Uint8Array(ut + t.length), - o = new Uint8Array(ut + t.length); - for (i = 0; i < ut; i++) n[i] = e[i]; - for (i = 0; i < t.length; i++) n[i + ut] = t[i]; - return ht(o, n, n.length, r) >= 0; - }), - (t.sign.keyPair = function () { - var t = new Uint8Array(ft), - e = new Uint8Array(ct); - return it(t, e), { publicKey: t, secretKey: e }; - }), - (t.sign.keyPair.fromSecretKey = function (t) { - if ((dt(t), t.length !== ct)) throw new Error('bad secret key size'); - for (var e = new Uint8Array(ft), r = 0; r < e.length; r++) e[r] = t[32 + r]; - return { publicKey: e, secretKey: new Uint8Array(t) }; - }), - (t.sign.keyPair.fromSeed = function (t) { - if ((dt(t), 32 !== t.length)) throw new Error('bad seed size'); - for (var e = new Uint8Array(ft), r = new Uint8Array(ct), i = 0; i < 32; i++) r[i] = t[i]; - return it(e, r, !0), { publicKey: e, secretKey: r }; - }), - (t.sign.publicKeyLength = ft), - (t.sign.secretKeyLength = ct), - (t.sign.seedLength = 32), - (t.sign.signatureLength = ut), - (t.hash = function (t) { - dt(t); - var e = new Uint8Array(64); - return J(e, t, t.length), e; - }), - (t.hash.hashLength = 64), - (t.verify = function (t, e) { - return dt(t, e), 0 !== t.length && 0 !== e.length && t.length === e.length && 0 === m(t, 0, e, 0, t.length); - }), - (t.setPRNG = function (t) { - i = t; - }), - (function () { - var e = 'undefined' != typeof self ? self.crypto || self.msCrypto : null; - e && e.getRandomValues - ? t.setPRNG(function (t, r) { - var i, - n = new Uint8Array(r); - for (i = 0; i < r; i += 65536) e.getRandomValues(n.subarray(i, i + Math.min(r - i, 65536))); - for (i = 0; i < r; i++) t[i] = n[i]; - pt(n); - }) - : (e = r(2337)) && - e.randomBytes && - t.setPRNG(function (t, r) { - var i, - n = e.randomBytes(r); - for (i = 0; i < r; i++) t[i] = n[i]; - pt(n); - }); - })(); - })(t.exports ? t.exports : (self.nacl = self.nacl || {})); - }, - 2511: function (t, e, r) { - var i; - (t = r.nmd(t)), - (function (n) { - e && e.nodeType, t && t.nodeType; - var o = 'object' == typeof r.g && r.g; - o.global !== o && o.window !== o && o.self; - var s, - a = 2147483647, - h = 36, - u = 26, - f = 38, - c = 700, - l = /^xn--/, - d = /[^\x20-\x7E]/, - p = /[\x2E\u3002\uFF0E\uFF61]/g, - m = { - 'overflow': 'Overflow: input needs wider integers to process', - 'not-basic': 'Illegal input >= 0x80 (not a basic code point)', - 'invalid-input': 'Invalid input', - }, - g = h - 1, - b = Math.floor, - y = String.fromCharCode; - function v(t) { - throw RangeError(m[t]); - } - function w(t, e) { - for (var r = t.length, i = []; r--; ) i[r] = e(t[r]); - return i; - } - function _(t, e) { - var r = t.split('@'), - i = ''; - return r.length > 1 && ((i = r[0] + '@'), (t = r[1])), i + w((t = t.replace(p, '.')).split('.'), e).join('.'); - } - function M(t) { - for (var e, r, i = [], n = 0, o = t.length; n < o; ) - (e = t.charCodeAt(n++)) >= 55296 && e <= 56319 && n < o - ? 56320 == (64512 & (r = t.charCodeAt(n++))) - ? i.push(((1023 & e) << 10) + (1023 & r) + 65536) - : (i.push(e), n--) - : i.push(e); - return i; - } - function E(t) { - return w(t, function (t) { - var e = ''; - return t > 65535 && ((e += y((((t -= 65536) >>> 10) & 1023) | 55296)), (t = 56320 | (1023 & t))), e + y(t); - }).join(''); - } - function S(t, e) { - return t + 22 + 75 * (t < 26) - ((0 != e) << 5); - } - function x(t, e, r) { - var i = 0; - for (t = r ? b(t / c) : t >> 1, t += b(t / e); t > (g * u) >> 1; i += h) t = b(t / g); - return b(i + ((g + 1) * t) / (t + f)); - } - function A(t) { - var e, - r, - i, - n, - o, - s, - f, - c, - l, - d, - p, - m = [], - g = t.length, - y = 0, - w = 128, - _ = 72; - for ((r = t.lastIndexOf('-')) < 0 && (r = 0), i = 0; i < r; ++i) - t.charCodeAt(i) >= 128 && v('not-basic'), m.push(t.charCodeAt(i)); - for (n = r > 0 ? r + 1 : 0; n < g; ) { - for ( - o = y, s = 1, f = h; - n >= g && v('invalid-input'), - ((c = (p = t.charCodeAt(n++)) - 48 < 10 ? p - 22 : p - 65 < 26 ? p - 65 : p - 97 < 26 ? p - 97 : h) >= h || - c > b((a - y) / s)) && - v('overflow'), - (y += c * s), - !(c < (l = f <= _ ? 1 : f >= _ + u ? u : f - _)); - f += h - ) - s > b(a / (d = h - l)) && v('overflow'), (s *= d); - (_ = x(y - o, (e = m.length + 1), 0 == o)), - b(y / e) > a - w && v('overflow'), - (w += b(y / e)), - (y %= e), - m.splice(y++, 0, w); - } - return E(m); - } - function k(t) { - var e, - r, - i, - n, - o, - s, - f, - c, - l, - d, - p, - m, - g, - w, - _, - E = []; - for (m = (t = M(t)).length, e = 128, r = 0, o = 72, s = 0; s < m; ++s) (p = t[s]) < 128 && E.push(y(p)); - for (i = n = E.length, n && E.push('-'); i < m; ) { - for (f = a, s = 0; s < m; ++s) (p = t[s]) >= e && p < f && (f = p); - for (f - e > b((a - r) / (g = i + 1)) && v('overflow'), r += (f - e) * g, e = f, s = 0; s < m; ++s) - if (((p = t[s]) < e && ++r > a && v('overflow'), p == e)) { - for (c = r, l = h; !(c < (d = l <= o ? 1 : l >= o + u ? u : l - o)); l += h) - (_ = c - d), (w = h - d), E.push(y(S(d + (_ % w), 0))), (c = b(_ / w)); - E.push(y(S(c, 0))), (o = x(r, g, i == n)), (r = 0), ++i; - } - ++r, ++e; - } - return E.join(''); - } - (s = { - version: '1.3.2', - ucs2: { decode: M, encode: E }, - decode: A, - encode: k, - toASCII: function (t) { - return _(t, function (t) { - return d.test(t) ? 'xn--' + k(t) : t; - }); - }, - toUnicode: function (t) { - return _(t, function (t) { - return l.test(t) ? A(t.slice(4).toLowerCase()) : t; - }); - }, - }), - void 0 === - (i = function () { - return s; - }.call(e, r, e, t)) || (t.exports = i); - })(); - }, - 8575: (t, e, r) => { - var i = r(2511); - function n() { - (this.protocol = null), - (this.slashes = null), - (this.auth = null), - (this.host = null), - (this.port = null), - (this.hostname = null), - (this.hash = null), - (this.search = null), - (this.query = null), - (this.pathname = null), - (this.path = null), - (this.href = null); - } - (e.parse = b), - (e.resolve = function (t, e) { - return b(t, !1, !0).resolve(e); - }), - (e.resolveObject = function (t, e) { - return t ? b(t, !1, !0).resolveObject(e) : e; - }), - (e.format = function (t) { - return y(t) && (t = b(t)), t instanceof n ? t.format() : n.prototype.format.call(t); - }), - (e.Url = n); - var o = /^([a-z0-9.+-]+:)/i, - s = /:[0-9]*$/, - a = ['{', '}', '|', '\\', '^', '`'].concat(['<', '>', '"', '`', ' ', '\r', '\n', '\t']), - h = ["'"].concat(a), - u = ['%', '/', '?', ';', '#'].concat(h), - f = ['/', '?', '#'], - c = /^[a-z0-9A-Z_-]{0,63}$/, - l = /^([a-z0-9A-Z_-]{0,63})(.*)$/, - d = { 'javascript': !0, 'javascript:': !0 }, - p = { 'javascript': !0, 'javascript:': !0 }, - m = { - 'http': !0, - 'https': !0, - 'ftp': !0, - 'gopher': !0, - 'file': !0, - 'http:': !0, - 'https:': !0, - 'ftp:': !0, - 'gopher:': !0, - 'file:': !0, - }, - g = r(7735); - function b(t, e, r) { - if (t && v(t) && t instanceof n) return t; - var i = new n(); - return i.parse(t, e, r), i; - } - function y(t) { - return 'string' == typeof t; - } - function v(t) { - return 'object' == typeof t && null !== t; - } - function w(t) { - return null === t; - } - (n.prototype.parse = function (t, e, r) { - if (!y(t)) throw new TypeError("Parameter 'url' must be a string, not " + typeof t); - var n = t; - n = n.trim(); - var s = o.exec(n); - if (s) { - var a = (s = s[0]).toLowerCase(); - (this.protocol = a), (n = n.substr(s.length)); - } - if (r || s || n.match(/^\/\/[^@\/]+@[^@\/]+/)) { - var b = '//' === n.substr(0, 2); - !b || (s && p[s]) || ((n = n.substr(2)), (this.slashes = !0)); - } - if (!p[s] && (b || (s && !m[s]))) { - for (var v, w, _ = -1, M = 0; M < f.length; M++) -1 !== (E = n.indexOf(f[M])) && (-1 === _ || E < _) && (_ = E); - for ( - -1 !== (w = -1 === _ ? n.lastIndexOf('@') : n.lastIndexOf('@', _)) && - ((v = n.slice(0, w)), (n = n.slice(w + 1)), (this.auth = decodeURIComponent(v))), - _ = -1, - M = 0; - M < u.length; - M++ - ) { - var E; - -1 !== (E = n.indexOf(u[M])) && (-1 === _ || E < _) && (_ = E); - } - -1 === _ && (_ = n.length), - (this.host = n.slice(0, _)), - (n = n.slice(_)), - this.parseHost(), - (this.hostname = this.hostname || ''); - var S = '[' === this.hostname[0] && ']' === this.hostname[this.hostname.length - 1]; - if (!S) - for (var x = this.hostname.split(/\./), A = ((M = 0), x.length); M < A; M++) { - var k = x[M]; - if (k && !k.match(c)) { - for (var R = '', B = 0, I = k.length; B < I; B++) k.charCodeAt(B) > 127 ? (R += 'x') : (R += k[B]); - if (!R.match(c)) { - var T = x.slice(0, M), - P = x.slice(M + 1), - O = k.match(l); - O && (T.push(O[1]), P.unshift(O[2])), P.length && (n = '/' + P.join('.') + n), (this.hostname = T.join('.')); - break; - } - } - } - if ((this.hostname.length > 255 ? (this.hostname = '') : (this.hostname = this.hostname.toLowerCase()), !S)) { - var L = this.hostname.split('.'), - C = []; - for (M = 0; M < L.length; ++M) { - var N = L[M]; - C.push(N.match(/[^A-Za-z0-9_-]/) ? 'xn--' + i.encode(N) : N); - } - this.hostname = C.join('.'); - } - var j = this.port ? ':' + this.port : '', - U = this.hostname || ''; - (this.host = U + j), - (this.href += this.host), - S && ((this.hostname = this.hostname.substr(1, this.hostname.length - 2)), '/' !== n[0] && (n = '/' + n)); - } - if (!d[a]) - for (M = 0, A = h.length; M < A; M++) { - var D = h[M], - z = encodeURIComponent(D); - z === D && (z = escape(D)), (n = n.split(D).join(z)); - } - var F = n.indexOf('#'); - -1 !== F && ((this.hash = n.substr(F)), (n = n.slice(0, F))); - var q = n.indexOf('?'); - return ( - -1 !== q - ? ((this.search = n.substr(q)), (this.query = n.substr(q + 1)), e && (this.query = g.parse(this.query)), (n = n.slice(0, q))) - : e && ((this.search = ''), (this.query = {})), - n && (this.pathname = n), - m[a] && this.hostname && !this.pathname && (this.pathname = '/'), - (this.pathname || this.search) && ((j = this.pathname || ''), (N = this.search || ''), (this.path = j + N)), - (this.href = this.format()), - this - ); - }), - (n.prototype.format = function () { - var t = this.auth || ''; - t && ((t = (t = encodeURIComponent(t)).replace(/%3A/i, ':')), (t += '@')); - var e = this.protocol || '', - r = this.pathname || '', - i = this.hash || '', - n = !1, - o = ''; - this.host - ? (n = t + this.host) - : this.hostname && - ((n = t + (-1 === this.hostname.indexOf(':') ? this.hostname : '[' + this.hostname + ']')), - this.port && (n += ':' + this.port)), - this.query && v(this.query) && Object.keys(this.query).length && (o = g.stringify(this.query)); - var s = this.search || (o && '?' + o) || ''; - return ( - e && ':' !== e.substr(-1) && (e += ':'), - this.slashes || ((!e || m[e]) && !1 !== n) - ? ((n = '//' + (n || '')), r && '/' !== r.charAt(0) && (r = '/' + r)) - : n || (n = ''), - i && '#' !== i.charAt(0) && (i = '#' + i), - s && '?' !== s.charAt(0) && (s = '?' + s), - e + - n + - (r = r.replace(/[?#]/g, function (t) { - return encodeURIComponent(t); - })) + - (s = s.replace('#', '%23')) + - i - ); - }), - (n.prototype.resolve = function (t) { - return this.resolveObject(b(t, !1, !0)).format(); - }), - (n.prototype.resolveObject = function (t) { - if (y(t)) { - var e = new n(); - e.parse(t, !1, !0), (t = e); - } - var r = new n(); - if ( - (Object.keys(this).forEach(function (t) { - r[t] = this[t]; - }, this), - (r.hash = t.hash), - '' === t.href) - ) - return (r.href = r.format()), r; - if (t.slashes && !t.protocol) - return ( - Object.keys(t).forEach(function (e) { - 'protocol' !== e && (r[e] = t[e]); - }), - m[r.protocol] && r.hostname && !r.pathname && (r.path = r.pathname = '/'), - (r.href = r.format()), - r - ); - if (t.protocol && t.protocol !== r.protocol) { - if (!m[t.protocol]) - return ( - Object.keys(t).forEach(function (e) { - r[e] = t[e]; - }), - (r.href = r.format()), - r - ); - if (((r.protocol = t.protocol), t.host || p[t.protocol])) r.pathname = t.pathname; - else { - for (var i = (t.pathname || '').split('/'); i.length && !(t.host = i.shift()); ); - t.host || (t.host = ''), - t.hostname || (t.hostname = ''), - '' !== i[0] && i.unshift(''), - i.length < 2 && i.unshift(''), - (r.pathname = i.join('/')); - } - if ( - ((r.search = t.search), - (r.query = t.query), - (r.host = t.host || ''), - (r.auth = t.auth), - (r.hostname = t.hostname || t.host), - (r.port = t.port), - r.pathname || r.search) - ) { - var o = r.pathname || '', - s = r.search || ''; - r.path = o + s; - } - return (r.slashes = r.slashes || t.slashes), (r.href = r.format()), r; - } - var a = r.pathname && '/' === r.pathname.charAt(0), - h = t.host || (t.pathname && '/' === t.pathname.charAt(0)), - u = h || a || (r.host && t.pathname), - f = u, - c = (r.pathname && r.pathname.split('/')) || [], - l = ((i = (t.pathname && t.pathname.split('/')) || []), r.protocol && !m[r.protocol]); - if ( - (l && - ((r.hostname = ''), - (r.port = null), - r.host && ('' === c[0] ? (c[0] = r.host) : c.unshift(r.host)), - (r.host = ''), - t.protocol && - ((t.hostname = null), (t.port = null), t.host && ('' === i[0] ? (i[0] = t.host) : i.unshift(t.host)), (t.host = null)), - (u = u && ('' === i[0] || '' === c[0]))), - h) - ) - (r.host = t.host || '' === t.host ? t.host : r.host), - (r.hostname = t.hostname || '' === t.hostname ? t.hostname : r.hostname), - (r.search = t.search), - (r.query = t.query), - (c = i); - else if (i.length) c || (c = []), c.pop(), (c = c.concat(i)), (r.search = t.search), (r.query = t.query); - else if (null != t.search) - return ( - l && - ((r.hostname = r.host = c.shift()), - (_ = !!(r.host && r.host.indexOf('@') > 0) && r.host.split('@')) && - ((r.auth = _.shift()), (r.host = r.hostname = _.shift()))), - (r.search = t.search), - (r.query = t.query), - (w(r.pathname) && w(r.search)) || (r.path = (r.pathname ? r.pathname : '') + (r.search ? r.search : '')), - (r.href = r.format()), - r - ); - if (!c.length) return (r.pathname = null), r.search ? (r.path = '/' + r.search) : (r.path = null), (r.href = r.format()), r; - for ( - var d = c.slice(-1)[0], g = ((r.host || t.host) && ('.' === d || '..' === d)) || '' === d, b = 0, v = c.length; - v >= 0; - v-- - ) - '.' == (d = c[v]) ? c.splice(v, 1) : '..' === d ? (c.splice(v, 1), b++) : b && (c.splice(v, 1), b--); - if (!u && !f) for (; b--; b) c.unshift('..'); - !u || '' === c[0] || (c[0] && '/' === c[0].charAt(0)) || c.unshift(''), g && '/' !== c.join('/').substr(-1) && c.push(''); - var _, - M = '' === c[0] || (c[0] && '/' === c[0].charAt(0)); - return ( - l && - ((r.hostname = r.host = M ? '' : c.length ? c.shift() : ''), - (_ = !!(r.host && r.host.indexOf('@') > 0) && r.host.split('@')) && - ((r.auth = _.shift()), (r.host = r.hostname = _.shift()))), - (u = u || (r.host && c.length)) && !M && c.unshift(''), - c.length ? (r.pathname = c.join('/')) : ((r.pathname = null), (r.path = null)), - (w(r.pathname) && w(r.search)) || (r.path = (r.pathname ? r.pathname : '') + (r.search ? r.search : '')), - (r.auth = t.auth || r.auth), - (r.slashes = r.slashes || t.slashes), - (r.href = r.format()), - r - ); - }), - (n.prototype.parseHost = function () { - var t = this.host, - e = s.exec(t); - e && (':' !== (e = e[0]) && (this.port = e.substr(1)), (t = t.substr(0, t.length - e.length))), t && (this.hostname = t); - }); - }, - 1496: t => { - 'function' == typeof Object.create - ? (t.exports = function (t, e) { - (t.super_ = e), - (t.prototype = Object.create(e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } })); - }) - : (t.exports = function (t, e) { - t.super_ = e; - var r = function () {}; - (r.prototype = e.prototype), (t.prototype = new r()), (t.prototype.constructor = t); - }); - }, - 384: t => { - t.exports = function (t) { - return ( - t && 'object' == typeof t && 'function' == typeof t.copy && 'function' == typeof t.fill && 'function' == typeof t.readUInt8 - ); - }; - }, - 9539: (t, e, r) => { - var i = /%[sdj%]/g; - (e.format = function (t) { - if (!g(t)) { - for (var e = [], r = 0; r < arguments.length; r++) e.push(s(arguments[r])); - return e.join(' '); - } - r = 1; - for ( - var n = arguments, - o = n.length, - a = String(t).replace(i, function (t) { - if ('%%' === t) return '%'; - if (r >= o) return t; - switch (t) { - case '%s': - return String(n[r++]); - case '%d': - return Number(n[r++]); - case '%j': - try { - return JSON.stringify(n[r++]); - } catch (t) { - return '[Circular]'; - } - default: - return t; - } - }), - h = n[r]; - r < o; - h = n[++r] - ) - p(h) || !v(h) ? (a += ' ' + h) : (a += ' ' + s(h)); - return a; - }), - (e.deprecate = function (t, i) { - if (b(r.g.process)) - return function () { - return e.deprecate(t, i).apply(this, arguments); - }; - if (!0 === process.noDeprecation) return t; - var n = !1; - return function () { - if (!n) { - if (process.throwDeprecation) throw new Error(i); - process.traceDeprecation ? console.trace(i) : console.error(i), (n = !0); - } - return t.apply(this, arguments); - }; - }); - var n, - o = {}; - function s(t, r) { - var i = { seen: [], stylize: h }; - return ( - arguments.length >= 3 && (i.depth = arguments[2]), - arguments.length >= 4 && (i.colors = arguments[3]), - d(r) ? (i.showHidden = r) : r && e._extend(i, r), - b(i.showHidden) && (i.showHidden = !1), - b(i.depth) && (i.depth = 2), - b(i.colors) && (i.colors = !1), - b(i.customInspect) && (i.customInspect = !0), - i.colors && (i.stylize = a), - u(i, t, i.depth) - ); - } - function a(t, e) { - var r = s.styles[e]; - return r ? '[' + s.colors[r][0] + 'm' + t + '[' + s.colors[r][1] + 'm' : t; - } - function h(t, e) { - return t; - } - function u(t, r, i) { - if (t.customInspect && r && M(r.inspect) && r.inspect !== e.inspect && (!r.constructor || r.constructor.prototype !== r)) { - var n = r.inspect(i, t); - return g(n) || (n = u(t, n, i)), n; - } - var o = (function (t, e) { - if (b(e)) return t.stylize('undefined', 'undefined'); - if (g(e)) { - var r = "'" + JSON.stringify(e).replace(/^"|"$/g, '').replace(/'/g, "\\'").replace(/\\"/g, '"') + "'"; - return t.stylize(r, 'string'); - } - return m(e) ? t.stylize('' + e, 'number') : d(e) ? t.stylize('' + e, 'boolean') : p(e) ? t.stylize('null', 'null') : void 0; - })(t, r); - if (o) return o; - var s = Object.keys(r), - a = (function (t) { - var e = {}; - return ( - t.forEach(function (t, r) { - e[t] = !0; - }), - e - ); - })(s); - if ((t.showHidden && (s = Object.getOwnPropertyNames(r)), _(r) && (s.indexOf('message') >= 0 || s.indexOf('description') >= 0))) - return f(r); - if (0 === s.length) { - if (M(r)) { - var h = r.name ? ': ' + r.name : ''; - return t.stylize('[Function' + h + ']', 'special'); - } - if (y(r)) return t.stylize(RegExp.prototype.toString.call(r), 'regexp'); - if (w(r)) return t.stylize(Date.prototype.toString.call(r), 'date'); - if (_(r)) return f(r); - } - var v, - E = '', - S = !1, - x = ['{', '}']; - return ( - l(r) && ((S = !0), (x = ['[', ']'])), - M(r) && (E = ' [Function' + (r.name ? ': ' + r.name : '') + ']'), - y(r) && (E = ' ' + RegExp.prototype.toString.call(r)), - w(r) && (E = ' ' + Date.prototype.toUTCString.call(r)), - _(r) && (E = ' ' + f(r)), - 0 !== s.length || (S && 0 != r.length) - ? i < 0 - ? y(r) - ? t.stylize(RegExp.prototype.toString.call(r), 'regexp') - : t.stylize('[Object]', 'special') - : (t.seen.push(r), - (v = S - ? (function (t, e, r, i, n) { - for (var o = [], s = 0, a = e.length; s < a; ++s) - A(e, String(s)) ? o.push(c(t, e, r, i, String(s), !0)) : o.push(''); - return ( - n.forEach(function (n) { - n.match(/^\d+$/) || o.push(c(t, e, r, i, n, !0)); - }), - o - ); - })(t, r, i, a, s) - : s.map(function (e) { - return c(t, r, i, a, e, S); - })), - t.seen.pop(), - (function (t, e, r) { - return t.reduce(function (t, e) { - return e.indexOf('\n'), t + e.replace(/\u001b\[\d\d?m/g, '').length + 1; - }, 0) > 60 - ? r[0] + ('' === e ? '' : e + '\n ') + ' ' + t.join(',\n ') + ' ' + r[1] - : r[0] + e + ' ' + t.join(', ') + ' ' + r[1]; - })(v, E, x)) - : x[0] + E + x[1] - ); - } - function f(t) { - return '[' + Error.prototype.toString.call(t) + ']'; - } - function c(t, e, r, i, n, o) { - var s, a, h; - if ( - ((h = Object.getOwnPropertyDescriptor(e, n) || { value: e[n] }).get - ? (a = h.set ? t.stylize('[Getter/Setter]', 'special') : t.stylize('[Getter]', 'special')) - : h.set && (a = t.stylize('[Setter]', 'special')), - A(i, n) || (s = '[' + n + ']'), - a || - (t.seen.indexOf(h.value) < 0 - ? (a = p(r) ? u(t, h.value, null) : u(t, h.value, r - 1)).indexOf('\n') > -1 && - (a = o - ? a - .split('\n') - .map(function (t) { - return ' ' + t; - }) - .join('\n') - .substr(2) - : '\n' + - a - .split('\n') - .map(function (t) { - return ' ' + t; - }) - .join('\n')) - : (a = t.stylize('[Circular]', 'special'))), - b(s)) - ) { - if (o && n.match(/^\d+$/)) return a; - (s = JSON.stringify('' + n)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/) - ? ((s = s.substr(1, s.length - 2)), (s = t.stylize(s, 'name'))) - : ((s = s - .replace(/'/g, "\\'") - .replace(/\\"/g, '"') - .replace(/(^"|"$)/g, "'")), - (s = t.stylize(s, 'string'))); - } - return s + ': ' + a; - } - function l(t) { - return Array.isArray(t); - } - function d(t) { - return 'boolean' == typeof t; - } - function p(t) { - return null === t; - } - function m(t) { - return 'number' == typeof t; - } - function g(t) { - return 'string' == typeof t; - } - function b(t) { - return void 0 === t; - } - function y(t) { - return v(t) && '[object RegExp]' === E(t); - } - function v(t) { - return 'object' == typeof t && null !== t; - } - function w(t) { - return v(t) && '[object Date]' === E(t); - } - function _(t) { - return v(t) && ('[object Error]' === E(t) || t instanceof Error); - } - function M(t) { - return 'function' == typeof t; - } - function E(t) { - return Object.prototype.toString.call(t); - } - function S(t) { - return t < 10 ? '0' + t.toString(10) : t.toString(10); - } - (e.debuglog = function (t) { - if ((b(n) && (n = process.env.NODE_DEBUG || ''), (t = t.toUpperCase()), !o[t])) - if (new RegExp('\\b' + t + '\\b', 'i').test(n)) { - var r = process.pid; - o[t] = function () { - var i = e.format.apply(e, arguments); - console.error('%s %d: %s', t, r, i); - }; - } else o[t] = function () {}; - return o[t]; - }), - (e.inspect = s), - (s.colors = { - bold: [1, 22], - italic: [3, 23], - underline: [4, 24], - inverse: [7, 27], - white: [37, 39], - grey: [90, 39], - black: [30, 39], - blue: [34, 39], - cyan: [36, 39], - green: [32, 39], - magenta: [35, 39], - red: [31, 39], - yellow: [33, 39], - }), - (s.styles = { - special: 'cyan', - number: 'yellow', - boolean: 'yellow', - undefined: 'grey', - null: 'bold', - string: 'green', - date: 'magenta', - regexp: 'red', - }), - (e.isArray = l), - (e.isBoolean = d), - (e.isNull = p), - (e.isNullOrUndefined = function (t) { - return null == t; - }), - (e.isNumber = m), - (e.isString = g), - (e.isSymbol = function (t) { - return 'symbol' == typeof t; - }), - (e.isUndefined = b), - (e.isRegExp = y), - (e.isObject = v), - (e.isDate = w), - (e.isError = _), - (e.isFunction = M), - (e.isPrimitive = function (t) { - return ( - null === t || 'boolean' == typeof t || 'number' == typeof t || 'string' == typeof t || 'symbol' == typeof t || void 0 === t - ); - }), - (e.isBuffer = r(384)); - var x = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']; - function A(t, e) { - return Object.prototype.hasOwnProperty.call(t, e); - } - (e.log = function () { - var t, r; - console.log( - '%s - %s', - ((r = [S((t = new Date()).getHours()), S(t.getMinutes()), S(t.getSeconds())].join(':')), - [t.getDate(), x[t.getMonth()], r].join(' ')), - e.format.apply(e, arguments) - ); - }), - (e.inherits = r(1496)), - (e._extend = function (t, e) { - if (!e || !v(e)) return t; - for (var r = Object.keys(e), i = r.length; i--; ) t[r[i]] = e[r[i]]; - return t; - }); - }, - 9602: t => { - 'use strict'; - t.exports = function (t) { - t.prototype[Symbol.iterator] = function* () { - for (let t = this.head; t; t = t.next) yield t.value; - }; - }; - }, - 4411: (t, e, r) => { - 'use strict'; - function i(t) { - var e = this; - if ((e instanceof i || (e = new i()), (e.tail = null), (e.head = null), (e.length = 0), t && 'function' == typeof t.forEach)) - t.forEach(function (t) { - e.push(t); - }); - else if (arguments.length > 0) for (var r = 0, n = arguments.length; r < n; r++) e.push(arguments[r]); - return e; - } - function n(t, e, r) { - var i = e === t.head ? new a(r, null, e, t) : new a(r, e, e.next, t); - return null === i.next && (t.tail = i), null === i.prev && (t.head = i), t.length++, i; - } - function o(t, e) { - (t.tail = new a(e, t.tail, null, t)), t.head || (t.head = t.tail), t.length++; - } - function s(t, e) { - (t.head = new a(e, null, t.head, t)), t.tail || (t.tail = t.head), t.length++; - } - function a(t, e, r, i) { - if (!(this instanceof a)) return new a(t, e, r, i); - (this.list = i), - (this.value = t), - e ? ((e.next = this), (this.prev = e)) : (this.prev = null), - r ? ((r.prev = this), (this.next = r)) : (this.next = null); - } - (t.exports = i), - (i.Node = a), - (i.create = i), - (i.prototype.removeNode = function (t) { - if (t.list !== this) throw new Error('removing node which does not belong to this list'); - var e = t.next, - r = t.prev; - return ( - e && (e.prev = r), - r && (r.next = e), - t === this.head && (this.head = e), - t === this.tail && (this.tail = r), - t.list.length--, - (t.next = null), - (t.prev = null), - (t.list = null), - e - ); - }), - (i.prototype.unshiftNode = function (t) { - if (t !== this.head) { - t.list && t.list.removeNode(t); - var e = this.head; - (t.list = this), (t.next = e), e && (e.prev = t), (this.head = t), this.tail || (this.tail = t), this.length++; - } - }), - (i.prototype.pushNode = function (t) { - if (t !== this.tail) { - t.list && t.list.removeNode(t); - var e = this.tail; - (t.list = this), (t.prev = e), e && (e.next = t), (this.tail = t), this.head || (this.head = t), this.length++; - } - }), - (i.prototype.push = function () { - for (var t = 0, e = arguments.length; t < e; t++) o(this, arguments[t]); - return this.length; - }), - (i.prototype.unshift = function () { - for (var t = 0, e = arguments.length; t < e; t++) s(this, arguments[t]); - return this.length; - }), - (i.prototype.pop = function () { - if (this.tail) { - var t = this.tail.value; - return (this.tail = this.tail.prev), this.tail ? (this.tail.next = null) : (this.head = null), this.length--, t; - } - }), - (i.prototype.shift = function () { - if (this.head) { - var t = this.head.value; - return (this.head = this.head.next), this.head ? (this.head.prev = null) : (this.tail = null), this.length--, t; - } - }), - (i.prototype.forEach = function (t, e) { - e = e || this; - for (var r = this.head, i = 0; null !== r; i++) t.call(e, r.value, i, this), (r = r.next); - }), - (i.prototype.forEachReverse = function (t, e) { - e = e || this; - for (var r = this.tail, i = this.length - 1; null !== r; i--) t.call(e, r.value, i, this), (r = r.prev); - }), - (i.prototype.get = function (t) { - for (var e = 0, r = this.head; null !== r && e < t; e++) r = r.next; - if (e === t && null !== r) return r.value; - }), - (i.prototype.getReverse = function (t) { - for (var e = 0, r = this.tail; null !== r && e < t; e++) r = r.prev; - if (e === t && null !== r) return r.value; - }), - (i.prototype.map = function (t, e) { - e = e || this; - for (var r = new i(), n = this.head; null !== n; ) r.push(t.call(e, n.value, this)), (n = n.next); - return r; - }), - (i.prototype.mapReverse = function (t, e) { - e = e || this; - for (var r = new i(), n = this.tail; null !== n; ) r.push(t.call(e, n.value, this)), (n = n.prev); - return r; - }), - (i.prototype.reduce = function (t, e) { - var r, - i = this.head; - if (arguments.length > 1) r = e; - else { - if (!this.head) throw new TypeError('Reduce of empty list with no initial value'); - (i = this.head.next), (r = this.head.value); - } - for (var n = 0; null !== i; n++) (r = t(r, i.value, n)), (i = i.next); - return r; - }), - (i.prototype.reduceReverse = function (t, e) { - var r, - i = this.tail; - if (arguments.length > 1) r = e; - else { - if (!this.tail) throw new TypeError('Reduce of empty list with no initial value'); - (i = this.tail.prev), (r = this.tail.value); - } - for (var n = this.length - 1; null !== i; n--) (r = t(r, i.value, n)), (i = i.prev); - return r; - }), - (i.prototype.toArray = function () { - for (var t = new Array(this.length), e = 0, r = this.head; null !== r; e++) (t[e] = r.value), (r = r.next); - return t; - }), - (i.prototype.toArrayReverse = function () { - for (var t = new Array(this.length), e = 0, r = this.tail; null !== r; e++) (t[e] = r.value), (r = r.prev); - return t; - }), - (i.prototype.slice = function (t, e) { - (e = e || this.length) < 0 && (e += this.length), (t = t || 0) < 0 && (t += this.length); - var r = new i(); - if (e < t || e < 0) return r; - t < 0 && (t = 0), e > this.length && (e = this.length); - for (var n = 0, o = this.head; null !== o && n < t; n++) o = o.next; - for (; null !== o && n < e; n++, o = o.next) r.push(o.value); - return r; - }), - (i.prototype.sliceReverse = function (t, e) { - (e = e || this.length) < 0 && (e += this.length), (t = t || 0) < 0 && (t += this.length); - var r = new i(); - if (e < t || e < 0) return r; - t < 0 && (t = 0), e > this.length && (e = this.length); - for (var n = this.length, o = this.tail; null !== o && n > e; n--) o = o.prev; - for (; null !== o && n > t; n--, o = o.prev) r.push(o.value); - return r; - }), - (i.prototype.splice = function (t, e, ...r) { - t > this.length && (t = this.length - 1), t < 0 && (t = this.length + t); - for (var i = 0, o = this.head; null !== o && i < t; i++) o = o.next; - var s = []; - for (i = 0; o && i < e; i++) s.push(o.value), (o = this.removeNode(o)); - for (null === o && (o = this.tail), o !== this.head && o !== this.tail && (o = o.prev), i = 0; i < r.length; i++) - o = n(this, o, r[i]); - return s; - }), - (i.prototype.reverse = function () { - for (var t = this.head, e = this.tail, r = t; null !== r; r = r.prev) { - var i = r.prev; - (r.prev = r.next), (r.next = i); - } - return (this.head = e), (this.tail = t), this; - }); - try { - r(9602)(i); - } catch (t) {} - }, - 2909: () => {}, - 5545: () => {}, - 6047: () => {}, - 4215: () => {}, - 7021: () => {}, - 6611: () => {}, - 1212: () => {}, - 303: () => {}, - 4318: () => {}, - 3967: () => {}, - 7523: () => {}, - 4282: () => {}, - 3927: () => {}, - 7702: () => {}, - 7884: (t, e, r) => { - 'use strict'; - r.r(e), - r.d(e, { - Struct: () => f, - StructError: () => i, - any: () => x, - array: () => A, - assert: () => c, - assign: () => g, - bigint: () => k, - boolean: () => R, - coerce: () => Y, - create: () => l, - date: () => B, - defaulted: () => J, - define: () => b, - deprecated: () => y, - dynamic: () => v, - empty: () => Q, - enums: () => I, - func: () => T, - instance: () => P, - integer: () => O, - intersection: () => L, - is: () => p, - lazy: () => w, - literal: () => C, - map: () => N, - mask: () => d, - max: () => et, - min: () => rt, - never: () => j, - nonempty: () => it, - nullable: () => U, - number: () => D, - object: () => z, - omit: () => _, - optional: () => F, - partial: () => M, - pattern: () => nt, - pick: () => E, - record: () => q, - refine: () => st, - regexp: () => H, - set: () => $, - size: () => ot, - string: () => Z, - struct: () => S, - trimmed: () => X, - tuple: () => G, - type: () => V, - union: () => W, - unknown: () => K, - validate: () => m, - }); - class i extends TypeError { - constructor(t, e) { - let r; - const { message: i, explanation: n, ...o } = t, - { path: s } = t, - a = 0 === s.length ? i : `At path: ${s.join('.')} -- ${i}`; - super(n ?? a), - null != n && (this.cause = a), - Object.assign(this, o), - (this.name = this.constructor.name), - (this.failures = () => r ?? (r = [t, ...e()])); - } - } - function n(t) { - return 'object' == typeof t && null != t; - } - function o(t) { - if ('[object Object]' !== Object.prototype.toString.call(t)) return !1; - const e = Object.getPrototypeOf(t); - return null === e || e === Object.prototype; - } - function s(t) { - return 'symbol' == typeof t ? t.toString() : 'string' == typeof t ? JSON.stringify(t) : `${t}`; - } - function a(t, e, r, i) { - if (!0 === t) return; - !1 === t ? (t = {}) : 'string' == typeof t && (t = { message: t }); - const { path: n, branch: o } = e, - { type: a } = r, - { - refinement: h, - message: u = `Expected a value of type \`${a}\`${h ? ` with refinement \`${h}\`` : ''}, but received: \`${s(i)}\``, - } = t; - return { value: i, type: a, refinement: h, key: n[n.length - 1], path: n, branch: o, ...t, message: u }; - } - function* h(t, e, r, i) { - var o; - (n((o = t)) && 'function' == typeof o[Symbol.iterator]) || (t = [t]); - for (const n of t) { - const t = a(n, e, r, i); - t && (yield t); - } - } - function* u(t, e, r = {}) { - const { path: i = [], branch: o = [t], coerce: s = !1, mask: a = !1 } = r, - h = { path: i, branch: o }; - if (s && ((t = e.coercer(t, h)), a && 'type' !== e.type && n(e.schema) && n(t) && !Array.isArray(t))) - for (const r in t) void 0 === e.schema[r] && delete t[r]; - let f = 'valid'; - for (const i of e.validator(t, h)) (i.explanation = r.message), (f = 'not_valid'), yield [i, void 0]; - for (let [c, l, d] of e.entries(t, h)) { - const e = u(l, d, { - path: void 0 === c ? i : [...i, c], - branch: void 0 === c ? o : [...o, l], - coerce: s, - mask: a, - message: r.message, - }); - for (const r of e) - r[0] - ? ((f = null != r[0].refinement ? 'not_refined' : 'not_valid'), yield [r[0], void 0]) - : s && - ((l = r[1]), - void 0 === c - ? (t = l) - : t instanceof Map - ? t.set(c, l) - : t instanceof Set - ? t.add(l) - : n(t) && (void 0 !== l || c in t) && (t[c] = l)); - } - if ('not_valid' !== f) for (const i of e.refiner(t, h)) (i.explanation = r.message), (f = 'not_refined'), yield [i, void 0]; - 'valid' === f && (yield [void 0, t]); - } - class f { - constructor(t) { - const { type: e, schema: r, validator: i, refiner: n, coercer: o = t => t, entries: s = function* () {} } = t; - (this.type = e), - (this.schema = r), - (this.entries = s), - (this.coercer = o), - (this.validator = i ? (t, e) => h(i(t, e), e, this, t) : () => []), - (this.refiner = n ? (t, e) => h(n(t, e), e, this, t) : () => []); - } - assert(t, e) { - return c(t, this, e); - } - create(t, e) { - return l(t, this, e); - } - is(t) { - return p(t, this); - } - mask(t, e) { - return d(t, this, e); - } - validate(t, e = {}) { - return m(t, this, e); - } - } - function c(t, e, r) { - const i = m(t, e, { message: r }); - if (i[0]) throw i[0]; - } - function l(t, e, r) { - const i = m(t, e, { coerce: !0, message: r }); - if (i[0]) throw i[0]; - return i[1]; - } - function d(t, e, r) { - const i = m(t, e, { coerce: !0, mask: !0, message: r }); - if (i[0]) throw i[0]; - return i[1]; - } - function p(t, e) { - return !m(t, e)[0]; - } - function m(t, e, r = {}) { - const n = u(t, e, r), - o = (function (t) { - const { done: e, value: r } = t.next(); - return e ? void 0 : r; - })(n); - return o[0] - ? [ - new i(o[0], function* () { - for (const t of n) t[0] && (yield t[0]); - }), - void 0, - ] - : [void 0, o[1]]; - } - function g(...t) { - const e = 'type' === t[0].type, - r = t.map(t => t.schema), - i = Object.assign({}, ...r); - return e ? V(i) : z(i); - } - function b(t, e) { - return new f({ type: t, schema: null, validator: e }); - } - function y(t, e) { - return new f({ - ...t, - refiner: (e, r) => void 0 === e || t.refiner(e, r), - validator: (r, i) => void 0 === r || (e(r, i), t.validator(r, i)), - }); - } - function v(t) { - return new f({ - type: 'dynamic', - schema: null, - *entries(e, r) { - const i = t(e, r); - yield* i.entries(e, r); - }, - validator: (e, r) => t(e, r).validator(e, r), - coercer: (e, r) => t(e, r).coercer(e, r), - refiner: (e, r) => t(e, r).refiner(e, r), - }); - } - function w(t) { - let e; - return new f({ - type: 'lazy', - schema: null, - *entries(r, i) { - e ?? (e = t()), yield* e.entries(r, i); - }, - validator: (r, i) => (e ?? (e = t()), e.validator(r, i)), - coercer: (r, i) => (e ?? (e = t()), e.coercer(r, i)), - refiner: (r, i) => (e ?? (e = t()), e.refiner(r, i)), - }); - } - function _(t, e) { - const { schema: r } = t, - i = { ...r }; - for (const t of e) delete i[t]; - return 'type' === t.type ? V(i) : z(i); - } - function M(t) { - const e = t instanceof f ? { ...t.schema } : { ...t }; - for (const t in e) e[t] = F(e[t]); - return z(e); - } - function E(t, e) { - const { schema: r } = t, - i = {}; - for (const t of e) i[t] = r[t]; - return z(i); - } - function S(t, e) { - return console.warn('superstruct@0.11 - The `struct` helper has been renamed to `define`.'), b(t, e); - } - function x() { - return b('any', () => !0); - } - function A(t) { - return new f({ - type: 'array', - schema: t, - *entries(e) { - if (t && Array.isArray(e)) for (const [r, i] of e.entries()) yield [r, i, t]; - }, - coercer: t => (Array.isArray(t) ? t.slice() : t), - validator: t => Array.isArray(t) || `Expected an array value, but received: ${s(t)}`, - }); - } - function k() { - return b('bigint', t => 'bigint' == typeof t); - } - function R() { - return b('boolean', t => 'boolean' == typeof t); - } - function B() { - return b('date', t => (t instanceof Date && !isNaN(t.getTime())) || `Expected a valid \`Date\` object, but received: ${s(t)}`); - } - function I(t) { - const e = {}, - r = t.map(t => s(t)).join(); - for (const r of t) e[r] = r; - return new f({ type: 'enums', schema: e, validator: e => t.includes(e) || `Expected one of \`${r}\`, but received: ${s(e)}` }); - } - function T() { - return b('func', t => 'function' == typeof t || `Expected a function, but received: ${s(t)}`); - } - function P(t) { - return b('instance', e => e instanceof t || `Expected a \`${t.name}\` instance, but received: ${s(e)}`); - } - function O() { - return b( - 'integer', - t => ('number' == typeof t && !isNaN(t) && Number.isInteger(t)) || `Expected an integer, but received: ${s(t)}` - ); - } - function L(t) { - return new f({ - type: 'intersection', - schema: null, - *entries(e, r) { - for (const i of t) yield* i.entries(e, r); - }, - *validator(e, r) { - for (const i of t) yield* i.validator(e, r); - }, - *refiner(e, r) { - for (const i of t) yield* i.refiner(e, r); - }, - }); - } - function C(t) { - const e = s(t), - r = typeof t; - return new f({ - type: 'literal', - schema: 'string' === r || 'number' === r || 'boolean' === r ? t : null, - validator: r => r === t || `Expected the literal \`${e}\`, but received: ${s(r)}`, - }); - } - function N(t, e) { - return new f({ - type: 'map', - schema: null, - *entries(r) { - if (t && e && r instanceof Map) for (const [i, n] of r.entries()) yield [i, i, t], yield [i, n, e]; - }, - coercer: t => (t instanceof Map ? new Map(t) : t), - validator: t => t instanceof Map || `Expected a \`Map\` object, but received: ${s(t)}`, - }); - } - function j() { - return b('never', () => !1); - } - function U(t) { - return new f({ ...t, validator: (e, r) => null === e || t.validator(e, r), refiner: (e, r) => null === e || t.refiner(e, r) }); - } - function D() { - return b('number', t => ('number' == typeof t && !isNaN(t)) || `Expected a number, but received: ${s(t)}`); - } - function z(t) { - const e = t ? Object.keys(t) : [], - r = j(); - return new f({ - type: 'object', - schema: t || null, - *entries(i) { - if (t && n(i)) { - const n = new Set(Object.keys(i)); - for (const r of e) n.delete(r), yield [r, i[r], t[r]]; - for (const t of n) yield [t, i[t], r]; - } - }, - validator: t => n(t) || `Expected an object, but received: ${s(t)}`, - coercer: t => (n(t) ? { ...t } : t), - }); - } - function F(t) { - return new f({ - ...t, - validator: (e, r) => void 0 === e || t.validator(e, r), - refiner: (e, r) => void 0 === e || t.refiner(e, r), - }); - } - function q(t, e) { - return new f({ - type: 'record', - schema: null, - *entries(r) { - if (n(r)) - for (const i in r) { - const n = r[i]; - yield [i, i, t], yield [i, n, e]; - } - }, - validator: t => n(t) || `Expected an object, but received: ${s(t)}`, - }); - } - function H() { - return b('regexp', t => t instanceof RegExp); - } - function $(t) { - return new f({ - type: 'set', - schema: null, - *entries(e) { - if (t && e instanceof Set) for (const r of e) yield [r, r, t]; - }, - coercer: t => (t instanceof Set ? new Set(t) : t), - validator: t => t instanceof Set || `Expected a \`Set\` object, but received: ${s(t)}`, - }); - } - function Z() { - return b('string', t => 'string' == typeof t || `Expected a string, but received: ${s(t)}`); - } - function G(t) { - const e = j(); - return new f({ - type: 'tuple', - schema: null, - *entries(r) { - if (Array.isArray(r)) { - const i = Math.max(t.length, r.length); - for (let n = 0; n < i; n++) yield [n, r[n], t[n] || e]; - } - }, - validator: t => Array.isArray(t) || `Expected an array, but received: ${s(t)}`, - }); - } - function V(t) { - const e = Object.keys(t); - return new f({ - type: 'type', - schema: t, - *entries(r) { - if (n(r)) for (const i of e) yield [i, r[i], t[i]]; - }, - validator: t => n(t) || `Expected an object, but received: ${s(t)}`, - coercer: t => (n(t) ? { ...t } : t), - }); - } - function W(t) { - const e = t.map(t => t.type).join(' | '); - return new f({ - type: 'union', - schema: null, - coercer(e) { - for (const r of t) { - const [t, i] = r.validate(e, { coerce: !0 }); - if (!t) return i; - } - return e; - }, - validator(r, i) { - const n = []; - for (const e of t) { - const [...t] = u(r, e, i), - [o] = t; - if (!o[0]) return []; - for (const [e] of t) e && n.push(e); - } - return [`Expected the value to satisfy a union of \`${e}\`, but received: ${s(r)}`, ...n]; - }, - }); - } - function K() { - return b('unknown', () => !0); - } - function Y(t, e, r) { - return new f({ ...t, coercer: (i, n) => (p(i, e) ? t.coercer(r(i, n), n) : t.coercer(i, n)) }); - } - function J(t, e, r = {}) { - return Y(t, K(), t => { - const i = 'function' == typeof e ? e() : e; - if (void 0 === t) return i; - if (!r.strict && o(t) && o(i)) { - const e = { ...t }; - let r = !1; - for (const t in i) void 0 === e[t] && ((e[t] = i[t]), (r = !0)); - if (r) return e; - } - return t; - }); - } - function X(t) { - return Y(t, Z(), t => t.trim()); - } - function Q(t) { - return st(t, 'empty', e => { - const r = tt(e); - return 0 === r || `Expected an empty ${t.type} but received one with a size of \`${r}\``; - }); - } - function tt(t) { - return t instanceof Map || t instanceof Set ? t.size : t.length; - } - function et(t, e, r = {}) { - const { exclusive: i } = r; - return st(t, 'max', r => - i ? r < e : r <= e || `Expected a ${t.type} less than ${i ? '' : 'or equal to '}${e} but received \`${r}\`` - ); - } - function rt(t, e, r = {}) { - const { exclusive: i } = r; - return st(t, 'min', r => - i ? r > e : r >= e || `Expected a ${t.type} greater than ${i ? '' : 'or equal to '}${e} but received \`${r}\`` - ); - } - function it(t) { - return st(t, 'nonempty', e => tt(e) > 0 || `Expected a nonempty ${t.type} but received an empty one`); - } - function nt(t, e) { - return st(t, 'pattern', r => e.test(r) || `Expected a ${t.type} matching \`/${e.source}/\` but received "${r}"`); - } - function ot(t, e, r = e) { - const i = `Expected a ${t.type}`, - n = e === r ? `of \`${e}\`` : `between \`${e}\` and \`${r}\``; - return st(t, 'size', t => { - if ('number' == typeof t || t instanceof Date) return (e <= t && t <= r) || `${i} ${n} but received \`${t}\``; - if (t instanceof Map || t instanceof Set) { - const { size: o } = t; - return (e <= o && o <= r) || `${i} with a size ${n} but received one with a size of \`${o}\``; - } - { - const { length: o } = t; - return (e <= o && o <= r) || `${i} with a length ${n} but received one with a length of \`${o}\``; - } - }); - } - function st(t, e, r) { - return new f({ - ...t, - *refiner(i, n) { - yield* t.refiner(i, n); - const o = h(r(i, n), n, t, i); - for (const t of o) yield { ...t, refinement: e }; - }, - }); - } - }, - 4636: t => { - 'use strict'; - t.exports = JSON.parse( - '{"aes-128-ecb":{"cipher":"AES","key":128,"iv":0,"mode":"ECB","type":"block"},"aes-192-ecb":{"cipher":"AES","key":192,"iv":0,"mode":"ECB","type":"block"},"aes-256-ecb":{"cipher":"AES","key":256,"iv":0,"mode":"ECB","type":"block"},"aes-128-cbc":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes-192-cbc":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes-256-cbc":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes128":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes192":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes256":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes-128-cfb":{"cipher":"AES","key":128,"iv":16,"mode":"CFB","type":"stream"},"aes-192-cfb":{"cipher":"AES","key":192,"iv":16,"mode":"CFB","type":"stream"},"aes-256-cfb":{"cipher":"AES","key":256,"iv":16,"mode":"CFB","type":"stream"},"aes-128-cfb8":{"cipher":"AES","key":128,"iv":16,"mode":"CFB8","type":"stream"},"aes-192-cfb8":{"cipher":"AES","key":192,"iv":16,"mode":"CFB8","type":"stream"},"aes-256-cfb8":{"cipher":"AES","key":256,"iv":16,"mode":"CFB8","type":"stream"},"aes-128-cfb1":{"cipher":"AES","key":128,"iv":16,"mode":"CFB1","type":"stream"},"aes-192-cfb1":{"cipher":"AES","key":192,"iv":16,"mode":"CFB1","type":"stream"},"aes-256-cfb1":{"cipher":"AES","key":256,"iv":16,"mode":"CFB1","type":"stream"},"aes-128-ofb":{"cipher":"AES","key":128,"iv":16,"mode":"OFB","type":"stream"},"aes-192-ofb":{"cipher":"AES","key":192,"iv":16,"mode":"OFB","type":"stream"},"aes-256-ofb":{"cipher":"AES","key":256,"iv":16,"mode":"OFB","type":"stream"},"aes-128-ctr":{"cipher":"AES","key":128,"iv":16,"mode":"CTR","type":"stream"},"aes-192-ctr":{"cipher":"AES","key":192,"iv":16,"mode":"CTR","type":"stream"},"aes-256-ctr":{"cipher":"AES","key":256,"iv":16,"mode":"CTR","type":"stream"},"aes-128-gcm":{"cipher":"AES","key":128,"iv":12,"mode":"GCM","type":"auth"},"aes-192-gcm":{"cipher":"AES","key":192,"iv":12,"mode":"GCM","type":"auth"},"aes-256-gcm":{"cipher":"AES","key":256,"iv":12,"mode":"GCM","type":"auth"}}' - ); - }, - 7536: t => { - 'use strict'; - t.exports = JSON.parse( - '{"sha224WithRSAEncryption":{"sign":"rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"RSA-SHA224":{"sign":"ecdsa/rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"sha256WithRSAEncryption":{"sign":"rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"RSA-SHA256":{"sign":"ecdsa/rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"sha384WithRSAEncryption":{"sign":"rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"RSA-SHA384":{"sign":"ecdsa/rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"sha512WithRSAEncryption":{"sign":"rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA512":{"sign":"ecdsa/rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA1":{"sign":"rsa","hash":"sha1","id":"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{"sign":"ecdsa","hash":"sha1","id":""},"sha256":{"sign":"ecdsa","hash":"sha256","id":""},"sha224":{"sign":"ecdsa","hash":"sha224","id":""},"sha384":{"sign":"ecdsa","hash":"sha384","id":""},"sha512":{"sign":"ecdsa","hash":"sha512","id":""},"DSA-SHA":{"sign":"dsa","hash":"sha1","id":""},"DSA-SHA1":{"sign":"dsa","hash":"sha1","id":""},"DSA":{"sign":"dsa","hash":"sha1","id":""},"DSA-WITH-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-WITH-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-WITH-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-WITH-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-RIPEMD160":{"sign":"dsa","hash":"rmd160","id":""},"ripemd160WithRSA":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"RSA-RIPEMD160":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"md5WithRSAEncryption":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"},"RSA-MD5":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"}}' - ); - }, - 7330: t => { - 'use strict'; - t.exports = JSON.parse( - '{"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"}' - ); - }, - 7064: t => { - 'use strict'; - t.exports = JSON.parse( - '{"modp1":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},"modp2":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},"modp5":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},"modp14":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},"modp15":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},"modp16":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},"modp17":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},"modp18":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}' - ); - }, - 312: t => { - 'use strict'; - t.exports = { i8: '6.5.4' }; - }, - 1095: t => { - 'use strict'; - t.exports = JSON.parse( - '{"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}' - ); - }, - }, - e = {}; - function r(i) { - var n = e[i]; - if (void 0 !== n) return n.exports; - var o = (e[i] = { id: i, loaded: !1, exports: {} }); - return t[i].call(o.exports, o, o.exports, r), (o.loaded = !0), o.exports; - } - (r.d = (t, e) => { - for (var i in e) r.o(e, i) && !r.o(t, i) && Object.defineProperty(t, i, { enumerable: !0, get: e[i] }); - }), - (r.g = (function () { - if ('object' == typeof globalThis) return globalThis; - try { - return this || new Function('return this')(); - } catch (t) { - if ('object' == typeof window) return window; - } - })()), - (r.o = (t, e) => Object.prototype.hasOwnProperty.call(t, e)), - (r.r = t => { - 'undefined' != typeof Symbol && Symbol.toStringTag && Object.defineProperty(t, Symbol.toStringTag, { value: 'Module' }), - Object.defineProperty(t, '__esModule', { value: !0 }); - }), - (r.nmd = t => ((t.paths = []), t.children || (t.children = []), t)), - (() => { - 'use strict'; - var t, - e = r(6729), - i = - ((t = function (e, r) { - return ( - (t = - Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && - function (t, e) { - t.__proto__ = e; - }) || - function (t, e) { - for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && (t[r] = e[r]); - }), - t(e, r) - ); - }), - function (e, r) { - if ('function' != typeof r && null !== r) - throw new TypeError('Class extends value ' + String(r) + ' is not a constructor or null'); - function i() { - this.constructor = e; - } - t(e, r), (e.prototype = null === r ? Object.create(r) : ((i.prototype = r.prototype), new i())); - }), - n = function (t, e, r, i) { - return new (r || (r = Promise))(function (n, o) { - function s(t) { - try { - h(i.next(t)); - } catch (t) { - o(t); - } - } - function a(t) { - try { - h(i.throw(t)); - } catch (t) { - o(t); - } - } - function h(t) { - var e; - t.done - ? n(t.value) - : ((e = t.value), - e instanceof r - ? e - : new r(function (t) { - t(e); - })).then(s, a); - } - h((i = i.apply(t, e || [])).next()); - }); - }, - o = function (t, e) { - var r, - i, - n, - o, - s = { - label: 0, - sent: function () { - if (1 & n[0]) throw n[1]; - return n[1]; - }, - trys: [], - ops: [], - }; - return ( - (o = { next: a(0), throw: a(1), return: a(2) }), - 'function' == typeof Symbol && - (o[Symbol.iterator] = function () { - return this; - }), - o - ); - function a(a) { - return function (h) { - return (function (a) { - if (r) throw new TypeError('Generator is already executing.'); - for (; o && ((o = 0), a[0] && (s = 0)), s; ) - try { - if ( - ((r = 1), - i && - (n = 2 & a[0] ? i.return : a[0] ? i.throw || ((n = i.return) && n.call(i), 0) : i.next) && - !(n = n.call(i, a[1])).done) - ) - return n; - switch (((i = 0), n && (a = [2 & a[0], n.value]), a[0])) { - case 0: - case 1: - n = a; - break; - case 4: - return s.label++, { value: a[1], done: !1 }; - case 5: - s.label++, (i = a[1]), (a = [0]); - continue; - case 7: - (a = s.ops.pop()), s.trys.pop(); - continue; - default: - if (!((n = (n = s.trys).length > 0 && n[n.length - 1]) || (6 !== a[0] && 2 !== a[0]))) { - s = 0; - continue; - } - if (3 === a[0] && (!n || (a[1] > n[0] && a[1] < n[3]))) { - s.label = a[1]; - break; - } - if (6 === a[0] && s.label < n[1]) { - (s.label = n[1]), (n = a); - break; - } - if (n && s.label < n[2]) { - (s.label = n[2]), s.ops.push(a); - break; - } - n[2] && s.ops.pop(), s.trys.pop(); - continue; - } - a = e.call(t, s); - } catch (t) { - (a = [6, t]), (i = 0); - } finally { - r = n = 0; - } - if (5 & a[0]) throw a[1]; - return { value: a[0] ? a[1] : void 0, done: !0 }; - })([a, h]); - }; - } - }, - s = (function (t) { - function e(e) { - var r = void 0 === e ? {} : e, - i = r.backgroundMessenger, - n = r.providerRequestTransport, - o = r.onConstruct, - s = t.call(this) || this; - return ( - (s.chainId = '0x1'), - (s.connected = !1), - (s.isRainbow = !0), - (s.isReady = !0), - (s.isMetaMask = !0), - (s.networkVersion = '1'), - (s.providers = void 0), - (s.requestId = 0), - (s.backgroundMessenger = i), - (s.providerRequestTransport = n), - null == o || o({ emit: s.emit.bind(s) }), - s.bindMethods(), - s - ); - } - return ( - i(e, t), - (e.prototype.bindMethods = function () { - for (var t = 0, e = Object.getOwnPropertyNames(Object.getPrototypeOf(this)); t < e.length; t++) { - var r = e[t], - i = this[r]; - 'function' == typeof i && 'constructor' !== r && (this[r] = i.bind(this)); - } - }), - (e.prototype.enable = function () { - return n(this, void 0, void 0, function () { - return o(this, function (t) { - return [2, this.request({ method: 'eth_requestAccounts' })]; - }); - }); - }), - (e.prototype.isConnected = function () { - return this.connected; - }), - (e.prototype.request = function (t) { - var e, - r, - i = t.method, - s = t.params; - return n(this, void 0, void 0, function () { - var t, n; - return o(this, function (o) { - switch (o.label) { - case 0: - if (!this.providerRequestTransport) throw new Error('No transport'); - return ( - null === (e = this.backgroundMessenger) || - void 0 === e || - e.send('rainbow_prefetchDappMetadata', window.location.href), - (t = this.requestId++), - [ - 4, - null === (r = this.providerRequestTransport) || void 0 === r - ? void 0 - : r.send({ id: t, method: i, params: s }, { id: t }), - ] - ); - case 1: - n = o.sent(); - if (n.error) throw n.error; - switch (i) { - case 'eth_requestAccounts': - (this.selectedAddress = n.result[0]), (this.connected = !0); - break; - case 'eth_chainId': - (this.chainId = n.result), (this.networkVersion = parseInt(this.chainId, 16).toString()); - } - return [2, n.result]; - } - }); - }); - }), - (e.prototype.sendAsync = function (t) { - return n(this, void 0, void 0, function () { - return o(this, function (e) { - return [2, this.request(t)]; - }); - }); - }), - (e.prototype.send = function (t, e) { - return n(this, void 0, void 0, function () { - return o(this, function (r) { - return 'string' == typeof t && Array.isArray(e) ? [2, this.request({ method: t, params: e })] : [2, this.request(t)]; - }); - }); - }), - e - ); - })(e); - function a(t, e = {}) { - const { fees: r = t.fees, formatters: i = t.formatters, serializers: n = t.serializers } = e; - return { ...t, fees: r, formatters: i, serializers: n }; - } - const h = a({ - id: 42161, - name: 'Arbitrum One', - network: 'arbitrum', - nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 }, - rpcUrls: { - alchemy: { http: ['https://arb-mainnet.g.alchemy.com/v2'], webSocket: ['wss://arb-mainnet.g.alchemy.com/v2'] }, - infura: { http: ['https://arbitrum-mainnet.infura.io/v3'], webSocket: ['wss://arbitrum-mainnet.infura.io/ws/v3'] }, - default: { http: ['https://arb1.arbitrum.io/rpc'] }, - public: { http: ['https://arb1.arbitrum.io/rpc'] }, - }, - blockExplorers: { - etherscan: { name: 'Arbiscan', url: 'https://arbiscan.io' }, - default: { name: 'Arbiscan', url: 'https://arbiscan.io' }, - }, - contracts: { multicall3: { address: '0xca11bde05977b3631167028862be2a173976ca11', blockCreated: 7654707 } }, - }), - u = a({ - id: 42170, - name: 'Arbitrum Nova', - network: 'arbitrum-nova', - nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 }, - rpcUrls: { - blast: { http: ['https://arbitrum-nova.public.blastapi.io'], webSocket: ['wss://arbitrum-nova.public.blastapi.io'] }, - default: { http: ['https://nova.arbitrum.io/rpc'] }, - public: { http: ['https://nova.arbitrum.io/rpc'] }, - }, - blockExplorers: { - etherscan: { name: 'Arbiscan', url: 'https://nova.arbiscan.io' }, - blockScout: { name: 'BlockScout', url: 'https://nova-explorer.arbitrum.io/' }, - default: { name: 'Arbiscan', url: 'https://nova.arbiscan.io' }, - }, - contracts: { multicall3: { address: '0xca11bde05977b3631167028862be2a173976ca11', blockCreated: 1746963 } }, - }), - f = a({ - id: 43114, - name: 'Avalanche', - network: 'avalanche', - nativeCurrency: { decimals: 18, name: 'Avalanche', symbol: 'AVAX' }, - rpcUrls: { - default: { http: ['https://api.avax.network/ext/bc/C/rpc'] }, - public: { http: ['https://api.avax.network/ext/bc/C/rpc'] }, - }, - blockExplorers: { - etherscan: { name: 'SnowTrace', url: 'https://snowtrace.io' }, - default: { name: 'SnowTrace', url: 'https://snowtrace.io' }, - }, - contracts: { multicall3: { address: '0xca11bde05977b3631167028862be2a173976ca11', blockCreated: 11907934 } }, - }); - class c extends Error { - constructor(t, e = {}) { - super(), - Object.defineProperty(this, 'details', { enumerable: !0, configurable: !0, writable: !0, value: void 0 }), - Object.defineProperty(this, 'docsPath', { enumerable: !0, configurable: !0, writable: !0, value: void 0 }), - Object.defineProperty(this, 'metaMessages', { enumerable: !0, configurable: !0, writable: !0, value: void 0 }), - Object.defineProperty(this, 'shortMessage', { enumerable: !0, configurable: !0, writable: !0, value: void 0 }), - Object.defineProperty(this, 'name', { enumerable: !0, configurable: !0, writable: !0, value: 'ViemError' }), - Object.defineProperty(this, 'version', { enumerable: !0, configurable: !0, writable: !0, value: 'viem@1.21.3' }); - const r = e.cause instanceof c ? e.cause.details : e.cause?.message ? e.cause.message : e.details, - i = (e.cause instanceof c && e.cause.docsPath) || e.docsPath; - (this.message = [ - t || 'An error occurred.', - '', - ...(e.metaMessages ? [...e.metaMessages, ''] : []), - ...(i ? [`Docs: https://viem.sh${i}.html${e.docsSlug ? `#${e.docsSlug}` : ''}`] : []), - ...(r ? [`Details: ${r}`] : []), - `Version: ${this.version}`, - ].join('\n')), - e.cause && (this.cause = e.cause), - (this.details = r), - (this.docsPath = i), - (this.metaMessages = e.metaMessages), - (this.shortMessage = t); - } - walk(t) { - return l(this, t); - } - } - function l(t, e) { - return e?.(t) ? t : t && 'object' == typeof t && 'cause' in t ? l(t.cause, e) : e ? null : t; - } - class d extends c { - constructor({ max: t, min: e, signed: r, size: i, value: n }) { - super( - `Number "${n}" is not in safe ${i ? `${8 * i}-bit ${r ? 'signed' : 'unsigned'} ` : ''}integer range ${t ? `(${e} to ${t})` : `(above ${e})`}` - ), - Object.defineProperty(this, 'name', { enumerable: !0, configurable: !0, writable: !0, value: 'IntegerOutOfRangeError' }); - } - } - class p extends c { - constructor({ givenSize: t, maxSize: e }) { - super(`Size cannot exceed ${e} bytes. Given size: ${t} bytes.`), - Object.defineProperty(this, 'name', { enumerable: !0, configurable: !0, writable: !0, value: 'SizeOverflowError' }); - } - } - function m(t) { - return (function (t, { strict: e = !0 } = {}) { - return !!t && 'string' == typeof t && (e ? /^0x[0-9a-fA-F]*$/.test(t) : t.startsWith('0x')); - })(t, { strict: !1 }) - ? Math.ceil((t.length - 2) / 2) - : t.length; - } - function g(t, { size: e }) { - if (m(t) > e) throw new p({ givenSize: m(t), maxSize: e }); - } - function b(t, e = {}) { - const { signed: r } = e; - e.size && g(t, { size: e.size }); - const i = BigInt(t); - if (!r) return i; - const n = (t.length - 2) / 2; - return i <= (1n << (8n * BigInt(n) - 1n)) - 1n ? i : i - BigInt(`0x${'f'.padStart(2 * n, 'f')}`) - 1n; - } - function y(t, e = {}) { - return Number(b(t, e)); - } - function v(t, e) { - return ({ exclude: r, format: i }) => ({ - exclude: r, - format: t => { - const n = e(t); - if (r) for (const t of r) delete n[t]; - return { ...n, ...i(t) }; - }, - type: t, - }); - } - const w = { '0x0': 'legacy', '0x1': 'eip2930', '0x2': 'eip1559' }; - function _(t) { - const e = { - ...t, - blockHash: t.blockHash ? t.blockHash : null, - blockNumber: t.blockNumber ? BigInt(t.blockNumber) : null, - chainId: t.chainId ? y(t.chainId) : void 0, - gas: t.gas ? BigInt(t.gas) : void 0, - gasPrice: t.gasPrice ? BigInt(t.gasPrice) : void 0, - maxFeePerGas: t.maxFeePerGas ? BigInt(t.maxFeePerGas) : void 0, - maxPriorityFeePerGas: t.maxPriorityFeePerGas ? BigInt(t.maxPriorityFeePerGas) : void 0, - nonce: t.nonce ? y(t.nonce) : void 0, - to: t.to ? t.to : null, - transactionIndex: t.transactionIndex ? Number(t.transactionIndex) : null, - type: t.type ? w[t.type] : void 0, - typeHex: t.type ? t.type : void 0, - value: t.value ? BigInt(t.value) : void 0, - v: t.v ? BigInt(t.v) : void 0, - }; - return ( - (e.yParity = (() => { - if (t.yParity) return Number(t.yParity); - if ('bigint' == typeof e.v) { - if (0n === e.v || 27n === e.v) return 0; - if (1n === e.v || 28n === e.v) return 1; - if (e.v >= 35n) return e.v % 2n === 0n ? 1 : 0; - } - })()), - 'legacy' === e.type && (delete e.accessList, delete e.maxFeePerGas, delete e.maxPriorityFeePerGas, delete e.yParity), - 'eip2930' === e.type && (delete e.maxFeePerGas, delete e.maxPriorityFeePerGas), - e - ); - } - const M = v('transaction', _); - function E(t) { - const e = t.transactions?.map(t => ('string' == typeof t ? t : _(t))); - return { - ...t, - baseFeePerGas: t.baseFeePerGas ? BigInt(t.baseFeePerGas) : null, - difficulty: t.difficulty ? BigInt(t.difficulty) : void 0, - gasLimit: t.gasLimit ? BigInt(t.gasLimit) : void 0, - gasUsed: t.gasUsed ? BigInt(t.gasUsed) : void 0, - hash: t.hash ? t.hash : null, - logsBloom: t.logsBloom ? t.logsBloom : null, - nonce: t.nonce ? t.nonce : null, - number: t.number ? BigInt(t.number) : null, - size: t.size ? BigInt(t.size) : void 0, - timestamp: t.timestamp ? BigInt(t.timestamp) : void 0, - transactions: e, - totalDifficulty: t.totalDifficulty ? BigInt(t.totalDifficulty) : null, - }; - } - const S = v('block', E), - x = { '0x0': 'reverted', '0x1': 'success' }; - function A(t) { - return { - ...t, - blockNumber: t.blockNumber ? BigInt(t.blockNumber) : null, - contractAddress: t.contractAddress ? t.contractAddress : null, - cumulativeGasUsed: t.cumulativeGasUsed ? BigInt(t.cumulativeGasUsed) : null, - effectiveGasPrice: t.effectiveGasPrice ? BigInt(t.effectiveGasPrice) : null, - gasUsed: t.gasUsed ? BigInt(t.gasUsed) : null, - logs: t.logs - ? t.logs.map(t => - (function (t, { args: e, eventName: r } = {}) { - return { - ...t, - blockHash: t.blockHash ? t.blockHash : null, - blockNumber: t.blockNumber ? BigInt(t.blockNumber) : null, - logIndex: t.logIndex ? Number(t.logIndex) : null, - transactionHash: t.transactionHash ? t.transactionHash : null, - transactionIndex: t.transactionIndex ? Number(t.transactionIndex) : null, - ...(r ? { args: e, eventName: r } : {}), - }; - })(t) - ) - : null, - to: t.to ? t.to : null, - transactionIndex: t.transactionIndex ? y(t.transactionIndex) : null, - status: t.status ? x[t.status] : null, - type: t.type ? w[t.type] || t.type : null, - }; - } - const k = v('transactionReceipt', A), - R = { - block: S({ - format(t) { - const e = t.transactions?.map(t => { - if ('string' == typeof t) return t; - const e = _(t); - return ( - '0x7e' === e.typeHex && - ((e.isSystemTx = t.isSystemTx), - (e.mint = t.mint ? b(t.mint) : void 0), - (e.sourceHash = t.sourceHash), - (e.type = 'deposit')), - e - ); - }); - return { transactions: e, stateRoot: t.stateRoot }; - }, - }), - transaction: M({ - format(t) { - const e = {}; - return ( - '0x7e' === t.type && - ((e.isSystemTx = t.isSystemTx), - (e.mint = t.mint ? b(t.mint) : void 0), - (e.sourceHash = t.sourceHash), - (e.type = 'deposit')), - e - ); - }, - }), - transactionReceipt: k({ - format: t => ({ - l1GasPrice: t.l1GasPrice ? b(t.l1GasPrice) : null, - l1GasUsed: t.l1GasUsed ? b(t.l1GasUsed) : null, - l1Fee: t.l1Fee ? b(t.l1Fee) : null, - l1FeeScalar: t.l1FeeScalar ? Number(t.l1FeeScalar) : null, - }), - }), - }, - B = a( - { - id: 8453, - network: 'base', - name: 'Base', - nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 }, - rpcUrls: { - alchemy: { http: ['https://base-mainnet.g.alchemy.com/v2'], webSocket: ['wss://base-mainnet.g.alchemy.com/v2'] }, - infura: { http: ['https://base-mainnet.infura.io/v3'], webSocket: ['wss://base-mainnet.infura.io/ws/v3'] }, - default: { http: ['https://mainnet.base.org'] }, - public: { http: ['https://mainnet.base.org'] }, - }, - blockExplorers: { - blockscout: { name: 'Basescout', url: 'https://base.blockscout.com' }, - default: { name: 'Basescan', url: 'https://basescan.org' }, - etherscan: { name: 'Basescan', url: 'https://basescan.org' }, - }, - contracts: { multicall3: { address: '0xca11bde05977b3631167028862be2a173976ca11', blockCreated: 5022 } }, - }, - { formatters: R } - ), - I = a({ - id: 56, - name: 'BNB Smart Chain', - network: 'bsc', - nativeCurrency: { decimals: 18, name: 'BNB', symbol: 'BNB' }, - rpcUrls: { default: { http: ['https://rpc.ankr.com/bsc'] }, public: { http: ['https://rpc.ankr.com/bsc'] } }, - blockExplorers: { - etherscan: { name: 'BscScan', url: 'https://bscscan.com' }, - default: { name: 'BscScan', url: 'https://bscscan.com' }, - }, - contracts: { multicall3: { address: '0xca11bde05977b3631167028862be2a173976ca11', blockCreated: 15921452 } }, - }); - class T extends c { - constructor({ size: t, targetSize: e, type: r }) { - super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (${t}) exceeds padding size (${e}).`), - Object.defineProperty(this, 'name', { enumerable: !0, configurable: !0, writable: !0, value: 'SizeExceedsPaddingSizeError' }); - } - } - function P(t, { dir: e, size: r = 32 } = {}) { - return 'string' == typeof t - ? (function (t, { dir: e, size: r = 32 } = {}) { - if (null === r) return t; - const i = t.replace('0x', ''); - if (i.length > 2 * r) throw new T({ size: Math.ceil(i.length / 2), targetSize: r, type: 'hex' }); - return `0x${i['right' === e ? 'padEnd' : 'padStart'](2 * r, '0')}`; - })(t, { dir: e, size: r }) - : (function (t, { dir: e, size: r = 32 } = {}) { - if (null === r) return t; - if (t.length > r) throw new T({ size: t.length, targetSize: r, type: 'bytes' }); - const i = new Uint8Array(r); - for (let n = 0; n < r; n++) { - const o = 'right' === e; - i[o ? n : r - n - 1] = t[o ? n : t.length - n - 1]; - } - return i; - })(t, { dir: e, size: r }); - } - const O = Array.from({ length: 256 }, (t, e) => e.toString(16).padStart(2, '0')); - function L(t, e = {}) { - return 'number' == typeof t || 'bigint' == typeof t - ? N(t, e) - : 'string' == typeof t - ? (function (t, e = {}) { - return C(j.encode(t), e); - })(t, e) - : 'boolean' == typeof t - ? (function (t, e = {}) { - const r = `0x${Number(t)}`; - return 'number' == typeof e.size ? (g(r, { size: e.size }), P(r, { size: e.size })) : r; - })(t, e) - : C(t, e); - } - function C(t, e = {}) { - let r = ''; - for (let e = 0; e < t.length; e++) r += O[t[e]]; - const i = `0x${r}`; - return 'number' == typeof e.size ? (g(i, { size: e.size }), P(i, { dir: 'right', size: e.size })) : i; - } - function N(t, e = {}) { - const { signed: r, size: i } = e, - n = BigInt(t); - let o; - i - ? (o = r ? (1n << (8n * BigInt(i) - 1n)) - 1n : 2n ** (8n * BigInt(i)) - 1n) - : 'number' == typeof t && (o = BigInt(Number.MAX_SAFE_INTEGER)); - const s = 'bigint' == typeof o && r ? -o - 1n : 0; - if ((o && n > o) || n < s) { - const e = 'bigint' == typeof t ? 'n' : ''; - throw new d({ max: o ? `${o}${e}` : void 0, min: `${s}${e}`, signed: r, size: i, value: `${t}${e}` }); - } - const a = `0x${(r && n < 0 ? (1n << BigInt(8 * i)) + BigInt(n) : n).toString(16)}`; - return i ? P(a, { size: i }) : a; - } - const j = new TextEncoder(), - U = { legacy: '0x0', eip2930: '0x1', eip1559: '0x2' }; - function D(t) { - return { - ...t, - gas: void 0 !== t.gas ? N(t.gas) : void 0, - gasPrice: void 0 !== t.gasPrice ? N(t.gasPrice) : void 0, - maxFeePerGas: void 0 !== t.maxFeePerGas ? N(t.maxFeePerGas) : void 0, - maxPriorityFeePerGas: void 0 !== t.maxPriorityFeePerGas ? N(t.maxPriorityFeePerGas) : void 0, - nonce: void 0 !== t.nonce ? N(t.nonce) : void 0, - type: void 0 !== t.type ? U[t.type] : void 0, - value: void 0 !== t.value ? N(t.value) : void 0, - }; - } - const z = v('transactionRequest', D); - function F(t, { dir: e = 'left' } = {}) { - let r = 'string' == typeof t ? t.replace('0x', '') : t, - i = 0; - for (let t = 0; t < r.length - 1 && '0' === r['left' === e ? t : r.length - t - 1].toString(); t++) i++; - return ( - (r = 'left' === e ? r.slice(i) : r.slice(0, r.length - i)), - 'string' == typeof t ? (1 === r.length && 'right' === e && (r = `${r}0`), `0x${r.length % 2 == 1 ? `0${r}` : r}`) : r - ); - } - function q(t) { - return ( - 0 === t || - 0n === t || - null == t || - '0' === t || - '' === t || - ('string' == typeof t && ('0x' === F(t).toLowerCase() || '0x00' === F(t).toLowerCase())) - ); - } - function H(t) { - return !q(t); - } - function $(t) { - return H(t.maxFeePerGas) && H(t.maxPriorityFeePerGas); - } - function Z(t) { - return 'cip42' === t.type || ($(t) && (H(t.feeCurrency) || H(t.gatewayFeeRecipient) || H(t.gatewayFee))); - } - function G(t) { - return 'cip64' === t.type || ($(t) && H(t.feeCurrency) && q(t.gatewayFee) && q(t.gatewayFeeRecipient)); - } - const V = { - block: S({ - exclude: ['difficulty', 'gasLimit', 'mixHash', 'nonce', 'uncles'], - format(t) { - const e = t.transactions?.map(t => - 'string' == typeof t - ? t - : { - ..._(t), - feeCurrency: t.feeCurrency, - ...('0x7b' !== t.type - ? { gatewayFee: t.gatewayFee ? b(t.gatewayFee) : null, gatewayFeeRecipient: t.gatewayFeeRecipient || null } - : {}), - } - ); - return { randomness: t.randomness, transactions: e }; - }, - }), - transaction: M({ - format(t) { - const e = { feeCurrency: t.feeCurrency }; - return ( - '0x7b' === t.type - ? (e.type = 'cip64') - : ('0x7c' === t.type && (e.type = 'cip42'), - (e.gatewayFee = t.gatewayFee ? b(t.gatewayFee) : null), - (e.gatewayFeeRecipient = t.gatewayFeeRecipient)), - e - ); - }, - }), - transactionRequest: z({ - format(t) { - const e = { feeCurrency: t.feeCurrency }; - return ( - G(t) - ? (e.type = '0x7b') - : (Z(t) && (e.type = '0x7c'), - (e.gatewayFee = void 0 !== t.gatewayFee ? N(t.gatewayFee) : void 0), - (e.gatewayFeeRecipient = t.gatewayFeeRecipient)), - e - ); - }, - }), - }; - class W extends c { - constructor({ address: t }) { - super(`Address "${t}" is invalid.`), - Object.defineProperty(this, 'name', { enumerable: !0, configurable: !0, writable: !0, value: 'InvalidAddressError' }); - } - } - class K extends c { - constructor({ chainId: t }) { - super(`Chain ID "${t}" is invalid.`), - Object.defineProperty(this, 'name', { enumerable: !0, configurable: !0, writable: !0, value: 'InvalidChainIdError' }); - } - } - const Y = { ether: -9, wei: 9 }; - function J(t, e = 'wei') { - return (function (t, e) { - let r = t.toString(); - const i = r.startsWith('-'); - i && (r = r.slice(1)), (r = r.padStart(e, '0')); - let [n, o] = [r.slice(0, r.length - e), r.slice(r.length - e)]; - return (o = o.replace(/(0+)$/, '')), `${i ? '-' : ''}${n || '0'}${o ? `.${o}` : ''}`; - })(t, Y[e]); - } - class X extends c { - constructor({ cause: t, message: e } = {}) { - const r = e?.replace('execution reverted: ', '')?.replace('execution reverted', ''); - super(`Execution reverted ${r ? `with reason: ${r}` : 'for an unknown reason'}.`, { cause: t }), - Object.defineProperty(this, 'name', { enumerable: !0, configurable: !0, writable: !0, value: 'ExecutionRevertedError' }); - } - } - Object.defineProperty(X, 'code', { enumerable: !0, configurable: !0, writable: !0, value: 3 }), - Object.defineProperty(X, 'nodeMessage', { enumerable: !0, configurable: !0, writable: !0, value: /execution reverted/ }); - class Q extends c { - constructor({ cause: t, maxFeePerGas: e } = {}) { - super(`The fee cap (\`maxFeePerGas\`${e ? ` = ${J(e)} gwei` : ''}) cannot be higher than the maximum allowed value (2^256-1).`, { - cause: t, - }), - Object.defineProperty(this, 'name', { enumerable: !0, configurable: !0, writable: !0, value: 'FeeCapTooHigh' }); - } - } - Object.defineProperty(Q, 'nodeMessage', { - enumerable: !0, - configurable: !0, - writable: !0, - value: /max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/, - }), - Object.defineProperty( - class extends c { - constructor({ cause: t, maxFeePerGas: e } = {}) { - super(`The fee cap (\`maxFeePerGas\`${e ? ` = ${J(e)}` : ''} gwei) cannot be lower than the block base fee.`, { cause: t }), - Object.defineProperty(this, 'name', { enumerable: !0, configurable: !0, writable: !0, value: 'FeeCapTooLow' }); - } - }, - 'nodeMessage', - { - enumerable: !0, - configurable: !0, - writable: !0, - value: /max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/, - } - ), - Object.defineProperty( - class extends c { - constructor({ cause: t, nonce: e } = {}) { - super(`Nonce provided for the transaction ${e ? `(${e}) ` : ''}is higher than the next one expected.`, { cause: t }), - Object.defineProperty(this, 'name', { enumerable: !0, configurable: !0, writable: !0, value: 'NonceTooHighError' }); - } - }, - 'nodeMessage', - { enumerable: !0, configurable: !0, writable: !0, value: /nonce too high/ } - ), - Object.defineProperty( - class extends c { - constructor({ cause: t, nonce: e } = {}) { - super( - [ - `Nonce provided for the transaction ${e ? `(${e}) ` : ''}is lower than the current nonce of the account.`, - 'Try increasing the nonce or find the latest nonce with `getTransactionCount`.', - ].join('\n'), - { cause: t } - ), - Object.defineProperty(this, 'name', { enumerable: !0, configurable: !0, writable: !0, value: 'NonceTooLowError' }); - } - }, - 'nodeMessage', - { enumerable: !0, configurable: !0, writable: !0, value: /nonce too low|transaction already imported|already known/ } - ), - Object.defineProperty( - class extends c { - constructor({ cause: t, nonce: e } = {}) { - super(`Nonce provided for the transaction ${e ? `(${e}) ` : ''}exceeds the maximum allowed nonce.`, { cause: t }), - Object.defineProperty(this, 'name', { enumerable: !0, configurable: !0, writable: !0, value: 'NonceMaxValueError' }); - } - }, - 'nodeMessage', - { enumerable: !0, configurable: !0, writable: !0, value: /nonce has max value/ } - ), - Object.defineProperty( - class extends c { - constructor({ cause: t } = {}) { - super( - ['The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account.'].join('\n'), - { - cause: t, - metaMessages: [ - 'This error could arise when the account does not have enough funds to:', - ' - pay for the total gas fee,', - ' - pay for the value to send.', - ' ', - 'The cost of the transaction is calculated as `gas * gas fee + value`, where:', - ' - `gas` is the amount of gas needed for transaction to execute,', - ' - `gas fee` is the gas fee,', - ' - `value` is the amount of ether to send to the recipient.', - ], - } - ), - Object.defineProperty(this, 'name', { enumerable: !0, configurable: !0, writable: !0, value: 'InsufficientFundsError' }); - } - }, - 'nodeMessage', - { enumerable: !0, configurable: !0, writable: !0, value: /insufficient funds/ } - ), - Object.defineProperty( - class extends c { - constructor({ cause: t, gas: e } = {}) { - super(`The amount of gas ${e ? `(${e}) ` : ''}provided for the transaction exceeds the limit allowed for the block.`, { - cause: t, - }), - Object.defineProperty(this, 'name', { enumerable: !0, configurable: !0, writable: !0, value: 'IntrinsicGasTooHighError' }); - } - }, - 'nodeMessage', - { enumerable: !0, configurable: !0, writable: !0, value: /intrinsic gas too high|gas limit reached/ } - ), - Object.defineProperty( - class extends c { - constructor({ cause: t, gas: e } = {}) { - super(`The amount of gas ${e ? `(${e}) ` : ''}provided for the transaction is too low.`, { cause: t }), - Object.defineProperty(this, 'name', { enumerable: !0, configurable: !0, writable: !0, value: 'IntrinsicGasTooLowError' }); - } - }, - 'nodeMessage', - { enumerable: !0, configurable: !0, writable: !0, value: /intrinsic gas too low/ } - ), - Object.defineProperty( - class extends c { - constructor({ cause: t }) { - super('The transaction type is not supported for this chain.', { cause: t }), - Object.defineProperty(this, 'name', { - enumerable: !0, - configurable: !0, - writable: !0, - value: 'TransactionTypeNotSupportedError', - }); - } - }, - 'nodeMessage', - { enumerable: !0, configurable: !0, writable: !0, value: /transaction type not valid/ } - ); - class tt extends c { - constructor({ cause: t, maxPriorityFeePerGas: e, maxFeePerGas: r } = {}) { - super( - [ - `The provided tip (\`maxPriorityFeePerGas\`${e ? ` = ${J(e)} gwei` : ''}) cannot be higher than the fee cap (\`maxFeePerGas\`${r ? ` = ${J(r)} gwei` : ''}).`, - ].join('\n'), - { cause: t } - ), - Object.defineProperty(this, 'name', { enumerable: !0, configurable: !0, writable: !0, value: 'TipAboveFeeCapError' }); - } - } - Object.defineProperty(tt, 'nodeMessage', { - enumerable: !0, - configurable: !0, - writable: !0, - value: /max priority fee per gas higher than max fee per gas|tip higher than fee cap/, - }); - const et = /^0x[a-fA-F0-9]{40}$/; - function rt(t) { - return et.test(t); - } - function it(t) { - return `0x${t.reduce((t, e) => t + e.replace('0x', ''), '')}`; - } - class nt extends c { - constructor({ offset: t }) { - super(`Offset \`${t}\` cannot be negative.`), - Object.defineProperty(this, 'name', { enumerable: !0, configurable: !0, writable: !0, value: 'NegativeOffsetError' }); - } - } - class ot extends c { - constructor({ length: t, position: e }) { - super(`Position \`${e}\` is out of bounds (\`0 < position < ${t}\`).`), - Object.defineProperty(this, 'name', { enumerable: !0, configurable: !0, writable: !0, value: 'PositionOutOfBoundsError' }); - } - } - const st = { - bytes: new Uint8Array(), - dataView: new DataView(new ArrayBuffer(0)), - position: 0, - assertPosition(t) { - if (t < 0 || t > this.bytes.length - 1) throw new ot({ length: this.bytes.length, position: t }); - }, - decrementPosition(t) { - if (t < 0) throw new nt({ offset: t }); - const e = this.position - t; - this.assertPosition(e), (this.position = e); - }, - incrementPosition(t) { - if (t < 0) throw new nt({ offset: t }); - const e = this.position + t; - this.assertPosition(e), (this.position = e); - }, - inspectByte(t) { - const e = t ?? this.position; - return this.assertPosition(e), this.bytes[e]; - }, - inspectBytes(t, e) { - const r = e ?? this.position; - return this.assertPosition(r + t - 1), this.bytes.subarray(r, r + t); - }, - inspectUint8(t) { - const e = t ?? this.position; - return this.assertPosition(e), this.bytes[e]; - }, - inspectUint16(t) { - const e = t ?? this.position; - return this.assertPosition(e + 1), this.dataView.getUint16(e); - }, - inspectUint24(t) { - const e = t ?? this.position; - return this.assertPosition(e + 2), (this.dataView.getUint16(e) << 8) + this.dataView.getUint8(e + 2); - }, - inspectUint32(t) { - const e = t ?? this.position; - return this.assertPosition(e + 3), this.dataView.getUint32(e); - }, - pushByte(t) { - this.assertPosition(this.position), (this.bytes[this.position] = t), this.position++; - }, - pushBytes(t) { - this.assertPosition(this.position + t.length - 1), this.bytes.set(t, this.position), (this.position += t.length); - }, - pushUint8(t) { - this.assertPosition(this.position), (this.bytes[this.position] = t), this.position++; - }, - pushUint16(t) { - this.assertPosition(this.position + 1), this.dataView.setUint16(this.position, t), (this.position += 2); - }, - pushUint24(t) { - this.assertPosition(this.position + 2), - this.dataView.setUint16(this.position, t >> 8), - this.dataView.setUint8(this.position + 2, 255 & t), - (this.position += 3); - }, - pushUint32(t) { - this.assertPosition(this.position + 3), this.dataView.setUint32(this.position, t), (this.position += 4); - }, - readByte() { - const t = this.inspectByte(); - return this.position++, t; - }, - readBytes(t) { - const e = this.inspectBytes(t); - return (this.position += t), e; - }, - readUint8() { - const t = this.inspectUint8(); - return (this.position += 1), t; - }, - readUint16() { - const t = this.inspectUint16(); - return (this.position += 2), t; - }, - readUint24() { - const t = this.inspectUint24(); - return (this.position += 3), t; - }, - readUint32() { - const t = this.inspectUint32(); - return (this.position += 4), t; - }, - setPosition(t) { - this.assertPosition(t), (this.position = t); - }, - }, - at = { zero: 48, nine: 57, A: 65, F: 70, a: 97, f: 102 }; - function ht(t) { - return t >= at.zero && t <= at.nine - ? t - at.zero - : t >= at.A && t <= at.F - ? t - (at.A - 10) - : t >= at.a && t <= at.f - ? t - (at.a - 10) - : void 0; - } - function ut(t, e = 'hex') { - const r = ft(t), - i = (function (t) { - const e = Object.create(st); - return (e.bytes = t), (e.dataView = new DataView(t.buffer, t.byteOffset, t.byteLength)), e; - })(new Uint8Array(r.length)); - return r.encode(i), 'hex' === e ? C(i.bytes) : i.bytes; - } - function ft(t) { - return Array.isArray(t) - ? (function (t) { - const e = t.reduce((t, e) => t + e.length, 0), - r = ct(e); - return { - length: e <= 55 ? 1 + e : 1 + r + e, - encode(i) { - e <= 55 - ? i.pushByte(192 + e) - : (i.pushByte(247 + r), - 1 === r ? i.pushUint8(e) : 2 === r ? i.pushUint16(e) : 3 === r ? i.pushUint24(e) : i.pushUint32(e)); - for (const { encode: e } of t) e(i); - }, - }; - })(t.map(t => ft(t))) - : (function (t) { - const e = - 'string' == typeof t - ? (function (t, e = {}) { - let r = t; - e.size && (g(r, { size: e.size }), (r = P(r, { dir: 'right', size: e.size }))); - let i = r.slice(2); - i.length % 2 && (i = `0${i}`); - const n = i.length / 2, - o = new Uint8Array(n); - for (let t = 0, e = 0; t < n; t++) { - const r = ht(i.charCodeAt(e++)), - n = ht(i.charCodeAt(e++)); - if (void 0 === r || void 0 === n) throw new c(`Invalid byte sequence ("${i[e - 2]}${i[e - 1]}" in "${i}").`); - o[t] = 16 * r + n; - } - return o; - })(t) - : t, - r = ct(e.length); - return { - length: 1 === e.length && e[0] < 128 ? 1 : e.length <= 55 ? 1 + e.length : 1 + r + e.length, - encode(t) { - 1 === e.length && e[0] < 128 - ? t.pushBytes(e) - : e.length <= 55 - ? (t.pushByte(128 + e.length), t.pushBytes(e)) - : (t.pushByte(183 + r), - 1 === r - ? t.pushUint8(e.length) - : 2 === r - ? t.pushUint16(e.length) - : 3 === r - ? t.pushUint24(e.length) - : t.pushUint32(e.length), - t.pushBytes(e)); - }, - }; - })(t); - } - function ct(t) { - if (t < 256) return 1; - if (t < 65536) return 2; - if (t < 2 ** 24) return 3; - if (t < 2 ** 32) return 4; - throw new c('Length is too large.'); - } - function lt(t) { - const e = Object.entries(t) - .map(([t, e]) => (void 0 === e || !1 === e ? null : [t, e])) - .filter(Boolean), - r = e.reduce((t, [e]) => Math.max(t, e.length), 0); - return e.map(([t, e]) => ` ${`${t}:`.padEnd(r + 1)} ${e}`).join('\n'); - } - class dt extends c { - constructor({ v: t }) { - super(`Invalid \`v\` value "${t}". Expected 27 or 28.`), - Object.defineProperty(this, 'name', { enumerable: !0, configurable: !0, writable: !0, value: 'InvalidLegacyVError' }); - } - } - class pt extends c { - constructor({ transaction: t }) { - super('Cannot infer a transaction type from provided transaction.', { - metaMessages: [ - 'Provided Transaction:', - '{', - lt(t), - '}', - '', - 'To infer the type, either provide:', - '- a `type` to the Transaction, or', - '- an EIP-1559 Transaction with `maxFeePerGas`, or', - '- an EIP-2930 Transaction with `gasPrice` & `accessList`, or', - '- a Legacy Transaction with `gasPrice`', - ], - }), - Object.defineProperty(this, 'name', { - enumerable: !0, - configurable: !0, - writable: !0, - value: 'InvalidSerializableTransactionError', - }); - } - } - class mt extends c { - constructor({ storageKey: t }) { - super(`Size for storage key "${t}" is invalid. Expected 32 bytes. Got ${Math.floor((t.length - 2) / 2)} bytes.`), - Object.defineProperty(this, 'name', { enumerable: !0, configurable: !0, writable: !0, value: 'InvalidStorageKeySizeError' }); - } - } - function gt(t) { - if (!t || 0 === t.length) return []; - const e = []; - for (let r = 0; r < t.length; r++) { - const { address: i, storageKeys: n } = t[r]; - for (let t = 0; t < n.length; t++) if (n[t].length - 2 != 64) throw new mt({ storageKey: n[t] }); - if (!rt(i)) throw new W({ address: i }); - e.push([i, n]); - } - return e; - } - const bt = { - transaction: (t, e) => - G(t) - ? (function (t, e) { - !(function (t) { - const { chainId: e, maxPriorityFeePerGas: r, gasPrice: i, maxFeePerGas: n, to: o, feeCurrency: s } = t; - if (e <= 0) throw new K({ chainId: e }); - if (o && !rt(o)) throw new W({ address: o }); - if (i) throw new c('`gasPrice` is not a valid CIP-64 Transaction attribute.'); - if (H(n) && n > yt) throw new Q({ maxFeePerGas: n }); - if (H(r) && H(n) && r > n) throw new tt({ maxFeePerGas: n, maxPriorityFeePerGas: r }); - if (H(s) && !rt(s)) throw new c('`feeCurrency` MUST be a token address for CIP-64 transactions.'); - if (q(s)) throw new c('`feeCurrency` must be provided for CIP-64 transactions.'); - })(t); - const { - chainId: r, - gas: i, - nonce: n, - to: o, - value: s, - maxFeePerGas: a, - maxPriorityFeePerGas: h, - accessList: u, - feeCurrency: f, - data: l, - } = t, - d = [ - L(r), - n ? L(n) : '0x', - h ? L(h) : '0x', - a ? L(a) : '0x', - i ? L(i) : '0x', - o ?? '0x', - s ? L(s) : '0x', - l ?? '0x', - gt(u), - f, - ]; - return e && d.push(27n === e.v ? '0x' : L(1), F(e.r), F(e.s)), it(['0x7b', ut(d)]); - })(t, e) - : Z(t) - ? (function (t, e) { - !(function (t) { - const { - chainId: e, - maxPriorityFeePerGas: r, - gasPrice: i, - maxFeePerGas: n, - to: o, - feeCurrency: s, - gatewayFee: a, - gatewayFeeRecipient: h, - } = t; - if (e <= 0) throw new K({ chainId: e }); - if (o && !rt(o)) throw new W({ address: o }); - if (i) throw new c('`gasPrice` is not a valid CIP-42 Transaction attribute.'); - if (H(n) && n > yt) throw new Q({ maxFeePerGas: n }); - if (H(r) && H(n) && r > n) throw new tt({ maxFeePerGas: n, maxPriorityFeePerGas: r }); - if ((H(a) && q(h)) || (H(h) && q(a))) - throw new c('`gatewayFee` and `gatewayFeeRecipient` must be provided together.'); - if (H(s) && !rt(s)) throw new c('`feeCurrency` MUST be a token address for CIP-42 transactions.'); - if (H(h) && !rt(h)) throw new W(h); - if (q(s) && q(h)) - throw new c('Either `feeCurrency` or `gatewayFeeRecipient` must be provided for CIP-42 transactions.'); - })(t); - const { - chainId: r, - gas: i, - nonce: n, - to: o, - value: s, - maxFeePerGas: a, - maxPriorityFeePerGas: h, - accessList: u, - feeCurrency: f, - gatewayFeeRecipient: l, - gatewayFee: d, - data: p, - } = t, - m = [ - L(r), - n ? L(n) : '0x', - h ? L(h) : '0x', - a ? L(a) : '0x', - i ? L(i) : '0x', - f ?? '0x', - l ?? '0x', - d ? L(d) : '0x', - o ?? '0x', - s ? L(s) : '0x', - p ?? '0x', - gt(u), - ]; - return e && m.push(27n === e.v ? '0x' : L(1), F(e.r), F(e.s)), it(['0x7c', ut(m)]); - })(t, e) - : (function (t, e) { - const r = (function (t) { - if (t.type) return t.type; - if (void 0 !== t.maxFeePerGas || void 0 !== t.maxPriorityFeePerGas) return 'eip1559'; - if (void 0 !== t.gasPrice) return void 0 !== t.accessList ? 'eip2930' : 'legacy'; - throw new pt({ transaction: t }); - })(t); - return 'eip1559' === r - ? (function (t, e) { - const { - chainId: r, - gas: i, - nonce: n, - to: o, - value: s, - maxFeePerGas: a, - maxPriorityFeePerGas: h, - accessList: u, - data: f, - } = t; - !(function (t) { - const { chainId: e, maxPriorityFeePerGas: r, gasPrice: i, maxFeePerGas: n, to: o } = t; - if (e <= 0) throw new K({ chainId: e }); - if (o && !rt(o)) throw new W({ address: o }); - if (i) throw new c('`gasPrice` is not a valid EIP-1559 Transaction attribute.'); - if (n && n > 2n ** 256n - 1n) throw new Q({ maxFeePerGas: n }); - if (r && n && r > n) throw new tt({ maxFeePerGas: n, maxPriorityFeePerGas: r }); - })(t); - const l = gt(u), - d = [ - L(r), - n ? L(n) : '0x', - h ? L(h) : '0x', - a ? L(a) : '0x', - i ? L(i) : '0x', - o ?? '0x', - s ? L(s) : '0x', - f ?? '0x', - l, - ]; - if (e) { - const t = 0n === e.v ? '0x' : 1n === e.v ? L(1) : 27n === e.v ? '0x' : L(1); - d.push(t, F(e.r), F(e.s)); - } - return it(['0x02', ut(d)]); - })(t, e) - : 'eip2930' === r - ? (function (t, e) { - const { chainId: r, gas: i, data: n, nonce: o, to: s, value: a, accessList: h, gasPrice: u } = t; - !(function (t) { - const { chainId: e, maxPriorityFeePerGas: r, gasPrice: i, maxFeePerGas: n, to: o } = t; - if (e <= 0) throw new K({ chainId: e }); - if (o && !rt(o)) throw new W({ address: o }); - if (r || n) - throw new c('`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.'); - if (i && i > 2n ** 256n - 1n) throw new Q({ maxFeePerGas: i }); - })(t); - const f = gt(h), - l = [L(r), o ? L(o) : '0x', u ? L(u) : '0x', i ? L(i) : '0x', s ?? '0x', a ? L(a) : '0x', n ?? '0x', f]; - if (e) { - const t = 0n === e.v ? '0x' : 1n === e.v ? L(1) : 27n === e.v ? '0x' : L(1); - l.push(t, F(e.r), F(e.s)); - } - return it(['0x01', ut(l)]); - })(t, e) - : (function (t, e) { - const { chainId: r = 0, gas: i, data: n, nonce: o, to: s, value: a, gasPrice: h } = t; - !(function (t) { - const { chainId: e, maxPriorityFeePerGas: r, gasPrice: i, maxFeePerGas: n, to: o, accessList: s } = t; - if (o && !rt(o)) throw new W({ address: o }); - if (void 0 !== e && e <= 0) throw new K({ chainId: e }); - if (r || n) throw new c('`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.'); - if (i && i > 2n ** 256n - 1n) throw new Q({ maxFeePerGas: i }); - if (s) throw new c('`accessList` is not a valid Legacy Transaction attribute.'); - })(t); - let u = [o ? L(o) : '0x', h ? L(h) : '0x', i ? L(i) : '0x', s ?? '0x', a ? L(a) : '0x', n ?? '0x']; - if (e) { - const t = (() => { - if (r > 0) return BigInt(2 * r) + BigInt(35n + e.v - 27n); - if (e.v >= 35n) return (e.v - 35n) / 2n > 0 ? e.v : 27n + (35n === e.v ? 0n : 1n); - const t = 27n + (27n === e.v ? 0n : 1n); - if (e.v !== t) throw new dt({ v: e.v }); - return t; - })(); - u = [...u, L(t), e.r, e.s]; - } else r > 0 && (u = [...u, L(r), '0x', '0x']); - return ut(u); - })(t, e); - })(t, e), - }, - yt = 2n ** 256n - 1n, - vt = a( - { - id: 42220, - name: 'Celo', - network: 'celo', - nativeCurrency: { decimals: 18, name: 'CELO', symbol: 'CELO' }, - rpcUrls: { - default: { http: ['https://forno.celo.org'] }, - infura: { http: ['https://celo-mainnet.infura.io/v3'] }, - public: { http: ['https://forno.celo.org'] }, - }, - blockExplorers: { - default: { name: 'Celo Explorer', url: 'https://explorer.celo.org/mainnet' }, - etherscan: { name: 'CeloScan', url: 'https://celoscan.io' }, - }, - contracts: { multicall3: { address: '0xcA11bde05977b3631167028862bE2a173976CA11', blockCreated: 13112599 } }, - testnet: !1, - }, - { formatters: V, serializers: bt } - ), - wt = a({ - id: 100, - name: 'Gnosis', - network: 'gnosis', - nativeCurrency: { decimals: 18, name: 'Gnosis', symbol: 'xDAI' }, - rpcUrls: { - default: { http: ['https://rpc.gnosischain.com'], webSocket: ['wss://rpc.gnosischain.com/wss'] }, - public: { http: ['https://rpc.gnosischain.com'], webSocket: ['wss://rpc.gnosischain.com/wss'] }, - }, - blockExplorers: { - etherscan: { name: 'Gnosisscan', url: 'https://gnosisscan.io' }, - default: { name: 'Gnosis Chain Explorer', url: 'https://blockscout.com/xdai/mainnet' }, - }, - contracts: { multicall3: { address: '0xca11bde05977b3631167028862be2a173976ca11', blockCreated: 21022491 } }, - }), - _t = a({ - id: 59144, - name: 'Linea Mainnet', - network: 'linea-mainnet', - nativeCurrency: { name: 'Linea Ether', symbol: 'ETH', decimals: 18 }, - rpcUrls: { - infura: { http: ['https://linea-mainnet.infura.io/v3'], webSocket: ['wss://linea-mainnet.infura.io/ws/v3'] }, - default: { http: ['https://rpc.linea.build'], webSocket: ['wss://rpc.linea.build'] }, - public: { http: ['https://rpc.linea.build'], webSocket: ['wss://rpc.linea.build'] }, - }, - blockExplorers: { - default: { name: 'Etherscan', url: 'https://lineascan.build' }, - etherscan: { name: 'Etherscan', url: 'https://lineascan.build' }, - blockscout: { name: 'Blockscout', url: 'https://explorer.linea.build' }, - }, - contracts: { multicall3: { address: '0xcA11bde05977b3631167028862bE2a173976CA11', blockCreated: 42 } }, - testnet: !1, - }), - Mt = a({ - id: 169, - name: 'Manta Pacific Mainnet', - network: 'manta', - nativeCurrency: { decimals: 18, name: 'ETH', symbol: 'ETH' }, - rpcUrls: { - default: { http: ['https://pacific-rpc.manta.network/http'] }, - public: { http: ['https://pacific-rpc.manta.network/http'] }, - }, - blockExplorers: { - etherscan: { name: 'Manta Explorer', url: 'https://pacific-explorer.manta.network' }, - default: { name: 'Manta Explorer', url: 'https://pacific-explorer.manta.network' }, - }, - contracts: { multicall3: { address: '0xcA11bde05977b3631167028862bE2a173976CA11', blockCreated: 332890 } }, - }), - Et = a( - { - id: 10, - name: 'OP Mainnet', - network: 'optimism', - nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 }, - rpcUrls: { - alchemy: { http: ['https://opt-mainnet.g.alchemy.com/v2'], webSocket: ['wss://opt-mainnet.g.alchemy.com/v2'] }, - infura: { http: ['https://optimism-mainnet.infura.io/v3'], webSocket: ['wss://optimism-mainnet.infura.io/ws/v3'] }, - default: { http: ['https://mainnet.optimism.io'] }, - public: { http: ['https://mainnet.optimism.io'] }, - }, - blockExplorers: { - etherscan: { name: 'Etherscan', url: 'https://optimistic.etherscan.io' }, - default: { name: 'Optimism Explorer', url: 'https://explorer.optimism.io' }, - }, - contracts: { multicall3: { address: '0xca11bde05977b3631167028862be2a173976ca11', blockCreated: 4286263 } }, - }, - { formatters: R } - ), - St = a({ - id: 1, - network: 'homestead', - name: 'Ethereum', - nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 }, - rpcUrls: { - alchemy: { http: ['https://eth-mainnet.g.alchemy.com/v2'], webSocket: ['wss://eth-mainnet.g.alchemy.com/v2'] }, - infura: { http: ['https://mainnet.infura.io/v3'], webSocket: ['wss://mainnet.infura.io/ws/v3'] }, - default: { http: ['https://cloudflare-eth.com'] }, - public: { http: ['https://cloudflare-eth.com'] }, - }, - blockExplorers: { - etherscan: { name: 'Etherscan', url: 'https://etherscan.io' }, - default: { name: 'Etherscan', url: 'https://etherscan.io' }, - }, - contracts: { - ensRegistry: { address: '0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e' }, - ensUniversalResolver: { address: '0xc0497E381f536Be9ce14B0dD3817cBcAe57d2F62', blockCreated: 16966585 }, - multicall3: { address: '0xca11bde05977b3631167028862be2a173976ca11', blockCreated: 14353601 }, - }, - }), - xt = a({ - id: 137, - name: 'Polygon', - network: 'matic', - nativeCurrency: { name: 'MATIC', symbol: 'MATIC', decimals: 18 }, - rpcUrls: { - alchemy: { http: ['https://polygon-mainnet.g.alchemy.com/v2'], webSocket: ['wss://polygon-mainnet.g.alchemy.com/v2'] }, - infura: { http: ['https://polygon-mainnet.infura.io/v3'], webSocket: ['wss://polygon-mainnet.infura.io/ws/v3'] }, - default: { http: ['https://polygon-rpc.com'] }, - public: { http: ['https://polygon-rpc.com'] }, - }, - blockExplorers: { - etherscan: { name: 'PolygonScan', url: 'https://polygonscan.com' }, - default: { name: 'PolygonScan', url: 'https://polygonscan.com' }, - }, - contracts: { multicall3: { address: '0xca11bde05977b3631167028862be2a173976ca11', blockCreated: 25770160 } }, - }), - At = a({ - id: 1101, - name: 'Polygon zkEVM', - network: 'polygon-zkevm', - nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 }, - rpcUrls: { default: { http: ['https://zkevm-rpc.com'] }, public: { http: ['https://zkevm-rpc.com'] } }, - blockExplorers: { default: { name: 'PolygonScan', url: 'https://zkevm.polygonscan.com' } }, - contracts: { multicall3: { address: '0xca11bde05977b3631167028862be2a173976ca11', blockCreated: 57746 } }, - }), - kt = a( - { - id: 7777777, - name: 'Zora', - network: 'zora', - nativeCurrency: { decimals: 18, name: 'Ether', symbol: 'ETH' }, - rpcUrls: { - default: { http: ['https://rpc.zora.energy'], webSocket: ['wss://rpc.zora.energy'] }, - public: { http: ['https://rpc.zora.energy'], webSocket: ['wss://rpc.zora.energy'] }, - }, - blockExplorers: { default: { name: 'Explorer', url: 'https://explorer.zora.energy' } }, - contracts: { multicall3: { address: '0xcA11bde05977b3631167028862bE2a173976CA11', blockCreated: 5882 } }, - }, - { formatters: R } - ), - Rt = a({ - id: 31337, - name: 'Hardhat', - network: 'hardhat', - nativeCurrency: { decimals: 18, name: 'Ether', symbol: 'ETH' }, - rpcUrls: { default: { http: ['http://127.0.0.1:8545'] }, public: { http: ['http://127.0.0.1:8545'] } }, - }), - Bt = a({ - id: 5, - network: 'goerli', - name: 'Goerli', - nativeCurrency: { name: 'Goerli Ether', symbol: 'ETH', decimals: 18 }, - rpcUrls: { - alchemy: { http: ['https://eth-goerli.g.alchemy.com/v2'], webSocket: ['wss://eth-goerli.g.alchemy.com/v2'] }, - infura: { http: ['https://goerli.infura.io/v3'], webSocket: ['wss://goerli.infura.io/ws/v3'] }, - default: { http: ['https://rpc.ankr.com/eth_goerli'] }, - public: { http: ['https://rpc.ankr.com/eth_goerli'] }, - }, - blockExplorers: { - etherscan: { name: 'Etherscan', url: 'https://goerli.etherscan.io' }, - default: { name: 'Etherscan', url: 'https://goerli.etherscan.io' }, - }, - contracts: { - ensRegistry: { address: '0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e' }, - ensUniversalResolver: { address: '0x56522D00C410a43BFfDF00a9A569489297385790', blockCreated: 8765204 }, - multicall3: { address: '0xca11bde05977b3631167028862be2a173976ca11', blockCreated: 6507670 }, - }, - testnet: !0, - }), - It = a({ - id: 11155111, - network: 'sepolia', - name: 'Sepolia', - nativeCurrency: { name: 'Sepolia Ether', symbol: 'SEP', decimals: 18 }, - rpcUrls: { - alchemy: { http: ['https://eth-sepolia.g.alchemy.com/v2'], webSocket: ['wss://eth-sepolia.g.alchemy.com/v2'] }, - infura: { http: ['https://sepolia.infura.io/v3'], webSocket: ['wss://sepolia.infura.io/ws/v3'] }, - default: { http: ['https://rpc.sepolia.org'] }, - public: { http: ['https://rpc.sepolia.org'] }, - }, - blockExplorers: { - etherscan: { name: 'Etherscan', url: 'https://sepolia.etherscan.io' }, - default: { name: 'Etherscan', url: 'https://sepolia.etherscan.io' }, - }, - contracts: { - multicall3: { address: '0xca11bde05977b3631167028862be2a173976ca11', blockCreated: 751532 }, - ensRegistry: { address: '0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e' }, - ensUniversalResolver: { address: '0x21B000Fd62a880b2125A61e36a284BB757b76025', blockCreated: 3914906 }, - }, - testnet: !0, - }), - Tt = a({ - id: 534352, - name: 'Scroll', - network: 'scroll', - nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 }, - rpcUrls: { - default: { http: ['https://rpc.scroll.io'], webSocket: ['wss://wss-rpc.scroll.io/ws'] }, - public: { http: ['https://rpc.scroll.io'], webSocket: ['wss://wss-rpc.scroll.io/ws'] }, - }, - blockExplorers: { - default: { name: 'Scrollscan', url: 'https://scrollscan.com' }, - blockscout: { name: 'Blockscout', url: 'https://blockscout.scroll.io' }, - }, - contracts: { multicall3: { address: '0xca11bde05977b3631167028862be2a173976ca11', blockCreated: 14 } }, - testnet: !1, - }), - Pt = a({ - id: 17e3, - network: 'holesky', - name: 'Holesky', - nativeCurrency: { name: 'Holesky Ether', symbol: 'ETH', decimals: 18 }, - rpcUrls: { - default: { http: ['https://ethereum-holesky.publicnode.com'] }, - public: { http: ['https://ethereum-holesky.publicnode.com'] }, - }, - contracts: { multicall3: { address: '0xca11bde05977b3631167028862be2a173976ca11', blockCreated: 77 } }, - testnet: !0, - }), - Ot = a( - { - id: 420, - name: 'Optimism Goerli', - network: 'optimism-goerli', - nativeCurrency: { name: 'Goerli Ether', symbol: 'ETH', decimals: 18 }, - rpcUrls: { - alchemy: { http: ['https://opt-goerli.g.alchemy.com/v2'], webSocket: ['wss://opt-goerli.g.alchemy.com/v2'] }, - infura: { http: ['https://optimism-goerli.infura.io/v3'], webSocket: ['wss://optimism-goerli.infura.io/ws/v3'] }, - default: { http: ['https://goerli.optimism.io'] }, - public: { http: ['https://goerli.optimism.io'] }, - }, - blockExplorers: { - etherscan: { name: 'Etherscan', url: 'https://goerli-optimism.etherscan.io' }, - default: { name: 'Etherscan', url: 'https://goerli-optimism.etherscan.io' }, - }, - contracts: { multicall3: { address: '0xca11bde05977b3631167028862be2a173976ca11', blockCreated: 49461 } }, - testnet: !0, - }, - { formatters: R } - ), - Lt = a( - { - id: 11155420, - name: 'Optimism Sepolia', - network: 'optimism-sepolia', - nativeCurrency: { name: 'Sepolia Ether', symbol: 'ETH', decimals: 18 }, - rpcUrls: { - alchemy: { http: ['https://opt-sepolia.g.alchemy.com/v2'], webSocket: ['wss://opt-sepolia.g.alchemy.com/v2'] }, - default: { http: ['https://sepolia.optimism.io'] }, - public: { http: ['https://sepolia.optimism.io'] }, - }, - blockExplorers: { - blockscout: { name: 'Blockscout', url: 'https://optimism-sepolia.blockscout.com' }, - default: { name: 'Blockscout', url: 'https://optimism-sepolia.blockscout.com' }, - }, - contracts: { multicall3: { address: '0xca11bde05977b3631167028862be2a173976ca11', blockCreated: 1620204 } }, - testnet: !0, - }, - { formatters: R } - ), - Ct = a({ - id: 97, - name: 'Binance Smart Chain Testnet', - network: 'bsc-testnet', - nativeCurrency: { decimals: 18, name: 'BNB', symbol: 'tBNB' }, - rpcUrls: { - default: { http: ['https://data-seed-prebsc-1-s1.bnbchain.org:8545'] }, - public: { http: ['https://data-seed-prebsc-1-s1.bnbchain.org:8545'] }, - }, - blockExplorers: { - etherscan: { name: 'BscScan', url: 'https://testnet.bscscan.com' }, - default: { name: 'BscScan', url: 'https://testnet.bscscan.com' }, - }, - contracts: { multicall3: { address: '0xca11bde05977b3631167028862be2a173976ca11', blockCreated: 17422483 } }, - testnet: !0, - }), - Nt = a({ - id: 80001, - name: 'Polygon Mumbai', - network: 'maticmum', - nativeCurrency: { name: 'MATIC', symbol: 'MATIC', decimals: 18 }, - rpcUrls: { - alchemy: { http: ['https://polygon-mumbai.g.alchemy.com/v2'], webSocket: ['wss://polygon-mumbai.g.alchemy.com/v2'] }, - infura: { http: ['https://polygon-mumbai.infura.io/v3'], webSocket: ['wss://polygon-mumbai.infura.io/ws/v3'] }, - default: { http: ['https://rpc.ankr.com/polygon_mumbai'] }, - public: { http: ['https://rpc.ankr.com/polygon_mumbai'] }, - }, - blockExplorers: { - etherscan: { name: 'PolygonScan', url: 'https://mumbai.polygonscan.com' }, - default: { name: 'PolygonScan', url: 'https://mumbai.polygonscan.com' }, - }, - contracts: { multicall3: { address: '0xca11bde05977b3631167028862be2a173976ca11', blockCreated: 25770160 } }, - testnet: !0, - }), - jt = a({ - id: 421613, - name: 'Arbitrum Goerli', - network: 'arbitrum-goerli', - nativeCurrency: { name: 'Arbitrum Goerli Ether', symbol: 'ETH', decimals: 18 }, - rpcUrls: { - alchemy: { http: ['https://arb-goerli.g.alchemy.com/v2'], webSocket: ['wss://arb-goerli.g.alchemy.com/v2'] }, - infura: { http: ['https://arbitrum-goerli.infura.io/v3'], webSocket: ['wss://arbitrum-goerli.infura.io/ws/v3'] }, - default: { http: ['https://goerli-rollup.arbitrum.io/rpc'] }, - public: { http: ['https://goerli-rollup.arbitrum.io/rpc'] }, - }, - blockExplorers: { - etherscan: { name: 'Arbiscan', url: 'https://goerli.arbiscan.io' }, - default: { name: 'Arbiscan', url: 'https://goerli.arbiscan.io' }, - }, - contracts: { multicall3: { address: '0xca11bde05977b3631167028862be2a173976ca11', blockCreated: 88114 } }, - testnet: !0, - }), - Ut = a({ - id: 421614, - name: 'Arbitrum Sepolia', - network: 'arbitrum-sepolia', - nativeCurrency: { name: 'Arbitrum Sepolia Ether', symbol: 'ETH', decimals: 18 }, - rpcUrls: { - alchemy: { http: ['https://arb-sepolia.g.alchemy.com/v2'], webSocket: ['wss://arb-sepolia.g.alchemy.com/v2'] }, - default: { http: ['https://sepolia-rollup.arbitrum.io/rpc'] }, - public: { http: ['https://sepolia-rollup.arbitrum.io/rpc'] }, - }, - blockExplorers: { - etherscan: { name: 'Arbiscan', url: 'https://sepolia.arbiscan.io' }, - default: { name: 'Arbiscan', url: 'https://sepolia.arbiscan.io' }, - }, - contracts: { multicall3: { address: '0xca11bde05977b3631167028862be2a173976ca11', blockCreated: 81930 } }, - testnet: !0, - }), - Dt = a( - { - id: 84532, - network: 'base-sepolia', - name: 'Base Sepolia', - nativeCurrency: { name: 'Sepolia Ether', symbol: 'ETH', decimals: 18 }, - rpcUrls: { - alchemy: { http: ['https://base-sepolia.g.alchemy.com/v2'], webSocket: ['wss://base-sepolia.g.alchemy.com/v2'] }, - default: { http: ['https://sepolia.base.org'] }, - public: { http: ['https://sepolia.base.org'] }, - }, - blockExplorers: { - blockscout: { name: 'Blockscout', url: 'https://base-sepolia.blockscout.com' }, - default: { name: 'Blockscout', url: 'https://base-sepolia.blockscout.com' }, - }, - testnet: !0, - sourceId: 11155111, - }, - { formatters: R } - ), - zt = a( - { - id: 999, - name: 'Zora Goerli Testnet', - network: 'zora-testnet', - nativeCurrency: { decimals: 18, name: 'Zora Goerli', symbol: 'ETH' }, - rpcUrls: { - default: { http: ['https://testnet.rpc.zora.energy'], webSocket: ['wss://testnet.rpc.zora.energy'] }, - public: { http: ['https://testnet.rpc.zora.energy'], webSocket: ['wss://testnet.rpc.zora.energy'] }, - }, - blockExplorers: { default: { name: 'Explorer', url: 'https://testnet.explorer.zora.energy' } }, - contracts: { multicall3: { address: '0xcA11bde05977b3631167028862bE2a173976CA11', blockCreated: 189123 } }, - testnet: !0, - }, - { formatters: R } - ), - Ft = a( - { - id: 999999999, - name: 'Zora Sepolia', - network: 'zora-sepolia', - nativeCurrency: { decimals: 18, name: 'Zora Sepolia', symbol: 'ETH' }, - rpcUrls: { - default: { http: ['https://sepolia.rpc.zora.energy'], webSocket: ['wss://sepolia.rpc.zora.energy'] }, - public: { http: ['https://sepolia.rpc.zora.energy'], webSocket: ['wss://sepolia.rpc.zora.energy'] }, - }, - blockExplorers: { default: { name: 'Zora Sepolia Explorer', url: 'https://sepolia.explorer.zora.energy/' } }, - contracts: { multicall3: { address: '0xcA11bde05977b3631167028862bE2a173976CA11', blockCreated: 83160 } }, - testnet: !0, - }, - { formatters: R } - ), - qt = a({ - id: 250, - name: 'Fantom', - network: 'fantom', - nativeCurrency: { decimals: 18, name: 'Fantom', symbol: 'FTM' }, - rpcUrls: { default: { http: ['https://rpc.ankr.com/fantom'] }, public: { http: ['https://rpc.ankr.com/fantom'] } }, - blockExplorers: { - etherscan: { name: 'FTMScan', url: 'https://ftmscan.com' }, - default: { name: 'FTMScan', url: 'https://ftmscan.com' }, - }, - contracts: { multicall3: { address: '0xca11bde05977b3631167028862be2a173976ca11', blockCreated: 33001987 } }, - }), - Ht = a({ - id: 16666e5, - name: 'Harmony One', - network: 'harmony', - nativeCurrency: { name: 'Harmony', symbol: 'ONE', decimals: 18 }, - rpcUrls: { public: { http: ['https://rpc.ankr.com/harmony'] }, default: { http: ['https://rpc.ankr.com/harmony'] } }, - blockExplorers: { default: { name: 'Harmony Explorer', url: 'https://explorer.harmony.one' } }, - contracts: { multicall3: { address: '0xca11bde05977b3631167028862be2a173976ca11', blockCreated: 24185753 } }, - }), - $t = a({ - id: 1284, - name: 'Moonbeam', - network: 'moonbeam', - nativeCurrency: { decimals: 18, name: 'GLMR', symbol: 'GLMR' }, - rpcUrls: { - public: { http: ['https://moonbeam.public.blastapi.io'], webSocket: ['wss://moonbeam.public.blastapi.io'] }, - default: { http: ['https://moonbeam.public.blastapi.io'], webSocket: ['wss://moonbeam.public.blastapi.io'] }, - }, - blockExplorers: { - default: { name: 'Moonscan', url: 'https://moonscan.io' }, - etherscan: { name: 'Moonscan', url: 'https://moonscan.io' }, - }, - contracts: { multicall3: { address: '0xcA11bde05977b3631167028862bE2a173976CA11', blockCreated: 609002 } }, - testnet: !1, - }); - var Zt, Gt; - ((Gt = Zt || (Zt = {}))[(Gt.arbitrum = h.id)] = 'arbitrum'), - (Gt[(Gt.arbitrumNova = u.id)] = 'arbitrumNova'), - (Gt[(Gt.avalanche = f.id)] = 'avalanche'), - (Gt[(Gt.base = B.id)] = 'base'), - (Gt[(Gt.bsc = I.id)] = 'bsc'), - (Gt[(Gt.celo = vt.id)] = 'celo'), - (Gt[(Gt.gnosis = wt.id)] = 'gnosis'), - (Gt[(Gt.linea = _t.id)] = 'linea'), - (Gt[(Gt.manta = Mt.id)] = 'manta'), - (Gt[(Gt.optimism = Et.id)] = 'optimism'), - (Gt[(Gt.mainnet = St.id)] = 'mainnet'), - (Gt[(Gt.polygon = xt.id)] = 'polygon'), - (Gt[(Gt.polygonZkEvm = At.id)] = 'polygonZkEvm'), - (Gt[(Gt.rari = 1380012617)] = 'rari'), - (Gt[(Gt.zora = kt.id)] = 'zora'), - (Gt[(Gt.hardhat = Rt.id)] = 'hardhat'), - (Gt[(Gt.hardhatOptimism = 1338)] = 'hardhatOptimism'), - (Gt[(Gt.goerli = Bt.id)] = 'goerli'), - (Gt[(Gt.sepolia = It.id)] = 'sepolia'), - (Gt[(Gt.scroll = Tt.id)] = 'scroll'), - (Gt[(Gt.holesky = Pt.id)] = 'holesky'), - (Gt[(Gt.optimismGoerli = Ot.id)] = 'optimismGoerli'), - (Gt[(Gt.optimismSepolia = Lt.id)] = 'optimismSepolia'), - (Gt[(Gt.bscTestnet = Ct.id)] = 'bscTestnet'), - (Gt[(Gt.polygonMumbai = Nt.id)] = 'polygonMumbai'), - (Gt[(Gt.arbitrumGoerli = jt.id)] = 'arbitrumGoerli'), - (Gt[(Gt.arbitrumSepolia = Ut.id)] = 'arbitrumSepolia'), - (Gt[(Gt.baseSepolia = Dt.id)] = 'baseSepolia'), - (Gt[(Gt.zoraTestnet = zt.id)] = 'zoraTestnet'), - (Gt[(Gt.zoraSepolia = Ft.id)] = 'zoraSepolia'), - (Gt[(Gt.fantom = qt.id)] = 'fantom'), - (Gt[(Gt.harmonyOne = Ht.id)] = 'harmonyOne'), - (Gt[(Gt.moonbeam = $t.id)] = 'moonbeam'), - r(1091); - var Vt = /^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i, - Wt = Math.ceil, - Kt = Math.floor, - Yt = '[BigNumber Error] ', - Jt = Yt + 'Number primitive has more than 15 significant digits: ', - Xt = 1e14, - Qt = 14, - te = 9007199254740991, - ee = [1, 10, 100, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11, 1e12, 1e13], - re = 1e7, - ie = 1e9; - function ne(t) { - var e = 0 | t; - return t > 0 || t === e ? e : e - 1; - } - function oe(t) { - for (var e, r, i = 1, n = t.length, o = t[0] + ''; i < n; ) { - for (e = t[i++] + '', r = Qt - e.length; r--; e = '0' + e); - o += e; - } - for (n = o.length; 48 === o.charCodeAt(--n); ); - return o.slice(0, n + 1 || 1); - } - function se(t, e) { - var r, - i, - n = t.c, - o = e.c, - s = t.s, - a = e.s, - h = t.e, - u = e.e; - if (!s || !a) return null; - if (((r = n && !n[0]), (i = o && !o[0]), r || i)) return r ? (i ? 0 : -a) : s; - if (s != a) return s; - if (((r = s < 0), (i = h == u), !n || !o)) return i ? 0 : !n ^ r ? 1 : -1; - if (!i) return (h > u) ^ r ? 1 : -1; - for (a = (h = n.length) < (u = o.length) ? h : u, s = 0; s < a; s++) if (n[s] != o[s]) return (n[s] > o[s]) ^ r ? 1 : -1; - return h == u ? 0 : (h > u) ^ r ? 1 : -1; - } - function ae(t, e, r, i) { - if (t < e || t > r || t !== Kt(t)) - throw Error( - Yt + - (i || 'Argument') + - ('number' == typeof t ? (t < e || t > r ? ' out of range: ' : ' not an integer: ') : ' not a primitive number: ') + - String(t) - ); - } - function he(t) { - var e = t.c.length - 1; - return ne(t.e / Qt) == e && t.c[e] % 2 != 0; - } - function ue(t, e) { - return (t.length > 1 ? t.charAt(0) + '.' + t.slice(1) : t) + (e < 0 ? 'e' : 'e+') + e; - } - function fe(t, e, r) { - var i, n; - if (e < 0) { - for (n = r + '.'; ++e; n += r); - t = n + t; - } else if (++e > (i = t.length)) { - for (n = r, e -= i; --e; n += r); - t += n; - } else e < i && (t = t.slice(0, e) + '.' + t.slice(e)); - return t; - } - var ce = (function t(e) { - var r, - i, - n, - o, - s, - a, - h, - u, - f, - c, - l = (x.prototype = { constructor: x, toString: null, valueOf: null }), - d = new x(1), - p = 20, - m = 4, - g = -7, - b = 21, - y = -1e7, - v = 1e7, - w = !1, - _ = 1, - M = 0, - E = { - prefix: '', - groupSize: 3, - secondaryGroupSize: 0, - groupSeparator: ',', - decimalSeparator: '.', - fractionGroupSize: 0, - fractionGroupSeparator: ' ', - suffix: '', - }, - S = '0123456789abcdefghijklmnopqrstuvwxyz'; - function x(t, e) { - var r, - o, - s, - a, - h, - u, - f, - c, - l = this; - if (!(l instanceof x)) return new x(t, e); - if (null == e) { - if (t && !0 === t._isBigNumber) - return ( - (l.s = t.s), - void (!t.c || t.e > v ? (l.c = l.e = null) : t.e < y ? (l.c = [(l.e = 0)]) : ((l.e = t.e), (l.c = t.c.slice()))) - ); - if ((u = 'number' == typeof t) && 0 * t == 0) { - if (((l.s = 1 / t < 0 ? ((t = -t), -1) : 1), t === ~~t)) { - for (a = 0, h = t; h >= 10; h /= 10, a++); - return void (a > v ? (l.c = l.e = null) : ((l.e = a), (l.c = [t]))); - } - c = String(t); - } else { - if (!Vt.test((c = String(t)))) return n(l, c, u); - l.s = 45 == c.charCodeAt(0) ? ((c = c.slice(1)), -1) : 1; - } - (a = c.indexOf('.')) > -1 && (c = c.replace('.', '')), - (h = c.search(/e/i)) > 0 ? (a < 0 && (a = h), (a += +c.slice(h + 1)), (c = c.substring(0, h))) : a < 0 && (a = c.length); - } else { - if ((ae(e, 2, S.length, 'Base'), 10 == e)) return B((l = new x(t)), p + l.e + 1, m); - if (((c = String(t)), (u = 'number' == typeof t))) { - if (0 * t != 0) return n(l, c, u, e); - if (((l.s = 1 / t < 0 ? ((c = c.slice(1)), -1) : 1), x.DEBUG && c.replace(/^0\.0*|\./, '').length > 15)) throw Error(Jt + t); - } else l.s = 45 === c.charCodeAt(0) ? ((c = c.slice(1)), -1) : 1; - for (r = S.slice(0, e), a = h = 0, f = c.length; h < f; h++) - if (r.indexOf((o = c.charAt(h))) < 0) { - if ('.' == o) { - if (h > a) { - a = f; - continue; - } - } else if (!s && ((c == c.toUpperCase() && (c = c.toLowerCase())) || (c == c.toLowerCase() && (c = c.toUpperCase())))) { - (s = !0), (h = -1), (a = 0); - continue; - } - return n(l, String(t), u, e); - } - (u = !1), (a = (c = i(c, e, 10, l.s)).indexOf('.')) > -1 ? (c = c.replace('.', '')) : (a = c.length); - } - for (h = 0; 48 === c.charCodeAt(h); h++); - for (f = c.length; 48 === c.charCodeAt(--f); ); - if ((c = c.slice(h, ++f))) { - if (((f -= h), u && x.DEBUG && f > 15 && (t > te || t !== Kt(t)))) throw Error(Jt + l.s * t); - if ((a = a - h - 1) > v) l.c = l.e = null; - else if (a < y) l.c = [(l.e = 0)]; - else { - if (((l.e = a), (l.c = []), (h = (a + 1) % Qt), a < 0 && (h += Qt), h < f)) { - for (h && l.c.push(+c.slice(0, h)), f -= Qt; h < f; ) l.c.push(+c.slice(h, (h += Qt))); - h = Qt - (c = c.slice(h)).length; - } else h -= f; - for (; h--; c += '0'); - l.c.push(+c); - } - } else l.c = [(l.e = 0)]; - } - function A(t, e, r, i) { - var n, o, s, a, h; - if ((null == r ? (r = m) : ae(r, 0, 8), !t.c)) return t.toString(); - if (((n = t.c[0]), (s = t.e), null == e)) - (h = oe(t.c)), (h = 1 == i || (2 == i && (s <= g || s >= b)) ? ue(h, s) : fe(h, s, '0')); - else if (((o = (t = B(new x(t), e, r)).e), (a = (h = oe(t.c)).length), 1 == i || (2 == i && (e <= o || o <= g)))) { - for (; a < e; h += '0', a++); - h = ue(h, o); - } else if (((e -= s), (h = fe(h, o, '0')), o + 1 > a)) { - if (--e > 0) for (h += '.'; e--; h += '0'); - } else if ((e += o - a) > 0) for (o + 1 == a && (h += '.'); e--; h += '0'); - return t.s < 0 && n ? '-' + h : h; - } - function k(t, e) { - for (var r, i = 1, n = new x(t[0]); i < t.length; i++) { - if (!(r = new x(t[i])).s) { - n = r; - break; - } - e.call(n, r) && (n = r); - } - return n; - } - function R(t, e, r) { - for (var i = 1, n = e.length; !e[--n]; e.pop()); - for (n = e[0]; n >= 10; n /= 10, i++); - return (r = i + r * Qt - 1) > v ? (t.c = t.e = null) : r < y ? (t.c = [(t.e = 0)]) : ((t.e = r), (t.c = e)), t; - } - function B(t, e, r, i) { - var n, - o, - s, - a, - h, - u, - f, - c = t.c, - l = ee; - if (c) { - t: { - for (n = 1, a = c[0]; a >= 10; a /= 10, n++); - if ((o = e - n) < 0) (o += Qt), (s = e), (f = ((h = c[(u = 0)]) / l[n - s - 1]) % 10 | 0); - else if ((u = Wt((o + 1) / Qt)) >= c.length) { - if (!i) break t; - for (; c.length <= u; c.push(0)); - (h = f = 0), (n = 1), (s = (o %= Qt) - Qt + 1); - } else { - for (h = a = c[u], n = 1; a >= 10; a /= 10, n++); - f = (s = (o %= Qt) - Qt + n) < 0 ? 0 : (h / l[n - s - 1]) % 10 | 0; - } - if ( - ((i = i || e < 0 || null != c[u + 1] || (s < 0 ? h : h % l[n - s - 1])), - (i = - r < 4 - ? (f || i) && (0 == r || r == (t.s < 0 ? 3 : 2)) - : f > 5 || - (5 == f && - (4 == r || i || (6 == r && (o > 0 ? (s > 0 ? h / l[n - s] : 0) : c[u - 1]) % 10 & 1) || r == (t.s < 0 ? 8 : 7)))), - e < 1 || !c[0]) - ) - return (c.length = 0), i ? ((e -= t.e + 1), (c[0] = l[(Qt - (e % Qt)) % Qt]), (t.e = -e || 0)) : (c[0] = t.e = 0), t; - if ( - (0 == o - ? ((c.length = u), (a = 1), u--) - : ((c.length = u + 1), (a = l[Qt - o]), (c[u] = s > 0 ? Kt((h / l[n - s]) % l[s]) * a : 0)), - i) - ) - for (;;) { - if (0 == u) { - for (o = 1, s = c[0]; s >= 10; s /= 10, o++); - for (s = c[0] += a, a = 1; s >= 10; s /= 10, a++); - o != a && (t.e++, c[0] == Xt && (c[0] = 1)); - break; - } - if (((c[u] += a), c[u] != Xt)) break; - (c[u--] = 0), (a = 1); - } - for (o = c.length; 0 === c[--o]; c.pop()); - } - t.e > v ? (t.c = t.e = null) : t.e < y && (t.c = [(t.e = 0)]); - } - return t; - } - function I(t) { - var e, - r = t.e; - return null === r ? t.toString() : ((e = oe(t.c)), (e = r <= g || r >= b ? ue(e, r) : fe(e, r, '0')), t.s < 0 ? '-' + e : e); - } - return ( - (x.clone = t), - (x.ROUND_UP = 0), - (x.ROUND_DOWN = 1), - (x.ROUND_CEIL = 2), - (x.ROUND_FLOOR = 3), - (x.ROUND_HALF_UP = 4), - (x.ROUND_HALF_DOWN = 5), - (x.ROUND_HALF_EVEN = 6), - (x.ROUND_HALF_CEIL = 7), - (x.ROUND_HALF_FLOOR = 8), - (x.EUCLID = 9), - (x.config = x.set = - function (t) { - var e, r; - if (null != t) { - if ('object' != typeof t) throw Error(Yt + 'Object expected: ' + t); - if ( - (t.hasOwnProperty((e = 'DECIMAL_PLACES')) && (ae((r = t[e]), 0, ie, e), (p = r)), - t.hasOwnProperty((e = 'ROUNDING_MODE')) && (ae((r = t[e]), 0, 8, e), (m = r)), - t.hasOwnProperty((e = 'EXPONENTIAL_AT')) && - ((r = t[e]) && r.pop - ? (ae(r[0], -ie, 0, e), ae(r[1], 0, ie, e), (g = r[0]), (b = r[1])) - : (ae(r, -ie, ie, e), (g = -(b = r < 0 ? -r : r)))), - t.hasOwnProperty((e = 'RANGE'))) - ) - if ((r = t[e]) && r.pop) ae(r[0], -ie, -1, e), ae(r[1], 1, ie, e), (y = r[0]), (v = r[1]); - else { - if ((ae(r, -ie, ie, e), !r)) throw Error(Yt + e + ' cannot be zero: ' + r); - y = -(v = r < 0 ? -r : r); - } - if (t.hasOwnProperty((e = 'CRYPTO'))) { - if ((r = t[e]) !== !!r) throw Error(Yt + e + ' not true or false: ' + r); - if (r) { - if ('undefined' == typeof crypto || !crypto || (!crypto.getRandomValues && !crypto.randomBytes)) - throw ((w = !r), Error(Yt + 'crypto unavailable')); - w = r; - } else w = r; - } - if ( - (t.hasOwnProperty((e = 'MODULO_MODE')) && (ae((r = t[e]), 0, 9, e), (_ = r)), - t.hasOwnProperty((e = 'POW_PRECISION')) && (ae((r = t[e]), 0, ie, e), (M = r)), - t.hasOwnProperty((e = 'FORMAT'))) - ) { - if ('object' != typeof (r = t[e])) throw Error(Yt + e + ' not an object: ' + r); - E = r; - } - if (t.hasOwnProperty((e = 'ALPHABET'))) { - if ('string' != typeof (r = t[e]) || /^.$|[+-.\s]|(.).*\1/.test(r)) throw Error(Yt + e + ' invalid: ' + r); - S = r; - } - } - return { - DECIMAL_PLACES: p, - ROUNDING_MODE: m, - EXPONENTIAL_AT: [g, b], - RANGE: [y, v], - CRYPTO: w, - MODULO_MODE: _, - POW_PRECISION: M, - FORMAT: E, - ALPHABET: S, - }; - }), - (x.isBigNumber = function (t) { - if (!t || !0 !== t._isBigNumber) return !1; - if (!x.DEBUG) return !0; - var e, - r, - i = t.c, - n = t.e, - o = t.s; - t: if ('[object Array]' == {}.toString.call(i)) { - if ((1 === o || -1 === o) && n >= -ie && n <= ie && n === Kt(n)) { - if (0 === i[0]) { - if (0 === n && 1 === i.length) return !0; - break t; - } - if (((e = (n + 1) % Qt) < 1 && (e += Qt), String(i[0]).length == e)) { - for (e = 0; e < i.length; e++) if ((r = i[e]) < 0 || r >= Xt || r !== Kt(r)) break t; - if (0 !== r) return !0; - } - } - } else if (null === i && null === n && (null === o || 1 === o || -1 === o)) return !0; - throw Error(Yt + 'Invalid BigNumber: ' + t); - }), - (x.maximum = x.max = - function () { - return k(arguments, l.lt); - }), - (x.minimum = x.min = - function () { - return k(arguments, l.gt); - }), - (x.random = - ((o = 9007199254740992), - (s = - (Math.random() * o) & 2097151 - ? function () { - return Kt(Math.random() * o); - } - : function () { - return 8388608 * ((1073741824 * Math.random()) | 0) + ((8388608 * Math.random()) | 0); - }), - function (t) { - var e, - r, - i, - n, - o, - a = 0, - h = [], - u = new x(d); - if ((null == t ? (t = p) : ae(t, 0, ie), (n = Wt(t / Qt)), w)) - if (crypto.getRandomValues) { - for (e = crypto.getRandomValues(new Uint32Array((n *= 2))); a < n; ) - (o = 131072 * e[a] + (e[a + 1] >>> 11)) >= 9e15 - ? ((r = crypto.getRandomValues(new Uint32Array(2))), (e[a] = r[0]), (e[a + 1] = r[1])) - : (h.push(o % 1e14), (a += 2)); - a = n / 2; - } else { - if (!crypto.randomBytes) throw ((w = !1), Error(Yt + 'crypto unavailable')); - for (e = crypto.randomBytes((n *= 7)); a < n; ) - (o = - 281474976710656 * (31 & e[a]) + - 1099511627776 * e[a + 1] + - 4294967296 * e[a + 2] + - 16777216 * e[a + 3] + - (e[a + 4] << 16) + - (e[a + 5] << 8) + - e[a + 6]) >= 9e15 - ? crypto.randomBytes(7).copy(e, a) - : (h.push(o % 1e14), (a += 7)); - a = n / 7; - } - if (!w) for (; a < n; ) (o = s()) < 9e15 && (h[a++] = o % 1e14); - for (n = h[--a], t %= Qt, n && t && ((o = ee[Qt - t]), (h[a] = Kt(n / o) * o)); 0 === h[a]; h.pop(), a--); - if (a < 0) h = [(i = 0)]; - else { - for (i = -1; 0 === h[0]; h.splice(0, 1), i -= Qt); - for (a = 1, o = h[0]; o >= 10; o /= 10, a++); - a < Qt && (i -= Qt - a); - } - return (u.e = i), (u.c = h), u; - })), - (x.sum = function () { - for (var t = 1, e = arguments, r = new x(e[0]); t < e.length; ) r = r.plus(e[t++]); - return r; - }), - (i = (function () { - var t = '0123456789'; - function e(t, e, r, i) { - for (var n, o, s = [0], a = 0, h = t.length; a < h; ) { - for (o = s.length; o--; s[o] *= e); - for (s[0] += i.indexOf(t.charAt(a++)), n = 0; n < s.length; n++) - s[n] > r - 1 && (null == s[n + 1] && (s[n + 1] = 0), (s[n + 1] += (s[n] / r) | 0), (s[n] %= r)); - } - return s.reverse(); - } - return function (i, n, o, s, a) { - var h, - u, - f, - c, - l, - d, - g, - b, - y = i.indexOf('.'), - v = p, - w = m; - for ( - y >= 0 && - ((c = M), - (M = 0), - (i = i.replace('.', '')), - (d = (b = new x(n)).pow(i.length - y)), - (M = c), - (b.c = e(fe(oe(d.c), d.e, '0'), 10, o, t)), - (b.e = b.c.length)), - f = c = (g = e(i, n, o, a ? ((h = S), t) : ((h = t), S))).length; - 0 == g[--c]; - g.pop() - ); - if (!g[0]) return h.charAt(0); - if ( - (y < 0 ? --f : ((d.c = g), (d.e = f), (d.s = s), (g = (d = r(d, b, v, w, o)).c), (l = d.r), (f = d.e)), - (y = g[(u = f + v + 1)]), - (c = o / 2), - (l = l || u < 0 || null != g[u + 1]), - (l = - w < 4 - ? (null != y || l) && (0 == w || w == (d.s < 0 ? 3 : 2)) - : y > c || (y == c && (4 == w || l || (6 == w && 1 & g[u - 1]) || w == (d.s < 0 ? 8 : 7)))), - u < 1 || !g[0]) - ) - i = l ? fe(h.charAt(1), -v, h.charAt(0)) : h.charAt(0); - else { - if (((g.length = u), l)) for (--o; ++g[--u] > o; ) (g[u] = 0), u || (++f, (g = [1].concat(g))); - for (c = g.length; !g[--c]; ); - for (y = 0, i = ''; y <= c; i += h.charAt(g[y++])); - i = fe(i, f, h.charAt(0)); - } - return i; - }; - })()), - (r = (function () { - function t(t, e, r) { - var i, - n, - o, - s, - a = 0, - h = t.length, - u = e % re, - f = (e / re) | 0; - for (t = t.slice(); h--; ) - (a = - (((n = u * (o = t[h] % re) + ((i = f * o + (s = (t[h] / re) | 0) * u) % re) * re + a) / r) | 0) + ((i / re) | 0) + f * s), - (t[h] = n % r); - return a && (t = [a].concat(t)), t; - } - function e(t, e, r, i) { - var n, o; - if (r != i) o = r > i ? 1 : -1; - else - for (n = o = 0; n < r; n++) - if (t[n] != e[n]) { - o = t[n] > e[n] ? 1 : -1; - break; - } - return o; - } - function r(t, e, r, i) { - for (var n = 0; r--; ) (t[r] -= n), (n = t[r] < e[r] ? 1 : 0), (t[r] = n * i + t[r] - e[r]); - for (; !t[0] && t.length > 1; t.splice(0, 1)); - } - return function (i, n, o, s, a) { - var h, - u, - f, - c, - l, - d, - p, - m, - g, - b, - y, - v, - w, - _, - M, - E, - S, - A = i.s == n.s ? 1 : -1, - k = i.c, - R = n.c; - if (!(k && k[0] && R && R[0])) - return new x(i.s && n.s && (k ? !R || k[0] != R[0] : R) ? ((k && 0 == k[0]) || !R ? 0 * A : A / 0) : NaN); - for ( - g = (m = new x(A)).c = [], - A = o + (u = i.e - n.e) + 1, - a || ((a = Xt), (u = ne(i.e / Qt) - ne(n.e / Qt)), (A = (A / Qt) | 0)), - f = 0; - R[f] == (k[f] || 0); - f++ - ); - if ((R[f] > (k[f] || 0) && u--, A < 0)) g.push(1), (c = !0); - else { - for ( - _ = k.length, - E = R.length, - f = 0, - A += 2, - (l = Kt(a / (R[0] + 1))) > 1 && ((R = t(R, l, a)), (k = t(k, l, a)), (E = R.length), (_ = k.length)), - w = E, - y = (b = k.slice(0, E)).length; - y < E; - b[y++] = 0 - ); - (S = R.slice()), (S = [0].concat(S)), (M = R[0]), R[1] >= a / 2 && M++; - do { - if (((l = 0), (h = e(R, b, E, y)) < 0)) { - if (((v = b[0]), E != y && (v = v * a + (b[1] || 0)), (l = Kt(v / M)) > 1)) - for (l >= a && (l = a - 1), p = (d = t(R, l, a)).length, y = b.length; 1 == e(d, b, p, y); ) - l--, r(d, E < p ? S : R, p, a), (p = d.length), (h = 1); - else 0 == l && (h = l = 1), (p = (d = R.slice()).length); - if ((p < y && (d = [0].concat(d)), r(b, d, y, a), (y = b.length), -1 == h)) - for (; e(R, b, E, y) < 1; ) l++, r(b, E < y ? S : R, y, a), (y = b.length); - } else 0 === h && (l++, (b = [0])); - (g[f++] = l), b[0] ? (b[y++] = k[w] || 0) : ((b = [k[w]]), (y = 1)); - } while ((w++ < _ || null != b[0]) && A--); - (c = null != b[0]), g[0] || g.splice(0, 1); - } - if (a == Xt) { - for (f = 1, A = g[0]; A >= 10; A /= 10, f++); - B(m, o + (m.e = f + u * Qt - 1) + 1, s, c); - } else (m.e = u), (m.r = +c); - return m; - }; - })()), - (a = /^(-?)0([xbo])(?=\w[\w.]*$)/i), - (h = /^([^.]+)\.$/), - (u = /^\.([^.]+)$/), - (f = /^-?(Infinity|NaN)$/), - (c = /^\s*\+(?=[\w.])|^\s+|\s+$/g), - (n = function (t, e, r, i) { - var n, - o = r ? e : e.replace(c, ''); - if (f.test(o)) t.s = isNaN(o) ? null : o < 0 ? -1 : 1; - else { - if ( - !r && - ((o = o.replace(a, function (t, e, r) { - return (n = 'x' == (r = r.toLowerCase()) ? 16 : 'b' == r ? 2 : 8), i && i != n ? t : e; - })), - i && ((n = i), (o = o.replace(h, '$1').replace(u, '0.$1'))), - e != o) - ) - return new x(o, n); - if (x.DEBUG) throw Error(Yt + 'Not a' + (i ? ' base ' + i : '') + ' number: ' + e); - t.s = null; - } - t.c = t.e = null; - }), - (l.absoluteValue = l.abs = - function () { - var t = new x(this); - return t.s < 0 && (t.s = 1), t; - }), - (l.comparedTo = function (t, e) { - return se(this, new x(t, e)); - }), - (l.decimalPlaces = l.dp = - function (t, e) { - var r, - i, - n, - o = this; - if (null != t) return ae(t, 0, ie), null == e ? (e = m) : ae(e, 0, 8), B(new x(o), t + o.e + 1, e); - if (!(r = o.c)) return null; - if (((i = ((n = r.length - 1) - ne(this.e / Qt)) * Qt), (n = r[n]))) for (; n % 10 == 0; n /= 10, i--); - return i < 0 && (i = 0), i; - }), - (l.dividedBy = l.div = - function (t, e) { - return r(this, new x(t, e), p, m); - }), - (l.dividedToIntegerBy = l.idiv = - function (t, e) { - return r(this, new x(t, e), 0, 1); - }), - (l.exponentiatedBy = l.pow = - function (t, e) { - var r, - i, - n, - o, - s, - a, - h, - u, - f = this; - if ((t = new x(t)).c && !t.isInteger()) throw Error(Yt + 'Exponent not an integer: ' + I(t)); - if ( - (null != e && (e = new x(e)), - (s = t.e > 14), - !f.c || !f.c[0] || (1 == f.c[0] && !f.e && 1 == f.c.length) || !t.c || !t.c[0]) - ) - return (u = new x(Math.pow(+I(f), s ? 2 - he(t) : +I(t)))), e ? u.mod(e) : u; - if (((a = t.s < 0), e)) { - if (e.c ? !e.c[0] : !e.s) return new x(NaN); - (i = !a && f.isInteger() && e.isInteger()) && (f = f.mod(e)); - } else { - if ( - t.e > 9 && - (f.e > 0 || f.e < -1 || (0 == f.e ? f.c[0] > 1 || (s && f.c[1] >= 24e7) : f.c[0] < 8e13 || (s && f.c[0] <= 9999975e7))) - ) - return (o = f.s < 0 && he(t) ? -0 : 0), f.e > -1 && (o = 1 / o), new x(a ? 1 / o : o); - M && (o = Wt(M / Qt + 2)); - } - for (s ? ((r = new x(0.5)), a && (t.s = 1), (h = he(t))) : (h = (n = Math.abs(+I(t))) % 2), u = new x(d); ; ) { - if (h) { - if (!(u = u.times(f)).c) break; - o ? u.c.length > o && (u.c.length = o) : i && (u = u.mod(e)); - } - if (n) { - if (0 === (n = Kt(n / 2))) break; - h = n % 2; - } else if ((B((t = t.times(r)), t.e + 1, 1), t.e > 14)) h = he(t); - else { - if (0 == (n = +I(t))) break; - h = n % 2; - } - (f = f.times(f)), o ? f.c && f.c.length > o && (f.c.length = o) : i && (f = f.mod(e)); - } - return i ? u : (a && (u = d.div(u)), e ? u.mod(e) : o ? B(u, M, m, void 0) : u); - }), - (l.integerValue = function (t) { - var e = new x(this); - return null == t ? (t = m) : ae(t, 0, 8), B(e, e.e + 1, t); - }), - (l.isEqualTo = l.eq = - function (t, e) { - return 0 === se(this, new x(t, e)); - }), - (l.isFinite = function () { - return !!this.c; - }), - (l.isGreaterThan = l.gt = - function (t, e) { - return se(this, new x(t, e)) > 0; - }), - (l.isGreaterThanOrEqualTo = l.gte = - function (t, e) { - return 1 === (e = se(this, new x(t, e))) || 0 === e; - }), - (l.isInteger = function () { - return !!this.c && ne(this.e / Qt) > this.c.length - 2; - }), - (l.isLessThan = l.lt = - function (t, e) { - return se(this, new x(t, e)) < 0; - }), - (l.isLessThanOrEqualTo = l.lte = - function (t, e) { - return -1 === (e = se(this, new x(t, e))) || 0 === e; - }), - (l.isNaN = function () { - return !this.s; - }), - (l.isNegative = function () { - return this.s < 0; - }), - (l.isPositive = function () { - return this.s > 0; - }), - (l.isZero = function () { - return !!this.c && 0 == this.c[0]; - }), - (l.minus = function (t, e) { - var r, - i, - n, - o, - s = this, - a = s.s; - if (((e = (t = new x(t, e)).s), !a || !e)) return new x(NaN); - if (a != e) return (t.s = -e), s.plus(t); - var h = s.e / Qt, - u = t.e / Qt, - f = s.c, - c = t.c; - if (!h || !u) { - if (!f || !c) return f ? ((t.s = -e), t) : new x(c ? s : NaN); - if (!f[0] || !c[0]) return c[0] ? ((t.s = -e), t) : new x(f[0] ? s : 3 == m ? -0 : 0); - } - if (((h = ne(h)), (u = ne(u)), (f = f.slice()), (a = h - u))) { - for ((o = a < 0) ? ((a = -a), (n = f)) : ((u = h), (n = c)), n.reverse(), e = a; e--; n.push(0)); - n.reverse(); - } else - for (i = (o = (a = f.length) < (e = c.length)) ? a : e, a = e = 0; e < i; e++) - if (f[e] != c[e]) { - o = f[e] < c[e]; - break; - } - if ((o && ((n = f), (f = c), (c = n), (t.s = -t.s)), (e = (i = c.length) - (r = f.length)) > 0)) for (; e--; f[r++] = 0); - for (e = Xt - 1; i > a; ) { - if (f[--i] < c[i]) { - for (r = i; r && !f[--r]; f[r] = e); - --f[r], (f[i] += Xt); - } - f[i] -= c[i]; - } - for (; 0 == f[0]; f.splice(0, 1), --u); - return f[0] ? R(t, f, u) : ((t.s = 3 == m ? -1 : 1), (t.c = [(t.e = 0)]), t); - }), - (l.modulo = l.mod = - function (t, e) { - var i, - n, - o = this; - return ( - (t = new x(t, e)), - !o.c || !t.s || (t.c && !t.c[0]) - ? new x(NaN) - : !t.c || (o.c && !o.c[0]) - ? new x(o) - : (9 == _ ? ((n = t.s), (t.s = 1), (i = r(o, t, 0, 3)), (t.s = n), (i.s *= n)) : (i = r(o, t, 0, _)), - (t = o.minus(i.times(t))).c[0] || 1 != _ || (t.s = o.s), - t) - ); - }), - (l.multipliedBy = l.times = - function (t, e) { - var r, - i, - n, - o, - s, - a, - h, - u, - f, - c, - l, - d, - p, - m, - g, - b = this, - y = b.c, - v = (t = new x(t, e)).c; - if (!(y && v && y[0] && v[0])) - return ( - !b.s || !t.s || (y && !y[0] && !v) || (v && !v[0] && !y) - ? (t.c = t.e = t.s = null) - : ((t.s *= b.s), y && v ? ((t.c = [0]), (t.e = 0)) : (t.c = t.e = null)), - t - ); - for ( - i = ne(b.e / Qt) + ne(t.e / Qt), - t.s *= b.s, - (h = y.length) < (c = v.length) && ((p = y), (y = v), (v = p), (n = h), (h = c), (c = n)), - n = h + c, - p = []; - n--; - p.push(0) - ); - for (m = Xt, g = re, n = c; --n >= 0; ) { - for (r = 0, l = v[n] % g, d = (v[n] / g) | 0, o = n + (s = h); o > n; ) - (r = - (((u = l * (u = y[--s] % g) + ((a = d * u + (f = (y[s] / g) | 0) * l) % g) * g + p[o] + r) / m) | 0) + - ((a / g) | 0) + - d * f), - (p[o--] = u % m); - p[o] = r; - } - return r ? ++i : p.splice(0, 1), R(t, p, i); - }), - (l.negated = function () { - var t = new x(this); - return (t.s = -t.s || null), t; - }), - (l.plus = function (t, e) { - var r, - i = this, - n = i.s; - if (((e = (t = new x(t, e)).s), !n || !e)) return new x(NaN); - if (n != e) return (t.s = -e), i.minus(t); - var o = i.e / Qt, - s = t.e / Qt, - a = i.c, - h = t.c; - if (!o || !s) { - if (!a || !h) return new x(n / 0); - if (!a[0] || !h[0]) return h[0] ? t : new x(a[0] ? i : 0 * n); - } - if (((o = ne(o)), (s = ne(s)), (a = a.slice()), (n = o - s))) { - for (n > 0 ? ((s = o), (r = h)) : ((n = -n), (r = a)), r.reverse(); n--; r.push(0)); - r.reverse(); - } - for ((n = a.length) - (e = h.length) < 0 && ((r = h), (h = a), (a = r), (e = n)), n = 0; e; ) - (n = ((a[--e] = a[e] + h[e] + n) / Xt) | 0), (a[e] = Xt === a[e] ? 0 : a[e] % Xt); - return n && ((a = [n].concat(a)), ++s), R(t, a, s); - }), - (l.precision = l.sd = - function (t, e) { - var r, - i, - n, - o = this; - if (null != t && t !== !!t) return ae(t, 1, ie), null == e ? (e = m) : ae(e, 0, 8), B(new x(o), t, e); - if (!(r = o.c)) return null; - if (((i = (n = r.length - 1) * Qt + 1), (n = r[n]))) { - for (; n % 10 == 0; n /= 10, i--); - for (n = r[0]; n >= 10; n /= 10, i++); - } - return t && o.e + 1 > i && (i = o.e + 1), i; - }), - (l.shiftedBy = function (t) { - return ae(t, -9007199254740991, te), this.times('1e' + t); - }), - (l.squareRoot = l.sqrt = - function () { - var t, - e, - i, - n, - o, - s = this, - a = s.c, - h = s.s, - u = s.e, - f = p + 4, - c = new x('0.5'); - if (1 !== h || !a || !a[0]) return new x(!h || (h < 0 && (!a || a[0])) ? NaN : a ? s : 1 / 0); - if ( - (0 == (h = Math.sqrt(+I(s))) || h == 1 / 0 - ? (((e = oe(a)).length + u) % 2 == 0 && (e += '0'), - (h = Math.sqrt(+e)), - (u = ne((u + 1) / 2) - (u < 0 || u % 2)), - (i = new x((e = h == 1 / 0 ? '5e' + u : (e = h.toExponential()).slice(0, e.indexOf('e') + 1) + u)))) - : (i = new x(h + '')), - i.c[0]) - ) - for ((h = (u = i.e) + f) < 3 && (h = 0); ; ) - if (((o = i), (i = c.times(o.plus(r(s, o, f, 1)))), oe(o.c).slice(0, h) === (e = oe(i.c)).slice(0, h))) { - if ((i.e < u && --h, '9999' != (e = e.slice(h - 3, h + 1)) && (n || '4999' != e))) { - (+e && (+e.slice(1) || '5' != e.charAt(0))) || (B(i, i.e + p + 2, 1), (t = !i.times(i).eq(s))); - break; - } - if (!n && (B(o, o.e + p + 2, 0), o.times(o).eq(s))) { - i = o; - break; - } - (f += 4), (h += 4), (n = 1); - } - return B(i, i.e + p + 1, m, t); - }), - (l.toExponential = function (t, e) { - return null != t && (ae(t, 0, ie), t++), A(this, t, e, 1); - }), - (l.toFixed = function (t, e) { - return null != t && (ae(t, 0, ie), (t = t + this.e + 1)), A(this, t, e); - }), - (l.toFormat = function (t, e, r) { - var i, - n = this; - if (null == r) - null != t && e && 'object' == typeof e - ? ((r = e), (e = null)) - : t && 'object' == typeof t - ? ((r = t), (t = e = null)) - : (r = E); - else if ('object' != typeof r) throw Error(Yt + 'Argument not an object: ' + r); - if (((i = n.toFixed(t, e)), n.c)) { - var o, - s = i.split('.'), - a = +r.groupSize, - h = +r.secondaryGroupSize, - u = r.groupSeparator || '', - f = s[0], - c = s[1], - l = n.s < 0, - d = l ? f.slice(1) : f, - p = d.length; - if ((h && ((o = a), (a = h), (h = o), (p -= o)), a > 0 && p > 0)) { - for (o = p % a || a, f = d.substr(0, o); o < p; o += a) f += u + d.substr(o, a); - h > 0 && (f += u + d.slice(o)), l && (f = '-' + f); - } - i = c - ? f + - (r.decimalSeparator || '') + - ((h = +r.fractionGroupSize) - ? c.replace(new RegExp('\\d{' + h + '}\\B', 'g'), '$&' + (r.fractionGroupSeparator || '')) - : c) - : f; - } - return (r.prefix || '') + i + (r.suffix || ''); - }), - (l.toFraction = function (t) { - var e, - i, - n, - o, - s, - a, - h, - u, - f, - c, - l, - p, - g = this, - b = g.c; - if (null != t && ((!(h = new x(t)).isInteger() && (h.c || 1 !== h.s)) || h.lt(d))) - throw Error(Yt + 'Argument ' + (h.isInteger() ? 'out of range: ' : 'not an integer: ') + I(h)); - if (!b) return new x(g); - for ( - e = new x(d), - f = i = new x(d), - n = u = new x(d), - p = oe(b), - s = e.e = p.length - g.e - 1, - e.c[0] = ee[(a = s % Qt) < 0 ? Qt + a : a], - t = !t || h.comparedTo(e) > 0 ? (s > 0 ? e : f) : h, - a = v, - v = 1 / 0, - h = new x(p), - u.c[0] = 0; - (c = r(h, e, 0, 1)), 1 != (o = i.plus(c.times(n))).comparedTo(t); - - ) - (i = n), (n = o), (f = u.plus(c.times((o = f)))), (u = o), (e = h.minus(c.times((o = e)))), (h = o); - return ( - (o = r(t.minus(i), n, 0, 1)), - (u = u.plus(o.times(f))), - (i = i.plus(o.times(n))), - (u.s = f.s = g.s), - (l = - r(f, n, (s *= 2), m) - .minus(g) - .abs() - .comparedTo(r(u, i, s, m).minus(g).abs()) < 1 - ? [f, n] - : [u, i]), - (v = a), - l - ); - }), - (l.toNumber = function () { - return +I(this); - }), - (l.toPrecision = function (t, e) { - return null != t && ae(t, 1, ie), A(this, t, e, 2); - }), - (l.toString = function (t) { - var e, - r = this, - n = r.s, - o = r.e; - return ( - null === o - ? n - ? ((e = 'Infinity'), n < 0 && (e = '-' + e)) - : (e = 'NaN') - : (null == t - ? (e = o <= g || o >= b ? ue(oe(r.c), o) : fe(oe(r.c), o, '0')) - : 10 === t - ? (e = fe(oe((r = B(new x(r), p + o + 1, m)).c), r.e, '0')) - : (ae(t, 2, S.length, 'Base'), (e = i(fe(oe(r.c), o, '0'), 10, t, n, !0))), - n < 0 && r.c[0] && (e = '-' + e)), - e - ); - }), - (l.valueOf = l.toJSON = - function () { - return I(this); - }), - (l._isBigNumber = !0), - (l[Symbol.toStringTag] = 'BigNumber'), - (l[Symbol.for('nodejs.util.inspect.custom')] = l.valueOf), - null != e && x.set(e), - x - ); - })(); - const le = ce; - function de(t) { - return t && t.Math == Math ? t : void 0; - } - const pe = - ('object' == typeof globalThis && de(globalThis)) || - ('object' == typeof window && de(window)) || - ('object' == typeof self && de(self)) || - ('object' == typeof r.g && de(r.g)) || - (function () { - return this; - })() || - {}, - me = t => { - try { - if (t) { - const e = new URL(t).host; - return 0 === e.indexOf('www.') ? e.replace('www.', '') : e; - } - return ''; - } catch (t) { - return ''; - } - }; - var ge; - !(function (t) { - (t.success = 'success'), - (t.no_active_session = 'no_active_session'), - (t.unsupported_network = 'unsupported_network'), - (t.already_added = 'already_added'), - (t.set_as_active = 'set_as_active'), - (t.already_active = 'already_active'); - })(ge || (ge = {})); - var be; - !(function (t) { - (t.eth_chainId = 'eth_chainId'), - (t.eth_accounts = 'eth_accounts'), - (t.eth_sendTransaction = 'eth_sendTransaction'), - (t.eth_signTransaction = 'eth_signTransaction'), - (t.personal_sign = 'personal_sign'), - (t.eth_signTypedData = 'eth_signTypedData'), - (t.eth_signTypedData_v3 = 'eth_signTypedData_v3'), - (t.eth_signTypedData_v4 = 'eth_signTypedData_v4'), - (t.eth_getCode = 'eth_getCode'), - (t.wallet_addEthereumChain = 'wallet_addEthereumChain'), - (t.wallet_switchEthereumChain = 'wallet_switchEthereumChain'), - (t.eth_requestAccounts = 'eth_requestAccounts'), - (t.eth_blockNumber = 'eth_blockNumber'), - (t.eth_call = 'eth_call'), - (t.eth_estimateGas = 'eth_estimateGas'), - (t.personal_ecRecover = 'personal_ecRecover'), - (t.eth_gasPrice = 'eth_gasPrice'), - (t.eth_getBlockByNumber = 'eth_getBlockByNumber'), - (t.eth_getBalance = 'eth_getBalance'), - (t.eth_getTransactionByHash = 'eth_getTransactionByHash'); - })(be || (be = {})); - const ye = { - available: 'undefined' != typeof window, - name: 'webviewMessenger', - send: async (t, e, { id: r } = {}) => ( - window.ReactNativeWebView.postMessage(JSON.stringify({ topic: `> ${t}`, payload: e, id: r })), - new Promise((e, i) => { - const n = o => { - if ( - !(function ({ id: t, topic: e, message: r }) { - if (r.topic === `< ${e}` && (void 0 === t || r.id === t) && r.payload) return !0; - })({ id: r, message: o.data, topic: t }) - ) - return; - if (o.source != window) return; - window.removeEventListener('message', n); - const { response: s, error: a } = o.data.payload; - a && i(new Error(a.message)), e(s); - }; - window.addEventListener('message', n); - }) - ), - reply(t, e) { - const r = async r => { - if ( - !(function ({ topic: t, message: e }) { - return !(!e.topic || ('*' !== t && e.topic !== `> ${t}`) || ('*' === t && e.topic.startsWith('<'))); - })({ message: r.data, topic: t }) - ) - return; - if (r.source != window) return; - let i, n; - try { - n = await e(r.data.payload, { topic: r.data.topic, sender: r.source, id: r.data.id }); - } catch (t) { - i = t; - } - const o = r.data.topic.replace('>', '<'); - window.ReactNativeWebView.postMessage(JSON.stringify({ topic: o, payload: { error: i, response: n }, id: r.data.id })); - }; - return window.addEventListener('message', r, !1), () => window.removeEventListener('message', r); - }, - }, - ve = (function ({ messenger: t, topic: e }) { - return ( - t.available || console.error(`Messenger "${t.name}" is not available in this context.`), - { - send: async (r, { id: i }) => t.send(e, r, { id: i }), - async reply(r) { - t.reply(e, r); - }, - } - ); - })({ messenger: ye, topic: 'providerRequest' }), - we = new s({ - backgroundMessenger: ye, - providerRequestTransport: ve, - onConstruct({ emit: t }) { - if ( - (t => { - try { - return new URL(t), !0; - } catch (t) { - return !1; - } - })(window.location.href) - ) { - const e = me(window.location.href); - ye?.reply(`accountsChanged:${e}`, async e => { - t('accountsChanged', [e]); - }), - ye?.reply(`chainChanged:${e}`, async e => { - var r, i; - t('chainChanged', ((r = String(e)), (i = (t => new le(t).toString(16))(r)).startsWith('0x') ? i : `0x${i}`)); - }), - ye?.reply(`disconnect:${e}`, async () => { - t('disconnect', []); - }), - ye?.reply(`connect:${e}`, async e => { - t('connect', e); - }); - } - }, - }); - (function () { - const { doctype: t } = window.document; - return !t || 'html' === t.name; - })() && - (function () { - const t = [/\.xml$/u, /\.pdf$/u], - e = window.location.pathname; - for (let r = 0; r < t.length; r++) if (t[r].test(e)) return !1; - return !0; - })() && - (function () { - const t = document.documentElement.nodeName; - return !t || 'html' === t.toLowerCase(); - })() && - ((function (t) { - const e = new CustomEvent('eip6963:announceProvider', { detail: Object.freeze(t) }); - window.dispatchEvent(e); - window.addEventListener('eip6963:requestProvider', () => window.dispatchEvent(e)); - })({ - info: { - icon: 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMiIgaGVpZ2h0PSIzMiIgZmlsbD0ibm9uZSI+PGcgY2xpcC1wYXRoPSJ1cmwoI2EpIj48cGF0aCBmaWxsPSJ1cmwoI2IpIiBkPSJNMCAwaDMydjMySDB6Ii8+PHBhdGggZmlsbD0idXJsKCNjKSIgZD0iTTUuMzMzIDEwLjEzM2gxLjZjOC4yNDggMCAxNC45MzQgNi42ODYgMTQuOTM0IDE0LjkzNHYxLjZoMy4yYTEuNiAxLjYgMCAwIDAgMS42LTEuNmMwLTEwLjg5OS04LjgzNS0xOS43MzQtMTkuNzM0LTE5LjczNGExLjYgMS42IDAgMCAwLTEuNiAxLjZ2My4yWiIvPjxwYXRoIGZpbGw9InVybCgjZCkiIGQ9Ik0yMi40IDI1LjA2N2g0LjI2N2ExLjYgMS42IDAgMCAxLTEuNiAxLjZIMjIuNHYtMS42WiIvPjxwYXRoIGZpbGw9InVybCgjZSkiIGQ9Ik02LjkzMyA1LjMzM1Y5LjZoLTEuNlY2LjkzM2ExLjYgMS42IDAgMCAxIDEuNi0xLjZaIi8+PHBhdGggZmlsbD0idXJsKCNmKSIgZD0iTTUuMzMzIDkuNmgxLjZjOC41NDIgMCAxNS40NjcgNi45MjUgMTUuNDY3IDE1LjQ2N3YxLjZoLTQuOHYtMS42YzAtNS44OTEtNC43NzYtMTAuNjY3LTEwLjY2Ny0xMC42NjdoLTEuNlY5LjZaIi8+PHBhdGggZmlsbD0idXJsKCNnKSIgZD0iTTE4LjEzMyAyNS4wNjdIMjIuNHYxLjZoLTQuMjY3di0xLjZaIi8+PHBhdGggZmlsbD0idXJsKCNoKSIgZD0iTTUuMzMzIDEzLjg2N1Y5LjZoMS42djQuMjY3aC0xLjZaIi8+PHBhdGggZmlsbD0idXJsKCNpKSIgZD0iTTUuMzMzIDE2LjUzM2ExLjYgMS42IDAgMCAwIDEuNiAxLjYgNi45MzMgNi45MzMgMCAwIDEgNi45MzQgNi45MzQgMS42IDEuNiAwIDAgMCAxLjYgMS42aDIuNjY2di0xLjZjMC02LjE4Ni01LjAxNC0xMS4yLTExLjItMTEuMmgtMS42djIuNjY2WiIvPjxwYXRoIGZpbGw9InVybCgjaikiIGQ9Ik0xMy44NjcgMjUuMDY3aDQuMjY2djEuNmgtMi42NjZhMS42IDEuNiAwIDAgMS0xLjYtMS42WiIvPjxwYXRoIGZpbGw9InVybCgjaykiIGQ9Ik02LjkzMyAxOC4xMzNhMS42IDEuNiAwIDAgMS0xLjYtMS42di0yLjY2NmgxLjZ2NC4yNjZaIi8+PC9nPjxkZWZzPjxyYWRpYWxHcmFkaWVudCBpZD0iYyIgY3g9IjAiIGN5PSIwIiByPSIxIiBncmFkaWVudFRyYW5zZm9ybT0icm90YXRlKC05MCAxNiA5LjA2Nykgc2NhbGUoMTkuNzMzMykiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj48c3RvcCBvZmZzZXQ9Ii43NyIgc3RvcC1jb2xvcj0iI0ZGNDAwMCIvPjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzg3NTRDOSIvPjwvcmFkaWFsR3JhZGllbnQ+PHJhZGlhbEdyYWRpZW50IGlkPSJmIiBjeD0iMCIgY3k9IjAiIHI9IjEiIGdyYWRpZW50VHJhbnNmb3JtPSJyb3RhdGUoLTkwIDE2IDkuMDY3KSBzY2FsZSgxNS40NjY3KSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPjxzdG9wIG9mZnNldD0iLjcyNCIgc3RvcC1jb2xvcj0iI0ZGRjcwMCIvPjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iI0ZGOTkwMSIvPjwvcmFkaWFsR3JhZGllbnQ+PHJhZGlhbEdyYWRpZW50IGlkPSJpIiBjeD0iMCIgY3k9IjAiIHI9IjEiIGdyYWRpZW50VHJhbnNmb3JtPSJyb3RhdGUoLTkwIDE2IDkuMDY3KSBzY2FsZSgxMS4yKSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPjxzdG9wIG9mZnNldD0iLjU5NSIgc3RvcC1jb2xvcj0iIzBBRiIvPjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzAxREE0MCIvPjwvcmFkaWFsR3JhZGllbnQ+PHJhZGlhbEdyYWRpZW50IGlkPSJqIiBjeD0iMCIgY3k9IjAiIHI9IjEiIGdyYWRpZW50VHJhbnNmb3JtPSJtYXRyaXgoNC41MzMzMyAwIDAgMTIuMDg4OSAxMy42IDI1Ljg2NykiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj48c3RvcCBzdG9wLWNvbG9yPSIjMEFGIi8+PHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjMDFEQTQwIi8+PC9yYWRpYWxHcmFkaWVudD48cmFkaWFsR3JhZGllbnQgaWQ9ImsiIGN4PSIwIiBjeT0iMCIgcj0iMSIgZ3JhZGllbnRUcmFuc2Zvcm09Im1hdHJpeCgwIC00LjUzMzMzIDg1Ljk2NTQgMCA2LjEzMyAxOC40KSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPjxzdG9wIHN0b3AtY29sb3I9IiMwQUYiLz48c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiMwMURBNDAiLz48L3JhZGlhbEdyYWRpZW50PjxsaW5lYXJHcmFkaWVudCBpZD0iYiIgeDE9IjE2IiB4Mj0iMTYiIHkxPSIwIiB5Mj0iMzIiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj48c3RvcCBzdG9wLWNvbG9yPSIjMTc0Mjk5Ii8+PHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjMDAxRTU5Ii8+PC9saW5lYXJHcmFkaWVudD48bGluZWFyR3JhZGllbnQgaWQ9ImQiIHgxPSIyMi4xMzMiIHgyPSIyNi42NjciIHkxPSIyNS44NjciIHkyPSIyNS44NjciIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj48c3RvcCBzdG9wLWNvbG9yPSIjRkY0MDAwIi8+PHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjODc1NEM5Ii8+PC9saW5lYXJHcmFkaWVudD48bGluZWFyR3JhZGllbnQgaWQ9ImUiIHgxPSI2LjEzMyIgeDI9IjYuMTMzIiB5MT0iNS4zMzMiIHkyPSI5Ljg2NyIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPjxzdG9wIHN0b3AtY29sb3I9IiM4NzU0QzkiLz48c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiNGRjQwMDAiLz48L2xpbmVhckdyYWRpZW50PjxsaW5lYXJHcmFkaWVudCBpZD0iZyIgeDE9IjE4LjEzMyIgeDI9IjIyLjQiIHkxPSIyNS44NjciIHkyPSIyNS44NjciIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj48c3RvcCBzdG9wLWNvbG9yPSIjRkZGNzAwIi8+PHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjRkY5OTAxIi8+PC9saW5lYXJHcmFkaWVudD48bGluZWFyR3JhZGllbnQgaWQ9ImgiIHgxPSI2LjEzMyIgeDI9IjYuMTMzIiB5MT0iMTMuODY3IiB5Mj0iOS42IiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+PHN0b3Agc3RvcC1jb2xvcj0iI0ZGRjcwMCIvPjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iI0ZGOTkwMSIvPjwvbGluZWFyR3JhZGllbnQ+PGNsaXBQYXRoIGlkPSJhIj48cGF0aCBmaWxsPSIjZmZmIiBkPSJNMCAwaDMydjMySDB6Ii8+PC9jbGlwUGF0aD48L2RlZnM+PC9zdmc+', - name: 'Rainbow', - rdns: 'me.rainbow', - uuid: (function () { - const t = pe, - e = t.crypto || t.msCrypto; - let r = () => 16 * Math.random(); - try { - if (e && e.randomUUID) return e.randomUUID().replace(/-/g, ''); - e && e.getRandomValues && (r = () => e.getRandomValues(new Uint8Array(1))[0]); - } catch (t) {} - return ([1e7] + 1e3 + 4e3 + 8e3 + 1e11).replace(/[018]/g, t => (t ^ ((15 & r()) >> (t / 4))).toString(16)); - })(), - }, - provider: we, - }), - ye.reply('rainbow_ethereumChainEvent', async ({ chainId: t, chainName: e, status: r, extensionUrl: i, host: n }) => { - me(window.location.href) === n && - alert('Should inject notification ' + JSON.stringify({ chainId: t, chainName: e, status: r, extensionUrl: i })); - }), - ye.reply('rainbow_reload', async () => { - window.location.reload(); - }), - Object.defineProperties(window, { - rainbow: { value: we, configurable: !1, writable: !1 }, - ethereum: { - get: () => window.walletRouter.currentProvider, - set(t) { - window.walletRouter.addProvider(t); - }, - configurable: !1, - }, - walletRouter: { - value: { - rainbowProvider: we, - lastInjectedProvider: window.ethereum, - currentProvider: we, - providers: [we, ...(window.ethereum ? [window.ethereum] : [])], - setDefaultProvider(t) { - if (t) window.walletRouter.currentProvider = window.rainbow; - else { - const t = window.walletRouter.lastInjectedProvider ?? window.ethereum; - window.walletRouter.currentProvider = t; - } - }, - addProvider(t) { - window.walletRouter.providers.includes(t) || window.walletRouter.providers.push(t), - we !== t && (window.walletRouter.lastInjectedProvider = t); - }, - }, - configurable: !1, - writable: !1, - }, - }), - (window.rainbow.providers = window.walletRouter.providers), - window.dispatchEvent(new Event('ethereum#initialized')), - ye.reply('rainbow_setDefaultProvider', async ({ rainbowAsDefault: t }) => { - window.walletRouter.setDefaultProvider(t); - })); - })(); -})(); +(()=>{var e={6289:(e,t)=>{"use strict";function r(e){if(Array.isArray(e)){const t=[];let n=0;for(let o=0;oe.length)throw new Error("invalid RLP (safeSlice): end slice of Uint8Array out-of-bounds");return e.slice(t,r)}function o(e){if(0===e[0])throw new Error("invalid RLP: extra zeros");return l(u(e))}function i(e,t){if(e<56)return Uint8Array.from([e+t]);const r=d(e),n=d(t+55+r.length/2);return Uint8Array.from(f(n+r))}function s(e,t=!1){if(null==e||0===e.length)return Uint8Array.from([]);const r=a(y(e));if(t)return r;if(0!==r.remainder.length)throw new Error("invalid RLP: remainder must be zero");return r.data}function a(e){let t,r,i,s,c;const u=[],l=e[0];if(l<=127)return{data:e.slice(0,1),remainder:e.slice(1)};if(l<=183){if(t=l-127,i=128===l?Uint8Array.from([]):n(e,1,t),2===t&&i[0]<128)throw new Error("invalid RLP encoding: invalid prefix, single byte < 0x80 are not prefixed");return{data:i,remainder:e.slice(t)}}if(l<=191){if(r=l-182,e.length-1e.length)throw new Error("invalid RLP: total length is larger than the data");for(s=n(e,r,i);s.length;)c=a(s),u.push(c.data),s=c.remainder;return{data:u,remainder:e.slice(i)}}}Object.defineProperty(t,"__esModule",{value:!0}),t.RLP=t.utils=t.decode=t.encode=void 0,t.encode=r,t.decode=s;const c=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));function u(e){let t="";for(let r=0;re+t.length),0),r=new Uint8Array(t);for(let t=0,n=0;t=2&&"0"===e[0]&&"x"===e[1]}function y(e){if(e instanceof Uint8Array)return e;if("string"==typeof e)return g(e)?f((t="string"!=typeof(r=e)?r:g(r)?r.slice(2):r).length%2?`0${t}`:t):p(e);var t,r;if("number"==typeof e||"bigint"==typeof e)return e?f(d(e)):Uint8Array.from([]);if(null==e)return Uint8Array.from([]);throw new Error("toBytes: received unsupported type "+typeof e)}t.utils={bytesToHex:u,concatBytes:h,hexToBytes:f,utf8ToBytes:p},t.RLP={encode:r,decode:s}},6284:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.accountBodyToRLP=t.accountBodyToSlim=t.accountBodyFromSlim=t.isZeroAddress=t.zeroAddress=t.importPublic=t.privateToAddress=t.privateToPublic=t.publicToAddress=t.pubToAddress=t.isValidPublic=t.isValidPrivate=t.generateAddress2=t.generateAddress=t.isValidChecksumAddress=t.toChecksumAddress=t.isValidAddress=t.Account=void 0;const n=r(6289),o=r(9956),i=r(3852),s=r(7513),a=r(7312),c=r(9838),u=r(5546),l=r(9498),f=BigInt(0);class h{constructor(e=f,t=f,r=c.KECCAK256_RLP,n=c.KECCAK256_NULL){this.nonce=e,this.balance=t,this.storageRoot=r,this.codeHash=n,this._validate()}static fromAccountData(e){const{nonce:t,balance:r,storageRoot:n,codeHash:o}=e;return new h(void 0!==t?(0,a.bufferToBigInt)((0,a.toBuffer)(t)):void 0,void 0!==r?(0,a.bufferToBigInt)((0,a.toBuffer)(r)):void 0,void 0!==n?(0,a.toBuffer)(n):void 0,void 0!==o?(0,a.toBuffer)(o):void 0)}static fromRlpSerializedAccount(e){const t=(0,a.arrToBufArr)(n.RLP.decode(Uint8Array.from(e)));if(!Array.isArray(t))throw new Error("Invalid serialized account input. Must be array");return this.fromValuesArray(t)}static fromValuesArray(e){const[t,r,n,o]=e;return new h((0,a.bufferToBigInt)(t),(0,a.bufferToBigInt)(r),n,o)}_validate(){if(this.nonce=8?f+=r[e].toUpperCase():f+=r[e];return f},t.isValidChecksumAddress=function(e,r){return(0,t.isValidAddress)(e)&&(0,t.toChecksumAddress)(e,r)===e},t.generateAddress=function(e,t){return(0,u.assertIsBuffer)(e),(0,u.assertIsBuffer)(t),(0,a.bufferToBigInt)(t)===BigInt(0)?Buffer.from((0,o.keccak256)(n.RLP.encode((0,a.bufArrToArr)([e,null])))).slice(-20):Buffer.from((0,o.keccak256)(n.RLP.encode((0,a.bufArrToArr)([e,t])))).slice(-20)},t.generateAddress2=function(e,t,r){if((0,u.assertIsBuffer)(e),(0,u.assertIsBuffer)(t),(0,u.assertIsBuffer)(r),20!==e.length)throw new Error("Expected from to be of length 20");if(32!==t.length)throw new Error("Expected salt to be of length 32");const n=(0,o.keccak256)(Buffer.concat([Buffer.from("ff","hex"),e,t,(0,o.keccak256)(r)]));return(0,a.toBuffer)(n).slice(-20)},t.isValidPrivate=function(e){return i.secp256k1.utils.isValidPrivateKey(e)},t.isValidPublic=function(e,t=!1){if((0,u.assertIsBuffer)(e),64===e.length)try{return i.secp256k1.ProjectivePoint.fromHex(Buffer.concat([Buffer.from([4]),e])),!0}catch(e){return!1}if(!t)return!1;try{return i.secp256k1.ProjectivePoint.fromHex(e),!0}catch(e){return!1}},t.pubToAddress=function(e,t=!1){if((0,u.assertIsBuffer)(e),t&&64!==e.length&&(e=Buffer.from(i.secp256k1.ProjectivePoint.fromHex(e).toRawBytes(!1).slice(1))),64!==e.length)throw new Error("Expected pubKey to be of length 64");return Buffer.from((0,o.keccak256)(e)).slice(-20)},t.publicToAddress=t.pubToAddress,t.privateToPublic=function(e){return(0,u.assertIsBuffer)(e),Buffer.from(i.secp256k1.ProjectivePoint.fromPrivateKey(e).toRawBytes(!1).slice(1))},t.privateToAddress=function(e){return(0,t.publicToAddress)((0,t.privateToPublic)(e))},t.importPublic=function(e){return(0,u.assertIsBuffer)(e),64!==e.length&&(e=Buffer.from(i.secp256k1.ProjectivePoint.fromHex(e).toRawBytes(!1).slice(1))),e},t.zeroAddress=function(){const e=(0,a.zeros)(20);return(0,a.bufferToHex)(e)},t.isZeroAddress=function(e){try{(0,u.assertIsString)(e)}catch(e){return!1}return(0,t.zeroAddress)()===e},t.accountBodyFromSlim=p;const d=new Uint8Array(0);t.accountBodyToSlim=function(e){const[t,r,n,o]=e;return[t,r,(0,a.arrToBufArr)(n).equals(c.KECCAK256_RLP)?d:n,(0,a.arrToBufArr)(o).equals(c.KECCAK256_NULL)?d:o]},t.accountBodyToRLP=function(e,t=!0){const r=t?p(e):e;return(0,a.arrToBufArr)(n.RLP.encode(r))}},6727:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Address=void 0;const n=r(6284),o=r(7312);class i{constructor(e){if(20!==e.length)throw new Error("Invalid address length");this.buf=e}static zero(){return new i((0,o.zeros)(20))}static fromString(e){if(!(0,n.isValidAddress)(e))throw new Error("Invalid address");return new i((0,o.toBuffer)(e))}static fromPublicKey(e){if(!Buffer.isBuffer(e))throw new Error("Public key should be Buffer");const t=(0,n.pubToAddress)(e);return new i(t)}static fromPrivateKey(e){if(!Buffer.isBuffer(e))throw new Error("Private key should be Buffer");const t=(0,n.privateToAddress)(e);return new i(t)}static generate(e,t){if("bigint"!=typeof t)throw new Error("Expected nonce to be a bigint");return new i((0,n.generateAddress)(e.buf,(0,o.bigIntToBuffer)(t)))}static generate2(e,t,r){if(!Buffer.isBuffer(t))throw new Error("Expected salt to be a Buffer");if(!Buffer.isBuffer(r))throw new Error("Expected initCode to be a Buffer");return new i((0,n.generateAddress2)(e.buf,t,r))}equals(e){return this.buf.equals(e.buf)}isZero(){return this.equals(i.zero())}isPrecompileOrSystemAddress(){const e=(0,o.bufferToBigInt)(this.buf),t=BigInt(0),r=BigInt("0xffff");return e>=t&&e<=r}toString(){return"0x"+this.buf.toString("hex")}toBuffer(){return Buffer.from(this.buf)}}t.Address=i},8421:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncEventEmitter=void 0;const n=r(7007);class o extends n.EventEmitter{emit(e,...t){let[r,n]=t;const o=this;let i=o._events[e]??[];return void 0===n&&"function"==typeof r&&(n=r,r=void 0),"newListener"!==e&&"removeListener"!==e||(r={event:r,fn:n},n=void 0),i=Array.isArray(i)?i:[i],async function(e,t,r){let n;for await(const o of t)try{o.length<2?o.call(e,r):await new Promise(((t,n)=>{o.call(e,r,(e=>{e?n(e):t()}))}))}catch(e){n=e}if(n)throw n}(o,i.slice(),r).then(n).catch(n),o.listenerCount(e)>0}once(e,t){const r=this;let n;if("function"!=typeof t)throw new TypeError("listener must be a function");return n=t.length>=2?function(o,i){r.removeListener(e,n),t(o,i)}:function(o){r.removeListener(e,n),t(o,n)},r.on(e,n),r}first(e,t){let r=this._events[e]??[];if("function"!=typeof t)throw new TypeError("listener must be a function");return Array.isArray(r)||(this._events[e]=r=[r]),r.unshift(t),this}before(e,t,r){return this.beforeOrAfter(e,t,r)}after(e,t,r){return this.beforeOrAfter(e,t,r,"after")}beforeOrAfter(e,t,r,n){let o,i,s=this._events[e]??[];const a="after"===n?1:0;if("function"!=typeof r)throw new TypeError("listener must be a function");if("function"!=typeof t)throw new TypeError("target must be a function");for(Array.isArray(s)||(this._events[e]=s=[s]),i=s.length,o=s.length;o--;)if(s[o]===t){i=o+a;break}return s.splice(i,0,r),this}on(e,t){return super.on(e,t)}addListener(e,t){return super.addListener(e,t)}prependListener(e,t){return super.prependListener(e,t)}prependOnceListener(e,t){return super.prependOnceListener(e,t)}removeAllListeners(e){return super.removeAllListeners(e)}removeListener(e,t){return super.removeListener(e,t)}eventNames(){return super.eventNames()}listeners(e){return super.listeners(e)}listenerCount(e){return super.listenerCount(e)}getMaxListeners(){return super.getMaxListeners()}setMaxListeners(e){return super.setMaxListeners(e)}}t.AsyncEventEmitter=o},7312:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.intToUnpaddedBuffer=t.bigIntToUnpaddedBuffer=t.bigIntToHex=t.bufArrToArr=t.arrToBufArr=t.validateNoLeadingZeroes=t.baToJSON=t.toUtf8=t.short=t.addHexPrefix=t.toUnsigned=t.fromSigned=t.bufferToInt=t.bigIntToBuffer=t.bufferToBigInt=t.bufferToHex=t.toBuffer=t.unpadHexString=t.unpadArray=t.unpadBuffer=t.setLengthRight=t.setLengthLeft=t.zeros=t.intToBuffer=t.intToHex=void 0;const n=r(5546),o=r(9498);t.intToHex=function(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Received an invalid integer type: ${e}`);return`0x${e.toString(16)}`},t.intToBuffer=function(e){const r=(0,t.intToHex)(e);return Buffer.from((0,o.padToEven)(r.slice(2)),"hex")},t.zeros=function(e){return Buffer.allocUnsafe(e).fill(0)};const i=function(e,r,n){const o=(0,t.zeros)(r);return n?e.length0&&"0"===t.toString();)t=(e=e.slice(1))[0];return e};function a(e){const r=(0,t.bufferToHex)(e);return"0x"===r?BigInt(0):BigInt(r)}function c(e){return(0,t.toBuffer)("0x"+e.toString(16))}t.unpadBuffer=function(e){return(0,n.assertIsBuffer)(e),s(e)},t.unpadArray=function(e){return(0,n.assertIsArray)(e),s(e)},t.unpadHexString=function(e){return(0,n.assertIsHexString)(e),e=(0,o.stripHexPrefix)(e),"0x"+s(e)},t.toBuffer=function(e){if(null==e)return Buffer.allocUnsafe(0);if(Buffer.isBuffer(e))return Buffer.from(e);if(Array.isArray(e)||e instanceof Uint8Array)return Buffer.from(e);if("string"==typeof e){if(!(0,o.isHexString)(e))throw new Error(`Cannot convert string to buffer. toBuffer only supports 0x-prefixed hex strings and this string was given: ${e}`);return Buffer.from((0,o.padToEven)((0,o.stripHexPrefix)(e)),"hex")}if("number"==typeof e)return(0,t.intToBuffer)(e);if("bigint"==typeof e){if(e0&&0===r[0])throw new Error(`${t} cannot have leading zeroes, received: ${r.toString("hex")}`)},t.arrToBufArr=function e(t){return Array.isArray(t)?t.map((t=>e(t))):Buffer.from(t)},t.bufArrToArr=function e(t){return Array.isArray(t)?t.map((t=>e(t))):Uint8Array.from(t??[])},t.bigIntToHex=e=>"0x"+e.toString(16),t.bigIntToUnpaddedBuffer=function(e){return(0,t.unpadBuffer)(c(e))},t.intToUnpaddedBuffer=function(e){return(0,t.unpadBuffer)((0,t.intToBuffer)(e))}},9838:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MAX_WITHDRAWALS_PER_PAYLOAD=t.RLP_EMPTY_STRING=t.KECCAK256_RLP=t.KECCAK256_RLP_S=t.KECCAK256_RLP_ARRAY=t.KECCAK256_RLP_ARRAY_S=t.KECCAK256_NULL=t.KECCAK256_NULL_S=t.TWO_POW256=t.SECP256K1_ORDER_DIV_2=t.SECP256K1_ORDER=t.MAX_INTEGER_BIGINT=t.MAX_INTEGER=t.MAX_UINT64=void 0;const n=r(8287),o=r(3852);t.MAX_UINT64=BigInt("0xffffffffffffffff"),t.MAX_INTEGER=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),t.MAX_INTEGER_BIGINT=BigInt("115792089237316195423570985008687907853269984665640564039457584007913129639935"),t.SECP256K1_ORDER=o.secp256k1.CURVE.n,t.SECP256K1_ORDER_DIV_2=o.secp256k1.CURVE.n/BigInt(2),t.TWO_POW256=BigInt("0x10000000000000000000000000000000000000000000000000000000000000000"),t.KECCAK256_NULL_S="c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",t.KECCAK256_NULL=n.Buffer.from(t.KECCAK256_NULL_S,"hex"),t.KECCAK256_RLP_ARRAY_S="1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",t.KECCAK256_RLP_ARRAY=n.Buffer.from(t.KECCAK256_RLP_ARRAY_S,"hex"),t.KECCAK256_RLP_S="56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",t.KECCAK256_RLP=n.Buffer.from(t.KECCAK256_RLP_S,"hex"),t.RLP_EMPTY_STRING=n.Buffer.from([128]),t.MAX_WITHDRAWALS_PER_PAYLOAD=16},5062:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.compactBytesToNibbles=t.bytesToNibbles=t.nibblesToCompactBytes=t.nibblesToBytes=t.hasTerminator=void 0,t.hasTerminator=e=>e.length>0&&16===e[e.length-1],t.nibblesToBytes=(e,t)=>{for(let r=0,n=0;n{let r=0;(0,t.hasTerminator)(e)&&(r=1,e=e.subarray(0,e.length-1));const n=new Uint8Array(e.length/2+1);return n[0]=r<<5,1==(1&e.length)&&(n[0]|=16,n[0]|=e[0],e=e.subarray(1)),(0,t.nibblesToBytes)(e,n.subarray(1)),n},t.bytesToNibbles=e=>{const t=2*e.length+1,r=new Uint8Array(t);for(let t=0;t{if(0===e.length)return e;let r=(0,t.bytesToNibbles)(e);r[0]<2&&(r=r.subarray(0,r.length-1));const n=2-(1&r[0]);return r.subarray(n)}},5546:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assertIsString=t.assertIsArray=t.assertIsBuffer=t.assertIsHexString=void 0;const n=r(9498);t.assertIsHexString=function(e){if(!(0,n.isHexString)(e))throw new Error(`This method only supports 0x-prefixed hex strings but input was: ${e}`)},t.assertIsBuffer=function(e){if(!Buffer.isBuffer(e))throw new Error(`This method only supports Buffer but input was: ${e}`)},t.assertIsArray=function(e){if(!Array.isArray(e))throw new Error(`This method only supports number arrays but input was: ${e}`)},t.assertIsString=function(e){if("string"!=typeof e)throw new Error(`This method only supports strings but input was: ${e}`)}},8683:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.toAscii=t.stripHexPrefix=t.padToEven=t.isHexString=t.isHexPrefixed=t.getKeys=t.getBinarySize=t.fromUtf8=t.fromAscii=t.arrayContainsArray=void 0,o(r(9838),t),o(r(2652),t),o(r(6284),t),o(r(6727),t),o(r(7380),t),o(r(2133),t),o(r(7312),t),o(r(2666),t),o(r(5062),t),o(r(8421),t);var i=r(9498);Object.defineProperty(t,"arrayContainsArray",{enumerable:!0,get:function(){return i.arrayContainsArray}}),Object.defineProperty(t,"fromAscii",{enumerable:!0,get:function(){return i.fromAscii}}),Object.defineProperty(t,"fromUtf8",{enumerable:!0,get:function(){return i.fromUtf8}}),Object.defineProperty(t,"getBinarySize",{enumerable:!0,get:function(){return i.getBinarySize}}),Object.defineProperty(t,"getKeys",{enumerable:!0,get:function(){return i.getKeys}}),Object.defineProperty(t,"isHexPrefixed",{enumerable:!0,get:function(){return i.isHexPrefixed}}),Object.defineProperty(t,"isHexString",{enumerable:!0,get:function(){return i.isHexString}}),Object.defineProperty(t,"padToEven",{enumerable:!0,get:function(){return i.padToEven}}),Object.defineProperty(t,"stripHexPrefix",{enumerable:!0,get:function(){return i.stripHexPrefix}}),Object.defineProperty(t,"toAscii",{enumerable:!0,get:function(){return i.toAscii}}),o(r(1708),t),o(r(1862),t)},9498:(e,t)=>{"use strict";function r(e){if("string"!=typeof e)throw new Error("[isHexPrefixed] input must be type 'string', received type "+typeof e);return"0"===e[0]&&"x"===e[1]}function n(e){let t=e;if("string"!=typeof t)throw new Error("[padToEven] value must be type 'string', received "+typeof t);return t.length%2&&(t=`0${t}`),t}Object.defineProperty(t,"__esModule",{value:!0}),t.isHexString=t.getKeys=t.fromAscii=t.fromUtf8=t.toAscii=t.arrayContainsArray=t.getBinarySize=t.padToEven=t.stripHexPrefix=t.isHexPrefixed=void 0,t.isHexPrefixed=r,t.stripHexPrefix=e=>{if("string"!=typeof e)throw new Error("[stripHexPrefix] input must be type 'string', received "+typeof e);return r(e)?e.slice(2):e},t.padToEven=n,t.getBinarySize=function(e){if("string"!=typeof e)throw new Error("[getBinarySize] method requires input type 'string', received "+typeof e);return Buffer.byteLength(e,"utf8")},t.arrayContainsArray=function(e,t,r){if(!0!==Array.isArray(e))throw new Error(`[arrayContainsArray] method requires input 'superset' to be an array, got type '${typeof e}'`);if(!0!==Array.isArray(t))throw new Error(`[arrayContainsArray] method requires input 'subset' to be an array, got type '${typeof t}'`);return t[!0===r?"some":"every"]((t=>e.indexOf(t)>=0))},t.toAscii=function(e){let t="",r=0;const n=e.length;for("0x"===e.substring(0,2)&&(r=2);r0&&e.length!==2+2*t)}},1708:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Lock=void 0,t.Lock=class{constructor(){this.permits=1,this.promiseResolverQueue=[]}async acquire(){return this.permits>0?(this.permits-=1,Promise.resolve(!0)):new Promise((e=>this.promiseResolverQueue.push(e)))}release(){if(this.permits+=1,this.permits>1&&this.promiseResolverQueue.length>0)console.warn("Lock.permits should never be > 0 when there is someone waiting.");else if(1===this.permits&&this.promiseResolverQueue.length>0){this.permits-=1;const e=this.promiseResolverQueue.shift();e&&e(!0)}}}},1862:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getProvider=t.fetchFromProvider=void 0;const n=r(6215);t.fetchFromProvider=async(e,t)=>(await(0,n.default)(e,{headers:{"content-type":"application/json"},type:"json",data:{method:t.method,params:t.params,jsonrpc:"2.0",id:1}})).result,t.getProvider=e=>{if("string"==typeof e)return e;if(void 0!==e?.connection?.url)return e.connection.url;throw new Error("Must provide valid provider URL or Web3Provider")}},2133:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hashPersonalMessage=t.isValidSignature=t.fromRpcSig=t.toCompactSig=t.toRpcSig=t.ecrecover=t.ecsign=void 0;const n=r(9956),o=r(3852),i=r(7312),s=r(9838),a=r(5546);function c(e,t){return e===BigInt(0)||e===BigInt(1)?e:void 0===t?e-BigInt(27):e-(t*BigInt(2)+BigInt(35))}function u(e){return e===BigInt(0)||e===BigInt(1)}t.ecsign=function(e,t,r){const n=o.secp256k1.sign(e,t),i=n.toCompactRawBytes();return{r:Buffer.from(i.slice(0,32)),s:Buffer.from(i.slice(32,64)),v:void 0===r?BigInt(n.recovery+27):BigInt(n.recovery+35)+BigInt(r)*BigInt(2)}},t.ecrecover=function(e,t,r,n,s){const a=Buffer.concat([(0,i.setLengthLeft)(r,32),(0,i.setLengthLeft)(n,32)],64),l=c(t,s);if(!u(l))throw new Error("Invalid signature v value");const f=o.secp256k1.Signature.fromCompact(a).addRecoveryBit(Number(l)).recoverPublicKey(e);return Buffer.from(f.toRawBytes(!1).slice(1))},t.toRpcSig=function(e,t,r,n){if(!u(c(e,n)))throw new Error("Invalid signature v value");return(0,i.bufferToHex)(Buffer.concat([(0,i.setLengthLeft)(t,32),(0,i.setLengthLeft)(r,32),(0,i.toBuffer)(e)]))},t.toCompactSig=function(e,t,r,n){if(!u(c(e,n)))throw new Error("Invalid signature v value");let o=r;return(e>BigInt(28)&&e%BigInt(2)===BigInt(1)||e===BigInt(1)||e===BigInt(28))&&(o=Buffer.from(r),o[0]|=128),(0,i.bufferToHex)(Buffer.concat([(0,i.setLengthLeft)(t,32),(0,i.setLengthLeft)(o,32)]))},t.fromRpcSig=function(e){const t=(0,i.toBuffer)(e);let r,n,o;if(t.length>=65)r=t.slice(0,32),n=t.slice(32,64),o=(0,i.bufferToBigInt)(t.slice(64));else{if(64!==t.length)throw new Error("Invalid signature length");r=t.slice(0,32),n=t.slice(32,64),o=BigInt((0,i.bufferToInt)(t.slice(32,33))>>7),n[0]&=127}return o<27&&(o+=BigInt(27)),{v:o,r,s:n}},t.isValidSignature=function(e,t,r,n=!0,o){if(32!==t.length||32!==r.length)return!1;if(!u(c(e,o)))return!1;const a=(0,i.bufferToBigInt)(t),l=(0,i.bufferToBigInt)(r);return!(a===BigInt(0)||a>=s.SECP256K1_ORDER||l===BigInt(0)||l>=s.SECP256K1_ORDER||n&&l>=s.SECP256K1_ORDER_DIV_2)},t.hashPersonalMessage=function(e){(0,a.assertIsBuffer)(e);const t=Buffer.from(`Ethereum Signed Message:\n${e.length}`,"utf-8");return Buffer.from((0,n.keccak256)(Buffer.concat([t,e])))}},2666:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toType=t.TypeOutput=void 0;const n=r(7312),o=r(9498);var i;!function(e){e[e.Number=0]="Number",e[e.BigInt=1]="BigInt",e[e.Buffer=2]="Buffer",e[e.PrefixedHexString=3]="PrefixedHexString"}(i=t.TypeOutput||(t.TypeOutput={})),t.toType=function(e,t){if(null===e)return null;if(void 0===e)return;if("string"==typeof e&&!(0,o.isHexString)(e))throw new Error(`A string must be provided with a 0x-prefix, given: ${e}`);if("number"==typeof e&&!Number.isSafeInteger(e))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative input type)");const r=(0,n.toBuffer)(e);switch(t){case i.Buffer:return r;case i.BigInt:return(0,n.bufferToBigInt)(r);case i.Number:{const e=(0,n.bufferToBigInt)(r);if(e>BigInt(Number.MAX_SAFE_INTEGER))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative output type)");return Number(e)}case i.PrefixedHexString:return(0,n.bufferToHex)(r);default:throw new Error("unknown outputType")}}},2652:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GWEI_TO_WEI=void 0,t.GWEI_TO_WEI=BigInt(1e9)},7380:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Withdrawal=void 0;const n=r(6727),o=r(7312),i=r(2666);class s{constructor(e,t,r,n){this.index=e,this.validatorIndex=t,this.address=r,this.amount=n}static fromWithdrawalData(e){const{index:t,validatorIndex:r,address:o,amount:a}=e,c=(0,i.toType)(t,i.TypeOutput.BigInt),u=(0,i.toType)(r,i.TypeOutput.BigInt),l=new n.Address((0,i.toType)(o,i.TypeOutput.Buffer)),f=(0,i.toType)(a,i.TypeOutput.BigInt);return new s(c,u,l,f)}static fromValuesArray(e){if(4!==e.length)throw Error(`Invalid withdrawalArray length expected=4 actual=${e.length}`);const[t,r,n,o]=e;return s.fromWithdrawalData({index:t,validatorIndex:r,address:n,amount:o})}static toBufferArray(e){const{index:t,validatorIndex:r,address:o,amount:s}=e,a=(0,i.toType)(t,i.TypeOutput.BigInt)===BigInt(0)?Buffer.alloc(0):(0,i.toType)(t,i.TypeOutput.Buffer),c=(0,i.toType)(r,i.TypeOutput.BigInt)===BigInt(0)?Buffer.alloc(0):(0,i.toType)(r,i.TypeOutput.Buffer);let u;return u=o instanceof n.Address?o.buf:(0,i.toType)(o,i.TypeOutput.Buffer),[a,c,u,(0,i.toType)(s,i.TypeOutput.BigInt)===BigInt(0)?Buffer.alloc(0):(0,i.toType)(s,i.TypeOutput.Buffer)]}raw(){return s.toBufferArray(this)}toValue(){return{index:this.index,validatorIndex:this.validatorIndex,address:this.address.buf,amount:this.amount}}toJSON(){return{index:(0,o.bigIntToHex)(this.index),validatorIndex:(0,o.bigIntToHex)(this.validatorIndex),address:"0x"+this.address.buf.toString("hex"),amount:(0,o.bigIntToHex)(this.amount)}}}t.Withdrawal=s},723:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createCurve=t.getHash=void 0;const n=r(9615),o=r(9175),i=r(4678);function s(e){return{hash:e,hmac:(t,...r)=>(0,n.hmac)(e,t,(0,o.concatBytes)(...r)),randomBytes:o.randomBytes}}t.getHash=s,t.createCurve=function(e,t){const r=t=>(0,i.weierstrass)({...e,...s(t)});return Object.freeze({...r(t),create:r})}},9141:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateBasic=t.wNAF=void 0;const n=r(5304),o=r(7939),i=BigInt(0),s=BigInt(1);t.wNAF=function(e,t){const r=(e,t)=>{const r=t.negate();return e?r:t},n=e=>({windows:Math.ceil(t/e)+1,windowSize:2**(e-1)});return{constTimeNegate:r,unsafeLadder(t,r){let n=e.ZERO,o=t;for(;r>i;)r&s&&(n=n.add(o)),o=o.double(),r>>=s;return n},precomputeWindow(e,t){const{windows:r,windowSize:o}=n(t),i=[];let s=e,a=s;for(let e=0;e>=p,n>c&&(n-=h,i+=s);const a=t,d=t+Math.abs(n)-1,g=e%2!=0,y=n<0;0===n?l=l.add(r(g,o[a])):u=u.add(r(y,o[d]))}return{p:u,f:l}},wNAFCached(e,t,r,n){const o=e._WINDOW_SIZE||1;let i=t.get(e);return i||(i=this.precomputeWindow(e,o),1!==o&&t.set(e,n(i))),this.wNAF(o,i,r)}}},t.validateBasic=function(e){return(0,n.validateField)(e.Fp),(0,o.validateObject)(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...(0,n.nLength)(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}},1298:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createHasher=t.isogenyMap=t.hash_to_field=t.expand_message_xof=t.expand_message_xmd=void 0;const n=r(5304),o=r(7939),i=o.bytesToNumberBE;function s(e,t){if(e<0||e>=1<<8*t)throw new Error(`bad I2OSP call: value=${e} length=${t}`);const r=Array.from({length:t}).fill(0);for(let n=t-1;n>=0;n--)r[n]=255&e,e>>>=8;return new Uint8Array(r)}function a(e,t){const r=new Uint8Array(e.length);for(let n=0;n255&&(t=n((0,o.concatBytes)((0,o.utf8ToBytes)("H2C-OVERSIZE-DST-"),t)));const{outputLen:i,blockLen:l}=n,f=Math.ceil(r/i);if(f>255)throw new Error("Invalid xmd length");const h=(0,o.concatBytes)(t,s(t.length,1)),p=s(0,l),d=s(r,2),g=new Array(f),y=n((0,o.concatBytes)(p,e,d,s(0,1),h));g[0]=n((0,o.concatBytes)(y,s(1,1),h));for(let e=1;e<=f;e++){const t=[a(y,g[e-1]),s(e+1,1),h];g[e]=n((0,o.concatBytes)(...t))}return(0,o.concatBytes)(...g).slice(0,r)}function f(e,t,r,n,i){if(c(e),c(t),u(r),t.length>255){const e=Math.ceil(2*n/8);t=i.create({dkLen:e}).update((0,o.utf8ToBytes)("H2C-OVERSIZE-DST-")).update(t).digest()}if(r>65535||t.length>255)throw new Error("expand_message_xof: invalid lenInBytes");return i.create({dkLen:r}).update(e).update(s(r,2)).update(t).update(s(t.length,1)).digest()}function h(e,t,r){(0,o.validateObject)(r,{DST:"stringOrUint8Array",p:"bigint",m:"isSafeInteger",k:"isSafeInteger",hash:"hash"});const{p:s,k:a,m:h,hash:p,expand:d,DST:g}=r;c(e),u(t);const y=function(e){if((0,o.isBytes)(e))return e;if("string"==typeof e)return(0,o.utf8ToBytes)(e);throw new Error("DST must be Uint8Array or string")}(g),m=s.toString(2).length,b=Math.ceil((m+a)/8),v=t*h*b;let w;if("xmd"===d)w=l(e,y,v,p);else if("xof"===d)w=f(e,y,v,a,p);else{if("_internal_pass"!==d)throw new Error('expand must be "xmd" or "xof"');w=e}const E=new Array(t);for(let e=0;eArray.from(e).reverse()));return(t,n)=>{const[o,i,s,a]=r.map((r=>r.reduce(((r,n)=>e.add(e.mul(r,t),n)))));return t=e.div(o,i),n=e.mul(n,e.div(s,a)),{x:t,y:n}}},t.createHasher=function(e,t,r){if("function"!=typeof t)throw new Error("mapToCurve() must be defined");return{hashToCurve(n,o){const i=h(n,2,{...r,DST:r.DST,...o}),s=e.fromAffine(t(i[0])),a=e.fromAffine(t(i[1])),c=s.add(a).clearCofactor();return c.assertValidity(),c},encodeToCurve(n,o){const i=h(n,1,{...r,DST:r.encodeDST,...o}),s=e.fromAffine(t(i[0])).clearCofactor();return s.assertValidity(),s}}}},5304:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mapHashToField=t.getMinHashLength=t.getFieldBytesLength=t.hashToPrivateScalar=t.FpSqrtEven=t.FpSqrtOdd=t.Field=t.nLength=t.FpIsSquare=t.FpDiv=t.FpInvertBatch=t.FpPow=t.validateField=t.isNegativeLE=t.FpSqrt=t.tonelliShanks=t.invert=t.pow2=t.pow=t.mod=void 0;const n=r(7939),o=BigInt(0),i=BigInt(1),s=BigInt(2),a=BigInt(3),c=BigInt(4),u=BigInt(5),l=BigInt(8);function f(e,t){const r=e%t;return r>=o?r:t+r}function h(e,t,r){if(r<=o||t 0");if(r===i)return o;let n=i;for(;t>o;)t&i&&(n=n*e%r),e=e*e%r,t>>=i;return n}function p(e,t){if(e===o||t<=o)throw new Error(`invert: expected positive integers, got n=${e} mod=${t}`);let r=f(e,t),n=t,s=o,a=i,c=i,u=o;for(;r!==o;){const e=n/r,t=n%r,o=s-c*e,i=a-u*e;n=r,r=t,s=c,a=u,c=o,u=i}if(n!==i)throw new Error("invert: does not exist");return f(s,t)}function d(e){const t=(e-i)/s;let r,n,a;for(r=e-i,n=0;r%s===o;r/=s,n++);for(a=s;ao;)n*=n,n%=r;return n},t.invert=p,t.tonelliShanks=d,t.FpSqrt=g,t.isNegativeLE=(e,t)=>(f(e,t)&i)===i;const y=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function m(e,t,r){if(r 0");if(r===o)return e.ONE;if(r===i)return t;let n=e.ONE,s=t;for(;r>o;)r&i&&(n=e.mul(n,s)),s=e.sqr(s),r>>=i;return n}function b(e,t){const r=new Array(t.length),n=t.reduce(((t,n,o)=>e.is0(n)?t:(r[o]=t,e.mul(t,n))),e.ONE),o=e.inv(n);return t.reduceRight(((t,n,o)=>e.is0(n)?t:(r[o]=e.mul(t,r[o]),e.mul(t,n))),o),r}function v(e,t){const r=void 0!==t?t:e.toString(2).length;return{nBitLength:r,nByteLength:Math.ceil(r/8)}}function w(e){if("bigint"!=typeof e)throw new Error("field order must be bigint");const t=e.toString(2).length;return Math.ceil(t/8)}function E(e){const t=w(e);return t+Math.ceil(t/2)}t.validateField=function(e){const t=y.reduce(((e,t)=>(e[t]="function",e)),{ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"});return(0,n.validateObject)(e,t)},t.FpPow=m,t.FpInvertBatch=b,t.FpDiv=function(e,t,r){return e.mul(t,"bigint"==typeof r?p(r,e.ORDER):e.inv(r))},t.FpIsSquare=function(e){const t=(e.ORDER-i)/s;return r=>{const n=e.pow(r,t);return e.eql(n,e.ZERO)||e.eql(n,e.ONE)}},t.nLength=v,t.Field=function(e,t,r=!1,s={}){if(e<=o)throw new Error(`Expected Field ORDER > 0, got ${e}`);const{nBitLength:a,nByteLength:c}=v(e,t);if(c>2048)throw new Error("Field lengths over 2048 bytes are not supported");const u=g(e),l=Object.freeze({ORDER:e,BITS:a,BYTES:c,MASK:(0,n.bitMask)(a),ZERO:o,ONE:i,create:t=>f(t,e),isValid:t=>{if("bigint"!=typeof t)throw new Error("Invalid field element: expected bigint, got "+typeof t);return o<=t&&te===o,isOdd:e=>(e&i)===i,neg:t=>f(-t,e),eql:(e,t)=>e===t,sqr:t=>f(t*t,e),add:(t,r)=>f(t+r,e),sub:(t,r)=>f(t-r,e),mul:(t,r)=>f(t*r,e),pow:(e,t)=>m(l,e,t),div:(t,r)=>f(t*p(r,e),e),sqrN:e=>e*e,addN:(e,t)=>e+t,subN:(e,t)=>e-t,mulN:(e,t)=>e*t,inv:t=>p(t,e),sqrt:s.sqrt||(e=>u(l,e)),invertBatch:e=>b(l,e),cmov:(e,t,r)=>r?t:e,toBytes:e=>r?(0,n.numberToBytesLE)(e,c):(0,n.numberToBytesBE)(e,c),fromBytes:e=>{if(e.length!==c)throw new Error(`Fp.fromBytes: expected ${c}, got ${e.length}`);return r?(0,n.bytesToNumberLE)(e):(0,n.bytesToNumberBE)(e)}});return Object.freeze(l)},t.FpSqrtOdd=function(e,t){if(!e.isOdd)throw new Error("Field doesn't have isOdd");const r=e.sqrt(t);return e.isOdd(r)?r:e.neg(r)},t.FpSqrtEven=function(e,t){if(!e.isOdd)throw new Error("Field doesn't have isOdd");const r=e.sqrt(t);return e.isOdd(r)?e.neg(r):r},t.hashToPrivateScalar=function(e,t,r=!1){const o=(e=(0,n.ensureBytes)("privateHash",e)).length,s=v(t).nByteLength+8;if(s<24||o1024)throw new Error(`hashToPrivateScalar: expected ${s}-1024 bytes of input, got ${o}`);return f(r?(0,n.bytesToNumberLE)(e):(0,n.bytesToNumberBE)(e),t-i)+i},t.getFieldBytesLength=w,t.getMinHashLength=E,t.mapHashToField=function(e,t,r=!1){const o=e.length,s=w(t),a=E(t);if(o<16||o1024)throw new Error(`expected ${a}-1024 bytes of input, got ${o}`);const c=f(r?(0,n.bytesToNumberBE)(e):(0,n.bytesToNumberLE)(e),t-i)+i;return r?(0,n.numberToBytesLE)(c,s):(0,n.numberToBytesBE)(c,s)}},7939:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateObject=t.createHmacDrbg=t.bitMask=t.bitSet=t.bitGet=t.bitLen=t.utf8ToBytes=t.equalBytes=t.concatBytes=t.ensureBytes=t.numberToVarBytesBE=t.numberToBytesLE=t.numberToBytesBE=t.bytesToNumberLE=t.bytesToNumberBE=t.hexToBytes=t.hexToNumber=t.numberToHexUnpadded=t.bytesToHex=t.isBytes=void 0;const r=BigInt(0),n=BigInt(1),o=BigInt(2);function i(e){return e instanceof Uint8Array||null!=e&&"object"==typeof e&&"Uint8Array"===e.constructor.name}t.isBytes=i;const s=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));function a(e){if(!i(e))throw new Error("Uint8Array expected");let t="";for(let r=0;r=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:void 0}function f(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);const t=e.length,r=t/2;if(t%2)throw new Error("padded hex string expected, got unpadded hex of length "+t);const n=new Uint8Array(r);for(let t=0,o=0;tr;e>>=n,t+=1);return t},t.bitGet=function(e,t){return e>>BigInt(t)&n},t.bitSet=(e,t,o)=>e|(o?n:r)<(o<new Uint8Array(e),g=e=>Uint8Array.from(e);t.createHmacDrbg=function(e,t,r){if("number"!=typeof e||e<2)throw new Error("hashLen must be a number");if("number"!=typeof t||t<2)throw new Error("qByteLen must be a number");if("function"!=typeof r)throw new Error("hmacFn must be a function");let n=d(e),o=d(e),i=0;const s=()=>{n.fill(1),o.fill(0),i=0},a=(...e)=>r(o,n,...e),c=(e=d())=>{o=a(g([0]),e),n=a(),0!==e.length&&(o=a(g([1]),e),n=a())},u=()=>{if(i++>=1e3)throw new Error("drbg: tried 1000 values");let e=0;const r=[];for(;e{let r;for(s(),c(e);!(r=t(u()));)c();return s(),r}};const y={bigint:e=>"bigint"==typeof e,function:e=>"function"==typeof e,boolean:e=>"boolean"==typeof e,string:e=>"string"==typeof e,stringOrUint8Array:e=>"string"==typeof e||i(e),isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>"function"==typeof e&&Number.isSafeInteger(e.outputLen)};t.validateObject=function(e,t,r={}){const n=(t,r,n)=>{const o=y[r];if("function"!=typeof o)throw new Error(`Invalid validator "${r}", expected function`);const i=e[t];if(!(n&&void 0===i||o(i,e)))throw new Error(`Invalid param ${String(t)}=${i} (${typeof i}), expected ${r}`)};for(const[e,r]of Object.entries(t))n(e,r,!1);for(const[e,t]of Object.entries(r))n(e,t,!0);return e}},4678:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mapToCurveSimpleSWU=t.SWUFpSqrtRatio=t.weierstrass=t.weierstrassPoints=t.DER=void 0;const n=r(5304),o=r(7939),i=r(7939),s=r(9141),{bytesToNumberBE:a,hexToBytes:c}=o;t.DER={Err:class extends Error{constructor(e=""){super(e)}},_parseInt(e){const{Err:r}=t.DER;if(e.length<2||2!==e[0])throw new r("Invalid signature integer tag");const n=e[1],o=e.subarray(2,n+2);if(!n||o.length!==n)throw new r("Invalid signature integer: wrong length");if(128&o[0])throw new r("Invalid signature integer: negative");if(0===o[0]&&!(128&o[1]))throw new r("Invalid signature integer: unnecessary leading zero");return{d:a(o),l:e.subarray(n+2)}},toSig(e){const{Err:r}=t.DER,n="string"==typeof e?c(e):e;if(!o.isBytes(n))throw new Error("ui8a expected");let i=n.length;if(i<2||48!=n[0])throw new r("Invalid signature tag");if(n[1]!==i-2)throw new r("Invalid signature: incorrect length");const{d:s,l:a}=t.DER._parseInt(n.subarray(2)),{d:u,l}=t.DER._parseInt(a);if(l.length)throw new r("Invalid signature: left bytes after parsing");return{r:s,s:u}},hexFromSig(e){const t=e=>8&Number.parseInt(e[0],16)?"00"+e:e,r=e=>{const t=e.toString(16);return 1&t.length?`0${t}`:t},n=t(r(e.s)),o=t(r(e.r)),i=n.length/2,s=o.length/2,a=r(i),c=r(s);return`30${r(s+i+4)}02${c}${o}02${a}${n}`}};const u=BigInt(0),l=BigInt(1),f=BigInt(2),h=BigInt(3),p=BigInt(4);function d(e){const t=function(e){const t=(0,s.validateBasic)(e);o.validateObject(t,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:r,Fp:n,a:i}=t;if(r){if(!n.eql(i,n.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if("object"!=typeof r||"bigint"!=typeof r.beta||"function"!=typeof r.splitScalar)throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...t})}(e),{Fp:r}=t,a=t.toBytes||((e,t,n)=>{const i=t.toAffine();return o.concatBytes(Uint8Array.from([4]),r.toBytes(i.x),r.toBytes(i.y))}),c=t.fromBytes||(e=>{const t=e.subarray(1);return{x:r.fromBytes(t.subarray(0,r.BYTES)),y:r.fromBytes(t.subarray(r.BYTES,2*r.BYTES))}});function f(e){const{a:n,b:o}=t,i=r.sqr(e),s=r.mul(i,e);return r.add(r.add(s,r.mul(e,n)),o)}if(!r.eql(r.sqr(t.Gy),f(t.Gx)))throw new Error("bad generator point: equation left != right");function p(e){return"bigint"==typeof e&&ur.eql(e,r.ZERO);return o(t)&&o(n)?b.ZERO:new b(t,n,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(e){const t=r.invertBatch(e.map((e=>e.pz)));return e.map(((e,r)=>e.toAffine(t[r]))).map(b.fromAffine)}static fromHex(e){const t=b.fromAffine(c((0,i.ensureBytes)("pointHex",e)));return t.assertValidity(),t}static fromPrivateKey(e){return b.BASE.multiply(g(e))}_setWindowSize(e){this._WINDOW_SIZE=e,y.delete(this)}assertValidity(){if(this.is0()){if(t.allowInfinityPoint&&!r.is0(this.py))return;throw new Error("bad point: ZERO")}const{x:e,y:n}=this.toAffine();if(!r.isValid(e)||!r.isValid(n))throw new Error("bad point: x or y not FE");const o=r.sqr(n),i=f(e);if(!r.eql(o,i))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y:e}=this.toAffine();if(r.isOdd)return!r.isOdd(e);throw new Error("Field doesn't support isOdd")}equals(e){m(e);const{px:t,py:n,pz:o}=this,{px:i,py:s,pz:a}=e,c=r.eql(r.mul(t,a),r.mul(i,o)),u=r.eql(r.mul(n,a),r.mul(s,o));return c&&u}negate(){return new b(this.px,r.neg(this.py),this.pz)}double(){const{a:e,b:n}=t,o=r.mul(n,h),{px:i,py:s,pz:a}=this;let c=r.ZERO,u=r.ZERO,l=r.ZERO,f=r.mul(i,i),p=r.mul(s,s),d=r.mul(a,a),g=r.mul(i,s);return g=r.add(g,g),l=r.mul(i,a),l=r.add(l,l),c=r.mul(e,l),u=r.mul(o,d),u=r.add(c,u),c=r.sub(p,u),u=r.add(p,u),u=r.mul(c,u),c=r.mul(g,c),l=r.mul(o,l),d=r.mul(e,d),g=r.sub(f,d),g=r.mul(e,g),g=r.add(g,l),l=r.add(f,f),f=r.add(l,f),f=r.add(f,d),f=r.mul(f,g),u=r.add(u,f),d=r.mul(s,a),d=r.add(d,d),f=r.mul(d,g),c=r.sub(c,f),l=r.mul(d,p),l=r.add(l,l),l=r.add(l,l),new b(c,u,l)}add(e){m(e);const{px:n,py:o,pz:i}=this,{px:s,py:a,pz:c}=e;let u=r.ZERO,l=r.ZERO,f=r.ZERO;const p=t.a,d=r.mul(t.b,h);let g=r.mul(n,s),y=r.mul(o,a),v=r.mul(i,c),w=r.add(n,o),E=r.add(s,a);w=r.mul(w,E),E=r.add(g,y),w=r.sub(w,E),E=r.add(n,i);let x=r.add(s,c);return E=r.mul(E,x),x=r.add(g,v),E=r.sub(E,x),x=r.add(o,i),u=r.add(a,c),x=r.mul(x,u),u=r.add(y,v),x=r.sub(x,u),f=r.mul(p,E),u=r.mul(d,v),f=r.add(u,f),u=r.sub(y,f),f=r.add(y,f),l=r.mul(u,f),y=r.add(g,g),y=r.add(y,g),v=r.mul(p,v),E=r.mul(d,E),y=r.add(y,v),v=r.sub(g,v),v=r.mul(p,v),E=r.add(E,v),g=r.mul(y,E),l=r.add(l,g),g=r.mul(x,E),u=r.mul(w,u),u=r.sub(u,g),g=r.mul(w,y),f=r.mul(x,f),f=r.add(f,g),new b(u,l,f)}subtract(e){return this.add(e.negate())}is0(){return this.equals(b.ZERO)}wNAF(e){return w.wNAFCached(this,y,e,(e=>{const t=r.invertBatch(e.map((e=>e.pz)));return e.map(((e,r)=>e.toAffine(t[r]))).map(b.fromAffine)}))}multiplyUnsafe(e){const n=b.ZERO;if(e===u)return n;if(d(e),e===l)return this;const{endo:o}=t;if(!o)return w.unsafeLadder(this,e);let{k1neg:i,k1:s,k2neg:a,k2:c}=o.splitScalar(e),f=n,h=n,p=this;for(;s>u||c>u;)s&l&&(f=f.add(p)),c&l&&(h=h.add(p)),p=p.double(),s>>=l,c>>=l;return i&&(f=f.negate()),a&&(h=h.negate()),h=new b(r.mul(h.px,o.beta),h.py,h.pz),f.add(h)}multiply(e){d(e);let n,o,i=e;const{endo:s}=t;if(s){const{k1neg:e,k1:t,k2neg:a,k2:c}=s.splitScalar(i);let{p:u,f:l}=this.wNAF(t),{p:f,f:h}=this.wNAF(c);u=w.constTimeNegate(e,u),f=w.constTimeNegate(a,f),f=new b(r.mul(f.px,s.beta),f.py,f.pz),n=u.add(f),o=l.add(h)}else{const{p:e,f:t}=this.wNAF(i);n=e,o=t}return b.normalizeZ([n,o])[0]}multiplyAndAddUnsafe(e,t,r){const n=b.BASE,o=(e,t)=>t!==u&&t!==l&&e.equals(n)?e.multiply(t):e.multiplyUnsafe(t),i=o(this,t).add(o(e,r));return i.is0()?void 0:i}toAffine(e){const{px:t,py:n,pz:o}=this,i=this.is0();null==e&&(e=i?r.ONE:r.inv(o));const s=r.mul(t,e),a=r.mul(n,e),c=r.mul(o,e);if(i)return{x:r.ZERO,y:r.ZERO};if(!r.eql(c,r.ONE))throw new Error("invZ was invalid");return{x:s,y:a}}isTorsionFree(){const{h:e,isTorsionFree:r}=t;if(e===l)return!0;if(r)return r(b,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:e,clearCofactor:r}=t;return e===l?this:r?r(b,this):this.multiplyUnsafe(t.h)}toRawBytes(e=!0){return this.assertValidity(),a(b,this,e)}toHex(e=!0){return o.bytesToHex(this.toRawBytes(e))}}b.BASE=new b(t.Gx,t.Gy,r.ONE),b.ZERO=new b(r.ZERO,r.ONE,r.ZERO);const v=t.nBitLength,w=(0,s.wNAF)(b,t.endo?Math.ceil(v/2):v);return{CURVE:t,ProjectivePoint:b,normPrivateKeyToScalar:g,weierstrassEquation:f,isWithinCurveOrder:p}}function g(e,t){const r=e.ORDER;let n=u;for(let e=r-l;e%f===u;e/=f)n+=l;const o=n,i=f<{let n=y,i=e.pow(r,d),s=e.sqr(i);s=e.mul(s,r);let a=e.mul(t,s);a=e.pow(a,c),a=e.mul(a,i),i=e.mul(a,r),s=e.mul(a,t);let u=e.mul(s,i);a=e.pow(u,g);let h=e.eql(a,e.ONE);i=e.mul(s,m),a=e.mul(u,n),s=e.cmov(i,s,h),u=e.cmov(a,u,h);for(let t=o;t>l;t--){let r=t-f;r=f<{let i=e.sqr(o);const s=e.mul(t,o);i=e.mul(i,s);let a=e.pow(i,r);a=e.mul(a,s);const c=e.mul(a,n),u=e.mul(e.sqr(a),o),l=e.eql(u,t);return{isValid:l,value:e.cmov(c,a,l)}}}return b}t.weierstrassPoints=d,t.weierstrass=function(e){const r=function(e){const t=(0,s.validateBasic)(e);return o.validateObject(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}(e),{Fp:a,n:c}=r,f=a.BYTES+1,h=2*a.BYTES+1;function p(e){return n.mod(e,c)}function g(e){return n.invert(e,c)}const{ProjectivePoint:y,normPrivateKeyToScalar:m,weierstrassEquation:b,isWithinCurveOrder:v}=d({...r,toBytes(e,t,r){const n=t.toAffine(),i=a.toBytes(n.x),s=o.concatBytes;return r?s(Uint8Array.from([t.hasEvenY()?2:3]),i):s(Uint8Array.from([4]),i,a.toBytes(n.y))},fromBytes(e){const t=e.length,r=e[0],n=e.subarray(1);if(t!==f||2!==r&&3!==r){if(t===h&&4===r)return{x:a.fromBytes(n.subarray(0,a.BYTES)),y:a.fromBytes(n.subarray(a.BYTES,2*a.BYTES))};throw new Error(`Point of length ${t} was invalid. Expected ${f} compressed bytes or ${h} uncompressed bytes`)}{const e=o.bytesToNumberBE(n);if(!(u<(i=e)&&io.bytesToHex(o.numberToBytesBE(e,r.nByteLength));function E(e){return e>c>>l}const x=(e,t,r)=>o.bytesToNumberBE(e.slice(t,r));class S{constructor(e,t,r){this.r=e,this.s=t,this.recovery=r,this.assertValidity()}static fromCompact(e){const t=r.nByteLength;return e=(0,i.ensureBytes)("compactSignature",e,2*t),new S(x(e,0,t),x(e,t,2*t))}static fromDER(e){const{r,s:n}=t.DER.toSig((0,i.ensureBytes)("DER",e));return new S(r,n)}assertValidity(){if(!v(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!v(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(e){return new S(this.r,this.s,e)}recoverPublicKey(e){const{r:t,s:n,recovery:o}=this,s=T((0,i.ensureBytes)("msgHash",e));if(null==o||![0,1,2,3].includes(o))throw new Error("recovery id invalid");const c=2===o||3===o?t+r.n:t;if(c>=a.ORDER)throw new Error("recovery id 2 or 3 invalid");const u=0==(1&o)?"02":"03",l=y.fromHex(u+w(c)),f=g(c),h=p(-s*f),d=p(n*f),m=y.BASE.multiplyAndAddUnsafe(l,h,d);if(!m)throw new Error("point at infinify");return m.assertValidity(),m}hasHighS(){return E(this.s)}normalizeS(){return this.hasHighS()?new S(this.r,p(-this.s),this.recovery):this}toDERRawBytes(){return o.hexToBytes(this.toDERHex())}toDERHex(){return t.DER.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return o.hexToBytes(this.toCompactHex())}toCompactHex(){return w(this.r)+w(this.s)}}const A={isValidPrivateKey(e){try{return m(e),!0}catch(e){return!1}},normPrivateKeyToScalar:m,randomPrivateKey:()=>{const e=n.getMinHashLength(r.n);return n.mapHashToField(r.randomBytes(e),r.n)},precompute:(e=8,t=y.BASE)=>(t._setWindowSize(e),t.multiply(BigInt(3)),t)};function I(e){const t=o.isBytes(e),r="string"==typeof e,n=(t||r)&&e.length;return t?n===f||n===h:r?n===2*f||n===2*h:e instanceof y}const B=r.bits2int||function(e){const t=o.bytesToNumberBE(e),n=8*e.length-r.nBitLength;return n>0?t>>BigInt(n):t},T=r.bits2int_modN||function(e){return p(B(e))},P=o.bitMask(r.nBitLength);function C(e){if("bigint"!=typeof e)throw new Error("bigint expected");if(!(u<=e&&ee in n)))throw new Error("sign() legacy options not supported");const{hash:s,randomBytes:c}=r;let{lowS:f,prehash:h,extraEntropy:d}=n;null==f&&(f=!0),e=(0,i.ensureBytes)("msgHash",e),h&&(e=(0,i.ensureBytes)("prehashed msgHash",s(e)));const b=T(e),w=m(t),x=[C(w),C(b)];if(null!=d){const e=!0===d?c(a.BYTES):d;x.push((0,i.ensureBytes)("extraEntropy",e))}const A=o.concatBytes(...x),I=b;return{seed:A,k2sig:function(e){const t=B(e);if(!v(t))return;const r=g(t),n=y.BASE.multiply(t).toAffine(),o=p(n.x);if(o===u)return;const i=p(r*p(I+o*w));if(i===u)return;let s=(n.x===o?0:2)|Number(n.y&l),a=i;return f&&E(i)&&(a=function(e){return E(e)?p(-e):e}(i),s^=1),new S(o,a,s)}}}(e,t,n),f=r;return o.createHmacDrbg(f.hash.outputLen,f.nByteLength,f.hmac)(s,c)},verify:function(e,n,s,a=R){const c=e;if(n=(0,i.ensureBytes)("msgHash",n),s=(0,i.ensureBytes)("publicKey",s),"strict"in a)throw new Error("options.strict was renamed to lowS");const{lowS:u,prehash:l}=a;let f,h;try{if("string"==typeof c||o.isBytes(c))try{f=S.fromDER(c)}catch(e){if(!(e instanceof t.DER.Err))throw e;f=S.fromCompact(c)}else{if("object"!=typeof c||"bigint"!=typeof c.r||"bigint"!=typeof c.s)throw new Error("PARSE");{const{r:e,s:t}=c;f=new S(e,t)}}h=y.fromHex(s)}catch(e){if("PARSE"===e.message)throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(u&&f.hasHighS())return!1;l&&(n=r.hash(n));const{r:d,s:m}=f,b=T(n),v=g(m),w=p(b*v),E=p(d*v),x=y.BASE.multiplyAndAddUnsafe(h,w,E)?.toAffine();return!!x&&p(x.x)===d},ProjectivePoint:y,Signature:S,utils:A}},t.SWUFpSqrtRatio=g,t.mapToCurveSimpleSWU=function(e,t){if(n.validateField(e),!e.isValid(t.A)||!e.isValid(t.B)||!e.isValid(t.Z))throw new Error("mapToCurveSimpleSWU: invalid opts");const r=g(e,t.Z);if(!e.isOdd)throw new Error("Fp.isOdd is not implemented!");return n=>{let o,i,s,a,c,u,l,f;o=e.sqr(n),o=e.mul(o,t.Z),i=e.sqr(o),i=e.add(i,o),s=e.add(i,e.ONE),s=e.mul(s,t.B),a=e.cmov(t.Z,e.neg(i),!e.eql(i,e.ZERO)),a=e.mul(a,t.A),i=e.sqr(s),u=e.sqr(a),c=e.mul(u,t.A),i=e.add(i,c),i=e.mul(i,s),u=e.mul(u,a),c=e.mul(u,t.B),i=e.add(i,c),l=e.mul(o,s);const{isValid:h,value:p}=r(i,u);f=e.mul(o,n),f=e.mul(f,p),l=e.cmov(l,s,h),f=e.cmov(f,p,h);const d=e.isOdd(n)===e.isOdd(f);return f=e.cmov(e.neg(f),f,d),l=e.div(l,a),{x:l,y:f}}}},7399:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodeToCurve=t.hashToCurve=t.schnorr=t.secp256k1=void 0;const n=r(2623),o=r(9175),i=r(5304),s=r(4678),a=r(7939),c=r(1298),u=r(723),l=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),f=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),h=BigInt(1),p=BigInt(2),d=(e,t)=>(e+t/p)/t;function g(e){const t=l,r=BigInt(3),n=BigInt(6),o=BigInt(11),s=BigInt(22),a=BigInt(23),c=BigInt(44),u=BigInt(88),f=e*e*e%t,h=f*f*e%t,d=(0,i.pow2)(h,r,t)*h%t,g=(0,i.pow2)(d,r,t)*h%t,m=(0,i.pow2)(g,p,t)*f%t,b=(0,i.pow2)(m,o,t)*m%t,v=(0,i.pow2)(b,s,t)*b%t,w=(0,i.pow2)(v,c,t)*v%t,E=(0,i.pow2)(w,u,t)*w%t,x=(0,i.pow2)(E,c,t)*v%t,S=(0,i.pow2)(x,r,t)*h%t,A=(0,i.pow2)(S,a,t)*b%t,I=(0,i.pow2)(A,n,t)*f%t,B=(0,i.pow2)(I,p,t);if(!y.eql(y.sqr(B),e))throw new Error("Cannot find square root");return B}const y=(0,i.Field)(l,void 0,void 0,{sqrt:g});t.secp256k1=(0,u.createCurve)({a:BigInt(0),b:BigInt(7),Fp:y,n:f,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{const t=f,r=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),n=-h*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),o=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),s=r,a=BigInt("0x100000000000000000000000000000000"),c=d(s*e,t),u=d(-n*e,t);let l=(0,i.mod)(e-c*r-u*o,t),p=(0,i.mod)(-c*n-u*s,t);const g=l>a,y=p>a;if(g&&(l=t-l),y&&(p=t-p),l>a||p>a)throw new Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:g,k1:l,k2neg:y,k2:p}}}},n.sha256);const m=BigInt(0),b=e=>"bigint"==typeof e&&me.charCodeAt(0))));r=(0,a.concatBytes)(t,t),v[e]=r}return(0,n.sha256)((0,a.concatBytes)(r,...t))}const E=e=>e.toRawBytes(!0).slice(1),x=e=>(0,a.numberToBytesBE)(e,32),S=e=>(0,i.mod)(e,l),A=e=>(0,i.mod)(e,f),I=t.secp256k1.ProjectivePoint;function B(e){let r=t.secp256k1.utils.normPrivateKeyToScalar(e),n=I.fromPrivateKey(r);return{scalar:n.hasEvenY()?r:A(-r),bytes:E(n)}}function T(e){if(!b(e))throw new Error("bad x: need 0 < x < p");const t=S(e*e);let r=g(S(t*e+BigInt(7)));r%p!==m&&(r=S(-r));const n=new I(e,r,h);return n.assertValidity(),n}function P(...e){return A((0,a.bytesToNumberBE)(w("BIP0340/challenge",...e)))}function C(e,t,r){const n=(0,a.ensureBytes)("signature",e,64),o=(0,a.ensureBytes)("message",t),i=(0,a.ensureBytes)("publicKey",r,32);try{const e=T((0,a.bytesToNumberBE)(i)),t=(0,a.bytesToNumberBE)(n.subarray(0,32));if(!b(t))return!1;const r=(0,a.bytesToNumberBE)(n.subarray(32,64));if(!("bigint"==typeof(l=r)&&m(0,c.isogenyMap)(y,[["0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7","0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581","0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262","0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c"],["0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b","0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14","0x0000000000000000000000000000000000000000000000000000000000000001"],["0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c","0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3","0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931","0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84"],["0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b","0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573","0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f","0x0000000000000000000000000000000000000000000000000000000000000001"]].map((e=>e.map((e=>BigInt(e)))))))(),R=(()=>(0,s.mapToCurveSimpleSWU)(y,{A:BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),B:BigInt("1771"),Z:y.create(BigInt("-11"))}))(),O=(()=>(0,c.createHasher)(t.secp256k1.ProjectivePoint,(e=>{const{x:t,y:r}=R(y.create(e[0]));return _(t,r)}),{DST:"secp256k1_XMD:SHA-256_SSWU_RO_",encodeDST:"secp256k1_XMD:SHA-256_SSWU_NU_",p:y.ORDER,m:1,k:128,expand:"xmd",hash:n.sha256}))();t.hashToCurve=O.hashToCurve,t.encodeToCurve=O.encodeToCurve},9956:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.keccak512=t.keccak384=t.keccak256=t.keccak224=void 0;const n=r(2955),o=r(7513);t.keccak224=(0,o.wrapHash)(n.keccak_224),t.keccak256=(()=>{const e=(0,o.wrapHash)(n.keccak_256);return e.create=n.keccak_256.create,e})(),t.keccak384=(0,o.wrapHash)(n.keccak_384),t.keccak512=(0,o.wrapHash)(n.keccak_512)},3852:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.secp256k1=void 0;var n=r(7399);Object.defineProperty(t,"secp256k1",{enumerable:!0,get:function(){return n.secp256k1}})},7513:function(e,t,r){"use strict";e=r.nmd(e);var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.crypto=t.wrapHash=t.equalsBytes=t.hexToBytes=t.bytesToUtf8=t.utf8ToBytes=t.createView=t.concatBytes=t.toHex=t.bytesToHex=t.assertBytes=t.assertBool=void 0;const o=n(r(7557)),i=r(9175),s=o.default.bool;t.assertBool=s;const a=o.default.bytes;t.assertBytes=a;var c=r(9175);Object.defineProperty(t,"bytesToHex",{enumerable:!0,get:function(){return c.bytesToHex}}),Object.defineProperty(t,"toHex",{enumerable:!0,get:function(){return c.bytesToHex}}),Object.defineProperty(t,"concatBytes",{enumerable:!0,get:function(){return c.concatBytes}}),Object.defineProperty(t,"createView",{enumerable:!0,get:function(){return c.createView}}),Object.defineProperty(t,"utf8ToBytes",{enumerable:!0,get:function(){return c.utf8ToBytes}}),t.bytesToUtf8=function(e){if(!(e instanceof Uint8Array))throw new TypeError("bytesToUtf8 expected Uint8Array, got "+typeof e);return(new TextDecoder).decode(e)},t.hexToBytes=function(e){const t=e.startsWith("0x")?e.substring(2):e;return(0,i.hexToBytes)(t)},t.equalsBytes=function(e,t){if(e.length!==t.length)return!1;for(let r=0;r(o.default.bytes(t),e(t))},t.crypto=(()=>{const t="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0,r="function"==typeof e.require&&e.require.bind(e);return{node:r&&!t?r("crypto"):void 0,web:t}})()},6498:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeSingle=t.decode=t.encodePacked=t.encodeSingle=t.encode=void 0;const n=r(2049),o=r(5961),i=r(7700);t.encode=(e,t,r,n)=>{try{return(0,i.pack)({types:e,values:t,packed:r,tight:n})}catch(e){if(e instanceof o.ParserError)throw new o.ParserError(`Unable to encode value: ${e.message}`,e);throw new o.ParserError(`An unexpected error occurred: ${(0,o.getErrorMessage)(e)}`,e)}},t.encodeSingle=(e,r)=>(0,t.encode)([e],[r]),t.encodePacked=(e,r,n)=>(0,t.encode)(e,r,!0,n),t.decode=(e,t)=>{const r=(0,n.createBytes)(t);try{return(0,i.unpack)(e,r)}catch(e){if(e instanceof o.ParserError)throw new o.ParserError(`Unable to decode value: ${e.message}`,e);throw new o.ParserError(`An unexpected error occurred: ${(0,o.getErrorMessage)(e)}`,e)}},t.decodeSingle=(e,r)=>{const i=(0,t.decode)([e],r);return(0,n.assert)(1===i.length,new o.ParserError("Decoded value array has unexpected length.")),i[0]}},5961:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParserError=t.getErrorStack=t.getErrorMessage=void 0;const n=r(2049);t.getErrorMessage=e=>"string"==typeof e?e:e instanceof Error||(0,n.isObject)(e)&&(0,n.hasProperty)(e,"message")&&"string"==typeof e.message?e.message:"Unknown error.",t.getErrorStack=e=>{if(e instanceof Error)return e.stack};class o extends Error{constructor(e,r){super(e),this.name="ParserError";const n=(0,t.getErrorStack)(r);n&&(this.stack=n)}}t.ParserError=o},3256:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(6498),t),o(r(5961),t),o(r(1126),t)},7924:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.iterate=void 0;const n=r(2049);t.iterate=function*(e,t=32){for(let r=0;r{(0,n.assert)(e>=0,"Cannot skip a negative number of bytes."),(0,n.assert)(e%t==0,"Length must be a multiple of the size."),r+=e},i=e.subarray(r);yield{skip:o,value:i}}return{skip:()=>{},value:new Uint8Array}}},7700:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.unpack=t.pack=t.isDynamicParser=t.getParser=void 0;const n=r(2049),o=r(5961),i=r(7924),s=r(6207),a=r(8746);t.getParser=e=>{const t={address:s.address,array:s.array,bool:s.bool,bytes:s.bytes,fixedBytes:s.fixedBytes,function:s.fn,number:s.number,string:s.string,tuple:s.tuple},r=t[e];if(r)return r;const n=Object.values(t).find((t=>t.isType(e)));if(n)return n;throw new o.ParserError(`The type "${e}" is not supported.`)},t.isDynamicParser=(e,t)=>{const{isDynamic:r}=e;return"function"==typeof r?r(t):r},t.pack=({types:e,values:r,packed:i=!1,tight:s=!1,arrayPacked:c=!1,byteArray:u=new Uint8Array})=>{(0,n.assert)(e.length===r.length,new o.ParserError(`The number of types (${e.length}) does not match the number of values (${r.length}).`));const{staticBuffer:l,dynamicBuffer:f,pointers:h}=e.reduce((({staticBuffer:e,dynamicBuffer:o,pointers:a},u,l)=>{const f=(0,t.getParser)(u),h=r[l];return i||c||!(0,t.isDynamicParser)(f,u)?{staticBuffer:f.encode({buffer:e,value:h,type:u,packed:i,tight:s}),dynamicBuffer:o,pointers:a}:{staticBuffer:(0,n.concatBytes)([e,new Uint8Array(32)]),dynamicBuffer:f.encode({buffer:o,value:h,type:u,packed:i,tight:s}),pointers:[...a,{position:e.length,pointer:o.length}]}}),{staticBuffer:new Uint8Array,dynamicBuffer:new Uint8Array,pointers:[]});(0,n.assert)(!i&&!c||0===f.length,new o.ParserError("Invalid pack state."));const p=l.length,d=h.reduce(((e,{pointer:t,position:r})=>{const o=(0,a.padStart)((0,n.numberToBytes)(p+t));return(0,a.set)(e,o,r)}),l);return(0,n.concatBytes)([u,d,f])},t.unpack=(e,r)=>{const s=(0,i.iterate)(r);return e.map((e=>{const{value:{value:i,skip:a},done:c}=s.next();(0,n.assert)(!c,new o.ParserError(`The encoded value is invalid for the provided types. Reached end of buffer while attempting to parse "${e}".`));const u=(0,t.getParser)(e);if((0,t.isDynamicParser)(u,e)){const t=(0,n.bytesToNumber)(i.subarray(0,32)),o=r.subarray(t);return u.decode({type:e,value:o,skip:a})}return u.decode({type:e,value:i,skip:a})}))}},1563:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.address=t.getAddress=void 0;const n=r(2049),o=r(5961),i=r(8746);t.getAddress=e=>{const t=(0,n.createBytes)(e);return(0,n.assert)(t.length<=20,new o.ParserError(`Invalid address value. Expected address to be 20 bytes long, but received ${t.length} bytes.`)),(0,i.padStart)(t,20)},t.address={isDynamic:!1,isType:e=>"address"===e,getByteLength:()=>32,encode({buffer:e,value:r,packed:o}){const s=(0,t.getAddress)(r);if(o)return(0,n.concatBytes)([e,s]);const a=(0,i.padStart)(s);return(0,n.concatBytes)([e,a])},decode:({value:e})=>(0,n.add0x)((0,n.bytesToHex)(e.slice(12,32)))}},186:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.array=t.getTupleType=t.getArrayType=t.isArrayType=void 0;const n=r(2049),o=r(5961),i=r(7700),s=r(8746),a=r(3415),c=r(717),u=/^(?.*)\[(?\d*?)\]$/u;t.isArrayType=e=>u.test(e),t.getArrayType=e=>{const t=e.match(u);return(0,n.assert)(t?.groups?.type,new o.ParserError(`Invalid array type. Expected an array type, but received "${e}".`)),[t.groups.type,t.groups.length?parseInt(t.groups.length,10):void 0]},t.getTupleType=(e,t)=>`(${new Array(t).fill(e).join(",")})`,t.array={isDynamic(e){const[r,n]=(0,t.getArrayType)(e);return void 0===n||(0,i.isDynamicParser)((0,i.getParser)(r),r)},isType:e=>(0,t.isArrayType)(e),getByteLength(e){(0,n.assert)((0,t.isArrayType)(e),new o.ParserError(`Expected an array type, but received "${e}".`));const[r,s]=(0,t.getArrayType)(e);return(0,i.isDynamicParser)(this,e)||void 0===s?32:c.tuple.getByteLength((0,t.getTupleType)(r,s))},encode({type:e,buffer:r,value:u,packed:l,tight:f}){const[h,p]=(0,t.getArrayType)(e);if((0,n.assert)(!l||!(0,t.isArrayType)(h),new o.ParserError("Cannot pack nested arrays.")),l&&(0,i.isDynamicParser)((0,i.getParser)(h),h))return(0,i.pack)({types:new Array(u.length).fill(h),values:u,byteArray:r,packed:l,arrayPacked:!0,tight:f});if(p)return(0,n.assert)(p===u.length,new o.ParserError(`Array length does not match type length. Expected a length of ${p}, but received ${u.length}.`)),c.tuple.encode({type:(0,t.getTupleType)(h,p),buffer:r,value:u,packed:a.fixedBytes.isType(h)&&f,tight:f});if(l)return(0,i.pack)({types:new Array(u.length).fill(h),values:u,byteArray:r,packed:a.fixedBytes.isType(h)&&f,arrayPacked:!0,tight:f});const d=(0,s.padStart)((0,n.numberToBytes)(u.length));return(0,i.pack)({types:new Array(u.length).fill(h),values:u,byteArray:(0,n.concatBytes)([r,d]),packed:l,tight:f})},decode({type:e,value:r,...s}){const[a,u]=(0,t.getArrayType)(e);if(u){const e=c.tuple.decode({type:(0,t.getTupleType)(a,u),value:r,...s});return(0,n.assert)(e.length===u,new o.ParserError(`Array length does not match type length. Expected a length of ${u}, but received ${e.length}.`)),e}const l=(0,n.bytesToNumber)(r.subarray(0,32));return(0,i.unpack)(new Array(l).fill(a),r.subarray(32))}}},7435:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bool=t.getBooleanValue=void 0;const n=r(2049),o=r(2150),i=r(5961),s=r(6150),a=(0,o.coerce)((0,o.boolean)(),(0,o.union)([(0,o.literal)("true"),(0,o.literal)("false")]),(e=>"true"===e));t.getBooleanValue=e=>{try{return(0,o.create)(e,a)?BigInt(1):BigInt(0)}catch{throw new i.ParserError(`Invalid boolean value. Expected a boolean literal, or the string "true" or "false", but received "${e}".`)}},t.bool={isDynamic:!1,isType:e=>"bool"===e,getByteLength:()=>32,encode({buffer:e,value:r,packed:o,tight:i}){const a=(0,t.getBooleanValue)(r);return o?(0,n.concatBytes)([e,(0,n.bigIntToBytes)(a)]):s.number.encode({type:"uint256",buffer:e,value:a,packed:o,tight:i})},decode:e=>s.number.decode({...e,type:"uint256"})===BigInt(1)}},9356:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bytes=void 0;const n=r(2049),o=r(8746);t.bytes={isDynamic:!0,isType:e=>"bytes"===e,getByteLength:()=>32,encode({buffer:e,value:t,packed:r}){const i=(0,n.createBytes)(t);if(r)return(0,n.concatBytes)([e,i]);const s=32*Math.ceil(i.byteLength/32);return(0,n.concatBytes)([e,(0,o.padStart)((0,n.numberToBytes)(i.byteLength)),(0,o.padEnd)(i,s)])},decode({value:e}){const t=e.subarray(0,32),r=(0,n.bytesToNumber)(t);return e.slice(32,32+r)}}},3415:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fixedBytes=t.getByteLength=void 0;const n=r(2049),o=r(5961),i=r(8746),s=/^bytes([0-9]{1,2})$/u;t.getByteLength=e=>{const t=e.match(s)?.[1];(0,n.assert)(t,`Invalid byte length. Expected a number between 1 and 32, but received "${e}".`);const r=Number(t);return(0,n.assert)(r>0&&r<=32,new o.ParserError(`Invalid byte length. Expected a number between 1 and 32, but received "${e}".`)),r},t.fixedBytes={isDynamic:!1,isType:e=>s.test(e),getByteLength:()=>32,encode({type:e,buffer:r,value:s,packed:a}){const c=(0,t.getByteLength)(e),u=(0,n.createBytes)(s);return(0,n.assert)(u.length<=c,new o.ParserError(`Expected a value of length ${c}, but received a value of length ${u.length}.`)),a?(0,n.concatBytes)([r,(0,i.padEnd)(u,c)]):(0,n.concatBytes)([r,(0,i.padEnd)(u)])},decode({type:e,value:r}){const n=(0,t.getByteLength)(e);return r.slice(0,n)}}},7827:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fn=t.getFunction=void 0;const n=r(2049),o=r(2150),i=r(5961),s=r(3415),a=(0,o.coerce)((0,o.object)({address:n.StrictHexStruct,selector:n.StrictHexStruct}),(0,o.union)([n.StrictHexStruct,(0,o.instance)(Uint8Array)]),(e=>{const t=(0,n.createBytes)(e);return(0,n.assert)(24===t.length,new i.ParserError(`Invalid Solidity function. Expected function to be 24 bytes long, but received ${t.length} bytes.`)),{address:(0,n.bytesToHex)(t.subarray(0,20)),selector:(0,n.bytesToHex)(t.subarray(20,24))}}));t.getFunction=e=>{const t=(0,o.create)(e,a);return(0,n.concatBytes)([(0,n.hexToBytes)(t.address),(0,n.hexToBytes)(t.selector)])},t.fn={isDynamic:!1,isType:e=>"function"===e,getByteLength:()=>32,encode({buffer:e,value:r,packed:n,tight:o}){const i=(0,t.getFunction)(r);return s.fixedBytes.encode({type:"bytes24",buffer:e,value:i,packed:n,tight:o})},decode:({value:e})=>({address:(0,n.bytesToHex)(e.slice(0,20)),selector:(0,n.bytesToHex)(e.slice(20,24))})}},6207:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(1563),t),o(r(186),t),o(r(7435),t),o(r(9356),t),o(r(3415),t),o(r(7827),t),o(r(6150),t),o(r(8160),t),o(r(8446),t),o(r(717),t)},6150:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.number=t.getBigInt=t.assertNumberLength=t.getLength=t.isSigned=void 0;const n=r(2049),o=r(5961),i=r(8746),s=/^u?int(?[0-9]*)?$/u;t.isSigned=e=>!e.startsWith("u"),t.getLength=e=>{if("int"===e||"uint"===e)return 256;const t=e.match(s);(0,n.assert)(t?.groups?.length,new o.ParserError(`Invalid number type. Expected a number type, but received "${e}".`));const r=parseInt(t.groups.length,10);return(0,n.assert)(r>=8&&r<=256,new o.ParserError(`Invalid number length. Expected a number between 8 and 256, but received "${e}".`)),(0,n.assert)(r%8==0,new o.ParserError(`Invalid number length. Expected a multiple of 8, but received "${e}".`)),r},t.assertNumberLength=(e,r)=>{const i=(0,t.getLength)(r),s=BigInt(2)**BigInt(i-((0,t.isSigned)(r)?1:0))-BigInt(1);(0,t.isSigned)(r)?(0,n.assert)(e>=-(s+BigInt(1))&&e<=s,new o.ParserError(`Number "${e}" is out of range for type "${r}".`)):(0,n.assert)(e<=s,new o.ParserError(`Number "${e}" is out of range for type "${r}".`))},t.getBigInt=e=>{try{return(0,n.createBigInt)(e)}catch{throw new o.ParserError(`Invalid number. Expected a valid number value, but received "${e}".`)}},t.number={isDynamic:!1,isType:e=>s.test(e),getByteLength:()=>32,encode({type:e,buffer:r,value:o,packed:s}){const a=(0,t.getBigInt)(o);if((0,t.assertNumberLength)(a,e),(0,t.isSigned)(e)){if(s){const o=(0,t.getLength)(e)/8;return(0,n.concatBytes)([r,(0,n.signedBigIntToBytes)(a,o)])}return(0,n.concatBytes)([r,(0,i.padStart)((0,n.signedBigIntToBytes)(a,32))])}if(s){const o=(0,t.getLength)(e)/8;return(0,n.concatBytes)([r,(0,i.padStart)((0,n.bigIntToBytes)(a),o)])}return(0,n.concatBytes)([r,(0,i.padStart)((0,n.bigIntToBytes)(a))])},decode({type:e,value:r}){const o=r.subarray(0,32);if((0,t.isSigned)(e)){const r=(0,n.bytesToSignedBigInt)(o);return(0,t.assertNumberLength)(r,e),r}const i=(0,n.bytesToBigInt)(o);return(0,t.assertNumberLength)(i,e),i}}},8160:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},8446:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.string=void 0;const n=r(2049),o=r(9356);t.string={isDynamic:!0,isType:e=>"string"===e,getByteLength:()=>32,encode:({buffer:e,value:t,packed:r,tight:i})=>o.bytes.encode({type:"bytes",buffer:e,value:(0,n.stringToBytes)(t),packed:r,tight:i}),decode:e=>(0,n.bytesToString)(o.bytes.decode(e))}},717:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.tuple=t.getTupleElements=void 0;const n=r(2049),o=r(5961),i=r(7700),s=/^\((.+)\)$/u;t.getTupleElements=e=>{(0,n.assert)(e.startsWith("(")&&e.endsWith(")"),new o.ParserError(`Invalid tuple type. Expected tuple type, but received "${e}".`));const t=[];let r="",i=0;for(let n=1;n(0,t.getTupleElements)(e).some((e=>{const t=(0,i.getParser)(e);return(0,i.isDynamicParser)(t,e)})),isType:e=>(e=>s.test(e))(e),getByteLength(e){return(0,i.isDynamicParser)(this,e)?32:(0,t.getTupleElements)(e).reduce(((e,t)=>e+(0,i.getParser)(t).getByteLength(t)),0)},encode({type:e,buffer:r,value:n,packed:o,tight:s}){const a=(0,t.getTupleElements)(e);return(0,i.pack)({types:a,values:n,byteArray:r,packed:o,tight:s})},decode({type:e,value:r,skip:n}){const o=(0,t.getTupleElements)(e);return n(this.getByteLength(e)-32),(0,i.unpack)(o,r)}}},5744:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},1126:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(5744),t)},9194:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.padEnd=t.padStart=t.set=void 0;const n=r(2049);t.set=(e,t,r)=>(0,n.concatBytes)([e.subarray(0,r),t,e.subarray(r+t.length)]),t.padStart=(e,t=32)=>{const r=new Uint8Array(Math.max(t-e.length,0)).fill(0);return(0,n.concatBytes)([r,e])},t.padEnd=(e,t=32)=>{const r=new Uint8Array(Math.max(t-e.length,0)).fill(0);return(0,n.concatBytes)([e,r])}},8746:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(9194),t)},8537:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.getEncryptionPublicKey=t.decryptSafely=t.decrypt=t.encryptSafely=t.encrypt=void 0;const s=i(r(8947)),a=i(r(6386)),c=r(4907);function u({publicKey:e,data:t,version:r}){if((0,c.isNullish)(e))throw new Error("Missing publicKey parameter");if((0,c.isNullish)(t))throw new Error("Missing data parameter");if((0,c.isNullish)(r))throw new Error("Missing version parameter");if("x25519-xsalsa20-poly1305"===r){if("string"!=typeof t)throw new Error("Message data must be given as a string");const r=s.box.keyPair();let n;try{n=a.decodeBase64(e)}catch(e){throw new Error("Bad public key")}const o=a.decodeUTF8(t),i=s.randomBytes(s.box.nonceLength),c=s.box(o,i,n,r.secretKey);return{version:"x25519-xsalsa20-poly1305",nonce:a.encodeBase64(i),ephemPublicKey:a.encodeBase64(r.publicKey),ciphertext:a.encodeBase64(c)}}throw new Error("Encryption type/version not supported")}function l({encryptedData:e,privateKey:t}){if((0,c.isNullish)(e))throw new Error("Missing encryptedData parameter");if((0,c.isNullish)(t))throw new Error("Missing privateKey parameter");if("x25519-xsalsa20-poly1305"===e.version){const r=f(t),n=s.box.keyPair.fromSecretKey(r).secretKey,o=a.decodeBase64(e.nonce),i=a.decodeBase64(e.ciphertext),c=a.decodeBase64(e.ephemPublicKey),u=s.box.open(i,o,c,n);try{if(!u)throw new Error;const e=a.encodeUTF8(u);if(!e)throw new Error;return e}catch(e){if(e&&"string"==typeof e.message&&e.message.length)throw new Error(`Decryption failed: ${e.message}`);throw new Error("Decryption failed.")}}throw new Error("Encryption type/version not supported.")}function f(e){const t=Buffer.from(e,"hex").toString("base64");return a.decodeBase64(t)}t.encrypt=u,t.encryptSafely=function({publicKey:e,data:t,version:r}){if((0,c.isNullish)(e))throw new Error("Missing publicKey parameter");if((0,c.isNullish)(t))throw new Error("Missing data parameter");if((0,c.isNullish)(r))throw new Error("Missing version parameter");if("object"==typeof t&&t&&"toJSON"in t)throw new Error("Cannot encrypt with toJSON property. Please remove toJSON property");const n={data:t,padding:""},o=Buffer.byteLength(JSON.stringify(n),"utf-8")%2048;let i=0;return o>0&&(i=2048-o-16),n.padding="0".repeat(i),u({publicKey:e,data:JSON.stringify(n),version:r})},t.decrypt=l,t.decryptSafely=function({encryptedData:e,privateKey:t}){if((0,c.isNullish)(e))throw new Error("Missing encryptedData parameter");if((0,c.isNullish)(t))throw new Error("Missing privateKey parameter");return JSON.parse(l({encryptedData:e,privateKey:t})).data},t.getEncryptionPublicKey=function(e){const t=f(e),r=s.box.keyPair.fromSecretKey(t).publicKey;return a.encodeBase64(r)}},1594:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.normalize=t.concatSig=void 0,o(r(252),t),o(r(169),t),o(r(8537),t);var i=r(4907);Object.defineProperty(t,"concatSig",{enumerable:!0,get:function(){return i.concatSig}}),Object.defineProperty(t,"normalize",{enumerable:!0,get:function(){return i.normalize}})},252:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extractPublicKey=t.recoverPersonalSignature=t.personalSign=void 0;const n=r(8683),o=r(4907);function i(e,t){const r=(0,n.hashPersonalMessage)((0,o.legacyToBuffer)(e));return(0,o.recoverPublicKey)(r,t)}t.personalSign=function({privateKey:e,data:t}){if((0,o.isNullish)(t))throw new Error("Missing data parameter");if((0,o.isNullish)(e))throw new Error("Missing privateKey parameter");const r=(0,o.legacyToBuffer)(t),i=(0,n.hashPersonalMessage)(r),s=(0,n.ecsign)(i,e);return(0,o.concatSig)((0,n.toBuffer)(s.v),s.r,s.s)},t.recoverPersonalSignature=function({data:e,signature:t}){if((0,o.isNullish)(e))throw new Error("Missing data parameter");if((0,o.isNullish)(t))throw new Error("Missing signature parameter");const r=i(e,t),s=(0,n.publicToAddress)(r);return(0,n.bufferToHex)(s)},t.extractPublicKey=function({data:e,signature:t}){if((0,o.isNullish)(e))throw new Error("Missing data parameter");if((0,o.isNullish)(t))throw new Error("Missing signature parameter");return`0x${i(e,t).toString("hex")}`}},169:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.recoverTypedSignature=t.signTypedData=t.typedSignatureHash=t.TypedDataUtils=t.TYPED_MESSAGE_SCHEMA=t.SignTypedDataVersion=void 0;const n=r(8683),o=r(3256),i=r(6207),s=r(8746),a=r(2049),c=r(199),u=r(4907);var l;function f(e,t){if(!Object.keys(l).includes(e))throw new Error(`Invalid version: '${e}'`);if(t&&!t.includes(e))throw new Error(`SignTypedDataVersion not allowed: '${e}'. Allowed versions are: ${t.join(", ")}`)}function h(e,t){(0,a.assert)(null!==t,`Unable to encode value: Invalid number. Expected a valid number value, but received "${t}".`);const r=BigInt(t),n=(0,i.getLength)(e),o=BigInt(2)**BigInt(n)-BigInt(1);return(0,a.assert)(r>=-o&&r<=o,`Unable to encode value: Number "${t}" is out of range for type "${e}".`),r}function p(e){let t=BigInt(0);for(let r=0;r=49?n-BigInt(49)+BigInt(10):n>=17?n-BigInt(17)+BigInt(10):n}return(0,s.padStart)((0,a.bigIntToBytes)(t),20)}function d(e,t,r,i,u){if(f(u,[l.V3,l.V4]),void 0!==e[r])return["bytes32",u===l.V4&&null==i?"0x0000000000000000000000000000000000000000000000000000000000000000":(0,n.arrToBufArr)((0,c.keccak256)(g(r,i,e,u)))];if("function"===r)throw new Error('Unsupported or invalid type: "function"');if(void 0===i)throw new Error(`missing value for field ${t} of type ${r}`);if("address"===r){if("number"==typeof i)return["address",(0,s.padStart)((0,a.numberToBytes)(i),20)];if((0,a.isStrictHexString)(i))return["address",(0,a.add0x)(i)];if("string"==typeof i)return["address",p(i).subarray(0,20)]}if("bool"===r)return["bool",Boolean(i)];if("bytes"===r)return"number"==typeof i?i=(0,a.numberToBytes)(i):(0,a.isStrictHexString)(i)||"0x"===i?i=(0,a.hexToBytes)(i):"string"==typeof i&&(i=(0,a.stringToBytes)(i)),["bytes32",(0,n.arrToBufArr)((0,c.keccak256)(i))];if(r.startsWith("bytes")&&"bytes"!==r&&!r.includes("["))return"number"==typeof i?i<0?["bytes32",new Uint8Array(32)]:["bytes32",(0,a.bigIntToBytes)(BigInt(i))]:(0,a.isStrictHexString)(i)?["bytes32",(0,a.hexToBytes)(i)]:["bytes32",i];if(r.startsWith("int")&&!r.includes("[")){const e=h(r,i);return e>=BigInt(0)?["uint256",e]:["int256",e]}if("string"===r)return i="number"==typeof i?(0,a.numberToBytes)(i):(0,a.stringToBytes)(null!=i?i:""),["bytes32",(0,n.arrToBufArr)((0,c.keccak256)(i))];if(r.endsWith("]")){if(u===l.V3)throw new Error("Arrays are unimplemented in encodeData; use V4 extension");const s=r.slice(0,r.lastIndexOf("[")),a=i.map((r=>d(e,t,s,r,u)));return["bytes32",(0,n.arrToBufArr)((0,c.keccak256)((0,o.encode)(a.map((([e])=>e)),a.map((([,e])=>e)))))]}return[r,i]}function g(e,t,r,i){f(i,[l.V3,l.V4]);const s=["bytes32"],a=[v(e,r)];for(const n of r[e]){if(i===l.V3&&void 0===t[n.name])continue;const[e,o]=d(r,n.name,n.type,t[n.name],i);s.push(e),a.push(o)}return(0,n.arrToBufArr)((0,o.encode)(s,a))}function y(e,t){let r="";const n=m(e,t);n.delete(e);const o=[e,...Array.from(n).sort()];for(const e of o){if(!t[e])throw new Error(`No type definition specified: ${e}`);r+=`${e}(${t[e].map((({name:e,type:t})=>`${t} ${e}`)).join(",")})`}return r}function m(e,t,r=new Set){if("string"!=typeof e)throw new Error(`Invalid findTypeDependencies input ${JSON.stringify(e)}`);const n=e.match(/^\w*/u);if([e]=n,r.has(e)||void 0===t[e])return r;r.add(e);for(const n of t[e])m(n.type,t,r);return r}function b(e,t,r,o){f(o,[l.V3,l.V4]);const i=g(e,t,r,o),s=(0,c.keccak256)(i);return(0,n.arrToBufArr)(s)}function v(e,t){const r=(0,a.stringToBytes)(y(e,t));return(0,n.arrToBufArr)((0,c.keccak256)(r))}function w(e){const r={};for(const n in t.TYPED_MESSAGE_SCHEMA.properties)e[n]&&(r[n]=e[n]);return"types"in r&&(r.types=Object.assign({EIP712Domain:[]},r.types)),r}function E(e,t){f(t,[l.V3,l.V4]);const r=w(e),{domain:n}=r;return b("EIP712Domain",n,{EIP712Domain:r.types.EIP712Domain},t)}function x(e,t){if((0,i.isArrayType)(e)&&Array.isArray(t)){const[r]=(0,i.getArrayType)(e);return t.map((e=>x(r,e)))}if("address"===e){if("number"==typeof t)return(0,s.padStart)((0,a.numberToBytes)(t),20);if((0,a.isStrictHexString)(t))return(0,s.padStart)((0,a.hexToBytes)(t).subarray(0,20),20);if(t instanceof Uint8Array)return(0,s.padStart)(t.subarray(0,20),20)}if("bool"===e)return Boolean(t);if(e.startsWith("bytes")&&"bytes"!==e){const r=(0,i.getByteLength)(e);if("number"==typeof t)return t<0?new Uint8Array:(0,a.numberToBytes)(t).subarray(0,r);if((0,a.isStrictHexString)(t))return(0,a.hexToBytes)(t).subarray(0,r);if(t instanceof Uint8Array)return t.subarray(0,r)}if(e.startsWith("uint")&&"number"==typeof t)return Math.abs(t);if(e.startsWith("int")&&"number"==typeof t){const r=(0,i.getLength)(e);return BigInt.asIntN(r,BigInt(t))}return t}function S(e,t){return t.map((t=>{if("string"==typeof t||"number"==typeof t||"bigint"==typeof t){const r=h(e,t);if(r>=BigInt(0))return(0,s.padStart)((0,a.bigIntToBytes)(r),32);const n=(0,i.getLength)(e),o=BigInt.asIntN(n,r);return(0,a.signedBigIntToBytes)(o,32)}return t}))}function A(e){const t=new Error("Expect argument to be non-empty array");if("object"!=typeof e||!("length"in e)||!e.length)throw t;const r=e.map((({name:e,type:t,value:r})=>{if("address[]"===t)return{name:e,type:"bytes32[]",value:(n=r,n.map((e=>"number"==typeof e?(0,s.padStart)((0,a.numberToBytes)(e),32):(0,a.isStrictHexString)(e)?(0,s.padStart)((0,a.hexToBytes)(e).subarray(0,32),32):e instanceof Uint8Array?(0,s.padStart)(e.subarray(0,32),32):e)))};var n;if(t.startsWith("int")&&(0,i.isArrayType)(t)){const[n,o]=(0,i.getArrayType)(t);return{name:e,type:`bytes32[${null!=o?o:""}]`,value:S(n,r)}}return{name:e,type:t,value:x(t,r)}})),l=r.map((e=>"bytes"!==e.type?e.value:(0,u.legacyToBuffer)(e.value))),f=r.map((e=>{if("function"===e.type)throw new Error('Unsupported or invalid type: "function"');return e.type})),h=e.map((e=>{if(!e.name)throw t;return`${e.type} ${e.name}`}));return(0,n.arrToBufArr)((0,c.keccak256)((0,o.encodePacked)(["bytes32","bytes32"],[(0,c.keccak256)((0,o.encodePacked)(["string[]"],[h],!0)),(0,c.keccak256)((0,o.encodePacked)(f,l,!0))])))}!function(e){e.V1="V1",e.V3="V3",e.V4="V4"}(l=t.SignTypedDataVersion||(t.SignTypedDataVersion={})),t.TYPED_MESSAGE_SCHEMA={type:"object",properties:{types:{type:"object",additionalProperties:{type:"array",items:{type:"object",properties:{name:{type:"string"},type:{type:"string"}},required:["name","type"]}}},primaryType:{type:"string"},domain:{type:"object"},message:{type:"object"}},required:["types","primaryType","domain","message"]},t.TypedDataUtils={encodeData:g,encodeType:y,findTypeDependencies:m,hashStruct:b,hashType:v,sanitizeData:w,eip712Hash:function(e,t){f(t,[l.V3,l.V4]);const r=w(e),o=[(0,a.hexToBytes)("1901")];return o.push(E(e,t)),"EIP712Domain"!==r.primaryType&&o.push(b(r.primaryType,r.message,r.types,t)),(0,n.arrToBufArr)((0,c.keccak256)((0,a.concatBytes)(o)))},eip712DomainHash:E},t.typedSignatureHash=function(e){const t=A(e);return(0,a.bytesToHex)(t)},t.signTypedData=function({privateKey:e,data:r,version:o}){if(f(o),(0,u.isNullish)(r))throw new Error("Missing data parameter");if((0,u.isNullish)(e))throw new Error("Missing private key parameter");const i=o===l.V1?A(r):t.TypedDataUtils.eip712Hash(r,o),s=(0,n.ecsign)(i,e);return(0,u.concatSig)((0,n.arrToBufArr)((0,a.bigIntToBytes)(s.v)),s.r,s.s)},t.recoverTypedSignature=function({data:e,signature:r,version:o}){if(f(o),(0,u.isNullish)(e))throw new Error("Missing data parameter");if((0,u.isNullish)(r))throw new Error("Missing signature parameter");const i=o===l.V1?A(e):t.TypedDataUtils.eip712Hash(e,o),s=(0,u.recoverPublicKey)(i,r),c=(0,n.publicToAddress)(s);return(0,a.bytesToHex)(c)}},4907:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.normalize=t.recoverPublicKey=t.concatSig=t.legacyToBuffer=t.isNullish=t.padWithZeroes=void 0;const n=r(8683),o=r(2049);function i(e,t){if(""!==e&&!/^[a-f0-9]+$/iu.test(e))throw new Error(`Expected an unprefixed hex string. Received: ${e}`);if(t<0)throw new Error(`Expected a non-negative integer target length. Received: ${t}`);return String.prototype.padStart.call(e,t,"0")}function s(e){return null==e}t.padWithZeroes=i,t.isNullish=s,t.legacyToBuffer=function(e){return"string"!=typeof e||(0,n.isHexString)(e)?(0,n.toBuffer)(e):Buffer.from(e)},t.concatSig=function(e,t,r){const s=(0,n.fromSigned)(t),a=(0,n.fromSigned)(r),c=(0,n.bufferToInt)(e),u=i((0,n.toUnsigned)(s).toString("hex"),64),l=i((0,n.toUnsigned)(a).toString("hex"),64),f=(0,o.remove0x)((0,o.numberToHex)(c));return(0,o.add0x)(u.concat(l,f))},t.recoverPublicKey=function(e,t){const r=(0,n.fromRpcSig)(t);return(0,n.ecrecover)(e,r.v,r.r,r.s)},t.normalize=function(e){if(!s(e)){if("number"==typeof e){if(e<0)return"0x";const t=(0,o.numberToBytes)(e);e=(0,o.bytesToHex)(t)}if("string"!=typeof e){let t="eth-sig-util.normalize() requires hex string or integer input.";throw t+=` received ${typeof e}: ${e}`,new Error(t)}return(0,o.add0x)(e.toLowerCase())}}},199:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.keccak512=t.keccak384=t.keccak256=t.keccak224=void 0;const n=r(2955),o=r(8492);t.keccak224=(0,o.wrapHash)(n.keccak_224),t.keccak256=(()=>{const e=(0,o.wrapHash)(n.keccak_256);return e.create=n.keccak_256.create,e})(),t.keccak384=(0,o.wrapHash)(n.keccak_384),t.keccak512=(0,o.wrapHash)(n.keccak_512)},8492:function(e,t,r){"use strict";e=r.nmd(e);var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.crypto=t.wrapHash=t.equalsBytes=t.hexToBytes=t.bytesToUtf8=t.utf8ToBytes=t.createView=t.concatBytes=t.toHex=t.bytesToHex=t.assertBytes=t.assertBool=void 0;const o=n(r(7557)),i=r(9175),s=o.default.bool;t.assertBool=s;const a=o.default.bytes;t.assertBytes=a;var c=r(9175);Object.defineProperty(t,"bytesToHex",{enumerable:!0,get:function(){return c.bytesToHex}}),Object.defineProperty(t,"toHex",{enumerable:!0,get:function(){return c.bytesToHex}}),Object.defineProperty(t,"concatBytes",{enumerable:!0,get:function(){return c.concatBytes}}),Object.defineProperty(t,"createView",{enumerable:!0,get:function(){return c.createView}}),Object.defineProperty(t,"utf8ToBytes",{enumerable:!0,get:function(){return c.utf8ToBytes}}),t.bytesToUtf8=function(e){if(!(e instanceof Uint8Array))throw new TypeError("bytesToUtf8 expected Uint8Array, got "+typeof e);return(new TextDecoder).decode(e)},t.hexToBytes=function(e){const t=e.startsWith("0x")?e.substring(2):e;return(0,i.hexToBytes)(t)},t.equalsBytes=function(e,t){if(e.length!==t.length)return!1;for(let r=0;r(o.default.bytes(t),e(t))},t.crypto=(()=>{const t="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0,r="function"==typeof e.require&&e.require.bind(e);return{node:r&&!t?r("crypto"):void 0,web:t}})()},1275:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=((n=r(7833))&&n.__esModule?n:{default:n}).default.call(void 0,"metamask");t.createProjectLogger=function(e){return o.extend(e)},t.createModuleLogger=function(e,t){return e.extend(t)}},5244:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)};t.__privateGet=(e,t,n)=>(r(e,t,"read from private field"),n?n.call(e):t.get(e)),t.__privateAdd=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},t.__privateSet=(e,t,n,o)=>(r(e,t,"write to private field"),o?o.call(e,n):t.set(e,n),n)},3631:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(932),o=r(9589),i=r(2150),s=i.refine.call(void 0,i.string.call(void 0),"Version",(e=>null!==o.valid.call(void 0,e)||`Expected SemVer version, got "${e}"`)),a=i.refine.call(void 0,i.string.call(void 0),"Version range",(e=>null!==o.validRange.call(void 0,e)||`Expected SemVer range, got "${e}"`));t.VersionStruct=s,t.VersionRangeStruct=a,t.isValidSemVerVersion=function(e){return i.is.call(void 0,e,s)},t.isValidSemVerRange=function(e){return i.is.call(void 0,e,a)},t.assertIsSemVerVersion=function(e){n.assertStruct.call(void 0,e,s)},t.assertIsSemVerRange=function(e){n.assertStruct.call(void 0,e,a)},t.gtVersion=function(e,t){return o.gt.call(void 0,e,t)},t.gtRange=function(e,t){return o.gtr.call(void 0,e,t)},t.satisfiesVersionRange=function(e,t){return o.satisfies.call(void 0,e,t,{includePrerelease:!0})}},5680:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createDeferredPromise=function({suppressUnhandledRejection:e=!1}={}){let t,r;const n=new Promise(((e,n)=>{t=e,r=n}));return e&&n.catch((e=>{})),{promise:n,resolve:t,reject:r}}},9116:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=(e=>(e[e.Millisecond=1]="Millisecond",e[e.Second=1e3]="Second",e[e.Minute=6e4]="Minute",e[e.Hour=36e5]="Hour",e[e.Day=864e5]="Day",e[e.Week=6048e5]="Week",e[e.Year=31536e6]="Year",e))(r||{}),n=(e,t)=>{if(!(e=>Number.isInteger(e)&&e>=0)(e))throw new Error(`"${t}" must be a non-negative integer. Received: "${e}".`)};t.Duration=r,t.inMilliseconds=function(e,t){return n(e,"count"),e*t},t.timeSince=function(e){return n(e,"timestamp"),Date.now()-e}},7982:()=>{},1848:(e,t,r)=>{"use strict";function n(e,t){return null!=e?e:t()}Object.defineProperty(t,"__esModule",{value:!0});var o=r(932),i=r(2150);t.base64=(e,t={})=>{const r=n(t.paddingRequired,(()=>!1)),s=n(t.characterSet,(()=>"base64"));let a,c;return"base64"===s?a=String.raw`[A-Za-z0-9+\/]`:(o.assert.call(void 0,"base64url"===s),a=String.raw`[-_A-Za-z0-9]`),c=r?new RegExp(`^(?:${a}{4})*(?:${a}{3}=|${a}{2}==)?$`,"u"):new RegExp(`^(?:${a}{4})*(?:${a}{2,3}|${a}{3}=|${a}{2}==)?$`,"u"),i.pattern.call(void 0,e,c)}},932:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1486),o=r(2150);function i(e,t){return Boolean("string"==typeof function(e){let t,r=e[0],n=1;for(;nr.call(t,...e))),t=void 0)}return r}([e,"optionalAccess",e=>e.prototype,"optionalAccess",e=>e.constructor,"optionalAccess",e=>e.name]))?new e({message:t}):e({message:t})}var s=class extends Error{constructor(e){super(e.message),this.code="ERR_ASSERTION"}};t.AssertionError=s,t.assert=function(e,t="Assertion failed.",r=s){if(!e){if(t instanceof Error)throw t;throw i(r,t)}},t.assertStruct=function(e,t,r="Assertion failed",a=s){try{o.assert.call(void 0,e,t)}catch(e){throw i(a,`${r}: ${function(e){return n.getErrorMessage.call(void 0,e).replace(/\.$/u,"")}(e)}.`)}},t.assertExhaustive=function(e){throw new Error("Invalid branch reached. Should be detected during compilation.")}},1203:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(5363),o=r(932),i=r(2150),s=i.union.call(void 0,[i.number.call(void 0),i.bigint.call(void 0),i.string.call(void 0),n.StrictHexStruct]),a=i.coerce.call(void 0,i.number.call(void 0),s,Number),c=i.coerce.call(void 0,i.bigint.call(void 0),s,BigInt),u=(i.union.call(void 0,[n.StrictHexStruct,i.instance.call(void 0,Uint8Array)]),i.coerce.call(void 0,i.instance.call(void 0,Uint8Array),i.union.call(void 0,[n.StrictHexStruct]),n.hexToBytes)),l=i.coerce.call(void 0,n.StrictHexStruct,i.instance.call(void 0,Uint8Array),n.bytesToHex);t.createNumber=function(e){try{const t=i.create.call(void 0,e,a);return o.assert.call(void 0,Number.isFinite(t),`Expected a number-like value, got "${e}".`),t}catch(t){if(t instanceof i.StructError)throw new Error(`Expected a number-like value, got "${e}".`);throw t}},t.createBigInt=function(e){try{return i.create.call(void 0,e,c)}catch(e){if(e instanceof i.StructError)throw new Error(`Expected a number-like value, got "${String(e.value)}".`);throw e}},t.createBytes=function(e){if("string"==typeof e&&"0x"===e.toLowerCase())return new Uint8Array;try{return i.create.call(void 0,e,u)}catch(e){if(e instanceof i.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}},t.createHex=function(e){if(e instanceof Uint8Array&&0===e.length||"string"==typeof e&&"0x"===e.toLowerCase())return"0x";try{return i.create.call(void 0,e,l)}catch(e){if(e instanceof i.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}}},1508:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1848),o=r(2150),i=o.size.call(void 0,n.base64.call(void 0,o.string.call(void 0),{paddingRequired:!0}),44,44);t.ChecksumStruct=i},1423:()=>{},1486:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(6526),o=r(1843);function i(e){return"object"==typeof e&&null!==e&&"code"in e}function s(e){return"object"==typeof e&&null!==e&&"message"in e}t.isErrorWithCode=i,t.isErrorWithMessage=s,t.isErrorWithStack=function(e){return"object"==typeof e&&null!==e&&"stack"in e},t.getErrorMessage=function(e){return s(e)&&"string"==typeof e.message?e.message:n.isNullOrUndefined.call(void 0,e)?"":String(e)},t.wrapError=function(e,t){if((r=e)instanceof Error||n.isObject.call(void 0,r)&&"Error"===r.constructor.name){let r;return r=2===Error.length?new Error(t,{cause:e}):new(0,o.ErrorWithCause)(t,{cause:e}),i(e)&&(r.code=e.code),r}var r;return t.length>0?new Error(`${String(e)}: ${t}`):new Error(String(e))}},8383:()=>{},7427:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(932),o=r(6526),i=r(2150),s=e=>i.object.call(void 0,e);function a({path:e,branch:t}){const r=e[e.length-1];return o.hasProperty.call(void 0,t[t.length-2],r)}function c(e){return new(0,i.Struct)({...e,type:`optional ${e.type}`,validator:(t,r)=>!a(r)||e.validator(t,r),refiner:(t,r)=>!a(r)||e.refiner(t,r)})}var u=i.union.call(void 0,[i.literal.call(void 0,null),i.boolean.call(void 0),i.define.call(void 0,"finite number",(e=>i.is.call(void 0,e,i.number.call(void 0))&&Number.isFinite(e))),i.string.call(void 0),i.array.call(void 0,i.lazy.call(void 0,(()=>u))),i.record.call(void 0,i.string.call(void 0),i.lazy.call(void 0,(()=>u)))]),l=i.coerce.call(void 0,u,i.any.call(void 0),(e=>(n.assertStruct.call(void 0,e,u),JSON.parse(JSON.stringify(e,((e,t)=>{if("__proto__"!==e&&"constructor"!==e)return t}))))));function f(e){return i.create.call(void 0,e,l)}var h=i.literal.call(void 0,"2.0"),p=i.nullable.call(void 0,i.union.call(void 0,[i.number.call(void 0),i.string.call(void 0)])),d=s({code:i.integer.call(void 0),message:i.string.call(void 0),data:c(l),stack:c(i.string.call(void 0))}),g=i.union.call(void 0,[i.record.call(void 0,i.string.call(void 0),l),i.array.call(void 0,l)]),y=s({id:p,jsonrpc:h,method:i.string.call(void 0),params:c(g)}),m=s({jsonrpc:h,method:i.string.call(void 0),params:c(g)}),b=i.object.call(void 0,{id:p,jsonrpc:h,result:i.optional.call(void 0,i.unknown.call(void 0)),error:i.optional.call(void 0,d)}),v=s({id:p,jsonrpc:h,result:l}),w=s({id:p,jsonrpc:h,error:d}),E=i.union.call(void 0,[v,w]);t.object=s,t.exactOptional=c,t.UnsafeJsonStruct=u,t.JsonStruct=l,t.isValidJson=function(e){try{return f(e),!0}catch(e){return!1}},t.getSafeJson=f,t.getJsonSize=function(e){n.assertStruct.call(void 0,e,l,"Invalid JSON value");const t=JSON.stringify(e);return(new TextEncoder).encode(t).byteLength},t.jsonrpc2="2.0",t.JsonRpcVersionStruct=h,t.JsonRpcIdStruct=p,t.JsonRpcErrorStruct=d,t.JsonRpcParamsStruct=g,t.JsonRpcRequestStruct=y,t.JsonRpcNotificationStruct=m,t.isJsonRpcNotification=function(e){return i.is.call(void 0,e,m)},t.assertIsJsonRpcNotification=function(e,t){n.assertStruct.call(void 0,e,m,"Invalid JSON-RPC notification",t)},t.isJsonRpcRequest=function(e){return i.is.call(void 0,e,y)},t.assertIsJsonRpcRequest=function(e,t){n.assertStruct.call(void 0,e,y,"Invalid JSON-RPC request",t)},t.PendingJsonRpcResponseStruct=b,t.JsonRpcSuccessStruct=v,t.JsonRpcFailureStruct=w,t.JsonRpcResponseStruct=E,t.isPendingJsonRpcResponse=function(e){return i.is.call(void 0,e,b)},t.assertIsPendingJsonRpcResponse=function(e,t){n.assertStruct.call(void 0,e,b,"Invalid pending JSON-RPC response",t)},t.isJsonRpcResponse=function(e){return i.is.call(void 0,e,E)},t.assertIsJsonRpcResponse=function(e,t){n.assertStruct.call(void 0,e,E,"Invalid JSON-RPC response",t)},t.isJsonRpcSuccess=function(e){return i.is.call(void 0,e,v)},t.assertIsJsonRpcSuccess=function(e,t){n.assertStruct.call(void 0,e,v,"Invalid JSON-RPC success response",t)},t.isJsonRpcFailure=function(e){return i.is.call(void 0,e,w)},t.assertIsJsonRpcFailure=function(e,t){n.assertStruct.call(void 0,e,w,"Invalid JSON-RPC failure response",t)},t.isJsonRpcError=function(e){return i.is.call(void 0,e,d)},t.assertIsJsonRpcError=function(e,t){n.assertStruct.call(void 0,e,d,"Invalid JSON-RPC error",t)},t.getJsonRpcIdValidator=function(e){const{permitEmptyString:t,permitFractions:r,permitNull:n}={permitEmptyString:!0,permitFractions:!1,permitNull:!0,...e};return e=>Boolean("number"==typeof e&&(r||Number.isInteger(e))||"string"==typeof e&&(t||e.length>0)||n&&null===e)}},5363:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(932),o=r(2955),i=r(2150),s=r(3203),a=function(){const e=[];return()=>{if(0===e.length)for(let t=0;t<256;t++)e.push(t.toString(16).padStart(2,"0"));return e}}();function c(e){return e instanceof Uint8Array}function u(e){n.assert.call(void 0,c(e),"Value must be a Uint8Array.")}function l(e){if(u(e),0===e.length)return"0x";const t=a(),r=new Array(e.length);for(let n=0;nr.call(t,...e))),t=void 0)}return r}([e,"optionalAccess",e=>e.toLowerCase,"optionalCall",e=>e()]))return new Uint8Array;S(e);const t=T(e).toLowerCase(),r=t.length%2==0?t:`0${t}`,n=new Uint8Array(r.length/2);for(let e=0;e=BigInt(0),"Value must be a non-negative bigint."),h(e.toString(16))}function d(e){return n.assert.call(void 0,"number"==typeof e,"Value must be a number."),n.assert.call(void 0,e>=0,"Value must be a non-negative number."),n.assert.call(void 0,Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToBytes` instead."),h(e.toString(16))}function g(e){return n.assert.call(void 0,"string"==typeof e,"Value must be a string."),(new TextEncoder).encode(e)}function y(e){if("bigint"==typeof e)return p(e);if("number"==typeof e)return d(e);if("string"==typeof e)return e.startsWith("0x")?h(e):g(e);if(c(e))return e;throw new TypeError(`Unsupported value type: "${typeof e}".`)}var m=i.pattern.call(void 0,i.string.call(void 0),/^(?:0x)?[0-9a-f]+$/iu),b=i.pattern.call(void 0,i.string.call(void 0),/^0x[0-9a-f]+$/iu),v=i.pattern.call(void 0,i.string.call(void 0),/^0x[0-9a-f]{40}$/u),w=i.pattern.call(void 0,i.string.call(void 0),/^0x[0-9a-fA-F]{40}$/u);function E(e){return i.is.call(void 0,e,m)}function x(e){return i.is.call(void 0,e,b)}function S(e){n.assert.call(void 0,E(e),"Value must be a hexadecimal string.")}function A(e){n.assert.call(void 0,i.is.call(void 0,e,w),"Invalid hex address.");const t=T(e.toLowerCase()),r=T(l(o.keccak_256.call(void 0,t)));return`0x${t.split("").map(((e,t)=>{const o=r[t];return n.assert.call(void 0,i.is.call(void 0,o,i.string.call(void 0)),"Hash shorter than address."),parseInt(o,16)>7?e.toUpperCase():e})).join("")}`}function I(e){return!!i.is.call(void 0,e,w)&&A(e)===e}function B(e){return e.startsWith("0x")?e:e.startsWith("0X")?`0x${e.substring(2)}`:`0x${e}`}function T(e){return e.startsWith("0x")||e.startsWith("0X")?e.substring(2):e}t.HexStruct=m,t.StrictHexStruct=b,t.HexAddressStruct=v,t.HexChecksumAddressStruct=w,t.isHexString=E,t.isStrictHexString=x,t.assertIsHexString=S,t.assertIsStrictHexString=function(e){n.assert.call(void 0,x(e),'Value must be a hexadecimal string, starting with "0x".')},t.isValidHexAddress=function(e){return i.is.call(void 0,e,v)||I(e)},t.getChecksumAddress=A,t.isValidChecksumAddress=I,t.add0x=B,t.remove0x=T,t.isBytes=c,t.assertIsBytes=u,t.bytesToHex=l,t.bytesToBigInt=f,t.bytesToSignedBigInt=function(e){u(e);let t=BigInt(0);for(const r of e)t=(t<0,"Byte length must be greater than 0."),n.assert.call(void 0,function(e,t){n.assert.call(void 0,t>0);const r=e>>BigInt(31);return!((~e&r)+(e&~r)>>BigInt(8*t-1))}(e,t),"Byte length is too small to represent the given value.");let r=e;const o=new Uint8Array(t);for(let e=0;e>=BigInt(8);return o.reverse()},t.numberToBytes=d,t.stringToBytes=g,t.base64ToBytes=function(e){return n.assert.call(void 0,"string"==typeof e,"Value must be a string."),s.base64.decode(e)},t.valueToBytes=y,t.concatBytes=function(e){const t=new Array(e.length);let r=0;for(let n=0;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=(e=>(e[e.Null=4]="Null",e[e.Comma=1]="Comma",e[e.Wrapper=1]="Wrapper",e[e.True=4]="True",e[e.False=5]="False",e[e.Quote=1]="Quote",e[e.Colon=1]="Colon",e[e.Date=24]="Date",e))(r||{}),n=/"|\\|\n|\r|\t/gu;function o(e){return e.charCodeAt(0)<=127}t.isNonEmptyArray=function(e){return Array.isArray(e)&&e.length>0},t.isNullOrUndefined=function(e){return null==e},t.isObject=function(e){return Boolean(e)&&"object"==typeof e&&!Array.isArray(e)},t.hasProperty=(e,t)=>Object.hasOwnProperty.call(e,t),t.getKnownPropertyNames=function(e){return Object.getOwnPropertyNames(e)},t.JsonSize=r,t.ESCAPE_CHARACTERS_REGEXP=n,t.isPlainObject=function(e){if("object"!=typeof e||null===e)return!1;try{let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}catch(e){return!1}},t.isASCII=o,t.calculateStringSize=function(e){return e.split("").reduce(((e,t)=>o(t)?e+1:e+2),0)+(t=e.match(n),()=>[],null!=t?t:[]).length;var t},t.calculateNumberSize=function(e){return e.toString().length}},1305:()=>{},2298:(e,t,r)=>{"use strict";function n(e){let t,r=e[0],n=1;for(;nr.call(t,...e))),t=void 0)}return r}Object.defineProperty(t,"__esModule",{value:!0});var o=r(2150),i=/^(?[-a-z0-9]{3,8}):(?[-_a-zA-Z0-9]{1,32})$/u,s=/^[-a-z0-9]{3,8}$/u,a=/^[-_a-zA-Z0-9]{1,32}$/u,c=/^(?(?[-a-z0-9]{3,8}):(?[-_a-zA-Z0-9]{1,32})):(?[-.%a-zA-Z0-9]{1,128})$/u,u=/^[-.%a-zA-Z0-9]{1,128}$/u,l=o.pattern.call(void 0,o.string.call(void 0),i),f=o.pattern.call(void 0,o.string.call(void 0),s),h=o.pattern.call(void 0,o.string.call(void 0),a),p=o.pattern.call(void 0,o.string.call(void 0),c),d=o.pattern.call(void 0,o.string.call(void 0),u);t.CAIP_CHAIN_ID_REGEX=i,t.CAIP_NAMESPACE_REGEX=s,t.CAIP_REFERENCE_REGEX=a,t.CAIP_ACCOUNT_ID_REGEX=c,t.CAIP_ACCOUNT_ADDRESS_REGEX=u,t.CaipChainIdStruct=l,t.CaipNamespaceStruct=f,t.CaipReferenceStruct=h,t.CaipAccountIdStruct=p,t.CaipAccountAddressStruct=d,t.isCaipChainId=function(e){return o.is.call(void 0,e,l)},t.isCaipNamespace=function(e){return o.is.call(void 0,e,f)},t.isCaipReference=function(e){return o.is.call(void 0,e,h)},t.isCaipAccountId=function(e){return o.is.call(void 0,e,p)},t.isCaipAccountAddress=function(e){return o.is.call(void 0,e,d)},t.parseCaipChainId=function(e){const t=i.exec(e);if(!n([t,"optionalAccess",e=>e.groups]))throw new Error("Invalid CAIP chain ID.");return{namespace:t.groups.namespace,reference:t.groups.reference}},t.parseCaipAccountId=function(e){const t=c.exec(e);if(!n([t,"optionalAccess",e=>e.groups]))throw new Error("Invalid CAIP account ID.");return{address:t.groups.accountAddress,chainId:t.groups.chainId,chain:{namespace:t.groups.namespace,reference:t.groups.reference}}}},3207:()=>{},1535:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(5363),o=r(932);t.numberToHex=e=>(o.assert.call(void 0,"number"==typeof e,"Value must be a number."),o.assert.call(void 0,e>=0,"Value must be a non-negative number."),o.assert.call(void 0,Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToHex` instead."),n.add0x.call(void 0,e.toString(16))),t.bigIntToHex=e=>(o.assert.call(void 0,"bigint"==typeof e,"Value must be a bigint."),o.assert.call(void 0,e>=0,"Value must be a non-negative bigint."),n.add0x.call(void 0,e.toString(16))),t.hexToNumber=e=>{n.assertIsHexString.call(void 0,e);const t=parseInt(e,16);return o.assert.call(void 0,Number.isSafeInteger(t),"Value is not a safe integer. Use `hexToBigInt` instead."),t},t.hexToBigInt=e=>(n.assertIsHexString.call(void 0,e),BigInt(n.add0x.call(void 0,e)))},1584:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o,i=r(5244),s=class{constructor(e){i.__privateAdd.call(void 0,this,n,void 0),i.__privateSet.call(void 0,this,n,new Map(e)),Object.freeze(this)}get size(){return i.__privateGet.call(void 0,this,n).size}[Symbol.iterator](){return i.__privateGet.call(void 0,this,n)[Symbol.iterator]()}entries(){return i.__privateGet.call(void 0,this,n).entries()}forEach(e,t){return i.__privateGet.call(void 0,this,n).forEach(((r,n,o)=>e.call(t,r,n,this)))}get(e){return i.__privateGet.call(void 0,this,n).get(e)}has(e){return i.__privateGet.call(void 0,this,n).has(e)}keys(){return i.__privateGet.call(void 0,this,n).keys()}values(){return i.__privateGet.call(void 0,this,n).values()}toString(){return`FrozenMap(${this.size}) {${this.size>0?` ${[...this.entries()].map((([e,t])=>`${String(e)} => ${String(t)}`)).join(", ")} `:""}}`}};n=new WeakMap;var a=class{constructor(e){i.__privateAdd.call(void 0,this,o,void 0),i.__privateSet.call(void 0,this,o,new Set(e)),Object.freeze(this)}get size(){return i.__privateGet.call(void 0,this,o).size}[Symbol.iterator](){return i.__privateGet.call(void 0,this,o)[Symbol.iterator]()}entries(){return i.__privateGet.call(void 0,this,o).entries()}forEach(e,t){return i.__privateGet.call(void 0,this,o).forEach(((r,n,o)=>e.call(t,r,n,this)))}has(e){return i.__privateGet.call(void 0,this,o).has(e)}keys(){return i.__privateGet.call(void 0,this,o).keys()}values(){return i.__privateGet.call(void 0,this,o).values()}toString(){return`FrozenSet(${this.size}) {${this.size>0?` ${[...this.values()].map((e=>String(e))).join(", ")} `:""}}`}};o=new WeakMap,Object.freeze(s),Object.freeze(s.prototype),Object.freeze(a),Object.freeze(a.prototype),t.FrozenMap=s,t.FrozenSet=a},2049:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(7982);var n=r(1535);r(8383);var o=r(5680),i=r(9116);r(3207);var s=r(3631),a=r(7427);r(1305);var c=r(1275),u=r(2298),l=r(1508),f=r(1848),h=r(1203),p=r(5363),d=r(932),g=r(1486),y=r(6526),m=r(1584);r(5244),r(1423),t.AssertionError=d.AssertionError,t.CAIP_ACCOUNT_ADDRESS_REGEX=u.CAIP_ACCOUNT_ADDRESS_REGEX,t.CAIP_ACCOUNT_ID_REGEX=u.CAIP_ACCOUNT_ID_REGEX,t.CAIP_CHAIN_ID_REGEX=u.CAIP_CHAIN_ID_REGEX,t.CAIP_NAMESPACE_REGEX=u.CAIP_NAMESPACE_REGEX,t.CAIP_REFERENCE_REGEX=u.CAIP_REFERENCE_REGEX,t.CaipAccountAddressStruct=u.CaipAccountAddressStruct,t.CaipAccountIdStruct=u.CaipAccountIdStruct,t.CaipChainIdStruct=u.CaipChainIdStruct,t.CaipNamespaceStruct=u.CaipNamespaceStruct,t.CaipReferenceStruct=u.CaipReferenceStruct,t.ChecksumStruct=l.ChecksumStruct,t.Duration=i.Duration,t.ESCAPE_CHARACTERS_REGEXP=y.ESCAPE_CHARACTERS_REGEXP,t.FrozenMap=m.FrozenMap,t.FrozenSet=m.FrozenSet,t.HexAddressStruct=p.HexAddressStruct,t.HexChecksumAddressStruct=p.HexChecksumAddressStruct,t.HexStruct=p.HexStruct,t.JsonRpcErrorStruct=a.JsonRpcErrorStruct,t.JsonRpcFailureStruct=a.JsonRpcFailureStruct,t.JsonRpcIdStruct=a.JsonRpcIdStruct,t.JsonRpcNotificationStruct=a.JsonRpcNotificationStruct,t.JsonRpcParamsStruct=a.JsonRpcParamsStruct,t.JsonRpcRequestStruct=a.JsonRpcRequestStruct,t.JsonRpcResponseStruct=a.JsonRpcResponseStruct,t.JsonRpcSuccessStruct=a.JsonRpcSuccessStruct,t.JsonRpcVersionStruct=a.JsonRpcVersionStruct,t.JsonSize=y.JsonSize,t.JsonStruct=a.JsonStruct,t.PendingJsonRpcResponseStruct=a.PendingJsonRpcResponseStruct,t.StrictHexStruct=p.StrictHexStruct,t.UnsafeJsonStruct=a.UnsafeJsonStruct,t.VersionRangeStruct=s.VersionRangeStruct,t.VersionStruct=s.VersionStruct,t.add0x=p.add0x,t.assert=d.assert,t.assertExhaustive=d.assertExhaustive,t.assertIsBytes=p.assertIsBytes,t.assertIsHexString=p.assertIsHexString,t.assertIsJsonRpcError=a.assertIsJsonRpcError,t.assertIsJsonRpcFailure=a.assertIsJsonRpcFailure,t.assertIsJsonRpcNotification=a.assertIsJsonRpcNotification,t.assertIsJsonRpcRequest=a.assertIsJsonRpcRequest,t.assertIsJsonRpcResponse=a.assertIsJsonRpcResponse,t.assertIsJsonRpcSuccess=a.assertIsJsonRpcSuccess,t.assertIsPendingJsonRpcResponse=a.assertIsPendingJsonRpcResponse,t.assertIsSemVerRange=s.assertIsSemVerRange,t.assertIsSemVerVersion=s.assertIsSemVerVersion,t.assertIsStrictHexString=p.assertIsStrictHexString,t.assertStruct=d.assertStruct,t.base64=f.base64,t.base64ToBytes=p.base64ToBytes,t.bigIntToBytes=p.bigIntToBytes,t.bigIntToHex=n.bigIntToHex,t.bytesToBase64=p.bytesToBase64,t.bytesToBigInt=p.bytesToBigInt,t.bytesToHex=p.bytesToHex,t.bytesToNumber=p.bytesToNumber,t.bytesToSignedBigInt=p.bytesToSignedBigInt,t.bytesToString=p.bytesToString,t.calculateNumberSize=y.calculateNumberSize,t.calculateStringSize=y.calculateStringSize,t.concatBytes=p.concatBytes,t.createBigInt=h.createBigInt,t.createBytes=h.createBytes,t.createDataView=p.createDataView,t.createDeferredPromise=o.createDeferredPromise,t.createHex=h.createHex,t.createModuleLogger=c.createModuleLogger,t.createNumber=h.createNumber,t.createProjectLogger=c.createProjectLogger,t.exactOptional=a.exactOptional,t.getChecksumAddress=p.getChecksumAddress,t.getErrorMessage=g.getErrorMessage,t.getJsonRpcIdValidator=a.getJsonRpcIdValidator,t.getJsonSize=a.getJsonSize,t.getKnownPropertyNames=y.getKnownPropertyNames,t.getSafeJson=a.getSafeJson,t.gtRange=s.gtRange,t.gtVersion=s.gtVersion,t.hasProperty=y.hasProperty,t.hexToBigInt=n.hexToBigInt,t.hexToBytes=p.hexToBytes,t.hexToNumber=n.hexToNumber,t.inMilliseconds=i.inMilliseconds,t.isASCII=y.isASCII,t.isBytes=p.isBytes,t.isCaipAccountAddress=u.isCaipAccountAddress,t.isCaipAccountId=u.isCaipAccountId,t.isCaipChainId=u.isCaipChainId,t.isCaipNamespace=u.isCaipNamespace,t.isCaipReference=u.isCaipReference,t.isErrorWithCode=g.isErrorWithCode,t.isErrorWithMessage=g.isErrorWithMessage,t.isErrorWithStack=g.isErrorWithStack,t.isHexString=p.isHexString,t.isJsonRpcError=a.isJsonRpcError,t.isJsonRpcFailure=a.isJsonRpcFailure,t.isJsonRpcNotification=a.isJsonRpcNotification,t.isJsonRpcRequest=a.isJsonRpcRequest,t.isJsonRpcResponse=a.isJsonRpcResponse,t.isJsonRpcSuccess=a.isJsonRpcSuccess,t.isNonEmptyArray=y.isNonEmptyArray,t.isNullOrUndefined=y.isNullOrUndefined,t.isObject=y.isObject,t.isPendingJsonRpcResponse=a.isPendingJsonRpcResponse,t.isPlainObject=y.isPlainObject,t.isStrictHexString=p.isStrictHexString,t.isValidChecksumAddress=p.isValidChecksumAddress,t.isValidHexAddress=p.isValidHexAddress,t.isValidJson=a.isValidJson,t.isValidSemVerRange=s.isValidSemVerRange,t.isValidSemVerVersion=s.isValidSemVerVersion,t.jsonrpc2=a.jsonrpc2,t.numberToBytes=p.numberToBytes,t.numberToHex=n.numberToHex,t.object=a.object,t.parseCaipAccountId=u.parseCaipAccountId,t.parseCaipChainId=u.parseCaipChainId,t.remove0x=p.remove0x,t.satisfiesVersionRange=s.satisfiesVersionRange,t.signedBigIntToBytes=p.signedBigIntToBytes,t.stringToBytes=p.stringToBytes,t.timeSince=i.timeSince,t.valueToBytes=p.valueToBytes,t.wrapError=g.wrapError},7557:(e,t)=>{"use strict";function r(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}function n(e){if("boolean"!=typeof e)throw new Error(`Expected boolean, not ${e}`)}function o(e,...t){if(!((r=e)instanceof Uint8Array||null!=r&&"object"==typeof r&&"Uint8Array"===r.constructor.name))throw new Error("Expected Uint8Array");var r;if(t.length>0&&!t.includes(e.length))throw new Error(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}function i(e){if("function"!=typeof e||"function"!=typeof e.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");r(e.outputLen),r(e.blockLen)}function s(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function a(e,t){o(e);const r=t.outputLen;if(e.length{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SHA2=void 0;const n=r(7557),o=r(9175);class i extends o.Hash{constructor(e,t,r,n){super(),this.blockLen=e,this.outputLen=t,this.padOffset=r,this.isLE=n,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=(0,o.createView)(this.buffer)}update(e){(0,n.exists)(this);const{view:t,buffer:r,blockLen:i}=this,s=(e=(0,o.toBytes)(e)).length;for(let n=0;ni-a&&(this.process(r,0),a=0);for(let e=a;e>o&i),a=Number(r&i),c=n?4:0,u=n?0:4;e.setUint32(t+c,s,n),e.setUint32(t+u,a,n)}(r,i-8,BigInt(8*this.length),s),this.process(r,0);const c=(0,o.createView)(e),u=this.outputLen;if(u%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const l=u/4,f=this.get();if(l>f.length)throw new Error("_sha2: outputLen bigger than state");for(let e=0;e{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.add5L=t.add5H=t.add4H=t.add4L=t.add3H=t.add3L=t.add=t.rotlBL=t.rotlBH=t.rotlSL=t.rotlSH=t.rotr32L=t.rotr32H=t.rotrBL=t.rotrBH=t.rotrSL=t.rotrSH=t.shrSL=t.shrSH=t.toBig=t.split=t.fromBig=void 0;const r=BigInt(2**32-1),n=BigInt(32);function o(e,t=!1){return t?{h:Number(e&r),l:Number(e>>n&r)}:{h:0|Number(e>>n&r),l:0|Number(e&r)}}function i(e,t=!1){let r=new Uint32Array(e.length),n=new Uint32Array(e.length);for(let i=0;iBigInt(e>>>0)<>>0);t.toBig=s;const a=(e,t,r)=>e>>>r;t.shrSH=a;const c=(e,t,r)=>e<<32-r|t>>>r;t.shrSL=c;const u=(e,t,r)=>e>>>r|t<<32-r;t.rotrSH=u;const l=(e,t,r)=>e<<32-r|t>>>r;t.rotrSL=l;const f=(e,t,r)=>e<<64-r|t>>>r-32;t.rotrBH=f;const h=(e,t,r)=>e>>>r-32|t<<64-r;t.rotrBL=h;const p=(e,t)=>t;t.rotr32H=p;const d=(e,t)=>e;t.rotr32L=d;const g=(e,t,r)=>e<>>32-r;t.rotlSH=g;const y=(e,t,r)=>t<>>32-r;t.rotlSL=y;const m=(e,t,r)=>t<>>64-r;t.rotlBH=m;const b=(e,t,r)=>e<>>64-r;function v(e,t,r,n){const o=(t>>>0)+(n>>>0);return{h:e+r+(o/2**32|0)|0,l:0|o}}t.rotlBL=b,t.add=v;const w=(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0);t.add3L=w;const E=(e,t,r,n)=>t+r+n+(e/2**32|0)|0;t.add3H=E;const x=(e,t,r,n)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0);t.add4L=x;const S=(e,t,r,n,o)=>t+r+n+o+(e/2**32|0)|0;t.add4H=S;const A=(e,t,r,n,o)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0)+(o>>>0);t.add5L=A;const I=(e,t,r,n,o,i)=>t+r+n+o+i+(e/2**32|0)|0;t.add5H=I;const B={fromBig:o,split:i,toBig:s,shrSH:a,shrSL:c,rotrSH:u,rotrSL:l,rotrBH:f,rotrBL:h,rotr32H:p,rotr32L:d,rotlSH:g,rotlSL:y,rotlBH:m,rotlBL:b,add:v,add3L:w,add3H:E,add4L:x,add4H:S,add5H:I,add5L:A};t.default=B},5145:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.crypto=void 0,t.crypto="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0},9615:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hmac=t.HMAC=void 0;const n=r(7557),o=r(9175);class i extends o.Hash{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,(0,n.hash)(e);const r=(0,o.toBytes)(t);if(this.iHash=e.create(),"function"!=typeof this.iHash.update)throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const i=this.blockLen,s=new Uint8Array(i);s.set(r.length>i?e.create().update(r).digest():r);for(let e=0;enew i(e,t).update(r).digest(),t.hmac.create=(e,t)=>new i(e,t)},2623:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sha224=t.sha256=void 0;const n=r(915),o=r(9175),i=(e,t,r)=>e&t^e&r^t&r,s=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),a=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),c=new Uint32Array(64);class u extends n.SHA2{constructor(){super(64,32,8,!1),this.A=0|a[0],this.B=0|a[1],this.C=0|a[2],this.D=0|a[3],this.E=0|a[4],this.F=0|a[5],this.G=0|a[6],this.H=0|a[7]}get(){const{A:e,B:t,C:r,D:n,E:o,F:i,G:s,H:a}=this;return[e,t,r,n,o,i,s,a]}set(e,t,r,n,o,i,s,a){this.A=0|e,this.B=0|t,this.C=0|r,this.D=0|n,this.E=0|o,this.F=0|i,this.G=0|s,this.H=0|a}process(e,t){for(let r=0;r<16;r++,t+=4)c[r]=e.getUint32(t,!1);for(let e=16;e<64;e++){const t=c[e-15],r=c[e-2],n=(0,o.rotr)(t,7)^(0,o.rotr)(t,18)^t>>>3,i=(0,o.rotr)(r,17)^(0,o.rotr)(r,19)^r>>>10;c[e]=i+c[e-7]+n+c[e-16]|0}let{A:r,B:n,C:a,D:u,E:l,F:f,G:h,H:p}=this;for(let e=0;e<64;e++){const t=p+((0,o.rotr)(l,6)^(0,o.rotr)(l,11)^(0,o.rotr)(l,25))+((d=l)&f^~d&h)+s[e]+c[e]|0,g=((0,o.rotr)(r,2)^(0,o.rotr)(r,13)^(0,o.rotr)(r,22))+i(r,n,a)|0;p=h,h=f,f=l,l=u+t|0,u=a,a=n,n=r,r=t+g|0}var d;r=r+this.A|0,n=n+this.B|0,a=a+this.C|0,u=u+this.D|0,l=l+this.E|0,f=f+this.F|0,h=h+this.G|0,p=p+this.H|0,this.set(r,n,a,u,l,f,h,p)}roundClean(){c.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}class l extends u{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}}t.sha256=(0,o.wrapConstructor)((()=>new u)),t.sha224=(0,o.wrapConstructor)((()=>new l))},2955:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.shake256=t.shake128=t.keccak_512=t.keccak_384=t.keccak_256=t.keccak_224=t.sha3_512=t.sha3_384=t.sha3_256=t.sha3_224=t.Keccak=t.keccakP=void 0;const n=r(7557),o=r(2318),i=r(9175),[s,a,c]=[[],[],[]],u=BigInt(0),l=BigInt(1),f=BigInt(2),h=BigInt(7),p=BigInt(256),d=BigInt(113);for(let e=0,t=l,r=1,n=0;e<24;e++){[r,n]=[n,(2*r+3*n)%5],s.push(2*(5*n+r)),a.push((e+1)*(e+2)/2%64);let o=u;for(let e=0;e<7;e++)t=(t<>h)*d)%p,t&f&&(o^=l<<(l<r>32?(0,o.rotlBH)(e,t,r):(0,o.rotlSH)(e,t,r),b=(e,t,r)=>r>32?(0,o.rotlBL)(e,t,r):(0,o.rotlSL)(e,t,r);function v(e,t=24){const r=new Uint32Array(10);for(let n=24-t;n<24;n++){for(let t=0;t<10;t++)r[t]=e[t]^e[t+10]^e[t+20]^e[t+30]^e[t+40];for(let t=0;t<10;t+=2){const n=(t+8)%10,o=(t+2)%10,i=r[o],s=r[o+1],a=m(i,s,1)^r[n],c=b(i,s,1)^r[n+1];for(let r=0;r<50;r+=10)e[t+r]^=a,e[t+r+1]^=c}let t=e[2],o=e[3];for(let r=0;r<24;r++){const n=a[r],i=m(t,o,n),c=b(t,o,n),u=s[r];t=e[u],o=e[u+1],e[u]=i,e[u+1]=c}for(let t=0;t<50;t+=10){for(let n=0;n<10;n++)r[n]=e[t+n];for(let n=0;n<10;n++)e[t+n]^=~r[(n+2)%10]&r[(n+4)%10]}e[0]^=g[n],e[1]^=y[n]}r.fill(0)}t.keccakP=v;class w extends i.Hash{constructor(e,t,r,o=!1,s=24){if(super(),this.blockLen=e,this.suffix=t,this.outputLen=r,this.enableXOF=o,this.rounds=s,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,(0,n.number)(r),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=(0,i.u32)(this.state)}keccak(){v(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){(0,n.exists)(this);const{blockLen:t,state:r}=this,o=(e=(0,i.toBytes)(e)).length;for(let n=0;n=r&&this.keccak();const i=Math.min(r-this.posOut,o-n);e.set(t.subarray(this.posOut,this.posOut+i),n),this.posOut+=i,n+=i}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return(0,n.number)(e),this.xofInto(new Uint8Array(e))}digestInto(e){if((0,n.output)(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){const{blockLen:t,suffix:r,outputLen:n,rounds:o,enableXOF:i}=this;return e||(e=new w(t,r,n,i,o)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=o,e.suffix=r,e.outputLen=n,e.enableXOF=i,e.destroyed=this.destroyed,e}}t.Keccak=w;const E=(e,t,r)=>(0,i.wrapConstructor)((()=>new w(t,e,r)));t.sha3_224=E(6,144,28),t.sha3_256=E(6,136,32),t.sha3_384=E(6,104,48),t.sha3_512=E(6,72,64),t.keccak_224=E(1,144,28),t.keccak_256=E(1,136,32),t.keccak_384=E(1,104,48),t.keccak_512=E(1,72,64);const x=(e,t,r)=>(0,i.wrapXOFConstructorWithOpts)(((n={})=>new w(t,e,void 0===n.dkLen?r:n.dkLen,!0)));t.shake128=x(31,168,16),t.shake256=x(31,136,32)},9175:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.randomBytes=t.wrapXOFConstructorWithOpts=t.wrapConstructorWithOpts=t.wrapConstructor=t.checkOpts=t.Hash=t.concatBytes=t.toBytes=t.utf8ToBytes=t.asyncLoop=t.nextTick=t.hexToBytes=t.bytesToHex=t.isLE=t.rotr=t.createView=t.u32=t.u8=void 0;const n=r(5145);function o(e){return e instanceof Uint8Array||null!=e&&"object"==typeof e&&"Uint8Array"===e.constructor.name}if(t.u8=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),t.u32=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4)),t.createView=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),t.rotr=(e,t)=>e<<32-t|e>>>t,t.isLE=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],!t.isLE)throw new Error("Non little-endian hardware is not supported");const i=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));t.bytesToHex=function(e){if(!o(e))throw new Error("Uint8Array expected");let t="";for(let r=0;r=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:void 0}function a(e){if("string"!=typeof e)throw new Error("utf8ToBytes expected string, got "+typeof e);return new Uint8Array((new TextEncoder).encode(e))}function c(e){if("string"==typeof e&&(e=a(e)),!o(e))throw new Error("expected Uint8Array, got "+typeof e);return e}t.hexToBytes=function(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);const t=e.length,r=t/2;if(t%2)throw new Error("padded hex string expected, got unpadded hex of length "+t);const n=new Uint8Array(r);for(let t=0,o=0;t{},t.asyncLoop=async function(e,r,n){let o=Date.now();for(let i=0;i=0&&ee().update(c(t)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t},t.wrapConstructorWithOpts=function(e){const t=(t,r)=>e(r).update(c(t)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=t=>e(t),t},t.wrapXOFConstructorWithOpts=function(e){const t=(t,r)=>e(r).update(c(t)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=t=>e(t),t},t.randomBytes=function(e=32){if(n.crypto&&"function"==typeof n.crypto.getRandomValues)return n.crypto.getRandomValues(new Uint8Array(e));throw new Error("crypto.getRandomValues must be defined")}},3203:(e,t)=>{"use strict";function r(e){if(!Number.isSafeInteger(e))throw new Error(`Wrong integer: ${e}`)}function n(e){return e instanceof Uint8Array||null!=e&&"object"==typeof e&&"Uint8Array"===e.constructor.name}function o(...e){const t=e=>e,r=(e,t)=>r=>e(t(r));return{encode:e.map((e=>e.encode)).reduceRight(r,t),decode:e.map((e=>e.decode)).reduce(r,t)}}function i(e){return{encode:t=>{if(!Array.isArray(t)||t.length&&"number"!=typeof t[0])throw new Error("alphabet.encode input should be an array of numbers");return t.map((t=>{if(r(t),t<0||t>=e.length)throw new Error(`Digit index outside alphabet: ${t} (alphabet: ${e.length})`);return e[t]}))},decode:t=>{if(!Array.isArray(t)||t.length&&"string"!=typeof t[0])throw new Error("alphabet.decode input should be array of strings");return t.map((t=>{if("string"!=typeof t)throw new Error(`alphabet.decode: not string element=${t}`);const r=e.indexOf(t);if(-1===r)throw new Error(`Unknown letter: "${t}". Allowed: ${e}`);return r}))}}}function s(e=""){if("string"!=typeof e)throw new Error("join separator should be string");return{encode:t=>{if(!Array.isArray(t)||t.length&&"string"!=typeof t[0])throw new Error("join.encode input should be array of strings");for(let e of t)if("string"!=typeof e)throw new Error(`join.encode: non-string input=${e}`);return t.join(e)},decode:t=>{if("string"!=typeof t)throw new Error("join.decode input should be string");return t.split(e)}}}function a(e,t="="){if(r(e),"string"!=typeof t)throw new Error("padding chr should be string");return{encode(r){if(!Array.isArray(r)||r.length&&"string"!=typeof r[0])throw new Error("padding.encode input should be array of strings");for(let e of r)if("string"!=typeof e)throw new Error(`padding.encode: non-string input=${e}`);for(;r.length*e%8;)r.push(t);return r},decode(r){if(!Array.isArray(r)||r.length&&"string"!=typeof r[0])throw new Error("padding.encode input should be array of strings");for(let e of r)if("string"!=typeof e)throw new Error(`padding.decode: non-string input=${e}`);let n=r.length;if(n*e%8)throw new Error("Invalid padding: string should have whole number of bytes");for(;n>0&&r[n-1]===t;n--)if(!((n-1)*e%8))throw new Error("Invalid padding: string has too much padding");return r.slice(0,n)}}}function c(e){if("function"!=typeof e)throw new Error("normalize fn should be function");return{encode:e=>e,decode:t=>e(t)}}function u(e,t,n){if(t<2)throw new Error(`convertRadix: wrong from=${t}, base cannot be less than 2`);if(n<2)throw new Error(`convertRadix: wrong to=${n}, base cannot be less than 2`);if(!Array.isArray(e))throw new Error("convertRadix: data should be array");if(!e.length)return[];let o=0;const i=[],s=Array.from(e);for(s.forEach((e=>{if(r(e),e<0||e>=t)throw new Error(`Wrong integer: ${e}`)}));;){let e=0,r=!0;for(let i=o;it?l(t,e%t):e,f=(e,t)=>e+(t-l(e,t));function h(e,t,n,o){if(!Array.isArray(e))throw new Error("convertRadix2: data should be array");if(t<=0||t>32)throw new Error(`convertRadix2: wrong from=${t}`);if(n<=0||n>32)throw new Error(`convertRadix2: wrong to=${n}`);if(f(t,n)>32)throw new Error(`convertRadix2: carry overflow from=${t} to=${n} carryBits=${f(t,n)}`);let i=0,s=0;const a=2**n-1,c=[];for(const o of e){if(r(o),o>=2**t)throw new Error(`convertRadix2: invalid data word=${o} from=${t}`);if(i=i<32)throw new Error(`convertRadix2: carry overflow pos=${s} from=${t}`);for(s+=t;s>=n;s-=n)c.push((i>>s-n&a)>>>0);i&=2**s-1}if(i=i<=t)throw new Error("Excess padding");if(!o&&i)throw new Error(`Non-zero padding: ${i}`);return o&&s>0&&c.push(i>>>0),c}function p(e){return r(e),{encode:t=>{if(!n(t))throw new Error("radix.encode input should be Uint8Array");return u(Array.from(t),256,e)},decode:t=>{if(!Array.isArray(t)||t.length&&"number"!=typeof t[0])throw new Error("radix.decode input should be array of numbers");return Uint8Array.from(u(t,e,256))}}}function d(e,t=!1){if(r(e),e<=0||e>32)throw new Error("radix2: bits should be in (0..32]");if(f(8,e)>32||f(e,8)>32)throw new Error("radix2: carry overflow");return{encode:r=>{if(!n(r))throw new Error("radix2.encode input should be Uint8Array");return h(Array.from(r),8,e,!t)},decode:r=>{if(!Array.isArray(r)||r.length&&"number"!=typeof r[0])throw new Error("radix2.decode input should be array of numbers");return Uint8Array.from(h(r,e,8,t))}}}function g(e){if("function"!=typeof e)throw new Error("unsafeWrapper fn should be function");return function(...t){try{return e.apply(null,t)}catch(e){}}}function y(e,t){if(r(e),"function"!=typeof t)throw new Error("checksum fn should be function");return{encode(r){if(!n(r))throw new Error("checksum.encode: input should be Uint8Array");const o=t(r).slice(0,e),i=new Uint8Array(r.length+e);return i.set(r),i.set(o,r.length),i},decode(r){if(!n(r))throw new Error("checksum.decode: input should be Uint8Array");const o=r.slice(0,-e),i=t(o).slice(0,e),s=r.slice(-e);for(let t=0;te.toUpperCase().replace(/O/g,"0").replace(/[IL]/g,"1")))),t.base64=o(d(6),i("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),a(6),s("")),t.base64url=o(d(6),i("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"),a(6),s("")),t.base64urlnopad=o(d(6),i("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"),s(""));const m=e=>o(p(58),i(e),s(""));t.base58=m("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),t.base58flickr=m("123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"),t.base58xrp=m("rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz");const b=[0,2,3,5,6,7,9,10,11];t.base58xmr={encode(e){let r="";for(let n=0;no(y(4,(t=>e(e(t)))),t.base58),t.base58check=t.createBase58check;const v=o(i("qpzry9x8gf2tvdw0s3jn54khce6mua7l"),s("")),w=[996825010,642813549,513874426,1027748829,705979059];function E(e){const t=e>>25;let r=(33554431&e)<<5;for(let e=0;e>e&1)&&(r^=w[e]);return r}function x(e,t,r=1){const n=e.length;let o=1;for(let t=0;t126)throw new Error(`Invalid prefix (${e})`);o=E(o)^r>>5}o=E(o);for(let t=0;tr)throw new TypeError(`Wrong string length: ${e.length} (${e}). Expected (8..${r})`);const n=e.toLowerCase();if(e!==n&&e!==e.toUpperCase())throw new Error("String must be lowercase or uppercase");const o=(e=n).lastIndexOf("1");if(0===o||-1===o)throw new Error('Letter "1" must be present between prefix and data only');const i=e.slice(0,o),s=e.slice(o+1);if(s.length<6)throw new Error("Data must be at least 6 characters long");const a=v.decode(s).slice(0,-6),c=x(i,a,t);if(!s.endsWith(c))throw new Error(`Invalid checksum in ${e}: expected "${c}"`);return{prefix:i,words:a}}return{encode:function(e,r,n=90){if("string"!=typeof e)throw new Error("bech32.encode prefix should be string, not "+typeof e);if(!Array.isArray(r)||r.length&&"number"!=typeof r[0])throw new Error("bech32.encode words should be array of numbers, not "+typeof r);const o=e.length+7+r.length;if(!1!==n&&o>n)throw new TypeError(`Length ${o} exceeds limit ${n}`);const i=e.toLowerCase(),s=x(i,r,t);return`${i}1${v.encode(r)}${s}`},decode:s,decodeToBytes:function(e){const{prefix:t,words:r}=s(e,!1);return{prefix:t,words:r,bytes:n(r)}},decodeUnsafe:g(s),fromWords:n,fromWordsUnsafe:i,toWords:o}}t.bech32=S("bech32"),t.bech32m=S("bech32m"),t.utf8={encode:e=>(new TextDecoder).decode(e),decode:e=>(new TextEncoder).encode(e)},t.hex=o(d(4),i("0123456789abcdef"),s(""),c((e=>{if("string"!=typeof e||e.length%2)throw new TypeError(`hex.decode: expected string, got ${typeof e} with length ${e.length}`);return e.toLowerCase()})));const A={utf8:t.utf8,hex:t.hex,base16:t.base16,base32:t.base32,base64:t.base64,base64url:t.base64url,base58:t.base58,base58xmr:t.base58xmr},I="Invalid encoding type. Available types: utf8, hex, base16, base32, base64, base64url, base58, base58xmr";t.bytesToString=(e,t)=>{if("string"!=typeof e||!A.hasOwnProperty(e))throw new TypeError(I);if(!n(t))throw new TypeError("bytesToString() expects Uint8Array");return A[e].encode(t)},t.str=t.bytesToString,t.stringToBytes=(e,t)=>{if(!A.hasOwnProperty(e))throw new TypeError(I);if("string"!=typeof t)throw new TypeError("stringToBytes() expects string");return A[e].decode(t)},t.bytes=t.stringToBytes},544:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.req=t.json=t.toBuffer=void 0;const s=i(r(5891)),a=i(r(917));async function c(e){let t=0;const r=[];for await(const n of e)t+=n.length,r.push(n);return Buffer.concat(r,t)}t.toBuffer=c,t.json=async function(e){const t=(await c(e)).toString("utf8");try{return JSON.parse(t)}catch(e){const r=e;throw r.message+=` (input: ${t})`,r}},t.req=function(e,t={}){const r=(("string"==typeof e?e:e.href).startsWith("https:")?a:s).request(e,t),n=new Promise(((e,t)=>{r.once("response",e).once("error",t).end()}));return r.then=n.then.bind(n),r}},917:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t},s=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.Agent=void 0;const a=i(r(5891));s(r(544),t);const c=Symbol("AgentBaseInternalState");class u extends a.Agent{constructor(e){super(e),this[c]={}}isSecureEndpoint(e){if(e){if("boolean"==typeof e.secureEndpoint)return e.secureEndpoint;if("string"==typeof e.protocol)return"https:"===e.protocol}const{stack:t}=new Error;return"string"==typeof t&&t.split("\n").some((e=>-1!==e.indexOf("(https.js:")||-1!==e.indexOf("node:https:")))}createSocket(e,t,r){const n={...t,secureEndpoint:this.isSecureEndpoint(t)};Promise.resolve().then((()=>this.connect(e,n))).then((o=>{if(o instanceof a.Agent)return o.addRequest(e,n);this[c].currentSocket=o,super.createSocket(e,t,r)}),r)}createConnection(){const e=this[c].currentSocket;if(this[c].currentSocket=void 0,!e)throw new Error("No socket was returned in the `connect()` function");return e}get defaultPort(){return this[c].defaultPort??("https:"===this.protocol?443:80)}set defaultPort(e){this[c]&&(this[c].defaultPort=e)}get protocol(){return this[c].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(e){this[c]&&(this[c].protocol=e)}}t.Agent=u},7526:(e,t)=>{"use strict";t.byteLength=function(e){var t=c(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,i=c(e),s=i[0],a=i[1],u=new o(function(e,t,r){return 3*(t+r)/4-r}(0,s,a)),l=0,f=a>0?s-4:s;for(r=0;r>16&255,u[l++]=t>>8&255,u[l++]=255&t;return 2===a&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,u[l++]=255&t),1===a&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,u[l++]=t>>8&255,u[l++]=255&t),u},t.fromByteArray=function(e){for(var t,n=e.length,o=n%3,i=[],s=16383,a=0,c=n-o;ac?c:a+s));return 1===o?(t=e[n-1],i.push(r[t>>2]+r[t<<4&63]+"==")):2===o&&(t=(e[n-2]<<8)+e[n-1],i.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),i.join("")};for(var r=[],n=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,a=i.length;s0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function u(e,t,n){for(var o,i,s=[],a=t;a>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return s.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},9213:function(e,t,r){var n;!function(o){"use strict";var i,s=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,a=Math.ceil,c=Math.floor,u="[BigNumber Error] ",l=u+"Number primitive has more than 15 significant digits: ",f=1e14,h=14,p=9007199254740991,d=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],g=1e7,y=1e9;function m(e){var t=0|e;return e>0||e===t?t:t-1}function b(e){for(var t,r,n=1,o=e.length,i=e[0]+"";nu^r?1:-1;for(a=(c=o.length)<(u=i.length)?c:u,s=0;si[s]^r?1:-1;return c==u?0:c>u^r?1:-1}function w(e,t,r,n){if(er||e!==c(e))throw Error(u+(n||"Argument")+("number"==typeof e?er?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function E(e){var t=e.c.length-1;return m(e.e/h)==t&&e.c[t]%2!=0}function x(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function S(e,t,r){var n,o;if(t<0){for(o=r+".";++t;o+=r);e=o+e}else if(++t>(n=e.length)){for(o=r,t-=n;--t;o+=r);e+=o}else tM?m.c=m.e=null:e.e=10;f/=10,u++);return void(u>M?m.c=m.e=null:(m.e=u,m.c=[e]))}y=String(e)}else{if(!s.test(y=String(e)))return o(m,y,d);m.s=45==y.charCodeAt(0)?(y=y.slice(1),-1):1}(u=y.indexOf("."))>-1&&(y=y.replace(".","")),(f=y.search(/e/i))>0?(u<0&&(u=f),u+=+y.slice(f+1),y=y.substring(0,f)):u<0&&(u=y.length)}else{if(w(t,2,H.length,"Base"),10==t)return Y(m=new z(e),O+m.e+1,k);if(y=String(e),d="number"==typeof e){if(0*e!=0)return o(m,y,d,t);if(m.s=1/e<0?(y=y.slice(1),-1):1,z.DEBUG&&y.replace(/^0\.0*|\./,"").length>15)throw Error(l+e)}else m.s=45===y.charCodeAt(0)?(y=y.slice(1),-1):1;for(r=H.slice(0,t),u=f=0,g=y.length;fu){u=g;continue}}else if(!a&&(y==y.toUpperCase()&&(y=y.toLowerCase())||y==y.toLowerCase()&&(y=y.toUpperCase()))){a=!0,f=-1,u=0;continue}return o(m,String(e),d,t)}d=!1,(u=(y=n(y,t,10,m.s)).indexOf("."))>-1?y=y.replace(".",""):u=y.length}for(f=0;48===y.charCodeAt(f);f++);for(g=y.length;48===y.charCodeAt(--g););if(y=y.slice(f,++g)){if(g-=f,d&&z.DEBUG&&g>15&&(e>p||e!==c(e)))throw Error(l+m.s*e);if((u=u-f-1)>M)m.c=m.e=null;else if(u=L)?x(c,s):S(c,s,"0");else if(i=(e=Y(new z(e),t,r)).e,a=(c=b(e.c)).length,1==n||2==n&&(t<=i||i<=N)){for(;aa){if(--t>0)for(c+=".";t--;c+="0");}else if((t+=i-a)>0)for(i+1==a&&(c+=".");t--;c+="0");return e.s<0&&o?"-"+c:c}function V(e,t){for(var r,n=1,o=new z(e[0]);n=10;o/=10,n++);return(r=n+r*h-1)>M?e.c=e.e=null:r=10;u/=10,o++);if((i=t-o)<0)i+=h,s=t,g=(l=y[p=0])/m[o-s-1]%10|0;else if((p=a((i+1)/h))>=y.length){if(!n)break e;for(;y.length<=p;y.push(0));l=g=0,o=1,s=(i%=h)-h+1}else{for(l=u=y[p],o=1;u>=10;u/=10,o++);g=(s=(i%=h)-h+o)<0?0:l/m[o-s-1]%10|0}if(n=n||t<0||null!=y[p+1]||(s<0?l:l%m[o-s-1]),n=r<4?(g||n)&&(0==r||r==(e.s<0?3:2)):g>5||5==g&&(4==r||n||6==r&&(i>0?s>0?l/m[o-s]:0:y[p-1])%10&1||r==(e.s<0?8:7)),t<1||!y[0])return y.length=0,n?(t-=e.e+1,y[0]=m[(h-t%h)%h],e.e=-t||0):y[0]=e.e=0,e;if(0==i?(y.length=p,u=1,p--):(y.length=p+1,u=m[h-i],y[p]=s>0?c(l/m[o-s]%m[s])*u:0),n)for(;;){if(0==p){for(i=1,s=y[0];s>=10;s/=10,i++);for(s=y[0]+=u,u=1;s>=10;s/=10,u++);i!=u&&(e.e++,y[0]==f&&(y[0]=1));break}if(y[p]+=u,y[p]!=f)break;y[p--]=0,u=1}for(i=y.length;0===y[--i];y.pop());}e.e>M?e.c=e.e=null:e.e=L?x(t,r):S(t,r,"0"),e.s<0?"-"+t:t)}return z.clone=e,z.ROUND_UP=0,z.ROUND_DOWN=1,z.ROUND_CEIL=2,z.ROUND_FLOOR=3,z.ROUND_HALF_UP=4,z.ROUND_HALF_DOWN=5,z.ROUND_HALF_EVEN=6,z.ROUND_HALF_CEIL=7,z.ROUND_HALF_FLOOR=8,z.EUCLID=9,z.config=z.set=function(e){var t,r;if(null!=e){if("object"!=typeof e)throw Error(u+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(w(r=e[t],0,y,t),O=r),e.hasOwnProperty(t="ROUNDING_MODE")&&(w(r=e[t],0,8,t),k=r),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((r=e[t])&&r.pop?(w(r[0],-y,0,t),w(r[1],0,y,t),N=r[0],L=r[1]):(w(r,-y,y,t),N=-(L=r<0?-r:r))),e.hasOwnProperty(t="RANGE"))if((r=e[t])&&r.pop)w(r[0],-y,-1,t),w(r[1],1,y,t),j=r[0],M=r[1];else{if(w(r,-y,y,t),!r)throw Error(u+t+" cannot be zero: "+r);j=-(M=r<0?-r:r)}if(e.hasOwnProperty(t="CRYPTO")){if((r=e[t])!==!!r)throw Error(u+t+" not true or false: "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw $=!r,Error(u+"crypto unavailable");$=r}else $=r}if(e.hasOwnProperty(t="MODULO_MODE")&&(w(r=e[t],0,9,t),U=r),e.hasOwnProperty(t="POW_PRECISION")&&(w(r=e[t],0,y,t),F=r),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(r=e[t]))throw Error(u+t+" not an object: "+r);D=r}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(r=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(r))throw Error(u+t+" invalid: "+r);H=r}}return{DECIMAL_PLACES:O,ROUNDING_MODE:k,EXPONENTIAL_AT:[N,L],RANGE:[j,M],CRYPTO:$,MODULO_MODE:U,POW_PRECISION:F,FORMAT:D,ALPHABET:H}},z.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!z.DEBUG)return!0;var t,r,n=e.c,o=e.e,i=e.s;e:if("[object Array]"=={}.toString.call(n)){if((1===i||-1===i)&&o>=-y&&o<=y&&o===c(o)){if(0===n[0]){if(0===o&&1===n.length)return!0;break e}if((t=(o+1)%h)<1&&(t+=h),String(n[0]).length==t){for(t=0;t=f||r!==c(r))break e;if(0!==r)return!0}}}else if(null===n&&null===o&&(null===i||1===i||-1===i))return!0;throw Error(u+"Invalid BigNumber: "+e)},z.maximum=z.max=function(){return V(arguments,_.lt)},z.minimum=z.min=function(){return V(arguments,_.gt)},z.random=(i=9007199254740992,A=Math.random()*i&2097151?function(){return c(Math.random()*i)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,r,n,o,i,s=0,l=[],f=new z(R);if(null==e?e=O:w(e,0,y),o=a(e/h),$)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(o*=2));s>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),t[s]=r[0],t[s+1]=r[1]):(l.push(i%1e14),s+=2);s=o/2}else{if(!crypto.randomBytes)throw $=!1,Error(u+"crypto unavailable");for(t=crypto.randomBytes(o*=7);s=9e15?crypto.randomBytes(7).copy(t,s):(l.push(i%1e14),s+=7);s=o/7}if(!$)for(;s=10;i/=10,s++);sr-1&&(null==s[o+1]&&(s[o+1]=0),s[o+1]+=s[o]/r|0,s[o]%=r)}return s.reverse()}return function(n,o,i,s,a){var c,u,l,f,h,p,d,g,y=n.indexOf("."),m=O,v=k;for(y>=0&&(f=F,F=0,n=n.replace(".",""),p=(g=new z(o)).pow(n.length-y),F=f,g.c=t(S(b(p.c),p.e,"0"),10,i,e),g.e=g.c.length),l=f=(d=t(n,o,i,a?(c=H,e):(c=e,H))).length;0==d[--f];d.pop());if(!d[0])return c.charAt(0);if(y<0?--l:(p.c=d,p.e=l,p.s=s,d=(p=r(p,g,m,v,i)).c,h=p.r,l=p.e),y=d[u=l+m+1],f=i/2,h=h||u<0||null!=d[u+1],h=v<4?(null!=y||h)&&(0==v||v==(p.s<0?3:2)):y>f||y==f&&(4==v||h||6==v&&1&d[u-1]||v==(p.s<0?8:7)),u<1||!d[0])n=h?S(c.charAt(1),-m,c.charAt(0)):c.charAt(0);else{if(d.length=u,h)for(--i;++d[--u]>i;)d[u]=0,u||(++l,d=[1].concat(d));for(f=d.length;!d[--f];);for(y=0,n="";y<=f;n+=c.charAt(d[y++]));n=S(n,l,c.charAt(0))}return n}}(),r=function(){function e(e,t,r){var n,o,i,s,a=0,c=e.length,u=t%g,l=t/g|0;for(e=e.slice();c--;)a=((o=u*(i=e[c]%g)+(n=l*i+(s=e[c]/g|0)*u)%g*g+a)/r|0)+(n/g|0)+l*s,e[c]=o%r;return a&&(e=[a].concat(e)),e}function t(e,t,r,n){var o,i;if(r!=n)i=r>n?1:-1;else for(o=i=0;ot[o]?1:-1;break}return i}function r(e,t,r,n){for(var o=0;r--;)e[r]-=o,o=e[r]1;e.splice(0,1));}return function(n,o,i,s,a){var u,l,p,d,g,y,b,v,w,E,x,S,A,I,B,T,P,C=n.s==o.s?1:-1,_=n.c,R=o.c;if(!(_&&_[0]&&R&&R[0]))return new z(n.s&&o.s&&(_?!R||_[0]!=R[0]:R)?_&&0==_[0]||!R?0*C:C/0:NaN);for(w=(v=new z(C)).c=[],C=i+(l=n.e-o.e)+1,a||(a=f,l=m(n.e/h)-m(o.e/h),C=C/h|0),p=0;R[p]==(_[p]||0);p++);if(R[p]>(_[p]||0)&&l--,C<0)w.push(1),d=!0;else{for(I=_.length,T=R.length,p=0,C+=2,(g=c(a/(R[0]+1)))>1&&(R=e(R,g,a),_=e(_,g,a),T=R.length,I=_.length),A=T,x=(E=_.slice(0,T)).length;x=a/2&&B++;do{if(g=0,(u=t(R,E,T,x))<0){if(S=E[0],T!=x&&(S=S*a+(E[1]||0)),(g=c(S/B))>1)for(g>=a&&(g=a-1),b=(y=e(R,g,a)).length,x=E.length;1==t(y,E,b,x);)g--,r(y,T=10;C/=10,p++);Y(v,i+(v.e=p+l*h-1)+1,s,d)}else v.e=l,v.r=+d;return v}}(),I=/^(-?)0([xbo])(?=\w[\w.]*$)/i,B=/^([^.]+)\.$/,T=/^\.([^.]+)$/,P=/^-?(Infinity|NaN)$/,C=/^\s*\+(?=[\w.])|^\s+|\s+$/g,o=function(e,t,r,n){var o,i=r?t:t.replace(C,"");if(P.test(i))e.s=isNaN(i)?null:i<0?-1:1;else{if(!r&&(i=i.replace(I,(function(e,t,r){return o="x"==(r=r.toLowerCase())?16:"b"==r?2:8,n&&n!=o?e:t})),n&&(o=n,i=i.replace(B,"$1").replace(T,"0.$1")),t!=i))return new z(i,o);if(z.DEBUG)throw Error(u+"Not a"+(n?" base "+n:"")+" number: "+t);e.s=null}e.c=e.e=null},_.absoluteValue=_.abs=function(){var e=new z(this);return e.s<0&&(e.s=1),e},_.comparedTo=function(e,t){return v(this,new z(e,t))},_.decimalPlaces=_.dp=function(e,t){var r,n,o,i=this;if(null!=e)return w(e,0,y),null==t?t=k:w(t,0,8),Y(new z(i),e+i.e+1,t);if(!(r=i.c))return null;if(n=((o=r.length-1)-m(this.e/h))*h,o=r[o])for(;o%10==0;o/=10,n--);return n<0&&(n=0),n},_.dividedBy=_.div=function(e,t){return r(this,new z(e,t),O,k)},_.dividedToIntegerBy=_.idiv=function(e,t){return r(this,new z(e,t),0,1)},_.exponentiatedBy=_.pow=function(e,t){var r,n,o,i,s,l,f,p,d=this;if((e=new z(e)).c&&!e.isInteger())throw Error(u+"Exponent not an integer: "+W(e));if(null!=t&&(t=new z(t)),s=e.e>14,!d.c||!d.c[0]||1==d.c[0]&&!d.e&&1==d.c.length||!e.c||!e.c[0])return p=new z(Math.pow(+W(d),s?2-E(e):+W(e))),t?p.mod(t):p;if(l=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new z(NaN);(n=!l&&d.isInteger()&&t.isInteger())&&(d=d.mod(t))}else{if(e.e>9&&(d.e>0||d.e<-1||(0==d.e?d.c[0]>1||s&&d.c[1]>=24e7:d.c[0]<8e13||s&&d.c[0]<=9999975e7)))return i=d.s<0&&E(e)?-0:0,d.e>-1&&(i=1/i),new z(l?1/i:i);F&&(i=a(F/h+2))}for(s?(r=new z(.5),l&&(e.s=1),f=E(e)):f=(o=Math.abs(+W(e)))%2,p=new z(R);;){if(f){if(!(p=p.times(d)).c)break;i?p.c.length>i&&(p.c.length=i):n&&(p=p.mod(t))}if(o){if(0===(o=c(o/2)))break;f=o%2}else if(Y(e=e.times(r),e.e+1,1),e.e>14)f=E(e);else{if(0==(o=+W(e)))break;f=o%2}d=d.times(d),i?d.c&&d.c.length>i&&(d.c.length=i):n&&(d=d.mod(t))}return n?p:(l&&(p=R.div(p)),t?p.mod(t):i?Y(p,F,k,void 0):p)},_.integerValue=function(e){var t=new z(this);return null==e?e=k:w(e,0,8),Y(t,t.e+1,e)},_.isEqualTo=_.eq=function(e,t){return 0===v(this,new z(e,t))},_.isFinite=function(){return!!this.c},_.isGreaterThan=_.gt=function(e,t){return v(this,new z(e,t))>0},_.isGreaterThanOrEqualTo=_.gte=function(e,t){return 1===(t=v(this,new z(e,t)))||0===t},_.isInteger=function(){return!!this.c&&m(this.e/h)>this.c.length-2},_.isLessThan=_.lt=function(e,t){return v(this,new z(e,t))<0},_.isLessThanOrEqualTo=_.lte=function(e,t){return-1===(t=v(this,new z(e,t)))||0===t},_.isNaN=function(){return!this.s},_.isNegative=function(){return this.s<0},_.isPositive=function(){return this.s>0},_.isZero=function(){return!!this.c&&0==this.c[0]},_.minus=function(e,t){var r,n,o,i,s=this,a=s.s;if(t=(e=new z(e,t)).s,!a||!t)return new z(NaN);if(a!=t)return e.s=-t,s.plus(e);var c=s.e/h,u=e.e/h,l=s.c,p=e.c;if(!c||!u){if(!l||!p)return l?(e.s=-t,e):new z(p?s:NaN);if(!l[0]||!p[0])return p[0]?(e.s=-t,e):new z(l[0]?s:3==k?-0:0)}if(c=m(c),u=m(u),l=l.slice(),a=c-u){for((i=a<0)?(a=-a,o=l):(u=c,o=p),o.reverse(),t=a;t--;o.push(0));o.reverse()}else for(n=(i=(a=l.length)<(t=p.length))?a:t,a=t=0;t0)for(;t--;l[r++]=0);for(t=f-1;n>a;){if(l[--n]=0;){for(r=0,d=S[o]%w,y=S[o]/w|0,i=o+(s=c);i>o;)r=((u=d*(u=x[--s]%w)+(a=y*u+(l=x[s]/w|0)*d)%w*w+b[i]+r)/v|0)+(a/w|0)+y*l,b[i--]=u%v;b[i]=r}return r?++n:b.splice(0,1),Z(e,b,n)},_.negated=function(){var e=new z(this);return e.s=-e.s||null,e},_.plus=function(e,t){var r,n=this,o=n.s;if(t=(e=new z(e,t)).s,!o||!t)return new z(NaN);if(o!=t)return e.s=-t,n.minus(e);var i=n.e/h,s=e.e/h,a=n.c,c=e.c;if(!i||!s){if(!a||!c)return new z(o/0);if(!a[0]||!c[0])return c[0]?e:new z(a[0]?n:0*o)}if(i=m(i),s=m(s),a=a.slice(),o=i-s){for(o>0?(s=i,r=c):(o=-o,r=a),r.reverse();o--;r.push(0));r.reverse()}for((o=a.length)-(t=c.length)<0&&(r=c,c=a,a=r,t=o),o=0;t;)o=(a[--t]=a[t]+c[t]+o)/f|0,a[t]=f===a[t]?0:a[t]%f;return o&&(a=[o].concat(a),++s),Z(e,a,s)},_.precision=_.sd=function(e,t){var r,n,o,i=this;if(null!=e&&e!==!!e)return w(e,1,y),null==t?t=k:w(t,0,8),Y(new z(i),e,t);if(!(r=i.c))return null;if(n=(o=r.length-1)*h+1,o=r[o]){for(;o%10==0;o/=10,n--);for(o=r[0];o>=10;o/=10,n++);}return e&&i.e+1>n&&(n=i.e+1),n},_.shiftedBy=function(e){return w(e,-9007199254740991,p),this.times("1e"+e)},_.squareRoot=_.sqrt=function(){var e,t,n,o,i,s=this,a=s.c,c=s.s,u=s.e,l=O+4,f=new z("0.5");if(1!==c||!a||!a[0])return new z(!c||c<0&&(!a||a[0])?NaN:a?s:1/0);if(0==(c=Math.sqrt(+W(s)))||c==1/0?(((t=b(a)).length+u)%2==0&&(t+="0"),c=Math.sqrt(+t),u=m((u+1)/2)-(u<0||u%2),n=new z(t=c==1/0?"5e"+u:(t=c.toExponential()).slice(0,t.indexOf("e")+1)+u)):n=new z(c+""),n.c[0])for((c=(u=n.e)+l)<3&&(c=0);;)if(i=n,n=f.times(i.plus(r(s,i,l,1))),b(i.c).slice(0,c)===(t=b(n.c)).slice(0,c)){if(n.e0&&g>0){for(i=g%a||a,f=d.substr(0,i);i0&&(f+=l+d.slice(i)),p&&(f="-"+f)}n=h?f+(r.decimalSeparator||"")+((c=+r.fractionGroupSize)?h.replace(new RegExp("\\d{"+c+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):h):f}return(r.prefix||"")+n+(r.suffix||"")},_.toFraction=function(e){var t,n,o,i,s,a,c,l,f,p,g,y,m=this,v=m.c;if(null!=e&&(!(c=new z(e)).isInteger()&&(c.c||1!==c.s)||c.lt(R)))throw Error(u+"Argument "+(c.isInteger()?"out of range: ":"not an integer: ")+W(c));if(!v)return new z(m);for(t=new z(R),f=n=new z(R),o=l=new z(R),y=b(v),s=t.e=y.length-m.e-1,t.c[0]=d[(a=s%h)<0?h+a:a],e=!e||c.comparedTo(t)>0?s>0?t:f:c,a=M,M=1/0,c=new z(y),l.c[0]=0;p=r(c,t,0,1),1!=(i=n.plus(p.times(o))).comparedTo(e);)n=o,o=i,f=l.plus(p.times(i=f)),l=i,t=c.minus(p.times(i=t)),c=i;return i=r(e.minus(n),o,0,1),l=l.plus(i.times(f)),n=n.plus(i.times(o)),l.s=f.s=m.s,g=r(f,o,s*=2,k).minus(m).abs().comparedTo(r(l,n,s,k).minus(m).abs())<1?[f,o]:[l,n],M=a,g},_.toNumber=function(){return+W(this)},_.toPrecision=function(e,t){return null!=e&&w(e,1,y),G(this,e,t,2)},_.toString=function(e){var t,r=this,o=r.s,i=r.e;return null===i?o?(t="Infinity",o<0&&(t="-"+t)):t="NaN":(null==e?t=i<=N||i>=L?x(b(r.c),i):S(b(r.c),i,"0"):10===e?t=S(b((r=Y(new z(r),O+i+1,k)).c),r.e,"0"):(w(e,2,H.length,"Base"),t=n(S(b(r.c),i,"0"),10,e,o,!0)),o<0&&r.c[0]&&(t="-"+t)),t},_.valueOf=_.toJSON=function(){return W(this)},_._isBigNumber=!0,null!=t&&z.set(t),z}(),i.default=i.BigNumber=i,void 0===(n=function(){return i}.call(t,r,t,e))||(e.exports=n)}()},8287:(e,t,r)=>{"use strict";var n=r(7526),o=r(251),i=r(4634);function s(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(e,t){if(s()=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|e}function d(e,t){if(c.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return F(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return D(e).length;default:if(n)return F(e).length;t=(""+t).toLowerCase(),n=!0}}function g(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return _(this,t,r);case"utf8":case"utf-8":return B(this,t,r);case"ascii":return P(this,t,r);case"latin1":case"binary":return C(this,t,r);case"base64":return I(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function y(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function m(e,t,r,n,o){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=o?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(o)return-1;r=e.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof t&&(t=c.from(t,n)),c.isBuffer(t))return 0===t.length?-1:b(e,t,r,n,o);if("number"==typeof t)return t&=255,c.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):b(e,[t],r,n,o);throw new TypeError("val must be string, number or Buffer")}function b(e,t,r,n,o){var i,s=1,a=e.length,c=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;s=2,a/=2,c/=2,r/=2}function u(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(o){var l=-1;for(i=r;ia&&(r=a-c),i=r;i>=0;i--){for(var f=!0,h=0;ho&&(n=o):n=o;var i=t.length;if(i%2!=0)throw new TypeError("Invalid hex string");n>i/2&&(n=i/2);for(var s=0;s>8,o=r%256,i.push(o),i.push(n);return i}(t,e.length-r),e,r,n)}function I(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function B(e,t,r){r=Math.min(e.length,r);for(var n=[],o=t;o239?4:u>223?3:u>191?2:1;if(o+f<=r)switch(f){case 1:u<128&&(l=u);break;case 2:128==(192&(i=e[o+1]))&&(c=(31&u)<<6|63&i)>127&&(l=c);break;case 3:i=e[o+1],s=e[o+2],128==(192&i)&&128==(192&s)&&(c=(15&u)<<12|(63&i)<<6|63&s)>2047&&(c<55296||c>57343)&&(l=c);break;case 4:i=e[o+1],s=e[o+2],a=e[o+3],128==(192&i)&&128==(192&s)&&128==(192&a)&&(c=(15&u)<<18|(63&i)<<12|(63&s)<<6|63&a)>65535&&c<1114112&&(l=c)}null===l?(l=65533,f=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),o+=f}return function(e){var t=e.length;if(t<=T)return String.fromCharCode.apply(String,e);for(var r="",n=0;n0&&(e=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(e+=" ... ")),""},c.prototype.compare=function(e,t,r,n,o){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),t<0||r>e.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&t>=r)return 0;if(n>=o)return-1;if(t>=r)return 1;if(this===e)return 0;for(var i=(o>>>=0)-(n>>>=0),s=(r>>>=0)-(t>>>=0),a=Math.min(i,s),u=this.slice(n,o),l=e.slice(t,r),f=0;fo)&&(r=o),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return v(this,e,t,r);case"utf8":case"utf-8":return w(this,e,t,r);case"ascii":return E(this,e,t,r);case"latin1":case"binary":return x(this,e,t,r);case"base64":return S(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,e,t,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var T=4096;function P(e,t,r){var n="";r=Math.min(e.length,r);for(var o=t;oo)&&(r=o);for(var i="",s=t;sr)throw new RangeError("Trying to access beyond buffer length")}function k(e,t,r,n,o,i){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||te.length)throw new RangeError("Index out of range")}function N(e,t,r,n){t<0&&(t=65535+t+1);for(var o=0,i=Math.min(e.length-r,2);o>>8*(n?o:1-o)}function L(e,t,r,n){t<0&&(t=4294967295+t+1);for(var o=0,i=Math.min(e.length-r,4);o>>8*(n?o:3-o)&255}function j(e,t,r,n,o,i){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function M(e,t,r,n,i){return i||j(e,0,r,4),o.write(e,t,r,n,23,4),r+4}function $(e,t,r,n,i){return i||j(e,0,r,8),o.write(e,t,r,n,52,8),r+8}c.prototype.slice=function(e,t){var r,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t0&&(o*=256);)n+=this[e+--t]*o;return n},c.prototype.readUInt8=function(e,t){return t||O(e,1,this.length),this[e]},c.prototype.readUInt16LE=function(e,t){return t||O(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUInt16BE=function(e,t){return t||O(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUInt32LE=function(e,t){return t||O(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUInt32BE=function(e,t){return t||O(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||O(e,t,this.length);for(var n=this[e],o=1,i=0;++i=(o*=128)&&(n-=Math.pow(2,8*t)),n},c.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||O(e,t,this.length);for(var n=t,o=1,i=this[e+--n];n>0&&(o*=256);)i+=this[e+--n]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},c.prototype.readInt8=function(e,t){return t||O(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){t||O(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt16BE=function(e,t){t||O(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt32LE=function(e,t){return t||O(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return t||O(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readFloatLE=function(e,t){return t||O(e,4,this.length),o.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return t||O(e,4,this.length),o.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return t||O(e,8,this.length),o.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return t||O(e,8,this.length),o.read(this,e,!1,52,8)},c.prototype.writeUIntLE=function(e,t,r,n){e=+e,t|=0,r|=0,n||k(this,e,t,r,Math.pow(2,8*r)-1,0);var o=1,i=0;for(this[t]=255&e;++i=0&&(i*=256);)this[t+o]=e/i&255;return t+r},c.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||k(this,e,t,1,255,0),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},c.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||k(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):N(this,e,t,!0),t+2},c.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||k(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):N(this,e,t,!1),t+2},c.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||k(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):L(this,e,t,!0),t+4},c.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||k(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):L(this,e,t,!1),t+4},c.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var o=Math.pow(2,8*r-1);k(this,e,t,r,o-1,-o)}var i=0,s=1,a=0;for(this[t]=255&e;++i>0)-a&255;return t+r},c.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var o=Math.pow(2,8*r-1);k(this,e,t,r,o-1,-o)}var i=r-1,s=1,a=0;for(this[t+i]=255&e;--i>=0&&(s*=256);)e<0&&0===a&&0!==this[t+i+1]&&(a=1),this[t+i]=(e/s>>0)-a&255;return t+r},c.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||k(this,e,t,1,127,-128),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||k(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):N(this,e,t,!0),t+2},c.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||k(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):N(this,e,t,!1),t+2},c.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||k(this,e,t,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):L(this,e,t,!0),t+4},c.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||k(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):L(this,e,t,!1),t+4},c.prototype.writeFloatLE=function(e,t,r){return M(this,e,t,!0,r)},c.prototype.writeFloatBE=function(e,t,r){return M(this,e,t,!1,r)},c.prototype.writeDoubleLE=function(e,t,r){return $(this,e,t,!0,r)},c.prototype.writeDoubleBE=function(e,t,r){return $(this,e,t,!1,r)},c.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t=0;--o)e[o+t]=this[o+r];else if(i<1e3||!c.TYPED_ARRAY_SUPPORT)for(o=0;o>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i55295&&r<57344){if(!o){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(s+1===n){(t-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function D(e){return n.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(U,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function H(e,t,r,n){for(var o=0;o=t.length||o>=e.length);++o)t[o+r]=e[o];return o}},8e3:e=>{var t=1e3,r=60*t,n=60*r,o=24*n;function i(e,t,r,n){var o=t>=1.5*r;return Math.round(e/r)+" "+n+(o?"s":"")}e.exports=function(e,s){s=s||{};var a,c,u=typeof e;if("string"===u&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var i=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(i){var s=parseFloat(i[1]);switch((i[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"weeks":case"week":case"w":return 6048e5*s;case"days":case"day":case"d":return s*o;case"hours":case"hour":case"hrs":case"hr":case"h":return s*n;case"minutes":case"minute":case"mins":case"min":case"m":return s*r;case"seconds":case"second":case"secs":case"sec":case"s":return s*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}(e);if("number"===u&&isFinite(e))return s.long?(a=e,(c=Math.abs(a))>=o?i(a,c,o,"day"):c>=n?i(a,c,n,"hour"):c>=r?i(a,c,r,"minute"):c>=t?i(a,c,t,"second"):a+" ms"):function(e){var i=Math.abs(e);return i>=o?Math.round(e/o)+"d":i>=n?Math.round(e/n)+"h":i>=r?Math.round(e/r)+"m":i>=t?Math.round(e/t)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},7833:(e,t,r)=>{t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const r="color: "+this.color;t.splice(1,0,r,"color: inherit");let n=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(n++,"%c"===e&&(o=n))})),t.splice(o,0,r)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},t.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=r(736)(t);const{formatters:n}=e.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},736:(e,t,r)=>{e.exports=function(e){function t(e){let r,o,i,s=null;function a(...e){if(!a.enabled)return;const n=a,o=Number(new Date),i=o-(r||o);n.diff=i,n.prev=r,n.curr=o,r=o,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let s=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((r,o)=>{if("%%"===r)return"%";s++;const i=t.formatters[o];if("function"==typeof i){const t=e[s];r=i.call(n,t),e.splice(s,1),s--}return r})),t.formatArgs.call(n,e),(n.log||t.log).apply(n,e)}return a.namespace=e,a.useColors=t.useColors(),a.color=t.selectColor(e),a.extend=n,a.destroy=t.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==s?s:(o!==t.namespaces&&(o=t.namespaces,i=t.enabled(e)),i),set:e=>{s=e}}),"function"==typeof t.init&&t.init(a),a}function n(e,r){const n=t(this.namespace+(void 0===r?":":r)+e);return n.log=this.log,n}function o(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){const e=[...t.names.map(o),...t.skips.map(o).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let r;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const n=("string"==typeof e?e:"").split(/[\s,]+/),o=n.length;for(r=0;r{t[r]=e[r]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let r=0;for(let t=0;t{"use strict";var t=Object.prototype.hasOwnProperty,r="~";function n(){}function o(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function i(e,t,n,i,s){if("function"!=typeof n)throw new TypeError("The listener must be a function");var a=new o(n,i||e,s),c=r?r+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],a]:e._events[c].push(a):(e._events[c]=a,e._eventsCount++),e}function s(e,t){0==--e._eventsCount?e._events=new n:delete e._events[t]}function a(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(r=!1)),a.prototype.eventNames=function(){var e,n,o=[];if(0===this._eventsCount)return o;for(n in e=this._events)t.call(e,n)&&o.push(r?n.slice(1):n);return Object.getOwnPropertySymbols?o.concat(Object.getOwnPropertySymbols(e)):o},a.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var o=0,i=n.length,s=new Array(i);o{"use strict";var t,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};t=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var o=Number.isNaN||function(e){return e!=e};function i(){i.init.call(this)}e.exports=i,e.exports.once=function(e,t){return new Promise((function(r,n){function o(r){e.removeListener(t,i),n(r)}function i(){"function"==typeof e.removeListener&&e.removeListener("error",o),r([].slice.call(arguments))}g(e,t,i,{once:!0}),"error"!==t&&function(e,t,r){"function"==typeof e.on&&g(e,"error",t,{once:!0})}(e,o)}))},i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var s=10;function a(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?i.defaultMaxListeners:e._maxListeners}function u(e,t,r,n){var o,i,s,u;if(a(r),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),i=e._events),s=i[t]),void 0===s)s=i[t]=r,++e._eventsCount;else if("function"==typeof s?s=i[t]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),(o=c(e))>0&&s.length>o&&!s.warned){s.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=s.length,u=l,console&&console.warn&&console.warn(u)}return e}function l(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},o=l.bind(n);return o.listener=r,n.wrapFn=o,o}function h(e,t,r){var n=e._events;if(void 0===n)return[];var o=n[t];return void 0===o?[]:"function"==typeof o?r?[o.listener||o]:[o]:r?function(e){for(var t=new Array(e.length),r=0;r0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var c=i[e];if(void 0===c)return!1;if("function"==typeof c)n(c,this,t);else{var u=c.length,l=d(c,u);for(r=0;r=0;i--)if(r[i]===t||r[i].listener===t){s=r[i].listener,o=i;break}if(o<0)return this;0===o?r.shift():function(e,t){for(;t+1=0;n--)this.removeListener(e,t[n]);return this},i.prototype.listeners=function(e){return h(this,e,!0)},i.prototype.rawListeners=function(e){return h(this,e,!1)},i.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},i.prototype.listenerCount=p,i.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},251:(e,t)=>{t.read=function(e,t,r,n,o){var i,s,a=8*o-n-1,c=(1<>1,l=-7,f=r?o-1:0,h=r?-1:1,p=e[t+f];for(f+=h,i=p&(1<<-l)-1,p>>=-l,l+=a;l>0;i=256*i+e[t+f],f+=h,l-=8);for(s=i&(1<<-l)-1,i>>=-l,l+=n;l>0;s=256*s+e[t+f],f+=h,l-=8);if(0===i)i=1-u;else{if(i===c)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,n),i-=u}return(p?-1:1)*s*Math.pow(2,i-n)},t.write=function(e,t,r,n,o,i){var s,a,c,u=8*i-o-1,l=(1<>1,h=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:i-1,d=n?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=l):(s=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-s))<1&&(s--,c*=2),(t+=s+f>=1?h/c:h*Math.pow(2,1-f))*c>=2&&(s++,c/=2),s+f>=l?(a=0,s=l):s+f>=1?(a=(t*c-1)*Math.pow(2,o),s+=f):(a=t*Math.pow(2,f-1)*Math.pow(2,o),s=0));o>=8;e[r+p]=255&a,p+=d,a/=256,o-=8);for(s=s<0;e[r+p]=255&s,p+=d,s/=256,u-=8);e[r+p-d]|=128*g}},4634:e=>{var t={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==t.call(e)}},6215:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidStatusCodeError=t.InvalidCertError=void 0;const n=Object.freeze({redirect:!0,expectStatusCode:200,headers:{},full:!1,keepAlive:!0,cors:!1,referrer:!1,sslAllowSelfSigned:!1,_redirectCount:0});class o extends Error{constructor(e,t){super(e),this.fingerprint256=t}}t.InvalidCertError=o;class i extends Error{constructor(e){super(`Request Failed. Status Code: ${e}`),this.statusCode=e}}function s(e,t){if(!t||"text"===t||"json"===t)try{let r=new TextDecoder("utf8",{fatal:!0}).decode(e);if("text"===t)return r;try{return JSON.parse(r)}catch(e){if("json"===t)throw e;return r}}catch(e){if("text"===t||"json"===t)throw e}return e}t.InvalidStatusCodeError=i;let a={};function c(e,t){let u={...n,...t};const l=r(105),f=r(917),h=r(7542),{promisify:p}=r(537),{resolve:d}=r(8835),g=!!/^https/.test(e);let y={method:u.method||"GET",headers:{"Accept-Encoding":"gzip, deflate, br"}};const m=e=>e.replace(/:| /g,"").toLowerCase();if(u.keepAlive){const e={keepAlive:!0,keepAliveMsecs:3e4,maxFreeSockets:1024,maxCachedSessions:1024},t=[g,g&&u.sslPinnedCertificates?.map((e=>m(e))).sort()].join();y.agent=a[t]||(a[t]=new(g?f:l).Agent(e))}return"json"===u.type&&(y.headers["Content-Type"]="application/json"),u.data&&(u.method||(y.method="POST"),y.body="json"===u.type?JSON.stringify(u.data):u.data),y.headers={...y.headers,...u.headers},u.sslAllowSelfSigned&&(y.rejectUnauthorized=!1),new Promise(((t,r)=>{const n=async t=>{if(t&&"DEPTH_ZERO_SELF_SIGNED_CERT"===t.code)try{await c(e,{...u,sslAllowSelfSigned:!0,sslPinnedCertificates:[]})}catch(e){e&&e.fingerprint256&&(t=new o(`Self-signed SSL certificate: ${e.fingerprint256}`,e.fingerprint256))}r(t)},a=(g?f:l).request(e,y,(o=>{o.on("error",n),(async()=>{try{t(await(async t=>{const r=t.statusCode;if(u.redirect&&300<=r&&r<400&&t.headers.location){if(10==u._redirectCount)throw new Error("Request failed. Too much redirects.");return u._redirectCount+=1,await c(d(e,t.headers.location),u)}if(u.expectStatusCode&&r!==u.expectStatusCode)throw t.resume(),new i(r);let n=[];for await(const e of t)n.push(e);let o=Buffer.concat(n);const a=t.headers["content-encoding"];"br"===a&&(o=await p(h.brotliDecompress)(o)),"gzip"!==a&&"deflate"!==a||(o=await p(h.unzip)(o));const l=s(o,u.type);return u.full?{headers:t.headers,status:r,body:l}:l})(o))}catch(e){r(e)}})()}));a.on("error",n);const b=u.sslPinnedCertificates?.map((e=>m(e))),v=e=>{const t=m(e.getPeerCertificate()?.fingerprint256||"");if((t||!e.isSessionReused())&&!b.includes(t))return a.emit("error",new o(`Invalid SSL certificate: ${t} Expected: ${b}`,t)),a.abort()};u.sslPinnedCertificates&&a.on("socket",(e=>{e.listeners("secureConnect").map((e=>(e.name||"").replace("bound ",""))).includes("mfetchSecureConnect")||e.on("secureConnect",v.bind(null,e))})),u.keepAlive&&a.setNoDelay(!0),y.body&&a.write(y.body),a.end()}))}const u=new Set(["Accept","Accept-Language","Content-Language","Content-Type"].map((e=>e.toLowerCase()))),l=new Set(["Accept-Charset","Accept-Encoding","Access-Control-Request-Headers","Access-Control-Request-Method","Connection","Content-Length","Cookie","Cookie2","Date","DNT","Expect","Host","Keep-Alive","Origin","Referer","TE","Trailer","Transfer-Encoding","Upgrade","Via"].map((e=>e.toLowerCase())));async function f(e,t){let r={...n,...t};const o=new Headers;"json"===r.type&&o.set("Content-Type","application/json");let a=new URL(e);if(a.username){const e=btoa(`${a.username}:${a.password}`);o.set("Authorization",`Basic ${e}`),a.username="",a.password=""}e=""+a;for(let e in r.headers){const t=e.toLowerCase();(u.has(t)||r.cors&&!l.has(t))&&o.set(e,r.headers[e])}let c={headers:o,redirect:r.redirect?"follow":"manual"};r.referrer||(c.referrerPolicy="no-referrer"),r.cors&&(c.mode="cors"),r.data&&(r.method||(c.method="POST"),c.body="json"===r.type?JSON.stringify(r.data):r.data);const f=await fetch(e,c);if(r.expectStatusCode&&f.status!==r.expectStatusCode)throw new i(f.status);const h=s(new Uint8Array(await f.arrayBuffer()),r.type);return r.full?{headers:Object.fromEntries(f.headers.entries()),status:f.status,body:h}:h}const h=!!("object"==typeof process&&process.versions&&process.versions.node&&process.versions.v8);t.default=function(e,t){return(h?c:f)(e,t)}},1843:(e,t,r)=>{"use strict";const{ErrorWithCause:n}=r(5832),{findCauseByReference:o,getErrorCause:i,messageWithCauses:s,stackWithCauses:a}=r(4306);e.exports={ErrorWithCause:n,findCauseByReference:o,getErrorCause:i,stackWithCauses:a,messageWithCauses:s}},5832:e=>{"use strict";class t extends Error{constructor(e,{cause:r}={}){super(e),this.name=t.name,r&&(this.cause=r),this.message=e}}e.exports={ErrorWithCause:t}},4306:e=>{"use strict";const t=e=>{if(e&&"object"==typeof e&&"cause"in e){if("function"==typeof e.cause){const t=e.cause();return t instanceof Error?t:void 0}return e.cause instanceof Error?e.cause:void 0}},r=(e,n)=>{if(!(e instanceof Error))return"";const o=e.stack||"";if(n.has(e))return o+"\ncauses have become circular...";const i=t(e);return i?(n.add(e),o+"\ncaused by: "+r(i,n)):o},n=(e,r,o)=>{if(!(e instanceof Error))return"";const i=o?"":e.message||"";if(r.has(e))return i+": ...";const s=t(e);if(s){r.add(e);const t="cause"in e&&"function"==typeof e.cause;return i+(t?"":": ")+n(s,r,t)}return i};e.exports={findCauseByReference:(e,r)=>{if(!e||!r)return;if(!(e instanceof Error))return;if(!(r.prototype instanceof Error)&&r!==Error)return;const n=new Set;let o=e;for(;o&&!n.has(o);){if(n.add(o),o instanceof r)return o;o=t(o)}},getErrorCause:t,stackWithCauses:e=>r(e,new Set),messageWithCauses:e=>n(e,new Set)}},1630:e=>{"use strict";function t(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,r,n,o){r=r||"&",n=n||"=";var i={};if("string"!=typeof e||0===e.length)return i;var s=/\+/g;e=e.split(r);var a=1e3;o&&"number"==typeof o.maxKeys&&(a=o.maxKeys);var c=e.length;a>0&&c>a&&(c=a);for(var u=0;u=0?(l=d.substr(0,g),f=d.substr(g+1)):(l=d,f=""),h=decodeURIComponent(l),p=decodeURIComponent(f),t(i,h)?Array.isArray(i[h])?i[h].push(p):i[h]=[i[h],p]:i[h]=p}return i}},9106:e=>{"use strict";var t=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,r,n,o){return r=r||"&",n=n||"=",null===e&&(e=void 0),"object"==typeof e?Object.keys(e).map((function(o){var i=encodeURIComponent(t(o))+n;return Array.isArray(e[o])?e[o].map((function(e){return i+encodeURIComponent(t(e))})).join(r):i+encodeURIComponent(t(e[o]))})).join(r):o?encodeURIComponent(t(o))+n+encodeURIComponent(t(e)):""}},7186:(e,t,r)=>{"use strict";t.decode=t.parse=r(1630),t.encode=t.stringify=r(9106)},3904:(e,t,r)=>{const n=Symbol("SemVer ANY");class o{static get ANY(){return n}constructor(e,t){if(t=i(t),e instanceof o){if(e.loose===!!t.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),u("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===n?this.value="":this.value=this.operator+this.semver.version,u("comp",this)}parse(e){const t=this.options.loose?s[a.COMPARATORLOOSE]:s[a.COMPARATOR],r=e.match(t);if(!r)throw new TypeError(`Invalid comparator: ${e}`);this.operator=void 0!==r[1]?r[1]:"","="===this.operator&&(this.operator=""),r[2]?this.semver=new l(r[2],this.options.loose):this.semver=n}toString(){return this.value}test(e){if(u("Comparator.test",e,this.options.loose),this.semver===n||e===n)return!0;if("string"==typeof e)try{e=new l(e,this.options)}catch(e){return!1}return c(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof o))throw new TypeError("a Comparator is required");return""===this.operator?""===this.value||new f(e.value,t).test(this.value):""===e.operator?""===e.value||new f(this.value,t).test(e.semver):!((t=i(t)).includePrerelease&&("<0.0.0-0"===this.value||"<0.0.0-0"===e.value)||!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))||(!this.operator.startsWith(">")||!e.operator.startsWith(">"))&&(!this.operator.startsWith("<")||!e.operator.startsWith("<"))&&(this.semver.version!==e.semver.version||!this.operator.includes("=")||!e.operator.includes("="))&&!(c(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))&&!(c(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}}e.exports=o;const i=r(8587),{safeRe:s,t:a}=r(9718),c=r(2111),u=r(7272),l=r(3908),f=r(8311)},8311:(e,t,r)=>{class n{constructor(e,t){if(t=i(t),e instanceof n)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new n(e.raw,t);if(e instanceof s)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map((e=>this.parseRange(e))).filter((e=>e.length)),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!y(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&m(e[0])){this.set=[e];break}}this.format()}format(){return this.range=this.set.map((e=>e.join(" ").trim())).join("||").trim(),this.range}toString(){return this.range}parseRange(e){const t=((this.options.includePrerelease&&d)|(this.options.loose&&g))+":"+e,r=o.get(t);if(r)return r;const n=this.options.loose,i=n?u[l.HYPHENRANGELOOSE]:u[l.HYPHENRANGE];e=e.replace(i,C(this.options.includePrerelease)),a("hyphen replace",e),e=e.replace(u[l.COMPARATORTRIM],f),a("comparator trim",e);let c=(e=(e=e.replace(u[l.TILDETRIM],h)).replace(u[l.CARETTRIM],p)).split(" ").map((e=>v(e,this.options))).join(" ").split(/\s+/).map((e=>P(e,this.options)));n&&(c=c.filter((e=>(a("loose invalid filter",e,this.options),!!e.match(u[l.COMPARATORLOOSE]))))),a("range list",c);const m=new Map,b=c.map((e=>new s(e,this.options)));for(const e of b){if(y(e))return[e];m.set(e.value,e)}m.size>1&&m.has("")&&m.delete("");const w=[...m.values()];return o.set(t,w),w}intersects(e,t){if(!(e instanceof n))throw new TypeError("a Range is required");return this.set.some((r=>b(r,t)&&e.set.some((e=>b(e,t)&&r.every((r=>e.every((e=>r.intersects(e,t)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new c(e,this.options)}catch(e){return!1}for(let t=0;t"<0.0.0-0"===e.value,m=e=>""===e.value,b=(e,t)=>{let r=!0;const n=e.slice();let o=n.pop();for(;r&&n.length;)r=n.every((e=>o.intersects(e,t))),o=n.pop();return r},v=(e,t)=>(a("comp",e,t),e=S(e,t),a("caret",e),e=E(e,t),a("tildes",e),e=I(e,t),a("xrange",e),e=T(e,t),a("stars",e),e),w=e=>!e||"x"===e.toLowerCase()||"*"===e,E=(e,t)=>e.trim().split(/\s+/).map((e=>x(e,t))).join(" "),x=(e,t)=>{const r=t.loose?u[l.TILDELOOSE]:u[l.TILDE];return e.replace(r,((t,r,n,o,i)=>{let s;return a("tilde",e,t,r,n,o,i),w(r)?s="":w(n)?s=`>=${r}.0.0 <${+r+1}.0.0-0`:w(o)?s=`>=${r}.${n}.0 <${r}.${+n+1}.0-0`:i?(a("replaceTilde pr",i),s=`>=${r}.${n}.${o}-${i} <${r}.${+n+1}.0-0`):s=`>=${r}.${n}.${o} <${r}.${+n+1}.0-0`,a("tilde return",s),s}))},S=(e,t)=>e.trim().split(/\s+/).map((e=>A(e,t))).join(" "),A=(e,t)=>{a("caret",e,t);const r=t.loose?u[l.CARETLOOSE]:u[l.CARET],n=t.includePrerelease?"-0":"";return e.replace(r,((t,r,o,i,s)=>{let c;return a("caret",e,t,r,o,i,s),w(r)?c="":w(o)?c=`>=${r}.0.0${n} <${+r+1}.0.0-0`:w(i)?c="0"===r?`>=${r}.${o}.0${n} <${r}.${+o+1}.0-0`:`>=${r}.${o}.0${n} <${+r+1}.0.0-0`:s?(a("replaceCaret pr",s),c="0"===r?"0"===o?`>=${r}.${o}.${i}-${s} <${r}.${o}.${+i+1}-0`:`>=${r}.${o}.${i}-${s} <${r}.${+o+1}.0-0`:`>=${r}.${o}.${i}-${s} <${+r+1}.0.0-0`):(a("no pr"),c="0"===r?"0"===o?`>=${r}.${o}.${i}${n} <${r}.${o}.${+i+1}-0`:`>=${r}.${o}.${i}${n} <${r}.${+o+1}.0-0`:`>=${r}.${o}.${i} <${+r+1}.0.0-0`),a("caret return",c),c}))},I=(e,t)=>(a("replaceXRanges",e,t),e.split(/\s+/).map((e=>B(e,t))).join(" ")),B=(e,t)=>{e=e.trim();const r=t.loose?u[l.XRANGELOOSE]:u[l.XRANGE];return e.replace(r,((r,n,o,i,s,c)=>{a("xRange",e,r,n,o,i,s,c);const u=w(o),l=u||w(i),f=l||w(s),h=f;return"="===n&&h&&(n=""),c=t.includePrerelease?"-0":"",u?r=">"===n||"<"===n?"<0.0.0-0":"*":n&&h?(l&&(i=0),s=0,">"===n?(n=">=",l?(o=+o+1,i=0,s=0):(i=+i+1,s=0)):"<="===n&&(n="<",l?o=+o+1:i=+i+1),"<"===n&&(c="-0"),r=`${n+o}.${i}.${s}${c}`):l?r=`>=${o}.0.0${c} <${+o+1}.0.0-0`:f&&(r=`>=${o}.${i}.0${c} <${o}.${+i+1}.0-0`),a("xRange return",r),r}))},T=(e,t)=>(a("replaceStars",e,t),e.trim().replace(u[l.STAR],"")),P=(e,t)=>(a("replaceGTE0",e,t),e.trim().replace(u[t.includePrerelease?l.GTE0PRE:l.GTE0],"")),C=e=>(t,r,n,o,i,s,a,c,u,l,f,h,p)=>`${r=w(n)?"":w(o)?`>=${n}.0.0${e?"-0":""}`:w(i)?`>=${n}.${o}.0${e?"-0":""}`:s?`>=${r}`:`>=${r}${e?"-0":""}`} ${c=w(u)?"":w(l)?`<${+u+1}.0.0-0`:w(f)?`<${u}.${+l+1}.0-0`:h?`<=${u}.${l}.${f}-${h}`:e?`<${u}.${l}.${+f+1}-0`:`<=${c}`}`.trim(),_=(e,t,r)=>{for(let r=0;r0){const n=e[r].semver;if(n.major===t.major&&n.minor===t.minor&&n.patch===t.patch)return!0}return!1}return!0}},3908:(e,t,r)=>{const n=r(7272),{MAX_LENGTH:o,MAX_SAFE_INTEGER:i}=r(6874),{safeRe:s,t:a}=r(9718),c=r(8587),{compareIdentifiers:u}=r(1123);class l{constructor(e,t){if(t=c(t),e instanceof l){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>o)throw new TypeError(`version is longer than ${o} characters`);n("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const r=e.trim().match(t.loose?s[a.LOOSE]:s[a.FULL]);if(!r)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>i||this.major<0)throw new TypeError("Invalid major version");if(this.minor>i||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>i||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t=0;)"number"==typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);if(-1===n){if(t===this.prerelease.join(".")&&!1===r)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let n=[t,e];!1===r&&(n=[t]),0===u(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=n):this.prerelease=n}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}e.exports=l},7414:(e,t,r)=>{const n=r(144);e.exports=(e,t)=>{const r=n(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null}},2111:(e,t,r)=>{const n=r(4641),o=r(3999),i=r(5580),s=r(4089),a=r(7059),c=r(5200);e.exports=(e,t,r,u)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e===r;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e!==r;case"":case"=":case"==":return n(e,r,u);case"!=":return o(e,r,u);case">":return i(e,r,u);case">=":return s(e,r,u);case"<":return a(e,r,u);case"<=":return c(e,r,u);default:throw new TypeError(`Invalid operator: ${t}`)}}},6170:(e,t,r)=>{const n=r(3908),o=r(144),{safeRe:i,t:s}=r(9718);e.exports=(e,t)=>{if(e instanceof n)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let r=null;if((t=t||{}).rtl){let t;for(;(t=i[s.COERCERTL].exec(e))&&(!r||r.index+r[0].length!==e.length);)r&&t.index+t[0].length===r.index+r[0].length||(r=t),i[s.COERCERTL].lastIndex=t.index+t[1].length+t[2].length;i[s.COERCERTL].lastIndex=-1}else r=e.match(i[s.COERCE]);return null===r?null:o(`${r[2]}.${r[3]||"0"}.${r[4]||"0"}`,t)}},909:(e,t,r)=>{const n=r(3908);e.exports=(e,t,r)=>{const o=new n(e,r),i=new n(t,r);return o.compare(i)||o.compareBuild(i)}},1763:(e,t,r)=>{const n=r(560);e.exports=(e,t)=>n(e,t,!0)},560:(e,t,r)=>{const n=r(3908);e.exports=(e,t,r)=>new n(e,r).compare(new n(t,r))},1832:(e,t,r)=>{const n=r(144);e.exports=(e,t)=>{const r=n(e,null,!0),o=n(t,null,!0),i=r.compare(o);if(0===i)return null;const s=i>0,a=s?r:o,c=s?o:r,u=!!a.prerelease.length;if(c.prerelease.length&&!u)return c.patch||c.minor?a.patch?"patch":a.minor?"minor":"major":"major";const l=u?"pre":"";return r.major!==o.major?l+"major":r.minor!==o.minor?l+"minor":r.patch!==o.patch?l+"patch":"prerelease"}},4641:(e,t,r)=>{const n=r(560);e.exports=(e,t,r)=>0===n(e,t,r)},5580:(e,t,r)=>{const n=r(560);e.exports=(e,t,r)=>n(e,t,r)>0},4089:(e,t,r)=>{const n=r(560);e.exports=(e,t,r)=>n(e,t,r)>=0},3007:(e,t,r)=>{const n=r(3908);e.exports=(e,t,r,o,i)=>{"string"==typeof r&&(i=o,o=r,r=void 0);try{return new n(e instanceof n?e.version:e,r).inc(t,o,i).version}catch(e){return null}}},7059:(e,t,r)=>{const n=r(560);e.exports=(e,t,r)=>n(e,t,r)<0},5200:(e,t,r)=>{const n=r(560);e.exports=(e,t,r)=>n(e,t,r)<=0},2938:(e,t,r)=>{const n=r(3908);e.exports=(e,t)=>new n(e,t).major},6254:(e,t,r)=>{const n=r(3908);e.exports=(e,t)=>new n(e,t).minor},3999:(e,t,r)=>{const n=r(560);e.exports=(e,t,r)=>0!==n(e,t,r)},144:(e,t,r)=>{const n=r(3908);e.exports=(e,t,r=!1)=>{if(e instanceof n)return e;try{return new n(e,t)}catch(e){if(!r)return null;throw e}}},4493:(e,t,r)=>{const n=r(3908);e.exports=(e,t)=>new n(e,t).patch},1729:(e,t,r)=>{const n=r(144);e.exports=(e,t)=>{const r=n(e,t);return r&&r.prerelease.length?r.prerelease:null}},9970:(e,t,r)=>{const n=r(560);e.exports=(e,t,r)=>n(t,e,r)},4277:(e,t,r)=>{const n=r(909);e.exports=(e,t)=>e.sort(((e,r)=>n(r,e,t)))},7638:(e,t,r)=>{const n=r(8311);e.exports=(e,t,r)=>{try{t=new n(t,r)}catch(e){return!1}return t.test(e)}},3927:(e,t,r)=>{const n=r(909);e.exports=(e,t)=>e.sort(((e,r)=>n(e,r,t)))},6953:(e,t,r)=>{const n=r(144);e.exports=(e,t)=>{const r=n(e,t);return r?r.version:null}},9589:(e,t,r)=>{const n=r(9718),o=r(6874),i=r(3908),s=r(1123),a=r(144),c=r(6953),u=r(7414),l=r(3007),f=r(1832),h=r(2938),p=r(6254),d=r(4493),g=r(1729),y=r(560),m=r(9970),b=r(1763),v=r(909),w=r(3927),E=r(4277),x=r(5580),S=r(7059),A=r(4641),I=r(3999),B=r(4089),T=r(5200),P=r(2111),C=r(6170),_=r(3904),R=r(8311),O=r(7638),k=r(7631),N=r(9628),L=r(270),j=r(1261),M=r(3874),$=r(7075),U=r(5571),F=r(5342),D=r(6780),H=r(2525),z=r(5032);e.exports={parse:a,valid:c,clean:u,inc:l,diff:f,major:h,minor:p,patch:d,prerelease:g,compare:y,rcompare:m,compareLoose:b,compareBuild:v,sort:w,rsort:E,gt:x,lt:S,eq:A,neq:I,gte:B,lte:T,cmp:P,coerce:C,Comparator:_,Range:R,satisfies:O,toComparators:k,maxSatisfying:N,minSatisfying:L,minVersion:j,validRange:M,outside:$,gtr:U,ltr:F,intersects:D,simplifyRange:H,subset:z,SemVer:i,re:n.re,src:n.src,tokens:n.t,SEMVER_SPEC_VERSION:o.SEMVER_SPEC_VERSION,RELEASE_TYPES:o.RELEASE_TYPES,compareIdentifiers:s.compareIdentifiers,rcompareIdentifiers:s.rcompareIdentifiers}},6874:e=>{const t=Number.MAX_SAFE_INTEGER||9007199254740991;e.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_INTEGER:t,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}},7272:e=>{const t="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};e.exports=t},1123:e=>{const t=/^[0-9]+$/,r=(e,r)=>{const n=t.test(e),o=t.test(r);return n&&o&&(e=+e,r=+r),e===r?0:n&&!o?-1:o&&!n?1:er(t,e)}},8587:e=>{const t=Object.freeze({loose:!0}),r=Object.freeze({});e.exports=e=>e?"object"!=typeof e?t:e:r},9718:(e,t,r)=>{const{MAX_SAFE_COMPONENT_LENGTH:n}=r(6874),o=r(7272),i=(t=e.exports={}).re=[],s=t.safeRe=[],a=t.src=[],c=t.t={};let u=0;const l=(e,t,r)=>{const n=t.split("\\s*").join("\\s{0,1}").split("\\s+").join("\\s"),l=u++;o(e,l,t),c[e]=l,a[l]=t,i[l]=new RegExp(t,r?"g":void 0),s[l]=new RegExp(n,r?"g":void 0)};l("NUMERICIDENTIFIER","0|[1-9]\\d*"),l("NUMERICIDENTIFIERLOOSE","[0-9]+"),l("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),l("MAINVERSION",`(${a[c.NUMERICIDENTIFIER]})\\.(${a[c.NUMERICIDENTIFIER]})\\.(${a[c.NUMERICIDENTIFIER]})`),l("MAINVERSIONLOOSE",`(${a[c.NUMERICIDENTIFIERLOOSE]})\\.(${a[c.NUMERICIDENTIFIERLOOSE]})\\.(${a[c.NUMERICIDENTIFIERLOOSE]})`),l("PRERELEASEIDENTIFIER",`(?:${a[c.NUMERICIDENTIFIER]}|${a[c.NONNUMERICIDENTIFIER]})`),l("PRERELEASEIDENTIFIERLOOSE",`(?:${a[c.NUMERICIDENTIFIERLOOSE]}|${a[c.NONNUMERICIDENTIFIER]})`),l("PRERELEASE",`(?:-(${a[c.PRERELEASEIDENTIFIER]}(?:\\.${a[c.PRERELEASEIDENTIFIER]})*))`),l("PRERELEASELOOSE",`(?:-?(${a[c.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${a[c.PRERELEASEIDENTIFIERLOOSE]})*))`),l("BUILDIDENTIFIER","[0-9A-Za-z-]+"),l("BUILD",`(?:\\+(${a[c.BUILDIDENTIFIER]}(?:\\.${a[c.BUILDIDENTIFIER]})*))`),l("FULLPLAIN",`v?${a[c.MAINVERSION]}${a[c.PRERELEASE]}?${a[c.BUILD]}?`),l("FULL",`^${a[c.FULLPLAIN]}$`),l("LOOSEPLAIN",`[v=\\s]*${a[c.MAINVERSIONLOOSE]}${a[c.PRERELEASELOOSE]}?${a[c.BUILD]}?`),l("LOOSE",`^${a[c.LOOSEPLAIN]}$`),l("GTLT","((?:<|>)?=?)"),l("XRANGEIDENTIFIERLOOSE",`${a[c.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),l("XRANGEIDENTIFIER",`${a[c.NUMERICIDENTIFIER]}|x|X|\\*`),l("XRANGEPLAIN",`[v=\\s]*(${a[c.XRANGEIDENTIFIER]})(?:\\.(${a[c.XRANGEIDENTIFIER]})(?:\\.(${a[c.XRANGEIDENTIFIER]})(?:${a[c.PRERELEASE]})?${a[c.BUILD]}?)?)?`),l("XRANGEPLAINLOOSE",`[v=\\s]*(${a[c.XRANGEIDENTIFIERLOOSE]})(?:\\.(${a[c.XRANGEIDENTIFIERLOOSE]})(?:\\.(${a[c.XRANGEIDENTIFIERLOOSE]})(?:${a[c.PRERELEASELOOSE]})?${a[c.BUILD]}?)?)?`),l("XRANGE",`^${a[c.GTLT]}\\s*${a[c.XRANGEPLAIN]}$`),l("XRANGELOOSE",`^${a[c.GTLT]}\\s*${a[c.XRANGEPLAINLOOSE]}$`),l("COERCE",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?(?:$|[^\\d])`),l("COERCERTL",a[c.COERCE],!0),l("LONETILDE","(?:~>?)"),l("TILDETRIM",`(\\s*)${a[c.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",l("TILDE",`^${a[c.LONETILDE]}${a[c.XRANGEPLAIN]}$`),l("TILDELOOSE",`^${a[c.LONETILDE]}${a[c.XRANGEPLAINLOOSE]}$`),l("LONECARET","(?:\\^)"),l("CARETTRIM",`(\\s*)${a[c.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",l("CARET",`^${a[c.LONECARET]}${a[c.XRANGEPLAIN]}$`),l("CARETLOOSE",`^${a[c.LONECARET]}${a[c.XRANGEPLAINLOOSE]}$`),l("COMPARATORLOOSE",`^${a[c.GTLT]}\\s*(${a[c.LOOSEPLAIN]})$|^$`),l("COMPARATOR",`^${a[c.GTLT]}\\s*(${a[c.FULLPLAIN]})$|^$`),l("COMPARATORTRIM",`(\\s*)${a[c.GTLT]}\\s*(${a[c.LOOSEPLAIN]}|${a[c.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",l("HYPHENRANGE",`^\\s*(${a[c.XRANGEPLAIN]})\\s+-\\s+(${a[c.XRANGEPLAIN]})\\s*$`),l("HYPHENRANGELOOSE",`^\\s*(${a[c.XRANGEPLAINLOOSE]})\\s+-\\s+(${a[c.XRANGEPLAINLOOSE]})\\s*$`),l("STAR","(<|>)?=?\\s*\\*"),l("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),l("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},8357:(e,t,r)=>{"use strict";const n=r(8799),o=Symbol("max"),i=Symbol("length"),s=Symbol("lengthCalculator"),a=Symbol("allowStale"),c=Symbol("maxAge"),u=Symbol("dispose"),l=Symbol("noDisposeOnSet"),f=Symbol("lruList"),h=Symbol("cache"),p=Symbol("updateAgeOnGet"),d=()=>1,g=(e,t,r)=>{const n=e[h].get(t);if(n){const t=n.value;if(y(e,t)){if(b(e,n),!e[a])return}else r&&(e[p]&&(n.value.now=Date.now()),e[f].unshiftNode(n));return t.value}},y=(e,t)=>{if(!t||!t.maxAge&&!e[c])return!1;const r=Date.now()-t.now;return t.maxAge?r>t.maxAge:e[c]&&r>e[c]},m=e=>{if(e[i]>e[o])for(let t=e[f].tail;e[i]>e[o]&&null!==t;){const r=t.prev;b(e,t),t=r}},b=(e,t)=>{if(t){const r=t.value;e[u]&&e[u](r.key,r.value),e[i]-=r.length,e[h].delete(r.key),e[f].removeNode(t)}};class v{constructor(e,t,r,n,o){this.key=e,this.value=t,this.length=r,this.now=n,this.maxAge=o||0}}const w=(e,t,r,n)=>{let o=r.value;y(e,o)&&(b(e,r),e[a]||(o=void 0)),o&&t.call(n,o.value,o.key,e)};e.exports=class{constructor(e){if("number"==typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!=typeof e.max||e.max<0))throw new TypeError("max must be a non-negative number");this[o]=e.max||1/0;const t=e.length||d;if(this[s]="function"!=typeof t?d:t,this[a]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw new TypeError("maxAge must be a number");this[c]=e.maxAge||0,this[u]=e.dispose,this[l]=e.noDisposeOnSet||!1,this[p]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[o]=e||1/0,m(this)}get max(){return this[o]}set allowStale(e){this[a]=!!e}get allowStale(){return this[a]}set maxAge(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[c]=e,m(this)}get maxAge(){return this[c]}set lengthCalculator(e){"function"!=typeof e&&(e=d),e!==this[s]&&(this[s]=e,this[i]=0,this[f].forEach((e=>{e.length=this[s](e.value,e.key),this[i]+=e.length}))),m(this)}get lengthCalculator(){return this[s]}get length(){return this[i]}get itemCount(){return this[f].length}rforEach(e,t){t=t||this;for(let r=this[f].tail;null!==r;){const n=r.prev;w(this,e,r,t),r=n}}forEach(e,t){t=t||this;for(let r=this[f].head;null!==r;){const n=r.next;w(this,e,r,t),r=n}}keys(){return this[f].toArray().map((e=>e.key))}values(){return this[f].toArray().map((e=>e.value))}reset(){this[u]&&this[f]&&this[f].length&&this[f].forEach((e=>this[u](e.key,e.value))),this[h]=new Map,this[f]=new n,this[i]=0}dump(){return this[f].map((e=>!y(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[f]}set(e,t,r){if((r=r||this[c])&&"number"!=typeof r)throw new TypeError("maxAge must be a number");const n=r?Date.now():0,a=this[s](t,e);if(this[h].has(e)){if(a>this[o])return b(this,this[h].get(e)),!1;const s=this[h].get(e).value;return this[u]&&(this[l]||this[u](e,s.value)),s.now=n,s.maxAge=r,s.value=t,this[i]+=a-s.length,s.length=a,this.get(e),m(this),!0}const p=new v(e,t,a,n,r);return p.length>this[o]?(this[u]&&this[u](e,t),!1):(this[i]+=p.length,this[f].unshift(p),this[h].set(e,this[f].head),m(this),!0)}has(e){if(!this[h].has(e))return!1;const t=this[h].get(e).value;return!y(this,t)}get(e){return g(this,e,!0)}peek(e){return g(this,e,!1)}pop(){const e=this[f].tail;return e?(b(this,e),e.value):null}del(e){b(this,this[h].get(e))}load(e){this.reset();const t=Date.now();for(let r=e.length-1;r>=0;r--){const n=e[r],o=n.e||0;if(0===o)this.set(n.k,n.v);else{const e=o-t;e>0&&this.set(n.k,n.v,e)}}}prune(){this[h].forEach(((e,t)=>g(this,t,!1)))}}},5571:(e,t,r)=>{const n=r(7075);e.exports=(e,t,r)=>n(e,t,">",r)},6780:(e,t,r)=>{const n=r(8311);e.exports=(e,t,r)=>(e=new n(e,r),t=new n(t,r),e.intersects(t,r))},5342:(e,t,r)=>{const n=r(7075);e.exports=(e,t,r)=>n(e,t,"<",r)},9628:(e,t,r)=>{const n=r(3908),o=r(8311);e.exports=(e,t,r)=>{let i=null,s=null,a=null;try{a=new o(t,r)}catch(e){return null}return e.forEach((e=>{a.test(e)&&(i&&-1!==s.compare(e)||(i=e,s=new n(i,r)))})),i}},270:(e,t,r)=>{const n=r(3908),o=r(8311);e.exports=(e,t,r)=>{let i=null,s=null,a=null;try{a=new o(t,r)}catch(e){return null}return e.forEach((e=>{a.test(e)&&(i&&1!==s.compare(e)||(i=e,s=new n(i,r)))})),i}},1261:(e,t,r)=>{const n=r(3908),o=r(8311),i=r(5580);e.exports=(e,t)=>{e=new o(e,t);let r=new n("0.0.0");if(e.test(r))return r;if(r=new n("0.0.0-0"),e.test(r))return r;r=null;for(let t=0;t{const t=new n(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":s&&!i(t,s)||(s=t);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}})),!s||r&&!i(r,s)||(r=s)}return r&&e.test(r)?r:null}},7075:(e,t,r)=>{const n=r(3908),o=r(3904),{ANY:i}=o,s=r(8311),a=r(7638),c=r(5580),u=r(7059),l=r(5200),f=r(4089);e.exports=(e,t,r,h)=>{let p,d,g,y,m;switch(e=new n(e,h),t=new s(t,h),r){case">":p=c,d=l,g=u,y=">",m=">=";break;case"<":p=u,d=f,g=c,y="<",m="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(a(e,t,h))return!1;for(let r=0;r{e.semver===i&&(e=new o(">=0.0.0")),s=s||e,a=a||e,p(e.semver,s.semver,h)?s=e:g(e.semver,a.semver,h)&&(a=e)})),s.operator===y||s.operator===m)return!1;if((!a.operator||a.operator===y)&&d(e,a.semver))return!1;if(a.operator===m&&g(e,a.semver))return!1}return!0}},2525:(e,t,r)=>{const n=r(7638),o=r(560);e.exports=(e,t,r)=>{const i=[];let s=null,a=null;const c=e.sort(((e,t)=>o(e,t,r)));for(const e of c)n(e,t,r)?(a=e,s||(s=e)):(a&&i.push([s,a]),a=null,s=null);s&&i.push([s,null]);const u=[];for(const[e,t]of i)e===t?u.push(e):t||e!==c[0]?t?e===c[0]?u.push(`<=${t}`):u.push(`${e} - ${t}`):u.push(`>=${e}`):u.push("*");const l=u.join(" || "),f="string"==typeof t.raw?t.raw:String(t);return l.length{const n=r(8311),o=r(3904),{ANY:i}=o,s=r(7638),a=r(560),c=[new o(">=0.0.0-0")],u=[new o(">=0.0.0")],l=(e,t,r)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===i){if(1===t.length&&t[0].semver===i)return!0;e=r.includePrerelease?c:u}if(1===t.length&&t[0].semver===i){if(r.includePrerelease)return!0;t=u}const n=new Set;let o,l,p,d,g,y,m;for(const t of e)">"===t.operator||">="===t.operator?o=f(o,t,r):"<"===t.operator||"<="===t.operator?l=h(l,t,r):n.add(t.semver);if(n.size>1)return null;if(o&&l){if(p=a(o.semver,l.semver,r),p>0)return null;if(0===p&&(">="!==o.operator||"<="!==l.operator))return null}for(const e of n){if(o&&!s(e,String(o),r))return null;if(l&&!s(e,String(l),r))return null;for(const n of t)if(!s(e,String(n),r))return!1;return!0}let b=!(!l||r.includePrerelease||!l.semver.prerelease.length)&&l.semver,v=!(!o||r.includePrerelease||!o.semver.prerelease.length)&&o.semver;b&&1===b.prerelease.length&&"<"===l.operator&&0===b.prerelease[0]&&(b=!1);for(const e of t){if(m=m||">"===e.operator||">="===e.operator,y=y||"<"===e.operator||"<="===e.operator,o)if(v&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===v.major&&e.semver.minor===v.minor&&e.semver.patch===v.patch&&(v=!1),">"===e.operator||">="===e.operator){if(d=f(o,e,r),d===e&&d!==o)return!1}else if(">="===o.operator&&!s(o.semver,String(e),r))return!1;if(l)if(b&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===b.major&&e.semver.minor===b.minor&&e.semver.patch===b.patch&&(b=!1),"<"===e.operator||"<="===e.operator){if(g=h(l,e,r),g===e&&g!==l)return!1}else if("<="===l.operator&&!s(l.semver,String(e),r))return!1;if(!e.operator&&(l||o)&&0!==p)return!1}return!(o&&y&&!l&&0!==p||l&&m&&!o&&0!==p||v||b)},f=(e,t,r)=>{if(!e)return t;const n=a(e.semver,t.semver,r);return n>0?e:n<0||">"===t.operator&&">="===e.operator?t:e},h=(e,t,r)=>{if(!e)return t;const n=a(e.semver,t.semver,r);return n<0?e:n>0||"<"===t.operator&&"<="===e.operator?t:e};e.exports=(e,t,r={})=>{if(e===t)return!0;e=new n(e,r),t=new n(t,r);let o=!1;e:for(const n of e.set){for(const e of t.set){const t=l(n,e,r);if(o=o||null!==t,t)continue e}if(o)return!1}return!0}},7631:(e,t,r)=>{const n=r(8311);e.exports=(e,t)=>new n(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")))},3874:(e,t,r)=>{const n=r(8311);e.exports=(e,t)=>{try{return new n(e,t).range||"*"}catch(e){return null}}},6386:function(e){!function(t,r){"use strict";e.exports?e.exports=r():(t.nacl||(t.nacl={}),t.nacl.util=r())}(this,(function(){"use strict";var e={};function t(e){if(!/^(?:[A-Za-z0-9+\/]{2}[A-Za-z0-9+\/]{2})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.test(e))throw new TypeError("invalid encoding")}return e.decodeUTF8=function(e){if("string"!=typeof e)throw new TypeError("expected string");var t,r=unescape(encodeURIComponent(e)),n=new Uint8Array(r.length);for(t=0;t{!function(e){"use strict";var t=function(e){var t,r=new Float64Array(16);if(e)for(t=0;t>24&255,e[t+1]=r>>16&255,e[t+2]=r>>8&255,e[t+3]=255&r,e[t+4]=n>>24&255,e[t+5]=n>>16&255,e[t+6]=n>>8&255,e[t+7]=255&n}function g(e,t,r,n,o){var i,s=0;for(i=0;i>>8)-1}function y(e,t,r,n){return g(e,t,r,n,16)}function m(e,t,r,n){return g(e,t,r,n,32)}function b(e,t,r,n){!function(e,t,r,n){for(var o,i=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,s=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,a=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,c=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,u=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,l=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,f=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,h=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,p=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,d=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,g=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,y=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,m=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,b=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,v=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,w=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,E=i,x=s,S=a,A=c,I=u,B=l,T=f,P=h,C=p,_=d,R=g,O=y,k=m,N=b,L=v,j=w,M=0;M<20;M+=2)E^=(o=(k^=(o=(C^=(o=(I^=(o=E+k|0)<<7|o>>>25)+E|0)<<9|o>>>23)+I|0)<<13|o>>>19)+C|0)<<18|o>>>14,B^=(o=(x^=(o=(N^=(o=(_^=(o=B+x|0)<<7|o>>>25)+B|0)<<9|o>>>23)+_|0)<<13|o>>>19)+N|0)<<18|o>>>14,R^=(o=(T^=(o=(S^=(o=(L^=(o=R+T|0)<<7|o>>>25)+R|0)<<9|o>>>23)+L|0)<<13|o>>>19)+S|0)<<18|o>>>14,j^=(o=(O^=(o=(P^=(o=(A^=(o=j+O|0)<<7|o>>>25)+j|0)<<9|o>>>23)+A|0)<<13|o>>>19)+P|0)<<18|o>>>14,E^=(o=(A^=(o=(S^=(o=(x^=(o=E+A|0)<<7|o>>>25)+E|0)<<9|o>>>23)+x|0)<<13|o>>>19)+S|0)<<18|o>>>14,B^=(o=(I^=(o=(P^=(o=(T^=(o=B+I|0)<<7|o>>>25)+B|0)<<9|o>>>23)+T|0)<<13|o>>>19)+P|0)<<18|o>>>14,R^=(o=(_^=(o=(C^=(o=(O^=(o=R+_|0)<<7|o>>>25)+R|0)<<9|o>>>23)+O|0)<<13|o>>>19)+C|0)<<18|o>>>14,j^=(o=(L^=(o=(N^=(o=(k^=(o=j+L|0)<<7|o>>>25)+j|0)<<9|o>>>23)+k|0)<<13|o>>>19)+N|0)<<18|o>>>14;E=E+i|0,x=x+s|0,S=S+a|0,A=A+c|0,I=I+u|0,B=B+l|0,T=T+f|0,P=P+h|0,C=C+p|0,_=_+d|0,R=R+g|0,O=O+y|0,k=k+m|0,N=N+b|0,L=L+v|0,j=j+w|0,e[0]=E>>>0&255,e[1]=E>>>8&255,e[2]=E>>>16&255,e[3]=E>>>24&255,e[4]=x>>>0&255,e[5]=x>>>8&255,e[6]=x>>>16&255,e[7]=x>>>24&255,e[8]=S>>>0&255,e[9]=S>>>8&255,e[10]=S>>>16&255,e[11]=S>>>24&255,e[12]=A>>>0&255,e[13]=A>>>8&255,e[14]=A>>>16&255,e[15]=A>>>24&255,e[16]=I>>>0&255,e[17]=I>>>8&255,e[18]=I>>>16&255,e[19]=I>>>24&255,e[20]=B>>>0&255,e[21]=B>>>8&255,e[22]=B>>>16&255,e[23]=B>>>24&255,e[24]=T>>>0&255,e[25]=T>>>8&255,e[26]=T>>>16&255,e[27]=T>>>24&255,e[28]=P>>>0&255,e[29]=P>>>8&255,e[30]=P>>>16&255,e[31]=P>>>24&255,e[32]=C>>>0&255,e[33]=C>>>8&255,e[34]=C>>>16&255,e[35]=C>>>24&255,e[36]=_>>>0&255,e[37]=_>>>8&255,e[38]=_>>>16&255,e[39]=_>>>24&255,e[40]=R>>>0&255,e[41]=R>>>8&255,e[42]=R>>>16&255,e[43]=R>>>24&255,e[44]=O>>>0&255,e[45]=O>>>8&255,e[46]=O>>>16&255,e[47]=O>>>24&255,e[48]=k>>>0&255,e[49]=k>>>8&255,e[50]=k>>>16&255,e[51]=k>>>24&255,e[52]=N>>>0&255,e[53]=N>>>8&255,e[54]=N>>>16&255,e[55]=N>>>24&255,e[56]=L>>>0&255,e[57]=L>>>8&255,e[58]=L>>>16&255,e[59]=L>>>24&255,e[60]=j>>>0&255,e[61]=j>>>8&255,e[62]=j>>>16&255,e[63]=j>>>24&255}(e,t,r,n)}function v(e,t,r,n){!function(e,t,r,n){for(var o,i=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,s=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,a=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,c=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,u=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,l=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,f=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,h=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,p=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,d=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,g=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,y=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,m=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,b=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,v=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,w=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,E=0;E<20;E+=2)i^=(o=(m^=(o=(p^=(o=(u^=(o=i+m|0)<<7|o>>>25)+i|0)<<9|o>>>23)+u|0)<<13|o>>>19)+p|0)<<18|o>>>14,l^=(o=(s^=(o=(b^=(o=(d^=(o=l+s|0)<<7|o>>>25)+l|0)<<9|o>>>23)+d|0)<<13|o>>>19)+b|0)<<18|o>>>14,g^=(o=(f^=(o=(a^=(o=(v^=(o=g+f|0)<<7|o>>>25)+g|0)<<9|o>>>23)+v|0)<<13|o>>>19)+a|0)<<18|o>>>14,w^=(o=(y^=(o=(h^=(o=(c^=(o=w+y|0)<<7|o>>>25)+w|0)<<9|o>>>23)+c|0)<<13|o>>>19)+h|0)<<18|o>>>14,i^=(o=(c^=(o=(a^=(o=(s^=(o=i+c|0)<<7|o>>>25)+i|0)<<9|o>>>23)+s|0)<<13|o>>>19)+a|0)<<18|o>>>14,l^=(o=(u^=(o=(h^=(o=(f^=(o=l+u|0)<<7|o>>>25)+l|0)<<9|o>>>23)+f|0)<<13|o>>>19)+h|0)<<18|o>>>14,g^=(o=(d^=(o=(p^=(o=(y^=(o=g+d|0)<<7|o>>>25)+g|0)<<9|o>>>23)+y|0)<<13|o>>>19)+p|0)<<18|o>>>14,w^=(o=(v^=(o=(b^=(o=(m^=(o=w+v|0)<<7|o>>>25)+w|0)<<9|o>>>23)+m|0)<<13|o>>>19)+b|0)<<18|o>>>14;e[0]=i>>>0&255,e[1]=i>>>8&255,e[2]=i>>>16&255,e[3]=i>>>24&255,e[4]=l>>>0&255,e[5]=l>>>8&255,e[6]=l>>>16&255,e[7]=l>>>24&255,e[8]=g>>>0&255,e[9]=g>>>8&255,e[10]=g>>>16&255,e[11]=g>>>24&255,e[12]=w>>>0&255,e[13]=w>>>8&255,e[14]=w>>>16&255,e[15]=w>>>24&255,e[16]=f>>>0&255,e[17]=f>>>8&255,e[18]=f>>>16&255,e[19]=f>>>24&255,e[20]=h>>>0&255,e[21]=h>>>8&255,e[22]=h>>>16&255,e[23]=h>>>24&255,e[24]=p>>>0&255,e[25]=p>>>8&255,e[26]=p>>>16&255,e[27]=p>>>24&255,e[28]=d>>>0&255,e[29]=d>>>8&255,e[30]=d>>>16&255,e[31]=d>>>24&255}(e,t,r,n)}var w=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function E(e,t,r,n,o,i,s){var a,c,u=new Uint8Array(16),l=new Uint8Array(64);for(c=0;c<16;c++)u[c]=0;for(c=0;c<8;c++)u[c]=i[c];for(;o>=64;){for(b(l,u,s,w),c=0;c<64;c++)e[t+c]=r[n+c]^l[c];for(a=1,c=8;c<16;c++)a=a+(255&u[c])|0,u[c]=255&a,a>>>=8;o-=64,t+=64,n+=64}if(o>0)for(b(l,u,s,w),c=0;c=64;){for(b(c,a,o,w),s=0;s<64;s++)e[t+s]=c[s];for(i=1,s=8;s<16;s++)i=i+(255&a[s])|0,a[s]=255&i,i>>>=8;r-=64,t+=64}if(r>0)for(b(c,a,o,w),s=0;s>>13|r<<3),n=255&e[4]|(255&e[5])<<8,this.r[2]=7939&(r>>>10|n<<6),o=255&e[6]|(255&e[7])<<8,this.r[3]=8191&(n>>>7|o<<9),i=255&e[8]|(255&e[9])<<8,this.r[4]=255&(o>>>4|i<<12),this.r[5]=i>>>1&8190,s=255&e[10]|(255&e[11])<<8,this.r[6]=8191&(i>>>14|s<<2),a=255&e[12]|(255&e[13])<<8,this.r[7]=8065&(s>>>11|a<<5),c=255&e[14]|(255&e[15])<<8,this.r[8]=8191&(a>>>8|c<<8),this.r[9]=c>>>5&127,this.pad[0]=255&e[16]|(255&e[17])<<8,this.pad[1]=255&e[18]|(255&e[19])<<8,this.pad[2]=255&e[20]|(255&e[21])<<8,this.pad[3]=255&e[22]|(255&e[23])<<8,this.pad[4]=255&e[24]|(255&e[25])<<8,this.pad[5]=255&e[26]|(255&e[27])<<8,this.pad[6]=255&e[28]|(255&e[29])<<8,this.pad[7]=255&e[30]|(255&e[31])<<8};function B(e,t,r,n,o,i){var s=new I(i);return s.update(r,n,o),s.finish(e,t),0}function T(e,t,r,n,o,i){var s=new Uint8Array(16);return B(s,0,r,n,o,i),y(e,t,s,0)}function P(e,t,r,n,o){var i;if(r<32)return-1;for(A(e,0,t,0,r,n,o),B(e,16,e,32,r-32,e),i=0;i<16;i++)e[i]=0;return 0}function C(e,t,r,n,o){var i,s=new Uint8Array(32);if(r<32)return-1;if(S(s,0,32,n,o),0!==T(t,16,t,32,r-32,s))return-1;for(A(e,0,t,0,r,n,o),i=0;i<32;i++)e[i]=0;return 0}function _(e,t){var r;for(r=0;r<16;r++)e[r]=0|t[r]}function R(e){var t,r,n=1;for(t=0;t<16;t++)r=e[t]+n+65535,n=Math.floor(r/65536),e[t]=r-65536*n;e[0]+=n-1+37*(n-1)}function O(e,t,r){for(var n,o=~(r-1),i=0;i<16;i++)n=o&(e[i]^t[i]),e[i]^=n,t[i]^=n}function k(e,r){var n,o,i,s=t(),a=t();for(n=0;n<16;n++)a[n]=r[n];for(R(a),R(a),R(a),o=0;o<2;o++){for(s[0]=a[0]-65517,n=1;n<15;n++)s[n]=a[n]-65535-(s[n-1]>>16&1),s[n-1]&=65535;s[15]=a[15]-32767-(s[14]>>16&1),i=s[15]>>16&1,s[14]&=65535,O(a,s,1-i)}for(n=0;n<16;n++)e[2*n]=255&a[n],e[2*n+1]=a[n]>>8}function N(e,t){var r=new Uint8Array(32),n=new Uint8Array(32);return k(r,e),k(n,t),m(r,0,n,0)}function L(e){var t=new Uint8Array(32);return k(t,e),1&t[0]}function j(e,t){var r;for(r=0;r<16;r++)e[r]=t[2*r]+(t[2*r+1]<<8);e[15]&=32767}function M(e,t,r){for(var n=0;n<16;n++)e[n]=t[n]+r[n]}function $(e,t,r){for(var n=0;n<16;n++)e[n]=t[n]-r[n]}function U(e,t,r){var n,o,i=0,s=0,a=0,c=0,u=0,l=0,f=0,h=0,p=0,d=0,g=0,y=0,m=0,b=0,v=0,w=0,E=0,x=0,S=0,A=0,I=0,B=0,T=0,P=0,C=0,_=0,R=0,O=0,k=0,N=0,L=0,j=r[0],M=r[1],$=r[2],U=r[3],F=r[4],D=r[5],H=r[6],z=r[7],G=r[8],V=r[9],Z=r[10],Y=r[11],W=r[12],J=r[13],q=r[14],K=r[15];i+=(n=t[0])*j,s+=n*M,a+=n*$,c+=n*U,u+=n*F,l+=n*D,f+=n*H,h+=n*z,p+=n*G,d+=n*V,g+=n*Z,y+=n*Y,m+=n*W,b+=n*J,v+=n*q,w+=n*K,s+=(n=t[1])*j,a+=n*M,c+=n*$,u+=n*U,l+=n*F,f+=n*D,h+=n*H,p+=n*z,d+=n*G,g+=n*V,y+=n*Z,m+=n*Y,b+=n*W,v+=n*J,w+=n*q,E+=n*K,a+=(n=t[2])*j,c+=n*M,u+=n*$,l+=n*U,f+=n*F,h+=n*D,p+=n*H,d+=n*z,g+=n*G,y+=n*V,m+=n*Z,b+=n*Y,v+=n*W,w+=n*J,E+=n*q,x+=n*K,c+=(n=t[3])*j,u+=n*M,l+=n*$,f+=n*U,h+=n*F,p+=n*D,d+=n*H,g+=n*z,y+=n*G,m+=n*V,b+=n*Z,v+=n*Y,w+=n*W,E+=n*J,x+=n*q,S+=n*K,u+=(n=t[4])*j,l+=n*M,f+=n*$,h+=n*U,p+=n*F,d+=n*D,g+=n*H,y+=n*z,m+=n*G,b+=n*V,v+=n*Z,w+=n*Y,E+=n*W,x+=n*J,S+=n*q,A+=n*K,l+=(n=t[5])*j,f+=n*M,h+=n*$,p+=n*U,d+=n*F,g+=n*D,y+=n*H,m+=n*z,b+=n*G,v+=n*V,w+=n*Z,E+=n*Y,x+=n*W,S+=n*J,A+=n*q,I+=n*K,f+=(n=t[6])*j,h+=n*M,p+=n*$,d+=n*U,g+=n*F,y+=n*D,m+=n*H,b+=n*z,v+=n*G,w+=n*V,E+=n*Z,x+=n*Y,S+=n*W,A+=n*J,I+=n*q,B+=n*K,h+=(n=t[7])*j,p+=n*M,d+=n*$,g+=n*U,y+=n*F,m+=n*D,b+=n*H,v+=n*z,w+=n*G,E+=n*V,x+=n*Z,S+=n*Y,A+=n*W,I+=n*J,B+=n*q,T+=n*K,p+=(n=t[8])*j,d+=n*M,g+=n*$,y+=n*U,m+=n*F,b+=n*D,v+=n*H,w+=n*z,E+=n*G,x+=n*V,S+=n*Z,A+=n*Y,I+=n*W,B+=n*J,T+=n*q,P+=n*K,d+=(n=t[9])*j,g+=n*M,y+=n*$,m+=n*U,b+=n*F,v+=n*D,w+=n*H,E+=n*z,x+=n*G,S+=n*V,A+=n*Z,I+=n*Y,B+=n*W,T+=n*J,P+=n*q,C+=n*K,g+=(n=t[10])*j,y+=n*M,m+=n*$,b+=n*U,v+=n*F,w+=n*D,E+=n*H,x+=n*z,S+=n*G,A+=n*V,I+=n*Z,B+=n*Y,T+=n*W,P+=n*J,C+=n*q,_+=n*K,y+=(n=t[11])*j,m+=n*M,b+=n*$,v+=n*U,w+=n*F,E+=n*D,x+=n*H,S+=n*z,A+=n*G,I+=n*V,B+=n*Z,T+=n*Y,P+=n*W,C+=n*J,_+=n*q,R+=n*K,m+=(n=t[12])*j,b+=n*M,v+=n*$,w+=n*U,E+=n*F,x+=n*D,S+=n*H,A+=n*z,I+=n*G,B+=n*V,T+=n*Z,P+=n*Y,C+=n*W,_+=n*J,R+=n*q,O+=n*K,b+=(n=t[13])*j,v+=n*M,w+=n*$,E+=n*U,x+=n*F,S+=n*D,A+=n*H,I+=n*z,B+=n*G,T+=n*V,P+=n*Z,C+=n*Y,_+=n*W,R+=n*J,O+=n*q,k+=n*K,v+=(n=t[14])*j,w+=n*M,E+=n*$,x+=n*U,S+=n*F,A+=n*D,I+=n*H,B+=n*z,T+=n*G,P+=n*V,C+=n*Z,_+=n*Y,R+=n*W,O+=n*J,k+=n*q,N+=n*K,w+=(n=t[15])*j,s+=38*(x+=n*$),a+=38*(S+=n*U),c+=38*(A+=n*F),u+=38*(I+=n*D),l+=38*(B+=n*H),f+=38*(T+=n*z),h+=38*(P+=n*G),p+=38*(C+=n*V),d+=38*(_+=n*Z),g+=38*(R+=n*Y),y+=38*(O+=n*W),m+=38*(k+=n*J),b+=38*(N+=n*q),v+=38*(L+=n*K),i=(n=(i+=38*(E+=n*M))+(o=1)+65535)-65536*(o=Math.floor(n/65536)),s=(n=s+o+65535)-65536*(o=Math.floor(n/65536)),a=(n=a+o+65535)-65536*(o=Math.floor(n/65536)),c=(n=c+o+65535)-65536*(o=Math.floor(n/65536)),u=(n=u+o+65535)-65536*(o=Math.floor(n/65536)),l=(n=l+o+65535)-65536*(o=Math.floor(n/65536)),f=(n=f+o+65535)-65536*(o=Math.floor(n/65536)),h=(n=h+o+65535)-65536*(o=Math.floor(n/65536)),p=(n=p+o+65535)-65536*(o=Math.floor(n/65536)),d=(n=d+o+65535)-65536*(o=Math.floor(n/65536)),g=(n=g+o+65535)-65536*(o=Math.floor(n/65536)),y=(n=y+o+65535)-65536*(o=Math.floor(n/65536)),m=(n=m+o+65535)-65536*(o=Math.floor(n/65536)),b=(n=b+o+65535)-65536*(o=Math.floor(n/65536)),v=(n=v+o+65535)-65536*(o=Math.floor(n/65536)),w=(n=w+o+65535)-65536*(o=Math.floor(n/65536)),i=(n=(i+=o-1+37*(o-1))+(o=1)+65535)-65536*(o=Math.floor(n/65536)),s=(n=s+o+65535)-65536*(o=Math.floor(n/65536)),a=(n=a+o+65535)-65536*(o=Math.floor(n/65536)),c=(n=c+o+65535)-65536*(o=Math.floor(n/65536)),u=(n=u+o+65535)-65536*(o=Math.floor(n/65536)),l=(n=l+o+65535)-65536*(o=Math.floor(n/65536)),f=(n=f+o+65535)-65536*(o=Math.floor(n/65536)),h=(n=h+o+65535)-65536*(o=Math.floor(n/65536)),p=(n=p+o+65535)-65536*(o=Math.floor(n/65536)),d=(n=d+o+65535)-65536*(o=Math.floor(n/65536)),g=(n=g+o+65535)-65536*(o=Math.floor(n/65536)),y=(n=y+o+65535)-65536*(o=Math.floor(n/65536)),m=(n=m+o+65535)-65536*(o=Math.floor(n/65536)),b=(n=b+o+65535)-65536*(o=Math.floor(n/65536)),v=(n=v+o+65535)-65536*(o=Math.floor(n/65536)),w=(n=w+o+65535)-65536*(o=Math.floor(n/65536)),i+=o-1+37*(o-1),e[0]=i,e[1]=s,e[2]=a,e[3]=c,e[4]=u,e[5]=l,e[6]=f,e[7]=h,e[8]=p,e[9]=d,e[10]=g,e[11]=y,e[12]=m,e[13]=b,e[14]=v,e[15]=w}function F(e,t){U(e,t,t)}function D(e,r){var n,o=t();for(n=0;n<16;n++)o[n]=r[n];for(n=253;n>=0;n--)F(o,o),2!==n&&4!==n&&U(o,o,r);for(n=0;n<16;n++)e[n]=o[n]}function H(e,r){var n,o=t();for(n=0;n<16;n++)o[n]=r[n];for(n=250;n>=0;n--)F(o,o),1!==n&&U(o,o,r);for(n=0;n<16;n++)e[n]=o[n]}function z(e,r,n){var o,i,s=new Uint8Array(32),a=new Float64Array(80),u=t(),l=t(),f=t(),h=t(),p=t(),d=t();for(i=0;i<31;i++)s[i]=r[i];for(s[31]=127&r[31]|64,s[0]&=248,j(a,n),i=0;i<16;i++)l[i]=a[i],h[i]=u[i]=f[i]=0;for(u[0]=h[0]=1,i=254;i>=0;--i)O(u,l,o=s[i>>>3]>>>(7&i)&1),O(f,h,o),M(p,u,f),$(u,u,f),M(f,l,h),$(l,l,h),F(h,p),F(d,u),U(u,f,u),U(f,l,p),M(p,u,f),$(u,u,f),F(l,u),$(f,h,d),U(u,f,c),M(u,u,h),U(f,f,u),U(u,h,d),U(h,l,a),F(l,p),O(u,l,o),O(f,h,o);for(i=0;i<16;i++)a[i+16]=u[i],a[i+32]=f[i],a[i+48]=l[i],a[i+64]=h[i];var g=a.subarray(32),y=a.subarray(16);return D(g,g),U(y,y,g),k(e,y),0}function G(e,t){return z(e,t,i)}function V(e,t){return n(t,32),G(e,t)}function Z(e,t,r){var n=new Uint8Array(32);return z(n,r,t),v(e,o,n,w)}I.prototype.blocks=function(e,t,r){for(var n,o,i,s,a,c,u,l,f,h,p,d,g,y,m,b,v,w,E,x=this.fin?0:2048,S=this.h[0],A=this.h[1],I=this.h[2],B=this.h[3],T=this.h[4],P=this.h[5],C=this.h[6],_=this.h[7],R=this.h[8],O=this.h[9],k=this.r[0],N=this.r[1],L=this.r[2],j=this.r[3],M=this.r[4],$=this.r[5],U=this.r[6],F=this.r[7],D=this.r[8],H=this.r[9];r>=16;)h=f=0,h+=(S+=8191&(n=255&e[t+0]|(255&e[t+1])<<8))*k,h+=(A+=8191&(n>>>13|(o=255&e[t+2]|(255&e[t+3])<<8)<<3))*(5*H),h+=(I+=8191&(o>>>10|(i=255&e[t+4]|(255&e[t+5])<<8)<<6))*(5*D),h+=(B+=8191&(i>>>7|(s=255&e[t+6]|(255&e[t+7])<<8)<<9))*(5*F),f=(h+=(T+=8191&(s>>>4|(a=255&e[t+8]|(255&e[t+9])<<8)<<12))*(5*U))>>>13,h&=8191,h+=(P+=a>>>1&8191)*(5*$),h+=(C+=8191&(a>>>14|(c=255&e[t+10]|(255&e[t+11])<<8)<<2))*(5*M),h+=(_+=8191&(c>>>11|(u=255&e[t+12]|(255&e[t+13])<<8)<<5))*(5*j),h+=(R+=8191&(u>>>8|(l=255&e[t+14]|(255&e[t+15])<<8)<<8))*(5*L),p=f+=(h+=(O+=l>>>5|x)*(5*N))>>>13,p+=S*N,p+=A*k,p+=I*(5*H),p+=B*(5*D),f=(p+=T*(5*F))>>>13,p&=8191,p+=P*(5*U),p+=C*(5*$),p+=_*(5*M),p+=R*(5*j),f+=(p+=O*(5*L))>>>13,p&=8191,d=f,d+=S*L,d+=A*N,d+=I*k,d+=B*(5*H),f=(d+=T*(5*D))>>>13,d&=8191,d+=P*(5*F),d+=C*(5*U),d+=_*(5*$),d+=R*(5*M),g=f+=(d+=O*(5*j))>>>13,g+=S*j,g+=A*L,g+=I*N,g+=B*k,f=(g+=T*(5*H))>>>13,g&=8191,g+=P*(5*D),g+=C*(5*F),g+=_*(5*U),g+=R*(5*$),y=f+=(g+=O*(5*M))>>>13,y+=S*M,y+=A*j,y+=I*L,y+=B*N,f=(y+=T*k)>>>13,y&=8191,y+=P*(5*H),y+=C*(5*D),y+=_*(5*F),y+=R*(5*U),m=f+=(y+=O*(5*$))>>>13,m+=S*$,m+=A*M,m+=I*j,m+=B*L,f=(m+=T*N)>>>13,m&=8191,m+=P*k,m+=C*(5*H),m+=_*(5*D),m+=R*(5*F),b=f+=(m+=O*(5*U))>>>13,b+=S*U,b+=A*$,b+=I*M,b+=B*j,f=(b+=T*L)>>>13,b&=8191,b+=P*N,b+=C*k,b+=_*(5*H),b+=R*(5*D),v=f+=(b+=O*(5*F))>>>13,v+=S*F,v+=A*U,v+=I*$,v+=B*M,f=(v+=T*j)>>>13,v&=8191,v+=P*L,v+=C*N,v+=_*k,v+=R*(5*H),w=f+=(v+=O*(5*D))>>>13,w+=S*D,w+=A*F,w+=I*U,w+=B*$,f=(w+=T*M)>>>13,w&=8191,w+=P*j,w+=C*L,w+=_*N,w+=R*k,E=f+=(w+=O*(5*H))>>>13,E+=S*H,E+=A*D,E+=I*F,E+=B*U,f=(E+=T*$)>>>13,E&=8191,E+=P*M,E+=C*j,E+=_*L,E+=R*N,S=h=8191&(f=(f=((f+=(E+=O*k)>>>13)<<2)+f|0)+(h&=8191)|0),A=p+=f>>>=13,I=d&=8191,B=g&=8191,T=y&=8191,P=m&=8191,C=b&=8191,_=v&=8191,R=w&=8191,O=E&=8191,t+=16,r-=16;this.h[0]=S,this.h[1]=A,this.h[2]=I,this.h[3]=B,this.h[4]=T,this.h[5]=P,this.h[6]=C,this.h[7]=_,this.h[8]=R,this.h[9]=O},I.prototype.finish=function(e,t){var r,n,o,i,s=new Uint16Array(10);if(this.leftover){for(i=this.leftover,this.buffer[i++]=1;i<16;i++)this.buffer[i]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(r=this.h[1]>>>13,this.h[1]&=8191,i=2;i<10;i++)this.h[i]+=r,r=this.h[i]>>>13,this.h[i]&=8191;for(this.h[0]+=5*r,r=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=r,r=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=r,s[0]=this.h[0]+5,r=s[0]>>>13,s[0]&=8191,i=1;i<10;i++)s[i]=this.h[i]+r,r=s[i]>>>13,s[i]&=8191;for(s[9]-=8192,n=(1^r)-1,i=0;i<10;i++)s[i]&=n;for(n=~n,i=0;i<10;i++)this.h[i]=this.h[i]&n|s[i];for(this.h[0]=65535&(this.h[0]|this.h[1]<<13),this.h[1]=65535&(this.h[1]>>>3|this.h[2]<<10),this.h[2]=65535&(this.h[2]>>>6|this.h[3]<<7),this.h[3]=65535&(this.h[3]>>>9|this.h[4]<<4),this.h[4]=65535&(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14),this.h[5]=65535&(this.h[6]>>>2|this.h[7]<<11),this.h[6]=65535&(this.h[7]>>>5|this.h[8]<<8),this.h[7]=65535&(this.h[8]>>>8|this.h[9]<<5),o=this.h[0]+this.pad[0],this.h[0]=65535&o,i=1;i<8;i++)o=(this.h[i]+this.pad[i]|0)+(o>>>16)|0,this.h[i]=65535&o;e[t+0]=this.h[0]>>>0&255,e[t+1]=this.h[0]>>>8&255,e[t+2]=this.h[1]>>>0&255,e[t+3]=this.h[1]>>>8&255,e[t+4]=this.h[2]>>>0&255,e[t+5]=this.h[2]>>>8&255,e[t+6]=this.h[3]>>>0&255,e[t+7]=this.h[3]>>>8&255,e[t+8]=this.h[4]>>>0&255,e[t+9]=this.h[4]>>>8&255,e[t+10]=this.h[5]>>>0&255,e[t+11]=this.h[5]>>>8&255,e[t+12]=this.h[6]>>>0&255,e[t+13]=this.h[6]>>>8&255,e[t+14]=this.h[7]>>>0&255,e[t+15]=this.h[7]>>>8&255},I.prototype.update=function(e,t,r){var n,o;if(this.leftover){for((o=16-this.leftover)>r&&(o=r),n=0;n=16&&(o=r-r%16,this.blocks(e,t,o),t+=o,r-=o),r){for(n=0;n=128;){for(x=0;x<16;x++)S=8*x+W,_[x]=r[S+0]<<24|r[S+1]<<16|r[S+2]<<8|r[S+3],R[x]=r[S+4]<<24|r[S+5]<<16|r[S+6]<<8|r[S+7];for(x=0;x<80;x++)if(o=O,i=k,s=N,a=L,c=j,u=M,l=$,h=F,p=D,d=H,g=z,y=G,m=V,b=Z,B=65535&(I=Y),T=I>>>16,P=65535&(A=U),C=A>>>16,B+=65535&(I=(G>>>14|j<<18)^(G>>>18|j<<14)^(j>>>9|G<<23)),T+=I>>>16,P+=65535&(A=(j>>>14|G<<18)^(j>>>18|G<<14)^(G>>>9|j<<23)),C+=A>>>16,B+=65535&(I=G&V^~G&Z),T+=I>>>16,P+=65535&(A=j&M^~j&$),C+=A>>>16,B+=65535&(I=J[2*x+1]),T+=I>>>16,P+=65535&(A=J[2*x]),C+=A>>>16,A=_[x%16],T+=(I=R[x%16])>>>16,P+=65535&A,C+=A>>>16,P+=(T+=(B+=65535&I)>>>16)>>>16,B=65535&(I=E=65535&B|T<<16),T=I>>>16,P=65535&(A=w=65535&P|(C+=P>>>16)<<16),C=A>>>16,B+=65535&(I=(F>>>28|O<<4)^(O>>>2|F<<30)^(O>>>7|F<<25)),T+=I>>>16,P+=65535&(A=(O>>>28|F<<4)^(F>>>2|O<<30)^(F>>>7|O<<25)),C+=A>>>16,T+=(I=F&D^F&H^D&H)>>>16,P+=65535&(A=O&k^O&N^k&N),C+=A>>>16,f=65535&(P+=(T+=(B+=65535&I)>>>16)>>>16)|(C+=P>>>16)<<16,v=65535&B|T<<16,B=65535&(I=g),T=I>>>16,P=65535&(A=a),C=A>>>16,T+=(I=E)>>>16,P+=65535&(A=w),C+=A>>>16,k=o,N=i,L=s,j=a=65535&(P+=(T+=(B+=65535&I)>>>16)>>>16)|(C+=P>>>16)<<16,M=c,$=u,U=l,O=f,D=h,H=p,z=d,G=g=65535&B|T<<16,V=y,Z=m,Y=b,F=v,x%16==15)for(S=0;S<16;S++)A=_[S],B=65535&(I=R[S]),T=I>>>16,P=65535&A,C=A>>>16,A=_[(S+9)%16],B+=65535&(I=R[(S+9)%16]),T+=I>>>16,P+=65535&A,C+=A>>>16,w=_[(S+1)%16],B+=65535&(I=((E=R[(S+1)%16])>>>1|w<<31)^(E>>>8|w<<24)^(E>>>7|w<<25)),T+=I>>>16,P+=65535&(A=(w>>>1|E<<31)^(w>>>8|E<<24)^w>>>7),C+=A>>>16,w=_[(S+14)%16],T+=(I=((E=R[(S+14)%16])>>>19|w<<13)^(w>>>29|E<<3)^(E>>>6|w<<26))>>>16,P+=65535&(A=(w>>>19|E<<13)^(E>>>29|w<<3)^w>>>6),C+=A>>>16,C+=(P+=(T+=(B+=65535&I)>>>16)>>>16)>>>16,_[S]=65535&P|C<<16,R[S]=65535&B|T<<16;B=65535&(I=F),T=I>>>16,P=65535&(A=O),C=A>>>16,A=e[0],T+=(I=t[0])>>>16,P+=65535&A,C+=A>>>16,C+=(P+=(T+=(B+=65535&I)>>>16)>>>16)>>>16,e[0]=O=65535&P|C<<16,t[0]=F=65535&B|T<<16,B=65535&(I=D),T=I>>>16,P=65535&(A=k),C=A>>>16,A=e[1],T+=(I=t[1])>>>16,P+=65535&A,C+=A>>>16,C+=(P+=(T+=(B+=65535&I)>>>16)>>>16)>>>16,e[1]=k=65535&P|C<<16,t[1]=D=65535&B|T<<16,B=65535&(I=H),T=I>>>16,P=65535&(A=N),C=A>>>16,A=e[2],T+=(I=t[2])>>>16,P+=65535&A,C+=A>>>16,C+=(P+=(T+=(B+=65535&I)>>>16)>>>16)>>>16,e[2]=N=65535&P|C<<16,t[2]=H=65535&B|T<<16,B=65535&(I=z),T=I>>>16,P=65535&(A=L),C=A>>>16,A=e[3],T+=(I=t[3])>>>16,P+=65535&A,C+=A>>>16,C+=(P+=(T+=(B+=65535&I)>>>16)>>>16)>>>16,e[3]=L=65535&P|C<<16,t[3]=z=65535&B|T<<16,B=65535&(I=G),T=I>>>16,P=65535&(A=j),C=A>>>16,A=e[4],T+=(I=t[4])>>>16,P+=65535&A,C+=A>>>16,C+=(P+=(T+=(B+=65535&I)>>>16)>>>16)>>>16,e[4]=j=65535&P|C<<16,t[4]=G=65535&B|T<<16,B=65535&(I=V),T=I>>>16,P=65535&(A=M),C=A>>>16,A=e[5],T+=(I=t[5])>>>16,P+=65535&A,C+=A>>>16,C+=(P+=(T+=(B+=65535&I)>>>16)>>>16)>>>16,e[5]=M=65535&P|C<<16,t[5]=V=65535&B|T<<16,B=65535&(I=Z),T=I>>>16,P=65535&(A=$),C=A>>>16,A=e[6],T+=(I=t[6])>>>16,P+=65535&A,C+=A>>>16,C+=(P+=(T+=(B+=65535&I)>>>16)>>>16)>>>16,e[6]=$=65535&P|C<<16,t[6]=Z=65535&B|T<<16,B=65535&(I=Y),T=I>>>16,P=65535&(A=U),C=A>>>16,A=e[7],T+=(I=t[7])>>>16,P+=65535&A,C+=A>>>16,C+=(P+=(T+=(B+=65535&I)>>>16)>>>16)>>>16,e[7]=U=65535&P|C<<16,t[7]=Y=65535&B|T<<16,W+=128,n-=128}return n}function K(e,t,r){var n,o=new Int32Array(8),i=new Int32Array(8),s=new Uint8Array(256),a=r;for(o[0]=1779033703,o[1]=3144134277,o[2]=1013904242,o[3]=2773480762,o[4]=1359893119,o[5]=2600822924,o[6]=528734635,o[7]=1541459225,i[0]=4089235720,i[1]=2227873595,i[2]=4271175723,i[3]=1595750129,i[4]=2917565137,i[5]=725511199,i[6]=4215389547,i[7]=327033209,q(o,i,t,r),r%=128,n=0;n=0;--o)Q(e,t,n=r[o/8|0]>>(7&o)&1),X(t,e),X(e,e),Q(e,t,n)}function re(e,r){var n=[t(),t(),t(),t()];_(n[0],f),_(n[1],h),_(n[2],a),U(n[3],f,h),te(e,n,r)}function ne(e,r,o){var i,s=new Uint8Array(64),a=[t(),t(),t(),t()];for(o||n(r,32),K(s,r,32),s[0]&=248,s[31]&=127,s[31]|=64,re(a,s),ee(e,a),i=0;i<32;i++)r[i+32]=e[i];return 0}var oe=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function ie(e,t){var r,n,o,i;for(n=63;n>=32;--n){for(r=0,o=n-32,i=n-12;o>4)*oe[o],r=t[o]>>8,t[o]&=255;for(o=0;o<32;o++)t[o]-=r*oe[o];for(n=0;n<32;n++)t[n+1]+=t[n]>>8,e[n]=255&t[n]}function se(e){var t,r=new Float64Array(64);for(t=0;t<64;t++)r[t]=e[t];for(t=0;t<64;t++)e[t]=0;ie(e,r)}function ae(e,r,n,o){var i,s,a=new Uint8Array(64),c=new Uint8Array(64),u=new Uint8Array(64),l=new Float64Array(64),f=[t(),t(),t(),t()];K(a,o,32),a[0]&=248,a[31]&=127,a[31]|=64;var h=n+64;for(i=0;i>7&&$(e[0],s,e[0]),U(e[3],e[0],e[1]),0)}(h,o))return-1;for(i=0;i=0},e.sign.keyPair=function(){var e=new Uint8Array(le),t=new Uint8Array(fe);return ne(e,t),{publicKey:e,secretKey:t}},e.sign.keyPair.fromSecretKey=function(e){if(pe(e),e.length!==fe)throw new Error("bad secret key size");for(var t=new Uint8Array(le),r=0;r= 0x80 (not a basic code point)","invalid-input":"Invalid input"},p=Math.floor,d=String.fromCharCode;function g(e){throw RangeError(h[e])}function y(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function m(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+y((e=e.replace(f,".")).split("."),t).join(".")}function b(e){for(var t,r,n=[],o=0,i=e.length;o=55296&&t<=56319&&o65535&&(t+=d((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+d(e)})).join("")}function w(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function E(e,t,r){var n=0;for(e=r?p(e/700):e>>1,e+=p(e/t);e>455;n+=c)e=p(e/35);return p(n+36*e/(e+38))}function x(e){var t,r,n,o,i,s,u,l,f,h,d,y=[],m=e.length,b=0,w=128,x=72;for((r=e.lastIndexOf("-"))<0&&(r=0),n=0;n=128&&g("not-basic"),y.push(e.charCodeAt(n));for(o=r>0?r+1:0;o=m&&g("invalid-input"),((l=(d=e.charCodeAt(o++))-48<10?d-22:d-65<26?d-65:d-97<26?d-97:c)>=c||l>p((a-b)/s))&&g("overflow"),b+=l*s,!(l<(f=u<=x?1:u>=x+26?26:u-x));u+=c)s>p(a/(h=c-f))&&g("overflow"),s*=h;x=E(b-i,t=y.length+1,0==i),p(b/t)>a-w&&g("overflow"),w+=p(b/t),b%=t,y.splice(b++,0,w)}return v(y)}function S(e){var t,r,n,o,i,s,u,l,f,h,y,m,v,x,S,A=[];for(m=(e=b(e)).length,t=128,r=0,i=72,s=0;s=t&&yp((a-r)/(v=n+1))&&g("overflow"),r+=(u-t)*v,t=u,s=0;sa&&g("overflow"),y==t){for(l=r,f=c;!(l<(h=f<=i?1:f>=i+26?26:f-i));f+=c)S=l-h,x=c-h,A.push(d(w(h+S%x,0))),l=p(S/x);A.push(d(w(l,0))),i=E(r,v,n==o),r=0,++n}++r,++t}return A.join("")}s={version:"1.3.2",ucs2:{decode:b,encode:v},decode:x,encode:S,toASCII:function(e){return m(e,(function(e){return l.test(e)?"xn--"+S(e):e}))},toUnicode:function(e){return m(e,(function(e){return u.test(e)?x(e.slice(4).toLowerCase()):e}))}},void 0===(n=function(){return s}.call(t,r,t,e))||(e.exports=n)}()},8835:(e,t,r)=>{var n=r(1270);function o(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}t.parse=m,t.resolve=function(e,t){return m(e,!1,!0).resolve(t)},t.resolveObject=function(e,t){return e?m(e,!1,!0).resolveObject(t):t},t.format=function(e){return b(e)&&(e=m(e)),e instanceof o?e.format():o.prototype.format.call(e)},t.Url=o;var i=/^([a-z0-9.+-]+:)/i,s=/:[0-9]*$/,a=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),c=["'"].concat(a),u=["%","/","?",";","#"].concat(c),l=["/","?","#"],f=/^[a-z0-9A-Z_-]{0,63}$/,h=/^([a-z0-9A-Z_-]{0,63})(.*)$/,p={javascript:!0,"javascript:":!0},d={javascript:!0,"javascript:":!0},g={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},y=r(7186);function m(e,t,r){if(e&&v(e)&&e instanceof o)return e;var n=new o;return n.parse(e,t,r),n}function b(e){return"string"==typeof e}function v(e){return"object"==typeof e&&null!==e}function w(e){return null===e}o.prototype.parse=function(e,t,r){if(!b(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var o=e;o=o.trim();var s=i.exec(o);if(s){var a=(s=s[0]).toLowerCase();this.protocol=a,o=o.substr(s.length)}if(r||s||o.match(/^\/\/[^@\/]+@[^@\/]+/)){var m="//"===o.substr(0,2);!m||s&&d[s]||(o=o.substr(2),this.slashes=!0)}if(!d[s]&&(m||s&&!g[s])){for(var v,w,E=-1,x=0;x127?P+="x":P+=T[C];if(!P.match(f)){var R=I.slice(0,x),O=I.slice(x+1),k=T.match(h);k&&(R.push(k[1]),O.unshift(k[2])),O.length&&(o="/"+O.join(".")+o),this.hostname=R.join(".");break}}}if(this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),!A){var N=this.hostname.split("."),L=[];for(x=0;x0)&&r.host.split("@"))&&(r.auth=E.shift(),r.host=r.hostname=E.shift())),r.search=e.search,r.query=e.query,w(r.pathname)&&w(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r;if(!f.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var p=f.slice(-1)[0],y=(r.host||e.host)&&("."===p||".."===p)||""===p,m=0,v=f.length;v>=0;v--)"."==(p=f[v])?f.splice(v,1):".."===p?(f.splice(v,1),m++):m&&(f.splice(v,1),m--);if(!u&&!l)for(;m--;m)f.unshift("..");!u||""===f[0]||f[0]&&"/"===f[0].charAt(0)||f.unshift(""),y&&"/"!==f.join("/").substr(-1)&&f.push("");var E,x=""===f[0]||f[0]&&"/"===f[0].charAt(0);return h&&(r.hostname=r.host=x?"":f.length?f.shift():"",(E=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=E.shift(),r.host=r.hostname=E.shift())),(u=u||r.host&&f.length)&&!x&&f.unshift(""),f.length?r.pathname=f.join("/"):(r.pathname=null,r.path=null),w(r.pathname)&&w(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},o.prototype.parseHost=function(){var e=this.host,t=s.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},6622:e=>{"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},1135:e=>{e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},537:(e,t,r)=>{var n=/%[sdj%]/g;t.format=function(e){if(!y(e)){for(var t=[],r=0;r=i)return e;switch(e){case"%s":return String(o[r++]);case"%d":return Number(o[r++]);case"%j":try{return JSON.stringify(o[r++])}catch(e){return"[Circular]"}default:return e}})),c=o[r];r=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),p(r)?n.showHidden=r:r&&t._extend(n,r),m(n.showHidden)&&(n.showHidden=!1),m(n.depth)&&(n.depth=2),m(n.colors)&&(n.colors=!1),m(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=a),u(n,e,n.depth)}function a(e,t){var r=s.styles[t];return r?"["+s.colors[r][0]+"m"+e+"["+s.colors[r][1]+"m":e}function c(e,t){return e}function u(e,r,n){if(e.customInspect&&r&&x(r.inspect)&&r.inspect!==t.inspect&&(!r.constructor||r.constructor.prototype!==r)){var o=r.inspect(n,e);return y(o)||(o=u(e,o,n)),o}var i=function(e,t){if(m(t))return e.stylize("undefined","undefined");if(y(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return g(t)?e.stylize(""+t,"number"):p(t)?e.stylize(""+t,"boolean"):d(t)?e.stylize("null","null"):void 0}(e,r);if(i)return i;var s=Object.keys(r),a=function(e){var t={};return e.forEach((function(e,r){t[e]=!0})),t}(s);if(e.showHidden&&(s=Object.getOwnPropertyNames(r)),E(r)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return l(r);if(0===s.length){if(x(r)){var c=r.name?": "+r.name:"";return e.stylize("[Function"+c+"]","special")}if(b(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(w(r))return e.stylize(Date.prototype.toString.call(r),"date");if(E(r))return l(r)}var v,S="",A=!1,I=["{","}"];return h(r)&&(A=!0,I=["[","]"]),x(r)&&(S=" [Function"+(r.name?": "+r.name:"")+"]"),b(r)&&(S=" "+RegExp.prototype.toString.call(r)),w(r)&&(S=" "+Date.prototype.toUTCString.call(r)),E(r)&&(S=" "+l(r)),0!==s.length||A&&0!=r.length?n<0?b(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special"):(e.seen.push(r),v=A?function(e,t,r,n,o){for(var i=[],s=0,a=t.length;s60?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}(v,S,I)):I[0]+S+I[1]}function l(e){return"["+Error.prototype.toString.call(e)+"]"}function f(e,t,r,n,o,i){var s,a,c;if((c=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]}).get?a=c.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):c.set&&(a=e.stylize("[Setter]","special")),T(n,o)||(s="["+o+"]"),a||(e.seen.indexOf(c.value)<0?(a=d(r)?u(e,c.value,null):u(e,c.value,r-1)).indexOf("\n")>-1&&(a=i?a.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+a.split("\n").map((function(e){return" "+e})).join("\n")):a=e.stylize("[Circular]","special")),m(s)){if(i&&o.match(/^\d+$/))return a;(s=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+a}function h(e){return Array.isArray(e)}function p(e){return"boolean"==typeof e}function d(e){return null===e}function g(e){return"number"==typeof e}function y(e){return"string"==typeof e}function m(e){return void 0===e}function b(e){return v(e)&&"[object RegExp]"===S(e)}function v(e){return"object"==typeof e&&null!==e}function w(e){return v(e)&&"[object Date]"===S(e)}function E(e){return v(e)&&("[object Error]"===S(e)||e instanceof Error)}function x(e){return"function"==typeof e}function S(e){return Object.prototype.toString.call(e)}function A(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(m(o)&&(o=process.env.NODE_DEBUG||""),e=e.toUpperCase(),!i[e])if(new RegExp("\\b"+e+"\\b","i").test(o)){var r=process.pid;i[e]=function(){var n=t.format.apply(t,arguments);console.error("%s %d: %s",e,r,n)}}else i[e]=function(){};return i[e]},t.inspect=s,s.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=h,t.isBoolean=p,t.isNull=d,t.isNullOrUndefined=function(e){return null==e},t.isNumber=g,t.isString=y,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=m,t.isRegExp=b,t.isObject=v,t.isDate=w,t.isError=E,t.isFunction=x,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=r(1135);var I=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function B(){var e=new Date,t=[A(e.getHours()),A(e.getMinutes()),A(e.getSeconds())].join(":");return[e.getDate(),I[e.getMonth()],t].join(" ")}function T(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){console.log("%s - %s",B(),t.format.apply(t,arguments))},t.inherits=r(6622),t._extend=function(e,t){if(!t||!v(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e}},259:e=>{"use strict";e.exports=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}},8799:(e,t,r)=>{"use strict";function n(e){var t=this;if(t instanceof n||(t=new n),t.tail=null,t.head=null,t.length=0,e&&"function"==typeof e.forEach)e.forEach((function(e){t.push(e)}));else if(arguments.length>0)for(var r=0,o=arguments.length;r1)r=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");n=this.head.next,r=this.head.value}for(var o=0;null!==n;o++)r=e(r,n.value,o),n=n.next;return r},n.prototype.reduceReverse=function(e,t){var r,n=this.tail;if(arguments.length>1)r=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");n=this.tail.prev,r=this.tail.value}for(var o=this.length-1;null!==n;o--)r=e(r,n.value,o),n=n.prev;return r},n.prototype.toArray=function(){for(var e=new Array(this.length),t=0,r=this.head;null!==r;t++)e[t]=r.value,r=r.next;return e},n.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,r=this.tail;null!==r;t++)e[t]=r.value,r=r.prev;return e},n.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new n;if(tthis.length&&(t=this.length);for(var o=0,i=this.head;null!==i&&othis.length&&(t=this.length);for(var o=this.length,i=this.tail;null!==i&&o>t;o--)i=i.prev;for(;null!==i&&o>e;o--,i=i.prev)r.push(i.value);return r},n.prototype.splice=function(e,t,...r){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var n=0,i=this.head;null!==i&&n{},105:()=>{},7542:()=>{},1281:()=>{},2150:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Struct:()=>l,StructError:()=>n,any:()=>I,array:()=>B,assert:()=>f,assign:()=>y,bigint:()=>T,boolean:()=>P,coerce:()=>q,create:()=>h,date:()=>C,defaulted:()=>K,define:()=>m,deprecated:()=>b,dynamic:()=>v,empty:()=>Q,enums:()=>_,func:()=>R,instance:()=>O,integer:()=>k,intersection:()=>N,is:()=>d,lazy:()=>w,literal:()=>L,map:()=>j,mask:()=>p,max:()=>te,min:()=>re,never:()=>M,nonempty:()=>ne,nullable:()=>$,number:()=>U,object:()=>F,omit:()=>E,optional:()=>D,partial:()=>x,pattern:()=>oe,pick:()=>S,record:()=>H,refine:()=>se,regexp:()=>z,set:()=>G,size:()=>ie,string:()=>V,struct:()=>A,trimmed:()=>X,tuple:()=>Z,type:()=>Y,union:()=>W,unknown:()=>J,validate:()=>g});class n extends TypeError{constructor(e,t){let r;const{message:n,explanation:o,...i}=e,{path:s}=e,a=0===s.length?n:`At path: ${s.join(".")} -- ${n}`;super(o??a),null!=o&&(this.cause=a),Object.assign(this,i),this.name=this.constructor.name,this.failures=()=>r??(r=[e,...t()])}}function o(e){return"object"==typeof e&&null!=e}function i(e){if("[object Object]"!==Object.prototype.toString.call(e))return!1;const t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function s(e){return"symbol"==typeof e?e.toString():"string"==typeof e?JSON.stringify(e):`${e}`}function a(e,t,r,n){if(!0===e)return;!1===e?e={}:"string"==typeof e&&(e={message:e});const{path:o,branch:i}=t,{type:a}=r,{refinement:c,message:u=`Expected a value of type \`${a}\`${c?` with refinement \`${c}\``:""}, but received: \`${s(n)}\``}=e;return{value:n,type:a,refinement:c,key:o[o.length-1],path:o,branch:i,...e,message:u}}function*c(e,t,r,n){var i;o(i=e)&&"function"==typeof i[Symbol.iterator]||(e=[e]);for(const o of e){const e=a(o,t,r,n);e&&(yield e)}}function*u(e,t,r={}){const{path:n=[],branch:i=[e],coerce:s=!1,mask:a=!1}=r,c={path:n,branch:i};if(s&&(e=t.coercer(e,c),a&&"type"!==t.type&&o(t.schema)&&o(e)&&!Array.isArray(e)))for(const r in e)void 0===t.schema[r]&&delete e[r];let l="valid";for(const n of t.validator(e,c))n.explanation=r.message,l="not_valid",yield[n,void 0];for(let[f,h,p]of t.entries(e,c)){const t=u(h,p,{path:void 0===f?n:[...n,f],branch:void 0===f?i:[...i,h],coerce:s,mask:a,message:r.message});for(const r of t)r[0]?(l=null!=r[0].refinement?"not_refined":"not_valid",yield[r[0],void 0]):s&&(h=r[1],void 0===f?e=h:e instanceof Map?e.set(f,h):e instanceof Set?e.add(h):o(e)&&(void 0!==h||f in e)&&(e[f]=h))}if("not_valid"!==l)for(const n of t.refiner(e,c))n.explanation=r.message,l="not_refined",yield[n,void 0];"valid"===l&&(yield[void 0,e])}class l{constructor(e){const{type:t,schema:r,validator:n,refiner:o,coercer:i=(e=>e),entries:s=function*(){}}=e;this.type=t,this.schema=r,this.entries=s,this.coercer=i,this.validator=n?(e,t)=>c(n(e,t),t,this,e):()=>[],this.refiner=o?(e,t)=>c(o(e,t),t,this,e):()=>[]}assert(e,t){return f(e,this,t)}create(e,t){return h(e,this,t)}is(e){return d(e,this)}mask(e,t){return p(e,this,t)}validate(e,t={}){return g(e,this,t)}}function f(e,t,r){const n=g(e,t,{message:r});if(n[0])throw n[0]}function h(e,t,r){const n=g(e,t,{coerce:!0,message:r});if(n[0])throw n[0];return n[1]}function p(e,t,r){const n=g(e,t,{coerce:!0,mask:!0,message:r});if(n[0])throw n[0];return n[1]}function d(e,t){return!g(e,t)[0]}function g(e,t,r={}){const o=u(e,t,r),i=function(e){const{done:t,value:r}=e.next();return t?void 0:r}(o);return i[0]?[new n(i[0],(function*(){for(const e of o)e[0]&&(yield e[0])})),void 0]:[void 0,i[1]]}function y(...e){const t="type"===e[0].type,r=e.map((e=>e.schema)),n=Object.assign({},...r);return t?Y(n):F(n)}function m(e,t){return new l({type:e,schema:null,validator:t})}function b(e,t){return new l({...e,refiner:(t,r)=>void 0===t||e.refiner(t,r),validator:(r,n)=>void 0===r||(t(r,n),e.validator(r,n))})}function v(e){return new l({type:"dynamic",schema:null,*entries(t,r){const n=e(t,r);yield*n.entries(t,r)},validator:(t,r)=>e(t,r).validator(t,r),coercer:(t,r)=>e(t,r).coercer(t,r),refiner:(t,r)=>e(t,r).refiner(t,r)})}function w(e){let t;return new l({type:"lazy",schema:null,*entries(r,n){t??(t=e()),yield*t.entries(r,n)},validator:(r,n)=>(t??(t=e()),t.validator(r,n)),coercer:(r,n)=>(t??(t=e()),t.coercer(r,n)),refiner:(r,n)=>(t??(t=e()),t.refiner(r,n))})}function E(e,t){const{schema:r}=e,n={...r};for(const e of t)delete n[e];return"type"===e.type?Y(n):F(n)}function x(e){const t=e instanceof l?{...e.schema}:{...e};for(const e in t)t[e]=D(t[e]);return F(t)}function S(e,t){const{schema:r}=e,n={};for(const e of t)n[e]=r[e];return F(n)}function A(e,t){return console.warn("superstruct@0.11 - The `struct` helper has been renamed to `define`."),m(e,t)}function I(){return m("any",(()=>!0))}function B(e){return new l({type:"array",schema:e,*entries(t){if(e&&Array.isArray(t))for(const[r,n]of t.entries())yield[r,n,e]},coercer:e=>Array.isArray(e)?e.slice():e,validator:e=>Array.isArray(e)||`Expected an array value, but received: ${s(e)}`})}function T(){return m("bigint",(e=>"bigint"==typeof e))}function P(){return m("boolean",(e=>"boolean"==typeof e))}function C(){return m("date",(e=>e instanceof Date&&!isNaN(e.getTime())||`Expected a valid \`Date\` object, but received: ${s(e)}`))}function _(e){const t={},r=e.map((e=>s(e))).join();for(const r of e)t[r]=r;return new l({type:"enums",schema:t,validator:t=>e.includes(t)||`Expected one of \`${r}\`, but received: ${s(t)}`})}function R(){return m("func",(e=>"function"==typeof e||`Expected a function, but received: ${s(e)}`))}function O(e){return m("instance",(t=>t instanceof e||`Expected a \`${e.name}\` instance, but received: ${s(t)}`))}function k(){return m("integer",(e=>"number"==typeof e&&!isNaN(e)&&Number.isInteger(e)||`Expected an integer, but received: ${s(e)}`))}function N(e){return new l({type:"intersection",schema:null,*entries(t,r){for(const n of e)yield*n.entries(t,r)},*validator(t,r){for(const n of e)yield*n.validator(t,r)},*refiner(t,r){for(const n of e)yield*n.refiner(t,r)}})}function L(e){const t=s(e),r=typeof e;return new l({type:"literal",schema:"string"===r||"number"===r||"boolean"===r?e:null,validator:r=>r===e||`Expected the literal \`${t}\`, but received: ${s(r)}`})}function j(e,t){return new l({type:"map",schema:null,*entries(r){if(e&&t&&r instanceof Map)for(const[n,o]of r.entries())yield[n,n,e],yield[n,o,t]},coercer:e=>e instanceof Map?new Map(e):e,validator:e=>e instanceof Map||`Expected a \`Map\` object, but received: ${s(e)}`})}function M(){return m("never",(()=>!1))}function $(e){return new l({...e,validator:(t,r)=>null===t||e.validator(t,r),refiner:(t,r)=>null===t||e.refiner(t,r)})}function U(){return m("number",(e=>"number"==typeof e&&!isNaN(e)||`Expected a number, but received: ${s(e)}`))}function F(e){const t=e?Object.keys(e):[],r=M();return new l({type:"object",schema:e||null,*entries(n){if(e&&o(n)){const o=new Set(Object.keys(n));for(const r of t)o.delete(r),yield[r,n[r],e[r]];for(const e of o)yield[e,n[e],r]}},validator:e=>o(e)||`Expected an object, but received: ${s(e)}`,coercer:e=>o(e)?{...e}:e})}function D(e){return new l({...e,validator:(t,r)=>void 0===t||e.validator(t,r),refiner:(t,r)=>void 0===t||e.refiner(t,r)})}function H(e,t){return new l({type:"record",schema:null,*entries(r){if(o(r))for(const n in r){const o=r[n];yield[n,n,e],yield[n,o,t]}},validator:e=>o(e)||`Expected an object, but received: ${s(e)}`})}function z(){return m("regexp",(e=>e instanceof RegExp))}function G(e){return new l({type:"set",schema:null,*entries(t){if(e&&t instanceof Set)for(const r of t)yield[r,r,e]},coercer:e=>e instanceof Set?new Set(e):e,validator:e=>e instanceof Set||`Expected a \`Set\` object, but received: ${s(e)}`})}function V(){return m("string",(e=>"string"==typeof e||`Expected a string, but received: ${s(e)}`))}function Z(e){const t=M();return new l({type:"tuple",schema:null,*entries(r){if(Array.isArray(r)){const n=Math.max(e.length,r.length);for(let o=0;oArray.isArray(e)||`Expected an array, but received: ${s(e)}`})}function Y(e){const t=Object.keys(e);return new l({type:"type",schema:e,*entries(r){if(o(r))for(const n of t)yield[n,r[n],e[n]]},validator:e=>o(e)||`Expected an object, but received: ${s(e)}`,coercer:e=>o(e)?{...e}:e})}function W(e){const t=e.map((e=>e.type)).join(" | ");return new l({type:"union",schema:null,coercer(t){for(const r of e){const[e,n]=r.validate(t,{coerce:!0});if(!e)return n}return t},validator(r,n){const o=[];for(const t of e){const[...e]=u(r,t,n),[i]=e;if(!i[0])return[];for(const[t]of e)t&&o.push(t)}return[`Expected the value to satisfy a union of \`${t}\`, but received: ${s(r)}`,...o]}})}function J(){return m("unknown",(()=>!0))}function q(e,t,r){return new l({...e,coercer:(n,o)=>d(n,t)?e.coercer(r(n,o),o):e.coercer(n,o)})}function K(e,t,r={}){return q(e,J(),(e=>{const n="function"==typeof t?t():t;if(void 0===e)return n;if(!r.strict&&i(e)&&i(n)){const t={...e};let r=!1;for(const e in n)void 0===t[e]&&(t[e]=n[e],r=!0);if(r)return t}return e}))}function X(e){return q(e,V(),(e=>e.trim()))}function Q(e){return se(e,"empty",(t=>{const r=ee(t);return 0===r||`Expected an empty ${e.type} but received one with a size of \`${r}\``}))}function ee(e){return e instanceof Map||e instanceof Set?e.size:e.length}function te(e,t,r={}){const{exclusive:n}=r;return se(e,"max",(r=>n?rn?r>t:r>=t||`Expected a ${e.type} greater than ${n?"":"or equal to "}${t} but received \`${r}\``))}function ne(e){return se(e,"nonempty",(t=>ee(t)>0||`Expected a nonempty ${e.type} but received an empty one`))}function oe(e,t){return se(e,"pattern",(r=>t.test(r)||`Expected a ${e.type} matching \`/${t.source}/\` but received "${r}"`))}function ie(e,t,r=t){const n=`Expected a ${e.type}`,o=t===r?`of \`${t}\``:`between \`${t}\` and \`${r}\``;return se(e,"size",(e=>{if("number"==typeof e||e instanceof Date)return t<=e&&e<=r||`${n} ${o} but received \`${e}\``;if(e instanceof Map||e instanceof Set){const{size:i}=e;return t<=i&&i<=r||`${n} with a size ${o} but received one with a size of \`${i}\``}{const{length:i}=e;return t<=i&&i<=r||`${n} with a length ${o} but received one with a length of \`${i}\``}}))}function se(e,t,r){return new l({...e,*refiner(n,o){yield*e.refiner(n,o);const i=c(r(n,o),o,e,n);for(const e of i)yield{...e,refinement:t}}})}}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={id:n,loaded:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.loaded=!0,i.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{"use strict";var e,t=r(228),n=(e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)},function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}),o=function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))},i=function(e,t){var r,n,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(c){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(s=0)),s;)try{if(r=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,n=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]t)throw new d({givenSize:g(e),maxSize:t})}function m(e,t={}){const{signed:r}=t;t.size&&y(e,{size:t.size});const n=BigInt(e);if(!r)return n;const o=(e.length-2)/2;return n<=(1n<<8n*BigInt(o)-1n)-1n?n:n-BigInt(`0x${"f".padStart(2*o,"f")}`)-1n}function b(e,t={}){return Number(m(e,t))}function v(e,t){return({exclude:r,format:n})=>({exclude:r,format:e=>{const o=t(e);if(r)for(const e of r)delete o[e];return{...o,...n(e)}},type:e})}const w={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559"};function E(e){const t={...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,chainId:e.chainId?b(e.chainId):void 0,gas:e.gas?BigInt(e.gas):void 0,gasPrice:e.gasPrice?BigInt(e.gasPrice):void 0,maxFeePerGas:e.maxFeePerGas?BigInt(e.maxFeePerGas):void 0,maxPriorityFeePerGas:e.maxPriorityFeePerGas?BigInt(e.maxPriorityFeePerGas):void 0,nonce:e.nonce?b(e.nonce):void 0,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,type:e.type?w[e.type]:void 0,typeHex:e.type?e.type:void 0,value:e.value?BigInt(e.value):void 0,v:e.v?BigInt(e.v):void 0};return t.yParity=(()=>{if(e.yParity)return Number(e.yParity);if("bigint"==typeof t.v){if(0n===t.v||27n===t.v)return 0;if(1n===t.v||28n===t.v)return 1;if(t.v>=35n)return t.v%2n===0n?1:0}})(),"legacy"===t.type&&(delete t.accessList,delete t.maxFeePerGas,delete t.maxPriorityFeePerGas,delete t.yParity),"eip2930"===t.type&&(delete t.maxFeePerGas,delete t.maxPriorityFeePerGas),t}const x=v("transaction",E);function S(e){const t=e.transactions?.map((e=>"string"==typeof e?e:E(e)));return{...e,baseFeePerGas:e.baseFeePerGas?BigInt(e.baseFeePerGas):null,difficulty:e.difficulty?BigInt(e.difficulty):void 0,gasLimit:e.gasLimit?BigInt(e.gasLimit):void 0,gasUsed:e.gasUsed?BigInt(e.gasUsed):void 0,hash:e.hash?e.hash:null,logsBloom:e.logsBloom?e.logsBloom:null,nonce:e.nonce?e.nonce:null,number:e.number?BigInt(e.number):null,size:e.size?BigInt(e.size):void 0,timestamp:e.timestamp?BigInt(e.timestamp):void 0,transactions:t,totalDifficulty:e.totalDifficulty?BigInt(e.totalDifficulty):null}}const A=v("block",S),I={"0x0":"reverted","0x1":"success"};function B(e){return{...e,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,contractAddress:e.contractAddress?e.contractAddress:null,cumulativeGasUsed:e.cumulativeGasUsed?BigInt(e.cumulativeGasUsed):null,effectiveGasPrice:e.effectiveGasPrice?BigInt(e.effectiveGasPrice):null,gasUsed:e.gasUsed?BigInt(e.gasUsed):null,logs:e.logs?e.logs.map((e=>function(e,{args:t,eventName:r}={}){return{...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,logIndex:e.logIndex?Number(e.logIndex):null,transactionHash:e.transactionHash?e.transactionHash:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,...r?{args:t,eventName:r}:{}}}(e))):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?b(e.transactionIndex):null,status:e.status?I[e.status]:null,type:e.type?w[e.type]||e.type:null}}const T=v("transactionReceipt",B),P={block:A({format(e){const t=e.transactions?.map((e=>{if("string"==typeof e)return e;const t=E(e);return"0x7e"===t.typeHex&&(t.isSystemTx=e.isSystemTx,t.mint=e.mint?m(e.mint):void 0,t.sourceHash=e.sourceHash,t.type="deposit"),t}));return{transactions:t,stateRoot:e.stateRoot}}}),transaction:x({format(e){const t={};return"0x7e"===e.type&&(t.isSystemTx=e.isSystemTx,t.mint=e.mint?m(e.mint):void 0,t.sourceHash=e.sourceHash,t.type="deposit"),t}}),transactionReceipt:T({format:e=>({l1GasPrice:e.l1GasPrice?m(e.l1GasPrice):null,l1GasUsed:e.l1GasUsed?m(e.l1GasUsed):null,l1Fee:e.l1Fee?m(e.l1Fee):null,l1FeeScalar:e.l1FeeScalar?Number(e.l1FeeScalar):null})})},C=a({id:8453,network:"base",name:"Base",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://base-mainnet.g.alchemy.com/v2"],webSocket:["wss://base-mainnet.g.alchemy.com/v2"]},infura:{http:["https://base-mainnet.infura.io/v3"],webSocket:["wss://base-mainnet.infura.io/ws/v3"]},default:{http:["https://mainnet.base.org"]},public:{http:["https://mainnet.base.org"]}},blockExplorers:{blockscout:{name:"Basescout",url:"https://base.blockscout.com"},default:{name:"Basescan",url:"https://basescan.org"},etherscan:{name:"Basescan",url:"https://basescan.org"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:5022}}},{formatters:P}),_=a({id:56,name:"BNB Smart Chain",network:"bsc",nativeCurrency:{decimals:18,name:"BNB",symbol:"BNB"},rpcUrls:{default:{http:["https://rpc.ankr.com/bsc"]},public:{http:["https://rpc.ankr.com/bsc"]}},blockExplorers:{etherscan:{name:"BscScan",url:"https://bscscan.com"},default:{name:"BscScan",url:"https://bscscan.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:15921452}}});class R extends f{constructor({size:e,targetSize:t,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (${e}) exceeds padding size (${t}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SizeExceedsPaddingSizeError"})}}function O(e,{dir:t,size:r=32}={}){return"string"==typeof e?function(e,{dir:t,size:r=32}={}){if(null===r)return e;const n=e.replace("0x","");if(n.length>2*r)throw new R({size:Math.ceil(n.length/2),targetSize:r,type:"hex"});return`0x${n["right"===t?"padEnd":"padStart"](2*r,"0")}`}(e,{dir:t,size:r}):function(e,{dir:t,size:r=32}={}){if(null===r)return e;if(e.length>r)throw new R({size:e.length,targetSize:r,type:"bytes"});const n=new Uint8Array(r);for(let o=0;ot.toString(16).padStart(2,"0")));function N(e,t={}){return"number"==typeof e||"bigint"==typeof e?j(e,t):"string"==typeof e?function(e,t={}){return L(M.encode(e),t)}(e,t):"boolean"==typeof e?function(e,t={}){const r=`0x${Number(e)}`;return"number"==typeof t.size?(y(r,{size:t.size}),O(r,{size:t.size})):r}(e,t):L(e,t)}function L(e,t={}){let r="";for(let t=0;ti||o"string"==typeof e?e:{...E(e),feeCurrency:e.feeCurrency,..."0x7b"!==e.type?{gatewayFee:e.gatewayFee?m(e.gatewayFee):null,gatewayFeeRecipient:e.gatewayFeeRecipient||null}:{}}));return{randomness:e.randomness,transactions:t}}}),transaction:x({format(e){const t={feeCurrency:e.feeCurrency};return"0x7b"===e.type?t.type="cip64":("0x7c"===e.type&&(t.type="cip42"),t.gatewayFee=e.gatewayFee?m(e.gatewayFee):null,t.gatewayFeeRecipient=e.gatewayFeeRecipient),t}}),transactionRequest:F({format(e){const t={feeCurrency:e.feeCurrency};return Z(e)?t.type="0x7b":(V(e)&&(t.type="0x7c"),t.gatewayFee=void 0!==e.gatewayFee?j(e.gatewayFee):void 0,t.gatewayFeeRecipient=e.gatewayFeeRecipient),t}})};class W extends f{constructor({address:e}){super(`Address "${e}" is invalid.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAddressError"})}}class J extends f{constructor({chainId:e}){super(`Chain ID "${e}" is invalid.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidChainIdError"})}}const q={ether:-9,wei:9};function K(e,t="wei"){return function(e,t){let r=e.toString();const n=r.startsWith("-");n&&(r=r.slice(1)),r=r.padStart(t,"0");let[o,i]=[r.slice(0,r.length-t),r.slice(r.length-t)];return i=i.replace(/(0+)$/,""),`${n?"-":""}${o||"0"}${i?`.${i}`:""}`}(e,q[t])}class X extends f{constructor({cause:e,message:t}={}){const r=t?.replace("execution reverted: ","")?.replace("execution reverted","");super(`Execution reverted ${r?`with reason: ${r}`:"for an unknown reason"}.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ExecutionRevertedError"})}}Object.defineProperty(X,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(X,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted/});class Q extends f{constructor({cause:e,maxFeePerGas:t}={}){super(`The fee cap (\`maxFeePerGas\`${t?` = ${K(t)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FeeCapTooHigh"})}}Object.defineProperty(Q,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/}),Object.defineProperty(class extends f{constructor({cause:e,maxFeePerGas:t}={}){super(`The fee cap (\`maxFeePerGas\`${t?` = ${K(t)}`:""} gwei) cannot be lower than the block base fee.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FeeCapTooLow"})}},"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/}),Object.defineProperty(class extends f{constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}is higher than the next one expected.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NonceTooHighError"})}},"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/}),Object.defineProperty(class extends f{constructor({cause:e,nonce:t}={}){super([`Nonce provided for the transaction ${t?`(${t}) `:""}is lower than the current nonce of the account.`,"Try increasing the nonce or find the latest nonce with `getTransactionCount`."].join("\n"),{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NonceTooLowError"})}},"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/}),Object.defineProperty(class extends f{constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}exceeds the maximum allowed nonce.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NonceMaxValueError"})}},"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/}),Object.defineProperty(class extends f{constructor({cause:e}={}){super(["The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account."].join("\n"),{cause:e,metaMessages:["This error could arise when the account does not have enough funds to:"," - pay for the total gas fee,"," - pay for the value to send."," ","The cost of the transaction is calculated as `gas * gas fee + value`, where:"," - `gas` is the amount of gas needed for transaction to execute,"," - `gas fee` is the gas fee,"," - `value` is the amount of ether to send to the recipient."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InsufficientFundsError"})}},"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds/}),Object.defineProperty(class extends f{constructor({cause:e,gas:t}={}){super(`The amount of gas ${t?`(${t}) `:""}provided for the transaction exceeds the limit allowed for the block.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"IntrinsicGasTooHighError"})}},"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/}),Object.defineProperty(class extends f{constructor({cause:e,gas:t}={}){super(`The amount of gas ${t?`(${t}) `:""}provided for the transaction is too low.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"IntrinsicGasTooLowError"})}},"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/}),Object.defineProperty(class extends f{constructor({cause:e}){super("The transaction type is not supported for this chain.",{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionTypeNotSupportedError"})}},"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});class ee extends f{constructor({cause:e,maxPriorityFeePerGas:t,maxFeePerGas:r}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${t?` = ${K(t)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${r?` = ${K(r)} gwei`:""}).`].join("\n"),{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TipAboveFeeCapError"})}}Object.defineProperty(ee,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max priority fee per gas higher than max fee per gas|tip higher than fee cap/});const te=/^0x[a-fA-F0-9]{40}$/;function re(e){return te.test(e)}function ne(e){return`0x${e.reduce(((e,t)=>e+t.replace("0x","")),"")}`}class oe extends f{constructor({offset:e}){super(`Offset \`${e}\` cannot be negative.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NegativeOffsetError"})}}class ie extends f{constructor({length:e,position:t}){super(`Position \`${t}\` is out of bounds (\`0 < position < ${e}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PositionOutOfBoundsError"})}}const se={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,assertPosition(e){if(e<0||e>this.bytes.length-1)throw new ie({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new oe({offset:e});const t=this.position-e;this.assertPosition(t),this.position=t},incrementPosition(e){if(e<0)throw new oe({offset:e});const t=this.position+e;this.assertPosition(t),this.position=t},inspectByte(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectBytes(e,t){const r=t??this.position;return this.assertPosition(r+e-1),this.bytes.subarray(r,r+e)},inspectUint8(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectUint16(e){const t=e??this.position;return this.assertPosition(t+1),this.dataView.getUint16(t)},inspectUint24(e){const t=e??this.position;return this.assertPosition(t+2),(this.dataView.getUint16(t)<<8)+this.dataView.getUint8(t+2)},inspectUint32(e){const t=e??this.position;return this.assertPosition(t+3),this.dataView.getUint32(t)},pushByte(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushBytes(e){this.assertPosition(this.position+e.length-1),this.bytes.set(e,this.position),this.position+=e.length},pushUint8(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushUint16(e){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,e),this.position+=2},pushUint24(e){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,e>>8),this.dataView.setUint8(this.position+2,255&e),this.position+=3},pushUint32(e){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,e),this.position+=4},readByte(){const e=this.inspectByte();return this.position++,e},readBytes(e){const t=this.inspectBytes(e);return this.position+=e,t},readUint8(){const e=this.inspectUint8();return this.position+=1,e},readUint16(){const e=this.inspectUint16();return this.position+=2,e},readUint24(){const e=this.inspectUint24();return this.position+=3,e},readUint32(){const e=this.inspectUint32();return this.position+=4,e},setPosition(e){this.assertPosition(e),this.position=e}};function ae(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:void 0}function ce(e,t="hex"){const r=ue(e),n=function(e){const t=Object.create(se);return t.bytes=e,t.dataView=new DataView(e.buffer,e.byteOffset,e.byteLength),t}(new Uint8Array(r.length));return r.encode(n),"hex"===t?L(n.bytes):n.bytes}function ue(e){return Array.isArray(e)?function(e){const t=e.reduce(((e,t)=>e+t.length),0),r=le(t);return{length:t<=55?1+t:1+r+t,encode(n){t<=55?n.pushByte(192+t):(n.pushByte(247+r),1===r?n.pushUint8(t):2===r?n.pushUint16(t):3===r?n.pushUint24(t):n.pushUint32(t));for(const{encode:t}of e)t(n)}}}(e.map((e=>ue(e)))):function(e){const t="string"==typeof e?function(e,t={}){let r=e;t.size&&(y(r,{size:t.size}),r=O(r,{dir:"right",size:t.size}));let n=r.slice(2);n.length%2&&(n=`0${n}`);const o=n.length/2,i=new Uint8Array(o);for(let e=0,t=0;evoid 0===t||!1===t?null:[e,t])).filter(Boolean),r=t.reduce(((e,[t])=>Math.max(e,t.length)),0);return t.map((([e,t])=>` ${`${e}:`.padEnd(r+1)} ${t}`)).join("\n")}class he extends f{constructor({v:e}){super(`Invalid \`v\` value "${e}". Expected 27 or 28.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidLegacyVError"})}}class pe extends f{constructor({transaction:e}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",fe(e),"}","","To infer the type, either provide:","- a `type` to the Transaction, or","- an EIP-1559 Transaction with `maxFeePerGas`, or","- an EIP-2930 Transaction with `gasPrice` & `accessList`, or","- a Legacy Transaction with `gasPrice`"]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSerializableTransactionError"})}}class de extends f{constructor({storageKey:e}){super(`Size for storage key "${e}" is invalid. Expected 32 bytes. Got ${Math.floor((e.length-2)/2)} bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidStorageKeySizeError"})}}function ge(e){if(!e||0===e.length)return[];const t=[];for(let r=0;rZ(e)?function(e,t){!function(e){const{chainId:t,maxPriorityFeePerGas:r,gasPrice:n,maxFeePerGas:o,to:i,feeCurrency:s}=e;if(t<=0)throw new J({chainId:t});if(i&&!re(i))throw new W({address:i});if(n)throw new f("`gasPrice` is not a valid CIP-64 Transaction attribute.");if(z(o)&&o>me)throw new Q({maxFeePerGas:o});if(z(r)&&z(o)&&r>o)throw new ee({maxFeePerGas:o,maxPriorityFeePerGas:r});if(z(s)&&!re(s))throw new f("`feeCurrency` MUST be a token address for CIP-64 transactions.");if(H(s))throw new f("`feeCurrency` must be provided for CIP-64 transactions.")}(e);const{chainId:r,gas:n,nonce:o,to:i,value:s,maxFeePerGas:a,maxPriorityFeePerGas:c,accessList:u,feeCurrency:l,data:h}=e,p=[N(r),o?N(o):"0x",c?N(c):"0x",a?N(a):"0x",n?N(n):"0x",i??"0x",s?N(s):"0x",h??"0x",ge(u),l];return t&&p.push(27n===t.v?"0x":N(1),D(t.r),D(t.s)),ne(["0x7b",ce(p)])}(e,t):V(e)?function(e,t){!function(e){const{chainId:t,maxPriorityFeePerGas:r,gasPrice:n,maxFeePerGas:o,to:i,feeCurrency:s,gatewayFee:a,gatewayFeeRecipient:c}=e;if(t<=0)throw new J({chainId:t});if(i&&!re(i))throw new W({address:i});if(n)throw new f("`gasPrice` is not a valid CIP-42 Transaction attribute.");if(z(o)&&o>me)throw new Q({maxFeePerGas:o});if(z(r)&&z(o)&&r>o)throw new ee({maxFeePerGas:o,maxPriorityFeePerGas:r});if(z(a)&&H(c)||z(c)&&H(a))throw new f("`gatewayFee` and `gatewayFeeRecipient` must be provided together.");if(z(s)&&!re(s))throw new f("`feeCurrency` MUST be a token address for CIP-42 transactions.");if(z(c)&&!re(c))throw new W(c);if(H(s)&&H(c))throw new f("Either `feeCurrency` or `gatewayFeeRecipient` must be provided for CIP-42 transactions.")}(e);const{chainId:r,gas:n,nonce:o,to:i,value:s,maxFeePerGas:a,maxPriorityFeePerGas:c,accessList:u,feeCurrency:l,gatewayFeeRecipient:h,gatewayFee:p,data:d}=e,g=[N(r),o?N(o):"0x",c?N(c):"0x",a?N(a):"0x",n?N(n):"0x",l??"0x",h??"0x",p?N(p):"0x",i??"0x",s?N(s):"0x",d??"0x",ge(u)];return t&&g.push(27n===t.v?"0x":N(1),D(t.r),D(t.s)),ne(["0x7c",ce(g)])}(e,t):function(e,t){const r=function(e){if(e.type)return e.type;if(void 0!==e.maxFeePerGas||void 0!==e.maxPriorityFeePerGas)return"eip1559";if(void 0!==e.gasPrice)return void 0!==e.accessList?"eip2930":"legacy";throw new pe({transaction:e})}(e);return"eip1559"===r?function(e,t){const{chainId:r,gas:n,nonce:o,to:i,value:s,maxFeePerGas:a,maxPriorityFeePerGas:c,accessList:u,data:l}=e;!function(e){const{chainId:t,maxPriorityFeePerGas:r,gasPrice:n,maxFeePerGas:o,to:i}=e;if(t<=0)throw new J({chainId:t});if(i&&!re(i))throw new W({address:i});if(n)throw new f("`gasPrice` is not a valid EIP-1559 Transaction attribute.");if(o&&o>2n**256n-1n)throw new Q({maxFeePerGas:o});if(r&&o&&r>o)throw new ee({maxFeePerGas:o,maxPriorityFeePerGas:r})}(e);const h=ge(u),p=[N(r),o?N(o):"0x",c?N(c):"0x",a?N(a):"0x",n?N(n):"0x",i??"0x",s?N(s):"0x",l??"0x",h];if(t){const e=0n===t.v?"0x":1n===t.v?N(1):27n===t.v?"0x":N(1);p.push(e,D(t.r),D(t.s))}return ne(["0x02",ce(p)])}(e,t):"eip2930"===r?function(e,t){const{chainId:r,gas:n,data:o,nonce:i,to:s,value:a,accessList:c,gasPrice:u}=e;!function(e){const{chainId:t,maxPriorityFeePerGas:r,gasPrice:n,maxFeePerGas:o,to:i}=e;if(t<=0)throw new J({chainId:t});if(i&&!re(i))throw new W({address:i});if(r||o)throw new f("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.");if(n&&n>2n**256n-1n)throw new Q({maxFeePerGas:n})}(e);const l=ge(c),h=[N(r),i?N(i):"0x",u?N(u):"0x",n?N(n):"0x",s??"0x",a?N(a):"0x",o??"0x",l];if(t){const e=0n===t.v?"0x":1n===t.v?N(1):27n===t.v?"0x":N(1);h.push(e,D(t.r),D(t.s))}return ne(["0x01",ce(h)])}(e,t):function(e,t){const{chainId:r=0,gas:n,data:o,nonce:i,to:s,value:a,gasPrice:c}=e;!function(e){const{chainId:t,maxPriorityFeePerGas:r,gasPrice:n,maxFeePerGas:o,to:i,accessList:s}=e;if(i&&!re(i))throw new W({address:i});if(void 0!==t&&t<=0)throw new J({chainId:t});if(r||o)throw new f("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.");if(n&&n>2n**256n-1n)throw new Q({maxFeePerGas:n});if(s)throw new f("`accessList` is not a valid Legacy Transaction attribute.")}(e);let u=[i?N(i):"0x",c?N(c):"0x",n?N(n):"0x",s??"0x",a?N(a):"0x",o??"0x"];if(t){const e=(()=>{if(r>0)return BigInt(2*r)+BigInt(35n+t.v-27n);if(t.v>=35n)return(t.v-35n)/2n>0?t.v:27n+(35n===t.v?0n:1n);const e=27n+(27n===t.v?0n:1n);if(t.v!==e)throw new he({v:t.v});return e})();u=[...u,N(e),t.r,t.s]}else r>0&&(u=[...u,N(r),"0x","0x"]);return ce(u)}(e,t)}(e,t)},me=2n**256n-1n,be=a({id:42220,name:"Celo",network:"celo",nativeCurrency:{decimals:18,name:"CELO",symbol:"CELO"},rpcUrls:{default:{http:["https://forno.celo.org"]},infura:{http:["https://celo-mainnet.infura.io/v3"]},public:{http:["https://forno.celo.org"]}},blockExplorers:{default:{name:"Celo Explorer",url:"https://explorer.celo.org/mainnet"},etherscan:{name:"CeloScan",url:"https://celoscan.io"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:13112599}},testnet:!1},{formatters:Y,serializers:ye}),ve=a({id:100,name:"Gnosis",network:"gnosis",nativeCurrency:{decimals:18,name:"Gnosis",symbol:"xDAI"},rpcUrls:{default:{http:["https://rpc.gnosischain.com"],webSocket:["wss://rpc.gnosischain.com/wss"]},public:{http:["https://rpc.gnosischain.com"],webSocket:["wss://rpc.gnosischain.com/wss"]}},blockExplorers:{etherscan:{name:"Gnosisscan",url:"https://gnosisscan.io"},default:{name:"Gnosis Chain Explorer",url:"https://blockscout.com/xdai/mainnet"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:21022491}}}),we=a({id:59144,name:"Linea Mainnet",network:"linea-mainnet",nativeCurrency:{name:"Linea Ether",symbol:"ETH",decimals:18},rpcUrls:{infura:{http:["https://linea-mainnet.infura.io/v3"],webSocket:["wss://linea-mainnet.infura.io/ws/v3"]},default:{http:["https://rpc.linea.build"],webSocket:["wss://rpc.linea.build"]},public:{http:["https://rpc.linea.build"],webSocket:["wss://rpc.linea.build"]}},blockExplorers:{default:{name:"Etherscan",url:"https://lineascan.build"},etherscan:{name:"Etherscan",url:"https://lineascan.build"},blockscout:{name:"Blockscout",url:"https://explorer.linea.build"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:42}},testnet:!1}),Ee=a({id:169,name:"Manta Pacific Mainnet",network:"manta",nativeCurrency:{decimals:18,name:"ETH",symbol:"ETH"},rpcUrls:{default:{http:["https://pacific-rpc.manta.network/http"]},public:{http:["https://pacific-rpc.manta.network/http"]}},blockExplorers:{etherscan:{name:"Manta Explorer",url:"https://pacific-explorer.manta.network"},default:{name:"Manta Explorer",url:"https://pacific-explorer.manta.network"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:332890}}}),xe=a({id:10,name:"OP Mainnet",network:"optimism",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://opt-mainnet.g.alchemy.com/v2"],webSocket:["wss://opt-mainnet.g.alchemy.com/v2"]},infura:{http:["https://optimism-mainnet.infura.io/v3"],webSocket:["wss://optimism-mainnet.infura.io/ws/v3"]},default:{http:["https://mainnet.optimism.io"]},public:{http:["https://mainnet.optimism.io"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://optimistic.etherscan.io"},default:{name:"Optimism Explorer",url:"https://explorer.optimism.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:4286263}}},{formatters:P}),Se=a({id:1,network:"homestead",name:"Ethereum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://eth-mainnet.g.alchemy.com/v2"],webSocket:["wss://eth-mainnet.g.alchemy.com/v2"]},infura:{http:["https://mainnet.infura.io/v3"],webSocket:["wss://mainnet.infura.io/ws/v3"]},default:{http:["https://cloudflare-eth.com"]},public:{http:["https://cloudflare-eth.com"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://etherscan.io"},default:{name:"Etherscan",url:"https://etherscan.io"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0xc0497E381f536Be9ce14B0dD3817cBcAe57d2F62",blockCreated:16966585},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14353601}}}),Ae=a({id:137,name:"Polygon",network:"matic",nativeCurrency:{name:"MATIC",symbol:"MATIC",decimals:18},rpcUrls:{alchemy:{http:["https://polygon-mainnet.g.alchemy.com/v2"],webSocket:["wss://polygon-mainnet.g.alchemy.com/v2"]},infura:{http:["https://polygon-mainnet.infura.io/v3"],webSocket:["wss://polygon-mainnet.infura.io/ws/v3"]},default:{http:["https://polygon-rpc.com"]},public:{http:["https://polygon-rpc.com"]}},blockExplorers:{etherscan:{name:"PolygonScan",url:"https://polygonscan.com"},default:{name:"PolygonScan",url:"https://polygonscan.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:25770160}}}),Ie=a({id:1101,name:"Polygon zkEVM",network:"polygon-zkevm",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://zkevm-rpc.com"]},public:{http:["https://zkevm-rpc.com"]}},blockExplorers:{default:{name:"PolygonScan",url:"https://zkevm.polygonscan.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:57746}}}),Be=a({id:7777777,name:"Zora",network:"zora",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.zora.energy"],webSocket:["wss://rpc.zora.energy"]},public:{http:["https://rpc.zora.energy"],webSocket:["wss://rpc.zora.energy"]}},blockExplorers:{default:{name:"Explorer",url:"https://explorer.zora.energy"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:5882}}},{formatters:P}),Te=a({id:31337,name:"Hardhat",network:"hardhat",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["http://127.0.0.1:8545"]},public:{http:["http://127.0.0.1:8545"]}}}),Pe=a({id:5,network:"goerli",name:"Goerli",nativeCurrency:{name:"Goerli Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://eth-goerli.g.alchemy.com/v2"],webSocket:["wss://eth-goerli.g.alchemy.com/v2"]},infura:{http:["https://goerli.infura.io/v3"],webSocket:["wss://goerli.infura.io/ws/v3"]},default:{http:["https://rpc.ankr.com/eth_goerli"]},public:{http:["https://rpc.ankr.com/eth_goerli"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://goerli.etherscan.io"},default:{name:"Etherscan",url:"https://goerli.etherscan.io"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0x56522D00C410a43BFfDF00a9A569489297385790",blockCreated:8765204},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:6507670}},testnet:!0}),Ce=a({id:11155111,network:"sepolia",name:"Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"SEP",decimals:18},rpcUrls:{alchemy:{http:["https://eth-sepolia.g.alchemy.com/v2"],webSocket:["wss://eth-sepolia.g.alchemy.com/v2"]},infura:{http:["https://sepolia.infura.io/v3"],webSocket:["wss://sepolia.infura.io/ws/v3"]},default:{http:["https://rpc.sepolia.org"]},public:{http:["https://rpc.sepolia.org"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://sepolia.etherscan.io"},default:{name:"Etherscan",url:"https://sepolia.etherscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:751532},ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0x21B000Fd62a880b2125A61e36a284BB757b76025",blockCreated:3914906}},testnet:!0}),_e=a({id:534352,name:"Scroll",network:"scroll",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.scroll.io"],webSocket:["wss://wss-rpc.scroll.io/ws"]},public:{http:["https://rpc.scroll.io"],webSocket:["wss://wss-rpc.scroll.io/ws"]}},blockExplorers:{default:{name:"Scrollscan",url:"https://scrollscan.com"},blockscout:{name:"Blockscout",url:"https://blockscout.scroll.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14}},testnet:!1}),Re=a({id:17e3,network:"holesky",name:"Holesky",nativeCurrency:{name:"Holesky Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://ethereum-holesky.publicnode.com"]},public:{http:["https://ethereum-holesky.publicnode.com"]}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:77}},testnet:!0}),Oe=a({id:420,name:"Optimism Goerli",network:"optimism-goerli",nativeCurrency:{name:"Goerli Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://opt-goerli.g.alchemy.com/v2"],webSocket:["wss://opt-goerli.g.alchemy.com/v2"]},infura:{http:["https://optimism-goerli.infura.io/v3"],webSocket:["wss://optimism-goerli.infura.io/ws/v3"]},default:{http:["https://goerli.optimism.io"]},public:{http:["https://goerli.optimism.io"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://goerli-optimism.etherscan.io"},default:{name:"Etherscan",url:"https://goerli-optimism.etherscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:49461}},testnet:!0},{formatters:P}),ke=a({id:11155420,name:"Optimism Sepolia",network:"optimism-sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://opt-sepolia.g.alchemy.com/v2"],webSocket:["wss://opt-sepolia.g.alchemy.com/v2"]},default:{http:["https://sepolia.optimism.io"]},public:{http:["https://sepolia.optimism.io"]}},blockExplorers:{blockscout:{name:"Blockscout",url:"https://optimism-sepolia.blockscout.com"},default:{name:"Blockscout",url:"https://optimism-sepolia.blockscout.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1620204}},testnet:!0},{formatters:P}),Ne=a({id:97,name:"Binance Smart Chain Testnet",network:"bsc-testnet",nativeCurrency:{decimals:18,name:"BNB",symbol:"tBNB"},rpcUrls:{default:{http:["https://data-seed-prebsc-1-s1.bnbchain.org:8545"]},public:{http:["https://data-seed-prebsc-1-s1.bnbchain.org:8545"]}},blockExplorers:{etherscan:{name:"BscScan",url:"https://testnet.bscscan.com"},default:{name:"BscScan",url:"https://testnet.bscscan.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:17422483}},testnet:!0}),Le=a({id:80001,name:"Polygon Mumbai",network:"maticmum",nativeCurrency:{name:"MATIC",symbol:"MATIC",decimals:18},rpcUrls:{alchemy:{http:["https://polygon-mumbai.g.alchemy.com/v2"],webSocket:["wss://polygon-mumbai.g.alchemy.com/v2"]},infura:{http:["https://polygon-mumbai.infura.io/v3"],webSocket:["wss://polygon-mumbai.infura.io/ws/v3"]},default:{http:["https://rpc.ankr.com/polygon_mumbai"]},public:{http:["https://rpc.ankr.com/polygon_mumbai"]}},blockExplorers:{etherscan:{name:"PolygonScan",url:"https://mumbai.polygonscan.com"},default:{name:"PolygonScan",url:"https://mumbai.polygonscan.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:25770160}},testnet:!0}),je=a({id:421613,name:"Arbitrum Goerli",network:"arbitrum-goerli",nativeCurrency:{name:"Arbitrum Goerli Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://arb-goerli.g.alchemy.com/v2"],webSocket:["wss://arb-goerli.g.alchemy.com/v2"]},infura:{http:["https://arbitrum-goerli.infura.io/v3"],webSocket:["wss://arbitrum-goerli.infura.io/ws/v3"]},default:{http:["https://goerli-rollup.arbitrum.io/rpc"]},public:{http:["https://goerli-rollup.arbitrum.io/rpc"]}},blockExplorers:{etherscan:{name:"Arbiscan",url:"https://goerli.arbiscan.io"},default:{name:"Arbiscan",url:"https://goerli.arbiscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:88114}},testnet:!0}),Me=a({id:421614,name:"Arbitrum Sepolia",network:"arbitrum-sepolia",nativeCurrency:{name:"Arbitrum Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://arb-sepolia.g.alchemy.com/v2"],webSocket:["wss://arb-sepolia.g.alchemy.com/v2"]},default:{http:["https://sepolia-rollup.arbitrum.io/rpc"]},public:{http:["https://sepolia-rollup.arbitrum.io/rpc"]}},blockExplorers:{etherscan:{name:"Arbiscan",url:"https://sepolia.arbiscan.io"},default:{name:"Arbiscan",url:"https://sepolia.arbiscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:81930}},testnet:!0}),$e=a({id:84532,network:"base-sepolia",name:"Base Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://base-sepolia.g.alchemy.com/v2"],webSocket:["wss://base-sepolia.g.alchemy.com/v2"]},default:{http:["https://sepolia.base.org"]},public:{http:["https://sepolia.base.org"]}},blockExplorers:{blockscout:{name:"Blockscout",url:"https://base-sepolia.blockscout.com"},default:{name:"Blockscout",url:"https://base-sepolia.blockscout.com"}},testnet:!0,sourceId:11155111},{formatters:P}),Ue=a({id:999,name:"Zora Goerli Testnet",network:"zora-testnet",nativeCurrency:{decimals:18,name:"Zora Goerli",symbol:"ETH"},rpcUrls:{default:{http:["https://testnet.rpc.zora.energy"],webSocket:["wss://testnet.rpc.zora.energy"]},public:{http:["https://testnet.rpc.zora.energy"],webSocket:["wss://testnet.rpc.zora.energy"]}},blockExplorers:{default:{name:"Explorer",url:"https://testnet.explorer.zora.energy"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:189123}},testnet:!0},{formatters:P}),Fe=a({id:999999999,name:"Zora Sepolia",network:"zora-sepolia",nativeCurrency:{decimals:18,name:"Zora Sepolia",symbol:"ETH"},rpcUrls:{default:{http:["https://sepolia.rpc.zora.energy"],webSocket:["wss://sepolia.rpc.zora.energy"]},public:{http:["https://sepolia.rpc.zora.energy"],webSocket:["wss://sepolia.rpc.zora.energy"]}},blockExplorers:{default:{name:"Zora Sepolia Explorer",url:"https://sepolia.explorer.zora.energy/"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:83160}},testnet:!0},{formatters:P}),De=a({id:250,name:"Fantom",network:"fantom",nativeCurrency:{decimals:18,name:"Fantom",symbol:"FTM"},rpcUrls:{default:{http:["https://rpc.ankr.com/fantom"]},public:{http:["https://rpc.ankr.com/fantom"]}},blockExplorers:{etherscan:{name:"FTMScan",url:"https://ftmscan.com"},default:{name:"FTMScan",url:"https://ftmscan.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:33001987}}}),He=a({id:16666e5,name:"Harmony One",network:"harmony",nativeCurrency:{name:"Harmony",symbol:"ONE",decimals:18},rpcUrls:{public:{http:["https://rpc.ankr.com/harmony"]},default:{http:["https://rpc.ankr.com/harmony"]}},blockExplorers:{default:{name:"Harmony Explorer",url:"https://explorer.harmony.one"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:24185753}}}),ze=a({id:1284,name:"Moonbeam",network:"moonbeam",nativeCurrency:{decimals:18,name:"GLMR",symbol:"GLMR"},rpcUrls:{public:{http:["https://moonbeam.public.blastapi.io"],webSocket:["wss://moonbeam.public.blastapi.io"]},default:{http:["https://moonbeam.public.blastapi.io"],webSocket:["wss://moonbeam.public.blastapi.io"]}},blockExplorers:{default:{name:"Moonscan",url:"https://moonscan.io"},etherscan:{name:"Moonscan",url:"https://moonscan.io"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:609002}},testnet:!1});var Ge,Ve;(Ve=Ge||(Ge={}))[Ve.arbitrum=c.id]="arbitrum",Ve[Ve.arbitrumNova=u.id]="arbitrumNova",Ve[Ve.avalanche=l.id]="avalanche",Ve[Ve.base=C.id]="base",Ve[Ve.bsc=_.id]="bsc",Ve[Ve.celo=be.id]="celo",Ve[Ve.gnosis=ve.id]="gnosis",Ve[Ve.linea=we.id]="linea",Ve[Ve.manta=Ee.id]="manta",Ve[Ve.optimism=xe.id]="optimism",Ve[Ve.mainnet=Se.id]="mainnet",Ve[Ve.polygon=Ae.id]="polygon",Ve[Ve.polygonZkEvm=Ie.id]="polygonZkEvm",Ve[Ve.rari=1380012617]="rari",Ve[Ve.zora=Be.id]="zora",Ve[Ve.hardhat=Te.id]="hardhat",Ve[Ve.hardhatOptimism=1338]="hardhatOptimism",Ve[Ve.goerli=Pe.id]="goerli",Ve[Ve.sepolia=Ce.id]="sepolia",Ve[Ve.scroll=_e.id]="scroll",Ve[Ve.holesky=Re.id]="holesky",Ve[Ve.optimismGoerli=Oe.id]="optimismGoerli",Ve[Ve.optimismSepolia=ke.id]="optimismSepolia",Ve[Ve.bscTestnet=Ne.id]="bscTestnet",Ve[Ve.polygonMumbai=Le.id]="polygonMumbai",Ve[Ve.arbitrumGoerli=je.id]="arbitrumGoerli",Ve[Ve.arbitrumSepolia=Me.id]="arbitrumSepolia",Ve[Ve.baseSepolia=$e.id]="baseSepolia",Ve[Ve.zoraTestnet=Ue.id]="zoraTestnet",Ve[Ve.zoraSepolia=Fe.id]="zoraSepolia",Ve[Ve.fantom=De.id]="fantom",Ve[Ve.harmonyOne=He.id]="harmonyOne",Ve[Ve.moonbeam=ze.id]="moonbeam",r(1594);var Ze=r(9213),Ye=r.n(Ze);function We(e){return e&&e.Math==Math?e:void 0}const Je="object"==typeof globalThis&&We(globalThis)||"object"==typeof window&&We(window)||"object"==typeof self&&We(self)||"object"==typeof r.g&&We(r.g)||function(){return this}()||{},qe=e=>{try{if(e){const t=new URL(e).host;return 0===t.indexOf("www.")?t.replace("www.",""):t}return""}catch(e){return""}};var Ke;!function(e){e.success="success",e.no_active_session="no_active_session",e.unsupported_network="unsupported_network",e.already_added="already_added",e.set_as_active="set_as_active",e.already_active="already_active"}(Ke||(Ke={}));var Xe;!function(e){e.eth_chainId="eth_chainId",e.eth_accounts="eth_accounts",e.eth_sendTransaction="eth_sendTransaction",e.eth_signTransaction="eth_signTransaction",e.personal_sign="personal_sign",e.eth_signTypedData="eth_signTypedData",e.eth_signTypedData_v3="eth_signTypedData_v3",e.eth_signTypedData_v4="eth_signTypedData_v4",e.eth_getCode="eth_getCode",e.wallet_addEthereumChain="wallet_addEthereumChain",e.wallet_switchEthereumChain="wallet_switchEthereumChain",e.eth_requestAccounts="eth_requestAccounts",e.eth_blockNumber="eth_blockNumber",e.eth_call="eth_call",e.eth_estimateGas="eth_estimateGas",e.personal_ecRecover="personal_ecRecover",e.eth_gasPrice="eth_gasPrice",e.eth_getBlockByNumber="eth_getBlockByNumber",e.eth_getBalance="eth_getBalance",e.eth_getTransactionByHash="eth_getTransactionByHash"}(Xe||(Xe={}));const Qe={available:"undefined"!=typeof window,name:"webviewMessenger",send:async(e,t,{id:r}={})=>(window.ReactNativeWebView.postMessage(JSON.stringify({topic:`> ${e}`,payload:t,id:r})),new Promise(((t,n)=>{const o=i=>{if(!function({id:e,topic:t,message:r}){if(r.topic===`< ${t}`&&(void 0===e||r.id===e)&&r.payload)return!0}({id:r,message:i.data,topic:e}))return;if(i.source!=window)return;window.removeEventListener("message",o);const{response:s,error:a}=i.data.payload;a&&n(new Error(a.message)),t(s)};window.addEventListener("message",o)}))),reply(e,t){const r=async r=>{if(!function({topic:e,message:t}){return!(!t.topic||"*"!==e&&t.topic!==`> ${e}`||"*"===e&&t.topic.startsWith("<"))}({message:r.data,topic:e}))return;if(r.source!=window)return;let n,o;try{o=await t(r.data.payload,{topic:r.data.topic,sender:r.source,id:r.data.id})}catch(e){n=e}const i=r.data.topic.replace(">","<");window.ReactNativeWebView.postMessage(JSON.stringify({topic:i,payload:{error:n,response:o},id:r.data.id}))};return window.addEventListener("message",r,!1),()=>window.removeEventListener("message",r)}},et=function({messenger:e,topic:t}){return e.available||console.error(`Messenger "${e.name}" is not available in this context.`),{send:async(r,{id:n})=>e.send(t,r,{id:n}),async reply(r){e.reply(t,r)}}}({messenger:Qe,topic:"providerRequest"}),tt=new s({backgroundMessenger:Qe,providerRequestTransport:et,onConstruct({emit:e}){if((e=>{try{return new URL(e),!0}catch(e){return!1}})(window.location.href)){const t=qe(window.location.href);Qe?.reply(`accountsChanged:${t}`,(async t=>{e("accountsChanged",[t])})),Qe?.reply(`chainChanged:${t}`,(async t=>{var r,n;e("chainChanged",(r=String(t),n=(e=>new(Ye())(e).toString(16))(r),n.startsWith("0x")?n:`0x${n}`))})),Qe?.reply(`disconnect:${t}`,(async()=>{e("disconnect",[])})),Qe?.reply(`connect:${t}`,(async t=>{e("connect",t)}))}}});(function(){const{doctype:e}=window.document;return!e||"html"===e.name})()&&function(){const e=[/\.xml$/u,/\.pdf$/u],t=window.location.pathname;for(let r=0;rwindow.dispatchEvent(t)))}({info:{icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMiIgaGVpZ2h0PSIzMiIgZmlsbD0ibm9uZSI+PGcgY2xpcC1wYXRoPSJ1cmwoI2EpIj48cGF0aCBmaWxsPSJ1cmwoI2IpIiBkPSJNMCAwaDMydjMySDB6Ii8+PHBhdGggZmlsbD0idXJsKCNjKSIgZD0iTTUuMzMzIDEwLjEzM2gxLjZjOC4yNDggMCAxNC45MzQgNi42ODYgMTQuOTM0IDE0LjkzNHYxLjZoMy4yYTEuNiAxLjYgMCAwIDAgMS42LTEuNmMwLTEwLjg5OS04LjgzNS0xOS43MzQtMTkuNzM0LTE5LjczNGExLjYgMS42IDAgMCAwLTEuNiAxLjZ2My4yWiIvPjxwYXRoIGZpbGw9InVybCgjZCkiIGQ9Ik0yMi40IDI1LjA2N2g0LjI2N2ExLjYgMS42IDAgMCAxLTEuNiAxLjZIMjIuNHYtMS42WiIvPjxwYXRoIGZpbGw9InVybCgjZSkiIGQ9Ik02LjkzMyA1LjMzM1Y5LjZoLTEuNlY2LjkzM2ExLjYgMS42IDAgMCAxIDEuNi0xLjZaIi8+PHBhdGggZmlsbD0idXJsKCNmKSIgZD0iTTUuMzMzIDkuNmgxLjZjOC41NDIgMCAxNS40NjcgNi45MjUgMTUuNDY3IDE1LjQ2N3YxLjZoLTQuOHYtMS42YzAtNS44OTEtNC43NzYtMTAuNjY3LTEwLjY2Ny0xMC42NjdoLTEuNlY5LjZaIi8+PHBhdGggZmlsbD0idXJsKCNnKSIgZD0iTTE4LjEzMyAyNS4wNjdIMjIuNHYxLjZoLTQuMjY3di0xLjZaIi8+PHBhdGggZmlsbD0idXJsKCNoKSIgZD0iTTUuMzMzIDEzLjg2N1Y5LjZoMS42djQuMjY3aC0xLjZaIi8+PHBhdGggZmlsbD0idXJsKCNpKSIgZD0iTTUuMzMzIDE2LjUzM2ExLjYgMS42IDAgMCAwIDEuNiAxLjYgNi45MzMgNi45MzMgMCAwIDEgNi45MzQgNi45MzQgMS42IDEuNiAwIDAgMCAxLjYgMS42aDIuNjY2di0xLjZjMC02LjE4Ni01LjAxNC0xMS4yLTExLjItMTEuMmgtMS42djIuNjY2WiIvPjxwYXRoIGZpbGw9InVybCgjaikiIGQ9Ik0xMy44NjcgMjUuMDY3aDQuMjY2djEuNmgtMi42NjZhMS42IDEuNiAwIDAgMS0xLjYtMS42WiIvPjxwYXRoIGZpbGw9InVybCgjaykiIGQ9Ik02LjkzMyAxOC4xMzNhMS42IDEuNiAwIDAgMS0xLjYtMS42di0yLjY2NmgxLjZ2NC4yNjZaIi8+PC9nPjxkZWZzPjxyYWRpYWxHcmFkaWVudCBpZD0iYyIgY3g9IjAiIGN5PSIwIiByPSIxIiBncmFkaWVudFRyYW5zZm9ybT0icm90YXRlKC05MCAxNiA5LjA2Nykgc2NhbGUoMTkuNzMzMykiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj48c3RvcCBvZmZzZXQ9Ii43NyIgc3RvcC1jb2xvcj0iI0ZGNDAwMCIvPjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzg3NTRDOSIvPjwvcmFkaWFsR3JhZGllbnQ+PHJhZGlhbEdyYWRpZW50IGlkPSJmIiBjeD0iMCIgY3k9IjAiIHI9IjEiIGdyYWRpZW50VHJhbnNmb3JtPSJyb3RhdGUoLTkwIDE2IDkuMDY3KSBzY2FsZSgxNS40NjY3KSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPjxzdG9wIG9mZnNldD0iLjcyNCIgc3RvcC1jb2xvcj0iI0ZGRjcwMCIvPjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iI0ZGOTkwMSIvPjwvcmFkaWFsR3JhZGllbnQ+PHJhZGlhbEdyYWRpZW50IGlkPSJpIiBjeD0iMCIgY3k9IjAiIHI9IjEiIGdyYWRpZW50VHJhbnNmb3JtPSJyb3RhdGUoLTkwIDE2IDkuMDY3KSBzY2FsZSgxMS4yKSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPjxzdG9wIG9mZnNldD0iLjU5NSIgc3RvcC1jb2xvcj0iIzBBRiIvPjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzAxREE0MCIvPjwvcmFkaWFsR3JhZGllbnQ+PHJhZGlhbEdyYWRpZW50IGlkPSJqIiBjeD0iMCIgY3k9IjAiIHI9IjEiIGdyYWRpZW50VHJhbnNmb3JtPSJtYXRyaXgoNC41MzMzMyAwIDAgMTIuMDg4OSAxMy42IDI1Ljg2NykiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj48c3RvcCBzdG9wLWNvbG9yPSIjMEFGIi8+PHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjMDFEQTQwIi8+PC9yYWRpYWxHcmFkaWVudD48cmFkaWFsR3JhZGllbnQgaWQ9ImsiIGN4PSIwIiBjeT0iMCIgcj0iMSIgZ3JhZGllbnRUcmFuc2Zvcm09Im1hdHJpeCgwIC00LjUzMzMzIDg1Ljk2NTQgMCA2LjEzMyAxOC40KSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPjxzdG9wIHN0b3AtY29sb3I9IiMwQUYiLz48c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiMwMURBNDAiLz48L3JhZGlhbEdyYWRpZW50PjxsaW5lYXJHcmFkaWVudCBpZD0iYiIgeDE9IjE2IiB4Mj0iMTYiIHkxPSIwIiB5Mj0iMzIiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj48c3RvcCBzdG9wLWNvbG9yPSIjMTc0Mjk5Ii8+PHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjMDAxRTU5Ii8+PC9saW5lYXJHcmFkaWVudD48bGluZWFyR3JhZGllbnQgaWQ9ImQiIHgxPSIyMi4xMzMiIHgyPSIyNi42NjciIHkxPSIyNS44NjciIHkyPSIyNS44NjciIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj48c3RvcCBzdG9wLWNvbG9yPSIjRkY0MDAwIi8+PHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjODc1NEM5Ii8+PC9saW5lYXJHcmFkaWVudD48bGluZWFyR3JhZGllbnQgaWQ9ImUiIHgxPSI2LjEzMyIgeDI9IjYuMTMzIiB5MT0iNS4zMzMiIHkyPSI5Ljg2NyIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPjxzdG9wIHN0b3AtY29sb3I9IiM4NzU0QzkiLz48c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiNGRjQwMDAiLz48L2xpbmVhckdyYWRpZW50PjxsaW5lYXJHcmFkaWVudCBpZD0iZyIgeDE9IjE4LjEzMyIgeDI9IjIyLjQiIHkxPSIyNS44NjciIHkyPSIyNS44NjciIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj48c3RvcCBzdG9wLWNvbG9yPSIjRkZGNzAwIi8+PHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjRkY5OTAxIi8+PC9saW5lYXJHcmFkaWVudD48bGluZWFyR3JhZGllbnQgaWQ9ImgiIHgxPSI2LjEzMyIgeDI9IjYuMTMzIiB5MT0iMTMuODY3IiB5Mj0iOS42IiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+PHN0b3Agc3RvcC1jb2xvcj0iI0ZGRjcwMCIvPjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iI0ZGOTkwMSIvPjwvbGluZWFyR3JhZGllbnQ+PGNsaXBQYXRoIGlkPSJhIj48cGF0aCBmaWxsPSIjZmZmIiBkPSJNMCAwaDMydjMySDB6Ii8+PC9jbGlwUGF0aD48L2RlZnM+PC9zdmc+",name:"Rainbow",rdns:"me.rainbow",uuid:function(){const e=Je,t=e.crypto||e.msCrypto;let r=()=>16*Math.random();try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(r=()=>t.getRandomValues(new Uint8Array(1))[0])}catch(e){}return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,(e=>(e^(15&r())>>e/4).toString(16)))}()},provider:tt}),Qe.reply("rainbow_ethereumChainEvent",(async({chainId:e,chainName:t,status:r,extensionUrl:n,host:o})=>{qe(window.location.href)===o&&alert("Should inject notification "+JSON.stringify({chainId:e,chainName:t,status:r,extensionUrl:n}))})),Qe.reply("rainbow_reload",(async()=>{window.location.reload()})),Object.defineProperties(window,{rainbow:{value:tt,configurable:!1,writable:!1},ethereum:{get:()=>window.walletRouter.currentProvider,set(e){window.walletRouter.addProvider(e)},configurable:!1},walletRouter:{value:{rainbowProvider:tt,lastInjectedProvider:window.ethereum,currentProvider:tt,providers:[tt,...window.ethereum?[window.ethereum]:[]],setDefaultProvider(e){if(e)window.walletRouter.currentProvider=window.rainbow;else{const e=window.walletRouter.lastInjectedProvider??window.ethereum;window.walletRouter.currentProvider=e}},addProvider(e){window.walletRouter.providers.includes(e)||window.walletRouter.providers.push(e),tt!==e&&(window.walletRouter.lastInjectedProvider=e)}},configurable:!1,writable:!1}}),window.rainbow.providers=window.walletRouter.providers,window.dispatchEvent(new Event("ethereum#initialized")),Qe.reply("rainbow_setDefaultProvider",(async({rainbowAsDefault:e})=>{window.walletRouter.setDefaultProvider(e)})))})()})(); \ No newline at end of file diff --git a/package.json b/package.json index a02882c1570..b3cc11d5bdd 100644 --- a/package.json +++ b/package.json @@ -97,7 +97,7 @@ "@ledgerhq/react-native-hw-transport-ble": "6.27.7", "@metamask/eth-sig-util": "7.0.1", "@notifee/react-native": "5.6.0", - "@rainbow-me/provider": "0.0.4", + "@rainbow-me/provider": "0.0.11", "@rainbow-me/react-native-animated-number": "0.0.2", "@rainbow-me/swaps": "0.10.0", "@react-native-async-storage/async-storage": "1.18.2", @@ -369,7 +369,8 @@ "ts-migrate": "0.1.26", "typescript": "5.1.6", "typescript-coverage-report": "0.6.1", - "webpack": "5.90.3" + "webpack": "5.90.3", + "webpack-cli": "5.1.4" }, "resolutions": { "**/async": "2.6.4", diff --git a/src/browserMessaging/AppMessenger.ts b/src/browserMessaging/AppMessenger.ts index a30cc3ec819..fe793a8e3db 100644 --- a/src/browserMessaging/AppMessenger.ts +++ b/src/browserMessaging/AppMessenger.ts @@ -100,31 +100,24 @@ export const appMessenger = (webViewRef: WebView, tabId: string, url: string) => }, reply(topic: string, callback: CallbackFunction) { const listener = async (event: MessageEvent>) => { - console.log('replying', topic, callback, event); if (!isValidSend({ message: event.data, topic })) { - console.log('invalid send', { message: event.data, topic }); return; - } else { - console.log('valid send!'); } - let error; let response; try { - console.log('calling callback'); response = await callback(event.data.payload, { topic: event.data.topic, - sender: event.source as IMessageSender, + // @ts-ignore + sender: event.meta.sender as IMessageSender, id: event.data.id, }); - console.log('callback response', response); } catch (error_) { - console.log('reply callback error', error_); + console.error('[MESSENGER]: Error while getting response from callback: ', error_); error = error_; } const repliedTopic = event.data.topic.replace('>', '<'); - console.log('replying topic', repliedTopic, response); // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore const data = { @@ -133,11 +126,8 @@ export const appMessenger = (webViewRef: WebView, tabId: string, url: string) => id: event.data.id, }; webViewRef.injectJavaScript(`window.postMessage(${JSON.stringify(data)})`); - console.log('sent!'); }; - console.log('adding listener', topic); listeners[topic] = listener as (event: MessageEvent) => void; - console.log(listeners); return () => { delete listeners[topic]; diff --git a/src/components/DappBrowser/BrowserTab.tsx b/src/components/DappBrowser/BrowserTab.tsx index 63847f9b9ab..517711cb3bb 100644 --- a/src/components/DappBrowser/BrowserTab.tsx +++ b/src/components/DappBrowser/BrowserTab.tsx @@ -22,6 +22,7 @@ import { DappBrowserShadows } from './DappBrowserShadows'; import { WebViewBorder } from './WebViewBorder'; import Homepage from './Homepage'; import { ButtonPressAnimation } from '../animations'; +import { handleProviderRequestApp } from './handleProviderRequest'; interface BrowserTabProps { tabIndex: number; @@ -72,9 +73,10 @@ const getInitialScreenshot = (id: string): ScreenshotType | null => { return null; }; -const getWebsiteBackgroundColor = ` +const getWebsiteBackgroundColorAndTitle = ` const bgColor = window.getComputedStyle(document.body, null).getPropertyValue('background-color'); window.ReactNativeWebView.postMessage(JSON.stringify({ topic: "bg", payload: bgColor})); + window.ReactNativeWebView.postMessage(JSON.stringify({ topic: "title", payload: document.title })); true; `; @@ -95,10 +97,10 @@ export const BrowserTab = React.memo(function BrowserTab({ tabIndex, injectedJS const { colorMode } = useColorMode(); const { width: deviceWidth } = useDimensions(); const { accentColor } = useAccountAccentColor(); - const { accountAddress } = useAccountSettings(); const { isDarkMode } = useColorMode(); + const [title, setTitle] = useState(''); - const messengers = useRef([]); + const currentMessenger = useRef(null); const webViewRef = useRef(null); const viewShotRef = useRef(null); @@ -107,8 +109,6 @@ export const BrowserTab = React.memo(function BrowserTab({ tabIndex, injectedJS const tabId = useMemo(() => `${tabIndex}-${tabStates[tabIndex].url}`, [tabIndex, tabStates]); - console.log('[BROWSER]: Render BrowserTab', { tabId, isActiveTab, url: webViewRefs.current[tabIndex]?.state }); - const webViewStyle = useAnimatedStyle(() => { const isActiveTab = activeTabIndex === tabIndex; const multipleTabsOpen = tabStates.length > 1; @@ -264,17 +264,8 @@ export const BrowserTab = React.memo(function BrowserTab({ tabIndex, injectedJS const [backgroundColor, setBackgroundColor] = useState(); - const createMessengers = useCallback((origin: string, tabId: string) => { - if (!webViewRef.current) { - return; - } - const msngr = appMessenger(webViewRef.current, tabId, origin); - messengers.current.push(msngr); - }, []); - - const handleMessage = useCallback( + const handleOnMessage = useCallback( (event: WebViewMessageEvent) => { - console.log('App received messsage from the webview', event.nativeEvent.data); if (!isActiveTab) return; const data = event.nativeEvent.data as any; try { @@ -282,51 +273,46 @@ export const BrowserTab = React.memo(function BrowserTab({ tabIndex, injectedJS const parsedData = typeof data === 'string' ? JSON.parse(data) : data; if (!parsedData || (!parsedData.topic && !parsedData.payload)) return; if (parsedData.topic === 'bg') { - console.log('[BROWSER]: received bg color', parsedData.payload); setBackgroundColor(parsedData.payload); + } else if (parsedData.topic === 'title') { + setTitle(parsedData.payload); } else { - const { origin } = new URL(event.nativeEvent.url); - messengers.current.forEach((m: any) => { - const messengerUrlOrigin = new URL(m.url).origin; - if (messengerUrlOrigin === origin) { - console.log('[BROWSER]: received message', parsedData); - const genericTopic = parsedData.topic.replace('> ', ''); - console.log('replying...'); - let callback; - if (genericTopic === 'rainbow_prefetchDappMetadata') { - callback = async () => { - return true; - }; - } else if (parsedData.payload.method === 'eth_requestAccounts' || parsedData.payload.method === 'eth_accounts') { - callback = async () => { - return { result: [accountAddress] }; - }; - } else if (parsedData.payload.method === 'eth_chainId') { - callback = async () => { - return { result: '0x1' }; - }; - } - m.reply(genericTopic, callback); - m.listeners[genericTopic]?.({ data: parsedData }); - } + const m = currentMessenger.current; + handleProviderRequestApp({ + messenger: m, + data: parsedData, + meta: { + topic: 'providerRequest', + sender: { + url: m.url, + tab: { id: tabId }, + title: title || tabStates[tabIndex].url, + }, + id: parsedData.id, + }, }); } // eslint-disable-next-line no-empty } catch (e) { - console.log('Error parsing message', e); + console.error('Error parsing message', e); } }, - [accountAddress, isActiveTab] + [isActiveTab, tabId, tabIndex, tabStates, title] ); const handleOnLoadStart = useCallback( - (event: { nativeEvent: { url: string | URL } }) => { + (event: { nativeEvent: { url: string | URL; title: string } }) => { const { origin } = new URL(event.nativeEvent.url); - messengers.current = []; - createMessengers(origin, getTabId(tabIndex, tabStates[tabIndex].url)); + + if (!webViewRef.current) { + return; + } + + const messenger = appMessenger(webViewRef.current, tabId, origin); + currentMessenger.current = messenger; }, - [createMessengers, tabIndex, tabStates] + [tabId] ); const handleOnLoad = useCallback((event: WebViewEvent) => { @@ -335,12 +321,12 @@ export const BrowserTab = React.memo(function BrowserTab({ tabIndex, injectedJS }, []); const handleOnLoadEnd = useCallback(() => { - console.log('[BROWSER]: handleOnLoadEnd', tabStates[tabIndex].url); - }, [tabIndex, tabStates]); + return; + }, []); const handleOnError = useCallback(() => { - console.log('[BROWSER]: handleOnError', tabStates[tabIndex].url); - }, [tabIndex, tabStates]); + return; + }, []); const handleShouldStartLoadWithRequest = useCallback(() => { return true; @@ -390,7 +376,7 @@ export const BrowserTab = React.memo(function BrowserTab({ tabIndex, injectedJS automaticallyAdjustContentInsets automaticallyAdjustsScrollIndicatorInsets decelerationRate={'normal'} - injectedJavaScript={getWebsiteBackgroundColor} + injectedJavaScript={getWebsiteBackgroundColorAndTitle} mediaPlaybackRequiresUserAction onLoadStart={handleOnLoadStart} onLoad={handleOnLoad} @@ -398,7 +384,7 @@ export const BrowserTab = React.memo(function BrowserTab({ tabIndex, injectedJS onError={handleOnError} onShouldStartLoadWithRequest={handleShouldStartLoadWithRequest} onLoadProgress={handleOnLoadProgress} - onMessage={handleMessage} + onMessage={handleOnMessage} onNavigationStateChange={handleNavigationStateChange} ref={webViewRef} source={{ uri: tabStates[tabIndex].url }} @@ -457,7 +443,7 @@ export const BrowserTab = React.memo(function BrowserTab({ tabIndex, injectedJS > console.log('Image loading error:', e.nativeEvent.error)} + onError={e => console.error('Image loading error:', e.nativeEvent.error)} source={{ uri: screenshot?.uri }} style={[ styles.webViewStyle, diff --git a/src/components/DappBrowser/handleProviderRequest.ts b/src/components/DappBrowser/handleProviderRequest.ts new file mode 100644 index 00000000000..7da06fa20f6 --- /dev/null +++ b/src/components/DappBrowser/handleProviderRequest.ts @@ -0,0 +1,342 @@ +import { Messenger } from '@/browserMessaging/AppMessenger'; +import { AddEthereumChainProposedChain, RequestArguments, RequestResponse, handleProviderRequest } from '@rainbow-me/provider'; + +import { Provider } from '@ethersproject/providers'; + +import { RainbowNetworks, getNetworkObj } from '@/networks'; +import { getCachedProviderForNetwork } from '@/handlers/web3'; +import { getNetworkFromChainId } from '@/utils/ethereumUtils'; +import { UserRejectedRequestError } from 'viem'; +import { convertHexToString } from '@/helpers/utilities'; +import { logger } from '@/logger'; +import { ActiveSession } from '@rainbow-me/provider/dist/references/appSession'; +import { appSessionsStore } from '@/state/appSessions'; +import { Network } from '@/helpers'; +import { handleDappBrowserConnectionPrompt, handleDappBrowserRequest } from '@/utils/requestNavigationHandlers'; +import { Tab } from '@rainbow-me/provider/dist/references/messengers'; + +export type ProviderRequestPayload = RequestArguments & { + id: number; + meta?: CallbackOptions; +}; +export type ProviderResponse = RequestResponse; + +export type ProviderRequestTransport = { + send(payload: ProviderRequestPayload, { id }: { id: number }): Promise; + reply(callback: (payload: ProviderRequestPayload, callbackOptions: CallbackOptions) => Promise): Promise; +}; + +export const isValidUrl = (url: string) => { + try { + new URL(url); + return true; + } catch (err) { + return false; + } +}; + +export const getDappHost = (url?: string) => { + try { + if (url) { + const host = new URL(url).host; + if (host.indexOf('www.') === 0) { + return host.replace('www.', ''); + } + return host; + } + return ''; + } catch (e) { + return ''; + } +}; + +const skipRateLimitCheck = (method: string) => + [ + 'eth_chainId', + 'eth_accounts', + 'eth_sendTransaction', + 'eth_signTransaction', + 'personal_sign', + 'eth_signTypedData', + 'eth_signTypedData_v3', + 'eth_signTypedData_v4', + 'wallet_watchAsset', + 'wallet_addEthereumChain', + 'wallet_switchEthereumChain', + 'eth_requestAccounts', + 'personal_ecRecover', + ].includes(method) || method.startsWith('wallet_'); + +export interface IMessageSender { + /** + * The URL of the page or frame that opened the connection. If the sender is in an iframe, it will be iframe's URL not the URL of the page which hosts it. + * @since Chrome 28. + */ + url?: string | undefined; + /** The tabs.Tab which opened the connection, if any. This property will only be present when the connection was opened from a tab (including content scripts), and only if the receiver is an extension, not an app. */ + tab?: Tab | undefined; + /** The tabs.Tab which opened the connection, if any. This property will only be present when the connection was opened from a tab (including content scripts), and only if the receiver is an extension, not an app. */ + title?: string; +} + +export type CallbackOptions = { + /** The sender of the message. */ + sender: IMessageSender; + /** The topic provided. */ + topic: string; + /** An optional scoped identifier. */ + id?: number | string; +}; + +/** + * Creates a generic transport that can be used to send and receive messages between extension scripts + * under a given topic & set of types. + * + * @see https://www.notion.so/rainbowdotme/Cross-script-Messaging-141de5115294435f95e31b87abcf4314#3b63e155df6a4b71b0e6e74f7a2c416b + */ +export function createTransport({ messenger, topic }: { messenger: Messenger; topic: string }) { + if (!messenger.available) { + console.error(`Messenger "${messenger.name}" is not available in this context.`); + } + return { + async send(payload: TPayload, { id }: { id: number }) { + return messenger.send(topic, payload, { id }); + }, + async reply(callback: (payload: TPayload, callbackOptions: CallbackOptions) => Promise) { + messenger.reply(topic, callback); + }, + }; +} + +/** + * Uses extensionMessenger to send messages to popup for the user to approve or reject + * @param {PendingRequest} request + * @returns {boolean} + */ +const messengerProviderRequestFn = async (messenger: Messenger, request: ProviderRequestPayload) => { + const appSession = appSessionsStore.getState().getActiveSession({ host: getDappHost(request.meta?.sender.url) || '' }); + + // Wait for response from the popup. + let response: unknown | null; + + if (request.method === 'eth_requestAccounts') { + response = await handleDappBrowserConnectionPrompt({ + dappName: request.meta?.sender.title || '', + dappUrl: request.meta?.sender.url || '', + }); + + appSessionsStore.getState().addSession({ + host: getDappHost(request.meta?.sender.url) || '', + // @ts-ignore + address: response.address, + // @ts-ignore + network: getNetworkFromChainId(response.chainId), + // @ts-ignore + url: request.meta?.sender.url || '', + }); + } else { + response = await handleDappBrowserRequest({ + dappName: request.meta?.sender.title || request.meta?.sender.url || '', + imageUrl: '', + address: appSession?.address || '', + network: appSession?.network || Network.mainnet, + dappUrl: request.meta?.sender.url || '', + payload: request, + }); + } + + if (!response) { + throw new UserRejectedRequestError(Error('User rejected the request.')); + } + return response; +}; + +const isSupportedChainId = (chainId: number) => !!RainbowNetworks.find(network => Number(network.id) === chainId); +const getActiveSession = ({ host }: { host: string }): ActiveSession => { + const appSession = appSessionsStore.getState().getActiveSession({ host }); + if (!appSession) return null; + return { + address: appSession?.address || '', + chainId: getChainIdByNetwork(appSession.network), + }; + // return null; +}; + +const getChainIdByNetwork = (network: Network) => getNetworkObj(network).id; + +const getChain = (chainId: number) => RainbowNetworks.find(network => Number(network.id) === chainId); + +const getProvider = ({ chainId }: { chainId?: number | undefined }) => { + const network = getNetworkFromChainId(chainId || 1); + return getCachedProviderForNetwork(network) as unknown as Provider; +}; + +const checkRateLimitFn = async (host: string) => { + // try { + // // Read from session + // let rateLimits = await SessionStorage.get('rateLimits'); + + // // Initialize if needed + // if (rateLimits === undefined) { + // rateLimits = { + // [host]: { + // perSecond: 0, + // perMinute: 0, + // }, + // }; + // } + + // if (rateLimits[host] === undefined) { + // rateLimits[host] = { + // perSecond: 1, + // perMinute: 1, + // }; + // } else { + // rateLimits[host] = { + // perSecond: rateLimits[host].perSecond + 1, + // perMinute: rateLimits[host].perMinute + 1, + // }; + // } + + // // Clear after 1 sec + // if (!secondTimer) { + // secondTimer = setTimeout(async () => { + // resetRateLimit(host, true); + // }, 1000); + // } + + // if (!minuteTimer) { + // minuteTimer = // Clear after 1 min + // setTimeout(async () => { + // resetRateLimit(host, false); + // }, 60000); + // } + + // // Write to session + // SessionStorage.set('rateLimits', rateLimits); + + // // Check rate limits + // if (rateLimits[host].perSecond > MAX_REQUEST_PER_SECOND) { + // queueEventTracking(event.dappProviderRateLimit, { + // dappURL: host, + // typeOfLimitHit: 'perSecond', + // requests: rateLimits[host].perSecond, + // }); + // return true; + // } + + // if (rateLimits[host].perMinute > MAX_REQUEST_PER_MINUTE) { + // queueEventTracking(event.dappProviderRateLimit, { + // dappURL: host, + // typeOfLimitHit: 'perMinute', + // requests: rateLimits[host].perMinute, + // }); + // return true; + // } + // return false; + // } catch (error) { + // return false; + // } + + return false; +}; + +export const handleProviderRequestApp = ({ messenger, data, meta }: { messenger: Messenger; data: any; meta: any }) => { + const providerRequestTransport = createTransport({ messenger, topic: 'providerRequest' }); + const isSupportedChain = (chainId: number) => isSupportedChainId(chainId); + const getFeatureFlags = () => ({ custom_rpc: false }); + const messengerProviderRequest = (request: ProviderRequestPayload) => messengerProviderRequestFn(messenger, request); + const onAddEthereumChain = ({ + proposedChain, + callbackOptions, + }: { + proposedChain: AddEthereumChainProposedChain; + callbackOptions?: CallbackOptions; + }): { chainAlreadyAdded: boolean } => { + const { chainId } = proposedChain; + const supportedChains = RainbowNetworks.filter(network => network.features.walletconnect).map(network => network.id.toString()); + const numericChainId = convertHexToString(chainId); + if (supportedChains.includes(numericChainId)) { + // TODO - Open add / switch ethereum chain + return { chainAlreadyAdded: true }; + } else { + logger.info('[DAPPBROWSER]: NOT SUPPORTED CHAIN'); + return { chainAlreadyAdded: false }; + } + }; + + const checkRateLimit = async ({ id, meta, method }: { id: number; meta: CallbackOptions; method: string }) => { + const url = meta?.sender.url || ''; + const host = (isValidUrl(url) && getDappHost(url)) || ''; + if (!skipRateLimitCheck(method)) { + const rateLimited = await checkRateLimitFn(host); + if (rateLimited) { + return { id, error: new Error('Rate Limit Exceeded') }; + } + } + }; + + const onSwitchEthereumChainNotSupported = ({ + proposedChain, + callbackOptions, + }: { + proposedChain: AddEthereumChainProposedChain; + callbackOptions?: CallbackOptions; + }) => { + const { chainId } = proposedChain; + const supportedChains = RainbowNetworks.filter(network => network.features.walletconnect).map(network => network.id.toString()); + const numericChainId = convertHexToString(chainId); + const supportedChainId = supportedChains.includes(numericChainId); + alert('Chain Id not supported'); + console.warn('PROVIDER TODO: TODO SEND NOTIFICATION'); + // TODO SEND NOTIFICATION + // inpageMessenger?.send('rainbow_ethereumChainEvent', { + // chainId: proposedChainId, + // chainName: chain?.name || 'NO NAME', + // status: !supportedChainId + // ? IN_DAPP_NOTIFICATION_STATUS.unsupported_network + // : IN_DAPP_NOTIFICATION_STATUS.no_active_session, + // extensionUrl, + // host, + // }); + }; + + const onSwitchEthereumChainSupported = ({ + proposedChain, + callbackOptions, + }: { + proposedChain: AddEthereumChainProposedChain; + callbackOptions?: CallbackOptions; + }) => { + const { chainId } = proposedChain; + const supportedChains = RainbowNetworks.filter(network => network.features.walletconnect).map(network => network.id.toString()); + const numericChainId = convertHexToString(chainId); + const supportedChainId = supportedChains.includes(numericChainId); + if (supportedChainId) { + const host = getDappHost(callbackOptions?.sender.url) || ''; + const activeSession = getActiveSession({ host }); + if (activeSession) { + appSessionsStore.getState().updateActiveSessionNetwork({ host: host, network: getNetworkFromChainId(Number(numericChainId)) }); + messenger.send(`chainChanged:${host}`, Number(numericChainId)); + } + console.warn('PROVIDER TODO: TODO SEND NOTIFICATION'); + } + }; + + handleProviderRequest({ + providerRequestTransport, + isSupportedChain, + getFeatureFlags, + messengerProviderRequest, + onAddEthereumChain, + checkRateLimit, + onSwitchEthereumChainNotSupported, + onSwitchEthereumChainSupported, + getProvider, + getActiveSession, + getChain, + }); + + // @ts-ignore + messenger.listeners['providerRequest']?.({ data, meta }); +}; diff --git a/src/navigation/config.tsx b/src/navigation/config.tsx index 32d5a600202..78c85e71138 100644 --- a/src/navigation/config.tsx +++ b/src/navigation/config.tsx @@ -232,7 +232,7 @@ export const signTransactionSheetConfig = { options: ({ route }: { route: SignTransactionSheetRouteProp }) => ({ ...buildCoolModalConfig({ ...route.params, - backgroundOpacity: route?.params?.requestType === 'walletconnect' ? 1 : 0.3, + backgroundOpacity: route?.params?.requestType === 'walletconnect' ? 1 : 0.9, cornerRadius: 0, springDamping: 1, topOffset: 0, diff --git a/src/utils/requestNavigationHandlers.ts b/src/utils/requestNavigationHandlers.ts index d5e7a260fa8..bec00e8ee08 100644 --- a/src/utils/requestNavigationHandlers.ts +++ b/src/utils/requestNavigationHandlers.ts @@ -24,9 +24,9 @@ export type RequestType = 'walletconnect' | 'browser'; // Dapp Browser export interface DappConnectionData { - dappName: string; + dappName?: string; dappUrl: string; - imageUrl: string | undefined; + imageUrl?: string; } export const handleDappBrowserConnectionPrompt = (dappData: DappConnectionData): Promise<{ chainId: number; address: string } | Error> => { @@ -37,7 +37,7 @@ export const handleDappBrowserConnectionPrompt = (dappData: DappConnectionData): receivedTimestamp, meta: { chainIds, - dappName: dappData.dappName, + dappName: dappData?.dappName || dappData.dappUrl, dappUrl: dappData.dappUrl, imageUrl: maybeSignUri(dappData.dappUrl), isWalletConnectV2: false, diff --git a/yarn.lock b/yarn.lock index fba5cec2a53..47a7dbc6c10 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1448,6 +1448,11 @@ resolved "https://registry.yarnpkg.com/@daybrush/utils/-/utils-0.11.0.tgz#3fd113fcedaab29d8c80773ca5f4d32551bdc9d8" integrity sha512-PnrY1NDjXqXKASoREcjHokQt0WWHiUBClMJ0l9APx42QkeOCQ5nXB7k4VdmkaU23BndeSmNNYJDNL6eEsRitaA== +"@discoveryjs/json-ext@^0.5.0": + version "0.5.7" + resolved "https://registry.yarnpkg.com/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz#1d572bfbbe14b7704e0ba0f39b74815b84870d70" + integrity sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw== + "@dominicstop/ts-event-emitter@^1.1.0": version "1.1.0" resolved "https://registry.yarnpkg.com/@dominicstop/ts-event-emitter/-/ts-event-emitter-1.1.0.tgz#1f3d3fa878a1ccab686931280757954719cf88e4" @@ -3310,10 +3315,10 @@ resolved "https://registry.yarnpkg.com/@pkgr/core/-/core-0.1.1.tgz#1ec17e2edbec25c8306d424ecfbf13c7de1aaa31" integrity sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA== -"@rainbow-me/provider@0.0.4": - version "0.0.4" - resolved "https://registry.yarnpkg.com/@rainbow-me/provider/-/provider-0.0.4.tgz#e327337318644a87d20b681d3b070fedb7f840ee" - integrity sha512-d1ghPNdBVcki3lw58CLjH0MPRmYHZ4OLOntuJKOm1afUvmOkqh8bQizKgWGG/EUoN2cWMDW3mPF+8+6ioKSfeA== +"@rainbow-me/provider@0.0.11": + version "0.0.11" + resolved "https://registry.yarnpkg.com/@rainbow-me/provider/-/provider-0.0.11.tgz#f21618605e6b6e8e6fecc120792447acead00a5a" + integrity sha512-rV4s7hAq2LTRhSmh+bIdq6qLy37LAlOpzJYIrFICRvC9XorFn5u/DpfJhtzQsdZ2cdW3xSoSc1RzsJ65nxhWCA== dependencies: "@ethersproject/abstract-provider" "5.7.0" "@ethersproject/bignumber" "5.7.0" @@ -5908,6 +5913,21 @@ "@webassemblyjs/ast" "1.11.6" "@xtuc/long" "4.2.2" +"@webpack-cli/configtest@^2.1.1": + version "2.1.1" + resolved "https://registry.yarnpkg.com/@webpack-cli/configtest/-/configtest-2.1.1.tgz#3b2f852e91dac6e3b85fb2a314fb8bef46d94646" + integrity sha512-wy0mglZpDSiSS0XHrVR+BAdId2+yxPSoJW8fsna3ZpYSlufjvxnP4YbKTCBZnNIcGN4r6ZPXV55X4mYExOfLmw== + +"@webpack-cli/info@^2.0.2": + version "2.0.2" + resolved "https://registry.yarnpkg.com/@webpack-cli/info/-/info-2.0.2.tgz#cc3fbf22efeb88ff62310cf885c5b09f44ae0fdd" + integrity sha512-zLHQdI/Qs1UyT5UBdWNqsARasIA+AaF8t+4u2aS2nEpBQh2mWIVb8qAklq0eUENnC5mOItrIB4LiS9xMtph18A== + +"@webpack-cli/serve@^2.0.5": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@webpack-cli/serve/-/serve-2.0.5.tgz#325db42395cd49fe6c14057f9a900e427df8810e" + integrity sha512-lqaoKnRYBdo1UgDX8uF24AfGMifWK19TxPmM5FHc2vAGxrJ/qtyUyFBWoY1tISZdelsQ5fBcOusifo5o5wSJxQ== + "@wry/context@^0.5.2": version "0.5.4" resolved "https://registry.yarnpkg.com/@wry/context/-/context-0.5.4.tgz#b6c28038872e0a0e1ff14eb40b5bf4cab2ab4e06" @@ -7930,6 +7950,11 @@ colorette@^1.0.7: resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.4.0.tgz#5190fbb87276259a86ad700bff2c6d6faa3fca40" integrity sha512-Y2oEozpomLn7Q3HFP7dpww7AtMJplbM9lGZP6RDfHqmbeRjiwRg4n6VM6j4KLmRke85uWEI7JqF17f3pqdRA0g== +colorette@^2.0.14: + version "2.0.20" + resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.20.tgz#9eb793e6833067f7235902fcd3b09917a000a95a" + integrity sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w== + colors@^1.0.3, colors@^1.1.2, colors@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/colors/-/colors-1.4.0.tgz#c50491479d4c1bdaed2c9ced32cf7c7dc2360f78" @@ -7952,6 +7977,11 @@ commander@3.0.2: resolved "https://registry.yarnpkg.com/commander/-/commander-3.0.2.tgz#6837c3fb677ad9933d1cfba42dd14d5117d6b39e" integrity sha512-Gar0ASD4BDyKC4hl4DwHqDrmvjoxWKZigVnAbn5H1owvm4CxCPdb0HQDehwNYMJpla5+M2tPmPARzhtYuwpHow== +commander@^10.0.1: + version "10.0.1" + resolved "https://registry.yarnpkg.com/commander/-/commander-10.0.1.tgz#881ee46b4f77d1c1dccc5823433aa39b022cbe06" + integrity sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug== + commander@^2.16.0, commander@^2.20.0, commander@^2.20.3, commander@^2.8.1: version "2.20.3" resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" @@ -9270,7 +9300,7 @@ env-paths@^2.2.0: resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-2.2.1.tgz#420399d416ce1fbe9bc0a07c62fa68d67fd0f8f2" integrity sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A== -envinfo@^7.10.0, envinfo@^7.7.2: +envinfo@^7.10.0, envinfo@^7.7.2, envinfo@^7.7.3: version "7.11.1" resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.11.1.tgz#2ffef77591057081b0129a8fd8cf6118da1b94e1" integrity sha512-8PiZgZNIB4q/Lw4AhOvAfB/ityHAd2bli3lESSWmWSzSsl5dKpy5N1d1Rfkd2teq/g9xN90lc6o98DOjMeYHpg== @@ -10322,6 +10352,11 @@ fast-xml-parser@^4.2.4: dependencies: strnum "^1.0.5" +fastest-levenshtein@^1.0.12: + version "1.0.16" + resolved "https://registry.yarnpkg.com/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz#210e61b6ff181de91ea9b3d1b84fdedd47e034e5" + integrity sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg== + fastq@^1.6.0: version "1.17.1" resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.17.1.tgz#2a523f07a4e7b1e81a42b91b8bf2254107753b47" @@ -11875,6 +11910,11 @@ internal-slot@^1.0.5, internal-slot@^1.0.7: resolved "https://registry.yarnpkg.com/internmap/-/internmap-2.0.3.tgz#6685f23755e43c524e251d29cbc97248e3061009" integrity sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg== +interpret@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/interpret/-/interpret-3.1.1.tgz#5be0ceed67ca79c6c4bc5cf0d7ee843dcea110c4" + integrity sha512-6xwYfHbajpoF0xLW+iwLkhwgvLoZDfjYfoFNu8ftMoXINzwuymNLd9u/KmwtdT2GbR+/Cz66otEGEVVUHX9QLQ== + invariant@*, invariant@2, invariant@2.2.4, invariant@^2.2.0, invariant@^2.2.4: version "2.2.4" resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" @@ -17190,6 +17230,13 @@ recast@^0.21.0: source-map "~0.6.1" tslib "^2.0.1" +rechoir@^0.8.0: + version "0.8.0" + resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.8.0.tgz#49f866e0d32146142da3ad8f0eff352b3215ff22" + integrity sha512-/vxpCXddiX8NGfGO/mTafwjq4aFa/71pvamip0++IQk3zG8cbCj0fifNPrjjF1XMXUne91jL9OoxmdykoEtifQ== + dependencies: + resolve "^1.20.0" + recoil@0.7.6: version "0.7.6" resolved "https://registry.yarnpkg.com/recoil/-/recoil-0.7.6.tgz#75297ecd70bbfeeb72e861aa6141a86bb6dfcd5e" @@ -20146,6 +20193,34 @@ webidl-conversions@^5.0.0: resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-5.0.0.tgz#ae59c8a00b121543a2acc65c0434f57b0fc11aff" integrity sha512-VlZwKPCkYKxQgeSbH5EyngOmRp7Ww7I9rQLERETtf5ofd9pGeswWiOtogpEO850jziPRarreGxn5QIiTqpb2wA== +webpack-cli@5.1.4: + version "5.1.4" + resolved "https://registry.yarnpkg.com/webpack-cli/-/webpack-cli-5.1.4.tgz#c8e046ba7eaae4911d7e71e2b25b776fcc35759b" + integrity sha512-pIDJHIEI9LR0yxHXQ+Qh95k2EvXpWzZ5l+d+jIo+RdSm9MiHfzazIxwwni/p7+x4eJZuvG1AJwgC4TNQ7NRgsg== + dependencies: + "@discoveryjs/json-ext" "^0.5.0" + "@webpack-cli/configtest" "^2.1.1" + "@webpack-cli/info" "^2.0.2" + "@webpack-cli/serve" "^2.0.5" + colorette "^2.0.14" + commander "^10.0.1" + cross-spawn "^7.0.3" + envinfo "^7.7.3" + fastest-levenshtein "^1.0.12" + import-local "^3.0.2" + interpret "^3.1.1" + rechoir "^0.8.0" + webpack-merge "^5.7.3" + +webpack-merge@^5.7.3: + version "5.10.0" + resolved "https://registry.yarnpkg.com/webpack-merge/-/webpack-merge-5.10.0.tgz#a3ad5d773241e9c682803abf628d4cd62b8a4177" + integrity sha512-+4zXKdx7UnO+1jaN4l2lHVD+mFvnlZQP/6ljaJVb4SZiwIKeUnrT5l0gkT8z+n4hKpC+jpOv6O9R+gLtag7pSA== + dependencies: + clone-deep "^4.0.1" + flat "^5.0.2" + wildcard "^2.0.0" + webpack-sources@^3.2.3: version "3.2.3" resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-3.2.3.tgz#2d4daab8451fd4b240cc27055ff6a0c2ccea0cde" @@ -20270,6 +20345,11 @@ wide-align@^1.1.5: dependencies: string-width "^1.0.2 || 2 || 3 || 4" +wildcard@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/wildcard/-/wildcard-2.0.1.tgz#5ab10d02487198954836b6349f74fff961e10f67" + integrity sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ== + workerpool@6.2.1: version "6.2.1" resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.2.1.tgz#46fc150c17d826b86a008e5a4508656777e9c343" From c0f41c7a249d4226244d1b502bcc380c109690b8 Mon Sep 17 00:00:00 2001 From: Ben Goldberg Date: Thu, 21 Mar 2024 19:07:22 -0700 Subject: [PATCH 06/44] Dapp Browser: Search UI (#5542) * progress * stuff * search stuff * bunch of ui + refactor * cleanup * lint --- src/components/DappBrowser/AddressBar.tsx | 175 -------------- src/components/DappBrowser/BrowserContext.tsx | 33 ++- src/components/DappBrowser/DappBrowser.tsx | 5 +- src/components/DappBrowser/Homepage.tsx | 2 +- .../DappBrowser/address-bar/AddressInput.tsx | 159 ------------- .../AccountIcon.tsx | 0 .../DappBrowser/search-input/SearchInput.tsx | 225 ++++++++++++++++++ .../TabButton.tsx | 27 +-- src/components/DappBrowser/search/Search.tsx | 12 + .../DappBrowser/search/SearchBar.tsx | 78 ++++++ .../search/search-results/SearchResult.tsx | 31 +++ .../search/search-results/SearchResults.tsx | 69 ++++++ 12 files changed, 453 insertions(+), 363 deletions(-) delete mode 100644 src/components/DappBrowser/AddressBar.tsx delete mode 100644 src/components/DappBrowser/address-bar/AddressInput.tsx rename src/components/DappBrowser/{address-bar => search-input}/AccountIcon.tsx (100%) create mode 100644 src/components/DappBrowser/search-input/SearchInput.tsx rename src/components/DappBrowser/{address-bar => search-input}/TabButton.tsx (78%) create mode 100644 src/components/DappBrowser/search/Search.tsx create mode 100644 src/components/DappBrowser/search/SearchBar.tsx create mode 100644 src/components/DappBrowser/search/search-results/SearchResult.tsx create mode 100644 src/components/DappBrowser/search/search-results/SearchResults.tsx diff --git a/src/components/DappBrowser/AddressBar.tsx b/src/components/DappBrowser/AddressBar.tsx deleted file mode 100644 index 56aa58555a9..00000000000 --- a/src/components/DappBrowser/AddressBar.tsx +++ /dev/null @@ -1,175 +0,0 @@ -import { Box } from '@/design-system'; -import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'; -import { NativeSyntheticEvent, TextInput, TextInputSubmitEditingEventData } from 'react-native'; -import Animated, { Easing, interpolate, useAnimatedKeyboard, useAnimatedStyle, useSharedValue, withTiming } from 'react-native-reanimated'; -import isValidDomain from 'is-valid-domain'; -import { TAB_BAR_HEIGHT } from '@/navigation/SwipeNavigator'; -import { RAINBOW_HOME, useBrowserContext } from './BrowserContext'; -import { AccountIcon } from './address-bar/AccountIcon'; -import { TabButton } from './address-bar/TabButton'; -import { AddressInput } from './address-bar/AddressInput'; -import useDimensions from '@/hooks/useDimensions'; -import { IS_IOS } from '@/env'; - -const GOOGLE_SEARCH_URL = 'https://www.google.com/search?q='; -const HTTP = 'http://'; -const HTTPS = 'https://'; - -const timingConfig = { - duration: 500, - easing: Easing.bezier(0.22, 1, 0.36, 1), -}; - -export const AddressBar = () => { - const { tabStates, activeTabIndex, tabViewProgress, onRefresh, updateActiveTabState, toggleTabView } = useBrowserContext(); - - const [url, setUrl] = useState(tabStates[activeTabIndex].url); - const [isFocused, setIsFocused] = useState(false); - - const inputRef = useRef(null); - const keyboard = useAnimatedKeyboard(); - const { width: deviceWidth } = useDimensions(); - - const animationProgress = useSharedValue(0); - - const barStyle = useAnimatedStyle(() => ({ - opacity: 1 - (tabViewProgress?.value ?? 0), - paddingLeft: withTiming(isFocused ? 16 : 72, timingConfig), - pointerEvents: (tabViewProgress?.value ?? 0) < 1 ? 'auto' : 'none', - transform: [ - { - translateY: interpolate(tabViewProgress?.value ?? 0, [0, 1], [0, 68], 'clamp'), - }, - { - scale: interpolate(tabViewProgress?.value ?? 0, [0, 1], [1, 0.9], 'clamp'), - }, - ], - })); - - const accountIconStyle = useAnimatedStyle(() => ({ - opacity: withTiming(isFocused ? 0 : 1, timingConfig), - })); - - useEffect(() => { - if (isFocused) { - animationProgress.value = withTiming(1, timingConfig); - } else { - animationProgress.value = withTiming(0, timingConfig); - } - }, [animationProgress, isFocused]); - - const bottomBarStyle = useAnimatedStyle(() => { - return { - height: TAB_BAR_HEIGHT + 88, - transform: [{ translateY: Math.min(-(keyboard.height.value - (IS_IOS ? 82 : 46)), 0) }], - }; - }, [tabViewProgress, keyboard.height]); - - const handleUrlSubmit = (event: NativeSyntheticEvent) => { - let newUrl = event.nativeEvent.text; - - let urlForValidation = newUrl.replace(/^https?:\/\//, ''); - if (urlForValidation.endsWith('/')) { - urlForValidation = urlForValidation.slice(0, -1); - } - - if (!isValidDomain(urlForValidation, { wildcard: true })) { - newUrl = GOOGLE_SEARCH_URL + newUrl; - } else if (!newUrl.startsWith(HTTP) && !newUrl.startsWith(HTTPS)) { - newUrl = HTTPS + newUrl; - } - - updateActiveTabState(activeTabIndex, { url: newUrl }); - }; - - const formattedUrl = useMemo(() => { - try { - const { hostname, pathname, search } = new URL(url); - if (hostname === 'www.google.com' && pathname === '/search') { - const params = new URLSearchParams(search); - return params.get('q') || url; - } - return hostname.startsWith('www.') ? hostname.slice(4) : hostname; - } catch { - return url; - } - }, [url]); - - // url handling needs work - useEffect(() => { - if (tabStates[activeTabIndex].url !== url) { - setUrl(tabStates[activeTabIndex].url); - } - // eslint-disable-next-line react-hooks/exhaustive-deps - }, [activeTabIndex, tabStates]); - - const onUrlChange = (newUrl: string) => { - setUrl(newUrl); - }; - - const isGoogleSearch = url.startsWith(GOOGLE_SEARCH_URL); - const isHome = formattedUrl === RAINBOW_HOME; - // eslint-disable-next-line no-nested-ternary - const inputValue = isHome ? undefined : isFocused && !isGoogleSearch ? url : formattedUrl; - - const shouldShowDetails = !isFocused && !isHome; - - const onAddressInputPress = useCallback(() => { - if (!isFocused) { - setIsFocused(true); - setTimeout(() => { - inputRef.current?.focus(); - }, 50); - } - }, [isFocused]); - - const onBlur = useCallback(() => { - setIsFocused(false); - }, []); - - const onFocus = useCallback(() => { - setIsFocused(true); - }, []); - - return ( - - - - - - - - - - - - - - ); -}; diff --git a/src/components/DappBrowser/BrowserContext.tsx b/src/components/DappBrowser/BrowserContext.tsx index f54268afe47..a62e1f20f06 100644 --- a/src/components/DappBrowser/BrowserContext.tsx +++ b/src/components/DappBrowser/BrowserContext.tsx @@ -1,21 +1,24 @@ /* eslint-disable @typescript-eslint/no-empty-function */ -import React, { createContext, useCallback, useContext, useRef, useState } from 'react'; +import React, { createContext, useCallback, useContext, useEffect, useRef, useState } from 'react'; import Animated, { Easing, runOnJS, useAnimatedRef, useScrollViewOffset, useSharedValue, withTiming } from 'react-native-reanimated'; import WebView from 'react-native-webview'; import isEqual from 'react-fast-compare'; +import { TextInput } from 'react-native'; interface BrowserContextType { activeTabIndex: number; closeTab: (tabIndex: number) => void; goBack: () => void; goForward: () => void; - isBrowserInputFocused: boolean; + isSearchInputFocused: boolean; newTab: () => void; onRefresh: () => void; + searchInputRef: React.RefObject; + searchViewProgress: Animated.SharedValue | undefined; scrollViewOffset: Animated.SharedValue | undefined; scrollViewRef: React.MutableRefObject; setActiveTabIndex: React.Dispatch>; - setIsBrowserInputFocused: React.Dispatch>; + setIsSearchInputFocused: React.Dispatch>; tabStates: TabState[]; tabViewProgress: Animated.SharedValue | undefined; tabViewFullyVisible: boolean; @@ -44,7 +47,7 @@ const defaultContext: BrowserContextType = { goForward: () => { return; }, - isBrowserInputFocused: false, + isSearchInputFocused: false, newTab: () => { return; }, @@ -52,12 +55,14 @@ const defaultContext: BrowserContextType = { onRefresh: () => { return; }, + searchInputRef: { current: null }, + searchViewProgress: undefined, scrollViewOffset: undefined, scrollViewRef: { current: null }, setActiveTabIndex: () => { return; }, - setIsBrowserInputFocused: () => { + setIsSearchInputFocused: () => { return; }, tabStates: [ @@ -92,7 +97,7 @@ const timingConfig = { // this is sloppy and causes tons of rerenders, needs to be reworked export const BrowserContextProvider = ({ children }: { children: React.ReactNode }) => { const [activeTabIndex, setActiveTabIndex] = useState(0); - const [isBrowserInputFocused, setIsBrowserInputFocused] = useState(false); + const [isSearchInputFocused, setIsSearchInputFocused] = useState(false); const [tabStates, setTabStates] = useState(defaultContext.tabStates); const [tabViewFullyVisible, setTabViewFullyVisible] = useState(false); const [tabViewVisible, setTabViewVisible] = useState(false); @@ -109,12 +114,22 @@ export const BrowserContextProvider = ({ children }: { children: React.ReactNode [tabStates] ); + const searchInputRef = useRef(null); const scrollViewRef = useAnimatedRef(); const webViewRefs = useRef([]); + const searchViewProgress = useSharedValue(0); const scrollViewOffset = useScrollViewOffset(scrollViewRef); const tabViewProgress = useSharedValue(0); + useEffect(() => { + if (isSearchInputFocused) { + searchViewProgress.value = withTiming(1, timingConfig); + } else { + searchViewProgress.value = withTiming(0, timingConfig); + } + }, [searchViewProgress, isSearchInputFocused]); + const toggleTabView = useCallback(() => { const isVisible = !tabViewVisible; tabViewProgress.value = isVisible @@ -192,11 +207,13 @@ export const BrowserContextProvider = ({ children }: { children: React.ReactNode closeTab, goBack, goForward, - isBrowserInputFocused, + isSearchInputFocused, newTab, onRefresh, + searchViewProgress, + searchInputRef, setActiveTabIndex, - setIsBrowserInputFocused, + setIsSearchInputFocused, scrollViewOffset, scrollViewRef, tabStates, diff --git a/src/components/DappBrowser/DappBrowser.tsx b/src/components/DappBrowser/DappBrowser.tsx index 4b728acc626..635add16387 100644 --- a/src/components/DappBrowser/DappBrowser.tsx +++ b/src/components/DappBrowser/DappBrowser.tsx @@ -8,11 +8,11 @@ import { Box, globalColors, useColorMode } from '@/design-system'; import { safeAreaInsetValues } from '@/utils'; import { BrowserContextProvider, useBrowserContext } from './BrowserContext'; -import { AddressBar } from './AddressBar'; import { BrowserTab } from './BrowserTab'; import { StyleSheet } from 'react-native'; import { TAB_VIEW_ROW_HEIGHT } from './Dimensions'; import { IS_ANDROID } from '@/env'; +import { Search } from './search/Search'; const getInjectedJS = async () => { const baseDirectory = IS_ANDROID ? RNFS.DocumentDirectoryPath : RNFS.MainBundlePath; @@ -79,8 +79,7 @@ const DappBrowserComponent = () => { ))} - - + ); }; diff --git a/src/components/DappBrowser/Homepage.tsx b/src/components/DappBrowser/Homepage.tsx index ebd1735881f..f780cfac7b1 100644 --- a/src/components/DappBrowser/Homepage.tsx +++ b/src/components/DappBrowser/Homepage.tsx @@ -1,6 +1,6 @@ import { ButtonPressAnimation } from '@/components/animations'; import { Page } from '@/components/layout'; -import { Bleed, Box, ColorModeProvider, Cover, Inline, Inset, Stack, Text } from '@/design-system'; +import { Bleed, Box, Cover, Inline, Inset, Stack, Text } from '@/design-system'; import { useNavigation } from '@/navigation'; import { TAB_BAR_HEIGHT } from '@/navigation/SwipeNavigator'; import { deviceUtils, safeAreaInsetValues } from '@/utils'; diff --git a/src/components/DappBrowser/address-bar/AddressInput.tsx b/src/components/DappBrowser/address-bar/AddressInput.tsx deleted file mode 100644 index da9e1c49949..00000000000 --- a/src/components/DappBrowser/address-bar/AddressInput.tsx +++ /dev/null @@ -1,159 +0,0 @@ -import React, { RefObject } from 'react'; -import MaskedView from '@react-native-masked-view/masked-view'; -import { Box, globalColors, useColorMode, useForegroundColor } from '@/design-system'; -import { ButtonPressAnimation } from '@/components/animations'; -import Animated, { SharedValue, useAnimatedStyle } from 'react-native-reanimated'; -import { BlurView } from '@react-native-community/blur'; -import Input from '@/components/inputs/Input'; -import * as i18n from '@/languages'; -import { NativeSyntheticEvent, TextInput, TextInputSubmitEditingEventData } from 'react-native'; -import { ToolbarIcon } from '../BrowserToolbar'; -import { IS_IOS } from '@/env'; -import { FadeMask } from '@/__swaps__/screens/Swap/components/FadeMask'; -import { THICK_BORDER_WIDTH } from '@/__swaps__/screens/Swap/constants'; -import { opacity } from '@/__swaps__/screens/Swap/utils/swaps'; -import { DappBrowserShadows } from '../DappBrowserShadows'; - -const AnimatedBlurView = Animated.createAnimatedComponent(BlurView); - -export const AddressInput = ({ - inputRef, - inputValue, - onPress, - onBlur, - onFocus, - onChangeText, - onSubmitEditing, - isFocused, - tabViewProgress, - shouldShowMenuButton, - shouldShowRefreshButton, - onRefresh, -}: { - inputRef: RefObject; - inputValue: string | undefined; - onPress: () => void; - onBlur: () => void; - onFocus: () => void; - onChangeText: (newUrl: string) => void; - onSubmitEditing: (event: NativeSyntheticEvent) => void; - isFocused: boolean; - tabViewProgress: SharedValue | undefined; - shouldShowMenuButton: boolean; - shouldShowRefreshButton: boolean; - onRefresh: () => void; -}) => { - const { isDarkMode } = useColorMode(); - - const fillSecondary = useForegroundColor('fillSecondary'); - const labelSecondary = useForegroundColor('labelSecondary'); - const labelQuaternary = useForegroundColor('labelQuaternary'); - const separatorSecondary = useForegroundColor('separatorSecondary'); - - const buttonColorIOS = isDarkMode ? fillSecondary : opacity(globalColors.white100, 0.9); - const buttonColorAndroid = isDarkMode ? globalColors.blueGrey100 : globalColors.white100; - const buttonColor = IS_IOS ? buttonColorIOS : buttonColorAndroid; - - const inputStyle = useAnimatedStyle(() => ({ - pointerEvents: (tabViewProgress?.value ?? 0) < 1 ? 'auto' : 'none', - })); - - return ( - - - - - } - style={{ - alignItems: 'center', - flex: 1, - flexDirection: 'row', - justifyContent: 'center', - zIndex: 99, - }} - > - - - {IS_IOS && ( - - )} - - - {shouldShowMenuButton && ( - - { - return; - }} - size="icon 17px" - /> - - )} - {shouldShowRefreshButton && ( - - - - )} - - - ); -}; diff --git a/src/components/DappBrowser/address-bar/AccountIcon.tsx b/src/components/DappBrowser/search-input/AccountIcon.tsx similarity index 100% rename from src/components/DappBrowser/address-bar/AccountIcon.tsx rename to src/components/DappBrowser/search-input/AccountIcon.tsx diff --git a/src/components/DappBrowser/search-input/SearchInput.tsx b/src/components/DappBrowser/search-input/SearchInput.tsx new file mode 100644 index 00000000000..19c32bb388d --- /dev/null +++ b/src/components/DappBrowser/search-input/SearchInput.tsx @@ -0,0 +1,225 @@ +import React, { useCallback, useEffect, useMemo, useState } from 'react'; +import MaskedView from '@react-native-masked-view/masked-view'; +import { Box, globalColors, useColorMode, useForegroundColor } from '@/design-system'; +import { ButtonPressAnimation } from '@/components/animations'; +import Animated, { useAnimatedStyle } from 'react-native-reanimated'; +import { BlurView } from '@react-native-community/blur'; +import Input from '@/components/inputs/Input'; +import * as i18n from '@/languages'; +import { NativeSyntheticEvent, TextInputSubmitEditingEventData } from 'react-native'; +import { ToolbarIcon } from '../BrowserToolbar'; +import { IS_IOS } from '@/env'; +import { FadeMask } from '@/__swaps__/screens/Swap/components/FadeMask'; +import { THICK_BORDER_WIDTH } from '@/__swaps__/screens/Swap/constants'; +import { DappBrowserShadows } from '../DappBrowserShadows'; +import { RAINBOW_HOME, useBrowserContext } from '../BrowserContext'; +import isValidDomain from 'is-valid-domain'; +import { opacity } from '@/__swaps__/screens/Swap/utils/swaps'; + +const GOOGLE_SEARCH_URL = 'https://www.google.com/search?q='; +const HTTP = 'http://'; +const HTTPS = 'https://'; + +const AnimatedInput = Animated.createAnimatedComponent(Input); + +export const SearchInput = () => { + const { + isSearchInputFocused, + searchInputRef, + tabStates, + activeTabIndex, + tabViewVisible, + searchViewProgress, + setIsSearchInputFocused, + updateActiveTabState, + onRefresh, + } = useBrowserContext(); + const { isDarkMode } = useColorMode(); + + const fillSecondary = useForegroundColor('fillSecondary'); + const labelSecondary = useForegroundColor('labelSecondary'); + const labelQuaternary = useForegroundColor('labelQuaternary'); + const separatorSecondary = useForegroundColor('separatorSecondary'); + + const [url, setUrl] = useState(tabStates[activeTabIndex].url); + + const handleUrlSubmit = (event: NativeSyntheticEvent) => { + let newUrl = event.nativeEvent.text; + + let urlForValidation = newUrl.replace(/^https?:\/\//, ''); + if (urlForValidation.endsWith('/')) { + urlForValidation = urlForValidation.slice(0, -1); + } + + if (!isValidDomain(urlForValidation, { wildcard: true })) { + newUrl = GOOGLE_SEARCH_URL + newUrl; + } else if (!newUrl.startsWith(HTTP) && !newUrl.startsWith(HTTPS)) { + newUrl = HTTPS + newUrl; + } + + updateActiveTabState(activeTabIndex, { url: newUrl }); + }; + + const formattedUrl = useMemo(() => { + try { + const { hostname, pathname, search } = new URL(url); + if (hostname === 'www.google.com' && pathname === '/search') { + const params = new URLSearchParams(search); + return params.get('q') || url; + } + return hostname.startsWith('www.') ? hostname.slice(4) : hostname; + } catch { + return url; + } + }, [url]); + + // url handling needs work + useEffect(() => { + if (tabStates[activeTabIndex].url !== url) { + setUrl(tabStates[activeTabIndex].url); + } + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [activeTabIndex, tabStates]); + + const onUrlChange = (newUrl: string) => { + setUrl(newUrl); + }; + + const isGoogleSearch = url.startsWith(GOOGLE_SEARCH_URL); + const isHome = formattedUrl === RAINBOW_HOME; + // eslint-disable-next-line no-nested-ternary + const inputValue = isHome ? undefined : isSearchInputFocused && !isGoogleSearch ? url : formattedUrl; + + const buttonColorIOS = isDarkMode ? fillSecondary : opacity(globalColors.white100, 0.9); + const buttonColorAndroid = isDarkMode ? globalColors.blueGrey100 : globalColors.white100; + const buttonColor = IS_IOS ? buttonColorIOS : buttonColorAndroid; + + const isOnHomepage = tabStates[activeTabIndex].url === RAINBOW_HOME; + + const inputStyle = useAnimatedStyle(() => ({ + paddingLeft: 16 + (searchViewProgress?.value ?? 0) * 24, + })); + + const onPress = useCallback(() => { + if (!isSearchInputFocused) { + setIsSearchInputFocused(true); + setTimeout(() => { + searchInputRef.current?.focus(); + }, 50); + } + }, [isSearchInputFocused, searchInputRef, setIsSearchInputFocused]); + + const onBlur = useCallback(() => { + setIsSearchInputFocused(false); + }, [setIsSearchInputFocused]); + + const onFocus = useCallback(() => { + setIsSearchInputFocused(true); + }, [setIsSearchInputFocused]); + + return ( + + + + + } + style={{ + alignItems: 'center', + flex: 1, + flexDirection: 'row', + justifyContent: 'center', + zIndex: 99, + }} + > + + + {IS_IOS && ( + + )} + + + {(isSearchInputFocused || !isOnHomepage) && ( + + { + return; + }} + size="icon 17px" + /> + + )} + {!isSearchInputFocused && !isOnHomepage && ( + + + + )} + + + ); +}; diff --git a/src/components/DappBrowser/address-bar/TabButton.tsx b/src/components/DappBrowser/search-input/TabButton.tsx similarity index 78% rename from src/components/DappBrowser/address-bar/TabButton.tsx rename to src/components/DappBrowser/search-input/TabButton.tsx index 985324f1056..8135f45f9fa 100644 --- a/src/components/DappBrowser/address-bar/TabButton.tsx +++ b/src/components/DappBrowser/search-input/TabButton.tsx @@ -5,19 +5,12 @@ import { Box, Text, globalColors, useColorMode, useForegroundColor } from '@/des import { IS_IOS } from '@/env'; import position from '@/styles/position'; import { BlurView } from '@react-native-community/blur'; -import React, { useCallback, RefObject } from 'react'; -import { TextInput } from 'react-native'; +import React, { useCallback } from 'react'; import { DappBrowserShadows } from '../DappBrowserShadows'; +import { useBrowserContext } from '../BrowserContext'; -export const TabButton = ({ - inputRef, - isFocused, - toggleTabView, -}: { - inputRef: RefObject; - isFocused: boolean; - toggleTabView: () => void; -}) => { +export const TabButton = ({ toggleTabView }: { toggleTabView: () => void }) => { + const { isSearchInputFocused, searchInputRef } = useBrowserContext(); const { isDarkMode } = useColorMode(); const fillSecondary = useForegroundColor('fillSecondary'); const separatorSecondary = useForegroundColor('separatorSecondary'); @@ -27,14 +20,14 @@ export const TabButton = ({ const buttonColor = IS_IOS ? buttonColorIOS : buttonColorAndroid; const onPress = useCallback(() => { - if (!isFocused) { + if (!isSearchInputFocused) { // open tabs toggleTabView(); } else { // close keyboard - inputRef?.current?.blur(); + searchInputRef?.current?.blur(); } - }, [isFocused, inputRef, toggleTabView]); + }, [isSearchInputFocused, searchInputRef, toggleTabView]); return ( @@ -42,12 +35,12 @@ export const TabButton = ({ as={ButtonPressAnimation} borderRadius={22} onPress={onPress} - style={{ height: 44, paddingTop: isFocused ? 1 : undefined, width: 44 }} + style={{ height: 44, paddingTop: isSearchInputFocused ? 1 : undefined, width: 44 }} alignItems="center" justifyContent="center" > - - {isFocused ? '􀆈' : '􀐅'} + + {isSearchInputFocused ? '􀆈' : '􀐅'} {IS_IOS && ( { + return ( + <> + + + + ); +}; diff --git a/src/components/DappBrowser/search/SearchBar.tsx b/src/components/DappBrowser/search/SearchBar.tsx new file mode 100644 index 00000000000..007f84d9547 --- /dev/null +++ b/src/components/DappBrowser/search/SearchBar.tsx @@ -0,0 +1,78 @@ +import React from 'react'; +import { Box } from '@/design-system'; +import Animated, { Easing, interpolate, useAnimatedKeyboard, useAnimatedStyle, withTiming } from 'react-native-reanimated'; +import { TAB_BAR_HEIGHT } from '@/navigation/SwipeNavigator'; +import { useBrowserContext } from '../BrowserContext'; +import { AccountIcon } from '../search-input/AccountIcon'; +import { TabButton } from '../search-input/TabButton'; +import { SearchInput } from '../search-input/SearchInput'; +import useDimensions from '@/hooks/useDimensions'; +import { IS_IOS } from '@/env'; + +const timingConfig = { + duration: 500, + easing: Easing.bezier(0.22, 1, 0.36, 1), +}; + +export const SearchBar = () => { + const { tabViewProgress, toggleTabView, isSearchInputFocused, searchViewProgress } = useBrowserContext(); + + const keyboard = useAnimatedKeyboard(); + const { width: deviceWidth } = useDimensions(); + + const barStyle = useAnimatedStyle(() => ({ + opacity: 1 - (tabViewProgress?.value ?? 0), + paddingLeft: withTiming(72 - 56 * (searchViewProgress?.value ?? 0), timingConfig), + pointerEvents: (tabViewProgress?.value ?? 0) < 1 ? 'auto' : 'none', + transform: [ + { + translateY: interpolate(tabViewProgress?.value ?? 0, [0, 1], [0, 68], 'clamp'), + }, + { + scale: interpolate(tabViewProgress?.value ?? 0, [0, 1], [1, 0.9], 'clamp'), + }, + ], + })); + + const accountIconStyle = useAnimatedStyle(() => ({ + opacity: 1 - (searchViewProgress?.value ?? 0), + })); + + const bottomBarStyle = useAnimatedStyle(() => { + return { + height: TAB_BAR_HEIGHT + 88, + transform: [{ translateY: Math.min(-(keyboard.height.value - (IS_IOS ? 82 : 46)), 0) }], + }; + }, [tabViewProgress, keyboard.height]); + + return ( + + + + + + + + + + + + ); +}; diff --git a/src/components/DappBrowser/search/search-results/SearchResult.tsx b/src/components/DappBrowser/search/search-results/SearchResult.tsx new file mode 100644 index 00000000000..39899e4d72d --- /dev/null +++ b/src/components/DappBrowser/search/search-results/SearchResult.tsx @@ -0,0 +1,31 @@ +import React from 'react'; +import { ImgixImage } from '@/components/images'; +import { Box, Inline, Stack, Text } from '@/design-system'; +import { ButtonPressAnimation } from '@/components/animations'; + +export const SearchResult = ({ suggested }: { suggested?: boolean }) => { + return ( + + + + + + Uniswap + + + app.uniswap.org + + + + + ); +}; diff --git a/src/components/DappBrowser/search/search-results/SearchResults.tsx b/src/components/DappBrowser/search/search-results/SearchResults.tsx new file mode 100644 index 00000000000..0f361e53d6a --- /dev/null +++ b/src/components/DappBrowser/search/search-results/SearchResults.tsx @@ -0,0 +1,69 @@ +import { Box, Inline, Inset, Stack, Text, TextIcon } from '@/design-system'; +import React from 'react'; +import Animated, { useAnimatedStyle } from 'react-native-reanimated'; +import { ButtonPressAnimation } from '../../../animations'; +import { useBrowserContext } from '../../BrowserContext'; +import { SearchResult } from './SearchResult'; + +export const SearchResults = () => { + const { searchViewProgress, searchInputRef } = useBrowserContext(); + const backgroundStyle = useAnimatedStyle(() => ({ + opacity: searchViewProgress?.value, + pointerEvents: searchViewProgress?.value ? 'box-none' : 'none', + })); + + return ( + + + + + + + + + 􀐫 + + + Suggested + + + searchInputRef?.current?.blur()} + > + + 􀆄 + + + + + + + + + + + 􀊫 + + + More Results + + + + + + + + + + + + + ); +}; From d6e35e4749d2a48304f7985953ee71b7032b2023 Mon Sep 17 00:00:00 2001 From: Skylar Barrera Date: Mon, 25 Mar 2024 16:04:35 -0400 Subject: [PATCH 07/44] init browser state (#5552) * init browser state * get tab index * rm --- src/state/browserState/index.test.ts | 95 ++++++++++++++++++++++++++++ src/state/browserState/index.ts | 67 ++++++++++++++++++++ 2 files changed, 162 insertions(+) create mode 100644 src/state/browserState/index.test.ts create mode 100644 src/state/browserState/index.ts diff --git a/src/state/browserState/index.test.ts b/src/state/browserState/index.test.ts new file mode 100644 index 00000000000..e2bf5143668 --- /dev/null +++ b/src/state/browserState/index.test.ts @@ -0,0 +1,95 @@ +import { useBrowserStateStore } from '.'; + +describe('BrowserStateStore', () => { + beforeEach(() => { + // Reset the store to its initial state before each test + useBrowserStateStore.setState( + { + tabs: [], + }, + true + ); // The second argument 'true' is to replace the state instead of merging + }); + + test('should be able to add a tab', () => { + const { addTab, tabs } = useBrowserStateStore.getState(); + expect(tabs.length).toBe(0); + addTab({ + name: 'Test Tab', + isActive: true, + screenshot: 'test_screenshot.png', + history: [ + { + name: 'Test Site', + url: 'https://test.com', + image: 'test_image.png', + timestamp: Date.now(), + }, + ], + }); + expect(useBrowserStateStore.getState().tabs.length).toBe(1); + }); + + test('should place new tabs at the end', () => { + const { addTab } = useBrowserStateStore.getState(); + addTab({ name: 'First Tab', screenshot: '', history: [], isActive: false }); + addTab({ name: 'Second Tab', screenshot: '', history: [], isActive: false }); + const tabs = useBrowserStateStore.getState().tabs; + expect(tabs[tabs.length - 1].name).toBe('Second Tab'); + }); + + test('should be able to delete a tab', () => { + const { addTab, deleteTab, tabs } = useBrowserStateStore.getState(); + addTab({ name: 'Tab to Delete', screenshot: '', history: [], isActive: false }); + expect(tabs.length).toBe(1); + deleteTab(0); + expect(useBrowserStateStore.getState().tabs.length).toBe(0); + }); + + test('should handle deleting the active tab', () => { + const { addTab, deleteTab, setActiveTab, getActiveTab } = useBrowserStateStore.getState(); + addTab({ name: 'Active Tab', screenshot: '', history: [], isActive: false }); + addTab({ name: 'Next Tab', screenshot: '', history: [], isActive: false }); + setActiveTab(0); + expect(getActiveTab()?.name).toBe('Active Tab'); + deleteTab(0); + expect(getActiveTab()?.name).toBe('Next Tab'); + }); + + test('should be able to edit a tab', () => { + const { addTab, editTab, tabs } = useBrowserStateStore.getState(); + addTab({ name: 'Tab to Edit', screenshot: '', history: [], isActive: false }); + editTab(0, { name: 'Edited Tab' }); + expect(tabs[0].name).toBe('Edited Tab'); + }); + + test('editing a non-existent tab should do nothing', () => { + const { editTab, tabs } = useBrowserStateStore.getState(); + editTab(999, { name: 'Ghost Tab' }); // Assuming there's no tab at index 999 + expect(tabs.length).toBe(0); // No tabs should have been added or modified + }); + + test('should be able to set and get the active tab', () => { + const { addTab, setActiveTab, getActiveTab } = useBrowserStateStore.getState(); + addTab({ name: 'First Tab', screenshot: '', history: [], isActive: false }); + addTab({ name: 'Second Tab', screenshot: '', history: [], isActive: false }); + setActiveTab(1); + expect(getActiveTab()?.name).toBe('Second Tab'); + }); + + test('setting an active tab should deactivate others', () => { + const { addTab, setActiveTab, tabs } = useBrowserStateStore.getState(); + addTab({ name: 'First Tab', screenshot: '', history: [], isActive: true }); + addTab({ name: 'Second Tab', screenshot: '', history: [], isActive: false }); + setActiveTab(1); + expect(tabs[0].isActive).toBe(false); + expect(tabs[1].isActive).toBe(true); + }); + + test('deleting the only tab should result in no active tabs', () => { + const { addTab, deleteTab, tabs } = useBrowserStateStore.getState(); + addTab({ name: 'Lonely Tab', screenshot: '', history: [], isActive: true }); + deleteTab(0); + expect(tabs.find(tab => tab.isActive)).toBe(undefined); + }); +}); diff --git a/src/state/browserState/index.ts b/src/state/browserState/index.ts new file mode 100644 index 00000000000..31165c16a44 --- /dev/null +++ b/src/state/browserState/index.ts @@ -0,0 +1,67 @@ +import create from 'zustand'; + +export interface Site { + name: string; + url: string; + image: string; + timestamp: number; // Assuming timestamp is a Unix timestamp for simplicity +} + +export interface Tab { + history: Site[]; + name: string; + screenshot: string; // Assuming this is a URL or base64 encoded image + isActive: boolean; +} + +interface BrowserState { + tabs: Tab[]; + addTab: (tab: Tab) => void; + deleteTab: (tabIndex: number) => void; + editTab: (tabIndex: number, newTabData: Partial) => void; + setActiveTab: (tabIndex: number) => void; + getActiveTab: () => Tab | undefined; + getActiveTabIndex: () => number; +} + +export const useBrowserStateStore = create((set, get) => ({ + tabs: [], // Initial state of tabs is an empty array for now + + addTab: tab => + set(state => ({ + tabs: [...state.tabs, { ...tab, isActive: false }], + })), + + deleteTab: tabIndex => + set(state => { + const newTabs = state.tabs.filter((_, index) => index !== tabIndex); + // If the deleted tab was active, set the next tab as active, or the previous one if it was the last tab + if (state.tabs[tabIndex].isActive) { + if (newTabs.length > 0) { + if (tabIndex === 0 || tabIndex < newTabs.length) { + newTabs[tabIndex].isActive = true; + } else { + newTabs[tabIndex - 1].isActive = true; + } + } + } + return { tabs: newTabs }; + }), + + editTab: (tabIndex, newTabData) => { + set(state => ({ + tabs: state.tabs.map((tab, index) => (index === tabIndex ? { ...tab, ...newTabData, timestamp: Date.now() } : tab)), + })); + }, + + setActiveTab: tabIndex => + set(state => ({ + tabs: state.tabs.map((tab, index) => ({ + ...tab, + isActive: index === tabIndex, + })), + })), + + getActiveTab: () => get().tabs.find(tab => tab.isActive), + getActiveTabIndex: () => get().tabs.findIndex(tab => tab.isActive), +})); From 07f248d29d6b5fe2b88c7a1e0d11115ef7a842f6 Mon Sep 17 00:00:00 2001 From: Skylar Barrera Date: Tue, 26 Mar 2024 12:23:27 -0400 Subject: [PATCH 08/44] browser: favorites state + menu (#5553) * init dapp fav store * pipe it up --- src/components/DappBrowser/BrowserToolbar.tsx | 2 +- src/components/DappBrowser/Homepage.tsx | 59 ++++++++------- .../DappBrowser/search-input/SearchInput.tsx | 74 ++++++++++++++++--- src/state/favoriteDapps/index.test.ts | 69 +++++++++++++++++ src/state/favoriteDapps/index.ts | 44 +++++++++++ 5 files changed, 207 insertions(+), 41 deletions(-) create mode 100644 src/state/favoriteDapps/index.test.ts create mode 100644 src/state/favoriteDapps/index.ts diff --git a/src/components/DappBrowser/BrowserToolbar.tsx b/src/components/DappBrowser/BrowserToolbar.tsx index 0eed7082481..6bdf64c779e 100644 --- a/src/components/DappBrowser/BrowserToolbar.tsx +++ b/src/components/DappBrowser/BrowserToolbar.tsx @@ -73,7 +73,7 @@ export const ToolbarIcon = ({ disabled?: boolean; hitSlop?: number; icon: string; - onPress: () => void; + onPress?: () => void; scaleTo?: number; size?: TextSize; weight?: TextWeight; diff --git a/src/components/DappBrowser/Homepage.tsx b/src/components/DappBrowser/Homepage.tsx index f780cfac7b1..9bc73ddbaaf 100644 --- a/src/components/DappBrowser/Homepage.tsx +++ b/src/components/DappBrowser/Homepage.tsx @@ -10,6 +10,8 @@ import LinearGradient from 'react-native-linear-gradient'; import { BlurView } from '@react-native-community/blur'; import { ImgixImage } from '@/components/images'; import ContextMenuButton from '@/components/native-context-menu/contextMenu'; +import { Site } from '@/state/browserState'; +import { useFavoriteDappsStore } from '@/state/favoriteDapps'; const HORIZONTAL_INSET = 24; @@ -142,9 +144,7 @@ const Card = () => { ); }; -const Logo = () => { - const imageUrl = 'https://pbs.twimg.com/profile_images/1741494128779886592/RY4V0T2F_400x400.jpg'; - +const Logo = ({ site }: { site: Omit }) => { return ( @@ -152,7 +152,7 @@ const Logo = () => { { shadow="24px" /> - Zora + {site.name} @@ -170,6 +170,7 @@ const Logo = () => { export default function Homepage() { const { navigate } = useNavigation(); + const { favoriteDapps } = useFavoriteDappsStore(); return ( @@ -206,31 +207,29 @@ export default function Homepage() { - - - - 􀋃 - - - Favorites - - - - - - - - - - - - - - - - - - + {favoriteDapps?.length > 0 && ( + + + + 􀋃 + + + Favorites + + + + + + + {favoriteDapps.map(dapp => ( + + ))} + + + + + + )} diff --git a/src/components/DappBrowser/search-input/SearchInput.tsx b/src/components/DappBrowser/search-input/SearchInput.tsx index 19c32bb388d..727fa487712 100644 --- a/src/components/DappBrowser/search-input/SearchInput.tsx +++ b/src/components/DappBrowser/search-input/SearchInput.tsx @@ -6,7 +6,7 @@ import Animated, { useAnimatedStyle } from 'react-native-reanimated'; import { BlurView } from '@react-native-community/blur'; import Input from '@/components/inputs/Input'; import * as i18n from '@/languages'; -import { NativeSyntheticEvent, TextInputSubmitEditingEventData } from 'react-native'; +import { NativeSyntheticEvent, Share, TextInputSubmitEditingEventData } from 'react-native'; import { ToolbarIcon } from '../BrowserToolbar'; import { IS_IOS } from '@/env'; import { FadeMask } from '@/__swaps__/screens/Swap/components/FadeMask'; @@ -15,6 +15,11 @@ import { DappBrowserShadows } from '../DappBrowserShadows'; import { RAINBOW_HOME, useBrowserContext } from '../BrowserContext'; import isValidDomain from 'is-valid-domain'; import { opacity } from '@/__swaps__/screens/Swap/utils/swaps'; +import { useFavoriteDappsStore } from '@/state/favoriteDapps'; +import { Site } from '@/state/browserState'; +import ContextMenuButton from '@/components/native-context-menu/contextMenu'; +import ConditionalWrap from 'conditional-wrap'; +import haptics from '@/utils/haptics'; const GOOGLE_SEARCH_URL = 'https://www.google.com/search?q='; const HTTP = 'http://'; @@ -34,6 +39,7 @@ export const SearchInput = () => { updateActiveTabState, onRefresh, } = useBrowserContext(); + const { isFavorite, addFavorite, removeFavorite } = useFavoriteDappsStore(); const { isDarkMode } = useColorMode(); const fillSecondary = useForegroundColor('fillSecondary'); @@ -117,6 +123,53 @@ export const SearchInput = () => { setIsSearchInputFocused(true); }, [setIsSearchInputFocused]); + const handleFavoritePress = useCallback(() => { + if (isFavorite(formattedUrl)) { + removeFavorite(formattedUrl); + } else { + const site: Omit = { + name: formattedUrl, + url: formattedUrl, + image: `${formattedUrl}/favicon.ico`, + }; + addFavorite(site); + } + }, [formattedUrl]); + + const menuConfig = useMemo( + () => ({ + menuTitle: '', + menuItems: [ + { + actionKey: 'favorite', + actionTitle: isFavorite(formattedUrl) ? 'Undo Favorite' : 'Favorite', + icon: { + iconType: 'SYSTEM', + iconValue: isFavorite(formattedUrl) ? 'star.slash' : 'star', + }, + }, + { + actionKey: 'share', + actionTitle: 'Share', + icon: { + iconType: 'SYSTEM', + iconValue: 'square.and.arrow.up', + }, + }, + ], + }), + [isFavorite(formattedUrl)] + ); + + const onPressMenuItem = async ({ nativeEvent: { actionKey } }: { nativeEvent: { actionKey: 'share' | 'favorite' } }) => { + haptics.selection(); + if (actionKey === 'favorite') { + handleFavoritePress(); + } else { + await Share.share({ message: url }); + } + }; + return ( @@ -203,15 +256,16 @@ export const SearchInput = () => { {(isSearchInputFocused || !isOnHomepage) && ( - { - return; - }} - size="icon 17px" - /> + ( + + {children} + + )} + > + + )} {!isSearchInputFocused && !isOnHomepage && ( diff --git a/src/state/favoriteDapps/index.test.ts b/src/state/favoriteDapps/index.test.ts new file mode 100644 index 00000000000..ae88f3fd448 --- /dev/null +++ b/src/state/favoriteDapps/index.test.ts @@ -0,0 +1,69 @@ +import { favoriteDappsStore } from '.'; + +describe('FavoriteDappsStore', () => { + beforeEach(() => { + // Reset the store to its initial state before each test + favoriteDappsStore.setState( + { + favoriteDapps: [], + }, + true + ); // The second argument 'true' is to replace the state instead of merging + }); + + test('should be able to add a favorite site', () => { + const { addFavorite } = favoriteDappsStore.getState(); + expect(favoriteDappsStore.getState().favoriteDapps.length).toBe(0); + addFavorite({ + name: 'Uniswap', + url: 'uniswap.org', + image: 'uniswap.org/favicon', + }); + expect(favoriteDappsStore.getState().favoriteDapps.length).toBe(1); + }); + + test('adding a duplicate favorite site should not increase the array', () => { + const { addFavorite } = favoriteDappsStore.getState(); + addFavorite({ + name: 'Zora', + url: 'zora.co', + image: 'zora.png', + }); + expect(favoriteDappsStore.getState().favoriteDapps.length).toBe(1); + addFavorite({ + name: 'Zora', + url: 'zora.co', + image: 'zora.png', + }); + expect(favoriteDappsStore.getState().favoriteDapps.length).toBe(1); + }); + + test('should be able to remove a favorite site', () => { + const { addFavorite, removeFavorite } = favoriteDappsStore.getState(); + addFavorite({ + name: 'Mint.fun', + url: 'mint.fun', + image: 'mint.fun/favicon', + }); + expect(favoriteDappsStore.getState().favoriteDapps.length).toBe(1); + removeFavorite('mint.fun'); + expect(favoriteDappsStore.getState().favoriteDapps.length).toBe(0); + }); + + test('removing a non-existent favorite site should do nothing', () => { + const { removeFavorite } = favoriteDappsStore.getState(); + removeFavorite('https://nonexistentdapp.com'); + expect(favoriteDappsStore.getState().favoriteDapps.length).toBe(0); + }); + + test('should be able to check if a site is a favorite', () => { + const { addFavorite, isFavorite } = favoriteDappsStore.getState(); + addFavorite({ + name: 'Uniswap', + url: 'uniswap.org', + image: 'uniswap.org/favicon', + }); + expect(isFavorite('uniswap.org')).toBe(true); + expect(isFavorite('notafavorite.org')).toBe(false); + }); +}); diff --git a/src/state/favoriteDapps/index.ts b/src/state/favoriteDapps/index.ts new file mode 100644 index 00000000000..c27fe5e7c5c --- /dev/null +++ b/src/state/favoriteDapps/index.ts @@ -0,0 +1,44 @@ +import create from 'zustand'; +import { createStore } from '../internal/createStore'; + +// need to combine types here +interface Site { + name: string; + url: string; + image: string; +} + +interface FavoriteDappsStore { + favoriteDapps: Site[]; + addFavorite: (site: Site) => void; + removeFavorite: (url: string) => void; + isFavorite: (url: string) => boolean; +} + +export const favoriteDappsStore = createStore( + (set, get) => ({ + favoriteDapps: [], + addFavorite: site => { + const { favoriteDapps } = get(); + if (!favoriteDapps.some(dapp => dapp.url === site.url)) { + set({ favoriteDapps: [...favoriteDapps, site] }); + } + }, + removeFavorite: url => { + const { favoriteDapps } = get(); + set({ favoriteDapps: favoriteDapps.filter(dapp => dapp.url !== url) }); + }, + isFavorite: url => { + const { favoriteDapps } = get(); + return favoriteDapps.some(dapp => dapp.url === url); + }, + }), + { + persist: { + name: 'favoriteDapps', + version: 1, + }, + } +); + +export const useFavoriteDappsStore = create(favoriteDappsStore); From e603f95eb92bcae887718961b49434b52dc8fcf5 Mon Sep 17 00:00:00 2001 From: Matthew Wall Date: Tue, 26 Mar 2024 11:31:23 -0600 Subject: [PATCH 09/44] [CHORE]: Remove Apollo client in favor of `@/graphql` (#5555) * rm apollo * rm apollo dir * remove apollo client dep and tsconfig paths --- package.json | 1 - src/apollo/client.ts | 55 -------------------------- src/apollo/queries.ts | 9 ----- src/handlers/transactions.ts | 22 ++++------- src/utils/methodRegistry.ts | 21 ++++------ tsconfig.json | 2 - yarn.lock | 76 ++---------------------------------- 7 files changed, 18 insertions(+), 168 deletions(-) delete mode 100644 src/apollo/client.ts delete mode 100644 src/apollo/queries.ts diff --git a/package.json b/package.json index b3cc11d5bdd..8db735a4808 100644 --- a/package.json +++ b/package.json @@ -62,7 +62,6 @@ "bundle-inpage": "yarn webpack --config src/browser/webpack.config.js && cp InjectedJSBundle.js android/app/src/main/res/raw/injected_js_bundle.js" }, "dependencies": { - "@apollo/client": "3.2.4", "@bankify/react-native-animate-number": "0.2.1", "@bradgarropy/use-countdown": "1.4.1", "@capsizecss/core": "3.0.0", diff --git a/src/apollo/client.ts b/src/apollo/client.ts deleted file mode 100644 index 80c2de588c1..00000000000 --- a/src/apollo/client.ts +++ /dev/null @@ -1,55 +0,0 @@ -import { ApolloClient, ApolloQueryResult, HttpLink, InMemoryCache, QueryOptions } from '@apollo/client'; -import { OperationVariables } from '@apollo/client/core/types'; - -const defaultOptions = { - query: { - errorPolicy: 'all', - fetchPolicy: 'no-cache', - }, - watchQuery: { - errorPolicy: 'ignore', - fetchPolicy: 'no-cache', - }, -}; - -export class ApolloClientWithTimeout extends ApolloClient { - queryWithTimeout( - options: QueryOptions, - timeout: number - ): Promise> { - return new Promise((resolve, reject) => { - const abortController = new AbortController(); - const apolloQuery = this.query({ - ...options, - context: { - fetchOptions: { - signal: abortController.signal, - }, - }, - }); - const id = setTimeout(() => { - abortController.abort(); - reject(); - }, timeout); - return apolloQuery.then( - result => { - clearTimeout(id); - resolve(result); - }, - err => { - clearTimeout(id); - reject(err); - } - ); - }); - } -} - -export const metadataClient = new ApolloClientWithTimeout({ - ...defaultOptions, - cache: new InMemoryCache(), - link: new HttpLink({ - uri: 'https://metadata.p.rainbow.me/v1/graph', - useGETForQueries: true, - }), -}); diff --git a/src/apollo/queries.ts b/src/apollo/queries.ts deleted file mode 100644 index 7baca581937..00000000000 --- a/src/apollo/queries.ts +++ /dev/null @@ -1,9 +0,0 @@ -import gql from 'graphql-tag'; - -export const CONTRACT_FUNCTION = gql` - query contractFunction($chainID: Int!, $hex: String!) { - contractFunction(chainID: $chainID, hex: $hex) { - text - } - } -`; diff --git a/src/handlers/transactions.ts b/src/handlers/transactions.ts index 99998d2a8aa..ad98015446b 100644 --- a/src/handlers/transactions.ts +++ b/src/handlers/transactions.ts @@ -1,8 +1,7 @@ import { Contract } from '@ethersproject/contracts'; import { isEmpty } from 'lodash'; import { web3Provider } from './web3'; -import { metadataClient } from '@/apollo/client'; -import { CONTRACT_FUNCTION } from '@/apollo/queries'; +import { metadataClient } from '@/graphql'; import { RainbowTransaction, TransactionStatus, ZerionTransaction } from '@/entities'; import store from '@/redux/store'; import { transactionSignaturesDataAddNewSignature } from '@/redux/transactionSignatures'; @@ -50,18 +49,13 @@ export const getTransactionMethodName = async (transaction: ZerionTransaction) = let signature = signatures[bytes] || ''; if (signature) return signature; try { - const response = await metadataClient.queryWithTimeout( - { - query: CONTRACT_FUNCTION, - variables: { - chainID: 1, - hex: bytes, - }, - }, - 800 - ); - if (!isEmpty(response?.data?.contractFunction?.text)) { - signature = response.data.contractFunction.text; + const data = await metadataClient.getContractFunction({ + chainID: 1, + hex: bytes, + }); + + if (data.contractFunction && !isEmpty(data?.contractFunction?.text)) { + signature = data.contractFunction.text; } // eslint-disable-next-line no-empty } catch (e) {} diff --git a/src/utils/methodRegistry.ts b/src/utils/methodRegistry.ts index 6e6a6c57d46..082b1b7c39c 100644 --- a/src/utils/methodRegistry.ts +++ b/src/utils/methodRegistry.ts @@ -2,27 +2,20 @@ import { Contract } from '@ethersproject/contracts'; import { web3Provider } from '../handlers/web3'; import namesOverrides from '../references/method-names-overrides.json'; import methodRegistryABI from '../references/method-registry-abi.json'; -import { metadataClient } from '@/apollo/client'; -import { CONTRACT_FUNCTION } from '@/apollo/queries'; +import { metadataClient } from '@/graphql'; const METHOD_REGISTRY_ADDRESS = '0x44691B39d1a75dC4E0A0346CBB15E310e6ED1E86'; export const methodRegistryLookupAndParse = async (methodSignatureBytes: any, chainId: number) => { let signature = ''; - const response = await metadataClient.queryWithTimeout( - { - query: CONTRACT_FUNCTION, - variables: { - chainID: chainId, - hex: methodSignatureBytes, - }, - }, - 800 - ); + const data = await metadataClient.getContractFunction({ + chainID: chainId, + hex: methodSignatureBytes, + }); - if (response?.data?.contractFunction?.text) { - signature = response.data.contractFunction.text; + if (data?.contractFunction?.text) { + signature = data.contractFunction.text; } else { const registry = new Contract(METHOD_REGISTRY_ADDRESS, methodRegistryABI, web3Provider); diff --git a/tsconfig.json b/tsconfig.json index a9b3d6ae501..57d35df4f45 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -13,8 +13,6 @@ "baseUrl": ".", "paths": { "@/*": ["./src/*"], - "@rainbow-me/apollo": ["./src/apollo"], - "@rainbow-me/apollo/*": ["./src/apollo/*"], "@rainbow-me/assets": ["./src/assets"], "@rainbow-me/config": ["./src/config"], "@rainbow-me/config/*": ["./src/config/*"], diff --git a/yarn.lock b/yarn.lock index 47a7dbc6c10..f3a77481664 100644 --- a/yarn.lock +++ b/yarn.lock @@ -20,26 +20,6 @@ "@jridgewell/gen-mapping" "^0.3.5" "@jridgewell/trace-mapping" "^0.3.24" -"@apollo/client@3.2.4": - version "3.2.4" - resolved "https://registry.yarnpkg.com/@apollo/client/-/client-3.2.4.tgz#d9a308a900bd9e7053348367f66f3962804ed385" - integrity sha512-lfsxKINoc11+g4NQFyKFuxszc/GlecHrxkJYvx/oWkdpscSU5bm/c+BwI/yvk1/E3yfbR7Afi9XIYrt212xrtA== - dependencies: - "@graphql-typed-document-node/core" "^3.0.0" - "@types/zen-observable" "^0.8.0" - "@wry/context" "^0.5.2" - "@wry/equality" "^0.2.0" - fast-json-stable-stringify "^2.0.0" - graphql-tag "^2.11.0" - hoist-non-react-statics "^3.3.2" - optimism "^0.13.0" - prop-types "^15.7.2" - symbol-observable "^2.0.0" - terser "^5.2.0" - ts-invariant "^0.4.4" - tslib "^1.10.0" - zen-observable "^0.8.14" - "@babel/code-frame@7.12.11": version "7.12.11" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.11.tgz#f4ad435aa263db935b8f10f2c552d23fb716a63f" @@ -2035,7 +2015,7 @@ dependencies: nanoid "^3.3.1" -"@graphql-typed-document-node/core@^3.0.0", "@graphql-typed-document-node/core@^3.1.1": +"@graphql-typed-document-node/core@^3.1.1": version "3.2.0" resolved "https://registry.yarnpkg.com/@graphql-typed-document-node/core/-/core-3.2.0.tgz#5f3d96ec6b2354ad6d8a28bf216a1d97b5426861" integrity sha512-mB9oAsNCm9aM3/SOv4YtBMqZbYj10R7dkq8byBqxGY/ncFwhf2oQzMV+LCRlWoDSEBJ3COiR1yeDvMtsoOsuFQ== @@ -5104,11 +5084,6 @@ dependencies: "@types/yargs-parser" "*" -"@types/zen-observable@^0.8.0": - version "0.8.7" - resolved "https://registry.yarnpkg.com/@types/zen-observable/-/zen-observable-0.8.7.tgz#114e2ffc8d5be4915fdd5bc90668fc0ceaadb760" - integrity sha512-LKzNTjj+2j09wAo/vvVjzgw5qckJJzhdGgWHW7j69QIGdq/KnZrMAMIHQiWGl3Ccflh5/CudBAntTPYdprPltA== - "@typescript-eslint/eslint-plugin@5.52.0": version "5.52.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.52.0.tgz#5fb0d43574c2411f16ea80f5fc335b8eaa7b28a8" @@ -5928,20 +5903,6 @@ resolved "https://registry.yarnpkg.com/@webpack-cli/serve/-/serve-2.0.5.tgz#325db42395cd49fe6c14057f9a900e427df8810e" integrity sha512-lqaoKnRYBdo1UgDX8uF24AfGMifWK19TxPmM5FHc2vAGxrJ/qtyUyFBWoY1tISZdelsQ5fBcOusifo5o5wSJxQ== -"@wry/context@^0.5.2": - version "0.5.4" - resolved "https://registry.yarnpkg.com/@wry/context/-/context-0.5.4.tgz#b6c28038872e0a0e1ff14eb40b5bf4cab2ab4e06" - integrity sha512-/pktJKHUXDr4D6TJqWgudOPJW2Z+Nb+bqk40jufA3uTkLbnCRKdJPiYDIa/c7mfcPH8Hr6O8zjCERpg5Sq04Zg== - dependencies: - tslib "^1.14.1" - -"@wry/equality@^0.2.0": - version "0.2.0" - resolved "https://registry.yarnpkg.com/@wry/equality/-/equality-0.2.0.tgz#a312d1b6a682d0909904c2bcd355b02303104fb7" - integrity sha512-Y4d+WH6hs+KZJUC8YKLYGarjGekBrhslDbf/R20oV+AakHPINSitHfDRQz3EGcEWc1luXYNUvMhawWtZVWNGvQ== - dependencies: - tslib "^1.9.3" - "@xmldom/xmldom@0.7.7": version "0.7.7" resolved "https://registry.yarnpkg.com/@xmldom/xmldom/-/xmldom-0.7.7.tgz#16bd8a4e5c953018b8168e5d0a7d26b117cd7fa9" @@ -11213,13 +11174,6 @@ graphql-tag@2.11.0: resolved "https://registry.yarnpkg.com/graphql-tag/-/graphql-tag-2.11.0.tgz#1deb53a01c46a7eb401d6cb59dec86fa1cccbffd" integrity sha512-VmsD5pJqWJnQZMUeRwrDhfgoyqcfwEkvtpANqcoUG8/tOLkwNgU9mzub/Mc78OJMhHjx7gfAMTxzdG43VGg3bA== -graphql-tag@^2.11.0: - version "2.12.6" - resolved "https://registry.yarnpkg.com/graphql-tag/-/graphql-tag-2.12.6.tgz#d441a569c1d2537ef10ca3d1633b48725329b5f1" - integrity sha512-FdSNcu2QQcWnM2VNvSCCDCVS5PpPqpzgFT8+GXzqJuoDd0CBncxCY278u4mhRO7tMgo2JjgJA5aZ+nWSQ/Z+xg== - dependencies: - tslib "^2.1.0" - graphql@15.3.0: version "15.3.0" resolved "https://registry.yarnpkg.com/graphql/-/graphql-15.3.0.tgz#3ad2b0caab0d110e3be4a5a9b2aa281e362b5278" @@ -15385,13 +15339,6 @@ opn@^5.4.0: dependencies: is-wsl "^1.1.0" -optimism@^0.13.0: - version "0.13.2" - resolved "https://registry.yarnpkg.com/optimism/-/optimism-0.13.2.tgz#002a438b69652bfe8f8754a4493ed35c2e9d9821" - integrity sha512-kJkpDUEs/Rp8HsAYYlDzyvQHlT6YZa95P+2GGNR8p/VvsIkt6NilAk7oeTvMRKCq7BeclB7+bmdIexog2859GQ== - dependencies: - "@wry/context" "^0.5.2" - optionator@^0.9.1: version "0.9.3" resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.3.tgz#007397d44ed1872fdc6ed31360190f81814e2c64" @@ -18874,11 +18821,6 @@ symbol-observable@^1.2.0: resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.2.0.tgz#c22688aed4eab3cdc2dfeacbb561660560a00804" integrity sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ== -symbol-observable@^2.0.0: - version "2.0.3" - resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-2.0.3.tgz#5b521d3d07a43c351055fa43b8355b62d33fd16a" - integrity sha512-sQV7phh2WCYAn81oAkakC5qjq2Ml0g8ozqz03wOGnx9dDlG1de6yrF+0RAzSJD8fPUow3PTSMf2SAbOGxb93BA== - synckit@^0.8.3: version "0.8.8" resolved "https://registry.yarnpkg.com/synckit/-/synckit-0.8.8.tgz#fe7fe446518e3d3d49f5e429f443cf08b6edfcd7" @@ -18976,7 +18918,7 @@ terser-webpack-plugin@^5.3.10: serialize-javascript "^6.0.1" terser "^5.26.0" -terser@5.14.2, terser@^5.15.0, terser@^5.2.0, terser@^5.26.0: +terser@5.14.2, terser@^5.15.0, terser@^5.26.0: version "5.14.2" resolved "https://registry.yarnpkg.com/terser/-/terser-5.14.2.tgz#9ac9f22b06994d736174f4091aa368db896f1c10" integrity sha512-oL0rGeM/WFQCUd0y2QrWxYnq7tfSuKBiqTjRPWrRgB46WD/kiwHwF8T23z78H6Q6kGCuuHcPB+KULHRdxvVGQA== @@ -19158,13 +19100,6 @@ truncate-utf8-bytes@^1.0.0: dependencies: utf8-byte-length "^1.0.1" -ts-invariant@^0.4.4: - version "0.4.4" - resolved "https://registry.yarnpkg.com/ts-invariant/-/ts-invariant-0.4.4.tgz#97a523518688f93aafad01b0e80eb803eb2abd86" - integrity sha512-uEtWkFM/sdZvRNNDL3Ehu4WVpwaulhwQszV8mrtcdeE8nN00BV9mAmQ88RkrBhFgl9gMgvjJLAQcZbnPXI9mlA== - dependencies: - tslib "^1.9.3" - ts-jest@29.1.1: version "29.1.1" resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-29.1.1.tgz#f58fe62c63caf7bfcc5cc6472082f79180f0815b" @@ -19242,7 +19177,7 @@ tsconfig-paths@^3.10.1, tsconfig-paths@^3.14.1: resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae" integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q== -tslib@1.14.1, tslib@^1.10.0, tslib@^1.14.1, tslib@^1.8.1, tslib@^1.9.0, tslib@^1.9.3: +tslib@1.14.1, tslib@^1.8.1, tslib@^1.9.0, tslib@^1.9.3: version "1.14.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== @@ -20670,11 +20605,6 @@ yocto-queue@^0.1.0: resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== -zen-observable@^0.8.14: - version "0.8.15" - resolved "https://registry.yarnpkg.com/zen-observable/-/zen-observable-0.8.15.tgz#96415c512d8e3ffd920afd3889604e30b9eaac15" - integrity sha512-PQ2PC7R9rslx84ndNBZB/Dkv8V8fZEpk83RLgXtYd0fwUgEjseMn1Dgajh2x6S8QbZAFa9p2qVCEuYZNgve0dQ== - zod@^1.11.11: version "1.11.17" resolved "https://registry.yarnpkg.com/zod/-/zod-1.11.17.tgz#2aae9e91fc66128116ae9844e8f416a95f453f8e" From fe4d9c15cc698cfd1be4dcff8a71e0ff3492020f Mon Sep 17 00:00:00 2001 From: Skylar Barrera Date: Tue, 26 Mar 2024 13:47:33 -0400 Subject: [PATCH 10/44] balances: fetch twice tx confirm (#5551) --- src/hooks/useWatchPendingTxs.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/hooks/useWatchPendingTxs.ts b/src/hooks/useWatchPendingTxs.ts index 415e74a2879..e1f6a0a9070 100644 --- a/src/hooks/useWatchPendingTxs.ts +++ b/src/hooks/useWatchPendingTxs.ts @@ -184,6 +184,17 @@ export const useWatchPendingTransactions = ({ address }: { address: string }) => chainIds, }), }); + + // in case balances are not updated immediately lets refetch a couple seconds later + setTimeout(() => { + queryClient.refetchQueries({ + queryKey: consolidatedTransactionsQueryKey({ + address: accountAddress, + currency: nativeCurrency, + chainIds, + }), + }); + }, 2000); } setPendingTransactions({ address: accountAddress, From ad7aaf513c19f3aed0ba01967f0cfbbe91a09457 Mon Sep 17 00:00:00 2001 From: Skylar Barrera Date: Wed, 27 Mar 2024 12:38:43 -0400 Subject: [PATCH 11/44] fix: hide favs on non mainnet assets (#5565) --- .../FastComponents/FastCurrencySelectionRow.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/asset-list/RecyclerAssetList2/FastComponents/FastCurrencySelectionRow.tsx b/src/components/asset-list/RecyclerAssetList2/FastComponents/FastCurrencySelectionRow.tsx index db7ecc30d92..324c9aa0ad8 100644 --- a/src/components/asset-list/RecyclerAssetList2/FastComponents/FastCurrencySelectionRow.tsx +++ b/src/components/asset-list/RecyclerAssetList2/FastComponents/FastCurrencySelectionRow.tsx @@ -177,6 +177,7 @@ export default React.memo(function FastCurrencySelectionRow({ {isInfoButtonVisible && } {showFavoriteButton && + network === Network.mainnet && (ios ? ( // @ts-ignore Date: Wed, 27 Mar 2024 12:39:09 -0400 Subject: [PATCH 12/44] browser: requests background color (#5562) --- src/navigation/config.tsx | 2 +- src/screens/SignTransactionSheet.tsx | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/navigation/config.tsx b/src/navigation/config.tsx index 78c85e71138..30fa0feba86 100644 --- a/src/navigation/config.tsx +++ b/src/navigation/config.tsx @@ -232,7 +232,7 @@ export const signTransactionSheetConfig = { options: ({ route }: { route: SignTransactionSheetRouteProp }) => ({ ...buildCoolModalConfig({ ...route.params, - backgroundOpacity: route?.params?.requestType === 'walletconnect' ? 1 : 0.9, + backgroundOpacity: route?.params?.requestType === 'walletconnect' ? 1 : 0.4, cornerRadius: 0, springDamping: 1, topOffset: 0, diff --git a/src/screens/SignTransactionSheet.tsx b/src/screens/SignTransactionSheet.tsx index 629903b6d88..9c3ed7dd526 100644 --- a/src/screens/SignTransactionSheet.tsx +++ b/src/screens/SignTransactionSheet.tsx @@ -142,6 +142,7 @@ export type SignTransactionSheetRouteProp = RouteProp<{ SignTransactionSheet: Si export const SignTransactionSheet = () => { const { goBack, navigate } = useNavigation(); const { colors, isDarkMode } = useTheme(); + const { width: deviceWidth } = useDimensions(); const { accountAddress } = useAccountSettings(); const [simulationData, setSimulationData] = useState(); const [simulationError, setSimulationError] = useState(undefined); @@ -966,6 +967,18 @@ export const SignTransactionSheet = () => { )} + {requestType === 'browser' && ( + + )} ); From fabf24bb19267691b37494f235ac072345939027 Mon Sep 17 00:00:00 2001 From: Skylar Barrera Date: Wed, 27 Mar 2024 12:39:15 -0400 Subject: [PATCH 13/44] txs: detail sheet updates (#5535) * save * remove selectors and add types * single query, type refactor, pipe it up * pendingTx state & zustand * useWatchPendingTxs * usePoll + usage * queries * use transactions * messy types and structure * addNewTransactions * fix prettier * Revert "fix prettier" This reverts commit 0ead5a0e866ccbb63cc93d8735107235be3f0926. * save * lint * save * ui tweaks * clean up state and add nonces * ben ui review * pipe up once shit * clean * clean * rename and fix case * fix tag color and position * clean up * clean up * rm logs * save * fix display * cleaning * use new tx parsing for notifs * oops * oop * change label * use masthead * fix NaN * clean up for v1 * i18n + logs * lint --------- Co-authored-by: Matthew Wall --- .prettierignore | 2 +- src/languages/en_US.json | 1 + .../TransactionDetailsFromToSection.tsx | 62 +-- ...etailsStatusActionsAndTimestampSection.tsx | 10 +- .../TransactionDetailsValueAndFeeSection.tsx | 10 +- .../components/TransactionMasthead.tsx | 399 ++++++++++++++++++ 6 files changed, 415 insertions(+), 69 deletions(-) create mode 100644 src/screens/transaction-details/components/TransactionMasthead.tsx diff --git a/.prettierignore b/.prettierignore index 6e14cd21921..a841f71a5c6 100644 --- a/.prettierignore +++ b/.prettierignore @@ -10,4 +10,4 @@ rainbow-scripts .vscode __generated__ coverage -InjectedJSBundle.js \ No newline at end of file +InjectedJSBundle.js diff --git a/src/languages/en_US.json b/src/languages/en_US.json index 39843e734e9..1329d8cb085 100644 --- a/src/languages/en_US.json +++ b/src/languages/en_US.json @@ -2008,6 +2008,7 @@ "to": "To", "value": "Value", "hash": "Tx Hash", + "you": "You", "network_fee": "Network Fee", "hash_copied": "\uDBC0\uDC63 Transaction hash copied", "address_copied": "\uDBC0\uDC63 Address copied", diff --git a/src/screens/transaction-details/components/TransactionDetailsFromToSection.tsx b/src/screens/transaction-details/components/TransactionDetailsFromToSection.tsx index 822d8b4042d..bf76c97a9ef 100644 --- a/src/screens/transaction-details/components/TransactionDetailsFromToSection.tsx +++ b/src/screens/transaction-details/components/TransactionDetailsFromToSection.tsx @@ -1,11 +1,8 @@ -import React, { useMemo } from 'react'; -import { Box, Stack } from '@/design-system'; -import * as i18n from '@/languages'; -import { TransactionDetailsAddressRow } from '@/screens/transaction-details/components/TransactionDetailsAddressRow'; -import { useContacts, useUserAccounts } from '@/hooks'; -import { isLowerCaseMatch } from '@/utils'; +import React from 'react'; +import { Box } from '@/design-system'; import { TransactionDetailsDivider } from '@/screens/transaction-details/components/TransactionDetailsDivider'; import { RainbowTransaction } from '@/entities'; +import TransactionMasthead from './TransactionMasthead'; type Props = { transaction: RainbowTransaction; @@ -13,62 +10,11 @@ type Props = { }; export const TransactionDetailsFromToSection: React.FC = ({ transaction, presentToast }) => { - const from = transaction.from ?? undefined; - const to = transaction.to ?? undefined; - const { contacts } = useContacts(); - const fromContact = from ? contacts[from] : undefined; - const toContact = to ? contacts[to] : undefined; - - const { userAccounts, watchedAccounts } = useUserAccounts(); - - const fromAccount = useMemo(() => { - if (!from) { - return undefined; - } else { - return ( - userAccounts.find(account => isLowerCaseMatch(account.address, from)) ?? - watchedAccounts.find(account => isLowerCaseMatch(account.address, from)) - ); - } - }, [from]); - const toAccount = useMemo(() => { - if (!to) { - return undefined; - } else { - return ( - userAccounts.find(account => isLowerCaseMatch(account.address, to)) ?? - watchedAccounts.find(account => isLowerCaseMatch(account.address, to)) - ); - } - }, [to]); - - if (!from && !to) { - return null; - } return ( <> - - {from && ( - - )} - {to && ( - - )} - + ); diff --git a/src/screens/transaction-details/components/TransactionDetailsStatusActionsAndTimestampSection.tsx b/src/screens/transaction-details/components/TransactionDetailsStatusActionsAndTimestampSection.tsx index 1c8785bbaf9..7aaf0ce0307 100644 --- a/src/screens/transaction-details/components/TransactionDetailsStatusActionsAndTimestampSection.tsx +++ b/src/screens/transaction-details/components/TransactionDetailsStatusActionsAndTimestampSection.tsx @@ -24,7 +24,7 @@ type Props = { }; export const TransactionDetailsStatusActionsAndTimestampSection: React.FC = ({ transaction, hideIcon }) => { - const { minedAt, status, from } = transaction; + const { minedAt, status, type, from } = transaction; const dispatch = useDispatch(); const { navigate, goBack } = useNavigation(); const accountAddress = useSelector((state: AppState) => state.settings.accountAddress); @@ -112,7 +112,7 @@ export const TransactionDetailsStatusActionsAndTimestampSection: React.FC - {status && !hideIcon && ( + {type && !hideIcon && ( )} + - {status && ( + {type && ( - {capitalize(status)} + {/* @ts-ignore */} + {i18n.t(i18n.l.transactions.type[transaction?.title])} )} {date && ( diff --git a/src/screens/transaction-details/components/TransactionDetailsValueAndFeeSection.tsx b/src/screens/transaction-details/components/TransactionDetailsValueAndFeeSection.tsx index 33098b35ee5..7f60bfe1c26 100644 --- a/src/screens/transaction-details/components/TransactionDetailsValueAndFeeSection.tsx +++ b/src/screens/transaction-details/components/TransactionDetailsValueAndFeeSection.tsx @@ -32,12 +32,10 @@ export const TransactionDetailsValueAndFeeSection: React.FC = ({ transact const change = transaction?.changes?.[0]; const value = change?.value || transaction.balance?.display; - const valueDisplay = convertRawAmountToBalance(value || '', assetData!).display || ''; - const nativeCurrencyValue = convertAmountAndPriceToNativeDisplay( - change?.asset?.balance?.amount || '', - change?.asset?.price?.value || '', - nativeCurrency - ).display; + const valueDisplay = value ? convertRawAmountToBalance(value || '', assetData!).display : ''; + const nativeCurrencyValue = change?.asset?.price?.value + ? convertAmountAndPriceToNativeDisplay(change?.asset?.balance?.amount || '', change?.asset?.price?.value || '', nativeCurrency).display + : ''; const feeValue = fee?.value.display ?? ''; const feeNativeCurrencyValue = fee?.native?.display ?? ''; diff --git a/src/screens/transaction-details/components/TransactionMasthead.tsx b/src/screens/transaction-details/components/TransactionMasthead.tsx new file mode 100644 index 00000000000..5d815e11dbf --- /dev/null +++ b/src/screens/transaction-details/components/TransactionMasthead.tsx @@ -0,0 +1,399 @@ +// @refresh reset + +import React, { useEffect, useMemo, useState } from 'react'; +import { NativeCurrencyKey, ParsedAddressAsset, RainbowTransaction } from '@/entities'; + +import { Bleed, Box, Columns, Cover, Row, Rows, Separator, Stack, Text, TextProps } from '@/design-system'; + +import styled from '@/styled-thing'; +import { position } from '@/styles'; +import { ThemeContextProps, useTheme } from '@/theme'; +import { usePersistentDominantColorFromImage } from '@/hooks/usePersistentDominantColorFromImage'; +import RowWithMargins from '@/components/layout/RowWithMargins'; +import { IS_ANDROID } from '@/env'; +import { convertAmountAndPriceToNativeDisplay, convertAmountToBalanceDisplay } from '@/helpers/utilities'; +import { fetchENSAvatar } from '@/hooks/useENSAvatar'; +import { fetchReverseRecord } from '@/handlers/ens'; + +import { address, formatAddressForDisplay } from '@/utils/abbreviations'; +import { ContactAvatar } from '@/components/contacts'; +import { isLowerCaseMatch } from '@/utils'; +import { useSelector } from 'react-redux'; +import { AppState } from '@/redux/store'; +import { useContacts, useUserAccounts } from '@/hooks'; +import { useTiming } from 'react-native-redash'; +import Animated, { Easing, SharedValue, interpolate, useAnimatedStyle } from 'react-native-reanimated'; +import { removeFirstEmojiFromString, returnStringFirstEmoji } from '@/helpers/emojiHandler'; +import { addressHashedColorIndex, addressHashedEmoji } from '@/utils/profileUtils'; +import ImageAvatar from '@/components/contacts/ImageAvatar'; +import RainbowCoinIcon from '@/components/coin-icon/RainbowCoinIcon'; +import { Network } from '@/networks/types'; +import * as lang from '@/languages'; + +const TransactionMastheadHeight = android ? 153 : 135; + +const Container = styled(Box).attrs({ + direction: 'column', +})({ + borderRadius: 30, + flex: 1, + paddingHorizontal: 20, + height: TransactionMastheadHeight, + overflow: 'hidden', + zIndex: 0, + ...(android ? { paddingTop: 4 } : {}), + justifyContent: 'center', + alitnItems: 'center', +}); + +const Gradient = styled(Box).attrs(({ theme: { colors }, color }: { theme: ThemeContextProps; color: string }) => ({ + backgroundColor: colors.alpha(color, 0.08), +}))({ + ...position.coverAsObject, +}); + +function CurrencyTile({ + contactAddress, + title, + subtitle, + address = '', + asset, + showAsset, + image, + fallback, + onAddressCopied, +}: { + asset?: ParsedAddressAsset; + showAsset?: boolean; + contactAddress?: string; + title?: string; + subtitle?: string; + image?: string; + fallback?: string; + address?: string; + onAddressCopied: () => void; +}) { + const accountAddress = useSelector((state: AppState) => state.settings.accountAddress); + const theme = useTheme(); + + // @ts-ignore + const { contacts } = useContacts(); + + const { userAccounts, watchedAccounts } = useUserAccounts(); + const addressContact = address ? contacts[address] : undefined; + const addressAccount = useMemo(() => { + if (!address) { + return undefined; + } else { + return ( + userAccounts.find(account => isLowerCaseMatch(account.address, address)) ?? + watchedAccounts.find(account => isLowerCaseMatch(account.address, address)) + ); + } + }, [address]); + + const formattedAddress = formatAddressForDisplay(address, 4, 6); + const [fetchedEnsName, setFetchedEnsName] = useState(); + const [fetchedEnsImage, setFetchedEnsImage] = useState(); + const [imageLoaded, setImageLoaded] = useState(!!addressAccount?.image); + + const accountEmoji = useMemo(() => returnStringFirstEmoji(addressAccount?.label), [addressAccount]); + const accountName = useMemo(() => removeFirstEmojiFromString(addressAccount?.label), []); + const avatarColor = + addressAccount?.color ?? addressContact?.color ?? theme.colors.avatarBackgrounds[addressHashedColorIndex(address) || 1]; + const emoji = accountEmoji || addressHashedEmoji(address); + + const name = accountName || fetchedEnsName || addressContact?.nickname || addressContact?.ens || formattedAddress; + + if (accountAddress?.toLowerCase() === address?.toLowerCase() && !showAsset) { + title = lang.t(lang.l.transaction_details.you); + } + + const shouldShowAddress = (!name.includes('...') || name === lang.t(lang.l.transaction_details.you)) && !showAsset; + const imageUrl = fetchedEnsImage ?? addressAccount?.image; + const ensAvatarSharedValue = useTiming(!!image || (!!imageUrl && imageLoaded), { + duration: image || addressAccount?.image ? 0 : 420, + }); + + useEffect(() => { + if (!addressContact?.nickname && !accountName) { + fetchReverseRecord(address).then(name => { + if (name) { + setFetchedEnsName(name); + } + }); + } + }, []); + + useEffect(() => { + if (!addressAccount?.image && (fetchedEnsName || addressContact?.ens)) { + const ens = fetchedEnsName ?? addressContact?.ens; + if (ens) { + fetchENSAvatar(ens, { cacheFirst: true }).then(avatar => { + if (avatar?.imageUrl) { + setFetchedEnsImage(avatar.imageUrl); + } + }); + } + } + }, [fetchedEnsName]); + + const colorForAsset = usePersistentDominantColorFromImage(showAsset ? asset?.icon_url : imageUrl) || avatarColor; + + const colorToUse = colorForAsset; + + const emojiAvatarAnimatedStyle = useAnimatedStyle(() => ({ + opacity: interpolate(ensAvatarSharedValue.value, [0, 1], [1, 0]), + })); + const ensAvatarAnimatedStyle = useAnimatedStyle(() => ({ + opacity: ensAvatarSharedValue.value, + })); + + const onImageLoad = () => { + setImageLoaded(true); + }; + + return ( + + + + + + + {showAsset ? ( + + ) : ( + <> + + {/*add coin icon*/} + + + + + + + + + )} + + + + + + + + + + + + + + + + + + + + + ); +} + +type AnimatedTextProps = Omit & { + text: string; + loadedText: string | undefined; +}; +const AnimatedText = ({ text, loadedText, size, weight, color, align, ...props }: AnimatedTextProps) => { + const loadedTextValue = useTiming(!!loadedText, { + duration: 420, + easing: Easing.linear, + }); + const textStyle = useAnimatedStyle(() => ({ + opacity: interpolate(loadedTextValue.value, [0, 0.5, 1], [1, 0, 0]), + })); + const loadedTextStyle = useAnimatedStyle(() => ({ + opacity: interpolate(loadedTextValue.value, [0, 0.5, 1], [0, 0, 1]), + })); + + return ( + + + + {text} + + + + + + {loadedText} + + + + + ); +}; +const DoubleChevron = () => ( + + + + 􀯻 + + + + 􀯻 + + + + +); + +export default function TransactionMasthead({ transaction }: { transaction: RainbowTransaction }) { + const nativeCurrency = useSelector((state: AppState) => state.settings.nativeCurrency); + + const inputAsset = useMemo(() => { + const inAsset = transaction?.changes?.find(a => a?.direction === 'in')?.asset; + if (!inAsset) return undefined; + + return { + inAssetValueDisplay: convertAmountToBalanceDisplay(inAsset?.balance?.amount || '0', inAsset), + inAssetNativeDisplay: inAsset?.price?.value + ? convertAmountAndPriceToNativeDisplay(inAsset?.balance?.amount || '0', inAsset?.price?.value || '0', nativeCurrency)?.display + : '-', + ...inAsset, + }; + }, []); + + const outputAsset = useMemo(() => { + const outAsset = transaction?.changes?.find(a => a?.direction === 'out')?.asset; + if (!outAsset) return undefined; + + return { + image: outAsset?.icon_url || '', + inAssetValueDisplay: convertAmountToBalanceDisplay(outAsset?.balance?.amount || '0', outAsset), + inAssetNativeDisplay: outAsset?.price?.value + ? convertAmountAndPriceToNativeDisplay(outAsset?.balance?.amount || '0', outAsset?.price?.value || '0', nativeCurrency)?.display + : '-', + ...outAsset, + }; + }, []); + + const contractImage = transaction?.contract?.iconUrl; + const contractName = transaction?.contract?.name; + + // if its a mint then we want to show the mint contract first + const toAddress = (transaction.type === 'mint' ? transaction?.from : transaction?.to) || undefined; + const fromAddress = (transaction.type === 'mint' ? transaction?.to : transaction?.from) || undefined; + + const getRightMasteadData = (): { title?: string; subtitle?: string; image?: string } => { + if (transaction.type === 'swap') { + return { + title: inputAsset?.inAssetValueDisplay, + subtitle: inputAsset?.inAssetNativeDisplay, + }; + } + if (transaction.type === 'contract_interaction' || transaction.type === 'approve') { + return { + title: contractName, + subtitle: transaction?.from || '', + image: contractImage, + }; + } + + return { + title: undefined, + subtitle: undefined, + image: undefined, + }; + }; + + const getLeftMasteadData = (): { title?: string; subtitle?: string; image?: string } => { + if (transaction.type === 'swap') { + return { + title: outputAsset?.inAssetValueDisplay, + subtitle: outputAsset?.inAssetNativeDisplay, + }; + } + return { + title: undefined, + subtitle: undefined, + image: undefined, + }; + }; + + const leftMasteadData = getLeftMasteadData(); + const rightMasteadData = getRightMasteadData(); + + return ( + + + + + + {}} + /> + + {}} + /> + + + + + + + + + ); +} From 35feb5bc59c95f7b8538224cbe39f8caeaa9ae95 Mon Sep 17 00:00:00 2001 From: Jin Date: Wed, 27 Mar 2024 13:18:18 -0400 Subject: [PATCH 14/44] Bump Rudderstack version to v1.12.1 (#5556) This resolves the issue with NaN values causing a crash. --- ios/Podfile.lock | 4 ++-- package.json | 2 +- yarn.lock | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 1d6b985f222..998b00081bb 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -768,7 +768,7 @@ PODS: - RCT-Folly (= 2021.07.22.00) - React-Core - ReactCommon/turbomodule/core - - RNRudderSdk (1.12.0): + - RNRudderSdk (1.12.1): - React - Rudder (< 2.0.0, >= 1.24.1) - RNScreens (3.23.0): @@ -1368,7 +1368,7 @@ SPEC CHECKSUMS: RNPermissions: 4e3714e18afe7141d000beae3755e5b5fb2f5e05 RNReactNativeHapticFeedback: 653a8c126a0f5e88ce15ffe280b3ff37e1fbb285 RNReanimated: 5afba582037b0dae040a5f927dec7fdd18e430c3 - RNRudderSdk: b638620627e6cb9f95b54468810ac2ac1f7dc48b + RNRudderSdk: 805d4b7064714f3295bf5f152d3812cc67f67a93 RNScreens: 6a8a3c6b808aa48dca1780df7b73ea524f602c63 RNSentry: fbbdcd7213058e3de5fbaa452b25a06a16b4b382 RNShare: eaee3dd5a06dad397c7d3b14762007035c5de405 diff --git a/package.json b/package.json index 8db735a4808..f24302481d8 100644 --- a/package.json +++ b/package.json @@ -116,7 +116,7 @@ "@react-navigation/native": "6.1.6", "@react-navigation/stack": "6.3.16", "@reservoir0x/reservoir-sdk": "2.0.8", - "@rudderstack/rudder-sdk-react-native": "1.12.0", + "@rudderstack/rudder-sdk-react-native": "1.12.1", "@sentry/react-native": "3.4.1", "@shopify/flash-list": "1.5.0", "@shopify/react-native-skia": "0.1.200", diff --git a/yarn.lock b/yarn.lock index f3a77481664..5fd5dae1200 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3991,10 +3991,10 @@ resolved "https://registry.yarnpkg.com/@rnx-kit/align-deps/-/align-deps-2.2.4.tgz#3ed70da68276163ee9b362f1c625ccc4e17d364d" integrity sha512-sLbQMBU6LvYesH6AsIHKsN6e90PU1JGyjzvZDXYX8VnxqgjmEkgqHF8/PFAKi0lP+OUzDZk6bmSo3cbhd6OqXg== -"@rudderstack/rudder-sdk-react-native@1.12.0": - version "1.12.0" - resolved "https://registry.yarnpkg.com/@rudderstack/rudder-sdk-react-native/-/rudder-sdk-react-native-1.12.0.tgz#d7016b542e2c6a81e787b2a17f1f2ffb2da1e207" - integrity sha512-9ULPosPVq3T8s2irZVyMx1qELZnderpPMAgdheK166uTz7yxDSR+ASjoZvIPKZhpnm3afvTxFXw9s0Ji0SCtVw== +"@rudderstack/rudder-sdk-react-native@1.12.1": + version "1.12.1" + resolved "https://registry.yarnpkg.com/@rudderstack/rudder-sdk-react-native/-/rudder-sdk-react-native-1.12.1.tgz#fc2473db5bbbffab3246fd432227f681fcac8d2f" + integrity sha512-efUuKt8KKm6YECyOHaBjmZTGm4MU6H7gQVE7mQenlSmCXFRMwpq+Lh/wxoO4dIsA6t14ANI8LPHlNZN222w4cA== "@scure/base@^1.1.3", "@scure/base@~1.1.0", "@scure/base@~1.1.2", "@scure/base@~1.1.4": version "1.1.5" From 60cceff2d970566d89f31a69038621a9e4584622 Mon Sep 17 00:00:00 2001 From: Skylar Barrera Date: Wed, 27 Mar 2024 13:49:19 -0400 Subject: [PATCH 15/44] fix: search by contract address (#5563) --- src/hooks/useSearchCurrencyList.ts | 1 + src/hooks/useSwapCurrencyList.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/src/hooks/useSearchCurrencyList.ts b/src/hooks/useSearchCurrencyList.ts index dab30e0bdad..3d0d0be696c 100644 --- a/src/hooks/useSearchCurrencyList.ts +++ b/src/hooks/useSearchCurrencyList.ts @@ -184,6 +184,7 @@ const useSearchCurrencyList = (searchQuery: string, searchChainId = MAINNET_CHAI return [ { + address, decimals, favorite: false, highLiquidity: false, diff --git a/src/hooks/useSwapCurrencyList.ts b/src/hooks/useSwapCurrencyList.ts index 44bb4c9916e..bd5a0cd57fe 100644 --- a/src/hooks/useSwapCurrencyList.ts +++ b/src/hooks/useSwapCurrencyList.ts @@ -193,6 +193,7 @@ const useSwapCurrencyList = (searchQuery: string, searchChainId = MAINNET_CHAINI const uniqueId = `${address}_${network}`; return [ { + address, decimals, favorite: false, highLiquidity: false, From 783f120019d955e11886b71fd3b028e9f5dfa440 Mon Sep 17 00:00:00 2001 From: Matthew Wall Date: Wed, 27 Mar 2024 12:01:22 -0600 Subject: [PATCH 16/44] [APP-1049]: (feat): Backups V2 (#5310) * [APP-1051]: (feat): add backups global config (#5306) * (feat): add backups global config * stash * add migration for setting initial backup method * add method to migrations array * revert pbx change * change backup status value * [APP-1052]: Add icon to Settings depending on `preferredBackupMethod` and `backupStatus` (#5313) * [APP-1052]: (feat): adjust settings page row * fix migration and hook for useWallets * simplify an if statement * wallets and backups screen progress (#5315) * wallets and backups screen progress * manual backups progress * progress * feat(backups): more work on wallets and backups * revert pbx * rev init wallet change * final touches on wallets and backup view * cleanup unused stuff and progress on backups flow * backups: warning + new secret phrase styles (#5322) * save progress * cleanup and finish secret phrase / private key viewiing screens --------- Co-authored-by: Matthew Wall * chore: cleanup WalletsAndBackup settings screen and replace lang with i18n * android settings fixes * @matthew/app 1106 (#5359) * progress on cloud backup flow * cloud backup flow progress * [APP-1105]: Progress on restore from cloud flow (#5358) * progress on restore from cloud * progress on choose backup flow * f * test signed commit * backups v2 restore from icloud flow done * progress on restore step * restore from backup working * fix UserData.json restoring from other backups * some cloud backup type improvements * fix menu item width bug * bug fixes * cleanup unused imports from manage cloud backups file * typescript, lint and cleanup * fix lint issues * fix file name casing * fix import secret phrase or private key image * fix casing * android style fixes * wrap up work * android stuff * android bsstack fixes * more touches * fixes * improve spacing on >1 line wallet rows * fix lint * @matthew/app 1135 (#5397) * fix button legibility * fix manual backup bug * change log * fix bug where create wallet sometimes uses the wrong wallet * add ens avatars to wallets view * cleanup size * add more padding to image on settings page * fix * fix algo used to calculate account menu item height * add change drivce accounts for android * cleanup .android files * cleanup .android files * change dev settings sheet title on android * fix create wallet modal on close opening the create profile sheet * add menu item being the entire context menu boundary (#5405) * few small changes * @matthew/app 1157 (#5406) * sort wallets * fix numeric increment and sort wallets by type and backup status * i18n stuff * add icons * ens fix + context menu button color change (#5414) * skylar did all this (#5409) * skylar did all this * change backupProvider to be served from user data and not local wallet state * fix stuff * cleanup merge * add explainer sheet from global backups * rm console logs * improve pin screen on android * some i18n and cloud backup changes * backups: show back up state (#5420) * chore: rug portfolio websocket (#5371) * rug portfolio websocket * cleanup * rug it all --------- Co-authored-by: skylarbarrera * skylar did all this * change backupProvider to be served from user data and not local wallet state * fix stuff * cleanup merge * txSim: price clean up (#5411) * save * swaps: fix max native check (#5399) * audit: undici (#5419) * fin * clean up * only save local password if we dont have * finish piping up title --------- Co-authored-by: Derek Nelson <6868432+dereknelson@users.noreply.github.com> Co-authored-by: Matthew Wall * impl. backing up all wallets at once (#5432) * progress * backup all wallets progress * add some logging * Update src/screens/Diagnostics/index.tsx * . * Fix Android google drive login quirks (#5461) * fix android stuff * fix lint * rev pbx * / * Fix Android ShadowStack causing TextInputs to be funky... and not in a fun way (#5478) * fix some i18n * add cloudPlatform to description * mother of god * undo test changes * added assets to xcode * fix files (#5468) * Add this wallet sheet doesn't dismiss after backing up to iCloud (#5467) * fix goBack not being called on backup success * return success * fix view cloud backups not working (#5466) * Android only - previous back up with pin code requires a new creation each time to view (#5482) * temp change * change validPin flag when biometrics fails to decrypt * Fixes to Android Google Account Management (#5476) * lots of android account changing fixes * remove log * remove remoteProvider * i18n * test signing key * init (#5507) * fix android pin flow * restore to backup changes * restore changes * fix lint * restoration changes * getprivatekey call changes * smol cleanup on keychain * rm log * fix current backup not being restored into keychain properly * add keychain logging * some backups issues solved * fix some longstanding android old pin decryption and create wallet not prioritizing seed phrases * remove unused lodash import and console logs * final restoration changes * fix backup prompt not working since it wasn't wrapped in the provider * undo commit to nfts query * add login if needed on android * fix no provider modal * rm xcode assets * Update src/components/backup/BackupCloudStep.tsx Co-authored-by: Bruno Barbieri <1247834+brunobar79@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Bruno Barbieri <1247834+brunobar79@users.noreply.github.com> * remove keychain logging stuff * fix lint * fix i18n paths --------- Co-authored-by: Skylar Barrera Co-authored-by: Derek Nelson <6868432+dereknelson@users.noreply.github.com> Co-authored-by: Derek Co-authored-by: Bruno Barbieri <1247834+brunobar79@users.noreply.github.com> --- src/assets/BackedUpCloud.png | Bin 0 -> 3107 bytes src/assets/BackedUpCloud@2x.png | Bin 0 -> 8541 bytes src/assets/BackedUpCloud@3x.png | Bin 0 -> 15560 bytes src/assets/BackupWarning.png | Bin 0 -> 2004 bytes src/assets/BackupWarning@2x.png | Bin 0 -> 4396 bytes src/assets/BackupWarning@3x.png | Bin 0 -> 7266 bytes src/assets/CloudBackupWarning.png | Bin 0 -> 1883 bytes src/assets/CloudBackupWarning@2x.png | Bin 0 -> 4263 bytes src/assets/CloudBackupWarning@3x.png | Bin 0 -> 6989 bytes src/assets/CreateNewWallet.png | Bin 0 -> 2838 bytes src/assets/CreateNewWallet@2x.png | Bin 0 -> 7491 bytes src/assets/CreateNewWallet@3x.png | Bin 0 -> 13884 bytes src/assets/ImportSecretPhraseOrPrivateKey.png | Bin 0 -> 3278 bytes .../ImportSecretPhraseOrPrivateKey@2x.png | Bin 0 -> 8840 bytes .../ImportSecretPhraseOrPrivateKey@3x.png | Bin 0 -> 16364 bytes src/assets/ManuallyBackedUp.png | Bin 0 -> 2978 bytes src/assets/ManuallyBackedUp@2x.png | Bin 0 -> 8011 bytes src/assets/ManuallyBackedUp@3x.png | Bin 0 -> 14979 bytes src/assets/PairHardwareWallet.png | Bin 0 -> 3241 bytes src/assets/PairHardwareWallet@2x.png | Bin 0 -> 8464 bytes src/assets/PairHardwareWallet@3x.png | Bin 0 -> 16029 bytes src/assets/WalletsAndBackup.png | Bin 0 -> 3104 bytes src/assets/WalletsAndBackup@2x.png | Bin 0 -> 8185 bytes src/assets/WalletsAndBackup@3x.png | Bin 0 -> 15145 bytes src/assets/watchWallet.png | Bin 0 -> 3584 bytes src/assets/watchWallet@2x.png | Bin 0 -> 9448 bytes src/assets/watchWallet@3x.png | Bin 0 -> 17426 bytes src/components/PromoSheet.tsx | 1 - src/components/add-wallet/AddWalletList.tsx | 4 +- src/components/add-wallet/AddWalletRow.tsx | 74 +-- .../asset-list/RecyclerAssetList2/index.tsx | 22 +- .../backup/AddWalletToCloudBackupStep.tsx | 123 ++++ .../backup/BackupChooseProviderStep.tsx | 216 +++++++ src/components/backup/BackupCloudStep.js | 307 --------- src/components/backup/BackupCloudStep.tsx | 256 ++++++++ .../backup/BackupConfirmPasswordStep.js | 175 ----- src/components/backup/BackupManualStep.js | 137 ---- src/components/backup/BackupManuallyStep.tsx | 98 +++ src/components/backup/BackupRainbowButton.tsx | 121 ++++ .../BackupRainbowButtonBackground.tsx} | 49 +- src/components/backup/BackupSheet.tsx | 58 ++ .../backup/BackupSheetKeyboardLayout.js | 43 -- .../backup/BackupSheetKeyboardLayout.tsx | 62 ++ ...SheetSection.js => BackupSheetSection.tsx} | 50 +- src/components/backup/ChooseBackupStep.tsx | 235 +++++++ src/components/backup/CloudBackupProvider.tsx | 87 +++ src/components/backup/RestoreCloudStep.tsx | 338 +++++----- src/components/backup/{index.js => index.ts} | 2 - src/components/backup/useCreateBackup.ts | 156 +++++ .../backup/usePasswordValidation.ts | 40 ++ .../{RainbowButton.js => RainbowButton.tsx} | 69 +- .../RainbowButtonBackground.tsx | 164 +++++ .../rainbow-button/RainbowButtonTypes.js | 4 - .../rainbow-button/RainbowButtonTypes.ts | 7 + .../rainbow-button/{index.js => index.ts} | 0 src/components/contacts/ImageAvatar.js | 5 + .../SearchInput/SearchInput.tsx | 6 +- .../UniqueTokenExpandedState.tsx | 1 - .../expanded-state/WalletProfileState.js | 21 +- .../custom-gas/FeesGweiInput.tsx | 2 +- .../swap-settings/MaxToleranceInput.tsx | 4 +- src/components/fields/PasswordField.js | 86 --- src/components/fields/PasswordField.tsx | 78 +++ .../floating-emojis/FloatingEmojis.js | 2 +- src/components/modal/ModalHeaderButton.js | 4 +- src/components/navbar/NavbarItem.tsx | 10 +- .../secret-display/SecretDisplayCard.tsx | 22 +- .../secret-display/SecretDisplaySection.tsx | 189 ++++-- .../secret-display/SeedWordGrid.tsx | 58 +- src/components/sheet/SimpleSheet.tsx | 16 +- .../sheet/{SlackSheet.js => SlackSheet.tsx} | 127 ++-- .../SheetActionButton.tsx | 1 + src/design-system/components/Box/Box.tsx | 5 + src/design-system/components/Stack/Stack.tsx | 8 +- src/design-system/components/Text/Text.tsx | 3 + src/handlers/cloudBackup.ts | 17 +- src/handlers/walletReadyEvents.ts | 27 +- src/helpers/walletBackupStepTypes.ts | 11 +- src/hooks/useCloudBackups.ts | 71 ++ src/hooks/useFeesPanelInputRefs.ts | 4 +- src/hooks/useImportingWallet.ts | 24 +- src/hooks/useMagicAutofocus.ts | 2 +- src/hooks/useManageCloudBackups.ts | 154 ++--- src/hooks/useSendSheetInputRefs.ts | 4 +- src/hooks/useWalletCloudBackup.ts | 55 +- src/hooks/useWallets.ts | 2 +- src/keychain/index.ts | 16 +- src/languages/en_US.json | 130 +++- src/model/backup.ts | 327 ++++++++-- src/model/wallet.ts | 23 +- src/navigation/AddWalletNavigator.tsx | 6 +- src/navigation/Navigation.js | 5 +- src/navigation/RegisterENSNavigator.tsx | 4 +- src/navigation/Routes.android.tsx | 43 +- src/navigation/Routes.ios.tsx | 4 +- src/navigation/config.tsx | 111 ++-- src/navigation/routesNames.ts | 5 +- src/navigation/types.ts | 4 +- src/redux/wallets.ts | 27 +- src/screens/AddWalletSheet.tsx | 182 +++--- src/screens/BackupSheet.js | 199 ------ src/screens/ENSAdditionalRecordsSheet.tsx | 4 +- src/screens/ENSConfirmRegisterSheet.tsx | 1 - src/screens/ExternalLinkWarningSheet.tsx | 4 +- src/screens/LearnWebViewScreen.tsx | 4 +- src/screens/PinAuthenticationScreen.js | 2 +- src/screens/RestoreSheet.js | 29 - src/screens/RestoreSheet.tsx | 49 ++ src/screens/SendConfirmationSheet.tsx | 6 +- src/screens/SettingsSheet/SettingsPages.ts | 4 +- src/screens/SettingsSheet/SettingsSheet.tsx | 153 +++++ .../components/AlreadyBackedUpView.tsx | 203 ------ .../components/AppIconSection.android.tsx | 104 --- .../components/BackupSection.android.tsx | 164 ----- .../components/BackupSection.tsx | 141 ---- .../components/Backups/BackUpMenuButton.tsx | 106 +++ .../components/Backups/SecretWarning.tsx | 150 +++++ .../{ => Backups}/ShowSecretView.tsx | 0 .../components/Backups/ViewCloudBackups.tsx | 158 +++++ .../components/Backups/ViewWalletBackup.tsx | 527 +++++++++++++++ .../components/Backups/WalletsAndBackup.tsx | 610 ++++++++++++++++++ .../components/Backups/routes.ts | 6 + .../components/CurrencySection.android.tsx | 92 --- .../components/DevSection.android.tsx | 446 ------------- .../components/LanguageSection.tsx | 43 +- src/screens/SettingsSheet/components/Menu.tsx | 14 +- .../components/MenuContainer.tsx | 14 +- .../SettingsSheet/components/MenuHeader.tsx | 194 ++++++ .../SettingsSheet/components/MenuItem.tsx | 36 +- .../components/NeedsBackupView.tsx | 132 ---- .../SettingsSheet/components/NetworkSection | 0 .../components/NetworkSection.android.tsx | 83 --- .../NotificationsSection.android.tsx | 466 ------------- .../components/PrivacySection.android.tsx | 118 ---- .../components/SettingsBackupView.android.tsx | 35 - .../components/SettingsBackupView.tsx | 13 - .../components/SettingsSection.tsx | 79 +-- .../components/ShowSecretView.android.tsx | 36 -- .../WalletNotificationsSettings.android.tsx | 283 -------- src/screens/SettingsSheet/constants.ts | 13 + src/screens/SettingsSheet/index.tsx | 203 ------ .../SettingsSheet/useVisibleWallets.ts | 96 +++ src/screens/SettingsSheet/utils.ts | 118 ++++ src/screens/WelcomeScreen/index.tsx | 111 ++-- src/screens/mints/MintSheet.tsx | 1 - src/screens/mints/PoapSheet.tsx | 1 - src/screens/positions/PositionSheet.tsx | 1 - .../TransactionDetails.tsx | 1 - 148 files changed, 5492 insertions(+), 4565 deletions(-) create mode 100644 src/assets/BackedUpCloud.png create mode 100644 src/assets/BackedUpCloud@2x.png create mode 100644 src/assets/BackedUpCloud@3x.png create mode 100644 src/assets/BackupWarning.png create mode 100644 src/assets/BackupWarning@2x.png create mode 100644 src/assets/BackupWarning@3x.png create mode 100644 src/assets/CloudBackupWarning.png create mode 100644 src/assets/CloudBackupWarning@2x.png create mode 100644 src/assets/CloudBackupWarning@3x.png create mode 100644 src/assets/CreateNewWallet.png create mode 100644 src/assets/CreateNewWallet@2x.png create mode 100644 src/assets/CreateNewWallet@3x.png create mode 100644 src/assets/ImportSecretPhraseOrPrivateKey.png create mode 100644 src/assets/ImportSecretPhraseOrPrivateKey@2x.png create mode 100644 src/assets/ImportSecretPhraseOrPrivateKey@3x.png create mode 100644 src/assets/ManuallyBackedUp.png create mode 100644 src/assets/ManuallyBackedUp@2x.png create mode 100644 src/assets/ManuallyBackedUp@3x.png create mode 100644 src/assets/PairHardwareWallet.png create mode 100644 src/assets/PairHardwareWallet@2x.png create mode 100644 src/assets/PairHardwareWallet@3x.png create mode 100644 src/assets/WalletsAndBackup.png create mode 100644 src/assets/WalletsAndBackup@2x.png create mode 100644 src/assets/WalletsAndBackup@3x.png create mode 100644 src/assets/watchWallet.png create mode 100644 src/assets/watchWallet@2x.png create mode 100644 src/assets/watchWallet@3x.png create mode 100644 src/components/backup/AddWalletToCloudBackupStep.tsx create mode 100644 src/components/backup/BackupChooseProviderStep.tsx delete mode 100644 src/components/backup/BackupCloudStep.js create mode 100644 src/components/backup/BackupCloudStep.tsx delete mode 100644 src/components/backup/BackupConfirmPasswordStep.js delete mode 100644 src/components/backup/BackupManualStep.js create mode 100644 src/components/backup/BackupManuallyStep.tsx create mode 100644 src/components/backup/BackupRainbowButton.tsx rename src/components/{buttons/rainbow-button/RainbowButtonBackground.js => backup/BackupRainbowButtonBackground.tsx} (73%) create mode 100644 src/components/backup/BackupSheet.tsx delete mode 100644 src/components/backup/BackupSheetKeyboardLayout.js create mode 100644 src/components/backup/BackupSheetKeyboardLayout.tsx rename src/components/backup/{BackupSheetSection.js => BackupSheetSection.tsx} (59%) create mode 100644 src/components/backup/ChooseBackupStep.tsx create mode 100644 src/components/backup/CloudBackupProvider.tsx rename src/components/backup/{index.js => index.ts} (57%) create mode 100644 src/components/backup/useCreateBackup.ts create mode 100644 src/components/backup/usePasswordValidation.ts rename src/components/buttons/rainbow-button/{RainbowButton.js => RainbowButton.tsx} (69%) create mode 100644 src/components/buttons/rainbow-button/RainbowButtonBackground.tsx delete mode 100644 src/components/buttons/rainbow-button/RainbowButtonTypes.js create mode 100644 src/components/buttons/rainbow-button/RainbowButtonTypes.ts rename src/components/buttons/rainbow-button/{index.js => index.ts} (100%) delete mode 100644 src/components/fields/PasswordField.js create mode 100644 src/components/fields/PasswordField.tsx rename src/components/sheet/{SlackSheet.js => SlackSheet.tsx} (61%) create mode 100644 src/hooks/useCloudBackups.ts delete mode 100644 src/screens/BackupSheet.js delete mode 100644 src/screens/RestoreSheet.js create mode 100644 src/screens/RestoreSheet.tsx create mode 100644 src/screens/SettingsSheet/SettingsSheet.tsx delete mode 100644 src/screens/SettingsSheet/components/AlreadyBackedUpView.tsx delete mode 100644 src/screens/SettingsSheet/components/AppIconSection.android.tsx delete mode 100644 src/screens/SettingsSheet/components/BackupSection.android.tsx delete mode 100644 src/screens/SettingsSheet/components/BackupSection.tsx create mode 100644 src/screens/SettingsSheet/components/Backups/BackUpMenuButton.tsx create mode 100644 src/screens/SettingsSheet/components/Backups/SecretWarning.tsx rename src/screens/SettingsSheet/components/{ => Backups}/ShowSecretView.tsx (100%) create mode 100644 src/screens/SettingsSheet/components/Backups/ViewCloudBackups.tsx create mode 100644 src/screens/SettingsSheet/components/Backups/ViewWalletBackup.tsx create mode 100644 src/screens/SettingsSheet/components/Backups/WalletsAndBackup.tsx create mode 100644 src/screens/SettingsSheet/components/Backups/routes.ts delete mode 100644 src/screens/SettingsSheet/components/CurrencySection.android.tsx delete mode 100644 src/screens/SettingsSheet/components/DevSection.android.tsx create mode 100644 src/screens/SettingsSheet/components/MenuHeader.tsx delete mode 100644 src/screens/SettingsSheet/components/NeedsBackupView.tsx delete mode 100644 src/screens/SettingsSheet/components/NetworkSection delete mode 100644 src/screens/SettingsSheet/components/NetworkSection.android.tsx delete mode 100644 src/screens/SettingsSheet/components/NotificationsSection.android.tsx delete mode 100644 src/screens/SettingsSheet/components/PrivacySection.android.tsx delete mode 100644 src/screens/SettingsSheet/components/SettingsBackupView.android.tsx delete mode 100644 src/screens/SettingsSheet/components/SettingsBackupView.tsx delete mode 100644 src/screens/SettingsSheet/components/ShowSecretView.android.tsx delete mode 100644 src/screens/SettingsSheet/components/WalletNotificationsSettings.android.tsx delete mode 100644 src/screens/SettingsSheet/index.tsx create mode 100644 src/screens/SettingsSheet/useVisibleWallets.ts create mode 100644 src/screens/SettingsSheet/utils.ts diff --git a/src/assets/BackedUpCloud.png b/src/assets/BackedUpCloud.png new file mode 100644 index 0000000000000000000000000000000000000000..10fb59ccd3ae805d67debd577e7277cff5ca92a6 GIT binary patch literal 3107 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 literal 0 HcmV?d00001 diff --git a/src/assets/BackedUpCloud@2x.png b/src/assets/BackedUpCloud@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..559629b79031b1943550b6c933cfe911f0d3b3bd GIT binary patch literal 8541 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 literal 0 HcmV?d00001 diff --git a/src/assets/BackedUpCloud@3x.png b/src/assets/BackedUpCloud@3x.png new file mode 100644 index 0000000000000000000000000000000000000000..f163e91ca3a9f1b25fb19d1e6bec538dce5d006a GIT binary patch literal 15560 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

>K*-scn9}mDAarV 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 literal 0 HcmV?d00001 diff --git a/src/assets/BackupWarning.png b/src/assets/BackupWarning.png new file mode 100644 index 0000000000000000000000000000000000000000..26b2efcec4d2bcd262450f0b3b99e498f583fa4f GIT binary patch literal 2004 zcmV;_2P^oAP)l5afOz4<{(WU-Wp0qI4h2{>BUU8( zP~9+oAJUEHYeU2Po~Um+L-y)N)V4wpDFz{=9^UlJ8A4-YX87cX0^0+OD#<4^kYaKD z^W5(a?4yYReBD-i<)bdMNhbo9lBwoR*VYM{}8(aF6cLI^1WA*2px z6~x^l>sD+J2ZA5deG=1+ojG;;KcVpe((k_IHAMqSA%xVBQULX@Te*2^Ah3(>vq(I? zZOXR?zM%1H$QeXfA5sWHNDZ#juf(QZT2ob4oRf8mCduECThEs^9yQONS%V1Gkb*P< z*}2_{F%m%g7A-0$$_drdBziJDrPlnp#1BOx{>73YA%u|J+@@h;V{1zaH@RK=BeY^Q z(R*8nDwmO88e?-_EqQDcjs6abf(R54Ads1}ny?=5W?O4sR#99!HT(_v_3U#*8$Tc_ zE+JZ+XkR!-bgkFdM+7xiHs_JtFB`60iIF{c48i_`gir~ogIg6Xo|g9!rDJ-byrUGpD-0u8bU~3yfb39etY%O z3Uh6S9w4(CYOk)UAeT!A#=jI~gb-4T?cgrR$||FWKtWc(+z(Vkib4pffp=iDY^J3* z6*EPn_WpH$i_%shHWorw2qQ%xgyiNtkZsjQVk(wT=}L1Ah$qNs4v8xvgpuSBLh4|G z_5;U8!;lv~pa6uBoS2|*Tj*t(R6_TVVHh_pUAM{y!6YGskes~kw;DOnAHT^ z-tTCm3~|@39DUqJCLugyT0LV2wyslW;?K|vln(Ri=&$z@&09d!dN!jqBAtwW$Nr(> zQ3ygvEw+PuKp#GrLm^7r!G_T-Lj%L{~NMY8w|On(@1vZh3V+X9$&%gir~ogZq%MzB{oRN{6`?WM$q}pN43B_ymdn1rS0< z0SF;A7=kfl=N}hq5~YU!vt$>}y7yC5-`%^L?E3_Y!SjUV#JhQwdlT!aYkh;8ON(>D z!Qc||qvO)(Y5MlW>%m5%lgG%fn}b6&<%f@bPoq;V(etK3atI-LxrPr}p5b$c8Ld?_ z3fF3k{H+a{L1aG6?4NG(D{fF%UDuUu^*xtwkUfO(uzSTIgybc1>DyRP)dpX!KT?KrC-(G}7NCW#@0W*^48}BgY!a+%@_T!VO{U;9~wS%zW-KJ<&hJ~#b;;5Bid3~qz1_#gybiD zyesi5B8@X{`@VOIit^r^JL_rl17~Ju&yMKv{2O~DXAlEcEZI-CLI98YqqK%DP+RXlFvSObC) zsD#wPo0eJIn&Z{k=G_LuBf0>Q7dl=6gfLP7LP#xcw{o}zk4F4Tiud$G!(&Tz0U80M z2t3|ZEzbL}cn7*p6GO-#{&hyY&oVe|w~e(NFRU4YzczWei1&2>HmHQa muXIoE0{{R30002M!{dL&}vL%&#%vi>jHEYBOWy_W+>zK(BB1@93Y*{iwmYIrd z2_bt$WXZmbEwT>Zr~do>p4aO>+kNi2=f2N9=e*AoZEUE`#V*7S005V+j^;H0fU1G_ z_u(wyxqC`G5xlT@>sFHZwG#;%%sy7C<|%yG|Em$o{69N=9i_|skE#^^N~|fP`m$scpD*sH*a#g(~K)f zqv7}BA%KAf9NNQKvMViygnW)gz>vlF_x6!+$QyMy)E?b2i>p+1tbhrt^N`KLkpOzL zUtcndKOiJCl|?ud0ie_oWJNWm$;UELrED4AoHyYOD&S|E`szm3Z+audO&^B~L3w~v z;Jbn>rU%VLfr(1goon@Uc|ZjRhbG)=?~p{yw-D~A8@l-8haCa`Cc1KuM0J$P<6mLwG;=cIts!ola{!jTPLlBV{Orgpx&+=qL&!kjn% z-03J@f5{t>Q(N{_rp9}=NkaiMs3;V^K*BthgZYPpBHL(CryGpp^|w1{qsVQ%tH$K? zsxQ%RbZaN=w#z$%VS%s^AWj?xIZ*g-@+v=hCRV%fUA=4eVV63BQ}4vt$X`i&T6!yK zMeMi*4I^tnp#%uWW^@1Go8MWZ64t>?U!PC0l1h zD0e`-5TCVhAtuj=7rM%M_zptKi$E5$_xP?<6IP$sjgCE%$}K8qs#1`(U zxjM(AsOCgKSPcbVO<7jl@dqfQe{Sr?QG3N*)^w&LxIW~N+UULRyuZ;2%a~{wvcU(m z0=H{nla!3V;b0kUtiqwq(6S3!$x~avks|vZ_Z4ESiNBomR0(KBgaTXhXjR?ep@Zjg z-ocAA8Nr;`3(ZI?{7_)CfrCK!0#7gyzsfD-okda4p|GH2jvRD0pZH$4`Q<@jK9h>C z!$wwj%}NS&Q%%=B%nVa2=0LN6lbK$@AfD&ba!t%tW;Pi8$FKV7Wp>>-SMh61^Lwqi z)3jS#|A{^PZ=CLt@FzXTZd!A$9zFDj_{~F&f{Q6E%uSYF)t&)HTNhEXD>Z6Pzs-I3 zLi{s6#|=x!wn|DKIyc*1StJovpH8(K579*V#Tw+zLIJ<#dV+z#R#&kbCqV!s77+c> zNCm*r4lM5;Lel~|+uKuTme+ish;bxnYMBf@&ptjwsw@S{A8P-23Y88uz3!Jdg$nHK zbre=$ksMY z8J&2RHd5u5&{ie582Zl|q`88I33~S19x87A&xFaQm8ua#6T9A{p6m?s3SEE|#2S^;OwE_WWz@RtN5(;?3Am>HFqL`Af&J8K+>7<-U^Z zy4B|N_uC>RMNn#a>qW2N-(O1Gpspb75D=zg^ib!dR;v;G(x5w2(FfYwE9?&`$RZ6a z^dHW-H4{GfUe^zPL?}K}5cxB~(T5(fjTlP1OB2Y2jh_YuNKKoinhD?pto_`Ahtji; zr3V;I446`!O^-vz0kFRS+izHl_seM@Sn02A1UV?9v;?8T+HmMklf!)Xpl4S5lwP{) zYY&R1Supts2+&U_UY8jW-iJ3A>&E*-4LJ(i+Y3i|L%Dm@;A&*d6T`_aWe=LSUdel8 zF7sj~-C=lJm8{gv{}OUIhZbtA3P05s*J3S@P|!ZD!8WpK85UPxcmpNmEes+?w1~+) zC6!da`g^UFxKN%G)`vDN49%fXG;Xo3BE;a{+NY8uFXJbq3JbOK&Fxgs6_d0bh6$dd zj8{?lLVy)O;45eX{1jgbnGj=O2#spJacp&9A=ME>s5&cw4X~83jg{3IyjXpX zzIeRW{~Kk?QfQ|%!Ok!7bE~H^Kl#}?%)KjxM;|HSQR{ssi8-?pM#)tQcV}$559%e1 z!ftV$H%kOq5-d2ux6u3jggBX zyPse7=S=w}Hass@QSNm=Y-K$;dTv+F@x*<&Hkk?B3RxekZ77M+NpG*(>B~f=P8vDy z-&^|T@dROKXXVxl>CdJqukCgo=)JT&HZ(O= z)QW?Lg?X(w*8HHhMfgwK_PMqA5a-rMSpp1(+)=+nqW$O7 z`OJ1iEn$T+1oE?YsE(m5>nmo$7%4>XTscN~cjRi*K#a3!P{4M}95wm} zU(WqqW8hLeNHVkqp7wQlQkLuK&hg8t-VRGzYo8J=TUB{$C3z;#*8+sU@#A8@EF)mg z>z&tth<0nM*RfU{M^1NL(7?GT2i3gA4!LF7(Rr5RK$UzcFYKL^aaD%TNOr(vWZ8$Q zu(B2W#&sWKvrbC*`zyB&?vV%{w*LA4yu#KWR8UnTs@JBj?@mhs1iImOrq^wd?M=7&cYDiMVi&~<4*hw{+|5?(amoS z*wm=4d;QZV$}aoq9%|e0Kg^|Kv|IG>c0t|UFSGV~42WqKA^J_+;8en3vq`AP`l`gH zsRem;V8N!b(srH`_iJ`;d;5>ke+RSl;mC&*rg-rMgrcwC@ zHbD>lVvBjo7h<;fh(fF%tGe0$o)IH^Vs81s$hG41_Ved57^?I3V9Ld%^cR1Qnnb2n zIDC-a9XB15dPK{sf?Ohld+2P>MiJDQQHP$(qxPdUzA+XDULW7C|J@y6!xy#tsQGtL z=s2{^o^nG~LHRP(cjfb(QT^5uK5MrtM}taaX2+jUy%-OI+oMD1A^}Z`3|LpBQbdr7a~HxAdP~ z;I5QL_sP=m%()>=*PEIG;rguxg^d$?x*k9r63nnyi{bgqVz&3B=uZPjHmrxnZZ_qi z9eD|#yrt*ge|p2!z;i>IXH_Gi?+BmGH=;Rl^W&hrYw}U^EJJI4$*)Vp;YeM7(UCDH z-;;pHBhV|<1e_{hV#z)BUz~*6HZBv)vv(O)auN=BM%(TdlQ#e|T_+?Bwf zs@kGX9|$VlY@w|?^16YJA@w&7r(frxu$|jAYy6~$mH6+W4h`}2dtu=Iwkp7VtM)!C z`Hyprv2u~DhdkA@c%d?f14}8<&6=+h++g}gWAKs#hvnC$J%pU}&uS^fJKFGH+jQo_ zhM#QE_*c8cWO@uR70rDNYkO+dCtpn*E}2&ay7`&0QjhAE!m5dBuB}^(d+CgQTI=m1 z&Z4;J6)7sjKTZ!ZUfA5asE5%nP`a`bP z=+&jVUM%03ky}O_WEDhsPDN7f^r*89n*uRTg3_LdZb*G7oUy>|+yxaOljg9_3blGw z2E&S{Z@m{axkmcF`f}kaC{+v%rmyyDi_=Bj8yGXm)*t#N7lxEXn8wAxQdsMw@prfQ zID<_|)!RY%Bp*Q3L75Z#NfMqfGWNyT>BNl+eIK3>@)0dK)VN!TGyn00z2Et1?m=)2 z09ONM+V0L+GOV6e7Q1boPXm()!oO}VT q2CN$&HWf=^G8zfT{_ih>H|rM#-F;G&-I$yIcIe^^HA~g)L;nYM12FFZ literal 0 HcmV?d00001 diff --git a/src/assets/BackupWarning@3x.png b/src/assets/BackupWarning@3x.png new file mode 100644 index 0000000000000000000000000000000000000000..c0653184df548a3ea96ee1ea1cf5050af307194d GIT binary patch literal 7266 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 literal 0 HcmV?d00001 diff --git a/src/assets/CloudBackupWarning.png b/src/assets/CloudBackupWarning.png new file mode 100644 index 0000000000000000000000000000000000000000..049461c7af38e49978f6ba880e3ceeeb3fe3cfc8 GIT binary patch literal 1883 zcmV-h2c-CkP)($28cW!vf5bI#804ivum|B}gEI=k7XyZ?UY zJF~k)00000001xn1Ob$;+~tRPs}v3=f*&DBD5Pzn4n`sZ3^ z!>qkO9Hp_)K@b5#D27Z^?SjKNgqa} z*aoI7f;bbJ#R@DV`$tx#=2jX&zJz6UW;U$p2;8@72|hkx4u9l$(G9-}Dj>h-lc*BS z!lNm}(dl-~ZzuRJS~o;E53o$KppDK>aVYzSmG))pa`qD9;gM#hLciD@i>R zled8}git&bYdl+h>sw!~v7OCSirQMDrH>O$n?dDhN>pv4@x3RxCj>EI6L4m#E=C*B z{;XHB?!N8W3TO(2HElZ4C)cGrHuZSsx5HGqH>e$7I>sw!` z%T_>imuaZ7-|kCmgGlxJ022ryzEpi6QSaELT??d>kt(6g|5T~$V|%AB-TFG2FD(FO z5JG%}se)d%#7HB!a&qWgD6c0Z^Q$z!VNUwt7%+nn;z`+zj&v&C51rjRi2giA^yL?k z^@#jF)yDZVH&XH55HNw+F?S68}39S!T|F9J2220*u~fX!~i~7kq_0BcELr9zns4`IKRIB@S=wLwrrF7 zu9~vHJUFzaY45k6Q?BAc)e{p4AwG2BliweG|Ja_h=lXixp{}Q*w$KyeLk=KITH7S`hx}#R(&pq#$p_!4v7IL!OFTq((2(n% zy)-zu^ZoAQ+qa%L(MyGWpx`3+goqGKEFgsV&<(+YVH6A^c@cY3%NI8~R)gz#x9xdh z2{95J$FB6B?)a_y3>AirDTGX484dR+gb**PAR6~|&W1(TQ_|6W{Aw}5APH7Dro|(K z5L>unnm_qPn}5;E=LD-JqQYx*O8u~TA>F_Hc)|pcM+hMH5JG$fU!?vEI{0lv0(!U(~{ z1VV_Pf;X;`W~$z>5QXat`GUhVVK^tat*eT{4#5yWj9@s%pZtQ&f3H{A@QLall`2Sd zf#gcZRJR8vPzmv63KgN)S8YelGpu!?q&goMK_$eWXE+`lM(KuBQG}7F*$)#q2p;B8 z3GpY2Y=;?sRr);f4Etfj2Vuk%LMR?g)r|;wUM0LD$4#?d2p{GULh(|p$|?8xkiVTL z9Ww=pSK>Y}g%FA-QQ^-kgK@p1qF002ovPDHLkV1kQRfjIyG literal 0 HcmV?d00001 diff --git a/src/assets/CloudBackupWarning@2x.png b/src/assets/CloudBackupWarning@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..f1894f9f5d70a89f43a84f07c4f14148e601d327 GIT binary patch literal 4263 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 literal 0 HcmV?d00001 diff --git a/src/assets/CloudBackupWarning@3x.png b/src/assets/CloudBackupWarning@3x.png new file mode 100644 index 0000000000000000000000000000000000000000..4133d3d62e095895257f0fbb2064c7a1f2e4d45a GIT binary patch literal 6989 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 literal 0 HcmV?d00001 diff --git a/src/assets/CreateNewWallet@2x.png b/src/assets/CreateNewWallet@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..387f14bfa466dbe8ba39b898a67e5cf2e854ace6 GIT binary patch literal 7491 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

QSs8!Xk$iBfg$$-EGqQIn^;CYh>X`%&8PkvQ6 z?7A532cG_q+g{&^4s`!e2N*f^P@C)@cvKiR5a$7Rlm`#JgN2$yE ziD5az6rP^esfYKBT$2ZV@Yr@HhXMvT&@`~9X;|QBd1iKO`PjF9Z=a7r+|bKJgt}lD zN>ms&5OU^BMFCl_3IaUsy}w+w*R!7U|FDPxNCp}3Zc{R8iYJcd>WY__vgEDUm@Jm( z1JTuc0?k2X(=Rqg)2ov%J$~O0-*D^2C*2QWqfbSIrok}Ks4#3GUL3nLe=Qmo5OM)vAkXka<>c{2Z~WBK!(R43KHkF4 zEm7zjWcNTL0hKI4fB~b`0MI*nhS}lly+K<$aNw{ikJRCas%najWV zJB$AWh?tCHs!f(5vmIeTfEX4Ka^}JkbnU90gExT<8|8+#^87yhdGt@KGJ-WVUbL^2;BddDE^`$+9;AhMc-aje}tr zKqw0Utvyx_U1HYX1;L6Ft}XThjG^$FBo4_wEmwC^i6?h`f=>es1Bud4Wu*2F^ek!0 zW1_3!>!ZnIefln;I2XL4Ilxv~rmvc0jOd$pJ68wo{x8F?P!&BCw5euQBxM zgy(&!LG}8nw~l)EkhdoF)UyL1K(T3-_e7cK1;8Bvy?qO^9g3Iu%v0MQTzmSB7p%G+ z@=~PGQI>P+xqYQ+7!e^vO@qKQrIXHGbL`$R5D?>{WQ>?ucuB@f_~^#eDE)RW8Y!$E zsK{hIv`2;QswMg*So)yd1%?woe8WoMPN?j)l5J&;yD>1#W<;P=7X<8LyrKhw$!DK@ z4M-3aBwaQ2__hi8Riy?_#dro}`bU;u%kk*Twgn_*8BG|We>w&{eD?u_Tn{5;P(C1h z^h3`X5hs^C|Kw|4(FcQ+PzDq+FreFAvt zhkRfqb7p4@LU7+m{4qHuBA@)mWKbSjZVNrSyuz4S)S*DO4gh&nz@WaJ$guy)H!fbf z?8}e*>$OvY3m|U%AzqCdG4>cW9TB9xY5lQ!h(8Mi#b?>d)qhvqB6VJlxO#)a16xBe zJU|$uNViR>?EdH+l$VV0NHH>F_#9d)X4zZH7ky+z0MSP0lji^$*a?pTU;myWD-JpB zU0(*}TIiB}pQMz_8h&k{3^O&#HTqCF34+&NwE044^&ggXJE$Z>1S9ah0ZB(>grKt; zMLRhMEg~6X$QeqgG>&KxPFofD- z_G6$X7@7uxDZyLDDv;!?MH1)F(lGFiUjl~dD%PttvH09mKD*(KkOqS|i)dS}amytr zO@l~{OrSkhm+dJqu=2~_@vW5;i}(MyCXjkZn)1+BD`J<*bt&H3D11&n2yHVisWUt| z78Dr<)Rf0XF2fC*fm=Bj3Q#In8^_YQz9^X3?~qTu{Nit|gg6*N*Ej@#Twr9bvQA9_ zA%^^va+q-pEmrrl{}HEsqj-zdc7(jB^lT_48UXdaJsSZ2a|QtZP|6T|8Gj5lP`ZKb zjx+ssrnfvN>a{^nV`MZyp`S+r32ffL)h!}V{}wDx?*GEqd`d`@WldVhc0g&bW$+*OfcI;KWnDwCP-3I>aJ^HcJ(%G;R

GzYvqDjL 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 M07*qoM6N<$f(9lNxc~qF literal 0 HcmV?d00001 diff --git a/src/assets/ImportSecretPhraseOrPrivateKey@2x.png b/src/assets/ImportSecretPhraseOrPrivateKey@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..475ee5bba99b74d4152c319be1d12c8d35d0e77d GIT binary patch literal 8840 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 Y2Z7G{Ra%BM;{X5v07*qoM6N<$f>2SGOaK4? literal 0 HcmV?d00001 diff --git a/src/assets/ManuallyBackedUp@2x.png b/src/assets/ManuallyBackedUp@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..c2a534394872d92c3b913ed520783e2482c6941d GIT binary patch literal 8011 zcmaL6bzGDG_db4)l8_kElA}RINT@005NgaHu{25Gdh3dy$ghUdPtd zl5lTiu5e>_0AS$7KSApHJb!RMg534hl!4k&)-Bu@A_t|%xWCmUP+VFO0|5I^b*Peo z4`?^nzmd%_pg+)mv`dOw+2!-p!2qR+FR{8+A^d0GjUiLF8KZX;uMA%yC3xtdj=)#_ zI+XtPhvr~MbNb3(T+i==k_5?ZkC~I8+qR|=M(1r$MWXd7)OTB z-poE69?p~V->|*AcUHZ;-*Q3&!uj<7`zYs#1%RKuyyvoC1ke0!_R`gj`!j{GDOK# zhsYZ{!?c<%wfMqF07p)o@%EHTz1v2=kn{3(Kc66TX5P(F0geLy9ngkISATKGVlUDy zrN#q4D)E!Zb#}MR$STt5e*C8B$ga}!O?#r|O3T0VYPjb#ukbdabwwdp^nj=g?ln|8 z$f*o?fboVxDm@kK!uZ{HI1{nr!tspq3TRR(16(G?b}gulv`n#y385;|j|@NA>xMmaa=R z9hMudJ2HUc2rlU3$ja&KHFcfROEb4!1@w#aLuO55nw!aVjKA*JU4}-9SV@*nhi*3h zh7u_i*uUH=PZWfs5Hu}VFaN7NtX#|c*2~HFx(;Fn&0eGp{ea_roSRvXjX^`ng-g43 zb4U;Dzl)Lfv}gA@cVUARDd2)u2bv+x)J@tX_FpP`Cvc>#j+>;WT99qD7FBMfUZZo% znfU6eze}h6e1{gZkTA?RAV4wne;bzdIFs&KW@`G(zrB+{$DcpbS^ZuL$ixs@-8C`0 z$(-De`l!a*Kf$453n8mVDcJ5;xf#&G6$ms@a5r1WnFdoS%cDWe`#0hBy=5uwh1CxL zMZzFl1hgtugNBMft?bgz1zNwb+;7wwa@DpKcmyBHR`*eV4)cgjO=pUXTFB?2Kjr>7bU6#${h1pq0Xi&G7xAKO~&HuMlKc*6{}P^j8y@OUErR>Q=UP>bV$kq*`#Qc1ormm!9rOhOB1njs#P~ zq@8+=E(E?J_`=b{cFmc?*l)NMB>66rW=*}^j3ks1q(>^iuvM-0kWQb6|`eTIOh*gvkd%YKCl`hK*+aEOG_95npZ zgeb=t`OdS1(O6Tl&4+gt`lR2{O)RzDsJ;9)V)+a{1C7jy000TR!I3cf9Ctg;f1U1w zlWz&BW!64P6PKz*it9mG*4UzqBb>(4xDIk`j>+!I%AdKd5A0x$8}wiFoKwpkj=%r@ z2RlZUxLkkGjKey7b}@g*u~|;&Kq$!P`TwyJR&irWBM`7Y%s@lQDv$V4Gs`*udG+Pkg%k-eO@njrs7zpGb+Ix) zGyI+9Rnp6l0#B4HJFmn;;y$}i4KD;ne`>v;Y)h~s*G-3iq3YiuY!_-JqZsE2%ha`6wwXkZpnn-G?^ZN*vk+i}!-;}pE!S#Kaq5DJ z|BmpNj`rTrCsK^VVV5pqsMxU{!e+FnBqDS0$w$f!Jg=gKbbu6p4k!}Og@{iXH$N>` zak-t6^q_&gKl-5jZ{>a?TE3oJW#id~(+qSg*hy8bYiB*5|GJydnEEk11~hK_M?nNQ zDuMef)#!w;j7)oEIU5NKTLq6Oep0WW&e+!(|YX7sNl*Q(f24oVJ7D3-mBuwo5 zlaT_itM*?~Xa3MZ3jhU1xT;t#VhCwN(`hdqzZI58stb^)ZHwouczeJqL`G|ty|!eB z>oa_mp!)BLW1dFvA>@*{c+sAr$lYx{Zjj%Xm8YeBvC!X5W%)a8d=|fwsy4Yxyu^ff zZVED;&WU_?CoAE$nYD3vC0N9P0|eZ1jwFUC#aVu>kQ&{q)R>;H1a2Bnd9z!qR59h$ z;?2#b0%iKJ$zIC{$Av}<7UYq7rW|$FB4V08v!dxV?6@wy!hLX#ZvR!T=*x{>W~s4g zlD4aZco1+Qjl;%m^%;Rgsjk0!B~PhIVn(mwt*J302+35gP8zj5CvNLwyL8|GHkVMCij*{1TsT#E-%$>EKRxHND5~Wx_u)Z2&~_rm{ixY>>*H zj`6^s#0GhtsZ6+pJEQ>$v~6Mh&y?~FJh-3B@%#Na?Dbev<4A%>L_M_+O()vQG;hy7 z8;W&`cfAxfUNJYF`&laWQV)yA zGZ(Ux2AKroA=A2Eq1hzdq~_<%QA1TBq5KJihGb=^hi3yeTwmjH!rYId_)G;-yD~H_ zigaA&y=>fp^d;|&ehfj|4+piB3>mq+uN8l+KPzO4_asL|+Q&Dc()->uG>Zv}0*a4u zB~I5e+R11s+9u%N?*6}zQPz4Y##D4=9|iJMd)2!I}{8EXS75JVr|fo?FhZ*iWmrp_}Ml>C+kE9_vm!`fw}?6l~yg zfU(-v)a5!;+(A|06r$8qeDp`!L>Yw)7qt6Xv4yQfWu76j2O_TxO*cxEgBbMK>wp?x ziKTesU9)UP_tI4iyB57d_O5bt#`eb<^0~h^;^n`zdA_4L3*rRns^H;2rjx@tpti-k zuk)D)%Hvtif`)x4tY`MQc9wTdp9%c}+RB>s?4GN#fZ`@v-ZCg$1>5F*qxvVu76pf??C_%JDigH%O{cUr^N-y)w7IoJ;s>7(-1VX7$<1`LoA({O~ z9|xG9y#8D#QuKH9QOH4L&nAW%84<3gI+%;JoBP*8y{{SJMh_M_ z`B+UR)@}XnR52VVm%-y#h)9qAx=E2n+hg_lgsGIT^G}lQ@Zg})GbH&}s{zeSFFSm6 zvVK8ZdQWGoQ;LpaTrLUdg^llJ9Dv&{nkFrkHK^3Vv~lOM1Dl%~;XbGRG=Ws0-w*x- z$^l2AGK*pXBYb>fCe}jfS?nU)zO6{}3>psK;G|SyPz$Yjo&N83)>2HcmZ)E^n@HK; z7$Qg8*gcD;2R|w=Xn4g(cQPHeb1JL{qkfBKbhQ?}i3|68-JlJZTCk)5#-HP(A5m=( zzsP@+C@Si?wQ5EN7lSY56U`8+6 zB`x&Roy$H=-zt7$)mN9wUh42Rv*IB$F@#t3783Pj3ri+QL>|Nf;P{R&ovP>ph=aD` zzWatjHB5^vE*co5605TnDR-=uuKC%HhLewD3xQn8j1%d))1{_uFbfO2_@ra0eMQ|! z)s8^YKNsg(r$CR?h`-IOsp?oRZ%(u~a-UD%@*Y=}JZUoFf4zWipb$MwZ7~WP_1He8 z&P+m-nW>&Z!$4T|Hg`p30n~eG5lY}8VeUF>J;Y60AiICvto7FI{qJx6IhVY8Ld1;M z=`r2K!TF8})L)ICkFvF9oz=z$`+I&# zm~3QeJPLt4?=q_f5Fby z9{pOQ9{vU{uze`6qd@xNlOBY}siiGTvJ}lYmwfm+@4Jct8#EFq$G05qF{f%5bKU>u z?HlySwQ0?wmYuEop03Dj#tt@S+)F$@9sf++Kb}1naCco)f|Y!{YdM-2PA`zHY{MYS z|CZIhNl@=#jP+L7xYJ`!f4)pVCl^>~t;un1|BLPDZ2ntKguvxnJda1}D{Lqrcj|I) z-E!u>;v zC8dOlt8!XXA@>bCxRyuIDu3K|ubH+L< zdHhl@1iIEctwHUpc{7dfj?=!ZwNH$XG54oWQ#I1(D?}_GYSBOH=Wr*;CO6#@czQTr z7jWS;#;wCg8|uLXNCG$r@=iS0`*${$AC2PpqAy(C3oZfohA9o_D!ZtLeXiO#+}A;PeI-#Nw>zfi(91m=fi_sx-r?%XhL8stTL|*xvba^D3%*;a*E;b3=&Phs`(iPFmZRj$H=ykV)RU zvjA;UEM>}kN$R|Oej#aF^0nF-Ov4K}-NeV8>nP-ki&`NzF_ zoO`~fkU^!#G=O9Q3)bM>I>YZ@QN;?1L-@UeqR?&4CXWCWwDoPCKmbK1<_S{fSv)&H-<^7W9T52jHYZ4Fa|!jkUhy zJg~GpIE-1$Uut#xJq<&2diEVMKkel|GV`ppEEYmRU&jh0L*i_9&-s7rP|0Py>Dmh1 z>eso>Io@GUM?AMxF9rs0`c^;EMJ#qSAws+ty(S*$SbGj3*8ENe@z%_1;KDXi?m2_ziaLD z6Zn9};(YssF~`A9io<`)WZ~2B-1EO)YZTZTpE&f|M@vXR@;Fjf~d)ezR zB@Y)Si!&5o|fnNv9sE%9w{IuVRrWF@OezT{?vFc5G2*Jh3&$?fsOg%mRzj*D)pRqeo|*2b5wb|{2v%?|dVVNHt0$%JR10xnJ* z9yAD?V@G3&U>6DRO)p;ja6#z3*G$8xx`Pdqm?5K2COE|y`FX@<*F-zc%)T&k)nA;A zE$TtMvyhF7C?`bA48@Z#vr)&Th^4c%?5NUehRF0+guqS+zD9|>sT$ZzpDA7c-LF%< zcy^c&c)0028X@x(F_EapF<%ucIUqHblHL5;GA4;mntv{80dt5ENp1=q#@6@8uk|0I zb@#&O0ylqk`>Z9+sHDDALR|)yL1cnYf&ZA`bWFWMPtK)YKI(y=&yifVYPgq~P9-EV z%KL>b=Myb#T23cSt~Bylf7H!+PkH-8KA8s`W3{`5(@#Gznoqw3Drgu|l%ZpC9qR|O z=u44ou^U6zE!++qlehw|h`XnbipuZ7o&UXq^@>;t=m=Wn*qXYo|u*%z)0IxDJza?x+xS_@U~xiNfKa( zjYhBJ6>B&ZzkZb*rk9%87wtk*KFubxDH9h*^&NRsuZbIRtbZ#(+4x$gG793_OaNcZ zL+n`n%hdJUBqHlaVURn=#E1ALSx!a?V`o@(%P z^G?ER`)-a`mwVyF6god9r2_g;LEj|k=_co(*OVERjMs=Lo=ek-4{P7;t0yD zc<=Ky?w*EgY#5EFf~P52*)b8vk2+6`F7g61X*j(}Wps{xxAuzjJawBj{H~Pb(&fYF|G}ocAWRfrBF-c~IpbBE3F+YlGeO zWAKYEaVo@7<9X3Eb3%h{Y|G-UFNLZ%Tlg2gtgd!6$L{)BeciCUS}CJmx|kX1lQw=) ziSjT?OF$sqF?$!dxs)Wnb-WskA$?pznid7I`_7NaJopo(Mh|{{;lXkxn9PoMg&2dQ zzc-(aihiB14|e0zEUVzQ_+Tk{pdu51wCOl0iG4tdJBtKoO8hyovoXZLtGaSU-vbS| zK+e&_-q!aGVfJs2wRoO@07^VjbpLG-%0#agR2iv9pCllxZ3ioVWjb4j!0c@{fdD7` zy}zMr6g+%|`fE3+$k^2RkDMJ zWber~cj)jg;I4}Rx6I!RA+QiP)c3P4OlT<9ltn0tkZK<g9**iw)7ghc$j2l6i|p8|~Fs6$=}?|6L9h1efKvjZgtX5G62d zqM#m<#7H*OF=ha#w!IN_k01#rAl@b$ilOop^O_+|M8tMpiPaN=2!LWmd?23Kc{&=^ zca{GbDAr=5SvSMT)(WZmUZ7V|UjL^InWrYDSLDs7%^BIn4wCErV6xkz{y!xyModx} z-CQYVz^lJj6br=$A9n^U4yxe|5$yzlvxg`dnf6{}epV++hF&NQ7wH zl{;zFXmw~Bt7i(G2|m1mQ@3!lU!YV>Y!XiqA3W76w`6M8fe83tRH1ZA8S{z{8HMc01_#1%IMEYb=&ftCfHS3y=(i9ClGXx zn3f0_KuuNr$vqsj7So?r=KvHL@wzM>)|y_yTZ2CHEpFrglV2+*2bbdp|J78mfUSve zQKG{&-hjtv^l1y>Bq30aOCI39@zCf!e^J+EKWYFd!E3e_uZFwDbE2>JT*oB;KLzBr aO9dLFX9(2yH7+**KpmzHtyO*={Qm&a(bfn6 literal 0 HcmV?d00001 diff --git a/src/assets/ManuallyBackedUp@3x.png b/src/assets/ManuallyBackedUp@3x.png new file mode 100644 index 0000000000000000000000000000000000000000..6b34943018ab62df17626916823f94986ebc8867 GIT binary patch literal 14979 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 literal 0 HcmV?d00001 diff --git a/src/assets/PairHardwareWallet@2x.png b/src/assets/PairHardwareWallet@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..57479c7e16e9feef66a768531e4d0e6da5d30ffd GIT binary patch literal 8464 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 X`6F^S0EAgq00000NkvXXu0mjfEZ)g| literal 0 HcmV?d00001 diff --git a/src/assets/WalletsAndBackup.png b/src/assets/WalletsAndBackup.png new file mode 100644 index 0000000000000000000000000000000000000000..ab941378faff4a23c2a0728f96ac53708d1565d4 GIT binary patch literal 3104 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

S22orn6Edp(l`I*+$8G7N`~ zV0zBaf4g}z8>Nqz`mrut3JGqD+V}`P#}~L{>UCeg5u+0597g8qv(@0Dt-W0LLC;_u+k7- zPRxYr)Tz*jj(csU!9JXsQq#aA(fwgNO$^Lhf+stU#7^2Mw6m*8imBB19zXL9P!@Pq z)Gxn9m1_e8s_Cpw8&uWv=1<*y^bJ-5TQdN5L<<4&kHHi!Y(DpPBvY(J{t`3#+oJ&H z>;bLm9SZ@DoNL-6r+eiaaAfmft_gA=w57vd1n|0d)R*(hPyHN(d@KV6hbOZYfr_L9<19w+?_>g+>k*($=YJ5OYBM z>2V`RKt08nPn}Sg8X@H5V1qK2beO)!zQU<0?T9FLQm8LNpu8VQlrdXQdB@~yuuKd0 zfq~L<4$Pcq2{dwT@$7F_=10uh4+cs{z5-$#C4IIkDiur4Th-bOrMyJ#Q>Z^sje`0sTZ5+GZ69!I498^wIJazC~7&skztUtZ14WtKbtWK*e5$MG=T`!g8xe2A?xchE6-|5XK zIC(EI0<|^80->$8Lvf`_#Gw)4tqLDZm0%ofs#ynCfK=y21Wj$r0`YIRD9o%b7SCcx zIn0*QlQa<;A*cNgDyNxeZC{H#5Sts7L#>aB(Y6tLi^?ogk6UfROS45%n#)?}e{PR% zIL6{=OkI7U7Tb9hK&KJu^NWsvigx+;85EBkjm%ALmJP z1G`GQrkOK@pP&_#}Np;*&tKU!HInj4@TbBw`xdPt0VR zySqu=I1cdNj{`iuN#y05?+zOUm@@-9p#!tEiY3d;81f-Zb2imI_z=LVhXFQk6wGu$ zwkUV-!P%@&2Y^)?fwUcOTb){rs1&tG#@?fhOE+2m!h`(j2BRGmIAndI{l{<=;z^4O zD38#wcfEDkJ(Q_yAjA>|{#0J}n0m%U%0nryt|p9fIHdAv>*Gt4RK2reR_B?>2`<&U?i#z4=K4v{jM6bIA;HqB&Y}q9G z=08H7Z`W9`5a5-sgTCllIS?G);6j9-fNi}I$=JpDM!>%bmlJvVd6EWrQ7_fnB|Q0^VTW^jNSG1f0_uOAbvrRjU_J4YR_rhbs7&<9)?Ia{n{npV(i6P`NJf*hw= zr2$JTzB$;KG2Lgf_jBbV;I{xtXo#;Z2Dtcs=!<5~u=~&ZI3NSUmDd4W^0Q0}YzE_e zvZ8tV&$Ilm{&N=I1g&XwKk(n9jw7+HM%GvbtDzV`t9)dv8^ zJgdx)tOB_7B4|xh^N9h@<>Um3{BD7KrHF>}#lfdW_?wSrjlKYxnZ2B;N%4-G@CHPd zjWWME_4Dz*FWe7V4+N8uQT=^Ek)W3*&4+~MUqSM>0VVTmn+FV7g57~?0UpZ$uttI) zFaM^@pW7$1*S$p^xD{>B)3CV)Dcwl%19(ES z8vROa8VHOa5}%}TiNlFC0szK)qrh<4Q1+cFKu~JZ0Yk14+G>TVQ=GN|Eb}<#YqY%R zy>~!=gm!!U@u>NcPNkF-fGhSjcG%u>AwYY~`oIQXb3f@MTYn@V#pRRy-wp z@c?PXI_QQRw`a*x5zc*r8*cPh$;Wd~A3$(TGu5WaNA=o>i6vP@KYAj4IzQ;wT>L&c zqTZEPe77TCN?MkGp14;~2B@{!G^kmle$BB4K^eOnCXg?0K zH5M!@%seegrTpRd4@OIfUvo!CSCW39mWh>!8qky1(rfmmHOX&WHUUqX+STNh(#6=NgF&R6oB>ddgJQMQ}Yk0*jN- z*P~SL?&DSgg(?2M&)&Pkb|J+E`}gtf1Xqg2nbP-cPdhsgj1oBlG}@Px$EKf?06`Hi zeg?ikP*P^USYg?ew`yq+KQG%!y)EOLmx~ZdCxG;(UhxmDswI&ijsoLKT$d-`ytg|P zbaKd7*l2#3(`1p9QGWQB>lgUKR-&UpavGZnt!dq3rcKY5cINQfV?d@lh4vz40`ZU9 zNcjx;42b%;Fk`)Sn`k-MH`WiKbB!shDFz62wi>_23;>;a7$~PNY6}JO=WBM=Srt=j zr#4yn1Q3`jLSIu*9xiVQKyUfT5BoZ_<@XCuY%r2E#N=MG9udIvkAzmV`DxaqCDnnA z$w&{v(i>n`RKID8h0T;mbuF&q7%HI+^7y8$umOTM=B27UcQi3&HN^k{YvSI9YX;!> zRAt(<{;}ocm@q~|BZ>6_R4-5PxE4|fW}9%h8?#N!GyKZUNgOy?_>~98oqXq`Or^@OCHFBPFY=oh+Z*8MW1$tTd(?!LPr^w*2K^qSyCt1p3owZ?V8MI_f=UYrpMnxq zho0Jo>mV!$`{A>?vaK{i3}M4^wWxpi;k#DkSK|lkPxP6NCe6h@GnPuiUYfIhWn$>H zYTE$@M#sXlvo)a;4};dUa*Z>NtkFZ}h_j3oF-OTNn}_pthLhe4tw{kvKT@(8pZ8TT zbz*E${tJw1mRlWiC(DvL#U*DoeJq>ETl-WmcFvij%}s|uS}ac%G|>xc(RAsBA6w4v zJ(Zie$noZKW+%2C%m^@MA+dJJ)PpieB<0(%KYXb9IEPrDys@J)zSxsz(GAWR}*`pCsi z)b5>NGpP+w#FYmw=B42)3modbFk(}r6Avdd@gFw zV-XdnU2BFercl`wsTu{@h7dP?%=~Qj|FUc<@}xOp7wWy4(7JK8*kqUQ{G67(#KSTM zJv#FV4(r1~%_;W}GDDe9Qx^1O*5_WC^L^@v0PeaE;O=ZKe+r5pg}pDIoKOzx?U-*y1W-_Zsj1$P7`p`f)-=7V!6;+F z5L>_0R@>i47)04p-QM_?-@wSU{NoL^ffV@szjz<{L{jma2?T7;6N~e(vvr1)6gG^e zuqIShRhD$yS^_EZj2})rk!#PkAkPB_31i7)HQfWxZdf6*WQ*_Ouewn?BN*-Vd+y%c`P=v@7m0(u}h=feZJ{#V-E&ScRs`-l7G~A^v5~_q+A>1 zvqoG+YGP(m!N3U`$CwS)P0Py~hgkk45=sduvna!Q=sSd1>PN`7nlLtIsoZ>r`hzrLwyU;)$STWQC2uGGt@c^P>-*SR9ZO4AvIyD?IT1j(_f{zRAi&Hb z9| zgz=dlB`b9SDJQ}9p(QfpG%Jb>w&)B1++il$Va_kNJqZJ)2Ugi@2ud-jG2}p4^(YLK z?*Emz8VLerKsZ+vjxQN2RA~j$(jUY+f^35d4UtNXBGwsb*&199+mAZY2opw^{OA+Q zQ=;{jmqYe0Asv&>o|f>1fKqdMs2N?obMm;!7H;p&nDpNDFfh9HKCn$PCWY0ESMDee zik9A;O`Wb`49>=4nM%m*Q8KBbygFplXaw=tNzD@REg1P<28iA`t~l`<%bGaLO(;fC zccKxRP(SLcpz*CwU9Om1Ohl*`CkwDmjh0pbvKgM=x_;lDW0FLMph1~O`AU_+j zwE>zNxjvKFn>NEh=-MCfjxFcQ{^R4yUO=iJxIAZ2`U7lzpqN4>QzrlRKu)0+fY>|^ zcL7w-;`Bi=R>*|=2u;f7R2tx>O&jjglAJ)T7|T<~#ngphcr>SS7Mb?uJ0h|KoCwRw z3~*ct1-2U=GheH9NtZ1KaD4)wqq;Hc`}$j&|N`O!Yn}VL*(k7iY znTVy4000`G6d*xby)L~R;)t9pC##w9Mkg=d2$e-*S_Y z;;8vI|1VW15HhBgzaphoLYl2J@TaCGG)(!x!1Bc0Pq^}7=!Ejcv#(rg+E#=P__$r3 zuPIz`F?2@PTqJ&Ww!|+8rQM~9xY=VE+?YtZezDg``3+=*O#!eRB)Bazi%z*z6+0)QBU3RJiV1hpqh9nEvB8AdT`fW7hfQx zxRNlEo%N@eMN8tWHdM|6YG;{{FD#%22r-9R?=D6xGvw3b0AIaFe67}&F8wvYFYbYo z{cV{j5WZe@Z3c#4LTh>?1M`p0veT5UPwbx6c;q=|a- zpAO;2cRqDR%}As9!c(s`#r)tn)}+46O#MjK{{eekSLXn(y^AY3@n?+>E;Drx&NDNWHCY(8kWI`awVSb>f?Rx z&|pP=UHxF%hNqvnV(N@pFBJ+wZ1Bnjdzz-~b&)v@o-})j*(MYL5*C*3Kx-QLtuuP> zO5R$2=+{60S{(ZI#)IksaeuZTcHS*w;S6Lu1;cTTkTNZ#%nqh4ibD)~rfz-&DE5XkSj zi!|{GE#UGewqD>oU0*ncs_M1^Q;bH)2?KEqq*Y3Ih|>yIe0 zNN?*2ZIPGBrGI|D(RB|2oSgySx(9@VY}I$#E!T*c&3dZR;&MT2PZ@c9BjDL&Z;bivUisM4QKCbB>Nlg5lm5K^ZYzbmeFBZPlbny6SjMjN!695fjS6S9>|Mn zIS#%w-j-XgC(R~L-=Gfvm1#i!ejzjt3gnT$yp>LYs|x2@AXTSZqXZf0gMQWIQI@`L zbMO0OpZ?XyfO#MC&yC0afhX*{x?yixth3x!by15p$&+7%7vJ%d3vxY>lKvb@=Lt)K z^i-(aa!TsdZ0jk?GRpc;VbdkUuWro6HVbn{Gx!>KXYQ>d>)LJ0Cs+7QIOWi%WO>^N zCCAuohBIyJa?Zn2=_!K#@{G?MiP<7ldy-W8xr-k=9sHUAJZV0rhlsi{ID|AZ!%W%7oJxJL zpT{;@ggdFaK4bXcsGPW$Ie8j^<*}p7kgP$z$mL^RFJpW1A#iU+oP9q)iJfPrMCE8v zT>1CM`LooYZOZQvRC-q9oW*NgZQv7zZ78N5MwE#LLe;CsnzD82F@5X0|8~|}Z`!hT z(-okZUanl4wE;AUGRIq(M$py_9${L(EtI(!@#og%cj8D_mpQe0l$bV3lAi&yG-y`~ z@ODE|UiIUGk&iK9l0vQvq)IKB<6GQ?wft}0Cc5CGKYW0%BsZ4U5#+Hon^9Yhz&r1U z@#|Efx9kmzzx%nO02SvL0a-E>_4+gC74;siZ<)b1hx}kbPuMACekrn|C*KXGu z0l`}6@{J2aAgll=9}^#^#l%=nXTT7Cu=?5znHJF|6RCdBxpnpF>-P8{+|ICW@Pd)l&_02w+U-K0ngU!@r3sR;%N-ND^wp?&$ z)Z%u=T&994M~p#{*Vh98ZMt#OBk1I^zEph|XeB=Y%6Tq8gAOqUw1z1!j@IEvIPz-& zj6!p)d20Nuk6uz}1NR*Ug&b4^#4QsNq*dgt)74%hYLG_|rwKw2rzmsbm0$c;kJ9yo zgzVGJVu?q+(?WXbM$t1*M~=n_42+u=B~t{-%&*jyC5hcO9EK;STuE|EM)UeHJd9vz z7Y`!`nOre6dCFNnK_XASE8=X%$T-O3Jz8<@;)lNlo+s(VW0{#6rq|_J)b#;hbx3V` z(?Ln{t6yKZ{;|h@_c@Zw_xUd2LK}$FM)YpfRGyRSsvj=U<>73=wL@7lgUx)dg67Uf zk%kU)Lp8MB_Dg?yu%>+rXe^8#kdX%<6qfo%J4gVg%0ED`W{$*>w574!|LEp3KK|1s zN*fSVyi1lA%JUJ`#2Zl)Ahbaq)s&&YpRY`*&S$>*`xk88y6NUr=xI?%no5Q@u-K|? ztubgG^=!UVy=Z6$n6kt;G7W2(EJi|GcN^%>)f`+?Sd4E;b$^_gCUE;I*49|Q)(k=e zTi+eX6R)4x)ce8Vr{DN}sDGDkS}a(qs1+cZ00H~xFy?{O<$LQ~bK8G?oFH8fTm$G| z&_Ow&grp_C(g5I_K2^>)XKqsob&%zp6)z>==bTN;1g{@!MaWM8dV4&tS@^7W|_i5J7RRD1qA@N*sE^(fn{q*yIbGJCidaLQ;cpy%` zD2h0-c9nRM_NMqa|FNgGerx`j*IoeO_ZCX4d(Qy%eB`G4URdxY_UkM+L0w1+gvz>- zf~v}#clGDa=%wQ;NNl^1?+i64L}6ss1{z?fM$iDsI^u;KW&+MYjtJNJoUt7SRm{!n zaQloiukH>5<(>XYrj1kAI}YDf-FL#z$5CZaf3_*hj`v{2M}Knn84zY<2&C0f3;^ot zRizaaYZ@u4LmAejAp}L575C+%r(a!f#iRFanKm;0%EM;=-X9ME?xwa{7iTGe`S3=W zLB%$0LSq`~bhAxc@Sid>)E|I;p2*U5StzIJkyAL&GMT_r*Yl*n_vFY91F|@l+X3>l z#S+l>Ne5{{P+H2bN@I=#diwa{x@Oy9Rk_@f&M0en9R2Bf}r+}tT1~wNaeOH zJKO=9{(8+b1_hdg*9E&Qc*bC9N}1*D0|IFr7&0}B|Kh>b?|bJ3i`7|0KBlf?beEcf zB8DpKbuoR~R$bLSl+Z&6J=7xp`Sag#^CM3@^aZtoT#(f2mWc#VnoiYaFf@t~Hr+gi zSJWKmm@(+wfrMUZCdaA65ofg*3ac@={rcK;W{E<+gZj;b%tv_O$)`X6>a%Zf&oPaa z@G$@(=L%5IbB)2$)JJGC0IH}H!{ni~x_WfVfBybiYc@P`rgDT+PlKuE2kBUYa;$}O zodQ1r!)12Pa5B!B%e@1)K6%?Clf)cTFMvFG?v$uTxH~p;CAUppN2hDU(Tq#_1}oQZ zIrGqez3f{M$N0W?TU8DM`Bia62o0%?v)mYMHTArby(Z81XVH89)UH|ZzYSu_F zH&~iMT=fCKq<}$k;~r;ta+p`0%AkAZAJiyHb_78|7$$BA0{591Xv6!{#$)|I<&-g!p$uk>%X>0Gjh$EMPRX0Rq-^ zT-7O6l#R)wigKkgfA+PPol$6pA^}NHlQL}}cuQynwdf{3_L1NJ%hr%DP~{&upgK&6 zNmEzCCW_cg4ZRO8{tu$#EW*kDew7E_{9 zOQ^5F<&ljD*0%>M*XJPk(V0-s#33+*D2CyEZ8Zf-iP~y}*p90nK-G=74=;4{wNmEf zuP-=b^@devmNFC{K=E75#ko`^uq5hu3C&o6Qh_4P8jmUy(ww^>~|3nO1=Wy{;caI zTAN7oO@5xrG=b7WdTl}eGN#NYcBH#_AhIvxJQv$2R;=52=DgD{JOk>PI|K?Jh2C8( z7()EQsg7U!UQmOGK~T+Ah5L~twJ+jr85mYP`Op{S9x_yXn)6SZNZWw&Gb2cx;gBd$ zNQsM_F|}C&mV{0vQ#xC+&6k;$lqdNUtkU*Rq^3!TF)?c9SDhiE1q@*tsUa53tA3wA z{#=s{z(NUX=U3+IiDuNm)eC6ii?ll)ee!SToPNO>&ijddSFu1Lh-2)g3||Y#rVDCS zo%!;x!PQqc^aq|WK+V{GaQnHpA2>Gm%0p&8=lEevW~dYL3OP(*tuvt5kEDML6#xu; z^u8Z93U%P5E(?cLS9DvcByIy#?y4=ckWtp(reGX>>63z6-2d6R#V0YikLQi0Z8G)XuqQL zmR@?#zux@o_k8Hm8chia17GF*4roU(w#r-u;We zp1u35zb+00D-H$&n356=Wx~`P0G1yVmb(f$BW6ZZQn=RQr)x7q3iV-E{2(s5GJ*MO zgnIy2QCF7hH8l$j6-|st=svPP#-0k%gW-XN3>+mC4DNsa{w;2rNWRsO93mGuE;{M z!AVcefVM*HJ5g=QN~oJxGM$+-XaHClV#`nGp z-7~);UwVk~-Fi*ZqiG_5z~fj`Hw1v#F*E@~k$>_1KVC7COu6c?nTO7pJ~Zw5xrZpt zBV?QLkUQaMC8J?L(=sTNKnoKIL%_(AKK#W<})p-SYxAeyEzIy3H zUp(Rbi`)-tLJXf)e^_c6`F#f4Im&k|EfQ_@GXar9r{<( zAklyr7AJ6{K8V+5U}5qICIrKn{J`9v0)}B+1uEuS81T4$gXbV%$>60r?o~POU;!u# z_0}(W@`LENm-dmo_m^(5~@4nwW$WpG=+e8YyX|HT!Tf8+y~UvaZ8P%pUw;=tl7 zAJYy%H5go~%4;O#yU++#ZDB<`77SJCO{9L4JRLvv=u>9D`;b3;%bcnEzIiGR&o1_* zGE+uNc`>7eO6of1kJc1oHiwx>V9n+LD2-vy7>WLH^R`}&Nza%u~b5_JKDezgJ*hcp6Di(%{#b0-z` zpdwz-;uF93mLoHhX*j{zlHoN&dwx?O3-l1so$9pBB>*rCPj-6(G+=y^vgsq4pUVA% zF`qVU-TbRn8`od?=^KA`Ap-zFGa!W0n}P%ac~w_8?2CueqG+Ol;KrMPp^jPm)eKc_ zTjM(WxX(TRgn0|!z1NiK#|#f8vyJV|7~G!c7ogBT2I2rmOMPYkTTHGTU6N(dFZGo# zA?o+2w|@1;^%vc?df8QP{9*q4Rng4P!)+M7D!r~xaKa%V)G>TxKy(3wx^}Q84QtY3 z0N}=}(wnALjR$`Gs((Fh!M^j~JUV6CF~dm)iVzq=06|xy7$?}788RR!e3TwDn?#w+ z_}TF2#M-1c{`u~NECTCC*vg#p@YgR1me>Iw*T?O{Z`3LFT{!O;&G z>cYM&oVDQ87rg9QM;yEV?lX_sW6G506~J(qyfkwpnYrXE@M&601L!H%OzMxX->_}d ztq*Tpcgszy9=P?rSDt@27^-7FUs@MHs7k9E2ftQ@eeqCQG;J>+xM>)X))ovgX)$dA zR0EKKop9WY|bK~30q4W+3#!cL$O>e|GL zcpVt(n6WM6H`NApUZ^JeF13FfDHkK^LU9$cAVO1D4x z@P;2Pxn(_+i5i4sq;ee)nlgQpzJ22bPuLgd=~V!!rHKZDFCS~dKIV&&*0I2V$h^8S z0mR>%uT0EKq?)u4Gj$DwCi$U$0jjk^OguKPmik>#>Vjj1ePc2LS|#Xa^uX_AWrsH+2aFPU@w01qPo+sO!IqC=kYqa0X#`HOTER_g0*0zKReH=gnu4dzi*Ok#w!AOBDjaj|DqNLT zb*&2f;%;6WVdtem0%1@-L+sTJQ$%{*i>e|YL)6u;0z?%6nu5Ts*99nI+N`=(g(sXQ zN+UEek=!(lNUPHnZd%<#_tg(ctC$x^5&7<4Ogl{h(Jv6H(%ihN{@k#SCKMQh20|D9 zf*X%v`nvpBl}ZiMs$O&zgU5`cZY;6dz>UW;dJ`~Jm8%L@r8UWKOcUuNG}Q`jdYvtg zE%SWjg173WhU%(tKY*wLKvQkt)@urcCiTG+h8Fn~MiT)9MQx@$yYe5J_5r*DL;S0# ziDYW34JhKTuFp`vF~H~-5WXu!j-{?n6%7O^6A6Tz+A?Mc5dApQvD!gVhyi^J<161U zg}@QR{JyjdID0K$X@n6U2hRjW?0v{Yd<#0->(Xgn?#92STV^TPM0nnoBV+ zu?`Gvs7gb`^iM7F`$==dzIZ6DNq(oaJ%Nx@KeIZqYY$jarr)$SRK?i7atO^qz~gPS zL|s~J*cXqX2?aq;+ZzZu4N5cccoP$=OKKwZIOA~u#QF+dXot3Co5VxF4%L|u+7W=D zs4XDsm^#LcigCQ#Qmo{6%Qj&aAA@xrjsaRI9!lF`Xh#AG$1I#migF6e2~(=>laKd(z*nOFWw|=hoc=42>niJ_Tx*$l#R`6Ql=^O z3xvA-Hnu<1v=4oh8942z8X>3c4G1^hv~E9C=THI+9t>^bb?H8uD08xsc4X6toNG*- zm^5E{Q>O0v7JF-ULG!fb%Hm#qwnovJr2&Gpscw11#=J7Hy z8gD{rX8{5y>^MJ0Ys6}nsT1@hX&SZY zvk7$xiddjjm5Y_^s>}`t07W~aM#!mOQ>jf}n|22E;@ddV6Omp=lR)U0nwl59URQZt zIn-RLhQd`u9p|+LS*Yv|%lw>nia|zF7jydkc?Di+vtLPQ>7tI)-UyI^6+Q3OVTq52%KC{bS3S!_wyW-iM7j^Kp}dj0>MXv-cj1N zeHWyIV8~~L)UTpRAcX0e@@$@wjPKGU5bDV%jdz9THVFVmlR#)rK6`mb@D1urn`gA? zQ%93Pm>6 { return ( }> - {items.map((item: AddWalletItem) => ( - + {items.map((item: AddWalletItem, index: number) => ( + ))} ); diff --git a/src/components/add-wallet/AddWalletRow.tsx b/src/components/add-wallet/AddWalletRow.tsx index 81d476899cb..307453d8d71 100644 --- a/src/components/add-wallet/AddWalletRow.tsx +++ b/src/components/add-wallet/AddWalletRow.tsx @@ -1,28 +1,14 @@ +import React from 'react'; +import { ImageSourcePropType } from 'react-native'; + import { Box, Stack, Text, useForegroundColor } from '@/design-system'; -import { IS_ANDROID, IS_TEST } from '@/env'; import styled from '@/styled-thing'; -import { useTheme } from '@/theme'; -import React from 'react'; -import { GradientText, Text as RNText } from '../text'; import { Icon } from '../icons'; -import ConditionalWrap from 'conditional-wrap'; import { deviceUtils } from '@/utils'; import { ButtonPressAnimation } from '../animations'; - -const RainbowText = styled(GradientText).attrs(({ theme: { colors } }: any) => ({ - angle: false, - colors: colors.gradients.rainbow, - end: { x: 0, y: 0.5 }, - start: { x: 1, y: 0.5 }, - steps: [0, 0.774321, 1], -}))({}); - -const TextIcon = styled(RNText).attrs({ - size: 29, - weight: 'medium', -})({ - marginVertical: IS_ANDROID ? -10 : 0, -}); +import { ImgixImage } from '../images'; +import { Source } from 'react-native-fast-image'; +import { TextColor } from '@/design-system/color/palettes'; const CaretIcon = styled(Icon).attrs(({ color }: { color: string }) => ({ name: 'caret', @@ -34,7 +20,8 @@ const CaretIcon = styled(Icon).attrs(({ color }: { color: string }) => ({ export type AddWalletItem = { title: string; description: string; - icon: string; + descriptionColor?: TextColor; + icon: string | ImageSourcePropType; iconColor?: string; testID?: string; onPress: () => void; @@ -46,19 +33,17 @@ type AddWalletRowProps = { }; export const AddWalletRow = ({ content, totalHorizontalInset }: AddWalletRowProps) => { - const { colors } = useTheme(); const labelQuaternary = useForegroundColor('labelQuaternary'); - const { title, description, icon, iconColor, testID, onPress } = content; + const { title, description, icon, descriptionColor, testID, onPress } = content; // device width - 2 * total horizontal inset from device boundaries - caret column width (30) const contentWidth = deviceUtils.dimensions.width - 2 * totalHorizontalInset - 30; - const shouldUseRainbowText = !iconColor && !(IS_ANDROID && IS_TEST); + const size = 64; return ( - - {children}} - > - {icon} - - ( - - - {children} - - - )} - > - - {title} - - - + + + + {title} + + {description} diff --git a/src/components/asset-list/RecyclerAssetList2/index.tsx b/src/components/asset-list/RecyclerAssetList2/index.tsx index cc27e52e3b7..69fb257fb5c 100644 --- a/src/components/asset-list/RecyclerAssetList2/index.tsx +++ b/src/components/asset-list/RecyclerAssetList2/index.tsx @@ -193,23 +193,6 @@ function NavbarOverlay({ accentColor, position }: { accentColor?: string; positi [handlePressConnectedApps, handlePressQRCode, handlePressSettings] ); - const handlePressMenuItemAndroid = React.useCallback( - (buttonIndex: number) => { - switch (buttonIndex) { - case 0: - handlePressSettings(); - break; - case 1: - handlePressQRCode(); - break; - case 2: - handlePressConnectedApps(); - break; - } - }, - [handlePressConnectedApps, handlePressQRCode, handlePressSettings] - ); - return ( item?.actionTitle)} cancelButtonIndex={menuConfig.menuItems.length - 1} - onPressActionSheet={handlePressMenuItemAndroid} + onPressActionSheet={(buttonIndex: number) => { + handlePressMenuItem({ nativeEvent: { actionKey: menuConfig.menuItems[buttonIndex]?.actionKey } }); + }} > diff --git a/src/components/backup/AddWalletToCloudBackupStep.tsx b/src/components/backup/AddWalletToCloudBackupStep.tsx new file mode 100644 index 00000000000..62f92a99e2f --- /dev/null +++ b/src/components/backup/AddWalletToCloudBackupStep.tsx @@ -0,0 +1,123 @@ +import React, { useCallback } from 'react'; +import { Bleed, Box, Inline, Inset, Separator, Stack, Text } from '@/design-system'; +import * as lang from '@/languages'; +import { ImgixImage } from '../images'; +import WalletsAndBackupIcon from '@/assets/WalletsAndBackup.png'; +import { Source } from 'react-native-fast-image'; +import { cloudPlatform } from '@/utils/platform'; +import { ButtonPressAnimation } from '../animations'; +import Routes from '@/navigation/routesNames'; +import { useNavigation } from '@/navigation'; +import { useWallets } from '@/hooks'; +import { WalletCountPerType, useVisibleWallets } from '@/screens/SettingsSheet/useVisibleWallets'; +import { format } from 'date-fns'; +import { useCreateBackup } from './useCreateBackup'; +import { login } from '@/handlers/cloudBackup'; + +const imageSize = 72; + +export default function AddWalletToCloudBackupStep() { + const { goBack } = useNavigation(); + const { wallets, selectedWallet } = useWallets(); + + const walletTypeCount: WalletCountPerType = { + phrase: 0, + privateKey: 0, + }; + + const { lastBackupDate } = useVisibleWallets({ wallets, walletTypeCount }); + + const { onSubmit } = useCreateBackup({ + walletId: selectedWallet.id, + navigateToRoute: { + route: Routes.SETTINGS_SHEET, + params: { + screen: Routes.SETTINGS_SECTION_BACKUP, + }, + }, + }); + + const potentiallyLoginAndSubmit = useCallback(async () => { + await login(); + return onSubmit({}); + }, [onSubmit]); + + const onMaybeLater = useCallback(() => goBack(), [goBack]); + + return ( + + + + + + {lang.t(lang.l.back_up.cloud.add_wallet_to_cloud_backups)} + + + + + + + + + potentiallyLoginAndSubmit().then(success => success && goBack())}> + + + + + 􀎽{' '} + {lang.t(lang.l.back_up.cloud.back_to_cloud_platform_now, { + cloudPlatform, + })} + + + + + + + + + + + + + + + + {lang.t(lang.l.back_up.cloud.mayber_later)} + + + + + + + + + + + {lastBackupDate && ( + + + + + {lang.t(lang.l.back_up.cloud.latest_backup, { + date: format(lastBackupDate, "M/d/yy 'at' h:mm a"), + })} + + + + + )} + + ); +} diff --git a/src/components/backup/BackupChooseProviderStep.tsx b/src/components/backup/BackupChooseProviderStep.tsx new file mode 100644 index 00000000000..da9520335df --- /dev/null +++ b/src/components/backup/BackupChooseProviderStep.tsx @@ -0,0 +1,216 @@ +import React from 'react'; +import { useCreateBackup } from '@/components/backup/useCreateBackup'; +import { Bleed, Box, Inline, Inset, Separator, Stack, Text } from '@/design-system'; +import * as lang from '@/languages'; +import { ImgixImage } from '../images'; +import WalletsAndBackupIcon from '@/assets/WalletsAndBackup.png'; +import ManuallyBackedUpIcon from '@/assets/ManuallyBackedUp.png'; +import Caret from '@/assets/family-dropdown-arrow.png'; +import { Source } from 'react-native-fast-image'; +import { cloudPlatform } from '@/utils/platform'; +import { useTheme } from '@/theme'; +import { ButtonPressAnimation } from '../animations'; +import { useNavigation } from '@/navigation'; +import Routes from '@/navigation/routesNames'; +import { SETTINGS_BACKUP_ROUTES } from '@/screens/SettingsSheet/components/Backups/routes'; +import { useWallets } from '@/hooks'; +import walletTypes from '@/helpers/walletTypes'; +import walletBackupTypes from '@/helpers/walletBackupTypes'; +import { IS_ANDROID } from '@/env'; +import { GoogleDriveUserData, getGoogleAccountUserData, isCloudBackupAvailable, login } from '@/handlers/cloudBackup'; +import { WrappedAlert as Alert } from '@/helpers/alert'; +import { RainbowError, logger } from '@/logger'; +import { Linking } from 'react-native'; + +const imageSize = 72; + +export default function BackupSheetSectionNoProvider() { + const { colors } = useTheme(); + const { navigate, goBack } = useNavigation(); + const { selectedWallet } = useWallets(); + + const { onSubmit, loading } = useCreateBackup({ + walletId: selectedWallet.id, + navigateToRoute: { + route: Routes.SETTINGS_SHEET, + params: { + screen: Routes.SETTINGS_SECTION_BACKUP, + }, + }, + }); + + const onCloudBackup = async () => { + if (loading !== 'none') { + return; + } + // NOTE: On Android we need to make sure the user is signed into a Google account before trying to backup + // otherwise we'll fake backup and it's confusing... + if (IS_ANDROID) { + try { + await login(); + getGoogleAccountUserData().then((accountDetails: GoogleDriveUserData | undefined) => { + if (!accountDetails) { + Alert.alert(lang.t(lang.l.back_up.errors.no_account_found)); + return; + } + }); + } catch (e) { + Alert.alert(lang.t(lang.l.back_up.errors.no_account_found)); + logger.error(e as RainbowError); + } + } else { + const isAvailable = await isCloudBackupAvailable(); + if (!isAvailable) { + Alert.alert( + lang.t(lang.l.modal.back_up.alerts.cloud_not_enabled.label), + lang.t(lang.l.modal.back_up.alerts.cloud_not_enabled.description), + [ + { + onPress: () => { + Linking.openURL('https://support.apple.com/en-us/HT204025'); + }, + text: lang.t(lang.l.modal.back_up.alerts.cloud_not_enabled.show_me), + }, + { + style: 'cancel', + text: lang.t(lang.l.modal.back_up.alerts.cloud_not_enabled.no_thanks), + }, + ] + ); + return; + } + } + + onSubmit({}); + }; + + const onManualBackup = async () => { + const title = + selectedWallet?.imported && selectedWallet.type === walletTypes.privateKey ? selectedWallet.addresses[0].label : selectedWallet.name; + + goBack(); + navigate(Routes.SETTINGS_SHEET, { + screen: SETTINGS_BACKUP_ROUTES.SECRET_WARNING, + params: { + isBackingUp: true, + title, + backupType: walletBackupTypes.manual, + walletId: selectedWallet.id, + }, + }); + }; + + return ( + + + + {lang.t(lang.l.back_up.cloud.how_would_you_like_to_backup)} + + + + + + + + {/* replace this with BackUpMenuButton */} + + + + + + + + + + + {lang.t(lang.l.back_up.cloud.cloud_backup)} + + + + {lang.t(lang.l.back_up.cloud.recommended_for_beginners)} + {' '} + {lang.t(lang.l.back_up.cloud.choose_backup_cloud_description, { + cloudPlatform, + })} + + + + + + + + + + + + + + + + + + + + + + + + + + + + {lang.t(lang.l.back_up.cloud.manual_backup)} + + + {lang.t(lang.l.back_up.cloud.choose_backup_manual_description)} + + + + + + + + + + + + + + ); +} diff --git a/src/components/backup/BackupCloudStep.js b/src/components/backup/BackupCloudStep.js deleted file mode 100644 index 1b5a94c3145..00000000000 --- a/src/components/backup/BackupCloudStep.js +++ /dev/null @@ -1,307 +0,0 @@ -import { useRoute } from '@react-navigation/native'; -import { captureMessage } from '@sentry/react-native'; -import * as lang from '@/languages'; -import React, { useCallback, useEffect, useRef, useState } from 'react'; -import { InteractionManager, Keyboard } from 'react-native'; -import { passwordStrength } from 'check-password-strength'; -import { isSamsungGalaxy } from '../../helpers/samsung'; -import { saveBackupPassword } from '../../model/backup'; -import { cloudPlatform } from '../../utils/platform'; -import { DelayedAlert } from '../alerts'; -import { PasswordField } from '../fields'; -import { Centered, ColumnWithMargins } from '../layout'; -import { GradientText, Text } from '../text'; -import BackupSheetKeyboardLayout from './BackupSheetKeyboardLayout'; -import { analytics } from '@/analytics'; -import { cloudBackupPasswordMinLength, isCloudBackupPasswordValid } from '@/handlers/cloudBackup'; -import showWalletErrorAlert from '@/helpers/support'; -import { useDimensions, useMagicAutofocus, useRouteExistsInNavigationState, useWalletCloudBackup, useWallets } from '@/hooks'; -import { useNavigation } from '@/navigation'; -import Routes from '@/navigation/routesNames'; -import styled from '@/styled-thing'; -import { padding } from '@/styles'; -import logger from '@/utils/logger'; - -const DescriptionText = styled(Text).attrs(({ isTinyPhone, theme: { colors } }) => ({ - align: 'center', - color: colors.alpha(colors.blueGreyDark, 0.5), - lineHeight: 'looser', - size: isTinyPhone ? 'lmedium' : 'large', -}))({}); - -const ImportantText = styled(DescriptionText).attrs(({ theme: { colors } }) => ({ - color: colors.alpha(colors.blueGreyDark, 0.6), - weight: 'medium', -}))({}); - -const Masthead = styled(Centered).attrs({ - direction: 'column', -})(({ isTallPhone, isTinyPhone }) => ({ - ...padding.object(isTinyPhone ? 0 : 9, isTinyPhone ? 10 : 50, isTallPhone ? 39 : 19), - flexShrink: 0, -})); - -const MastheadIcon = styled(GradientText).attrs(({ theme: { colors } }) => ({ - align: 'center', - angle: false, - colors: colors.gradients.rainbow, - end: { x: 0, y: 0.5 }, - size: 43, - start: { x: 1, y: 0.5 }, - steps: [0, 0.774321, 1], - weight: 'medium', -}))({}); - -const Title = styled(Text).attrs(({ isTinyPhone }) => ({ - size: isTinyPhone ? 'large' : 'big', - weight: 'bold', -}))(({ isTinyPhone }) => ({ - ...(isTinyPhone ? padding.object(0) : padding.object(15, 0, 12)), -})); - -const samsungGalaxy = (android && isSamsungGalaxy()) || false; - -export default function BackupCloudStep() { - const { isTallPhone, isTinyPhone } = useDimensions(); - const currentlyFocusedInput = useRef(); - const { goBack } = useNavigation(); - const { params } = useRoute(); - const walletCloudBackup = useWalletCloudBackup(); - const { selectedWallet, isDamaged } = useWallets(); - const [validPassword, setValidPassword] = useState(false); - const [isKeyboardOpen, setIsKeyboardOpen] = useState(false); - const [passwordFocused, setPasswordFocused] = useState(true); - const [password, setPassword] = useState(''); - const [confirmPassword, setConfirmPassword] = useState(''); - const { navigate } = useNavigation(); - const keyboardShowListener = useRef(null); - const keyboardHideListener = useRef(null); - - useEffect(() => { - const keyboardDidShow = () => { - setIsKeyboardOpen(true); - }; - - const keyboardDidHide = () => { - setIsKeyboardOpen(false); - }; - keyboardShowListener.current = Keyboard.addListener('keyboardDidShow', keyboardDidShow); - keyboardHideListener.current = Keyboard.addListener('keyboardDidHide', keyboardDidHide); - if (isDamaged) { - showWalletErrorAlert(); - captureMessage('Damaged wallet preventing cloud backup'); - goBack(); - } - return () => { - keyboardShowListener.current?.remove(); - keyboardHideListener.current?.remove(); - }; - }, [goBack, isDamaged]); - - const isSettingsRoute = useRouteExistsInNavigationState(Routes.SETTINGS_SHEET); - - const walletId = params?.walletId || selectedWallet.id; - - const [label, setLabel] = useState( - !validPassword - ? `􀙶 ${lang.t(lang.l.back_up.confirm_password.add_to_cloud_platform, { - cloudPlatformName: cloudPlatform, - })}` - : `􀎽 ${lang.t(lang.l.back_up.confirm_password.confirm_backup)}` - ); - const passwordRef = useRef(); - const confirmPasswordRef = useRef(); - - useEffect(() => { - setTimeout(() => { - passwordRef.current?.focus(); - }, 1); - analytics.track('Choose Password Step', { - category: 'backup', - label: cloudPlatform, - }); - }, []); - - const { handleFocus } = useMagicAutofocus(passwordRef); - - const onPasswordFocus = useCallback( - target => { - handleFocus(target); - setPasswordFocused(true); - currentlyFocusedInput.current = passwordRef.current; - }, - [handleFocus] - ); - - const onConfirmPasswordFocus = useCallback( - target => { - handleFocus(target); - currentlyFocusedInput.current = confirmPasswordRef.current; - }, - [handleFocus] - ); - - const onPasswordBlur = useCallback(() => { - setPasswordFocused(false); - }, []); - - const onPasswordSubmit = useCallback(() => { - confirmPasswordRef.current?.focus(); - }, []); - - useEffect(() => { - let passwordIsValid = false; - if (password === confirmPassword && isCloudBackupPasswordValid(password)) { - passwordIsValid = true; - } - - let newLabel = ''; - if (passwordIsValid) { - newLabel = `􀎽 ${lang.t(lang.l.back_up.cloud.password.confirm_backup)}`; - } else if (password.length < cloudBackupPasswordMinLength) { - newLabel = lang.t('back_up.cloud.password.minimum_characters', { - minimumLength: cloudBackupPasswordMinLength, - }); - } else if ( - // TODO FIXME This branch of the if/else will never execute - // eslint-disable-next-line no-dupe-else-if - password !== '' && - password.length < cloudBackupPasswordMinLength && - !passwordRef.current?.isFocused() - ) { - newLabel = lang.t(lang.l.back_up.cloud.password.use_a_longer_password); - } else if ( - isCloudBackupPasswordValid(password) && - isCloudBackupPasswordValid(confirmPassword) && - confirmPassword.length >= password.length && - password !== confirmPassword - ) { - newLabel = lang.t(lang.l.back_up.cloud.password.passwords_dont_match); - } else if (password.length >= cloudBackupPasswordMinLength && !passwordFocused) { - newLabel = lang.t(lang.l.back_up.cloud.password.confirm_password); - } else if (password.length >= cloudBackupPasswordMinLength && passwordFocused) { - const passInfo = passwordStrength(password); - switch (passInfo.id) { - case 0: - case 1: - newLabel = `💩 ${lang.t(lang.l.back_up.cloud.password.strength.level1)}`; - break; - case 2: - newLabel = `👌 ${lang.t(lang.l.back_up.cloud.password.strength.level2)}`; - break; - case 3: - newLabel = `💪 ${lang.t(lang.l.back_up.cloud.password.strength.level3)}`; - break; - case 4: - newLabel = `🏰️ ${lang.t(lang.l.back_up.cloud.password.strength.level4)}`; - break; - default: - } - } - - setValidPassword(passwordIsValid); - setLabel(newLabel); - }, [confirmPassword, password, passwordFocused]); - - const onPasswordChange = useCallback(({ nativeEvent: { text: inputText } }) => { - setPassword(inputText); - }, []); - - const onConfirmPasswordChange = useCallback(({ nativeEvent: { text: inputText } }) => { - setConfirmPassword(inputText); - }, []); - - const onError = useCallback( - msg => { - setTimeout(onPasswordSubmit, 1000); - DelayedAlert({ title: msg }, 500); - }, - [onPasswordSubmit] - ); - - const onSuccess = useCallback(async () => { - logger.log('BackupCloudStep:: saving backup password'); - await saveBackupPassword(password); - if (!isSettingsRoute) { - DelayedAlert({ title: lang.t(lang.l.cloud.backup_success) }, 1000); - } - // This means the user set a new password - // and it was the first wallet backed up - analytics.track('Backup Complete', { - category: 'backup', - label: cloudPlatform, - }); - goBack(); - }, [goBack, isSettingsRoute, password]); - - const onConfirmBackup = useCallback(async () => { - analytics.track('Tapped "Confirm Backup"'); - - await walletCloudBackup({ - onError, - onSuccess, - password, - walletId, - }); - }, [onError, onSuccess, password, walletCloudBackup, walletId]); - - const showExplainerConfirmation = useCallback(async () => { - android && Keyboard.dismiss(); - navigate(Routes.EXPLAIN_SHEET, { - onClose: () => { - InteractionManager.runAfterInteractions(() => { - setTimeout(() => { - onConfirmBackup(); - }, 300); - }); - }, - type: 'backup', - }); - }, [navigate, onConfirmBackup]); - - const onConfirmPasswordSubmit = useCallback(() => { - validPassword && showExplainerConfirmation(); - }, [showExplainerConfirmation, validPassword]); - - return ( - - - {(isTinyPhone || samsungGalaxy) && isKeyboardOpen ? null : 􀌍} - {lang.t(lang.l.back_up.cloud.password.choose_a_password)} - - {lang.t(lang.l.back_up.cloud.password.a_password_youll_remember)} -   - {lang.t(lang.l.back_up.cloud.password.it_cant_be_recovered)} - - - - - = password.length && confirmPassword !== password - } - isValid={validPassword} - onChange={onConfirmPasswordChange} - onFocus={onConfirmPasswordFocus} - onSubmitEditing={onConfirmPasswordSubmit} - password={confirmPassword} - placeholder={lang.t(lang.l.back_up.cloud.password.confirm_placeholder)} - ref={confirmPasswordRef} - /> - - - ); -} diff --git a/src/components/backup/BackupCloudStep.tsx b/src/components/backup/BackupCloudStep.tsx new file mode 100644 index 00000000000..e839d9323c0 --- /dev/null +++ b/src/components/backup/BackupCloudStep.tsx @@ -0,0 +1,256 @@ +import React, { useCallback, useEffect, useRef, useState } from 'react'; +import { RouteProp, useRoute } from '@react-navigation/native'; +import { Source } from 'react-native-fast-image'; +import { KeyboardArea } from 'react-native-keyboard-area'; + +import * as lang from '@/languages'; +import { sharedCoolModalTopOffset } from '@/navigation/config'; +import { cloudPlatform } from '@/utils/platform'; +import { PasswordField } from '@/components/fields'; +import { Text } from '@/components/text'; +import WalletAndBackup from '@/assets/WalletsAndBackup.png'; +import { analytics } from '@/analytics'; +import { cloudBackupPasswordMinLength, isCloudBackupPasswordValid } from '@/handlers/cloudBackup'; +import { useDimensions, useMagicAutofocus, useWallets } from '@/hooks'; +import styled from '@/styled-thing'; +import { padding } from '@/styles'; +import { Box, Inset, Stack } from '@/design-system'; +import { ImgixImage } from '../images'; +import { IS_ANDROID } from '@/env'; +import { RainbowButton } from '../buttons'; +import RainbowButtonTypes from '../buttons/rainbow-button/RainbowButtonTypes'; +import { usePasswordValidation } from './usePasswordValidation'; +import { TextInput } from 'react-native'; +import { useTheme } from '@/theme'; +import { useNavigation } from '@/navigation'; +import Routes from '@/navigation/routesNames'; +import { SETTINGS_BACKUP_ROUTES } from '@/screens/SettingsSheet/components/Backups/routes'; +import walletTypes from '@/helpers/walletTypes'; + +type BackupCloudStepParams = { + BackupCloudStep: { + isFromWalletReadyPrompt?: boolean; + walletId?: string; + onSuccess: (password: string) => Promise; + onCancel: () => Promise; + }; +}; + +type NativeEvent = { + nativeEvent: { + text: string; + }; +}; + +export function BackupCloudStep() { + const { isDarkMode } = useTheme(); + const { goBack } = useNavigation(); + const { width: deviceWidth, height: deviceHeight } = useDimensions(); + const { params } = useRoute>(); + const [password, setPassword] = useState(''); + const [confirmPassword, setConfirmPassword] = useState(''); + + const { onSuccess, onCancel, isFromWalletReadyPrompt = false } = params; + + const { validPassword, label, labelColor } = usePasswordValidation(password, confirmPassword); + + const currentlyFocusedInput = useRef(null); + const passwordRef = useRef(null); + const confirmPasswordRef = useRef(null); + + useEffect(() => { + setTimeout(() => { + passwordRef.current?.focus(); + }, 1); + analytics.track('Choose Password Step', { + category: 'backup', + label: cloudPlatform, + }); + }, []); + + const { handleFocus } = useMagicAutofocus(passwordRef); + + const onTextInputFocus = useCallback( + (target: any, isConfirm = false) => { + const ref = isConfirm ? confirmPasswordRef.current : passwordRef.current; + handleFocus(target); + currentlyFocusedInput.current = ref; + }, + [handleFocus] + ); + + const onPasswordSubmit = useCallback(() => { + confirmPasswordRef.current?.focus(); + }, []); + + const onPasswordChange = useCallback(({ nativeEvent: { text: inputText } }: NativeEvent) => { + setPassword(inputText); + setConfirmPassword(''); + }, []); + + const onConfirmPasswordChange = useCallback(({ nativeEvent: { text: inputText } }: NativeEvent) => { + setConfirmPassword(inputText); + }, []); + + const onSuccessAndNavigateBack = useCallback( + async (password: string) => { + if (!isFromWalletReadyPrompt) { + goBack(); + } + + onSuccess(password); + }, + [goBack, isFromWalletReadyPrompt, onSuccess] + ); + + useEffect(() => { + return () => { + if (!password) { + onCancel(); + } + }; + }, []); + + return ( + + + + + + + {lang.t(lang.l.back_up.cloud.password.choose_a_password)} + + {lang.t(lang.l.back_up.cloud.password.a_password_youll_remember_part_one)} +   + {lang.t(lang.l.back_up.cloud.password.not)} +   + {lang.t(lang.l.back_up.cloud.password.a_password_youll_remember_part_two)} + + + + + onTextInputFocus(target)} + onSubmitEditing={onPasswordSubmit} + password={password} + placeholder={lang.t(lang.l.back_up.cloud.password.backup_password)} + ref={passwordRef} + returnKeyType="next" + textContentType="newPassword" + /> + {isCloudBackupPasswordValid(password) && ( + = password.length && confirmPassword !== password + } + isValid={validPassword} + onChange={onConfirmPasswordChange} + onFocus={(target: any) => onTextInputFocus(target, true)} + onSubmitEditing={() => onSuccessAndNavigateBack(password)} + password={confirmPassword} + placeholder={lang.t(lang.l.back_up.cloud.password.confirm_placeholder)} + ref={confirmPasswordRef} + /> + )} + + {label} + + + + + {validPassword && ( + onSuccessAndNavigateBack(password)} + /> + )} + + {!validPassword && ( + + + {`􀎽 ${lang.t(lang.l.back_up.cloud.back_up_to_platform, { + cloudPlatformName: cloudPlatform, + })}`} + + + )} + + {IS_ANDROID ? : null} + + + + ); +} + +export default BackupCloudStep; + +const DescriptionText = styled(Text).attrs(({ theme: { colors }, color }: any) => ({ + align: 'left', + color: color || colors.alpha(colors.blueGreyDark, 0.5), + lineHeight: 'looser', + size: 'lmedium', + weight: 'medium', +}))({}); + +const KeyboardSizeView = styled(KeyboardArea)({ + backgroundColor: ({ theme: { colors } }: any) => colors.transparent, +}); + +const ImportantText = styled(DescriptionText).attrs(({ theme: { colors } }: any) => ({ + color: colors.red, + weight: 'bold', +}))({}); + +const Masthead = styled(Box).attrs({ + direction: 'column', +})({ + ...padding.object(0, 0, 16), + gap: 8, + flexShrink: 0, +}); + +const Title = styled(Text).attrs({ + size: 'big', + weight: 'heavy', +})({ + ...padding.object(12, 0, 0), +}); + +const ButtonText = styled(Text).attrs(({ theme: { colors }, color }: any) => ({ + align: 'center', + letterSpacing: 'rounded', + color: color || colors.alpha(colors.blueGreyDark, 0.5), + size: 'larger', + weight: 'heavy', + numberOfLines: 1, +}))({}); diff --git a/src/components/backup/BackupConfirmPasswordStep.js b/src/components/backup/BackupConfirmPasswordStep.js deleted file mode 100644 index e8d9cc9a5d3..00000000000 --- a/src/components/backup/BackupConfirmPasswordStep.js +++ /dev/null @@ -1,175 +0,0 @@ -import { useRoute } from '@react-navigation/native'; -import lang from 'i18n-js'; -import React, { useCallback, useEffect, useRef, useState } from 'react'; -import { Keyboard } from 'react-native'; -import { isSamsungGalaxy } from '../../helpers/samsung'; -import { saveBackupPassword } from '../../model/backup'; -import { cloudPlatform } from '../../utils/platform'; -import { DelayedAlert } from '../alerts'; -import { PasswordField } from '../fields'; -import { Centered, Column } from '../layout'; -import { GradientText, Text } from '../text'; -import BackupSheetKeyboardLayout from './BackupSheetKeyboardLayout'; -import { analytics } from '@/analytics'; -import { cloudBackupPasswordMinLength, isCloudBackupPasswordValid } from '@/handlers/cloudBackup'; -import { useBooleanState, useDimensions, useRouteExistsInNavigationState, useWalletCloudBackup, useWallets } from '@/hooks'; -import { useNavigation } from '@/navigation'; -import Routes from '@/navigation/routesNames'; -import styled from '@/styled-thing'; -import { margin, padding } from '@/styles'; -import logger from '@/utils/logger'; - -const DescriptionText = styled(Text).attrs(({ theme: { colors } }) => ({ - align: 'center', - color: colors.alpha(colors.blueGreyDark, 0.5), - lineHeight: 'looser', - size: 'large', -}))({ - ...padding.object(0, 50), -}); - -const Masthead = styled(Centered).attrs({ - direction: 'column', -})({ - ...padding.object(24, 0, 42), - flexShrink: 0, -}); - -const MastheadIcon = styled(GradientText).attrs({ - align: 'center', - angle: false, - colors: ['#FFB114', '#FF54BB', '#00F0FF'], - end: { x: 0, y: 0 }, - letterSpacing: 'roundedTight', - size: 52, - start: { x: 1, y: 1 }, - steps: [0, 0.5, 1], - weight: 'bold', -})({}); - -const Title = styled(Text).attrs({ - size: 'big', - weight: 'bold', -})({ - ...margin.object(15, 0, 12), -}); - -const samsungGalaxy = (android && isSamsungGalaxy()) || false; - -export default function BackupConfirmPasswordStep() { - const { isTinyPhone } = useDimensions(); - const { params } = useRoute(); - const { goBack } = useNavigation(); - const walletCloudBackup = useWalletCloudBackup(); - const [isKeyboardOpen, setIsKeyboardOpen] = useState(false); - const [validPassword, setValidPassword] = useState(false); - const [passwordFocused, setPasswordFocused, setPasswordBlurred] = useBooleanState(true); - const [password, setPassword] = useState(''); - const [label, setLabel] = useState(`􀎽 ${lang.t('back_up.confirm_password.confirm_backup')}`); - const passwordRef = useRef(); - const keyboardShowListener = useRef(null); - const keyboardHideListener = useRef(null); - const { selectedWallet } = useWallets(); - const walletId = params?.walletId || selectedWallet.id; - - const isSettingsRoute = useRouteExistsInNavigationState(Routes.SETTINGS_SHEET); - - useEffect(() => { - const keyboardDidShow = () => { - setIsKeyboardOpen(true); - }; - - const keyboardDidHide = () => { - setIsKeyboardOpen(false); - }; - keyboardShowListener.current = Keyboard.addListener('keyboardDidShow', keyboardDidShow); - keyboardHideListener.current = Keyboard.addListener('keyboardDidHide', keyboardDidHide); - return () => { - keyboardShowListener.current?.remove(); - keyboardHideListener.current?.remove(); - }; - }, []); - - useEffect(() => { - analytics.track('Confirm Password Step', { - category: 'backup', - label: cloudPlatform, - }); - }, []); - - useEffect(() => { - let passwordIsValid = false; - - if (isCloudBackupPasswordValid(password)) { - passwordIsValid = true; - setLabel( - `􀑙 ${lang.t('back_up.confirm_password.add_to_cloud_platform', { - cloudPlatformName: cloudPlatform, - })}` - ); - } - setValidPassword(passwordIsValid); - }, [password, passwordFocused]); - - const onPasswordChange = useCallback(({ nativeEvent: { text: inputText } }) => { - setPassword(inputText); - }, []); - - const onError = useCallback(msg => { - passwordRef.current?.focus(); - DelayedAlert({ title: msg }, 500); - }, []); - - const onSuccess = useCallback(async () => { - logger.log('BackupConfirmPasswordStep:: saving backup password'); - await saveBackupPassword(password); - if (!isSettingsRoute) { - DelayedAlert({ title: lang.t('cloud.backup_success') }, 1000); - } - // This means the user didn't have the password saved - // and at least an other wallet already backed up - analytics.track('Backup Complete via Confirm Step', { - category: 'backup', - label: cloudPlatform, - }); - goBack(); - }, [goBack, isSettingsRoute, password]); - - const onSubmit = useCallback(async () => { - if (!validPassword) return; - analytics.track('Tapped "Restore from cloud"'); - await walletCloudBackup({ - onError, - onSuccess, - password, - walletId, - }); - }, [onError, onSuccess, password, validPassword, walletCloudBackup, walletId]); - - return ( - - - {(isTinyPhone || samsungGalaxy) && isKeyboardOpen ? null : 􀙶} - {lang.t('back_up.confirm_password.enter_backup_password')} - - {lang.t('back_up.confirm_password.enter_backup_description', { - cloudPlatformName: cloudPlatform, - })} - - - - - - - ); -} diff --git a/src/components/backup/BackupManualStep.js b/src/components/backup/BackupManualStep.js deleted file mode 100644 index 8aecf52cd31..00000000000 --- a/src/components/backup/BackupManualStep.js +++ /dev/null @@ -1,137 +0,0 @@ -import { useRoute } from '@react-navigation/native'; -import lang from 'i18n-js'; -import React, { Fragment, useCallback, useEffect, useState } from 'react'; -import { View } from 'react-native'; -import { useTheme } from '../../theme/ThemeContext'; -import { Column, Row } from '../layout'; -import { SheetActionButton } from '../sheet'; -import { Nbsp, Text } from '../text'; -import { analytics } from '@/analytics'; -import WalletTypes from '@/helpers/walletTypes'; -import { useDimensions, useWalletManualBackup, useWallets } from '@/hooks'; -import { useNavigation } from '@/navigation'; -import styled from '@/styled-thing'; -import { padding } from '@/styles'; -import { SecretDisplaySection } from '@/components/secret-display/SecretDisplaySection'; - -const Content = styled(Column).attrs({ - align: 'center', - justify: 'start', -})({ - flexGrow: 1, - flexShrink: 0, - paddingTop: ({ isTallPhone, isSmallPhone }) => (android ? 30 : isTallPhone ? 45 : isSmallPhone ? 10 : 25), -}); - -const Footer = styled(Column).attrs({ - justify: 'center', -})({ - ...padding.object(0, 15, 21), - - marginBottom: android ? 30 : 0, - width: '100%', -}); - -const Masthead = styled(Column).attrs({ - align: 'center', - justify: 'start', -})({}); - -const MastheadDescription = styled(Text).attrs(({ theme: { colors } }) => ({ - align: 'center', - color: colors.alpha(colors.blueGreyDark, 0.6), - lineHeight: 'looser', - size: 'lmedium', -}))({ - maxWidth: 291, -}); - -const MastheadIcon = styled(Text).attrs({ - align: 'center', - color: 'appleBlue', - size: 21, - weight: 'heavy', -})({}); - -const MastheadTitle = styled(Text).attrs({ - align: 'center', - size: 'larger', - weight: 'bold', -})({ - ...padding.object(8), -}); - -const MastheadTitleRow = styled(Row).attrs({ - align: 'center', - justify: 'start', -})({ - paddingTop: 18, -}); - -export default function BackupManualStep() { - const { isTallPhone, isSmallPhone } = useDimensions(); - const { goBack } = useNavigation(); - const { selectedWallet } = useWallets(); - const { onManuallyBackupWalletId } = useWalletManualBackup(); - const { params } = useRoute(); - const walletId = params?.walletId || selectedWallet.id; - const { colors } = useTheme(); - - const [type, setType] = useState(null); - const [secretLoaded, setSecretLoaded] = useState(false); - - const onComplete = useCallback(() => { - analytics.track(`Tapped "I've saved the secret"`, { - type, - }); - onManuallyBackupWalletId(walletId); - analytics.track('Backup Complete', { - category: 'backup', - label: 'manual', - }); - goBack(); - }, [goBack, onManuallyBackupWalletId, type, walletId]); - - useEffect(() => { - analytics.track('Manual Backup Step', { - category: 'backup', - label: 'manual', - }); - }, []); - - return ( - - - - 􀉆 - {lang.t('back_up.manual.label')} - - - - {type === WalletTypes.privateKey ? lang.t('back_up.manual.pkey.these_keys') : lang.t('back_up.manual.seed.these_keys')} - - - {type === WalletTypes.privateKey ? lang.t('back_up.manual.pkey.save_them') : lang.t('back_up.manual.seed.save_them')} - - - - - -

- - ); -} diff --git a/src/components/backup/BackupManuallyStep.tsx b/src/components/backup/BackupManuallyStep.tsx new file mode 100644 index 00000000000..211eda2d196 --- /dev/null +++ b/src/components/backup/BackupManuallyStep.tsx @@ -0,0 +1,98 @@ +import React, { useCallback } from 'react'; +import { Bleed, Box, Inline, Inset, Separator, Stack, Text } from '@/design-system'; +import * as lang from '@/languages'; +import { ImgixImage } from '../images'; +import ManuallyBackedUpIcon from '@/assets/ManuallyBackedUp.png'; +import { Source } from 'react-native-fast-image'; +import { ButtonPressAnimation } from '../animations'; +import { useNavigation } from '@/navigation'; +import Routes from '@/navigation/routesNames'; +import { useWallets } from '@/hooks'; +import walletTypes from '@/helpers/walletTypes'; +import { SETTINGS_BACKUP_ROUTES } from '@/screens/SettingsSheet/components/Backups/routes'; +import walletBackupTypes from '@/helpers/walletBackupTypes'; + +const imageSize = 72; + +export default function BackupManuallyStep() { + const { navigate, goBack } = useNavigation(); + const { selectedWallet } = useWallets(); + + const onManualBackup = async () => { + const title = + selectedWallet?.imported && selectedWallet.type === walletTypes.privateKey ? selectedWallet.addresses[0].label : selectedWallet.name; + + goBack(); + navigate(Routes.SETTINGS_SHEET, { + screen: SETTINGS_BACKUP_ROUTES.SECRET_WARNING, + params: { + isBackingUp: true, + title, + backupType: walletBackupTypes.manual, + walletId: selectedWallet.id, + }, + }); + }; + + const onMaybeLater = useCallback(() => goBack(), [goBack]); + + return ( + + + + + + {lang.t(lang.l.back_up.manual.backup_manually_now)} + + + + + + + + + + + + + + {lang.t(lang.l.back_up.manual.back_up_now)} + + + + + + + + + + + + + + + + {lang.t(lang.l.back_up.manual.already_backed_up)} + + + + + + + + + + + ); +} diff --git a/src/components/backup/BackupRainbowButton.tsx b/src/components/backup/BackupRainbowButton.tsx new file mode 100644 index 00000000000..614153a2767 --- /dev/null +++ b/src/components/backup/BackupRainbowButton.tsx @@ -0,0 +1,121 @@ +import MaskedView from '@react-native-masked-view/masked-view'; +import React from 'react'; +import { useTheme } from '@/theme'; +import { ButtonPressAnimation } from '@/components/animations'; +import { RowWithMargins } from '@/components/layout'; +import { Text } from '@/components/text'; +import RainbowButtonTypes from '@/components/buttons/rainbow-button/RainbowButtonTypes'; +import { useDimensions } from '@/hooks'; +import styled from '@/styled-thing'; +import { shadow } from '@/styles'; +import ShadowView from '@/react-native-shadow-stack/ShadowView'; +import BackupRainbowButtonBackground from './BackupRainbowButtonBackground'; +import { View } from 'react-native'; + +const ButtonContainer = styled(MaskedView).attrs({ + pointerEvents: 'none', +})(({ width, height }: any) => ({ + height, + width, +})); + +const ButtonContent = styled(RowWithMargins).attrs({ + align: 'center', + margin: -2.5, +})({ + alignSelf: 'center', + bottom: 2, + height: '100%', +}); + +const ButtonLabel = styled(Text).attrs(({ disabled, type, theme: { colors, isDarkMode } }: any) => ({ + align: type === RainbowButtonTypes.addCash ? 'left' : 'center', + color: isDarkMode && disabled ? colors.white : colors.whiteLabel, + letterSpacing: type === RainbowButtonTypes.addCash ? 'roundedTight' : 'rounded', + size: type === RainbowButtonTypes.small ? 'large' : 'larger', + weight: type === RainbowButtonTypes.small ? 'bold' : 'heavy', + numberOfLines: 1, +}))({}); + +const OuterButton = styled(View)(({ height, width, isDarkMode, disabled, strokeWidth, theme: { colors } }: any) => ({ + ...shadow.buildAsObject(0, 5, 15, colors.shadow), + backgroundColor: colors.dark, + borderRadius: height / 2 + strokeWidth, + height, + shadowOpacity: isDarkMode && disabled ? 0 : isDarkMode ? 0.1 : 0.4, + width, +})); + +const Shadow = styled(ShadowView)(({ height, strokeWidth, isDarkMode, disabled, width, theme: { colors } }: any) => ({ + ...shadow.buildAsObject(0, 10, 30, colors.shadow, 1), + backgroundColor: colors.white, + borderRadius: height / 2 + strokeWidth, + height, + opacity: isDarkMode && disabled ? 0 : android ? 1 : 0.2, + position: 'absolute', + width, +})); + +type BackupRainbowButtonProps = { + disabled?: boolean; + height?: number; + label?: string; + onPress?: () => void; + strokeWidth?: number; + width?: number; + overflowMargin?: number; + skipTopMargin?: boolean; +}; + +const BackupRainbowButton = ({ + disabled = false, + height = 56, + label = 'Press me', + onPress, + strokeWidth = 1, + width, + overflowMargin = 35, + skipTopMargin = true, + ...props +}: BackupRainbowButtonProps) => { + const { isDarkMode } = useTheme(); + + const { width: deviceWidth } = useDimensions(); + const maxButtonWidth = deviceWidth - 30; + + const btnStrokeWidth = disabled ? 0.5 : strokeWidth; + const btnWidth = width || maxButtonWidth; + + const outerButtonMask = ( + + ); + + return ( + + + + + + + {label} + + + + + ); +}; + +export default BackupRainbowButton; diff --git a/src/components/buttons/rainbow-button/RainbowButtonBackground.js b/src/components/backup/BackupRainbowButtonBackground.tsx similarity index 73% rename from src/components/buttons/rainbow-button/RainbowButtonBackground.js rename to src/components/backup/BackupRainbowButtonBackground.tsx index 7b415585ae7..75059a18ecc 100644 --- a/src/components/buttons/rainbow-button/RainbowButtonBackground.js +++ b/src/components/backup/BackupRainbowButtonBackground.tsx @@ -1,25 +1,28 @@ +/* eslint-disable no-nested-ternary */ import MaskedView from '@react-native-masked-view/masked-view'; import React from 'react'; import { View } from 'react-native'; import RadialGradient from 'react-native-radial-gradient'; -import { darkModeThemeColors } from '../../../styles/colors'; -import { useTheme } from '../../../theme/ThemeContext'; -import RainbowButtonTypes from './RainbowButtonTypes'; +import { darkModeThemeColors } from '@/styles/colors'; +import { useTheme } from '@/theme'; +import RainbowButtonTypes from '@/components/buttons/rainbow-button/RainbowButtonTypes'; import styled from '@/styled-thing'; import { margin } from '@/styles'; import { magicMemo } from '@/utils'; -const RainbowGradientColorsFactory = darkMode => ({ +const RainbowGradientColorsFactory = (darkMode: boolean) => ({ inner: { - addCash: ['#FFB114', '#FF54BB', '#00F0FF'], default: darkModeThemeColors.gradients.rainbow, + backup: ['#14C7FF', '#7654FF', '#930AFF'], + disabledBackup: darkModeThemeColors.transparent, disabled: darkMode ? [darkModeThemeColors.blueGreyDark20, darkModeThemeColors.blueGreyDark20, darkModeThemeColors.blueGreyDark20] : ['#B0B3B9', '#B0B3B9', '#B0B3B9'], }, outer: { - addCash: ['#F5AA13', '#F551B4', '#00E6F5'], default: ['#F5AA13', '#F551B4', '#799DD5'], + backup: ['#14C7FF', '#7654FF', '#930AFF'], + disabledBackup: darkModeThemeColors.transparent, disabled: darkMode ? [darkModeThemeColors.blueGreyDark20, darkModeThemeColors.blueGreyDark20, darkModeThemeColors.blueGreyDark20] : ['#A5A8AE', '#A5A8AE', '#A5A8AE'], @@ -29,7 +32,7 @@ const RainbowGradientColorsFactory = darkMode => ({ const RainbowGradientColorsDark = RainbowGradientColorsFactory(true); const RainbowGradientColorsLight = RainbowGradientColorsFactory(false); -const RainbowButtonGradient = styled(RadialGradient).attrs(({ type, width }) => ({ +const RainbowButtonGradient = styled(RadialGradient).attrs(({ type, width }: any) => ({ radius: width, stops: type === RainbowButtonTypes.addCash ? [0, 0.544872, 1] : [0, 0.774321, 1], }))({ @@ -37,7 +40,7 @@ const RainbowButtonGradient = styled(RadialGradient).attrs(({ type, width }) => transform: [{ scaleY: 0.7884615385 }], }); -const InnerButton = styled(View)(({ strokeWidth, height, width, theme: { colors } }) => ({ +const InnerButton = styled(View)(({ strokeWidth, height, width, theme: { colors } }: any) => ({ ...margin.object(strokeWidth), backgroundColor: colors.dark, borderRadius: height / 2 - strokeWidth, @@ -45,25 +48,27 @@ const InnerButton = styled(View)(({ strokeWidth, height, width, theme: { colors width: width - strokeWidth * 2, })); -const InnerGradient = styled(RainbowButtonGradient).attrs(({ disabled, type, gradientColors }) => ({ +const InnerGradient = styled(RainbowButtonGradient).attrs(({ disabled, type, gradientColors }: any) => ({ colors: disabled - ? gradientColors.inner.disabled + ? type === RainbowButtonTypes.backup + ? gradientColors.inner.disabledBackup + : gradientColors.inner.disabled : type === RainbowButtonTypes.addCash ? gradientColors.inner.addCash : gradientColors.inner.default, -}))(({ width, height }) => ({ +}))(({ width, height }: any) => ({ height: width, top: -(width - height) / 2, width, })); -const OuterGradient = styled(RainbowButtonGradient).attrs(({ disabled, type, gradientColors }) => ({ +const OuterGradient = styled(RainbowButtonGradient).attrs(({ disabled, type, gradientColors }: any) => ({ colors: disabled ? gradientColors.outer.disabled : type === RainbowButtonTypes.addCash ? gradientColors.outer.addCash : gradientColors.outer.default, -}))(({ width, height }) => ({ +}))(({ width, height }: any) => ({ height: width * 2, left: -width / 2, top: -(width - height / 2), @@ -71,15 +76,23 @@ const OuterGradient = styled(RainbowButtonGradient).attrs(({ disabled, type, gra })); const WrapperView = android - ? styled.View({ - height: ({ height }) => height, + ? styled(View)({ + height: ({ height }: any) => height, overflow: 'hidden', position: 'absolute', - width: ({ width }) => width, + width: ({ width }: any) => width, }) - : ({ children }) => children; + : ({ children }: any) => children; -const RainbowButtonBackground = ({ disabled, height, strokeWidth, type, width }) => { +type RainbowButtonBackgroundProps = { + disabled: boolean; + height: number; + strokeWidth: number; + type: RainbowButtonTypes; + width: number; +}; + +const RainbowButtonBackground = ({ disabled, height, strokeWidth, type, width }: RainbowButtonBackgroundProps) => { const { isDarkMode } = useTheme(); const gradientColors = isDarkMode ? RainbowGradientColorsDark : RainbowGradientColorsLight; diff --git a/src/components/backup/BackupSheet.tsx b/src/components/backup/BackupSheet.tsx new file mode 100644 index 00000000000..be2bd57ebd8 --- /dev/null +++ b/src/components/backup/BackupSheet.tsx @@ -0,0 +1,58 @@ +import { RouteProp, useRoute } from '@react-navigation/native'; +import React, { useCallback } from 'react'; +import { BackupCloudStep, RestoreCloudStep } from '.'; +import WalletBackupStepTypes from '@/helpers/walletBackupStepTypes'; +import BackupChooseProviderStep from '@/components/backup/BackupChooseProviderStep'; +import { BackgroundProvider } from '@/design-system'; +import { SimpleSheet } from '@/components/sheet/SimpleSheet'; +import AddWalletToCloudBackupStep from '@/components/backup/AddWalletToCloudBackupStep'; +import BackupManuallyStep from './BackupManuallyStep'; +import { getHeightForStep } from '@/navigation/config'; +import { CloudBackupProvider } from './CloudBackupProvider'; + +type BackupSheetParams = { + BackupSheet: { + longFormHeight?: number; + missingPassword?: boolean; + step?: string; + walletId?: string; + nativeScreen?: boolean; + }; +}; + +export default function BackupSheet() { + const { params: { step = WalletBackupStepTypes.no_provider } = {} } = useRoute>(); + + const renderStep = useCallback(() => { + switch (step) { + case WalletBackupStepTypes.backup_now_to_cloud: + return ; + case WalletBackupStepTypes.backup_now_manually: + return ; + case WalletBackupStepTypes.backup_cloud: + return ; + case WalletBackupStepTypes.restore_from_backup: + return ; + case WalletBackupStepTypes.no_provider: + default: + return ; + } + }, [step]); + + return ( + + + {({ backgroundColor }) => ( + + {renderStep()} + + )} + + + ); +} diff --git a/src/components/backup/BackupSheetKeyboardLayout.js b/src/components/backup/BackupSheetKeyboardLayout.js deleted file mode 100644 index ef9386b8fe8..00000000000 --- a/src/components/backup/BackupSheetKeyboardLayout.js +++ /dev/null @@ -1,43 +0,0 @@ -import { useRoute } from '@react-navigation/native'; -import React from 'react'; -import { KeyboardArea } from 'react-native-keyboard-area'; -import { RainbowButton } from '../buttons'; -import { Column } from '../layout'; -import { SheetHandleFixedToTopHeight } from '../sheet'; -import KeyboardTypes from '@/helpers/keyboardTypes'; -import { useDimensions, useKeyboardHeight } from '@/hooks'; -import { sharedCoolModalTopOffset } from '@/navigation/config'; -import styled from '@/styled-thing'; -import { padding } from '@/styles'; - -const Footer = styled(Column)(({ isTallPhone }) => ({ - ...padding.object(20, 15, isTallPhone ? 65 : 50), - flexShrink: 0, - width: '100%', -})); - -const KeyboardSizeView = styled(KeyboardArea)({ - backgroundColor: ({ theme: { colors } }) => colors.transparent, -}); - -export default function BackupSheetKeyboardLayout({ children, footerButtonDisabled, footerButtonLabel, onSubmit, type }) { - const { params: { nativeScreen } = {} } = useRoute(); - const { height: deviceHeight, isTallPhone } = useDimensions(); - const keyboardHeight = useKeyboardHeight({ - keyboardType: KeyboardTypes.password, - }); - - const platformKeyboardHeight = android ? (type === 'restore' ? -10 : -30) : keyboardHeight; - - const sheetRegionAboveKeyboardHeight = deviceHeight - platformKeyboardHeight - sharedCoolModalTopOffset - SheetHandleFixedToTopHeight; - - return ( - - {children} -
- -
- {android ? : null} -
- ); -} diff --git a/src/components/backup/BackupSheetKeyboardLayout.tsx b/src/components/backup/BackupSheetKeyboardLayout.tsx new file mode 100644 index 00000000000..41ab5848657 --- /dev/null +++ b/src/components/backup/BackupSheetKeyboardLayout.tsx @@ -0,0 +1,62 @@ +import React, { PropsWithChildren } from 'react'; +import { KeyboardArea } from 'react-native-keyboard-area'; +import { RainbowButton } from '../buttons'; +import { Column } from '../layout'; +import styled from '@/styled-thing'; +import { padding } from '@/styles'; +import { Box } from '@/design-system'; +import { useDimensions } from '@/hooks'; +import { sharedCoolModalTopOffset } from '@/navigation/config'; +import RainbowButtonTypes from '../buttons/rainbow-button/RainbowButtonTypes'; + +const Footer = styled(Column)({ + ...padding.object(0, 24, 0), + flexShrink: 0, + justifyContent: 'flex-end', + width: '100%', + position: 'absolute', + bottom: 0, +}); + +const KeyboardSizeView = styled(KeyboardArea)({ + backgroundColor: ({ theme: { colors } }: any) => colors.transparent, +}); + +type BackupSheetKeyboardLayoutProps = PropsWithChildren<{ + footerButtonDisabled: boolean; + footerButtonLabel: string; + onSubmit: () => void; + type: 'backup' | 'restore'; +}>; + +type BackupSheetKeyboardLayout = { + BackupSheetKeyboardLayout: { + params: { + nativeButton?: boolean; + }; + }; +}; + +const MIN_HEIGHT = 740; + +export default function BackupSheetKeyboardLayout({ + children, + footerButtonDisabled, + footerButtonLabel, + onSubmit, +}: BackupSheetKeyboardLayoutProps) { + const { height: deviceHeight } = useDimensions(); + + const isSmallPhone = deviceHeight < MIN_HEIGHT; + const contentHeight = deviceHeight - (!isSmallPhone ? sharedCoolModalTopOffset : 0) - 100; + + return ( + + {children} +
+ +
+ {android ? : null} +
+ ); +} diff --git a/src/components/backup/BackupSheetSection.js b/src/components/backup/BackupSheetSection.tsx similarity index 59% rename from src/components/backup/BackupSheetSection.js rename to src/components/backup/BackupSheetSection.tsx index a2fa56d8412..cb658f224bd 100644 --- a/src/components/backup/BackupSheetSection.js +++ b/src/components/backup/BackupSheetSection.tsx @@ -1,21 +1,18 @@ import React, { Fragment, useEffect } from 'react'; import { useTheme } from '../../theme/ThemeContext'; -import Divider from '../Divider'; import { RainbowButton } from '../buttons'; import { Column, ColumnWithMargins } from '../layout'; import { SheetActionButton } from '../sheet'; import { Text } from '../text'; import { analytics } from '@/analytics'; -import BackupIcon from '@/assets/backupIcon.png'; -import BackupIconDark from '@/assets/backupIconDark.png'; -import { ImgixImage } from '@/components/images'; import styled from '@/styled-thing'; import { padding } from '@/styles'; +import { Bleed, Separator } from '@/design-system'; const Footer = styled(ColumnWithMargins).attrs({ margin: 19, })({ - ...padding.object(19, 15, 32), + ...padding.object(32, 15, 32), width: '100%', }); @@ -23,28 +20,26 @@ const Masthead = styled(Column).attrs({ align: 'center', justify: 'start', })({ + ...padding.object(32, 24, 40), flex: 1, - paddingTop: 8, }); -const MastheadDescription = styled(Text).attrs(({ theme: { colors } }) => ({ - align: 'center', - color: colors.alpha(colors.blueGreyDark, 0.5), - lineHeight: 'looser', - size: 'large', -}))({ ...padding.object(12, 42, 30) }); +type MaybePromise = T | Promise; -const MastheadIcon = styled(ImgixImage).attrs({ - resizeMode: ImgixImage.resizeMode.contain, -})({ - height: 74, - marginBottom: -1, - width: 75, - size: 75, -}); +type BackupSheetSectionProps = { + headerIcon?: React.ReactNode; + onPrimaryAction: () => MaybePromise; + onSecondaryAction: () => void; + primaryButtonTestId: string; + primaryLabel: string; + secondaryButtonTestId: string; + secondaryLabel: string; + titleText: string; + type: string; +}; export default function BackupSheetSection({ - descriptionText, + headerIcon, onPrimaryAction, onSecondaryAction, primaryButtonTestId, @@ -53,8 +48,8 @@ export default function BackupSheetSection({ secondaryLabel, titleText, type, -}) { - const { colors, isDarkMode } = useTheme(); +}: BackupSheetSectionProps) { + const { colors } = useTheme(); useEffect(() => { analytics.track('BackupSheet shown', { category: 'backup', @@ -65,13 +60,14 @@ export default function BackupSheetSection({ return ( - - + {headerIcon} + {titleText} - {descriptionText} - + + +