PageSourceSearch

https://speedchat.ai/assets/LearningDashboard-DLwKqDyo.js

js speedchat.ai collected 2026-10-05 03:29:13 UTC 55,563 bytes, 1 lines download raw bytes

1import{i as ve,r as h,s as v,j as e,o as B,u as dt,at as xt,bF as Q,bQ as ht,aN as S,e as de,Z as qe,G as $e,bR as mt,f as De,bI as Be,C as ft,l as ut,T as gt,S as pt,B as yt}from"./index-xlBnq6Ca.js";import{u as jt}from"./useLearningData-Dh-PBXMC.js";import{u as bt,a as kt}from"./useAccessControl-Bxrrq59k.js";import{b as wt,c as vt}from"./lessonUtils-zSesq1G4.js";import{C as V,a as R}from"./courseRegistry-B3GuuoXR.js";import{s as Nt,i as Ke}from"./aifyrExclusions-N2slH8lt.js";import{i as Ct,A as Y}from"./aiEngineerTrack-Dz7lpczw.js";import{s as _t,B as ze,P as At}from"./aitoolCourseOrder-DkWJ7gVa.js";import{C as we}from"./code-xml-D772PU_P.js";import{A as ee}from"./arrow-right-PGmpajx5.js";import{P as Et}from"./platformStats-E6_YGCjZ.js";import{C as Lt}from"./ClaimCertificateBanner-tTPh6pnZ.js";import{T as Ft}from"./target-BjBFW_qN.js";import{C as je}from"./compass-C_sak0iL.js";import{F as St}from"./flame-DdNsd4vE.js";import{B as be}from"./briefcase-C4WPKT9h.js";import{L as Wt}from"./lock-CvNYKG-h.js";import{G as It}from"./git-branch-B3pObwCC.js";const te=[{name:"Beginner",minXP:0,maxXP:500,icon:"🌱"},{name:"Intermediate",minXP:501,maxXP:1500,icon:"📘"},{name:"Advanced",minXP:1501,maxXP:3500,icon:"⚡"},{name:"Expert",minXP:3501,maxXP:6e3,icon:"🔥"},{name:"Master",minXP:6001,maxXP:1/0,icon:"👑"}];function Mt(t){return te.find(i=>t>=i.minXP&&t<=i.maxXP)||te[0]}function Tt(t){const i=Mt(t),r=te.indexOf(i);if(r===te.length-1)return{level:i,progressPercent:100,xpToNext:0};const d=te[r+1],a=t-i.minXP,w=d.minXP-i.minXP,C=Math.round(a/w*100),k=d.minXP-t;return{level:i,progressPercent:C,xpToNext:k}}const Pt=["All","New","Research & Analysis","No-Code Apps","Writing","Operations","Business","Image Generation","Design","Coding & Development","Marketing and Growth","Video Generation"];function Rt(){try{const t=new(window.AudioContext||window.webkitAudioContext),i=t.createOscillator(),r=t.createGain();i.type="sine",i.frequency.value=880,r.gain.setValueAtTime(1e-4,t.currentTime),r.gain.exponentialRampToValueAtTime(.12,t.currentTime+.01),r.gain.exponentialRampToValueAtTime(1e-4,t.currentTime+.18),i.connect(r).connect(t.destination),i.start(),i.stop(t.currentTime+.2),setTimeout(()=>t.close(),300)}catch{}}function qt(t){return t.split(/\s+/).map(i=>i[0]).filter(Boolean).slice(0,2).join("").toUpperCase()}function Oe(){const{user:t}=ve(),[i,r]=h.useState([]),[d,a]=h.useState({}),[w,C]=h.useState({}),[k,M]=h.useState("All"),[T,z]=h.useState(!0);h.useEffect(()=>{(async()=>{const{data:l}=await v.from("aitool_courses").select("*").order("created_at"),_=(l||[]).filter(E=>!Ct(E));if(r(_t(_)),t){const{data:E}=await v.from("aitool_progress").select("course_id, lesson_completed, course_completed").eq("user_id",t.id),y={};(E||[]).forEach(x=>{y[x.course_id]=y[x.course_id]||{done:0,complete:!1},x.lesson_completed&&(y[x.course_id].done+=1),x.course_completed===!0&&(y[x.course_id].complete=!0)});const L={};_.forEach(x=>{const j=y[x.id];if(j!=null&&j.complete)L[x.id]=100;else{const W=(j==null?void 0:j.done)||0;L[x.id]=x.lesson_count?Math.min(100,Math.round(W/x.lesson_count*100)):0}}),a(L);const{data:re}=await v.from("aitool_certificates").select("course_id").eq("user_id",t.id),X={};(re||[]).forEach(x=>{X[x.course_id]=!0}),C(X)}z(!1)})()},[t]);const p=h.useMemo(()=>k==="All"?i:k==="New"?i.filter(l=>l.is_new):i.filter(l=>l.category===k),[k,i]);return e.jsxs("div",{style:{fontFamily:"Inter, sans-serif"},children:[e.jsx("div",{className:"flex gap-2 overflow-x-auto pb-3 mb-5 -mx-1 px-1",children:Pt.map(l=>{const _=l===k;return e.jsx("button",{onClick:()=>{M(l),Rt()},className:"shrink-0 px-4 py-1.5 rounded-full text-sm transition-colors border whitespace-nowrap",style:_?{background:"#1465E1",color:"#fff",borderColor:"#1465E1"}:{background:"#fff",color:"hsl(220,15%,45%)",borderColor:"#E2E8F0"},children:l},l)})}),T?e.jsx("div",{className:"text-sm text-[hsl(220,15%,45%)]",children:"Loading…"}):p.length===0?e.jsx("div",{className:"text-sm text-[hsl(220,15%,45%)]",children:"No tools yet in this category."}):e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2",style:{gap:16},children:p.map(l=>{const _=d[l.id]||0,E=l.logo_bg_color||"#1465E1";return e.jsxs(B,{to:`/app/tools/${l.slug}`,className:"relative bg-white hover:border-[#1465E1] transition-colors",style:{border:"1px solid #E2E8F0",borderRadius:16,padding:12},children:[l.is_new&&e.jsx("span",{style:{position:"absolute",top:10,right:10,background:"#EEF4FF",color:"#1465E1",fontSize:10,fontWeight:600,borderRadius:4,padding:"2px 6px",letterSpacing:.4},children:"NEW"}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"flex items-center justify-center text-white font-semibold shrink-0",style:{width:48,height:48,background:E,borderRadius:10,fontSize:16},children:l.logo_url?e.jsx("img",{src:l.logo_url,alt:l.title,className:"w-7 h-7 object-contain"}):qt(l.title)}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("div",{className:"truncate",style:{fontSize:15,fontWeight:500,color:"#1E293B"},children:l.title}),e.jsxs("div",{style:{fontSize:12,color:"#64748B",marginTop:2},children:[l.lesson_count||0," lessons · ",l.hours||0,"h"]})]})]}),e.jsx("div",{className:"mt-3 rounded-full overflow-hidden",style:{height:3,background:"#E2E8F0"},children:e.jsx("div",{style:{height:"100%",width:`${_}%`,background:"#1465E1"}})}),e.jsxs("div",{className:"flex flex-wrap items-center mt-3",style:{gap:4},children:[l.tags&&l.tags.length>0&&l.tags.map(y=>e.jsx("span",{style:{background:"#F8FAFC",color:"#64748B",fontSize:11,borderRadius:999,padding:"2px 8px"},children:y},y)),w[l.id]&&e.jsx("span",{onClick:y=>{y.preventDefault(),y.stopPropagation(),window.location.href=`/app/tools/${l.slug}/certificate`},style:{background:"#ECFDF5",color:"#15803D",fontSize:11,fontWeight:600,borderRadius:999,padding:"2px 8px",cursor:"pointer"},children:"✓ View Certificate"})]})]},l.id)})})]})}function Ge(){const[t,i]=h.useState([]);return h.useEffect(()=>{let r=!1;
1return v.from("aitool_courses").select("id,slug,title,description,lesson_count").eq("category",Y.category).then(({data:d})=>{if(r||!d)return;const a=Y.slugs;i([...d].sort((w,C)=>a.indexOf(w.slug)-a.indexOf(C.slug)))}),()=>{r=!0}},[]),t.length===0?null:e.jsxs("section",{className:"mb-7 rounded-md border border-primary/25 bg-card p-5 sm:p-6",children:[e.jsxs("div",{className:"flex items-start gap-3 mb-4",children:[e.jsx("div",{className:"h-10 w-10 shrink-0 rounded-xl bg-primary/10 text-primary flex items-center justify-center",children:e.jsx(we,{className:"h-5 w-5"})}),e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("h3",{className:"text-lg font-bold text-foreground",children:e.jsx(B,{to:Y.href,className:"hover:text-primary",children:Y.title})}),e.jsx("span",{className:"rounded-md bg-primary/10 px-2.5 py-0.5 text-[11px] font-semibold text-primary",children:"Top pick for developers"})]}),e.jsx("p",{className:"text-sm text-muted-foreground mt-0.5",children:Y.description}),e.jsxs(B,{to:Y.href,className:"mt-2 inline-flex items-center gap-1 text-sm font-semibold text-primary hover:underline",children:["View track ",e.jsx(ee,{className:"h-4 w-4"})]})]})]}),e.jsx("ol",{className:"grid gap-3 sm:grid-cols-2",children:t.map((r,d)=>e.jsx("li",{children:e.jsxs(B,{to:`/app/tools/${r.slug}`,className:"group flex h-full items-start gap-3 rounded-md border border-border bg-background p-4 transition-colors hover:border-primary/50",children:[e.jsx("span",{className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-full bg-muted text-xs font-bold text-foreground",children:d+1}),e.jsxs("span",{className:"min-w-0 flex-1",children:[e.jsx("span",{className:"block text-sm font-semibold text-foreground",children:r.title}),r.description&&e.jsx("span",{className:"mt-0.5 block text-xs text-muted-foreground",children:r.description})]}),e.jsx(ee,{className:"mt-1 h-4 w-4 shrink-0 text-muted-foreground group-hover:text-primary"})]})},r.id))})]})}const g="#0F172A",Ne="#64748B",m="#F59E0B",xe="#10B981",se="#EF4444",$t={blue:{bg:"#EEF4FF",primary:"#1465E1",light:"#DCEBFF",mid:"#9DC2FF"},orange:{bg:"#FFF7ED",primary:"#EA580C",light:"#FFE4CC",mid:"#FDBA74"},green:{bg:"#F0FDF4",primary:"#16A34A",light:"#D1FADF",mid:"#86EFAC"},purple:{bg:"#FDF4FF",primary:"#9333EA",light:"#F3E8FF",mid:"#D8B4FE"},amber:{bg:"#FFFBEB",primary:"#D97706",light:"#FEF3C7",mid:"#FCD34D"},rose:{bg:"#FFF1F2",primary:"#E11D48",light:"#FFE4E6",mid:"#FDA4AF"},sky:{bg:"#F0F9FF",primary:"#0284C7",light:"#E0F2FE",mid:"#7DD3FC"}},u=({children:t,bg:i})=>e.jsxs("svg",{viewBox:"0 0 160 120",width:"100%",height:"100%",preserveAspectRatio:"xMidYMid slice",role:"img","aria-hidden":"true",children:[e.jsx("rect",{width:"160",height:"120",fill:i}),t]}),Dt=({p:t})=>e.jsxs(u,{bg:t.bg,children:[e.jsx("ellipse",{cx:"86",cy:"68",rx:"30",ry:"22",fill:t.primary}),e.jsx("circle",{cx:"76",cy:"62",r:"2.5",fill:"#fff"}),e.jsx("rect",{x:"60",y:"64",width:"6",height:"10",rx:"1",fill:t.primary}),e.jsx("rect",{x:"100",y:"64",width:"6",height:"10",rx:"1",fill:t.primary}),e.jsx("path",{d:"M104 56 q4 -6 10 -4",stroke:t.primary,strokeWidth:"2",fill:"none"}),e.jsx("circle",{cx:"40",cy:"78",r:"8",fill:m,stroke:g}),e.jsx("text",{x:"40",y:"82",textAnchor:"middle",fontSize:"9",fontWeight:"700",fill:g,children:"$"}),e.jsx("circle",{cx:"34",cy:"58",r:"6",fill:t.light,stroke:t.primary}),e.jsx("circle",{cx:"120",cy:"40",r:"5",fill:m})]}),Bt=({p:t})=>e.jsxs(u,{bg:t.bg,children:[e.jsx("rect",{x:"24",y:"38",width:"92",height:"20",rx:"10",fill:"#fff",stroke:t.primary,strokeWidth:"2"}),e.jsx("circle",{cx:"36",cy:"48",r:"4",fill:"none",stroke:t.primary,strokeWidth:"2"}),e.jsx("line",{x1:"39",y1:"51",x2:"44",y2:"56",stroke:t.primary,strokeWidth:"2"}),e.jsx("rect",{x:"50",y:"46",width:"28",height:"4",rx:"2",fill:t.mid}),e.jsx("rect",{x:"50",y:"52",width:"18",height:"3",rx:"1",fill:t.light}),e.jsx("circle",{cx:"124",cy:"48",r:"10",fill:m}),e.jsx("text",{x:"124",y:"51",textAnchor:"middle",fontSize:"9",fontWeight:"700",fill:"#fff",children:"#1"}),e.jsx("rect",{x:"34",y:"86",width:"10",height:"14",fill:t.light}),e.jsx("rect",{x:"50",y:"78",width:"10",height:"22",fill:t.mid}),e.jsx("rect",{x:"66",y:"70",width:"10",height:"30",fill:t.primary}),e.jsx("rect",{x:"82",y:"62",width:"10",height:"38",fill:t.primary}),e.jsx("path",{d:"M40 88 L72 72 L100 64",stroke:g,strokeWidth:"2",fill:"none"})]}),zt=({p:t})=>e.jsxs(u,{bg:t.bg,children:[e.jsx("circle",{cx:"50",cy:"50",r:"10",fill:t.mid}),e.jsx("path",{d:"M34 86 q0 -16 16 -16 q16 0 16 16 z",fill:t.mid}),e.jsx("circle",{cx:"82",cy:"44",r:"12",fill:t.primary}),e.jsx("path",{d:"M62 90 q0 -20 20 -20 q20 0 20 20 z",fill:t.primary}),e.jsx("circle",{cx:"114",cy:"50",r:"10",fill:t.light,stroke:t.primary,strokeWidth:"2"}),e.jsx("path",{d:"M98 86 q0 -16 16 -16 q16 0 16 16 z",fill:t.light,stroke:t.primary,strokeWidth:"2"}),e.jsx("circle",{cx:"120",cy:"36",r:"5",fill:m}),e.jsx("path",{d:"M118 36 l1.5 1.5 l3 -3",stroke:"#fff",strokeWidth:"1.5",fill:"none"})]}),Ot=({p:t})=>e.jsxs(u,{bg:t.bg,children:[e.jsx("path",{d:"M28 60 L70 40 L70 80 L28 60 Z",fill:t.primary}),e.jsx("rect",{x:"68",y:"52",width:"14",height:"16",rx:"2",fill:t.mid}),e.jsx("path",{d:"M26 60 q-8 0 -8 8 q0 6 6 6 l8 -2 z",fill:t.primary,opacity:"0.6"}),e.jsx("rect",{x:"90",y:"36",width:"36",height:"24",rx:"3",fill:"#fff",stroke:t.primary,strokeWidth:"2"}),e.jsx("path",{d:"M90 38 L108 52 L126 38",fill:"none",stroke:t.primary,strokeWidth:"2"}),e.jsx("path",{d:"M108 78 q-6 -10 -14 -6 q-8 4 0 14 q6 6 14 12 q8 -6 14 -12 q8 -10 0 -14 q-8 -4 -14 6 z",fill:se})]}),Gt=({p:t})=>e.jsxs(u,{bg:t.bg,children:[e.jsx("path",{d:"M22 96 L22 70 L60 70 L78 86 L60 96 Z",fill:t.mid}),e.jsx("path",{d:"M138 96 L138 70 L100 70 L82 86 L100 96 Z",fill:t.primary}),e.jsx("rect",{x:"70",y:"80",width:"20",height:"10",rx:"2",fill:t.light,stroke:g}),e.jsx("rect",{x:"30",y:"46",width:"100",height:"2",fill:Ne,opacity:"0.4"}),e.jsx("path",{d:"M34 50 L58 38 L82 44 L106 26 L126 30",stroke:t.primary,strokeWidth:"2.5",fill:"none"}),e.jsx("circle",{cx:"106",cy:"26",r:"3",fill:m}),e.jsx("polygon",{points:"126,30 120,28 122,34",fill:t.primary})]}),Vt=({p:t})=>e.jsxs(u,{bg:t.bg,children:[e.jsx("rect",{x:"20",y:"60",width:"36",height:"40",fill:t.mid}),e.jsx("polygon",{points:"20,60 38,42 56,60",fill:t.primary}),e.jsx("rect",{x:"32",y:"74",width:"12",height:"14",fill:"#fff"}),e.jsx("rect",{x:"60",y:"48",width:"42",height:"52",fill:t.primary}),e.jsx("polygon",{points:"60,48 81,30 102,48",fill:g}
1),e.jsx("rect",{x:"68",y:"58",width:"8",height:"8",fill:t.light}),e.jsx("rect",{x:"86",y:"58",width:"8",height:"8",fill:t.light}),e.jsx("rect",{x:"68",y:"76",width:"8",height:"8",fill:t.light}),e.jsx("rect",{x:"86",y:"76",width:"8",height:"8",fill:m}),e.jsx("rect",{x:"106",y:"68",width:"30",height:"32",fill:t.mid}),e.jsx("polygon",{points:"106,68 121,54 136,68",fill:t.primary})]}),Xt=({p:t})=>e.jsxs(u,{bg:t.bg,children:[e.jsx("path",{d:"M44 64 q0 -28 30 -28 q30 0 30 24 q0 14 -16 14 h-8 q-6 0 -6 6 q0 10 -10 10 q-20 0 -20 -26 Z",fill:"#fff",stroke:t.primary,strokeWidth:"2"}),e.jsx("circle",{cx:"58",cy:"54",r:"4",fill:t.primary}),e.jsx("circle",{cx:"72",cy:"44",r:"4",fill:m}),e.jsx("circle",{cx:"88",cy:"46",r:"4",fill:xe}),e.jsx("circle",{cx:"96",cy:"60",r:"4",fill:t.mid}),e.jsx("rect",{x:"106",y:"32",width:"6",height:"40",rx:"2",fill:g,transform:"rotate(25 109 52)"}),e.jsx("rect",{x:"100",y:"68",width:"18",height:"10",rx:"2",fill:m,transform:"rotate(25 109 73)"})]}),Ut=({p:t})=>e.jsxs(u,{bg:t.bg,children:[e.jsx("rect",{x:"56",y:"22",width:"48",height:"80",rx:"6",fill:g}),e.jsx("rect",{x:"60",y:"28",width:"40",height:"62",rx:"2",fill:"#fff"}),e.jsx("rect",{x:"64",y:"34",width:"32",height:"6",rx:"1",fill:t.mid}),e.jsx("rect",{x:"64",y:"44",width:"32",height:"22",rx:"2",fill:t.light}),e.jsx("circle",{cx:"74",cy:"76",r:"3",fill:se}),e.jsx("circle",{cx:"82",cy:"76",r:"3",fill:t.mid}),e.jsx("circle",{cx:"90",cy:"76",r:"3",fill:m}),e.jsx("circle",{cx:"34",cy:"44",r:"10",fill:se}),e.jsx("path",{d:"M34 48 q-4 -6 -8 -2 q-4 4 0 8 q4 4 8 6 q4 -2 8 -6 q4 -4 0 -8 q-4 -4 -8 2 z",fill:"#fff",transform:"scale(0.45) translate(40 50)"}),e.jsx("circle",{cx:"130",cy:"36",r:"9",fill:t.primary}),e.jsx("text",{x:"130",y:"40",textAnchor:"middle",fontSize:"10",fontWeight:"700",fill:"#fff",children:"@"}),e.jsx("circle",{cx:"124",cy:"78",r:"8",fill:m}),e.jsx("text",{x:"124",y:"82",textAnchor:"middle",fontSize:"10",fontWeight:"700",fill:"#fff",children:"★"})]}),Kt=({p:t})=>e.jsxs(u,{bg:t.bg,children:[e.jsx("rect",{x:"52",y:"38",width:"56",height:"46",rx:"8",fill:t.primary}),e.jsx("rect",{x:"58",y:"46",width:"44",height:"22",rx:"4",fill:"#fff"}),e.jsx("circle",{cx:"70",cy:"57",r:"4",fill:t.primary}),e.jsx("circle",{cx:"90",cy:"57",r:"4",fill:t.primary}),e.jsx("rect",{x:"74",y:"74",width:"12",height:"3",rx:"1",fill:"#fff"}),e.jsx("line",{x1:"80",y1:"30",x2:"80",y2:"38",stroke:g,strokeWidth:"2"}),e.jsx("circle",{cx:"80",cy:"28",r:"3",fill:m}),e.jsx("rect",{x:"44",y:"84",width:"72",height:"6",rx:"3",fill:g}),e.jsx("rect",{x:"20",y:"44",width:"22",height:"14",rx:"4",fill:"#fff",stroke:t.primary}),e.jsx("rect",{x:"118",y:"64",width:"22",height:"14",rx:"4",fill:t.mid})]}),Yt=({p:t})=>e.jsxs(u,{bg:t.bg,children:[e.jsx("path",{d:"M80 22 q14 8 14 30 q0 14 -6 22 h-16 q-6 -8 -6 -22 q0 -22 14 -30 z",fill:t.primary}),e.jsx("circle",{cx:"80",cy:"50",r:"6",fill:"#fff"}),e.jsx("circle",{cx:"80",cy:"50",r:"3",fill:t.primary}),e.jsx("path",{d:"M66 74 L58 90 L72 82 z",fill:m}),e.jsx("path",{d:"M94 74 L102 90 L88 82 z",fill:m}),e.jsx("path",{d:"M74 86 L80 100 L86 86 z",fill:se}
1),e.jsx("circle",{cx:"32",cy:"46",r:"8",fill:m,stroke:g}),e.jsx("text",{x:"32",y:"50",textAnchor:"middle",fontSize:"9",fontWeight:"700",fill:g,children:"$"}),e.jsx("circle",{cx:"128",cy:"58",r:"8",fill:m,stroke:g}),e.jsx("text",{x:"128",y:"62",textAnchor:"middle",fontSize:"9",fontWeight:"700",fill:g,children:"$"})]}),Zt=({p:t})=>e.jsxs(u,{bg:t.bg,children:[e.jsx("rect",{x:"22",y:"44",width:"64",height:"40",rx:"3",fill:g}),e.jsx("rect",{x:"26",y:"48",width:"56",height:"32",rx:"1",fill:"#fff"}),e.jsx("rect",{x:"30",y:"54",width:"20",height:"3",fill:t.mid}),e.jsx("rect",{x:"30",y:"60",width:"32",height:"3",fill:t.light}),e.jsx("rect",{x:"30",y:"66",width:"24",height:"3",fill:t.light}),e.jsx("rect",{x:"18",y:"84",width:"72",height:"4",rx:"1",fill:Ne}),e.jsx("rect",{x:"92",y:"32",width:"44",height:"58",rx:"3",fill:"#fff",stroke:t.primary,strokeWidth:"2"}),e.jsx("rect",{x:"98",y:"40",width:"24",height:"4",fill:t.primary}),e.jsx("rect",{x:"98",y:"50",width:"32",height:"2",fill:t.light}),e.jsx("rect",{x:"98",y:"56",width:"32",height:"2",fill:t.light}),e.jsx("rect",{x:"98",y:"62",width:"32",height:"2",fill:t.light}),e.jsx("rect",{x:"98",y:"76",width:"20",height:"6",fill:m}),e.jsx("text",{x:"108",y:"81",textAnchor:"middle",fontSize:"6",fontWeight:"700",fill:g,children:"PAID"})]}),Ht=({p:t})=>e.jsxs(u,{bg:t.bg,children:[e.jsx("rect",{x:"32",y:"26",width:"72",height:"80",rx:"3",fill:"#fff",stroke:t.primary,strokeWidth:"2"}),e.jsx("rect",{x:"32",y:"26",width:"72",height:"10",fill:t.primary}),e.jsx("line",{x1:"40",y1:"46",x2:"96",y2:"46",stroke:t.light,strokeWidth:"2"}),e.jsx("line",{x1:"40",y1:"56",x2:"96",y2:"56",stroke:t.light,strokeWidth:"2"}),e.jsx("line",{x1:"40",y1:"66",x2:"80",y2:"66",stroke:t.light,strokeWidth:"2"}),e.jsx("line",{x1:"40",y1:"76",x2:"92",y2:"76",stroke:t.light,strokeWidth:"2"}),e.jsx("line",{x1:"40",y1:"86",x2:"72",y2:"86",stroke:t.light,strokeWidth:"2"}),e.jsx("rect",{x:"108",y:"38",width:"8",height:"48",rx:"2",fill:m,transform:"rotate(20 112 62)"}),e.jsx("polygon",{points:"108,86 116,86 112,96",fill:g,transform:"rotate(20 112 90)"}),e.jsx("rect",{x:"108",y:"34",width:"8",height:"6",fill:g,transform:"rotate(20 112 37)"})]}),Jt=({p:t})=>e.jsxs(u,{bg:t.bg,children:[e.jsx("rect",{x:"18",y:"28",width:"38",height:"64",rx:"3",fill:"#fff",stroke:t.primary,strokeWidth:"2"}),e.jsx("rect",{x:"22",y:"34",width:"30",height:"14",rx:"2",fill:t.light}),e.jsx("rect",{x:"22",y:"52",width:"30",height:"14",rx:"2",fill:t.mid}),e.jsx("rect",{x:"22",y:"70",width:"30",height:"14",rx:"2",fill:t.primary}),e.jsx("rect",{x:"62",y:"28",width:"38",height:"64",rx:"3",fill:"#fff",stroke:t.primary,strokeWidth:"2"}),e.jsx("rect",{x:"66",y:"34",width:"30",height:"14",rx:"2",fill:m}),e.jsx("rect",{x:"66",y:"52",width:"30",height:"14",rx:"2",fill:t.light}),e.jsx("rect",{x:"106",y:"28",width:"38",height:"64",rx:"3",fill:"#fff",stroke:t.primary,strokeWidth:"2"}),e.jsx("rect",{x:"110",y:"34",width:"30",height:"14",rx:"2",fill:xe}),e.jsx("path",{d:"M118 41 l3 3 l6 -6",stroke:"#fff",strokeWidth:"2",fill:"none"}),e.jsx("rect",{x:"110",y:"52",width:"30",height:"14",rx:"2",fill:xe}),e.jsx("path",{d:"M118 59 l3 3 l6 -6",stroke:"#fff",strokeWidth:"2",fill:"none"})]}),Qt=({p:t})=>e.jsxs(u,{bg:t.bg,children:[e.jsx("rect",{x:"26",y:"26",width:"52",height:"72",rx:"4",fill:t.primary}),e.jsx("rect",{x:"30",y:"30",width:"44",height:"14",rx:"2",fill:"#fff"}),e.jsx("text",{x:"70",y:"41",textAnchor:"end",fontSize:"10",fontWeight:"700",fill:g,children:"1,250"}),Array.from({length:4}).map((i,r)=>Array.from({length:4}).map((d,a)=>e.jsx("rect",{x:30+a*11,y:50+r*11,width:"9",height:"9",rx:"1.5",fill:r===3&&a===3?m:t.light},`${r}-${a}`))),e.jsx("path",{d:"M88 26 L138 26 L138 92 L130 88 L122 92 L114 88 L106 92 L98 88 L88 92 Z",fill:"#fff",stroke:t.primary,strokeWidth:"2"}),e.jsx("line",{x1:"94",y1:"40",x2:"132",y2:"40",stroke:t.light,strokeWidth:"2"}),e.jsx("line",{x1:"94",y1:"50",x2:"132",y2:"50",stroke:t.light,strokeWidth:"2"}),e.jsx("line",{x1:"94",y1:"60",x2:"132",y2:"60",stroke:t.light,strokeWidth:"2"}),e.jsx("line",{x1:"94",y1:"70",x2:"124",y2:"70",stroke:t.primary,strokeWidth:"2"})]}),es=({p:t})=>e.jsxs(u,{bg:t.bg,children:[e.jsx("circle",{cx:"62",cy:"60",r:"22",fill:t.primary}
1),e.jsx("circle",{cx:"62",cy:"60",r:"8",fill:t.bg}),Array.from({length:8}).map((i,r)=>{const d=r*Math.PI/4,a=62+Math.cos(d)*26,w=60+Math.sin(d)*26;return e.jsx("rect",{x:a-4,y:w-4,width:"8",height:"8",fill:t.primary,transform:`rotate(${r*45} ${a} ${w})`},r)}),e.jsx("circle",{cx:"106",cy:"42",r:"14",fill:t.mid}),e.jsx("circle",{cx:"106",cy:"42",r:"5",fill:t.bg}),Array.from({length:6}).map((i,r)=>{const d=r*Math.PI/3,a=106+Math.cos(d)*17,w=42+Math.sin(d)*17;return e.jsx("rect",{x:a-3,y:w-3,width:"6",height:"6",fill:t.mid,transform:`rotate(${r*60} ${a} ${w})`},r)}),e.jsx("circle",{cx:"118",cy:"82",r:"6",fill:m})]}),ts=({p:t})=>e.jsxs(u,{bg:t.bg,children:[e.jsx("rect",{x:"30",y:"44",width:"70",height:"42",rx:"6",fill:t.primary}),e.jsx("polygon",{points:"100,52 124,40 124,90 100,78",fill:t.primary}),e.jsx("circle",{cx:"64",cy:"65",r:"14",fill:"#fff"}),e.jsx("polygon",{points:"60,58 60,72 72,65",fill:t.primary}),e.jsx("circle",{cx:"40",cy:"36",r:"5",fill:m}),e.jsx("circle",{cx:"130",cy:"34",r:"4",fill:se}),e.jsx("rect",{x:"22",y:"92",width:"116",height:"4",rx:"2",fill:t.mid})]}),ss=({p:t})=>e.jsxs(u,{bg:t.bg,children:[e.jsx("path",{d:"M22 90 L52 70 L78 78 L108 50 L132 36",stroke:t.primary,strokeWidth:"3",fill:"none"}),e.jsx("polygon",{points:"132,36 122,34 126,46",fill:t.primary}),e.jsx("circle",{cx:"52",cy:"70",r:"5",fill:m}),e.jsx("circle",{cx:"78",cy:"78",r:"5",fill:m}),e.jsx("circle",{cx:"108",cy:"50",r:"5",fill:m}),e.jsx("circle",{cx:"42",cy:"98",r:"6",fill:t.mid}),e.jsx("circle",{cx:"58",cy:"98",r:"6",fill:t.primary}),e.jsx("circle",{cx:"74",cy:"98",r:"6",fill:t.mid}),e.jsx("line",{x1:"22",y1:"100",x2:"138",y2:"100",stroke:Ne,strokeWidth:"1",opacity:"0.4"})]}),rs=({p:t})=>e.jsxs(u,{bg:t.bg,children:[e.jsx("polygon",{points:"80,28 130,46 80,64 30,46",fill:t.primary}),e.jsx("path",{d:"M58 54 L58 72 q0 8 22 8 q22 0 22 -8 L102 54",fill:"none",stroke:t.primary,strokeWidth:"2.5"}),e.jsx("line",{x1:"130",y1:"46",x2:"130",y2:"68",stroke:g,strokeWidth:"2"}),e.jsx("circle",{cx:"130",cy:"72",r:"3",fill:m}),e.jsx("rect",{x:"36",y:"86",width:"88",height:"18",rx:"2",fill:"#fff",stroke:t.primary,strokeWidth:"2"}),e.jsx("line",{x1:"80",y1:"86",x2:"80",y2:"104",stroke:t.primary,strokeWidth:"2"})]}),is=({p:t})=>e.jsxs(u,{bg:t.bg,children:[e.jsx("rect",{x:"40",y:"46",width:"80",height:"50",rx:"4",fill:t.primary}),e.jsx("rect",{x:"64",y:"36",width:"32",height:"14",rx:"3",fill:"none",stroke:t.primary,strokeWidth:"3"}),e.jsx("rect",{x:"40",y:"66",width:"80",height:"4",fill:g,opacity:"0.25"}),e.jsx("path",{d:"M58 78 q6 -8 14 -4 q4 2 8 0 q8 -4 14 4",stroke:"#fff",strokeWidth:"3",fill:"none",strokeLinecap:"round"}),e.jsx("circle",{cx:"130",cy:"38",r:"6",fill:m}),e.jsx("path",{d:"M127 38 l2 2 l5 -5",stroke:"#fff",strokeWidth:"2",fill:"none"})]}),ls=({p:t})=>e.jsxs(u,{bg:t.bg,children:[e.jsx("rect",{x:"24",y:"32",width:"48",height:"20",rx:"3",fill:t.primary}),e.jsx("rect",{x:"24",y:"58",width:"48",height:"20",rx:"3",fill:t.mid}),e.jsx("rect",{x:"24",y:"84",width:"48",height:"20",rx:"3",fill:t.light,stroke:t.primary,strokeDasharray:"3 2"}),e.jsx("path",{d:"M82 68 L102 68",stroke:g,strokeWidth:"2"}),e.jsx("polygon",{points:"102,68 96,64 96,72",fill:g}),e.jsx("rect",{x:"106",y:"38",width:"34",height:"62",rx:"4",fill:"#fff",stroke:t.primary,strokeWidth:"2"}),e.jsx("rect",{x:"112",y:"46",width:"22",height:"10",rx:"2",fill:t.primary}),e.jsx("rect",{x:"112",y:"60",width:"22",height:"10",rx:"2",fill:t.mid}),e.jsx("rect",{x:"112",y:"74",width:"22",height:"10",rx:"2",fill:m})]}),os=({p:t})=>e.jsxs(u,{bg:t.bg,children:[e.jsx("rect",{x:"30",y:"44",width:"80",height:"56",rx:"4",fill:t.light,stroke:t.primary,strokeWidth:"2"}),e.jsx("rect",{x:"42",y:"34",width:"80",height:"56",rx:"4",fill:t.mid,stroke:t.primary,strokeWidth:"2"}),e.jsx("rect",{x:"54",y:"24",width:"80",height:"56",rx:"4",fill:"#fff",stroke:t.primary,strokeWidth:"2"}),e.jsx("rect",{x:"60",y:"32",width:"36",height:"6",rx:"2",fill:t.primary}),e.jsx("rect",{x:"60",y:"42",width:"68",height:"3",rx:"1",fill:t.light}),e.jsx("rect",{x:"60",y:"48",width:"50",height:"3",rx:"1",fill:t.light}),e.jsx("rect",{x:"60",y:"58",width:"30",height:"16",rx:"2",fill:m}),e.jsx("rect",{x:"94",y:"58",width:"34",height:"16",rx:"2",fill:t.mid})]}),ns=({p:t})=>e.jsxs(u,{bg:t.bg,children:[e.jsx("rect",{x:"30",y:"22",width:"100",height:"80",rx:"4",fill:"#fff",stroke:t.primary,strokeWidth:"2"}),[0,1,2,3].map(i=>e.jsxs("g",{children:[e.jsx("rect",{x:"40",y:32+i*18,width:"12",height:"12",rx:"2",fill:i<2?xe:t.light,stroke:t.primary}),i<2&&e.jsx("path",{d:`M42 ${38+i*18} l3 3 l6 -6`,stroke:"#fff",strokeWidth:"2",fill:"none"}),e.jsx("rect",{x:"58",y:36+i*18,width:i%2===0?50:38,height:"4",rx:"1",fill:i<2?t.light:t.mid})]}
1,i)),e.jsx("circle",{cx:"118",cy:"92",r:"8",fill:m}),e.jsx("path",{d:"M118 88 L118 92 L121 94",stroke:"#fff",strokeWidth:"2",fill:"none"})]}),as=({p:t})=>e.jsxs(u,{bg:t.bg,children:[e.jsx("rect",{x:"22",y:"62",width:"10",height:"36",fill:t.light}),e.jsx("rect",{x:"38",y:"50",width:"10",height:"48",fill:t.mid}),e.jsx("rect",{x:"54",y:"38",width:"10",height:"60",fill:t.primary}),e.jsx("rect",{x:"70",y:"56",width:"10",height:"42",fill:t.mid}),e.jsx("circle",{cx:"106",cy:"50",r:"22",fill:"none",stroke:t.primary,strokeWidth:"4"}),e.jsx("circle",{cx:"106",cy:"50",r:"14",fill:"#fff"}),e.jsx("text",{x:"106",y:"55",textAnchor:"middle",fontSize:"13",fontWeight:"700",fill:t.primary,children:"AI"}),e.jsx("line",{x1:"122",y1:"66",x2:"138",y2:"82",stroke:t.primary,strokeWidth:"5",strokeLinecap:"round"}),e.jsx("circle",{cx:"86",cy:"34",r:"4",fill:m})]}),cs={"ai-for-personal-finance":{Cmp:Dt,palette:"blue"},"ai-for-seo":{Cmp:Bt,palette:"blue"},"ai-for-hr-teams":{Cmp:zt,palette:"blue"},"ai-job-seekers":{Cmp:is,palette:"blue"},"ai-for-marketers":{Cmp:Ot,palette:"orange"},"ai-for-sales":{Cmp:Gt,palette:"orange"},"ai-for-growth-marketers":{Cmp:ss,palette:"orange"},"ai-for-real-estate":{Cmp:Vt,palette:"green"},"ai-for-business-operations":{Cmp:es,palette:"green"},"ai-for-teachers":{Cmp:rs,palette:"green"},"ai-for-designers":{Cmp:Xt,palette:"purple"},"ai-for-social-media":{Cmp:Ut,palette:"purple"},"build-your-ai-agent":{Cmp:Kt,palette:"purple"},"ai-for-content-creators":{Cmp:ts,palette:"purple"},"ai-no-code-builder":{Cmp:ls,palette:"purple"},"ai-side-hustle":{Cmp:Yt,palette:"amber"},"ai-for-freelancers":{Cmp:Zt,palette:"amber"},"ai-productivity":{Cmp:ns,palette:"amber"},"ai-copywriting":{Cmp:Ht,palette:"rose"},"ai-for-project-managers":{Cmp:Jt,palette:"sky"},"ai-for-accountants":{Cmp:Qt,palette:"sky"},"ai-portfolio-builder":{Cmp:os,palette:"sky"},"seo-with-ai":{Cmp:as,palette:"blue"}},ds=t=>{const i=cs[t];return $t[(i==null?void 0:i.palette)||"blue"]},xs=["All","Marketing","Finance","Operations","Career","Creators","Freelancers","Sales"];function hs(t){return t.split(/\s+/).map(i=>i[0]).filter(Boolean).slice(0,2).join("").toUpperCase()}function Ve(){const{user:t}=ve(),[i,r]=h.useState([]),[d,a]=h.useState({}),[w,C]=h.useState({}),[k,M]=h.useState("All"),[T,z]=h.useState(!0);h.useEffect(()=>{(async()=>{const{data:l}=await v.from("aifyr_courses").select("*").order("created_at"),_=Nt((l||[]).filter(E=>!Ke(E)));if(r(_),t){const{data:E}=await v.from("aifyr_progress").select("course_id, lesson_completed, course_completed").eq("user_id",t.id),y={};(E||[]).forEach(x=>{y[x.course_id]=y[x.course_id]||{done:0,complete:!1},x.lesson_completed&&(y[x.course_id].done+=1),x.course_completed===!0&&(y[x.course_id].complete=!0)});const L={};_.forEach(x=>{const j=y[x.id];if(j!=null&&j.complete)L[x.id]=100;else{const W=(j==null?void 0:j.done)||0;L[x.id]=x.lesson_count?Math.min(100,Math.round(W/x.lesson_count*100)):0}}),a(L);const{data:re}=await v.from("aifyr_certificates").select("course_id").eq("user_id",t.id),X={};(re||[]).forEach(x=>{X[x.course_id]=!0}),C(X)}z(!1)})()},[t]);const p=k==="All"?i:i.filter(l=>l.category===k);return e.jsxs("div",{style:{fontFamily:"Inter, sans-serif"},children:[e.jsx("div",{className:"flex gap-2 overflow-x-auto pb-3 mb-5 -mx-1 px-1",children:xs.map(l=>{const _=l===k;return e.jsx("button",{onClick:()=>M(l),className:"shrink-0 px-4 py-1.5 rounded-full text-sm transition-colors border whitespace-nowrap",style:_?{background:"#1465E1",color:"#fff",borderColor:"#1465E1"}:{background:"#fff",color:"hsl(220,15%,45%)",borderColor:"#E2E8F0"},children:l},l)})}),T?e.jsx("div",{className:"text-sm text-muted-foreground",children:"Loading…"}):p.length===0?e.jsx("div",{className:"text-sm text-muted-foreground",children:"No courses yet in this category."}):e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2",style:{gap:16},children:p.map(l=>{const E=ds(l.slug).primary,y=d[l.id]||0;return e.jsxs(B,{to:`/app/learn/ai-for-your-role/${l.slug}`,className:"relative bg-white hover:border-[#1465E1] transition-colors",style:{border:"1px solid #E2E8F0",borderRadius:16,padding:12},children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"flex items-center justify-center text-white font-semibold shrink-0",style:{width:48,height:48,background:E,borderRadius:10,fontSize:16},children:hs(l.title)}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("div",{className:"truncate",style:{fontSize:15,fontWeight:500,color:"#1E293B"},children:l.title}),e.jsxs("div",{style:{fontSize:12,color:"#64748B",marginTop:2},children:[l.lesson_count||0," lessons · ",l.hours||0,"h"]})]})]}),e.jsx("div",{className:"mt-3 rounded-full overflow-hidden",style:{height:3,background:"#E2E8F0"},children:e.jsx("div",{style:{height:"100%",width:`${y}%`,background:"#1465E1"}})}),e.jsxs("div",{className:"flex flex-wrap items-center mt-3",style:{gap:4},children:[l.category&&e.jsx("span",{style:{background:"#F8FAFC",color:"#64748B",fontSize:11,borderRadius:999,padding:"2px 8px"},children:l.category}),w[l.id]&&e.jsx("span",{onClick:L=>{L.preventDefault(),L.stopPropagation(),window.location.href=`/app/learn/ai-for-your-role/${l.slug}/certificate`},style:{background:"#ECFDF5",color:"#15803D",fontSize:11,fontWeight:600,borderRadius:999,padding:"2px 8px",cursor:"pointer"},children:"✓ View Certificate"})]})]},l.id)})})]})}const ke=["master-claude","claude-in-practice","technical"],ms={foundation:["Closing the Generic Gap","High-Impact Content Frameworks","A
1ccelerating Personal Learning & Skills","Building AI Systems That Think"],marketing:["Content Strategy & Audience Intelligence","Long-Form & Video Content Mastery","Campaign Strategy & Messaging","Conversion Copy: Ads, Landing Pages & Email","Social Media & Community Systems","SEO & Topic Authority","Marketing Automation & Personalization","Analytics, Competitive Intel & ROI"],strategy:["Strategic Thinking Foundations","Market & Competitive Analysis","Business Strategy","Decision Frameworks","Financial Analysis","Presentation & Communication","Consulting Toolkit","Strategy in Action"],creative:["The Creative Mindset","Writing That Works","Storytelling & Narrative","Design Thinking","Ideation Systems","Content Creation","Visual & Creative Direction","Creative Excellence in Practice"],technical:["Technical Thinking","Data Fundamentals","SQL and Databases","Python for Non-Developers","No-Code Automation","AI APIs and Integrations","Data Analysis and Visualization","Technical Power in Practice"],"master-claude":["Claude Foundations","Claude in Your Workflow","Building with Claude","Claude Code","Model Context Protocol","AI Fluency by Role"],"claude-in-practice":["Real-World Claude Workflows","Claude Power Tools"],"ai-tools":["Write & Think Faster","Video & Visuals","Automate & Build","Productivity & Content","Video Production","Meetings & Workflows","AI Agents & Research","Ads & Video AI","Music, Data & Social","Images & Web","SEO, Video & Social","Clips, Compliance & Growth","Brand, Code & Publish","Email, SEO and Design","Email, Writing and Outreach","Resume, Career and Job Search","Meetings, Resume, Career and Video","AI Agents"]};function Ye(t,i,r){return t.legacyPrefix?`${t.legacyPrefix}${i}-l${r}`:`${t.slug}-w${i}-l${r}`}function Ze(t,i){var r;return((r=t.lessonsPerWeekMap)==null?void 0:r[i])??t.lessonsPerWeek}function Xe(t){const i=[],{start:r,end:d}=t.weekRange;for(let a=r;a<=d;a++){const w=a-r+1,C=Ze(t,w);for(let k=1;k<=C;k++)i.push(Ye(t,a,k))}return i}function fs(t,i,r,d){const a=ms[t.slug]||[],{start:w,end:C}=t.weekRange;return Array.from({length:C-w+1},(k,M)=>{const T=w+M;return{week_number:T,title:a[M]||`Week ${M+1}`,lessons:Array.from({length:Ze(t,M+1)},(z,p)=>{const l=Ye(t,T,p+1);return{lesson_id:l,title:d(i==null?void 0:i.get(l),`Lesson ${p+1}`),estimated_minutes:(r==null?void 0:r.get(l))||45,xp_reward:l===t.finalLessonId?t.xp.finalLesson:t.xp.base}})}})}const Ue=new Map(R.map(t=>[t.slug,t])),us=new Set([]);function Ms(){var Pe,Re;const t=dt(),i=xt(),{user:r}=ve(),{stats:d,learningPath:a,achievements:w,completedLessons:C,isLoading:k,fetchError:M,refetch:T}=jt(),{data:z=[]}=Q({queryKey:["user-certs-all",r==null?void 0:r.id],queryFn:async()=>{if(!r)return[];const[s,o,n]=await Promise.all([v.from("certifications").select("id, issued_at").eq("user_id",r.id),v.from("aifyr_certificates").select("id, issued_at").eq("user_id",r.id),v.from("aitool_certificates").select("id, issued_at").eq("user_id",r.id)]);return[...s.data||[],...o.data||[],...n.data||[]]},enabled:!!r,staleTime:1e3*60*5}),{data:p}=Q({queryKey:["platform-totals-v2"],queryFn:async()=>{const[s,o,n]=await Promise.all([v.from("aifyr_courses").select("id, slug, category, lesson_count"),v.from("aitool_courses").select("id",{count:"exact",head:!0}),v.from("aitool_lessons").select("id",{count:"exact",head:!0})]),c=(s.data||[]).filter(P=>!Ke(P)),f=c.length,I=c.reduce((P,J)=>P+(J.lesson_count||0),0),N=R.length,D=R.reduce((P,J)=>P+(J.totalLessons||0),0),F=o.count||0,G=n.count||0;return{totalTracks:N+f+F,totalLessons:D+I+G,coreCount:N,roleCount:f,toolCount:F}},staleTime:1e3*60*10}),{isLifetime:l,isProOrHigher:_,isWeekLocked:E,isTrackLocked:y,hasTrackOverride:L,isFoundationComplete:re}=bt({completedLessons:C}),{selectTrack:X,chosenTracks:x}=kt();ht();const j=h.useMemo(()=>{const s=new URLSearchParams(i.search).get("track");return s&&V.has(s)?s:null},[i.search]),[W,he]=h.useState(()=>j||localStorage.getItem("speedchat_active_track")||"foundation"),[A,Z]=h.useState(()=>{if(j&&ke.includes(j))return"developer";const s=localStorage.getItem("speedchat_dashboard_view");return s==="all"||s==="developer"||s==="role"||s==="tools"||s==="professional"?s:"all"});h.useEffect(()=>{localStorage.setItem("speedchat_dashboard_view",A)},[A]);const{data:q=!1}=Q({queryKey:["dev-track-available"],queryFn:async()=>{const{count:s}=await v.from("lesson_content").select("lesson_id",{count:"exact",head:!0}).like("lesson_id","dev-%");return(s??0)>0},staleTime:1e3*60*30}),me=h.useMemo(()=>{const s=[...R];if(q){const o=V.get("dev");o&&s.push(o)}return s},[q]),Ce=h.useMemo(()=>{const s=[];for(const o of ke){const n=V.get(o);n&&s.push(n)}if(q){const o=V.get("dev");o&&s.push(o)}return s},[q]),ie=A==="developer"?Ce:me,[He,Je]=h.useState("All"),[Qe,et]=h.useState("All"),le=A==="developer"?Qe:He,_e=A==="developer"?et:Je,oe=h.useMemo(()=>["All",...Array.from(new Set(ie.map(o=>{var n;return(n=o.marketing)==null?void 0:n.audienceTag}
1).filter(Boolean)))],[ie]);h.useEffect(()=>{oe.includes(le)||_e("All")},[A,oe.join("|")]);const ne=le==="All"?ie:ie.filter(s=>{var o;return((o=s.marketing)==null?void 0:o.audienceTag)===le});h.useEffect(()=>{if(!j&&x.size!==0&&!x.has(W)){const s=[...x][0];he(s)}},[x]),h.useEffect(()=>{if(j){ke.includes(j)&&Z("developer"),he(j);return}ne.length!==0&&(ne.find(s=>s.slug===W)||he(ne[0].slug))},[A,q]);const tt=h.useMemo(()=>{const s=R.flatMap(Xe),o=V.get("dev");return o&&s.push(...Xe(o)),s},[]),{data:U}=Q({queryKey:["all-lesson-titles"],queryFn:async()=>{const{data:s}=await v.from("lesson_content").select("lesson_id, title, estimated_minutes").in("lesson_id",tt),o=new Map,n=new Map;return(s||[]).forEach(b=>{o.set(b.lesson_id,b.title),b.estimated_minutes&&n.set(b.lesson_id,b.estimated_minutes)}),{titleMap:o,minutesMap:n}},staleTime:1e3*60*30}),O=U==null?void 0:U.titleMap,st=U==null?void 0:U.minutesMap;h.useEffect(()=>{localStorage.setItem("speedchat_active_track",W)},[W]);const fe=h.useRef(!1);h.useEffect(()=>{!r||k||a||fe.current||(fe.current=!0,(async()=>{try{await v.functions.invoke("generate-curriculum",{body:{profile:{role:"professional",experience_level:"Beginner",use_cases:["Work productivity","Learning new skills"],struggle_areas:[],time_commitment:"15-30 minutes"}}}),await v.from("profiles").update({learning_onboarding_completed:!0,onboarding_completed:!0}).eq("id",r.id)}catch(s){console.error("[Dashboard] auto curriculum generation failed:",s),setTimeout(()=>{fe.current=!1},5e3)}finally{T()}})())},[r,k,a,T]);const rt=e.jsxs("div",{className:"container mx-auto px-4 py-8 max-w-7xl space-y-8",children:[e.jsxs("div",{className:"rounded-xl border border-border bg-card p-6 space-y-4",children:[e.jsx(S,{className:"h-4 w-32"}),e.jsx(S,{className:"h-8 w-2/3"}),e.jsx(S,{className:"h-4 w-1/2"}),e.jsxs("div",{className:"flex gap-3 pt-2",children:[e.jsx(S,{className:"h-10 w-36"}),e.jsx(S,{className:"h-10 w-28"})]})]}),e.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:Array.from({length:4}).map((s,o)=>e.jsxs("div",{className:"rounded-lg border border-border bg-card p-4 space-y-2",children:[e.jsx(S,{className:"h-4 w-20"}),e.jsx(S,{className:"h-7 w-16"})]},o))}),e.jsxs("div",{children:[e.jsx(S,{className:"h-6 w-40 mb-4"}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",children:Array.from({length:6}).map((s,o)=>e.jsxs("div",{className:"rounded-xl border border-border bg-card p-5 space-y-3",children:[e.jsx(S,{className:"h-10 w-10 rounded-lg"}),e.jsx(S,{className:"h-5 w-3/4"}),e.jsx(S,{className:"h-4 w-full"}),e.jsx(S,{className:"h-2 w-full rounded-full"})]},o))})]})]}),{data:Ae}=Q({queryKey:["dashboard-profile-name",r==null?void 0:r.id],enabled:!!(r!=null&&r.id),staleTime:1e3*60*10,queryFn:async()=>{const{data:s}=await v.from("profiles").select("name").eq("id",r.id).maybeSingle();return(s==null?void 0:s.name)||null}});if(k)return rt;if(M)return e.jsxs("div",{className:"container mx-auto px-4 py-12 max-w-2xl text-center space-y-6",children:[e.jsx("div",{className:"h-20 w-20 mx-auto rounded-full bg-destructive/10 flex items-center justify-center",children:e.jsx(Ft,{className:"h-10 w-10 text-destructive"})}),e.jsx("h1",{className:"text-2xl font-bold text-foreground",children:"Couldn't load your course"}),e.jsx("p",{className:"text-muted-foreground",children:"There was a problem loading your learning data. Your progress is safe — please try again."}),e.jsxs(de,{size:"lg",onClick:()=>T(),children:[e.jsx(qe,{className:"mr-2 h-5 w-5"})," Retry"]})]});const ue=a==null?void 0:a.curriculum;a==null||a.id;const it=s=>s.replace(/_/g,"-"),ae=(s,o)=>
1{if(typeof s=="string")return s;if(typeof s=="number"||typeof s=="boolean")return String(s);if(s==null)return o;try{return JSON.stringify(s)}catch{return o}},lt=3;((ue==null?void 0:ue.weeks)||[]).map((s,o)=>{const n=o+1,b=s.lessons||[],c=Array.from({length:lt},(N,D)=>{const F=it(`w${n}-l${D+1}`),G=b[D]||{};return{...G,lesson_id:F,title:ae((O==null?void 0:O.get(F))??G.title,`Lesson ${D+1}`),estimated_minutes:G.estimated_minutes||20}}),f=n>=5?"marketing":"foundation",I=wt(n,f);return{...s,week_number:n,title:ae(s.title,`Week ${I}`),lessons:c}});const Ee={},ge=[...R],Le=V.get("dev");Le&&ge.push(Le);for(const s of ge)us.has(s.slug)||(Ee[s.slug]=fs(s,O,st,ae));const ot=s=>{const o=s.filter(n=>C.has(n)).length;return{done:o,total:s.length,percent:s.length>0?Math.round(o/s.length*100):0}},pe={},Fe={};for(const s of ge){const n=(Ee[s.slug]||[]).flatMap(b=>(b.lessons||[]).map(c=>c.lesson_id));pe[s.slug]=n,Fe[s.slug]=ot(n)}const $=(()=>{const s=R.map(c=>c.slug),o=R.filter(c=>s.includes(c.slug)).map(c=>({track:c.slug,ids:pe[c.slug]||[],label:c.label.replace(/ Track$/,"").replace(/ Mastery$/,""),emoji:c.emoji})),n=o.find(c=>c.track===W),b=n?[n,...o.filter(c=>c.track!==W)]:o;for(const c of b){const f=Ue.get(c.track),I=(f==null?void 0:f.weekRange.start)??1;for(const N of c.ids){if(C.has(N))continue;if(!_&&!L(c.track)){const P=N.match(/w(\d+)-l(\d+)$/i)||N.match(/(\d+)-l(\d+)$/),J=P?parseInt(P[1],10):NaN,ct=P?parseInt(P[2],10):NaN;if(!(J===I&&ct===1))continue}const D=vt(N),F=parseInt(N.split("-l")[1]||"1"),G=O==null?void 0:O.get(N);return{lessonId:N,track:c.track,trackLabel:c.label,trackEmoji:c.emoji,week:D,lessonNum:F,title:ae(G,`Lesson ${F}`),pathId:a==null?void 0:a.id}}}return null})(),Se=R.flatMap(s=>pe[s.slug]||[]),H=Se.filter(s=>C.has(s)).length,K=Se.length,We=K>0?Math.round(H/K*100):0,Ie=Tt((d==null?void 0:d.total_xp)||0);Ue.get(W);const nt={foundation:{Icon:ut,tint:"bg-blue-500/10",iconColor:"text-blue-600 dark:text-blue-400"},marketing:{Icon:gt,tint:"bg-emerald-500/10",iconColor:"text-emerald-600 dark:text-emerald-400"},strategy:{Icon:It,tint:"bg-purple-500/10",iconColor:"text-purple-600 dark:text-purple-400"},creative:{Icon:At,tint:"bg-pink-500/10",iconColor:"text-pink-600 dark:text-pink-400"},technical:{Icon:we,tint:"bg-sky-500/10",iconColor:"text-sky-600 dark:text-sky-400"},"master-claude":{Icon:pt,tint:"bg-amber-500/10",iconColor:"text-amber-600 dark:text-amber-400"},"claude-in-practice":{Icon:yt,tint:"bg-teal-500/10",iconColor:"text-teal-600 dark:text-teal-400"},"ai-tools":{Icon:be,tint:"bg-violet-500/10",iconColor:"text-violet-600 dark:text-violet-400"},dev:{Icon:ze,tint:"bg-indigo-500/10",iconColor:"text-indigo-600 dark:text-indigo-400"}},at=({course:s,progress:o,locked:n,lockMessage:b})=>{s.weekRange.end-s.weekRange.start+1;const c=s.marketing,f=s.slug==="dev",I=nt[s.slug]||{Icon:De,tint:"bg-muted",iconColor:"text-muted-foreground"},N=o.percent===100,F=c?{blue:{bg:"hsl(220, 90%, 96%)",fg:"#1465E1"},green:{bg:"hsl(150, 60%, 95%)",fg:"hsl(150, 60%, 32%)"},amber:{bg:"hsl(40, 90%, 94%)",fg:"hsl(35, 80%, 38%)"}}[c.audienceTagColor]:null;return e.jsxs("button",{onClick:()=>{n||t(f?"/app/curriculum/dev":`/app/curriculum/${s.slug}`)},className:`text-left w-full bg-card border rounded-2xl p-4 transition-all relative flex flex-col gap-3 ${n?"border-border opacity-60":"border-border hover:border-primary/50 hover:shadow-sm"}`,children:[n&&e.jsxs("div",{className:"absolute top-2 right-2 z-10 inline-flex items-center gap-1 text-[10px] font-medium text-muted-foreground bg-background/80 border border-border rounded px-1.5 py-0.5",children:[e.jsx(Wt,{className:"h-3 w-3"})," ",b||"Locked"]}),e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsxs("div",{className:`shrink-0 h-11 w-11 rounded-xl ${I.tint} flex items-center justify-center relative`,children:[e.jsx(I.Icon,{className:`h-5 w-5 ${I.iconColor}`,strokeWidth:2,"aria-hidden":"true"}),N&&e.jsx("span",{className:"absolute -top-1 -right-1 h-4 w-4 rounded-full bg-emerald-500 text-white flex items-center justify-center ring-2 ring-card",children:e.jsx(ft,{className:"h-2.5 w-2.5",strokeWidth:3})})]}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsx("span",{className:"text-[15px] font-semibold text-foreground leading-tight",children:s.label}),F&&e.jsxs("span",{className:"text-[10px] font-medium rounded-full px-2 py-0.5 
1shrink-0",style:{background:F.bg,color:F.fg},children:[s.totalLessons," lessons"]})]}),(c==null?void 0:c.description)&&e.jsx("p",{className:"text-[12px] text-muted-foreground mt-1 line-clamp-2",children:c.description})]})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("div",{className:"h-1.5 rounded-full bg-muted overflow-hidden",children:e.jsx("div",{className:"h-full bg-primary transition-all",style:{width:`${o.percent}%`}})}),e.jsxs("div",{className:"flex items-center justify-between text-[11px] text-muted-foreground",children:[e.jsxs("span",{children:[o.done,"/",o.total," lessons"]}),e.jsxs("span",{className:"font-semibold text-foreground",children:[o.percent,"%"]})]})]}),e.jsxs("div",{className:`mt-1 inline-flex items-center justify-center gap-1.5 w-full rounded-lg border text-[13px] font-medium py-2 transition-colors ${n?"border-border text-muted-foreground":"border-border text-foreground group-hover:border-primary hover:border-primary hover:text-primary"}`,children:[N?"Review":o.done>0?"Continue":"Start",e.jsx(ee,{className:"h-3.5 w-3.5"})]})]})},ce=(()=>{var o,n;if(Ae)return String(Ae).split(" ")[0];const s=((o=r==null?void 0:r.user_metadata)==null?void 0:o.name)||((n=r==null?void 0:r.user_metadata)==null?void 0:n.full_name);return s?String(s).split(" ")[0]:r!=null&&r.email?r.email.split("@")[0]:null})(),Me=((d==null?void 0:d.lessons_completed)??H)>0,ye=(Pe=r==null?void 0:r.user_metadata)==null?void 0:Pe.learning_goal,Te={"Save time at work":"Start with AI Foundations — build the habits that save hours every week.","Get a better job or promotion":"Your certificates are your proof. Start earning them today.","Actually understand how AI works":"AI Foundations explains how AI thinks, not just how to use it.","Create better content faster":"AI for Marketers is built for exactly what you do.","Make smarter decisions with AI":"AI for Strategists compresses research and sharpens every decision.","Build tools without a developer":"Master Claude shows you how to build without writing code.","Earn a professional AI certificate":"Complete your first track and earn a certificate you can share on LinkedIn."};return e.jsxs("div",{className:"container mx-auto px-3 sm:px-4 py-5 sm:py-10 max-w-6xl space-y-6 sm:space-y-8 overflow-x-hidden",children:[e.jsx(Lt,{}),e.jsxs("header",{className:"flex flex-col lg:flex-row lg:items-end lg:justify-between gap-5",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("h1",{className:"text-2xl sm:text-3xl font-bold tracking-tight text-foreground",children:Me?ce?`Welcome back, ${ce} 👋`:"Welcome back 👋":ce?`Welcome, ${ce} 👋`:"Welcome 👋"}),e.jsx("p",{className:"text-sm sm:text-base text-muted-foreground",children:"Pick up where you left off or explore new skills today."})]}),e.jsxs("div",{className:"flex items-stretch gap-2 sm:gap-3 rounded-2xl border border-border bg-card p-1.5 shadow-sm self-start lg:self-auto overflow-x-auto",children:[e.jsxs("div",{className:"flex items-center gap-2.5 px-3 sm:px-4 py-2",children:[e.jsx("div",{className:"h-8 w-8 rounded-lg bg-blue-500/10 flex items-center justify-center shrink-0",children:e.jsx(je,{className:"h-4 w-4 text-blue-600 dark:text-blue-400"})}),e.jsxs("div",{className:"leading-tight",children:[e.jsx("p",{className:"text-base font-bold text-foreground",children:((p==null?void 0:p.totalTracks)??R.length)+(q?1:0)}),e.jsx("p",{className:"text-[10px] uppercase tracking-wider text-muted-foreground",children:"Tracks"})]})]}),e.jsx("div",{className:"w-px bg-border/70 my-1.5"}),e.jsxs("div",{className:"flex items-center gap-2.5 px-3 sm:px-4 py-2",children:[e.jsx("div",{className:"h-8 w-8 rounded-lg bg-emerald-500/10 flex items-center justify-center shrink-0",children:e.jsx($e,{className:"h-4 w-4 text-emerald-600 dark:text-emerald-400"})}),e.jsxs("div",{className:"leading-tight",children:[e.jsx("p",{className:"text-base font-bold text-foreground",children:((p==null?void 0:p.totalLessons)??0)+(q?((Re=V.get("dev"))==null?void 0:Re.totalLessons)??0:0)||Et.totalLessonsLabel}),e.jsx("p",{className:"text-[10px] uppercase tracking-wider text-muted-foreground",children:"Lessons"})]})]}),e.jsx("div",{className:"w-px bg-border/70 my-1.5"}),e.jsxs("div",{className:"flex items-center gap-2.5 px-3 sm:px-4 py-2",children:[e.jsx("div",{className:"h-8 w-8 rounded-lg bg-purple-500/10 flex items-center justify-center shrink-0",children:e.jsx(mt,{className:"h-4 w-4 text-purple-600 dar
1k:text-purple-400"})}),e.jsxs("div",{className:"leading-tight",children:[e.jsxs("p",{className:"text-base font-bold text-foreground",children:[We,"%"]}),e.jsx("p",{className:"text-[10px] uppercase tracking-wider text-muted-foreground",children:"Progress"})]})]})]})]}),e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsxs("div",{className:"inline-flex items-center gap-1.5 px-3 py-1.5 rounded-full bg-muted/60 border border-border/60",children:[e.jsx(qe,{className:"h-3.5 w-3.5 text-primary"}),e.jsxs("span",{className:"text-xs font-semibold text-foreground",children:[(d==null?void 0:d.total_xp)||0," XP"]})]}),e.jsxs("div",{className:"inline-flex items-center gap-1.5 px-3 py-1.5 rounded-full bg-muted/60 border border-border/60",children:[e.jsx("span",{className:"text-sm leading-none",children:Ie.level.icon}),e.jsx("span",{className:"text-xs font-semibold text-foreground",children:Ie.level.name})]}),e.jsxs("div",{className:"inline-flex items-center gap-1.5 px-3 py-1.5 rounded-full bg-muted/60 border border-border/60",children:[e.jsx(St,{className:"h-3.5 w-3.5 text-orange-500"}),e.jsxs("span",{className:"text-xs font-semibold text-foreground",children:[(d==null?void 0:d.current_streak)||0," day streak"]})]})]}),ye&&Te[ye]&&e.jsxs("div",{className:"rounded-xl bg-muted/40 border-l-4 border-primary px-4 py-3",children:[e.jsx("p",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground mb-0.5",children:"Recommended for you"}),e.jsx("p",{className:"text-sm text-foreground",children:Te[ye]})]}),K>0&&H>=K?e.jsxs("div",{className:"rounded-2xl border border-primary/20 bg-gradient-to-r from-primary/10 via-primary/5 to-transparent p-6 text-center space-y-2",children:[e.jsx($e,{className:"h-10 w-10 text-primary mx-auto"}),e.jsx("h2",{className:"text-xl font-bold text-foreground",children:"🎉 All Lessons Complete!"}),e.jsxs("p",{className:"text-muted-foreground text-sm",children:[H,"/",K," lessons finished — you're a SpeedChat Academy graduate!"]}),e.jsx(de,{asChild:!0,className:"mt-2",children:e.jsxs(B,{to:"/app/certificates",children:["View your certificates ",e.jsx(ee,{className:"ml-2 h-4 w-4"})]})})]}):_&&$?e.jsx("div",{onClick:()=>{t(`/app/learn/lesson/${$.pathId}/${$.lessonId}`)},className:"group w-full rounded-xl border border-border bg-card px-4 py-3 transition-all hover:border-primary/40 hover:shadow-sm cursor-pointer",children:e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsxs("div",{className:"flex items-center gap-3 min-w-0 flex-1",children:[e.jsx("div",{className:"h-9 w-9 rounded-lg bg-primary/10 flex items-center justify-center shrink-0",children:e.jsx(De,{className:"h-4 w-4 text-primary"})}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("p",{className:"text-[10px] uppercase tracking-wider text-muted-foreground font-semibold leading-none",children:"Continue Learning"}),e.jsx("p",{className:"text-sm font-semibold text-foreground truncate mt-1",children:$.title}),e.jsxs("p",{className:"text-[11px] text-muted-foreground mt-0.5 truncate",children:[$.trackLabel," · ",H,"/",K," · ",We,"%",z.length>0&&e.jsxs(e.Fragment,{children:[" · ",e.jsxs(B,{to:"/app/learn/certification",onClick:s=>s.stopPropagation(),className:"text-primary font-medium hover:underline",children:["🎓 ",z.length," ready"]})]})]})]})]}),e.jsxs(de,{size:"sm",className:"shrink-0 rounded-lg h-9",children:["Continue ",e.jsx(ee,{className:"ml-1 h-3.5 w-3.5"})]})]})}):null,!Me&&$&&e.jsxs("div",{className:"rounded-2xl border border-border bg-card p-5 flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4",children:[e.jsx("p",{className:"text-foreground font-medium",children:"🎯 Your first lesson takes 12 minutes. Start now and build a habit that sticks."}),e.jsx(de,{asChild:!0,children:e.jsx(B,{to:`/app/learn/lesson/${$.pathId}/${$.lessonId}`,children:"Start First Lesson →"})})]}),e.jsxs("div",{className:"pt-2",children:[e.jsx("h2",{className:"text-xl sm:text-2xl font-bold tracking-tight text-foreground",children:"Your Learning Tracks"}),e.jsx("p",{className:"text-sm text-muted-foreground mt-0.5",children:"Choose a track and start learning with curated lessons."})]}),(()=>{const s=me.length,o=(p==null?void 0:p.roleCount)??0,n=(p==null?void 0:p.toolCount)??0,b=s+o+n,c=[{id:"all",label:"All",icon:ze,count:b},{id:"professional",label:"Core Tracks",mobileLabel:"Core",icon:be,count:s},{id:"role",label:"AI for Your Role",mobileLabel:"Your Role",icon:je,count:o},{id:"tools",label:"AI Tools",icon:Be,count:n},{id:"developer",label:"Builders",icon:we,count:Ce.length}];return e.jsx("div",{className:"flex items-center gap-2",children:e.jsx("div",{className:"inline-flex overflow-x-auto rounded-xl border border-border p-1 bg-muted/40 w-full sm:w-auto",children:c.map(f=>{const I=f.icon,N=A===f.id;return e.jsxs("button",{type:"button",onClick:()=>Z(f.id),className:`inline-flex shrink-0 items-center gap-1.5 px-3 sm:px-4 py-1.5 text-xs sm:text-sm font-medium rounded-lg transition-all whitespace-nowrap ${N?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground"}`,children:[e.jsx(I,{className:"h-3.5 w-3.5 shrink-0"}),f.mobileLabel?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"hidden sm:inline",children:f.label}),e.jsx("span",{className:"sm:hidden",children:f.mobileLabel})]}):f.label,f.count>0&&e.jsx("span",{className:`ml-0.5 text-[10px] sm:text-[11px] font-semibold rounded-full px-1.5 py-0.5 ${N?"bg-white/20 text-primary-foreground":"bg-background text-muted-foreground border border-border"}`,children:f.count})]},f.id)})})})})(),(()=>{const s=n=>{const b=y(n.slug),c=b.locked,f=b.message||"Upgrade to unlock";return e.jsx("div",{id:`track-card-${n.slug}`,className:"transition-all duration-300 rounded-xl min-w-0",children:e.jsx(at,{course:n,progress:Fe[n.slug]||{done:0,total:0,percent:0},locked:c,lockMessage:f})},n.slug)},o="grid grid-cols-1 sm:grid-cols-2 gap-4";return A==="role"?e.jsx(Ve,{}):A==="tools"?e.jsx(Oe,{}):A==="all"?e.jsxs("div",{className:"space-y-10",children:[e.jsx(Ge,{}),e.jsxs("section",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsxs("h3",{className:"text-base sm:text-lg font-semibold text-foreground flex items-center gap-2",children:[e.jsx(be,{className:"h-4 w-4 text-primary"})," Core Tracks"]}),e.jsx("button",{onClick:()=>Z("professional"),className:"text-xs font-medium text-primary hover:underline",children:"View all →"})]}),e.jsx("div",{className:o,children:me.map(s)})]}),e.jsxs("section",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsxs("h3",{className:"text-base sm:text-lg font-semibold text-foreground flex items-center gap-2",children:[e.jsx(je,{className:"h-4 w-4 text-primary"})," AI for Your Role"]}),e.jsx("button",{onClick:()=>Z("role"),className:"text-xs font-medium text-primary hover:underline",children:"View all →"})]}),e.jsx(Ve,{})]}),e.jsxs("section",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsxs("h3",{className:"text-base sm:text-lg font-semibold text-foreground flex items-center gap-2",children:[e.jsx(Be,{className:"h-4 w-4 text-primary"})," AI Tools"]}),e.jsx("button",{onClick:()=>Z("tools"),className:"text-xs font-medium text-primary hover:underline",children:"View all →"})]}),e.jsx(Oe,{})]})]}):e.jsxs("div",{children:[A==="developer"&&e.jsx(Ge,{}),oe.length>1&&e.jsx("div",{className:"flex gap-2 overflow-x-auto pb-3 mb-5 -mx-1 px-1",children:oe.map(n=>{const b=n===le;return e.jsx("button",{type:"button",onClick:()=>_e(n),className:"shrink-0 px-4 py-1.5 rounded-full text-sm transition-colors border whitespace-nowrap",style:b?{background:"#1465E1",color:"#fff",borderColor:"#1465E1"}:{background:"#fff",color:"hsl(220,15%,45%)",borderColor:"#E2E8F0"},children:n},n)})}),e.jsx("div",{className:o,children:ne.map(s)}),A==="developer"&&!q&&e.jsx("p",{className:"mt-3 text-xs text-muted-foreground italic",children:"Build Real AI course is coming soon."})]})})()]})}
1export{Ms as default};

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.