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AAAC,IAAA,EAACI,MAAAA,CAAIC,UAAU,uCACb,GAAAN,EAAAC,IAAA,EAACiB,SAAAA,CACCC,QArID,KACb1I,EAAuB,GACzBC,EAAwBD,EAAuB,EAEnD,EAkIoB+I,SAAU/I,IAAAA,EACV6H,UAAU,+FAEV,GAAAN,EAAAG,GAAA,EAACsB,EAAAA,WAAWA,CAAAA,CAACnB,UAAU,sBAAsB,sBAE/C,GAAAN,EAAAC,IAAA,EAACiB,SAAAA,CACCC,QAAS5G,EACTiH,SACE5I,KAAkC8I,IAAlC9I,CAAO,CAACH,EAAqB,EAC7BA,EAAuB7B,EAAU4D,MAAM,CAAG,EAE5C8F,UAAU,mGAET7H,IAAyB7B,EAAU4D,MAAM,CAAG,EACzC,WACA,UACJ,GAAAwF,EAAAG,GAAA,EAACwB,EAAAA,YAAYA,CAAAA,CAACrB,UAAU,wCAW9C","sources":["webpack://_N_E/?ee59","webpack://_N_E/./lib/algorithms/studentQuiz.js","webpack://_N_E/./app/student-quiz/page.tsx","webpack://_N_E/./components/common/footer/footer_3.tsx","webpack://_N_E/./components/common.ts"],"sourcesContent":["import(/* webpackMode: \"eager\" */ \"/codebuild/output/src216011114/src/minisite_iovia/app/student-quiz/page.tsx\");\n","const matrice1 = require(\"../../data/v3__matrice1.json\");\nconst matrice2 = require(\"../../data/v2__matrice2.json\");\nconst jobs = require(\"../../data/metiers.json\");\n\n/**\n * TODO\n * REMOVE DUPLICATE CODE\n */\n\n/**\n * Concatenates the characters of the input string, converts each character to an integer,\n * and returns the sum of these integers.\n *\n * @param {string} str - The input string containing numeric characters to be summed.\n * @return {number} The sum of the numeric characters in the input string.\n */\nfunction concatAndSum(str) {\n return str.split('').reduce((sum, char) => sum + parseInt(char), 0);\n}\n\n/**\n * Calculates the power of a signature based on a given factor.\n *\n * @param {string} signature - The signature to be processed.\n * @param {number} factor - The factor to be used in the calculation.\n * @return {number} The calculated power of the signature.\n */\nfunction calculatePower(signature, factor) {\n const sum = concatAndSum(signature);\n return (sum / factor >= 2.5)\n ? factor * Math.pow(3, sum / factor)\n : factor * Math.pow(3, 5 - sum / factor);\n}\n\n/**\n * Calculate a note based on the difference between metierSignature and userSignature,\n * affected by the metierPower.\n *\n * @param {string} metierSignature - The reference signature to compare against.\n * @param {number} metierPower - The power or weight of the metier signature.\n * @param {string} userSignature - The user's signature to be compared.\n * @return {number} The calculated note as a percentage.\n */\nfunction calcNote(metierSignature, metierPower, userSignature) {\n let cubeMino = 0, cubeMajo = 0;\n\n for (let i = 0; i < userSignature.length; i++) {\n const difference = metierSignature.charAt(i) - userSignature.charAt(i);\n\n if (difference < 0) {\n cubeMajo += Math.pow(3, -difference);\n } else if (difference !== 0) {\n cubeMino += Math.pow(3, difference);\n }\n }\n\n return Math.max((((metierPower - cubeMino + cubeMajo) / metierPower) * ((metierPower - cubeMajo - cubeMino) / metierPower)) * 100, 0);\n}\n\n/**\n * END TODO\n */\n\n\n/**\n * Calcule le score par compétence en fonction des ratios et des points utilisateur.\n */\nfunction calculateSkillScore(e, totalPoints, userPoints, skill) {\n return Object.entries(skill.ratios).reduce((score, [familyId, ratio]) => {\n const familyIndex = parseInt(familyId, 10) - 1;\n const t_i = totalPoints[familyIndex];\n const p_i = userPoints[familyIndex];\n\n return score + (e / t_i) * p_i * ratio;\n }, 0);\n}\n\n/**\n * Calcule les points utilisateur par famille en fonction des réponses.\n */\nfunction calculateUserPoints(questions, userResponses) {\n const familyPoints = {};\n\n questions.forEach((question, index) => {\n const responseIndex = userResponses[index];\n const selectedOption = question.options[responseIndex];\n\n if (!selectedOption) {\n throw new Error(`Réponse invalide pour la question ${index + 1}.`);\n }\n\n Object.entries(selectedOption.scores).forEach(([familyId, score]) => {\n familyPoints[familyId] = (familyPoints[familyId] || 0) + score;\n });\n });\n\n return Object.values(familyPoints);\n}\n\n/**\n * Récupère les totaux des points par famille.\n */\nfunction getTotalPoints() {\n const totalPoints = Array(11).fill(0);\n\n matrice2.questions.forEach(question => {\n question.options.forEach(option => {\n Object.entries(option.scores).forEach(([familyId, score]) => {\n totalPoints[parseInt(familyId, 10) - 1] += Math.min(score, 1);\n });\n });\n });\n\n return totalPoints;\n}\n\n/**\n * Arrondit un score selon un seuil.\n */\nfunction roundScore(score, threshold) {\n const decimalPart = score % 1;\n return decimalPart >= threshold ? Math.ceil(score) : Math.floor(score);\n}\n\n/**\n * Concatène les parties entières des scores en une chaîne.\n */\nfunction concatenateIntegerScores(scores) {\n return scores.map(skill => Math.floor(skill.score)).join(\"\");\n}\n\n/**\n * Génère les scores par compétence.\n */\nfunction calculateScoresPerSkill(userResponses, roundingThreshold = 0.5) {\n const e = 5;\n const skills = matrice1.skills;\n const questions = matrice2.questions;\n\n const userPoints = calculateUserPoints(questions, userResponses);\n const totalPoints = getTotalPoints();\n\n const scores = skills.map(skill => ({\n signatureIndex: skill.signatureIndex,\n label: skill.label,\n score: calculateSkillScore(e, totalPoints, userPoints, skill),\n }));\n\n const normalizedScores = normalizeUserScores(scores);\n\n return normalizedScores.map(skill => ({\n ...skill,\n score: roundScore(skill.score, roundingThreshold),\n }));\n}\n\n\n/**\n * Affine les scores utilisateur en fonction du max et de la note totale\n */\nfunction normalizeUserScores(score) {\n // find the max score\n const maxScore = Math.max(...score.map(s => s.score));\n // e = 5\n const e = 5;\n\n //find the min score\n const minScore = Math.min(...score.map(s => s.score));\n\n // normalize the scores\n return score.map(s => ({\n ...s,\n score: s.score * (e / maxScore) - minScore + 1,\n }));\n}\n\n/**\n * Calcule les correspondances métiers triées.\n */\nfunction generateJobMatches(userSignature) {\n return jobs.map(job => {\n const metierSignature = job.signatures.find(sig => sig.quiz_code === \"CIG_SIMP\")?.content || \"\";\n const metierPower = calculatePower(metierSignature, 33);\n const matchPercentage = calcNote(metierSignature, metierPower, userSignature);\n\n return {\n id: job.id,\n title: job.title,\n category: job.category,\n matchPercentage,\n };\n }).sort((a, b) => b.matchPercentage - a.matchPercentage);\n}\n\n/**\n * Normalise une valeur en utilisant une échelle ajustée.\n * - Si l'écart entre min et max est trop faible (< 10), on garde la moyenne brute.\n * - On utilise une normalisation logarithmique pour éviter des distorsions trop fortes.\n * @param {number} value - La valeur à normaliser.\n * @param {number} min - La valeur minimale observée.\n * @param {number} max - La valeur maximale observée.\n * @returns {number} La valeur normalisée entre 0 et 100.\n */\nfunction normalizeValue(value, min, max) {\n if (max === min) return value; // Cas extrême où toutes les valeurs sont identiques\n if ((max - min) < 10) return value; // ✅ Garde la moyenne brute si dispersion trop faible\n\n // ✅ Normalisation logarithmique pour un meilleur équilibre\n let scaledValue = (value - min) / (max - min);\n let adjustedValue = Math.log1p(scaledValue * 9) / Math.log1p(9); // Log1p pour éviter log(0)\n return adjustedValue * 100;\n}\n\n/**\n * Calcule les moyennes par catégorie avec normalisation ajustée.\n * @param {Array} jobMatches - Liste des métiers et leurs scores.\n * @returns {Array} Liste des moyennes par catégorie normalisées.\n */\nfunction calculateCategoryAverages(jobMatches) {\n let categoryData = {};\n\n jobMatches.forEach(job => {\n if (job.matchPercentage >= -10) { // ✅ Exclure les métiers en dessous de 20%\n if (!categoryData[job.category]) {\n categoryData[job.category] = { total: 0, count: 0, values: [] };\n }\n categoryData[job.category].total += job.matchPercentage;\n categoryData[job.category].count += 1;\n categoryData[job.category].values.push(job.matchPercentage);\n }\n });\n\n return Object.entries(categoryData).map(([category, data]) => {\n const validValues = data.values.filter(v => v !== Infinity && v !== -Infinity);\n const min = validValues.length > 0 ? Math.min(...validValues) : \"N/A\";\n const max = validValues.length > 0 ? Math.max(...validValues) : \"N/A\";\n const avg = data.total / data.count;\n\n /*\n return {\n category,\n average: parseFloat(avg.toFixed(2)),\n normalizedAverage: parseFloat(normalizeValue(avg, min, max).toFixed(2)), // ✅ Normalisation améliorée\n min: min,\n max: max,\n count: data.count\n };\n\n */\n\n return {\n category,\n average: parseFloat(normalizeValue(avg, min, max).toFixed(2)),\n //normalizedAverage: parseFloat(normalizeValue(avg, min, max).toFixed(2)), // ✅ Normalisation améliorée\n // count: data.count\n };\n });\n}\n\n/**\n * Calcule les moyennes par famille de traits.\n */\nfunction calculateTraitAverages(userResponses) {\n const userPoints = calculateUserPoints(matrice2.questions, userResponses);\n const totalPoints = getTotalPoints();\n\n return userPoints.map((points, index) => ({\n label: (index + 1).toString(),\n average: (points / totalPoints[index]) * 100,\n }));\n}\n\n/**\n * Génère les résultats complets du quiz.\n */\nexport function generateQuizResults(userResponses) {\n const scores = calculateScoresPerSkill(userResponses);\n const userSignature = concatenateIntegerScores(scores);\n const jobMatches = generateJobMatches(userSignature);\n\n // ✅ Exclure les métiers < 20% dans le calcul des moyennes par catégorie\n const filteredJobMatches = jobMatches.filter(job => job.matchPercentage >= -10);\n const categoryAverages = calculateCategoryAverages(filteredJobMatches);\n\n const traitAverages = calculateTraitAverages(userResponses);\n\n return {\n userSignature,\n jobMatches,\n categoryAverages,\n traitAverages,\n };\n}\n\n// Exemple d'utilisation\nfunction runExample() {\n const consultant = [0, 0, 2, 2, 1, 2, 2, 0, 0, 2, 0, 0, 0, 2, 2, 0, 0, 1, 1, 1, 2, 2];\n const cdv = [2, 2, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 0, 1, 1, 0, 0, 1, 2, 1];\n const data = [0, 2, 1, 0, 1, 1, 2, 1, 0, 1, 0, 1, 0, 2, 2, 0, 0, 1, 2, 2, 2, 2];\n const management = [1, 0, 2, 0, 2, 0, 2, 2, 1, 2, 2, 2, 1, 0, 0, 1, 0, 0, 1, 2, 1, 1];\n const mco = [2, 0, 1, 1, 2, 1, 1, 1, 2, 2, 2, 1, 2, 1, 0, 2, 2, 2, 0, 2, 1, 1];\n\n const leader = [0, 0, 1, 0, 2, 1, 2, 1, 0, 1, 1, 1, 0, 2, 0, 1, 0, 0, 1, 2, 1, 1];\n const creatif = [1, 2, 2, 2, 0, 0, 1, 2, 2, 2, 0, 1, 2, 1, 2, 2, 2, 1, 2, 2, 0, 1];\n const analyste = [0, 1, 0, 0, 2, 1, 1, 0, 1, 1, 1, 0, 2, 0, 1, 1, 0, 1, 1, 0, 2, 1];\n const reactif = [2, 0, 1, 0, 1, 0, 1, 1, 1, 2, 1, 2, 2, 1, 0, 2, 1, 2, 0, 1, 1, 0];\n const explorateur = [1, 2, 1, 2, 2, 2, 1, 1, 2, 2, 0, 2, 1, 0, 2, 1, 2, 1, 2, 2, 1, 2];\n\n const perso = [0, 0, 1, 0, 2, 1, 2, 1, 0, 1, 1, 1, 0, 2, 0, 1, 0, 0, 1, 2, 1, 1];\n\n const profileNames = [\n \"Consultant\",\n \"CDV\",\n \"Data\",\n \"Management\",\n \"MCO\",\n \"Leader\",\n \"Créatif\",\n \"Analyste\",\n \"Réactif\",\n \"Explorateur\",\n \"Perso\"\n ];\n\n const profiles = [\n consultant,\n cdv,\n data,\n management,\n mco,\n leader,\n creatif,\n analyste,\n reactif,\n explorateur,\n perso\n ];\n\n let resultsList = [];\n\n for (let i = 0; i < profiles.length; i++) {\n const userResponses = profiles[i];\n const results = generateQuizResults(userResponses);\n\n const profileData = {\n profileName: profileNames[i],\n userSignature: results.userSignature,\n // traitAverages: results.traitAverages,\n categoryAverages: results.categoryAverages.sort((a, b) => b.average - a.average),\n jobMatches: results.jobMatches\n };\n\n resultsList.push(profileData);\n }\n\n return resultsList;\n}\n\n/**\n * Calcule des statistiques globales à partir des profils analysés.\n */\nfunction makeStats() {\n // Charger les résultats depuis le fichier JSON\n const stats = JSON.parse(fs.readFileSync(\"/home/nidalz/dev/cyde/minisite_iovia/stats.json\", \"utf8\"));\n\n let topJobs = {};\n let topCategories = {};\n let lowScoreJobsCount = {};\n let lowScoreCategoriesCount = {};\n\n stats.forEach(profile => {\n const { jobMatches, categoryAverages } = profile;\n\n // 🔹 Traitement des métiers (on exclut ceux < 20%)\n jobMatches.forEach(job => {\n if (job.matchPercentage >= -10) { // ✅ Ne prend en compte que les métiers ≥ 20%\n if (!topJobs[job.title]) {\n topJobs[job.title] = { total: 0, count: 0, values: [] };\n }\n topJobs[job.title].total += job.matchPercentage;\n topJobs[job.title].count += 1;\n topJobs[job.title].values.push(job.matchPercentage);\n } else {\n // 🔴 Enregistrement des métiers sous 20%\n if (!lowScoreJobsCount[job.title]) {\n lowScoreJobsCount[job.title] = { count: 0, profiles: [] };\n }\n lowScoreJobsCount[job.title].count += 1;\n lowScoreJobsCount[job.title].profiles.push({ profileName: profile.profileName, score: job.matchPercentage });\n }\n });\n\n // 🔹 Traitement des catégories (on exclut celles < 20%)\n categoryAverages.forEach(category => {\n if (category.average >= -10) { // ✅ Ne prend en compte que les catégories ≥ 20%\n if (!topCategories[category.category]) {\n topCategories[category.category] = { total: 0, count: 0, values: [] };\n }\n topCategories[category.category].total += category.average;\n topCategories[category.category].count += 1;\n topCategories[category.category].values.push(category.average);\n } else {\n // 🔴 Enregistrement des catégories sous 20%\n if (!lowScoreCategoriesCount[category.category]) {\n lowScoreCategoriesCount[category.category] = { count: 0, profiles: [] };\n }\n lowScoreCategoriesCount[category.category].count += 1;\n lowScoreCategoriesCount[category.category].profiles.push({ profileName: profile.profileName, score: category.average });\n }\n });\n });\n\n // 🔹 Calcul des moyennes, minimums et maximums pour les métiers\n let jobAverages = Object.entries(topJobs)\n .map(([title, data]) => {\n const validValues = data.values.filter(v => v !== Infinity && v !== -Infinity);\n return {\n title,\n average: (data.total / data.count).toFixed(2),\n min: validValues.length > 0 ? Math.min(...validValues).toFixed(2) : \"N/A\",\n max: validValues.length > 0 ? Math.max(...validValues).toFixed(2) : \"N/A\",\n lowScoreCount: lowScoreJobsCount[title]?.count || 0\n };\n })\n .filter(job => parseFloat(job.average) >= 20) // ✅ Exclure les métiers avec average < 20\n .sort((a, b) => b.average - a.average); // Trier par score moyen décroissant\n\n // 🔹 Calcul des moyennes, minimums et maximums pour les catégories\n let categoryAveragesFinal = Object.entries(topCategories)\n .map(([category, data]) => {\n const validValues = data.values.filter(v => v !== Infinity && v !== -Infinity);\n return {\n category,\n average: (data.total / data.count).toFixed(2),\n min: validValues.length > 0 ? Math.min(...validValues).toFixed(2) : \"N/A\",\n max: validValues.length > 0 ? Math.max(...validValues).toFixed(2) : \"N/A\",\n lowScoreCount: lowScoreCategoriesCount[category]?.count || 0\n };\n })\n .sort((a, b) => b.average - a.average); // Trier par score moyen décroissant\n\n // 🔹 Résumé des statistiques\n console.log(\"📊 **Statistiques des Profils** 📊\");\n\n console.log(\"\\n🔝 **Top 10 Métiers les Mieux Notés** :\");\n console.table(jobAverages.slice(0, 10));\n\n console.log(\"\\n🔴 **Top 10 Métiers les Moins Bien Notés** :\");\n console.table(jobAverages.slice(-10).sort((a, b) => a.average - b.average));\n\n console.log(\"\\n🔝 **Top Catégories les Mieux Notées** :\");\n console.table(categoryAveragesFinal.slice(0, 10));\n\n console.log(\"\\n❌ **Métiers avec le Plus de Scores < 20%** :\");\n let lowJobs = Object.entries(lowScoreJobsCount).sort((a, b) => b[1].count - a[1].count);\n console.table(lowJobs.slice(0, 10).map(([title, data]) => ({\n Métier: title,\n \"Nombre de profils concernés\": data.count,\n \"Profils\": data.profiles.map(p => p.profileName).join(\", \"),\n \"Pourcentages\": data.profiles.map(p => p.score.toFixed(2)).join(\", \")\n })));\n\n console.log(\"\\n✅ **Résumé des Moyennes par Métier Triées par Average** :\");\n console.table(jobAverages);\n\n console.log(\"\\n✅ **Résumé des Moyennes par Catégorie** :\");\n console.table(categoryAveragesFinal);\n}\n\n// 📌 Exécution des tests\n// makeStats();\n\n/*\nconst jsonProfiles = runExample();\n\n// Retire tout sauf la signature et la moyenne des catégories\njsonProfiles.forEach(profile => {\n // delete profile.jobMatches;\n delete profile.traitAverages;\n});\n\n// Dans categoryAverages, on retire tout sauf la catégorie et la moyenne et la moyenne normalisée\njsonProfiles.forEach(profile => {\n profile.categoryAverages = profile.categoryAverages.map(category => {\n return {\n category: category.category,\n average: category.average,\n normalizedAverage: category.normalizedAverage\n };\n });\n});\n\n// On trie par moyenne normalisée décroissante\njsonProfiles.forEach(profile => {\n profile.categoryAverages = profile.categoryAverages.sort((a, b) => b.normalizedAverage - a.normalizedAverage);\n});\n\n// On affiche plus simplément chaque profil via des tables\njsonProfiles.forEach(profile => {\n console.log(`\\n📌 Profil : ${profile.profileName}`);\n console.table(profile.categoryAverages);\n});\n\n// On affiche la signature de chaque profil\njsonProfiles.forEach(profile => {\n console.log(`\\n📌 Profil : ${profile.profileName}`);\n console.log(`Signature : ${profile.userSignature}`);\n});\n\n// 📌 Afficher au format JSON\nconsole.log(JSON.stringify(jsonProfiles, null, 2));\n*/","\"use client\";\nimport React, { useState, useEffect } from \"react\";\nimport { useRouter } from \"next/navigation\";\nimport Image from \"next/image\";\nimport logo from \"../../public/logo.png\";\nimport quiz from \"../../data/v1__matrice2.json\";\nimport {\n FaArrowLeft,\n FaArrowRight,\n FaBrain,\n FaLightbulb,\n} from \"react-icons/fa\";\nimport { Nav_1 } from \"@/components/common\";\nimport { PiPathBold } from \"react-icons/pi\";\nimport { generateQuizResults } from \"@/lib/algorithms/studentQuiz\";\nimport {\n getStudentSessionId,\n saveStudentResults,\n saveStudentSessionId,\n} from \"@/lib/sessionStorage\";\n\nconst questions = quiz.questions;\n\nconst StudentQuiz = () => {\n const router = useRouter();\n\n const [currentQuestionIndex, setCurrentQuestionIndex] = useState(-1); // -1 pour l'écran d'accueil\n const [answers, setAnswers] = useState([]);\n const [showAnimation, setShowAnimation] = useState(false);\n const [studentSessionId, setStudentSessionId] = useState(null);\n\n useEffect(() => {\n // const existingSessionId = getSessionId();\n // if (existingSessionId) {\n // getStudentSessionId(existingSessionId);\n // loadQuizResults(existingSessionId);\n // } else {\n // createQuizSession();\n // }\n createQuizSession();\n }, []);\n\n const createQuizSession = async () => {\n const response = await fetch(\"/api/student-quiz/createQuizSession\", {\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n body: JSON.stringify({ quiz_code: \"student_quiz\" }),\n });\n const data = await response.json();\n setStudentSessionId(data.id);\n saveStudentSessionId(data.id);\n\n if (!response.ok) {\n throw new Error(\"Failed to create quiz session\");\n }\n };\n\n const storeQuizResults = async (quizResults: any) => {\n const response = await fetch(\"/api/student-quiz/storeResults\", {\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n body: JSON.stringify(quizResults),\n });\n\n if (!response.ok) {\n throw new Error(\"Failed to store quiz results\");\n }\n return response.json();\n };\n\n const handleOptionClick = (optionIndex: number) => {\n const updatedAnswers = [...answers];\n // @ts-ignore\n updatedAnswers[currentQuestionIndex] = optionIndex;\n setAnswers(updatedAnswers);\n };\n\n // @ts-ignore\n const isOptionSelected = (optionIndex) => {\n return answers[currentQuestionIndex] === optionIndex;\n };\n\n const handleNext = async () => {\n if (currentQuestionIndex < questions.length - 1) {\n // Avance à la question suivante ou affiche l'animation\n const progress = ((currentQuestionIndex + 1) / questions.length) * 100;\n\n if (\n (progress > 20 && progress < 26) ||\n (progress > 48 && progress < 52) ||\n (progress > 72 && progress < 76)\n ) {\n setShowAnimation(true);\n setTimeout(() => {\n setShowAnimation(false);\n setCurrentQuestionIndex(currentQuestionIndex + 1);\n }, 2000);\n } else {\n setCurrentQuestionIndex(currentQuestionIndex + 1);\n }\n } else {\n // Générer les résultats\n const generatedResults = generateQuizResults(answers);\n const now = new Date();\n const timestamp = now.toISOString();\n\n // Appel API pour enregistrer les résultats\n try {\n const quizResults = {\n id: studentSessionId,\n quiz_code: \"student_quiz\",\n user_signature: generatedResults.userSignature,\n job_matches: generatedResults.jobMatches,\n category_averages: generatedResults.categoryAverages,\n trait_averages: generatedResults.traitAverages,\n dateSignature: timestamp,\n };\n\n saveStudentResults(quizResults);\n await storeQuizResults(quizResults);\n\n // Redirige vers la page des résultats\n router.push(\"/student-resultat\");\n } catch (error) {\n console.error(\"Error during quiz result storage:\", error);\n }\n }\n };\n\n const handlePrev = () => {\n if (currentQuestionIndex > 0) {\n setCurrentQuestionIndex(currentQuestionIndex - 1);\n }\n };\n\n return (\n
\n \n
\n
\n
\n
\n {showAnimation ? (\n
\n \n

\n {currentQuestionIndex + 1 <= Math.ceil(questions.length * 0.25)\n ? \"Déjà 25% du quiz, ton profil commence à se dessiner !\"\n : currentQuestionIndex + 1 <=\n Math.ceil(questions.length * 0.5)\n ? \"50% complété, t'es sur la bonne voie !\"\n : \"75% du chemin parcouru, on y est presque !\"}\n

\n
\n ) : (\n <>\n {currentQuestionIndex === -1 ? (\n
\n

\n Bienvenue dans le quiz étudiant\n

\n
\n
\n \n

\n ON SCAN TON PROFIL\n

\n

\n Nous analysons ton profil à partir de questions simples\n . En quelques questions, découvre les domaines\n informatiues dans lesquels tu pourrais te plaire.\n

\n
\n
\n \n

\n ON T'ORIENTE\n

\n

\n Découvre des pistes concrètes pour t'orienter dans tes\n études. Obtiens un rapport de ton profil, les familles\n de métiers qui correspondent à tes traits de\n personnalités et centres d'intérêts.\n

\n
\n
\n \n

\n PASSE À L'ACTION !\n

\n

\n Découvre les métiers qui te correspondent afin de\n t'orienter dans tes études et ta future carrière. Tu\n pourras également partager ton profil avec tes proches\n et tes conseillers.\n

\n
\n
\n setCurrentQuestionIndex(0)}\n className=\"px-8 py-3 text-white bg-[#111213] rounded-lg hover:text-[#EBA41B]\"\n >\n Démarrer le quiz\n \n
\n ) : (\n <>\n
\n

\n Question {currentQuestionIndex + 1}/{questions.length}\n

\n
\n
\n
\n
\n\n
\n

\n {questions[currentQuestionIndex].text}\n

\n
\n\n
\n {questions[currentQuestionIndex].options.map(\n (option, index) => (\n \n handleOptionClick(index)}\n >\n {option.text}\n \n
\n )\n )}\n
\n\n
\n \n Précédent\n \n \n {currentQuestionIndex === questions.length - 1\n ? \"Terminer\"\n : \"Suivant\"}\n \n \n
\n \n )}\n \n )}\n \n \n
\n );\n};\n\nexport default StudentQuiz;\n","import React from \"react\";\nimport Link from \"next/link\";\nimport { Logo, Logo_cyde } from \"@/public\";\nimport Image from \"next/image\";\nimport { CTA_btn } from \"@/components/common\";\n\ntype Props = {};\n\nconst footer_3 = (props: Props) => {\n return (\n \n
\n
\n \n \"Company\n \n Iovia\n \n \n
\n\n
\n
\n

