1 2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="ea6183cf-dc0c-53f0-949f-dba76ac1e171")}catch(e){}}(); 3import{j as e}from"./vendor-radix-D60p-_ms.js";import{r as h}from"./vendor-react-DRd396Ms.js";import{h as K,o as k,aU as re,aW as ne,aX as le,S,aY as de,b6 as ce,_ as u,D as T,bv as he,j as me,k as ue,l as pe,L as v,H as fe,au as ge,aO as we}from"./index-vRxdZvmj.js";import{u as xe}from"./vendor-query-CQDkrmBu.js";import{C as ye}from"./chat-modal-CwDACQih.js";import{u as be}from"./seo-DTdWGe1o.js";import{M as ve,m as g}from"./vendor-motion-DZC2ImUw.js";import{A as Ie}from"./arrow-left-B4mhrtMh.js";import{C as q}from"./chevron-left-zwIuFo-7.js";import"./vendor-classnames-B2rm_Apj.js";import"./vendor-i18n-D-E_aly0.js";import"./call-button-DCI_GlIv.js";import"./product-state-DnysQ2lu.js";import"./voice-picker-C3JpDNcs.js";import"./memory-row-Cm0Zi5ti.js";import"./share-2-DQAVDXCM.js";import"./pencil-BF8O2Bq2.js";import"./trash-2-Cuh3Lz01.js";import"./entitlement-BREXuFrg.js";import"./clone-plans-rp8CHNyr.js";import"./clone-grants-BpsMnepF.js";import"./vendor-forms-FRbkMq_T.js";import"./use-personality-memories-DuSYYBo2.js";import"./user-facing-error-DLM6u6dy.js";import"./age-gate-sheet-Vnutil3c.js";import"./chat-navigation-B9i_Azd6.js";import"./utils-puaEeEiv.js";import"./phone-BRsdjH_D.js";import"./corner-down-left-DLCDRtTA.js";import"./send-q5QUywj2.js";import"./arrow-up-BypPhMK-.js";import"./timer-dhrubJlO.js";import"./personality-avatar-b6gWgujZ.js";import"./character-fallback-palette-DlBCOvP7.js";import"./use-vaulted-input-Buttoenb.js";import"./use-mobile-chVkPFdn.js";import"./message-circle-Dz6HZipD.js";import"./katex.min-CtcCV_Cn.js";import"./vendor-markdown-DULBSNMC.js";import"./copy-DPcXc346.js";import"./character-image-DRTWli8s.js";import"./pen-line-Cu1HTfEX.js";import"./badge-CgJg1GxD.js";import"./pro-subscription-terms-BifWp1GK.js";import"./trending-up-DCY3beNH.js";import"./square-D96ve7kE.js";import"./volume-2-CkoYbpgp.js";import"./rotate-ccw-BYDC2y06.js";import"./image-CFxaiEO_.js";import"./play-Bj7yzs1t.js";import"./use-long-press-CfSD7gQ_.js";import"./ellipsis-DEOPMHdM.js";import"./thumbs-up-lcX5uezX.js";import"./users-DpNoy9Sz.js";import"./download-C-UHJcET.js";import"./mic-DUU9MqTX.js";import"./history-CX3UteEo.js";import"./chevron-up-DrFhPJ1Z.js";import"./chevron-down-Co7rSwqh.js";import"./sheet-BD8MYuj7.js";import"./alert-dialog-Bq6j6UYY.js";import"./memory-map-GvbMNkC2.js";import"./skeleton-DDTWNHHk.js";import"./memory-map-table-BY9nbUr-.js";import"./git-branch-C2fNHpaW.js";import"./upload-DBLFk0Nd.js";import"./checkbox-91d6NYLq.js";import"./lore-api-EninM35a.js";import"./shield-alert-B-KhURfk.js";import"./crown-Bl_3aWyw.js";import"./award-DyU3XzPp.js";import"./brain-DuSfN-8d.js";import"./minus-B2IwugtT.js";const V="ai-anyone-demo-progress";function $(){return{enrolledCourses:{},totalLessonsCompleted:0,hasSeenGate:!1}}function x(){try{const o=localStorage.getItem(V);return o?{...$(),...JSON.parse(o)}:$()}catch{return $()}}function _(o){localStorage.setItem(V,JSON.stringify(o))}function M(o,n){return`${o}:${n}`}function U(o,n){const d=x(),i=M(o,n);d.enrolledCourses[i]||(d.enrolledCourses[i]={enrolledAt:new Date().toISOString(),completedLessons:[],lastAccessedAt:new Date().toISOString()},_(d))}function Q(o,n,d){const i=x(),t=M(o,n);if(!i.enrolledCourses[t])return U(o,n),Q(o,n,d);const r=i.enrolledCourses[t];r.completedLessons.includes(d)||(r.completedLessons.push(d),r.lastAccessedAt=new Date().toISOString(),i.totalLessonsCompleted=Object.values(i.enrolledCourses).reduce((a,s)=>a+s.completedLessons.length,0),_(i))}function j(o,n,d){var r;const i=x(),t=M(o,n);return((r=i.enrolledCourses[t])==null?void 0:r.completedLessons.includes(d))??!1}function Y(){const o=x();return o.totalLessonsCompleted>=2&&!o.gateBypassMethod}function We(o){const n=x();n.hasSeenGate=!0,n.gateBypassMethod=o,_(n)}function J(){return x().gateBypassMethod==="guest"}function ke({open:o,onOpenChange:n,schoolName:d,courseName:i,lessonsCompleted:t,gradientFrom:r,gradientTo:a,gradientHover:s,returnTo:l}){const[,y]=K(),m=k("demo_signup_dialog_shown"),I=k("demo_signup_cta_clicked"),w=h.useRef(null);h.useEffect(()=>{if(!o){w.current=null;return}const f=`${d}:${i}:${t}`;w.current!==f&&(w.current=f,m({school_name:d,course_name:i,lessons_completed:t}))},[o,d,i,t,m]);const H=()=>{I({target:"creator",school_name:d,course_name:i,lessons_completed:t}),n(!1),y("/register?intent=creator")},P=()=>{I({target:"signup",school_name:d,course_name:i,lessons_completed:t}),n(!1),y(`/register?returnTo=${encodeURIComponent(l)}`)},W=()=>{I({target:"guest",school_name:d,course_name:i,lessons_completed:t}),We("guest"),n(!1)};return e.jsx(re,{open:o,onOpenChange:n,children:e.jsxs(ne,{className:"sm:max-w-md bg-card border-border/40",onInteractOutside:f=>f.preventDefault(),onEscapeKeyDown:f=>f.preventDefault(),children:[e.jsxs(le,{className:"text-center items-center",children:[e.jsx("div",{className:`mx-auto mb-3 w-14 h-14 roun
3ded-full bg-gradient-to-br ${r} ${a} flex items-center justify-center shadow-lg`,children:e.jsx(S,{className:"h-7 w-7 text-white"})}),e.jsx(de,{className:"text-xl font-bold text-foreground",children:"You're on a roll!"}),e.jsxs(ce,{className:"text-muted-foreground text-sm mt-1 leading-relaxed",children:["You've completed ",t," lessons in ",i,". Sign up free to save your progress, unlock certificates, and keep learning."]})]}),e.jsxs("div",{className:"flex flex-col gap-3 pt-3",children:[e.jsxs(u,{onClick:H,className:`btn-shimmer w-full gap-2 bg-gradient-to-r ${r} ${a} ${s} text-white shadow-sm h-11 text-sm font-semibold`,children:[e.jsx(S,{className:"h-4 w-4"}),"Build Your Own School",e.jsx(T,{className:"h-4 w-4"})]}),e.jsxs(u,{variant:"outline",onClick:P,className:"w-full gap-2 border-border/50 text-foreground hover:bg-accent/10 h-10 text-sm font-medium",children:[e.jsx(he,{className:"h-4 w-4"}),"Sign up free to keep learning"]}),e.jsx("button",{onClick:W,className:"text-xs text-muted-foreground/60 hover:text-muted-foreground transition-colors py-1",children:"Continue as guest"})]})]})})}const He={"history-lab":{name:"The History Lab",slug:"history-lab",creator:"Prof. Michael Chen",tagline:"Learn history through the people who made it.",gradientFrom:"from-amber-600",gradientTo:"to-orange-700",gradientHover:"hover:from-amber-500 hover:to-orange-600",accentColor:"text-amber-400",accentBg:"bg-amber-400/10",accentBorder:"border-amber-400/30",accentHex:"#fbbf24",studentCount:940,courses:[{name:"Ancient Rome: Rise and Fall",lessons:8,description:"From republic to empire. Learn from Caesar, Cicero, and Cleopatra.",primaryCharacterId:"julius-caesar",lessonTitles:["The Founding of Rome","The Roman Republic","Julius Caesar and the End of the Republic","Augustus and the Pax Romana","Life in Imperial Rome","Cleopatra and the Eastern Frontier","The Crisis of the Third Century","The Fall of Rome"],suggestedPrompts:[["Tell me the story of how Rome was founded","Who were Romulus and Remus?","What made Rome's location strategic?"],["How did the Roman Republic work?","What was the role of the Senate?","How did citizens participate in politics?"],["Why did Caesar cross the Rubicon?","Was Caesar a hero or a tyrant?","How did the Republic actually end?"],["What was the Pax Romana?","How did Augustus transform Rome?","What made this era so peaceful?"],["What was daily life like in Rome?","Tell me about Roman entertainment","How did social classes work?"],["How did Cleopatra influence Rome?","What was Egypt's relationship with Rome?","Tell me about the Eastern provinces"],["What caused the Crisis of the Third Century?","How did Rome nearly collapse?","What were the military challenges?"],["Why did Rome really fall?","Was the fall sudden or gradual?","What lessons can we learn from Rome's decline?"]]},{name:"The Renaissance Decoded",lessons:6,description:"Art, science, and revolution. Conversations with da Vinci, Michelangelo, and Machiavelli.",primaryCharacterId:"leonardo-davinci",lessonTitles:["The Birth of the Renaissance","Leonardo da Vinci: Genius Unleashed","Michelangelo and the Sistine Chapel","Machiavelli and Political Power","Science Breaks Free","The Renaissance Legacy"],suggestedPrompts:[["What sparked the Renaissance?","How did it differ from the Middle Ages?","Why did it start in Italy?"],["What was Leonardo's greatest invention?","How did he approach art and science?","Tell me about the Mona Lisa"],["How long did the Sistine Chapel take?","What's the story behind the ceiling?","How did Michelangelo and da Vinci differ?"],["What did Machiavelli really believe?","Is 'The Prince' meant to be serious?","How is he relevant today?"],["How did science change during the Renaissance?","What role did Galileo play?","How did the Church react?"],["How did the Renaissance change the world?","What ended the Renaissance?","What modern things came from it?"]]},{name:"World War II: Every Side of the Story",lessons:10,description:"Understand the war through military leaders, civilians, and resistance fighters.",primaryCharacterId:"napoleon",lessonTitles:["The Road to War","Blitzkrieg and the Fall of France","The Eastern Front","The Pacific Theater","Life on the Home Front","The Resistance Movements","D-Day and the Liberation of Europe","The Holocaust: Bearing Witness","Hiroshima and the End of the War","Lessons for the Future"],suggestedPrompts:[["What events led to World War II?","How did the Treaty of Versailles contribute?","Could the war have been prevented?"],["What made Blitzkrieg so effective?","How quickly did France fall?","What happened at Dunkirk?"],["Why did Germany invade the Soviet Union?","What was the Battle of Stalingrad like?","How did winter affect the war?"],["What started the war in the Pacific?","Tell me about Pearl Harbor","What was island hopping?"],["How did civilians experience the war?","What was rationing like?","How did women's roles change?"],["Who were the resistance fighters?","How did people resist Nazi occupation?","What risks did they face?"],["What happened on D-Day?","Why was Normandy chosen?","What was the human cost of D-Day?"],["How did the Holocaust happen?","What were the warning signs?","How do we prevent this from happening again?"],["Was dropping the atomic bomb justified?","What were the alternatives?","How did it change warfare forever?"],["What lessons should we take from WWII?","How did it shape the modern world?","Are we at risk of repeating history?"]]},{name:"Philosophy Through the Ages",lessons:7,description:"Debate ethics, existence, and meaning with Socrates, Kant, and Nietzsche.",primaryCharacterId:"socrates",lessonTitles:["Socrates and the Examined Life","Plato's Republic","Aristotle and the Good Life","Stoicism: Marcus Aurelius","Kant and the Moral Law","Nietzsche: God Is Dead","Modern Philosophy and You"],suggestedPrompts:[["What did Socrates mean by 'the examined life'?","How did the Socratic method work?","Why was Socrates executed?"],["What is Plato's ideal society?","Explain the Allegory of the Cave","Is Plato's Republic realistic?"],["What is Aristotle's concept of the good life?","How does virtue ethics work?","How did Aristotle differ from Plato?"],["What is Stoicism?","How did Marcus Aurelius practice Stoicism?","How can Stoicism help me today?"],["What is the categorical imperative?","How does Kant define morality?","Is duty more important than consequences?"],["What did Nietzsche mean by 'God is dead'?","What is the will to power?","Was Nietzsche a nihilist?"],["How is philosophy relevant today?","What philosophical framework should I use?","How do I form my own philosophy?"]]}],characters:[{id:"cleopatra",name:"Cleopatra",role:"Queen of Egypt"},{id:"julius-caesar",name:"Julius Caesar",role:"Roman General & Dictator"},{id:"leonardo-davinci",name:"Leonardo da Vinci",role:"Renaissance Polymath"},{id:"socrates",name:"Socrates",role:"Philosopher"},{id:"marie-curie",name:"Marie Curie",role:"Physicist & Chemist"},{id:"napoleon",name:"Napoleon",role:"Emperor of France"}],reviews:[{quote:"I never liked history until I could actually TALK to the people. Game changer.",name:"Alex, 19",stars:5},{quote:"My kids are obsessed. They ask to do their history homework now.",name:"Sarah M.",stars:5}]}
3,"codecraft-academy":{name:"CodeCraft Academy",slug:"codecraft-academy",creator:"Sarah Martinez",tagline:"Code smarter with AI mentors who adapt to you.",gradientFrom:"from-blue-600",gradientTo:"to-cyan-700",gradientHover:"hover:from-blue-500 hover:to-cyan-600",accentColor:"text-blue-400",accentBg:"bg-blue-400/10",accentBorder:"border-blue-400/30",accentHex:"#60a5fa",studentCount:620,courses:[{name:"Python from Zero",lessons:12,description:"No experience needed. Build real projects from day one with guided AI mentorship.",primaryCharacterId:"ada-lovelace",lessonTitles:["Welcome to Python","Variables and Data Types","Control Flow: If, Else, Loops","Functions and Scope","Lists, Tuples, and Dictionaries","File I/O","Error Handling","Object-Oriented Basics","Modules and Packages","Project: CLI Task Manager","Project: Weather App","Next Steps and Resources"],suggestedPrompts:[["What is Python and why should I learn it?","What can I build with Python?","How do I set up Python?"],["What are variables?","What data types does Python have?","Show me examples of each type"],["How do if statements work?","Explain for and while loops","When should I use each type of loop?"],["How do I write a function?","What is scope in Python?","What are return values?"],["What's the difference between lists and tuples?","How do dictionaries work?","When should I use each one?"],["How do I read a file in Python?","How do I write to a file?","What's the 'with' statement?"],["What is try/except?","What are common Python errors?","How do I debug effectively?"],["What is a class?","Explain objects and methods","When should I use OOP?"],["How do modules work?","What is pip?","What are the most useful Python packages?"],["Help me plan a CLI task manager","What features should it have?","How do I structure the code?"],["How do I call a weather API?","How do I parse JSON in Python?","Help me display weather data"],["What should I learn next?","How do I build a portfolio?","What Python jobs are available?"]]},{name:"Web Development Bootcamp",lessons:10,description:"HTML, CSS, JavaScript, React. Build and deploy your first web app.",primaryCharacterId:"steve-jobs",lessonTitles:["How the Web Works","HTML Foundations","CSS Layout and Design","JavaScript Essentials","DOM Manipulation","Intro to React","State and Props","APIs and Fetch","Project: Portfolio Site","Deploying Your App"],suggestedPrompts:[["How does a website actually work?","What are HTTP requests?","What's the difference between frontend and backend?"],["What are the most important HTML tags?","How do I structure a web page?","What is semantic HTML?"],["How does CSS layout work?","Explain Flexbox to me","How do I make a responsive design?"],["What are the basics of JavaScript?","How do variables and functions work?","What are arrays and objects?"],["What is the DOM?","How do I select elements?","How do I handle click events?"],["What is React and why use it?","What are components?","How is React different from plain JavaScript?"],["What is state in React?","How do props work?","When do I use state vs props?"],["How do I fetch data from an API?","What is async/await?","How do I display API data in React?"],["Help me plan my portfolio site","What sections should I include?","How do I make it stand out?"],["How do I deploy a web app?","What hosting options are there?","How do I set up a custom domain?"]]},{name:"Data Science Essentials",lessons:8,description:"From spreadsheets to machine learning. Learn to think in data.",primaryCharacterId:"alan-turing",lessonTitles:["What Is Data Science?","Python for Data (Pandas, NumPy)","Data Cleaning","Exploratory Data Analysis","Data Visualization (Matplotlib, Seaborn)","Intro to Machine Learning","Regression and Classification","Capstone Project"],suggestedPrompts:[["What do data scientists actually do?","What skills do I need?","What industries use data science?"],["What is Pandas?","How does NumPy work?","Show me a basic data analysis workflow"],["Why is data cleaning important?","What are common data quality issues?","How do I handle missing values?"],["What is EDA?","How do I find patterns in data?","What questions should I ask my data?"],["When should I use a bar chart vs line chart?","How does Matplotlib work?","What makes a good visualization?"],["What is machine learning?","How does a model learn?","What are common ML algorithms?"],["What is regression?","How does classification work?","How do I evaluate model performance?"],["Help me plan a data science project","What dataset should I use?","How do I present my findings?"]]}],characters:[{id:"steve-jobs",name:"Steve Jobs",role:"Tech Visionary"},{id:"ada-lovelace",name:"Ada Lovelace",role:"First Programmer"},{id:"alan-turing",name:"Alan Turing",role:"Father of Computer Science"},{id:"linus-torvalds",name:"Linus Torvalds",role:"Creator of Linux"}],reviews:[{quote:"The AI tutor caught my logic error before I even ran the code. Incredible.",name:"Marcus, 24",stars:5},{quote:"I went from zero to my first freelance client in 8 weeks.",name:"Priya, 28",stars:5}]},"mindshift-coaching":{name:"MindShift Coaching",slug:"mindshift-coaching",creator:"Dr. Alex Rivera",tagline:"Build the mindset that builds the life.",gradientFrom:"from-emerald-600",gradientTo:"to-green-700",gradientHover:"hover:from-emerald-500 hover:to-green-600",accentColor:"text-emerald-400",accentBg:"bg-emerald-400/10",accentBorder:"border-emerald-400/30",accentHex:"#34d399",studentCount:410,courses:[{name:"The Confidence Blueprint",lessons:6,description:"Practical exercises to overcome self-doubt and show up with presence.",primaryCharacterId:"tony-robbins",lessonTitles:["The Confidence Myth","Identifying Your Inner Critic","Body Language and Presence","Speaking with Authority","Taking Action Despite Fear","Building Lasting Confidence"],suggestedPrompts:[["What is confidence really?","Why do some people seem naturally confident?","Is confidence something you can learn?"],["How do I identify my inner critic?","Why does self-doubt happen?","How do I quiet negative self-talk?"],["How does body language affect confidence?","What power poses work?","How do I project presence?"],["How do I speak more confidently?","What makes someone sound authoritative?","How do I handle nervousness?"],["How do I take action when I'm scared?","What's the relationship between fear and growth?","Give me a courage exercise"],["How do I maintain confidence long-term?","What daily habits build confidence?","How do I bounce back from setbacks?"]]},{name:"Habit Architecture",lessons:8,description:"Design a daily system that actually sticks. Science-backed, AI-guided.",primaryCharacterId:"marcus-aurelius",lessonTitles:["Why Habits Fail","The Habit Loop","Environment Design","Stacking and Chaining","The Two-Minute Rule","Tracking and Accountability","Breaking Bad Habits","Your Custom System"],suggestedPrompts:[["Why do most habits fail?","What's the biggest mistake people make?","How is your approach different?"],["Explain the habit loop","What are cue, routine, and reward?","How do I design a habit loop?"],["How does environment affect habits?","How do I design my space for success?","Give me environment design tips"],["What is habit stacking?","How do I chain habits together?","Give me examples of habit stacks"],["What is the two-minute rule?","How do I start a habit I've been avoiding?","Why does starting small work?"],["How do I track my habits?","What's the best accountability system?","How do I stay motivated?"],["How do I break a bad habit?","Can I replace bad habits with good ones?","What about addictive habits?"],["Help me design my daily system","What should my morning routine look like?","How many habits should I track?"]]},{name:"Stress to Strength",lessons:5,description:"Turn pressure into performance with cognitive reframing techniques.",primaryCharacterId:"brene-brown",lessonTitles:["Understanding Your Stress Response","Cognitive Reframing 101","Breathing and Regulation","Performance Under Pressure","Long-Term Resilience"],suggestedPrompts:[["What happens in my body during stress?","Is all stress bad?","How do I recognize my stress triggers?"],["What is cognitive reframing?","How do I change my perspective on stress?","Give me a reframing exercise"],["What breathing techniques reduce stress?","How does breathwork affect the nervous system?","Teach me box breathing"],["How do I perform well under pressure?","What do elite performers do differently?","How do I manage performance anxiety?"],["How do I build long-term resilience?","What habits support stress resilience?","How do I recover from burnout?"]]},{name:"Leadership from Within",lessons:7,description:"Lead yourself first. Then lead others.",primaryCharacterId:"jordan-peterson",lessonTitles:["Self-Aw
3areness as Foundation","Emotional Intelligence","Decision-Making Frameworks","Communication Mastery","Conflict Resolution","Building Teams","Your Leadership Identity"],suggestedPrompts:[["Why is self-awareness important for leaders?","How do I become more self-aware?","What blind spots should I look for?"],["What is emotional intelligence?","How do I develop EQ?","Why does EQ matter more than IQ for leaders?"],["What frameworks help with hard decisions?","How do I decide under uncertainty?","How do great leaders make decisions?"],["How do I communicate more effectively?","What makes a message persuasive?","How do I give difficult feedback?"],["How do I handle conflicts?","What's the best approach to disagreements?","How do I mediate between people?"],["How do I build a strong team?","What makes teams work well together?","How do I motivate different personalities?"],["How do I define my leadership style?","What kind of leader should I be?","How do I lead authentically?"]]}],characters:[{id:"marcus-aurelius",name:"Marcus Aurelius",role:"Stoic Philosopher Emperor"},{id:"brene-brown",name:"Brene Brown",role:"Vulnerability Researcher"},{id:"tony-robbins",name:"Tony Robbins",role:"Peak Performance Coach"},{id:"jordan-peterson",name:"Jordan Peterson",role:"Clinical Psychologist"}],reviews:[{quote:"This replaced my therapist. Not kidding. The AI coaches really get it.",name:"Jamie, 31",stars:5},{quote:"I've done dozens of self-help courses. This is the first one that stuck.",name:"Rachel, 35",stars:5}]}};function qt(){var G;const o=me(),[,n]=K(),{toast:d}=ue(),{user:i}=pe(),t=o.slug||"",r=parseInt(o.courseIndex||"0",10),a=parseInt(o.lessonIndex||"0",10),s=He[t],l=s==null?void 0:s.courses[r],y=l==null?void 0:l.lessonTitles[a],m=(l==null?void 0:l.lessons)||0,[I,w]=h.useState(!1),[H,P]=h.useState(!1),[W,f]=h.useState(null),N=h.useRef(0),R=h.useRef(j(t,r,a)),E=h.useRef(!1),B=k("demo_lesson_shown"),X=k("demo_lesson_nav_clicked"),Z=k("demo_lesson_cta_clicked"),F=h.useRef(null),L=!!s&&!!l&&a>=0&&a<m;h.useEffect(()=>{const c=`${t}:${r}:${a}:${L}`;F.current!==c&&(F.current=c,B({school_slug:t,course_index:r,lesson_index:a,total_lessons:m,valid:L,is_authenticated:!!i,already_completed:R.current}))},[t,r,a,m,L,i,B]);const b=(c,p)=>()=>Z({school_slug:t,lesson_index:a,target:c,placement:p}),C=(c,p)=>()=>{X({school_slug:t,lesson_index:a,direction:c,placement:p}),se(c==="prev"?a-1:a+1)},A=h.useRef(!0);h.useEffect(()=>()=>{A.current=!1},[]),h.useEffect(()=>{be({title:"Demo lesson | AI Anyone",description:"A sample lesson on AI Anyone.",noindex:!0})},[]),U(t,r);const D=l==null?void 0:l.primaryCharacterId,{data:ee,isLoading:te}=xe({queryKey:["/api/personalities",D],queryFn:async()=>{const c=await fetch(`/api/personalities/${D}`,{credentials:"include"});if(!c.ok)throw new Error("Not found");return c.json()},enabled:!!D,staleTime:5*60*1e3}),z=(l==null?void 0:l.lessonTitles.filter((c,p)=>j(t,r,p)).length)||0,ae=h.useCallback(()=>{N.current++,N.current>=2&&!R.current&&(Q(t,r,a),R.current=!0,(l==null?void 0:l.lessonTitles.every((p,O)=>O===a||j(t,r,O)))?setTimeout(()=>{A.current&&P(!0)},1500):Y()&&!i&&setTimeout(()=>{A.current&&w(!0)},2e3)),N.current===3&&!E.current&&(E.current=!0,d({title:"Progress saved for this session",description:"Sign up to keep your progress permanently."}))},[t,r,a,d,i]),se=h.useCallback(c=>{const p=`/demo/${t}/course/${r}/lesson/${c}`;if(Y()&&!i){f(p),w(!0);return}n(p)},[t,r,n,i]);if(!s||!l||a<0||a>=m)return e.jsx("div",{className:"course-surface min-h-screen bg-surface-0 flex items-center justify-center",children:e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"text-white/60 mb-4",children:"Lesson not found"}),e.jsx(v,{href:`/demo/${t}`,onClick:b("back_school","not_found"),children:e.jsx(u,{variant:"outline",className:"border-white/10 text-white/60",children:"Back to School"})})]})});const oe=`You are teaching a lesson called "${y}" as part of the course "${l.name}" at ${s.name}. This is lesson ${a+1}
3 of ${m}. Start by giving a brief, engaging introduction to this topic (2-3 sentences), then invite the student to ask questions or explore specific aspects. Keep responses conversational and educational. Adapt to the student's level based on their questions.`,ie=((G=l.suggestedPrompts)==null?void 0:G[a])||[];return e.jsx(ve,{reducedMotion:"user",children:e.jsxs("div",{className:"course-surface min-h-screen bg-surface-0 flex flex-col",style:{paddingTop:"var(--ann-strip-h, 0px)"},children:[e.jsx("header",{className:"sticky z-50 bg-surface-0/90 backdrop-blur-md border-b border-white/5",style:{top:"var(--ann-strip-h, 0px)"},children:e.jsxs("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 h-14 flex items-center justify-between",children:[e.jsx(v,{href:`/demo/${t}#courses`,onClick:b("back_courses","header"),children:e.jsxs(u,{variant:"ghost",size:"sm",className:"text-white/50 hover:text-white text-xs gap-1.5",children:[e.jsx(Ie,{className:"w-3.5 h-3.5"})," Back to ",s.name]})}),e.jsxs("span",{className:"text-xs text-white/30",children:["Lesson ",a+1," of ",m]})]})}),e.jsx("div",{className:"max-w-4xl mx-auto w-full px-4 sm:px-6 pt-4",children:e.jsxs("div",{className:"flex items-center gap-3 mb-1",children:[e.jsx("div",{className:"flex-1 h-1.5 bg-white/5 rounded-full overflow-hidden",children:e.jsx(g.div,{className:`h-full bg-gradient-to-r ${s.gradientFrom} ${s.gradientTo} rounded-full`,initial:{width:0},animate:{width:`${z/m*100}%`},transition:{duration:.5}})}),e.jsxs("span",{className:"text-[10px] text-white/25 flex-shrink-0",children:[z,"/",m," done"]})]})}),e.jsx("div",{className:"max-w-4xl mx-auto w-full px-4 sm:px-6 py-4",children:e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-[10px] text-white/25 uppercase tracking-wider mb-1",children:l.name}),e.jsxs("h1",{className:"text-lg sm:text-xl font-bold text-white flex items-center gap-2",children:[y,j(t,r,a)&&e.jsx(fe,{className:"w-4 h-4 text-emerald-400 flex-shrink-0"})]})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(u,{variant:"ghost",size:"icon",disabled:a===0,onClick:C("prev","header"),className:"w-8 h-8 text-white/30 hover:text-white disabled:opacity-20",children:e.jsx(q,{className:"w-4 h-4"})}),e.jsx(u,{variant:"ghost",size:"icon",disabled:a===m-1,onClick:C("next","header"),className:"w-8 h-8 text-white/30 hover:text-white disabled:opacity-20",children:e.jsx(ge,{className:"w-4 h-4"})})]})]})}),e.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden relative",children:[te?e.jsx("div",{className:"flex-1 flex items-center justify-center",children:e.jsx("div",{className:"animate-pulse text-white/30 text-sm",children:"Loading AI mentor..."})}):e.jsx(ye,{mode:"page",personality:ee??null,isOpen:!0,onClose:()=>n(`/demo/${t}#courses`),onBack:()=>n(`/demo/${t}#courses`),topicContext:y,conversationContext:oe,coursePrompts:ie,onMessageSent:()=>ae()}),H&&e.jsx(g.div,{initial:{opacity:0}
3,animate:{opacity:1},className:"absolute inset-0 z-50 bg-[hsl(220,15%,8%)]/95 backdrop-blur-md flex items-center justify-center p-6",children:e.jsxs(g.div,{initial:{scale:.8,opacity:0},animate:{scale:1,opacity:1},transition:{delay:.2,type:"spring",stiffness:200},className:"max-w-md w-full text-center",children:[e.jsx(g.div,{initial:{scale:0},animate:{scale:1},transition:{delay:.4,type:"spring",stiffness:300},className:`mx-auto mb-6 w-20 h-20 rounded-full bg-gradient-to-br ${s.gradientFrom} ${s.gradientTo} flex items-center justify-center shadow-2xl`,children:e.jsx(we,{className:"w-10 h-10 text-white"})}),e.jsx(g.h2,{initial:{y:20,opacity:0},animate:{y:0,opacity:1},transition:{delay:.6},className:"text-2xl sm:text-3xl font-bold text-white mb-2",children:"Course Complete!"}),e.jsxs(g.p,{initial:{y:20,opacity:0},animate:{y:0,opacity:1},transition:{delay:.7},className:"text-white/50 text-sm mb-2",children:["You finished all ",m," lessons in"]}),e.jsx(g.p,{initial:{y:20,opacity:0},animate:{y:0,opacity:1},transition:{delay:.75},className:"text-white/80 font-semibold text-lg mb-8",children:l.name}),e.jsxs(g.div,{initial:{y:20,opacity:0},animate:{y:0,opacity:1},transition:{delay:.9},className:"space-y-3",children:[e.jsx("p",{className:"text-white/40 text-xs mb-4",children:"Imagine your audience experiencing this. Build your own hub with AI-powered offerings."}),e.jsx(v,{href:"/register?intent=creator",onClick:b("register_creator","completion"),children:e.jsxs(u,{size:"lg",className:`w-full bg-gradient-to-r ${s.gradientFrom} ${s.gradientTo} ${s.gradientHover} text-white border-0 h-12 text-sm font-semibold gap-2 shadow-lg`,children:[e.jsx(S,{className:"w-4 h-4"})," Build Your Own School",e.jsx(T,{className:"w-4 h-4"})]})}),e.jsx(v,{href:`/demo/${t}#courses`,onClick:b("back_courses","completion"),children:e.jsx(u,{variant:"outline",size:"lg",className:"w-full border-white/15 text-white/60 hover:text-white h-10 text-sm",children:"Explore More Courses"})})]})]})})]}),!H&&e.jsxs("div",{className:"border-t border-white/5 bg-[hsl(220,15%,8%)]",children:[e.jsxs("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 py-3 flex items-center justify-between",children:[e.jsxs(u,{variant:"ghost",size:"sm",disabled:a===0,onClick:C("prev","footer"),className:"text-white/40 hover:text-white text-xs gap-1.5 disabled:opacity-20",children:[e.jsx(q,{className:"w-3.5 h-3.5"})," Previous"]}),a<m-1?e.jsxs(u,{size:"sm",onClick:C("next","footer"),className:`bg-gradient-to-r ${s.gradientFrom} ${s.gradientTo} ${s.gradientHover} text-white border-0 text-xs font-semibold gap-1.5`,children:["Next Lesson ",e.jsx(T,{className:"w-3.5 h-3.5"})]}):e.jsx(v,{href:`/demo/${t}#courses`,onClick:b("back_courses","footer_finish"),children:e.jsxs(u,{size:"sm",className:`bg-gradient-to-r ${s.gradientFrom} ${s.gradientTo} ${s.gradientHover} text-white border-0 text-xs font-semibold gap-1.5`,children:["Back to Courses ",e.jsx(T,{className:"w-3.5 h-3.5"})]})})]}),J()&&!i&&e.jsx("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 pb-3",children:e.jsxs("div",{className:"flex items-center justify-between gap-3 bg-white/[0.03] rounded-[8px] px-4 py-2.5 border border-white/[0.06]",children:[e.jsxs("p",{className:"text-xs text-white/40",children:[e.jsx(S,{className:"w-3 h-3 inline mr-1.5 text-amber-400"}),"Sign up free to save your progress and earn certificates"]}),e.jsx(v,{href:`/register?returnTo=/demo/${t}/course/${r}/lesson/${a}`,onClick:b("register_return","signup_nudge"),children:e.jsx(u,{size:"sm",variant:"outline",className:"text-[10px] h-6 border-white/10 text-white/50 hover:text-white",children:"Sign Up"})})]})})]}),e.jsx(ke,{open:I,onOpenChange:c=>{if(w(c),!c&&W&&J()){const p=W;f(null),setTimeout(()=>n(p),100)}},schoolName:s.name,courseName:l.name,lessonsCompleted:x().totalLessonsCompleted,gradientFrom:s.gradientFrom,gradientTo:s.gradientTo,gradientHover:s.gradientHover,returnTo:W||`/demo/${t}/course/${r}/lesson/${a}`})]})})}export{qt as default}; 4 5//# debugId=ea6183cf-dc0c-53f0-949f-dba76ac1e171
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.