(function() { var FilterConfig; FilterConfig = (function() { function FilterConfig() {} FilterConfig.ROLE_DATA = { backend: { title: 'Backend Developer', description: 'Specialized in server-side development, APIs, databases, and system architecture', roles: ['backend', 'fullstack'] }, frontend: { title: 'Frontend Developer', description: 'Expert in user interfaces, web applications, and client-side development', roles: ['frontend', 'fullstack'] }, fullstack: { title: 'Full-Stack Developer', description: 'Experienced in both frontend and backend development across the full stack', roles: ['fullstack', 'backend', 'frontend'] }, lead: { title: 'Technical Lead', description: 'Experienced in leading development teams, architecture, and technical decisions', roles: ['tech_lead', 'lead', 'fullstack'] }, devops: { title: 'DevOps Engineer', description: 'Expert in infrastructure, deployment, containerization, and automation', roles: ['devops', 'backend', 'fullstack'] } }; FilterConfig.TECH_DATA = { all: { title: 'All Technologies', technologies: [] }, php: { title: 'PHP', technologies: ['php', 'laravel', 'symfony', 'fuelphp'] }, ruby: { title: 'Ruby', technologies: ['ruby', 'rails', 'sinatra', 'padrino'] }, python: { title: 'Python', technologies: ['python', 'flask', 'django'] }, nodejs: { title: 'Node.js', technologies: ['nodejs', 'express', 'nestjs', 'hapi', 'es5', 'es6', 'es2015'] }, typescript: { title: 'TypeScript', technologies: ['typescript', 'nestjs', 'nextjs'] }, javascript: { title: 'JavaScript', technologies: ['javascript', 'nodejs', 'react', 'vue', 'angular', 'nextjs', 'es5', 'es6', 'es2015'] }, react: { title: 'React', technologies: ['react', 'react-native', 'nextjs', 'redux'] }, vue: { title: 'Vue', technologies: ['vue', 'nuxt'] } }; return FilterConfig; })(); window.FilterConfig = FilterConfig; }).call(this); (function() { var SummaryUpdater; SummaryUpdater = (function() { function SummaryUpdater(summaryData) { this.summaryData = summaryData; this.summarySection = document.getElementById('professional-summary'); this.summaryText = document.getElementById('summary-text'); } SummaryUpdater.prototype.update = function(role) { var summary; if (!(this.summaryData && this.summaryText)) { return; } summary = this.summaryData[role]; if (!summary) { return; } this.summarySection.style.opacity = '0.5'; this.summarySection.style.transform = 'translateY(5px)'; return setTimeout((function(_this) { return function() { _this.summaryText.textContent = summary; _this.summarySection.style.opacity = '1'; return _this.summarySection.style.transform = 'translateY(0)'; }; })(this), 200); }; return SummaryUpdater; })(); window.SummaryUpdater = SummaryUpdater; }).call(this); (function() { var ExperienceFilter; ExperienceFilter = (function() { function ExperienceFilter(experiences) { this.experiences = experiences; this.roleDescriptionEl = document.getElementById('role-description'); } ExperienceFilter.prototype.filter = function(roleConfig, techConfig) { var hiddenCount, visibleCount; visibleCount = 0; hiddenCount = 0; this.experiences.forEach((function(_this) { return function(exp) { var currentRoleName, expRoles, expTechs, jobTitle, projects, ref, ref1, roleMatch, techMatch, visibleProjects; expRoles = (exp.dataset.roles || '').split(' ').filter(function(r) { return r.length > 0; }); expTechs = (exp.dataset.technologies || '').split(' ').filter(function(t) { return t.length > 0; }); jobTitle = ((ref = exp.querySelector('h3')) != null ? (ref1 = ref.textContent) != null ? ref1.toLowerCase() : void 0 : void 0) || ''; currentRoleName = roleConfig.title.toLowerCase(); if (jobTitle.includes('backend') && currentRoleName.includes('frontend')) { _this.hideElement(exp); hiddenCount++; return; } if (jobTitle.includes('frontend') && currentRoleName.includes('backend')) { _this.hideElement(exp); hiddenCount++; return; } projects = exp.querySelectorAll('.project'); if (projects.length > 0) { visibleProjects = _this.filterProjects(projects, roleConfig, techConfig); if (visibleProjects > 0) { _this.showElement(exp); _this.highlightRelevantTechs(exp, roleConfig, techConfig); _this.updateExperienceDescription(exp, roleConfig, techConfig); return visibleCount++; } else { _this.hideElement(exp); return hiddenCount++; } } else { roleMatch = roleConfig.roles.some(function(role) { return expRoles.includes(role); }); techMatch = techConfig.technologies.length === 0 ? true : techConfig.technologies.some(function(tech) { return expTechs.includes(tech); }); if (roleMatch && techMatch) { _this.showElement(exp); _this.highlightRelevantTechs(exp, roleConfig, techConfig); _this.updateExperienceDescription(exp, roleConfig, techConfig); return visibleCount++; } else { _this.hideElement(exp); return hiddenCount++; } } }; })(this)); console.log("Filtered: " + visibleCount + " visible, " + hiddenCount + " hidden"); return visibleCount; }; ExperienceFilter.prototype.filterProjects = function(projects, roleConfig, techConfig) { var visibleCount; visibleCount = 0; projects.forEach((function(_this) { return function(project) { var projectRoles, projectTechs, roleMatch, techMatch; projectRoles = (project.dataset.roles || '').split(' ').filter(function(r) { return r.length > 0; }); projectTechs = (project.dataset.technologies || '').split(' ').filter(function(t) { return t.length > 0; }); roleMatch = roleConfig.roles.some(function(role) { return projectRoles.includes(role); }); techMatch = techConfig.technologies.length === 0 ? true : techConfig.technologies.some(function(tech) { return projectTechs.includes(tech); }); if (roleMatch && techMatch) { _this.showElement(project); _this.updateProjectDescription(project, roleConfig, techConfig); return visibleCount++; } else { return _this.hideElement(project); } }; })(this)); return visibleCount; }; ExperienceFilter.prototype.updateExperienceDescription = function(exp, roleConfig, techConfig) { var defaultText, descElement, descriptions, newText; descElement = exp.querySelector('.description'); if (!descElement) { return; } descriptions = this.parseDescriptions(exp.dataset.descriptions); defaultText = descElement.dataset["default"] || descElement.textContent; newText = this.findBestDescription(descriptions, defaultText, roleConfig, techConfig); return this.applyDescriptionUpdate(descElement, newText, roleConfig, techConfig, exp); }; ExperienceFilter.prototype.updateProjectDescription = function(project, roleConfig, techConfig) { var defaultText, descElement, descriptions, newText, parentExperience; descElement = project.querySelector('.description'); if (!descElement) { return; } descriptions = this.parseDescriptions(project.dataset.descriptions); defaultText = descElement.dataset["default"] || descElement.textContent; newText = this.findBestDescription(descriptions, defaultText, roleConfig, techConfig); parentExperience = project.closest('.experience'); return this.applyDescriptionUpdate(descElement, newText, roleConfig, techConfig, parentExperience || project); }; ExperienceFilter.prototype.parseDescriptions = function(descriptionsData) { var descriptions, error; descriptions = {}; try { if (descriptionsData) { descriptions = JSON.parse(descriptionsData); } } catch (error1) { error = error1; console.error('Error parsing descriptions:', error); } return descriptions; }; ExperienceFilter.prototype.findBestDescription = function(descriptions, defaultText, roleConfig, techConfig) { var j, l, len, len1, newText, ref, ref1, role, tech; newText = defaultText; if (techConfig.technologies.length > 0) { ref = techConfig.technologies; for (undefined; j < len; j++) { tech = ref[j]; if (descriptions[tech]) { newText = descriptions[tech]; break; } } } if (newText === defaultText && roleConfig.roles.length > 0) { ref1 = roleConfig.roles; for (undefined; l < len1; l++) { role = ref1[l]; if (descriptions[role]) { newText = descriptions[role]; break; } } } return newText; }; ExperienceFilter.prototype.applyDescriptionUpdate = function(descElement, newText, roleConfig, techConfig, experienceElement) { var currentText, hasHighlights; currentText = descElement.textContent; hasHighlights = descElement.querySelector('.highlight-keyword'); if (currentText !== newText || !hasHighlights) { descElement.style.transition = 'opacity 0.2s ease-out'; descElement.style.opacity = '0.5'; return setTimeout((function(_this) { return function() { var highlightedText; highlightedText = _this.highlightKeywords(newText, roleConfig, techConfig, experienceElement); descElement.innerHTML = highlightedText; return descElement.style.opacity = '1'; }; })(this), 200); } }; ExperienceFilter.prototype.highlightKeywords = function(text, roleConfig, techConfig, experienceElement) { var escapedKeywords, expTechs, keywords, pattern, relevantTechs; keywords = []; expTechs = this.collectExperienceTechnologies(experienceElement); if (techConfig.technologies.length > 0) { relevantTechs = expTechs.filter(function(tech) { return techConfig.technologies.includes(tech); }); keywords = keywords.concat(relevantTechs); } else { keywords = keywords.concat(expTechs); } expTechs.forEach((function(_this) { return function(tech) { var techLower; techLower = tech.toLowerCase(); if (_this.frameworkNames[techLower]) { return keywords = keywords.concat(_this.frameworkNames[techLower]); } }; })(this)); keywords = keywords.filter(function(v, i, a) { return v && a.indexOf(v) === i; }); if (keywords.length > 0) { escapedKeywords = keywords.map(function(k) { return k.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); }); escapedKeywords.sort(function(a, b) { return b.length - a.length; }); pattern = new RegExp("\\b(" + (escapedKeywords.join('|')) + ")\\b", 'gi'); return text.replace(pattern, '$1'); } else { return text; } }; ExperienceFilter.prototype.collectExperienceTechnologies = function(experienceElement) { var expTechs, projects; expTechs = []; projects = experienceElement.querySelectorAll('.project'); if (projects.length > 0) { projects.forEach(function(project) { var projectTechs; if (project.style.display === 'none') { return; } projectTechs = (project.dataset.technologies || '').split(' ').filter(function(t) { return t.length > 0; }); return expTechs = expTechs.concat(projectTechs); }); } else { expTechs = (experienceElement.dataset.technologies || '').split(' ').filter(function(t) { return t.length > 0; }); } return expTechs.filter(function(v, i, a) { return v && a.indexOf(v) === i; }); }; ExperienceFilter.prototype.frameworkNames = { php: ['PHP'], laravel: ['Laravel'], symfony: ['Symfony'], fuelphp: ['FuelPHP'], ruby: ['Ruby'], rails: ['Rails', 'Ruby on Rails'], sinatra: ['Sinatra'], python: ['Python'], flask: ['Flask'], django: ['Django'], nodejs: ['Node.js'], express: ['Express'], hapi: ['HAPI', 'Hapi.js'], nestjs: ['NestJS'], typescript: ['TypeScript'], javascript: ['JavaScript'], react: ['React'], 'react-native': ['React Native'], vue: ['Vue', 'Vue.js'], nuxt: ['Nuxt', 'Nuxt.js'], nextjs: ['Next.js'], angular: ['Angular'], postgresql: ['PostgreSQL'], mysql: ['MySQL'], mongodb: ['MongoDB'], redis: ['Redis'], docker: ['Docker'], kubernetes: ['Kubernetes'], aws: ['AWS'], graphql: ['GraphQL'], prisma: ['Prisma'], wordpress: ['WordPress'], opencart: ['OpenCart'], electron: ['Electron'] }; ExperienceFilter.prototype.highlightRelevantTechs = function(exp, roleConfig, techConfig) { var badges, currentRole, roleTechMapping; roleTechMapping = { backend: ['php', 'laravel', 'symfony', 'fuelphp', 'ruby', 'rails', 'sinatra', 'python', 'django', 'flask', 'nodejs', 'express', 'nestjs', 'hapi', 'typescript', 'javascript', 'postgresql', 'mysql', 'mongodb', 'redis', 'graphql', 'prisma', 'docker', 'kubernetes', 'aws', 'nginx', 'apache', 'bash', 'git', 'gitlab', 'github'], frontend: ['javascript', 'typescript', 'react', 'react-native', 'vue', 'nuxt', 'angular', 'nextjs', 'redux', 'html', 'css', 'sass', 'scss', 'jquery', 'webpack', 'vite', 'electron', 'turbolinks', 'coffeescript'], fullstack: [], tech_lead: [], lead: [], devops: ['docker', 'kubernetes', 'aws', 'terraform', 'nginx', 'apache', 'bash', 'git', 'gitlab', 'github', 'jenkins', 'circleci', 'redis', 'postgresql', 'mysql', 'mongodb', 'linux', 'python', 'nodejs'] }; currentRole = this.getCurrentRoleKey(roleConfig); badges = exp.querySelectorAll('.tech-badge'); return badges.forEach((function(_this) { return function(badge) { var isRelevant, matchesRole, matchesTechFilter, ref, roleAppropriate, tech; tech = (ref = badge.dataset.tech) != null ? ref.toLowerCase() : void 0; roleAppropriate = roleTechMapping[currentRole] || []; matchesTechFilter = techConfig.technologies.length === 0 || techConfig.technologies.includes(tech); matchesRole = roleAppropriate.length === 0 || roleAppropriate.includes(tech); isRelevant = matchesTechFilter && matchesRole; if (isRelevant) { return badge.classList.add('highlight'); } else { return badge.classList.remove('highlight'); } }; })(this)); }; ExperienceFilter.prototype.getCurrentRoleKey = function(roleConfig) { var data, key, ref; ref = FilterConfig.ROLE_DATA; for (key in ref) { data = ref[key]; if (data.title === roleConfig.title) { return key; } } return 'fullstack'; }; ExperienceFilter.prototype.updateDescription = function(roleConfig) { if (this.roleDescriptionEl && roleConfig.description) { return this.roleDescriptionEl.textContent = roleConfig.description; } }; ExperienceFilter.prototype.showElement = function(element) { if (element.style.opacity === '1' && element.style.display !== 'none' && !element.classList.contains('hidden')) { return; } element.classList.remove('hidden'); element.style.display = ''; element.style.opacity = '0'; element.style.transform = 'translateY(8px) scale(0.98)'; return requestAnimationFrame(function() { return requestAnimationFrame(function() { element.style.transition = 'opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1), transform 0.35s cubic-bezier(0.4, 0, 0.2, 1)'; element.style.opacity = '1'; return element.style.transform = 'translateY(0) scale(1)'; }); }); }; ExperienceFilter.prototype.hideElement = function(element) { if (element.classList.contains('hidden')) { return; } element.classList.add('hidden'); element.style.transition = 'opacity 0.25s cubic-bezier(0.4, 0, 1, 1), transform 0.25s cubic-bezier(0.4, 0, 1, 1)'; element.style.opacity = '0'; element.style.transform = 'translateY(-8px) scale(0.98)'; return setTimeout(function() { return element.style.display = 'none'; }, 250); }; return ExperienceFilter; })(); window.ExperienceFilter = ExperienceFilter; }).call(this); (function() { var TechTagFilter; TechTagFilter = (function() { function TechTagFilter(techTags) { this.techTags = techTags; } TechTagFilter.prototype.filter = function(roleConfig, techConfig) { var container, experiences, hiddenTags, roleAppropriate, techCounts, visibleTags; techCounts = {}; experiences = document.querySelectorAll('.experience'); experiences.forEach((function(_this) { return function(exp) { var projects, techs; if (exp.style.display === 'none' || exp.classList.contains('hidden')) { return; } projects = exp.querySelectorAll('.project'); if (projects.length > 0) { return projects.forEach(function(project) { var techs; if (project.style.display === 'none' || project.classList.contains('hidden')) { return; } techs = (project.dataset.technologies || '').split(' ').filter(function(t) { return t.length > 0; }); return techs.forEach(function(tech) { return techCounts[tech] = (techCounts[tech] || 0) + 1; }); }); } else { techs = (exp.dataset.technologies || '').split(' ').filter(function(t) { return t.length > 0; }); return techs.forEach(function(tech) { return techCounts[tech] = (techCounts[tech] || 0) + 1; }); } }; })(this)); roleAppropriate = this.getRoleAppropriateTechs(roleConfig); visibleTags = []; hiddenTags = []; this.techTags.forEach((function(_this) { return function(tag) { var count, isHighlighted, tech; tech = tag.dataset.tech; count = techCounts[tech] || 0; if (count > 0 && (roleAppropriate.length === 0 || roleAppropriate.includes(tech))) { tag.dataset.count = count; tag.textContent = (tech.toUpperCase()) + " (" + count + ")"; isHighlighted = techConfig.technologies.length === 0 || techConfig.technologies.includes(tech); if (isHighlighted) { tag.classList.add('highlight'); } else { tag.classList.remove('highlight'); } return visibleTags.push({ tag: tag, count: count, tech: tech, highlighted: isHighlighted }); } else { hiddenTags.push(tag); return tag.classList.remove('highlight'); } }; })(this)); visibleTags.sort(function(a, b) { if (a.highlighted && !b.highlighted) { return -1; } else if (!a.highlighted && b.highlighted) { return 1; } else { return b.count - a.count; } }); container = document.getElementById('tech-tags-container'); visibleTags.forEach((function(_this) { return function(item, index) { if (index < 8) { item.tag.style.display = ''; item.tag.style.opacity = '1'; return container.appendChild(item.tag); } else { return item.tag.style.display = 'none'; } }; })(this)); return hiddenTags.forEach((function(_this) { return function(tag) { return tag.style.display = 'none'; }; })(this)); }; TechTagFilter.prototype.getRoleAppropriateTechs = function(roleConfig) { var currentRole, i, len, ref, role, roleTechMapping; roleTechMapping = { backend: ['php', 'laravel', 'symfony', 'fuelphp', 'ruby', 'rails', 'sinatra', 'python', 'django', 'flask', 'nodejs', 'express', 'nestjs', 'hapi', 'typescript', 'javascript', 'postgresql', 'mysql', 'mongodb', 'redis', 'graphql', 'prisma', 'docker', 'kubernetes', 'aws', 'nginx', 'apache', 'solidity', 'ipfs', 'terraform', 'jenkins', 'swagger'], frontend: ['javascript', 'typescript', 'react', 'react-native', 'vue', 'nuxt', 'angular', 'nextjs', 'redux', 'html', 'css', 'sass', 'jquery', 'webpack', 'electron'], fullstack: [], tech_lead: [], lead: [], devops: ['docker', 'kubernetes', 'aws', 'terraform', 'nginx', 'apache', 'bash', 'git', 'gitlab', 'github', 'jenkins', 'redis', 'postgresql', 'mysql', 'mongodb', 'linux', 'python', 'nodejs'] }; currentRole = null; ref = roleConfig.roles; for (undefined; i < len; i++) { role = ref[i]; if (roleTechMapping[role] != null) { currentRole = role; break; } } if (currentRole && roleTechMapping[currentRole]) { return roleTechMapping[currentRole]; } else { return []; } }; return TechTagFilter; })(); window.TechTagFilter = TechTagFilter; }).call(this); (function() { var HeaderUpdater; HeaderUpdater = (function() { function HeaderUpdater(displayName, expertThreshold, proficientThreshold) { this.displayName = displayName; this.expertThreshold = expertThreshold; this.proficientThreshold = proficientThreshold; this.resumeTitle = document.getElementById('resume-title'); this.resumeHeadline = document.getElementById('resume-headline'); this.yearsDisplay = document.getElementById('years-display'); } HeaderUpdater.prototype.update = function(roleConfig, techConfig) { var allExps, level, stats, title, visibleExps; allExps = document.querySelectorAll('.experience'); visibleExps = Array.from(allExps).filter(function(exp) { return !exp.classList.contains('hidden'); }); if (visibleExps.length > 0) { stats = this.calculateExperienceStats(visibleExps); level = this.resolveExperienceLevel(stats.professionalYears); title = techConfig.title === 'All Technologies' ? roleConfig.title : roleConfig.title; if (this.resumeTitle) { this.resumeTitle.textContent = this.displayName; } if (this.resumeHeadline) { this.resumeHeadline.textContent = level + " " + title; } if (this.yearsDisplay) { return this.yearsDisplay.textContent = this.formatExperienceYears(stats); } } else { title = techConfig.title === 'All Technologies' ? roleConfig.title : roleConfig.title; if (this.resumeTitle) { this.resumeTitle.textContent = this.displayName; } if (this.resumeHeadline) { this.resumeHeadline.textContent = "Capable " + title; } if (this.yearsDisplay) { return this.yearsDisplay.textContent = '0 Years of Professional Experience'; } } }; HeaderUpdater.prototype.calculateExperienceStats = function(experiences) { var currentYear, earliestStart, latestEnd, professionalYears, sinceYear, totalYears; currentYear = new Date().getFullYear(); earliestStart = null; latestEnd = null; professionalYears = 0; sinceYear = null; experiences.forEach((function(_this) { return function(exp) { var dateText, endToken, endYear, matches, ref, startYear; dateText = ((ref = exp.querySelector('h4')) != null ? ref.textContent : void 0) || ''; matches = dateText.match(/(\d{4}|Present)/g) || []; if (matches.length === 0) { return; } startYear = parseInt(matches[0]); endToken = matches[1] || 'Present'; endYear = endToken === 'Present' ? currentYear : parseInt(endToken); if (isNaN(startYear) || isNaN(endYear)) { return; } professionalYears += Math.max(endYear - startYear, 1); if (!earliestStart || startYear < earliestStart) { earliestStart = startYear; } if (!latestEnd || endYear > latestEnd) { latestEnd = endYear; } if (!sinceYear || startYear < sinceYear) { return sinceYear = startYear; } }; })(this)); totalYears = earliestStart && latestEnd ? Math.max(latestEnd - earliestStart, 0) : 0; return { professionalYears: professionalYears, totalYears: totalYears, sinceYear: sinceYear || '' }; }; HeaderUpdater.prototype.resolveExperienceLevel = function(professionalYears) { if (professionalYears >= this.expertThreshold) { return 'Expert'; } else if (professionalYears >= this.proficientThreshold) { return 'Proficient'; } else { return 'Capable'; } }; HeaderUpdater.prototype.formatExperienceYears = function(stats) { if (stats.professionalYears >= this.proficientThreshold) { return stats.professionalYears + "+ Years of Professional Experience"; } else if (stats.professionalYears > 0 && stats.totalYears > 0 && stats.sinceYear) { return stats.professionalYears + "+ Years Professional Experience (" + stats.totalYears + "+ total since " + stats.sinceYear + ")"; } else if (stats.totalYears > 0 && stats.sinceYear) { return stats.totalYears + "+ Years of Experience since " + stats.sinceYear; } else { return '0 Years of Professional Experience'; } }; return HeaderUpdater; })(); window.HeaderUpdater = HeaderUpdater; }).call(this); (function() { var DownloadLinksUpdater; DownloadLinksUpdater = (function() { function DownloadLinksUpdater() { this.downloadHtml = document.getElementById('download-html'); this.downloadPdf = document.getElementById('download-pdf'); } DownloadLinksUpdater.prototype.update = function(role, tech) { var focusSlug; focusSlug = tech !== 'all' ? tech : role; if (this.downloadHtml) { this.downloadHtml.href = "/resume/" + focusSlug + "/view"; this.downloadHtml.download = "resume-" + focusSlug + ".html"; } if (this.downloadPdf) { this.downloadPdf.href = "resume-" + focusSlug + ".pdf"; this.downloadPdf.download = "resume-" + focusSlug + ".pdf"; } return console.log("Updated download links for: " + focusSlug); }; return DownloadLinksUpdater; })(); window.DownloadLinksUpdater = DownloadLinksUpdater; }).call(this); (function() { var ResumeSwitcher; ResumeSwitcher = (function() { function ResumeSwitcher() { var ref, ref1, ref2, ref3, ref4, ref5; this.roleCards = document.querySelectorAll('.role-card'); this.techButtons = document.querySelectorAll('.tech-filter-btn'); this.experiences = document.querySelectorAll('.experience'); this.techTags = document.querySelectorAll('#tech-tags-container .tech-tag'); this.resumeHeader = document.querySelector('.resume-header'); this.currentRole = 'fullstack'; this.currentTech = 'all'; this.displayName = ((ref = this.resumeHeader) != null ? (ref1 = ref.dataset) != null ? ref1.displayName : void 0 : void 0) || 'Qchmqs'; this.expertThreshold = parseInt((ref2 = this.resumeHeader) != null ? (ref3 = ref2.dataset) != null ? ref3.expertThreshold : void 0 : void 0) || 10; this.proficientThreshold = parseInt((ref4 = this.resumeHeader) != null ? (ref5 = ref4.dataset) != null ? ref5.proficientThreshold : void 0 : void 0) || 5; this.summaryUpdater = new SummaryUpdater(window.coverLettersData); this.experienceFilter = new ExperienceFilter(this.experiences); this.techTagFilter = new TechTagFilter(this.techTags); this.headerUpdater = new HeaderUpdater(this.displayName, this.expertThreshold, this.proficientThreshold); this.downloadLinksUpdater = new DownloadLinksUpdater(); this.initEventListeners(); this.updateTechFilterVisibility(this.currentRole); this.applyFilters(this.currentRole, this.currentTech); } ResumeSwitcher.prototype.initEventListeners = function() { this.roleCards.forEach((function(_this) { return function(card) { return card.addEventListener('click', function() { var role; role = card.dataset.role; if (role !== _this.currentRole) { return _this.switchRole(role); } }); }; })(this)); return this.techButtons.forEach((function(_this) { return function(btn) { return btn.addEventListener('click', function() { var tech; if (btn.classList.contains('hidden')) { return; } tech = btn.dataset.tech; if (tech !== _this.currentTech) { return _this.switchTech(tech); } }); }; })(this)); }; ResumeSwitcher.prototype.switchRole = function(role) { console.log("Switching role to: " + role); this.currentRole = role; this.currentTech = 'all'; this.updateRoleCards(role); this.updateTechButtons('all'); this.updateTechFilterVisibility(role); return this.applyFilters(role, 'all'); }; ResumeSwitcher.prototype.switchTech = function(tech) { console.log("Switching tech to: " + tech); this.currentTech = tech; this.updateTechButtons(tech); return this.applyFilters(this.currentRole, tech); }; ResumeSwitcher.prototype.applyFilters = function(role, tech) { var roleConfig, techConfig; roleConfig = FilterConfig.ROLE_DATA[role]; techConfig = FilterConfig.TECH_DATA[tech]; this.experienceFilter.filter(roleConfig, techConfig); this.experienceFilter.updateDescription(roleConfig); this.headerUpdater.update(roleConfig, techConfig); this.summaryUpdater.update(role); this.techTagFilter.filter(roleConfig, techConfig); return this.downloadLinksUpdater.update(role, tech); }; ResumeSwitcher.prototype.updateRoleCards = function(activeRole) { return this.roleCards.forEach((function(_this) { return function(card) { if (card.dataset.role === activeRole) { return card.classList.add('active'); } else { return card.classList.remove('active'); } }; })(this)); }; ResumeSwitcher.prototype.updateTechButtons = function(activeTech) { return this.techButtons.forEach((function(_this) { return function(btn) { if (btn.classList.contains('hidden')) { return; } if (btn.dataset.tech === activeTech) { return btn.classList.add('active'); } else { return btn.classList.remove('active'); } }; })(this)); }; ResumeSwitcher.prototype.updateTechFilterVisibility = function(role) { return this.techButtons.forEach((function(_this) { return function(btn) { var btnRoles; btnRoles = (btn.dataset.roles || '').split(' ').filter(function(r) { return r.length > 0; }); if (btn.dataset.tech === 'all' || btnRoles.includes(role)) { return btn.classList.remove('hidden'); } else { return btn.classList.add('hidden'); } }; })(this)); }; ResumeSwitcher.prototype.getRelevantTechsForRole = function(role) { var techs; techs = []; this.techButtons.forEach((function(_this) { return function(btn) { var btnRoles; btnRoles = (btn.dataset.roles || '').split(' ').filter(function(r) { return r.length > 0; }); if (btnRoles.includes(role) && btn.dataset.tech !== 'all') { return techs.push(btn.dataset.tech); } }; })(this)); return techs; }; return ResumeSwitcher; })(); document.addEventListener('DOMContentLoaded', function() { return new ResumeSwitcher(); }); }).call(this);