├── .gitignore ├── frontend ├── src │ ├── index.css │ ├── themes │ │ └── Default.js │ ├── reducers │ │ ├── index.js │ │ ├── login.js │ │ └── wager.js │ ├── constants │ │ └── actionTypes.js │ ├── components │ │ ├── AccountMenu │ │ │ ├── styles.js │ │ │ └── AccountMenu.js │ │ ├── Login │ │ │ ├── styles.js │ │ │ ├── Input.js │ │ │ └── Login.js │ │ ├── PasswordSettings │ │ │ ├── styles.js │ │ │ └── PasswordSettings.js │ │ ├── Wagering │ │ │ └── Wagering.js │ │ ├── Home │ │ │ ├── styles.js │ │ │ └── Home.js │ │ ├── Coin │ │ │ └── coin.js │ │ ├── LeaderBoardTable │ │ │ └── LeaderBoardTable.js │ │ ├── Navbar │ │ │ ├── styles.js │ │ │ └── Navbar.js │ │ ├── HistoryTable │ │ │ └── HitstoryTable.js │ │ └── WagerAmount │ │ │ └── WagerAmount.js │ ├── index.js │ ├── api │ │ └── index.js │ ├── actions │ │ ├── login.js │ │ └── toss.js │ ├── messages │ │ └── index.js │ └── App.js ├── public │ ├── robots.txt │ ├── favicon.ico │ ├── logo192.png │ ├── logo512.png │ ├── manifest.json │ ├── assets │ │ └── css │ │ │ └── styles.css │ └── index.html ├── package.json └── README.md ├── backend ├── .env ├── src │ ├── api │ │ ├── getTopTenPlayer.js │ │ ├── getTokenAmount.js │ │ ├── history.js │ │ ├── user.js │ │ ├── user-login.js │ │ ├── user-change-password.js │ │ ├── user-signup.js │ │ └── wager.js │ ├── models │ │ ├── bonusPayout.js │ │ ├── coinToss.js │ │ └── user.js │ └── utils │ │ └── auth.js ├── package.json ├── index.js └── package-lock.json └── readme.md /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules -------------------------------------------------------------------------------- /frontend/src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | background-color: #e9e9e9; 3 | } -------------------------------------------------------------------------------- /backend/.env: -------------------------------------------------------------------------------- 1 | PORT=5000 2 | MONGODB_URL=mongodb://localhost:27017/pidwin_test -------------------------------------------------------------------------------- /frontend/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /frontend/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0xfrost-wonder/pidwin-fs-take-home-project/HEAD/frontend/public/favicon.ico -------------------------------------------------------------------------------- /frontend/public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0xfrost-wonder/pidwin-fs-take-home-project/HEAD/frontend/public/logo192.png -------------------------------------------------------------------------------- /frontend/public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/0xfrost-wonder/pidwin-fs-take-home-project/HEAD/frontend/public/logo512.png -------------------------------------------------------------------------------- /frontend/src/themes/Default.js: -------------------------------------------------------------------------------- 1 | import { createTheme } from "@mui/material"; 2 | 3 | export const theme = createTheme({}); 4 | -------------------------------------------------------------------------------- /frontend/src/reducers/index.js: -------------------------------------------------------------------------------- 1 | import { combineReducers } from "redux"; 2 | import loginReducer from "./login"; 3 | import wagerReducer from "./wager"; 4 | export default combineReducers({ 5 | loginReducer, 6 | wagerReducer 7 | }); 8 | -------------------------------------------------------------------------------- /frontend/src/constants/actionTypes.js: -------------------------------------------------------------------------------- 1 | export const LOGIN = "LOGIN"; 2 | export const LOGOUT = "LOGOUT"; 3 | export const WAGERHISTORY = "WAGERHISTORY"; 4 | export const WAGERSTATUS = "WAGERSTATUS"; 5 | export const TOKENAMOUNT = "TOKENAMOUNT"; 6 | export const SETFLIP = "SETFLIP"; 7 | export const TOPTENPLAYER = "TOPTENPLAYER"; 8 | -------------------------------------------------------------------------------- /backend/src/api/getTopTenPlayer.js: -------------------------------------------------------------------------------- 1 | import User from "../models/user.js"; 2 | 3 | const getTopTenPlayer = async (req, res) => { 4 | try { 5 | const topTenPlayer = await User.find().sort({token_amount: -1}).limit(10); 6 | res.status(200).json(topTenPlayer); 7 | } catch (error) { 8 | res.status(500).json({ message: 'Something went wrong' }); 9 | } 10 | } 11 | export default getTopTenPlayer; -------------------------------------------------------------------------------- /backend/src/models/bonusPayout.js: -------------------------------------------------------------------------------- 1 | import mongoose from "mongoose"; 2 | 3 | const BonusPayoutSchema = new mongoose.Schema({ 4 | userId: mongoose.Schema.Types.ObjectId, 5 | tossId: mongoose.Schema.Types.ObjectId, 6 | bonusMultiplier: Number, 7 | bonusAmount: Number, 8 | createdAt: { type: Date, default: Date.now } 9 | }); 10 | 11 | export default mongoose.model("BonusPayout", BonusPayoutSchema); -------------------------------------------------------------------------------- /backend/src/models/coinToss.js: -------------------------------------------------------------------------------- 1 | import mongoose from "mongoose"; 2 | 3 | const CoinTossSchema = new mongoose.Schema({ 4 | userId: mongoose.Schema.Types.ObjectId, 5 | wager: Number, 6 | choice: String, 7 | result: String, 8 | win: Boolean, 9 | payout: Number, 10 | createdAt: { type: Date, default: Date.now } 11 | }); 12 | 13 | export default mongoose.model("CoinToss", CoinTossSchema); -------------------------------------------------------------------------------- /frontend/src/components/AccountMenu/styles.js: -------------------------------------------------------------------------------- 1 | import { theme } from "../../themes/Default"; 2 | 3 | import { deepPurple } from "@mui/material/colors"; 4 | 5 | export const styles = { 6 | userName: { 7 | display: "flex", 8 | alignItems: "center", 9 | }, 10 | purple: { 11 | color: theme.palette.getContrastText(deepPurple[500]), 12 | backgroundColor: deepPurple[500], 13 | }, 14 | }; 15 | -------------------------------------------------------------------------------- /backend/src/models/user.js: -------------------------------------------------------------------------------- 1 | import mongoose from "mongoose"; 2 | 3 | const userSchema = mongoose.Schema({ 4 | name: { type: String, required: true }, 5 | email: { type: String, required: true }, 6 | password: { type: String, required: true }, 7 | token_amount: { type: Number, required: true }, 8 | winningStreak: { type: Number, default: 0 }, 9 | }); 10 | 11 | export default mongoose.model("User", userSchema); -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | # Pidwin Assessment 2 | 3 | The Pidwin Fullstack Assessment. 4 | 5 | ## Project setup 6 | 7 | Enter each folder: 8 | 9 | - backend 10 | - frontend 11 | 12 | and run the following command 13 | 14 | ```bash 15 | npm install 16 | ``` 17 | --- 18 | 19 | 20 | ## Backend 21 | 22 | Create a **.env file** and populate the fields. 23 | 24 | 25 | Now in the backend folder. Run the start 26 | command 27 | ```bash 28 | npm run start 29 | ``` 30 | 31 | The backend is now up and running. 32 | 33 | --- 34 | -------------------------------------------------------------------------------- /backend/src/api/getTokenAmount.js: -------------------------------------------------------------------------------- 1 | import User from "../models/user.js"; 2 | 3 | const getTokenAmount = async (req, res) => { 4 | try { 5 | const user = await User.findById(req.userId); 6 | if (!user) { 7 | return res.status(404).json({ message: 'User not found' }); 8 | } 9 | res.status(200).json({ token_amount: user.token_amount }); 10 | } catch (error) { 11 | res.status(500).json({ message: 'Something went wrong' }); 12 | } 13 | } 14 | export default getTokenAmount; -------------------------------------------------------------------------------- /frontend/src/components/Login/styles.js: -------------------------------------------------------------------------------- 1 | import { theme } from "../../themes/Default"; 2 | 3 | export const styles = { 4 | paper: { 5 | marginTop: theme.spacing(8), 6 | display: "flex", 7 | flexDirection: "column", 8 | alignItems: "center", 9 | padding: theme.spacing(2), 10 | }, 11 | avatar: { 12 | margin: theme.spacing(1), 13 | backgroundColor: "#5e5d5c", 14 | }, 15 | form: { 16 | width: "100%", 17 | marginTop: theme.spacing(3), 18 | }, 19 | submit: { 20 | margin: theme.spacing(3, 0, 2), 21 | }, 22 | }; 23 | -------------------------------------------------------------------------------- /backend/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "backend", 3 | "version": "1.0.0", 4 | "description": "Pidwin Full Stack Backend Take-Home Project", 5 | "main": "index.js", 6 | "type": "module", 7 | "scripts": { 8 | "start": "node index.js" 9 | }, 10 | "author": "Pidwin LLC", 11 | "license": "ISC", 12 | "dependencies": { 13 | "axios": "^1.6.5", 14 | "bcryptjs": "^2.4.3", 15 | "body-parser": "^1.20.2", 16 | "cors": "^2.8.5", 17 | "dotenv": "^16.3.2", 18 | "express": "^4.18.2", 19 | "jsonwebtoken": "^9.0.2", 20 | "mongoose": "^8.1.0" 21 | } 22 | } -------------------------------------------------------------------------------- /backend/src/utils/auth.js: -------------------------------------------------------------------------------- 1 | import jwt from "jsonwebtoken"; 2 | 3 | const auth = async (req, res, next) => { 4 | try { 5 | const token = req.headers.authorization.split(" ")[1]; 6 | const isCustomAuth = token.length < 500; 7 | 8 | let decodedData; 9 | 10 | if (token && isCustomAuth) { 11 | decodedData = jwt.verify(token, "test"); 12 | req.userId = decodedData?._id; 13 | } else { 14 | decodedData = jwt.decode(token); 15 | req.userId = decodedData?.sub; 16 | } 17 | next(); 18 | } catch (error) { } 19 | }; 20 | 21 | export default auth; 22 | -------------------------------------------------------------------------------- /frontend/src/reducers/login.js: -------------------------------------------------------------------------------- 1 | import { LOGIN, LOGOUT } from '../constants/actionTypes'; 2 | 3 | const loginReducer = (state = { authData: null, token_amount: 0 }, action) => { 4 | switch (action.type) { 5 | case LOGIN: 6 | localStorage.setItem('profile', JSON.stringify({ ...action?.data })); 7 | return { ...state, authData: action?.data }; 8 | 9 | case LOGOUT: 10 | localStorage.clear(); 11 | return { ...state, authData: null }; 12 | default: 13 | return state; 14 | } 15 | } 16 | export default loginReducer; -------------------------------------------------------------------------------- /frontend/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "logo192.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "logo512.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": ".", 22 | "display": "standalone", 23 | "theme_color": "#000000", 24 | "background_color": "#ffffff" 25 | } 26 | -------------------------------------------------------------------------------- /frontend/src/components/PasswordSettings/styles.js: -------------------------------------------------------------------------------- 1 | import { theme } from "../../themes/Default"; 2 | 3 | export const styles = { 4 | paper: { 5 | marginTop: theme.spacing(8), 6 | display: "flex", 7 | flexDirection: "column", 8 | alignItems: "center", 9 | padding: theme.spacing(2), 10 | }, 11 | avatar: { 12 | margin: theme.spacing(1), 13 | backgroundColor: "#5e5d5c", 14 | }, 15 | form: { 16 | width: "100%", 17 | marginTop: theme.spacing(3), 18 | }, 19 | submit: { 20 | margin: theme.spacing(3, 1, 2), 21 | }, 22 | typo: { 23 | margin: theme.spacing(3, 3, 2), 24 | }, 25 | }; 26 | -------------------------------------------------------------------------------- /backend/src/api/history.js: -------------------------------------------------------------------------------- 1 | import CoinToss from "../models/coinToss.js"; 2 | import BonusPayout from "../models/bonusPayout.js"; 3 | 4 | const recentWager = async (req, res) => { 5 | try { 6 | const { userId } = req; 7 | const recentWagers = await CoinToss.find({ userId }).sort({ createdAt: -1 }).limit(10).lean(); 8 | for (let wager of recentWagers) { 9 | const bonus = await BonusPayout.findOne({ tossId: wager._id }).lean(); 10 | wager.bonus = bonus ? bonus.bonusAmount : 0; 11 | } 12 | res.status(200).json(recentWagers); 13 | } catch (error) { 14 | res.status(500).json({ message: error.message }); 15 | } 16 | } 17 | export default recentWager; -------------------------------------------------------------------------------- /frontend/src/index.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import ReactDOM from "react-dom/client"; 3 | import { Provider } from "react-redux"; 4 | import { createStore, applyMiddleware, compose } from "redux"; 5 | import { thunk } from "redux-thunk"; 6 | import App from "./App"; 7 | import "./index.css"; 8 | import reducers from "./reducers"; 9 | import { ThemeProvider } from "@mui/material/styles"; 10 | import { theme } from "./themes/Default"; 11 | const store = createStore(reducers, compose(applyMiddleware(thunk))); 12 | 13 | const root = ReactDOM.createRoot(document.getElementById("root")); 14 | root.render( 15 | 16 | 17 | 18 | 19 | 20 | ); 21 | -------------------------------------------------------------------------------- /backend/index.js: -------------------------------------------------------------------------------- 1 | import express from "express"; 2 | import mongoose from "mongoose"; 3 | import bodyParser from "body-parser"; 4 | import cors from "cors"; 5 | import dotenv from 'dotenv'; 6 | import userRouter from "./src/api/user.js"; 7 | 8 | dotenv.config(); 9 | 10 | const app = express(); 11 | app.use(bodyParser.json({ limit: "5mb", extended: true })); 12 | app.use(bodyParser.urlencoded({ limit: "5mb", extended: true })); 13 | 14 | app.use(cors()); 15 | app.use("/api/user", userRouter); 16 | 17 | const PORT = process.env.PORT || 5000; 18 | 19 | mongoose 20 | .connect(process.env.MONGODB_URL) 21 | .then(() => 22 | app.listen(PORT, () => console.log(`Server Started On Port ${PORT}`)) 23 | ) 24 | .catch((error) => console.log(error.message)); 25 | -------------------------------------------------------------------------------- /backend/src/api/user.js: -------------------------------------------------------------------------------- 1 | import express from "express"; 2 | import login from "./user-login.js"; 3 | import signup from "./user-signup.js"; 4 | import changePassword from "./user-change-password.js"; 5 | import auth from "../utils/auth.js"; 6 | import handleCoinToss from "./wager.js"; 7 | import recentWager from "./history.js"; 8 | import getTokenAmount from "./getTokenAmount.js"; 9 | import getTopTenPlayer from "./getTopTenPlayer.js"; 10 | 11 | const router = express.Router(); 12 | 13 | router.post("/login", login); 14 | router.post("/signup", signup); 15 | router.post("/changePassword", auth, changePassword); 16 | router.post("/wager", auth, handleCoinToss); 17 | router.get("/recent-wagers", auth, recentWager); 18 | router.get("/get-token-amount", auth, getTokenAmount); 19 | router.get("/toptenplayer", auth, getTopTenPlayer); 20 | 21 | 22 | export default router; 23 | -------------------------------------------------------------------------------- /frontend/src/components/Wagering/Wagering.js: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import Radio from '@mui/material/Radio'; 3 | import RadioGroup from '@mui/material/RadioGroup'; 4 | import FormControlLabel from '@mui/material/FormControlLabel'; 5 | import FormControl from '@mui/material/FormControl'; 6 | 7 | export default function Wagering({ wagering, setWagering }) { 8 | return ( 9 | 10 | setWagering(e.target.value)} 16 | > 17 | } label="Heads" /> 18 | } label="Tails" /> 19 | 20 | 21 | ); 22 | } 23 | -------------------------------------------------------------------------------- /frontend/src/api/index.js: -------------------------------------------------------------------------------- 1 | import axios from "axios"; 2 | 3 | const API = axios.create({ baseURL: "http://localhost:5000" }); 4 | API.interceptors.request.use((req) => { 5 | if (localStorage.getItem("profile")) { 6 | req.headers.Authorization = `Bearer ${JSON.parse(localStorage.getItem("profile")).token 7 | }`; 8 | } 9 | return req; 10 | }); 11 | 12 | export const login = (formData) => API.post("/api/user/login", formData); 13 | export const signUp = (formData) => API.post("/api/user/signup", formData); 14 | export const wagerRequest = (param) => API.post("/api/user/wager", param); 15 | export const recentWagers = () => API.get("/api/user/recent-wagers"); 16 | export const getTopTenPlayer = () => API.get("/api/user/toptenplayer"); 17 | export const getTokenAmount = () => API.get("/api/user/get-token-amount"); 18 | export const changePassword = (formData) => 19 | API.post("/api/user/changePassword", formData); -------------------------------------------------------------------------------- /frontend/src/reducers/wager.js: -------------------------------------------------------------------------------- 1 | import { WAGERHISTORY, WAGERSTATUS, TOKENAMOUNT, SETFLIP, TOPTENPLAYER } from "../constants/actionTypes"; 2 | 3 | const initialState = { 4 | wagerHistory: [], 5 | wagerStatus: "heads", 6 | tokenAmount: 0, 7 | flip: false, 8 | topTenPlayer: [], 9 | } 10 | 11 | const wagerReducer = (state = initialState, action) => { 12 | 13 | switch (action.type) { 14 | case WAGERHISTORY: 15 | return { ...state, wagerHistory: action?.data }; 16 | case WAGERSTATUS: 17 | return { ...state, wagerStatus: action?.data }; 18 | case TOKENAMOUNT: 19 | return { ...state, tokenAmount: action?.data }; 20 | case SETFLIP: 21 | return { ...state, flip: action?.data }; 22 | case TOPTENPLAYER: 23 | return { ...state, topTenPlayer: action?.data }; 24 | default: 25 | return state; 26 | } 27 | } 28 | export default wagerReducer; -------------------------------------------------------------------------------- /frontend/src/components/Home/styles.js: -------------------------------------------------------------------------------- 1 | import { theme } from "../../themes/Default"; 2 | import { deepPurple } from "@mui/material/colors"; 3 | 4 | export const styles = { 5 | appBar: { 6 | borderRadius: 15, 7 | margin: "30px 0", 8 | display: "flex", 9 | flexDirection: "row", 10 | justifyContent: "space-between", 11 | alignItems: "center", 12 | padding: "10px 50px", 13 | }, 14 | heading: { 15 | color: "rgba(0,183,255, 1)", 16 | textDecoration: "none", 17 | }, 18 | toolbar: { 19 | display: "flex", 20 | justifyContent: "flex-end", 21 | width: "1000px", 22 | }, 23 | profile: { 24 | display: "flex", 25 | justifyContent: "space-between", 26 | width: "400px", 27 | }, 28 | userName: { 29 | display: "flex", 30 | alignItems: "center", 31 | }, 32 | brandContainer: { 33 | display: "flex", 34 | alignItems: "center", 35 | }, 36 | purple: { 37 | color: theme.palette.getContrastText(deepPurple[500]), 38 | backgroundColor: deepPurple[500], 39 | }, 40 | }; -------------------------------------------------------------------------------- /frontend/src/components/Coin/coin.js: -------------------------------------------------------------------------------- 1 | import React, { useEffect } from 'react'; 2 | 3 | function Coin({ flip, setFlip, result }) { 4 | useEffect(() => { 5 | if (flip) { 6 | const coin = document.getElementById('coin'); 7 | coin.classList.remove('flip-animation'); 8 | void coin.offsetWidth; 9 | coin.classList.add('flip-animation'); 10 | const handleAnimationEnd = () => { 11 | coin.classList.remove('flip-animation'); 12 | setFlip(false); 13 | }; 14 | coin.addEventListener('animationend', handleAnimationEnd); 15 | return () => { 16 | coin.removeEventListener('animationend', handleAnimationEnd); 17 | }; 18 | } 19 | }, [flip, setFlip]); 20 | 21 | return ( 22 |
23 |
24 |
25 |
26 |
27 |
28 | ); 29 | } 30 | 31 | export default Coin; 32 | -------------------------------------------------------------------------------- /backend/src/api/user-login.js: -------------------------------------------------------------------------------- 1 | import bcrypt from "bcryptjs"; 2 | import jwt from "jsonwebtoken"; 3 | import User from "../models/user.js"; 4 | 5 | const login = async (req, res) => { 6 | const { email, password } = req.body; 7 | 8 | try { 9 | const existingUser = await User.findOne({ email }); 10 | 11 | if (!existingUser) { 12 | return res.status(404).json({ message: "User Does Not Exist" }); 13 | } 14 | 15 | const isPasswordCorrect = await bcrypt.compare( 16 | password, 17 | existingUser.password 18 | ); 19 | 20 | if (!isPasswordCorrect) { 21 | return res.status(400).json({ message: "Invalid Password" }); 22 | } 23 | 24 | const token = jwt.sign( 25 | { 26 | _id: existingUser._id, 27 | name: existingUser.name, 28 | email: existingUser.email, 29 | password: existingUser.password, 30 | token_amount: existingUser.token_amount, 31 | }, 32 | "test", 33 | { expiresIn: "1h" } 34 | ); 35 | 36 | res.status(200).json({ token }); 37 | } catch (error) { 38 | res.status(500).json({ message: "Something went wrong" }); 39 | } 40 | }; 41 | 42 | export default login; -------------------------------------------------------------------------------- /backend/src/api/user-change-password.js: -------------------------------------------------------------------------------- 1 | import bcrypt from "bcryptjs"; 2 | import User from "../models/user.js"; 3 | 4 | const changePassword = async (req, res) => { 5 | const { email, oldPassword, newPassword } = req.body; 6 | 7 | try { 8 | const existingUser = await User.findOne({ email }); 9 | 10 | if (!existingUser) { 11 | return res.status(404).json({ message: "User Does Not Exist" }); 12 | } 13 | 14 | if (!req.userId) { 15 | return res.json({ message: "Unauthenticated" }); 16 | } 17 | 18 | const isPasswordCorrect = await bcrypt.compare( 19 | oldPassword, 20 | existingUser.password 21 | ); 22 | 23 | if (!isPasswordCorrect) { 24 | return res.status(400).json({ message: "Invalid Password" }); 25 | } 26 | 27 | const hashedPassword = await bcrypt.hash(newPassword, 12); 28 | const updatePassword = await User.findByIdAndUpdate( 29 | existingUser._id, 30 | { password: hashedPassword }, 31 | { new: true } 32 | ); 33 | 34 | res.status(200).json(updatePassword); 35 | } catch (error) { 36 | res.status(500).json({ message: "Something went wrong" }); 37 | } 38 | }; 39 | 40 | export default changePassword; -------------------------------------------------------------------------------- /frontend/src/actions/login.js: -------------------------------------------------------------------------------- 1 | import { LOGIN, LOGOUT } from "../constants/actionTypes"; 2 | import * as api from "../api"; 3 | import * as messages from "../messages"; 4 | 5 | export const signup = (formData, history) => async (dispatch) => { 6 | try { 7 | const { data } = await api.signUp(formData); 8 | dispatch({ type: LOGIN, data }); 9 | history("/"); 10 | messages.success("Login Successful"); 11 | } catch (error) { 12 | messages.error(error.response.data.message); 13 | } 14 | }; 15 | 16 | export const login = (formData, history) => async (dispatch) => { 17 | try { 18 | const { data } = await api.login(formData); 19 | dispatch({ type: LOGIN, data }); 20 | history("/"); 21 | messages.success("Login Successful"); 22 | } catch (error) { 23 | messages.error(error.response.data.message); 24 | } 25 | }; 26 | 27 | export const changePassword = (formData, history) => async (dispatch) => { 28 | try { 29 | const { data } = await api.changePassword(formData); 30 | dispatch({ type: LOGOUT, data }); 31 | messages.success("Password Change Was Successful"); 32 | history("/"); 33 | } catch (error) { 34 | messages.error(error.response.data.message); 35 | } 36 | }; -------------------------------------------------------------------------------- /frontend/src/components/LeaderBoardTable/LeaderBoardTable.js: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { DataGrid } from '@mui/x-data-grid'; 3 | 4 | const columns = [ 5 | { field: 'id', headerName: 'ID', sortable: false, width: 70 }, 6 | { field: 'name', headerName: 'Player Name', sortable: false, width: 70 }, 7 | { field: 'email', headerName: 'Player Name', sortable: false, width: 70 }, 8 | { field: 'token_amount', headerName: 'Player Name', sortable: false, width: 70 }, 9 | ]; 10 | 11 | export default function LeaderBoardTable({ topTenPlayer }) { 12 | const row = topTenPlayer.map((item) => { 13 | return { 14 | id: (item._id), 15 | name: (item.name), 16 | email: (item.email), 17 | token_amount: (item.token_amount), 18 | } 19 | }) 20 | return ( 21 |
22 | 32 |
33 | ); 34 | } -------------------------------------------------------------------------------- /frontend/src/components/Navbar/styles.js: -------------------------------------------------------------------------------- 1 | import { theme } from "../../themes/Default"; 2 | 3 | import { deepPurple } from "@mui/material/colors"; 4 | 5 | export const styles = { 6 | appBar: { 7 | borderRadius: 15, 8 | margin: "30px 0", 9 | display: "flex", 10 | flexDirection: "row", 11 | justifyContent: "space-between", 12 | alignItems: "center", 13 | padding: "10px 50px", 14 | }, 15 | heading: { 16 | color: "rgba(0,183,255, 1)", 17 | textDecoration: "none", 18 | }, 19 | toolbar: { 20 | display: "flex", 21 | justifyContent: "flex-end", 22 | }, 23 | profile: { 24 | display: "inline-flex", 25 | justifyContent: "center", 26 | alignContent: "stretch", 27 | flexDirection: "row", 28 | flexWrap: "nowrap", 29 | alignItems: "center", 30 | width: "600px", 31 | }, 32 | userName: { 33 | display: "flex", 34 | alignItems: "center", 35 | }, 36 | brandContainer: { 37 | display: "flex", 38 | alignItems: "center", 39 | }, 40 | purple: { 41 | color: theme.palette.getContrastText(deepPurple[500]), 42 | backgroundColor: deepPurple[500], 43 | }, 44 | token_amount: { 45 | color: "rgba(0,183,255, 1)", 46 | textDecoration: "none", 47 | } 48 | }; 49 | -------------------------------------------------------------------------------- /frontend/src/messages/index.js: -------------------------------------------------------------------------------- 1 | import { toast } from "react-toastify"; 2 | import "react-toastify/dist/ReactToastify.css"; 3 | 4 | export const success = (message) => 5 | toast.success(message, { 6 | position: "top-right", 7 | autoClose: 3000, 8 | hideProgressBar: false, 9 | closeOnClick: true, 10 | pauseOnHover: true, 11 | draggable: true, 12 | progress: undefined, 13 | }); 14 | 15 | export const error = (message) => 16 | toast.error(message, { 17 | position: "top-right", 18 | autoClose: 3000, 19 | hideProgressBar: false, 20 | closeOnClick: true, 21 | pauseOnHover: true, 22 | draggable: true, 23 | progress: undefined, 24 | }); 25 | 26 | export const warning = (message) => 27 | toast.warning(message, { 28 | position: "top-right", 29 | autoClose: 3000, 30 | hideProgressBar: false, 31 | closeOnClick: true, 32 | pauseOnHover: true, 33 | draggable: true, 34 | progress: undefined, 35 | }); 36 | 37 | export const info = (message) => 38 | toast(message, { 39 | position: "top-right", 40 | autoClose: 3000, 41 | hideProgressBar: false, 42 | closeOnClick: true, 43 | pauseOnHover: true, 44 | draggable: true, 45 | progress: undefined, 46 | }); 47 | -------------------------------------------------------------------------------- /frontend/src/components/Login/Input.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { TextField, Grid, InputAdornment, IconButton } from "@mui/material"; 3 | import Visibility from "@mui/icons-material/Visibility"; 4 | import VisibilityOff from "@mui/icons-material/VisibilityOff"; 5 | 6 | const Input = ({ 7 | name, 8 | value, 9 | handleChange, 10 | label, 11 | half, 12 | autoFocus, 13 | type, 14 | handleShowPassword, 15 | }) => ( 16 | 17 | 32 | 33 | {type === "password" ? : } 34 | 35 | 36 | ), 37 | } 38 | : null 39 | } 40 | /> 41 | 42 | ); 43 | 44 | export default Input; 45 | -------------------------------------------------------------------------------- /frontend/src/App.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { Container } from "@mui/material"; 3 | import { Route, BrowserRouter, Routes } from "react-router-dom"; 4 | 5 | import { ToastContainer } from "react-toastify"; 6 | import "react-toastify/dist/ReactToastify.css"; 7 | 8 | import Navbar from "./components/Navbar/Navbar"; 9 | import Login from "./components/Login/Login"; 10 | import Home from "./components/Home/Home"; 11 | import PasswordSetting from "./components/PasswordSettings/PasswordSettings"; 12 | 13 | const App = () => { 14 | return ( 15 | 16 | 17 | 18 | 29 | 30 | } /> 31 | } /> 32 | } /> 33 | 34 | 35 | 36 | ); 37 | }; 38 | 39 | export default App; 40 | -------------------------------------------------------------------------------- /backend/src/api/user-signup.js: -------------------------------------------------------------------------------- 1 | import bcrypt from "bcryptjs"; 2 | import jwt from "jsonwebtoken"; 3 | import User from "../models/user.js"; 4 | 5 | const signup = async (req, res) => { 6 | const { email, password, confirmPassword, firstName, lastName } = req.body; 7 | 8 | try { 9 | const existingUser = await User.findOne({ email }); 10 | if (existingUser) { 11 | return res.status(400).json({ message: "User Already Exist" }); 12 | } 13 | 14 | if (password !== confirmPassword) { 15 | return res.status(400).json({ message: "Password Does Not Match" }); 16 | } 17 | 18 | const hashedPassword = await bcrypt.hash(password, 12); 19 | const result = await User.create({ 20 | email, 21 | password: hashedPassword, 22 | name: `${firstName} ${lastName}`, 23 | token_amount: 100 24 | }); 25 | const token = jwt.sign( 26 | { 27 | _id: result._id, 28 | name: result.name, 29 | email: result.email, 30 | password: result.hashedPassword, 31 | token_amount: result.token_amount, 32 | }, 33 | "test", 34 | { expiresIn: "1h" } 35 | ); 36 | 37 | res.status(200).json({ token }); 38 | } catch (error) { 39 | res.status(500).json({ message: "Something went wrong" }); 40 | } 41 | }; 42 | 43 | export default signup; -------------------------------------------------------------------------------- /frontend/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "frontend", 3 | "version": "0.1.0", 4 | "private": true, 5 | "dependencies": { 6 | "@emotion/react": "^11.11.3", 7 | "@emotion/styled": "^11.11.0", 8 | "@mui/base": "^5.0.0-beta.40", 9 | "@mui/icons-material": "^5.15.5", 10 | "@mui/material": "^5.15.5", 11 | "@mui/x-data-grid": "^7.11.1", 12 | "@testing-library/jest-dom": "^5.17.0", 13 | "@testing-library/react": "^13.4.0", 14 | "@testing-library/user-event": "^13.5.0", 15 | "axios": "^1.6.5", 16 | "jwt-decode": "^4.0.0", 17 | "react": "^18.2.0", 18 | "react-dom": "^18.2.0", 19 | "react-redux": "^9.1.0", 20 | "react-router-dom": "^6.21.3", 21 | "react-scripts": "5.0.1", 22 | "react-toastify": "^10.0.3", 23 | "redux": "^5.0.1", 24 | "redux-thunk": "^3.1.0", 25 | "web-vitals": "^2.1.4" 26 | }, 27 | "scripts": { 28 | "start": "react-scripts start", 29 | "build": "react-scripts build", 30 | "test": "react-scripts test", 31 | "eject": "react-scripts eject" 32 | }, 33 | "eslintConfig": { 34 | "extends": [ 35 | "react-app", 36 | "react-app/jest" 37 | ] 38 | }, 39 | "browserslist": { 40 | "production": [ 41 | ">0.2%", 42 | "not dead", 43 | "not op_mini all" 44 | ], 45 | "development": [ 46 | "last 1 chrome version", 47 | "last 1 firefox version", 48 | "last 1 safari version" 49 | ] 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /frontend/src/components/HistoryTable/HitstoryTable.js: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { DataGrid } from '@mui/x-data-grid'; 3 | 4 | const columns = [ 5 | { field: 'id', headerName: 'ID', sortable: false, width: 70 }, 6 | { field: 'wager', headerName: 'Wager Amount', sortable: false, width: 70 }, 7 | { field: 'choice', headerName: 'Choice', sortable: false, width: 70 }, 8 | { field: 'result', headerName: 'Result', sortable: false, width: 70 }, 9 | { field: 'win', headerName: 'Status', sortable: false, width: 70 }, 10 | { field: 'payout', headerName: 'Pyout', sortable: false, width: 70 }, 11 | { field: 'bonus', headerName: 'Bonus', sortable: false, width: 70 }, 12 | ]; 13 | 14 | export default function HistoryTable({ recentWager }) { 15 | const row = recentWager.map((item) => { 16 | return { 17 | id: (item._id), 18 | wager: (item.wager), 19 | choice: (item.choice), 20 | result: (item.result), 21 | win: (item.win ? "Win" : "Loss"), 22 | payout: (item.payout), 23 | bonus: (item.bonus), 24 | highlight: item.win, 25 | highlightbonus: (item.bonus > 0 ? true : false), 26 | } 27 | }) 28 | return ( 29 |
30 | params.row.highlight ? params.row.highlightbonus ? 'bonus-row' : 'win-row' : ''} 34 | initialState={{ 35 | pagination: { 36 | paginationModel: { page: 0, pageSize: 10 }, 37 | }, 38 | }} 39 | pageSizeOptions={[5, 10]} 40 | /> 41 |
42 | ); 43 | } -------------------------------------------------------------------------------- /frontend/public/assets/css/styles.css: -------------------------------------------------------------------------------- 1 | .win-row { 2 | background-color: lightgreen; 3 | } 4 | 5 | .bonus-row { 6 | background-color: red; 7 | } 8 | 9 | .Toss { 10 | font-family: sans-serif; 11 | text-align: center; 12 | } 13 | 14 | #coin { 15 | position: relative; 16 | margin: 0 auto; 17 | width: 100px; 18 | height: 100px; 19 | transition: transform 1s ease-in; 20 | transform-style: preserve-3d; 21 | } 22 | 23 | #coin div { 24 | width: 100%; 25 | height: 100%; 26 | border-radius: 50%; 27 | box-shadow: inset 0 0 45px rgba(255, 255, 255, 0.3), 28 | 0 12px 20px -10px rgba(0, 0, 0, 0.4); 29 | position: absolute; 30 | backface-visibility: hidden; 31 | } 32 | 33 | .side-a { 34 | background-image: url('https://www.usmint.gov/wordpress/wp-content/uploads/2024/03/2024-kennedy-half-dollar-proof-reverse.jpg'); 35 | background-size: cover; 36 | background-position: center; 37 | z-index: 100; 38 | } 39 | 40 | .side-b { 41 | background-image: url('https://www.usmint.gov/wordpress/wp-content/uploads/2024/03/2024-kennedy-half-dollar-proof-obverse.jpg'); 42 | background-size: cover; 43 | background-position: center; 44 | transform: rotateY(-180deg); 45 | } 46 | 47 | #coin.heads { 48 | animation: flipHeads 2s ease-out forwards; 49 | } 50 | 51 | #coin.tails { 52 | animation: flipTails 2s ease-out forwards; 53 | } 54 | 55 | @keyframes flipHeads { 56 | from { 57 | transform: rotateY(0); 58 | } 59 | 60 | to { 61 | transform: rotateY(540deg); 62 | } 63 | } 64 | 65 | @keyframes flipTails { 66 | from { 67 | transform: rotateY(0); 68 | } 69 | 70 | to { 71 | transform: rotateY(720deg); 72 | } 73 | } 74 | 75 | #coin.flip-animation { 76 | animation: flip 1s infinite; 77 | } 78 | 79 | @keyframes flip { 80 | 0% { 81 | transform: rotateY(0deg); 82 | } 83 | 84 | 100% { 85 | transform: rotateY(360deg); 86 | } 87 | } -------------------------------------------------------------------------------- /frontend/src/actions/toss.js: -------------------------------------------------------------------------------- 1 | import * as api from '../api'; 2 | import { SETFLIP, TOKENAMOUNT, TOPTENPLAYER, WAGERHISTORY, WAGERSTATUS } from '../constants/actionTypes'; 3 | import * as messages from '../messages' 4 | 5 | export const wagerRequest = (flip, wagerAmount, wagering) => async (dispatch) => { 6 | try { 7 | const param = { 8 | wager: wagerAmount, 9 | choice: wagering 10 | }; 11 | const { data } = await api.wagerRequest(param); 12 | data.win ? messages.info("You are Winner") : messages.info("You are loser");; 13 | dispatch({ type: WAGERHISTORY, data: data.recentWagers }) 14 | dispatch({ type: WAGERSTATUS, data: data.result }) 15 | dispatch({ type: TOKENAMOUNT, data: data.token_amount }) 16 | dispatch({ type: SETFLIP, data: flip }) 17 | 18 | } catch (error) { 19 | dispatch({ type: WAGERSTATUS }, "heads") 20 | messages.error(error.response.data.message); 21 | } 22 | }; 23 | 24 | export const recentWagers = () => async (dispatch) => { 25 | try { 26 | const { data } = await api.recentWagers(); 27 | dispatch({ type: WAGERHISTORY, data: data }) 28 | } catch (error) { 29 | dispatch({ type: WAGERSTATUS }, "heads") 30 | messages.error(error.response.data.message); 31 | } 32 | } 33 | 34 | export const getTopTenPlayer = () => async (dispatch) => { 35 | try { 36 | const { data } = await api.getTopTenPlayer(); 37 | console.log(data) 38 | dispatch({ type: TOPTENPLAYER, data: data }) 39 | } catch (error) { 40 | messages.error(error.response.data.message); 41 | } 42 | } 43 | 44 | 45 | export const getTokenAmount = () => async (dispatch) => { 46 | try { 47 | const { data } = await api.getTokenAmount(); 48 | dispatch({ type: TOKENAMOUNT, data: data.token_amount }) 49 | } catch (error) { 50 | messages.error(error.response.data.message); 51 | } 52 | } 53 | 54 | -------------------------------------------------------------------------------- /frontend/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 12 | 13 | 17 | 18 | 19 | 28 | React App 29 | 30 | 31 | 32 |
33 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /backend/src/api/wager.js: -------------------------------------------------------------------------------- 1 | import User from "../models/user.js"; 2 | import CoinToss from "../models/coinToss.js"; 3 | import BonusPayout from "../models/bonusPayout.js"; 4 | 5 | const handleCoinToss = async (req, res) => { 6 | try { 7 | 8 | const { wager, choice } = req.body; 9 | const { userId } = req; 10 | 11 | if (!userId || !wager || !choice) { 12 | return res.status(400).json({ message: "Invalid request" }); 13 | } 14 | 15 | const user = await User.findById(userId); 16 | if (user.token_amount < wager) { 17 | throw new Error('Insufficient tokens'); 18 | } 19 | 20 | user.token_amount -= wager; 21 | const result = Math.random() < 0.5 ? 'heads' : 'tails'; 22 | const win = result === choice; 23 | 24 | let payout = 0; 25 | 26 | if (win) { 27 | payout = wager * 2; 28 | user.token_amount += payout; 29 | user.winningStreak += 1; 30 | } else { 31 | user.winningStreak = 0; 32 | } 33 | 34 | await user.save(); 35 | 36 | const toss = await CoinToss.create({ 37 | userId, 38 | wager, 39 | choice, 40 | result, 41 | win, 42 | payout 43 | }); 44 | 45 | if (win) { 46 | if (user.winningStreak === 3) { 47 | const bonusAmount = wager * 3; 48 | user.token_amount += bonusAmount; 49 | await BonusPayout.create({ 50 | userId, 51 | tossId: toss._id, 52 | bonusMultiplier: 3, 53 | bonusAmount 54 | }); 55 | await user.save(); 56 | } else if (user.winningStreak === 5) { 57 | const bonusAmount = wager * 10; 58 | user.token_amount += bonusAmount; 59 | await BonusPayout.create({ 60 | userId, 61 | tossId: toss._id, 62 | bonusMultiplier: 10, 63 | bonusAmount 64 | }); 65 | user.winningStreak = 0; 66 | await user.save(); 67 | } 68 | } 69 | const recentWagers = await CoinToss.find({ userId }).sort({ createdAt: -1 }).limit(10).lean(); 70 | for (let wager of recentWagers) { 71 | const bonus = await BonusPayout.findOne({ tossId: wager._id }).lean(); 72 | wager.bonus = bonus ? bonus.bonusAmount : 0; 73 | } 74 | const response_data = { result, win, payout, token_amount: user.token_amount, recentWagers }; 75 | res.status(200).json(response_data); 76 | } catch (error) { 77 | res.status(500).json({ message: error.message }); 78 | } 79 | } 80 | export default handleCoinToss; -------------------------------------------------------------------------------- /frontend/README.md: -------------------------------------------------------------------------------- 1 | # Getting Started with Create React App 2 | 3 | This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). 4 | 5 | ## Available Scripts 6 | 7 | In the project directory, you can run: 8 | 9 | ### `npm start` 10 | 11 | Runs the app in the development mode.\ 12 | Open [http://localhost:3000](http://localhost:3000) to view it in your browser. 13 | 14 | The page will reload when you make changes.\ 15 | You may also see any lint errors in the console. 16 | 17 | ### `npm test` 18 | 19 | Launches the test runner in the interactive watch mode.\ 20 | See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. 21 | 22 | ### `npm run build` 23 | 24 | Builds the app for production to the `build` folder.\ 25 | It correctly bundles React in production mode and optimizes the build for the best performance. 26 | 27 | The build is minified and the filenames include the hashes.\ 28 | Your app is ready to be deployed! 29 | 30 | See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. 31 | 32 | ## Learn More 33 | 34 | You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). 35 | 36 | To learn React, check out the [React documentation](https://reactjs.org/). 37 | 38 | ### Code Splitting 39 | 40 | This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting) 41 | 42 | ### Analyzing the Bundle Size 43 | 44 | This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size) 45 | 46 | ### Making a Progressive Web App 47 | 48 | This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app) 49 | 50 | ### Advanced Configuration 51 | 52 | This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration) 53 | 54 | ### Deployment 55 | 56 | This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment) 57 | 58 | ### `npm run build` fails to minify 59 | 60 | This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify) 61 | -------------------------------------------------------------------------------- /frontend/src/components/Navbar/Navbar.js: -------------------------------------------------------------------------------- 1 | import React, { useState, useEffect } from "react"; 2 | import { Box, AppBar, Typography, Button, useMediaQuery } from "@mui/material"; 3 | import { Link, useNavigate, useLocation } from "react-router-dom"; 4 | import { useDispatch, useSelector } from "react-redux"; 5 | import { jwtDecode } from "jwt-decode"; 6 | import * as actionType from "../../constants/actionTypes"; 7 | import { styles } from "./styles"; 8 | import AccountMenu from "../AccountMenu/AccountMenu"; 9 | import { useCallback } from "react"; 10 | import { getTokenAmount } from "../../actions/toss"; 11 | 12 | const Navbar = () => { 13 | const [user, setUser] = useState( 14 | localStorage.getItem("profile") 15 | ? jwtDecode(JSON.parse(localStorage.getItem("profile")).token) 16 | : "null" 17 | ); 18 | const token_amount = useSelector((state) => state.wagerReducer.tokenAmount); 19 | 20 | const dispatch = useDispatch(); 21 | let location = useLocation(); 22 | const history = useNavigate(); 23 | 24 | const logout = useCallback(() => { 25 | dispatch({ type: actionType.LOGOUT }); 26 | history("/auth"); 27 | setUser("null"); 28 | }, [dispatch, history]); 29 | 30 | useEffect(() => { 31 | if (user !== "null" && user !== null) { 32 | if (user.exp * 1000 < new Date().getTime()) logout(); 33 | } 34 | setUser( 35 | localStorage.getItem("profile") 36 | ? jwtDecode(JSON.parse(localStorage.getItem("profile")).token) 37 | : "null" 38 | ); 39 | }, [location]); 40 | 41 | useEffect(() => { 42 | dispatch(getTokenAmount()); 43 | }, []) 44 | const isBigScreen = useMediaQuery((theme) => theme.breakpoints.up('sm')); 45 | 46 | return ( 47 | 48 |
49 | 56 | CoinToss 57 | 58 |
59 | {user !== "null" && user !== null ? ( 60 | 61 | {isBigScreen ? ( 62 | 67 | Token Amount : {token_amount} 68 | 69 | ) : (<>)} 70 | 71 | 72 | ) : ( 73 | 81 | )} 82 |
83 | ); 84 | }; 85 | 86 | export default Navbar; 87 | -------------------------------------------------------------------------------- /frontend/src/components/PasswordSettings/PasswordSettings.js: -------------------------------------------------------------------------------- 1 | import React, { useEffect, useState } from "react"; 2 | import { 3 | Avatar, 4 | Button, 5 | Container, 6 | Grid, 7 | Paper, 8 | Typography, 9 | } from "@mui/material"; 10 | import Input from "../Login/Input"; 11 | import { styles } from "./styles"; 12 | import LockIcon from "@mui/icons-material/LockRounded"; 13 | import { changePassword } from "../../actions/login"; 14 | import { jwtDecode } from "jwt-decode"; 15 | import { useNavigate } from "react-router-dom"; 16 | import { useDispatch } from "react-redux"; 17 | 18 | const PasswordSetting = () => { 19 | const user = localStorage.getItem("profile") 20 | ? jwtDecode(JSON.parse(localStorage.getItem("profile")).token) 21 | : "null"; 22 | const isSingedIn = user; 23 | const history = useNavigate(); 24 | const [showPassword, setShowPassword] = useState(false); 25 | const [changeFormData, setChangeFormData] = useState({ 26 | oldPassword: "", 27 | newPassword: "", 28 | email: user.email, 29 | }); 30 | const dispatch = useDispatch(); 31 | 32 | const handleChangeC = (e) => { 33 | setChangeFormData({ ...changeFormData, [e.target.name]: e.target.value }); 34 | }; 35 | 36 | const handleShowPassword = (e) => { 37 | setShowPassword((prevPassword) => !prevPassword); 38 | }; 39 | 40 | const handleSubmitChange = (e) => { 41 | e.preventDefault(); 42 | dispatch(changePassword(changeFormData, history)); 43 | }; 44 | 45 | useEffect(() => { 46 | if (isSingedIn === "null" || isSingedIn === null) { 47 | history("/"); 48 | } 49 | }, []); 50 | 51 | if (isSingedIn !== "null" && isSingedIn !== null) { 52 | return ( 53 |
54 | 55 | 56 | 57 | 58 | 59 | 60 | Set Password 61 | 62 |
63 | 64 | 70 | To change your password, enter your current password and your new password. 71 | 72 | 79 | 87 | 96 | 97 |
98 |
99 |
100 |
101 | ); 102 | } else { 103 | return <>No Access; 104 | } 105 | }; 106 | 107 | export default PasswordSetting; 108 | -------------------------------------------------------------------------------- /frontend/src/components/Home/Home.js: -------------------------------------------------------------------------------- 1 | import React, { useEffect, useState } from "react"; 2 | import { Container, Divider, Grid, Grow, Paper, Typography } from "@mui/material"; 3 | import { jwtDecode } from "jwt-decode"; 4 | import WagerAmount from "../WagerAmount/WagerAmount"; 5 | import Wagering from "../Wagering/Wagering"; 6 | import Button from '@mui/material/Button'; 7 | import SendIcon from '@mui/icons-material/Send'; 8 | import HistoryTable from "../HistoryTable/HitstoryTable"; 9 | import { useDispatch, useSelector } from "react-redux"; 10 | import { wagerRequest } from "../../actions/toss"; 11 | import Coin from "../Coin/coin"; 12 | import { SETFLIP, TOKENAMOUNT } from "../../constants/actionTypes"; 13 | import { recentWagers } from "../../actions/toss"; 14 | import LeaderBoardTable from "../LeaderBoardTable/LeaderBoardTable"; 15 | import { getTopTenPlayer } from "../../actions/toss"; 16 | 17 | const Home = () => { 18 | const dispatch = useDispatch(); 19 | 20 | const user = localStorage.getItem("profile") 21 | ? jwtDecode(JSON.parse(localStorage.getItem("profile")).token) 22 | : "null"; 23 | const result = useSelector((state) => state.wagerReducer.wagerStatus); 24 | const flip = useSelector((state) => state.wagerReducer.flip); 25 | const recentWager = useSelector((state) => state.wagerReducer.wagerHistory); 26 | const topTenPlayer = useSelector((state) => state.wagerReducer.topTenPlayer); 27 | 28 | const isSingedIn = user; 29 | const [wagerAmount, setWagerAmount] = useState(1); 30 | const [wagering, setWagering] = useState("heads"); 31 | const setFlip = () => (dispatch({ type: SETFLIP, data: !flip })); 32 | 33 | const handleSubmit = (e) => { 34 | e.preventDefault(); 35 | dispatch(wagerRequest(flip, wagerAmount, wagering)) 36 | } 37 | 38 | useEffect(() => { 39 | dispatch(recentWagers()); 40 | dispatch(getTopTenPlayer()); 41 | }, []) 42 | 43 | return ( 44 | 45 | 46 | 47 | {isSingedIn !== "null" && isSingedIn !== null ? ( 48 |
49 | 50 | {`Welcome ${user.name}`} 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 |
78 | ) : ( 79 | 80 | Login to Play 81 | 82 | )} 83 |
84 |
85 |
86 | ); 87 | }; 88 | 89 | export default Home; 90 | -------------------------------------------------------------------------------- /frontend/src/components/WagerAmount/WagerAmount.js: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { styled } from '@mui/system'; 3 | 4 | const NumberInput = React.forwardRef(function CustomNumberInput(props, ref) { 5 | const { value, onChange, min, ...other } = props; 6 | const handleChange = (event) => { 7 | const newValue = event.target.value; 8 | if (newValue === '' || (min && newValue >= min)) { 9 | onChange(event, newValue); 10 | } 11 | }; 12 | 13 | return ( 14 | 15 | 22 | onChange(null, Math.max(min, value + 1))}>▴ 23 | onChange(null, Math.max(min, value - 1))}>▾ 24 | 25 | ); 26 | }); 27 | 28 | export default function NumberInputBasic({ wager, setWager }) { 29 | return ( 30 | setWager(val)} 35 | min={1} 36 | /> 37 | ); 38 | } 39 | 40 | const blue = { 41 | 100: '#DAECFF', 42 | 200: '#80BFFF', 43 | 400: '#3399FF', 44 | 500: '#007FFF', 45 | 600: '#0072E5', 46 | }; 47 | 48 | const grey = { 49 | 50: '#F3F6F9', 50 | 100: '#E5EAF2', 51 | 200: '#DAE2ED', 52 | 300: '#C7D0DD', 53 | 400: '#B0B8C4', 54 | 500: '#9DA8B7', 55 | 600: '#6B7A90', 56 | 700: '#434D5B', 57 | 800: '#303740', 58 | 900: '#1C2025', 59 | }; 60 | 61 | const StyledInputRoot = styled('div')( 62 | ({ theme }) => ` 63 | font-family: 'IBM Plex Sans', sans-serif; 64 | font-weight: 400; 65 | border-radius: 8px; 66 | color: ${theme.palette.mode === 'dark' ? grey[300] : grey[900]}; 67 | background: ${theme.palette.mode === 'dark' ? grey[900] : '#fff'}; 68 | border: 1px solid ${theme.palette.mode === 'dark' ? grey[700] : grey[200]}; 69 | box-shadow: 0px 2px 2px ${theme.palette.mode === 'dark' ? grey[900] : grey[50]}; 70 | display: grid; 71 | grid-template-columns: 1fr 19px; 72 | grid-template-rows: 1fr 1fr; 73 | overflow: hidden; 74 | column-gap: 8px; 75 | padding: 4px; 76 | 77 | &:hover { 78 | border-color: ${blue[400]}; 79 | } 80 | 81 | // firefox 82 | &:focus-visible { 83 | outline: 0; 84 | } 85 | `, 86 | ); 87 | 88 | const StyledInputElement = styled('input')( 89 | ({ theme }) => ` 90 | font-size: 0.875rem; 91 | font-family: inherit; 92 | font-weight: 400; 93 | line-height: 1.5; 94 | grid-column: 1/2; 95 | grid-row: 1/3; 96 | color: ${theme.palette.mode === 'dark' ? grey[300] : grey[900]}; 97 | background: inherit; 98 | border: none; 99 | border-radius: inherit; 100 | padding: 8px 12px; 101 | outline: 0; 102 | `, 103 | ); 104 | 105 | const StyledButton = styled('button')( 106 | ({ theme }) => ` 107 | display: flex; 108 | flex-flow: row nowrap; 109 | justify-content: center; 110 | align-items: center; 111 | appearance: none; 112 | padding: 0; 113 | width: 19px; 114 | height: 19px; 115 | font-family: system-ui, sans-serif; 116 | font-size: 0.875rem; 117 | line-height: 1; 118 | box-sizing: border-box; 119 | background: ${theme.palette.mode === 'dark' ? grey[900] : '#fff'}; 120 | border: 0; 121 | color: ${theme.palette.mode === 'dark' ? grey[300] : grey[900]}; 122 | transition-property: all; 123 | transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); 124 | transition-duration: 120ms; 125 | 126 | &:hover { 127 | background: ${theme.palette.mode === 'dark' ? grey[800] : grey[50]}; 128 | border-color: ${theme.palette.mode === 'dark' ? grey[600] : grey[300]}; 129 | cursor: pointer; 130 | } 131 | `, 132 | ); 133 | -------------------------------------------------------------------------------- /frontend/src/components/AccountMenu/AccountMenu.js: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import Box from '@mui/material/Box'; 3 | import Avatar from '@mui/material/Avatar'; 4 | import Menu from '@mui/material/Menu'; 5 | import MenuItem from '@mui/material/MenuItem'; 6 | import ListItemIcon from '@mui/material/ListItemIcon'; 7 | import IconButton from '@mui/material/IconButton'; 8 | import Tooltip from '@mui/material/Tooltip'; 9 | import Settings from '@mui/icons-material/Settings'; 10 | import Logout from '@mui/icons-material/Logout'; 11 | import { styles } from './styles'; 12 | import { useDispatch } from "react-redux"; 13 | import * as actionType from "../../constants/actionTypes"; 14 | import { useNavigate } from "react-router-dom"; 15 | import { Divider } from '@mui/material'; 16 | import { useSelector } from 'react-redux'; 17 | import Badge from '@mui/material/Badge'; 18 | 19 | export default function AccountMenu({ user_data, setUser }) { 20 | const { name, picture } = user_data; 21 | const [anchorEl, setAnchorEl] = React.useState(null); 22 | const dispatch = useDispatch(); 23 | const history = useNavigate(); 24 | const token_amount = useSelector((state) => state.wagerReducer.tokenAmount); 25 | 26 | const open = Boolean(anchorEl); 27 | const handleClick = (event) => { 28 | setAnchorEl(event.currentTarget); 29 | }; 30 | const handleClose = () => { 31 | setAnchorEl(null); 32 | }; 33 | const handleLogoutPassword = () => { 34 | dispatch({ type: actionType.LOGOUT }); 35 | history("/auth"); 36 | setUser("null"); 37 | }; 38 | const handleResetPassword = () => { 39 | history("/password"); 40 | } 41 | return ( 42 | 43 | 44 | 45 | 53 | {name.charAt(0)} 54 | 55 | 56 | 57 | 92 | 93 | 94 | 95 | 96 | 97 | {name} 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | Reset Password 106 | 107 | 108 | 109 | 110 | 111 | Logout 112 | 113 | 114 | 115 | ); 116 | } -------------------------------------------------------------------------------- /frontend/src/components/Login/Login.js: -------------------------------------------------------------------------------- 1 | import React, { useState } from "react"; 2 | import { 3 | Avatar, 4 | Button, 5 | Container, 6 | Grid, 7 | Paper, 8 | Typography, 9 | } from "@mui/material"; 10 | import Input from "./Input"; 11 | import { jwtDecode } from "jwt-decode"; 12 | import { useDispatch } from "react-redux"; 13 | import { useNavigate } from "react-router-dom"; 14 | import { signup, login } from "../../actions/login"; 15 | import LockIcon from "@mui/icons-material/LockOutlined"; 16 | import { styles } from "./styles"; 17 | 18 | const formDataInitVal = { 19 | firstName: "", 20 | lastName: "", 21 | email: "", 22 | password: "", 23 | confirmPassword: "", 24 | }; 25 | 26 | const Login = () => { 27 | const [formData, setFormData] = useState(formDataInitVal); 28 | const [showPassword, setShowPassword] = useState(false); 29 | const [isLoggedIn, setIsLoggedIn] = useState(true); 30 | const user = localStorage.getItem("profile") 31 | ? jwtDecode(JSON.parse(localStorage.getItem("profile")).token) 32 | : "null"; 33 | 34 | const dispatch = useDispatch(); 35 | const history = useNavigate(); 36 | 37 | const handleSubmit = (e) => { 38 | e.preventDefault(); 39 | if (isLoggedIn) { 40 | dispatch(login(formData, history)); 41 | } else { 42 | dispatch(signup(formData, history)); 43 | } 44 | }; 45 | 46 | const handleChange = (e) => { 47 | setFormData({ ...formData, [e.target.name]: e.target.value }); 48 | }; 49 | 50 | const handleShowPassword = (e) => { 51 | setShowPassword((prevPassword) => !prevPassword); 52 | }; 53 | 54 | const switchLogin = (e) => { 55 | setIsLoggedIn((prevState) => !prevState); 56 | }; 57 | 58 | if (user !== "null" && user !== null) { 59 | history("/"); 60 | return null; 61 | } else { 62 | return ( 63 |
64 | 65 | 66 | 67 | {" "} 68 | 69 | 70 | 71 | {isLoggedIn ? "Login" : "Logout"} 72 | 73 |
74 | 75 | {!isLoggedIn && ( 76 | <> 77 | 84 | 90 | 91 | )} 92 | 93 | 99 | 109 | {!isLoggedIn && ( 110 | <> 111 | 118 | 119 | )} 120 | 121 | 130 | 131 | 132 | 137 | 138 | 139 |
140 |
141 |
142 |
143 | ); 144 | } 145 | }; 146 | 147 | export default Login; 148 | -------------------------------------------------------------------------------- /backend/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "backend", 3 | "version": "1.0.0", 4 | "lockfileVersion": 3, 5 | "requires": true, 6 | "packages": { 7 | "": { 8 | "name": "backend", 9 | "version": "1.0.0", 10 | "license": "ISC", 11 | "dependencies": { 12 | "axios": "^1.6.5", 13 | "bcryptjs": "^2.4.3", 14 | "body-parser": "^1.20.2", 15 | "cors": "^2.8.5", 16 | "dotenv": "^16.3.2", 17 | "express": "^4.18.2", 18 | "jsonwebtoken": "^9.0.2", 19 | "mongoose": "^8.1.0" 20 | } 21 | }, 22 | "node_modules/@mongodb-js/saslprep": { 23 | "version": "1.1.4", 24 | "resolved": "https://registry.npmjs.org/@mongodb-js/saslprep/-/saslprep-1.1.4.tgz", 25 | "integrity": "sha512-8zJ8N1x51xo9hwPh6AWnKdLGEC5N3lDa6kms1YHmFBoRhTpJR6HG8wWk0td1MVCu9cD4YBrvjZEtd5Obw0Fbnw==", 26 | "dependencies": { 27 | "sparse-bitfield": "^3.0.3" 28 | } 29 | }, 30 | "node_modules/@types/webidl-conversions": { 31 | "version": "7.0.3", 32 | "resolved": "https://registry.npmjs.org/@types/webidl-conversions/-/webidl-conversions-7.0.3.tgz", 33 | "integrity": "sha512-CiJJvcRtIgzadHCYXw7dqEnMNRjhGZlYK05Mj9OyktqV8uVT8fD2BFOB7S1uwBE3Kj2Z+4UyPmFw/Ixgw/LAlA==" 34 | }, 35 | "node_modules/@types/whatwg-url": { 36 | "version": "11.0.4", 37 | "resolved": "https://registry.npmjs.org/@types/whatwg-url/-/whatwg-url-11.0.4.tgz", 38 | "integrity": "sha512-lXCmTWSHJvf0TRSO58nm978b8HJ/EdsSsEKLd3ODHFjo+3VGAyyTp4v50nWvwtzBxSMQrVOK7tcuN0zGPLICMw==", 39 | "dependencies": { 40 | "@types/webidl-conversions": "*" 41 | } 42 | }, 43 | "node_modules/accepts": { 44 | "version": "1.3.8", 45 | "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", 46 | "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", 47 | "dependencies": { 48 | "mime-types": "~2.1.34", 49 | "negotiator": "0.6.3" 50 | }, 51 | "engines": { 52 | "node": ">= 0.6" 53 | } 54 | }, 55 | "node_modules/array-flatten": { 56 | "version": "1.1.1", 57 | "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", 58 | "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==" 59 | }, 60 | "node_modules/asynckit": { 61 | "version": "0.4.0", 62 | "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", 63 | "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" 64 | }, 65 | "node_modules/axios": { 66 | "version": "1.6.5", 67 | "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.5.tgz", 68 | "integrity": "sha512-Ii012v05KEVuUoFWmMW/UQv9aRIc3ZwkWDcM+h5Il8izZCtRVpDUfwpoFf7eOtajT3QiGR4yDUx7lPqHJULgbg==", 69 | "dependencies": { 70 | "follow-redirects": "^1.15.4", 71 | "form-data": "^4.0.0", 72 | "proxy-from-env": "^1.1.0" 73 | } 74 | }, 75 | "node_modules/bcryptjs": { 76 | "version": "2.4.3", 77 | "resolved": "https://registry.npmjs.org/bcryptjs/-/bcryptjs-2.4.3.tgz", 78 | "integrity": "sha512-V/Hy/X9Vt7f3BbPJEi8BdVFMByHi+jNXrYkW3huaybV/kQ0KJg0Y6PkEMbn+zeT+i+SiKZ/HMqJGIIt4LZDqNQ==" 79 | }, 80 | "node_modules/body-parser": { 81 | "version": "1.20.2", 82 | "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.2.tgz", 83 | "integrity": "sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==", 84 | "dependencies": { 85 | "bytes": "3.1.2", 86 | "content-type": "~1.0.5", 87 | "debug": "2.6.9", 88 | "depd": "2.0.0", 89 | "destroy": "1.2.0", 90 | "http-errors": "2.0.0", 91 | "iconv-lite": "0.4.24", 92 | "on-finished": "2.4.1", 93 | "qs": "6.11.0", 94 | "raw-body": "2.5.2", 95 | "type-is": "~1.6.18", 96 | "unpipe": "1.0.0" 97 | }, 98 | "engines": { 99 | "node": ">= 0.8", 100 | "npm": "1.2.8000 || >= 1.4.16" 101 | } 102 | }, 103 | "node_modules/bson": { 104 | "version": "6.2.0", 105 | "resolved": "https://registry.npmjs.org/bson/-/bson-6.2.0.tgz", 106 | "integrity": "sha512-ID1cI+7bazPDyL9wYy9GaQ8gEEohWvcUl/Yf0dIdutJxnmInEEyCsb4awy/OiBfall7zBA179Pahi3vCdFze3Q==", 107 | "engines": { 108 | "node": ">=16.20.1" 109 | } 110 | }, 111 | "node_modules/buffer-equal-constant-time": { 112 | "version": "1.0.1", 113 | "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", 114 | "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==" 115 | }, 116 | "node_modules/bytes": { 117 | "version": "3.1.2", 118 | "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", 119 | "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", 120 | "engines": { 121 | "node": ">= 0.8" 122 | } 123 | }, 124 | "node_modules/call-bind": { 125 | "version": "1.0.5", 126 | "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.5.tgz", 127 | "integrity": "sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ==", 128 | "dependencies": { 129 | "function-bind": "^1.1.2", 130 | "get-intrinsic": "^1.2.1", 131 | "set-function-length": "^1.1.1" 132 | }, 133 | "funding": { 134 | "url": "https://github.com/sponsors/ljharb" 135 | } 136 | }, 137 | "node_modules/combined-stream": { 138 | "version": "1.0.8", 139 | "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", 140 | "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", 141 | "dependencies": { 142 | "delayed-stream": "~1.0.0" 143 | }, 144 | "engines": { 145 | "node": ">= 0.8" 146 | } 147 | }, 148 | "node_modules/content-disposition": { 149 | "version": "0.5.4", 150 | "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", 151 | "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", 152 | "dependencies": { 153 | "safe-buffer": "5.2.1" 154 | }, 155 | "engines": { 156 | "node": ">= 0.6" 157 | } 158 | }, 159 | "node_modules/content-type": { 160 | "version": "1.0.5", 161 | "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", 162 | "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", 163 | "engines": { 164 | "node": ">= 0.6" 165 | } 166 | }, 167 | "node_modules/cookie": { 168 | "version": "0.5.0", 169 | "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", 170 | "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", 171 | "engines": { 172 | "node": ">= 0.6" 173 | } 174 | }, 175 | "node_modules/cookie-signature": { 176 | "version": "1.0.6", 177 | "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", 178 | "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==" 179 | }, 180 | "node_modules/cors": { 181 | "version": "2.8.5", 182 | "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", 183 | "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", 184 | "dependencies": { 185 | "object-assign": "^4", 186 | "vary": "^1" 187 | }, 188 | "engines": { 189 | "node": ">= 0.10" 190 | } 191 | }, 192 | "node_modules/debug": { 193 | "version": "2.6.9", 194 | "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", 195 | "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", 196 | "dependencies": { 197 | "ms": "2.0.0" 198 | } 199 | }, 200 | "node_modules/define-data-property": { 201 | "version": "1.1.1", 202 | "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.1.tgz", 203 | "integrity": "sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ==", 204 | "dependencies": { 205 | "get-intrinsic": "^1.2.1", 206 | "gopd": "^1.0.1", 207 | "has-property-descriptors": "^1.0.0" 208 | }, 209 | "engines": { 210 | "node": ">= 0.4" 211 | } 212 | }, 213 | "node_modules/delayed-stream": { 214 | "version": "1.0.0", 215 | "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", 216 | "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", 217 | "engines": { 218 | "node": ">=0.4.0" 219 | } 220 | }, 221 | "node_modules/depd": { 222 | "version": "2.0.0", 223 | "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", 224 | "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", 225 | "engines": { 226 | "node": ">= 0.8" 227 | } 228 | }, 229 | "node_modules/destroy": { 230 | "version": "1.2.0", 231 | "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", 232 | "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", 233 | "engines": { 234 | "node": ">= 0.8", 235 | "npm": "1.2.8000 || >= 1.4.16" 236 | } 237 | }, 238 | "node_modules/dotenv": { 239 | "version": "16.3.2", 240 | "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.3.2.tgz", 241 | "integrity": "sha512-HTlk5nmhkm8F6JcdXvHIzaorzCoziNQT9mGxLPVXW8wJF1TiGSL60ZGB4gHWabHOaMmWmhvk2/lPHfnBiT78AQ==", 242 | "engines": { 243 | "node": ">=12" 244 | }, 245 | "funding": { 246 | "url": "https://github.com/motdotla/dotenv?sponsor=1" 247 | } 248 | }, 249 | "node_modules/ecdsa-sig-formatter": { 250 | "version": "1.0.11", 251 | "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", 252 | "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", 253 | "dependencies": { 254 | "safe-buffer": "^5.0.1" 255 | } 256 | }, 257 | "node_modules/ee-first": { 258 | "version": "1.1.1", 259 | "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", 260 | "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" 261 | }, 262 | "node_modules/encodeurl": { 263 | "version": "1.0.2", 264 | "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", 265 | "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", 266 | "engines": { 267 | "node": ">= 0.8" 268 | } 269 | }, 270 | "node_modules/escape-html": { 271 | "version": "1.0.3", 272 | "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", 273 | "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==" 274 | }, 275 | "node_modules/etag": { 276 | "version": "1.8.1", 277 | "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", 278 | "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", 279 | "engines": { 280 | "node": ">= 0.6" 281 | } 282 | }, 283 | "node_modules/express": { 284 | "version": "4.18.2", 285 | "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz", 286 | "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==", 287 | "dependencies": { 288 | "accepts": "~1.3.8", 289 | "array-flatten": "1.1.1", 290 | "body-parser": "1.20.1", 291 | "content-disposition": "0.5.4", 292 | "content-type": "~1.0.4", 293 | "cookie": "0.5.0", 294 | "cookie-signature": "1.0.6", 295 | "debug": "2.6.9", 296 | "depd": "2.0.0", 297 | "encodeurl": "~1.0.2", 298 | "escape-html": "~1.0.3", 299 | "etag": "~1.8.1", 300 | "finalhandler": "1.2.0", 301 | "fresh": "0.5.2", 302 | "http-errors": "2.0.0", 303 | "merge-descriptors": "1.0.1", 304 | "methods": "~1.1.2", 305 | "on-finished": "2.4.1", 306 | "parseurl": "~1.3.3", 307 | "path-to-regexp": "0.1.7", 308 | "proxy-addr": "~2.0.7", 309 | "qs": "6.11.0", 310 | "range-parser": "~1.2.1", 311 | "safe-buffer": "5.2.1", 312 | "send": "0.18.0", 313 | "serve-static": "1.15.0", 314 | "setprototypeof": "1.2.0", 315 | "statuses": "2.0.1", 316 | "type-is": "~1.6.18", 317 | "utils-merge": "1.0.1", 318 | "vary": "~1.1.2" 319 | }, 320 | "engines": { 321 | "node": ">= 0.10.0" 322 | } 323 | }, 324 | "node_modules/express/node_modules/body-parser": { 325 | "version": "1.20.1", 326 | "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz", 327 | "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==", 328 | "dependencies": { 329 | "bytes": "3.1.2", 330 | "content-type": "~1.0.4", 331 | "debug": "2.6.9", 332 | "depd": "2.0.0", 333 | "destroy": "1.2.0", 334 | "http-errors": "2.0.0", 335 | "iconv-lite": "0.4.24", 336 | "on-finished": "2.4.1", 337 | "qs": "6.11.0", 338 | "raw-body": "2.5.1", 339 | "type-is": "~1.6.18", 340 | "unpipe": "1.0.0" 341 | }, 342 | "engines": { 343 | "node": ">= 0.8", 344 | "npm": "1.2.8000 || >= 1.4.16" 345 | } 346 | }, 347 | "node_modules/express/node_modules/raw-body": { 348 | "version": "2.5.1", 349 | "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz", 350 | "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", 351 | "dependencies": { 352 | "bytes": "3.1.2", 353 | "http-errors": "2.0.0", 354 | "iconv-lite": "0.4.24", 355 | "unpipe": "1.0.0" 356 | }, 357 | "engines": { 358 | "node": ">= 0.8" 359 | } 360 | }, 361 | "node_modules/finalhandler": { 362 | "version": "1.2.0", 363 | "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", 364 | "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", 365 | "dependencies": { 366 | "debug": "2.6.9", 367 | "encodeurl": "~1.0.2", 368 | "escape-html": "~1.0.3", 369 | "on-finished": "2.4.1", 370 | "parseurl": "~1.3.3", 371 | "statuses": "2.0.1", 372 | "unpipe": "~1.0.0" 373 | }, 374 | "engines": { 375 | "node": ">= 0.8" 376 | } 377 | }, 378 | "node_modules/follow-redirects": { 379 | "version": "1.15.5", 380 | "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.5.tgz", 381 | "integrity": "sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw==", 382 | "funding": [ 383 | { 384 | "type": "individual", 385 | "url": "https://github.com/sponsors/RubenVerborgh" 386 | } 387 | ], 388 | "engines": { 389 | "node": ">=4.0" 390 | }, 391 | "peerDependenciesMeta": { 392 | "debug": { 393 | "optional": true 394 | } 395 | } 396 | }, 397 | "node_modules/form-data": { 398 | "version": "4.0.0", 399 | "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", 400 | "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", 401 | "dependencies": { 402 | "asynckit": "^0.4.0", 403 | "combined-stream": "^1.0.8", 404 | "mime-types": "^2.1.12" 405 | }, 406 | "engines": { 407 | "node": ">= 6" 408 | } 409 | }, 410 | "node_modules/forwarded": { 411 | "version": "0.2.0", 412 | "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", 413 | "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", 414 | "engines": { 415 | "node": ">= 0.6" 416 | } 417 | }, 418 | "node_modules/fresh": { 419 | "version": "0.5.2", 420 | "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", 421 | "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", 422 | "engines": { 423 | "node": ">= 0.6" 424 | } 425 | }, 426 | "node_modules/function-bind": { 427 | "version": "1.1.2", 428 | "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", 429 | "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", 430 | "funding": { 431 | "url": "https://github.com/sponsors/ljharb" 432 | } 433 | }, 434 | "node_modules/get-intrinsic": { 435 | "version": "1.2.2", 436 | "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.2.tgz", 437 | "integrity": "sha512-0gSo4ml/0j98Y3lngkFEot/zhiCeWsbYIlZ+uZOVgzLyLaUw7wxUL+nCTP0XJvJg1AXulJRI3UJi8GsbDuxdGA==", 438 | "dependencies": { 439 | "function-bind": "^1.1.2", 440 | "has-proto": "^1.0.1", 441 | "has-symbols": "^1.0.3", 442 | "hasown": "^2.0.0" 443 | }, 444 | "funding": { 445 | "url": "https://github.com/sponsors/ljharb" 446 | } 447 | }, 448 | "node_modules/gopd": { 449 | "version": "1.0.1", 450 | "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", 451 | "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", 452 | "dependencies": { 453 | "get-intrinsic": "^1.1.3" 454 | }, 455 | "funding": { 456 | "url": "https://github.com/sponsors/ljharb" 457 | } 458 | }, 459 | "node_modules/has-property-descriptors": { 460 | "version": "1.0.1", 461 | "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.1.tgz", 462 | "integrity": "sha512-VsX8eaIewvas0xnvinAe9bw4WfIeODpGYikiWYLH+dma0Jw6KHYqWiWfhQlgOVK8D6PvjubK5Uc4P0iIhIcNVg==", 463 | "dependencies": { 464 | "get-intrinsic": "^1.2.2" 465 | }, 466 | "funding": { 467 | "url": "https://github.com/sponsors/ljharb" 468 | } 469 | }, 470 | "node_modules/has-proto": { 471 | "version": "1.0.1", 472 | "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", 473 | "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", 474 | "engines": { 475 | "node": ">= 0.4" 476 | }, 477 | "funding": { 478 | "url": "https://github.com/sponsors/ljharb" 479 | } 480 | }, 481 | "node_modules/has-symbols": { 482 | "version": "1.0.3", 483 | "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", 484 | "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", 485 | "engines": { 486 | "node": ">= 0.4" 487 | }, 488 | "funding": { 489 | "url": "https://github.com/sponsors/ljharb" 490 | } 491 | }, 492 | "node_modules/hasown": { 493 | "version": "2.0.0", 494 | "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz", 495 | "integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==", 496 | "dependencies": { 497 | "function-bind": "^1.1.2" 498 | }, 499 | "engines": { 500 | "node": ">= 0.4" 501 | } 502 | }, 503 | "node_modules/http-errors": { 504 | "version": "2.0.0", 505 | "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", 506 | "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", 507 | "dependencies": { 508 | "depd": "2.0.0", 509 | "inherits": "2.0.4", 510 | "setprototypeof": "1.2.0", 511 | "statuses": "2.0.1", 512 | "toidentifier": "1.0.1" 513 | }, 514 | "engines": { 515 | "node": ">= 0.8" 516 | } 517 | }, 518 | "node_modules/iconv-lite": { 519 | "version": "0.4.24", 520 | "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", 521 | "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", 522 | "dependencies": { 523 | "safer-buffer": ">= 2.1.2 < 3" 524 | }, 525 | "engines": { 526 | "node": ">=0.10.0" 527 | } 528 | }, 529 | "node_modules/inherits": { 530 | "version": "2.0.4", 531 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", 532 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" 533 | }, 534 | "node_modules/ipaddr.js": { 535 | "version": "1.9.1", 536 | "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", 537 | "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", 538 | "engines": { 539 | "node": ">= 0.10" 540 | } 541 | }, 542 | "node_modules/jsonwebtoken": { 543 | "version": "9.0.2", 544 | "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz", 545 | "integrity": "sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ==", 546 | "dependencies": { 547 | "jws": "^3.2.2", 548 | "lodash.includes": "^4.3.0", 549 | "lodash.isboolean": "^3.0.3", 550 | "lodash.isinteger": "^4.0.4", 551 | "lodash.isnumber": "^3.0.3", 552 | "lodash.isplainobject": "^4.0.6", 553 | "lodash.isstring": "^4.0.1", 554 | "lodash.once": "^4.0.0", 555 | "ms": "^2.1.1", 556 | "semver": "^7.5.4" 557 | }, 558 | "engines": { 559 | "node": ">=12", 560 | "npm": ">=6" 561 | } 562 | }, 563 | "node_modules/jsonwebtoken/node_modules/ms": { 564 | "version": "2.1.3", 565 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", 566 | "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" 567 | }, 568 | "node_modules/jwa": { 569 | "version": "1.4.1", 570 | "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz", 571 | "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==", 572 | "dependencies": { 573 | "buffer-equal-constant-time": "1.0.1", 574 | "ecdsa-sig-formatter": "1.0.11", 575 | "safe-buffer": "^5.0.1" 576 | } 577 | }, 578 | "node_modules/jws": { 579 | "version": "3.2.2", 580 | "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz", 581 | "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==", 582 | "dependencies": { 583 | "jwa": "^1.4.1", 584 | "safe-buffer": "^5.0.1" 585 | } 586 | }, 587 | "node_modules/kareem": { 588 | "version": "2.5.1", 589 | "resolved": "https://registry.npmjs.org/kareem/-/kareem-2.5.1.tgz", 590 | "integrity": "sha512-7jFxRVm+jD+rkq3kY0iZDJfsO2/t4BBPeEb2qKn2lR/9KhuksYk5hxzfRYWMPV8P/x2d0kHD306YyWLzjjH+uA==", 591 | "engines": { 592 | "node": ">=12.0.0" 593 | } 594 | }, 595 | "node_modules/lodash.includes": { 596 | "version": "4.3.0", 597 | "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz", 598 | "integrity": "sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w==" 599 | }, 600 | "node_modules/lodash.isboolean": { 601 | "version": "3.0.3", 602 | "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", 603 | "integrity": "sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg==" 604 | }, 605 | "node_modules/lodash.isinteger": { 606 | "version": "4.0.4", 607 | "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz", 608 | "integrity": "sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA==" 609 | }, 610 | "node_modules/lodash.isnumber": { 611 | "version": "3.0.3", 612 | "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz", 613 | "integrity": "sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw==" 614 | }, 615 | "node_modules/lodash.isplainobject": { 616 | "version": "4.0.6", 617 | "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", 618 | "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==" 619 | }, 620 | "node_modules/lodash.isstring": { 621 | "version": "4.0.1", 622 | "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", 623 | "integrity": "sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==" 624 | }, 625 | "node_modules/lodash.once": { 626 | "version": "4.1.1", 627 | "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", 628 | "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==" 629 | }, 630 | "node_modules/lru-cache": { 631 | "version": "6.0.0", 632 | "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", 633 | "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", 634 | "dependencies": { 635 | "yallist": "^4.0.0" 636 | }, 637 | "engines": { 638 | "node": ">=10" 639 | } 640 | }, 641 | "node_modules/media-typer": { 642 | "version": "0.3.0", 643 | "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", 644 | "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", 645 | "engines": { 646 | "node": ">= 0.6" 647 | } 648 | }, 649 | "node_modules/memory-pager": { 650 | "version": "1.5.0", 651 | "resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz", 652 | "integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==" 653 | }, 654 | "node_modules/merge-descriptors": { 655 | "version": "1.0.1", 656 | "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", 657 | "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==" 658 | }, 659 | "node_modules/methods": { 660 | "version": "1.1.2", 661 | "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", 662 | "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", 663 | "engines": { 664 | "node": ">= 0.6" 665 | } 666 | }, 667 | "node_modules/mime": { 668 | "version": "1.6.0", 669 | "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", 670 | "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", 671 | "bin": { 672 | "mime": "cli.js" 673 | }, 674 | "engines": { 675 | "node": ">=4" 676 | } 677 | }, 678 | "node_modules/mime-db": { 679 | "version": "1.52.0", 680 | "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", 681 | "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", 682 | "engines": { 683 | "node": ">= 0.6" 684 | } 685 | }, 686 | "node_modules/mime-types": { 687 | "version": "2.1.35", 688 | "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", 689 | "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", 690 | "dependencies": { 691 | "mime-db": "1.52.0" 692 | }, 693 | "engines": { 694 | "node": ">= 0.6" 695 | } 696 | }, 697 | "node_modules/mongodb": { 698 | "version": "6.3.0", 699 | "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-6.3.0.tgz", 700 | "integrity": "sha512-tt0KuGjGtLUhLoU263+xvQmPHEGTw5LbcNC73EoFRYgSHwZt5tsoJC110hDyO1kjQzpgNrpdcSza9PknWN4LrA==", 701 | "dependencies": { 702 | "@mongodb-js/saslprep": "^1.1.0", 703 | "bson": "^6.2.0", 704 | "mongodb-connection-string-url": "^3.0.0" 705 | }, 706 | "engines": { 707 | "node": ">=16.20.1" 708 | }, 709 | "peerDependencies": { 710 | "@aws-sdk/credential-providers": "^3.188.0", 711 | "@mongodb-js/zstd": "^1.1.0", 712 | "gcp-metadata": "^5.2.0", 713 | "kerberos": "^2.0.1", 714 | "mongodb-client-encryption": ">=6.0.0 <7", 715 | "snappy": "^7.2.2", 716 | "socks": "^2.7.1" 717 | }, 718 | "peerDependenciesMeta": { 719 | "@aws-sdk/credential-providers": { 720 | "optional": true 721 | }, 722 | "@mongodb-js/zstd": { 723 | "optional": true 724 | }, 725 | "gcp-metadata": { 726 | "optional": true 727 | }, 728 | "kerberos": { 729 | "optional": true 730 | }, 731 | "mongodb-client-encryption": { 732 | "optional": true 733 | }, 734 | "snappy": { 735 | "optional": true 736 | }, 737 | "socks": { 738 | "optional": true 739 | } 740 | } 741 | }, 742 | "node_modules/mongodb-connection-string-url": { 743 | "version": "3.0.0", 744 | "resolved": "https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-3.0.0.tgz", 745 | "integrity": "sha512-t1Vf+m1I5hC2M5RJx/7AtxgABy1cZmIPQRMXw+gEIPn/cZNF3Oiy+l0UIypUwVB5trcWHq3crg2g3uAR9aAwsQ==", 746 | "dependencies": { 747 | "@types/whatwg-url": "^11.0.2", 748 | "whatwg-url": "^13.0.0" 749 | } 750 | }, 751 | "node_modules/mongoose": { 752 | "version": "8.1.0", 753 | "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-8.1.0.tgz", 754 | "integrity": "sha512-kOA4Xnq2goqNpN9EmYElGNWfxA9H80fxcr7UdJKWi3UMflza0R7wpTihCpM67dE/0MNFljoa0sjQtlXVkkySAQ==", 755 | "dependencies": { 756 | "bson": "^6.2.0", 757 | "kareem": "2.5.1", 758 | "mongodb": "6.3.0", 759 | "mpath": "0.9.0", 760 | "mquery": "5.0.0", 761 | "ms": "2.1.3", 762 | "sift": "16.0.1" 763 | }, 764 | "engines": { 765 | "node": ">=16.20.1" 766 | }, 767 | "funding": { 768 | "type": "opencollective", 769 | "url": "https://opencollective.com/mongoose" 770 | } 771 | }, 772 | "node_modules/mongoose/node_modules/ms": { 773 | "version": "2.1.3", 774 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", 775 | "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" 776 | }, 777 | "node_modules/mpath": { 778 | "version": "0.9.0", 779 | "resolved": "https://registry.npmjs.org/mpath/-/mpath-0.9.0.tgz", 780 | "integrity": "sha512-ikJRQTk8hw5DEoFVxHG1Gn9T/xcjtdnOKIU1JTmGjZZlg9LST2mBLmcX3/ICIbgJydT2GOc15RnNy5mHmzfSew==", 781 | "engines": { 782 | "node": ">=4.0.0" 783 | } 784 | }, 785 | "node_modules/mquery": { 786 | "version": "5.0.0", 787 | "resolved": "https://registry.npmjs.org/mquery/-/mquery-5.0.0.tgz", 788 | "integrity": "sha512-iQMncpmEK8R8ncT8HJGsGc9Dsp8xcgYMVSbs5jgnm1lFHTZqMJTUWTDx1LBO8+mK3tPNZWFLBghQEIOULSTHZg==", 789 | "dependencies": { 790 | "debug": "4.x" 791 | }, 792 | "engines": { 793 | "node": ">=14.0.0" 794 | } 795 | }, 796 | "node_modules/mquery/node_modules/debug": { 797 | "version": "4.3.4", 798 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", 799 | "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", 800 | "dependencies": { 801 | "ms": "2.1.2" 802 | }, 803 | "engines": { 804 | "node": ">=6.0" 805 | }, 806 | "peerDependenciesMeta": { 807 | "supports-color": { 808 | "optional": true 809 | } 810 | } 811 | }, 812 | "node_modules/mquery/node_modules/ms": { 813 | "version": "2.1.2", 814 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", 815 | "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" 816 | }, 817 | "node_modules/ms": { 818 | "version": "2.0.0", 819 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", 820 | "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" 821 | }, 822 | "node_modules/negotiator": { 823 | "version": "0.6.3", 824 | "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", 825 | "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", 826 | "engines": { 827 | "node": ">= 0.6" 828 | } 829 | }, 830 | "node_modules/object-assign": { 831 | "version": "4.1.1", 832 | "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", 833 | "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", 834 | "engines": { 835 | "node": ">=0.10.0" 836 | } 837 | }, 838 | "node_modules/object-inspect": { 839 | "version": "1.13.1", 840 | "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", 841 | "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==", 842 | "funding": { 843 | "url": "https://github.com/sponsors/ljharb" 844 | } 845 | }, 846 | "node_modules/on-finished": { 847 | "version": "2.4.1", 848 | "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", 849 | "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", 850 | "dependencies": { 851 | "ee-first": "1.1.1" 852 | }, 853 | "engines": { 854 | "node": ">= 0.8" 855 | } 856 | }, 857 | "node_modules/parseurl": { 858 | "version": "1.3.3", 859 | "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", 860 | "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", 861 | "engines": { 862 | "node": ">= 0.8" 863 | } 864 | }, 865 | "node_modules/path-to-regexp": { 866 | "version": "0.1.7", 867 | "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", 868 | "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==" 869 | }, 870 | "node_modules/proxy-addr": { 871 | "version": "2.0.7", 872 | "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", 873 | "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", 874 | "dependencies": { 875 | "forwarded": "0.2.0", 876 | "ipaddr.js": "1.9.1" 877 | }, 878 | "engines": { 879 | "node": ">= 0.10" 880 | } 881 | }, 882 | "node_modules/proxy-from-env": { 883 | "version": "1.1.0", 884 | "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", 885 | "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" 886 | }, 887 | "node_modules/punycode": { 888 | "version": "2.3.1", 889 | "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", 890 | "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", 891 | "engines": { 892 | "node": ">=6" 893 | } 894 | }, 895 | "node_modules/qs": { 896 | "version": "6.11.0", 897 | "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", 898 | "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", 899 | "dependencies": { 900 | "side-channel": "^1.0.4" 901 | }, 902 | "engines": { 903 | "node": ">=0.6" 904 | }, 905 | "funding": { 906 | "url": "https://github.com/sponsors/ljharb" 907 | } 908 | }, 909 | "node_modules/range-parser": { 910 | "version": "1.2.1", 911 | "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", 912 | "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", 913 | "engines": { 914 | "node": ">= 0.6" 915 | } 916 | }, 917 | "node_modules/raw-body": { 918 | "version": "2.5.2", 919 | "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", 920 | "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", 921 | "dependencies": { 922 | "bytes": "3.1.2", 923 | "http-errors": "2.0.0", 924 | "iconv-lite": "0.4.24", 925 | "unpipe": "1.0.0" 926 | }, 927 | "engines": { 928 | "node": ">= 0.8" 929 | } 930 | }, 931 | "node_modules/safe-buffer": { 932 | "version": "5.2.1", 933 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", 934 | "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", 935 | "funding": [ 936 | { 937 | "type": "github", 938 | "url": "https://github.com/sponsors/feross" 939 | }, 940 | { 941 | "type": "patreon", 942 | "url": "https://www.patreon.com/feross" 943 | }, 944 | { 945 | "type": "consulting", 946 | "url": "https://feross.org/support" 947 | } 948 | ] 949 | }, 950 | "node_modules/safer-buffer": { 951 | "version": "2.1.2", 952 | "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", 953 | "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" 954 | }, 955 | "node_modules/semver": { 956 | "version": "7.5.4", 957 | "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", 958 | "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", 959 | "dependencies": { 960 | "lru-cache": "^6.0.0" 961 | }, 962 | "bin": { 963 | "semver": "bin/semver.js" 964 | }, 965 | "engines": { 966 | "node": ">=10" 967 | } 968 | }, 969 | "node_modules/send": { 970 | "version": "0.18.0", 971 | "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", 972 | "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", 973 | "dependencies": { 974 | "debug": "2.6.9", 975 | "depd": "2.0.0", 976 | "destroy": "1.2.0", 977 | "encodeurl": "~1.0.2", 978 | "escape-html": "~1.0.3", 979 | "etag": "~1.8.1", 980 | "fresh": "0.5.2", 981 | "http-errors": "2.0.0", 982 | "mime": "1.6.0", 983 | "ms": "2.1.3", 984 | "on-finished": "2.4.1", 985 | "range-parser": "~1.2.1", 986 | "statuses": "2.0.1" 987 | }, 988 | "engines": { 989 | "node": ">= 0.8.0" 990 | } 991 | }, 992 | "node_modules/send/node_modules/ms": { 993 | "version": "2.1.3", 994 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", 995 | "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" 996 | }, 997 | "node_modules/serve-static": { 998 | "version": "1.15.0", 999 | "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", 1000 | "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", 1001 | "dependencies": { 1002 | "encodeurl": "~1.0.2", 1003 | "escape-html": "~1.0.3", 1004 | "parseurl": "~1.3.3", 1005 | "send": "0.18.0" 1006 | }, 1007 | "engines": { 1008 | "node": ">= 0.8.0" 1009 | } 1010 | }, 1011 | "node_modules/set-function-length": { 1012 | "version": "1.2.0", 1013 | "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.0.tgz", 1014 | "integrity": "sha512-4DBHDoyHlM1IRPGYcoxexgh67y4ueR53FKV1yyxwFMY7aCqcN/38M1+SwZ/qJQ8iLv7+ck385ot4CcisOAPT9w==", 1015 | "dependencies": { 1016 | "define-data-property": "^1.1.1", 1017 | "function-bind": "^1.1.2", 1018 | "get-intrinsic": "^1.2.2", 1019 | "gopd": "^1.0.1", 1020 | "has-property-descriptors": "^1.0.1" 1021 | }, 1022 | "engines": { 1023 | "node": ">= 0.4" 1024 | } 1025 | }, 1026 | "node_modules/setprototypeof": { 1027 | "version": "1.2.0", 1028 | "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", 1029 | "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" 1030 | }, 1031 | "node_modules/side-channel": { 1032 | "version": "1.0.4", 1033 | "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", 1034 | "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", 1035 | "dependencies": { 1036 | "call-bind": "^1.0.0", 1037 | "get-intrinsic": "^1.0.2", 1038 | "object-inspect": "^1.9.0" 1039 | }, 1040 | "funding": { 1041 | "url": "https://github.com/sponsors/ljharb" 1042 | } 1043 | }, 1044 | "node_modules/sift": { 1045 | "version": "16.0.1", 1046 | "resolved": "https://registry.npmjs.org/sift/-/sift-16.0.1.tgz", 1047 | "integrity": "sha512-Wv6BjQ5zbhW7VFefWusVP33T/EM0vYikCaQ2qR8yULbsilAT8/wQaXvuQ3ptGLpoKx+lihJE3y2UTgKDyyNHZQ==" 1048 | }, 1049 | "node_modules/sparse-bitfield": { 1050 | "version": "3.0.3", 1051 | "resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz", 1052 | "integrity": "sha512-kvzhi7vqKTfkh0PZU+2D2PIllw2ymqJKujUcyPMd9Y75Nv4nPbGJZXNhxsgdQab2BmlDct1YnfQCguEvHr7VsQ==", 1053 | "dependencies": { 1054 | "memory-pager": "^1.0.2" 1055 | } 1056 | }, 1057 | "node_modules/statuses": { 1058 | "version": "2.0.1", 1059 | "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", 1060 | "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", 1061 | "engines": { 1062 | "node": ">= 0.8" 1063 | } 1064 | }, 1065 | "node_modules/toidentifier": { 1066 | "version": "1.0.1", 1067 | "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", 1068 | "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", 1069 | "engines": { 1070 | "node": ">=0.6" 1071 | } 1072 | }, 1073 | "node_modules/tr46": { 1074 | "version": "4.1.1", 1075 | "resolved": "https://registry.npmjs.org/tr46/-/tr46-4.1.1.tgz", 1076 | "integrity": "sha512-2lv/66T7e5yNyhAAC4NaKe5nVavzuGJQVVtRYLyQ2OI8tsJ61PMLlelehb0wi2Hx6+hT/OJUWZcw8MjlSRnxvw==", 1077 | "dependencies": { 1078 | "punycode": "^2.3.0" 1079 | }, 1080 | "engines": { 1081 | "node": ">=14" 1082 | } 1083 | }, 1084 | "node_modules/type-is": { 1085 | "version": "1.6.18", 1086 | "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", 1087 | "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", 1088 | "dependencies": { 1089 | "media-typer": "0.3.0", 1090 | "mime-types": "~2.1.24" 1091 | }, 1092 | "engines": { 1093 | "node": ">= 0.6" 1094 | } 1095 | }, 1096 | "node_modules/unpipe": { 1097 | "version": "1.0.0", 1098 | "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", 1099 | "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", 1100 | "engines": { 1101 | "node": ">= 0.8" 1102 | } 1103 | }, 1104 | "node_modules/utils-merge": { 1105 | "version": "1.0.1", 1106 | "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", 1107 | "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", 1108 | "engines": { 1109 | "node": ">= 0.4.0" 1110 | } 1111 | }, 1112 | "node_modules/vary": { 1113 | "version": "1.1.2", 1114 | "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", 1115 | "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", 1116 | "engines": { 1117 | "node": ">= 0.8" 1118 | } 1119 | }, 1120 | "node_modules/webidl-conversions": { 1121 | "version": "7.0.0", 1122 | "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", 1123 | "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==", 1124 | "engines": { 1125 | "node": ">=12" 1126 | } 1127 | }, 1128 | "node_modules/whatwg-url": { 1129 | "version": "13.0.0", 1130 | "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-13.0.0.tgz", 1131 | "integrity": "sha512-9WWbymnqj57+XEuqADHrCJ2eSXzn8WXIW/YSGaZtb2WKAInQ6CHfaUUcTyyver0p8BDg5StLQq8h1vtZuwmOig==", 1132 | "dependencies": { 1133 | "tr46": "^4.1.1", 1134 | "webidl-conversions": "^7.0.0" 1135 | }, 1136 | "engines": { 1137 | "node": ">=16" 1138 | } 1139 | }, 1140 | "node_modules/yallist": { 1141 | "version": "4.0.0", 1142 | "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", 1143 | "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" 1144 | } 1145 | } 1146 | } 1147 | --------------------------------------------------------------------------------