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AAmBJ,GAC3D,gFGPA1H,EAAA,QAAe,CAAC,mICAhBA,EAAA,QAAe,CAAC,mICAhBA,EAAA,QAAe,CAAC,8fAAqG,oECArHA,EAAA,QAAe,CAAC","sources":["webpack://_N_E/?d01f","webpack://_N_E/./src/components/Feedback/index.tsx","webpack://_N_E/./src/api/apiBase.ts","webpack://_N_E/./src/api/authApi.ts","webpack://_N_E/./src/api/hooks/auth.ts","webpack://_N_E/./src/helper/get-contrast.ts","webpack://_N_E/./src/helper/get-short-name.ts","webpack://_N_E/./src/helper/string-to-color.ts","webpack://_N_E/./src/components/Loader/index.tsx","webpack://_N_E/./src/components/Navbar/index.tsx","webpack://_N_E/./src/contexts/providers/donor-box.tsx","webpack://_N_E/./src/contexts/providers/react-query.tsx","webpack://_N_E/./src/app/globals.css","webpack://_N_E/./src/app/markdown.css","webpack://_N_E/./src/assets/images/es.svg","webpack://_N_E/./src/assets/images/fr.svg","webpack://_N_E/./src/assets/images/logo/logo.png","webpack://_N_E/./src/assets/images/us.svg","webpack://_N_E/"],"sourcesContent":["import(/* webpackMode: \"eager\" */ \"/codebuild/output/src3946203323/src/TicTacLap/frontend/main/node_modules/next/dist/client/image-component.js\");\nimport(/* webpackMode: \"eager\" */ \"/codebuild/output/src3946203323/src/TicTacLap/frontend/main/node_modules/next/dist/client/link.js\");\nimport(/* webpackMode: \"eager\" */ \"/codebuild/output/src3946203323/src/TicTacLap/frontend/main/node_modules/next/dist/client/script.js\");\nimport(/* webpackMode: \"eager\" */ \"/codebuild/output/src3946203323/src/TicTacLap/frontend/main/src/app/globals.css\");\nimport(/* webpackMode: \"eager\" */ \"/codebuild/output/src3946203323/src/TicTacLap/frontend/main/src/app/markdown.css\");\nimport(/* webpackMode: \"eager\" */ \"/codebuild/output/src3946203323/src/TicTacLap/frontend/main/node_modules/next/font/google/target.css?{\\\"path\\\":\\\"src/app/layout.tsx\\\",\\\"import\\\":\\\"Inter\\\",\\\"arguments\\\":[{\\\"subsets\\\":[\\\"latin\\\"]}],\\\"variableName\\\":\\\"inter\\\"}\");\nimport(/* webpackMode: \"eager\" */ \"/codebuild/output/src3946203323/src/TicTacLap/frontend/main/src/assets/images/es.svg\");\nimport(/* webpackMode: \"eager\" */ \"/codebuild/output/src3946203323/src/TicTacLap/frontend/main/src/assets/images/fr.svg\");\nimport(/* webpackMode: \"eager\" */ \"/codebuild/output/src3946203323/src/TicTacLap/frontend/main/src/assets/images/logo/logo.png\");\nimport(/* webpackMode: \"eager\" */ \"/codebuild/output/src3946203323/src/TicTacLap/frontend/main/src/assets/images/us.svg\");\nimport(/* webpackMode: \"eager\" */ \"/codebuild/output/src3946203323/src/TicTacLap/frontend/main/src/components/Feedback/index.tsx\");\nimport(/* webpackMode: \"eager\" */ \"/codebuild/output/src3946203323/src/TicTacLap/frontend/main/src/components/Navbar/index.tsx\");\nimport(/* webpackMode: \"eager\" */ \"/codebuild/output/src3946203323/src/TicTacLap/frontend/main/src/contexts/providers/donor-box.tsx\");\nimport(/* webpackMode: \"eager\" */ \"/codebuild/output/src3946203323/src/TicTacLap/frontend/main/src/contexts/providers/react-query.tsx\")","'use client';\n\nimport { usePathname } from 'next/navigation';\n\nconst Index = () => {\n const pathname = usePathname();\n\n if (pathname === '/feedback') return null;\n\n return (\n \n

Feedback

