From 431f554e00a54bac667222107cf3af2d12e2d992 Mon Sep 17 00:00:00 2001 From: shajeed Date: Wed, 18 Oct 2023 08:35:01 -0400 Subject: [PATCH 01/26] deploy --- client/.gitignore | 1 + client/firebase.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/client/.gitignore b/client/.gitignore index f70f6e9e..da66d4d7 100644 --- a/client/.gitignore +++ b/client/.gitignore @@ -30,3 +30,4 @@ yarn-error.log* # firebase **/.firebase /.firebaserc +/firebase.json diff --git a/client/firebase.json b/client/firebase.json index 78a08cb7..f6682b2a 100644 --- a/client/firebase.json +++ b/client/firebase.json @@ -1,6 +1,6 @@ { "hosting": { - "site": "sofan-app", + "site": "staging-sofan-app", "public": "build", "ignore": ["firebase.json", "**/.*", "**/node_modules/**"], "rewrites": [ From 29a848a1651baea4aa73c4e558b4c571c71acf34 Mon Sep 17 00:00:00 2001 From: shajeed Date: Sun, 22 Oct 2023 20:11:45 -0400 Subject: [PATCH 02/26] real time fix --- client/src/Pages/Home/Home.js | 83 +++++++++++++++++++++++------------ 1 file changed, 54 insertions(+), 29 deletions(-) diff --git a/client/src/Pages/Home/Home.js b/client/src/Pages/Home/Home.js index db31d771..717fcdfd 100644 --- a/client/src/Pages/Home/Home.js +++ b/client/src/Pages/Home/Home.js @@ -160,8 +160,8 @@ function Home({ const [isUserFanArray, setIsUserFanArray] = useState([]); useEffect(() => { // Désactiver le scroll au chargement - window.scrollTo(0, 0); - // Réactiver le scroll + window.scrollTo(0, 0); + // Réactiver le scroll }, []); useEffect(() => { // console.log("Hello"); @@ -169,7 +169,7 @@ function Home({ // console.log(loggedInUser); if ( dataPost && - loggedInUser + loggedInUser // && (loggedInUser?.metamask || loggedInUser?.web3auth) ) { // 1 for loop de data post @@ -255,7 +255,7 @@ function Home({ // console.log(tempIsUserFanArray); setIsUserFanArray(tempIsUserFanArray); }; -console.log("appel de la fontion feedDataFrom") + console.log("appel de la fontion feedDataFrom"); feedDataFromAlchemyAndFirebase(); // if (loggedInUser.metamask) { @@ -272,30 +272,35 @@ console.log("appel de la fontion feedDataFrom") } }, [dataPost, loggedInUser]); - const getCommentCount = async (postId) => { + const getCommentCount = (postId) => { const commentsRef = collection(db, `feed_post/${postId}/post_comments`); const q = query(commentsRef, where("status", "==", true)); - - const querySnapshot = await getDocs(q); - const commentCount = querySnapshot.size; - - setCommentCounts((prevState) => ({ ...prevState, [postId]: commentCount })); + + // Real-time listener for comments + const unsubscribe = onSnapshot(q, (querySnapshot) => { + const commentCount = querySnapshot.size; + setCommentCounts((prevState) => ({ ...prevState, [postId]: commentCount })); + }); + + // Save this unsubscribe somewhere so you can call it when you don't need it anymore. + return unsubscribe; }; + useEffect(() => { const fetchData = async () => { setIsLoading(true); - + const userIdToFind = loggedInUser?.id; const usersRef = collection(db, "users"); const q1 = query(usersRef, where("account_type", "==", "athlete")); - + const querySnapshot1 = await getDocs(q1); const foundAthletes = []; for (let doc of querySnapshot1.docs) { const athleteId = doc.id; const userData = doc.data(); - + // Accéder à la collection athlete_data pour l'athlète spécifique const athleteDataRef = collection( db, @@ -303,7 +308,7 @@ console.log("appel de la fontion feedDataFrom") athleteId, "athlete_data" ); - + // Récupérer le document const athleteDataSnapshot = await getDocs(athleteDataRef); athleteDataSnapshot.forEach((doc) => { @@ -324,32 +329,52 @@ console.log("appel de la fontion feedDataFrom") }); } setAthletesFollowing(foundAthletes); - + + const unsubscribes = []; // To keep track of all unsubscribe functions for comments + const feedPostCollectionRef = collection(db, "feed_post"); const q2 = query( feedPostCollectionRef, where("status", "==", true), orderBy("createdAt", "desc") ); - - const querySnapshot2 = await getDocs(q2); - const feedData = []; - querySnapshot2.forEach((doc) => { - feedData.push({ ...doc.data(), id: doc.id, isDropdownClicked: false }); - }); - setPostData(feedData); - setIsLoading(false); - feedData.forEach((post) => { - getCommentCount(post.id); + + // Real-time listener for feed posts + const unsubscribePosts = onSnapshot(q2, (querySnapshot) => { + const feedData = []; + querySnapshot.forEach((doc) => { + feedData.push({ + ...doc.data(), + id: doc.id, + isDropdownClicked: false, + }); + }); + setPostData(feedData); + setIsLoading(false); + + unsubscribes.forEach(unsub => unsub()); // Unsubscribe previous comment listeners + unsubscribes.length = 0; // Reset unsubscribe array + + feedData.forEach((post) => { + const unsubscribeComments = getCommentCount(post.id); + unsubscribes.push(unsubscribeComments); + }); }); + + return () => { + unsubscribePosts(); // Cleanup: unsubscribe from real-time posts listener + unsubscribes.forEach(unsub => unsub()); // Cleanup: unsubscribe from all real-time comment listeners + }; }; - + fetchData(); - + + // Cleanup could also go here if needed for other async operations return () => { - // Cleanup code here if needed + // ... }; - }, [loggedInUser]); + }, [loggedInUser]); // or whatever dependency array makes sense here + // retrouver les athlete supportés const handleDropdownPostFeedClick = useCallback( From f399cbc488a0c732ebf92bb961c9190addb97082 Mon Sep 17 00:00:00 2001 From: shajeed Date: Sun, 22 Oct 2023 20:46:52 -0400 Subject: [PATCH 03/26] Schedule post --- .../src/Components/CreationPostPoll/CreationPostPoll.js | 9 +++++++-- .../src/Components/CreationPostPoll/PostPoll/PostPoll.js | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/client/src/Components/CreationPostPoll/CreationPostPoll.js b/client/src/Components/CreationPostPoll/CreationPostPoll.js index ac3867ac..f7b4375c 100644 --- a/client/src/Components/CreationPostPoll/CreationPostPoll.js +++ b/client/src/Components/CreationPostPoll/CreationPostPoll.js @@ -25,7 +25,8 @@ const CreationPostPoll = ({ userId }) => { const [text, setText] = useState(""); const [loadingPublishPost, setLoadingPublishPost] = useState(false); const [validationPublishPost, setValidationPublishPost] = useState(false); - + const [dateTimeValue, setDateTimeValue] = useState(); + console.log(dateTimeValue); const [pollData, setPollData] = useState({ choices: [ { id: 1, text: "" }, @@ -103,6 +104,7 @@ const CreationPostPoll = ({ userId }) => { pollData, likes: [], status: true, + ...(dateTimeValue && { publish_timestamp: dateTimeValue }) }; } else { const postType = "poll"; @@ -116,6 +118,7 @@ const CreationPostPoll = ({ userId }) => { pollData, likes: [], status: true, + ...(dateTimeValue && { publish_timestamp: dateTimeValue }) }; } @@ -124,7 +127,8 @@ const CreationPostPoll = ({ userId }) => { try { // Upload the post object to Firestore // const postRef = collection(db, "scheduled_posts"); - const postRef = collection(db, "feed_post"); + const collectionName = dateTimeValue ? "scheduled_posts" : "feed_post"; + const postRef = collection(db, collectionName); let postUid; await addDoc(postRef, post).then((snapshot) => { postUid = snapshot.id; @@ -275,6 +279,7 @@ const CreationPostPoll = ({ userId }) => { handleTextChange={handleTextChange} pollData={pollData} setPollData={setPollData} + setDateTimeValue={setDateTimeValue} /> ) : loadingPublishPost ? ( <> diff --git a/client/src/Components/CreationPostPoll/PostPoll/PostPoll.js b/client/src/Components/CreationPostPoll/PostPoll/PostPoll.js index 497b2c89..c33a42ae 100644 --- a/client/src/Components/CreationPostPoll/PostPoll/PostPoll.js +++ b/client/src/Components/CreationPostPoll/PostPoll/PostPoll.js @@ -18,10 +18,10 @@ const PostPoll = ({ handleTextChange, pollData, setPollData, + setDateTimeValue, }) => { const [addOption, setAddOption] = useState(0); const [selectedDate, setSelectedDate] = useState(new Date()); - const [dateTimeValue, setDateTimeValue] = useState(); const [isProgrammedPostClicked, setIsProgrammedPostClicked] = useState(); const ref = useRef(); const handleAddPictureClick = () => { From f2c63cba3a39b9dbc522415bc7001968bbbfc6a8 Mon Sep 17 00:00:00 2001 From: shajeed Date: Mon, 23 Oct 2023 00:05:00 -0400 Subject: [PATCH 04/26] Update banner & avatar backend ready, Bio Update Done --- .../PopUpEditProfile/PopUpEditProfile.js | 253 +++++++++++------- 1 file changed, 158 insertions(+), 95 deletions(-) diff --git a/client/src/Components/PopUpEditProfile/PopUpEditProfile.js b/client/src/Components/PopUpEditProfile/PopUpEditProfile.js index 48059ac8..10b32a79 100644 --- a/client/src/Components/PopUpEditProfile/PopUpEditProfile.js +++ b/client/src/Components/PopUpEditProfile/PopUpEditProfile.js @@ -2,27 +2,28 @@ import React, { useState, useRef, useEffect, useCallback } from "react"; import Modal from "../Modal/Modal"; import Cropper from "react-easy-crop"; import { getCroppedImg } from "../LoginSignupPopUp/SetupProfile/CanvasUtils"; -// import { -// db, -// storage, -// ref, -// uploadBytes, -// getDownloadURL, -// } from "../../Configs/firebase"; -// import { -// collection, -// addDoc, -// updateDoc, -// query, -// where, -// getDocs, -// } from "firebase/firestore"; +import { + db, + storage, + ref, + uploadBytes, + getDownloadURL, +} from "../../Configs/firebase"; +import { + collection, + addDoc, + updateDoc, + query, + where, + getDocs, +} from "firebase/firestore"; import previousArrow from "../../Assets/Image/arrow-previous.svg"; import Img from "../../Assets/Image/img.svg"; import "./PopUpEditProfile.css"; import greenCross from "../../Assets/Image/greencross-offers.svg"; import redCross from "../../Assets/Image/redcross-offers.svg"; import LoadingAnimation from "../LoadingAnimation/LoadingAnimation"; +import { ImageUrlToFile } from "../../Utils/fileFunctions"; // import LoadingAnimation from "../LoadingEllipsisAnimation/LoadingAnimation"; // afficher les infos de la bdd en provenance de la page user/athlete + J'ai mis en commentaire les mêmes fonctions liés au backend que dans signup garde ce que tu as à garder et supprime le reste @@ -54,6 +55,8 @@ const PopUpEditProfile = ({ const [croppedAreaPixels, setCroppedAreaPixels] = useState(); const [croppedBanner, setCroppedBanner] = useState(); const [croppedAvatar, setCroppedAvatar] = useState(); + const [retrievedBanner, setRetrievedBanner] = useState(); + const [retrievedAvatar, setRetrievedAvatar] = useState(); const [loadingEditProfile, setLoadingEditProfile] = useState(); const [validationEditProfile, setValidationEditProfile] = useState(); const [errorEditProfile, setErrorEditProfile] = useState(false); @@ -83,91 +86,116 @@ const PopUpEditProfile = ({ setCurrentlyCroppingAvatar(false); setCurrentlyCroppingBanner(false); } - // const updateBannerPath = async (uid, path) => { - // try { - // const q = query(collection(db, "users"), where("id", "==", uid)); - // const querySnapshot = await getDocs(q); + const handleBannerUpload = async (file, croppedImage) => { + if (file && file.type.substr(0, 5) === "image") { + try { + let newFile = await ImageUrlToFile(croppedImage, file.name); + // Upload the file to Firebase Storage + const createdAt = new Date(); + const imagePath = `user_profile/banners/sofan_user_#${ + allUserInfo.id + }#_banner_${createdAt.getTime()}_${file.name}`; + const imageRef = ref(storage, imagePath); + uploadBytes(imageRef, newFile).then(() => { + getDownloadURL(ref(storage, imagePath)).then((url) => { + updateBannerPath(allUserInfo.id, url); + }); + console.log("Uploaded a blob or file!"); + }); - // if (!querySnapshot.empty) { - // querySnapshot.forEach((doc) => { - // const userRef = doc.ref; - // const updatedData = { profile_banner: path }; + console.log("Image uploaded successfully!"); + } catch (error) { + console.error("Error uploading image:", error); + } + setBanner(file); + } else { + console.log("File is not an image."); + } + }; - // updateDoc(userRef, updatedData) - // .then(() => { - // console.log("Banner path updated successfully!"); - // }) - // .catch((error) => { - // console.error("Error updating banner path:", error); - // }); - // }); - // } else { - // console.log("No user found"); - // } - // } catch (err) { - // console.error(err); - // throw err; - // } - // }; + const handleAvatarUpload = async (file, croppedImage) => { + // Access the selected file(s) using fileInputRef.current.files + // Process the files as needed + if (file && file.type.substr(0, 5) === "image") { + try { + let newFile = await ImageUrlToFile(croppedImage, file.name); + const createdAt = new Date(); + const imagePath = `user_profile/avatars/sofan_user_#${ + allUserInfo.id + }#_avatar_${createdAt.getTime()}_${file.name}`; + const imageRef = ref(storage, imagePath); + uploadBytes(imageRef, newFile).then(() => { + getDownloadURL(ref(storage, imagePath)).then((url) => { + updateAvatarPath(allUserInfo.id, url); + }); + console.log("Uploaded a blob or file!"); + }); - // const updateAvatarPath = async (uid, path) => { - // try { - // const q = query(collection(db, "users"), where("id", "==", uid)); - // const querySnapshot = await getDocs(q); + console.log("Image uploaded successfully!"); + } catch (error) { + console.error("Error uploading image:", error); + } + setProfile(file); + } else { + console.log("profile is not an image."); + } + }; - // if (!querySnapshot.empty) { - // querySnapshot.forEach((doc) => { - // const userRef = doc.ref; - // const updatedData = { profile_avatar: path }; + const updateBannerPath = async (uid, path) => { + try { + const q = query(collection(db, "users"), where("id", "==", uid)); + const querySnapshot = await getDocs(q); - // updateDoc(userRef, updatedData) - // .then(() => { - // console.log("Avatar path updated successfully!"); - // }) - // .catch((error) => { - // console.error("Error updating Avatar path:", error); - // }); - // }); - // } else { - // console.log("No user found"); - // } - // } catch (err) { - // console.error(err); - // throw err; - // } - // }; + if (!querySnapshot.empty) { + querySnapshot.forEach((doc) => { + const userRef = doc.ref; + const updatedData = { profile_banner: path }; - const handleBannerUpload = async (event) => { - const file = event.target.files[0]; - console.log(file); - if (file && file.type.substr(0, 5) === "image") { - // //const imagePath = file.name ? `user_profile/banners/` - // try { - // // Upload the file to Firebase Storage - // //shajeed - // const createdAt = new Date(); - // const imagePath = `user_profile/banners/sofan_user_#${ - // allUserInfo.id - // }#_banner_${createdAt.getTime()}_${file.name}`; - // const imageRef = ref(storage, imagePath); - // uploadBytes(imageRef, file).then(() => { - // getDownloadURL(ref(storage, imagePath)).then((url) => { - // updateBannerPath(allUserInfo.id, url); - // }); - // console.log("Uploaded a blob or file!"); - // }); + updateDoc(userRef, updatedData) + .then(() => { + console.log("Banner path updated successfully!"); + }) + .catch((error) => { + console.error("Error updating banner path:", error); + }); + }); + } else { + console.log("No user found"); + } + } catch (err) { + console.error(err); + throw err; + } + }; - // // TODO: Save the image URL to Firestore or perform any additional actions + const updateAvatarPath = async (uid, path) => { + try { + const q = query(collection(db, "users"), where("id", "==", uid)); + const querySnapshot = await getDocs(q); - // console.log("Image uploaded successfully!"); - // } catch (error) { - // console.error("Error uploading image:", error); - // } - setBanner(file); - } else { - console.log("File is not an image."); + if (!querySnapshot.empty) { + querySnapshot.forEach((doc) => { + const userRef = doc.ref; + const updatedData = { profile_avatar: path }; + + updateDoc(userRef, updatedData) + .then(() => { + console.log("Avatar path updated successfully!"); + }) + .catch((error) => { + console.error("Error updating Avatar path:", error); + }); + }); + } else { + console.log("No user found"); + } + } catch (err) { + console.error(err); + throw err; } }; + + // console.log(allUserInfo); const handleProfileImageInputChange = () => { // Access the selected file(s) using fileInputRef.current.files @@ -258,8 +286,43 @@ const PopUpEditProfile = ({ } }, [previewProfile, croppedAreaPixels]); - function handleSaveProfile() { + async function handleSaveProfile() { setLoadingEditProfile(true); + try { + handleBannerUpload(retrievedBanner, croppedBanner); + handleAvatarUpload(retrievedAvatar, croppedAvatar); + } catch (err) { + console.error("Upload Image error Line 790: ", err); + } + + try { + const q = query( + collection(db, "users"), + where("id", "==", allUserInfo.id) + ); + const querySnapshot = await getDocs(q); + + if (!querySnapshot.empty) { + querySnapshot.forEach((doc) => { + const userRef = doc.ref; + const updatedData = { bio: bioText ? bioText : "" }; + + updateDoc(userRef, updatedData) + .then(() => { + console.log("Bio updated successfully!"); + }) + .catch((error) => { + console.error("Error updating Bio:", error); + }); + }); + } else { + console.log("No user found"); + } + } catch (err) { + console.error(err); + throw err; + } + } useEffect(() => { if (loadingEditProfile === true) { @@ -359,7 +422,7 @@ const PopUpEditProfile = ({ // classes={{containerClassName : "popup-edit-profile-cursor-container", mediaClassName: "", cropAreaClassName: ""}} /> -
+
setRetrievedBanner(e.target.files[0])} style={{ display: "none" }} id="image-upload" /> @@ -458,7 +521,7 @@ const PopUpEditProfile = ({
From e9d32347241b139f1a38bc0c8a202df87e0264f2 Mon Sep 17 00:00:00 2001 From: shajeed Date: Mon, 23 Oct 2023 03:52:29 -0400 Subject: [PATCH 05/26] BIG UPDATE: Utility Claim or Disclaim Front End and Back End --- client/src/App.js | 2 +- .../LaunchpadCollectionLiveUtilities.js | 14 +- client/src/Components/Modal/Modal.js | 67 ++++--- .../NftCollectionHeader.js | 2 +- .../UtilitiesComponent/UtilitiesComponent.css | 104 ++++++----- .../UtilitiesComponent/UtilitiesComponent.js | 172 ++++++++++++++---- .../UtilityClaimPopUp/UtilityClaimModal.css | 43 +++++ .../UtilityClaimPopUp/UtilityClaimModal.js | 71 ++++++++ .../LaunchpadCollectionLive.js | 18 +- client/src/Pages/NftSingle/NftSingle.js | 2 +- 10 files changed, 362 insertions(+), 133 deletions(-) create mode 100644 client/src/Components/UtilitiesComponent/UtilityClaimPopUp/UtilityClaimModal.css create mode 100644 client/src/Components/UtilitiesComponent/UtilityClaimPopUp/UtilityClaimModal.js diff --git a/client/src/App.js b/client/src/App.js index f1f34220..c1cd1247 100644 --- a/client/src/App.js +++ b/client/src/App.js @@ -616,7 +616,7 @@ function App() { /> } /> } diff --git a/client/src/Components/LaunchpadCollectionLiveUtilities/LaunchpadCollectionLiveUtilities.js b/client/src/Components/LaunchpadCollectionLiveUtilities/LaunchpadCollectionLiveUtilities.js index 52a661da..77ead9fb 100644 --- a/client/src/Components/LaunchpadCollectionLiveUtilities/LaunchpadCollectionLiveUtilities.js +++ b/client/src/Components/LaunchpadCollectionLiveUtilities/LaunchpadCollectionLiveUtilities.js @@ -2,7 +2,8 @@ import React from "react"; import UtilitiesComponent from "../UtilitiesComponent/UtilitiesComponent"; import "./LaunchpadCollectionLiveUtilities.css"; import { v4 as uuidv4 } from "uuid"; -function LaunchpadCollectionLiveUtilities({ utilitiesArray }) { +function LaunchpadCollectionLiveUtilities({ utilitiesArray, loggedInUser }) { + return (
Utilité
@@ -10,10 +11,13 @@ function LaunchpadCollectionLiveUtilities({ utilitiesArray }) { utilitiesArray.map((utility) => ( )) diff --git a/client/src/Components/Modal/Modal.js b/client/src/Components/Modal/Modal.js index 6d46c3b5..85d0aa0d 100644 --- a/client/src/Components/Modal/Modal.js +++ b/client/src/Components/Modal/Modal.js @@ -1,49 +1,56 @@ -import React, {useState ,useEffect} from "react"; +import React, { useState, useEffect } from "react"; import "./Modal.css"; import CrossBlack from "../../Assets/Image/cross.svg"; import CrossWhite from "../../Assets/Image/cross_white.svg"; // import { disableBodyScroll, enableBodyScroll, pixelScrolledAthleteProfilePage } from 'scroll-lock'; const Modal = (props) => { - // Need top pass setState and style - // setState is the function link to the state that render the Modal Component - // style is an object to position the cross with top, bottom, left and right - // by default the cross is black. To make it white pass a prop named color and write "white" - // If you want to lock scroll when clicked add document.querySelector('body').classList.add('scroll-lock') to your handle HTML Element that triggers the modal to pop + // Need top pass setState and style + // setState is the function link to the state that render the Modal Component + // style is an object to position the cross with top, bottom, left and right + // by default the cross is black. To make it white pass a prop named color and write "white" + // If you want to lock scroll when clicked add document.querySelector('body').classList.add('scroll-lock') to your handle HTML Element that triggers the modal to pop const handleModalClick = (e) => { if ( e.target.id === "modal-component" || - e.target.id === "modal-component-cross" || e.target.id === "custom-close-button" + e.target.id === "modal-component-cross" || + e.target.id === "custom-close-button" ) { - if(props.setState){ - props.setState(false); - } - if(props.setState2){ - props.setState2(false) - } - if(props.setState3){ - props.setState3(false) - } - if(props.setState4){ - props.setState4(false) - } - // retirer le scroll lock lorsque le modal n'est plus la - document.querySelector("body").classList.remove("scroll-lock"); - } + if (props.setState) { + props.setState(false); + } + if (props.setState2) { + props.setState2(false); + } + if (props.setState3) { + props.setState3(false); + } + if (props.setState4) { + props.setState4(false); + } + // retirer le scroll lock lorsque le modal n'est plus la + document.querySelector("body").classList.remove("scroll-lock"); + } }; useEffect(() => { - document.querySelector('body').classList.add('scroll-lock'); - }, []) + document.querySelector("body").classList.add("scroll-lock"); + }, []); // console.log(props.isPostClicked) return ( -
); }; diff --git a/client/src/Components/NftCollectionHeader/NftCollectionHeader.js b/client/src/Components/NftCollectionHeader/NftCollectionHeader.js index 91ab768f..7381e080 100644 --- a/client/src/Components/NftCollectionHeader/NftCollectionHeader.js +++ b/client/src/Components/NftCollectionHeader/NftCollectionHeader.js @@ -70,7 +70,7 @@ function NftCollectionHeader({ let ethBidPriceConverted = (nftBidEth * ethPrice).toLocaleString("fr-FR", { maximumFractionDigits: 2, }); - console.log(currentOwnerInfo); + //console.log(currentOwnerInfo); return (
diff --git a/client/src/Components/UtilitiesComponent/UtilitiesComponent.css b/client/src/Components/UtilitiesComponent/UtilitiesComponent.css index c1855249..cf7bc627 100644 --- a/client/src/Components/UtilitiesComponent/UtilitiesComponent.css +++ b/client/src/Components/UtilitiesComponent/UtilitiesComponent.css @@ -1,5 +1,5 @@ -.nft-collection-overview-utilities-one-container{ - width: 100%; +.nft-collection-overview-utilities-one-container { + width: 100%; height: 185px; display: flex; justify-content: center; @@ -8,21 +8,27 @@ border-radius: 10px; /* background-color: brown; */ margin-bottom: 20px; + transition: 0.5s; } -.nft-collection-overview-utilities-one-container:first-child{ -margin-top: 20px !important; -} -.nft-collection-overview-utilities-one-container:last-child{ -margin-bottom: 0; + +.nft-collection-overview-utilities-one-container:hover { + cursor: pointer; + box-shadow: 0px 0px 12px #f6d463; } -.nft-collection-overview-utilities-one-wrap{ - width: 574.64px; - height: 125px; - display: flex; - flex-direction: column; - /* align-items: center; */ - /* background-color: darkolivegreen; */ +.nft-collection-overview-utilities-one-container:first-child { + margin-top: 20px !important; +} +.nft-collection-overview-utilities-one-container:last-child { + margin-bottom: 0; +} +.nft-collection-overview-utilities-one-wrap { + width: 574.64px; + height: 125px; + display: flex; + flex-direction: column; + /* align-items: center; */ + /* background-color: darkolivegreen; */ } .nft-collection-overview-utilities-one-header { height: 24px; @@ -56,7 +62,7 @@ margin-bottom: 0; font-size: 20px; } .nft-collection-overview-one-header-status { - width: auto; + width: auto; max-width: 170px !important; height: 17px; display: flex; @@ -69,42 +75,42 @@ margin-bottom: 0; padding: 1px; } .nft-collectin-overview-one-header-status-color-available { - width: 5px; - height: 5px; - border-radius: 50%; - margin: 3px; - margin-right: 4px; - background: #85D87E; + width: 5px; + height: 5px; + border-radius: 50%; + margin: 3px; + margin-right: 4px; + background: #85d87e; } .nft-collectin-overview-one-header-status-color-unavailable { - width: 5px; - height: 5px; - border-radius: 50%; - margin: 3px; - margin-right: 4px; - background: #EE4D4D; + width: 5px; + height: 5px; + border-radius: 50%; + margin: 3px; + margin-right: 4px; + background: #ee4d4d; +} +.nft-collection-overview-one-header-status-text { + max-width: 109px; + height: 14px; + padding-right: 5px; + font-size: 12px; + font-family: "britanica-heavy"; } -.nft-collection-overview-one-header-status-text{ - max-width: 109px; - height: 14px; - padding-right: 5px; - font-size: 12px; - font-family: "britanica-heavy"; +.nft-collection-overview-utilities-one-description { + max-width: 542px; + height: 57px; + max-height: 57px; + margin-top: 10px; + margin-left: 32.64px; + /* background-color: mediumvioletred; */ + text-align: justify; } -.nft-collection-overview-utilities-one-description{ - max-width: 542px; - height: 57px; - max-height: 57px; - margin-top: 10px; - margin-left:32.64px ; - /* background-color: mediumvioletred; */ - text-align: justify; +.nft-collection-overview-utilities-one-date { + max-width: 495px; + max-height: 14px; + margin-top: 20px; + margin-left: 32.64px; + font-family: "britanica-black"; + /* background-color: lime; */ } -.nft-collection-overview-utilities-one-date{ - max-width: 495px; - max-height: 14px; - margin-top: 20px; - margin-left:32.64px ; - font-family: "britanica-black"; - /* background-color: lime; */ -} \ No newline at end of file diff --git a/client/src/Components/UtilitiesComponent/UtilitiesComponent.js b/client/src/Components/UtilitiesComponent/UtilitiesComponent.js index a4a1531f..28cf867d 100644 --- a/client/src/Components/UtilitiesComponent/UtilitiesComponent.js +++ b/client/src/Components/UtilitiesComponent/UtilitiesComponent.js @@ -1,68 +1,160 @@ -import React, { useState, useEffect } from "react"; +import React, { useState, useEffect, useMemo } from "react"; import meetingsLogo from "../../Assets/Image/meetings-logo.svg"; import liveLogo from "../../Assets/Image/live-logo.svg"; import merchLogo from "../../Assets/Image/merch-logo.svg"; +import { useParams } from "react-router-dom"; +import Modal from "../Modal/Modal"; import "./UtilitiesComponent.css"; +import UtilityClaimModal from "./UtilityClaimPopUp/UtilityClaimModal"; +import { db } from "../../Configs/firebase"; +import { + doc, + getDoc, + updateDoc, + getDocs, + query, + where, + collection, + deleteField, +} from "firebase/firestore"; + function UtilitiesComponent({ - utilitiesTitle, - utilitiesStatus, - utilitiesDescription, - utilitiesDate, + utility, + loggedInUser, + unilityId, + utilityTitle, + utilityStatus, + utilityDescription, + utilityDate, launchpadCollectionLiveUtilities, }) { const [status, setStatus] = useState(); + const [isUtiliyClicked, setIsUtiliyClicked] = useState(false); + const { collectionAddress } = useParams(); + function displayStatusColor() { - if (utilitiesStatus === "Disponible") { + if (utilityStatus === "Disponible") { setStatus(true); - } else if (utilitiesStatus === "Indisponible") { + } else if (utilityStatus === "Indisponible") { setStatus(false); } } - // console.log(utilitiesStatus) + // console.log(utilityStatus) useEffect(() => { const test = () => displayStatusColor(); test(); }, []); + + const handleClaimClick = async (e) => { + e.preventDefault(); + //console.log(utility.id, "claimed by", loggedInUser.display_name); + + // Query to find the document with the specific collectionAddress field + const querySnapshot = await getDocs(query(collection(db, 'nft_collections'), where('collection_address', '==', collectionAddress))); + + if (querySnapshot.empty) { + console.error("No matching documents."); + return; + } + + let docId; + querySnapshot.forEach(documentSnapshot => { + docId = documentSnapshot.id; + }); + + // Now that we have the docId, we can update the sub-collection + const utilityDocRef = doc(db, "nft_collections", docId, "utilities", utility.id); + + // Fetch the document to check if it exists + const docSnap = await getDoc(utilityDocRef); + + if (docSnap.exists()) { + try { + if (utility.claimed_status && utility.claimed_user_id === loggedInUser.id) { + // Disclaim the utility if it is already claimed by the logged-in user + await updateDoc(utilityDocRef, { + claimed_status: false, + claimed_user_id: deleteField() + }); + console.log("Utility disclaimed successfully!"); + } else { + // Claim the utility + await updateDoc(utilityDocRef, { + claimed_status: true, + claimed_user_id: loggedInUser.id + }); + console.log("Utility claimed successfully!"); + } + } catch (err) { + console.error("Error updating document: ", err); + } + } else { + console.error("No such document to update!"); + } + + setIsUtiliyClicked(false); + }; + + const modalStyle = useMemo(() => ({ top: "20px", right: "20px" }), []); + // console.log(status); return ( -
-
-
-
- logo contrepartie rencontre fan + <> +
setIsUtiliyClicked(true)} + className="nft-collection-overview-utilities-one-container" + > +
+
+
+ logo contrepartie rencontre fan +
+
+ {utilityTitle} +
+ {launchpadCollectionLiveUtilities ? ( + <> + ) : ( + <> +
+
+
+ {utilityStatus} +
+
+ + )}
-
- {utilitiesTitle} +
+ {utilityDescription} +
+
+ Date de l'utilité: {utilityDate}{" "} + + {utility.claimed_status ? "Réclamé" : ""} +
- {launchpadCollectionLiveUtilities ? ( - <> - ) : ( - <> -
-
-
- {utilitiesStatus} -
-
- - )} -
-
- {utilitiesDescription} -
-
- Date de l'utilité: {utilitiesDate}
-
+ {isUtiliyClicked && ( + + + + )} + ); } diff --git a/client/src/Components/UtilitiesComponent/UtilityClaimPopUp/UtilityClaimModal.css b/client/src/Components/UtilitiesComponent/UtilityClaimPopUp/UtilityClaimModal.css new file mode 100644 index 00000000..53b31a59 --- /dev/null +++ b/client/src/Components/UtilitiesComponent/UtilityClaimPopUp/UtilityClaimModal.css @@ -0,0 +1,43 @@ +.utility-pop-up-container { + width: 400px; + box-shadow: 0px 0px 12px rgba(0, 0, 0, 0.1); + display: flex; + flex-direction: column; + align-items: center; + /* justify-content: center; */ + position: relative; + background-color: white; + border-radius: 20px; + padding: 20px; +} + +.utility-pop-up-title { + font-family: "Britanica-Heavy"; + font-style: normal; + font-weight: 400; + font-size: 25px; + line-height: 30px; +} + +.utility-info-data { + display: flex; + flex-direction: column; + align-items: center; +} + +.utility-info-header { + margin: 10px; +} + +.utility-info-header img { + width: 20px; + margin-right: 10px; +} + +.utility-info-title { + font-family: "Britanica-Heavy"; + font-style: normal; + font-weight: 400; + font-size: 19px; + line-height: 30px; +} diff --git a/client/src/Components/UtilitiesComponent/UtilityClaimPopUp/UtilityClaimModal.js b/client/src/Components/UtilitiesComponent/UtilityClaimPopUp/UtilityClaimModal.js new file mode 100644 index 00000000..808fac73 --- /dev/null +++ b/client/src/Components/UtilitiesComponent/UtilityClaimPopUp/UtilityClaimModal.js @@ -0,0 +1,71 @@ +import React, { useState, useEffect } from "react"; +import "./UtilityClaimModal.css"; +import meetingsLogo from "../../../Assets/Image/meetings-logo.svg"; +import Button from "../../Button/Button"; + +function UtilityClaimModal({ + isUtiliyClicked, + utility, + loggedInUser, + handleClaimClick, +}) { + return ( +
+ + {utility.claimed_status ? "Utilité déjå reclamé" : "Réclamer l'Uilité"} + +
+
+ logo contrepartie rencontre fan + {utility?.title} +
+

{utility?.description}

+
+ Date de l'utilité:{" "} + {utility?.date + ? new Date(utility.date.seconds * 1000).toDateString() + : "N/A"} +
+ {!utility.claimed_status && ( +
+
+ ); +} + +const ClaimButtonStyle = { + inlineStyle: { + backgroundColor: "#F6D463", + border: "transparent", + borderRadius: "10px", + width: "284px", + minHeight: "54px", + fontFamily: "Britanica-Heavy", + fontSize: "20px", + marginTop: 15, + }, + customMediaQueries: + "@media (max-width: 950px) { .button-component { max-width: 250px; }}@media (max-width: 900px) {.button-component {max-width: 220px; } } @media (max-width: 860px){.button-component {max-width: 200px;}}@media (max-width: 840px){.button-component {max-width: 183px;}}", +}; + +export default UtilityClaimModal; diff --git a/client/src/Pages/LaunchpadCollectionLive/LaunchpadCollectionLive.js b/client/src/Pages/LaunchpadCollectionLive/LaunchpadCollectionLive.js index 6b604c34..cdacdbed 100644 --- a/client/src/Pages/LaunchpadCollectionLive/LaunchpadCollectionLive.js +++ b/client/src/Pages/LaunchpadCollectionLive/LaunchpadCollectionLive.js @@ -70,12 +70,14 @@ function LaunchpadCollectionLive(isLogged) { setContractAddress, } = useEth(); const location = useLocation(); - const segments = location.pathname.split("/"); - const athleteId = segments[2]; - const collectionAddress = segments[3]; + // const segments = location.pathname.split("/"); + // const athleteId = segments[2]; + // const collectionAddress = segments[3]; const loggedInUserInfo = useUserCollection(); const [crossmintPayLoadLocalStorage, setCrossmintPayLoadLocalStorage] = useState(null); + const { athleteId, collectionAddress } = useParams(); + useEffect(() => { window.addEventListener( @@ -215,7 +217,6 @@ function LaunchpadCollectionLive(isLogged) { // ----------------------- Shajeed ------------------------- - const { collectionAddressurl } = useParams(); useEffect(() => { const q = query( @@ -230,7 +231,10 @@ function LaunchpadCollectionLive(isLogged) { const unsub = onSnapshot( collection(db, "nft_collections", docId, "utilities"), (snapshot) => { - const utilitiesData = snapshot.docs.map((doc) => doc.data()); + const utilitiesData = snapshot.docs.map((doc) => ({ + id: doc.id, // include the id here + ...doc.data() + })); setUtilities(utilitiesData); } ); @@ -331,6 +335,8 @@ function LaunchpadCollectionLive(isLogged) { setIsMintButtonClicked(true); } + + const [isMintingProcessBegan, setIsMintingProcessBegan] = useState(false); const [mintingProcessStatus, setMintingProcessStatus] = useState(true); const [ @@ -578,7 +584,7 @@ function LaunchpadCollectionLive(isLogged) { />
{crossmintPayLoadLocalStorage ? "sqhdddddddddddsqdhhhhhhhhh" : ""} - +
{ // }, []); // retirer le scroll lock lorsque le modal n'est plus la - document.querySelector("body").classList.remove("scroll-lock"); + //document.querySelector("body").classList.remove("scroll-lock"); // function handleClickSubMenuButton(e) { From a6de3b018595fa31363cea141f0edc2e7280ffd5 Mon Sep 17 00:00:00 2001 From: shajeed Date: Mon, 23 Oct 2023 04:00:44 -0400 Subject: [PATCH 06/26] Timestamp fix post feed --- client/src/Components/CreationPostPoll/CreationPostPoll.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/src/Components/CreationPostPoll/CreationPostPoll.js b/client/src/Components/CreationPostPoll/CreationPostPoll.js index f7b4375c..dcf2fce0 100644 --- a/client/src/Components/CreationPostPoll/CreationPostPoll.js +++ b/client/src/Components/CreationPostPoll/CreationPostPoll.js @@ -11,7 +11,7 @@ import { uploadBytes, getDownloadURL, } from "../../Configs/firebase"; -import { collection, addDoc, getDoc, doc, updateDoc } from "firebase/firestore"; +import { collection, addDoc, getDoc, doc, updateDoc, Timestamp } from "firebase/firestore"; const CreationPostPoll = ({ userId }) => { const [file, setFile] = useState(null); @@ -104,7 +104,7 @@ const CreationPostPoll = ({ userId }) => { pollData, likes: [], status: true, - ...(dateTimeValue && { publish_timestamp: dateTimeValue }) + ...(dateTimeValue && { publish_timestamp: Timestamp.fromMillis(dateTimeValue * 1000) }) }; } else { const postType = "poll"; @@ -118,7 +118,7 @@ const CreationPostPoll = ({ userId }) => { pollData, likes: [], status: true, - ...(dateTimeValue && { publish_timestamp: dateTimeValue }) + ...(dateTimeValue && { publish_timestamp: Timestamp.fromMillis(dateTimeValue * 1000) }) }; } From 2d99d6391bb01a82c040d066dcc9ba7e01d9fdf3 Mon Sep 17 00:00:00 2001 From: JW Rami Date: Wed, 25 Oct 2023 02:05:18 +0200 Subject: [PATCH 07/26] fix modal utility claim modal --- .../UtilitiesComponent/UtilitiesComponent.js | 49 +++++++++++++------ 1 file changed, 33 insertions(+), 16 deletions(-) diff --git a/client/src/Components/UtilitiesComponent/UtilitiesComponent.js b/client/src/Components/UtilitiesComponent/UtilitiesComponent.js index 28cf867d..e8a854d3 100644 --- a/client/src/Components/UtilitiesComponent/UtilitiesComponent.js +++ b/client/src/Components/UtilitiesComponent/UtilitiesComponent.js @@ -18,7 +18,6 @@ import { deleteField, } from "firebase/firestore"; - function UtilitiesComponent({ utility, loggedInUser, @@ -50,40 +49,54 @@ function UtilitiesComponent({ const handleClaimClick = async (e) => { e.preventDefault(); //console.log(utility.id, "claimed by", loggedInUser.display_name); - + // Query to find the document with the specific collectionAddress field - const querySnapshot = await getDocs(query(collection(db, 'nft_collections'), where('collection_address', '==', collectionAddress))); - + const querySnapshot = await getDocs( + query( + collection(db, "nft_collections"), + where("collection_address", "==", collectionAddress) + ) + ); + if (querySnapshot.empty) { console.error("No matching documents."); return; } - + let docId; - querySnapshot.forEach(documentSnapshot => { + querySnapshot.forEach((documentSnapshot) => { docId = documentSnapshot.id; }); - + // Now that we have the docId, we can update the sub-collection - const utilityDocRef = doc(db, "nft_collections", docId, "utilities", utility.id); - + const utilityDocRef = doc( + db, + "nft_collections", + docId, + "utilities", + utility.id + ); + // Fetch the document to check if it exists const docSnap = await getDoc(utilityDocRef); - + if (docSnap.exists()) { try { - if (utility.claimed_status && utility.claimed_user_id === loggedInUser.id) { + if ( + utility.claimed_status && + utility.claimed_user_id === loggedInUser.id + ) { // Disclaim the utility if it is already claimed by the logged-in user await updateDoc(utilityDocRef, { claimed_status: false, - claimed_user_id: deleteField() + claimed_user_id: deleteField(), }); console.log("Utility disclaimed successfully!"); } else { // Claim the utility await updateDoc(utilityDocRef, { claimed_status: true, - claimed_user_id: loggedInUser.id + claimed_user_id: loggedInUser.id, }); console.log("Utility claimed successfully!"); } @@ -93,9 +106,9 @@ function UtilitiesComponent({ } else { console.error("No such document to update!"); } - + setIsUtiliyClicked(false); - }; + }; const modalStyle = useMemo(() => ({ top: "20px", right: "20px" }), []); @@ -145,7 +158,11 @@ function UtilitiesComponent({
{isUtiliyClicked && ( - + Date: Tue, 24 Oct 2023 20:51:58 -0400 Subject: [PATCH 08/26] Update Avatar & Banner Upload --- .../PopUpEditProfile/PopUpEditProfile.js | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/client/src/Components/PopUpEditProfile/PopUpEditProfile.js b/client/src/Components/PopUpEditProfile/PopUpEditProfile.js index 10b32a79..d932889e 100644 --- a/client/src/Components/PopUpEditProfile/PopUpEditProfile.js +++ b/client/src/Components/PopUpEditProfile/PopUpEditProfile.js @@ -65,23 +65,23 @@ const PopUpEditProfile = ({ setIsProfileEditPopupHasModifications, ] = useState(false); useEffect(() => { - if (!banner) return; + if (!retrievedBanner) return; // setCurrentlyCropping(true); - let tmp = URL.createObjectURL(banner); + let tmp = URL.createObjectURL(retrievedBanner); setPreviewBanner(tmp); setCurrentlyCroppingBanner(true); - URL.revokeObjectURL(banner); - setBanner(); - }, [banner]); + URL.revokeObjectURL(retrievedBanner); + setRetrievedBanner(); + }, [retrievedBanner]); // tambouriner le crop easy useEffect(() => { - if (!profile) return; - let tmp = URL.createObjectURL(profile); + if (!retrievedAvatar) return; + let tmp = URL.createObjectURL(retrievedAvatar); setPreviewProfile(tmp); setCurrentlyCroppingAvatar(true); - URL.revokeObjectURL(profile); - setProfile(); - }, [profile]); + URL.revokeObjectURL(retrievedAvatar); + setRetrievedAvatar(); + }, [retrievedAvatar]); function handlePreviousStepCroppClick() { setCurrentlyCroppingAvatar(false); setCurrentlyCroppingBanner(false); From f76b1f6b6ef0654079e65f3f0d16b5bd0068cd9a Mon Sep 17 00:00:00 2001 From: shajeed Date: Tue, 24 Oct 2023 21:01:11 -0400 Subject: [PATCH 09/26] Fix Update Banner & Avatar --- client/src/Components/PopUpEditProfile/PopUpEditProfile.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/client/src/Components/PopUpEditProfile/PopUpEditProfile.js b/client/src/Components/PopUpEditProfile/PopUpEditProfile.js index d932889e..53638783 100644 --- a/client/src/Components/PopUpEditProfile/PopUpEditProfile.js +++ b/client/src/Components/PopUpEditProfile/PopUpEditProfile.js @@ -64,6 +64,7 @@ const PopUpEditProfile = ({ isProfileEditPopupHasModifications, setIsProfileEditPopupHasModifications, ] = useState(false); + useEffect(() => { if (!retrievedBanner) return; // setCurrentlyCropping(true); @@ -71,7 +72,6 @@ const PopUpEditProfile = ({ setPreviewBanner(tmp); setCurrentlyCroppingBanner(true); URL.revokeObjectURL(retrievedBanner); - setRetrievedBanner(); }, [retrievedBanner]); // tambouriner le crop easy useEffect(() => { @@ -80,13 +80,14 @@ const PopUpEditProfile = ({ setPreviewProfile(tmp); setCurrentlyCroppingAvatar(true); URL.revokeObjectURL(retrievedAvatar); - setRetrievedAvatar(); }, [retrievedAvatar]); + function handlePreviousStepCroppClick() { setCurrentlyCroppingAvatar(false); setCurrentlyCroppingBanner(false); } const handleBannerUpload = async (file, croppedImage) => { + console.log(file); if (file && file.type.substr(0, 5) === "image") { try { let newFile = await ImageUrlToFile(croppedImage, file.name); From 9cfcaf8c23a0cb6a628f100bd18ddfa585d8bc10 Mon Sep 17 00:00:00 2001 From: shajeed Date: Wed, 25 Oct 2023 19:23:55 -0400 Subject: [PATCH 10/26] Utility Update --- .../UtilitiesComponent/UtilitiesComponent.js | 18 ++- .../UtilityClaimPopUp/UtilityClaimModal.js | 118 ++++++++++++------ 2 files changed, 94 insertions(+), 42 deletions(-) diff --git a/client/src/Components/UtilitiesComponent/UtilitiesComponent.js b/client/src/Components/UtilitiesComponent/UtilitiesComponent.js index e8a854d3..142a8ce9 100644 --- a/client/src/Components/UtilitiesComponent/UtilitiesComponent.js +++ b/client/src/Components/UtilitiesComponent/UtilitiesComponent.js @@ -31,6 +31,10 @@ function UtilitiesComponent({ const [status, setStatus] = useState(); const [isUtiliyClicked, setIsUtiliyClicked] = useState(false); const { collectionAddress } = useParams(); + // A changer pour un nft holder de l'athleth + const [isloggedUserNftHolder, setIsloggedUserNftHolder] = useState(true); + const [isClaimConfirmed, setIsClaimConfirmed] = useState(false); + function displayStatusColor() { if (utilityStatus === "Disponible") { @@ -106,8 +110,8 @@ function UtilitiesComponent({ } else { console.error("No such document to update!"); } - - setIsUtiliyClicked(false); + setIsClaimConfirmed(true); + //setIsUtiliyClicked(false); }; const modalStyle = useMemo(() => ({ top: "20px", right: "20px" }), []); @@ -152,7 +156,11 @@ function UtilitiesComponent({
Date de l'utilité: {utilityDate}{" "} - {utility.claimed_status ? "Réclamé" : ""} + {utility.claimed_status && + utility.claimed_user_id && + utility.claimed_user_id === loggedInUser.id + ? "Réclamé" + : ""}
@@ -168,6 +176,10 @@ function UtilitiesComponent({ loggedInUser={loggedInUser} isUtiliyClicked={isUtiliyClicked} handleClaimClick={handleClaimClick} + isloggedUserNftHolder={isloggedUserNftHolder} + setIsloggedUserNftHolder={setIsloggedUserNftHolder} + setIsClaimConfirmed={setIsClaimConfirmed} + isClaimConfirmed={isClaimConfirmed} /> )} diff --git a/client/src/Components/UtilitiesComponent/UtilityClaimPopUp/UtilityClaimModal.js b/client/src/Components/UtilitiesComponent/UtilityClaimPopUp/UtilityClaimModal.js index 808fac73..2bb5c431 100644 --- a/client/src/Components/UtilitiesComponent/UtilityClaimPopUp/UtilityClaimModal.js +++ b/client/src/Components/UtilitiesComponent/UtilityClaimPopUp/UtilityClaimModal.js @@ -1,55 +1,95 @@ -import React, { useState, useEffect } from "react"; +import React from "react"; import "./UtilityClaimModal.css"; import meetingsLogo from "../../../Assets/Image/meetings-logo.svg"; import Button from "../../Button/Button"; +import validationLogo from "../../../Assets/Image/greencross-offers.svg"; function UtilityClaimModal({ isUtiliyClicked, utility, loggedInUser, handleClaimClick, + isloggedUserNftHolder, + setIsloggedUserNftHolder, + isClaimConfirmed, }) { return ( -
- - {utility.claimed_status ? "Utilité déjå reclamé" : "Réclamer l'Uilité"} - -
-
- logo contrepartie rencontre fan - {utility?.title} + <> + {!isClaimConfirmed ? ( +
+ + {utility.claimed_status && + utility.claimed_user_id === loggedInUser.id + ? "Utilité déjà réclamée" + : "Réclamer l'Utilité"} + + +
+
+ logo contrepartie rencontre fan + {utility?.title} +
+

{utility?.description}

+
+ Date de l'utilité:{" "} + {utility?.date + ? new Date(utility.date.seconds * 1000).toDateString() + : "N/A"} +
+ { + // If isloggedUserNftHolder is true, the user is logged in, and the utility is not claimed by the logged-in user + isloggedUserNftHolder && + loggedInUser && + !( + utility.claimed_status && + utility.claimed_user_id === loggedInUser.id + ) ? ( +
-

{utility?.description}

-
- Date de l'utilité:{" "} - {utility?.date - ? new Date(utility.date.seconds * 1000).toDateString() - : "N/A"} + ) : ( +
+
+ +
+ + Utilié Reclamer en success +
- {!utility.claimed_status && ( -
-
+ )} + ); } From be8bbe47ab19d4b2209e2f1ecd4a31852ce58d71 Mon Sep 17 00:00:00 2001 From: JWMatheo Date: Sun, 29 Oct 2023 15:09:46 +0100 Subject: [PATCH 11/26] fix minor bug --- .../UtilitiesComponent/UtilitiesComponent.js | 7 +++---- .../LaunchpadCollectionLive.js | 12 +++++------- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/client/src/Components/UtilitiesComponent/UtilitiesComponent.js b/client/src/Components/UtilitiesComponent/UtilitiesComponent.js index 142a8ce9..d3a715ba 100644 --- a/client/src/Components/UtilitiesComponent/UtilitiesComponent.js +++ b/client/src/Components/UtilitiesComponent/UtilitiesComponent.js @@ -35,7 +35,6 @@ function UtilitiesComponent({ const [isloggedUserNftHolder, setIsloggedUserNftHolder] = useState(true); const [isClaimConfirmed, setIsClaimConfirmed] = useState(false); - function displayStatusColor() { if (utilityStatus === "Disponible") { setStatus(true); @@ -156,9 +155,9 @@ function UtilitiesComponent({
Date de l'utilité: {utilityDate}{" "} - {utility.claimed_status && - utility.claimed_user_id && - utility.claimed_user_id === loggedInUser.id + {utility?.claimed_status && + utility?.claimed_user_id && + utility?.claimed_user_id === loggedInUser.id ? "Réclamé" : ""} diff --git a/client/src/Pages/LaunchpadCollectionLive/LaunchpadCollectionLive.js b/client/src/Pages/LaunchpadCollectionLive/LaunchpadCollectionLive.js index cdacdbed..8044b340 100644 --- a/client/src/Pages/LaunchpadCollectionLive/LaunchpadCollectionLive.js +++ b/client/src/Pages/LaunchpadCollectionLive/LaunchpadCollectionLive.js @@ -77,7 +77,6 @@ function LaunchpadCollectionLive(isLogged) { const [crossmintPayLoadLocalStorage, setCrossmintPayLoadLocalStorage] = useState(null); const { athleteId, collectionAddress } = useParams(); - useEffect(() => { window.addEventListener( @@ -217,7 +216,6 @@ function LaunchpadCollectionLive(isLogged) { // ----------------------- Shajeed ------------------------- - useEffect(() => { const q = query( collection(db, "nft_collections"), @@ -233,7 +231,7 @@ function LaunchpadCollectionLive(isLogged) { (snapshot) => { const utilitiesData = snapshot.docs.map((doc) => ({ id: doc.id, // include the id here - ...doc.data() + ...doc.data(), })); setUtilities(utilitiesData); } @@ -335,8 +333,6 @@ function LaunchpadCollectionLive(isLogged) { setIsMintButtonClicked(true); } - - const [isMintingProcessBegan, setIsMintingProcessBegan] = useState(false); const [mintingProcessStatus, setMintingProcessStatus] = useState(true); const [ @@ -583,8 +579,10 @@ function LaunchpadCollectionLive(isLogged) { nftCollectionMaxItems={nftCollectionMaxItems} />
- {crossmintPayLoadLocalStorage ? "sqhdddddddddddsqdhhhhhhhhh" : ""} - +
Date: Wed, 8 Nov 2023 16:51:45 +0100 Subject: [PATCH 12/26] click on media to display the fullpage post --- .../PostsComponents/PostsFeed/PostsFeed.css | 17 +++++++++-------- .../PostsComponents/PostsFeed/PostsFeed.js | 11 +++++++---- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/client/src/Components/PostsComponents/PostsFeed/PostsFeed.css b/client/src/Components/PostsComponents/PostsFeed/PostsFeed.css index f95a1f41..f9f4b1b8 100644 --- a/client/src/Components/PostsComponents/PostsFeed/PostsFeed.css +++ b/client/src/Components/PostsComponents/PostsFeed/PostsFeed.css @@ -25,7 +25,7 @@ overflow-y: visible; /* background-color: yellow; */ } -.publication-content::-webkit-scrollbar{ +.publication-content::-webkit-scrollbar { display: none; } /* check HeadOfPost.css for the fullpagepost version */ @@ -46,6 +46,7 @@ display: flex; justify-content: center; align-items: center; + cursor: pointer; } .publication-media img { max-width: 100%; @@ -65,21 +66,21 @@ width: 96%; display: flex; position: relative; - left:1%; + left: 1%; } .show-comments-button-publication a { color: black; text-decoration: none; } -.show-comments-button-publication:active{ +.show-comments-button-publication:active { color: white; } .show-comments-button-publication:hover { text-decoration: underline; cursor: pointer; } -.publish-comments-button-container-publication button{ +.publish-comments-button-container-publication button { border: none; background: none; padding: 0; @@ -91,11 +92,11 @@ padding-left: 10px; padding-right: 10px; } -.publish-comments-button-container-publication button:hover{ +.publish-comments-button-container-publication button:hover { background-color: #00000015; /* background-color: #f7c520 !important; */ - transition-duration: 300ms !important; - border-radius: 20px; + transition-duration: 300ms !important; + border-radius: 20px; } .line-separation-comments-publication { border: 0.29829px solid rgba(0, 0, 0, 0.2); @@ -105,4 +106,4 @@ .line-separation-comments-publication-container { height: 25px; } -} \ No newline at end of file +} diff --git a/client/src/Components/PostsComponents/PostsFeed/PostsFeed.js b/client/src/Components/PostsComponents/PostsFeed/PostsFeed.js index db21fb7d..29fdb0b2 100644 --- a/client/src/Components/PostsComponents/PostsFeed/PostsFeed.js +++ b/client/src/Components/PostsComponents/PostsFeed/PostsFeed.js @@ -129,8 +129,8 @@ function PostsFeed({
@@ -187,9 +187,12 @@ function PostsFeed({ /> {displayVote()} {/* Backend here */} -
+
setIsPostClicked(true)} + > {/* utilisateur */} - {postPicture && } + {postPicture && post media}
{/* Backend here */} Date: Fri, 24 Nov 2023 03:38:54 -0500 Subject: [PATCH 13/26] email fix unfinished --- client/functions/index.js | 6 +- client/package-lock.json | 1392 ++++++++++++++++++++++++++++++++++++- client/package.json | 1 + 3 files changed, 1386 insertions(+), 13 deletions(-) diff --git a/client/functions/index.js b/client/functions/index.js index eeeb3757..6642a56f 100644 --- a/client/functions/index.js +++ b/client/functions/index.js @@ -1,6 +1,6 @@ const functions = require("firebase-functions/v1"); -const cors = require('cors')({ origin: ['http://localhost:3000', 'https://www.sofan.app', 'https://staging.sofan.app'] }); -//.const cors = require('cors')({ origin: true }); +//const cors = require('cors')({ origin: ['http://localhost:3000', 'https://www.sofan.app', 'https://staging.sofan.app'] }); +const cors = require('cors')({ origin: true }); // // Create and deploy your first functions // // https://firebase.google.com/docs/functions/get-started @@ -22,6 +22,8 @@ const transporter = nodemailer.createTransport({ // functions.logger.log(functions.config().email.user); exports.sendVerificationEmail = functions.https.onRequest((req, res) => { + // Return 204 for OPTIONS method (preflight request) + cors(req, res, async () => { if (req.method !== "POST") { return res.status(405).send("Method Not Allowed"); diff --git a/client/package-lock.json b/client/package-lock.json index 8a516b44..8dc57554 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -24,6 +24,7 @@ "date-fns": "^2.30.0", "env-cmd": "^10.1.0", "firebase": "^9.22.1", + "firebase-functions": "^4.5.0", "libphonenumber-js": "^1.10.28", "opensea-js": "^4.0.24", "react": "^18.2.0", @@ -3867,6 +3868,18 @@ "@ethersproject/strings": "^5.7.0" } }, + "node_modules/@fastify/busboy": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-1.2.1.tgz", + "integrity": "sha512-7PQA7EH43S0CxcOa9OeAnaeA0oQ+e/DHNPZwSQM9CQHW76jle5+OvLdibRp/Aafs9KXbLhxyjOTkRjWUbQEd3Q==", + "peer": true, + "dependencies": { + "text-decoding": "^1.0.0" + }, + "engines": { + "node": ">=14" + } + }, "node_modules/@firebase/analytics": { "version": "0.10.0", "resolved": "https://registry.npmjs.org/@firebase/analytics/-/analytics-0.10.0.tgz", @@ -4585,6 +4598,131 @@ "resolved": "https://registry.npmjs.org/@firebase/webchannel-wrapper/-/webchannel-wrapper-0.10.1.tgz", "integrity": "sha512-Dq5rYfEpdeel0bLVN+nfD1VWmzCkK+pJbSjIawGE+RY4+NIJqhbUDDQjvV0NUK84fMfwxvtFoCtEe70HfZjFcw==" }, + "node_modules/@google-cloud/firestore": { + "version": "6.8.0", + "resolved": "https://registry.npmjs.org/@google-cloud/firestore/-/firestore-6.8.0.tgz", + "integrity": "sha512-JRpk06SmZXLGz0pNx1x7yU3YhkUXheKgH5hbDZ4kMsdhtfV5qPLJLRI4wv69K0cZorIk+zTMOwptue7hizo0eA==", + "optional": true, + "peer": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "functional-red-black-tree": "^1.0.1", + "google-gax": "^3.5.7", + "protobufjs": "^7.2.5" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/@google-cloud/firestore/node_modules/long": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz", + "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==", + "optional": true, + "peer": true + }, + "node_modules/@google-cloud/firestore/node_modules/protobufjs": { + "version": "7.2.5", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.2.5.tgz", + "integrity": "sha512-gGXRSXvxQ7UiPgfw8gevrfRWcTlSbOFg+p/N+JVJEK5VhueL2miT6qTymqAmjr1Q5WbOCyJbyrk6JfWKwlFn6A==", + "hasInstallScript": true, + "optional": true, + "peer": true, + "dependencies": { + "@protobufjs/aspromise": "^1.1.2", + "@protobufjs/base64": "^1.1.2", + "@protobufjs/codegen": "^2.0.4", + "@protobufjs/eventemitter": "^1.1.0", + "@protobufjs/fetch": "^1.1.0", + "@protobufjs/float": "^1.0.2", + "@protobufjs/inquire": "^1.1.0", + "@protobufjs/path": "^1.1.2", + "@protobufjs/pool": "^1.1.0", + "@protobufjs/utf8": "^1.1.0", + "@types/node": ">=13.7.0", + "long": "^5.0.0" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/@google-cloud/paginator": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/@google-cloud/paginator/-/paginator-3.0.7.tgz", + "integrity": "sha512-jJNutk0arIQhmpUUQJPJErsojqo834KcyB6X7a1mxuic8i1tKXxde8E69IZxNZawRIlZdIK2QY4WALvlK5MzYQ==", + "optional": true, + "peer": true, + "dependencies": { + "arrify": "^2.0.0", + "extend": "^3.0.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@google-cloud/projectify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@google-cloud/projectify/-/projectify-3.0.0.tgz", + "integrity": "sha512-HRkZsNmjScY6Li8/kb70wjGlDDyLkVk3KvoEo9uIoxSjYLJasGiCch9+PqRVDOCGUFvEIqyogl+BeqILL4OJHA==", + "optional": true, + "peer": true, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/@google-cloud/promisify": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@google-cloud/promisify/-/promisify-3.0.1.tgz", + "integrity": "sha512-z1CjRjtQyBOYL+5Qr9DdYIfrdLBe746jRTYfaYU6MeXkqp7UfYs/jX16lFFVzZ7PGEJvqZNqYUEtb1mvDww4pA==", + "optional": true, + "peer": true, + "engines": { + "node": ">=12" + } + }, + "node_modules/@google-cloud/storage": { + "version": "6.12.0", + "resolved": "https://registry.npmjs.org/@google-cloud/storage/-/storage-6.12.0.tgz", + "integrity": "sha512-78nNAY7iiZ4O/BouWMWTD/oSF2YtYgYB3GZirn0To6eBOugjXVoK+GXgUXOl+HlqbAOyHxAVXOlsj3snfbQ1dw==", + "optional": true, + "peer": true, + "dependencies": { + "@google-cloud/paginator": "^3.0.7", + "@google-cloud/projectify": "^3.0.0", + "@google-cloud/promisify": "^3.0.0", + "abort-controller": "^3.0.0", + "async-retry": "^1.3.3", + "compressible": "^2.0.12", + "duplexify": "^4.0.0", + "ent": "^2.2.0", + "extend": "^3.0.2", + "fast-xml-parser": "^4.2.2", + "gaxios": "^5.0.0", + "google-auth-library": "^8.0.1", + "mime": "^3.0.0", + "mime-types": "^2.0.8", + "p-limit": "^3.0.1", + "retry-request": "^5.0.0", + "teeny-request": "^8.0.0", + "uuid": "^8.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@google-cloud/storage/node_modules/mime": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-3.0.0.tgz", + "integrity": "sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A==", + "optional": true, + "peer": true, + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=10.0.0" + } + }, "node_modules/@grpc/grpc-js": { "version": "1.7.3", "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.7.3.tgz", @@ -5539,6 +5677,19 @@ "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==" }, + "node_modules/@jsdoc/salty": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/@jsdoc/salty/-/salty-0.2.5.tgz", + "integrity": "sha512-TfRP53RqunNe2HBobVBJ0VLhK1HbfvBYeTC1ahnN64PWvyYyGebmMiPkuwvD9fpw2ZbkoPb8Q7mwy0aR8Z9rvw==", + "optional": true, + "peer": true, + "dependencies": { + "lodash": "^4.17.21" + }, + "engines": { + "node": ">=v12.0.0" + } + }, "node_modules/@leichtgewicht/ip-codec": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/@leichtgewicht/ip-codec/-/ip-codec-2.0.4.tgz", @@ -7077,6 +7228,14 @@ "@types/node": "*" } }, + "node_modules/@types/cors": { + "version": "2.8.15", + "resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.15.tgz", + "integrity": "sha512-n91JxbNLD8eQIuXDIChAN1tCKNWCEgpceU9b7ZMbFA+P+Q4yIeh80jizFLEvolRPc1ES0VdwFlGv+kJTSirogw==", + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@types/debug": { "version": "4.1.8", "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.8.tgz", @@ -7130,6 +7289,17 @@ "@types/send": "*" } }, + "node_modules/@types/glob": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/@types/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-IO+MJPVhoqz+28h1qLAcBEH2+xHMK6MTyHJc7MTnnYb6wsoLR29POVGJ7LycmVXIqyy/4/2ShP5sUwTXuOwb/w==", + "optional": true, + "peer": true, + "dependencies": { + "@types/minimatch": "^5.1.2", + "@types/node": "*" + } + }, "node_modules/@types/graceful-fs": { "version": "4.1.6", "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.6.tgz", @@ -7230,6 +7400,15 @@ "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==" }, + "node_modules/@types/jsonwebtoken": { + "version": "9.0.4", + "resolved": "https://registry.npmjs.org/@types/jsonwebtoken/-/jsonwebtoken-9.0.4.tgz", + "integrity": "sha512-8UYapdmR0QlxgvJmyE8lP7guxD0UGVMfknsdtCFZh4ovShdBl3iOI4zdvqBHrB/IS+xUj3PSx73Qkey1fhWz+g==", + "peer": true, + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@types/keyv": { "version": "3.1.4", "resolved": "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.4.tgz", @@ -7238,16 +7417,48 @@ "@types/node": "*" } }, + "node_modules/@types/linkify-it": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/linkify-it/-/linkify-it-3.0.4.tgz", + "integrity": "sha512-hPpIeeHb/2UuCw06kSNAOVWgehBLXEo0/fUs0mw3W2qhqX89PI2yvok83MnuctYGCPrabGIoi0fFso4DQ+sNUQ==", + "optional": true, + "peer": true + }, "node_modules/@types/long": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.2.tgz", "integrity": "sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA==" }, + "node_modules/@types/markdown-it": { + "version": "12.2.3", + "resolved": "https://registry.npmjs.org/@types/markdown-it/-/markdown-it-12.2.3.tgz", + "integrity": "sha512-GKMHFfv3458yYy+v/N8gjufHO6MSZKCOXpZc5GXIWWy8uldwfmPn98vp81gZ5f9SVw8YYBctgfJ22a2d7AOMeQ==", + "optional": true, + "peer": true, + "dependencies": { + "@types/linkify-it": "*", + "@types/mdurl": "*" + } + }, + "node_modules/@types/mdurl": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@types/mdurl/-/mdurl-1.0.4.tgz", + "integrity": "sha512-ARVxjAEX5TARFRzpDRVC6cEk0hUIXCCwaMhz8y7S1/PxU6zZS1UMjyobz7q4w/D/R552r4++EhwmXK1N2rAy0A==", + "optional": true, + "peer": true + }, "node_modules/@types/mime": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.2.tgz", "integrity": "sha512-YATxVxgRqNH6nHEIsvg6k2Boc1JHI9ZbH5iWFFv/MTkchz3b1ieGDa5T0a9RznNdI0KhVbdbWSN+KWWrQZRxTw==" }, + "node_modules/@types/minimatch": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-5.1.2.tgz", + "integrity": "sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA==", + "optional": true, + "peer": true + }, "node_modules/@types/ms": { "version": "0.7.31", "resolved": "https://registry.npmjs.org/@types/ms/-/ms-0.7.31.tgz", @@ -7343,6 +7554,17 @@ "resolved": "https://registry.npmjs.org/@types/retry/-/retry-0.12.0.tgz", "integrity": "sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA==" }, + "node_modules/@types/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@types/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-F3OznnSLAUxFrCEu/L5PY8+ny8DtcFRjx7fZZ9bycvXRi3KPTRS9HOitGZwvPg0juRhXFWIeKX58cnX5YqLohQ==", + "optional": true, + "peer": true, + "dependencies": { + "@types/glob": "*", + "@types/node": "*" + } + }, "node_modules/@types/scheduler": { "version": "0.16.3", "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.3.tgz", @@ -9066,6 +9288,16 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/arrify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-2.0.1.tgz", + "integrity": "sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug==", + "optional": true, + "peer": true, + "engines": { + "node": ">=8" + } + }, "node_modules/asap": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", @@ -9160,6 +9392,16 @@ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.1.tgz", "integrity": "sha512-t0hLfiEKfMUoqhG+U1oid7Pva4bbDPHYfJNiB7BiIjRkj1pyC++4N3huJfqY6aRH6VTB0rvtzQwjM4K6qpfOig==" }, + "node_modules/async-retry": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/async-retry/-/async-retry-1.3.3.tgz", + "integrity": "sha512-wfr/jstw9xNi/0teMHrRW7dsz3Lt5ARhYNZ2ewpadnhaIp5mbALhOAP+EAdsC7t4Z6wqsDVv9+W6gm1Dk9mEyw==", + "optional": true, + "peer": true, + "dependencies": { + "retry": "0.13.1" + } + }, "node_modules/asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", @@ -9966,6 +10208,12 @@ "ieee754": "^1.2.1" } }, + "node_modules/buffer-equal-constant-time": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", + "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==", + "peer": true + }, "node_modules/buffer-from": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", @@ -10166,6 +10414,19 @@ "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==" }, + "node_modules/catharsis": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/catharsis/-/catharsis-0.9.0.tgz", + "integrity": "sha512-prMTQVpcns/tzFgFVkVp6ak6RykZyWb3gu8ckUpd6YkTlacOd3DXGJjIpD4Q6zJirizvaiAjSSHlOsA+6sNh2A==", + "optional": true, + "peer": true, + "dependencies": { + "lodash": "^4.17.15" + }, + "engines": { + "node": ">= 10" + } + }, "node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -11763,6 +12024,15 @@ "safer-buffer": "^2.1.0" } }, + "node_modules/ecdsa-sig-formatter": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", + "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", + "peer": true, + "dependencies": { + "safe-buffer": "^5.0.1" + } + }, "node_modules/ee-first": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", @@ -11921,6 +12191,13 @@ "node": ">=10.13.0" } }, + "node_modules/ent": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/ent/-/ent-2.2.0.tgz", + "integrity": "sha512-GHrMyVZQWvTIdDtpiEXdHZnFQKzeO09apj8Cbl4pKWy4i0Oprcq17usfDt5aO63swf0JOeMWjWQE/LzgSRuWpA==", + "optional": true, + "peer": true + }, "node_modules/entities": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", @@ -13755,6 +14032,36 @@ "resolved": "https://registry.npmjs.org/fast-stable-stringify/-/fast-stable-stringify-1.0.0.tgz", "integrity": "sha512-wpYMUmFu5f00Sm0cj2pfivpmawLZ0NKdviQ4w9zJeR8JVtOpOxHmLaJuj0vxvGqMJQWyP/COUkF75/57OKyRag==" }, + "node_modules/fast-text-encoding": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/fast-text-encoding/-/fast-text-encoding-1.0.6.tgz", + "integrity": "sha512-VhXlQgj9ioXCqGstD37E/HBeqEGV/qOD/kmbVG8h5xKBYvM1L3lR1Zn4555cQ8GkYbJa8aJSipLPndE1k6zK2w==", + "optional": true, + "peer": true + }, + "node_modules/fast-xml-parser": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.3.2.tgz", + "integrity": "sha512-rmrXUXwbJedoXkStenj1kkljNF7ugn5ZjR9FJcwmCfcCbtOMDghPajbc+Tck6vE6F5XsDmx+Pr2le9fw8+pXBg==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/NaturalIntelligence" + }, + { + "type": "paypal", + "url": "https://paypal.me/naturalintelligence" + } + ], + "optional": true, + "peer": true, + "dependencies": { + "strnum": "^1.0.5" + }, + "bin": { + "fxparser": "src/cli/cli.js" + } + }, "node_modules/fastq": { "version": "1.15.0", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", @@ -13987,6 +14294,102 @@ "@firebase/util": "1.9.3" } }, + "node_modules/firebase-admin": { + "version": "11.11.0", + "resolved": "https://registry.npmjs.org/firebase-admin/-/firebase-admin-11.11.0.tgz", + "integrity": "sha512-lp784gXFAJgUEtjSdYNZGTWZqltqjBkoaPSQhDKnmWXJP/MCbWdiDY1hsdkl/6O4O4KFovTjUDLu26sojwdQvw==", + "peer": true, + "dependencies": { + "@fastify/busboy": "^1.2.1", + "@firebase/database-compat": "^0.3.4", + "@firebase/database-types": "^0.10.4", + "@types/node": ">=12.12.47", + "jsonwebtoken": "^9.0.0", + "jwks-rsa": "^3.0.1", + "node-forge": "^1.3.1", + "uuid": "^9.0.0" + }, + "engines": { + "node": ">=14" + }, + "optionalDependencies": { + "@google-cloud/firestore": "^6.6.0", + "@google-cloud/storage": "^6.9.5" + } + }, + "node_modules/firebase-admin/node_modules/uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "peer": true, + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/firebase-functions": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/firebase-functions/-/firebase-functions-4.5.0.tgz", + "integrity": "sha512-y6HsasHtGLfXCp3Pfrz+JA19lO9hSzYiNxFDIDMffrfcsG7UbXzv0zfi2ASadMVRoDCaox5ppZBa1QJxZbctPQ==", + "dependencies": { + "@types/cors": "^2.8.5", + "@types/express": "4.17.3", + "cors": "^2.8.5", + "express": "^4.17.1", + "node-fetch": "^2.6.7", + "protobufjs": "^7.2.2" + }, + "bin": { + "firebase-functions": "lib/bin/firebase-functions.js" + }, + "engines": { + "node": ">=14.10.0" + }, + "peerDependencies": { + "firebase-admin": "^10.0.0 || ^11.0.0" + } + }, + "node_modules/firebase-functions/node_modules/@types/express": { + "version": "4.17.3", + "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.3.tgz", + "integrity": "sha512-I8cGRJj3pyOLs/HndoP+25vOqhqWkAZsWMEmq1qXy/b/M3ppufecUwaK2/TVDVxcV61/iSdhykUjQQ2DLSrTdg==", + "dependencies": { + "@types/body-parser": "*", + "@types/express-serve-static-core": "*", + "@types/serve-static": "*" + } + }, + "node_modules/firebase-functions/node_modules/long": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz", + "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==" + }, + "node_modules/firebase-functions/node_modules/protobufjs": { + "version": "7.2.5", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.2.5.tgz", + "integrity": "sha512-gGXRSXvxQ7UiPgfw8gevrfRWcTlSbOFg+p/N+JVJEK5VhueL2miT6qTymqAmjr1Q5WbOCyJbyrk6JfWKwlFn6A==", + "hasInstallScript": true, + "dependencies": { + "@protobufjs/aspromise": "^1.1.2", + "@protobufjs/base64": "^1.1.2", + "@protobufjs/codegen": "^2.0.4", + "@protobufjs/eventemitter": "^1.1.0", + "@protobufjs/fetch": "^1.1.0", + "@protobufjs/float": "^1.0.2", + "@protobufjs/inquire": "^1.1.0", + "@protobufjs/path": "^1.1.2", + "@protobufjs/pool": "^1.1.0", + "@protobufjs/utf8": "^1.1.0", + "@types/node": ">=13.7.0", + "long": "^5.0.0" + }, + "engines": { + "node": ">=12.0.0" + } + }, "node_modules/flat-cache": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", @@ -14289,12 +14692,42 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/gensync": { - "version": "1.0.0-beta.2", - "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", - "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "node_modules/gaxios": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/gaxios/-/gaxios-5.1.3.tgz", + "integrity": "sha512-95hVgBRgEIRQQQHIbnxBXeHbW4TqFk4ZDJW7wmVtvYar72FdhRIo1UGOLS2eRAKCPEdPBWu+M7+A33D9CdX9rA==", + "optional": true, + "peer": true, + "dependencies": { + "extend": "^3.0.2", + "https-proxy-agent": "^5.0.0", + "is-stream": "^2.0.0", + "node-fetch": "^2.6.9" + }, "engines": { - "node": ">=6.9.0" + "node": ">=12" + } + }, + "node_modules/gcp-metadata": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-5.3.0.tgz", + "integrity": "sha512-FNTkdNEnBdlqF2oatizolQqNANMrcqJt6AAYt99B3y1aLLC8Hc5IOBb+ZnnzllodEEf6xMBp6wRcBbc16fa65w==", + "optional": true, + "peer": true, + "dependencies": { + "gaxios": "^5.0.0", + "json-bigint": "^1.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "engines": { + "node": ">=6.9.0" } }, "node_modules/get-caller-file": { @@ -14486,6 +14919,373 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/google-auth-library": { + "version": "8.9.0", + "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-8.9.0.tgz", + "integrity": "sha512-f7aQCJODJFmYWN6PeNKzgvy9LI2tYmXnzpNDHEjG5sDNPgGb2FXQyTBnXeSH+PAtpKESFD+LmHw3Ox3mN7e1Fg==", + "optional": true, + "peer": true, + "dependencies": { + "arrify": "^2.0.0", + "base64-js": "^1.3.0", + "ecdsa-sig-formatter": "^1.0.11", + "fast-text-encoding": "^1.0.0", + "gaxios": "^5.0.0", + "gcp-metadata": "^5.3.0", + "gtoken": "^6.1.0", + "jws": "^4.0.0", + "lru-cache": "^6.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/google-auth-library/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "optional": true, + "peer": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/google-auth-library/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "optional": true, + "peer": true + }, + "node_modules/google-gax": { + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/google-gax/-/google-gax-3.6.1.tgz", + "integrity": "sha512-g/lcUjGcB6DSw2HxgEmCDOrI/CByOwqRvsuUvNalHUK2iPPPlmAIpbMbl62u0YufGMr8zgE3JL7th6dCb1Ry+w==", + "optional": true, + "peer": true, + "dependencies": { + "@grpc/grpc-js": "~1.8.0", + "@grpc/proto-loader": "^0.7.0", + "@types/long": "^4.0.0", + "@types/rimraf": "^3.0.2", + "abort-controller": "^3.0.0", + "duplexify": "^4.0.0", + "fast-text-encoding": "^1.0.3", + "google-auth-library": "^8.0.2", + "is-stream-ended": "^0.1.4", + "node-fetch": "^2.6.1", + "object-hash": "^3.0.0", + "proto3-json-serializer": "^1.0.0", + "protobufjs": "7.2.4", + "protobufjs-cli": "1.1.1", + "retry-request": "^5.0.0" + }, + "bin": { + "compileProtos": "build/tools/compileProtos.js", + "minifyProtoJson": "build/tools/minify.js" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/google-gax/node_modules/@grpc/grpc-js": { + "version": "1.8.21", + "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.8.21.tgz", + "integrity": "sha512-KeyQeZpxeEBSqFVTi3q2K7PiPXmgBfECc4updA1ejCLjYmoAlvvM3ZMp5ztTDUCUQmoY3CpDxvchjO1+rFkoHg==", + "optional": true, + "peer": true, + "dependencies": { + "@grpc/proto-loader": "^0.7.0", + "@types/node": ">=12.12.47" + }, + "engines": { + "node": "^8.13.0 || >=10.10.0" + } + }, + "node_modules/google-gax/node_modules/@grpc/proto-loader": { + "version": "0.7.10", + "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.7.10.tgz", + "integrity": "sha512-CAqDfoaQ8ykFd9zqBDn4k6iWT9loLAlc2ETmDFS9JCD70gDcnA4L3AFEo2iV7KyAtAAHFW9ftq1Fz+Vsgq80RQ==", + "optional": true, + "peer": true, + "dependencies": { + "lodash.camelcase": "^4.3.0", + "long": "^5.0.0", + "protobufjs": "^7.2.4", + "yargs": "^17.7.2" + }, + "bin": { + "proto-loader-gen-types": "build/bin/proto-loader-gen-types.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/google-gax/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "optional": true, + "peer": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/google-gax/node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "optional": true, + "peer": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/google-gax/node_modules/escodegen": { + "version": "1.14.3", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.14.3.tgz", + "integrity": "sha512-qFcX0XJkdg+PB3xjZZG/wKSuT1PnQWx57+TVSjIMmILd2yC/6ByYElPwJnslDsuWuSAp4AwJGumarAAmJch5Kw==", + "optional": true, + "peer": true, + "dependencies": { + "esprima": "^4.0.1", + "estraverse": "^4.2.0", + "esutils": "^2.0.2", + "optionator": "^0.8.1" + }, + "bin": { + "escodegen": "bin/escodegen.js", + "esgenerate": "bin/esgenerate.js" + }, + "engines": { + "node": ">=4.0" + }, + "optionalDependencies": { + "source-map": "~0.6.1" + } + }, + "node_modules/google-gax/node_modules/escodegen/node_modules/estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "optional": true, + "peer": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/google-gax/node_modules/glob": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", + "optional": true, + "peer": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/google-gax/node_modules/levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA==", + "optional": true, + "peer": true, + "dependencies": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/google-gax/node_modules/long": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz", + "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==", + "optional": true, + "peer": true + }, + "node_modules/google-gax/node_modules/minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "optional": true, + "peer": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/google-gax/node_modules/optionator": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", + "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", + "optional": true, + "peer": true, + "dependencies": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.6", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "word-wrap": "~1.2.3" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/google-gax/node_modules/prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==", + "optional": true, + "peer": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/google-gax/node_modules/protobufjs": { + "version": "7.2.4", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.2.4.tgz", + "integrity": "sha512-AT+RJgD2sH8phPmCf7OUZR8xGdcJRga4+1cOaXJ64hvcSkVhNcRHOwIxUatPH15+nj59WAGTDv3LSGZPEQbJaQ==", + "hasInstallScript": true, + "optional": true, + "peer": true, + "dependencies": { + "@protobufjs/aspromise": "^1.1.2", + "@protobufjs/base64": "^1.1.2", + "@protobufjs/codegen": "^2.0.4", + "@protobufjs/eventemitter": "^1.1.0", + "@protobufjs/fetch": "^1.1.0", + "@protobufjs/float": "^1.0.2", + "@protobufjs/inquire": "^1.1.0", + "@protobufjs/path": "^1.1.2", + "@protobufjs/pool": "^1.1.0", + "@protobufjs/utf8": "^1.1.0", + "@types/node": ">=13.7.0", + "long": "^5.0.0" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/google-gax/node_modules/protobufjs-cli": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/protobufjs-cli/-/protobufjs-cli-1.1.1.tgz", + "integrity": "sha512-VPWMgIcRNyQwWUv8OLPyGQ/0lQY/QTQAVN5fh+XzfDwsVw1FZ2L3DM/bcBf8WPiRz2tNpaov9lPZfNcmNo6LXA==", + "optional": true, + "peer": true, + "dependencies": { + "chalk": "^4.0.0", + "escodegen": "^1.13.0", + "espree": "^9.0.0", + "estraverse": "^5.1.0", + "glob": "^8.0.0", + "jsdoc": "^4.0.0", + "minimist": "^1.2.0", + "semver": "^7.1.2", + "tmp": "^0.2.1", + "uglify-js": "^3.7.7" + }, + "bin": { + "pbjs": "bin/pbjs", + "pbts": "bin/pbts" + }, + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "protobufjs": "^7.0.0" + } + }, + "node_modules/google-gax/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "optional": true, + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/google-gax/node_modules/type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==", + "optional": true, + "peer": true, + "dependencies": { + "prelude-ls": "~1.1.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/google-gax/node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "optional": true, + "peer": true, + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/google-gax/node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "optional": true, + "peer": true, + "engines": { + "node": ">=12" + } + }, + "node_modules/google-p12-pem": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/google-p12-pem/-/google-p12-pem-4.0.1.tgz", + "integrity": "sha512-WPkN4yGtz05WZ5EhtlxNDWPhC4JIic6G8ePitwUWy4l+XPVYec+a0j0Ts47PDtW59y3RwAhUd9/h9ZZ63px6RQ==", + "optional": true, + "peer": true, + "dependencies": { + "node-forge": "^1.3.1" + }, + "bin": { + "gp12-pem": "build/src/bin/gp12-pem.js" + }, + "engines": { + "node": ">=12.0.0" + } + }, "node_modules/gopd": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", @@ -14533,6 +15333,21 @@ "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==" }, + "node_modules/gtoken": { + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/gtoken/-/gtoken-6.1.2.tgz", + "integrity": "sha512-4ccGpzz7YAr7lxrT2neugmXQ3hP9ho2gcaityLVkiUecAiwiy60Ii8gRbZeOsXV19fYaRjgBSshs8kXw+NKCPQ==", + "optional": true, + "peer": true, + "dependencies": { + "gaxios": "^5.0.1", + "google-p12-pem": "^4.0.0", + "jws": "^4.0.0" + }, + "engines": { + "node": ">=12.0.0" + } + }, "node_modules/gzip-size": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-6.0.0.tgz", @@ -15590,6 +16405,13 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/is-stream-ended": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-stream-ended/-/is-stream-ended-0.1.4.tgz", + "integrity": "sha512-xj0XPvmr7bQFTvirqnFr50o0hQIh6ZItDqloxt5aJrR4NQsYeSsyFQERYGCAzfindAcnKjINnwEEgLx4IqVzQw==", + "optional": true, + "peer": true + }, "node_modules/is-string": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", @@ -17728,6 +18550,15 @@ "jiti": "bin/jiti.js" } }, + "node_modules/jose": { + "version": "4.15.4", + "resolved": "https://registry.npmjs.org/jose/-/jose-4.15.4.tgz", + "integrity": "sha512-W+oqK4H+r5sITxfxpSU+MMdr/YSWGvgZMQDIsNoBDGGy4i7GBPTtvFKibQzW06n3U3TqHjhvBJsirShsEJ6eeQ==", + "peer": true, + "funding": { + "url": "https://github.com/sponsors/panva" + } + }, "node_modules/js-base64": { "version": "3.7.5", "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-3.7.5.tgz", @@ -17755,11 +18586,74 @@ "js-yaml": "bin/js-yaml.js" } }, + "node_modules/js2xmlparser": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/js2xmlparser/-/js2xmlparser-4.0.2.tgz", + "integrity": "sha512-6n4D8gLlLf1n5mNLQPRfViYzu9RATblzPEtm1SthMX1Pjao0r9YI9nw7ZIfRxQMERS87mcswrg+r/OYrPRX6jA==", + "optional": true, + "peer": true, + "dependencies": { + "xmlcreate": "^2.0.4" + } + }, "node_modules/jsbn": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==" }, + "node_modules/jsdoc": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/jsdoc/-/jsdoc-4.0.2.tgz", + "integrity": "sha512-e8cIg2z62InH7azBBi3EsSEqrKx+nUtAS5bBcYTSpZFA+vhNPyhv8PTFZ0WsjOPDj04/dOLlm08EDcQJDqaGQg==", + "optional": true, + "peer": true, + "dependencies": { + "@babel/parser": "^7.20.15", + "@jsdoc/salty": "^0.2.1", + "@types/markdown-it": "^12.2.3", + "bluebird": "^3.7.2", + "catharsis": "^0.9.0", + "escape-string-regexp": "^2.0.0", + "js2xmlparser": "^4.0.2", + "klaw": "^3.0.0", + "markdown-it": "^12.3.2", + "markdown-it-anchor": "^8.4.1", + "marked": "^4.0.10", + "mkdirp": "^1.0.4", + "requizzle": "^0.2.3", + "strip-json-comments": "^3.1.0", + "underscore": "~1.13.2" + }, + "bin": { + "jsdoc": "jsdoc.js" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/jsdoc/node_modules/escape-string-regexp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", + "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", + "optional": true, + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/jsdoc/node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "optional": true, + "peer": true, + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/jsdom": { "version": "16.7.0", "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-16.7.0.tgz", @@ -17840,6 +18734,16 @@ "node": ">=4" } }, + "node_modules/json-bigint": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-bigint/-/json-bigint-1.0.0.tgz", + "integrity": "sha512-SiPv/8VpZuWbvLSMtTDU8hEfrZWg/mH/nV/b4o0CYbSxu1UIQPLdwKOCIyLQX+VIPO5vrLX3i8qtqFyhdPSUSQ==", + "optional": true, + "peer": true, + "dependencies": { + "bignumber.js": "^9.0.0" + } + }, "node_modules/json-buffer": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", @@ -17950,14 +18854,57 @@ "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", "integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==", "dependencies": { - "jsonparse": "^1.2.0", - "through": ">=2.2.7 <3" - }, - "bin": { - "JSONStream": "bin.js" + "jsonparse": "^1.2.0", + "through": ">=2.2.7 <3" + }, + "bin": { + "JSONStream": "bin.js" + }, + "engines": { + "node": "*" + } + }, + "node_modules/jsonwebtoken": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz", + "integrity": "sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ==", + "peer": true, + "dependencies": { + "jws": "^3.2.2", + "lodash.includes": "^4.3.0", + "lodash.isboolean": "^3.0.3", + "lodash.isinteger": "^4.0.4", + "lodash.isnumber": "^3.0.3", + "lodash.isplainobject": "^4.0.6", + "lodash.isstring": "^4.0.1", + "lodash.once": "^4.0.0", + "ms": "^2.1.1", + "semver": "^7.5.4" }, "engines": { - "node": "*" + "node": ">=12", + "npm": ">=6" + } + }, + "node_modules/jsonwebtoken/node_modules/jwa": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz", + "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==", + "peer": true, + "dependencies": { + "buffer-equal-constant-time": "1.0.1", + "ecdsa-sig-formatter": "1.0.11", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/jsonwebtoken/node_modules/jws": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz", + "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==", + "peer": true, + "dependencies": { + "jwa": "^1.4.1", + "safe-buffer": "^5.0.1" } }, "node_modules/jsprim": { @@ -18140,6 +19087,46 @@ "node": ">=4.0" } }, + "node_modules/jwa": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-2.0.0.tgz", + "integrity": "sha512-jrZ2Qx916EA+fq9cEAeCROWPTfCwi1IVHqT2tapuqLEVVDKFDENFw1oL+MwrTvH6msKxsd1YTDVw6uKEcsrLEA==", + "optional": true, + "peer": true, + "dependencies": { + "buffer-equal-constant-time": "1.0.1", + "ecdsa-sig-formatter": "1.0.11", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/jwks-rsa": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/jwks-rsa/-/jwks-rsa-3.1.0.tgz", + "integrity": "sha512-v7nqlfezb9YfHHzYII3ef2a2j1XnGeSE/bK3WfumaYCqONAIstJbrEGapz4kadScZzEt7zYCN7bucj8C0Mv/Rg==", + "peer": true, + "dependencies": { + "@types/express": "^4.17.17", + "@types/jsonwebtoken": "^9.0.2", + "debug": "^4.3.4", + "jose": "^4.14.6", + "limiter": "^1.1.5", + "lru-memoizer": "^2.2.0" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/jws": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jws/-/jws-4.0.0.tgz", + "integrity": "sha512-KDncfTmOZoOMTFG4mBlG0qUIOlc03fmzH+ru6RgYVZhPkyiy/92Owlt/8UEN+a4TXR1FQetfIpJE8ApdvdVxTg==", + "optional": true, + "peer": true, + "dependencies": { + "jwa": "^2.0.0", + "safe-buffer": "^5.0.1" + } + }, "node_modules/jwt-decode": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/jwt-decode/-/jwt-decode-3.1.2.tgz", @@ -18180,6 +19167,16 @@ "node": ">=0.10.0" } }, + "node_modules/klaw": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/klaw/-/klaw-3.0.0.tgz", + "integrity": "sha512-0Fo5oir+O9jnXu5EefYbVK+mHMBeEVEy2cmctR1O1NECcCkPRreJKrS6Qt/j3KC2C148Dfo9i3pCmCMsdqGr0g==", + "optional": true, + "peer": true, + "dependencies": { + "graceful-fs": "^4.1.9" + } + }, "node_modules/kleur": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", @@ -18425,11 +19422,27 @@ "node": ">=10" } }, + "node_modules/limiter": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/limiter/-/limiter-1.1.5.tgz", + "integrity": "sha512-FWWMIEOxz3GwUI4Ts/IvgVy6LPvoMPgjMdQ185nN6psJyBJ4yOpzqm695/h5umdLJg2vW3GR5iG11MAkR2AzJA==", + "peer": true + }, "node_modules/lines-and-columns": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==" }, + "node_modules/linkify-it": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-3.0.3.tgz", + "integrity": "sha512-ynTsyrFSdE5oZ/O9GEf00kPngmOfVwazR5GKDq6EYfhlpFug3J2zybX56a2PRRpc9P+FuSoGNAwjlbDs9jJBPQ==", + "optional": true, + "peer": true, + "dependencies": { + "uc.micro": "^1.0.1" + } + }, "node_modules/loader-runner": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz", @@ -18475,16 +19488,58 @@ "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==" }, + "node_modules/lodash.clonedeep": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", + "integrity": "sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ==", + "peer": true + }, "node_modules/lodash.debounce": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", "integrity": "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==" }, + "node_modules/lodash.includes": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz", + "integrity": "sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w==", + "peer": true + }, + "node_modules/lodash.isboolean": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", + "integrity": "sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg==", + "peer": true + }, "node_modules/lodash.isequal": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", "integrity": "sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==" }, + "node_modules/lodash.isinteger": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz", + "integrity": "sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA==", + "peer": true + }, + "node_modules/lodash.isnumber": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz", + "integrity": "sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw==", + "peer": true + }, + "node_modules/lodash.isplainobject": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", + "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==", + "peer": true + }, + "node_modules/lodash.isstring": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", + "integrity": "sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==", + "peer": true + }, "node_modules/lodash.memoize": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", @@ -18495,6 +19550,12 @@ "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==" }, + "node_modules/lodash.once": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", + "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==", + "peer": true + }, "node_modules/lodash.sortby": { "version": "4.7.0", "resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz", @@ -18570,6 +19631,32 @@ "yallist": "^3.0.2" } }, + "node_modules/lru-memoizer": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/lru-memoizer/-/lru-memoizer-2.2.0.tgz", + "integrity": "sha512-QfOZ6jNkxCcM/BkIPnFsqDhtrazLRsghi9mBwFAzol5GCvj4EkFT899Za3+QwikCg5sRX8JstioBDwOxEyzaNw==", + "peer": true, + "dependencies": { + "lodash.clonedeep": "^4.5.0", + "lru-cache": "~4.0.0" + } + }, + "node_modules/lru-memoizer/node_modules/lru-cache": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.0.2.tgz", + "integrity": "sha512-uQw9OqphAGiZhkuPlpFGmdTU2tEuhxTourM/19qGJrxBPHAr/f8BT1a0i/lOclESnGatdJG/UCkP9kZB/Lh1iw==", + "peer": true, + "dependencies": { + "pseudomap": "^1.0.1", + "yallist": "^2.0.0" + } + }, + "node_modules/lru-memoizer/node_modules/yallist": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A==", + "peer": true + }, "node_modules/ltgt": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/ltgt/-/ltgt-2.2.1.tgz", @@ -18621,6 +19708,64 @@ "tmpl": "1.0.5" } }, + "node_modules/markdown-it": { + "version": "12.3.2", + "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-12.3.2.tgz", + "integrity": "sha512-TchMembfxfNVpHkbtriWltGWc+m3xszaRD0CZup7GFFhzIgQqxIfn3eGj1yZpfuflzPvfkt611B2Q/Bsk1YnGg==", + "optional": true, + "peer": true, + "dependencies": { + "argparse": "^2.0.1", + "entities": "~2.1.0", + "linkify-it": "^3.0.1", + "mdurl": "^1.0.1", + "uc.micro": "^1.0.5" + }, + "bin": { + "markdown-it": "bin/markdown-it.js" + } + }, + "node_modules/markdown-it-anchor": { + "version": "8.6.7", + "resolved": "https://registry.npmjs.org/markdown-it-anchor/-/markdown-it-anchor-8.6.7.tgz", + "integrity": "sha512-FlCHFwNnutLgVTflOYHPW2pPcl2AACqVzExlkGQNsi4CJgqOHN7YTgDd4LuhgN1BFO3TS0vLAruV1Td6dwWPJA==", + "optional": true, + "peer": true, + "peerDependencies": { + "@types/markdown-it": "*", + "markdown-it": "*" + } + }, + "node_modules/markdown-it/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "optional": true, + "peer": true + }, + "node_modules/markdown-it/node_modules/entities": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.1.0.tgz", + "integrity": "sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w==", + "optional": true, + "peer": true, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/marked": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/marked/-/marked-4.3.0.tgz", + "integrity": "sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A==", + "optional": true, + "peer": true, + "bin": { + "marked": "bin/marked.js" + }, + "engines": { + "node": ">= 12" + } + }, "node_modules/md5.js": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", @@ -18636,6 +19781,13 @@ "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.4.tgz", "integrity": "sha512-iV3XNKw06j5Q7mi6h+9vbx23Tv7JkjEVgKHW4pimwyDGWm0OIQntJJ+u1C6mg6mK1EaTv42XQ7w76yuzH7M2cA==" }, + "node_modules/mdurl": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz", + "integrity": "sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g==", + "optional": true, + "peer": true + }, "node_modules/media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", @@ -21406,6 +22558,51 @@ "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" }, + "node_modules/proto3-json-serializer": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/proto3-json-serializer/-/proto3-json-serializer-1.1.1.tgz", + "integrity": "sha512-AwAuY4g9nxx0u52DnSMkqqgyLHaW/XaPLtaAo3y/ZCfeaQB/g4YDH4kb8Wc/mWzWvu0YjOznVnfn373MVZZrgw==", + "optional": true, + "peer": true, + "dependencies": { + "protobufjs": "^7.0.0" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/proto3-json-serializer/node_modules/long": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz", + "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==", + "optional": true, + "peer": true + }, + "node_modules/proto3-json-serializer/node_modules/protobufjs": { + "version": "7.2.5", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.2.5.tgz", + "integrity": "sha512-gGXRSXvxQ7UiPgfw8gevrfRWcTlSbOFg+p/N+JVJEK5VhueL2miT6qTymqAmjr1Q5WbOCyJbyrk6JfWKwlFn6A==", + "hasInstallScript": true, + "optional": true, + "peer": true, + "dependencies": { + "@protobufjs/aspromise": "^1.1.2", + "@protobufjs/base64": "^1.1.2", + "@protobufjs/codegen": "^2.0.4", + "@protobufjs/eventemitter": "^1.1.0", + "@protobufjs/fetch": "^1.1.0", + "@protobufjs/float": "^1.0.2", + "@protobufjs/inquire": "^1.1.0", + "@protobufjs/path": "^1.1.2", + "@protobufjs/pool": "^1.1.0", + "@protobufjs/utf8": "^1.1.0", + "@types/node": ">=13.7.0", + "long": "^5.0.0" + }, + "engines": { + "node": ">=12.0.0" + } + }, "node_modules/protobufjs": { "version": "6.11.3", "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.11.3.tgz", @@ -21448,6 +22645,12 @@ "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", "integrity": "sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw==" }, + "node_modules/pseudomap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==", + "peer": true + }, "node_modules/psl": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", @@ -22286,6 +23489,16 @@ "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==" }, + "node_modules/requizzle": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/requizzle/-/requizzle-0.2.4.tgz", + "integrity": "sha512-JRrFk1D4OQ4SqovXOgdav+K8EAhSB/LJZqCz8tbX0KObcdeM15Ss59ozWMBWmmINMagCwmqn4ZNryUGpBsl6Jw==", + "optional": true, + "peer": true, + "dependencies": { + "lodash": "^4.17.21" + } + }, "node_modules/resolve": { "version": "1.22.2", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.2.tgz", @@ -22417,6 +23630,20 @@ "node": ">= 4" } }, + "node_modules/retry-request": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/retry-request/-/retry-request-5.0.2.tgz", + "integrity": "sha512-wfI3pk7EE80lCIXprqh7ym48IHYdwmAAzESdbU8Q9l7pnRCk9LEhpbOTNKjz6FARLm/Bl5m+4F0ABxOkYUujSQ==", + "optional": true, + "peer": true, + "dependencies": { + "debug": "^4.1.1", + "extend": "^3.0.2" + }, + "engines": { + "node": ">=12" + } + }, "node_modules/reusify": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", @@ -23350,6 +24577,16 @@ "readable-stream": "^3.5.0" } }, + "node_modules/stream-events": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/stream-events/-/stream-events-1.0.5.tgz", + "integrity": "sha512-E1GUzBSgvct8Jsb3v2X15pjzN1tYebtbLaMg+eBOUOAxgbLoSbT2NS91ckc5lJD1KfLjId+jXJRgo0qnV5Nerg==", + "optional": true, + "peer": true, + "dependencies": { + "stubs": "^3.0.0" + } + }, "node_modules/stream-http": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-3.2.0.tgz", @@ -23560,6 +24797,20 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/strnum": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/strnum/-/strnum-1.0.5.tgz", + "integrity": "sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA==", + "optional": true, + "peer": true + }, + "node_modules/stubs": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/stubs/-/stubs-3.0.0.tgz", + "integrity": "sha512-PdHt7hHUJKxvTCgbKX9C1V/ftOcjJQgz8BZwNfV5c4B6dcGqlpelTbJ999jBGZ2jYiPAwcX5dP6oBwVlBlUbxw==", + "optional": true, + "peer": true + }, "node_modules/sturdy-websocket": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/sturdy-websocket/-/sturdy-websocket-0.2.1.tgz", @@ -24035,6 +25286,62 @@ "node": ">=4.5" } }, + "node_modules/teeny-request": { + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/teeny-request/-/teeny-request-8.0.3.tgz", + "integrity": "sha512-jJZpA5He2y52yUhA7pyAGZlgQpcB+xLjcN0eUFxr9c8hP/H7uOXbBNVo/O0C/xVfJLJs680jvkFgVJEEvk9+ww==", + "optional": true, + "peer": true, + "dependencies": { + "http-proxy-agent": "^5.0.0", + "https-proxy-agent": "^5.0.0", + "node-fetch": "^2.6.1", + "stream-events": "^1.0.5", + "uuid": "^9.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/teeny-request/node_modules/@tootallnate/once": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", + "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==", + "optional": true, + "peer": true, + "engines": { + "node": ">= 10" + } + }, + "node_modules/teeny-request/node_modules/http-proxy-agent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", + "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", + "optional": true, + "peer": true, + "dependencies": { + "@tootallnate/once": "2", + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/teeny-request/node_modules/uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "optional": true, + "peer": true, + "bin": { + "uuid": "dist/bin/uuid" + } + }, "node_modules/temp-dir": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/temp-dir/-/temp-dir-2.0.0.tgz", @@ -24154,6 +25461,12 @@ "node": ">=8" } }, + "node_modules/text-decoding": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/text-decoding/-/text-decoding-1.0.0.tgz", + "integrity": "sha512-/0TJD42KDnVwKmDK6jj3xP7E2MG7SHAOG4tyTgyUCRPdHwvkquYNLEQltmdMa3owq3TkddCVcTsoctJI8VQNKA==", + "peer": true + }, "node_modules/text-encoding-utf-8": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/text-encoding-utf-8/-/text-encoding-utf-8-1.0.2.tgz", @@ -24236,6 +25549,19 @@ "resolved": "https://registry.npmjs.org/tiny-warning/-/tiny-warning-1.0.3.tgz", "integrity": "sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA==" }, + "node_modules/tmp": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.1.tgz", + "integrity": "sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ==", + "optional": true, + "peer": true, + "dependencies": { + "rimraf": "^3.0.0" + }, + "engines": { + "node": ">=8.17.0" + } + }, "node_modules/tmpl": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", @@ -24538,6 +25864,26 @@ "node": "*" } }, + "node_modules/uc.micro": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz", + "integrity": "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==", + "optional": true, + "peer": true + }, + "node_modules/uglify-js": { + "version": "3.17.4", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.4.tgz", + "integrity": "sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==", + "optional": true, + "peer": true, + "bin": { + "uglifyjs": "bin/uglifyjs" + }, + "engines": { + "node": ">=0.8.0" + } + }, "node_modules/uint8arrays": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.1.1.tgz", @@ -24579,6 +25925,13 @@ "react": ">=15.0.0" } }, + "node_modules/underscore": { + "version": "1.13.6", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.6.tgz", + "integrity": "sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A==", + "optional": true, + "peer": true + }, "node_modules/unfetch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/unfetch/-/unfetch-3.1.2.tgz", @@ -25831,6 +27184,16 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "optional": true, + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/workbox-background-sync": { "version": "6.6.0", "resolved": "https://registry.npmjs.org/workbox-background-sync/-/workbox-background-sync-6.6.0.tgz", @@ -26309,6 +27672,13 @@ "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==" }, + "node_modules/xmlcreate": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/xmlcreate/-/xmlcreate-2.0.4.tgz", + "integrity": "sha512-nquOebG4sngPmGPICTS5EnxqhKbCmz5Ox5hsszI2T6U5qdrJizBc+0ilYSEjTSzU0yZcmvppztXe/5Al5fUwdg==", + "optional": true, + "peer": true + }, "node_modules/xmlhttprequest": { "version": "1.8.0", "resolved": "https://registry.npmjs.org/xmlhttprequest/-/xmlhttprequest-1.8.0.tgz", diff --git a/client/package.json b/client/package.json index 0e8ba624..01219f44 100644 --- a/client/package.json +++ b/client/package.json @@ -19,6 +19,7 @@ "date-fns": "^2.30.0", "env-cmd": "^10.1.0", "firebase": "^9.22.1", + "firebase-functions": "^4.5.0", "libphonenumber-js": "^1.10.28", "opensea-js": "^4.0.24", "react": "^18.2.0", From eff4bd12a71c6e1c31f947a0eec59acdf19d5dd6 Mon Sep 17 00:00:00 2001 From: Ra Date: Fri, 24 Nov 2023 19:14:16 +0100 Subject: [PATCH 14/26] input font + some clean up Co-Authored-By: JWMatheo <88055282+JWMatheo@users.noreply.github.com> --- .../AddCommentInput/AddCommentInput.js | 1 + client/src/Pages/Home/Home.js | 20 ++++++++----------- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/client/src/Components/PostsComponents/AddCommentInput/AddCommentInput.js b/client/src/Components/PostsComponents/AddCommentInput/AddCommentInput.js index b3a77aab..bac330e6 100644 --- a/client/src/Components/PostsComponents/AddCommentInput/AddCommentInput.js +++ b/client/src/Components/PostsComponents/AddCommentInput/AddCommentInput.js @@ -117,6 +117,7 @@ function AddCommentInput({