1import{c as fe,w as R,j as e,p as oe,r,g as de,I as xe,a0 as Ne,ak as ye,B as f,a1 as we,a2 as Se,a3 as Ce,S as _e,E as ke,F as Te,d as Ae,J as Fe,X as Re,C as Le,a as Oe,H as me,i as De,P as Ie,b as F}from"./index-CPFvzlBD.js";import{T as ae,a as le,b as q}from"./tabs-BQTsEDJ5.js";import{D as Me,a as Ve,b as Ee,c as He}from"./dialog-CBPRTfpZ.js";import{B as o}from"./badge-XMFmxju2.js";import{E as K}from"./external-link-DL0O_pSN.js";import{F as G}from"./file-text-Dz19IOwT.js";import{P as he}from"./play-DUVEs6FB.js";import{C as Pe}from"./clock-BxiUq1SZ.js";import{S as V,a as E,b as H,c as P,d as m}from"./select--AF8_XKE.js";import{C as v}from"./checkbox-BBC1CWpc.js";import{S as pe}from"./search-4MQ6FZFQ.js";import{F as te}from"./filter-BDVbkyn3.js";import{S as re}from"./star-D8ts0wGo.js";import{G as Be}from"./globe-CgWcsyEl.js";import{M as Ke}from"./map-pin-CdmjOP-o.js";import{S as ue}from"./sparkles-CnnGS1Vk.js";import{V as Ue}from"./video-C6IkN6FI.js";import"./index-BdQq_4o_.js";import"./index-BL69qbWz.js";import"./index-B2CeXs0N.js";import"./check-CaoLPbue.js";/** 2 * @license lucide-react v0.475.0 - ISC 3 * 4 * This source code is licensed under the ISC license. 5 * See the LICENSE file in the root directory of this source tree. 6 */const We=[["path",{d:"M3 14h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-7a9 9 0 0 1 18 0v7a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3",key:"1xhozi"}]],qe=fe("Headphones",We),Ge={article:G,video:he,exercise:R,tool:R,podcast:qe,guide:G,external_link:K},ie={ptsd:"border-red-300 text-red-700 bg-red-50",anxiety:"border-orange-300 text-orange-700 bg-orange-50",depression:"border-blue-300 text-blue-700 bg-blue-50",sleep:"border-purple-300 text-purple-700 bg-purple-50",relationships:"border-pink-300 text-pink-700 bg-pink-50",career:"border-emerald-300 text-emerald-700 bg-emerald-50",physical_health:"border-green-300 text-green-700 bg-green-50",mindfulness:"border-cyan-300 text-cyan-700 bg-cyan-50",crisis:"border-red-300 text-red-700 bg-red-50",general:"border-slate-300 text-slate-700 bg-slate-50"};function ne({resource:t,onClick:u}){const i=Ge[t.resource_type]||G;return e.jsxs(oe.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},whileHover:{y:-4},onClick:u,className:"bg-white border border-slate-200 rounded-2xl overflow-hidden cursor-pointer group hover:border-navy-600 hover:shadow-md transition-all shadow-sm",children:[t.thumbnail_url?e.jsxs("div",{className:"aspect-video relative overflow-hidden",children:[e.jsx("img",{src:t.thumbnail_url,alt:t.title,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-300"}),t.resource_type==="video"&&e.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-black/40",children:e.jsx("div",{className:"w-14 h-14 bg-white/20 backdrop-blur-sm rounded-full flex items-center justify-center group-hover:bg-navy-600/80 transition-colors",children:e.jsx(he,{className:"w-6 h-6 text-white ml-1"})})}),t.duration_minutes&&e.jsxs("div",{className:"absolute bottom-2 right-2 px-2 py-1 bg-black/70 rounded-md text-xs text-white flex items-center gap-1",children:[e.jsx(Pe,{className:"w-3 h-3"}),t.duration_minutes," min"]})]}):e.jsx("div",{className:"aspect-video bg-gradient-to-br from-slate-100 to-slate-200 flex items-center justify-center",children:e.jsx(i,{className:"w-12 h-12 text-slate-400"})}),e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx(o,{variant:"outline",className:ie[t.category]||ie.general,children:t.category.replace("_"," ")}),t.is_featured&&e.jsx(o,{className:"bg-navy-600 text-white",children:"Featured"})]}),e.jsx("h3",{className:"font-semibold text-slate-900 mb-2 line-clamp-2 group-hover:text-navy-600 transition-colors",children:t.title}),e.jsx("p",{className:"text-sm text-slate-500 line-clamp-2 mb-3",children:t.description}),e.jsxs("div",{className:"flex items-center justify-between text-xs text-slate-500",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(i,{className:"w-4 h-4"}),t.resource_type.replace("_"," ")]}),t.source&&e.jsx("span",{children:t.source})]})]})]})}const B={crisis_hotline:{label:"Crisis Hotline",color:"bg-red-100 text-red-800"},counseling:{label:"Counseling",color:"bg-blue-100 text-blue-800"},therapy:{label:"Therapy",color:"bg-purple-100 text-purple-800"},support_group:{label:"Support Group",color:"bg-green-100 text-green-800"},inpatient:{label:"Inpatient",color:"bg-orange-100 text-orange-800"},outpatient:{label:"Outpatient",color:"bg-teal-100 text-teal-800"},telehealth:{label:"Telehealth",color:"bg-indigo-100 text-indigo-800"},peer_support:{label:"Peer Support",color:"bg-pink-100 text-pink-800"}
6,substance_abuse:{label:"Substance Abuse",color:"bg-amber-100 text-amber-800"},ptsd_treatment:{label:"PTSD Treatment",color:"bg-rose-100 text-rose-800"},family_support:{label:"Family Support",color:"bg-cyan-100 text-cyan-800"},financial_assistance:{label:"Financial Help",color:"bg-emerald-100 text-emerald-800"},housing:{label:"Housing",color:"bg-lime-100 text-lime-800"},employment:{label:"Employment",color:"bg-sky-100 text-sky-800"},legal:{label:"Legal",color:"bg-slate-100 text-slate-800"},other:{label:"Other",color:"bg-gray-100 text-gray-800"}},Ye=["PTSD","Depression","Anxiety","Substance Abuse","Suicide Prevention","Trauma","Grief","Anger Management","Sleep Disorders","TBI","Relationship Issues","Career Transition","MST"],$e=[{value:"veterans",label:"Veterans"},{value:"first_responders",label:"First Responders"},{value:"active_duty",label:"Active Duty"},{value:"families",label:"Family Members"}],ce=["AL","AK","AZ","AR","CA","CO","CT","DE","FL","GA","HI","ID","IL","IN","IA","KS","KY","LA","ME","MD","MA","MI","MN","MS","MO","MT","NE","NV","NH","NJ","NM","NY","NC","ND","OH","OK","OR","PA","RI","SC","SD","TN","TX","UT","VT","VA","WA","WV","WI","WY"];function ze(){const[t,u]=r.useState(""),[i,N]=r.useState("all"),[d,y]=r.useState("all"),[c,w]=r.useState([]),[l,h]=r.useState([]),[b,L]=r.useState(!1),[g,S]=r.useState(!1),[j,C]=r.useState(!1),[_,a]=r.useState(!1),[p,Y]=r.useState(!1),{data:U=[],isLoading:O}=de({queryKey:["mental-health-resources"],queryFn:()=>F.entities.MentalHealthResource.filter({is_active:!0},"name")}),k=U.filter(s=>{var Z,ee,se;const n=!t||((Z=s.name)==null?void 0:Z.toLowerCase().includes(t.toLowerCase()))||((ee=s.description)==null?void 0:ee.toLowerCase().includes(t.toLowerCase()))||((se=s.city)==null?void 0:se.toLowerCase().includes(t.toLowerCase())),x=i==="all"||s.is_national||s.state===i,D=d==="all"||s.service_type===d,I=c.length===0||c.some(W=>{var A;return(A=s.serves)==null?void 0:A.includes(W)}),M=l.length===0||l.some(W=>{var A;return(A=s.specialty)==null?void 0:A.includes(W)}),be=!b||s.is_free,ge=!g||s.accepts_va,je=!j||s.is_24_7,ve=!_||s.is_national;return n&&x&&D&&I&&M&&be&&ge&&je&&ve}),$=k.filter(s=>s.is_featured),z=k.filter(s=>!s.is_featured),J=()=>{u(""),N("all"),y("all"),w([]),h([]),L(!1),S(!1),C(!1),a(!1)},T=[i!=="all",d!=="all",c.length>0,l.length>0,b,g,j,_].filter(Boolean).length,Q=()=>e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("label",{className:"text-sm font-medium text-slate-700 mb-2 block",children:"Service Type"}),e.jsxs(V,{value:d,onValueChange:y,children:[e.jsx(E,{children:e.jsx(H,{placeholder:"All Types"})}),e.jsxs(P,{children:[e.jsx(m,{value:"all",children:"All Types"}),Object.entries(B).map(([s,{label:n}])=>e.jsx(m,{value:s,children:n},s))]})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-sm font-medium text-slate-700 mb-2 block",children:"State"}),e.jsxs(V,{value:i,onValueChange:N,children:[e.jsx(E,{children:e.jsx(H,{placeholder:"All States"})}),e.jsxs(P,{children:[e.jsx(m,{value:"all",children:"All States"}),ce.map(s=>e.jsx(m,{value:s,children:s},s))]})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-sm font-medium text-slate-700 mb-2 block",children:"Who They Serve"}),e.jsx("div",{className:"space-y-2",children:$e.map(s=>e.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[e.jsx(v,{checked:c.includes(s.value),onCheckedChange:n=>{w(n?[...c,s.value]:c.filter(x=>x!==s.value))}}),e.jsx("span",{className:"text-sm",children:s.label})]},s.value))})]}),e.jsxs(ke,{children:[e.jsxs(Te,{className:"flex items-center justify-between w-full text-sm font-medium text-slate-700",children:["Specialties",e.jsx(Ae,{className:"w-4 h-4"})]}),e.jsx(Fe,{className:"mt-2 space-y-2",children:Ye.map(s=>e.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[e.jsx(v,{checked:l.includes(s),onCheckedChange:n=>{h(n?[...l,s]:l.filter(x=>x!==s))}}),e.jsx("span",{className:"text-sm",children:s})]},s))})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-sm font-medium text-slate-700 mb-2 block",children:"Qu
6ick Filters"}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[e.jsx(v,{checked:b,onCheckedChange:L}),e.jsx("span",{className:"text-sm",children:"Free Services Only"})]}),e.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[e.jsx(v,{checked:g,onCheckedChange:S}),e.jsx("span",{className:"text-sm",children:"Accepts VA Benefits"})]}),e.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[e.jsx(v,{checked:j,onCheckedChange:C}),e.jsx("span",{className:"text-sm",children:"24/7 Available"})]}),e.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[e.jsx(v,{checked:_,onCheckedChange:a}),e.jsx("span",{className:"text-sm",children:"National Resources"})]})]})]}),T>0&&e.jsxs(f,{variant:"outline",onClick:J,className:"w-full",children:[e.jsx(Re,{className:"w-4 h-4 mr-2"}),"Clear All Filters"]})]}),X=({resource:s,featured:n=!1})=>{var x,D,I;return e.jsx(Le,{className:`hover:shadow-md transition-shadow ${n?"border-2 border-amber-400 bg-amber-50/30":""}`,children:e.jsx(Oe,{className:"p-5",children:e.jsxs("div",{className:"flex items-start gap-4",children:[s.logo_url?e.jsx("img",{src:s.logo_url,alt:"",className:"w-14 h-14 rounded-lg object-contain bg-white border"}):e.jsx("div",{className:"w-14 h-14 rounded-lg bg-slate-100 flex items-center justify-center flex-shrink-0",children:e.jsx(me,{className:"w-6 h-6 text-slate-400"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"flex items-start justify-between gap-2",children:e.jsxs("div",{children:[e.jsxs("h3",{className:"font-semibold text-slate-900 flex items-center gap-2",children:[s.name,s.verified&&e.jsx(De,{className:"w-4 h-4 text-green-600"}),n&&e.jsx(re,{className:"w-4 h-4 text-amber-500 fill-amber-500"})]}),e.jsxs("div",{className:"flex flex-wrap gap-1.5 mt-1",children:[e.jsx(o,{className:((x=B[s.service_type])==null?void 0:x.color)||"bg-gray-100",children:((D=B[s.service_type])==null?void 0:D.label)||s.service_type}),s.is_free&&e.jsx(o,{variant:"outline",className:"text-green-700 border-green-300",children:"Free"}),s.is_24_7&&e.jsx(o,{variant:"outline",className:"text-blue-700 border-blue-300",children:"24/7"}),s.is_national&&e.jsx(o,{variant:"outline",className:"text-purple-700 border-purple-300",children:"National"})]})]})}),s.description&&e.jsx("p",{className:"text-sm text-slate-600 mt-2 line-clamp-2",children:s.description}),e.jsxs("div",{className:"flex flex-wrap gap-x-4 gap-y-1 mt-3 text-sm text-slate-600",children:[s.phone&&e.jsxs("a",{href:`tel:${s.phone}`,className:"flex items-center gap-1 hover:text-navy-600",children:[e.jsx(Ie,{className:"w-3.5 h-3.5"}),s.phone]}),s.website&&e.jsxs("a",{href:s.website,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 hover:text-navy-600",children:[e.jsx(Be,{className:"w-3.5 h-3.5"}),"Website"]}),(s.city||s.state)&&!s.is_national&&e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(Ke,{className:"w-3.5 h-3.5"}),[s.city,s.state].filter(Boolean).join(", ")]})]}),((I=s.specialty)==null?void 0:I.length)>0&&e.jsxs("div",{className:"flex flex-wrap gap-1 mt-2",children:[s.specialty.slice(0,4).map(M=>e.jsx("span",{className:"text-xs bg-slate-100 text-slate-600 px-2 py-0.5 rounded",children:M},M)),s.specialty.length>4&&e.jsxs("span",{className:"text-xs text-slate-500",children:["+",s.specialty.length-4," more"]})]})]})]})})})};return O?e.jsx("div",{className:"text-center py-12 text-slate-500",children:"Loading resources..."}):e.jsxs("div",{children:[e.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 mb-6",children:[e.jsxs("div",{className:"relative flex-1",children:[e.jsx(pe,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-slate-400"}),e.jsx(xe,{placeholder:"Search resources by name, description, or city...",value:t,onChange:s=>u(s.target.value),className:"pl-10"})]}),e.jsxs("div",{className:"hidden lg:flex gap-2",children:[e.jsxs(V,{value:d,onValueChange:y,children:[e.jsx(E,{className:"w-40",children:e.jsx(H,{placeholder:"Service Type"})}),e.jsxs(P,{children:[e.jsx(m,{value:"all",children:"All Types"}
6),Object.entries(B).map(([s,{label:n}])=>e.jsx(m,{value:s,children:n},s))]})]}),e.jsxs(V,{value:i,onValueChange:N,children:[e.jsx(E,{className:"w-32",children:e.jsx(H,{placeholder:"State"})}),e.jsxs(P,{children:[e.jsx(m,{value:"all",children:"All States"}),ce.map(s=>e.jsx(m,{value:s,children:s},s))]})]})]}),e.jsxs(Ne,{children:[e.jsx(ye,{asChild:!0,children:e.jsxs(f,{variant:"outline",className:"lg:hidden",children:[e.jsx(te,{className:"w-4 h-4 mr-2"}),"Filters",T>0&&e.jsx(o,{className:"ml-2 bg-navy-600",children:T})]})}),e.jsxs(we,{side:"right",className:"w-80",children:[e.jsx(Se,{children:e.jsx(Ce,{children:"Filter Resources"})}),e.jsx("div",{className:"mt-6",children:e.jsx(Q,{})})]})]})]}),e.jsxs("div",{className:"flex gap-6",children:[e.jsx("div",{className:"hidden lg:block w-64 flex-shrink-0",children:e.jsxs("div",{className:"sticky top-6 bg-white rounded-xl border p-4",children:[e.jsxs("h3",{className:"font-semibold text-slate-900 mb-4 flex items-center gap-2",children:[e.jsx(te,{className:"w-4 h-4"}),"Filters",T>0&&e.jsx(o,{className:"bg-navy-600",children:T})]}),e.jsx(Q,{})]})}),e.jsxs("div",{className:"flex-1",children:[e.jsxs("p",{className:"text-sm text-slate-500 mb-4",children:["Showing ",k.length," resource",k.length!==1?"s":""]}),k.length===0?e.jsxs("div",{className:"text-center py-12 bg-slate-50 rounded-xl",children:[e.jsx(_e,{className:"w-12 h-12 mx-auto mb-3 text-slate-300"}),e.jsx("p",{className:"text-slate-600",children:"No resources match your filters"}),e.jsx(f,{variant:"link",onClick:J,children:"Clear filters"})]}):e.jsxs("div",{className:"space-y-4",children:[$.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("h3",{className:"text-sm font-semibold text-amber-700 flex items-center gap-1",children:[e.jsx(re,{className:"w-4 h-4"})," Featured Resources"]}),$.map(s=>e.jsx(X,{resource:s,featured:!0},s.id)),z.length>0&&e.jsx("div",{className:"border-t my-4"})]}),z.map(s=>e.jsx(X,{resource:s},s.id))]})]})]})]})}const Je=[{value:"all",label:"All"},{value:"ptsd",label:"PTSD"},{value:"anxiety",label:"Anxiety"},{value:"depression",label:"Depression"},{value:"sleep",label:"Sleep"},{value:"mindfulness",label:"Mindfulness"},{value:"relationships",label:"Relationships"},{value:"career",label:"Career"}],Qe=[{title:"PTSD Coach",url:"https://www.ptsd.va.gov/appvid/mobile/ptsdcoach_app.asp",icon:R},{title:"Mindfulness Coach",url:"https://www.ptsd.va.gov/appvid/mobile/mindfulcoach_app.asp",icon:ue},{title:"Make the Connection",url:"https://www.maketheconnection.net/",icon:Ue},{title:"VA Resources",url:"https://www.mentalhealth.va.gov/",icon:K}];function vs(){const[t,u]=r.useState(null),[i,N]=r.useState(""),[d,y]=r.useState("all"),[c,w]=r.useState("all"),[l,h]=r.useState(null);r.useEffect(()=>{(async()=>{try{const p=await F.auth.me();u(p)}catch{F.auth.redirectToLogin(window.location.pathname)}})()},[]);const{data:b=[],isLoading:L}=de({queryKey:["resources"],queryFn:()=>F.entities.Resource.filter({},"-view_count")}),g=b.filter(a=>{var O;const p=!i||a.title.toLowerCase().includes(i.toLowerCase())||((O=a.description)==null?void 0:O.toLowerCase().includes(i.toLowerCase())),Y=d==="all"||a.category===d,U=c==="all"||a.resource_type===c;return p&&Y&&U}),S=b.filter(a=>a.is_featured).slice(0,4),j=async a=>{h(a),await F.entities.Resource.update(a.id,{view_count:(a.view_count||0)+1})},[C,_]=r.useState("library");return e.jsxs("div",{className:"min-h-screen bg-slate-50 p-3 sm:p-4 lg:p-6 pb-24 sm:pb-6 overflow-x-hidden",children:[e.jsxs(oe.div,{initial:{opacity:0,y:-20},animate:{opacity:1,y:0},className:"mb-6",children:[e.jsx("h1",{className:"text-2xl lg:text-3xl font-bold text-slate-900 mb-2",children:"Resources"}),e.jsx("p",{className:"text-slate-600",children:"Curated tools, articles, videos, and mental health services."})]}),e.jsx(ae,{value:C,onValueChange:_,className:"mb-6",children:e.jsxs(le,{className:"bg-white border w-full sm:w-auto",children:[e.jsxs(q,{value:"library",className:"data-[state=active]:bg-navy-600 data-[state=active]:text-black text-xs sm:text-sm flex-1 sm:flex-none",children:[e.jsx(R,{className:"w-4 h-4 mr-1 sm:mr-2"}),"Resource Library"]}),e.jsxs(q,{value:"directory",className:"data-[state=active]:bg-navy-600 data-[state=active]:text-black text-xs sm:text-sm flex-1 sm:flex-none",children:[e.jsx(me,{className:"w-4 h-4 mr-1 sm:mr-2"}),"Mental Health Directory"]})]})}),C==="directory"?e.jsx(ze,{}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-2 sm:gap-3 mb-6",children:Qe.map((a,p)=>e.jsxs("a",{href:a.url,target:"_blank",rel:"noopener noreferrer",className:"bg-white border border-slate-200 rounded-xl p-3 sm:p-4 hover:border-navy-600 hover:shadow-md transition-all group shadow-sm min-w-0",children:[e.jsx(a.icon,{className:"w-5 h-5 sm:w-6 sm:h-6 text-navy-600 mb-2"}),e.jsx("span",{className:"text-xs sm:text-sm font-medium text-slate-900 group-hover:text-navy-600 transition-colors block truncate",children:a.title}),e.jsx(K,{className:"w-3.5 h-3.5 sm:w-4 sm:h-4 text-slate-400 mt-2"})]},p))}),S.length>0&&e.jsxs("div",{className:"mb-6",children:[e.jsxs("h2",{className:"text-lg font-semibold text-slate-900 mb-4 flex items-center gap-2",children:[e.jsx(ue,{className:"w-5 h-5 text-save22-red"}),"Featured Resources"]}),e.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-4 gap-4",children:S.map(a=>e.jsx(ne,{resource:a,onClick:()=>j(a)},a.id))})]}),e.jsxs("div",{className:"flex flex-col lg:flex-row gap-4 mb-6",children:[e.jsxs("div",{className:"relative flex-1 max-w-md",children:[e.jsx(pe,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-slate-400"}),e.jsx(xe,{placeholder:"Search resources...",value:i,onChange:a=>N(a.target.value),className:"pl-10 bg-white border-slate-200"})]}),e.jsx("div",{className:"flex gap-2 overflow-x-auto w-full",children:e.jsx(ae,{value:d,onValueChange:y,className:"w-full",children:e.jsx(le,{className:"bg-white border border-slate-200 flex-wrap h-auto w-full justify-start",children:Je.map(a=>e.jsx(q,{value:a.value,className:"data-[state=active]:bg-slate-900 data-[state=active]:text-white text-xs sm:text-sm px-2 sm:px-3",children:a.label},a.value))})})})]}),e.jsx("div",{className:"flex flex-wrap gap-2 mb-6",children:["all","article","video","exercise","podcast","guide"].map(a=>e.jsx(f,{variant:c===a?"default":"outline",size:"sm",onClick:()=>w(a),className:`text-xs sm:text-sm px-2 sm:px-3 ${c===a?"bg-navy-600 text-white":"border-slate-200 text-slate-600"}`,children:a==="all"?"All Types":a.charAt(0).toUpperCase()+a.slice(1)},a))}),L?e.jsxs("div",{className:"text-center py-12",children:[e.jsx("div",{className:"animate-spin w-8 h-8 border-2 border-navy-600 border-t-transparent roun
6ded-full mx-auto mb-4"}),e.jsx("p",{className:"text-slate-500",children:"Loading resources..."})]}):g.length>0?e.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:g.map(a=>e.jsx(ne,{resource:a,onClick:()=>j(a)},a.id))}):e.jsxs("div",{className:"text-center py-16",children:[e.jsx(R,{className:"w-16 h-16 mx-auto mb-4 text-slate-300"}),e.jsx("h3",{className:"text-xl font-semibold text-slate-900 mb-2",children:"No Resources Found"}),e.jsx("p",{className:"text-slate-500",children:"Try adjusting your search or filters"})]}),e.jsx(Me,{open:!!l,onOpenChange:()=>h(null),children:e.jsxs(Ve,{className:"bg-white border-slate-200 max-w-2xl",children:[e.jsx(Ee,{children:e.jsx(He,{className:"text-slate-900",children:l==null?void 0:l.title})}),l&&e.jsxs("div",{className:"space-y-4",children:[l.thumbnail_url&&e.jsx("div",{className:"aspect-video rounded-xl overflow-hidden",children:e.jsx("img",{src:l.thumbnail_url,alt:l.title,className:"w-full h-full object-cover"})}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsx(o,{variant:"outline",className:"border-navy-600 text-navy-600",children:l.category.replace("_"," ")}),e.jsx(o,{variant:"outline",className:"border-slate-300 text-slate-600",children:l.resource_type.replace("_"," ")}),l.source&&e.jsx(o,{variant:"outline",className:"border-blue-300 text-blue-600",children:l.source})]}),e.jsx("p",{className:"text-slate-600",children:l.description}),l.content&&e.jsx("div",{className:"bg-slate-50 rounded-xl p-4 text-slate-600 text-sm border border-slate-200",children:l.content}),e.jsxs("div",{className:"flex gap-3",children:[l.external_url&&e.jsx("a",{href:l.external_url,target:"_blank",rel:"noopener noreferrer",className:"flex-1",children:e.jsxs(f,{className:"w-full bg-navy-600 hover:bg-navy-700 text-white",children:[e.jsx(K,{className:"w-4 h-4 mr-2"}),"Open Resource"]})}),e.jsx(f,{variant:"outline",onClick:()=>h(null),children:"Close"})]})]})]})})]})]})}export{vs 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.