\n \n );\n};\n\nexport default Index;\n","import axios, { AxiosResponse } from 'axios';\n\nconst axiosInstance = axios.create({\n withCredentials: true,\n});\n\nconst rootURL = process.env.NEXT_PUBLIC_BACKEND_API_URL;\n\nexport class ApiBase {\n protected host = rootURL;\n protected axiosInstance = axiosInstance;\n validateResponse(response: AxiosResponse) {\n if (response.status !== 200 && response.status !== 201)\n return Promise.reject(response.data);\n }\n}\n","import { ApiBase } from \"./apiBase\";\n\nexport enum Role {\n TEACHER = 'teacher',\n STUDENT = 'student',\n}\n\nexport interface BaseUser {\n publicId: string;\n name: string;\n role: Role;\n}\n\nexport class AuthApi extends ApiBase {\n private baseUrl = this.host + '/auth';\n\n async getLoggedInUser() {\n const response = await this.axiosInstance.get(this.baseUrl + '/me');\n this.validateResponse(response);\n const { data } = response;\n return data as BaseUser;\n }\n}","import { useQuery } from \"@tanstack/react-query\";\nimport { AuthApi } from \"../authApi\";\n\nexport const useGetCurrentUser = () => {\n return useQuery({\n queryKey: ['current-user'],\n queryFn: () => new AuthApi().getLoggedInUser(),\n retry: false,\n enabled: false,\n });\n};","export const getContrast = function (hexcolor: string) {\n\n // If a leading # is provided, remove it\n if (hexcolor.slice(0, 1) === '#') {\n hexcolor = hexcolor.slice(1);\n }\n\n // Convert to RGB value\n var r = parseInt(hexcolor.substring(0, 2), 16);\n var g = parseInt(hexcolor.substring(2, 2), 16);\n var b = parseInt(hexcolor.substring(4, 2), 16);\n\n // Get YIQ ratio\n var yiq = ((r * 299) + (g * 587) + (b * 114)) / 1000;\n\n // Check contrast\n return (yiq >= 128) ? 'black' : 'white';\n\n};","export function extractName(name: string) {\n if (name.length > 0) {\n const splitted = name.replace(/\\s\\s+/g, ' ').trim().split(' ');\n return `${splitted[0][0]}${\n splitted.length > 1\n ? splitted[splitted.length - 1][0]\n : splitted[0].length > 1\n ? splitted[0][1]\n : ''\n }`;\n }\n return '';\n}\n","export function stringToColor(string: string) {\n let hash = 0;\n let i;\n if (string.length === 0) {\n return 'transparent';\n }\n\n for (i = 0; i < string.length; i += 1) {\n hash = string.charCodeAt(i) + ((hash << 5) - hash);\n }\n\n let color = '#';\n\n for (i = 0; i < 3; i += 1) {\n const value = (hash >> (i * 8)) & 0xff;\n color += `00${value.toString(16)}`.slice(-2);\n }\n\n return color;\n}\n","interface Props {\n className?: string;\n}\n\nconst Index = (props: Props) => {\n const { className = '' } = props;\n return (\n \n \n \n \n );\n};\n\nexport default Index;\n","'use client';\n\nimport { BaseUser } from '@/api/authApi';\nimport { useGetCurrentUser } from '@/api/hooks/auth';\nimport { getContrast } from '@/helper/get-contrast';\nimport { extractName } from '@/helper/get-short-name';\nimport { stringToColor } from '@/helper/string-to-color';\nimport Image from 'next/image';\nimport Link from 'next/link';\nimport React from 'react';\nimport { FaUserGraduate } from 'react-icons/fa6';\nimport { GiTeacher } from 'react-icons/gi';\nimport { IoHeart } from 'react-icons/io5';\nimport { MdBusinessCenter, MdHelp, MdHome, MdLibraryBooks, MdPolicy } from 'react-icons/md';\nimport TicTacLapLogo from '../../assets/images/logo/logo.png';\nimport Loader from '../Loader';\n\nconst Index = () => {\n const [navbarOpen, setNavbarOpen] = React.useState(false);\n const [isLoggedIn, setIsLoggedIn] = React.useState(false);\n const { refetch, isLoading } = useGetCurrentUser();\n const [user, setUser] = React.useState(null);\n\n React.useEffect(() => {\n const validate = async () => {\n try {\n const res = await refetch();\n setUser(res.data || null);\n setIsLoggedIn(true);\n } catch (error) {\n setIsLoggedIn(false);\n setUser(null);\n }\n };\n const cookies = document.cookie.split(';');\n let role = '';\n for (let i = 0; i < cookies.length; i++) {\n if (cookies[i].includes('role')) {\n role = cookies[i].split('=')[1];\n }\n }\n\n if (role === 'student' || role === 'teacher') {\n validate();\n } else {\n setIsLoggedIn(false);\n }\n }, [refetch]);\n\n return (\n \n );\n};\n\nexport default Index;\n\ninterface UserButtonProps {\n isLoading: boolean;\n user: BaseUser | null;\n}\n\nconst UserButton = (props: UserButtonProps) => {\n const { isLoading, user } = props;\n const short = extractName(user?.name || '');\n const color = stringToColor(user?.name || '');\n const contrastColor = getContrast(color);\n\n if (isLoading) {\n return (\n
\n \n
\n );\n }\n\n return (\n \n \n {short}\n \n \n );\n};\n","'use client';\nimport Script from 'next/script';\nimport { PropsWithChildren } from 'react';\n\nconst DonorBoxPvorider: React.FC = ({ children }) => {\n return (\n <>\n \n {children}\n \n );\n};\n\nexport default DonorBoxPvorider;\n","'use client';\nimport { QueryClient, QueryClientProvider } from '@tanstack/react-query';\nimport { PropsWithChildren, useState } from 'react';\n\nconst ReactQueryPvorider: React.FC = ({ children }) => {\n const [queryClientStore] = useState(() => new QueryClient());\n return {children};\n};\n\nexport default ReactQueryPvorider;\n","// extracted by mini-css-extract-plugin","// extracted by mini-css-extract-plugin","export default {\"src\":\"/_next/static/media/es.2b5e22c7.svg\",\"height\":480,\"width\":640,\"blurWidth\":0,\"blurHeight\":0};","export default {\"src\":\"/_next/static/media/fr.f5380d92.svg\",\"height\":480,\"width\":640,\"blurWidth\":0,\"blurHeight\":0};","export default {\"src\":\"/_next/static/media/logo.28d86b06.png\",\"height\":500,\"width\":500,\"blurDataURL\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAA+UlEQVR42mP4+XY3MwMQPP3/n/nX2ztaDFDw5M4tZgYY+PHxi+TPVxWXfz+L/P/v/sJD////5wQrun+XGaLg3dIt/8/l/f+xue/3ynX3/09fcffS/+93RSCSv9b2/T3T/f8zg8XPl2Fx/88v3PTDMmPf/3nLz8wFK/h/fc+ab5E+/y+Ulf158/jBv1uTOv6vbZ7/K7R83/8tO6/mMvyobX16EaRu5fL/9zes+78dyD4T4Pi/pHbn//55Z9YzvNqyuelUQcHfE1HRvy/39f08ER/39+KEyXe377+94Mr1Z0oQa/79V/725o3+x4cPtb6+fq37//9/XpgPAVR/k+lV5G0VAAAAAElFTkSuQmCC\",\"blurWidth\":8,\"blurHeight\":8};","export default {\"src\":\"/_next/static/media/us.ed9e9dcf.svg\",\"height\":480,\"width\":640,\"blurWidth\":0,\"blurHeight\":0};"],"names":["Promise","resolve","then","__webpack_require__","t","bind","__webpack_exports__","usePathname","react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__","jsx","a","aria-label","href","className","p","Role","axiosInstance","axios","create","withCredentials","ApiBase","validateResponse","response","status","reject","data","host","process","AuthApi","getLoggedInUser","get","baseUrl","useGetCurrentUser","useQuery","queryKey","queryFn","retry","enabled","Loader","props","jsx_runtime","jsxs","svg","xmlns","fill","viewBox","circle","cx","cy","r","stroke","strokeWidth","path","d","Navbar","navbarOpen","setNavbarOpen","React","isLoggedIn","setIsLoggedIn","refetch","isLoading","user","setUser","validate","res","error","cookies","document","cookie","split","role","i","length","includes","nav","div","button","type","aria-controls","aria-expanded","onClick","span","aria-hidden","strokeLinecap","strokeLinejoin","Image","src","TicTacLapLogo","alt","width","height","Link","MdHome","style","fontSize","MdBusinessCenter","MdHelp","UserButton","Fragment","GiTeacher","FaUserGraduate","IoHeart","id","referrerPolicy","hexcolor","short","extractName","name","splitted","replace","trim","concat","color","stringToColor","string","hash","charCodeAt","value","toString","slice","contrastColor","yiq","parseInt","substring","g","b","background","children","param","Script","defer","queryClientStore","useState","QueryClient","QueryClientProvider","client"],"sourceRoot":""}