1import{_ as $,a as c,i as B,s as k}from"./vendor-05Yv21q1.js";import{t as Y}from"./utils-B-HWOJQP.js";import{Yn as E}from"./organisation-context-banner-xLxxUNff.js";import{t as w}from"./arrow-right-ByOymYhZ.js";import{t as H}from"./book-open-DmEOhJkb.js";import{t as I}from"./calendar-clock-z2QXJEH4.js";import{t as F}from"./circle-check-Cwib9sBp.js";import{t as U}from"./clipboard-list-CGCAXEwZ.js";import{t as G}from"./compass-Jb9HhHcb.js";import{n as O,r as q,t as W}from"./horizon-backdrop-DEcsX_Ra.js";import{t as X}from"./flag-Big3QbNg.js";import{n as J}from"./gem-BYE3DqgK.js";import{t as K}from"./list-checks-BNgE0iOM.js";import{t as C}from"./messages-square-Dzdz494G.js";import{t as y}from"./plus-Pfnpbwz0.js";import{t as M}from"./radar-By1dMCYg.js";import{t as _}from"./route-BNkyOT95.js";import{t as x}from"./sparkles-DYEOgaN5.js";import{t as V}from"./target-rGcim2GR.js";import{t as Z}from"./trophy-CHxCuXzA.js";import{t as Q}from"./users-round-D47lRQvZ.js";import{t as A}from"./x-BuH6yV6F.js";import{t as ee}from"./zap-CYfuQ4fS.js";import{C as se,S as te,_ as re,b as ae,ct as o,g as ie,v as le,w as ne,x as oe,y as ce}from"./app-DlGIlhj2.js";import{i as z,n as S,t as T}from"./tooltip-DKTo-E6K.js";import{a as de,i as xe,n as me,r as he,t as pe}from"./page-toolbar-BM_ALgr9.js";import{n as u,t as m}from"./card-DQ8kPFJB.js";import{t as ue}from"./app-layout-BOT0bgK0.js";import{n as fe,t as f}from"./stat-card-CLwcPso2.js";import{t as je}from"./ash-allowance-notice-DtIeELw9.js";import{t as ge}from"./ash-DdKfcPym.js";import{t as ye}from"./ash-orb-ClfFVZrp.js";import{t as Ne}from"./goals-BK5WKcri.js";import{t as be}from"./weekday-dots-Du6sGcar.js";var e=$(),ve={article:H,quiz:K,session:C,reflect:q,takeaway:O,milestone:X},ke={clarifying:"Getting started",generating:"Building journey",active:"Active",paused:"Paused",failed:"Needs attention"};function we({value:s,size:r=54,stroke:i=5}){const l=(r-i)/2,a=2*Math.PI*l,d=Math.min(100,Math.max(0,s)),h=a-d/100*a,n=r/2;return(0,e.jsxs)("svg",{width:r,height:r,viewBox:`0 0 ${r} ${r}`,className:"shrink-0","aria-hidden":!0,children:[(0,e.jsx)("circle",{cx:n,cy:n,r:l,strokeWidth:i,fill:"none",stroke:"hsl(var(--hz-ink) / 0.16)"}),(0,e.jsx)("circle",{cx:n,cy:n,r:l,strokeWidth:i,strokeLinecap:"round",fill:"none",stroke:"hsl(var(--hz-sun))",strokeDasharray:a,strokeDashoffset:h,transform:`rotate(-90 ${n} ${n})`,className:"transition-[stroke-dashoffset] duration-700 ease-out"}),(0,e.jsxs)("text",{x:"50%",y:"50%",dominantBaseline:"central",textAnchor:"middle",fill:"currentColor",className:"text-[13px] font-semibold",children:[Math.round(d),"%"]})]})}function Ce({goal:s}){const r=s.total_steps>0,i=r?Math.round(s.completed_steps/s.total_steps*100):0,l=s.status==="generating"||s.status==="clarifying",a=s.current_step?ve[s.current_step.type]:x,d=`/ash/goals/${s.id}`;return(0,e.jsxs)(W,{category:s.category,variant:"card",className:"group min-h-56 rounded-xl border shadow-sm transition-all duration-200 hover:-translate-y-0.5 hover:shadow-md",contentClassName:"flex h-full flex-col gap-3 p-5",children:[(0,e.jsxs)(ie,{children:[(0,e.jsx)(ne,{asChild:!0,children:(0,e.jsx)("button",{type:"button","aria-label":`Close ${s.title}`,className:"absolute top-2.5 right-2.5 z-20 flex size-7 items-center justify-center rounded-full opacity-0 transition hover:bg-black/5 focus-visible:opacity-100 group-hover:opacity-100",children:(0,e.jsx)(A,{className:"size-3.5"})})}),(0,e.jsxs)(ce,{children:[(0,e.jsxs)(te,{children:[(0,e.jsxs)(se,{children:['Close "',s.title,'"?']}),(0,e.jsx)(ae,{children:"The journey ends here and the course leaves your list â nothing you've completed is lost, and Ash will bring you fresh suggestions."})]}),(0,e.jsxs)(oe,{children:[(0,e.jsx)(le,{children:"Keep going"}),(0,e.jsx)(re,{onClick:()=>k.post(Ne(s.id).url),children:"Close it"})]})]})]}),(0,e.jsxs)("div",{className:"flex items-center gap-2 pr-6",children:[(0,e.jsx)("span",{className:"inline-flex items-center rounded-full border px-2 py-0.5 text-[11px] font-medium tracking-wide uppercase",style:{background:"hsl(var(--hz-ink) / 0.06)",borderColor:"hsl(var(--hz-ink) / 0.14)"},children:ge[s.category]}),s.status!=="active"&&(0,e.jsx)("span",{className:"inline-flex items-center rounded-full border px-2 py-0.5 text-[11px] font-medium",style:{background:"hsl(var(--hz-ink) / 0.06)",borderColor:"hsl(var(--hz-ink) / 0.14)"},children:ke[s.status]??s.status}),s.shared_with_manager&&(0,e.jsx)("span",{className:"text-[11px] opacity-70",children:"Shared"})]}),(0,e.jsx)(c,{href:d,className:"line-clamp-2 font-serif text-lg font-semibold tracking-tight transition-opacity hover:opacity-70",children:s.title}),l?(0,e.jsxs)("p",{className:"flex items-center gap-1.5 text-sm opacity-75",children:[(0,e.jsx)(x,{className:"size-3.5 animate-pulse",style:{color:"hsl(var(--hz-sun))"}}),"Ash is building your journeyâ¦"]}):s.current_step&&(0,e.jsxs)("p",{className:"flex items-center gap-1.5 text-sm",children:[(0,e.jsx)(a,{className:"size-3.5 shrink-0 opacity-70"}),(0,e.jsxs)("span",{className:"truncate",children:[(0,e.jsx)("span",{className:"opacity-60",children:"Up next: "}),s.current_step.title]})]}),(0,e.jsxs)("div",{className:"mt-auto flex items-end justify-between gap-3 pt-2",children:[r?(0,e.jsxs)("div",{className:"flex items-center gap-3",children:[(0,e.jsx)(we,{value:i}),(0,e.jsxs)("div",{className:"text-xs leading-tight",children:[(0,e.jsxs)("div",{className:"font-semibold",children:[s.completed_steps,"/",s.total_steps]}),(0,e.jsx)("div",{className:"opacity-70",children:"steps done"})]})]}):(0,e.jsx)("span",{}),(0,e.jsx)(o,{size:"sm",asChild:!0,children:(0,e.jsxs)(c,{href:d,children:[l?"View":"Continue",(0,e.jsx)(w,{className:"size-3.5"})]})})]})]})}var _e=[{icon:M,label:"Skill radar"},{icon:V,label:"Target roles"},{icon:_,label:"AI roadmap"}];function Ae({href:s="/ash/career"}){return(0,e.jsxs)(m,{className:"relative overflow-hidden border-primary/20 bg-linear-to-br from-primary/10 via-primary/5 to-card p-6 lg:p-7",children:[(0,e.jsx)("div",{"aria-hidden":!0,
1className:"pointer-events-none absolute -top-16 -right-10 size-56 rounded-full bg-primary/20 blur-3xl"}),(0,e.jsxs)("div",{className:"relative flex flex-col gap-5 lg:flex-row lg:items-center lg:justify-between lg:gap-8",children:[(0,e.jsxs)("div",{className:"flex items-start gap-4",children:[(0,e.jsx)("div",{className:"flex size-12 shrink-0 items-center justify-center rounded-xl bg-primary/15 text-primary",children:(0,e.jsx)(_,{className:"size-6"})}),(0,e.jsxs)("div",{className:"space-y-2.5",children:[(0,e.jsxs)("div",{className:"space-y-1",children:[(0,e.jsx)("h3",{className:"text-lg font-semibold text-foreground",children:"Chart your career with Ash"}),(0,e.jsx)("p",{className:"max-w-xl text-sm text-muted-foreground",children:"See your skills at a glance, set a target role, and let Ash build a personalised roadmap â then turn any phase of it into a guided journey."})]}),(0,e.jsx)("div",{className:"flex flex-wrap gap-2 pt-0.5",children:_e.map(r=>(0,e.jsxs)("span",{className:"inline-flex items-center gap-1.5 rounded-full bg-background/70 px-2.5 py-1 text-xs font-medium text-foreground/80 ring-1 ring-border",children:[(0,e.jsx)(r.icon,{className:"size-3.5 text-primary"}),r.label]},r.label))})]})]}),(0,e.jsx)(o,{asChild:!0,size:"lg",className:"shrink-0 max-lg:w-full",children:(0,e.jsxs)(c,{href:s,children:["Open career planner",(0,e.jsx)(w,{className:"size-4"})]})})]})]})}function b(s,r,i){const l=new URLSearchParams({source_type:s,source_id:String(r)});return i&&l.set("focus",i),`/ash/start?${l.toString()}`}function v({href:s,canStart:r,blockedReason:i}){return r?(0,e.jsx)(o,{size:"sm",asChild:!0,children:(0,e.jsxs)(c,{href:s,children:[(0,e.jsx)(x,{className:"size-3.5"}),"Start"]})}):(0,e.jsxs)(T,{children:[(0,e.jsx)(z,{asChild:!0,children:(0,e.jsx)("span",{children:(0,e.jsxs)(o,{size:"sm",disabled:!0,children:[(0,e.jsx)(x,{className:"size-3.5"}),"Start"]})})}),(0,e.jsx)(S,{children:i})]})}var ze=[{title:"Ash",href:"/ash"}];function cs({goals:s,streak:r,totals:i,week:l,teamMomentum:a,recommendations:d,assignedCourses:h,maxGoals:n,allowance:j,canViewUpgradeOptions:D,canManageBilling:R}){const g=s.length>=n,p=!g&&j.can_start,L=s.length>0,N=g?`You're working on ${n} goals â finish or close one to start another.`:"Your Ash allowance is fully utilized. Contact HR or your administrator to start another course.",P=t=>{k.post("/ash/recommendations/dismiss",{source_type:t.source_type,source_id:t.source_id,focus:t.focus},{preserveScroll:!0})};return(0,e.jsxs)(ue,{breadcrumbs:ze,children:[(0,e.jsx)(B,{title:"Ash â Growth Guide"}),(0,e.jsxs)("div",{className:"flex flex-col gap-6 p-4 md:p-6",children:[(0,e.jsxs)(pe,{children:[(0,e.jsxs)(xe,{children:[(0,e.jsx)(de,{children:"Ash"}),(0,e.jsx)(he,{children:"Your AI growth guide â small steps toward the things you want to change"})]}),(0,e.jsxs)(me,{children:[(0,e.jsx)(o,{variant:"outline",asChild:!0,children:(0,e.jsxs)(c,{href:"/ash/career",children:[(0,e.jsx)(E,{className:"size-4"}),"Plan My Career"]})}),(0,e.jsx)(o,{variant:"outline",asChild:!0,children:(0,e.jsxs)(c,{href:"/ash/chat",children:[(0,e.jsx)(C,{className:"size-4"}),"Talk to Ash"]})}),p?(0,e.jsx)(o,{asChild:!0,children:(0,e.jsxs)(c,{href:"/ash/start",children:[(0,e.jsx)(y,{className:"size-4"}),"New goal"]})}):(0,e.jsxs)(T,{children:[(0,e.jsx)(z,{asChild:!0,children:(0,e.jsx)("span",{children:(0,e.jsxs)(o,{disabled:!0,children:[(0,e.jsx)(y,{className:"size-4"}),"New goal"]})})}),(0,e.jsx)(S,{children:g?`You're working on ${n} goals â finish or close one to start another.`:"Your Ash allowance is fully utilized. Contact HR or your administrator to start another course."})]})]})]}),(0,e.jsx)(je,{allowance:j,canViewUpgradeOptions:D,canManageBilling:R}),h.length>0&&(0,e.jsxs)("div",{className:"space-y-3",children:[(0,e.jsxs)("h2",{className:"flex items-center gap-2 text-sm font-semibold",children:[(0,e.jsx)(U,{className:"size-4 text-muted-foreground"}),"Assigned to you"]}),(0,e.jsx)("div",{className:"grid gap-4 md:grid-cols-2 xl:grid-cols-3",children:h.map(t=>(0,e.jsx)(m,{children:(0,e.jsxs)(u,{className:"flex h-full flex-col gap-3 p-5",children:[(0,e.jsxs)("div",{className:"space-y-1",children:[(0,e.jsx)("p",{className:"text-sm font-semibold",children:t.course_name}),(0,e.jsxs)("p",{className:"text-xs text-muted-foreground",children:["Assigned by"," ",t.assigned_by_name??"your manager"]}),t.notes&&(0,e.jsx)("p",{className:"line-clamp-2 text-xs text-muted-foreground",children:t.notes})]}),(0,e.jsxs)("div",{className:"mt-auto flex items-center justify-between gap-2",children:[t.due_date?(0,e.jsxs)("span",{className:"inline-flex items-center gap-1 text-xs text-muted-foreground",children:[(0,e.jsx)(I,{className:"size-3.5"}),"Due ",t.due_date]}):(0,e.jsx)("span",{}),(0,e.jsx)(v,{href:b("course_assignment",t.id),canStart:p,blockedReason:N})]})]})},t.id))})]}),d.length>0&&(0,e.jsxs)("div",{className:"space-y-3",children:[(0,e.jsxs)("h2",{className:"flex items-center gap-2 text-sm font-semibold",children:[(0,e.jsx)(x,{className:"size-4 text-muted-foreground"}),"Recommended from your review"]}),(0,e.jsx)("div",{className:"grid gap-4 md:grid-cols-2 xl:grid-cols-3",children:d.map(t=>(0,e.jsx)(m,{children:(0,e.jsxs)(u,{className:"flex h-full flex-col gap-3 p-5",children:[(0,e.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,e.jsxs)("div",{className:"space-y-1",children:[(0,e.jsx)("p",{className:"text-sm font-semibold",children:t.title}),(0,e.jsxs)("p",{className:"text-xs text-muted-foreground",children:["From"," ",t.s
1ource_label]})]}),(0,e.jsx)(o,{variant:"ghost",size:"icon",className:"size-7 shrink-0 text-muted-foreground","aria-label":"Dismiss recommendation",onClick:()=>P(t),children:(0,e.jsx)(A,{className:"size-3.5"})})]}),t.detail&&(0,e.jsx)("p",{className:"line-clamp-2 text-xs text-muted-foreground",children:t.detail}),(0,e.jsx)("div",{className:"mt-auto flex justify-end",children:(0,e.jsx)(v,{href:b(t.source_type,t.source_id,t.focus),canStart:p,blockedReason:N})})]})},t.focus))})]}),L?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)(fe,{children:[(0,e.jsx)(f,{icon:J,pattern:!0,value:r.current,label:"Day streak",sublabel:(0,e.jsxs)("span",{className:"flex flex-col gap-1.5",children:[(0,e.jsx)("span",{children:r.today_done?"Today is done â streak safe":"A step or check-in keeps it alive"}),(0,e.jsx)(be,{week:l})]})}),(0,e.jsx)(f,{icon:ee,pattern:!0,value:i.xp_earned.toLocaleString(),label:"XP earned with Ash"}),(0,e.jsx)(f,{icon:F,pattern:!0,value:i.steps_completed,label:"Steps completed"}),(0,e.jsx)(f,{icon:Z,pattern:!0,value:i.goals_completed,label:"Goals completed",sublabel:`Longest streak: ${r.longest} days`})]}),a&&(0,e.jsx)(m,{children:(0,e.jsxs)(u,{className:"flex flex-col gap-3 p-5 sm:flex-row sm:items-center sm:justify-between",children:[(0,e.jsxs)("div",{className:"flex items-center gap-3",children:[(0,e.jsx)("div",{className:"flex size-10 shrink-0 items-center justify-center rounded-lg bg-primary/10 text-primary",children:(0,e.jsx)(Q,{className:"size-5"})}),(0,e.jsxs)("div",{children:[(0,e.jsxs)("p",{className:"text-sm font-semibold",children:["Team momentum",a.actions>=a.target&&(0,e.jsxs)("span",{className:"ml-2 inline-flex items-center gap-1 rounded-full bg-primary/10 px-2 py-0.5 text-[10px] font-semibold text-primary",children:[(0,e.jsx)(x,{className:"size-3"}),"Weekly milestone hit"]})]}),(0,e.jsxs)("p",{className:"text-xs text-muted-foreground",children:["Your"," ",a.scope==="department"?"team":"organisation"," ","logged ",a.actions," ","learning"," ",a.actions===1?"action":"actions"," ","this week â"," ",a.participants," ","people learning together"]})]})]}),(0,e.jsxs)("div",{className:"flex items-center gap-2 sm:w-52",children:[(0,e.jsx)("div",{className:"h-1.5 flex-1 overflow-hidden rounded-full bg-muted",children:(0,e.jsx)("div",{className:"h-full rounded-full bg-linear-to-r from-primary to-secondary",style:{width:`${Math.min(100,Math.round(a.actions/a.target*100))}%`}})}),(0,e.jsxs)("span",{className:"shrink-0 text-[11px] font-medium text-muted-foreground",children:[a.actions,"/",a.target]})]})]})}),(0,e.jsxs)("div",{className:"space-y-3",children:[(0,e.jsxs)("h2",{className:"flex items-center gap-2 text-sm font-semibold",children:[(0,e.jsx)(G,{className:"size-4 text-muted-foreground"}),"Your active courses"]}),(0,e.jsxs)("div",{className:"grid gap-5 md:grid-cols-2 xl:grid-cols-3",children:[s.map(t=>(0,e.jsx)(Ce,{goal:t},t.id)),p&&(0,e.jsxs)(c,{href:"/ash/start",className:Y("flex min-h-56 flex-col items-center justify-center gap-2 rounded-xl border border-dashed","text-muted-foreground transition-colors hover:border-primary hover:text-primary"),children:[(0,e.jsx)(y,{className:"size-6"}),(0,e.jsx)("span",{className:"text-sm font-medium",children:"Start a new goal"})]})]})]})]}):(0,e.jsx)(m,{className:"overflow-hidden",children:(0,e.jsxs)(u,{className:"flex flex-col items-center gap-6 px-6 py-12 text-center",children:[(0,e.jsx)(ye,{state:"live",size:160}),(0,e.jsxs)("div",{className:"max-w-xl space-y-2",children:[(0,e.jsx)("h2",{className:"text-2xl font-semibold",children:"Meet Ash, your growth guide"}),(0,e.jsx)("p",{className:"text-muted-foreground",children:"Pick something you want to get better at â a promotion, a habit, a skill â and Ash will build you a personal journey of small steps: things to read, quizzes to test yourself, real-world practice, and guided conversations whenever you need them."})]}),j.can_start&&(0,e.jsx)(o,{size:"lg",asChild:!0,children:(0,e.jsxs)(c,{href:"/ash/start",children:[(0,e.jsx)(x,{className:"size-4"}),"Start your first goal"]})})]})}),(0,e.jsx)(Ae,{})]})]})}export{cs 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.