1import{d as k,u as L,g as C,bG as j,j as d,s as p,m as s,o as a,l as e,c as x,p as n,al as D,M as f,F as M,x as B,k as V,bO as $}from"./DZ7mik94.js";import{_ as A}from"./BDcM2FMb.js";import{g as P}from"./DXDH8whQ.js";import{d as F}from"./B3Th_mgj.js";const N={key:0,class:"latest-models-section"},z={class:"mx-auto"},I={class:"flex items-center justify-between mb-8"},O={class:"text-xl md:text-xl font-bold text-slate-800 tracking-tight"},q={class:"text-slate-500 mt-2"},E={class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4"},G=["onClick"],R={class:"flex items-center gap-3 min-w-0 flex-1"},S={class:"w-12 h-12 rounded-xl flex items-center justify-center shrink-0"},H={key:1,class:"w-10 h-10 bg-slate-200 rounded-full"},J={class:"min-w-0 flex-1"},K={class:"font-bold text-slate-600 line-clamp-1 group-hover:text-blue-500 transition-colors"},Q={class:"flex items-center gap-1.5 mt-0.5 text-xs"},T={class:"text-slate-500"},U={class:"text-slate-400 font-medium"},W={class:"mt-8 text-center md:hidden"},X=k({__name:"LatestModels",props:{showViewAll:{type:Boolean,default:!0}},async setup(v){let r,u;const{t:i,locale:b}=L(),m=D(),c=C(),g=v,{data:_}=([r,u]=j(async()=>$("latest-models",async()=>{try{const t=await $fetch("/webapi/public-models/latest",{query:{limit:6}});return t?.success?t.data?.data:[]}catch(t){return console.error("Failed to fetch latest models:",t),[]}})),r=await r,u(),r),w=t=>{window.location.href=c(`/models/${t.id}`)},h=t=>P(t)?.svg,y=t=>t?new Date(F(t).toDate()).toLocaleDateString(b.value):"";return(t,l)=>s(_)?.length?(a(),d("div",N,[e("div",z,[e("div",I,[e("div",null,[e("h2",O,n(s(i)("site.models.latest_models")),1),e("p",q,n(s(i)("site.models.latest_models_desc")),1)]),g.showViewAll?(a(),x(s(f),{key:0,label:s(i)("site.models.view_all"),text:"",onClick:l[0]||(l[0]=o=>s(m).push(s(c)("/models"))),class:"!hidden md:!flex !text-blue-600 hover:bg-blue-50",size:"small"},null,8,["label"])):p("",!0)]),e("div",E,[(a(!0),d(M,null,B(s(_),o=>(a(),d("div",{key:o.id,class:"group relative bg-white rounded-2xl p-4 border border-slate-200 hover:border-blue-500/30 hover:shadow-lg hover:shadow-blue-500/5 transition-all duration-300 cursor-pointer flex items-center justify-between",onClick:Y=>w(o)},[e("div",R,[e("div",S,[h(o.name)?(a(),x(A,{key:0,name:h(o.name),class:"w-10 h-10"},null,8,["name"])):(a(),d("div",H))]),e("div",J,[e("h3",K,n(o.display_name||o.name),1),e("div",Q,[e("span",T,n(o.provider),1),l[2]||(l[2]=e("span",{class:"text-slate-300"},"â¢",-1)),e("span",U,n(y(o.created_at)),1)])])])],8,G))),128))]),e("div",W,[V(s(f),{label:s(i)("site.models.view_all"),outlined:"",onClick:l[1]||(l[1]=o=>s(m).push(s(c)("/models"))),class:"w-full !rounded-xl !border-slate-200"},null,8,["label"])])])])):p("",!0)}}),oe=Object.assign(X,{__name:"LatestModels"});export{oe as L};
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.