/* Bristol Academy — App data + helpers (shared) */
// Skill access model:
// ALL exams free (no paid skills).
const PAID_SKILLS = new Set();
const FULLY_FREE_EXAMS = new Set([1,2,3,4,5,6,7,8,9,10]);
function isSkillUnlocked(examNum, skillKey, hasPlanForExam = false) {
return true;
}
window.isSkillUnlocked = isSkillUnlocked;
window.PAID_SKILLS = PAID_SKILLS;
window.FULLY_FREE_EXAMS = FULLY_FREE_EXAMS;
const BA = (() => {
const SKILLS = [
{ key: 'gv', name: 'Grammar & Vocabulary', short: 'Grammar', meta: '30 preguntas · 25 min' },
{ key: 'rd', name: 'Reading', short: 'Reading', meta: '29 preguntas · 35 min' },
{ key: 'ls', name: 'Listening', short: 'Listening', meta: '25 preguntas · 50 min' },
{ key: 'wr', name: 'Writing', short: 'Writing', meta: '4 tareas · 50 min' },
{ key: 'sp', name: 'Speaking', short: 'Speaking', meta: '4 tareas · 12 min' },
];
const EXAMS = Array.from({ length: 5 }, (_, i) => ({
num: i + 1,
name: `Exam ${i + 1}`,
title: `Aptis General Practice Test`,
free: i === 0,
}));
const PLANS = [
{
id: 'starter',
name: 'Starter Pack',
tagline: 'Empieza con los primeros simulacros para coger ritmo y seguridad.',
price: 25,
originalPrice: null,
exams: [2, 3, 4],
featured: false,
},
{
id: 'progress',
name: 'Progress Pack',
tagline: 'Seis simulacros para una preparación estructurada y completa.',
price: 35,
originalPrice: 45,
exams: [2, 3, 4, 5, 6, 7],
featured: true,
featuredLabel: 'Más popular',
saveLabel: 'Ahorra 10€',
},
{
id: 'complete',
name: 'Complete Pack',
tagline: 'Los 9 simulacros restantes. La preparación más completa.',
price: 50,
originalPrice: 89,
exams: [2, 3, 4, 5, 6, 7, 8, 9, 10],
featured: false,
saveLabel: 'Ahorra 39€',
},
];
return { SKILLS, EXAMS, PLANS };
})();
// Icon set (inline SVG, 1.6 stroke, lucide-ish)
const Icon = ({ name, size = 18, ...rest }) => {
const common = {
width: size, height: size,
viewBox: '0 0 24 24',
fill: 'none', stroke: 'currentColor', strokeWidth: 1.7,
strokeLinecap: 'round', strokeLinejoin: 'round',
...rest,
};
const P = {
arrow: ,
check: ,
lock: <>>,
unlock: <>>,
play: ,
book: ,
headphones:<>>,
edit: <>>,
mic: <>>,
target: <>>,
bolt: ,
clock: <>>,
chart: <>>,
user: <>>,
plus: ,
star: ,
sparkle: ,
shield: ,
clipboard: <>>,
badge: <>>,
rocket: ,
download: <>>,
mail: <>>,
phone: ,
pin: <>>,
};
return ;
};
const SkillIconForKey = (k) => {
const map = { gv: 'edit', rd: 'book', ls: 'headphones', wr: 'clipboard', sp: 'mic' };
return map[k] || 'book';
};
window.BA = BA;
window.Icon = Icon;
window.SkillIconForKey = SkillIconForKey;