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]="aa6e9300-2961-5eb9-b491-6bde7ee9f81a")}catch(e){}}(); 3import{j as e}from"./vendor-radix-DhHwA73V.js";import{r as p}from"./vendor-react-DRd396Ms.js";import{u as f}from"./vendor-query-CrHWxh73.js";import{l as k,o as g,a3 as d,L as o,K as c,bl as S,N as j,bu as C,bj as m,S as L,D as P}from"./index-B5YgnIrC.js";import{B as N}from"./badge-PlcB87pI.js";import{P as T}from"./progress-Byuj72sk.js";import{A as y}from"./animated-section-CdG_72mY.js";import{T as x}from"./target-DHk-qCXk.js";import{Z as D}from"./zap-BZoD-an7.js";import{T as A}from"./trending-up-D6IdiPTK.js";import{P as B}from"./play-CYTgOQDz.js";import"./vendor-forms-FRbkMq_T.js";import"./vendor-classnames-B2rm_Apj.js";import"./vendor-motion-C9nHPH8-.js";import"./vendor-i18n-D-E_aly0.js";function X(){const{user:r,isLoading:n}=k(),{data:t,isLoading:v}=f({queryKey:["/api/daily/session"],enabled:!!r}),{data:s,isLoading:w}=f({queryKey:["/api/daily/progress"],enabled:!!r}),u=n||v||w,h=g("daily_session_page_shown"),l=g("daily_session_cta_clicked"),b=p.useRef(null),a=!n&&!r?"auth_gate":u?null:t?"session":"empty";if(p.useEffect(()=>{a!==null&&b.current!==a&&(b.current=a,h({state:a,has_session:!!t,has_progress:!!s,personality_id:(t==null?void 0:t.personalityId)??null}))},[a,t,s,h]),!n&&!r)return e.jsxs("div",{className:"min-h-screen bg-background",children:[e.jsx(d,{}),e.jsx("div",{className:"max-w-md mx-auto px-4 chrome-pad-top text-center",children:e.jsxs(y,{className:"pt-20",children:[e.jsx(x,{className:"h-12 w-12 text-muted-foreground/40 mx-auto mb-4"}),e.jsx("h1",{className:"text-2xl font-bold text-foreground mb-2",children:"Daily Learning Sessions"}),e.jsx("p",{className:"text-sm text-muted-foreground mb-6",children:"Sign in to get personalized daily learning recommendations."}),e.jsx(o,{href:"/register",onClick:()=>l({target:"register",has_session:!1,personality_id:null}),children:e.jsx(c,{className:"aia-cta w-full sm:w-auto",children:"Get started"})})]})})]});if(u)return e.jsxs("div",{className:"min-h-screen bg-background",children:[e.jsx(d,{}),e.jsx("div",{className:"flex items-center justify-center pt-40",children:e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("div",{className:"w-2 h-2 rounded-full bg-primary/60 animate-[pulse-dot_1.4s_ease-in-out_infinite]"}),e.jsx("div",{className:"w-2 h-2 rounded-full bg-primary/60 animate-[pulse-dot_1.4s_ease-in-out_0.2s_infinite]"}),e.jsx("div",{className:"w-2 h-2 rounded-full bg-primary/60 animate-[pulse-dot_1.4s_ease-in-out_0.4s_infinite]"})]})})]});const i=s?Math.min(s.sessionsCompleted/Math.max(s.dailyGoal,1)*100,100):0,_={beginner:"bg-green-600/20 text-green-400 border-green-500/30",intermediate:"bg-blue-600/20 text-blue-400 border-blue-500/30",advanced:"bg-amber-600/20 text-amber-400 border-amber-500/30"};return e.jsxs("div",{className:"min-h-screen bg-background",children:[e.jsx(d,{}),e.jsxs("div",{className:"max-w-2xl mx-auto px-4 sm:px-6 chrome-pad-top pb-16",children:[e.jsxs(y,{className:"pt-8 sm:pt-12 pb-6",children:[e.jsx("h1",{className:"text-2xl sm:text-3xl font-bold text-foreground mb-1",children:"Daily Session"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Your personalized learning for today"})]}),e.jsxs("div",{className:"grid grid-cols-3 gap-3 mb-6",children:[e.jsxs("div",{className:"text-center p-4 rounded-[8px] border border-border/20 bg-card/20",children:[e.jsx(S,{className:"h-5 w-5 text-orange-400 mx-auto mb-1"}),e.jsx("div",{className:"text-2xl font-bold text-foreground",children:(s==null?void 0:s.streak)??0}),e.jsx("div",{className:"text-xs text-muted-foreground",children:"Day Streak"})]}),e.jsxs("div",{className:"text-center p-4 rounded-[8px] border border-border/20 bg-card/20",children:[e.jsx(D,{className:"h-5 w-5 text-accent mx-auto mb-1"}),e.jsx("div",{className:"text-2xl font-bold text-foreground",children:(s==null?void 0:s.xpEarned)??0}),e.jsx("div",{className:"text-xs text-muted-foreground",children:"XP Today"})]}),e.jsxs("div",{className:"text-center p-4 rounded-[8px] border border-border/20 bg-card/20",children:[e.jsx(j,{className:"h-5 w-5 text-blue-400 mx-auto mb-1"}),e.jsxs("div",{className:"text-2xl font-bold text-foreground",children:[(s==null?void 0:s.sessionsCompleted)??0,"/",(s==null?void 0:s.dailyGoal)??1]}),e.jsx("div",{className:"text-xs text-muted-foreground",children:"Sessions"})]})]}),e.jsxs("div",{className:"mb-6",children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsxs("span",{className:"text-sm font-medium text-foreground flex items-center gap-1.5",children:[e.jsx(x,{className:"h-4 w-4 text-accent"}),"Daily Goal"]}),e.jsxs("span",{className:"text-xs text-muted-foreground",children:[Math.round(i),"%"]})]}),e.jsxs("div",{className:"relative",children:[e.jsx(T,{value:i,className:"h-3"}),i>=100&&e.jsx("div",{className:"absolute right-0 -top-1",children:e.jsxs(N,{className:"bg-green-600/20 text-green-400 border border-green-500/30 text-xs",children:[e.jsx(C,{className:"h-3 w-3 mr-1"})," Complete!"]})})]})]}),t?e.jsxs(m,{className:"p-5 sm:p-6 bg-card/30 border-border/30 backdrop-blur-sm mb-6",children:[e.jsxs("div",{className:"flex items-start gap-4 mb-4",children:[e.jsx("div",{className:"flex items-center justify-center w-12 h-12 rounded-xl bg-accent/15 flex-shrink-0",children:e.jsx(L,{className:"h-6 w-6 text-accent"})}),e.jsxs("div",{className:"flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1 flex-wrap",children:[e.jsx("h2",{className:"text-lg font-semibold text-foreground",children:t.topic}),e.jsx(N,{className:`text-xs border ${_[t.difficulty]}`,children:t.difficulty})]}),e.jsx("p",{className:"text-sm text-muted-foreground",children:t.subject})]})]}),e.jsxs("div",{className:"flex items-center gap-4 mb-4 text-xs text-muted-foreground",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(P,{className:"h-3.5 w-3.5"}),t.estimatedMinutes," min"]}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(A,{className:"h-3.5 w-3.5"}),"with ",t.personalityName]})]}),e.jsx("p",{className:"text-sm text-muted-foreground mb-5 leading-relaxed",children:t.reason}),e.jsx(o,{href:`/chat/${t.personalityId}`,onClick:()=>l({target:"start_session",has_session:!0,personality_id:t.personalityId}),children:e.jsxs(c,{className:"w-full bg-accent hover:bg-accent/90 text-white h-11 text-base font-semibold",children:[e.jsx(B,{className:"mr-2 h-5 w-5"}),"Start Session"]})})]}):e.jsxs(m,{className:"p-8 bg-card/30 border-border/30 backdrop-blur-sm mb-6 text-center",children:[e.jsx(x,{className:"h-10 w-10 text-muted-foreground
3/40 mx-auto mb-3"}),e.jsx("h2",{className:"text-lg font-semibold text-foreground mb-1",children:"No Session Available"}),e.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:"Complete more conversations to unlock personalized daily sessions."}),e.jsx(o,{href:"/explore",onClick:()=>l({target:"explore",has_session:!1,personality_id:null}),children:e.jsx(c,{variant:"outline",children:"Browse characters"})})]}),(s==null?void 0:s.learningStory)&&e.jsxs(m,{className:"p-5 bg-card/30 border-border/30 backdrop-blur-sm",children:[e.jsxs("h3",{className:"text-sm font-semibold text-foreground mb-2 flex items-center gap-2",children:[e.jsx(j,{className:"h-4 w-4 text-accent"}),"Today's Learning Story"]}),e.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:s.learningStory})]})]})]})}export{X as default}; 4 5//# debugId=aa6e9300-2961-5eb9-b491-6bde7ee9f81a
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.