PageSourceSearch

https://tutorbuddi.ai/assets/SubjectDetail-ePwE1FDD.js

js tutorbuddi.ai collected 2026-10-05 13:59:38 UTC 20,936 bytes, 7 lines download raw bytes

vendor: 4,120 bytes, lines 1-7
1import{a as e,E as s,w as t,b as a,j as i,o as n,P as r,F as l,I as c,f as o,d}from"./ui-Dqaq1iaa.js";import{r as m,g as u,c as x,u as h}from"./vendor-D_xiAuUj.js";import{c as f,b as j,u as p,s as g,t as v,B as y,E as N}from"./index-BnJJh0He.js";import{I as b}from"./input-CNqaEQ6A.js";import{T as w}from"./textarea-D6BY2Ywy.js";import{C as _,d as S,a as k,b as C}from"./card-Bv8W4Zw2.js";import{B as D}from"./badge-DsrVKE-e.js";import{S as F}from"./StudentHeader-D-GI6CqW.js";import{B as E}from"./book-open-BdpWeFX0.js";import{F as M}from"./file-text-EmIGDVrR.js";import{P as T}from"./plus-XgcouN7V.js";import{S as U}from"./search-C7BVPTE8.js";import{U as B}from"./upload-CjReBW5Y.js";import{D as I}from"./download-CKzwwShh.js";import{T as L}from"./trash-2-DUPpklrF.js";import"./supabase-XAR8dl0U.js";import"./RobotIcon-t4AskJqO.js";import"./UsageHeaderIndicator-BGmgVUw5.js";import"./useUsageTracking-5jod-rZM.js";import"./ChoosePlanDialog-Cgeha1ht.js";import"./edgeError-TX0_vJhG.js";import"./loader-circle-Cc0eb4Pc.js";
2/**
3 * @license lucide-react v0.462.0 - ISC
4 *
5 * This source code is licensed under the ISC license.
6 * See the LICENSE file in the root directory of this source tree.
7 */const z=f("StickyNote",[["path",{d:"M16 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V8Z",key:"qazsjp"}],["path",{d:"M15 3v4a2 2 0 0 0 2 2h4",key:"40519r"}]]);var q="Tabs",[$,R]=e(q,[s]),P=s(),[V,A]=$(q),H=m.forwardRef((e,s)=>{const{__scopeTabs:l,value:c,onValueChange:o,defaultValue:d,orientation:m="horizontal",dir:u,activationMode:x="automatic",...h}=e,f=t(u),[j,p]=a({prop:c,onChange:o,defaultProp:d??"",caller:q});return i.jsx(V,{scope:l,baseId:n(),value:j,onValueChange:p,orientation:m,dir:f,activationMode:x,children:i.jsx(r.div,{dir:f,"data-orientation":m,...h,ref:s})})});H.displayName=q;var K="TabsList",O=m.forwardRef((e,s)=>{const{__scopeTabs:t,loop:a=!0,...n}=e,c=A(K,t),o=P(t);return i.jsx(l,{asChild:!0,...o,orientation:c.orientation,dir:c.dir,loop:a,children:i.jsx(r.div,{role:"tablist","aria-orientation":c.orientation,...n,ref:s})})});O.displayName=K;var G="TabsTrigger",Q=m.forwardRef((e,s)=>{const{__scopeTabs:t,value:a,disabled:n=!1,...l}=e,d=A(G,t),m=P(t),u=Z(d.baseId,a),x=J(d.baseId,a),h=a===d.value;return i.jsx(c,{asChild:!0,...m,focusable:!n,active:h,children:i.jsx(r.button,{type:"button",role:"tab","aria-selected":h,"aria-controls":x,"data-state":h?"active":"inactive","data-disabled":n?"":void 0,disabled:n,id:u,...l,ref:s,onMouseDown:o(e.onMouseDown,e=>{n||0!==e.button||!1!==e.ctrlKey?e.preventDefault():d.onValueChange(a)}),onKeyDown:o(e.onKeyDown,e=>{[" ","Enter"].includes(e.key)&&d.onValueChange(a)}),onFocus:o(e.onFocus,()=>{const e="manual"!==d.activationMode;h||n||!e||d.onValueChange(a)})})})});Q.displayName=G;var X="TabsContent",W=m.forwardRef((e,s)=>{const{__scopeTabs:t,value:a,forceMount:n,children:l,...c}=e,o=A(X,t),u=Z(o.baseId,a),x=J(o.baseId,a),h=a===o.value,f=m.useRef(h);return m.useEffect(()=>{const e=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(e)},[]),i.jsx(d,{present:n||h,children:({present:t})=>i.jsx(r.div,{"data-state":h?"active":"inactive","data-orientation":o.orientation,role:"tabpanel","aria-labelledby":u,hidden:!t,id:x,tabIndex:0,...c,ref:s,style:{...e.style,animationDuration:f.current?"0s":void 0},children:t&&l})})});function Z(e,s){return`${e}-trigger-${s}`}function J(e,s){return`${e}-content-${s}`}W.displayName=X;var Y=O,ee=Q,se=W;const te=H,ae=m.forwardRef(({className:e,...s},t)=>i.jsx(Y,{ref:t,className:j("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...s}));ae.displayName=Y.displayName;const ie=m.forwardRef(({className:e,...s},t)=>i.jsx(ee,{ref:t,className:j("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",e),...s}));
7ie.displayName=ee.displayName;const ne=m.forwardRef(({className:e,...s},t)=>i.jsx(se,{ref:t,className:j("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...s}));function re(){var e,s;const{subjectId:t}=u(),a=x(),n=h(),{user:r,studentSession:l}=p(),c=(null==r?void 0:r.id)||(null==l?void 0:l.auth_user_id),[o,d]=m.useState((null==(e=a.state)?void 0:e.subject)||null),[f,j]=m.useState("sessions"),[q,$]=m.useState(!1),[R,P]=m.useState([]),[V,A]=m.useState(!1),[H,K]=m.useState(null),[O,G]=m.useState([]);m.useState(""),m.useState(!1);const[Q,X]=m.useState([]),[W,Z]=m.useState(!1),[J,Y]=m.useState(!1),[ee,se]=m.useState(""),[re,le]=m.useState([]),[ce,oe]=m.useState(!1),[de,me]=m.useState({title:"",content:""}),[ue,xe]=m.useState(null);m.useEffect(()=>{!o&&t&&he()},[t,o]);const he=async()=>{try{$(!0);const e={math:{id:"math",name:"Mathematics",icon:"📐",color:"#3B82F6"},science:{id:"science",name:"Sciences",icon:"🔬",color:"#06B6D4"},english:{id:"english",name:"English",icon:"📚",color:"#10B981"},social:{id:"social",name:"Social Studies",icon:"🏛️",color:"#F59E0B"},languages:{id:"languages",name:"Languages",icon:"🌍",color:"#201B4A"}};if(e[t])d(e[t]);else{if(!c)throw new Error("User not authenticated");const{data:e,error:s}=await g.from("custom_subjects").select("*").eq("id",t).eq("user_id",c).single();if(s)throw s;e&&d(e)}}catch(e){v({title:"Error",description:"Failed to load subject data.",variant:"destructive"}),n("/subjects")}finally{$(!1)}},fe=async()=>{try{if(Z(!0),!c)return;const{data:e,error:s}=await g.from("subject_documents").select("*").eq("user_id",c).eq("subject_id",t).order("uploaded_at",{ascending:!1});if(s)throw s;X(e||[])}catch(e){}finally{Z(!1)}},je=async()=>{try{if(oe(!0),!c)return;const{data:e,error:s}=await g.from("subject_notes").select("*").eq("user_id",c).eq("subject_id",t).order("created_at",{ascending:!1});if(s)throw s;le(e||[])}catch(e){}finally{oe(!1)}}
7,pe=e=>{if(0===e)return"Quick chat";if(e<60)return`${e} min`;return`${Math.floor(e/60)}h ${e%60}m`},ge=e=>{if(!e||0===e.length)return"Study session";return e[0].user_message||"Study session"},ve=()=>{o&&(localStorage.removeItem("currentTutorSession"),n("/tutor",{state:{subjectId:o.id,subjectName:o.name,fromSubjectPage:`/subjects/${t}`,isNewSession:!0}}))};return m.useEffect(()=>{if(o)switch(f){case"sessions":(async()=>{try{if(A(!0),!c)return;const e={Mathematics:["Mathematics","Math"],Sciences:["Science","Sciences"],English:["English","English Literature"],"Social Studies":["Social Studies","History & Social Studies","History"],Languages:["Languages","Spanish","French","German"]}[(null==o?void 0:o.name)||""]||[(null==o?void 0:o.name)||""],{data:s}=await g.from("notebooks").select("folder_id").eq("user_id",c).in("name",e),t=(null==s?void 0:s.map(e=>e.folder_id))||[];if(0===t.length)return void P([]);const{data:a,error:i}=await g.from("study_sessions").select("\n          id,\n          created_at,\n          subject,\n          questions_asked,\n          session_duration_minutes,\n          notebook_folder_id,\n          ai_conversations (\n            id,\n            user_message,\n            ai_response,\n            created_at,\n            has_image,\n            image_url,\n            response_time_ms\n          )\n        ").eq("user_id",c).in("notebook_folder_id",t).order("created_at",{ascending:!1});if(i)throw i;const n=(a||[]).filter(e=>e.ai_conversations&&e.ai_conversations.length>0);P(n)}catch(e){v({title:"Error",description:"Failed to load study sessions.",variant:"destructive"})}finally{A(!1)}})();break;case"documents":fe();break;case"notes":je()}},[f,o]),q?i.jsx("div",{className:"min-h-screen bg-gray-50 flex items-center justify-center",children:i.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary"})}):o?i.jsxs("div",{className:"min-h-screen bg-gray-50",children:[i.jsx(F,{backButton:{label:"Back to Subjects",onClick:()=>n("/subjects")}}),i.jsxs("div",{className:"p-6",children:[i.jsx("div",{className:"mb-8",children:i.jsxs("div",{className:"flex items-center gap-4",children:[i.jsx("div",{className:"w-16 h-16 rounded-2xl flex items-center justify-center",style:{backgroundColor:o.color},children:i.jsx("span",{className:"text-3xl",children:o.icon})}),i.jsxs("div",{children:[i.jsx("h1",{className:"text-3xl font-bold text-navy font-display",children:o.name}),i.jsx("p",{className:"text-gray-600",children:"Manage your study materials and notes"})]})]})}),i.jsxs(te,{value:f,onValueChange:j,className:"w-full",children:[i.jsxs(ae,{className:"grid w-full grid-cols-3 max-w-md",children:[i.jsxs(ie,{value:"sessions",className:"flex items-center gap-2",children:[i.jsx(E,{className:"w-4 h-4"}),"Sessions"]}),i.jsxs(ie,{value:"documents",className:"flex items-center gap-2",children:[i.jsx(M,{className:"w-4 h-4"}),"Documents"]}),i.jsxs(ie,{value:"notes",className:"flex items-center gap-2",children:[i.jsx(z,{className:"w-4 h-4"}),"Notes"]})]}),i.jsx(ne,{value:"sessions",className:"mt-6",children:H?i.jsxs("div",{className:"space-y-4",children:[i.jsx("div",{className:"flex items-center justify-between mb-6",children:i.jsxs("div",{className:"flex items-center gap-4",children:[i.jsx(y,{variant:"outline",onClick:()=>K(null),className:"flex items-center gap-2",children:"← Back to Sessions"}),i.jsxs("div",{children:[i.jsx("h2",{className:"text-xl font-semibold font-display text-navy",children:"Chat Transcript"}),i.jsxs("p",{className:"text-gray-600 text-sm",children:[new Date(null==(s=O[0])?void 0:s.created_at).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit"})," • ",o.name]})]})]})}),i.jsx("div",{className:"space-y-4 max-h-96 overflow-y-auto bg-gray-50 rounded-lg p-4",children:[...O].map(e=>i.jsxs("div",{className:"space-y-2",children:[e.user_message&&i.jsx("div",{className:"flex justify-end",children:i.jsxs("div",{className:"bg-blue-500 text-white rounded-lg px-4 py-2 max-w-md",children:[e.image_url&&i.jsx("img",{src:e.image_url,alt:"Student's work",className:"mb-2 rounded max-w-full",style:{maxHeight:"200px"}}),i.jsx("p",{className:"text-sm whitespace-pre-wrap",children:e.user_message}),i.jsx("p",{className:"text-xs opacity-75 mt-1",children:new Date(e.created_at).toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit"})})]})}),e.ai_response&&i.jsx("div",{className:"flex justify-start",children:i.jsxs("div",{className:"bg-white text-gray-900 rounded-lg px-4 py-2 max-w-md 
7shadow-sm border",children:[i.jsx("p",{className:"text-sm whitespace-pre-wrap",children:e.ai_response}),i.jsxs("p",{className:"text-xs text-gray-500 mt-1",children:["Buddi • ",new Date(e.created_at).toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit"}),e.response_time_ms&&` • ${Math.round(e.response_time_ms/1e3)}s`]})]})})]},e.id))})]}):i.jsxs("div",{className:"space-y-4",children:[i.jsxs("div",{className:"flex justify-between items-center",children:[i.jsx("h2",{className:"text-xl font-semibold font-display text-navy",children:"Study Sessions"}),i.jsxs(y,{onClick:ve,size:"sm",className:"bg-navy hover:bg-[hsl(var(--primary-hover))] ml-4",children:[i.jsx(T,{className:"w-4 h-4 mr-2"}),"Start New Session"]})]}),V?i.jsx("div",{className:"text-center py-8",children:i.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary mx-auto"})}):R.length>0?i.jsx("div",{className:"space-y-3",children:R.map(e=>{var s,t,a,n,r,l;null==(s=e.ai_conversations)||s[0];const c=(null==(t=e.ai_conversations)?void 0:t.some(e=>e.has_image))||!1,d=null==(n=null==(a=e.ai_conversations)?void 0:a.find(e=>e.image_url))?void 0:n.image_url;return i.jsx(_,{className:"cursor-pointer hover:shadow-md transition-shadow",onClick:()=>(e=>{e.ai_conversations&&(G(e.ai_conversations),K(e.id))})(e),children:i.jsx(S,{className:"p-4",children:i.jsxs("div",{className:"flex gap-4",children:[i.jsx("div",{className:"w-12 h-12 rounded-lg flex items-center justify-center flex-shrink-0",style:{backgroundColor:o.color+"20"},children:i.jsx("span",{className:"text-2xl",children:o.icon})}),i.jsxs("div",{className:"flex-1 min-w-0",children:[i.jsxs("p",{className:"font-medium text-gray-900 truncate",children:[ge(e.ai_conversations).substring(0,60),ge(e.ai_conversations).length>60?"...":""]}),i.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-500 mt-1",children:[i.jsx("span",{children:new Date(e.created_at).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}),i.jsx("span",{children:"•"}),i.jsx("span",{children:new Date(e.created_at).toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit"})}),e.session_duration_minutes>0&&i.jsxs(i.Fragment,{children:[i.jsx("span",{children:"•"}),i.jsx(D,{variant:"secondary",className:"text-xs",children:pe(e.session_duration_minutes)})]})]}),i.jsxs("div",{className:"flex items-center gap-2 mt-2",children:[i.jsxs("span",{className:"text-xs text-gray-500",children:[(null==(r=e.ai_conversations)?void 0:r.length)||0," message",1!==(null==(l=e.ai_conversations)?void 0:l.length)?"s":""]}),c&&i.jsx(D,{variant:"outline",className:"text-xs",children:"📸 Drawing included"})]})]}),d&&i.jsx("div",{className:"w-16 h-16 rounded-lg overflow-hidden flex-shrink-0 bg-gray-100",children:i.jsx("img",{src:d,alt:"Session thumbnail",className:"w-full h-full object-cover"})}),i.jsx(N,{className:"w-5 h-5 text-gray-400 flex-shrink-0 self-center"})]})})},e.id)})}):i.jsxs("div",{className:"text-center py-12",children:[i.jsx(E,{className:"w-12 h-12 text-gray-400 mx-auto mb-4"}),i.jsx("h3",{className:"text-lg font-medium text-navy mb-2 font-display",children:"No study sessions yet"}),i.jsx("p",{className:"text-gray-600 mb-4",children:"Start your first AI tutoring session for this subject."}),i.jsxs(y,{onClick:ve,className:"bg-navy hover:bg-[hsl(var(--primary-hover))]",children:[i.jsx(T,{className:"w-4 h-4 mr-2"}),"Start New Session"]})]})]})}),i.jsx(ne,{value:"documents",className:"mt-6",children:i.jsxs("div",{className:"space-y-6",children:[i.jsxs("div",{className:"flex justify-between items-center",children:[i.jsx("h2",{className:"text-xl font-semibold font-display text-navy",children:"Documents"}),i.jsx("div",{className:"flex gap-3",children:i.jsxs("div",{className:"relative",children:[i.jsx(U,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400 w-4 h-4"}),i.jsx(b,{placeholder:"Search documents...",value:ee,onChange:e=>se(e.target.value),className:"pl-10 w-64"})]})})]}),i.jsx(_,{className:"border-2 border-dashed border-gray-300 hover:border-gray-400 transition-colors",children:i.jsx(S,{className:"p-8",children:i.jsxs("div",{className:"text-center",children:[i.jsx(B,{className:"w-12 h-12 text-gray-400 mx-auto mb-4"}),i.jsx("h3",{className:"text-lg font-medium text-navy mb-2 font-display",children:"Upload Documents"}),i.jsx("p",{className:"text-gray-600 mb-4",children:"Drop files here or click to upload (PDF, DOC, DOCX, TXT, Images)"}),i.jsx("input",{type:"file",multiple:!0,accept:".pdf,.doc,.docx,.txt,.jpg,.jpeg,.png,.gif",onChange:e=>e.target.files&&(async e=>{if(e.length&&o&&c){Y(!0);try{for(const s of Array.from(e)){if(s.size>10485760){v({title:"File too large",description:`${s.name} is over 10MB limit.`,variant:"destructive"});continue}const e=`${c}/${Date.now()}-${s.name}`,{error:t}=await g.storage.from("subject-documents").upload(e,s);if(t)throw t;const{data:{publicUrl:a}}=g.storage.from("subject-documents").getPublicUrl(e),{error:i}=await g.from("subject_documents").insert({subject_id:o.id,user_id:c,file_name:s.name,file_url:a,file_type:s.type,file_size:s.size});if(i)throw i}v({title:"Success",description:"Files uploaded successfully!"}),fe()}catch(s){v({title:"Upload Error",description:s.message||"Failed to upload files.",variant:"destructive"})}finally{Y(!1)}}})(e.target.files),className:"hidden",id:"file-upload"}),i.jsx("label",{htmlFor:"file-upload",children:i.jsx(y,{variant:"outline",className:"cursor-pointer",disabled:J,children:J?"Uploading...":"Select Files"})}),i.jsx("p",{className:"text-xs text-gray-500 mt-2",children:"Maximum file size: 10MB"})]})})}),W?i.jsx("div",{className:"text-center py-8",children:i.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary mx-auto"})}):Q.length>0?i.jsx("div",{className:"space-y-3",children:Q.filter(e=>e.file_name.toLowerCase().includes(ee.toLowerCase())).map(e=>i.jsx(_,{children:i.jsx(S,{className:"p-4",children:i.jsxs("div",{className:"flex justify-between items-center",children:[i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx(M,{className:"w-8 h-8 text-blue-500"}),i.jsxs("div",{children:[i.jsx("p",{className:"font-medium text-gray-900",children:e.file_name}),i.jsxs("p",{className:"text-sm text-gray-500",children:[new Date(e.uploaded_at).toLocaleDateString()," •",(e.file_size/1024/1024).toFixed(2)," MB"]})]})]}),i.jsxs("div",{className:"flex gap-2",children:[i.jsx(y,{variant:"outline",size:"sm",children:i.jsx(N,{className:"w-4 h-4"})}),i.jsx(y,{variant:"outline",size:"sm",children:i.jsx(I,{className:"w-4 h-4"})}),i.jsx(y,{variant:"outline",size:"sm",className:"text-red-600 hover:text-red-700",children:i.jsx(L,{className:"w-4 h-4"})})]})]})})},e.id))}):i.jsxs("div",{className:"text-center py-12",children:[i.jsx(M,{className:"w-12 h-12 text-gray-400 mx-auto mb-4"}),i.jsx("h3",{className:"text-lg font-medium text-navy mb-2 font-display",children:"No documents yet"}),i.jsx("p",{className:"text-gray-600",children:"Upload your first document to get started."})]})]})}),i.jsx(ne,{value:"notes",className:"mt-6",children:i.jsxs("div",{className:"space-y-6",children:[i.jsx("div",{className:"flex justify-between items-center",children:i.jsx("h2",{className:"text-xl font-semibold font-display text-navy",children:"Notes"})}),i.jsxs(_,{children:[i.jsx(k,{children:i.jsx(C,{className:"font-display text-navy",children:ue?"Edit Note":"Create New Note"})}),i.jsxs(S,{className:"space-y-4",children:[i.jsx(b,{placeholder:"Note title...",value:de.title,onChange:e=>me({...de,title:e.target.value})}),i.jsx(w,{placeholder:"Write your note here...",value:de.content,onChange:e=>me({...de,content:e.target.value}),rows:6}),i.jsxs("div",{className:"flex gap-2",children:[i.jsx(y,{onClick:async()=>
7{if(de.title.trim()&&o&&c)try{if(ue){const{error:e}=await g.from("subject_notes").update({title:de.title,content:de.content}).eq("id",ue).eq("user_id",c);if(e)throw e}else{const{error:e}=await g.from("subject_notes").insert({subject_id:o.id,user_id:c,title:de.title,content:de.content});if(e)throw e}me({title:"",content:""}),xe(null),je(),v({title:"Success",description:ue?"Note updated!":"Note created!"})}catch(e){v({title:"Error",description:e.message||"Failed to save note.",variant:"destructive"})}},disabled:!de.title.trim(),children:ue?"Update Note":"Save Note"}),ue&&i.jsx(y,{variant:"outline",onClick:()=>{xe(null),me({title:"",content:""})},children:"Cancel"})]})]})]}),ce?i.jsx("div",{className:"text-center py-8",children:i.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary mx-auto"})}):re.length>0?i.jsx("div",{className:"space-y-3",children:re.map(e=>i.jsx(_,{children:i.jsx(S,{className:"p-4",children:i.jsxs("div",{className:"flex justify-between items-start",children:[i.jsxs("div",{className:"flex-1",children:[i.jsx("h3",{className:"font-medium text-navy mb-2 font-display",children:e.title}),i.jsx("p",{className:"text-gray-600 text-sm mb-2",children:e.content?e.content.substring(0,150)+(e.content.length>150?"...":""):"No content"}),i.jsxs("p",{className:"text-xs text-gray-500",children:["Created: ",new Date(e.created_at).toLocaleDateString(),e.updated_at!==e.created_at&&i.jsxs("span",{children:[" • Updated: ",new Date(e.updated_at).toLocaleDateString()]})]})]}),i.jsxs("div",{className:"flex gap-2",children:[i.jsx(y,{variant:"outline",size:"sm",onClick:()=>{xe(e.id),me({title:e.title,content:e.content||""})},children:"Edit"}),i.jsx(y,{variant:"outline",size:"sm",className:"text-red-600 hover:text-red-700",children:i.jsx(L,{className:"w-4 h-4"})})]})]})})},e.id))}):i.jsxs("div",{className:"text-center py-12",children:[i.jsx(z,{className:"w-12 h-12 text-gray-400 mx-auto mb-4"}),i.jsx("h3",{className:"text-lg font-medium text-navy mb-2 font-display",children:"No notes yet"}),i.jsx("p",{className:"text-gray-600",children:"Create your first note to get started."})]})]})})]})]})]}):i.jsx("div",{className:"min-h-screen bg-gray-50 flex items-center justify-center",children:i.jsxs("div",{className:"text-center",children:[i.jsx("h2",{className:"text-2xl font-bold text-navy mb-4 font-display",children:"Subject not found"}),i.jsx(y,{onClick:()=>n("/subjects"),children:"Back to Subjects"})]})})}ne.displayName=se.displayName;export{re 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.