'use client'; import { FaGithub, FaGitlab, FaStackOverflow, FaLinkedin, FaGoogle, FaKaggle, FaShieldAlt } from 'react-icons/fa'; import { SiCoursera, SiCredly, SiFiverr, SiUdemy, SiAmazon } from 'react-icons/si'; import RiskIcon from '../components/icons/risk'; import CodeIcon from '../components/icons/code'; import AiIcon from '../components/icons/ai'; export const ProviderIcon = ({ name, className }: { name?: string; className?: string }) => { const n = (name || '').toLowerCase(); if (n.includes('github')) return ; if (n.includes('gitlab')) return ; if (n.includes('stack')) return ; if (n.includes('credly')) return ; if (n.includes('fiverr')) return ; if (n.includes('kaggle')) return ; if (n.includes('google') || n.includes('gscholar')) return ; if (n.includes('linkedin')) return ; if (n.includes('coursera')) return ; if (n.includes('udemy')) return ; if (n.includes('amazon')) return ; if (n.includes('cyber')) return ; if (n.includes('risk')) return ; if (n.includes('technical')) return ; if (n.includes('ai')) return ; return ; }; export const getProviderDisplayName = (name?: string): string => { const n = (name || '').toLowerCase(); if (n.includes('github')) return 'GitHub'; if (n.includes('gitlab')) return 'GitLab'; if (n.includes('stack')) return 'Stack Overflow'; if (n.includes('credly')) return 'Credly'; if (n.includes('fiverr')) return 'Fiverr'; if (n.includes('kaggle')) return 'Kaggle'; if (n.includes('google')) return 'Google Scholar'; if (n.includes('linkedin')) return 'LinkedIn'; if (n.includes('coursera')) return 'Coursera'; if (n.includes('udemy')) return 'Udemy'; if (n.includes('amazon')) return 'Amazon Author'; return name || 'Provider'; }; export const getProviderTooltipCopy = (provider?: string): string => { const n = (provider || '').toLowerCase(); if (n.includes('github')) return 'Signals from open-source activity: commits, repos, stars, and collaboration patterns.'; if (n.includes('gitlab')) return 'Signals from GitLab projects and contributions that indicate delivery and collaboration.'; if (n.includes('stack')) return 'Signals from Q&A participation such as answers, reputation, and accepted solutions.'; if (n.includes('credly')) return 'Verified badges and certifications that validate specific skills or achievements.'; if (n.includes('fiverr')) return 'Client reviews, job history, and delivery consistency across freelance engagements.'; if (n.includes('kaggle')) return 'Competition results, notebooks, and dataset contributions that reflect analytical skill.'; if (n.includes('google')) return 'Publications, citations, and scholarly presence indicating research impact.'; if (n.includes('linkedin')) return 'Professional history, endorsements, and network signals indicating credibility.'; if (n.includes('coursera')) return 'Professional history, training, and course completion signals indicating credibility.'; if (n.includes('udemy')) return 'Professional history, training, and course completion signals indicating credibility.'; if (n.includes('amazon')) return 'Published works and author profile signals from Amazon Stores indicating credibility.'; return 'Signals contributed from this provider relevant to capability and trust.'; }; export const getCategoryTooltipCopy = (category: string): string => { const name = (category || '').toLowerCase(); if (/ecosystems?\s*&\s*providers|model provider ecosystems|cross-provider interaction/.test(name)) return 'Signals showing breadth across model vendors and whether the developer works across multiple provider ecosystems.'; if (/orchestration\s*&\s*dev|orchestration|interaction frameworks|model development frameworks/.test(name)) return 'Signals showing how the developer structures, chains, and develops AI systems and workflows.'; if (/specialized ai|vision|image|audio|speech|multimodal/.test(name)) return 'Signals showing hands-on work with specialized AI modalities such as vision, speech, audio, and multimodal systems.'; if (/machine learning|classical|applied ml|training|optimization|mto/.test(name)) return 'Signals showing practical machine-learning knowledge, experimentation, and model optimization work.'; if (/infrastructure|embedding|retrieval|vector/.test(name)) return 'Signals showing AI infrastructure work including embeddings, retrieval systems, and vector database usage.'; if (/governance|evaluation|experimentation|safety|control/.test(name)) return 'Signals showing evaluation rigor, safety controls, and governance practices around AI systems.'; if (/network|connection|collab|peer/.test(name)) return 'Signals from the developer\'s professional connections, collaborations, and peer recognition.'; if (/project|repo|portfolio|work/.test(name)) return 'Signals from a developer\'s visible projects, repositories, or published work that indicate breadth and quality of output.'; if (/skill|cert|assessment|endorse/.test(name)) return 'Signals tied to specific technical abilities, such as verified certifications, assessments, or endorsements.'; if (/experience|tenure|history/.test(name)) return 'Signals of tenure and diversity of professional or project involvement over time.'; if (/activity|recency|frequency|engage/.test(name)) return 'Signals of recency and frequency of developer engagement in professional or technical platforms.'; if (/sanction|legal|criminal|regulatory|ofac|fbi|watchlist/.test(name)) return 'Signals of legal, criminal, or regulatory red flags linked to an identity.'; if (/identity|authentic|consisten/.test(name)) return 'Signals that indicate whether a developer\'s identity is genuine and consistent across platforms.'; if (/reputation|review|rating|feedback|perceive|peer/.test(name)) return 'Signals of how peers, clients, and communities perceive the developer.'; if (/geo|jurisdiction|country|region|ip|location/.test(name)) return 'Signals tied to a developer\'s geographic or jurisdictional context.'; if (/security|cyber/.test(name)) return 'Signals of security posture and potential cyber-risk exposure.'; if (/risk/.test(name)) return 'KYD Risk surfaces signals of authenticity, reputation, and environmental telemetry that indicate potential risks in engaging with a developer.'; if (/tech|technical/.test(name)) return "KYD Technical surfaces signals from a developer's portfolio, skills, experience, activity, and network to indicate the likelihood of technical capability."; if (/telemetry/.test(name)) return 'Telemetry signals highlight network and location patterns that may indicate authenticity or access risks.'; return 'Share of overall contribution by category based on applied weights.'; }; export const barColor = (pct: number) => (pct >= 60 ? '#19C37D' : pct >= 40 ? '#ffbb54' : '#EC6662');