From 14efc23e2b3e31d07fabae2e681ff447741e4478 Mon Sep 17 00:00:00 2001 From: Mahsa Shafaei Date: Fri, 23 Feb 2024 09:09:57 +0330 Subject: [PATCH 1/8] the UI of authentication popup is implemented and endpoints are defined --- api/auth/authApi.ts | 32 ++ api/auth/authApi.types.ts | 33 ++ api/auth/index.ts | 57 ++ components/PopUp/PopUp.tsx | 4 +- components/button/Button.tsx | 46 +- components/header/Profile.tsx | 10 +- .../header/authentication/Authentication.tsx | 49 ++ components/header/authentication/ErgoPay.tsx | 12 + components/header/authentication/Google.tsx | 33 ++ components/header/authentication/Nautilus.tsx | 65 +++ components/providers/index.tsx | 2 +- components/tabs/TabPanel.tsx | 30 ++ components/tabs/Tabs.tsx | 52 +- package.json | 5 +- public/images/googleLogo.svg | 6 + public/images/line.svg | 3 + public/images/nautilusLogo.svg | 9 + scenes/landing/reward/earnings/Earnings.tsx | 2 +- scenes/landing/statistics/Statistics.tsx | 2 +- utils/constants.ts | 3 + utils/http-client.ts | 27 + utils/query-key-factory.ts | 30 ++ utils/react-query-keys.ts | 22 + utils/types.ts | 9 + yarn.lock | 488 ++++++++++++------ 25 files changed, 847 insertions(+), 184 deletions(-) create mode 100644 api/auth/authApi.ts create mode 100644 api/auth/authApi.types.ts create mode 100644 api/auth/index.ts create mode 100644 components/header/authentication/Authentication.tsx create mode 100644 components/header/authentication/ErgoPay.tsx create mode 100644 components/header/authentication/Google.tsx create mode 100644 components/header/authentication/Nautilus.tsx create mode 100644 components/tabs/TabPanel.tsx create mode 100644 public/images/googleLogo.svg create mode 100644 public/images/line.svg create mode 100644 public/images/nautilusLogo.svg create mode 100644 utils/constants.ts create mode 100644 utils/http-client.ts create mode 100644 utils/query-key-factory.ts create mode 100644 utils/react-query-keys.ts create mode 100644 utils/types.ts diff --git a/api/auth/authApi.ts b/api/auth/authApi.ts new file mode 100644 index 0000000..60bbdd5 --- /dev/null +++ b/api/auth/authApi.ts @@ -0,0 +1,32 @@ +import { + GoogleRequestResponse, + GoogleCallbackResponse, + NautilusBodyRequest, + NautilusResponse, + ErgoPayResponse, + ErgoPaySignInResponse, + ErgoPayRequestParameter, +} from '@/api/auth/authApi.types'; +import { httpClient } from '@/utils/http-client'; + +export const authApi = { + googleRequest: async (): Promise => + httpClient.get(`/auth/google`), + + googleCallback: async (): Promise => + httpClient.get(`/auth/google/callback`), + + nautilus: async (body: NautilusBodyRequest): Promise => + httpClient.post(`/auth/nautilus`, body), + + ergoPay: async ({ + address, + }: ErgoPayRequestParameter): Promise => + httpClient.get(`/ergopay/${address}`), // should be ergoauth://localhost/auth/ergopay/:address + + ergoPaySignIn: async ( + address: ErgoPayRequestParameter, + body: string, + ): Promise => + httpClient.get(`/ergopay/${address}/signin`, body), // should be ergoauth://localhost/auth/ergopay/:address +}; diff --git a/api/auth/authApi.types.ts b/api/auth/authApi.types.ts new file mode 100644 index 0000000..3b980e0 --- /dev/null +++ b/api/auth/authApi.types.ts @@ -0,0 +1,33 @@ +import { ApiResponse, ApiError } from '@/utils/types'; + +export type GoogleRequestSuccessResponse = ApiResponse<{ + address: string; +}>; + +export type GoogleRequestResponse = GoogleRequestSuccessResponse | ApiError; + +export type SignInSuccessResponse = ApiResponse<{ + jwtToken: string; +}>; + +export type GoogleCallbackResponse = SignInSuccessResponse | ApiError; + +export interface NautilusBodyRequest { + proof: string; + message: string; + address: string; +} + +export type NautilusResponse = SignInSuccessResponse | ApiError; + +export interface ErgoPayRequestParameter { + address: string; +} + +export type ErgoPaySuccessResponse = ApiResponse<{ + status: number; +}>; + +export type ErgoPayResponse = ErgoPaySuccessResponse | ApiError; + +export type ErgoPaySignInResponse = SignInSuccessResponse | ApiError; diff --git a/api/auth/index.ts b/api/auth/index.ts new file mode 100644 index 0000000..d741656 --- /dev/null +++ b/api/auth/index.ts @@ -0,0 +1,57 @@ +import { useQuery } from '@tanstack/react-query'; + +import { authApi } from '@/api/auth/authApi'; +import { + GoogleRequestSuccessResponse, + GoogleRequestResponse, + SignInSuccessResponse, + GoogleCallbackResponse, + NautilusBodyRequest, + NautilusResponse, + ErgoPaySuccessResponse, + ErgoPayResponse, + ErgoPaySignInResponse, + ErgoPayRequestParameter, +} from '@/api/auth/authApi.types'; +import { queryKeys } from '@/utils/react-query-keys'; +import { ApiError } from '@/utils/types'; + +export const authApiGateway = { + useGoogleRequest: () => + useQuery( + queryKeys.authKeys.useGoogleRequest(), + { + queryFn: () => authApi.googleRequest(), + }, + ), + + useGoogleCallback: () => + useQuery( + queryKeys.authKeys.useGoogleCallback(), + { + queryFn: () => authApi.googleCallback(), + }, + ), + + useNautilus: (body: NautilusBodyRequest) => + useQuery( + queryKeys.authKeys.useNautilus(body), + { + queryFn: () => authApi.nautilus(body), + }, + ), + useErgoPay: (parameter: ErgoPayRequestParameter) => + useQuery( + queryKeys.authKeys.useErgoPay(parameter), + { + queryFn: () => authApi.ergoPay(parameter), + }, + ), + useErgoPaySignIn: (parameter: ErgoPayRequestParameter, body: string) => + useQuery( + queryKeys.authKeys.useErgoPaySignIn(parameter, body), + { + queryFn: () => authApi.ergoPaySignIn(parameter, body), + }, + ), +}; diff --git a/components/PopUp/PopUp.tsx b/components/PopUp/PopUp.tsx index 31c0550..2fda5f4 100644 --- a/components/PopUp/PopUp.tsx +++ b/components/PopUp/PopUp.tsx @@ -24,7 +24,7 @@ const StyledDialog = styled(Dialog)(({ theme }) => ({ margin: '0', backgroundColor: theme.palette.surface.main, borderRadius: '0.75rem', - minWidth: '36.75rem', + width: '35.5rem', }, '& .MuiDialogTitle-root': { color: theme.palette.onSurface.main, @@ -57,7 +57,7 @@ export default function PopUp({ state, handleClose, children, title }: Props) { /> - {children} + {children} ); } diff --git a/components/button/Button.tsx b/components/button/Button.tsx index ee9cba6..8fee900 100644 --- a/components/button/Button.tsx +++ b/components/button/Button.tsx @@ -5,21 +5,47 @@ import { ButtonBase, styled } from '@mui/material'; interface Props extends ComponentPropsWithoutRef<'button'> { children: ReactNode; + kind: 'Filled' | 'Tonal'; + className?: string; + fullWidth?: boolean; } -const StyledButton = styled(ButtonBase)` - & .MuiButtonBase-root { - background-color: ${({ theme }) => theme.palette.primary.main}; - color: ${({ theme }) => theme.palette.onPrimary.main}; - padding: 0.625rem 1.5rem; - border-radius: 1.25rem; +const getColorBasedOnKind = (kind: 'Filled' | 'Tonal') => { + switch (kind) { + case 'Filled': + return { + color: ({ theme }) => theme.palette.onPrimary.main, + bgColor: ({ theme }) => theme.palette.primary.main, + }; + case 'Tonal': + return { + color: ({ theme }) => theme.palette.onSecondaryContainer.main, + bgColor: ({ theme }) => theme.palette.secondaryContainer.main, + }; } -`; +}; + +export default function Button({ + className, + kind, + fullWidth, + children, + ...rest +}: Props) { + const StyledButton = styled(ButtonBase)` + & .MuiButtonBase-root { + background-color: ${getColorBasedOnKind(kind).bgColor}; + color: ${getColorBasedOnKind(kind).color}; + padding: 0.625rem 1.5rem; + border-radius: 6.25rem; + width: ${fullWidth ? '100%' : 'auto'}; + cursor: pointer; + } + `; -export default function Button({ children, ...rest }: Props) { return ( - - + + {children} diff --git a/components/header/Profile.tsx b/components/header/Profile.tsx index 676dd98..b4af59e 100644 --- a/components/header/Profile.tsx +++ b/components/header/Profile.tsx @@ -4,7 +4,9 @@ import { useState } from 'react'; import Image from 'next/image'; import Button from '../button/Button'; -import PopUp from '../PopUp/PopUp'; +import PopUp from '../popUp/PopUp'; + +import { Authentication } from './authentication/Authentication'; interface Props { isLoggedIn: boolean; @@ -37,7 +39,9 @@ export const Profile = ({ isLoggedIn }: Props) => { /> ) : ( - + )} {isOpen && ( { state={isOpen} handleClose={() => setIsOpen(false)} > -
+
)} diff --git a/components/header/authentication/Authentication.tsx b/components/header/authentication/Authentication.tsx new file mode 100644 index 0000000..4a4a3dc --- /dev/null +++ b/components/header/authentication/Authentication.tsx @@ -0,0 +1,49 @@ +import React from 'react'; + +import Image from 'next/image'; + +import CenteredTabs from '@/components/tabs/Tabs'; + +import { ErgoPay } from './ErgoPay'; +import { Google } from './Google'; +import { Nautilus } from './Nautilus'; + +export const Authentication = () => { + return ( +
+ }, + { + label: 'Login via wallet', + children: ( +
+ +
+ nautilusLogo logo + + Or + + nautilusLogo logo +
+ +
+ ), + }, + ]} + /> +
+ ); +}; diff --git a/components/header/authentication/ErgoPay.tsx b/components/header/authentication/ErgoPay.tsx new file mode 100644 index 0000000..33148d6 --- /dev/null +++ b/components/header/authentication/ErgoPay.tsx @@ -0,0 +1,12 @@ +import React from 'react'; + +// import { authApiGateway } from '@/api/auth'; +import Button from '@/components/button/Button'; + +export const ErgoPay = () => { + return ( + + ); +}; diff --git a/components/header/authentication/Google.tsx b/components/header/authentication/Google.tsx new file mode 100644 index 0000000..d766d6a --- /dev/null +++ b/components/header/authentication/Google.tsx @@ -0,0 +1,33 @@ +import React from 'react'; + +import Image from 'next/image'; + +// import { authApiGateway } from '@/api/auth'; +import Button from '@/components/button/Button'; + +interface Props { + className?: string; +} + +export const Google = ({ className }: Props) => { + // const { useGoogleRequest, useGoogleCallback } = authApiGateway; + // const googleRequest = useGoogleRequest(); + // const googleCallback = useGoogleCallback(); + + return ( + + ); +}; diff --git a/components/header/authentication/Nautilus.tsx b/components/header/authentication/Nautilus.tsx new file mode 100644 index 0000000..eabe918 --- /dev/null +++ b/components/header/authentication/Nautilus.tsx @@ -0,0 +1,65 @@ +'use client'; +import React from 'react'; + +import { Address } from '@ergolabs/ergo-sdk'; +import Image from 'next/image'; +import { Observable, of, throwError } from 'rxjs'; + +import Button from '@/components/button/Button'; + +export const Nautilus = () => { + const ergoConnector = window.ergoConnector; + + const connectWallet = (): Observable => { + if (!ergoConnector?.nautilus) { + return throwError(() => new Error('EXTENSION_NOT_FOUND')); + } + + if (!ergoConnector.nautilus?.getContext) { + return of( + <> + Wallet API has changed. Be sure to update your wallet to continue + using it + , + ); + } + + return ergoConnector.nautilus.connect(); + }; + + const getUsedAddresses = async (): Observable => { + const walletAddress = await ergoConnector.nautilus + .getContext() + .then(async (context) => { + console.log('Wallet Address:', await context.get_used_addresses()[0]); + + return context.get_used_addresses(); + }) + .catch((error: Error) => { + throw error; + }); + + return walletAddress; + }; + + connectWallet(); + + return ( + + ); +}; diff --git a/components/providers/index.tsx b/components/providers/index.tsx index 7f9b171..cc1a09b 100644 --- a/components/providers/index.tsx +++ b/components/providers/index.tsx @@ -6,7 +6,7 @@ import { ReactQueryProviders } from '@/context/reactQuery'; export const AppProviders = ({ children }: { children: ReactNode }) => { return ( - {children} + {children} ); }; diff --git a/components/tabs/TabPanel.tsx b/components/tabs/TabPanel.tsx new file mode 100644 index 0000000..4faa20a --- /dev/null +++ b/components/tabs/TabPanel.tsx @@ -0,0 +1,30 @@ +import React from 'react'; + +import Box from '@mui/material/Box'; +import Typography from '@mui/material/Typography'; + +interface TabPanelProps { + children?: React.ReactNode; + index: number; + value: number; +} + +export const TabPanel = (props: TabPanelProps) => { + const { children, value, index, ...other } = props; + + return ( + + ); +}; diff --git a/components/tabs/Tabs.tsx b/components/tabs/Tabs.tsx index 140137b..e568013 100644 --- a/components/tabs/Tabs.tsx +++ b/components/tabs/Tabs.tsx @@ -1,10 +1,34 @@ import React, { useState, SyntheticEvent } from 'react'; +import { styled } from '@mui/material'; import Box from '@mui/material/Box'; import Tab from '@mui/material/Tab'; import Tabs from '@mui/material/Tabs'; -export default function CenteredTabs() { +import { TabPanel } from './TabPanel'; + +interface TabProps { + label: string; + children?: React.ReactNode; +} + +interface TabsProps { + tabs: TabProps[]; +} + +const StyledTab = styled(Tab)` + &.MuiTab-root { + color: ${({ theme }) => theme.palette.onSurfaceVariant.main}; + padding: 0.875rem 1rem; + text-transform: none; + margin: 0 3.75rem; + } + &.Mui-selected { + color: ${({ theme }) => theme.palette.primary.main}; + } +`; + +export default function CenteredTabs({ tabs }: TabsProps) { const [value, setValue] = useState(0); const handleChange = (event: SyntheticEvent, newValue: number) => { @@ -12,12 +36,24 @@ export default function CenteredTabs() { }; return ( - - - - - - - + <> + + + {tabs?.map((tab, index) => ( + + ))} + + + {tabs?.map((tab, index) => ( + + {tab.children} + + ))} + ); } diff --git a/package.json b/package.json index 9f79b69..195b18c 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,8 @@ "dependencies": { "@emotion/react": "^11.11.3", "@emotion/styled": "^11.11.0", + "@ergolabs/ergo-dex-sdk": "^1.9.67-beta.4", + "@ergolabs/ergo-sdk": "^0.5.7", "@mui/material": "^5.15.7", "@tanstack/react-query": "^4.35.3", "@tanstack/react-query-devtools": "^4.35.3", @@ -21,7 +23,8 @@ "lottie-react": "^2.4.0", "next": "14.0.4", "react": "^18", - "react-dom": "^18" + "react-dom": "^18", + "rxjs": "^7.8.1" }, "devDependencies": { "@types/node": "^20", diff --git a/public/images/googleLogo.svg b/public/images/googleLogo.svg new file mode 100644 index 0000000..e6faeae --- /dev/null +++ b/public/images/googleLogo.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/public/images/line.svg b/public/images/line.svg new file mode 100644 index 0000000..54e56ec --- /dev/null +++ b/public/images/line.svg @@ -0,0 +1,3 @@ + + + diff --git a/public/images/nautilusLogo.svg b/public/images/nautilusLogo.svg new file mode 100644 index 0000000..f7c049d --- /dev/null +++ b/public/images/nautilusLogo.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/scenes/landing/reward/earnings/Earnings.tsx b/scenes/landing/reward/earnings/Earnings.tsx index b9dbd6c..60a1f86 100644 --- a/scenes/landing/reward/earnings/Earnings.tsx +++ b/scenes/landing/reward/earnings/Earnings.tsx @@ -26,7 +26,7 @@ export const Earnings = () => { - + ); }; diff --git a/scenes/landing/statistics/Statistics.tsx b/scenes/landing/statistics/Statistics.tsx index fcfbdc5..bea1af7 100644 --- a/scenes/landing/statistics/Statistics.tsx +++ b/scenes/landing/statistics/Statistics.tsx @@ -16,7 +16,7 @@ export const Statistics = () => { - + ); }; diff --git a/utils/constants.ts b/utils/constants.ts new file mode 100644 index 0000000..54aa024 --- /dev/null +++ b/utils/constants.ts @@ -0,0 +1,3 @@ +export const apiConfig = { + BASE_API_URL: process.env.NEXT_PUBLIC_BASE_API_URL, +}; diff --git a/utils/http-client.ts b/utils/http-client.ts new file mode 100644 index 0000000..d36fdca --- /dev/null +++ b/utils/http-client.ts @@ -0,0 +1,27 @@ +import { apiConfig } from '@/utils/constants'; +import { ApiError, ApiResponse } from '@/utils/types'; + +export const httpClient = { + async get( + url: string, + data?: D, + ): Promise | ApiError> { + const res = await fetch(`${apiConfig.BASE_API_URL}${url}`, { + method: 'GET', + body: JSON.stringify(data), + }); + + return await res.json(); + }, + async post( + url: string, + data: D, + ): Promise | ApiError> { + const response = await fetch(`${apiConfig.BASE_API_URL}${url}`, { + method: 'POST', + body: JSON.stringify(data), + }); + + return await response.json(); + }, +}; diff --git a/utils/query-key-factory.ts b/utils/query-key-factory.ts new file mode 100644 index 0000000..0fc871d --- /dev/null +++ b/utils/query-key-factory.ts @@ -0,0 +1,30 @@ +import { QueryKey } from '@tanstack/react-query'; + +type FunctionQueryKey = ( + ...args: ArgsType[] +) => ReturnType; + +type KeysObject = Record; + +export const createKeyFactory = ( + baseName: B, + keysObject: K, +): K => { + const newKeysObject: Record = {}; + + Object.keys(keysObject as object).forEach((key) => { + newKeysObject[key] = (...args) => { + let filteredKeys: unknown[] = []; + + if (keysObject[key as keyof K]) { + const keys = (keysObject[key as keyof K] as FunctionQueryKey)(...args); + + filteredKeys = keys.filter((k) => k !== undefined && k !== null); + } + + return [baseName, key, ...filteredKeys]; + }; + }); + + return newKeysObject as K; +}; diff --git a/utils/react-query-keys.ts b/utils/react-query-keys.ts new file mode 100644 index 0000000..d676b9b --- /dev/null +++ b/utils/react-query-keys.ts @@ -0,0 +1,22 @@ +import { + NautilusBodyRequest, + ErgoPayRequestParameter, +} from '@/api/auth/authApi.types'; +import { createKeyFactory } from '@/utils/query-key-factory'; + +const authKeys = createKeyFactory('auth', { + useGoogleRequest: () => [null], + + useGoogleCallback: () => [null], + + useNautilus: (body: NautilusBodyRequest) => Object.values(body), + + useErgoPay: (params: ErgoPayRequestParameter) => Object.values(params), + + useErgoPaySignIn: (params: ErgoPayRequestParameter, body: string) => + Object.values(params), +}); + +export const queryKeys = { + authKeys, +}; diff --git a/utils/types.ts b/utils/types.ts new file mode 100644 index 0000000..6d95c25 --- /dev/null +++ b/utils/types.ts @@ -0,0 +1,9 @@ +export interface ApiResponse { + response: T; +} + +export interface ApiError { + statusCode: number; + message: string; + error?: string; +} diff --git a/yarn.lock b/yarn.lock index a8196f3..35b4b83 100644 --- a/yarn.lock +++ b/yarn.lock @@ -46,7 +46,7 @@ chalk "^2.4.2" js-tokens "^4.0.0" -"@babel/runtime@^7.12.5", "@babel/runtime@^7.18.3", "@babel/runtime@^7.23.2", "@babel/runtime@^7.23.9", "@babel/runtime@^7.5.5", "@babel/runtime@^7.8.7": +"@babel/runtime@^7.12.5", "@babel/runtime@^7.15.4", "@babel/runtime@^7.18.3", "@babel/runtime@^7.23.2", "@babel/runtime@^7.23.9", "@babel/runtime@^7.5.5", "@babel/runtime@^7.8.7": version "7.23.9" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.23.9.tgz#47791a15e4603bb5f905bc0753801cf21d6345f7" integrity sha512-0CX6F+BI2s9dkUqr08KFrAIZgNFj75rdBU/DjCyYLIaV/quFjkk6T+EJ2LkZHyZTbEV4L5p97mNkUsHl2wLFAw== @@ -169,6 +169,39 @@ resolved "https://registry.yarnpkg.com/@emotion/weak-memoize/-/weak-memoize-0.3.1.tgz#d0fce5d07b0620caa282b5131c297bb60f9d87e6" integrity sha512-EsBwpc7hBUJWAsNPBmJy4hxWx12v6bshQsldrVmjxJoc3isbxhOrF2IcCpaXxfvq03NwkI7sbsOLXbYuqF/8Ww== +"@ergolabs/ergo-dex-sdk@^1.9.67-beta.4": + version "1.9.67-beta.4" + resolved "https://registry.yarnpkg.com/@ergolabs/ergo-dex-sdk/-/ergo-dex-sdk-1.9.67-beta.4.tgz#e8721d17a9cdcbcd0fdbed7b777519184afcdfd9" + integrity sha512-uy77cWzMFtQSJg8ad1GAsIXcVG91bLD8wbDYLyyi+HxP8Oh5SIptsMhhg9ist+SQOFkSab7dr9PLl2zK/r3PUQ== + dependencies: + "@ergolabs/ergo-sdk" "^0.5.7" + axios "^0.21.1" + blakejs "^1.1.0" + bs58 "^4.0.1" + crypto-js "^4.0.0" + ergo-lib-wasm-browser "0.20.1" + ergo-lib-wasm-nodejs "0.20.1" + esm-wallaby "^3.2.25" + json-bigint "^1.0.0" + mathjs "^9.4.4" + ramda "0.27.1" + +"@ergolabs/ergo-sdk@^0.5.7": + version "0.5.7" + resolved "https://registry.yarnpkg.com/@ergolabs/ergo-sdk/-/ergo-sdk-0.5.7.tgz#cb65f3f5d7fb72058ebf1e1188205e01630f7997" + integrity sha512-4hK5nKXdmqQOaBdNufdfOYLO41jnPOwAy8dOv1gveQRYYzlm2QXXIGMriyRGAhBD4rUa5afHSL+nTW7VMuGC3Q== + dependencies: + axios "^0.21.1" + blakejs "^1.1.0" + bs58 "^4.0.1" + crypto-js "^4.0.0" + ergo-lib-wasm-browser "^0.20.1" + ergo-lib-wasm-nodejs "^0.20.1" + esm-wallaby "^3.2.25" + json-bigint "^1.0.0" + mathjs "^9.4.4" + ramda "0.27.1" + "@eslint-community/eslint-utils@^4.2.0", "@eslint-community/eslint-utils@^4.4.0": version "4.4.0" resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz#a23514e8fb9af1269d5f7788aa556798d61c6b59" @@ -201,7 +234,7 @@ resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.56.0.tgz#ef20350fec605a7f7035a01764731b2de0f3782b" integrity sha512-gMsVel9D7f2HLkBma9VbtzZRehRogVRfbr++f06nL2vnCGCNlzOD+/MUov/F4p8myyAHspEhVobgjpX64q5m6A== -"@floating-ui/core@^1.6.0": +"@floating-ui/core@^1.0.0": version "1.6.0" resolved "https://registry.yarnpkg.com/@floating-ui/core/-/core-1.6.0.tgz#fa41b87812a16bf123122bf945946bae3fdf7fc1" integrity sha512-PcF++MykgmTj3CIyOQbKA/hDzOAiqI3mhuoN44WRCopIs1sgoDoU4oty4Jtqaj/y3oDU6fnVSm4QG0a3t5i0+g== @@ -209,12 +242,12 @@ "@floating-ui/utils" "^0.2.1" "@floating-ui/dom@^1.6.1": - version "1.6.1" - resolved "https://registry.yarnpkg.com/@floating-ui/dom/-/dom-1.6.1.tgz#d552e8444f77f2d88534372369b3771dc3a2fa5d" - integrity sha512-iA8qE43/H5iGozC3W0YSnVSW42Vh522yyM1gj+BqRwVsTNOyr231PsXDaV04yT39PsO0QL2QpbI/M0ZaLUQgRQ== + version "1.6.3" + resolved "https://registry.yarnpkg.com/@floating-ui/dom/-/dom-1.6.3.tgz#954e46c1dd3ad48e49db9ada7218b0985cee75ef" + integrity sha512-RnDthu3mzPlQ31Ss/BTwQ1zjzIhr3lk1gZB1OC56h/1vEtaXkESrOqL5fQVMfXpwGtRwX+YsZBdyHtJMQnkArw== dependencies: - "@floating-ui/core" "^1.6.0" - "@floating-ui/utils" "^0.2.1" + "@floating-ui/core" "^1.0.0" + "@floating-ui/utils" "^0.2.0" "@floating-ui/react-dom@^2.0.8": version "2.0.8" @@ -223,7 +256,7 @@ dependencies: "@floating-ui/dom" "^1.6.1" -"@floating-ui/utils@^0.2.1": +"@floating-ui/utils@^0.2.0", "@floating-ui/utils@^0.2.1": version "0.2.1" resolved "https://registry.yarnpkg.com/@floating-ui/utils/-/utils-0.2.1.tgz#16308cea045f0fc777b6ff20a9f25474dd8293d2" integrity sha512-9TANp6GPoMtYzQdt54kfAyMmz1+osLlXdg2ENroU7zzrtflTLrrC/lgrIfaSe+Wu0b89GKccT7vxXA0MoAIO+Q== @@ -269,9 +302,9 @@ "@jridgewell/trace-mapping" "^0.3.9" "@jridgewell/resolve-uri@^3.1.0": - version "3.1.1" - resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz#c08679063f279615a3326583ba3a90d1d82cc721" - integrity sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA== + version "3.1.2" + resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz#7a0ee601f60f99a20c7c7c5ff0c80388c1189bd6" + integrity sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw== "@jridgewell/set-array@^1.0.1": version "1.1.2" @@ -291,73 +324,73 @@ "@jridgewell/resolve-uri" "^3.1.0" "@jridgewell/sourcemap-codec" "^1.4.14" -"@mui/base@5.0.0-beta.34": - version "5.0.0-beta.34" - resolved "https://registry.yarnpkg.com/@mui/base/-/base-5.0.0-beta.34.tgz#44b0f203250a6e3b2d810f37c9720d114182abd0" - integrity sha512-e2mbTGTtReD/y5RFwnhkl1Tgl3XwgJhY040IlfkTVaU9f5LWrVhEnpRsYXu3B1CtLrwiWs4cu7aMHV9yRd4jpw== +"@mui/base@5.0.0-beta.36": + version "5.0.0-beta.36" + resolved "https://registry.yarnpkg.com/@mui/base/-/base-5.0.0-beta.36.tgz#29ca2de9d387f6d3943b6f18a84415c43e5f206c" + integrity sha512-6A8fYiXgjqTO6pgj31Hc8wm1M3rFYCxDRh09dBVk0L0W4cb2lnurRJa3cAyic6hHY+we1S58OdGYRbKmOsDpGQ== dependencies: "@babel/runtime" "^7.23.9" "@floating-ui/react-dom" "^2.0.8" "@mui/types" "^7.2.13" - "@mui/utils" "^5.15.7" + "@mui/utils" "^5.15.9" "@popperjs/core" "^2.11.8" clsx "^2.1.0" prop-types "^15.8.1" -"@mui/core-downloads-tracker@^5.15.7": - version "5.15.8" - resolved "https://registry.yarnpkg.com/@mui/core-downloads-tracker/-/core-downloads-tracker-5.15.8.tgz#8af5b84d6078e7f65e1d2f01af38487f7ce517e1" - integrity sha512-W6R1dZJgbYfLmQKf7Es2WUw0pkDkEVUf2jA22DYu0JOa9M3pjvOqoC9HgOPGNNJTu6SCWLSWh3euv1Jn2NmeQA== +"@mui/core-downloads-tracker@^5.15.10": + version "5.15.10" + resolved "https://registry.yarnpkg.com/@mui/core-downloads-tracker/-/core-downloads-tracker-5.15.10.tgz#616bfb54e3860268d56ff59cd187d47044d954f3" + integrity sha512-qPv7B+LeMatYuzRjB3hlZUHqinHx/fX4YFBiaS19oC02A1e9JFuDKDvlyRQQ5oRSbJJt0QlaLTlr0IcauVcJRQ== "@mui/material@^5.15.7": - version "5.15.7" - resolved "https://registry.yarnpkg.com/@mui/material/-/material-5.15.7.tgz#8496d8a2b9f0409a0f82b93f819a48f6f82bc12f" - integrity sha512-l6+AiKZH3iOJmZCnlpel8ghYQe9Lq0BEuKP8fGj3g5xz4arO9GydqYAtLPMvuHKtArj8lJGNuT2yHYxmejincA== + version "5.15.10" + resolved "https://registry.yarnpkg.com/@mui/material/-/material-5.15.10.tgz#6533ba53edbd0790dbc5bb7e9e173f6069ffd7e6" + integrity sha512-YJJGHjwDOucecjDEV5l9ISTCo+l9YeWrho623UajzoHRYxuKUmwrGVYOW4PKwGvCx9SU9oklZnbbi2Clc5XZHw== dependencies: "@babel/runtime" "^7.23.9" - "@mui/base" "5.0.0-beta.34" - "@mui/core-downloads-tracker" "^5.15.7" - "@mui/system" "^5.15.7" + "@mui/base" "5.0.0-beta.36" + "@mui/core-downloads-tracker" "^5.15.10" + "@mui/system" "^5.15.9" "@mui/types" "^7.2.13" - "@mui/utils" "^5.15.7" + "@mui/utils" "^5.15.9" "@types/react-transition-group" "^4.4.10" clsx "^2.1.0" - csstype "^3.1.2" + csstype "^3.1.3" prop-types "^15.8.1" react-is "^18.2.0" react-transition-group "^4.4.5" -"@mui/private-theming@^5.15.8": - version "5.15.8" - resolved "https://registry.yarnpkg.com/@mui/private-theming/-/private-theming-5.15.8.tgz#c545f09e125f4dceb6afcc2d0df58aaf19b3a98a" - integrity sha512-HMDPO416iMZPqs8nGUL3GJMDNpJtE1Uefw/Aw+zTKJHX5JnT+Bms41e2065BUT/zR5dYcKjFP4gQMwW5QX7nvA== +"@mui/private-theming@^5.15.9": + version "5.15.9" + resolved "https://registry.yarnpkg.com/@mui/private-theming/-/private-theming-5.15.9.tgz#3ea3514ed2f6bf68541dbe9206665a82cd89cb01" + integrity sha512-/aMJlDOxOTAXyp4F2rIukW1O0anodAMCkv1DfBh/z9vaKHY3bd5fFf42wmP+0GRmwMinC5aWPpNfHXOED1fEtg== dependencies: "@babel/runtime" "^7.23.9" - "@mui/utils" "^5.15.8" + "@mui/utils" "^5.15.9" prop-types "^15.8.1" -"@mui/styled-engine@^5.15.8": - version "5.15.8" - resolved "https://registry.yarnpkg.com/@mui/styled-engine/-/styled-engine-5.15.8.tgz#c60c0cf89ae7514e5b29b81fb43fc48dfd159f48" - integrity sha512-31ZKPGsS0OiSwuzi8RWoTiWRdUWXPRiOQkyG9bRYX/zvoYeBXEdbsLEgbryug5mVRsPpvwbH5q/i/t6MkjQ71g== +"@mui/styled-engine@^5.15.9": + version "5.15.9" + resolved "https://registry.yarnpkg.com/@mui/styled-engine/-/styled-engine-5.15.9.tgz#444605039ec3fe456bdd5d5cb94330183be62b91" + integrity sha512-NRKtYkL5PZDH7dEmaLEIiipd3mxNnQSO+Yo8rFNBNptY8wzQnQ+VjayTq39qH7Sast5cwHKYFusUrQyD+SS4Og== dependencies: "@babel/runtime" "^7.23.9" "@emotion/cache" "^11.11.0" - csstype "^3.1.2" + csstype "^3.1.3" prop-types "^15.8.1" -"@mui/system@^5.15.7": - version "5.15.8" - resolved "https://registry.yarnpkg.com/@mui/system/-/system-5.15.8.tgz#0b62ae10a06d380455172dd8dc1c3633a70c2571" - integrity sha512-BUMJvlz1UqIqDPyrvc+MwjOUkWKskUPAOUuRh2KMAworiXuuUmtIivxSfdGll2ex6RHSylu4yc5dJZByOI8EcQ== +"@mui/system@^5.15.9": + version "5.15.9" + resolved "https://registry.yarnpkg.com/@mui/system/-/system-5.15.9.tgz#8a34ac0ab133af2550cc7ab980a35174142fd265" + integrity sha512-SxkaaZ8jsnIJ77bBXttfG//LUf6nTfOcaOuIgItqfHv60ZCQy/Hu7moaob35kBb+guxVJnoSZ+7vQJrA/E7pKg== dependencies: "@babel/runtime" "^7.23.9" - "@mui/private-theming" "^5.15.8" - "@mui/styled-engine" "^5.15.8" + "@mui/private-theming" "^5.15.9" + "@mui/styled-engine" "^5.15.9" "@mui/types" "^7.2.13" - "@mui/utils" "^5.15.8" + "@mui/utils" "^5.15.9" clsx "^2.1.0" - csstype "^3.1.2" + csstype "^3.1.3" prop-types "^15.8.1" "@mui/types@^7.2.13": @@ -365,10 +398,10 @@ resolved "https://registry.yarnpkg.com/@mui/types/-/types-7.2.13.tgz#d1584912942f9dc042441ecc2d1452be39c666b8" integrity sha512-qP9OgacN62s+l8rdDhSFRe05HWtLLJ5TGclC9I1+tQngbssu0m2dmFZs+Px53AcOs9fD7TbYd4gc9AXzVqO/+g== -"@mui/utils@^5.15.7", "@mui/utils@^5.15.8": - version "5.15.8" - resolved "https://registry.yarnpkg.com/@mui/utils/-/utils-5.15.8.tgz#b7a6df7bafb9f366ef32fcb3bc97f63a38a2e4a7" - integrity sha512-Q6Z/xSxi1Z6xQ5Qj9p4ZTHudwfrrwFALtU6H1O222pXudg9Qm0zHdiwJQiHT9L6jMIN78ZujEfGHserMoHUrQw== +"@mui/utils@^5.15.9": + version "5.15.9" + resolved "https://registry.yarnpkg.com/@mui/utils/-/utils-5.15.9.tgz#2bdf925e274d87cbe90c14eb52d0835318205e86" + integrity sha512-yDYfr61bCYUz1QtwvpqYy/3687Z8/nS4zv7lv/ih/6ZFGMl1iolEvxRmR84v2lOYxlds+kq1IVYbXxDKh8Z9sg== dependencies: "@babel/runtime" "^7.23.9" "@types/prop-types" "^15.7.11" @@ -535,9 +568,9 @@ integrity sha512-ga8y9v9uyeiLdpKddhxYQkxNDrfvuPrlFb0N1qnZZByvcElJaXthF1UhvCh9TLWJBEHeNtdnbysW7Y6Uq8CVng== "@types/react-dom@^18": - version "18.2.18" - resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-18.2.18.tgz#16946e6cd43971256d874bc3d0a72074bb8571dd" - integrity sha512-TJxDm6OfAX2KJWJdMEVTwWke5Sc/E/RlnPGvGfS0W7+6ocy2xhDVQVh/KvC2Uf7kACs+gDytdusDSdWfWkaNzw== + version "18.2.19" + resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-18.2.19.tgz#b84b7c30c635a6c26c6a6dfbb599b2da9788be58" + integrity sha512-aZvQL6uUbIJpjZk4U8JZGbau9KDeAwMfmhyWorxgBkqDIEf6ROjRozcmPIicqsUwPUjbkDfHKgGee1Lq65APcA== dependencies: "@types/react" "*" @@ -563,9 +596,9 @@ integrity sha512-WZLiwShhwLRmeV6zH+GkbOFT6Z6VklCItrDioxUnv+u4Ll+8vKeFySoFyK/0ctcRpOmwAicELfmys1sDc/Rw+A== "@types/semver@^7.5.0": - version "7.5.6" - resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.6.tgz#c65b2bfce1bec346582c07724e3f8c1017a20339" - integrity sha512-dn1l8LaMea/IjDoHNd9J52uBbInB796CDffS6VdIxvqYCPSG0V0DzHp76GpaWnlhg88uYyPbXCDIowa86ybd5A== + version "7.5.7" + resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.7.tgz#326f5fdda70d13580777bcaa1bc6fa772a5aef0e" + integrity sha512-/wdoPq1QqkSj9/QOeKkFquEuPzQbHTWAMPH/PaUMB+JuR31lXhlWXRZ52IpfDYVlDOUBvX09uBrPwxGT1hjNBg== "@typescript-eslint/eslint-plugin@^6.21.0": version "6.21.0" @@ -737,7 +770,7 @@ aria-query@^5.3.0: dependencies: dequal "^2.0.3" -array-buffer-byte-length@^1.0.0, array-buffer-byte-length@^1.0.1: +array-buffer-byte-length@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz#1e5583ec16763540a27ae52eed99ff899223568f" integrity sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg== @@ -814,7 +847,7 @@ array.prototype.tosorted@^1.1.1: es-errors "^1.1.0" es-shim-unscopables "^1.0.2" -arraybuffer.prototype.slice@^1.0.2: +arraybuffer.prototype.slice@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.3.tgz#097972f4255e41bc3425e37dc3f6421cf9aefde6" integrity sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A== @@ -862,6 +895,13 @@ axe-core@=4.7.0: resolved "https://registry.yarnpkg.com/axe-core/-/axe-core-4.7.0.tgz#34ba5a48a8b564f67e103f0aa5768d76e15bbbbf" integrity sha512-M0JtH+hlOL5pLQwHOLNYZaXuhqmvS8oExsqB1SBYgA4Dk7u/xx+YdGHXaK5pyUfed5mYXdlYiphWq3G8cRi5JQ== +axios@^0.21.1: + version "0.21.4" + resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.4.tgz#c67b90dc0568e5c1cf2b0b858c43ba28e2eda575" + integrity sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg== + dependencies: + follow-redirects "^1.14.0" + axobject-query@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/axobject-query/-/axobject-query-3.2.1.tgz#39c378a6e3b06ca679f29138151e45b2b32da62a" @@ -883,11 +923,28 @@ balanced-match@^1.0.0: resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== +base-x@^3.0.2: + version "3.0.9" + resolved "https://registry.yarnpkg.com/base-x/-/base-x-3.0.9.tgz#6349aaabb58526332de9f60995e548a53fe21320" + integrity sha512-H7JU6iBHTal1gp56aKoaa//YUxEaAOUiydvrV/pILqIHXTtqxSkATOnDA2u+jZ/61sD+L/412+7kzXRtWukhpQ== + dependencies: + safe-buffer "^5.0.1" + +bignumber.js@^9.0.0: + version "9.1.2" + resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.1.2.tgz#b7c4242259c008903b13707983b5f4bbd31eda0c" + integrity sha512-2/mKyZH9K85bzOEfhXDBFZTGd1CTs+5IHpeFQo9luiBG7hghdC851Pj2WAhb6E3R6b9tZj/XKhbg4fum+Kepug== + binary-extensions@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== +blakejs@^1.1.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/blakejs/-/blakejs-1.2.1.tgz#5057e4206eadb4a97f7c0b6e197a505042fc3814" + integrity sha512-QXUSXI3QVc/gJME0dBpXrag1kbzOqCjCX8/b54ntNyW6sjtoqxqRk3LTmXzaJoh71zMsDCjM+47jS7XiwN/+fQ== + brace-expansion@^1.1.7: version "1.1.11" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" @@ -911,15 +968,22 @@ braces@^3.0.2, braces@~3.0.2: fill-range "^7.0.1" browserslist@^4.22.2: - version "4.22.3" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.22.3.tgz#299d11b7e947a6b843981392721169e27d60c5a6" - integrity sha512-UAp55yfwNv0klWNapjs/ktHoguxuQNGnOzxYmfnXIS+8AsRDZkSDxg7R1AX3GKzn078SBI5dzwzj/Yx0Or0e3A== + version "4.23.0" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.23.0.tgz#8f3acc2bbe73af7213399430890f86c63a5674ab" + integrity sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ== dependencies: - caniuse-lite "^1.0.30001580" - electron-to-chromium "^1.4.648" + caniuse-lite "^1.0.30001587" + electron-to-chromium "^1.4.668" node-releases "^2.0.14" update-browserslist-db "^1.0.13" +bs58@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/bs58/-/bs58-4.0.1.tgz#be161e76c354f6f788ae4071f63f34e8c4f0a42a" + integrity sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw== + dependencies: + base-x "^3.0.2" + busboy@1.6.0: version "1.6.0" resolved "https://registry.yarnpkg.com/busboy/-/busboy-1.6.0.tgz#966ea36a9502e43cdb9146962523b92f531f6893" @@ -927,15 +991,16 @@ busboy@1.6.0: dependencies: streamsearch "^1.1.0" -call-bind@^1.0.2, call-bind@^1.0.5, call-bind@^1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.6.tgz#6c46675fc7a5e9de82d75a233d586c8b7ac0d931" - integrity sha512-Mj50FLHtlsoVfRfnHaZvyrooHcrlceNZdL/QBvJJVd9Ta55qCQK0gs4ss2oZDeV9zFCs6ewzYgVE5yfVmfFpVg== +call-bind@^1.0.2, call-bind@^1.0.5, call-bind@^1.0.6, call-bind@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.7.tgz#06016599c40c56498c18769d2730be242b6fa3b9" + integrity sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w== dependencies: + es-define-property "^1.0.0" es-errors "^1.3.0" function-bind "^1.1.2" - get-intrinsic "^1.2.3" - set-function-length "^1.2.0" + get-intrinsic "^1.2.4" + set-function-length "^1.2.1" callsites@^3.0.0: version "3.1.0" @@ -947,10 +1012,10 @@ camelcase-css@^2.0.1: resolved "https://registry.yarnpkg.com/camelcase-css/-/camelcase-css-2.0.1.tgz#ee978f6947914cc30c6b44741b6ed1df7f043fd5" integrity sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA== -caniuse-lite@^1.0.30001406, caniuse-lite@^1.0.30001578, caniuse-lite@^1.0.30001580: - version "1.0.30001585" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001585.tgz#0b4e848d84919c783b2a41c13f7de8ce96744401" - integrity sha512-yr2BWR1yLXQ8fMpdS/4ZZXpseBgE7o4g41x3a6AJOqZuOi+iE/WdJYAuZ6Y95i4Ohd2Y+9MzIWRR+uGABH4s3Q== +caniuse-lite@^1.0.30001406, caniuse-lite@^1.0.30001578, caniuse-lite@^1.0.30001587: + version "1.0.30001587" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001587.tgz#a0bce920155fa56a1885a69c74e1163fc34b4881" + integrity sha512-HMFNotUmLXn71BQxg8cijvqxnIAofforZOwGsxyXJ0qugTdspUF4sPSJ2vhgprHCB996tIDzEq1ubumPDV8ULA== chalk@^2.4.2: version "2.4.2" @@ -1023,6 +1088,11 @@ commander@^4.0.0: resolved "https://registry.yarnpkg.com/commander/-/commander-4.1.1.tgz#9fd602bd936294e9e9ef46a3f4d6964044b18068" integrity sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA== +complex.js@^2.0.15: + version "2.1.1" + resolved "https://registry.yarnpkg.com/complex.js/-/complex.js-2.1.1.tgz#0675dac8e464ec431fb2ab7d30f41d889fb25c31" + integrity sha512-8njCHOTtFFLtegk6zQo0kkVX1rngygb/KQI6z1qZxlFI3scluC+LVTCFbrkWjBv4vvLlbQ9t88IPMC6k95VTTg== + concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" @@ -1060,12 +1130,17 @@ cross-spawn@^7.0.0, cross-spawn@^7.0.2: shebang-command "^2.0.0" which "^2.0.1" +crypto-js@^4.0.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/crypto-js/-/crypto-js-4.2.0.tgz#4d931639ecdfd12ff80e8186dba6af2c2e856631" + integrity sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q== + cssesc@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-3.0.0.tgz#37741919903b868565e1c09ea747445cd18983ee" integrity sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg== -csstype@^3.0.2, csstype@^3.1.2: +csstype@^3.0.2, csstype@^3.1.3: version "3.1.3" resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.1.3.tgz#d80ff294d114fb0e6ac500fbf85b60137d7eff81" integrity sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw== @@ -1089,20 +1164,24 @@ debug@^4.3.1, debug@^4.3.2, debug@^4.3.4: dependencies: ms "2.1.2" +decimal.js@^10.3.1: + version "10.4.3" + resolved "https://registry.yarnpkg.com/decimal.js/-/decimal.js-10.4.3.tgz#1044092884d245d1b7f65725fa4ad4c6f781cc23" + integrity sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA== + deep-is@^0.1.3: version "0.1.4" resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== define-data-property@^1.0.1, define-data-property@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/define-data-property/-/define-data-property-1.1.2.tgz#f3c33b4f0102360cd7c0f5f28700f5678510b63a" - integrity sha512-SRtsSqsDbgpJBbW3pABMCOt6rQyeM8s8RiyeSN8jYG8sYmt/kGJejbydttUsnDs1tadr19tvhT4ShwMyoqAm4g== + version "1.1.4" + resolved "https://registry.yarnpkg.com/define-data-property/-/define-data-property-1.1.4.tgz#894dc141bb7d3060ae4366f6a0107e68fbe48c5e" + integrity sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A== dependencies: + es-define-property "^1.0.0" es-errors "^1.3.0" - get-intrinsic "^1.2.2" gopd "^1.0.1" - has-property-descriptors "^1.0.1" define-properties@^1.1.3, define-properties@^1.2.0, define-properties@^1.2.1: version "1.2.1" @@ -1162,10 +1241,10 @@ eastasianwidth@^0.2.0: resolved "https://registry.yarnpkg.com/eastasianwidth/-/eastasianwidth-0.2.0.tgz#696ce2ec0aa0e6ea93a397ffcf24aa7840c827cb" integrity sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA== -electron-to-chromium@^1.4.648: - version "1.4.659" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.659.tgz#e93af8119b6610cb4d2614a47508a74543b96ce5" - integrity sha512-sRJ3nV3HowrYpBtPF9bASQV7OW49IgZC01Xiq43WfSE3RTCkK0/JidoCmR73Hyc1mN+l/H4Yqx0eNiomvExFZg== +electron-to-chromium@^1.4.668: + version "1.4.672" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.672.tgz#f8ce803b43898b7e91dcfcf70d6fd656b11a645d" + integrity sha512-YYCy+goe3UqZqa3MOQCI5Mx/6HdBLzXL/mkbGCEWL3sP3Z1BP9zqAzeD3YEmLZlespYGFtyM8tRp5i2vfaUGCA== emoji-regex@^8.0.0: version "8.0.0" @@ -1185,6 +1264,16 @@ enhanced-resolve@^5.12.0: graceful-fs "^4.2.4" tapable "^2.2.0" +ergo-lib-wasm-browser@0.20.1, ergo-lib-wasm-browser@^0.20.1: + version "0.20.1" + resolved "https://registry.yarnpkg.com/ergo-lib-wasm-browser/-/ergo-lib-wasm-browser-0.20.1.tgz#68097ba6ddf464447866066c9c3f3d960651af7e" + integrity sha512-g324oXm9kdNphqVuiIzb1lWpawASp7zihcqc8wmr+/xwB8RBSEV+IBwAu4RYMRHNwlwffsPOtKvk+lRpxUFVxQ== + +ergo-lib-wasm-nodejs@0.20.1, ergo-lib-wasm-nodejs@^0.20.1: + version "0.20.1" + resolved "https://registry.yarnpkg.com/ergo-lib-wasm-nodejs/-/ergo-lib-wasm-nodejs-0.20.1.tgz#390802910290c37e83c5316028751ea5e4b41e79" + integrity sha512-2jGQ21HWQdsA9hOXr2DJS7iq32uIQHL45hxfNJ1VnYRUbVkQRpBWB7PRFKZvlIlZT6dIifcg8IacF6hqBOfB2g== + error-ex@^1.3.1: version "1.3.2" resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" @@ -1192,82 +1281,92 @@ error-ex@^1.3.1: dependencies: is-arrayish "^0.2.1" -es-abstract@^1.22.1, es-abstract@^1.22.3: - version "1.22.3" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.22.3.tgz#48e79f5573198de6dee3589195727f4f74bc4f32" - integrity sha512-eiiY8HQeYfYH2Con2berK+To6GrK2RxbPawDkGq4UiCQQfZHb6wX9qQqkbpPqaxQFcl8d9QzZqo0tGE0VcrdwA== +es-abstract@^1.22.1, es-abstract@^1.22.3, es-abstract@^1.22.4: + version "1.22.4" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.22.4.tgz#26eb2e7538c3271141f5754d31aabfdb215f27bf" + integrity sha512-vZYJlk2u6qHYxBOTjAeg7qUxHdNfih64Uu2J8QqWgXZ2cri0ZpJAkzDUK/q593+mvKwlxyaxr6F1Q+3LKoQRgg== dependencies: - array-buffer-byte-length "^1.0.0" - arraybuffer.prototype.slice "^1.0.2" - available-typed-arrays "^1.0.5" - call-bind "^1.0.5" - es-set-tostringtag "^2.0.1" + array-buffer-byte-length "^1.0.1" + arraybuffer.prototype.slice "^1.0.3" + available-typed-arrays "^1.0.6" + call-bind "^1.0.7" + es-define-property "^1.0.0" + es-errors "^1.3.0" + es-set-tostringtag "^2.0.2" es-to-primitive "^1.2.1" function.prototype.name "^1.1.6" - get-intrinsic "^1.2.2" - get-symbol-description "^1.0.0" + get-intrinsic "^1.2.4" + get-symbol-description "^1.0.2" globalthis "^1.0.3" gopd "^1.0.1" - has-property-descriptors "^1.0.0" + has-property-descriptors "^1.0.2" has-proto "^1.0.1" has-symbols "^1.0.3" - hasown "^2.0.0" - internal-slot "^1.0.5" - is-array-buffer "^3.0.2" + hasown "^2.0.1" + internal-slot "^1.0.7" + is-array-buffer "^3.0.4" is-callable "^1.2.7" is-negative-zero "^2.0.2" is-regex "^1.1.4" is-shared-array-buffer "^1.0.2" is-string "^1.0.7" - is-typed-array "^1.1.12" + is-typed-array "^1.1.13" is-weakref "^1.0.2" object-inspect "^1.13.1" object-keys "^1.1.1" - object.assign "^4.1.4" - regexp.prototype.flags "^1.5.1" - safe-array-concat "^1.0.1" - safe-regex-test "^1.0.0" + object.assign "^4.1.5" + regexp.prototype.flags "^1.5.2" + safe-array-concat "^1.1.0" + safe-regex-test "^1.0.3" string.prototype.trim "^1.2.8" string.prototype.trimend "^1.0.7" string.prototype.trimstart "^1.0.7" - typed-array-buffer "^1.0.0" + typed-array-buffer "^1.0.1" typed-array-byte-length "^1.0.0" typed-array-byte-offset "^1.0.0" typed-array-length "^1.0.4" unbox-primitive "^1.0.2" - which-typed-array "^1.1.13" + which-typed-array "^1.1.14" es-array-method-boxes-properly@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz#873f3e84418de4ee19c5be752990b2e44718d09e" integrity sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA== +es-define-property@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/es-define-property/-/es-define-property-1.0.0.tgz#c7faefbdff8b2696cf5f46921edfb77cc4ba3845" + integrity sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ== + dependencies: + get-intrinsic "^1.2.4" + es-errors@^1.0.0, es-errors@^1.1.0, es-errors@^1.2.1, es-errors@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/es-errors/-/es-errors-1.3.0.tgz#05f75a25dab98e4fb1dcd5e1472c0546d5057c8f" integrity sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw== es-iterator-helpers@^1.0.12, es-iterator-helpers@^1.0.15: - version "1.0.15" - resolved "https://registry.yarnpkg.com/es-iterator-helpers/-/es-iterator-helpers-1.0.15.tgz#bd81d275ac766431d19305923707c3efd9f1ae40" - integrity sha512-GhoY8uYqd6iwUl2kgjTm4CZAf6oo5mHK7BPqx3rKgx893YSsy0LGHV6gfqqQvZt/8xM8xeOnfXBCfqclMKkJ5g== + version "1.0.17" + resolved "https://registry.yarnpkg.com/es-iterator-helpers/-/es-iterator-helpers-1.0.17.tgz#123d1315780df15b34eb181022da43e734388bb8" + integrity sha512-lh7BsUqelv4KUbR5a/ZTaGGIMLCjPGPqJ6q+Oq24YP0RdyptX1uzm4vvaqzk7Zx3bpl/76YLTTDj9L7uYQ92oQ== dependencies: asynciterator.prototype "^1.0.0" - call-bind "^1.0.2" + call-bind "^1.0.7" define-properties "^1.2.1" - es-abstract "^1.22.1" - es-set-tostringtag "^2.0.1" - function-bind "^1.1.1" - get-intrinsic "^1.2.1" + es-abstract "^1.22.4" + es-errors "^1.3.0" + es-set-tostringtag "^2.0.2" + function-bind "^1.1.2" + get-intrinsic "^1.2.4" globalthis "^1.0.3" - has-property-descriptors "^1.0.0" + has-property-descriptors "^1.0.2" has-proto "^1.0.1" has-symbols "^1.0.3" - internal-slot "^1.0.5" + internal-slot "^1.0.7" iterator.prototype "^1.1.2" - safe-array-concat "^1.0.1" + safe-array-concat "^1.1.0" -es-set-tostringtag@^2.0.1: +es-set-tostringtag@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/es-set-tostringtag/-/es-set-tostringtag-2.0.2.tgz#11f7cc9f63376930a5f20be4915834f4bc74f9c9" integrity sha512-BuDyupZt65P9D2D2vA/zqcI3G5xRsklm5N3xCwuiy+/vKy8i0ifdsQP1sLgO4tZDSCaQUSnmC48khknGMV3D2Q== @@ -1297,6 +1396,11 @@ escalade@^3.1.1: resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.2.tgz#54076e9ab29ea5bf3d8f1ed62acffbb88272df27" integrity sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA== +escape-latex@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/escape-latex/-/escape-latex-1.2.0.tgz#07c03818cf7dac250cce517f4fda1b001ef2bca1" + integrity sha512-nV5aVWW1K0wEiUIEdZ4erkGGH8mDxGyxSeqPzRNtWP7ataw+/olFObw7hujFWlVjNsaDFw5VZ5NzVSIqRgfTiw== + escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" @@ -1493,6 +1597,11 @@ eslint@8.56.0: strip-ansi "^6.0.1" text-table "^0.2.0" +esm-wallaby@^3.2.25: + version "3.2.29" + resolved "https://registry.yarnpkg.com/esm-wallaby/-/esm-wallaby-3.2.29.tgz#7456b09026c1b52b4c8e7cb7226f0c794a6fce4b" + integrity sha512-mnizlPB130c3eIDiWwHBeiNSFJcyNPvltz57EfRKJf/u2hHamWSHv6nWXxTwj71l9bTPYe4JdcgN7c0xtqlomQ== + espree@^9.6.0, espree@^9.6.1: version "9.6.1" resolved "https://registry.yarnpkg.com/espree/-/espree-9.6.1.tgz#a2a17b8e434690a5432f2f8018ce71d331a48c6f" @@ -1605,6 +1714,11 @@ flatted@^3.2.9: resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.9.tgz#7eb4c67ca1ba34232ca9d2d93e9886e611ad7daf" integrity sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ== +follow-redirects@^1.14.0: + version "1.15.5" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.5.tgz#54d4d6d062c0fa7d9d17feb008461550e3ba8020" + integrity sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw== + for-each@^0.3.3: version "0.3.3" resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e" @@ -1620,7 +1734,7 @@ foreground-child@^3.1.0: cross-spawn "^7.0.0" signal-exit "^4.0.1" -fraction.js@^4.3.7: +fraction.js@^4.1.1, fraction.js@^4.3.7: version "4.3.7" resolved "https://registry.yarnpkg.com/fraction.js/-/fraction.js-4.3.7.tgz#06ca0085157e42fda7f9e726e79fefc4068840f7" integrity sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew== @@ -1635,7 +1749,7 @@ fsevents@~2.3.2: resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6" integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== -function-bind@^1.1.1, function-bind@^1.1.2: +function-bind@^1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.2.tgz#2c02d864d97f3ea6c8830c464cbd11ab6eab7a1c" integrity sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA== @@ -1666,13 +1780,14 @@ get-intrinsic@^1.1.1, get-intrinsic@^1.1.3, get-intrinsic@^1.2.1, get-intrinsic@ has-symbols "^1.0.3" hasown "^2.0.0" -get-symbol-description@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/get-symbol-description/-/get-symbol-description-1.0.1.tgz#c0de911bfaa9ea8da52b5e702d2b3b51b8791ec4" - integrity sha512-KmuibvwbWaM4BHcBRYwJfZ1JxyJeBwB8ct9YYu67SvYdbEIlcQ2e56dHxfbobqW38GXo8/zDFqJeGtHiVbWyQw== +get-symbol-description@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/get-symbol-description/-/get-symbol-description-1.0.2.tgz#533744d5aa20aca4e079c8e5daf7fd44202821f5" + integrity sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg== dependencies: call-bind "^1.0.5" es-errors "^1.3.0" + get-intrinsic "^1.2.4" get-tsconfig@^4.5.0: version "4.7.2" @@ -1781,12 +1896,12 @@ has-flag@^4.0.0: resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== -has-property-descriptors@^1.0.0, has-property-descriptors@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.1.tgz#52ba30b6c5ec87fd89fa574bc1c39125c6f65340" - integrity sha512-VsX8eaIewvas0xnvinAe9bw4WfIeODpGYikiWYLH+dma0Jw6KHYqWiWfhQlgOVK8D6PvjubK5Uc4P0iIhIcNVg== +has-property-descriptors@^1.0.0, has-property-descriptors@^1.0.1, has-property-descriptors@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz#963ed7d071dc7bf5f084c5bfbe0d1b6222586854" + integrity sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg== dependencies: - get-intrinsic "^1.2.2" + es-define-property "^1.0.0" has-proto@^1.0.1: version "1.0.1" @@ -1805,10 +1920,10 @@ has-tostringtag@^1.0.0, has-tostringtag@^1.0.1: dependencies: has-symbols "^1.0.3" -hasown@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.0.tgz#f4c513d454a57b7c7e1650778de226b11700546c" - integrity sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA== +hasown@^2.0.0, hasown@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.1.tgz#26f48f039de2c0f8d3356c223fb8d50253519faa" + integrity sha512-1/th4MHjnwncwXsIW6QMzlvYL9kG5e/CpVvLRZe4XPa8TOUNbCELqmvhDmnkNsAjwaG4+I8gJJL0JBvTTLO9qA== dependencies: function-bind "^1.1.2" @@ -1850,7 +1965,7 @@ inherits@2: resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== -internal-slot@^1.0.5: +internal-slot@^1.0.5, internal-slot@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.7.tgz#c06dcca3ed874249881007b0a5523b172a190802" integrity sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g== @@ -1859,7 +1974,7 @@ internal-slot@^1.0.5: hasown "^2.0.0" side-channel "^1.0.4" -is-array-buffer@^3.0.2, is-array-buffer@^3.0.4: +is-array-buffer@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/is-array-buffer/-/is-array-buffer-3.0.4.tgz#7a1f92b3d61edd2bc65d24f130530ea93d7fae98" integrity sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw== @@ -2012,7 +2127,7 @@ is-symbol@^1.0.2, is-symbol@^1.0.3: dependencies: has-symbols "^1.0.2" -is-typed-array@^1.1.10, is-typed-array@^1.1.12, is-typed-array@^1.1.13, is-typed-array@^1.1.9: +is-typed-array@^1.1.10, is-typed-array@^1.1.13, is-typed-array@^1.1.9: version "1.1.13" resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.13.tgz#d6c5ca56df62334959322d7d7dd1cca50debe229" integrity sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw== @@ -2074,6 +2189,11 @@ jackspeak@^2.3.5: optionalDependencies: "@pkgjs/parseargs" "^0.11.0" +javascript-natural-sort@^0.7.1: + version "0.7.1" + resolved "https://registry.yarnpkg.com/javascript-natural-sort/-/javascript-natural-sort-0.7.1.tgz#f9e2303d4507f6d74355a73664d1440fb5a0ef59" + integrity sha512-nO6jcEfZWQXDhOiBtG2KvKyEptz7RVbpGP4vTD2hLBdmNQSsCiicO2Ioinv6UI4y9ukqnBpy+XZ9H6uLNgJTlw== + jiti@^1.19.1: version "1.21.0" resolved "https://registry.yarnpkg.com/jiti/-/jiti-1.21.0.tgz#7c97f8fe045724e136a397f7340475244156105d" @@ -2091,6 +2211,13 @@ js-yaml@^4.1.0: dependencies: argparse "^2.0.1" +json-bigint@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/json-bigint/-/json-bigint-1.0.0.tgz#ae547823ac0cad8398667f8cd9ef4730f5b01ff1" + integrity sha512-SiPv/8VpZuWbvLSMtTDU8hEfrZWg/mH/nV/b4o0CYbSxu1UIQPLdwKOCIyLQX+VIPO5vrLX3i8qtqFyhdPSUSQ== + dependencies: + bignumber.js "^9.0.0" + json-buffer@3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.1.tgz#9338802a30d3b6605fbe0613e094008ca8c05a13" @@ -2161,9 +2288,9 @@ lilconfig@^2.1.0: integrity sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ== lilconfig@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-3.0.0.tgz#f8067feb033b5b74dab4602a5f5029420be749bc" - integrity sha512-K2U4W2Ff5ibV7j7ydLr+zLAkIg5JJ4lPn1Ltsdt+Tz/IjQ8buJ55pZAxoP34lqIiwtF9iAvtLv3JGv7CAyAg+g== + version "3.1.0" + resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-3.1.0.tgz#aabf03fd46934d0566d75b4b64ce41a2cdea1167" + integrity sha512-p3cz0JV5vw/XeouBU3Ldnp+ZkBjE+n8ydJ4mcwBrOiXXPqNlrzGBqWs9X4MWF7f+iKUBu794Y8Hh8yawiJbCjw== lines-and-columns@^1.1.6: version "1.2.4" @@ -2196,7 +2323,7 @@ lottie-react@^2.4.0: dependencies: lottie-web "^5.10.2" -lottie-web@^5.10.2, lottie-web@^5.12.2: +lottie-web@^5.10.2: version "5.12.2" resolved "https://registry.yarnpkg.com/lottie-web/-/lottie-web-5.12.2.tgz#579ca9fe6d3fd9e352571edd3c0be162492f68e5" integrity sha512-uvhvYPC8kGPjXT3MyKMrL3JitEAmDMp30lVkuq/590Mw9ok6pWcFCwXJveo0t5uqYw1UREQHofD+jVpdjBv8wg== @@ -2213,6 +2340,21 @@ lru-cache@^6.0.0: resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-10.2.0.tgz#0bd445ca57363465900f4d1f9bd8db343a4d95c3" integrity sha512-2bIM8x+VAf6JT4bKAljS1qUWgMsqZRPGJS6FSahIMPVvctcNhyVp7AJu7quxOW9jwkryBReKZY5tY5JYv2n/7Q== +mathjs@^9.4.4: + version "9.5.2" + resolved "https://registry.yarnpkg.com/mathjs/-/mathjs-9.5.2.tgz#e0f3279320dc6f49e45d99c4fcdd8b52231f0462" + integrity sha512-c0erTq0GP503/Ch2OtDOAn50GIOsuxTMjmE00NI/vKJFSWrDaQHRjx6ai+16xYv70yBSnnpUgHZGNf9FR9IwmA== + dependencies: + "@babel/runtime" "^7.15.4" + complex.js "^2.0.15" + decimal.js "^10.3.1" + escape-latex "^1.2.0" + fraction.js "^4.1.1" + javascript-natural-sort "^0.7.1" + seedrandom "^3.0.5" + tiny-emitter "^2.1.0" + typed-function "^2.0.0" + merge2@^1.3.0, merge2@^1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" @@ -2338,7 +2480,7 @@ object-keys@^1.1.1: resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== -object.assign@^4.1.4: +object.assign@^4.1.4, object.assign@^4.1.5: version "4.1.5" resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.5.tgz#3a833f9ab7fdb80fc9e8d2300c803d216d8fdbb0" integrity sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ== @@ -2551,9 +2693,9 @@ postcss@8.4.31: source-map-js "^1.0.2" postcss@^8, postcss@^8.4.23: - version "8.4.34" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.34.tgz#563276e86b4ff20dfa5eed0d394d4c53853b2051" - integrity sha512-4eLTO36woPSocqZ1zIrFD2K1v6wH7pY1uBh0JIM2KKfrVtGvPFiAku6aNOP0W1Wr9qwnaCsF0Z+CrVnryB2A8Q== + version "8.4.35" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.35.tgz#60997775689ce09011edf083a549cea44aabe2f7" + integrity sha512-u5U8qYpBCpN13BsiEB0CbR1Hhh4Gc0zLFuedrHJKMctHCHAGrMdG0PRM/KErzAL3CU6/eckEtmHNB3x6e3c0vA== dependencies: nanoid "^3.3.7" picocolors "^1.0.0" @@ -2600,6 +2742,11 @@ queue-microtask@^1.2.2: resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== +ramda@0.27.1: + version "0.27.1" + resolved "https://registry.yarnpkg.com/ramda/-/ramda-0.27.1.tgz#66fc2df3ef873874ffc2da6aa8984658abacf5c9" + integrity sha512-PgIdVpn5y5Yns8vqb8FzBUEYn98V3xcPgawAkkgj0YJ0qDsnHCiNmZYfOGMgOvoB0eWFLpYbhxUR3mxfDIMvpw== + react-dom@^18: version "18.2.0" resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-18.2.0.tgz#22aaf38708db2674ed9ada224ca4aa708d821e3d" @@ -2667,14 +2814,15 @@ regenerator-runtime@^0.14.0: resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz#356ade10263f685dda125100cd862c1db895327f" integrity sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw== -regexp.prototype.flags@^1.5.0, regexp.prototype.flags@^1.5.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.5.1.tgz#90ce989138db209f81492edd734183ce99f9677e" - integrity sha512-sy6TXMN+hnP/wMy+ISxg3krXx7BAtWVO4UouuCN/ziM9UEne0euamVNafDfvC83bRNr95y0V5iijeDQFUNpvrg== +regexp.prototype.flags@^1.5.0, regexp.prototype.flags@^1.5.2: + version "1.5.2" + resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz#138f644a3350f981a858c44f6bb1a61ff59be334" + integrity sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw== dependencies: - call-bind "^1.0.2" - define-properties "^1.2.0" - set-function-name "^2.0.0" + call-bind "^1.0.6" + define-properties "^1.2.1" + es-errors "^1.3.0" + set-function-name "^2.0.1" remove-accents@0.4.2: version "0.4.2" @@ -2728,7 +2876,14 @@ run-parallel@^1.1.9: dependencies: queue-microtask "^1.2.2" -safe-array-concat@^1.0.1: +rxjs@^7.8.1: + version "7.8.1" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.8.1.tgz#6f6f3d99ea8044291efd92e7c7fcf562c4057543" + integrity sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg== + dependencies: + tslib "^2.1.0" + +safe-array-concat@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/safe-array-concat/-/safe-array-concat-1.1.0.tgz#8d0cae9cb806d6d1c06e08ab13d847293ebe0692" integrity sha512-ZdQ0Jeb9Ofti4hbt5lX3T2JcAamT9hfzYU1MNB+z/jaEbB6wfFfPIR/zEORmZqobkCCJhSjodobH6WHNmJ97dg== @@ -2738,7 +2893,12 @@ safe-array-concat@^1.0.1: has-symbols "^1.0.3" isarray "^2.0.5" -safe-regex-test@^1.0.0: +safe-buffer@^5.0.1: + version "5.2.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" + integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== + +safe-regex-test@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/safe-regex-test/-/safe-regex-test-1.0.3.tgz#a5b4c0f06e0ab50ea2c395c14d8371232924c377" integrity sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw== @@ -2754,6 +2914,11 @@ scheduler@^0.23.0: dependencies: loose-envify "^1.1.0" +seedrandom@^3.0.5: + version "3.0.5" + resolved "https://registry.yarnpkg.com/seedrandom/-/seedrandom-3.0.5.tgz#54edc85c95222525b0c7a6f6b3543d8e0b3aa0a7" + integrity sha512-8OwmbklUNzwezjGInmZ+2clQmExQPvomqjL7LFqOYqtmuxRgQYqOD3mHaU+MvZn5FLUeVxVfQjwLZW/n/JFuqg== + semver@^6.3.1: version "6.3.1" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" @@ -2766,7 +2931,7 @@ semver@^7.5.4: dependencies: lru-cache "^6.0.0" -set-function-length@^1.2.0: +set-function-length@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/set-function-length/-/set-function-length-1.2.1.tgz#47cc5945f2c771e2cf261c6737cf9684a2a5e425" integrity sha512-j4t6ccc+VsKwYHso+kElc5neZpjtq9EnRICFZtWyBsLojhmeF/ZBd/elqm22WJh/BziDe/SBiOeAt0m2mfLD0g== @@ -2835,7 +3000,6 @@ streamsearch@^1.1.0: integrity sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg== "string-width-cjs@npm:string-width@^4.2.0", string-width@^4.1.0: - name string-width-cjs version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -3030,6 +3194,11 @@ thenify-all@^1.0.0: dependencies: any-promise "^1.0.0" +tiny-emitter@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/tiny-emitter/-/tiny-emitter-2.1.0.tgz#1d1a56edfc51c43e863cbb5382a72330e3555423" + integrity sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q== + to-fast-properties@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" @@ -3062,7 +3231,7 @@ tsconfig-paths@^3.15.0: minimist "^1.2.6" strip-bom "^3.0.0" -tslib@^2.4.0, tslib@^2.6.2: +tslib@^2.1.0, tslib@^2.4.0, tslib@^2.6.2: version "2.6.2" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae" integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q== @@ -3079,7 +3248,7 @@ type-fest@^0.20.2: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4" integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== -typed-array-buffer@^1.0.0: +typed-array-buffer@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/typed-array-buffer/-/typed-array-buffer-1.0.1.tgz#0608ffe6bca71bf15a45bff0ca2604107a1325f5" integrity sha512-RSqu1UEuSlrBhHTWC8O9FnPjOduNs4M7rJ4pRKoEjtx1zUNOPN2sSXHLDX+Y2WPbHIxbvg4JFo2DNAEfPIKWoQ== @@ -3118,6 +3287,11 @@ typed-array-length@^1.0.4: for-each "^0.3.3" is-typed-array "^1.1.9" +typed-function@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/typed-function/-/typed-function-2.1.0.tgz#ded6f8a442ba8749ff3fe75bc41419c8d46ccc3f" + integrity sha512-bctQIOqx2iVbWGDGPWwIm18QScpu2XRmkC19D8rQGFsjKSgteq/o1hTZvIG/wuDq8fanpBDrLkLq+aEN/6y5XQ== + typescript@^5: version "5.3.3" resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.3.3.tgz#b3ce6ba258e72e6305ba66f5c9b452aaee3ffe37" @@ -3205,7 +3379,7 @@ which-collection@^1.0.1: is-weakmap "^2.0.1" is-weakset "^2.0.1" -which-typed-array@^1.1.13, which-typed-array@^1.1.14, which-typed-array@^1.1.9: +which-typed-array@^1.1.14, which-typed-array@^1.1.9: version "1.1.14" resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.14.tgz#1f78a111aee1e131ca66164d8bdc3ab062c95a06" integrity sha512-VnXFiIW8yNn9kIHN88xvZ4yOWchftKDsRJ8fEPacX/wl1lOvBrhsJ/OeJCXq7B0AaijRuqgzSKalJoPk+D8MPg== From 6299079bc9fa670a39fe07d5b82410ed80a9a42f Mon Sep 17 00:00:00 2001 From: Mahsa Shafaei Date: Fri, 1 Mar 2024 11:26:53 +0330 Subject: [PATCH 2/8] the UI was integrated with endpoints --- .env.sample | 1 + api/auth/authApi.ts | 20 +- api/auth/authApi.types.ts | 38 +- api/auth/index.ts | 38 +- app/page.tsx | 30 +- components/button/Button.tsx | 23 +- components/header/Header.tsx | 2 +- components/header/Profile.tsx | 126 +- .../header/authentication/Authentication.tsx | 19 +- components/header/authentication/ErgoPay.tsx | 65 +- components/header/authentication/Google.tsx | 37 +- components/header/authentication/Nautilus.tsx | 97 +- components/tabs/TabPanel.tsx | 7 +- next.config.js | 8 +- package-lock.json | 6661 +++++++++++++++++ package.json | 4 +- tsconfig.json | 5 +- utils/constants.ts | 2 +- utils/http-client.ts | 59 +- utils/nautilus/connectWallet.ts | 17 + utils/nautilus/getWalletAddress.ts | 18 + utils/nautilus/index.ts | 3 + utils/react-query-keys.ts | 10 +- utils/useWebSocket.ts | 34 + yarn.lock | 971 +-- 25 files changed, 7636 insertions(+), 659 deletions(-) create mode 100644 .env.sample create mode 100644 package-lock.json create mode 100644 utils/nautilus/connectWallet.ts create mode 100644 utils/nautilus/getWalletAddress.ts create mode 100644 utils/nautilus/index.ts create mode 100644 utils/useWebSocket.ts diff --git a/.env.sample b/.env.sample new file mode 100644 index 0000000..487a28b --- /dev/null +++ b/.env.sample @@ -0,0 +1 @@ +NEXT_PUBLIC_BASE_API_URL='https://api-dev.testudo.xyz' diff --git a/api/auth/authApi.ts b/api/auth/authApi.ts index 60bbdd5..28ac749 100644 --- a/api/auth/authApi.ts +++ b/api/auth/authApi.ts @@ -1,20 +1,19 @@ import { - GoogleRequestResponse, GoogleCallbackResponse, NautilusBodyRequest, NautilusResponse, ErgoPayResponse, - ErgoPaySignInResponse, ErgoPayRequestParameter, + GoogleCallbackRequestParameter, + UserInfoResponse, } from '@/api/auth/authApi.types'; import { httpClient } from '@/utils/http-client'; export const authApi = { - googleRequest: async (): Promise => - httpClient.get(`/auth/google`), - - googleCallback: async (): Promise => - httpClient.get(`/auth/google/callback`), + googleCallback: async ( + parameter: GoogleCallbackRequestParameter, + ): Promise => + httpClient.get(`/auth/google/callback?code=${parameter.code}`), nautilus: async (body: NautilusBodyRequest): Promise => httpClient.post(`/auth/nautilus`, body), @@ -24,9 +23,6 @@ export const authApi = { }: ErgoPayRequestParameter): Promise => httpClient.get(`/ergopay/${address}`), // should be ergoauth://localhost/auth/ergopay/:address - ergoPaySignIn: async ( - address: ErgoPayRequestParameter, - body: string, - ): Promise => - httpClient.get(`/ergopay/${address}/signin`, body), // should be ergoauth://localhost/auth/ergopay/:address + userInfo: async (token: string | null): Promise => + httpClient.get(`/auth/getUserInfo`, undefined, token), }; diff --git a/api/auth/authApi.types.ts b/api/auth/authApi.types.ts index 3b980e0..990a3ab 100644 --- a/api/auth/authApi.types.ts +++ b/api/auth/authApi.types.ts @@ -1,21 +1,19 @@ import { ApiResponse, ApiError } from '@/utils/types'; -export type GoogleRequestSuccessResponse = ApiResponse<{ - address: string; -}>; - -export type GoogleRequestResponse = GoogleRequestSuccessResponse | ApiError; +export interface GoogleCallbackRequestParameter { + code?: string; +} -export type SignInSuccessResponse = ApiResponse<{ - jwtToken: string; -}>; +export type SignInSuccessResponse = { + token: string; +}; export type GoogleCallbackResponse = SignInSuccessResponse | ApiError; export interface NautilusBodyRequest { - proof: string; - message: string; - address: string; + proof?: string; + message?: string; + address?: string; } export type NautilusResponse = SignInSuccessResponse | ApiError; @@ -30,4 +28,20 @@ export type ErgoPaySuccessResponse = ApiResponse<{ export type ErgoPayResponse = ErgoPaySuccessResponse | ApiError; -export type ErgoPaySignInResponse = SignInSuccessResponse | ApiError; +export type UserInfoSuccessResponse = { + user: { + id: string; + email: string; + firstName: string; + lastName: string; + picture: string; + } | null; + addresses: + | { + id: string; + sign_message: string; + }[] + | undefined; +}; + +export type UserInfoResponse = UserInfoSuccessResponse | ApiError; diff --git a/api/auth/index.ts b/api/auth/index.ts index d741656..bd3c620 100644 --- a/api/auth/index.ts +++ b/api/auth/index.ts @@ -2,43 +2,33 @@ import { useQuery } from '@tanstack/react-query'; import { authApi } from '@/api/auth/authApi'; import { - GoogleRequestSuccessResponse, - GoogleRequestResponse, SignInSuccessResponse, GoogleCallbackResponse, NautilusBodyRequest, NautilusResponse, ErgoPaySuccessResponse, ErgoPayResponse, - ErgoPaySignInResponse, ErgoPayRequestParameter, + GoogleCallbackRequestParameter, + UserInfoSuccessResponse, + UserInfoResponse, } from '@/api/auth/authApi.types'; import { queryKeys } from '@/utils/react-query-keys'; import { ApiError } from '@/utils/types'; export const authApiGateway = { - useGoogleRequest: () => - useQuery( - queryKeys.authKeys.useGoogleRequest(), - { - queryFn: () => authApi.googleRequest(), - }, - ), - - useGoogleCallback: () => + useGoogleCallback: (parameter: GoogleCallbackRequestParameter) => useQuery( - queryKeys.authKeys.useGoogleCallback(), - { - queryFn: () => authApi.googleCallback(), - }, + queryKeys.authKeys.useGoogleCallback(parameter), + () => authApi.googleCallback(parameter), + { enabled: !!parameter.code }, ), useNautilus: (body: NautilusBodyRequest) => useQuery( queryKeys.authKeys.useNautilus(body), - { - queryFn: () => authApi.nautilus(body), - }, + () => authApi.nautilus(body), + { enabled: !!(body.address && body.message && body.proof) }, ), useErgoPay: (parameter: ErgoPayRequestParameter) => useQuery( @@ -47,11 +37,13 @@ export const authApiGateway = { queryFn: () => authApi.ergoPay(parameter), }, ), - useErgoPaySignIn: (parameter: ErgoPayRequestParameter, body: string) => - useQuery( - queryKeys.authKeys.useErgoPaySignIn(parameter, body), + + useUserInfo: (token: string | null) => + useQuery( + queryKeys.authKeys.useUserInfo(token), + () => authApi.userInfo(token), { - queryFn: () => authApi.ergoPaySignIn(parameter, body), + enabled: !!token, // Only enable the query when the token is present }, ), }; diff --git a/app/page.tsx b/app/page.tsx index 6184b80..21bbfc5 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -4,19 +4,21 @@ import { Box } from '@mui/material'; import { Banner, Reward, Statistics, JoinUs, Footer } from '@/scenes/landing'; -const Landing = () => ( - <> - - - - - - -