1import T from"./ORdspK0P.js";import{_ as S}from"./BMvFWDje.js";import{e as B,f as V,r as j,h as y,i as L,j as U,c as a,a as o,t as s,n as p,q as i,F as m,k as x,o as n,x as q,w as z,p as k,b as w,d as F}from"./BwiL4MjS.js";import{u as H}from"./D1E5sCy5.js";import{q as M}from"./CA9UX039.js";const P={class:"min-h-screen bg-white py-20"},W={class:"mx-auto max-w-5xl px-4 sm:px-6 lg:px-8"},G={class:"mb-10 text-center"},J={class:"relative inline-block text-4xl font-bold text-[#004d80] after:mx-auto after:mt-2 after:block after:h-1 after:w-2/3 after:bg-blue-500 after:content-['']"},K={class:"mx-auto mt-6 max-w-2xl text-lg text-slate-600"},O={class:"mb-8 flex flex-wrap items-center justify-center gap-2"},Q={class:"mr-1 text-sm text-slate-500"},R=["title","onClick"],X={key:0,class:"rounded-xl border border-slate-200 bg-white p-6 text-center text-slate-600"},Y={key:1,class:"rounded-xl border border-red-200 bg-red-50 p-6 text-center text-red-700"},Z={key:2,"data-landmark":"insights",class:"space-y-4"},ee={class:"mb-2 flex flex-wrap items-center gap-2 text-xs"},te={class:"text-slate-400"},se={key:0,class:"inline-flex items-center gap-1 text-teal-600"},oe={class:"text-xl font-bold leading-snug text-slate-900 transition group-hover:text-teal-700"},ne={class:"mt-2 leading-relaxed text-slate-600"},ae={key:0,class:"mt-3 flex items-center gap-1.5 text-sm text-slate-500"},re={key:3,class:"rounded-xl border border-slate-200 bg-slate-50 p-10 text-center text-slate-500"},pe=B({__name:"index",async setup(ie){let c,g;const{t:d,locale:h}=V(),$=["application","developer","researcher"],C={application:"bg-sky-100 text-sky-800",developer:"bg-violet-100 text-violet-800",researcher:"bg-emerald-100 text-emerald-800"},D={application:"border-sky-600 bg-sky-600 text-white",developer:"border-violet-600 bg-violet-600 text-white",researcher:"border-emerald-600 bg-emerald-600 text-white"},r=j(null),b=y(()=>h.value==="en"?"insights_en":"insights"),{data:A,pending:E,error:N}=([c,g]=L(()=>H(()=>`insights-list-${h.value}`,()=>M(b.value).order("date","DESC").all(),{watch:[b]})),c=await c,g(),c),_=y(()=>{const t=(A.value??[]).filter(l=>!l.draft);return r.value?t.filter(l=>l.audiences?.includes(r.value)):t});function f(t){return t?new Date(t).toLocaleDateString(h.value==="en"?"en-US":"zh-TW",{year:"numeric",month:"long",day:"numeric"}):""}return U({title:()=>d("insights.meta.listTitle")+" - "+d("project.shortName"),description:()=>d("insights.meta.listDescription"),ogTitle:()=>d("insights.meta.listTitle"),ogDescription:()=>d("insights.meta.listDescription")}),(t,l)=>{const v=T,I=S;return n(),a("section",P,[o("div",W,[o("div",G,[o("h1",J,s(t.$t("insights.pageTitle")),1),o("p",K,s(t.$t("insights.subtitle")),1)]),o("div",O,[o("span",Q,s(t.$t("insights.filterHint")),1),o("button",{type:"button",class:p(["rounded-full border px-4 py-1.5 text-sm font-medium transition",i(r)===null?"border-slate-800 bg-slate-800 text-white":"border-slate-200 bg-white text-slate-600 hover:border-slate-300 hover:bg-slate-50"]),onClick:l[0]||(l[0]=e=>r.value=null)},s(t.$t("insights.filterAll")),3),(n(),a(m,null,x($,e=>o("button",{key:e,type:"button",class:p(["rounded-full border px-4 py-1.5 text-sm font-medium transition",i(r)===e?D[e]:"border-slate-200 bg-white text-slate-600 hover:border-slate-300 hover:bg-slate-50"]),title:t.$t(`insights.audienceDesc.${e}`),onClick:u=>r.value=e},s(t.$t(`insights.audiences.${e}`)),11,R)),64))]),i(E)?(n(),a("div",X,s(t.$t("insights.loading")),1)):i(N)?(n(),a("div",Y,s(t.$t("insights.error")),1)):i(_).length?(n(),a("div",Z,[(n(!0),a(m,null,x(i(_),e=>(n(),q(I,{key:e.path,to:e.path,class:"group block rounded-2xl border border-slate-200 bg-white p-5 shadow-sm transition hover:border-teal-300 hover:shadow-md md:p-6"},{default:z(()=>[o("div",ee,[(n(!0),a(m,null,x(e.audiences,u=>(n(),a("span",{key:u,class:p(["rounded-md px-2 py-1 font-semibold",C[u]])},s(t.$t(`insights.audiences.${u}`)),3))),128)),o("span",te,s(f(e.date)),1),e.updatedAt?(n(),a("span",se,[w(v,{name:"heroicons:clock",class:"h-3.5 w-3.5"}),F(" "+s(t.$t("insights.updatedLabel"))+" "+s(f(e.updatedAt)),1)])):k("",!0)]),o("h2",oe,s(e.title),
11),o("p",ne,s(e.description),1),e.author||e.affiliation?(n(),a("p",ae,[w(v,{name:"heroicons:user-circle",class:"h-4 w-4 flex-shrink-0"}),o("span",null,s([e.author,e.affiliation].filter(Boolean).join(" · ")),1)])):k("",!0)]),_:2},1032,["to"]))),128))])):(n(),a("div",re,s(i(r)?t.$t("insights.noMatch"):t.$t("insights.empty")),1))])])}}});export{pe 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.