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AAO,CAAC,EAAE,EAGnD,AA1DA,WACE,IAAI,EAAY,EACZ,EAAkB,EAWtB,SAAS,IAEH,GAZc,GAYkB,CAAA,EAAY,EAAhD,EACI,GAZc,KAYkB,CAAA,EAAY,CAAA,EAGhD,GAAmB,AAAY,IAAZ,EACnB,EAAM,OAAO,CAAC,UAAU,CAAG,EAG3B,EAAc,GAGd,EAAkB,sBAAsB,EAC1C,CApBK,EAAM,OAAO,CAAC,UAAU,GAC3B,EAAM,OAAO,CAAC,UAAU,CAAG,IAC3B,EAAM,OAAO,CAAC,cAAc,CAAG,IAC/B,EAAM,OAAO,CAAC,WAAW,CAAG,KAoB9B,EAAkB,sBAAsB,GAGxC,EAAM,gBAAgB,CAAC,aAAc,KAC/B,IACF,qBAAqB,GACrB,EAAkB,KAEtB,GAGA,EAAM,gBAAgB,CAAC,aAAc,KAC9B,GAAmB,AAA8B,MAA9B,EAAM,OAAO,CAAC,WAAW,GAC/C,EAAkB,WAAW,EAAM,OAAO,CAAC,UAAU,EAAI,GACzD,EAAkB,sBAAsB,GAE5C,EACF,GAYF,GAtOE,CAAE,MAAO,EAAO,CACd,QAAQ,KAAK,CAAC,0BAA2B,EAC3C,CACF","sources":["","main.js"],"sourcesContent":["import \"./auth.856e296b.js\";\n\n\n var $parcel$global = globalThis;\n \nvar $parcel$modules = {};\nvar $parcel$inits = {};\n\nvar parcelRequire = $parcel$global[\"parcelRequireeac0\"];\n\nif (parcelRequire == null) {\n parcelRequire = function(id) {\n if (id in $parcel$modules) {\n return $parcel$modules[id].exports;\n }\n if (id in $parcel$inits) {\n var init = $parcel$inits[id];\n delete $parcel$inits[id];\n var module = {id: id, exports: {}};\n $parcel$modules[id] = module;\n init.call(module.exports, module, module.exports);\n return module.exports;\n }\n var err = new Error(\"Cannot find module '\" + id + \"'\");\n err.code = 'MODULE_NOT_FOUND';\n throw err;\n };\n\n parcelRequire.register = function register(id, init) {\n $parcel$inits[id] = init;\n };\n\n $parcel$global[\"parcelRequireeac0\"] = parcelRequire;\n}\n\nvar parcelRegister = parcelRequire.register;\n\nvar $jUUxy = parcelRequire(\"jUUxy\");\n// Initialize auth-aware UI elements when DOM is loaded\ndocument.addEventListener('DOMContentLoaded', async ()=>{\n try {\n // Check if user is authenticated\n const authStatus = await (0, $jUUxy.Authentication).checkStatus();\n const isAuthenticated = authStatus.isAuthenticated;\n console.log('Auth status:', isAuthenticated);\n // Update UI based on authentication status\n $efd3ba4ec2608b1d$var$updateAuthUI(isAuthenticated);\n // Set up logout functionality\n $efd3ba4ec2608b1d$var$setupLogoutButton();\n // Set up Get Started button navigation based on auth state\n $efd3ba4ec2608b1d$var$setupGetStartedButton(isAuthenticated);\n // Initialize other main page features\n $efd3ba4ec2608b1d$var$initGameSlider();\n } catch (error) {\n console.error('Error initializing app:', error);\n }\n});\n// Update UI elements based on authentication state\nfunction $efd3ba4ec2608b1d$var$updateAuthUI(isAuthenticated) {\n const authLinks = document.querySelectorAll('.auth-dependent');\n const nonAuthLinks = document.querySelectorAll('.non-auth-dependent');\n const authActionButton = document.getElementById('loginBtn');\n if (authLinks) authLinks.forEach((link)=>{\n if (isAuthenticated) link.classList.remove('hidden');\n else link.classList.add('hidden');\n });\n if (nonAuthLinks) nonAuthLinks.forEach((link)=>{\n if (isAuthenticated) link.classList.add('hidden');\n else link.classList.remove('hidden');\n });\n // Update the auth action button\n if (authActionButton) {\n if (isAuthenticated) {\n console.log(\"isAuthenticated\");\n // Change to logout button\n authActionButton.textContent = 'Logout';\n authActionButton.href = \"#\";\n authActionButton.onclick = async (e)=>{\n e.preventDefault();\n try {\n const result = await (0, $jUUxy.Authentication).signOut();\n if (result.success) window.location.reload();\n else {\n console.error('Logout failed:', result.message);\n alert('Failed to log out. Please try again.');\n }\n } catch (error) {\n console.error('Error during logout:', error);\n }\n };\n } else {\n // Change to signup button\n authActionButton.textContent = 'Login';\n authActionButton.href = 'auth.html';\n // Remove any existing click handler\n authActionButton.onclick = null;\n }\n }\n // Update user profile info if available\n if (isAuthenticated) (0, $jUUxy.Authentication).getCurrentUser().then((result)=>{\n if (result.success && result.user) {\n const userProfileLinks = document.querySelectorAll('.user-profile-link');\n if (userProfileLinks) userProfileLinks.forEach((link)=>{\n link.textContent = result.user.name || result.user.email || 'My Profile';\n });\n }\n }).catch((error)=>{\n console.error('Error getting user info:', error);\n });\n}\n// Set up logout button functionality\nfunction $efd3ba4ec2608b1d$var$setupLogoutButton() {\n const logoutButton = document.getElementById('logout-button');\n if (!logoutButton) return;\n logoutButton.addEventListener('click', async (e)=>{\n e.preventDefault();\n try {\n const result = await (0, $jUUxy.Authentication).signOut();\n if (result.success) {\n // Reload the page to reset UI state\n window.location.reload();\n loadin;\n } else {\n console.error('Error signing out:', result.message);\n alert('Failed to sign out. Please try again.');\n }\n } catch (error) {\n console.error('Exception during sign out:', error);\n alert('An error occurred during sign out. Please try again.');\n }\n });\n}\n// Set up Get Started button navigation\nfunction $efd3ba4ec2608b1d$var$setupGetStartedButton(isAuthenticated) {\n const getStartedButton = document.getElementById('get-started-button');\n if (!getStartedButton) return;\n getStartedButton.addEventListener('click', (e)=>{\n e.preventDefault();\n if (isAuthenticated) // If authenticated, navigate to games page\n window.location.href = 'games.html';\n else // If not authenticated, navigate to login page\n window.location.href = 'auth.html';\n });\n}\n// Game slider functionality\nfunction $efd3ba4ec2608b1d$var$initGameSlider() {\n const track = document.getElementById(\"games-track\");\n if (!track) return;\n let autoAnimationId = null;\n const handleOnDown = (e)=>{\n track.dataset.mouseDownAt = e.clientX;\n // Stop auto animation when user interacts\n if (autoAnimationId) {\n cancelAnimationFrame(autoAnimationId);\n autoAnimationId = null;\n }\n };\n const handleOnUp = ()=>{\n track.dataset.mouseDownAt = \"0\";\n track.dataset.prevPercentage = track.dataset.percentage;\n };\n const handleOnMove = (e)=>{\n if (track.dataset.mouseDownAt === \"0\") return;\n const mouseDelta = parseFloat(track.dataset.mouseDownAt) - e.clientX, maxDelta = window.innerWidth / 2;\n const percentage = mouseDelta / maxDelta * -100, nextPercentageUnconstrained = parseFloat(track.dataset.prevPercentage || 0) + percentage, nextPercentage = Math.max(Math.min(nextPercentageUnconstrained, 0), -100);\n track.dataset.percentage = nextPercentage;\n animateSlider(nextPercentage);\n };\n function animateSlider(percentage) {\n track.animate({\n transform: `translate(${percentage}%, -50%)`\n }, {\n duration: 1200,\n fill: \"forwards\"\n });\n for (const image of track.getElementsByTagName(\"img\"))image.animate({\n objectPosition: `${100 + percentage}% center`\n }, {\n duration: 1200,\n fill: \"forwards\"\n });\n }\n function startSliderAnimation() {\n let direction = 1;\n let currentPosition = 0;\n const maxPosition = 0;\n const minPosition = -85; // Don't go to full -100 to keep some cards visible\n // Initial setup\n if (!track.dataset.percentage) {\n track.dataset.percentage = \"0\";\n track.dataset.prevPercentage = \"0\";\n track.dataset.mouseDownAt = \"0\";\n }\n function autoAnimate() {\n // Change direction when reaching limits\n if (currentPosition >= maxPosition) direction = -1;\n if (currentPosition <= minPosition) direction = 1;\n // Move the slider\n currentPosition += direction * 0.05;\n track.dataset.percentage = currentPosition;\n // Apply animation\n animateSlider(currentPosition);\n // Continue animation\n autoAnimationId = requestAnimationFrame(autoAnimate);\n }\n // Start the animation loop\n autoAnimationId = requestAnimationFrame(autoAnimate);\n // Add event listener to pause animation when hovering\n track.addEventListener('mouseenter', ()=>{\n if (autoAnimationId) {\n cancelAnimationFrame(autoAnimationId);\n autoAnimationId = null;\n }\n });\n // Resume animation when mouse leaves if not being dragged\n track.addEventListener('mouseleave', ()=>{\n if (!autoAnimationId && track.dataset.mouseDownAt === \"0\") {\n currentPosition = parseFloat(track.dataset.percentage || 0);\n autoAnimationId = requestAnimationFrame(autoAnimate);\n }\n });\n }\n /* Event listeners for mouse and touch events */ window.onmousedown = (e)=>handleOnDown(e);\n window.ontouchstart = (e)=>handleOnDown(e.touches[0]);\n window.onmouseup = (e)=>handleOnUp(e);\n window.ontouchend = (e)=>handleOnUp(e.touches[0]);\n window.onmousemove = (e)=>handleOnMove(e);\n window.ontouchmove = (e)=>handleOnMove(e.touches[0]);\n // Start the slider animation\n startSliderAnimation();\n}\n\n\n//# sourceMappingURL=V0.742af75e.js.map\n","import { Authentication } from './auth.js';\r\n// Initialize auth-aware UI elements when DOM is loaded\r\ndocument.addEventListener('DOMContentLoaded', async () => {\r\n try {\r\n // Check if user is authenticated\r\n const authStatus = await Authentication.checkStatus();\r\n const isAuthenticated = authStatus.isAuthenticated;\r\n \r\n console.log('Auth status:', isAuthenticated);\r\n \r\n // Update UI based on authentication status\r\n updateAuthUI(isAuthenticated);\r\n \r\n // Set up logout functionality\r\n setupLogoutButton();\r\n \r\n // Set up Get Started button navigation based on auth state\r\n setupGetStartedButton(isAuthenticated);\r\n \r\n // Initialize other main page features\r\n initGameSlider();\r\n } catch (error) {\r\n console.error('Error initializing app:', error);\r\n }\r\n});\r\n\r\n// Update UI elements based on authentication state\r\n function updateAuthUI(isAuthenticated) {\r\n const authLinks = document.querySelectorAll('.auth-dependent');\r\n const nonAuthLinks = document.querySelectorAll('.non-auth-dependent');\r\n const authActionButton = document.getElementById('loginBtn');\r\n\r\n if (authLinks) {\r\n authLinks.forEach(link => {\r\n if (isAuthenticated) {\r\n link.classList.remove('hidden');\r\n } else {\r\n link.classList.add('hidden');\r\n }\r\n });\r\n }\r\n \r\n if (nonAuthLinks) {\r\n nonAuthLinks.forEach(link => {\r\n if (isAuthenticated) {\r\n link.classList.add('hidden');\r\n } else {\r\n link.classList.remove('hidden');\r\n }\r\n });\r\n }\r\n \r\n // Update the auth action button\r\n\r\n if (authActionButton) {\r\n\r\n if (isAuthenticated) {\r\n console.log(\"isAuthenticated\");\r\n // Change to logout button\r\n authActionButton.textContent = 'Logout';\r\n authActionButton.href = \"#\";\r\n authActionButton.onclick = async (e) => {\r\n e.preventDefault();\r\n try {\r\n const result = await Authentication.signOut();\r\n if (result.success) {\r\n window.location.reload();\r\n } else {\r\n console.error('Logout failed:', result.message);\r\n alert('Failed to log out. Please try again.');\r\n }\r\n } catch (error) {\r\n console.error('Error during logout:', error);\r\n }\r\n };\r\n } else {\r\n // Change to signup button\r\n authActionButton.textContent = 'Login';\r\n authActionButton.href = 'auth.html';\r\n // Remove any existing click handler\r\n authActionButton.onclick = null;\r\n }\r\n }\r\n \r\n // Update user profile info if available\r\n if (isAuthenticated) {\r\n Authentication.getCurrentUser().then(result => {\r\n if (result.success && result.user) {\r\n const userProfileLinks = document.querySelectorAll('.user-profile-link');\r\n if (userProfileLinks) {\r\n userProfileLinks.forEach(link => {\r\n link.textContent = result.user.name || result.user.email || 'My Profile';\r\n });\r\n }\r\n }\r\n }).catch(error => {\r\n console.error('Error getting user info:', error);\r\n });\r\n }\r\n}\r\n\r\n// Set up logout button functionality\r\nfunction setupLogoutButton() {\r\n const logoutButton = document.getElementById('logout-button');\r\n if (!logoutButton) return;\r\n \r\n logoutButton.addEventListener('click', async (e) => {\r\n e.preventDefault();\r\n \r\n try {\r\n const result = await Authentication.signOut();\r\n if (result.success) {\r\n // Reload the page to reset UI state\r\n window.location.reload();loadin\r\n } else {\r\n console.error('Error signing out:', result.message);\r\n alert('Failed to sign out. Please try again.');\r\n }\r\n } catch (error) {\r\n console.error('Exception during sign out:', error);\r\n alert('An error occurred during sign out. Please try again.');\r\n }\r\n });\r\n}\r\n\r\n// Set up Get Started button navigation\r\nfunction setupGetStartedButton(isAuthenticated) {\r\n const getStartedButton = document.getElementById('get-started-button');\r\n if (!getStartedButton) return;\r\n \r\n getStartedButton.addEventListener('click', (e) => {\r\n e.preventDefault();\r\n \r\n if (isAuthenticated) {\r\n // If authenticated, navigate to games page\r\n window.location.href = 'games.html';\r\n } else {\r\n // If not authenticated, navigate to login page\r\n window.location.href = 'auth.html';\r\n }\r\n });\r\n}\r\n\r\n// Game slider functionality\r\nfunction initGameSlider() {\r\n const track = document.getElementById(\"games-track\");\r\n if (!track) return;\r\n \r\n let autoAnimationId = null;\r\n\r\n const handleOnDown = e => {\r\n track.dataset.mouseDownAt = e.clientX;\r\n \r\n // Stop auto animation when user interacts\r\n if (autoAnimationId) {\r\n cancelAnimationFrame(autoAnimationId);\r\n autoAnimationId = null;\r\n }\r\n };\r\n\r\n const handleOnUp = () => {\r\n track.dataset.mouseDownAt = \"0\"; \r\n track.dataset.prevPercentage = track.dataset.percentage;\r\n }\r\n\r\n const handleOnMove = e => {\r\n if(track.dataset.mouseDownAt === \"0\") return;\r\n \r\n const mouseDelta = parseFloat(track.dataset.mouseDownAt) - e.clientX,\r\n maxDelta = window.innerWidth / 2;\r\n \r\n const percentage = (mouseDelta / maxDelta) * -100,\r\n nextPercentageUnconstrained = parseFloat(track.dataset.prevPercentage || 0) + percentage,\r\n nextPercentage = Math.max(Math.min(nextPercentageUnconstrained, 0), -100);\r\n \r\n track.dataset.percentage = nextPercentage;\r\n \r\n animateSlider(nextPercentage);\r\n }\r\n \r\n function animateSlider(percentage) {\r\n track.animate({\r\n transform: `translate(${percentage}%, -50%)`\r\n }, { duration: 1200, fill: \"forwards\" });\r\n \r\n for(const image of track.getElementsByTagName(\"img\")) {\r\n image.animate({\r\n objectPosition: `${100 + percentage}% center`\r\n }, { duration: 1200, fill: \"forwards\" });\r\n }\r\n }\r\n \r\n function startSliderAnimation() {\r\n let direction = 1;\r\n let currentPosition = 0;\r\n const maxPosition = 0;\r\n const minPosition = -85; // Don't go to full -100 to keep some cards visible\r\n \r\n // Initial setup\r\n if (!track.dataset.percentage) {\r\n track.dataset.percentage = \"0\";\r\n track.dataset.prevPercentage = \"0\";\r\n track.dataset.mouseDownAt = \"0\";\r\n }\r\n \r\n function autoAnimate() {\r\n // Change direction when reaching limits\r\n if (currentPosition >= maxPosition) direction = -1;\r\n if (currentPosition <= minPosition) direction = 1;\r\n \r\n // Move the slider\r\n currentPosition += direction * 0.05;\r\n track.dataset.percentage = currentPosition;\r\n \r\n // Apply animation\r\n animateSlider(currentPosition);\r\n \r\n // Continue animation\r\n autoAnimationId = requestAnimationFrame(autoAnimate);\r\n }\r\n \r\n // Start the animation loop\r\n autoAnimationId = requestAnimationFrame(autoAnimate);\r\n \r\n // Add event listener to pause animation when hovering\r\n track.addEventListener('mouseenter', () => {\r\n if (autoAnimationId) {\r\n cancelAnimationFrame(autoAnimationId);\r\n autoAnimationId = null;\r\n }\r\n });\r\n \r\n // Resume animation when mouse leaves if not being dragged\r\n track.addEventListener('mouseleave', () => {\r\n if (!autoAnimationId && track.dataset.mouseDownAt === \"0\") {\r\n currentPosition = parseFloat(track.dataset.percentage || 0);\r\n autoAnimationId = requestAnimationFrame(autoAnimate);\r\n }\r\n });\r\n }\r\n\r\n /* Event listeners for mouse and touch events */\r\n window.onmousedown = e => handleOnDown(e);\r\n window.ontouchstart = e => handleOnDown(e.touches[0]);\r\n window.onmouseup = e => handleOnUp(e);\r\n window.ontouchend = e => handleOnUp(e.touches[0]);\r\n window.onmousemove = e => handleOnMove(e);\r\n window.ontouchmove = e => handleOnMove(e.touches[0]);\r\n \r\n // Start the slider animation\r\n startSliderAnimation();\r\n} "],"names":["$parcel$global","globalThis","$parcel$modules","$parcel$inits","parcelRequire","id","exports","init","module","call","err","Error","code","register","$jUUxy","document","addEventListener","isAuthenticated","authStatus","Authentication","checkStatus","console","log","$efd3ba4ec2608b1d$var$updateAuthUI","authLinks","querySelectorAll","nonAuthLinks","authActionButton","getElementById","forEach","link","classList","remove","add","textContent","href","onclick","e","preventDefault","result","signOut","success","window","location","reload","error","message","alert","getCurrentUser","then","user","userProfileLinks","name","email","catch","$efd3ba4ec2608b1d$var$setupLogoutButton","logoutButton","loadin","$efd3ba4ec2608b1d$var$setupGetStartedButton","getStartedButton","$efd3ba4ec2608b1d$var$initGameSlider","track","autoAnimationId","handleOnDown","dataset","mouseDownAt","clientX","cancelAnimationFrame","handleOnUp","prevPercentage","percentage","handleOnMove","mouseDelta","parseFloat","maxDelta","innerWidth","nextPercentage","Math","max","min","animateSlider","image","animate","transform","duration","fill","getElementsByTagName","objectPosition","onmousedown","ontouchstart","touches","onmouseup","ontouchend","onmousemove","ontouchmove","startSliderAnimation","direction","currentPosition","autoAnimate","requestAnimationFrame"],"version":3,"file":"V0.742af75e.js.map"}