\n Parcourir le site\n

\n \n Accueil\n \n \n Faire le test\n \n \n Télécharger IOVIA\n \n
\n
\n
\n
\n

\n Autre\n

\n \n Contact\n \n \n FAQ\n \n
\n
\n\n
\n

\n Visite Cyde\n

\n {/*
\n \n
*/}\n
\n \n \n \n \n Cyde\n \n
\n
\n
\n\n \n

\n © Copyright 2024 CYDE. Tous droits réservés.\n

\n
    \n
  • \n \n Mention légal\n \n
  • \n
\n \n \n );\n};\n\nexport default footer_3;\n","import Footer_3 from \"./common/footer/footer_3\";\n\nimport Nav_1 from \"./common/nav/nav_1\";\n\nimport CTA_btn from \"./common/otherComponents/google-play-btn\";\nimport Contact_form from \"./common/otherComponents/contact-form\";\nimport FaqPage from \"./common/otherComponents/faq-page\";\nimport FormResult from \"./common/otherComponents/form-result\";\nimport QuizSection from \"./common/otherComponents/quiz-section\";\nimport JobResultsSection from \"./common/otherComponents/job-result-section\";\nimport HeroResult from \"./common/otherComponents/hero-result\";\nimport Modal_emailSent from \"./common/otherComponents/modal-email-sent\";\nimport StudentResult from \"./common/otherComponents/student-result\";\nimport ProjectionRadarChart from \"./common/otherComponents/projection-radar-chart\";\nimport ProjectionSlider from \"./common/otherComponents/projection-slider\";\nimport ProjectionRapport from \"./common/otherComponents/projection-rapport\";\nimport Breadcrumbs from \"./common/otherComponents/breadcrumbs\";\nimport LocalStorageVersionCheck from \"./common/otherComponents/LocalStorageVersionCheck\";\n\nexport {\n Footer_3,\n Nav_1,\n CTA_btn,\n Contact_form,\n FaqPage,\n FormResult,\n QuizSection,\n JobResultsSection,\n HeroResult,\n Modal_emailSent,\n StudentResult,\n ProjectionRadarChart,\n ProjectionSlider,\n ProjectionRapport,\n Breadcrumbs,\n LocalStorageVersionCheck,\n};\n"],"names":["Promise","resolve","then","__webpack_require__","bind","matrice1","require","matrice2","jobs","calculateUserPoints","questions","userResponses","familyPoints","forEach","question","index","responseIndex","selectedOption","options","concat","Object","entries","scores","familyId","score","param","values","getTotalPoints","totalPoints","Array","fill","option","parseInt","Math","min","quiz","page","router","useRouter","currentQuestionIndex","setCurrentQuestionIndex","useState","answers","setAnswers","showAnimation","setShowAnimation","studentSessionId","setStudentSessionId","useEffect","createQuizSession","response","fetch","method","headers","body","JSON","stringify","quiz_code","data","json","id","saveStudentSessionId","ok","storeQuizResults","quizResults","handleOptionClick","updatedAnswers","optionIndex","isOptionSelected","handleNext","length","progress","setTimeout","generatedResults","generateQuizResults","categoryData","userSignature","roundingThreshold","skills","userPoints","normalizedScores","maxScore","max","map","s","minScore","e","skill","signatureIndex","label","ratios","reduce","ratio","familyIndex","decimalPart","ceil","floor","join","jobMatches","job","metierSignature","signatures","find","sig","content","metierPower","calculatePower","signature","factor","sum","str","split","char","pow","matchPercentage","calcNote","cubeMino","cubeMajo","i","difference","charAt","title","category","sort","a","b","categoryAverages","filter","total","count","push","value","validValues","v","Infinity","average","parseFloat","normalizeValue","adjustedValue","log1p","scaledValue","toFixed","traitAverages","calculateTraitAverages","points","toString","timestamp","now","Date","toISOString","user_signature","job_matches","category_averages","trait_averages","dateSignature","saveStudentResults","error","console","jsx_runtime","jsxs","main","jsx","Nav_1","div","className","Image","src","logo","alt","p","Fragment","h1","FaBrain","size","FaLightbulb","PiPathBold","button","onClick","h2","style","width","text","disabled","FaArrowLeft","undefined","FaArrowRight"],"sourceRoot":""}