nielsr HF Staff commited on
Commit
d062bb2
·
verified ·
1 Parent(s): 76363e4

Sync paperswithcode.co frontend

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. assets/{AiDeadlinesView-CyOHpcpe.js → AiDeadlinesView-DiruFJZY.js} +1 -1
  2. assets/{BenchmarkDetailView-BSUENi4k.js → BenchmarkDetailView-B5Ug-tDu.js} +2 -2
  3. assets/ChatView-Dq82pbSu.js +11 -0
  4. assets/ConferenceDetailView-B97-xBxl.js +1 -0
  5. assets/ConferenceDetailView-CD7PX6eF.js +0 -1
  6. assets/ConferenceTaskView-C-nGfySU.js +0 -1
  7. assets/ConferenceTaskView-DtN4azeY.js +1 -0
  8. assets/{ConferencesIndexView-CHnhRk0q.js → ConferencesIndexView-BovukbCI.js} +1 -1
  9. assets/CronDashboard-BNnSsgtO.js +66 -0
  10. assets/CronDashboard-tTE_5cac.js +0 -66
  11. assets/ExternalSourceEvalBadge-BuyUlLpR.js +0 -1
  12. assets/ExternalSourceEvalBadge-CTYhU1gt.js +1 -0
  13. assets/FeedView-BN3Iwb4n.js +0 -1
  14. assets/FeedView-Gd7WFKT7.js +1 -0
  15. assets/FrameworksIndexView-Bkh1zXOU.js +0 -1
  16. assets/FrameworksIndexView-Bwh0Z_ZZ.js +1 -0
  17. assets/{LatexTitle-ZHDCAKfZ.js → LatexTitle-DBZLS4yb.js} +1 -1
  18. assets/MarkdownText-Bj8B42V4.js +0 -7
  19. assets/MarkdownText-Cuf1_4O5.js +1 -0
  20. assets/MethodDetailView-BhKDNFx1.js +0 -1
  21. assets/MethodDetailView-D3JQs4Ab.js +1 -0
  22. assets/{MethodsIndexView-CwnA2RZu.js → MethodsIndexView-DTbY1iYX.js} +1 -1
  23. assets/{NotFound-D1qW6IOs.js → NotFound-CMFfChHB.js} +1 -1
  24. assets/OrganizationDetailView-DWso-WLp.js +1 -0
  25. assets/OrganizationDetailView-DgzK5QKX.js +0 -1
  26. assets/OrganizationTaskView-DlzWWiJb.js +1 -0
  27. assets/OrganizationTaskView-DvHaGVlI.js +0 -1
  28. assets/{OrganizationsIndexView-Dg5NQ77l.js → OrganizationsIndexView-B7IBGTg1.js} +1 -1
  29. assets/{PaperDetailView-Bru90vpg.js → PaperDetailView-kJzlR0WC.js} +0 -0
  30. assets/{PapersListView-CTCotQCh.js → PapersListView-BD2Du3yj.js} +1 -1
  31. assets/SavedPapersView-CdgbZIjk.js +1 -0
  32. assets/SavedPapersView-CsjFlkCI.js +0 -1
  33. assets/SearchOverlay-BfvQXhZ6.js +1 -0
  34. assets/SearchOverlay-BrGWIn4M.js +0 -1
  35. assets/{SettingsView-CSMwTHXQ.js → SettingsView-SbsmiR2R.js} +2 -2
  36. assets/{SubmissionsDashboard-DKm6cw14.js → SubmissionsDashboard-ujtr3pP6.js} +2 -2
  37. assets/SubmitView-Cm2YYgBs.js +1 -0
  38. assets/SubmitView-Hxf-ulH3.js +0 -1
  39. assets/TagBrowseView-BnBgGfmw.js +11 -0
  40. assets/TagBrowseView-Dd43meiQ.js +0 -11
  41. assets/{TagsIndexView-CA1ETfoO.js → TagsIndexView-CfBj37Ze.js} +1 -1
  42. assets/{alert-BIanajMT.js → alert-4m2SJo0T.js} +1 -1
  43. assets/{button-C_tMg-gR.js → button-q4EOT22d.js} +1 -1
  44. assets/chatSessions-mebqdAa-.js +1 -0
  45. assets/{codexAddEvals-D4idoo-w.js → codexAddEvals-BhjClbnO.js} +2 -2
  46. assets/components-Bs7x-Lbj.js +0 -1
  47. assets/components-CM9AEXO8.js +1 -0
  48. assets/{dialog-foJeJzmC.js → dialog--MrJxlEO.js} +2 -2
  49. assets/github-BsrYosCi.js +6 -0
  50. assets/hover-card-DZ5zXJ4P.js +1 -0
assets/{AiDeadlinesView-CyOHpcpe.js → AiDeadlinesView-DiruFJZY.js} RENAMED
@@ -1,3 +1,3 @@
1
- import{r as x,j as t,a as E}from"./index-EtWJP9FK.js";import{u as A}from"./useQuery-CRN8HQuX.js";import{S as B}from"./switch-_Nji6Le5.js";import{S as U}from"./skeleton-DMjGQB3S.js";import{A as W,a as O}from"./alert-BIanajMT.js";import{D as V,a as P,b as G,c as Y,d as K}from"./dialog-foJeJzmC.js";import"./index-C858g2Nu.js";const b=1e3*60*60*24,S={urgent:"#c0392b",soon:"#b9770e",normal:"#3f7d3f",passed:"var(--ink-faint)"},k=e=>e.split("-").map(a=>a.charAt(0).toUpperCase()+a.slice(1)).join(" "),q=new Set(["machine-learning","computer-vision","natural-language-processing","data-mining","robotics","computer-graphics","human-computer-interaction","web-search","signal-processing","representation-learning","reinforcement-learning","optimization-methods","large-language-models","information-retrieval","speech","mathematics"]),H=e=>e.trim().toLowerCase().replace(/\s+/g,"-"),D=e=>Array.from(new Set((e.tags??[]).map(H).filter(a=>q.has(a)))),F=e=>new Date(e).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),z=(e,a)=>{if(!e)return null;const n=new Date(`${e}T00:00:00`),r=a?new Date(`${a}T00:00:00`):null,o=s=>s.toLocaleDateString("en-US",{month:"long",day:"numeric"}),i=n.getFullYear();return r&&r.getTime()!==n.getTime()?n.getMonth()===r.getMonth()?`${o(n).replace(/\d+$/,"").trim()} ${n.getDate()}–${r.getDate()}, ${i}`:`${o(n)} – ${o(r)}, ${i}`:`${o(n)}, ${i}`},I=e=>[...e.deadlines??[]].sort((a,n)=>new Date(a.deadline_at).getTime()-new Date(n.deadline_at).getTime()),T=(e,a)=>I(e).find(n=>new Date(n.deadline_at).getTime()>a)??null,L=e=>{const a=I(e);return a.length?a[a.length-1]:null},Q=(e,a)=>{const n=e-a;if(n<=0)return"Deadline passed";const r=Math.floor(n/b);if(r>=1){const s=Math.floor((n-r*b)/36e5);return`in ${r}d ${s}h`}const o=Math.floor(n/(1e3*60*60));return o>=1?`in ${o}h`:`in ${Math.max(1,Math.floor(n/(1e3*60)))}m`},J=(e,a)=>{const n=e-a;if(n<=0)return"Deadline passed";const r=Math.floor(n/b),o=Math.floor(n%b/(1e3*60*60)),i=Math.floor(n%(1e3*60*60)/(1e3*60)),s=Math.floor(n%(1e3*60)/1e3);return`${r}d ${o}h ${i}m ${s}s`},_=(e,a)=>{if(e==null)return S.passed;const n=(e-a)/b;return n<=0?S.passed:n<=7?S.urgent:n<=30?S.soon:S.normal},$={fontFamily:"var(--mono)",fontSize:10,letterSpacing:"0.12em",textTransform:"uppercase",color:"var(--ink-faint)"},X=(e,a)=>{const n=Math.ceil((e-a)/b);return n<=0?"passed":`${n} ${n===1?"day":"days"}`},R=(e,a)=>{const n=z(e.start_date,e.end_date),r=e.venue||[e.city,e.country].filter(Boolean).join(", ");return[`${a.label||a.type||"Deadline"} for ${e.name}`,n?`Dates: ${n}`:null,r?`Location: ${r}`:null,e.url?`Website: ${e.url}`:null].filter(Boolean).join(`
2
  `)},C=e=>e.toISOString().replace(/[-:]/g,"").replace(/\.\d{3}/,""),Z=(e,a)=>{const n=new Date(a.deadline_at),r=new Date(n.getTime()+60*60*1e3),o=`${e.short_name||e.name} ${a.label||a.type||"deadline"}`,i=e.venue||[e.city,e.country].filter(Boolean).join(", "),s=`https://calendar.google.com/calendar/render?action=TEMPLATE&text=${encodeURIComponent(o)}&dates=${C(n)}/${C(r)}&details=${encodeURIComponent(R(e,a))}&location=${encodeURIComponent(i)}`;window.open(s,"_blank","noopener,noreferrer")},ee=(e,a)=>{const n=new Date(a.deadline_at),r=new Date(n.getTime()+60*60*1e3),o=`${e.short_name||e.name} ${a.label||a.type||"deadline"}`,i=e.venue||[e.city,e.country].filter(Boolean).join(", "),s=["BEGIN:VCALENDAR","VERSION:2.0","BEGIN:VEVENT",e.url?`URL:${e.url}`:null,`DTSTART:${C(n)}`,`DTEND:${C(r)}`,`SUMMARY:${o}`,`DESCRIPTION:${R(e,a).replace(/\n/g,"\\n")}`,i?`LOCATION:${i}`:null,"END:VEVENT","END:VCALENDAR"].filter(Boolean).join(`
3
  `),g=new Blob([s],{type:"text/calendar;charset=utf-8"}),c=document.createElement("a");c.href=URL.createObjectURL(g),c.download=`${(e.short_name||e.name).toLowerCase().replace(/\s+/g,"-")}-deadline.ics`,document.body.appendChild(c),c.click(),document.body.removeChild(c),URL.revokeObjectURL(c.href)},te=({conf:e,open:a,onOpenChange:n})=>{const[r,o]=x.useState(()=>Date.now());x.useEffect(()=>{if(!a)return;o(Date.now());const d=setInterval(()=>o(Date.now()),1e3);return()=>clearInterval(d)},[a]);const i=x.useMemo(()=>e?I(e):[],[e]),s=x.useMemo(()=>e?T(e,r):null,[e,r]),g=e?z(e.start_date,e.end_date):null,c=e?e.venue||[e.city,e.country].filter(Boolean).join(", ")||e.location:null,p=s?new Date(s.deadline_at).getTime():null;return t.jsx(V,{open:a,onOpenChange:n,children:t.jsx(P,{className:"max-w-xl",style:{background:"var(--bg-elevated)",maxHeight:"85vh",overflowY:"auto"},children:e&&t.jsxs(t.Fragment,{children:[t.jsxs(G,{children:[t.jsx(Y,{asChild:!0,children:t.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.01em",margin:0},children:e.short_name?`${e.short_name} ${e.year??""}`.trim():e.name})}),e.short_name&&e.name||e.description?t.jsx(K,{asChild:!0,children:t.jsx("span",{style:{fontFamily:"var(--serif)",fontSize:14,color:"var(--ink-soft)"},children:e.short_name?e.name:e.description})}):null]}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:20,marginTop:4},children:[t.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:24},children:[g&&t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4},children:[t.jsx("span",{style:$,children:"Dates"}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:13,color:"var(--ink-soft)"},children:g})]}),c&&t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4},children:[t.jsx("span",{style:$,children:"Venue"}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:13,color:"var(--ink-soft)"},children:c})]})]}),p!=null&&t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4,padding:"12px 14px",borderRadius:8,background:"var(--bg-subtle)",border:"1px solid var(--hairline)"},children:[t.jsx("span",{style:$,children:"Next deadline in"}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:22,fontWeight:600,color:_(p,r)},children:J(p,r)})]}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[t.jsx("span",{style:$,children:"Important deadlines"}),i.length===0?t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:13,color:"var(--ink-faint)"},children:"No deadlines listed"}):i.map((d,m)=>{const y=new Date(d.deadline_at).getTime(),l=s!=null&&d.deadline_at===s.deadline_at&&d.type===s.type,u=y<=r;return t.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:12,padding:"8px 12px",borderRadius:6,background:l?"var(--accent-soft)":"transparent",border:l?"1px solid var(--hairline-strong)":"1px solid var(--hairline)",opacity:u&&!l?.55:1},children:[t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:2},children:[t.jsxs("span",{style:{fontFamily:"var(--mono)",fontSize:13,color:"var(--ink)",fontWeight:l?600:400},children:[d.label||k(d.type||"deadline"),l&&t.jsx("span",{style:{...$,marginLeft:8},children:"Next"})]}),t.jsxs("span",{style:{fontFamily:"var(--mono)",fontSize:12,color:"var(--ink-faint)"},children:[F(d.deadline_at),d.timezone?` · ${d.timezone}`:""]})]}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:12,fontWeight:600,whiteSpace:"nowrap",color:_(u?null:y,r)},children:X(y,r)})]},`${d.type??"deadline"}-${m}`)})]}),D(e).length>0&&t.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:D(e).map(d=>t.jsx("span",{className:"tag-chip",style:{background:"var(--bg-subtle)",color:"var(--ink-soft)"},children:k(d)},d))}),t.jsxs("div",{style:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:16,paddingTop:12,borderTop:"1px solid var(--hairline)"},children:[e.url&&t.jsx("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",style:{fontFamily:"var(--mono)",fontSize:12,color:"var(--accent-text)"},children:"Visit website ↗"}),s&&t.jsxs("div",{style:{display:"flex",gap:12,marginLeft:"auto"},children:[t.jsx("button",{type:"button",className:"tag-chip",onClick:()=>Z(e,s),style:{background:"var(--bg-subtle)",color:"var(--ink-soft)"},children:"+ Google Calendar"}),t.jsx("button",{type:"button",className:"tag-chip",onClick:()=>ee(e,s),style:{background:"var(--bg-subtle)",color:"var(--ink-soft)"},children:"+ Apple / .ics"})]})]})]})]})})})},M=({id:e,label:a,checked:n,onChange:r})=>t.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,fontFamily:"var(--mono)",fontSize:12,color:"var(--ink-soft)"},children:[t.jsx(B,{id:e,checked:n,onCheckedChange:r}),t.jsx("label",{htmlFor:e,style:{cursor:"pointer"},children:a})]}),ne=({conf:e,now:a,selectedDomains:n,onToggleDomain:r,onOpen:o})=>{const i=T(e,a),s=i??L(e),g=s?new Date(s.deadline_at).getTime():null,c=_(i?g:null,a),p=z(e.start_date,e.end_date),d=[e.city??null,e.country??null].filter(Boolean).join(", ");return t.jsxs("div",{role:"button",tabIndex:0,onClick:()=>o(e),onKeyDown:m=>{(m.key==="Enter"||m.key===" ")&&(m.preventDefault(),o(e))},style:{border:"1px solid var(--hairline)",borderRadius:8,padding:20,background:"var(--bg-elevated)",display:"flex",flexDirection:"column",gap:12,cursor:"pointer"},children:[t.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"baseline",gap:12},children:[t.jsx("h3",{style:{fontFamily:"var(--serif)",fontSize:20,fontWeight:500,letterSpacing:"-0.01em",margin:0},children:e.short_name?`${e.short_name} ${e.year??""}`.trim():e.name}),e.url&&t.jsx("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",onClick:m=>m.stopPropagation(),style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",whiteSpace:"nowrap"},children:"website ↗"})]}),t.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:12,paddingBottom:12,borderBottom:"1px solid var(--hairline)"},children:[t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:2},children:[t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)"},children:(s==null?void 0:s.label)||(s==null?void 0:s.type)||"Deadline"}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:12,color:"var(--ink-soft)"},children:s?`${F(s.deadline_at)}${s.timezone?` · ${s.timezone}`:""}`:"TBD"})]}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:14,fontWeight:600,color:c,whiteSpace:"nowrap"},children:g!=null?Q(g,a):"TBD"})]}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4,fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)"},children:[p&&t.jsx("span",{children:p}),d&&t.jsx("span",{children:d})]}),D(e).length>0&&t.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:D(e).map(m=>{const y=n.has(m);return t.jsx("button",{className:"tag-chip",onClick:l=>{l.stopPropagation(),r(m)},style:{background:y?"var(--ink)":"var(--bg-subtle)",color:y?"var(--bg)":"var(--ink-soft)"},children:k(m)},m)})})]})},ce=()=>{const[e,a]=x.useState(!0),[n,r]=x.useState(!1),[o,i]=x.useState(new Set),[s,g]=x.useState(null),c=x.useMemo(()=>Date.now(),[]),p=A({queryKey:["conference-deadlines"],queryFn:()=>E.getConferenceDeadlines(),staleTime:10*60*1e3}),d=l=>{i(u=>{const h=new Set(u);return h.has(l)?h.delete(l):h.add(l),h})},m=x.useMemo(()=>{var u;const l=new Map;return(u=p.data)==null||u.results.forEach(h=>{D(h).forEach(j=>l.set(j,(l.get(j)??0)+1))}),Array.from(l.entries()).sort((h,j)=>j[1]-h[1]).map(([h])=>h)},[p.data]),y=x.useMemo(()=>{var j;const u=(((j=p.data)==null?void 0:j.results)??[]).filter(f=>!(e&&f.tier!=="a"||o.size>0&&!D(f).some(v=>o.has(v))||!n&&!T(f,c))),h=f=>{const w=T(f,c);if(w)return{group:0,time:new Date(w.deadline_at).getTime()};const v=L(f);return{group:1,time:-(v?new Date(v.deadline_at).getTime():0)}};return[...u].sort((f,w)=>{const v=h(f),N=h(w);return v.group!==N.group?v.group-N.group:v.time-N.time})},[p.data,e,n,o,c]);return p.error?t.jsx("div",{className:"page",children:t.jsx(W,{variant:"destructive",children:t.jsx(O,{children:"Failed to load conference deadlines. Please try again."})})}):t.jsxs("div",{className:"page",children:[t.jsx("div",{className:"feed-header",children:t.jsxs("div",{children:[t.jsxs("h1",{className:"feed-title",children:["AI Conference ",t.jsx("em",{children:"Deadlines"})]}),t.jsx("div",{className:"feed-subtitle",children:"Upcoming submission deadlines for major AI conferences, counting down."})]})}),t.jsxs("div",{style:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:20,padding:"16px 0",borderBottom:"1px solid var(--hairline)",marginBottom:24},children:[t.jsx(M,{id:"top-tier-only",label:"Top tier only",checked:e,onChange:a}),t.jsx(M,{id:"show-past",label:"Show past conferences",checked:n,onChange:r})]}),m.length>0&&t.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:6,marginBottom:24},children:[m.map(l=>{const u=o.has(l);return t.jsx("button",{className:"tag-chip",onClick:()=>d(l),style:{background:u?"var(--ink)":"var(--bg-subtle)",color:u?"var(--bg)":"var(--ink-soft)"},children:k(l)},l)}),o.size>0&&t.jsx("button",{className:"tag-chip",onClick:()=>i(new Set),style:{background:"transparent",color:"var(--ink-faint)"},children:"Clear ✕"})]}),t.jsx("div",{className:"sort-bar",children:t.jsx("div",{className:"results-count",children:p.isLoading?"…":`${y.length} conferences`})}),p.isLoading?t.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(320px, 1fr))",gap:16},children:Array.from({length:6}).map((l,u)=>t.jsx(U,{className:"h-44"},u))}):y.length===0?t.jsxs("div",{className:"no-results",children:["No conferences match these filters",n?".":" — try enabling “Show past conferences”."]}):t.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(320px, 1fr))",gap:16},children:y.map(l=>t.jsx(ne,{conf:l,now:c,selectedDomains:o,onToggleDomain:d,onOpen:g},l.id))}),t.jsx(te,{conf:s,open:s!==null,onOpenChange:l=>{l||g(null)}})]})};export{ce as default};
 
1
+ import{r as x,j as t,b as E}from"./index-CKAClQ2e.js";import{u as A}from"./useQuery-DVaOQYVk.js";import{S as B}from"./switch-CjKtXruW.js";import{S as U}from"./skeleton-BYz337Ss.js";import{A as W,a as O}from"./alert-4m2SJo0T.js";import{D as V,a as P,b as G,c as Y,d as K}from"./dialog--MrJxlEO.js";import"./index-DCl-K7k4.js";const b=1e3*60*60*24,S={urgent:"#c0392b",soon:"#b9770e",normal:"#3f7d3f",passed:"var(--ink-faint)"},k=e=>e.split("-").map(a=>a.charAt(0).toUpperCase()+a.slice(1)).join(" "),q=new Set(["machine-learning","computer-vision","natural-language-processing","data-mining","robotics","computer-graphics","human-computer-interaction","web-search","signal-processing","representation-learning","reinforcement-learning","optimization-methods","large-language-models","information-retrieval","speech","mathematics"]),H=e=>e.trim().toLowerCase().replace(/\s+/g,"-"),D=e=>Array.from(new Set((e.tags??[]).map(H).filter(a=>q.has(a)))),F=e=>new Date(e).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),z=(e,a)=>{if(!e)return null;const n=new Date(`${e}T00:00:00`),r=a?new Date(`${a}T00:00:00`):null,o=s=>s.toLocaleDateString("en-US",{month:"long",day:"numeric"}),i=n.getFullYear();return r&&r.getTime()!==n.getTime()?n.getMonth()===r.getMonth()?`${o(n).replace(/\d+$/,"").trim()} ${n.getDate()}–${r.getDate()}, ${i}`:`${o(n)} – ${o(r)}, ${i}`:`${o(n)}, ${i}`},I=e=>[...e.deadlines??[]].sort((a,n)=>new Date(a.deadline_at).getTime()-new Date(n.deadline_at).getTime()),T=(e,a)=>I(e).find(n=>new Date(n.deadline_at).getTime()>a)??null,L=e=>{const a=I(e);return a.length?a[a.length-1]:null},Q=(e,a)=>{const n=e-a;if(n<=0)return"Deadline passed";const r=Math.floor(n/b);if(r>=1){const s=Math.floor((n-r*b)/36e5);return`in ${r}d ${s}h`}const o=Math.floor(n/(1e3*60*60));return o>=1?`in ${o}h`:`in ${Math.max(1,Math.floor(n/(1e3*60)))}m`},J=(e,a)=>{const n=e-a;if(n<=0)return"Deadline passed";const r=Math.floor(n/b),o=Math.floor(n%b/(1e3*60*60)),i=Math.floor(n%(1e3*60*60)/(1e3*60)),s=Math.floor(n%(1e3*60)/1e3);return`${r}d ${o}h ${i}m ${s}s`},_=(e,a)=>{if(e==null)return S.passed;const n=(e-a)/b;return n<=0?S.passed:n<=7?S.urgent:n<=30?S.soon:S.normal},$={fontFamily:"var(--mono)",fontSize:10,letterSpacing:"0.12em",textTransform:"uppercase",color:"var(--ink-faint)"},X=(e,a)=>{const n=Math.ceil((e-a)/b);return n<=0?"passed":`${n} ${n===1?"day":"days"}`},R=(e,a)=>{const n=z(e.start_date,e.end_date),r=e.venue||[e.city,e.country].filter(Boolean).join(", ");return[`${a.label||a.type||"Deadline"} for ${e.name}`,n?`Dates: ${n}`:null,r?`Location: ${r}`:null,e.url?`Website: ${e.url}`:null].filter(Boolean).join(`
2
  `)},C=e=>e.toISOString().replace(/[-:]/g,"").replace(/\.\d{3}/,""),Z=(e,a)=>{const n=new Date(a.deadline_at),r=new Date(n.getTime()+60*60*1e3),o=`${e.short_name||e.name} ${a.label||a.type||"deadline"}`,i=e.venue||[e.city,e.country].filter(Boolean).join(", "),s=`https://calendar.google.com/calendar/render?action=TEMPLATE&text=${encodeURIComponent(o)}&dates=${C(n)}/${C(r)}&details=${encodeURIComponent(R(e,a))}&location=${encodeURIComponent(i)}`;window.open(s,"_blank","noopener,noreferrer")},ee=(e,a)=>{const n=new Date(a.deadline_at),r=new Date(n.getTime()+60*60*1e3),o=`${e.short_name||e.name} ${a.label||a.type||"deadline"}`,i=e.venue||[e.city,e.country].filter(Boolean).join(", "),s=["BEGIN:VCALENDAR","VERSION:2.0","BEGIN:VEVENT",e.url?`URL:${e.url}`:null,`DTSTART:${C(n)}`,`DTEND:${C(r)}`,`SUMMARY:${o}`,`DESCRIPTION:${R(e,a).replace(/\n/g,"\\n")}`,i?`LOCATION:${i}`:null,"END:VEVENT","END:VCALENDAR"].filter(Boolean).join(`
3
  `),g=new Blob([s],{type:"text/calendar;charset=utf-8"}),c=document.createElement("a");c.href=URL.createObjectURL(g),c.download=`${(e.short_name||e.name).toLowerCase().replace(/\s+/g,"-")}-deadline.ics`,document.body.appendChild(c),c.click(),document.body.removeChild(c),URL.revokeObjectURL(c.href)},te=({conf:e,open:a,onOpenChange:n})=>{const[r,o]=x.useState(()=>Date.now());x.useEffect(()=>{if(!a)return;o(Date.now());const d=setInterval(()=>o(Date.now()),1e3);return()=>clearInterval(d)},[a]);const i=x.useMemo(()=>e?I(e):[],[e]),s=x.useMemo(()=>e?T(e,r):null,[e,r]),g=e?z(e.start_date,e.end_date):null,c=e?e.venue||[e.city,e.country].filter(Boolean).join(", ")||e.location:null,p=s?new Date(s.deadline_at).getTime():null;return t.jsx(V,{open:a,onOpenChange:n,children:t.jsx(P,{className:"max-w-xl",style:{background:"var(--bg-elevated)",maxHeight:"85vh",overflowY:"auto"},children:e&&t.jsxs(t.Fragment,{children:[t.jsxs(G,{children:[t.jsx(Y,{asChild:!0,children:t.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.01em",margin:0},children:e.short_name?`${e.short_name} ${e.year??""}`.trim():e.name})}),e.short_name&&e.name||e.description?t.jsx(K,{asChild:!0,children:t.jsx("span",{style:{fontFamily:"var(--serif)",fontSize:14,color:"var(--ink-soft)"},children:e.short_name?e.name:e.description})}):null]}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:20,marginTop:4},children:[t.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:24},children:[g&&t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4},children:[t.jsx("span",{style:$,children:"Dates"}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:13,color:"var(--ink-soft)"},children:g})]}),c&&t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4},children:[t.jsx("span",{style:$,children:"Venue"}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:13,color:"var(--ink-soft)"},children:c})]})]}),p!=null&&t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4,padding:"12px 14px",borderRadius:8,background:"var(--bg-subtle)",border:"1px solid var(--hairline)"},children:[t.jsx("span",{style:$,children:"Next deadline in"}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:22,fontWeight:600,color:_(p,r)},children:J(p,r)})]}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[t.jsx("span",{style:$,children:"Important deadlines"}),i.length===0?t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:13,color:"var(--ink-faint)"},children:"No deadlines listed"}):i.map((d,m)=>{const y=new Date(d.deadline_at).getTime(),l=s!=null&&d.deadline_at===s.deadline_at&&d.type===s.type,u=y<=r;return t.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:12,padding:"8px 12px",borderRadius:6,background:l?"var(--accent-soft)":"transparent",border:l?"1px solid var(--hairline-strong)":"1px solid var(--hairline)",opacity:u&&!l?.55:1},children:[t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:2},children:[t.jsxs("span",{style:{fontFamily:"var(--mono)",fontSize:13,color:"var(--ink)",fontWeight:l?600:400},children:[d.label||k(d.type||"deadline"),l&&t.jsx("span",{style:{...$,marginLeft:8},children:"Next"})]}),t.jsxs("span",{style:{fontFamily:"var(--mono)",fontSize:12,color:"var(--ink-faint)"},children:[F(d.deadline_at),d.timezone?` · ${d.timezone}`:""]})]}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:12,fontWeight:600,whiteSpace:"nowrap",color:_(u?null:y,r)},children:X(y,r)})]},`${d.type??"deadline"}-${m}`)})]}),D(e).length>0&&t.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:D(e).map(d=>t.jsx("span",{className:"tag-chip",style:{background:"var(--bg-subtle)",color:"var(--ink-soft)"},children:k(d)},d))}),t.jsxs("div",{style:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:16,paddingTop:12,borderTop:"1px solid var(--hairline)"},children:[e.url&&t.jsx("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",style:{fontFamily:"var(--mono)",fontSize:12,color:"var(--accent-text)"},children:"Visit website ↗"}),s&&t.jsxs("div",{style:{display:"flex",gap:12,marginLeft:"auto"},children:[t.jsx("button",{type:"button",className:"tag-chip",onClick:()=>Z(e,s),style:{background:"var(--bg-subtle)",color:"var(--ink-soft)"},children:"+ Google Calendar"}),t.jsx("button",{type:"button",className:"tag-chip",onClick:()=>ee(e,s),style:{background:"var(--bg-subtle)",color:"var(--ink-soft)"},children:"+ Apple / .ics"})]})]})]})]})})})},M=({id:e,label:a,checked:n,onChange:r})=>t.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,fontFamily:"var(--mono)",fontSize:12,color:"var(--ink-soft)"},children:[t.jsx(B,{id:e,checked:n,onCheckedChange:r}),t.jsx("label",{htmlFor:e,style:{cursor:"pointer"},children:a})]}),ne=({conf:e,now:a,selectedDomains:n,onToggleDomain:r,onOpen:o})=>{const i=T(e,a),s=i??L(e),g=s?new Date(s.deadline_at).getTime():null,c=_(i?g:null,a),p=z(e.start_date,e.end_date),d=[e.city??null,e.country??null].filter(Boolean).join(", ");return t.jsxs("div",{role:"button",tabIndex:0,onClick:()=>o(e),onKeyDown:m=>{(m.key==="Enter"||m.key===" ")&&(m.preventDefault(),o(e))},style:{border:"1px solid var(--hairline)",borderRadius:8,padding:20,background:"var(--bg-elevated)",display:"flex",flexDirection:"column",gap:12,cursor:"pointer"},children:[t.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"baseline",gap:12},children:[t.jsx("h3",{style:{fontFamily:"var(--serif)",fontSize:20,fontWeight:500,letterSpacing:"-0.01em",margin:0},children:e.short_name?`${e.short_name} ${e.year??""}`.trim():e.name}),e.url&&t.jsx("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",onClick:m=>m.stopPropagation(),style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",whiteSpace:"nowrap"},children:"website ↗"})]}),t.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:12,paddingBottom:12,borderBottom:"1px solid var(--hairline)"},children:[t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:2},children:[t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)"},children:(s==null?void 0:s.label)||(s==null?void 0:s.type)||"Deadline"}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:12,color:"var(--ink-soft)"},children:s?`${F(s.deadline_at)}${s.timezone?` · ${s.timezone}`:""}`:"TBD"})]}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:14,fontWeight:600,color:c,whiteSpace:"nowrap"},children:g!=null?Q(g,a):"TBD"})]}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4,fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)"},children:[p&&t.jsx("span",{children:p}),d&&t.jsx("span",{children:d})]}),D(e).length>0&&t.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:D(e).map(m=>{const y=n.has(m);return t.jsx("button",{className:"tag-chip",onClick:l=>{l.stopPropagation(),r(m)},style:{background:y?"var(--ink)":"var(--bg-subtle)",color:y?"var(--bg)":"var(--ink-soft)"},children:k(m)},m)})})]})},ce=()=>{const[e,a]=x.useState(!0),[n,r]=x.useState(!1),[o,i]=x.useState(new Set),[s,g]=x.useState(null),c=x.useMemo(()=>Date.now(),[]),p=A({queryKey:["conference-deadlines"],queryFn:()=>E.getConferenceDeadlines(),staleTime:10*60*1e3}),d=l=>{i(u=>{const h=new Set(u);return h.has(l)?h.delete(l):h.add(l),h})},m=x.useMemo(()=>{var u;const l=new Map;return(u=p.data)==null||u.results.forEach(h=>{D(h).forEach(j=>l.set(j,(l.get(j)??0)+1))}),Array.from(l.entries()).sort((h,j)=>j[1]-h[1]).map(([h])=>h)},[p.data]),y=x.useMemo(()=>{var j;const u=(((j=p.data)==null?void 0:j.results)??[]).filter(f=>!(e&&f.tier!=="a"||o.size>0&&!D(f).some(v=>o.has(v))||!n&&!T(f,c))),h=f=>{const w=T(f,c);if(w)return{group:0,time:new Date(w.deadline_at).getTime()};const v=L(f);return{group:1,time:-(v?new Date(v.deadline_at).getTime():0)}};return[...u].sort((f,w)=>{const v=h(f),N=h(w);return v.group!==N.group?v.group-N.group:v.time-N.time})},[p.data,e,n,o,c]);return p.error?t.jsx("div",{className:"page",children:t.jsx(W,{variant:"destructive",children:t.jsx(O,{children:"Failed to load conference deadlines. Please try again."})})}):t.jsxs("div",{className:"page",children:[t.jsx("div",{className:"feed-header",children:t.jsxs("div",{children:[t.jsxs("h1",{className:"feed-title",children:["AI Conference ",t.jsx("em",{children:"Deadlines"})]}),t.jsx("div",{className:"feed-subtitle",children:"Upcoming submission deadlines for major AI conferences, counting down."})]})}),t.jsxs("div",{style:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:20,padding:"16px 0",borderBottom:"1px solid var(--hairline)",marginBottom:24},children:[t.jsx(M,{id:"top-tier-only",label:"Top tier only",checked:e,onChange:a}),t.jsx(M,{id:"show-past",label:"Show past conferences",checked:n,onChange:r})]}),m.length>0&&t.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:6,marginBottom:24},children:[m.map(l=>{const u=o.has(l);return t.jsx("button",{className:"tag-chip",onClick:()=>d(l),style:{background:u?"var(--ink)":"var(--bg-subtle)",color:u?"var(--bg)":"var(--ink-soft)"},children:k(l)},l)}),o.size>0&&t.jsx("button",{className:"tag-chip",onClick:()=>i(new Set),style:{background:"transparent",color:"var(--ink-faint)"},children:"Clear ✕"})]}),t.jsx("div",{className:"sort-bar",children:t.jsx("div",{className:"results-count",children:p.isLoading?"…":`${y.length} conferences`})}),p.isLoading?t.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(320px, 1fr))",gap:16},children:Array.from({length:6}).map((l,u)=>t.jsx(U,{className:"h-44"},u))}):y.length===0?t.jsxs("div",{className:"no-results",children:["No conferences match these filters",n?".":" — try enabling “Show past conferences”."]}):t.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(320px, 1fr))",gap:16},children:y.map(l=>t.jsx(ne,{conf:l,now:c,selectedDomains:o,onToggleDomain:d,onOpen:g},l.id))}),t.jsx(te,{conf:s,open:s!==null,onOpenChange:l=>{l||g(null)}})]})};export{ce as default};
assets/{BenchmarkDetailView-BSUENi4k.js → BenchmarkDetailView-B5Ug-tDu.js} RENAMED
@@ -1,2 +1,2 @@
1
- import{_ as dt,u as ut,a1 as mt,r as S,j as n,L as ee,a7 as X,n as ht,a0 as ft,a as te}from"./index-EtWJP9FK.js";import{u as re}from"./useQuery-CRN8HQuX.js";import{S as ye}from"./skeleton-DMjGQB3S.js";import{S as We}from"./switch-_Nji6Le5.js";import{A as pt,a as gt}from"./alert-BIanajMT.js";import{L as me}from"./LatexTitle-ZHDCAKfZ.js";import{I as xt}from"./components-Bs7x-Lbj.js";import{C as bt,E as yt}from"./ExternalSourceEvalBadge-BuyUlLpR.js";import"./index-C858g2Nu.js";import"./katex.min-BSBacQyE.js";import"./transform-BnMt6tRc.js";function wt(e,t){if(e.match(/^[a-z]+:\/\//i))return e;if(e.match(/^\/\//))return window.location.protocol+e;if(e.match(/^[a-z]+:/i))return e;const r=document.implementation.createHTMLDocument(),s=r.createElement("base"),i=r.createElement("a");return r.head.appendChild(s),r.body.appendChild(i),t&&(s.href=t),i.href=e,i.href}const vt=(()=>{let e=0;const t=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(e+=1,`u${t()}${e}`)})();function H(e){const t=[];for(let r=0,s=e.length;r<s;r++)t.push(e[r]);return t}let K=null;function tt(e={}){return K||(e.includeStyleProperties?(K=e.includeStyleProperties,K):(K=H(window.getComputedStyle(document.documentElement)),K))}function he(e,t){const s=(e.ownerDocument.defaultView||window).getComputedStyle(e).getPropertyValue(t);return s?parseFloat(s.replace("px","")):0}function jt(e){const t=he(e,"border-left-width"),r=he(e,"border-right-width");return e.clientWidth+t+r}function _t(e){const t=he(e,"border-top-width"),r=he(e,"border-bottom-width");return e.clientHeight+t+r}function rt(e,t={}){const r=t.width||jt(e),s=t.height||_t(e);return{width:r,height:s}}function St(){let e,t;try{t=process}catch{}const r=t&&t.env?t.env.devicePixelRatio:null;return r&&(e=parseInt(r,10),Number.isNaN(e)&&(e=1)),e||window.devicePixelRatio||1}const P=16384;function kt(e){(e.width>P||e.height>P)&&(e.width>P&&e.height>P?e.width>e.height?(e.height*=P/e.width,e.width=P):(e.width*=P/e.height,e.height=P):e.width>P?(e.height*=P/e.width,e.width=P):(e.width*=P/e.height,e.height=P))}function Ct(e,t={}){return e.toBlob?new Promise(r=>{e.toBlob(r,t.type?t.type:"image/png",t.quality?t.quality:1)}):new Promise(r=>{const s=window.atob(e.toDataURL(t.type?t.type:void 0,t.quality?t.quality:void 0).split(",")[1]),i=s.length,a=new Uint8Array(i);for(let o=0;o<i;o+=1)a[o]=s.charCodeAt(o);r(new Blob([a],{type:t.type?t.type:"image/png"}))})}function fe(e){return new Promise((t,r)=>{const s=new Image;s.onload=()=>{s.decode().then(()=>{requestAnimationFrame(()=>t(s))})},s.onerror=r,s.crossOrigin="anonymous",s.decoding="async",s.src=e})}async function Et(e){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then(t=>`data:image/svg+xml;charset=utf-8,${t}`)}async function Nt(e,t,r){const s="http://www.w3.org/2000/svg",i=document.createElementNS(s,"svg"),a=document.createElementNS(s,"foreignObject");return i.setAttribute("width",`${t}`),i.setAttribute("height",`${r}`),i.setAttribute("viewBox",`0 0 ${t} ${r}`),a.setAttribute("width","100%"),a.setAttribute("height","100%"),a.setAttribute("x","0"),a.setAttribute("y","0"),a.setAttribute("externalResourcesRequired","true"),i.appendChild(a),a.appendChild(e),Et(i)}const F=(e,t)=>{if(e instanceof t)return!0;const r=Object.getPrototypeOf(e);return r===null?!1:r.constructor.name===t.name||F(r,t)};function Rt(e){const t=e.getPropertyValue("content");return`${e.cssText} content: '${t.replace(/'|"/g,"")}';`}function $t(e,t){return tt(t).map(r=>{const s=e.getPropertyValue(r),i=e.getPropertyPriority(r);return`${r}: ${s}${i?" !important":""};`}).join(" ")}function Tt(e,t,r,s){const i=`.${e}:${t}`,a=r.cssText?Rt(r):$t(r,s);return document.createTextNode(`${i}{${a}}`)}function Ue(e,t,r,s){const i=window.getComputedStyle(e,r),a=i.getPropertyValue("content");if(a===""||a==="none")return;const o=vt();try{t.className=`${t.className} ${o}`}catch{return}const c=document.createElement("style");c.appendChild(Tt(o,r,i,s)),t.appendChild(c)}function Mt(e,t,r){Ue(e,t,":before",r),Ue(e,t,":after",r)}const qe="application/font-woff",ze="image/jpeg",Ft={woff:qe,woff2:qe,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:ze,jpeg:ze,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function Lt(e){const t=/\.([^./]*?)$/g.exec(e);return t?t[1]:""}function ke(e){const t=Lt(e).toLowerCase();return Ft[t]||""}function It(e){return e.split(/,/)[1]}function _e(e){return e.search(/^(data:)/)!==-1}function Pt(e,t){return`data:${t};base64,${e}`}async function st(e,t,r){const s=await fetch(e,t);if(s.status===404)throw new Error(`Resource "${s.url}" not found`);const i=await s.blob();return new Promise((a,o)=>{const c=new FileReader;c.onerror=o,c.onloadend=()=>{try{a(r({res:s,result:c.result}))}catch(u){o(u)}},c.readAsDataURL(i)})}const we={};function At(e,t,r){let s=e.replace(/\?.*/,"");return r&&(s=e),/ttf|otf|eot|woff2?/i.test(s)&&(s=s.replace(/.*\//,"")),t?`[${t}]${s}`:s}async function Ce(e,t,r){const s=At(e,t,r.includeQueryParams);if(we[s]!=null)return we[s];r.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+new Date().getTime());let i;try{const a=await st(e,r.fetchRequestInit,({res:o,result:c})=>(t||(t=o.headers.get("Content-Type")||""),It(c)));i=Pt(a,t)}catch(a){i=r.imagePlaceholder||"";let o=`Failed to fetch resource: ${e}`;a&&(o=typeof a=="string"?a:a.message),o&&console.warn(o)}return we[s]=i,i}async function Dt(e){const t=e.toDataURL();return t==="data:,"?e.cloneNode(!1):fe(t)}async function Bt(e,t){if(e.currentSrc){const a=document.createElement("canvas"),o=a.getContext("2d");a.width=e.clientWidth,a.height=e.clientHeight,o==null||o.drawImage(e,0,0,a.width,a.height);const c=a.toDataURL();return fe(c)}const r=e.poster,s=ke(r),i=await Ce(r,s,t);return fe(i)}async function Ht(e,t){var r;try{if(!((r=e==null?void 0:e.contentDocument)===null||r===void 0)&&r.body)return await pe(e.contentDocument.body,t,!0)}catch{}return e.cloneNode(!1)}async function Vt(e,t){return F(e,HTMLCanvasElement)?Dt(e):F(e,HTMLVideoElement)?Bt(e,t):F(e,HTMLIFrameElement)?Ht(e,t):e.cloneNode(nt(e))}const Ot=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SLOT",nt=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SVG";async function Wt(e,t,r){var s,i;if(nt(t))return t;let a=[];return Ot(e)&&e.assignedNodes?a=H(e.assignedNodes()):F(e,HTMLIFrameElement)&&(!((s=e.contentDocument)===null||s===void 0)&&s.body)?a=H(e.contentDocument.body.childNodes):a=H(((i=e.shadowRoot)!==null&&i!==void 0?i:e).childNodes),a.length===0||F(e,HTMLVideoElement)||await a.reduce((o,c)=>o.then(()=>pe(c,r)).then(u=>{u&&t.appendChild(u)}),Promise.resolve()),t}function Ut(e,t,r){const s=t.style;if(!s)return;const i=window.getComputedStyle(e);i.cssText?(s.cssText=i.cssText,s.transformOrigin=i.transformOrigin):tt(r).forEach(a=>{let o=i.getPropertyValue(a);a==="font-size"&&o.endsWith("px")&&(o=`${Math.floor(parseFloat(o.substring(0,o.length-2)))-.1}px`),F(e,HTMLIFrameElement)&&a==="display"&&o==="inline"&&(o="block"),a==="d"&&t.getAttribute("d")&&(o=`path(${t.getAttribute("d")})`),s.setProperty(a,o,i.getPropertyPriority(a))})}function qt(e,t){F(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),F(e,HTMLInputElement)&&t.setAttribute("value",e.value)}function zt(e,t){if(F(e,HTMLSelectElement)){const r=t,s=Array.from(r.children).find(i=>e.value===i.getAttribute("value"));s&&s.setAttribute("selected","")}}function Gt(e,t,r){return F(t,Element)&&(Ut(e,t,r),Mt(e,t,r),qt(e,t),zt(e,t)),t}async function Kt(e,t){const r=e.querySelectorAll?e.querySelectorAll("use"):[];if(r.length===0)return e;const s={};for(let a=0;a<r.length;a++){const c=r[a].getAttribute("xlink:href");if(c){const u=e.querySelector(c),g=document.querySelector(c);!u&&g&&!s[c]&&(s[c]=await pe(g,t,!0))}}const i=Object.values(s);if(i.length){const a="http://www.w3.org/1999/xhtml",o=document.createElementNS(a,"svg");o.setAttribute("xmlns",a),o.style.position="absolute",o.style.width="0",o.style.height="0",o.style.overflow="hidden",o.style.display="none";const c=document.createElementNS(a,"defs");o.appendChild(c);for(let u=0;u<i.length;u++)c.appendChild(i[u]);e.appendChild(o)}return e}async function pe(e,t,r){return!r&&t.filter&&!t.filter(e)?null:Promise.resolve(e).then(s=>Vt(s,t)).then(s=>Wt(e,s,t)).then(s=>Gt(e,s,t)).then(s=>Kt(s,t))}const at=/url\((['"]?)([^'"]+?)\1\)/g,Qt=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,Xt=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function Yt(e){const t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}function Jt(e){const t=[];return e.replace(at,(r,s,i)=>(t.push(i),r)),t.filter(r=>!_e(r))}async function Zt(e,t,r,s,i){try{const a=r?wt(t,r):t,o=ke(t);let c;return i||(c=await Ce(a,o,s)),e.replace(Yt(t),`$1${c}$3`)}catch{}return e}function er(e,{preferredFontFormat:t}){return t?e.replace(Xt,r=>{for(;;){const[s,,i]=Qt.exec(r)||[];if(!i)return"";if(i===t)return`src: ${s};`}}):e}function it(e){return e.search(at)!==-1}async function lt(e,t,r){if(!it(e))return e;const s=er(e,r);return Jt(s).reduce((a,o)=>a.then(c=>Zt(c,o,t,r)),Promise.resolve(s))}async function Q(e,t,r){var s;const i=(s=t.style)===null||s===void 0?void 0:s.getPropertyValue(e);if(i){const a=await lt(i,null,r);return t.style.setProperty(e,a,t.style.getPropertyPriority(e)),!0}return!1}async function tr(e,t){await Q("background",e,t)||await Q("background-image",e,t),await Q("mask",e,t)||await Q("-webkit-mask",e,t)||await Q("mask-image",e,t)||await Q("-webkit-mask-image",e,t)}async function rr(e,t){const r=F(e,HTMLImageElement);if(!(r&&!_e(e.src))&&!(F(e,SVGImageElement)&&!_e(e.href.baseVal)))return;const s=r?e.src:e.href.baseVal,i=await Ce(s,ke(s),t);await new Promise((a,o)=>{e.onload=a,e.onerror=t.onImageErrorHandler?(...u)=>{try{a(t.onImageErrorHandler(...u))}catch(g){o(g)}}:o;const c=e;c.decode&&(c.decode=a),c.loading==="lazy"&&(c.loading="eager"),r?(e.srcset="",e.src=i):e.href.baseVal=i})}async function sr(e,t){const s=H(e.childNodes).map(i=>ot(i,t));await Promise.all(s).then(()=>e)}async function ot(e,t){F(e,Element)&&(await tr(e,t),await rr(e,t),await sr(e,t))}function nr(e,t){const{style:r}=e;t.backgroundColor&&(r.backgroundColor=t.backgroundColor),t.width&&(r.width=`${t.width}px`),t.height&&(r.height=`${t.height}px`);const s=t.style;return s!=null&&Object.keys(s).forEach(i=>{r[i]=s[i]}),e}const Ge={};async function Ke(e){let t=Ge[e];if(t!=null)return t;const s=await(await fetch(e)).text();return t={url:e,cssText:s},Ge[e]=t,t}async function Qe(e,t){let r=e.cssText;const s=/url\(["']?([^"')]+)["']?\)/g,a=(r.match(/url\([^)]+\)/g)||[]).map(async o=>{let c=o.replace(s,"$1");return c.startsWith("https://")||(c=new URL(c,e.url).href),st(c,t.fetchRequestInit,({result:u})=>(r=r.replace(o,`url(${u})`),[o,u]))});return Promise.all(a).then(()=>r)}function Xe(e){if(e==null)return[];const t=[],r=/(\/\*[\s\S]*?\*\/)/gi;let s=e.replace(r,"");const i=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){const u=i.exec(s);if(u===null)break;t.push(u[0])}s=s.replace(i,"");const a=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,o="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})",c=new RegExp(o,"gi");for(;;){let u=a.exec(s);if(u===null){if(u=c.exec(s),u===null)break;a.lastIndex=c.lastIndex}else c.lastIndex=a.lastIndex;t.push(u[0])}return t}async function ar(e,t){const r=[],s=[];return e.forEach(i=>{if("cssRules"in i)try{H(i.cssRules||[]).forEach((a,o)=>{if(a.type===CSSRule.IMPORT_RULE){let c=o+1;const u=a.href,g=Ke(u).then(h=>Qe(h,t)).then(h=>Xe(h).forEach(v=>{try{i.insertRule(v,v.startsWith("@import")?c+=1:i.cssRules.length)}catch(y){console.error("Error inserting rule from remote css",{rule:v,error:y})}})).catch(h=>{console.error("Error loading remote css",h.toString())});s.push(g)}})}catch(a){const o=e.find(c=>c.href==null)||document.styleSheets[0];i.href!=null&&s.push(Ke(i.href).then(c=>Qe(c,t)).then(c=>Xe(c).forEach(u=>{o.insertRule(u,o.cssRules.length)})).catch(c=>{console.error("Error loading remote stylesheet",c)})),console.error("Error inlining remote css file",a)}}),Promise.all(s).then(()=>(e.forEach(i=>{if("cssRules"in i)try{H(i.cssRules||[]).forEach(a=>{r.push(a)})}catch(a){console.error(`Error while reading CSS rules from ${i.href}`,a)}}),r))}function ir(e){return e.filter(t=>t.type===CSSRule.FONT_FACE_RULE).filter(t=>it(t.style.getPropertyValue("src")))}async function lr(e,t){if(e.ownerDocument==null)throw new Error("Provided element is not within a Document");const r=H(e.ownerDocument.styleSheets),s=await ar(r,t);return ir(s)}function ct(e){return e.trim().replace(/["']/g,"")}function or(e){const t=new Set;function r(s){(s.style.fontFamily||getComputedStyle(s).fontFamily).split(",").forEach(a=>{t.add(ct(a))}),Array.from(s.children).forEach(a=>{a instanceof HTMLElement&&r(a)})}return r(e),t}async function cr(e,t){const r=await lr(e,t),s=or(e);return(await Promise.all(r.filter(a=>s.has(ct(a.style.fontFamily))).map(a=>{const o=a.parentStyleSheet?a.parentStyleSheet.href:null;return lt(a.cssText,o,t)}))).join(`
2
- `)}async function dr(e,t){const r=t.fontEmbedCSS!=null?t.fontEmbedCSS:t.skipFonts?null:await cr(e,t);if(r){const s=document.createElement("style"),i=document.createTextNode(r);s.appendChild(i),e.firstChild?e.insertBefore(s,e.firstChild):e.appendChild(s)}}async function ur(e,t={}){const{width:r,height:s}=rt(e,t),i=await pe(e,t,!0);return await dr(i,t),await ot(i,t),nr(i,t),await Nt(i,r,s)}async function mr(e,t={}){const{width:r,height:s}=rt(e,t),i=await ur(e,t),a=await fe(i),o=document.createElement("canvas"),c=o.getContext("2d"),u=t.pixelRatio||St(),g=t.canvasWidth||r,h=t.canvasHeight||s;return o.width=g*u,o.height=h*u,t.skipAutoScale||kt(o),o.style.width=`${g}`,o.style.height=`${h}`,t.backgroundColor&&(c.fillStyle=t.backgroundColor,c.fillRect(0,0,o.width,o.height)),c.drawImage(a,0,0,o.width,o.height),o}async function hr(e,t={}){const r=await mr(e,t);return await Ct(r)}const Se="#ffffff";function fr(){return typeof window>"u"?Se:window.getComputedStyle(document.documentElement).getPropertyValue("--bg-elevated").trim()||Se}function pr(e){if(typeof window>"u")return Se;const t=window.getComputedStyle(e).backgroundColor;return!t||t==="rgba(0, 0, 0, 0)"||t==="transparent"?fr():t}async function gr(e){var r,s;if(typeof window>"u"||!((s=(r=window.navigator)==null?void 0:r.clipboard)!=null&&s.write))throw new Error("Clipboard image copy is not supported in this browser.");if(typeof window.ClipboardItem>"u")throw new Error("Clipboard image copy is not supported in this browser.");const t=await hr(e,{pixelRatio:2,cacheBust:!0,backgroundColor:pr(e)});if(!t)throw new Error("Failed to render screenshot.");await window.navigator.clipboard.write([new window.ClipboardItem({"image/png":t})])}function xr(e,t,r){const s=t?(e??[]).filter(o=>o.task_id===t):e??[],i=s.filter(o=>o.is_open===!1),a=i.reduce((o,c)=>o?(c.best_rank??Number.POSITIVE_INFINITY)<(o.best_rank??Number.POSITIVE_INFINITY)?c:o:c,null);return{visible:r?s.filter(o=>o.is_open!==!1):s,hiddenClosed:i,topHiddenClosed:a}}const br=5;function yr(e){if(!e)return null;const t=e.trim(),r=t.match(/^https?:\/\/(?:www\.)?arxiv\.org\/(?:abs|pdf)\/([^/?#]+)/i);if(r!=null&&r[1])return r[1].replace(/\.pdf$/i,"");const s=t.match(/^(?:https?:\/\/(?:www\.)?paperswithcode\.co)?\/paper\/([^/?#]+)/i);return(s==null?void 0:s[1])??null}function ue(e,t){return e?n.jsx(me,{title:e}):t||"—"}function Ye(e){const t=e.length===7?`${e}-01`:e,r=new Date(t).getTime();return Number.isFinite(r)?r:0}const ve=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function je(e){const t=new Date(e);return{year:t.getFullYear(),month:t.getMonth()}}function wr(e,t){if(e===t){const{year:u,month:g}=je(e);return[{timestamp:new Date(u,g,1).getTime(),key:`${u}-${g}`,label:`${ve[g]} ${u}`}]}const r=je(e),s=je(t);if(r.year===s.year){const u=s.month-r.month+1;let g=1;const h=12;u>h&&(g=Math.ceil(u/h));const v=[];for(let y=r.month;y<=s.month;y+=g)v.push({timestamp:new Date(r.year,y,1).getTime(),key:`${r.year}-${y}`,label:u<=3?`${ve[y]} ${r.year}`:ve[y]});return v}const i=s.year-r.year+1;let a=1;const o=12;i>o&&(a=Math.ceil(i/o));const c=[];for(let u=r.year;u<=s.year;u+=a)c.push({timestamp:new Date(u,0,1).getTime(),key:String(u),label:String(u)});return c}const vr=({points:e,metric:t})=>{const r=ft(),[s,i]=S.useState(null),a=880,o=320,c=60,u=30,g=40,h=50,v=e.map(l=>l.value),y=Math.min(...v),V=Math.max(...v)-y||1,ne=a-c-u,T=o-g-h,A=e.map(l=>Ye(l.date)),O=Math.min(...A),W=Math.max(...A),ae=W-O||1,q=l=>O===W?c+ne/2:c+(l-O)/ae*ne,D=e.map((l,f)=>{const E=q(Ye(l.date)),p=(l.value-y)/V,b=g+T*(1-p);return{x:E,y:b,data:l,idx:f}}),j=D.filter(l=>l.data.isSota);let z="";if(j.length>=2){z=`M${j[0].x},${j[0].y}`;for(let l=1;l<j.length;l++){const f=j[l-1],E=j[l],p=(f.x+E.x)/2;z+=` C${p},${f.y} ${p},${E.y} ${E.x},${E.y}`}}const G=5.4,L=8,ge=9,w=l=>{const f=l.data.modelName||l.data.paperTitle||"";if(!f)return null;const E=f.length>22?f.slice(0,21)+"…":f,p=E.length*G;let b=l.x-p/2,k=l.x+p/2,N="middle";return b<c?(b=c,k=c+p,N="start"):k>a-u&&(k=a-u,b=k-p,N="end"),{x:N==="start"?c:N==="end"?a-u:l.x,y:l.y-ge,text:E,anchor:N,left:b,right:k}},ie=[],I=j.length>0?w(j[j.length-1]):null;let B=-1/0;for(let l=0;l<j.length-1;l++){const f=w(j[l]);f&&(f.left<B+L||I&&f.right>I.left-L||(B=f.right,ie.push({x:f.x,y:f.y,text:f.text,anchor:f.anchor})))}I&&ie.push({x:I.x,y:I.y,text:I.text,anchor:I.anchor});const le=wr(O,W),Y=5,oe=l=>i(f=>f===l?null:f),J=l=>{l&&r(`/paper/${l}`)},U=(l,f)=>{const p=`${l.data.modelName||l.data.paperTitle||"Unknown model"}: ${X(l.data.value)} on ${l.data.dateLabel}`,b=!!l.data.paperRouteId;return n.jsxs("g",{children:[f,n.jsx("circle",{cx:l.x,cy:l.y,r:"10",fill:"transparent",style:{cursor:b?"pointer":"default",outline:"none"},tabIndex:0,role:b?"link":"img","aria-label":p,onMouseEnter:()=>i(l.idx),onMouseLeave:()=>oe(l.idx),onFocus:()=>i(l.idx),onBlur:()=>oe(l.idx),onClick:()=>J(l.data.paperRouteId),onKeyDown:k=>{b&&(k.key==="Enter"||k.key===" ")&&(k.preventDefault(),J(l.data.paperRouteId))},children:n.jsx("title",{children:p})})]},l.idx)};return n.jsxs("svg",{width:"100%",viewBox:`0 0 ${a} ${o}`,style:{display:"block"},children:[n.jsx("text",{x:c-38,y:g+T/2,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-faint)",textAnchor:"middle",transform:`rotate(-90 ${c-38} ${g+T/2})`,children:t}),Array.from({length:Y}).map((l,f)=>{const E=f/(Y-1),p=g+T*(1-E),b=y+V*E;return n.jsxs("g",{children:[n.jsx("line",{x1:c,y1:p,x2:a-u,y2:p,stroke:"var(--hairline)",strokeWidth:"1"}),n.jsx("text",{x:c-10,y:p+4,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-faint)",textAnchor:"end",children:X(b)})]},f)}),le.map(l=>{const f=q(l.timestamp);return n.jsx("text",{x:f,y:o-h+18,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-soft)",textAnchor:"middle",children:l.label},l.key)}),D.filter(l=>!l.data.isSota).map(l=>{const f=s===l.idx;return U(l,n.jsx("circle",{cx:l.x,cy:l.y,r:f?3:2,fill:"var(--ink-faint)",opacity:f?1:.45,style:{transition:"r 0.12s ease, opacity 0.12s ease"}}))}),z&&n.jsx("path",{d:z,stroke:"var(--accent)",strokeWidth:"2",fill:"none",strokeLinejoin:"round",strokeLinecap:"round"}),j.map(l=>{const f=s===l.idx;return U(l,n.jsx("circle",{cx:l.x,cy:l.y,r:f?4.5:3,fill:f?"var(--accent)":"var(--bg-elevated)",stroke:"var(--accent)",strokeWidth:"1.5",style:{transition:"r 0.12s ease, fill 0.12s ease"}}))}),ie.map((l,f)=>n.jsx("text",{x:l.x,y:l.y,fontSize:"9.5",fontFamily:"var(--mono)",fill:"var(--ink-soft)",textAnchor:l.anchor,pointerEvents:"none",style:{paintOrder:"stroke",stroke:"var(--bg-elevated)",strokeWidth:3,strokeLinejoin:"round"},children:l.text},`label-${f}`)),s!==null&&D[s]&&(()=>{const l=D[s],f=l.data.modelName||l.data.paperTitle||"Unknown model",p=`${f.length>40?f.slice(0,39)+"…":f}: ${X(l.data.value)}`,k=Math.max(120,Math.min(340,p.length*6.6+24)),N=30;let M=l.x-k/2;M<c&&(M=c),M+k>a-u&&(M=a-u-k);const ce=l.y-N-14>=g?l.y-N-12:l.y+12;return n.jsxs("g",{pointerEvents:"none",children:[n.jsx("rect",{x:M,y:ce,width:k,height:N,rx:"6",ry:"6",fill:"var(--bg-elevated)",stroke:"var(--hairline-strong)",strokeWidth:"1",style:{filter:"drop-shadow(0 2px 6px rgba(0,0,0,0.08))"}}),n.jsx("text",{x:M+12,y:ce+19,fontSize:"12",fontFamily:"var(--sans)",fill:"var(--ink)",fontWeight:500,children:p})]})})()]})};function se(e){if(e==null)return null;if(typeof e=="number")return Number.isFinite(e)?e:null;const t=e.includes("±")?e.split("±")[0].trim():e.trim(),r=parseFloat(t);return Number.isFinite(r)?r:null}function jr(e){return[e.paper_id,e.task_id,e.dataset_id,e.model_name,e.harness??""].join("|")}function _r(e){const t=new Map;for(const r of e){const s=jr(r),i=t.get(s);if(!i){t.set(s,{...r,metrics:{...r.metrics||{}},sourceEvaluationIds:[r.id],ranksByMetric:r.best_metric&&r.best_rank!=null?{[r.best_metric]:r.best_rank}:{}});continue}i.metrics={...i.metrics,...r.metrics||{}},i.sourceEvaluationIds.push(r.id),r.best_metric&&r.best_rank!=null&&(i.ranksByMetric[r.best_metric]=r.best_rank)}return Array.from(t.values())}function Je(e,t){return t?e.id===t||e.sourceEvaluationIds.includes(t):!1}function Ze(e,t){return e.ranksByMetric[t]??e.best_rank??9999}function Sr(e,t,r){if(e.length===0)return{points:[],sota:0,sotaModel:""};const s=e.map(h=>{var $;const v=se(($=h.metrics)==null?void 0:$[t]),y=h.paper_published_date||"";return{eval:h,value:v,date:y}}).filter(h=>h.value!==null&&!!h.date).sort((h,v)=>h.date.localeCompare(v.date)),i=[];let a=null;for(const h of s){const v=a==null?!0:r==="↓"?h.value<a:h.value>a;v&&(a=h.value),i.push({value:h.value,date:h.date,dateLabel:h.date.slice(0,7),modelName:h.eval.model_name||"",paperTitle:h.eval.paper_title||"",paperRouteId:h.eval.paper_arxiv_id||h.eval.paper_id||null,isSota:v})}const c=e.map(h=>{var v;return{eval:h,value:se((v=h.metrics)==null?void 0:v[t])}}).filter(h=>h.value!==null).sort((h,v)=>r==="↓"?h.value-v.value:v.value-h.value)[0],u=(c==null?void 0:c.value)??0,g=(c==null?void 0:c.eval.model_name)||(c==null?void 0:c.eval.paper_title)||"";return{points:i,sota:u,sotaModel:g}}const et=({targetRef:e,label:t})=>{const{toast:r}=ht(),[s,i]=S.useState("idle"),a=S.useRef(null);S.useEffect(()=>()=>{a.current!==null&&window.clearTimeout(a.current)},[]);const o=S.useCallback(async()=>{const u=e.current;if(u){i("copying"),u.classList.add("is-capturing"),u.offsetHeight,await new Promise(g=>window.requestAnimationFrame(()=>g()));try{await gr(u),i("copied"),r({title:"Screenshot copied",description:`Image of the ${t} copied to your clipboard.`}),a.current!==null&&window.clearTimeout(a.current),a.current=window.setTimeout(()=>i("idle"),1500)}catch(g){i("idle"),r({title:"Copy failed",description:g instanceof Error&&g.message?g.message:"Could not copy the screenshot to your clipboard.",variant:"destructive"})}finally{u.classList.remove("is-capturing")}}},[e,t,r]),c=s==="copied"?"Copied":s==="copying"?"Copying…":"Copy image";return n.jsxs("button",{type:"button",className:"bm-copy-btn",onClick:o,disabled:s==="copying","aria-label":`Copy ${t} screenshot to clipboard`,title:`Copy ${t} screenshot to clipboard`,children:[n.jsx(xt,{name:"copy",size:11}),c]})},Pr=()=>{var Ne,Re,$e,Te,Me,Fe,Le,Ie,Pe,Ae;const{datasetSlug:e}=dt(),[t]=ut(),r=t.get("task")||void 0,s=t.get("eval")||void 0,{preferences:i,setHideClosedSourceEvals:a}=mt(),[o,c]=S.useState(void 0),u=S.useRef(null),g=S.useRef(!1),h=S.useRef(null),v=S.useRef(null),y=re({queryKey:["dataset",e,"with-paper"],queryFn:()=>te.getDatasetBySlug(e,{include_paper:!0}),enabled:!!e,staleTime:10*60*1e3}),$=re({queryKey:["dataset-evals",(Ne=y.data)==null?void 0:Ne.id],queryFn:()=>te.getEvaluationsByDataset(y.data.id),enabled:!!((Re=y.data)!=null&&Re.id),staleTime:5*60*1e3}),V=re({queryKey:["dataset-tasks",($e=y.data)==null?void 0:$e.id],queryFn:()=>te.getDatasetTasks(y.data.id),enabled:!!((Te=y.data)!=null&&Te.id),staleTime:10*60*1e3}),ne=re({queryKey:["metric-directions"],queryFn:()=>te.getMetricDirections(),staleTime:60*60*1e3}),T=S.useMemo(()=>{var d;return!s||!((d=$.data)!=null&&d.length)?null:$.data.find(x=>x.id===s)||null},[s,$.data]),A=S.useMemo(()=>{const d=V.data||[];if(d.length===0)return null;if(T!=null&&T.task_id&&d.some(m=>m.id===T.task_id))return T.task_id;if(r){const m=d.find(C=>C.slug===r);if(m)return m.id}if(d.length===1)return d[0].id;const x=$.data||[];if(x.length>0){const m=new Map;for(const _ of x)m.set(_.task_id,(m.get(_.task_id)||0)+1);let C=null,R=-1;for(const _ of d){const Z=m.get(_.id)||0;Z>R&&(R=Z,C=_.id)}if(C)return C}return d[0].id},[V.data,$.data,r,T]),O=re({queryKey:["leaderboard-metrics",(Me=y.data)==null?void 0:Me.id,A],queryFn:()=>te.getLeaderboardMetrics(y.data.id,A),enabled:!!((Fe=y.data)!=null&&Fe.id)&&!!A,staleTime:10*60*1e3}),W=S.useMemo(()=>xr($.data,A,i.hide_closed_source_evals),[$.data,A,i.hide_closed_source_evals]),ae=W.visible,q=W.hiddenClosed,D=W.topHiddenClosed,j=S.useMemo(()=>_r(ae),[ae]),z=S.useMemo(()=>{const d=new Set;return j.forEach(x=>{x.best_metric&&d.add(x.best_metric),Object.keys(x.metrics||{}).forEach(m=>d.add(m))}),Array.from(d)},[j]),G=S.useMemo(()=>(O.data||[]).map(d=>d.metric_name),[O.data]),L=G.length?G:z,ge=S.useMemo(()=>{var C;if(j.length===0)return L[0]||"";const d=new Map;for(const R of j)for(const _ of Object.keys(R.metrics||{}))G.length&&!L.includes(_)||d.set(_,(d.get(_)||0)+1);let x=null,m=0;for(const[R,_]of d)_>m&&(m=_,x=R);return x||L[0]||((C=j[0])==null?void 0:C.best_metric)||""},[j,L,G]),w=o||(T==null?void 0:T.best_metric)||ge,I=(((Ie=(Le=ne.data)==null?void 0:Le.directions)==null?void 0:Ie[w])||"higher_is_better")==="lower_is_better"?"↓":"↑",B=S.useMemo(()=>!w||!L.includes(w)?L:[w,...L.filter(d=>d!==w)],[L,w]),le=S.useMemo(()=>B.length===0?w?[w]:[]:B.slice(0,br),[B,w]),{points:Y,sota:oe,sotaModel:J}=S.useMemo(()=>Sr(j,w,I),[j,w,I]);S.useEffect(()=>{if(g.current||!s||!$.data||$.data.length===0)return;const d=u.current;d&&(g.current=!0,d.scrollIntoView({behavior:"smooth",block:"start"}))},[s,$.data]);const U=S.useMemo(()=>{const d=V.data||[];return A?d.find(x=>x.id===A)||d[0]||null:d[0]||null},[V.data,A]);if(y.isLoading)return n.jsxs("div",{className:"page",children:[n.jsx(ye,{className:"h-12 w-1/2 mb-6"}),n.jsx(ye,{className:"h-64 w-full"})]});if(y.error||!y.data)return n.jsx("div",{className:"page",children:n.jsx(pt,{variant:"destructive",children:n.jsx(gt,{children:"Benchmark not found."})})});const l=y.data,f=j.slice().sort((d,x)=>{var R,_;const m=se((R=d.metrics)==null?void 0:R[w]),C=se((_=x.metrics)==null?void 0:_[w]);return m!==null&&C!==null?I==="↓"?m-C:C-m:m!==null?-1:C!==null?1:Ze(d,w)-Ze(x,w)}),E=!!l.supports_harness,p=s&&f.find(d=>Je(d,s))||null,b=l.introducing_paper??void 0,k=(b==null?void 0:b.arxiv_id)||(b==null?void 0:b.id)||yr(l.paper_url),N=(b==null?void 0:b.title)||l.introducing_paper_title||null,M=((Pe=b==null?void 0:b.published)==null?void 0:Pe.slice(0,4))||l.introduced_year||null,Ee=!!k||!!l.paper_url||!!N,ce=b!=null&&b.arxiv_id||(Ae=l.paper_url)!=null&&Ae.match(/^https?:\/\/(?:www\.)?arxiv\.org\//i)?`arXiv:${k}`:`Paper ${k}`;return n.jsx("div",{className:"page",children:n.jsxs("div",{className:"bm-page",children:[n.jsxs("div",{className:"breadcrumb",children:[n.jsx(ee,{to:"/tasks",children:"Tasks"}),U&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"sep",children:"/"}),n.jsx(ee,{to:`/tasks/${U.slug||U.id}`,children:U.name})]}),n.jsx("span",{className:"sep",children:"/"}),n.jsx("span",{style:{color:"var(--accent-text)"},children:l.name})]}),n.jsx("h1",{className:"bm-title",children:l.name}),n.jsxs("div",{className:"bm-subtitle",style:{display:"flex",alignItems:"center",gap:16,flexWrap:"wrap"},children:[n.jsxs("span",{children:[w&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"metric-tag",children:w}),n.jsx("span",{style:{color:"var(--hairline-strong)",margin:"0 8px"},children:"·"})]}),J?n.jsxs("span",{children:["Best: ",n.jsx("span",{className:"best-name",children:X(oe)})," by ",n.jsx("span",{className:"best-name",style:{fontStyle:"normal"},children:J})]}):n.jsxs("span",{children:[f.length," evaluations"]})]}),l.hf_url&&n.jsxs("a",{className:"bm-action-btn",href:l.hf_url,target:"_blank",rel:"noopener noreferrer",children:[n.jsx("span",{"aria-hidden":"true",children:"🤗"})," View on Hugging Face"]})]}),l.description&&n.jsx("p",{style:{fontFamily:"var(--serif)",color:"var(--ink-soft)",maxWidth:760,marginBottom:16},children:l.description}),i.hide_closed_source_evals&&q.length>0&&n.jsxs("div",{className:"bm-hidden-closed-notice",children:[n.jsxs("span",{children:[q.length," closed-source ",q.length===1?"row is":"rows are"," hidden",D!=null&&D.model_name?n.jsxs(n.Fragment,{children:[", including ",n.jsx("strong",{children:D.model_name})]}):null,"."]}),n.jsx("button",{type:"button",className:"bm-hidden-closed-action",onClick:()=>{a(!1)},children:"Show closed-source"})]}),Ee&&n.jsxs("div",{className:"method-source",style:{marginTop:0,marginBottom:18},children:[n.jsx("span",{className:"method-source-label",children:"Source"}),k?n.jsxs(ee,{to:`/paper/${k}`,target:"_blank",rel:"noopener noreferrer",className:"method-source-link",children:[n.jsx("span",{className:"method-source-title",children:N?n.jsx(me,{title:N}):ce}),M&&n.jsx("span",{className:"method-source-meta",children:M})]}):l.paper_url?n.jsxs("a",{href:l.paper_url,target:"_blank",rel:"noopener noreferrer",className:"method-source-link",children:[n.jsx("span",{className:"method-source-title",children:N?n.jsx(me,{title:N}):l.paper_url}),M&&n.jsx("span",{className:"method-source-meta",children:M})]}):n.jsxs("div",{className:"method-source-link is-static",children:[n.jsx("span",{className:"method-source-title",children:N?n.jsx(me,{title:N}):null}),M&&n.jsx("span",{className:"method-source-meta",children:M})]})]}),Y.filter(d=>d.isSota).length>=2&&n.jsxs("div",{className:"bm-card",ref:h,children:[n.jsxs("div",{className:"bm-card-screenshot-header","aria-hidden":"true",children:[n.jsxs("div",{className:"bm-card-screenshot-title",children:[n.jsx("span",{className:"bm-card-screenshot-eyebrow",children:"Benchmark"}),n.jsx("span",{className:"bm-card-screenshot-name",children:l.name})]}),n.jsxs("div",{className:"bm-card-screenshot-brand",children:[n.jsxs("span",{className:"brand",children:[n.jsx("span",{className:"brand-mark"}),n.jsxs("span",{className:"brand-name",children:["Papers ",n.jsx("em",{children:"With Code"})]})]}),n.jsx("span",{className:"bm-card-screenshot-url",children:"paperswithcode.co"})]})]}),n.jsxs("div",{className:"bm-card-head",children:[n.jsx("div",{className:"bm-card-title",children:"SOTA progression"}),n.jsxs("div",{className:"bm-card-actions",children:[L.length>1&&n.jsxs("label",{className:"bm-view-select",children:[n.jsx("span",{className:"bm-view-select-label",children:"View"}),n.jsx("select",{value:w,onChange:d=>c(d.target.value),children:B.map(d=>n.jsx("option",{value:d,children:d},d))})]}),n.jsxs("label",{className:"bm-closed-toggle",title:"Show or hide evaluations of closed-source models",children:[n.jsx(We,{className:"bm-closed-toggle-switch",checked:!i.hide_closed_source_evals,onCheckedChange:d=>{a(!d)},"aria-label":"Show closed-source models"}),n.jsx("span",{className:"bm-closed-toggle-label",children:"Closed-source"})]}),n.jsx(et,{targetRef:h,label:"SOTA chart"})]})]}),n.jsx("div",{className:"bm-chart-wrap",children:n.jsx(vr,{points:Y,metric:w})}),n.jsxs("div",{className:"bm-chart-foot",children:[n.jsx("span",{className:"legend-dot"}),"All models over time · highlighted dots track the running best · hover for the model · click to open the paper"]})]}),p&&(()=>{var R,_;const d=p.paper_arxiv_id||p.paper_id,x=p.paper_title||(p.paper_arxiv_id?`arXiv:${p.paper_arxiv_id}`:null),m=p.best_metric&&((R=p.metrics)==null?void 0:R[p.best_metric])!==void 0?p.best_metric:w,C=(_=p.metrics)==null?void 0:_[m];return n.jsxs("div",{className:"bm-highlight-banner",role:"status",children:[n.jsx("span",{className:"bm-highlight-dot","aria-hidden":"true"}),n.jsxs("div",{className:"bm-highlight-text",children:[n.jsx("span",{className:"bm-highlight-label",children:"Comparing result"}),n.jsxs("span",{className:"bm-highlight-paper",children:[p.model_name||x||"—",p.harness?` · ${p.harness}`:""]}),n.jsxs("span",{className:"bm-highlight-meta",children:[C!==void 0&&m?n.jsxs(n.Fragment,{children:[m,": ",X(C),x?" · ":""]}):null,d?n.jsx(ee,{to:`/paper/${d}`,children:ue(p.paper_title,x)}):ue(p.paper_title,x)]})]})]})})(),n.jsxs("div",{className:"bm-card",ref:v,children:[n.jsxs("div",{className:"bm-card-screenshot-header","aria-hidden":"true",children:[n.jsxs("div",{className:"bm-card-screenshot-title",children:[n.jsx("span",{className:"bm-card-screenshot-eyebrow",children:"Benchmark"}),n.jsx("span",{className:"bm-card-screenshot-name",children:l.name})]}),n.jsxs("div",{className:"bm-card-screenshot-brand",children:[n.jsxs("span",{className:"brand",children:[n.jsx("span",{className:"brand-mark"}),n.jsxs("span",{className:"brand-name",children:["Papers ",n.jsx("em",{children:"With Code"})]})]}),n.jsx("span",{className:"bm-card-screenshot-url",children:"paperswithcode.co"})]})]}),n.jsxs("div",{className:"bm-card-head",children:[n.jsx("div",{className:"bm-card-title",children:"Leaderboard"}),n.jsxs("div",{className:"bm-card-actions",children:[L.length>1&&n.jsxs("label",{className:"bm-view-select",children:[n.jsx("span",{className:"bm-view-select-label",children:"View"}),n.jsx("select",{value:w,onChange:d=>c(d.target.value),children:B.map(d=>n.jsx("option",{value:d,children:d},d))})]}),n.jsxs("label",{className:"bm-closed-toggle",title:"Show or hide evaluations of closed-source models",children:[n.jsx(We,{className:"bm-closed-toggle-switch",checked:!i.hide_closed_source_evals,onCheckedChange:d=>{a(!d)},"aria-label":"Show closed-source models"}),n.jsx("span",{className:"bm-closed-toggle-label",children:"Closed-source"})]}),n.jsx(et,{targetRef:v,label:"leaderboard"})]})]}),$.isLoading?n.jsx("div",{style:{padding:16},children:Array.from({length:5}).map((d,x)=>n.jsx(ye,{className:"h-10 w-full mb-2"},x))}):f.length===0?n.jsx("div",{className:"no-results",children:"No evaluations submitted yet."}):n.jsx("div",{className:"bm-table-scroll",children:n.jsxs("table",{className:"bm-table",children:[n.jsx("thead",{children:n.jsxs("tr",{children:[n.jsx("th",{className:"col-rank",children:"Rank"}),n.jsx("th",{className:"col-model",children:"Model"}),E&&n.jsx("th",{className:"col-harness",children:"Harness"}),le.map(d=>{const x=d===w;return n.jsx("th",{className:`col-value ${x?"is-active":""}`,"aria-sort":x?I==="↓"?"ascending":"descending":"none",children:n.jsxs("button",{type:"button",className:"bm-metric-header",onClick:()=>c(d),"aria-pressed":x,title:`Sort by ${d}`,children:[d,x?` ${I}`:""]})},d)}),n.jsx("th",{className:"col-paper",children:"Paper"}),n.jsx("th",{className:"col-year",children:"Year"})]})}),n.jsx("tbody",{children:(()=>{let d=null,x=0;return f.map((m,C)=>{var Be,He;const R=se((Be=m.metrics)==null?void 0:Be[w]);let _=null;R!==null&&((d===null||R!==d)&&(x=C+1,d=R),_=x);const Z=m.paper_arxiv_id||m.paper_id,De=m.paper_title||(m.paper_arxiv_id?`arXiv:${m.paper_arxiv_id}`:null),xe=Je(m,s);return n.jsxs("tr",{ref:xe?u:void 0,className:xe?"is-highlighted":void 0,children:[n.jsx("td",{className:"col-rank",children:_??"—"}),n.jsxs("td",{className:"col-model",children:[xe&&n.jsx("span",{className:"bm-row-marker","aria-hidden":"true"}),m.hf_model_url?n.jsx("a",{href:m.hf_model_url,target:"_blank",rel:"noopener noreferrer",className:"bm-model-link",title:`Open ${m.model_name||"model"} on Hugging Face`,children:m.model_name||"—"}):m.model_name||"—",m.is_open===!1&&n.jsx(bt,{}),(m.external??m.is_external)&&n.jsx(yt,{sourceUrl:m.source_url||m.external_source_url||m.result_url})]}),E&&n.jsx("td",{className:"col-harness",children:m.harness||"—"}),le.map(be=>{var Oe;const Ve=be===w,de=(Oe=m.metrics)==null?void 0:Oe[be];return n.jsx("td",{className:`col-value${Ve?" is-active":""}${Ve&&_===1?" is-best":""}`,children:de!=null&&de!==""?X(de):"—"},be)}),n.jsx("td",{className:"col-paper",children:Z?n.jsx(ee,{to:`/paper/${Z}`,children:ue(m.paper_title,De)}):ue(m.paper_title,De)}),n.jsx("td",{className:"col-year",children:((He=m.paper_published_date)==null?void 0:He.slice(0,4))||"—"})]},m.id)})})()})]})})]})]})})};export{Pr as default};
 
1
+ import{e as dt,u as ut,a3 as mt,r as _,j as n,L as ee,a8 as X,v as ht,a as ft,b as te}from"./index-CKAClQ2e.js";import{u as re}from"./useQuery-DVaOQYVk.js";import{S as ye}from"./skeleton-BYz337Ss.js";import{S as We}from"./switch-CjKtXruW.js";import{A as pt,a as gt}from"./alert-4m2SJo0T.js";import{L as me}from"./LatexTitle-DBZLS4yb.js";import{I as xt}from"./components-CM9AEXO8.js";import{C as bt,E as yt}from"./ExternalSourceEvalBadge-CTYhU1gt.js";import"./index-DCl-K7k4.js";import"./katex.min-BSBacQyE.js";import"./transform-BCXN61O6.js";import"./hover-card-DZ5zXJ4P.js";function wt(e,t){if(e.match(/^[a-z]+:\/\//i))return e;if(e.match(/^\/\//))return window.location.protocol+e;if(e.match(/^[a-z]+:/i))return e;const r=document.implementation.createHTMLDocument(),s=r.createElement("base"),i=r.createElement("a");return r.head.appendChild(s),r.body.appendChild(i),t&&(s.href=t),i.href=e,i.href}const vt=(()=>{let e=0;const t=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(e+=1,`u${t()}${e}`)})();function H(e){const t=[];for(let r=0,s=e.length;r<s;r++)t.push(e[r]);return t}let K=null;function tt(e={}){return K||(e.includeStyleProperties?(K=e.includeStyleProperties,K):(K=H(window.getComputedStyle(document.documentElement)),K))}function he(e,t){const s=(e.ownerDocument.defaultView||window).getComputedStyle(e).getPropertyValue(t);return s?parseFloat(s.replace("px","")):0}function jt(e){const t=he(e,"border-left-width"),r=he(e,"border-right-width");return e.clientWidth+t+r}function St(e){const t=he(e,"border-top-width"),r=he(e,"border-bottom-width");return e.clientHeight+t+r}function rt(e,t={}){const r=t.width||jt(e),s=t.height||St(e);return{width:r,height:s}}function _t(){let e,t;try{t=process}catch{}const r=t&&t.env?t.env.devicePixelRatio:null;return r&&(e=parseInt(r,10),Number.isNaN(e)&&(e=1)),e||window.devicePixelRatio||1}const P=16384;function kt(e){(e.width>P||e.height>P)&&(e.width>P&&e.height>P?e.width>e.height?(e.height*=P/e.width,e.width=P):(e.width*=P/e.height,e.height=P):e.width>P?(e.height*=P/e.width,e.width=P):(e.width*=P/e.height,e.height=P))}function Ct(e,t={}){return e.toBlob?new Promise(r=>{e.toBlob(r,t.type?t.type:"image/png",t.quality?t.quality:1)}):new Promise(r=>{const s=window.atob(e.toDataURL(t.type?t.type:void 0,t.quality?t.quality:void 0).split(",")[1]),i=s.length,a=new Uint8Array(i);for(let o=0;o<i;o+=1)a[o]=s.charCodeAt(o);r(new Blob([a],{type:t.type?t.type:"image/png"}))})}function fe(e){return new Promise((t,r)=>{const s=new Image;s.onload=()=>{s.decode().then(()=>{requestAnimationFrame(()=>t(s))})},s.onerror=r,s.crossOrigin="anonymous",s.decoding="async",s.src=e})}async function Et(e){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then(t=>`data:image/svg+xml;charset=utf-8,${t}`)}async function Nt(e,t,r){const s="http://www.w3.org/2000/svg",i=document.createElementNS(s,"svg"),a=document.createElementNS(s,"foreignObject");return i.setAttribute("width",`${t}`),i.setAttribute("height",`${r}`),i.setAttribute("viewBox",`0 0 ${t} ${r}`),a.setAttribute("width","100%"),a.setAttribute("height","100%"),a.setAttribute("x","0"),a.setAttribute("y","0"),a.setAttribute("externalResourcesRequired","true"),i.appendChild(a),a.appendChild(e),Et(i)}const F=(e,t)=>{if(e instanceof t)return!0;const r=Object.getPrototypeOf(e);return r===null?!1:r.constructor.name===t.name||F(r,t)};function Rt(e){const t=e.getPropertyValue("content");return`${e.cssText} content: '${t.replace(/'|"/g,"")}';`}function $t(e,t){return tt(t).map(r=>{const s=e.getPropertyValue(r),i=e.getPropertyPriority(r);return`${r}: ${s}${i?" !important":""};`}).join(" ")}function Tt(e,t,r,s){const i=`.${e}:${t}`,a=r.cssText?Rt(r):$t(r,s);return document.createTextNode(`${i}{${a}}`)}function Ue(e,t,r,s){const i=window.getComputedStyle(e,r),a=i.getPropertyValue("content");if(a===""||a==="none")return;const o=vt();try{t.className=`${t.className} ${o}`}catch{return}const c=document.createElement("style");c.appendChild(Tt(o,r,i,s)),t.appendChild(c)}function Mt(e,t,r){Ue(e,t,":before",r),Ue(e,t,":after",r)}const qe="application/font-woff",ze="image/jpeg",Ft={woff:qe,woff2:qe,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:ze,jpeg:ze,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function Lt(e){const t=/\.([^./]*?)$/g.exec(e);return t?t[1]:""}function ke(e){const t=Lt(e).toLowerCase();return Ft[t]||""}function It(e){return e.split(/,/)[1]}function Se(e){return e.search(/^(data:)/)!==-1}function Pt(e,t){return`data:${t};base64,${e}`}async function st(e,t,r){const s=await fetch(e,t);if(s.status===404)throw new Error(`Resource "${s.url}" not found`);const i=await s.blob();return new Promise((a,o)=>{const c=new FileReader;c.onerror=o,c.onloadend=()=>{try{a(r({res:s,result:c.result}))}catch(u){o(u)}},c.readAsDataURL(i)})}const we={};function At(e,t,r){let s=e.replace(/\?.*/,"");return r&&(s=e),/ttf|otf|eot|woff2?/i.test(s)&&(s=s.replace(/.*\//,"")),t?`[${t}]${s}`:s}async function Ce(e,t,r){const s=At(e,t,r.includeQueryParams);if(we[s]!=null)return we[s];r.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+new Date().getTime());let i;try{const a=await st(e,r.fetchRequestInit,({res:o,result:c})=>(t||(t=o.headers.get("Content-Type")||""),It(c)));i=Pt(a,t)}catch(a){i=r.imagePlaceholder||"";let o=`Failed to fetch resource: ${e}`;a&&(o=typeof a=="string"?a:a.message),o&&console.warn(o)}return we[s]=i,i}async function Dt(e){const t=e.toDataURL();return t==="data:,"?e.cloneNode(!1):fe(t)}async function Bt(e,t){if(e.currentSrc){const a=document.createElement("canvas"),o=a.getContext("2d");a.width=e.clientWidth,a.height=e.clientHeight,o==null||o.drawImage(e,0,0,a.width,a.height);const c=a.toDataURL();return fe(c)}const r=e.poster,s=ke(r),i=await Ce(r,s,t);return fe(i)}async function Ht(e,t){var r;try{if(!((r=e==null?void 0:e.contentDocument)===null||r===void 0)&&r.body)return await pe(e.contentDocument.body,t,!0)}catch{}return e.cloneNode(!1)}async function Vt(e,t){return F(e,HTMLCanvasElement)?Dt(e):F(e,HTMLVideoElement)?Bt(e,t):F(e,HTMLIFrameElement)?Ht(e,t):e.cloneNode(nt(e))}const Ot=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SLOT",nt=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SVG";async function Wt(e,t,r){var s,i;if(nt(t))return t;let a=[];return Ot(e)&&e.assignedNodes?a=H(e.assignedNodes()):F(e,HTMLIFrameElement)&&(!((s=e.contentDocument)===null||s===void 0)&&s.body)?a=H(e.contentDocument.body.childNodes):a=H(((i=e.shadowRoot)!==null&&i!==void 0?i:e).childNodes),a.length===0||F(e,HTMLVideoElement)||await a.reduce((o,c)=>o.then(()=>pe(c,r)).then(u=>{u&&t.appendChild(u)}),Promise.resolve()),t}function Ut(e,t,r){const s=t.style;if(!s)return;const i=window.getComputedStyle(e);i.cssText?(s.cssText=i.cssText,s.transformOrigin=i.transformOrigin):tt(r).forEach(a=>{let o=i.getPropertyValue(a);a==="font-size"&&o.endsWith("px")&&(o=`${Math.floor(parseFloat(o.substring(0,o.length-2)))-.1}px`),F(e,HTMLIFrameElement)&&a==="display"&&o==="inline"&&(o="block"),a==="d"&&t.getAttribute("d")&&(o=`path(${t.getAttribute("d")})`),s.setProperty(a,o,i.getPropertyPriority(a))})}function qt(e,t){F(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),F(e,HTMLInputElement)&&t.setAttribute("value",e.value)}function zt(e,t){if(F(e,HTMLSelectElement)){const r=t,s=Array.from(r.children).find(i=>e.value===i.getAttribute("value"));s&&s.setAttribute("selected","")}}function Gt(e,t,r){return F(t,Element)&&(Ut(e,t,r),Mt(e,t,r),qt(e,t),zt(e,t)),t}async function Kt(e,t){const r=e.querySelectorAll?e.querySelectorAll("use"):[];if(r.length===0)return e;const s={};for(let a=0;a<r.length;a++){const c=r[a].getAttribute("xlink:href");if(c){const u=e.querySelector(c),g=document.querySelector(c);!u&&g&&!s[c]&&(s[c]=await pe(g,t,!0))}}const i=Object.values(s);if(i.length){const a="http://www.w3.org/1999/xhtml",o=document.createElementNS(a,"svg");o.setAttribute("xmlns",a),o.style.position="absolute",o.style.width="0",o.style.height="0",o.style.overflow="hidden",o.style.display="none";const c=document.createElementNS(a,"defs");o.appendChild(c);for(let u=0;u<i.length;u++)c.appendChild(i[u]);e.appendChild(o)}return e}async function pe(e,t,r){return!r&&t.filter&&!t.filter(e)?null:Promise.resolve(e).then(s=>Vt(s,t)).then(s=>Wt(e,s,t)).then(s=>Gt(e,s,t)).then(s=>Kt(s,t))}const at=/url\((['"]?)([^'"]+?)\1\)/g,Qt=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,Xt=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function Yt(e){const t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}function Jt(e){const t=[];return e.replace(at,(r,s,i)=>(t.push(i),r)),t.filter(r=>!Se(r))}async function Zt(e,t,r,s,i){try{const a=r?wt(t,r):t,o=ke(t);let c;return i||(c=await Ce(a,o,s)),e.replace(Yt(t),`$1${c}$3`)}catch{}return e}function er(e,{preferredFontFormat:t}){return t?e.replace(Xt,r=>{for(;;){const[s,,i]=Qt.exec(r)||[];if(!i)return"";if(i===t)return`src: ${s};`}}):e}function it(e){return e.search(at)!==-1}async function lt(e,t,r){if(!it(e))return e;const s=er(e,r);return Jt(s).reduce((a,o)=>a.then(c=>Zt(c,o,t,r)),Promise.resolve(s))}async function Q(e,t,r){var s;const i=(s=t.style)===null||s===void 0?void 0:s.getPropertyValue(e);if(i){const a=await lt(i,null,r);return t.style.setProperty(e,a,t.style.getPropertyPriority(e)),!0}return!1}async function tr(e,t){await Q("background",e,t)||await Q("background-image",e,t),await Q("mask",e,t)||await Q("-webkit-mask",e,t)||await Q("mask-image",e,t)||await Q("-webkit-mask-image",e,t)}async function rr(e,t){const r=F(e,HTMLImageElement);if(!(r&&!Se(e.src))&&!(F(e,SVGImageElement)&&!Se(e.href.baseVal)))return;const s=r?e.src:e.href.baseVal,i=await Ce(s,ke(s),t);await new Promise((a,o)=>{e.onload=a,e.onerror=t.onImageErrorHandler?(...u)=>{try{a(t.onImageErrorHandler(...u))}catch(g){o(g)}}:o;const c=e;c.decode&&(c.decode=a),c.loading==="lazy"&&(c.loading="eager"),r?(e.srcset="",e.src=i):e.href.baseVal=i})}async function sr(e,t){const s=H(e.childNodes).map(i=>ot(i,t));await Promise.all(s).then(()=>e)}async function ot(e,t){F(e,Element)&&(await tr(e,t),await rr(e,t),await sr(e,t))}function nr(e,t){const{style:r}=e;t.backgroundColor&&(r.backgroundColor=t.backgroundColor),t.width&&(r.width=`${t.width}px`),t.height&&(r.height=`${t.height}px`);const s=t.style;return s!=null&&Object.keys(s).forEach(i=>{r[i]=s[i]}),e}const Ge={};async function Ke(e){let t=Ge[e];if(t!=null)return t;const s=await(await fetch(e)).text();return t={url:e,cssText:s},Ge[e]=t,t}async function Qe(e,t){let r=e.cssText;const s=/url\(["']?([^"')]+)["']?\)/g,a=(r.match(/url\([^)]+\)/g)||[]).map(async o=>{let c=o.replace(s,"$1");return c.startsWith("https://")||(c=new URL(c,e.url).href),st(c,t.fetchRequestInit,({result:u})=>(r=r.replace(o,`url(${u})`),[o,u]))});return Promise.all(a).then(()=>r)}function Xe(e){if(e==null)return[];const t=[],r=/(\/\*[\s\S]*?\*\/)/gi;let s=e.replace(r,"");const i=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){const u=i.exec(s);if(u===null)break;t.push(u[0])}s=s.replace(i,"");const a=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,o="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})",c=new RegExp(o,"gi");for(;;){let u=a.exec(s);if(u===null){if(u=c.exec(s),u===null)break;a.lastIndex=c.lastIndex}else c.lastIndex=a.lastIndex;t.push(u[0])}return t}async function ar(e,t){const r=[],s=[];return e.forEach(i=>{if("cssRules"in i)try{H(i.cssRules||[]).forEach((a,o)=>{if(a.type===CSSRule.IMPORT_RULE){let c=o+1;const u=a.href,g=Ke(u).then(h=>Qe(h,t)).then(h=>Xe(h).forEach(v=>{try{i.insertRule(v,v.startsWith("@import")?c+=1:i.cssRules.length)}catch(y){console.error("Error inserting rule from remote css",{rule:v,error:y})}})).catch(h=>{console.error("Error loading remote css",h.toString())});s.push(g)}})}catch(a){const o=e.find(c=>c.href==null)||document.styleSheets[0];i.href!=null&&s.push(Ke(i.href).then(c=>Qe(c,t)).then(c=>Xe(c).forEach(u=>{o.insertRule(u,o.cssRules.length)})).catch(c=>{console.error("Error loading remote stylesheet",c)})),console.error("Error inlining remote css file",a)}}),Promise.all(s).then(()=>(e.forEach(i=>{if("cssRules"in i)try{H(i.cssRules||[]).forEach(a=>{r.push(a)})}catch(a){console.error(`Error while reading CSS rules from ${i.href}`,a)}}),r))}function ir(e){return e.filter(t=>t.type===CSSRule.FONT_FACE_RULE).filter(t=>it(t.style.getPropertyValue("src")))}async function lr(e,t){if(e.ownerDocument==null)throw new Error("Provided element is not within a Document");const r=H(e.ownerDocument.styleSheets),s=await ar(r,t);return ir(s)}function ct(e){return e.trim().replace(/["']/g,"")}function or(e){const t=new Set;function r(s){(s.style.fontFamily||getComputedStyle(s).fontFamily).split(",").forEach(a=>{t.add(ct(a))}),Array.from(s.children).forEach(a=>{a instanceof HTMLElement&&r(a)})}return r(e),t}async function cr(e,t){const r=await lr(e,t),s=or(e);return(await Promise.all(r.filter(a=>s.has(ct(a.style.fontFamily))).map(a=>{const o=a.parentStyleSheet?a.parentStyleSheet.href:null;return lt(a.cssText,o,t)}))).join(`
2
+ `)}async function dr(e,t){const r=t.fontEmbedCSS!=null?t.fontEmbedCSS:t.skipFonts?null:await cr(e,t);if(r){const s=document.createElement("style"),i=document.createTextNode(r);s.appendChild(i),e.firstChild?e.insertBefore(s,e.firstChild):e.appendChild(s)}}async function ur(e,t={}){const{width:r,height:s}=rt(e,t),i=await pe(e,t,!0);return await dr(i,t),await ot(i,t),nr(i,t),await Nt(i,r,s)}async function mr(e,t={}){const{width:r,height:s}=rt(e,t),i=await ur(e,t),a=await fe(i),o=document.createElement("canvas"),c=o.getContext("2d"),u=t.pixelRatio||_t(),g=t.canvasWidth||r,h=t.canvasHeight||s;return o.width=g*u,o.height=h*u,t.skipAutoScale||kt(o),o.style.width=`${g}`,o.style.height=`${h}`,t.backgroundColor&&(c.fillStyle=t.backgroundColor,c.fillRect(0,0,o.width,o.height)),c.drawImage(a,0,0,o.width,o.height),o}async function hr(e,t={}){const r=await mr(e,t);return await Ct(r)}const _e="#ffffff";function fr(){return typeof window>"u"?_e:window.getComputedStyle(document.documentElement).getPropertyValue("--bg-elevated").trim()||_e}function pr(e){if(typeof window>"u")return _e;const t=window.getComputedStyle(e).backgroundColor;return!t||t==="rgba(0, 0, 0, 0)"||t==="transparent"?fr():t}async function gr(e){var r,s;if(typeof window>"u"||!((s=(r=window.navigator)==null?void 0:r.clipboard)!=null&&s.write))throw new Error("Clipboard image copy is not supported in this browser.");if(typeof window.ClipboardItem>"u")throw new Error("Clipboard image copy is not supported in this browser.");const t=await hr(e,{pixelRatio:2,cacheBust:!0,backgroundColor:pr(e)});if(!t)throw new Error("Failed to render screenshot.");await window.navigator.clipboard.write([new window.ClipboardItem({"image/png":t})])}function xr(e,t,r){const s=t?(e??[]).filter(o=>o.task_id===t):e??[],i=s.filter(o=>o.is_open===!1),a=i.reduce((o,c)=>o?(c.best_rank??Number.POSITIVE_INFINITY)<(o.best_rank??Number.POSITIVE_INFINITY)?c:o:c,null);return{visible:r?s.filter(o=>o.is_open!==!1):s,hiddenClosed:i,topHiddenClosed:a}}const br=5;function yr(e){if(!e)return null;const t=e.trim(),r=t.match(/^https?:\/\/(?:www\.)?arxiv\.org\/(?:abs|pdf)\/([^/?#]+)/i);if(r!=null&&r[1])return r[1].replace(/\.pdf$/i,"");const s=t.match(/^(?:https?:\/\/(?:www\.)?paperswithcode\.co)?\/paper\/([^/?#]+)/i);return(s==null?void 0:s[1])??null}function ue(e,t){return e?n.jsx(me,{title:e}):t||"—"}function Ye(e){const t=e.length===7?`${e}-01`:e,r=new Date(t).getTime();return Number.isFinite(r)?r:0}const ve=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function je(e){const t=new Date(e);return{year:t.getFullYear(),month:t.getMonth()}}function wr(e,t){if(e===t){const{year:u,month:g}=je(e);return[{timestamp:new Date(u,g,1).getTime(),key:`${u}-${g}`,label:`${ve[g]} ${u}`}]}const r=je(e),s=je(t);if(r.year===s.year){const u=s.month-r.month+1;let g=1;const h=12;u>h&&(g=Math.ceil(u/h));const v=[];for(let y=r.month;y<=s.month;y+=g)v.push({timestamp:new Date(r.year,y,1).getTime(),key:`${r.year}-${y}`,label:u<=3?`${ve[y]} ${r.year}`:ve[y]});return v}const i=s.year-r.year+1;let a=1;const o=12;i>o&&(a=Math.ceil(i/o));const c=[];for(let u=r.year;u<=s.year;u+=a)c.push({timestamp:new Date(u,0,1).getTime(),key:String(u),label:String(u)});return c}const vr=({points:e,metric:t})=>{const r=ft(),[s,i]=_.useState(null),a=880,o=320,c=60,u=30,g=40,h=50,v=e.map(l=>l.value),y=Math.min(...v),V=Math.max(...v)-y||1,ne=a-c-u,T=o-g-h,A=e.map(l=>Ye(l.date)),O=Math.min(...A),W=Math.max(...A),ae=W-O||1,q=l=>O===W?c+ne/2:c+(l-O)/ae*ne,D=e.map((l,f)=>{const E=q(Ye(l.date)),p=(l.value-y)/V,b=g+T*(1-p);return{x:E,y:b,data:l,idx:f}}),j=D.filter(l=>l.data.isSota);let z="";if(j.length>=2){z=`M${j[0].x},${j[0].y}`;for(let l=1;l<j.length;l++){const f=j[l-1],E=j[l],p=(f.x+E.x)/2;z+=` C${p},${f.y} ${p},${E.y} ${E.x},${E.y}`}}const G=5.4,L=8,ge=9,w=l=>{const f=l.data.modelName||l.data.paperTitle||"";if(!f)return null;const E=f.length>22?f.slice(0,21)+"…":f,p=E.length*G;let b=l.x-p/2,k=l.x+p/2,N="middle";return b<c?(b=c,k=c+p,N="start"):k>a-u&&(k=a-u,b=k-p,N="end"),{x:N==="start"?c:N==="end"?a-u:l.x,y:l.y-ge,text:E,anchor:N,left:b,right:k}},ie=[],I=j.length>0?w(j[j.length-1]):null;let B=-1/0;for(let l=0;l<j.length-1;l++){const f=w(j[l]);f&&(f.left<B+L||I&&f.right>I.left-L||(B=f.right,ie.push({x:f.x,y:f.y,text:f.text,anchor:f.anchor})))}I&&ie.push({x:I.x,y:I.y,text:I.text,anchor:I.anchor});const le=wr(O,W),Y=5,oe=l=>i(f=>f===l?null:f),J=l=>{l&&r(`/paper/${l}`)},U=(l,f)=>{const p=`${l.data.modelName||l.data.paperTitle||"Unknown model"}: ${X(l.data.value)} on ${l.data.dateLabel}`,b=!!l.data.paperRouteId;return n.jsxs("g",{children:[f,n.jsx("circle",{cx:l.x,cy:l.y,r:"10",fill:"transparent",style:{cursor:b?"pointer":"default",outline:"none"},tabIndex:0,role:b?"link":"img","aria-label":p,onMouseEnter:()=>i(l.idx),onMouseLeave:()=>oe(l.idx),onFocus:()=>i(l.idx),onBlur:()=>oe(l.idx),onClick:()=>J(l.data.paperRouteId),onKeyDown:k=>{b&&(k.key==="Enter"||k.key===" ")&&(k.preventDefault(),J(l.data.paperRouteId))},children:n.jsx("title",{children:p})})]},l.idx)};return n.jsxs("svg",{width:"100%",viewBox:`0 0 ${a} ${o}`,style:{display:"block"},children:[n.jsx("text",{x:c-38,y:g+T/2,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-faint)",textAnchor:"middle",transform:`rotate(-90 ${c-38} ${g+T/2})`,children:t}),Array.from({length:Y}).map((l,f)=>{const E=f/(Y-1),p=g+T*(1-E),b=y+V*E;return n.jsxs("g",{children:[n.jsx("line",{x1:c,y1:p,x2:a-u,y2:p,stroke:"var(--hairline)",strokeWidth:"1"}),n.jsx("text",{x:c-10,y:p+4,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-faint)",textAnchor:"end",children:X(b)})]},f)}),le.map(l=>{const f=q(l.timestamp);return n.jsx("text",{x:f,y:o-h+18,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-soft)",textAnchor:"middle",children:l.label},l.key)}),D.filter(l=>!l.data.isSota).map(l=>{const f=s===l.idx;return U(l,n.jsx("circle",{cx:l.x,cy:l.y,r:f?3:2,fill:"var(--ink-faint)",opacity:f?1:.45,style:{transition:"r 0.12s ease, opacity 0.12s ease"}}))}),z&&n.jsx("path",{d:z,stroke:"var(--accent)",strokeWidth:"2",fill:"none",strokeLinejoin:"round",strokeLinecap:"round"}),j.map(l=>{const f=s===l.idx;return U(l,n.jsx("circle",{cx:l.x,cy:l.y,r:f?4.5:3,fill:f?"var(--accent)":"var(--bg-elevated)",stroke:"var(--accent)",strokeWidth:"1.5",style:{transition:"r 0.12s ease, fill 0.12s ease"}}))}),ie.map((l,f)=>n.jsx("text",{x:l.x,y:l.y,fontSize:"9.5",fontFamily:"var(--mono)",fill:"var(--ink-soft)",textAnchor:l.anchor,pointerEvents:"none",style:{paintOrder:"stroke",stroke:"var(--bg-elevated)",strokeWidth:3,strokeLinejoin:"round"},children:l.text},`label-${f}`)),s!==null&&D[s]&&(()=>{const l=D[s],f=l.data.modelName||l.data.paperTitle||"Unknown model",p=`${f.length>40?f.slice(0,39)+"…":f}: ${X(l.data.value)}`,k=Math.max(120,Math.min(340,p.length*6.6+24)),N=30;let M=l.x-k/2;M<c&&(M=c),M+k>a-u&&(M=a-u-k);const ce=l.y-N-14>=g?l.y-N-12:l.y+12;return n.jsxs("g",{pointerEvents:"none",children:[n.jsx("rect",{x:M,y:ce,width:k,height:N,rx:"6",ry:"6",fill:"var(--bg-elevated)",stroke:"var(--hairline-strong)",strokeWidth:"1",style:{filter:"drop-shadow(0 2px 6px rgba(0,0,0,0.08))"}}),n.jsx("text",{x:M+12,y:ce+19,fontSize:"12",fontFamily:"var(--sans)",fill:"var(--ink)",fontWeight:500,children:p})]})})()]})};function se(e){if(e==null)return null;if(typeof e=="number")return Number.isFinite(e)?e:null;const t=e.includes("±")?e.split("±")[0].trim():e.trim(),r=parseFloat(t);return Number.isFinite(r)?r:null}function jr(e){return[e.paper_id,e.task_id,e.dataset_id,e.model_name,e.harness??""].join("|")}function Sr(e){const t=new Map;for(const r of e){const s=jr(r),i=t.get(s);if(!i){t.set(s,{...r,metrics:{...r.metrics||{}},sourceEvaluationIds:[r.id],ranksByMetric:r.best_metric&&r.best_rank!=null?{[r.best_metric]:r.best_rank}:{}});continue}i.metrics={...i.metrics,...r.metrics||{}},i.sourceEvaluationIds.push(r.id),r.best_metric&&r.best_rank!=null&&(i.ranksByMetric[r.best_metric]=r.best_rank)}return Array.from(t.values())}function Je(e,t){return t?e.id===t||e.sourceEvaluationIds.includes(t):!1}function Ze(e,t){return e.ranksByMetric[t]??e.best_rank??9999}function _r(e,t,r){if(e.length===0)return{points:[],sota:0,sotaModel:""};const s=e.map(h=>{var $;const v=se(($=h.metrics)==null?void 0:$[t]),y=h.paper_published_date||"";return{eval:h,value:v,date:y}}).filter(h=>h.value!==null&&!!h.date).sort((h,v)=>h.date.localeCompare(v.date)),i=[];let a=null;for(const h of s){const v=a==null?!0:r==="↓"?h.value<a:h.value>a;v&&(a=h.value),i.push({value:h.value,date:h.date,dateLabel:h.date.slice(0,7),modelName:h.eval.model_name||"",paperTitle:h.eval.paper_title||"",paperRouteId:h.eval.paper_arxiv_id||h.eval.paper_id||null,isSota:v})}const c=e.map(h=>{var v;return{eval:h,value:se((v=h.metrics)==null?void 0:v[t])}}).filter(h=>h.value!==null).sort((h,v)=>r==="↓"?h.value-v.value:v.value-h.value)[0],u=(c==null?void 0:c.value)??0,g=(c==null?void 0:c.eval.model_name)||(c==null?void 0:c.eval.paper_title)||"";return{points:i,sota:u,sotaModel:g}}const et=({targetRef:e,label:t})=>{const{toast:r}=ht(),[s,i]=_.useState("idle"),a=_.useRef(null);_.useEffect(()=>()=>{a.current!==null&&window.clearTimeout(a.current)},[]);const o=_.useCallback(async()=>{const u=e.current;if(u){i("copying"),u.classList.add("is-capturing"),u.offsetHeight,await new Promise(g=>window.requestAnimationFrame(()=>g()));try{await gr(u),i("copied"),r({title:"Screenshot copied",description:`Image of the ${t} copied to your clipboard.`}),a.current!==null&&window.clearTimeout(a.current),a.current=window.setTimeout(()=>i("idle"),1500)}catch(g){i("idle"),r({title:"Copy failed",description:g instanceof Error&&g.message?g.message:"Could not copy the screenshot to your clipboard.",variant:"destructive"})}finally{u.classList.remove("is-capturing")}}},[e,t,r]),c=s==="copied"?"Copied":s==="copying"?"Copying…":"Copy image";return n.jsxs("button",{type:"button",className:"bm-copy-btn",onClick:o,disabled:s==="copying","aria-label":`Copy ${t} screenshot to clipboard`,title:`Copy ${t} screenshot to clipboard`,children:[n.jsx(xt,{name:"copy",size:11}),c]})},Ar=()=>{var Ne,Re,$e,Te,Me,Fe,Le,Ie,Pe,Ae;const{datasetSlug:e}=dt(),[t]=ut(),r=t.get("task")||void 0,s=t.get("eval")||void 0,{preferences:i,setHideClosedSourceEvals:a}=mt(),[o,c]=_.useState(void 0),u=_.useRef(null),g=_.useRef(!1),h=_.useRef(null),v=_.useRef(null),y=re({queryKey:["dataset",e,"with-paper"],queryFn:()=>te.getDatasetBySlug(e,{include_paper:!0}),enabled:!!e,staleTime:10*60*1e3}),$=re({queryKey:["dataset-evals",(Ne=y.data)==null?void 0:Ne.id],queryFn:()=>te.getEvaluationsByDataset(y.data.id),enabled:!!((Re=y.data)!=null&&Re.id),staleTime:5*60*1e3}),V=re({queryKey:["dataset-tasks",($e=y.data)==null?void 0:$e.id],queryFn:()=>te.getDatasetTasks(y.data.id),enabled:!!((Te=y.data)!=null&&Te.id),staleTime:10*60*1e3}),ne=re({queryKey:["metric-directions"],queryFn:()=>te.getMetricDirections(),staleTime:60*60*1e3}),T=_.useMemo(()=>{var d;return!s||!((d=$.data)!=null&&d.length)?null:$.data.find(x=>x.id===s)||null},[s,$.data]),A=_.useMemo(()=>{const d=V.data||[];if(d.length===0)return null;if(T!=null&&T.task_id&&d.some(m=>m.id===T.task_id))return T.task_id;if(r){const m=d.find(C=>C.slug===r);if(m)return m.id}if(d.length===1)return d[0].id;const x=$.data||[];if(x.length>0){const m=new Map;for(const S of x)m.set(S.task_id,(m.get(S.task_id)||0)+1);let C=null,R=-1;for(const S of d){const Z=m.get(S.id)||0;Z>R&&(R=Z,C=S.id)}if(C)return C}return d[0].id},[V.data,$.data,r,T]),O=re({queryKey:["leaderboard-metrics",(Me=y.data)==null?void 0:Me.id,A],queryFn:()=>te.getLeaderboardMetrics(y.data.id,A),enabled:!!((Fe=y.data)!=null&&Fe.id)&&!!A,staleTime:10*60*1e3}),W=_.useMemo(()=>xr($.data,A,i.hide_closed_source_evals),[$.data,A,i.hide_closed_source_evals]),ae=W.visible,q=W.hiddenClosed,D=W.topHiddenClosed,j=_.useMemo(()=>Sr(ae),[ae]),z=_.useMemo(()=>{const d=new Set;return j.forEach(x=>{x.best_metric&&d.add(x.best_metric),Object.keys(x.metrics||{}).forEach(m=>d.add(m))}),Array.from(d)},[j]),G=_.useMemo(()=>(O.data||[]).map(d=>d.metric_name),[O.data]),L=G.length?G:z,ge=_.useMemo(()=>{var C;if(j.length===0)return L[0]||"";const d=new Map;for(const R of j)for(const S of Object.keys(R.metrics||{}))G.length&&!L.includes(S)||d.set(S,(d.get(S)||0)+1);let x=null,m=0;for(const[R,S]of d)S>m&&(m=S,x=R);return x||L[0]||((C=j[0])==null?void 0:C.best_metric)||""},[j,L,G]),w=o||(T==null?void 0:T.best_metric)||ge,I=(((Ie=(Le=ne.data)==null?void 0:Le.directions)==null?void 0:Ie[w])||"higher_is_better")==="lower_is_better"?"↓":"↑",B=_.useMemo(()=>!w||!L.includes(w)?L:[w,...L.filter(d=>d!==w)],[L,w]),le=_.useMemo(()=>B.length===0?w?[w]:[]:B.slice(0,br),[B,w]),{points:Y,sota:oe,sotaModel:J}=_.useMemo(()=>_r(j,w,I),[j,w,I]);_.useEffect(()=>{if(g.current||!s||!$.data||$.data.length===0)return;const d=u.current;d&&(g.current=!0,d.scrollIntoView({behavior:"smooth",block:"start"}))},[s,$.data]);const U=_.useMemo(()=>{const d=V.data||[];return A?d.find(x=>x.id===A)||d[0]||null:d[0]||null},[V.data,A]);if(y.isLoading)return n.jsxs("div",{className:"page",children:[n.jsx(ye,{className:"h-12 w-1/2 mb-6"}),n.jsx(ye,{className:"h-64 w-full"})]});if(y.error||!y.data)return n.jsx("div",{className:"page",children:n.jsx(pt,{variant:"destructive",children:n.jsx(gt,{children:"Benchmark not found."})})});const l=y.data,f=j.slice().sort((d,x)=>{var R,S;const m=se((R=d.metrics)==null?void 0:R[w]),C=se((S=x.metrics)==null?void 0:S[w]);return m!==null&&C!==null?I==="↓"?m-C:C-m:m!==null?-1:C!==null?1:Ze(d,w)-Ze(x,w)}),E=!!l.supports_harness,p=s&&f.find(d=>Je(d,s))||null,b=l.introducing_paper??void 0,k=(b==null?void 0:b.arxiv_id)||(b==null?void 0:b.id)||yr(l.paper_url),N=(b==null?void 0:b.title)||l.introducing_paper_title||null,M=((Pe=b==null?void 0:b.published)==null?void 0:Pe.slice(0,4))||l.introduced_year||null,Ee=!!k||!!l.paper_url||!!N,ce=b!=null&&b.arxiv_id||(Ae=l.paper_url)!=null&&Ae.match(/^https?:\/\/(?:www\.)?arxiv\.org\//i)?`arXiv:${k}`:`Paper ${k}`;return n.jsx("div",{className:"page",children:n.jsxs("div",{className:"bm-page",children:[n.jsxs("div",{className:"breadcrumb",children:[n.jsx(ee,{to:"/tasks",children:"Tasks"}),U&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"sep",children:"/"}),n.jsx(ee,{to:`/tasks/${U.slug||U.id}`,children:U.name})]}),n.jsx("span",{className:"sep",children:"/"}),n.jsx("span",{style:{color:"var(--accent-text)"},children:l.name})]}),n.jsx("h1",{className:"bm-title",children:l.name}),n.jsxs("div",{className:"bm-subtitle",style:{display:"flex",alignItems:"center",gap:16,flexWrap:"wrap"},children:[n.jsxs("span",{children:[w&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"metric-tag",children:w}),n.jsx("span",{style:{color:"var(--hairline-strong)",margin:"0 8px"},children:"·"})]}),J?n.jsxs("span",{children:["Best: ",n.jsx("span",{className:"best-name",children:X(oe)})," by ",n.jsx("span",{className:"best-name",style:{fontStyle:"normal"},children:J})]}):n.jsxs("span",{children:[f.length," evaluations"]})]}),l.hf_url&&n.jsxs("a",{className:"bm-action-btn",href:l.hf_url,target:"_blank",rel:"noopener noreferrer",children:[n.jsx("span",{"aria-hidden":"true",children:"🤗"})," View on Hugging Face"]})]}),l.description&&n.jsx("p",{style:{fontFamily:"var(--serif)",color:"var(--ink-soft)",maxWidth:760,marginBottom:16},children:l.description}),i.hide_closed_source_evals&&q.length>0&&n.jsxs("div",{className:"bm-hidden-closed-notice",children:[n.jsxs("span",{children:[q.length," closed-source ",q.length===1?"row is":"rows are"," hidden",D!=null&&D.model_name?n.jsxs(n.Fragment,{children:[", including ",n.jsx("strong",{children:D.model_name})]}):null,"."]}),n.jsx("button",{type:"button",className:"bm-hidden-closed-action",onClick:()=>{a(!1)},children:"Show closed-source"})]}),Ee&&n.jsxs("div",{className:"method-source",style:{marginTop:0,marginBottom:18},children:[n.jsx("span",{className:"method-source-label",children:"Source"}),k?n.jsxs(ee,{to:`/paper/${k}`,target:"_blank",rel:"noopener noreferrer",className:"method-source-link",children:[n.jsx("span",{className:"method-source-title",children:N?n.jsx(me,{title:N}):ce}),M&&n.jsx("span",{className:"method-source-meta",children:M})]}):l.paper_url?n.jsxs("a",{href:l.paper_url,target:"_blank",rel:"noopener noreferrer",className:"method-source-link",children:[n.jsx("span",{className:"method-source-title",children:N?n.jsx(me,{title:N}):l.paper_url}),M&&n.jsx("span",{className:"method-source-meta",children:M})]}):n.jsxs("div",{className:"method-source-link is-static",children:[n.jsx("span",{className:"method-source-title",children:N?n.jsx(me,{title:N}):null}),M&&n.jsx("span",{className:"method-source-meta",children:M})]})]}),Y.filter(d=>d.isSota).length>=2&&n.jsxs("div",{className:"bm-card",ref:h,children:[n.jsxs("div",{className:"bm-card-screenshot-header","aria-hidden":"true",children:[n.jsxs("div",{className:"bm-card-screenshot-title",children:[n.jsx("span",{className:"bm-card-screenshot-eyebrow",children:"Benchmark"}),n.jsx("span",{className:"bm-card-screenshot-name",children:l.name})]}),n.jsxs("div",{className:"bm-card-screenshot-brand",children:[n.jsxs("span",{className:"brand",children:[n.jsx("span",{className:"brand-mark"}),n.jsxs("span",{className:"brand-name",children:["Papers ",n.jsx("em",{children:"With Code"})]})]}),n.jsx("span",{className:"bm-card-screenshot-url",children:"paperswithcode.co"})]})]}),n.jsxs("div",{className:"bm-card-head",children:[n.jsx("div",{className:"bm-card-title",children:"SOTA progression"}),n.jsxs("div",{className:"bm-card-actions",children:[L.length>1&&n.jsxs("label",{className:"bm-view-select",children:[n.jsx("span",{className:"bm-view-select-label",children:"View"}),n.jsx("select",{value:w,onChange:d=>c(d.target.value),children:B.map(d=>n.jsx("option",{value:d,children:d},d))})]}),n.jsxs("label",{className:"bm-closed-toggle",title:"Show or hide evaluations of closed-source models",children:[n.jsx(We,{className:"bm-closed-toggle-switch",checked:!i.hide_closed_source_evals,onCheckedChange:d=>{a(!d)},"aria-label":"Show closed-source models"}),n.jsx("span",{className:"bm-closed-toggle-label",children:"Closed-source"})]}),n.jsx(et,{targetRef:h,label:"SOTA chart"})]})]}),n.jsx("div",{className:"bm-chart-wrap",children:n.jsx(vr,{points:Y,metric:w})}),n.jsxs("div",{className:"bm-chart-foot",children:[n.jsx("span",{className:"legend-dot"}),"All models over time · highlighted dots track the running best · hover for the model · click to open the paper"]})]}),p&&(()=>{var R,S;const d=p.paper_arxiv_id||p.paper_id,x=p.paper_title||(p.paper_arxiv_id?`arXiv:${p.paper_arxiv_id}`:null),m=p.best_metric&&((R=p.metrics)==null?void 0:R[p.best_metric])!==void 0?p.best_metric:w,C=(S=p.metrics)==null?void 0:S[m];return n.jsxs("div",{className:"bm-highlight-banner",role:"status",children:[n.jsx("span",{className:"bm-highlight-dot","aria-hidden":"true"}),n.jsxs("div",{className:"bm-highlight-text",children:[n.jsx("span",{className:"bm-highlight-label",children:"Comparing result"}),n.jsxs("span",{className:"bm-highlight-paper",children:[p.model_name||x||"—",p.harness?` · ${p.harness}`:""]}),n.jsxs("span",{className:"bm-highlight-meta",children:[C!==void 0&&m?n.jsxs(n.Fragment,{children:[m,": ",X(C),x?" · ":""]}):null,d?n.jsx(ee,{to:`/paper/${d}`,children:ue(p.paper_title,x)}):ue(p.paper_title,x)]})]})]})})(),n.jsxs("div",{className:"bm-card",ref:v,children:[n.jsxs("div",{className:"bm-card-screenshot-header","aria-hidden":"true",children:[n.jsxs("div",{className:"bm-card-screenshot-title",children:[n.jsx("span",{className:"bm-card-screenshot-eyebrow",children:"Benchmark"}),n.jsx("span",{className:"bm-card-screenshot-name",children:l.name})]}),n.jsxs("div",{className:"bm-card-screenshot-brand",children:[n.jsxs("span",{className:"brand",children:[n.jsx("span",{className:"brand-mark"}),n.jsxs("span",{className:"brand-name",children:["Papers ",n.jsx("em",{children:"With Code"})]})]}),n.jsx("span",{className:"bm-card-screenshot-url",children:"paperswithcode.co"})]})]}),n.jsxs("div",{className:"bm-card-head",children:[n.jsx("div",{className:"bm-card-title",children:"Leaderboard"}),n.jsxs("div",{className:"bm-card-actions",children:[L.length>1&&n.jsxs("label",{className:"bm-view-select",children:[n.jsx("span",{className:"bm-view-select-label",children:"View"}),n.jsx("select",{value:w,onChange:d=>c(d.target.value),children:B.map(d=>n.jsx("option",{value:d,children:d},d))})]}),n.jsxs("label",{className:"bm-closed-toggle",title:"Show or hide evaluations of closed-source models",children:[n.jsx(We,{className:"bm-closed-toggle-switch",checked:!i.hide_closed_source_evals,onCheckedChange:d=>{a(!d)},"aria-label":"Show closed-source models"}),n.jsx("span",{className:"bm-closed-toggle-label",children:"Closed-source"})]}),n.jsx(et,{targetRef:v,label:"leaderboard"})]})]}),$.isLoading?n.jsx("div",{style:{padding:16},children:Array.from({length:5}).map((d,x)=>n.jsx(ye,{className:"h-10 w-full mb-2"},x))}):f.length===0?n.jsx("div",{className:"no-results",children:"No evaluations submitted yet."}):n.jsx("div",{className:"bm-table-scroll",children:n.jsxs("table",{className:"bm-table",children:[n.jsx("thead",{children:n.jsxs("tr",{children:[n.jsx("th",{className:"col-rank",children:"Rank"}),n.jsx("th",{className:"col-model",children:"Model"}),E&&n.jsx("th",{className:"col-harness",children:"Harness"}),le.map(d=>{const x=d===w;return n.jsx("th",{className:`col-value ${x?"is-active":""}`,"aria-sort":x?I==="↓"?"ascending":"descending":"none",children:n.jsxs("button",{type:"button",className:"bm-metric-header",onClick:()=>c(d),"aria-pressed":x,title:`Sort by ${d}`,children:[d,x?` ${I}`:""]})},d)}),n.jsx("th",{className:"col-paper",children:"Paper"}),n.jsx("th",{className:"col-year",children:"Year"})]})}),n.jsx("tbody",{children:(()=>{let d=null,x=0;return f.map((m,C)=>{var Be,He;const R=se((Be=m.metrics)==null?void 0:Be[w]);let S=null;R!==null&&((d===null||R!==d)&&(x=C+1,d=R),S=x);const Z=m.paper_arxiv_id||m.paper_id,De=m.paper_title||(m.paper_arxiv_id?`arXiv:${m.paper_arxiv_id}`:null),xe=Je(m,s);return n.jsxs("tr",{ref:xe?u:void 0,className:xe?"is-highlighted":void 0,children:[n.jsx("td",{className:"col-rank",children:S??"—"}),n.jsxs("td",{className:"col-model",children:[xe&&n.jsx("span",{className:"bm-row-marker","aria-hidden":"true"}),m.hf_model_url?n.jsx("a",{href:m.hf_model_url,target:"_blank",rel:"noopener noreferrer",className:"bm-model-link",title:`Open ${m.model_name||"model"} on Hugging Face`,children:m.model_name||"—"}):m.model_name||"—",m.is_open===!1&&n.jsx(bt,{}),(m.external??m.is_external)&&n.jsx(yt,{sourceUrl:m.source_url||m.external_source_url||m.result_url})]}),E&&n.jsx("td",{className:"col-harness",children:m.harness||"—"}),le.map(be=>{var Oe;const Ve=be===w,de=(Oe=m.metrics)==null?void 0:Oe[be];return n.jsx("td",{className:`col-value${Ve?" is-active":""}${Ve&&S===1?" is-best":""}`,children:de!=null&&de!==""?X(de):"—"},be)}),n.jsx("td",{className:"col-paper",children:Z?n.jsx(ee,{to:`/paper/${Z}`,children:ue(m.paper_title,De)}):ue(m.paper_title,De)}),n.jsx("td",{className:"col-year",children:((He=m.paper_published_date)==null?void 0:He.slice(0,4))||"—"})]},m.id)})})()})]})})]})]})})};export{Ar as default};
assets/ChatView-Dq82pbSu.js ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import{r as l,j as e,L as Be,R as xe,c as He,d as Le,e as qe,a as $e,u as Ve,f as Ke}from"./index-CKAClQ2e.js";import{M as Ge,S as X,A as Xe,C as ze,a as Ce,b as Je,r as Qe,F as Ze,D as et,l as tt,c as be,d as ve,e as we,f as st,g as at,h as G,t as Q,P as nt,i as je,j as rt,T as ot,u as Oe,k as it}from"./chatSessions-mebqdAa-.js";import"./katex.min-BSBacQyE.js";import{H as ct,a as lt,b as dt}from"./hover-card-DZ5zXJ4P.js";import{M as ut,r as ht,d as mt}from"./index-DuEHueKe.js";import{r as pt,a as ft}from"./index-b1s0T9nh.js";const Ne=({onSend:t,busy:a,placeholder:i,autoFocus:g,draft:o,onDraftChange:u,onStop:h,models:m=[],selectedModel:v,onModelChange:E})=>{const[w,j]=l.useState(""),N=l.useRef(null);l.useEffect(()=>{const y=N.current;y&&(y.style.height="auto",y.style.height=`${Math.min(y.scrollHeight,200)}px`)},[w]),l.useEffect(()=>{var y;g&&((y=N.current)==null||y.focus())},[g]),l.useEffect(()=>{o!==void 0&&j(o)},[o]);const R=()=>{const y=w.trim();!y||a||(j(""),u==null||u(""),t(y))};return e.jsxs("div",{className:"chat-composer",children:[e.jsx("textarea",{ref:N,rows:1,value:w,placeholder:i||"Ask anything about research…",onChange:y=>{j(y.target.value),u==null||u(y.target.value)},onKeyDown:y=>{y.key==="Enter"&&!y.shiftKey&&(y.preventDefault(),R())}}),e.jsxs("div",{className:"chat-composer-row",children:[e.jsxs("div",{className:"chat-composer-tools",children:[m.length>0&&v&&E&&e.jsx(Ge,{models:m,selectedModel:v,onModelChange:E,disabled:a}),e.jsx("span",{className:"chat-composer-hint",children:"Enter to send · Shift+Enter for newline"})]}),e.jsx("button",{type:"button",className:`chat-send${a||w.trim()?" chat-send-on":""}`,onClick:a?h:R,disabled:a?!h:!w.trim(),"aria-label":a?"Stop generating":"Send message",children:a?h?e.jsx("span",{"aria-hidden":"true",children:"■"}):e.jsx(X,{light:!0}):e.jsx(Xe,{})})]})]})};function se(t){if(!t.authors.length)return"";const a=t.authors.slice(0,3).map(i=>i.name).join(", ");return t.authors.length>3?`${a}, et al.`:a}function Se(t){var i;if(t.conference)return t.conference;const a=(i=t.published)==null?void 0:i.slice(0,4);if(t.arxiv_id)return a?`arXiv ${a}`:"arXiv";if(t.source_url)try{return new URL(t.source_url).hostname.replace(/^www\./,"")}catch{}return a??"external"}function gt(t,a=240){const i=t.content.trim();return i.length<=a?i:`${i.slice(0,a).trimEnd()}…`}const yt=({seed:t=0})=>e.jsxs("div",{className:"chat-thumb","aria-hidden":"true",children:[e.jsxs("div",{className:"chat-thumb-title",children:[e.jsx("span",{}),e.jsx("span",{})]}),e.jsx("div",{className:"chat-thumb-auth"}),e.jsxs("div",{className:"chat-thumb-cols",children:[e.jsx("div",{className:"chat-thumb-col"}),e.jsx("div",{className:"chat-thumb-col"})]}),e.jsx("div",{className:"chat-thumb-fig",style:{top:62+t%3*8}})]}),xt=({paper:t,seed:a})=>{const[i,g]=xe.useState(!1),o=He(t.metadata.thumbnail_url);return xe.useEffect(()=>g(!1),[o]),!o||i?e.jsx(yt,{seed:a}):e.jsx("div",{className:"chat-thumb chat-thumb-real",children:e.jsx("img",{src:o,alt:"",loading:"lazy",decoding:"async",onError:()=>g(!0)})})},De=({routeId:t,paper:a,className:i="chat-paper-link",children:g})=>{const o=e.jsx(Be,{className:i,to:`/paper/${t}`,target:"_blank",rel:"noopener noreferrer",children:g});if(!a)return o;const u=a.metadata,h=t.split("").reduce((m,v)=>m+v.charCodeAt(0),0);return e.jsxs(ct,{openDelay:150,closeDelay:100,children:[e.jsx(lt,{asChild:!0,children:o}),e.jsx(dt,{className:"chat-paper-pop",side:"bottom",align:"start",children:e.jsxs("div",{className:"chat-paper-pop-inner",children:[e.jsx(xt,{paper:a,seed:h}),e.jsxs("div",{className:"chat-paper-pop-meta",children:[e.jsx("div",{className:"chat-paper-pop-title",children:a.title}),se(u)&&e.jsx("div",{className:"chat-paper-pop-auth",children:se(u)}),e.jsxs("div",{className:"chat-paper-pop-venue",children:[Se(u),u.arxiv_id&&e.jsxs(e.Fragment,{children:[" · arXiv:",u.arxiv_id]}),u.citation_count!=null&&e.jsxs(e.Fragment,{children:[" · ↑ ",u.citation_count.toLocaleString()]})]}),u.tasks.length>0&&e.jsx("div",{className:"chat-paper-pop-tags",children:u.tasks.map(m=>e.jsx("span",{className:"chat-pp-tag",children:m.name},m.slug))})]})]})})]})};function bt(t){const a=t.lastIndexOf("[");if(a===-1)return t;const i=t.slice(a);return/^\[[^\]]*(\]\(?[^)\s]*)?$/.test(i)?t.slice(0,a):t}const vt=t=>t.startsWith("paper:")?t:mt(t),wt=({text:t,streaming:a,papers:i})=>{const g=a?bt(t):t;return e.jsx(ut,{remarkPlugins:[ht,ft],rehypePlugins:[pt],urlTransform:vt,components:{a:({href:o,children:u})=>{if(o!=null&&o.startsWith("paper:")){const h=o.slice(6);return e.jsx(De,{routeId:h,paper:i[h],children:u})}return e.jsx("a",{className:"chat-paper-link",href:o,target:"_blank",rel:"noopener noreferrer",children:u})}},children:g})},Ae=()=>e.jsx("span",{className:"chat-caret"}),jt=({block:t,onToggle:a})=>t.active?e.jsxs("div",{className:"chat-reason-live",children:[e.jsxs("div",{className:"chat-reason-live-head",children:[e.jsx(X,{})," ",e.jsx("span",{children:"Thinking…"})]}),e.jsxs("div",{className:"chat-reason-live-body",children:[t.text,e.jsx(Ae,{})]})]}):e.jsxs("div",{className:"chat-reason-done",children:[e.jsxs("button",{type:"button",className:"chat-reason-done-head",onClick:a,children:[e.jsx(ze,{}),e.jsx("span",{children:"Thought for a few seconds"}),e.jsx(Ce,{open:t.open})]}),t.open&&e.jsx("div",{className:"chat-reason-done-body",children:t.text})]}),Ot=({block:t,papers:a,onToggle:i})=>{var u,h;const g=t.status==="running",o=typeof t.args.query=="string"?t.args.query:"";return e.jsxs("div",{className:`chat-tool${g?" chat-tool-running":""}`,children:[e.jsxs("button",{type:"button",className:"chat-tool-head",onClick:i,disabled:g,children:[e.jsxs("span",{className:"chat-tool-head-left",children:[g?e.jsx(X,{}):e.jsx(Je,{}),e.jsx("code",{className:"chat-tool-name",children:t.name}),e.jsxs("span",{className:"chat-tool-query",children:['("',o,'")']})]}),e.jsxs("span",{className:"chat-tool-head-right",children:[g?e.jsx("span",{className:"chat-tool-status",children:"searching…"}):e.jsxs("span",{className:"chat-tool-status",children:[t.hits," results · ",t.took_ms," ms"]}),!g&&e.jsx(Ce,{open:t.open})]})]}),!g&&t.open&&e.jsxs("div",{className:"chat-tool-body",children:[e.jsxs("div",{className:"chat-tool-args",children:[e.jsx("span",{className:"chat-tool-label",children:"arguments"}),e.jsx("pre",{children:JSON.stringify(t.args,null,2)})]}),e.jsxs("div",{className:"chat-tool-label chat-tool-results-label",children:["returned ",((u=t.results)==null?void 0:u.length)??0," papers"]}),e.jsx("ol",{className:"chat-tool-results",children:(h=t.results)==null?void 0:h.map(m=>e.jsxs("li",{className:"chat-hit",children:[e.jsx("div",{className:"chat-hit-top",children:e.jsx(De,{routeId:m.route_id,paper:a[m.route_id],className:"chat-hit-title",children:m.title})}),e.jsx("div",{className:"chat-hit-meta",children:[se(m.metadata),Se(m.metadata)].filter(Boolean).join(" · ")}),e.jsxs("div",{className:"chat-hit-snippet",children:[gt(m),m.content_truncated&&e.jsx("span",{className:"chat-hit-truncated",children:" (truncated)"})]})]},m.route_id))})]})]})},Nt=({block:t,papers:a})=>e.jsxs("div",{className:"chat-answer",children:[e.jsx(wt,{text:t.text,streaming:!t.done,papers:a}),!t.done&&!!t.text.trim()&&e.jsx(Ae,{})]}),_t=({text:t})=>e.jsx("div",{className:"chat-msg chat-msg-user",children:e.jsx("div",{className:"chat-bubble",children:t})}),Rt=({msg:t,papers:a,onToggleBlock:i})=>{var g,o;return e.jsx("div",{className:"chat-msg chat-msg-assistant",children:e.jsxs("div",{className:"chat-msg-blocks",children:[t.streaming&&(((g=t.blocks)==null?void 0:g.length)??0)===0&&e.jsxs("div",{className:"chat-reason-live-head",children:[e.jsx(X,{})," ",e.jsx("span",{children:"Thinking…"})]}),(o=t.blocks)==null?void 0:o.map((u,h)=>{const m=`${t.id}-${h}`;return u.kind==="reasoning"?e.jsx(jt,{block:u,onToggle:()=>i(t.id,h)},m):u.kind==="tool"?e.jsx(Ot,{block:u,papers:a,onToggle:()=>i(t.id,h)},m):e.jsx(Nt,{block:u,papers:a},m)}),t.error&&e.jsxs("div",{className:"chat-error",children:["The assistant hit an error: ",t.error]}),!t.streaming&&t.finishReason&&t.finishReason!=="success"&&e.jsxs("div",{className:"chat-finish-note",children:["The assistant stopped early (",t.finishReason.replace(/_/g," "),")."]})]})})},k=(t,a)=>new Promise(i=>{const g=setTimeout(o,t);function o(){a==null||a.removeEventListener("abort",o),clearTimeout(g),i()}a==null||a.addEventListener("abort",o)}),A=t=>({arxiv_id:null,source:"arxiv",source_url:null,thumbnail_url:null,authors:[],published:null,conference:null,citation_count:null,tasks:[],methods:[],repositories:[],project_pages:[],...t}),P={name:"Object Detection",slug:"object-detection"},I={name:"Real-Time Object Detection",slug:"real-time-object-detection"},Tt={"2502.12524":{route_id:"2502.12524",title:"YOLOv12: Attention-Centric Real-Time Object Detectors",content:"Enhancing the network architecture of the YOLO framework has been crucial for a long time. This work introduces an attention-centric YOLO framework, namely YOLOv12, built around area attention and residual efficient layer aggregation networks (R-ELAN). YOLOv12-N reaches 40.6 mAP at 1.64 ms on a T4 GPU, closing the gap to attention-based detectors without the usual latency penalty and surpassing YOLOv10/YOLOv11 by +1.2–1.6 mAP at matched latency.",content_truncated:!1,metadata:A({arxiv_id:"2502.12524",authors:[{name:"Y. Tian"},{name:"Q. Ye"},{name:"D. Doermann"}],published:"2025-02-18",citation_count:412,tasks:[P,I],methods:[{name:"Area Attention",slug:"area-attention"}],repositories:[{url:"https://github.com/sunsmarterjie/yolov12",stars:18700}]})},"2407.17140":{route_id:"2407.17140",title:"RT-DETRv2: Improved Baseline with Bag-of-Freebies for Real-Time Detection",content:"RT-DETRv2 improves the real-time DETR baseline with selective multi-scale feature extraction, a discrete sampling operator to ease deployment, and training-only 'bag-of-freebies' that add no inference cost. RT-DETRv2-R18/R50/R101 reach 47.9 / 53.4 / 54.3 mAP on COCO at 217 / 108 / 74 FPS on T4 TensorRT FP16, remaining NMS-free end to end.",content_truncated:!1,metadata:A({arxiv_id:"2407.17140",authors:[{name:"W. Lv"},{name:"Y. Zhao"},{name:"J. Chang"}],published:"2024-07-24",citation_count:268,tasks:[P,I],methods:[{name:"DETR",slug:"detr"}],repositories:[{url:"https://github.com/lyuwenyu/RT-DETR",stars:9400}]})},"2410.13842":{route_id:"2410.13842",title:"D-FINE: Redefining Regression as Fine-grained Distribution Refinement",content:"D-FINE reformulates bounding-box regression in DETR-style detectors as iterative refinement of probability distributions (FDR) and adds a localization self-distillation scheme (GO-LSD). D-FINE-L reaches 54.0 mAP at ~9 ms and D-FINE-X 55.8 mAP on COCO while staying real-time on modern GPUs, dominating RT-DETRv2 and YOLOv10 on the accuracy–latency Pareto front.",content_truncated:!1,metadata:A({arxiv_id:"2410.13842",authors:[{name:"Y. Peng"},{name:"H. Li"},{name:"P. Wu"}],published:"2024-10-17",conference:"ICLR 2025",citation_count:187,tasks:[P,I],methods:[{name:"Knowledge Distillation",slug:"knowledge-distillation"}],repositories:[{url:"https://github.com/Peterande/D-FINE",stars:12100}]})},"2406.03459":{route_id:"2406.03459",title:"LW-DETR: A Transformer Replacement to YOLO for Real-Time Detection",content:"LW-DETR pairs a plain ViT encoder with a lightweight DETR decoder and shows the combination outperforms YOLOv8 and YOLO-NAS at comparable latency, arguing transformer detectors are viable even at the fast end of the accuracy–latency curve. Uses multi-level feature aggregation, window-attention interleaving, and IoU-aware classification.",content_truncated:!1,metadata:A({arxiv_id:"2406.03459",authors:[{name:"Q. Chen"},{name:"X. Su"},{name:"X. Zhang"}],published:"2024-06-05",citation_count:94,tasks:[P,I],methods:[{name:"Vision Transformer",slug:"vision-transformer"}],repositories:[{url:"https://github.com/Atten4Vis/LW-DETR",stars:5200}]})},"2304.08069":{route_id:"2304.08069",title:"DETRs Beat YOLOs on Real-time Object Detection",content:"RT-DETR is the first real-time end-to-end object detector, built on an efficient hybrid encoder that decouples intra-scale interaction and cross-scale fusion, plus IoU-aware query selection. RT-DETR-R50 achieves 53.1 mAP at 108 FPS on COCO, beating comparably sized YOLO detectors in both speed and accuracy while eliminating NMS entirely; its Figure 1 accuracy–latency plot became the reference for later real-time detectors.",content_truncated:!1,metadata:A({arxiv_id:"2304.08069",authors:[{name:"Y. Zhao"},{name:"W. Lv"},{name:"S. Xu"}],published:"2023-04-17",conference:"CVPR 2024",citation_count:2310,tasks:[P,I],methods:[{name:"DETR",slug:"detr"}],repositories:[{url:"https://github.com/lyuwenyu/RT-DETR",stars:9400}]})},"2405.14458":{route_id:"2405.14458",title:"YOLOv10: Real-Time End-to-End Object Detection",content:"YOLOv10 removes NMS from the YOLO pipeline via consistent dual assignments during training and applies a holistic efficiency–accuracy driven design across the architecture. YOLOv10-S is 1.8x faster than RT-DETR-R18 at similar COCO accuracy; the family spans 46.3–54.4 mAP with substantially lower end-to-end latency than prior YOLOs because post-processing disappears.",content_truncated:!1,metadata:A({arxiv_id:"2405.14458",authors:[{name:"A. Wang"},{name:"H. Chen"},{name:"L. Liu"}],published:"2024-05-23",conference:"NeurIPS 2024",citation_count:1650,tasks:[P,I],methods:[{name:"NMS-free Training",slug:"nms-free-training"}],repositories:[{url:"https://github.com/THU-MIG/yolov10",stars:44200}]})},"2401.17270":{route_id:"2401.17270",title:"YOLO-World: Real-Time Open-Vocabulary Object Detection",content:"YOLO-World extends the YOLO paradigm to open-vocabulary detection through vision-language modeling with a re-parameterizable vision-language path aggregation network (RepVL-PAN) and region-text contrastive pretraining. It detects categories never seen at training time while running at 35+ FPS, and its prompt-then-detect deployment re-parameterizes text embeddings for zero runtime text-encoder cost.",content_truncated:!1,metadata:A({arxiv_id:"2401.17270",authors:[{name:"T. Cheng"},{name:"L. Song"},{name:"Y. Ge"}],published:"2024-01-30",conference:"CVPR 2024",citation_count:890,tasks:[{name:"Open-Vocabulary Object Detection",slug:"open-vocabulary-object-detection"},P],methods:[{name:"Contrastive Learning",slug:"contrastive-learning"}],repositories:[{url:"https://github.com/AILab-CVC/YOLO-World",stars:16800}]})},158342:{route_id:"158342",title:"Ultralytics YOLO: real-time detection framework and model zoo",content:"Official Ultralytics framework release covering YOLO11 and YOLOv12 deployment: pretrained COCO checkpoints from nano to x-large, TensorRT/ONNX/CoreML export paths, and reproducible latency benchmarks on T4, Jetson Orin, and CPU targets. Widely used as the practical baseline for real-time detection deployments.",content_truncated:!1,metadata:A({source:"external",source_url:"https://docs.ultralytics.com/models/",authors:[{name:"Ultralytics"}],published:"2025-01-02",tasks:[P,I],repositories:[{url:"https://github.com/ultralytics/ultralytics",stars:46e3}],project_pages:[{url:"https://docs.ultralytics.com"}]})}},Pe=t=>t.map(a=>Tt[a]),_e=Pe(["2502.12524","2407.17140","2410.13842","2406.03459","2304.08069","2405.14458","2401.17270","158342"]),Re=Pe(["2410.13842","2502.12524","2407.17140","2405.14458","2304.08069"]),Te="The user wants the current state-of-the-art for real-time object detection. That's a moving target split across two lineages — the YOLO family (fast CNN one-stage detectors) and the DETR family (transformer, end-to-end, NMS-free). I should ground the answer in recent papers benchmarked on COCO with reported latency or FPS, not just accuracy. Let me start with a broad hybrid search, see which papers surface, then run a second, narrower query to pin down the head-to-head COCO mAP vs latency trade-offs before I write anything.",ke="Good — both lineages are well represented. YOLOv12, YOLOv10 and RT-DETRv2 / D-FINE keep coming up. To actually rank them I need the accuracy-vs-latency numbers side by side on the same COCO val2017 protocol, so let me narrow the query to the benchmark comparison specifically.",Ee=`There isn't a single winner — real-time object detection in 2026 is a two-horse race between the [YOLO family](paper:2502.12524) (fast one-stage CNNs) and the end-to-end [DETR family](paper:2304.08069) (NMS-free transformers). Which one is “SOTA” depends entirely on where you sit on the accuracy-vs-latency curve.
2
+
3
+ **At the fast / edge end**, [YOLOv12](paper:2502.12524) is the current leader. Its area-attention design pushes attention into the YOLO backbone without the usual latency hit — YOLOv12-N reaches 40.6 mAP at ~1.6 ms on a T4, roughly +1.5 mAP over [YOLOv10](paper:2405.14458) at matched speed. [YOLOv10](paper:2405.14458) is still very relevant because it made the YOLO head NMS-free, cutting real end-to-end latency.
4
+
5
+ **At the high-accuracy end**, the transformer detectors win. [D-FINE](paper:2410.13842) currently holds the accuracy-latency Pareto front, reporting 55.8 mAP by reformulating box regression as fine-grained distribution refinement with self-distillation. It builds on [RT-DETRv2](paper:2407.17140), which hardened the [original RT-DETR](paper:2304.08069) recipe (the paper that first showed DETRs beating YOLOs in real time) with training-only “bag-of-freebies” that add no inference cost.
6
+
7
+ **My recommendation:** for edge or high-FPS deployment, start with [YOLOv12](paper:2502.12524) — the [Ultralytics framework](paper:158342) has ready-made checkpoints and export paths. If you have GPU headroom and want maximum accuracy while staying real-time, use [D-FINE](paper:2410.13842) or [RT-DETRv2](paper:2407.17140). And if you need open-vocabulary detection rather than fixed COCO classes, [YOLO-World](paper:2401.17270) is the one to look at.`,kt=["How do these compare on edge devices like Jetson?","Show me open-vocabulary detectors","What about small-object detection?"];async function*Et(t,a){const i=()=>(a==null?void 0:a.aborted)===!0,g=t.trim().slice(0,90)||"state-of-the-art real-time object detection";if(yield{type:"stream_start",request_id:"req_mock",session_id:null},await k(350,a),!i()){yield{type:"reasoning_start"};for(let o=0;o<Te.length;o+=6){if(await k(14,a),i())return;yield{type:"reasoning_delta",text:Te.slice(o,o+6)}}if(await k(400,a),!i()&&(yield{type:"reasoning_end"},await k(300,a),!i()&&(yield{type:"tool_call",id:"call_1",name:"search_papers",args:{query:g,top_k:8}},await k(1100,a),!i()&&(yield{type:"tool_result",id:"call_1",hits:_e.length,took_ms:214,results:_e},await k(350,a),!i())))){yield{type:"reasoning_start"};for(let o=0;o<ke.length;o+=6){if(await k(14,a),i())return;yield{type:"reasoning_delta",text:ke.slice(o,o+6)}}if(await k(350,a),!i()&&(yield{type:"reasoning_end"},await k(300,a),!i()&&(yield{type:"tool_call",id:"call_2",name:"search_papers",args:{query:"RT-DETR vs YOLOv12 COCO mAP latency FPS T4 TensorRT comparison",top_k:5}},await k(900,a),!i()&&(yield{type:"tool_result",id:"call_2",hits:Re.length,took_ms:176,results:Re},await k(400,a),!i())))){for(let o=0;o<Ee.length;o+=4){if(await k(11,a),i())return;yield{type:"answer_delta",text:Ee.slice(o,o+4)}}yield{type:"done",followups:kt,finish_reason:"success"}}}}}const Ie=()=>{const a=String("0").trim().toLowerCase();return a==="1"||a==="true"||a==="yes"};function Lt(t,a={}){return Ie()?Ct(t,a.signal):Et(t.message,a.signal)}async function*Ct(t,a){const i=await fetch(Le("/api/v1/chat/stream"),{method:"POST",headers:{"Content-Type":"application/json",Accept:"text/event-stream"},credentials:"include",body:JSON.stringify(t),signal:a});if(!i.ok||!i.body){const h=await i.json().catch(()=>null),m=h==null?void 0:h.detail;throw new Error((m==null?void 0:m.message)||m||`Chat stream failed (${i.status})`)}const g=i.body.getReader(),o=new TextDecoder;let u="";try{for(;;){const{done:h,value:m}=await g.read();if(h)break;u+=o.decode(m,{stream:!0});let v;for(;(v=u.indexOf(`
8
+
9
+ `))!==-1;){const E=u.slice(0,v);u=u.slice(v+2);const w=E.split(`
10
+ `).filter(j=>j.startsWith("data:")).map(j=>j.slice(5).trimStart()).join(`
11
+ `);!w||w==="[DONE]"||(yield JSON.parse(w))}}}finally{g.releaseLock()}}function St(t){const[a,i]=l.useState([]),[g,o]=l.useState(!1),u=l.useRef(!1),h=l.useRef(null),m=l.useRef([]),v=l.useRef(t),E=l.useRef(""),w=l.useRef(""),j=l.useRef(0);v.current=t,m.current=a,l.useEffect(()=>()=>{var d;return(d=h.current)==null?void 0:d.abort()},[]);const N=l.useMemo(()=>{const d={};for(const c of a)for(const p of c.blocks??[])if(p.kind==="tool")for(const f of p.results??[])d[f.route_id]=f;return d},[a]),R=()=>`m${++j.current}_${Date.now().toString(36)}`,y=d=>i(c=>{if(!c.length)return c;const p=c.slice();return p[p.length-1]=d(p[p.length-1]),p}),z=d=>y(c=>({...c,blocks:[...c.blocks??[],d]})),Y=(d,c)=>y(p=>({...p,blocks:(p.blocks??[]).map((f,_,x)=>d(f,_,x)?c(f):f)})),H=d=>(c,p,f)=>c.kind===d&&f.findLastIndex(_=>_.kind===d)===p,q=d=>{switch(d.type){case"stream_start":d.session_id&&v.current.onSessionId(d.session_id);break;case"session_title_start":w.current="";break;case"session_title_delta":w.current+=d.text,v.current.onTitle(w.current.replace(/\s+/g," ").slice(0,80));break;case"session_title_done":w.current=d.title,v.current.onTitle(d.title);break;case"reasoning_start":z({kind:"reasoning",text:"",active:!0,open:!0});break;case"reasoning_delta":Y(H("reasoning"),c=>c.kind==="reasoning"?{...c,text:c.text+d.text}:c);break;case"reasoning_end":Y(H("reasoning"),c=>c.kind==="reasoning"?{...c,active:!1,open:!1}:c);break;case"tool_call":z({kind:"tool",id:d.id,name:d.name,args:d.args,status:"running",open:!1});break;case"tool_result":Y(c=>c.kind==="tool"&&c.id===d.id,c=>c.kind==="tool"?{...c,status:"done",hits:d.hits,took_ms:d.took_ms,results:d.results}:c);break;case"answer_delta":y(c=>{const p=c.blocks??[],f=p.at(-1);return(f==null?void 0:f.kind)==="answer"&&!f.done?{...c,blocks:[...p.slice(0,-1),{...f,text:f.text+d.text}]}:{...c,blocks:[...p,{kind:"answer",text:d.text,done:!1}]}});break;case"done":y(c=>({...c,streaming:!1,followups:d.followups,finishReason:d.finish_reason,blocks:(c.blocks??[]).map(p=>p.kind==="answer"?{...p,done:!0}:p)}));break;case"error":y(c=>({...c,streaming:!1,error:d.message}));break}},Z=l.useCallback(d=>{const c=d.trim();if(!c||u.current)return!1;u.current=!0;const p=new AbortController;h.current=p,E.current=c;const f=[...m.current].reverse().find(x=>x.role==="user"),_=f!=null&&f.status&&f.status!=="complete"&&f.revision?{replace_message_id:f.id,prior_revision:f.revision}:null;return i(x=>{const L={id:R(),role:"user",text:c},F={id:R(),role:"assistant",streaming:!0,blocks:[]};if(!_)return[...x,L,F];const U=x.findLastIndex(D=>D.id===f.id);return U<0?[...x,L,F]:[...x.slice(0,U),L,F]}),o(!0),(async()=>{try{for await(const x of Lt({message:c,session_id:v.current.sessionId,client_message_id:crypto.randomUUID(),...!v.current.sessionId&&v.current.initialModel?{initial_model:v.current.initialModel}:{},..._??{}},{signal:p.signal}))p.signal.aborted||q(x)}catch(x){p.signal.aborted||q({type:"error",message:x instanceof Error?x.message:"The assistant stream failed."})}finally{h.current===p&&(u.current=!1,o(!1),y(x=>x.streaming?{...x,streaming:!1}:x),v.current.onSettled())}})(),!0},[]),C=l.useCallback(()=>{h.current&&(h.current.abort(),h.current=null,u.current=!1,o(!1),i(d=>{var c;return((c=d.at(-1))==null?void 0:c.role)==="assistant"?d.slice(0,-1):d}),v.current.onInterrupted(E.current),window.setTimeout(v.current.onSettled,250))},[]),S=l.useCallback((d,c)=>i(p=>p.map(f=>{var _;return f.id!==d?f:{...f,blocks:(_=f.blocks)==null?void 0:_.map((x,L)=>L===c&&(x.kind==="reasoning"||x.kind==="tool")?{...x,open:!x.open}:x)}})),[]),ee=l.useCallback(()=>{var d;(d=h.current)==null||d.abort(),h.current=null,u.current=!1,i([]),o(!1)},[]),M=l.useCallback(d=>{var c;(c=h.current)==null||c.abort(),h.current=null,u.current=!1,i(d),o(!1)},[]);return{messages:a,busy:g,papers:N,send:Z,stop:C,toggleBlock:S,reset:ee,load:M}}const Dt=["What's the state of the art for real-time object detection?","Recommend recent papers on retrieval-augmented generation","Which open LLMs are best for on-device inference?"],Ut=()=>{var ye;const{sessionId:t}=qe(),a=$e(),[i,g]=Ve(),{user:o,isLoading:u}=Ke(),[h,m]=l.useState([]),[v,E]=l.useState(!1),[w,j]=l.useState(""),[N,R]=l.useState(()=>t?{id:t,status:"loading"}:null),[y,z]=l.useState(0),Y=l.useRef(Qe()),H=l.useRef(i.get("model")||((ye=Y.current)==null?void 0:ye.model)),[q,Z]=l.useState(Ze),[C,S]=l.useState(H.current||et),[ee,M]=l.useState(""),[d,c]=l.useState(""),[p,f]=l.useState(()=>{var s,n;return((s=i.get("q"))==null?void 0:s.trim())||((n=Y.current)==null?void 0:n.prompt)||""}),_=l.useRef(!1),[x,L]=l.useState(null),[F,U]=l.useState(""),[D,$]=l.useState(null),[ae,ne]=l.useState(()=>typeof window>"u"||window.innerWidth>900),re=l.useRef(new Set),oe=l.useRef(!1),ie=l.useRef(t),V=l.useRef(null);ie.current=t;const W=l.useCallback(async()=>{if(!o)return;const s=!oe.current;s&&E(!0);try{m(await tt()),oe.current=!0,j("")}catch(n){j(n instanceof Error?n.message:"Could not load chats")}finally{s&&E(!1)}},[o]),b=St({sessionId:t??null,initialModel:C,onSessionId:s=>{V.current=s,R({id:s,status:"loaded"}),a(`/chat/${s}`,{replace:!0})},onTitle:s=>{t&&!re.current.has(t)&&(M(s),m(n=>n.map(r=>r.id===t?{...r,title:s}:r)))},onSettled:()=>{W(),t&&G(t).then(s=>b.load(Q(s)))},onInterrupted:s=>{c(s),t&&window.setTimeout(()=>{G(t).then(n=>b.load(Q(n)))},450)}}),ce=b.load,le=b.send,K=l.useCallback(s=>{if(!o){sessionStorage.setItem(be,s),sessionStorage.setItem(ve,C),sessionStorage.setItem(we,"1"),window.location.href=Le(`/api/v1/auth/hf/login?return_to=${encodeURIComponent("/chat")}`);return}le(s)&&(st(),c(""))},[C,le,o]);l.useEffect(()=>{if(u||!o)return;const s=sessionStorage.getItem(ve);s&&S(s),W(),at().then(O=>{if(Z(O.items),!ie.current){const T=H.current||s;S(T&&O.items.some(We=>We.id===T)?T:O.default_model)}});const n=sessionStorage.getItem(be),r=sessionStorage.getItem(we)==="1";n&&(r?f(n):c(n))},[u,W,o]),l.useEffect(()=>{if(!t){V.current!==null&&(V.current=null,b.reset()),R(null);return}if(V.current===t||(R(n=>(n==null?void 0:n.id)===t&&n.status==="loading"?n:{id:t,status:"loading"}),u||!o||b.busy))return;let s=!1;return j(""),G(t).then(n=>{s||(b.load(Q(n)),S(n.selected_model),M(n.title),V.current=t,R({id:t,status:"loaded"}))}).catch(n=>{if(s)return;const r=n instanceof Error?n.message:"Chat not found";b.reset(),j(r),R({id:t,status:"error",error:r})}),()=>{s=!0}},[u,t,o,b.busy,y]),l.useEffect(()=>{var O;const s=(O=i.get("q"))==null?void 0:O.trim();if(!s)return;_.current=!1;const n=i.get("model");n&&S(n),f(s);const r=new URLSearchParams(i);r.delete("q"),r.delete("model"),g(r,{replace:!0})},[i,g]),l.useEffect(()=>{if(u||b.busy||!p||_.current)return;const s=window.setTimeout(()=>{if(_.current)return;_.current=!0;const n=p;f(""),K(n)},0);return()=>window.clearTimeout(s)},[u,b.busy,p,K]),l.useEffect(()=>{const s=()=>{!o||b.busy||(W(),t&&G(t).then(n=>ce(Q(n))))};return window.addEventListener("focus",s),()=>window.removeEventListener("focus",s)},[b.busy,ce,W,t,o]),l.useEffect(()=>{if(!D)return;const s=()=>$(null),n=r=>{r.key==="Escape"&&s()};return window.addEventListener("click",s),window.addEventListener("keydown",n),()=>{window.removeEventListener("click",s),window.removeEventListener("keydown",n)}},[D]);const de=()=>{b.reset(),c(""),M(""),a("/chat")},ue=async s=>{const n=F.trim();if(n)try{const r=await Oe(s,{title:n});re.current.add(s),s===t&&M(r.title),m(O=>O.map(T=>T.id===s?r:T)),L(null)}catch(r){j(r instanceof Error?r.message:"Rename failed")}},Ye=async s=>{const n=s===t&&b.busy;if(window.confirm(n?"Stop and delete this chat? This cannot be undone.":"Delete this chat? This cannot be undone.")){n&&b.stop();try{if(n){const r=Date.now()+3e3;for(;(await G(s)).is_busy;){if(Date.now()>=r)throw new Error("Generation is still stopping. The chat was not deleted.");await new Promise(T=>window.setTimeout(T,150))}}await it(s),s===t&&de(),await W()}catch(r){j(r instanceof Error?r.message:"Delete failed")}}},he=async s=>{const n=C;if(S(s),!!t)try{const r=await Oe(t,{selected_model:s});m(O=>O.map(T=>T.id===t?{...T,selected_model:r.selected_model}:T)),j("")}catch(r){S(n),j(r instanceof Error?r.message:"Model change failed")}},[Me,Fe]=l.useState(60);l.useLayoutEffect(()=>{const s=document.querySelector(".app-header");if(!s)return;const n=()=>Fe(s.offsetHeight);n();const r=new ResizeObserver(n);return r.observe(s),()=>r.disconnect()},[]);const te=l.useRef(null),J=l.useRef(null),Ue=(s,n)=>{var r;J.current=((r=te.current)==null?void 0:r.scrollTop)??null,b.toggleBlock(s,n)};l.useLayoutEffect(()=>{const s=te.current;if(s){if(J.current!==null){s.scrollTop=J.current,J.current=null;return}s.scrollTop=s.scrollHeight}},[b.messages]);const B=h.find(s=>s.id===t),me=b.messages.length===0,pe=(N==null?void 0:N.id)===t,fe=!!(t&&(u||o&&(!pe||(N==null?void 0:N.status)==="loading"))),ge=pe&&(N==null?void 0:N.status)==="error"?N.error:void 0;return e.jsxs("div",{className:"chat-page",style:{height:`calc(100dvh - ${Me}px)`},children:[e.jsxs("aside",{className:`chat-sidebar${ae?"":" chat-sidebar-closed"}`,children:[e.jsxs("div",{className:"chat-sidebar-top",children:[e.jsxs("button",{type:"button",className:"chat-new-chat",onClick:de,children:[e.jsx(nt,{})," New chat"]}),e.jsx("button",{type:"button",className:"icon-btn",onClick:()=>ne(!1),title:"Collapse sidebar",children:e.jsx(je,{})})]}),e.jsxs("nav",{className:"chat-sessions","aria-label":"Chat history",children:[v&&e.jsx("div",{className:"chat-sessions-empty",children:"Loading chats…"}),!v&&w&&e.jsx("div",{className:"chat-sessions-empty",children:w}),!v&&!w&&h.length===0&&e.jsx("div",{className:"chat-sessions-empty",children:"Conversations you start will show up here."}),rt(h).map(s=>e.jsxs("div",{className:"chat-session-group",children:[e.jsx("div",{className:"chat-session-group-label",children:s.label}),s.items.map(n=>e.jsxs("div",{className:`chat-session${n.id===t?" chat-session-active":""}`,role:"button",tabIndex:0,onClick:()=>a(`/chat/${n.id}`),onKeyDown:r=>{if(r.key==="Enter"&&a(`/chat/${n.id}`),r.key==="F2"&&(L(n.id),U(n.title)),r.key==="ContextMenu"||r.shiftKey&&r.key==="F10"){r.preventDefault();const O=r.currentTarget.getBoundingClientRect();$({id:n.id,x:O.right-150,y:O.bottom})}},onContextMenu:r=>{r.preventDefault(),$({id:n.id,x:r.clientX,y:r.clientY})},children:[x===n.id?e.jsx("input",{className:"chat-session-title-input",value:F,autoFocus:!0,maxLength:80,onClick:r=>r.stopPropagation(),onChange:r=>U(r.target.value),onBlur:()=>void ue(n.id),onKeyDown:r=>{r.stopPropagation(),r.key==="Enter"&&ue(n.id),r.key==="Escape"&&L(null)}}):e.jsx("span",{className:"chat-session-title",children:n.title}),e.jsx("button",{type:"button",className:"chat-session-menu","aria-label":"Chat actions","aria-haspopup":"menu",title:"Chat actions",onClick:r=>{r.stopPropagation();const O=r.currentTarget.getBoundingClientRect();$({id:n.id,x:O.right-150,y:O.bottom})},children:"⋯"}),e.jsx("button",{type:"button",className:"chat-session-delete","aria-label":"Delete conversation",onClick:r=>{r.stopPropagation(),Ye(n.id)},children:e.jsx(ot,{})})]},n.id))]},s.label))]}),D&&e.jsx("div",{className:"chat-session-context-menu",role:"menu",style:{left:D.x,top:D.y},onClick:s=>s.stopPropagation(),children:e.jsx("button",{type:"button",role:"menuitem",autoFocus:!0,onClick:()=>{const s=h.find(n=>n.id===D.id);s&&(L(s.id),U(s.title)),$(null)},children:"Rename chat"})})]}),e.jsxs("section",{className:"chat-main",children:[e.jsxs("div",{className:"chat-topbar",children:[!ae&&e.jsx("button",{type:"button",className:"icon-btn",onClick:()=>ne(!0),title:"Open sidebar",children:e.jsx(je,{})}),e.jsx("span",{className:"chat-topbar-title",children:fe?(B==null?void 0:B.title)||"":ee||(B==null?void 0:B.title)||(me?"":"New chat")})]}),fe?e.jsxs("div",{className:"chat-session-loading",role:"status","aria-live":"polite",children:[e.jsx(X,{}),e.jsx("span",{children:"Loading conversation…"})]}):ge?e.jsxs("div",{className:"chat-session-load-error",role:"alert",children:[e.jsx("p",{children:ge}),e.jsx("button",{type:"button",onClick:()=>{R({id:t,status:"loading"}),z(s=>s+1)},children:"Try again"})]}):me?e.jsx("div",{className:"chat-empty",children:e.jsxs("div",{className:"chat-empty-inner",children:[e.jsx("div",{className:"chat-empty-eyebrow",children:"AI research assistant · Staging preview"}),e.jsxs("h1",{className:"chat-empty-title",children:["Ask ",e.jsx("em",{children:"Papers With Code"})]}),e.jsx("p",{className:"chat-empty-sub",children:"Answers are grounded in a live hybrid search over papers, tasks, and benchmarks — with citations you can follow."}),e.jsx(Ne,{onSend:K,busy:b.busy,onStop:b.stop,autoFocus:!0,draft:d,onDraftChange:c,models:q,selectedModel:C,onModelChange:s=>void he(s)}),e.jsx("div",{className:"chat-examples",children:Dt.map(s=>e.jsx("button",{type:"button",className:"chat-example",onClick:()=>K(s),children:s},s))})]})}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"chat-conversation",ref:te,children:e.jsx("div",{className:"chat-conversation-inner",children:b.messages.map(s=>s.role==="user"?e.jsx(_t,{text:s.text??""},s.id):e.jsx(Rt,{msg:s,papers:b.papers,onToggleBlock:Ue},s.id))})}),e.jsx("div",{className:"chat-composer-wrap",children:e.jsxs("div",{className:"chat-composer-inner",children:[e.jsx(Ne,{onSend:K,busy:b.busy,onStop:b.stop,placeholder:d?"Edit and send again…":"Ask a follow-up…",draft:d,onDraftChange:c,models:q,selectedModel:C,onModelChange:s=>void he(s)}),e.jsx("div",{className:"chat-composer-foot",children:Ie()?e.jsxs(e.Fragment,{children:[e.jsxs("span",{className:"chat-provider-attribution",children:["Powered by 🤗 ",e.jsx("a",{href:"https://huggingface.co/docs/inference-providers/en/index",target:"_blank",rel:"noreferrer",children:"Inference Providers"}),"."]}),e.jsx("span",{children:"The AI assistant can make mistakes. Double-check responses."})]}):e.jsx(e.Fragment,{children:"Assistant preview — responses are simulated."})})]})})]})]})]})};export{Ut as default};
assets/ConferenceDetailView-B97-xBxl.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{e as L,r as D,j as e,L as p,b as C}from"./index-CKAClQ2e.js";import{u as T}from"./useQuery-DVaOQYVk.js";import{M as F}from"./MarkdownText-Cuf1_4O5.js";import{e as B,h as A,d as E}from"./transform-BCXN61O6.js";import{S as f}from"./skeleton-BYz337Ss.js";import{A as P,a as z}from"./alert-4m2SJo0T.js";import"./katex.min-BSBacQyE.js";import"./index-DuEHueKe.js";import"./index-b1s0T9nh.js";const M=a=>(a==null?void 0:a.trim().toLowerCase().replace(/[\s_]+/g,"-"))??"",R=(a,t)=>{if(!a)return null;const i=new Date(`${a}T00:00:00`),s=t?new Date(`${t}T00:00:00`):null,c=g=>g.toLocaleDateString("en-US",{month:"long",day:"numeric"}),m=i.getFullYear();return s&&s.getTime()!==i.getTime()?i.getMonth()===s.getMonth()?`${c(i).replace(/\d+$/,"").trim()} ${i.getDate()}–${s.getDate()}, ${m}`:`${c(i)} – ${c(s)}, ${m}`:`${c(i)}, ${m}`},Y=()=>{var k,b,S,_,$,w;const{confSlug:a}=L(),t=T({queryKey:["conference-areas-with-tasks",a],queryFn:()=>C.getConferenceAreasWithTasks(a),enabled:!!a,staleTime:10*60*1e3}),i=D.useMemo(()=>{if(!t.data)return[];const r={general:0,vision:1,video:2,language:3,audio:4,other:5},n=o=>r[M(o)]??999;return[...t.data.results].sort((o,l)=>{const d=n(o.name),x=n(l.name);return d!==x?d-x:o.name.localeCompare(l.name)})},[t.data]),s=(k=t.data)==null?void 0:k.conference,c=((b=t.data)==null?void 0:b.total_paper_count)??0,m=((S=t.data)==null?void 0:S.oral_paper_count)??0,g=((_=t.data)==null?void 0:_.spotlight_paper_count)??0,u=(($=t.data)==null?void 0:$.outstanding_paper_count)??0,j=((w=t.data)==null?void 0:w.best_paper_finalist_paper_count)??0,v=i.reduce((r,n)=>r+n.tasks.length,0);if(t.error)return e.jsx("div",{className:"page",children:e.jsx(P,{variant:"destructive",children:e.jsx(z,{children:"Failed to load conference. Please try again."})})});const y=s?R(s.start_date,s.end_date):null,N=s?[s.venue,s.location].filter(Boolean).join(", "):null,h=s==null?void 0:s.name;return e.jsxs("div",{className:"page",children:[e.jsxs("div",{className:s!=null&&s.image_url?"task-hero-grid":void 0,children:[e.jsxs("div",{children:[e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",letterSpacing:"0.1em",marginBottom:8},children:"CONFERENCE"}),e.jsx("h1",{className:"feed-title",children:h??e.jsx(f,{className:"h-10 w-64 inline-block"})}),e.jsxs("div",{className:"feed-subtitle",style:{display:"flex",flexDirection:"column",gap:4},children:[y&&e.jsx("span",{children:y}),N&&e.jsx("span",{children:N}),(s==null?void 0:s.url)&&e.jsx("a",{href:s.url,target:"_blank",rel:"noopener noreferrer",style:{color:"var(--accent-text)"},children:s.url.replace(/^https?:\/\//,"")}),(s==null?void 0:s.hf_url)&&e.jsxs("a",{className:"bm-action-btn",href:s.hf_url,target:"_blank",rel:"noopener noreferrer",style:{alignSelf:"flex-start",marginTop:4},children:[e.jsx("span",{"aria-hidden":"true",children:"🤗"})," View on Hugging Face"]})]}),(s==null?void 0:s.description)&&e.jsx(F,{className:"method-description",text:s.description})]}),(s==null?void 0:s.image_url)&&e.jsxs("figure",{className:"task-figure-card",children:[e.jsx("div",{className:"task-figure-img-wrap",children:e.jsx("img",{className:"task-figure-img",src:s.image_url,alt:h?`${h} visual`:"Conference visual",onError:r=>{var n,o;(o=(n=r.currentTarget.parentElement)==null?void 0:n.parentElement)==null||o.style.setProperty("display","none")}})}),e.jsxs("figcaption",{children:["Figure · ",h??"Conference",s.image_credit&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(F,{className:"task-image-credit",text:s.image_credit})]})]})]})]}),!t.isLoading&&c>0&&e.jsxs("section",{style:{marginTop:48,marginBottom:48},children:[e.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:24,paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},children:[e.jsxs("div",{children:[e.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.02em",marginBottom:4},children:"Browse papers"}),e.jsx("div",{style:{fontFamily:"var(--serif)",fontStyle:"italic",fontSize:13,color:"var(--ink-soft)"},children:"All accepted papers, plus oral, spotlight, outstanding, and best paper finalists."})]}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[c.toLocaleString()," papers"]})]}),e.jsxs("div",{className:"tag-grid",children:[e.jsxs(p,{to:`/conferences/${a}/all`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:"var(--accent)"}}),"All papers"]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[c.toLocaleString()," papers"]})})]}),m>0&&e.jsxs(p,{to:`/conferences/${a}/oral`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:"#fdbb02"}}),"Oral papers"]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[m.toLocaleString()," papers"]})})]}),g>0&&e.jsxs(p,{to:`/conferences/${a}/spotlight`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:"#fdbb02"}}),"Spotlight papers"]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[g.toLocaleString()," papers"]})})]}),u>0&&e.jsxs(p,{to:`/conferences/${a}/outstanding`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:"#c45c26"}}),"Outstanding papers"]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[u.toLocaleString()," papers"]})})]}),j>0&&e.jsxs(p,{to:`/conferences/${a}/best-paper-finalists`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:"#c9a227"}}),"Best paper finalists"]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[j.toLocaleString()," papers"]})})]})]})]}),t.isLoading?e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:32},children:Array.from({length:4}).map((r,n)=>e.jsxs("div",{children:[e.jsx(f,{className:"h-8 w-1/3 mb-4"}),e.jsx("div",{className:"tag-grid",children:Array.from({length:6}).map((o,l)=>e.jsx(f,{className:"h-24"},l))})]},n))}):i.map(r=>{const n=r.tasks;if(n.length===0)return null;const o=n.reduce((l,d)=>l+(d.paper_count||0),0);return e.jsxs("section",{style:{marginBottom:48},children:[e.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:24,paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},children:[e.jsxs("div",{children:[e.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.02em",marginBottom:4},children:r.name}),r.description&&e.jsx("div",{style:{fontFamily:"var(--serif)",fontStyle:"italic",fontSize:13,color:"var(--ink-soft)"},children:r.description})]}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[n.length," ",n.length===1?"task":"tasks"," · ",o.toLocaleString()," papers"]})]}),e.jsx("div",{className:"tag-grid",children:n.map(l=>{const d=l.slug||"",x=B(A(d));return e.jsxs(p,{to:`/conferences/${a}/${d}`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:x.dot}}),E(l.name,d)]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[(l.paper_count??0).toLocaleString()," papers"]})})]},l.id)})})]},r.id)}),v>0&&e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",marginTop:24},children:[v," tasks across ",i.filter(r=>r.tasks.length>0).length," areas."]})]})};export{Y as default};
assets/ConferenceDetailView-CD7PX6eF.js DELETED
@@ -1 +0,0 @@
1
- import{_ as L,r as D,j as e,L as p,a as C}from"./index-EtWJP9FK.js";import{u as T}from"./useQuery-CRN8HQuX.js";import{M as F}from"./MarkdownText-Bj8B42V4.js";import{e as B,h as A,d as E}from"./transform-BnMt6tRc.js";import{S as f}from"./skeleton-DMjGQB3S.js";import{A as P,a as z}from"./alert-BIanajMT.js";import"./katex.min-BSBacQyE.js";import"./index-By9W8E5I.js";const M=a=>(a==null?void 0:a.trim().toLowerCase().replace(/[\s_]+/g,"-"))??"",R=(a,t)=>{if(!a)return null;const i=new Date(`${a}T00:00:00`),s=t?new Date(`${t}T00:00:00`):null,c=g=>g.toLocaleDateString("en-US",{month:"long",day:"numeric"}),m=i.getFullYear();return s&&s.getTime()!==i.getTime()?i.getMonth()===s.getMonth()?`${c(i).replace(/\d+$/,"").trim()} ${i.getDate()}–${s.getDate()}, ${m}`:`${c(i)} – ${c(s)}, ${m}`:`${c(i)}, ${m}`},U=()=>{var k,S,_,b,$,w;const{confSlug:a}=L(),t=T({queryKey:["conference-areas-with-tasks",a],queryFn:()=>C.getConferenceAreasWithTasks(a),enabled:!!a,staleTime:10*60*1e3}),i=D.useMemo(()=>{if(!t.data)return[];const r={general:0,vision:1,video:2,language:3,audio:4,other:5},n=o=>r[M(o)]??999;return[...t.data.results].sort((o,l)=>{const d=n(o.name),x=n(l.name);return d!==x?d-x:o.name.localeCompare(l.name)})},[t.data]),s=(k=t.data)==null?void 0:k.conference,c=((S=t.data)==null?void 0:S.total_paper_count)??0,m=((_=t.data)==null?void 0:_.oral_paper_count)??0,g=((b=t.data)==null?void 0:b.spotlight_paper_count)??0,u=(($=t.data)==null?void 0:$.outstanding_paper_count)??0,j=((w=t.data)==null?void 0:w.best_paper_finalist_paper_count)??0,v=i.reduce((r,n)=>r+n.tasks.length,0);if(t.error)return e.jsx("div",{className:"page",children:e.jsx(P,{variant:"destructive",children:e.jsx(z,{children:"Failed to load conference. Please try again."})})});const y=s?R(s.start_date,s.end_date):null,N=s?[s.venue,s.location].filter(Boolean).join(", "):null,h=s==null?void 0:s.name;return e.jsxs("div",{className:"page",children:[e.jsxs("div",{className:s!=null&&s.image_url?"task-hero-grid":void 0,children:[e.jsxs("div",{children:[e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",letterSpacing:"0.1em",marginBottom:8},children:"CONFERENCE"}),e.jsx("h1",{className:"feed-title",children:h??e.jsx(f,{className:"h-10 w-64 inline-block"})}),e.jsxs("div",{className:"feed-subtitle",style:{display:"flex",flexDirection:"column",gap:4},children:[y&&e.jsx("span",{children:y}),N&&e.jsx("span",{children:N}),(s==null?void 0:s.url)&&e.jsx("a",{href:s.url,target:"_blank",rel:"noopener noreferrer",style:{color:"var(--accent-text)"},children:s.url.replace(/^https?:\/\//,"")}),(s==null?void 0:s.hf_url)&&e.jsxs("a",{className:"bm-action-btn",href:s.hf_url,target:"_blank",rel:"noopener noreferrer",style:{alignSelf:"flex-start",marginTop:4},children:[e.jsx("span",{"aria-hidden":"true",children:"🤗"})," View on Hugging Face"]})]}),(s==null?void 0:s.description)&&e.jsx(F,{className:"method-description",text:s.description})]}),(s==null?void 0:s.image_url)&&e.jsxs("figure",{className:"task-figure-card",children:[e.jsx("div",{className:"task-figure-img-wrap",children:e.jsx("img",{className:"task-figure-img",src:s.image_url,alt:h?`${h} visual`:"Conference visual",onError:r=>{var n,o;(o=(n=r.currentTarget.parentElement)==null?void 0:n.parentElement)==null||o.style.setProperty("display","none")}})}),e.jsxs("figcaption",{children:["Figure · ",h??"Conference",s.image_credit&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(F,{className:"task-image-credit",text:s.image_credit})]})]})]})]}),!t.isLoading&&c>0&&e.jsxs("section",{style:{marginTop:48,marginBottom:48},children:[e.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:24,paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},children:[e.jsxs("div",{children:[e.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.02em",marginBottom:4},children:"Browse papers"}),e.jsx("div",{style:{fontFamily:"var(--serif)",fontStyle:"italic",fontSize:13,color:"var(--ink-soft)"},children:"All accepted papers, plus oral, spotlight, outstanding, and best paper finalists."})]}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[c.toLocaleString()," papers"]})]}),e.jsxs("div",{className:"tag-grid",children:[e.jsxs(p,{to:`/conferences/${a}/all`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:"var(--accent)"}}),"All papers"]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[c.toLocaleString()," papers"]})})]}),m>0&&e.jsxs(p,{to:`/conferences/${a}/oral`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:"#fdbb02"}}),"Oral papers"]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[m.toLocaleString()," papers"]})})]}),g>0&&e.jsxs(p,{to:`/conferences/${a}/spotlight`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:"#fdbb02"}}),"Spotlight papers"]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[g.toLocaleString()," papers"]})})]}),u>0&&e.jsxs(p,{to:`/conferences/${a}/outstanding`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:"#c45c26"}}),"Outstanding papers"]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[u.toLocaleString()," papers"]})})]}),j>0&&e.jsxs(p,{to:`/conferences/${a}/best-paper-finalists`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:"#c9a227"}}),"Best paper finalists"]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[j.toLocaleString()," papers"]})})]})]})]}),t.isLoading?e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:32},children:Array.from({length:4}).map((r,n)=>e.jsxs("div",{children:[e.jsx(f,{className:"h-8 w-1/3 mb-4"}),e.jsx("div",{className:"tag-grid",children:Array.from({length:6}).map((o,l)=>e.jsx(f,{className:"h-24"},l))})]},n))}):i.map(r=>{const n=r.tasks;if(n.length===0)return null;const o=n.reduce((l,d)=>l+(d.paper_count||0),0);return e.jsxs("section",{style:{marginBottom:48},children:[e.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:24,paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},children:[e.jsxs("div",{children:[e.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.02em",marginBottom:4},children:r.name}),r.description&&e.jsx("div",{style:{fontFamily:"var(--serif)",fontStyle:"italic",fontSize:13,color:"var(--ink-soft)"},children:r.description})]}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[n.length," ",n.length===1?"task":"tasks"," · ",o.toLocaleString()," papers"]})]}),e.jsx("div",{className:"tag-grid",children:n.map(l=>{const d=l.slug||"",x=B(A(d));return e.jsxs(p,{to:`/conferences/${a}/${d}`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:x.dot}}),E(l.name,d)]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[(l.paper_count??0).toLocaleString()," papers"]})})]},l.id)})})]},r.id)}),v>0&&e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",marginTop:24},children:[v," tasks across ",i.filter(r=>r.tasks.length>0).length," areas."]})]})};export{U as default};
 
 
assets/ConferenceTaskView-C-nGfySU.js DELETED
@@ -1 +0,0 @@
1
- import{_ as Q,u as K,r as u,j as e,L as P,W as V,a as L}from"./index-EtWJP9FK.js";import{u as E}from"./useQuery-CRN8HQuX.js";import{P as $}from"./components-Bs7x-Lbj.js";import{M as g}from"./MarkdownText-Bj8B42V4.js";import{t as W,d as D}from"./transform-BnMt6tRc.js";import{c as U}from"./usePapers-Bf6VWYSD.js";import{u as G}from"./useIntersectionObserver-CuGdoJlB.js";import{S as J}from"./skeleton-DMjGQB3S.js";import{A as X,a as Y}from"./alert-BIanajMT.js";import"./LatexTitle-ZHDCAKfZ.js";import"./katex.min-BSBacQyE.js";import"./index-By9W8E5I.js";import"./useInfiniteQuery-DMyrN_84.js";const Z=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],ee=s=>s==="trending"||s==="date_published"||s==="citation_count"?s:"trending",he=()=>{var w,R,F,C,O,T;const{confSlug:s,taskSlug:n}=Q(),[v,M]=K(),b=ee(v.get("order_by")),z=r=>{const a=new URLSearchParams(v);a.set("order_by",r),M(a)},y=n==="all",x=n==="oral",f=n==="spotlight",c=n==="outstanding",l=n==="best-paper-finalists",_=c||l,d=y||x||f||c||l,I=d?void 0:n,q=x?"oral":f?"spotlight":c?"outstanding":l?"best_paper_finalist":void 0,p=E({queryKey:["conference",s],queryFn:()=>L.getConference(s),enabled:!!s,staleTime:10*60*1e3}),h=E({queryKey:["task",n],queryFn:()=>L.getTask(n),enabled:!!n&&!d,staleTime:10*60*1e3}),i=U({conferenceSlug:s||"",taskSlug:I,presentation:q,page_size:12,order_by:b,order_dir:"desc",include_resources:!0,enabled:!!s}),{targetRef:H,isIntersecting:S}=G({rootMargin:"200px"});u.useEffect(()=>{S&&i.hasNextPage&&!i.isFetchingNextPage&&i.fetchNextPage()},[S,i.hasNextPage,i.isFetchingNextPage]),u.useEffect(()=>{window.scrollTo(0,0)},[s,n]);const j=u.useMemo(()=>{var a;return(((a=i.data)==null?void 0:a.pages)??[]).flatMap(o=>o.results)},[i.data]),N=u.useMemo(()=>j.map(W),[j]),m=y?"All papers":x?"Oral papers":f?"Spotlight papers":c?"Outstanding papers":l?"Best paper finalists":D(((w=h.data)==null?void 0:w.name)||n||"",((R=h.data)==null?void 0:R.slug)||n),k=((C=(F=i.data)==null?void 0:F.pages[0])==null?void 0:C.count)??((O=p.data)==null?void 0:O.paper_count)??0,t=h.data;return p.error||h.error||i.error?e.jsx("div",{className:"page",children:e.jsx(X,{variant:"destructive",children:e.jsx(Y,{children:"Failed to load conference papers. Please try again."})})}):e.jsxs("div",{className:"page",children:[e.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[e.jsx(P,{to:"/",children:"Home"}),e.jsx("span",{children:" / "}),e.jsx(P,{to:"/conferences",children:"Conferences"}),e.jsx("span",{children:" / "}),e.jsx(P,{to:`/conferences/${s}`,children:((T=p.data)==null?void 0:T.name)??s}),e.jsx("span",{children:" / "}),e.jsx("span",{children:m})]}),e.jsxs("div",{className:!d&&(t!=null&&t.image_url)?"task-hero-grid":void 0,style:{marginTop:16,marginBottom:28},children:[e.jsxs("div",{children:[e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",letterSpacing:"0.1em",marginBottom:8},children:d?"BROWSE PAPERS":"TASK"}),e.jsx("h1",{className:"domain-mega-title",children:m}),c&&s==="iclr-2026"&&e.jsx(g,{className:"task-explainer",text:"ICLR 2026 recognized two Outstanding Papers and one Honorable Mention. [Read the announcement](https://blog.iclr.cc/2026/04/23/announcing-the-iclr-2026-outstanding-papers/)."}),c&&s==="icml-2026"&&e.jsx(g,{className:"task-explainer",text:"ICML 2026 recognized two Outstanding Papers and five Honorable Mentions. [Read the announcement](https://blog.icml.cc/2026/07/05/announcing-the-icml-2026-awards/)."}),l&&s==="cvpr-2026"&&e.jsx(g,{className:"task-explainer",text:"CVPR 2026 recognized fifteen Best Paper Award finalists, including the winners. [Read the announcement](https://x.com/CVPR/status/2062912519522717978)."}),!d&&(t==null?void 0:t.description)&&e.jsx(g,{className:"task-explainer",text:t.description}),p.data&&e.jsxs("div",{className:"task-quickstats",style:{marginTop:12},children:[e.jsxs("span",{children:[e.jsx("span",{className:"num",children:k.toLocaleString()}),"PAPERS"]}),e.jsx("span",{children:p.data.name})]})]}),!d&&(t==null?void 0:t.image_url)&&e.jsxs("figure",{className:"task-figure-card",children:[e.jsx("div",{className:"task-figure-img-wrap",children:e.jsx("img",{className:"task-figure-img",src:t.image_url,alt:`${m} schematic`,onError:r=>{var a,o;(o=(a=r.currentTarget.parentElement)==null?void 0:a.parentElement)==null||o.style.setProperty("display","none")}})}),e.jsxs("figcaption",{children:["Figure · ",m,t.image_credit&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(g,{className:"task-image-credit",text:t.image_credit})]})]})]})]}),e.jsxs("div",{className:"task-section-head",children:[e.jsx("div",{className:"task-section-eyebrow",children:_?"Award papers":"Conference papers · sort below"}),e.jsxs("div",{className:"task-section-title",children:["Papers ",e.jsxs("span",{className:"meta",children:["[",k.toLocaleString(),"]"]})]})]}),!_&&e.jsxs("div",{className:"sort-bar",children:[e.jsx("div",{className:"sort-options",children:Z.map(([r,a])=>e.jsx("button",{className:`sort-btn ${b===r?"active":""}`,onClick:()=>z(r),children:a},r))}),e.jsxs("div",{className:"results-count",children:[N.length," loaded in ",e.jsx("span",{children:m})]})]}),i.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((r,a)=>e.jsx(J,{className:"h-40 w-full"},a))}):N.length===0?e.jsx("div",{className:"no-results",children:"No papers found for this selection."}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:N.map((r,a)=>{var B;const o=(B=j[a])==null?void 0:B.conference_award,A=o==="outstanding"?"Outstanding Paper":o==="honorable_mention"?"Honorable Mention":o==="best_paper_finalist"&&!l?"Best Paper Finalist":null;return e.jsxs(V.Fragment,{children:[A&&e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",letterSpacing:"0.08em",marginBottom:8},children:A}),e.jsx($,{paper:r,rank:a+1})]},r.id)})}),e.jsx("div",{ref:H,style:{height:1}}),i.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]})};export{he as default};
 
 
assets/ConferenceTaskView-DtN4azeY.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{e as Q,u as K,r as u,j as e,L as P,R as V,b as L}from"./index-CKAClQ2e.js";import{u as E}from"./useQuery-DVaOQYVk.js";import{P as $}from"./components-CM9AEXO8.js";import{M as g}from"./MarkdownText-Cuf1_4O5.js";import{t as D,d as U}from"./transform-BCXN61O6.js";import{c as W}from"./usePapers-Bep4-Z-b.js";import{u as G}from"./useIntersectionObserver-Bzsb1rr2.js";import{S as J}from"./skeleton-BYz337Ss.js";import{A as X,a as Y}from"./alert-4m2SJo0T.js";import"./LatexTitle-DBZLS4yb.js";import"./katex.min-BSBacQyE.js";import"./index-DuEHueKe.js";import"./index-b1s0T9nh.js";import"./useInfiniteQuery-BaNuOv30.js";const Z=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],ee=s=>s==="trending"||s==="date_published"||s==="citation_count"?s:"trending",ue=()=>{var w,R,F,C,O,T;const{confSlug:s,taskSlug:r}=Q(),[v,M]=K(),b=ee(v.get("order_by")),z=n=>{const a=new URLSearchParams(v);a.set("order_by",n),M(a)},y=r==="all",x=r==="oral",f=r==="spotlight",c=r==="outstanding",l=r==="best-paper-finalists",S=c||l,d=y||x||f||c||l,I=d?void 0:r,q=x?"oral":f?"spotlight":c?"outstanding":l?"best_paper_finalist":void 0,p=E({queryKey:["conference",s],queryFn:()=>L.getConference(s),enabled:!!s,staleTime:10*60*1e3}),h=E({queryKey:["task",r],queryFn:()=>L.getTask(r),enabled:!!r&&!d,staleTime:10*60*1e3}),i=W({conferenceSlug:s||"",taskSlug:I,presentation:q,page_size:12,order_by:b,order_dir:"desc",include_resources:!0,enabled:!!s}),{targetRef:H,isIntersecting:_}=G({rootMargin:"200px"});u.useEffect(()=>{_&&i.hasNextPage&&!i.isFetchingNextPage&&i.fetchNextPage()},[_,i.hasNextPage,i.isFetchingNextPage]),u.useEffect(()=>{window.scrollTo(0,0)},[s,r]);const j=u.useMemo(()=>{var a;return(((a=i.data)==null?void 0:a.pages)??[]).flatMap(o=>o.results)},[i.data]),N=u.useMemo(()=>j.map(D),[j]),m=y?"All papers":x?"Oral papers":f?"Spotlight papers":c?"Outstanding papers":l?"Best paper finalists":U(((w=h.data)==null?void 0:w.name)||r||"",((R=h.data)==null?void 0:R.slug)||r),k=((C=(F=i.data)==null?void 0:F.pages[0])==null?void 0:C.count)??((O=p.data)==null?void 0:O.paper_count)??0,t=h.data;return p.error||h.error||i.error?e.jsx("div",{className:"page",children:e.jsx(X,{variant:"destructive",children:e.jsx(Y,{children:"Failed to load conference papers. Please try again."})})}):e.jsxs("div",{className:"page",children:[e.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[e.jsx(P,{to:"/",children:"Home"}),e.jsx("span",{children:" / "}),e.jsx(P,{to:"/conferences",children:"Conferences"}),e.jsx("span",{children:" / "}),e.jsx(P,{to:`/conferences/${s}`,children:((T=p.data)==null?void 0:T.name)??s}),e.jsx("span",{children:" / "}),e.jsx("span",{children:m})]}),e.jsxs("div",{className:!d&&(t!=null&&t.image_url)?"task-hero-grid":void 0,style:{marginTop:16,marginBottom:28},children:[e.jsxs("div",{children:[e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",letterSpacing:"0.1em",marginBottom:8},children:d?"BROWSE PAPERS":"TASK"}),e.jsx("h1",{className:"domain-mega-title",children:m}),c&&s==="iclr-2026"&&e.jsx(g,{className:"task-explainer",text:"ICLR 2026 recognized two Outstanding Papers and one Honorable Mention. [Read the announcement](https://blog.iclr.cc/2026/04/23/announcing-the-iclr-2026-outstanding-papers/)."}),c&&s==="icml-2026"&&e.jsx(g,{className:"task-explainer",text:"ICML 2026 recognized two Outstanding Papers and five Honorable Mentions. [Read the announcement](https://blog.icml.cc/2026/07/05/announcing-the-icml-2026-awards/)."}),l&&s==="cvpr-2026"&&e.jsx(g,{className:"task-explainer",text:"CVPR 2026 recognized fifteen Best Paper Award finalists, including the winners. [Read the announcement](https://x.com/CVPR/status/2062912519522717978)."}),!d&&(t==null?void 0:t.description)&&e.jsx(g,{className:"task-explainer",text:t.description}),p.data&&e.jsxs("div",{className:"task-quickstats",style:{marginTop:12},children:[e.jsxs("span",{children:[e.jsx("span",{className:"num",children:k.toLocaleString()}),"PAPERS"]}),e.jsx("span",{children:p.data.name})]})]}),!d&&(t==null?void 0:t.image_url)&&e.jsxs("figure",{className:"task-figure-card",children:[e.jsx("div",{className:"task-figure-img-wrap",children:e.jsx("img",{className:"task-figure-img",src:t.image_url,alt:`${m} schematic`,onError:n=>{var a,o;(o=(a=n.currentTarget.parentElement)==null?void 0:a.parentElement)==null||o.style.setProperty("display","none")}})}),e.jsxs("figcaption",{children:["Figure · ",m,t.image_credit&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(g,{className:"task-image-credit",text:t.image_credit})]})]})]})]}),e.jsxs("div",{className:"task-section-head",children:[e.jsx("div",{className:"task-section-eyebrow",children:S?"Award papers":"Conference papers · sort below"}),e.jsxs("div",{className:"task-section-title",children:["Papers ",e.jsxs("span",{className:"meta",children:["[",k.toLocaleString(),"]"]})]})]}),!S&&e.jsxs("div",{className:"sort-bar",children:[e.jsx("div",{className:"sort-options",children:Z.map(([n,a])=>e.jsx("button",{className:`sort-btn ${b===n?"active":""}`,onClick:()=>z(n),children:a},n))}),e.jsxs("div",{className:"results-count",children:[N.length," loaded in ",e.jsx("span",{children:m})]})]}),i.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((n,a)=>e.jsx(J,{className:"h-40 w-full"},a))}):N.length===0?e.jsx("div",{className:"no-results",children:"No papers found for this selection."}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:N.map((n,a)=>{var B;const o=(B=j[a])==null?void 0:B.conference_award,A=o==="outstanding"?"Outstanding Paper":o==="honorable_mention"?"Honorable Mention":o==="best_paper_finalist"&&!l?"Best Paper Finalist":null;return e.jsxs(V.Fragment,{children:[A&&e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",letterSpacing:"0.08em",marginBottom:8},children:A}),e.jsx($,{paper:n,rank:a+1})]},n.id)})}),e.jsx("div",{ref:H,style:{height:1}}),i.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]})};export{ue as default};
assets/{ConferencesIndexView-CHnhRk0q.js → ConferencesIndexView-BovukbCI.js} RENAMED
@@ -1 +1 @@
1
- import{r as m,j as e,L as u,a as p}from"./index-EtWJP9FK.js";import{u as h}from"./useQuery-CRN8HQuX.js";import{S as d}from"./skeleton-DMjGQB3S.js";import{A as g,a as f}from"./alert-BIanajMT.js";const x=(r,n)=>{if(!r)return null;const t=new Date(`${r}T00:00:00`),s=n?new Date(`${n}T00:00:00`):null,a=l=>l.toLocaleDateString("en-US",{month:"long",day:"numeric"}),i=t.getFullYear();return s&&s.getTime()!==t.getTime()?t.getMonth()===s.getMonth()?`${a(t).replace(/\d+$/,"").trim()} ${t.getDate()}–${s.getDate()}, ${i}`:`${a(t)} – ${a(s)}, ${i}`:`${a(t)}, ${i}`},j=r=>{var t;if(r.year!=null)return r.year;if(r.start_date)return Number(r.start_date.slice(0,4));const n=(t=r.slug.match(/-(\d{4})$/))==null?void 0:t[1];return n?Number(n):0},v=(r,n)=>{if(r.start_date&&n.start_date){const t=r.start_date.localeCompare(n.start_date);if(t!==0)return t}else{if(r.start_date)return-1;if(n.start_date)return 1}return r.name.localeCompare(n.name)},y={display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:24,paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},S=()=>{const r=h({queryKey:["conferences"],queryFn:()=>p.getConferences(),staleTime:6e5}),n=m.useMemo(()=>{var s;if(!((s=r.data)!=null&&s.results))return null;const t={};return r.data.results.forEach(a=>{const i=j(a);(t[i]||(t[i]=[])).push(a)}),Object.values(t).forEach(a=>a.sort(v)),Object.keys(t).map(Number).sort((a,i)=>i-a).map(a=>({year:a,conferences:t[a]}))},[r.data]);return r.error?e.jsx("div",{className:"page",children:e.jsx(g,{variant:"destructive",children:e.jsx(f,{children:"Failed to load conferences. Please try again."})})}):e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["All ",e.jsx("em",{children:"Conferences"})]}),e.jsx("div",{className:"feed-subtitle",children:"Browse accepted papers from major AI conferences, grouped by research area and task."})]})}),r.isLoading?e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:32},children:Array.from({length:2}).map((t,s)=>e.jsxs("div",{children:[e.jsx(d,{className:"h-8 w-24 mb-4"}),e.jsx("div",{className:"tag-grid",children:Array.from({length:3}).map((a,i)=>e.jsx(d,{className:"h-32"},i))})]},s))}):n==null?void 0:n.map(({year:t,conferences:s})=>{const a=s.reduce((l,o)=>l+(o.paper_count??0),0),i=t>0?String(t):"Unknown year";return e.jsxs("section",{style:{marginBottom:48},children:[e.jsxs("div",{style:y,children:[e.jsx("div",{children:e.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.02em",marginBottom:4},children:i})}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[s.length," ",s.length===1?"conference":"conferences"," ·"," ",a.toLocaleString()," papers"]})]}),e.jsx("div",{className:"tag-grid",children:s.map(l=>{const o=x(l.start_date,l.end_date),c=[l.venue,l.location].filter(Boolean).join(", ");return e.jsxs(u,{to:`/conferences/${l.slug}`,className:"tag-cell",children:[e.jsx("div",{className:"name",children:l.name}),e.jsxs("div",{className:"meta",style:{display:"flex",flexDirection:"column",gap:4},children:[o&&e.jsx("span",{children:o}),c&&e.jsx("span",{children:c}),e.jsxs("span",{children:[(l.paper_count??0).toLocaleString()," papers"]})]})]},l.id)})})]},t)})]})};export{S as default};
 
1
+ import{r as m,j as e,L as u,b as p}from"./index-CKAClQ2e.js";import{u as h}from"./useQuery-DVaOQYVk.js";import{S as d}from"./skeleton-BYz337Ss.js";import{A as g,a as f}from"./alert-4m2SJo0T.js";const x=(r,n)=>{if(!r)return null;const t=new Date(`${r}T00:00:00`),s=n?new Date(`${n}T00:00:00`):null,a=l=>l.toLocaleDateString("en-US",{month:"long",day:"numeric"}),i=t.getFullYear();return s&&s.getTime()!==t.getTime()?t.getMonth()===s.getMonth()?`${a(t).replace(/\d+$/,"").trim()} ${t.getDate()}–${s.getDate()}, ${i}`:`${a(t)} – ${a(s)}, ${i}`:`${a(t)}, ${i}`},j=r=>{var t;if(r.year!=null)return r.year;if(r.start_date)return Number(r.start_date.slice(0,4));const n=(t=r.slug.match(/-(\d{4})$/))==null?void 0:t[1];return n?Number(n):0},v=(r,n)=>{if(r.start_date&&n.start_date){const t=r.start_date.localeCompare(n.start_date);if(t!==0)return t}else{if(r.start_date)return-1;if(n.start_date)return 1}return r.name.localeCompare(n.name)},y={display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:24,paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},S=()=>{const r=h({queryKey:["conferences"],queryFn:()=>p.getConferences(),staleTime:6e5}),n=m.useMemo(()=>{var s;if(!((s=r.data)!=null&&s.results))return null;const t={};return r.data.results.forEach(a=>{const i=j(a);(t[i]||(t[i]=[])).push(a)}),Object.values(t).forEach(a=>a.sort(v)),Object.keys(t).map(Number).sort((a,i)=>i-a).map(a=>({year:a,conferences:t[a]}))},[r.data]);return r.error?e.jsx("div",{className:"page",children:e.jsx(g,{variant:"destructive",children:e.jsx(f,{children:"Failed to load conferences. Please try again."})})}):e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["All ",e.jsx("em",{children:"Conferences"})]}),e.jsx("div",{className:"feed-subtitle",children:"Browse accepted papers from major AI conferences, grouped by research area and task."})]})}),r.isLoading?e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:32},children:Array.from({length:2}).map((t,s)=>e.jsxs("div",{children:[e.jsx(d,{className:"h-8 w-24 mb-4"}),e.jsx("div",{className:"tag-grid",children:Array.from({length:3}).map((a,i)=>e.jsx(d,{className:"h-32"},i))})]},s))}):n==null?void 0:n.map(({year:t,conferences:s})=>{const a=s.reduce((l,o)=>l+(o.paper_count??0),0),i=t>0?String(t):"Unknown year";return e.jsxs("section",{style:{marginBottom:48},children:[e.jsxs("div",{style:y,children:[e.jsx("div",{children:e.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.02em",marginBottom:4},children:i})}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[s.length," ",s.length===1?"conference":"conferences"," ·"," ",a.toLocaleString()," papers"]})]}),e.jsx("div",{className:"tag-grid",children:s.map(l=>{const o=x(l.start_date,l.end_date),c=[l.venue,l.location].filter(Boolean).join(", ");return e.jsxs(u,{to:`/conferences/${l.slug}`,className:"tag-cell",children:[e.jsx("div",{className:"name",children:l.name}),e.jsxs("div",{className:"meta",style:{display:"flex",flexDirection:"column",gap:4},children:[o&&e.jsx("span",{children:o}),c&&e.jsx("span",{children:c}),e.jsxs("span",{children:[(l.paper_count??0).toLocaleString()," papers"]})]})]},l.id)})})]},t)})]})};export{S as default};
assets/CronDashboard-BNnSsgtO.js ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import{g as h,r as l,j as e,q as u,ai as ye,l as ve,k as D,I as be,aj as we,ak as ke,n as I,P as Ce,p as _e,al as W,L as Te,f as Re,b as Se}from"./index-CKAClQ2e.js";import{u as K}from"./useQuery-DVaOQYVk.js";import{B as k,D as B,f as Me}from"./codexAddEvals-BhjClbnO.js";import{B as O}from"./button-q4EOT22d.js";import{C as M,a as E,R as z,S as Ae}from"./shield-alert-LlFuaC5a.js";import{L as R}from"./loader-circle-IFHZqWi9.js";/**
2
+ * @license lucide-react v0.462.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 A=h("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/**
7
+ * @license lucide-react v0.462.0 - ISC
8
+ *
9
+ * This source code is licensed under the ISC license.
10
+ * See the LICENSE file in the root directory of this source tree.
11
+ */const Fe=h("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/**
12
+ * @license lucide-react v0.462.0 - ISC
13
+ *
14
+ * This source code is licensed under the ISC license.
15
+ * See the LICENSE file in the root directory of this source tree.
16
+ */const De=h("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
17
+ * @license lucide-react v0.462.0 - ISC
18
+ *
19
+ * This source code is licensed under the ISC license.
20
+ * See the LICENSE file in the root directory of this source tree.
21
+ */const Le=h("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
22
+ * @license lucide-react v0.462.0 - ISC
23
+ *
24
+ * This source code is licensed under the ISC license.
25
+ * See the LICENSE file in the root directory of this source tree.
26
+ */const Ie=h("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
27
+ * @license lucide-react v0.462.0 - ISC
28
+ *
29
+ * This source code is licensed under the ISC license.
30
+ * See the LICENSE file in the root directory of this source tree.
31
+ */const qe=h("CirclePlay",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polygon",{points:"10 8 16 12 10 16 10 8",key:"1cimsy"}]]);/**
32
+ * @license lucide-react v0.462.0 - ISC
33
+ *
34
+ * This source code is licensed under the ISC license.
35
+ * See the LICENSE file in the root directory of this source tree.
36
+ */const $e=h("CircleSlash2",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M22 2 2 22",key:"y4kqgn"}]]);/**
37
+ * @license lucide-react v0.462.0 - ISC
38
+ *
39
+ * This source code is licensed under the ISC license.
40
+ * See the LICENSE file in the root directory of this source tree.
41
+ */const He=h("Clock3",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16.5 12",key:"1aq6pp"}]]);/**
42
+ * @license lucide-react v0.462.0 - ISC
43
+ *
44
+ * This source code is licensed under the ISC license.
45
+ * See the LICENSE file in the root directory of this source tree.
46
+ */const Q=h("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
47
+ * @license lucide-react v0.462.0 - ISC
48
+ *
49
+ * This source code is licensed under the ISC license.
50
+ * See the LICENSE file in the root directory of this source tree.
51
+ */const Ee=h("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/**
52
+ * @license lucide-react v0.462.0 - ISC
53
+ *
54
+ * This source code is licensed under the ISC license.
55
+ * See the LICENSE file in the root directory of this source tree.
56
+ */const U=h("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
57
+ * @license lucide-react v0.462.0 - ISC
58
+ *
59
+ * This source code is licensed under the ISC license.
60
+ * See the LICENSE file in the root directory of this source tree.
61
+ */const Pe=h("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);/**
62
+ * @license lucide-react v0.462.0 - ISC
63
+ *
64
+ * This source code is licensed under the ISC license.
65
+ * See the LICENSE file in the root directory of this source tree.
66
+ */const Je=h("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]),f=l.forwardRef(({className:s,...a},t)=>e.jsx("div",{ref:t,className:u("rounded-lg border bg-card text-card-foreground shadow-sm",s),...a}));f.displayName="Card";const b=l.forwardRef(({className:s,...a},t)=>e.jsx("div",{ref:t,className:u("flex flex-col space-y-1.5 p-6",s),...a}));b.displayName="CardHeader";const w=l.forwardRef(({className:s,...a},t)=>e.jsx("h3",{ref:t,className:u("text-2xl font-semibold leading-none tracking-tight",s),...a}));w.displayName="CardTitle";const F=l.forwardRef(({className:s,...a},t)=>e.jsx("p",{ref:t,className:u("text-sm text-muted-foreground",s),...a}));F.displayName="CardDescription";const g=l.forwardRef(({className:s,...a},t)=>e.jsx("div",{ref:t,className:u("p-6 pt-0",s),...a}));g.displayName="CardContent";const Be=l.forwardRef(({className:s,...a},t)=>e.jsx("div",{ref:t,className:u("flex items-center p-6 pt-0",s),...a}));Be.displayName="CardFooter";var L="Tabs",[Oe]=_e(L,[W]),X=W(),[ze,P]=Oe(L),Z=l.forwardRef((s,a)=>{const{__scopeTabs:t,value:i,onValueChange:o,defaultValue:d,orientation:c="horizontal",dir:r,activationMode:p="automatic",...j}=s,m=ye(r),[x,y]=ve({prop:i,onChange:o,defaultProp:d??"",caller:L});return e.jsx(ze,{scope:t,baseId:be(),value:x,onValueChange:y,orientation:c,dir:m,activationMode:p,children:e.jsx(D.div,{dir:m,"data-orientation":c,...j,ref:a})})});Z.displayName=L;var Y="TabsList",ee=l.forwardRef((s,a)=>{const{__scopeTabs:t,loop:i=!0,...o}=s,d=P(Y,t),c=X(t);return e.jsx(we,{asChild:!0,...c,orientation:d.orientation,dir:d.dir,loop:i,children:e.jsx(D.div,{role:"tablist","aria-orientation":d.orientation,...o,ref:a})})});ee.displayName=Y;var se="TabsTrigger",ae=l.forwardRef((s,a)=>{const{__scopeTabs:t,value:i,disabled:o=!1,...d}=s,c=P(se,t),r=X(t),p=ne(c.baseId,i),j=ie(c.baseId,i),m=i===c.value;return e.jsx(ke,{asChild:!0,...r,focusable:!o,active:m,children:e.jsx(D.button,{type:"button",role:"tab","aria-selected":m,"aria-controls":j,"data-state":m?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:p,...d,ref:a,onMouseDown:I(s.onMouseDown,x=>{!o&&x.button===0&&x.ctrlKey===!1?c.onValueChange(i):x.preventDefault()}),onKeyDown:I(s.onKeyDown,x=>{[" ","Enter"].includes(x.key)&&c.onValueChange(i)}),onFocus:I(s.onFocus,()=>{const x=c.activationMode!=="manual";!m&&!o&&x&&c.onValueChange(i)})})})});ae.displayName=se;var te="TabsContent",re=l.forwardRef((s,a)=>{const{__scopeTabs:t,value:i,forceMount:o,children:d,...c}=s,r=P(te,t),p=ne(r.baseId,i),j=ie(r.baseId,i),m=i===r.value,x=l.useRef(m);return l.useEffect(()=>{const y=requestAnimationFrame(()=>x.current=!1);return()=>cancelAnimationFrame(y)},[]),e.jsx(Ce,{present:o||m,children:({present:y})=>e.jsx(D.div,{"data-state":m?"active":"inactive","data-orientation":r.orientation,role:"tabpanel","aria-labelledby":p,hidden:!y,id:j,tabIndex:0,...c,ref:a,style:{...s.style,animationDuration:x.current?"0s":void 0},children:y&&d})})});re.displayName=te;function ne(s,a){return`${s}-trigger-${a}`}function ie(s,a){return`${s}-content-${a}`}var Ue=Z,ce=ee,le=ae,oe=re;const Ve=Ue,de=l.forwardRef(({className:s,...a},t)=>e.jsx(ce,{ref:t,className:u("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",s),...a}));de.displayName=ce.displayName;const q=l.forwardRef(({className:s,...a},t)=>e.jsx(le,{ref:t,className:u("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",s),...a}));q.displayName=le.displayName;const $=l.forwardRef(({className:s,...a},t)=>e.jsx(oe,{ref:t,className:u("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",s),...a}));$.displayName=oe.displayName;function T(s){if(!s)return"Never";const a=new Date(s);if(Number.isNaN(a.getTime()))return s;const t=Date.now()-a.getTime(),i=Math.floor(t/6e4),o=Math.floor(t/36e5),d=Math.floor(t/864e5);return i<1?"Just now":i<60?`${i}m ago`:o<24?`${o}h ago`:d<7?`${d}d ago`:a.toLocaleString("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}function Ge(s){return s==null?"N/A":s<60?`${s.toFixed(1)}s`:s<3600?`${(s/60).toFixed(1)}m`:`${(s/3600).toFixed(1)}h`}function me(s){return s.available?s.status==="completed"?s.conclusion??"completed":s.status??"unknown":"Unavailable"}function We(s){return s.replace(/_/g," ").replace(/\b\w/g,a=>a.toUpperCase())}const Ke={healthy:E,degraded:Je,broken:M,running:R,stuck:M,unknown:Ie};function Qe({status:s,isRunning:a}){const t=a?"running":s,i=Ke[t];return e.jsx(i,{className:`cron-status-icon cron-status--${t}${t==="running"?" animate-spin":""}`})}function V({icon:s,title:a,metrics:t}){return e.jsxs("div",{children:[e.jsxs("div",{className:"cron-section-heading",children:[e.jsx(s,{className:"h-4 w-4"}),e.jsx("h4",{children:a})]}),e.jsx("div",{className:"grid grid-cols-2 gap-3",children:Object.entries(t).map(([i,o])=>e.jsxs("div",{className:"cron-metric-card",children:[e.jsx("div",{className:"cron-label",children:We(i)}),e.jsx("div",{className:"text-lg font-semibold",children:typeof o=="number"?o.toLocaleString():o})]},i))})]})}function Xe({workflow:s}){return e.jsxs("div",{children:[e.jsxs("div",{className:"cron-section-heading",children:[e.jsx(A,{className:"h-4 w-4"}),e.jsx("h4",{children:"GitHub Actions"})]}),e.jsxs("div",{className:"cron-metric-card space-y-2 text-sm",children:[[["Workflow",s.workflow_file],["Run",s.run_id??"N/A"],["Status",me(s)],...s.updated_at?[["Updated",T(s.updated_at)]]:[]].map(([a,t])=>e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsx("span",{className:"cron-label",children:a}),e.jsx("span",{className:a==="Workflow"?"font-mono text-xs":void 0,children:t})]},a)),s.failed_jobs&&s.failed_jobs.length>0&&e.jsxs("div",{children:[e.jsx("div",{className:"cron-label mb-1",children:"Failed jobs"}),e.jsx("div",{className:"flex gap-2 flex-wrap",children:s.failed_jobs.map(a=>e.jsx(k,{variant:"outline",className:"cron-status--broken",children:a},a))})]}),s.job_conclusions&&Object.keys(s.job_conclusions).length>0&&e.jsxs("div",{children:[e.jsx("div",{className:"cron-label mb-1",children:"Job conclusions"}),e.jsx("div",{className:"flex gap-2 flex-wrap",children:Object.entries(s.job_conclusions).map(([a,t])=>e.jsxs(k,{variant:"outline",children:[a,": ",t??"running"]},a))})]}),(s.error||s.view_error)&&e.jsx("div",{className:"cron-message cron-message--error",children:s.error??s.view_error})]})]})}function Ze({job:s,expanded:a,onToggle:t}){const i=!!(s.work_metrics&&Object.keys(s.work_metrics).length),o=!!(s.db_metrics&&Object.keys(s.db_metrics).length),d=i||o||!!s.workflow_status;return e.jsxs("div",{className:"cron-job-card",children:[e.jsx("button",{type:"button",className:"cron-job-summary",onClick:t,"aria-expanded":a,children:e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"flex items-start gap-3 flex-1 min-w-0",children:[e.jsx(Qe,{status:s.status,isRunning:s.is_running}),e.jsxs("div",{className:"flex-1 min-w-0 text-left",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1 flex-wrap",children:[e.jsx("h3",{className:"font-semibold",children:s.display_name}),s.critical&&e.jsx(k,{variant:"outline",className:"text-[10px] uppercase tracking-wide",children:"Critical"}),s.lock_stale&&e.jsx(k,{variant:"outline",className:"cron-status--broken",children:"Stale lock"}),d&&(a?e.jsx(Le,{className:"h-4 w-4 cron-muted"}):e.jsx(De,{className:"h-4 w-4 cron-muted"}))]}),e.jsx("p",{className:"text-sm cron-muted mb-2",children:s.status_reason}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-4 gap-2 text-sm cron-muted",children:[e.jsxs("span",{className:"cron-fact",children:[e.jsx(Q,{}),"Log: ",T(s.last_run)]}),e.jsxs("span",{className:"cron-fact",children:[e.jsx(B,{}),"DB: ",T(s.last_db_write)]}),s.recent_write_count!=null&&e.jsxs("span",{className:"cron-fact",children:[e.jsx(Pe,{}),"Recent writes: ",s.recent_write_count.toLocaleString()]}),s.duration!=null&&e.jsxs("span",{className:"cron-fact",children:[e.jsx(A,{}),"Duration: ",Ge(s.duration)]}),s.schedule&&e.jsxs("span",{className:"cron-fact md:col-span-2",children:[e.jsx(Fe,{}),e.jsx("span",{className:"font-mono text-xs",children:s.schedule})]}),s.log_status&&e.jsxs("span",{className:"cron-fact",children:[e.jsx(U,{}),"Log status: ",s.log_status]}),s.workflow_status&&e.jsxs("span",{className:"cron-fact",children:[e.jsx(A,{}),"Actions: ",me(s.workflow_status)]})]}),s.work_summary&&e.jsx("div",{className:"cron-message",children:s.work_summary}),s.error&&e.jsxs("div",{className:"cron-message cron-message--error",children:[e.jsx("strong",{children:"Error: "}),s.error]}),s.diagnostics&&e.jsx("div",{className:"cron-message cron-message--warning",children:s.diagnostics})]})]}),e.jsx(k,{variant:"outline",className:`cron-status--${s.status}`,children:s.status})]})}),a&&d&&e.jsx("div",{className:"cron-job-details",children:e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.work_metrics&&i&&e.jsx(V,{icon:U,title:"Log Metrics",metrics:s.work_metrics}),s.db_metrics&&o&&e.jsx(V,{icon:B,title:"Database Metrics",metrics:s.db_metrics}),s.workflow_status&&e.jsx(Xe,{workflow:s.workflow_status})]})})]})}const ue=l.forwardRef(({className:s,...a},t)=>e.jsx("div",{className:"relative w-full overflow-auto",children:e.jsx("table",{ref:t,className:u("w-full caption-bottom text-sm",s),...a})}));ue.displayName="Table";const xe=l.forwardRef(({className:s,...a},t)=>e.jsx("thead",{ref:t,className:u("[&_tr]:border-b",s),...a}));xe.displayName="TableHeader";const he=l.forwardRef(({className:s,...a},t)=>e.jsx("tbody",{ref:t,className:u("[&_tr:last-child]:border-0",s),...a}));he.displayName="TableBody";const Ye=l.forwardRef(({className:s,...a},t)=>e.jsx("tfoot",{ref:t,className:u("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",s),...a}));Ye.displayName="TableFooter";const H=l.forwardRef(({className:s,...a},t)=>e.jsx("tr",{ref:t,className:u("border-b transition-colors data-[state=selected]:bg-muted hover:bg-muted/50",s),...a}));H.displayName="TableRow";const C=l.forwardRef(({className:s,...a},t)=>e.jsx("th",{ref:t,className:u("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",s),...a}));C.displayName="TableHead";const _=l.forwardRef(({className:s,...a},t)=>e.jsx("td",{ref:t,className:u("p-4 align-middle [&:has([role=checkbox])]:pr-0",s),...a}));_.displayName="TableCell";const es=l.forwardRef(({className:s,...a},t)=>e.jsx("caption",{ref:t,className:u("mt-4 text-sm text-muted-foreground",s),...a}));es.displayName="TableCaption";const ss={queued:"cron-status--unknown",dispatching:"cron-status--running",running:"cron-status--running",completed:"cron-status--healthy",failed:"cron-status--broken",canceled:"cron-status--unknown"},as={"add-evals":"Add evals","enrich-paper":"Enrich paper"},ts={queued:He,dispatching:R,running:qe,completed:E,failed:M,canceled:$e};function rs({status:s}){const a=ts[s];return e.jsxs(k,{variant:"outline",className:ss[s],children:[e.jsx(a,{className:`mr-1 h-3.5 w-3.5 ${s==="dispatching"?"animate-spin":""}`}),s]})}function ns(s){return s.error?s.error:s.report?s.report:s.status==="completed"&&s.applied_at?"Changes applied to the paper.":s.status==="completed"?"Completed without a recorded mutation.":null}function is({autoRefresh:s,refreshToken:a}){const{data:t,isLoading:i,isFetching:o,error:d}=K({queryKey:["codexPaperJobs",a],queryFn:()=>Me(100),refetchInterval:s?1e4:!1,retry:!1}),c=d&&typeof d=="object"&&"status"in d?d.status:void 0;return e.jsxs(f,{className:"mb-8",children:[e.jsx(b,{children:e.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[e.jsxs("div",{children:[e.jsx(w,{className:"text-xl",children:"Codex paper jobs"}),e.jsx(F,{children:"Durable queue and execution history for admin-triggered Hugging Face Jobs"})]}),o&&!i&&e.jsxs("span",{className:"flex items-center gap-2 text-xs cron-muted",children:[e.jsx(R,{className:"h-3.5 w-3.5 animate-spin"})," Syncing with Hugging Face"]})]})}),e.jsxs(g,{children:[i&&e.jsxs("div",{className:"flex items-center justify-center py-10 cron-muted",children:[e.jsx(R,{className:"mr-2 h-5 w-5 animate-spin"})," Loading paper jobs…"]}),d&&c!==404&&e.jsx("div",{className:"cron-message cron-message--error mb-4",children:d instanceof Error?d.message:"Could not load Codex paper jobs."}),c===404&&e.jsx("p",{className:"py-4 text-sm cron-muted",children:"Codex paper jobs are not enabled in this environment."}),t&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"mb-5 grid grid-cols-2 gap-3 sm:grid-cols-4 lg:grid-cols-7",children:[["queued","dispatching","running","completed","failed","canceled"].map(r=>e.jsxs("div",{className:"cron-metric-card",children:[e.jsx("div",{className:"cron-label capitalize",children:r}),e.jsx("div",{className:"mt-1 text-xl font-semibold",children:t.summary[r]})]},r)),e.jsxs("div",{className:"cron-metric-card",children:[e.jsx("div",{className:"cron-label",children:"Total"}),e.jsx("div",{className:"mt-1 text-xl font-semibold",children:t.summary.total})]})]}),t.jobs.length===0?e.jsx("p",{className:"py-8 text-center text-sm cron-muted",children:"No paper curation jobs have been submitted yet."}):e.jsxs(ue,{children:[e.jsx(xe,{children:e.jsxs(H,{children:[e.jsx(C,{children:"Status"}),e.jsx(C,{children:"Paper"}),e.jsx(C,{children:"Action"}),e.jsx(C,{children:"Requested"}),e.jsx(C,{children:"Execution"})]})}),e.jsx(he,{children:t.jobs.map(r=>{const p=ns(r);return e.jsxs(H,{children:[e.jsx(_,{className:"align-top",children:e.jsx(rs,{status:r.status})}),e.jsxs(_,{className:"min-w-[260px] align-top",children:[e.jsx(Te,{to:`/paper/${encodeURIComponent(r.paper_route)}`,className:"font-medium hover:underline",children:r.paper_title}),e.jsxs("div",{className:"mt-1 text-xs cron-muted",children:["Paper #",r.paper_id]})]}),e.jsxs(_,{className:"whitespace-nowrap align-top",children:[as[r.kind],r.applied_at&&e.jsxs("div",{className:"mt-1 flex items-center gap-1 text-xs cron-status--healthy",children:[e.jsx(E,{className:"h-3.5 w-3.5"})," Applied"]})]}),e.jsxs(_,{className:"whitespace-nowrap align-top",children:[e.jsx("div",{children:T(r.created_at)}),e.jsxs("div",{className:"mt-1 text-xs cron-muted",children:["@",r.requested_by]})]}),e.jsxs(_,{className:"max-w-[360px] align-top",children:[r.hf_job_url?e.jsxs("a",{href:r.hf_job_url,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1 hover:underline",children:["Hugging Face Job ",e.jsx(Ee,{className:"h-3.5 w-3.5"})]}):e.jsx("span",{className:"cron-muted",children:"Waiting to dispatch"}),p&&e.jsx("p",{className:`mt-2 line-clamp-3 text-xs ${r.error?"text-red-700":"cron-muted"}`,title:p,children:p})]})]},r.id)})})]}),e.jsxs("p",{className:"mt-4 text-xs cron-muted",children:["Showing the 100 most recent jobs · Queue totals include full history · Updated ",T(t.timestamp)]})]})]})]})}const G={hourly:"cron-status--running",daily:"cron-status--healthy",weekly:"cron-status--degraded"},hs=()=>{const[s,a]=l.useState(!0),[t,i]=l.useState(0),[o,d]=l.useState(new Set),{user:c}=Re(),{data:r,isLoading:p,isFetching:j,error:m,refetch:x}=K({queryKey:["cronStatus",c==null?void 0:c.username],queryFn:()=>Se.getCronStatus(),enabled:!!(c!=null&&c.is_admin),refetchInterval:s?3e4:!1,retry:!1}),pe=(m&&typeof m=="object"&&"status"in m?m.status:void 0)===401?"Unauthorized. Sign in with an allowlisted Hugging Face admin account.":m instanceof Error?m.message:void 0,fe=n=>{d(N=>{const v=new Set(N);return v.has(n)?v.delete(n):v.add(n),v})},ge=(r==null?void 0:r.jobs.filter(n=>n.critical))??[],S=((r==null?void 0:r.jobs.filter(n=>!n.critical))??[]).reduce((n,N)=>(n[N.category]||(n[N.category]=[]),n[N.category].push(N),n),{}),je=Object.keys(S).sort((n,N)=>{const v=["hourly","daily","weekly"];return v.indexOf(n)-v.indexOf(N)}),J=n=>e.jsx(Ze,{job:n,expanded:o.has(n.job_name),onToggle:()=>fe(n.job_name)},n.job_name),Ne=()=>{i(n=>n+1),x()};return e.jsx("div",{className:"cron-dashboard","data-shadcn":!0,children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8",children:[e.jsx("div",{className:"mb-8",children:e.jsxs("div",{className:"flex items-center justify-between gap-4 flex-wrap",children:[e.jsxs("div",{children:[e.jsxs("h1",{className:"text-3xl font-bold flex items-center gap-3",children:[e.jsx(A,{className:"h-8 w-8 cron-info-text"}),"Admin Dashboard"]}),e.jsx("p",{className:"mt-2 cron-muted",children:"Paper curation queue and operational health for scheduled jobs"})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs(O,{variant:"outline",size:"sm",onClick:()=>a(!s),className:s?"cron-status--running":"",children:[e.jsx(z,{className:`h-4 w-4 mr-2 ${s?"animate-spin":""}`}),"Auto-refresh ",s?"ON":"OFF"]}),e.jsxs(O,{variant:"outline",size:"sm",onClick:Ne,disabled:j,children:[e.jsx(z,{className:`h-4 w-4 mr-2 ${j?"animate-spin":""}`}),"Refresh"]})]})]})}),e.jsx(f,{className:"mb-6",children:e.jsx(g,{className:"pt-6",children:e.jsxs("p",{className:"text-sm cron-muted",children:["Signed in as ",e.jsxs("span",{className:"font-semibold",children:["@",c==null?void 0:c.username]}),". Health checks prefer database freshness over log completion so silent no-work failures surface as degraded or broken."]})})}),e.jsxs(Ve,{defaultValue:"critical-jobs",children:[e.jsxs(de,{className:"grid w-full grid-cols-2 sm:w-auto",children:[e.jsx(q,{value:"critical-jobs",children:"Critical Jobs"}),e.jsx(q,{value:"codex-paper-jobs",children:"Codex Paper Jobs"})]}),e.jsxs($,{value:"critical-jobs",className:"mt-6",children:[p&&e.jsxs("div",{className:"flex items-center justify-center py-12",children:[e.jsx(R,{className:"h-8 w-8 animate-spin cron-info-text"}),e.jsx("span",{className:"ml-3 cron-muted",children:"Loading CRON jobs status..."})]}),m&&e.jsx(f,{className:"cron-status--broken",children:e.jsx(g,{className:"pt-6",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(M,{className:"h-5 w-5"}),e.jsx("p",{children:pe??"Failed to load CRON jobs status. Please try again."})]})})}),r&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-4 mb-6",children:["healthy","degraded","broken","running","stuck","unknown"].map(n=>e.jsxs(f,{children:[e.jsx(b,{className:"pb-2",children:e.jsx(w,{className:"text-sm font-medium cron-muted capitalize",children:n})}),e.jsx(g,{children:e.jsx("div",{className:"text-2xl font-bold",children:r.summary[n]})})]},n))}),r.summary.critical_issues.length>0&&e.jsxs(f,{className:"mb-6 cron-status--broken",children:[e.jsx(b,{children:e.jsxs(w,{className:"flex items-center gap-2",children:[e.jsx(Ae,{className:"h-5 w-5"}),"Critical job issues"]})}),e.jsx(g,{children:e.jsx("ul",{className:"list-disc pl-5 space-y-1 text-sm",children:r.summary.critical_issues.map(n=>e.jsx("li",{children:n},n))})})]}),e.jsxs(f,{className:"mb-8",children:[e.jsx(b,{children:e.jsx(w,{className:"text-base",children:"What to check next"})}),e.jsxs(g,{children:[e.jsx("p",{className:"text-sm cron-muted",children:r.summary.what_to_check_next}),e.jsxs("p",{className:"mt-2 text-xs cron-muted flex items-center gap-2",children:[e.jsx(Q,{className:"h-4 w-4"}),"Last updated: ",T(r.timestamp)," · Health score:"," ",r.summary.health_score.toFixed(0),"%"]})]})]}),e.jsxs(f,{className:"mb-8",children:[e.jsxs(b,{children:[e.jsx(w,{className:"text-xl",children:"Critical jobs"}),e.jsx(F,{children:"Writers whose stale output breaks the live site"})]}),e.jsx(g,{className:"space-y-4",children:ge.map(J)})]}),e.jsx("div",{className:"space-y-6",children:je.map(n=>e.jsxs(f,{children:[e.jsx(b,{children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs(w,{className:"text-xl capitalize flex items-center gap-2",children:[e.jsx(k,{className:G[n]??G.hourly,children:n}),e.jsx("span",{children:"Supporting jobs"})]}),e.jsxs(F,{children:[S[n].length," job",S[n].length!==1?"s":""]})]})}),e.jsx(g,{className:"space-y-4",children:S[n].map(J)})]},n))})]})]}),e.jsx($,{value:"codex-paper-jobs",className:"mt-6",children:e.jsx(is,{autoRefresh:s,refreshToken:t})})]})]})})};export{hs as default};
assets/CronDashboard-tTE_5cac.js DELETED
@@ -1,66 +0,0 @@
1
- import{c as m,r as c,j as e,k as d,L as Z,V as Y,a as ee}from"./index-EtWJP9FK.js";import{u as z}from"./useQuery-CRN8HQuX.js";import{B as y,D as L,f as se}from"./codexAddEvals-D4idoo-w.js";import{B as D}from"./button-C_tMg-gR.js";import{C as T,a as F,R as H,S as ae}from"./shield-alert-jFMnBCT6.js";import{L as C}from"./loader-circle-CjqhkEcV.js";/**
2
- * @license lucide-react v0.462.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 R=m("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/**
7
- * @license lucide-react v0.462.0 - ISC
8
- *
9
- * This source code is licensed under the ISC license.
10
- * See the LICENSE file in the root directory of this source tree.
11
- */const te=m("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/**
12
- * @license lucide-react v0.462.0 - ISC
13
- *
14
- * This source code is licensed under the ISC license.
15
- * See the LICENSE file in the root directory of this source tree.
16
- */const re=m("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
17
- * @license lucide-react v0.462.0 - ISC
18
- *
19
- * This source code is licensed under the ISC license.
20
- * See the LICENSE file in the root directory of this source tree.
21
- */const ne=m("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
22
- * @license lucide-react v0.462.0 - ISC
23
- *
24
- * This source code is licensed under the ISC license.
25
- * See the LICENSE file in the root directory of this source tree.
26
- */const ce=m("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
27
- * @license lucide-react v0.462.0 - ISC
28
- *
29
- * This source code is licensed under the ISC license.
30
- * See the LICENSE file in the root directory of this source tree.
31
- */const ie=m("CirclePlay",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polygon",{points:"10 8 16 12 10 16 10 8",key:"1cimsy"}]]);/**
32
- * @license lucide-react v0.462.0 - ISC
33
- *
34
- * This source code is licensed under the ISC license.
35
- * See the LICENSE file in the root directory of this source tree.
36
- */const le=m("CircleSlash2",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M22 2 2 22",key:"y4kqgn"}]]);/**
37
- * @license lucide-react v0.462.0 - ISC
38
- *
39
- * This source code is licensed under the ISC license.
40
- * See the LICENSE file in the root directory of this source tree.
41
- */const de=m("Clock3",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16.5 12",key:"1aq6pp"}]]);/**
42
- * @license lucide-react v0.462.0 - ISC
43
- *
44
- * This source code is licensed under the ISC license.
45
- * See the LICENSE file in the root directory of this source tree.
46
- */const B=m("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
47
- * @license lucide-react v0.462.0 - ISC
48
- *
49
- * This source code is licensed under the ISC license.
50
- * See the LICENSE file in the root directory of this source tree.
51
- */const oe=m("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/**
52
- * @license lucide-react v0.462.0 - ISC
53
- *
54
- * This source code is licensed under the ISC license.
55
- * See the LICENSE file in the root directory of this source tree.
56
- */const J=m("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
57
- * @license lucide-react v0.462.0 - ISC
58
- *
59
- * This source code is licensed under the ISC license.
60
- * See the LICENSE file in the root directory of this source tree.
61
- */const me=m("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);/**
62
- * @license lucide-react v0.462.0 - ISC
63
- *
64
- * This source code is licensed under the ISC license.
65
- * See the LICENSE file in the root directory of this source tree.
66
- */const xe=m("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]),h=c.forwardRef(({className:s,...a},t)=>e.jsx("div",{ref:t,className:d("rounded-lg border bg-card text-card-foreground shadow-sm",s),...a}));h.displayName="Card";const j=c.forwardRef(({className:s,...a},t)=>e.jsx("div",{ref:t,className:d("flex flex-col space-y-1.5 p-6",s),...a}));j.displayName="CardHeader";const N=c.forwardRef(({className:s,...a},t)=>e.jsx("h3",{ref:t,className:d("text-2xl font-semibold leading-none tracking-tight",s),...a}));N.displayName="CardTitle";const S=c.forwardRef(({className:s,...a},t)=>e.jsx("p",{ref:t,className:d("text-sm text-muted-foreground",s),...a}));S.displayName="CardDescription";const u=c.forwardRef(({className:s,...a},t)=>e.jsx("div",{ref:t,className:d("p-6 pt-0",s),...a}));u.displayName="CardContent";const he=c.forwardRef(({className:s,...a},t)=>e.jsx("div",{ref:t,className:d("flex items-center p-6 pt-0",s),...a}));he.displayName="CardFooter";function k(s){if(!s)return"Never";const a=new Date(s);if(Number.isNaN(a.getTime()))return s;const t=Date.now()-a.getTime(),i=Math.floor(t/6e4),o=Math.floor(t/36e5),l=Math.floor(t/864e5);return i<1?"Just now":i<60?`${i}m ago`:o<24?`${o}h ago`:l<7?`${l}d ago`:a.toLocaleString("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}function ue(s){return s==null?"N/A":s<60?`${s.toFixed(1)}s`:s<3600?`${(s/60).toFixed(1)}m`:`${(s/3600).toFixed(1)}h`}function E(s){return s.available?s.status==="completed"?s.conclusion??"completed":s.status??"unknown":"Unavailable"}function pe(s){return s.replace(/_/g," ").replace(/\b\w/g,a=>a.toUpperCase())}const fe={healthy:F,degraded:xe,broken:T,running:C,stuck:T,unknown:ce};function ge({status:s,isRunning:a}){const t=a?"running":s,i=fe[t];return e.jsx(i,{className:`cron-status-icon cron-status--${t}${t==="running"?" animate-spin":""}`})}function $({icon:s,title:a,metrics:t}){return e.jsxs("div",{children:[e.jsxs("div",{className:"cron-section-heading",children:[e.jsx(s,{className:"h-4 w-4"}),e.jsx("h4",{children:a})]}),e.jsx("div",{className:"grid grid-cols-2 gap-3",children:Object.entries(t).map(([i,o])=>e.jsxs("div",{className:"cron-metric-card",children:[e.jsx("div",{className:"cron-label",children:pe(i)}),e.jsx("div",{className:"text-lg font-semibold",children:typeof o=="number"?o.toLocaleString():o})]},i))})]})}function je({workflow:s}){return e.jsxs("div",{children:[e.jsxs("div",{className:"cron-section-heading",children:[e.jsx(R,{className:"h-4 w-4"}),e.jsx("h4",{children:"GitHub Actions"})]}),e.jsxs("div",{className:"cron-metric-card space-y-2 text-sm",children:[[["Workflow",s.workflow_file],["Run",s.run_id??"N/A"],["Status",E(s)],...s.updated_at?[["Updated",k(s.updated_at)]]:[]].map(([a,t])=>e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsx("span",{className:"cron-label",children:a}),e.jsx("span",{className:a==="Workflow"?"font-mono text-xs":void 0,children:t})]},a)),s.failed_jobs&&s.failed_jobs.length>0&&e.jsxs("div",{children:[e.jsx("div",{className:"cron-label mb-1",children:"Failed jobs"}),e.jsx("div",{className:"flex gap-2 flex-wrap",children:s.failed_jobs.map(a=>e.jsx(y,{variant:"outline",className:"cron-status--broken",children:a},a))})]}),s.job_conclusions&&Object.keys(s.job_conclusions).length>0&&e.jsxs("div",{children:[e.jsx("div",{className:"cron-label mb-1",children:"Job conclusions"}),e.jsx("div",{className:"flex gap-2 flex-wrap",children:Object.entries(s.job_conclusions).map(([a,t])=>e.jsxs(y,{variant:"outline",children:[a,": ",t??"running"]},a))})]}),(s.error||s.view_error)&&e.jsx("div",{className:"cron-message cron-message--error",children:s.error??s.view_error})]})]})}function Ne({job:s,expanded:a,onToggle:t}){const i=!!(s.work_metrics&&Object.keys(s.work_metrics).length),o=!!(s.db_metrics&&Object.keys(s.db_metrics).length),l=i||o||!!s.workflow_status;return e.jsxs("div",{className:"cron-job-card",children:[e.jsx("button",{type:"button",className:"cron-job-summary",onClick:t,"aria-expanded":a,children:e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"flex items-start gap-3 flex-1 min-w-0",children:[e.jsx(ge,{status:s.status,isRunning:s.is_running}),e.jsxs("div",{className:"flex-1 min-w-0 text-left",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1 flex-wrap",children:[e.jsx("h3",{className:"font-semibold",children:s.display_name}),s.critical&&e.jsx(y,{variant:"outline",className:"text-[10px] uppercase tracking-wide",children:"Critical"}),s.lock_stale&&e.jsx(y,{variant:"outline",className:"cron-status--broken",children:"Stale lock"}),l&&(a?e.jsx(ne,{className:"h-4 w-4 cron-muted"}):e.jsx(re,{className:"h-4 w-4 cron-muted"}))]}),e.jsx("p",{className:"text-sm cron-muted mb-2",children:s.status_reason}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-4 gap-2 text-sm cron-muted",children:[e.jsxs("span",{className:"cron-fact",children:[e.jsx(B,{}),"Log: ",k(s.last_run)]}),e.jsxs("span",{className:"cron-fact",children:[e.jsx(L,{}),"DB: ",k(s.last_db_write)]}),s.recent_write_count!=null&&e.jsxs("span",{className:"cron-fact",children:[e.jsx(me,{}),"Recent writes: ",s.recent_write_count.toLocaleString()]}),s.duration!=null&&e.jsxs("span",{className:"cron-fact",children:[e.jsx(R,{}),"Duration: ",ue(s.duration)]}),s.schedule&&e.jsxs("span",{className:"cron-fact md:col-span-2",children:[e.jsx(te,{}),e.jsx("span",{className:"font-mono text-xs",children:s.schedule})]}),s.log_status&&e.jsxs("span",{className:"cron-fact",children:[e.jsx(J,{}),"Log status: ",s.log_status]}),s.workflow_status&&e.jsxs("span",{className:"cron-fact",children:[e.jsx(R,{}),"Actions: ",E(s.workflow_status)]})]}),s.work_summary&&e.jsx("div",{className:"cron-message",children:s.work_summary}),s.error&&e.jsxs("div",{className:"cron-message cron-message--error",children:[e.jsx("strong",{children:"Error: "}),s.error]}),s.diagnostics&&e.jsx("div",{className:"cron-message cron-message--warning",children:s.diagnostics})]})]}),e.jsx(y,{variant:"outline",className:`cron-status--${s.status}`,children:s.status})]})}),a&&l&&e.jsx("div",{className:"cron-job-details",children:e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.work_metrics&&i&&e.jsx($,{icon:J,title:"Log Metrics",metrics:s.work_metrics}),s.db_metrics&&o&&e.jsx($,{icon:L,title:"Database Metrics",metrics:s.db_metrics}),s.workflow_status&&e.jsx(je,{workflow:s.workflow_status})]})})]})}const U=c.forwardRef(({className:s,...a},t)=>e.jsx("div",{className:"relative w-full overflow-auto",children:e.jsx("table",{ref:t,className:d("w-full caption-bottom text-sm",s),...a})}));U.displayName="Table";const I=c.forwardRef(({className:s,...a},t)=>e.jsx("thead",{ref:t,className:d("[&_tr]:border-b",s),...a}));I.displayName="TableHeader";const P=c.forwardRef(({className:s,...a},t)=>e.jsx("tbody",{ref:t,className:d("[&_tr:last-child]:border-0",s),...a}));P.displayName="TableBody";const ye=c.forwardRef(({className:s,...a},t)=>e.jsx("tfoot",{ref:t,className:d("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",s),...a}));ye.displayName="TableFooter";const M=c.forwardRef(({className:s,...a},t)=>e.jsx("tr",{ref:t,className:d("border-b transition-colors data-[state=selected]:bg-muted hover:bg-muted/50",s),...a}));M.displayName="TableRow";const v=c.forwardRef(({className:s,...a},t)=>e.jsx("th",{ref:t,className:d("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",s),...a}));v.displayName="TableHead";const b=c.forwardRef(({className:s,...a},t)=>e.jsx("td",{ref:t,className:d("p-4 align-middle [&:has([role=checkbox])]:pr-0",s),...a}));b.displayName="TableCell";const ve=c.forwardRef(({className:s,...a},t)=>e.jsx("caption",{ref:t,className:d("mt-4 text-sm text-muted-foreground",s),...a}));ve.displayName="TableCaption";const be={queued:"cron-status--unknown",dispatching:"cron-status--running",running:"cron-status--running",completed:"cron-status--healthy",failed:"cron-status--broken",canceled:"cron-status--unknown"},ke={"add-evals":"Add evals","enrich-paper":"Enrich paper"},we={queued:de,dispatching:C,running:ie,completed:F,failed:T,canceled:le};function Ce({status:s}){const a=we[s];return e.jsxs(y,{variant:"outline",className:be[s],children:[e.jsx(a,{className:`mr-1 h-3.5 w-3.5 ${s==="dispatching"?"animate-spin":""}`}),s]})}function _e(s){return s.error?s.error:s.report?s.report:s.status==="completed"&&s.applied_at?"Changes applied to the paper.":s.status==="completed"?"Completed without a recorded mutation.":null}function Te({autoRefresh:s,refreshToken:a}){const{data:t,isLoading:i,isFetching:o,error:l}=z({queryKey:["codexPaperJobs",a],queryFn:()=>se(100),refetchInterval:s?1e4:!1,retry:!1}),x=l&&typeof l=="object"&&"status"in l?l.status:void 0;return e.jsxs(h,{className:"mb-8",children:[e.jsx(j,{children:e.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[e.jsxs("div",{children:[e.jsx(N,{className:"text-xl",children:"Codex paper jobs"}),e.jsx(S,{children:"Durable queue and execution history for admin-triggered Hugging Face Jobs"})]}),o&&!i&&e.jsxs("span",{className:"flex items-center gap-2 text-xs cron-muted",children:[e.jsx(C,{className:"h-3.5 w-3.5 animate-spin"})," Syncing with Hugging Face"]})]})}),e.jsxs(u,{children:[i&&e.jsxs("div",{className:"flex items-center justify-center py-10 cron-muted",children:[e.jsx(C,{className:"mr-2 h-5 w-5 animate-spin"})," Loading paper jobs…"]}),l&&x!==404&&e.jsx("div",{className:"cron-message cron-message--error mb-4",children:l instanceof Error?l.message:"Could not load Codex paper jobs."}),x===404&&e.jsx("p",{className:"py-4 text-sm cron-muted",children:"Codex paper jobs are not enabled in this environment."}),t&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"mb-5 grid grid-cols-2 gap-3 sm:grid-cols-4 lg:grid-cols-7",children:[["queued","dispatching","running","completed","failed","canceled"].map(n=>e.jsxs("div",{className:"cron-metric-card",children:[e.jsx("div",{className:"cron-label capitalize",children:n}),e.jsx("div",{className:"mt-1 text-xl font-semibold",children:t.summary[n]})]},n)),e.jsxs("div",{className:"cron-metric-card",children:[e.jsx("div",{className:"cron-label",children:"Total"}),e.jsx("div",{className:"mt-1 text-xl font-semibold",children:t.summary.total})]})]}),t.jobs.length===0?e.jsx("p",{className:"py-8 text-center text-sm cron-muted",children:"No paper curation jobs have been submitted yet."}):e.jsxs(U,{children:[e.jsx(I,{children:e.jsxs(M,{children:[e.jsx(v,{children:"Status"}),e.jsx(v,{children:"Paper"}),e.jsx(v,{children:"Action"}),e.jsx(v,{children:"Requested"}),e.jsx(v,{children:"Execution"})]})}),e.jsx(P,{children:t.jobs.map(n=>{const w=_e(n);return e.jsxs(M,{children:[e.jsx(b,{className:"align-top",children:e.jsx(Ce,{status:n.status})}),e.jsxs(b,{className:"min-w-[260px] align-top",children:[e.jsx(Z,{to:`/paper/${encodeURIComponent(n.paper_route)}`,className:"font-medium hover:underline",children:n.paper_title}),e.jsxs("div",{className:"mt-1 text-xs cron-muted",children:["Paper #",n.paper_id]})]}),e.jsxs(b,{className:"whitespace-nowrap align-top",children:[ke[n.kind],n.applied_at&&e.jsxs("div",{className:"mt-1 flex items-center gap-1 text-xs cron-status--healthy",children:[e.jsx(F,{className:"h-3.5 w-3.5"})," Applied"]})]}),e.jsxs(b,{className:"whitespace-nowrap align-top",children:[e.jsx("div",{children:k(n.created_at)}),e.jsxs("div",{className:"mt-1 text-xs cron-muted",children:["@",n.requested_by]})]}),e.jsxs(b,{className:"max-w-[360px] align-top",children:[n.hf_job_url?e.jsxs("a",{href:n.hf_job_url,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1 hover:underline",children:["Hugging Face Job ",e.jsx(oe,{className:"h-3.5 w-3.5"})]}):e.jsx("span",{className:"cron-muted",children:"Waiting to dispatch"}),w&&e.jsx("p",{className:`mt-2 line-clamp-3 text-xs ${n.error?"text-red-700":"cron-muted"}`,title:w,children:w})]})]},n.id)})})]}),e.jsxs("p",{className:"mt-4 text-xs cron-muted",children:["Showing the 100 most recent jobs · Queue totals include full history · Updated ",k(t.timestamp)]})]})]})]})}const O={hourly:"cron-status--running",daily:"cron-status--healthy",weekly:"cron-status--degraded"},He=()=>{const[s,a]=c.useState(!0),[t,i]=c.useState(0),[o,l]=c.useState(new Set),{user:x}=Y(),{data:n,isLoading:w,isFetching:q,error:f,refetch:W}=z({queryKey:["cronStatus",x==null?void 0:x.username],queryFn:()=>ee.getCronStatus(),enabled:!!(x!=null&&x.is_admin),refetchInterval:s?3e4:!1,retry:!1}),Q=(f&&typeof f=="object"&&"status"in f?f.status:void 0)===401?"Unauthorized. Sign in with an allowlisted Hugging Face admin account.":f instanceof Error?f.message:void 0,V=r=>{l(p=>{const g=new Set(p);return g.has(r)?g.delete(r):g.add(r),g})},G=(n==null?void 0:n.jobs.filter(r=>r.critical))??[],_=((n==null?void 0:n.jobs.filter(r=>!r.critical))??[]).reduce((r,p)=>(r[p.category]||(r[p.category]=[]),r[p.category].push(p),r),{}),K=Object.keys(_).sort((r,p)=>{const g=["hourly","daily","weekly"];return g.indexOf(r)-g.indexOf(p)}),A=r=>e.jsx(Ne,{job:r,expanded:o.has(r.job_name),onToggle:()=>V(r.job_name)},r.job_name),X=()=>{i(r=>r+1),W()};return e.jsx("div",{className:"cron-dashboard","data-shadcn":!0,children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8",children:[e.jsx("div",{className:"mb-8",children:e.jsxs("div",{className:"flex items-center justify-between gap-4 flex-wrap",children:[e.jsxs("div",{children:[e.jsxs("h1",{className:"text-3xl font-bold flex items-center gap-3",children:[e.jsx(R,{className:"h-8 w-8 cron-info-text"}),"Admin Dashboard"]}),e.jsx("p",{className:"mt-2 cron-muted",children:"Paper curation queue and operational health for scheduled jobs"})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs(D,{variant:"outline",size:"sm",onClick:()=>a(!s),className:s?"cron-status--running":"",children:[e.jsx(H,{className:`h-4 w-4 mr-2 ${s?"animate-spin":""}`}),"Auto-refresh ",s?"ON":"OFF"]}),e.jsxs(D,{variant:"outline",size:"sm",onClick:X,disabled:q,children:[e.jsx(H,{className:`h-4 w-4 mr-2 ${q?"animate-spin":""}`}),"Refresh"]})]})]})}),e.jsx(h,{className:"mb-6",children:e.jsx(u,{className:"pt-6",children:e.jsxs("p",{className:"text-sm cron-muted",children:["Signed in as ",e.jsxs("span",{className:"font-semibold",children:["@",x==null?void 0:x.username]}),". Health checks prefer database freshness over log completion so silent no-work failures surface as degraded or broken."]})})}),e.jsx(Te,{autoRefresh:s,refreshToken:t}),w&&e.jsxs("div",{className:"flex items-center justify-center py-12",children:[e.jsx(C,{className:"h-8 w-8 animate-spin cron-info-text"}),e.jsx("span",{className:"ml-3 cron-muted",children:"Loading CRON jobs status..."})]}),f&&e.jsx(h,{className:"cron-status--broken",children:e.jsx(u,{className:"pt-6",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(T,{className:"h-5 w-5"}),e.jsx("p",{children:Q??"Failed to load CRON jobs status. Please try again."})]})})}),n&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-4 mb-6",children:["healthy","degraded","broken","running","stuck","unknown"].map(r=>e.jsxs(h,{children:[e.jsx(j,{className:"pb-2",children:e.jsx(N,{className:"text-sm font-medium cron-muted capitalize",children:r})}),e.jsx(u,{children:e.jsx("div",{className:"text-2xl font-bold",children:n.summary[r]})})]},r))}),n.summary.critical_issues.length>0&&e.jsxs(h,{className:"mb-6 cron-status--broken",children:[e.jsx(j,{children:e.jsxs(N,{className:"flex items-center gap-2",children:[e.jsx(ae,{className:"h-5 w-5"}),"Critical job issues"]})}),e.jsx(u,{children:e.jsx("ul",{className:"list-disc pl-5 space-y-1 text-sm",children:n.summary.critical_issues.map(r=>e.jsx("li",{children:r},r))})})]}),e.jsxs(h,{className:"mb-8",children:[e.jsx(j,{children:e.jsx(N,{className:"text-base",children:"What to check next"})}),e.jsxs(u,{children:[e.jsx("p",{className:"text-sm cron-muted",children:n.summary.what_to_check_next}),e.jsxs("p",{className:"mt-2 text-xs cron-muted flex items-center gap-2",children:[e.jsx(B,{className:"h-4 w-4"}),"Last updated: ",k(n.timestamp)," · Health score:"," ",n.summary.health_score.toFixed(0),"%"]})]})]}),e.jsxs(h,{className:"mb-8",children:[e.jsxs(j,{children:[e.jsx(N,{className:"text-xl",children:"Critical jobs"}),e.jsx(S,{children:"Writers whose stale output breaks the live site"})]}),e.jsx(u,{className:"space-y-4",children:G.map(A)})]}),e.jsx("div",{className:"space-y-6",children:K.map(r=>e.jsxs(h,{children:[e.jsx(j,{children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs(N,{className:"text-xl capitalize flex items-center gap-2",children:[e.jsx(y,{className:O[r]??O.hourly,children:r}),e.jsx("span",{children:"Supporting jobs"})]}),e.jsxs(S,{children:[_[r].length," job",_[r].length!==1?"s":""]})]})}),e.jsx(u,{className:"space-y-4",children:_[r].map(A)})]},r))})]})]})})};export{He as default};
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/ExternalSourceEvalBadge-BuyUlLpR.js DELETED
@@ -1 +0,0 @@
1
- import{r as a,d as W,j as r,R as B,B as $,b as z,f as d,D as N,P as j,E as K,i as G,e as U,J,K as V,M as Y,k as q,L as Q}from"./index-EtWJP9FK.js";var S,P="HoverCard",[H]=G(P,[N]),E=N(),[X,R]=H(P),D=e=>{const{__scopeHoverCard:t,children:n,open:i,defaultOpen:s,onOpenChange:c,openDelay:f=700,closeDelay:v=300}=e,l=E(t),h=a.useRef(0),u=a.useRef(0),m=a.useRef(!1),p=a.useRef(!1),[C,o]=W({prop:i,defaultProp:s??!1,onChange:c,caller:P}),x=a.useCallback(()=>{clearTimeout(u.current),h.current=window.setTimeout(()=>o(!0),f)},[f,o]),g=a.useCallback(()=>{clearTimeout(h.current),!m.current&&!p.current&&(u.current=window.setTimeout(()=>o(!1),v))},[v,o]),I=a.useCallback(()=>o(!1),[o]);return a.useEffect(()=>()=>{clearTimeout(h.current),clearTimeout(u.current)},[]),r.jsx(X,{scope:t,open:C,onOpenChange:o,onOpen:x,onClose:g,onDismiss:I,hasSelectionRef:m,isPointerDownOnContentRef:p,children:r.jsx(B,{...l,children:n})})};D.displayName=P;var O="HoverCardTrigger",_=a.forwardRef((e,t)=>{const{__scopeHoverCard:n,...i}=e,s=R(O,n),c=E(n);return r.jsx($,{asChild:!0,...c,children:r.jsx(z.a,{"data-state":s.open?"open":"closed",...i,ref:t,onPointerEnter:d(e.onPointerEnter,w(s.onOpen)),onPointerLeave:d(e.onPointerLeave,w(s.onClose)),onFocus:d(e.onFocus,s.onOpen),onBlur:d(e.onBlur,s.onClose),onTouchStart:d(e.onTouchStart,f=>f.preventDefault())})})});_.displayName=O;var y="HoverCardPortal",[Z,ee]=H(y,{forceMount:void 0}),L=e=>{const{__scopeHoverCard:t,forceMount:n,children:i,container:s}=e,c=R(y,t);return r.jsx(Z,{scope:t,forceMount:n,children:r.jsx(j,{present:n||c.open,children:r.jsx(K,{asChild:!0,container:s,children:i})})})};L.displayName=y;var b="HoverCardContent",A=a.forwardRef((e,t)=>{const n=ee(b,e.__scopeHoverCard),{forceMount:i=n.forceMount,...s}=e,c=R(b,e.__scopeHoverCard);return r.jsx(j,{present:i||c.open,children:r.jsx(te,{"data-state":c.open?"open":"closed",...s,onPointerEnter:d(e.onPointerEnter,w(c.onOpen)),onPointerLeave:d(e.onPointerLeave,w(c.onClose)),ref:t})})});A.displayName=b;var te=a.forwardRef((e,t)=>{const{__scopeHoverCard:n,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:c,onInteractOutside:f,...v}=e,l=R(b,n),h=E(n),u=a.useRef(null),m=U(t,u),[p,C]=a.useState(!1);return a.useEffect(()=>{if(p){const o=document.body;return S=o.style.userSelect||o.style.webkitUserSelect,o.style.userSelect="none",o.style.webkitUserSelect="none",()=>{o.style.userSelect=S,o.style.webkitUserSelect=S}}},[p]),a.useEffect(()=>{if(u.current){const o=()=>{C(!1),l.isPointerDownOnContentRef.current=!1,setTimeout(()=>{var g;((g=document.getSelection())==null?void 0:g.toString())!==""&&(l.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",o),()=>{document.removeEventListener("pointerup",o),l.hasSelectionRef.current=!1,l.isPointerDownOnContentRef.current=!1}}},[l.isPointerDownOnContentRef,l.hasSelectionRef]),a.useEffect(()=>{u.current&&ne(u.current).forEach(x=>x.setAttribute("tabindex","-1"))}),r.jsx(J,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:f,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:d(c,o=>{o.preventDefault()}),onDismiss:l.onDismiss,children:r.jsx(V,{...h,...v,onPointerDown:d(v.onPointerDown,o=>{o.currentTarget.contains(o.target)&&C(!0),l.hasSelectionRef.current=!1,l.isPointerDownOnContentRef.current=!0}),ref:m,style:{...v.style,userSelect:p?"text":void 0,WebkitUserSelect:p?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})}),re="HoverCardArrow",oe=a.forwardRef((e,t)=>{const{__scopeHoverCard:n,...i}=e,s=E(n);return r.jsx(Y,{...s,...i,ref:t})});oe.displayName=re;function w(e){return t=>t.pointerType==="touch"?void 0:e()}function ne(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;n.nextNode();)t.push(n.currentNode);return t}var ae=D,se=_,ie=L,k=A;const F=ae,M=se,T=a.forwardRef(({className:e,align:t="center",sideOffset:n=4,...i},s)=>r.jsx(ie,{children:r.jsx(k,{ref:s,align:t,sideOffset:n,className:q("z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...i})}));T.displayName=k.displayName;const de=()=>r.jsxs(F,{openDelay:120,closeDelay:120,children:[r.jsx(M,{asChild:!0,children:r.jsx("button",{type:"button",className:"bm-closed-source-tag","aria-label":"Closed-source model",children:"closed"})}),r.jsxs(T,{side:"top",align:"start",className:"w-auto max-w-[260px] p-3 text-sm leading-snug",children:["This is an evaluation of a closed-source model. You can disable viewing these in your"," ",r.jsx(Q,{to:"/settings",className:"closed-eval-tooltip-link",children:"settings"}),"."]})]});function ce(e){if(!e)return"Evaluation sourced outside this paper";const t=e.toLowerCase();if(t.includes("open-asr-leaderboard"))return"Open ASR Leaderboard";if(t.includes("arcprize.org"))return"ARC Prize Leaderboard";if(t.includes("frontierswe.com"))return"FrontierSWE";if(t.includes("deepswe.datacurve.ai"))return"DeepSWE";try{const n=new URL(e,"https://paperswithcode.co");return n.pathname.startsWith("/paper/")?"Source paper":n.hostname.replace(/^www\./,"")}catch{return e}}const ue=({sourceUrl:e})=>{const t=ce(e);return r.jsxs(F,{openDelay:120,closeDelay:120,children:[r.jsx(M,{asChild:!0,children:r.jsx("button",{type:"button",className:"bm-external-source-tag","aria-label":`Externally sourced evaluation: ${t}`,children:"External"})}),r.jsxs(T,{side:"top",align:"start",className:"w-auto max-w-[280px] p-3 text-sm leading-snug",children:["This score was sourced outside this paper.",e?r.jsxs(r.Fragment,{children:[" ",r.jsx("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:"external-eval-tooltip-link",children:t}),"."]}):r.jsxs(r.Fragment,{children:[" ",t,"."]})]})]})};export{de as C,ue as E};
 
 
assets/ExternalSourceEvalBadge-CTYhU1gt.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{j as e,L as l}from"./index-CKAClQ2e.js";import{H as t,a as n,b as o}from"./hover-card-DZ5zXJ4P.js";const u=()=>e.jsxs(t,{openDelay:120,closeDelay:120,children:[e.jsx(n,{asChild:!0,children:e.jsx("button",{type:"button",className:"bm-closed-source-tag","aria-label":"Closed-source model",children:"closed"})}),e.jsxs(o,{side:"top",align:"start",className:"w-auto max-w-[260px] p-3 text-sm leading-snug",children:["This is an evaluation of a closed-source model. You can disable viewing these in your"," ",e.jsx(l,{to:"/settings",className:"closed-eval-tooltip-link",children:"settings"}),"."]})]});function i(a){if(!a)return"Evaluation sourced outside this paper";const r=a.toLowerCase();if(r.includes("open-asr-leaderboard"))return"Open ASR Leaderboard";if(r.includes("arcprize.org"))return"ARC Prize Leaderboard";if(r.includes("frontierswe.com"))return"FrontierSWE";if(r.includes("deepswe.datacurve.ai"))return"DeepSWE";try{const s=new URL(a,"https://paperswithcode.co");return s.pathname.startsWith("/paper/")?"Source paper":s.hostname.replace(/^www\./,"")}catch{return a}}const p=({sourceUrl:a})=>{const r=i(a);return e.jsxs(t,{openDelay:120,closeDelay:120,children:[e.jsx(n,{asChild:!0,children:e.jsx("button",{type:"button",className:"bm-external-source-tag","aria-label":`Externally sourced evaluation: ${r}`,children:"External"})}),e.jsxs(o,{side:"top",align:"start",className:"w-auto max-w-[280px] p-3 text-sm leading-snug",children:["This score was sourced outside this paper.",a?e.jsxs(e.Fragment,{children:[" ",e.jsx("a",{href:a,target:"_blank",rel:"noopener noreferrer",className:"external-eval-tooltip-link",children:r}),"."]}):e.jsxs(e.Fragment,{children:[" ",r,"."]})]})]})};export{u as C,p as E};
assets/FeedView-BN3Iwb4n.js DELETED
@@ -1 +0,0 @@
1
- import{u as S,r as N,j as e,L as d,a as y}from"./index-EtWJP9FK.js";import{P as I}from"./components-Bs7x-Lbj.js";import{t as L,d as b}from"./transform-BnMt6tRc.js";import{u as R}from"./usePapers-Bf6VWYSD.js";import{u as A}from"./useIntersectionObserver-CuGdoJlB.js";import{P as D}from"./usePeriodFilter-BLumPhqb.js";import{S as t}from"./skeleton-DMjGQB3S.js";import{A as E,a as M}from"./alert-BIanajMT.js";import{u as T}from"./useQuery-CRN8HQuX.js";import"./LatexTitle-ZHDCAKfZ.js";import"./katex.min-BSBacQyE.js";import"./useInfiniteQuery-DMyrN_84.js";const C=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],W={Today:"today","This Week":"week","This Month":"month","All Time":"all_time"},q={today:"Today",week:"This Week",month:"This Month",all_time:"All Time"},$=i=>i==="trending"||i==="date_published"||i==="citation_count"?i:"trending",B=i=>i==="today"||i==="week"||i==="month"||i==="all_time"?i:"all_time",se=()=>{var x,g,u,j,f;const[i,o]=S(),c=$(i.get("order_by")),m=B(i.get("time")),v=q[m],_=s=>{const a=new URLSearchParams(i);a.set("order_by",s),o(a)},w=s=>{const a=new URLSearchParams(i);a.set("time",W[s]),o(a)},h=T({queryKey:["top-tasks-sidebar"],queryFn:()=>y.getTopTasks({limit:8}),staleTime:10*60*1e3}),n=T({queryKey:["trending-tasks-sidebar"],queryFn:()=>y.getTrendingTasks({limit:8,level:0}),staleTime:10*60*1e3}),r=R({page_size:30,order_by:c,order_dir:"desc",time:m,include_resources:!0}),l=N.useMemo(()=>{var a;return(((a=r.data)==null?void 0:a.pages.flatMap(O=>O.results))||[]).map(L)},[r.data]),{targetRef:P,isIntersecting:p}=A({rootMargin:"400px"});N.useEffect(()=>{p&&r.hasNextPage&&!r.isFetchingNextPage&&r.fetchNextPage()},[p,r.hasNextPage,r.isFetchingNextPage]);const k=r.isLoading,F=r.error;return e.jsxs("div",{className:"page",children:[e.jsxs("div",{className:"feed-header",children:[e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["Trending ",e.jsx("em",{children:"Research"})]}),e.jsx("div",{className:"feed-subtitle",children:"Curated daily from arXiv and Hugging Face"})]}),e.jsx("div",{style:{display:"flex",gap:16,alignItems:"center",flexWrap:"wrap"},children:e.jsx("div",{className:"period-switch",children:D.map(s=>e.jsx("button",{className:`period-btn ${v===s?"active":""}`,onClick:()=>w(s),children:s},s))})})]}),e.jsxs("div",{className:"layout-with-sidebar",children:[e.jsxs("aside",{className:"sidebar",children:[e.jsxs("div",{className:"sidebar-section",children:[e.jsx("div",{className:"sidebar-label",children:"Top Domains"}),h.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((s,a)=>e.jsx(t,{className:"h-5 w-full"},a))}),(x=h.data)==null?void 0:x.map(s=>e.jsxs(d,{to:`/tasks/${s.slug}`,className:"sidebar-link",children:[b(s.name,s.slug),s.paper_count!=null&&e.jsx("span",{className:"count",children:s.paper_count})]},s.id)),e.jsx(d,{to:"/tasks",className:"sidebar-link",style:{marginTop:8,fontStyle:"italic"},children:"all domains →"})]}),e.jsxs("div",{className:"sidebar-section",children:[e.jsx("div",{className:"sidebar-label",children:"Trending Domains"}),n.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((s,a)=>e.jsx(t,{className:"h-5 w-full"},a))}),((u=(g=n.data)==null?void 0:g.results)==null?void 0:u.length)===0&&!n.isLoading&&e.jsx("div",{style:{fontSize:12,color:"var(--ink-faint)"},children:"No domains gaining momentum right now."}),(f=(j=n.data)==null?void 0:j.results)==null?void 0:f.map(s=>e.jsxs(d,{to:`/tasks/${s.slug}`,className:"sidebar-link",children:[b(s.name,s.slug),e.jsxs("span",{className:"count",children:[s.share_lift.toFixed(1),"x"]})]},s.id))]})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"sort-bar",children:[e.jsx("div",{className:"sort-options",children:C.map(([s,a])=>e.jsx("button",{className:`sort-btn ${c===s?"active":""}`,onClick:()=>_(s),children:a},s))}),e.jsxs("div",{className:"results-count",children:[l.length," papers"]})]}),F&&e.jsx(E,{variant:"destructive",className:"mb-4",children:e.jsx(M,{children:"Failed to load papers. Please try again."})}),k?e.jsx("div",{className:"paper-list",children:Array.from({length:6}).map((s,a)=>e.jsxs("div",{className:"paper-card",children:[e.jsx("div",{className:"paper-thumb-wrap",children:e.jsx(t,{className:"paper-thumb-skeleton"})}),e.jsxs("div",{className:"paper-body",style:{flex:1,gap:12},children:[e.jsx(t,{className:"h-6 w-3/4"}),e.jsx(t,{className:"h-4 w-1/2"}),e.jsx(t,{className:"h-12 w-full"})]})]},a))}):l.length===0?e.jsx("div",{className:"no-results",children:"No papers in this window."}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:l.map((s,a)=>e.jsx(I,{paper:s,rank:a+1},s.id))}),e.jsx("div",{ref:P,style:{height:1}}),r.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]})]})]})};export{se as default};
 
 
assets/FeedView-Gd7WFKT7.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{u as M,r as o,j as e,L as u,i as S,a as C,b as T}from"./index-CKAClQ2e.js";import{P as D}from"./components-CM9AEXO8.js";import{D as E,M as F,F as O,A as I,q as R}from"./chatSessions-mebqdAa-.js";import{t as q,d as _}from"./transform-BCXN61O6.js";import{u as $}from"./usePapers-Bep4-Z-b.js";import{u as K}from"./useIntersectionObserver-Bzsb1rr2.js";import{P as B}from"./usePeriodFilter-BjXqo8oe.js";import{S as l}from"./skeleton-BYz337Ss.js";import{A as H,a as U}from"./alert-4m2SJo0T.js";import{u as k}from"./useQuery-DVaOQYVk.js";import"./LatexTitle-DBZLS4yb.js";import"./katex.min-BSBacQyE.js";import"./useInfiniteQuery-BaNuOv30.js";const W=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],z={Today:"today","This Week":"week","This Month":"month","All Time":"all_time"},Q={today:"Today",week:"This Week",month:"This Month",all_time:"All Time"},V=t=>t==="trending"||t==="date_published"||t==="citation_count"?t:"trending",X=t=>t==="today"||t==="week"||t==="month"||t==="all_time"?t:"all_time",G=()=>{const t=C(),[n,d]=o.useState(""),[c,x]=o.useState(E),m=o.useRef(null);o.useEffect(()=>{const i=m.current;i&&(i.style.height="auto",i.style.height=`${Math.min(i.scrollHeight,160)}px`)},[n]);const h=()=>{const i=n.trim();i&&(R(i,c),t("/chat"))};return e.jsxs("div",{className:"ask-home",children:[e.jsx("textarea",{ref:m,rows:1,value:n,placeholder:"Ask the assistant about papers, tasks, methods, or benchmarks…",onChange:i=>d(i.target.value),onKeyDown:i=>{i.key==="Enter"&&!i.shiftKey&&(i.preventDefault(),h())}}),e.jsxs("div",{className:"ask-home-foot",children:[e.jsxs("div",{className:"ask-home-provider-tools",children:[e.jsx(F,{models:O,selectedModel:c,onModelChange:x}),e.jsxs("span",{className:"ask-home-hint",children:["Via 🤗"," ",e.jsx("a",{href:"https://huggingface.co/docs/inference-providers/en/index",target:"_blank",rel:"noreferrer",children:"Inference Providers"})]})]}),e.jsx("button",{type:"button",className:`chat-send${n.trim()?" chat-send-on":""}`,onClick:h,disabled:!n.trim(),"aria-label":"Ask the assistant",children:e.jsx(I,{})})]})]})},de=()=>{var j,N,y,b,v;const[t,n]=M(),d=V(t.get("order_by")),c=X(t.get("time")),x=Q[c],m=s=>{const a=new URLSearchParams(t);a.set("order_by",s),n(a)},h=s=>{const a=new URLSearchParams(t);a.set("time",z[s]),n(a)},i=k({queryKey:["top-tasks-sidebar"],queryFn:()=>T.getTopTasks({limit:8}),staleTime:10*60*1e3}),p=k({queryKey:["trending-tasks-sidebar"],queryFn:()=>T.getTrendingTasks({limit:8,level:0}),staleTime:10*60*1e3}),r=$({page_size:30,order_by:d,order_dir:"desc",time:c,include_resources:!0}),g=o.useMemo(()=>{var a;return(((a=r.data)==null?void 0:a.pages.flatMap(L=>L.results))||[]).map(q)},[r.data]),{targetRef:P,isIntersecting:f}=K({rootMargin:"400px"});o.useEffect(()=>{f&&r.hasNextPage&&!r.isFetchingNextPage&&r.fetchNextPage()},[f,r.hasNextPage,r.isFetchingNextPage]);const w=r.isLoading,A=r.error;return e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["Trending ",e.jsx("em",{children:"Research"})]}),e.jsx("div",{className:"feed-subtitle",children:"Curated daily from arXiv and Hugging Face"})]})}),e.jsxs("div",{className:"layout-with-sidebar",children:[e.jsxs("aside",{className:"sidebar",children:[e.jsxs("div",{className:"sidebar-section",children:[e.jsx("div",{className:"sidebar-label",children:"Top Domains"}),i.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((s,a)=>e.jsx(l,{className:"h-5 w-full"},a))}),(j=i.data)==null?void 0:j.map(s=>e.jsxs(u,{to:`/tasks/${s.slug}`,className:"sidebar-link",children:[_(s.name,s.slug),s.paper_count!=null&&e.jsx("span",{className:"count",children:s.paper_count})]},s.id)),e.jsx(u,{to:"/tasks",className:"sidebar-link",style:{marginTop:8,fontStyle:"italic"},children:"all domains →"})]}),e.jsxs("div",{className:"sidebar-section",children:[e.jsx("div",{className:"sidebar-label",children:"Trending Domains"}),p.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((s,a)=>e.jsx(l,{className:"h-5 w-full"},a))}),((y=(N=p.data)==null?void 0:N.results)==null?void 0:y.length)===0&&!p.isLoading&&e.jsx("div",{style:{fontSize:12,color:"var(--ink-faint)"},children:"No domains gaining momentum right now."}),(v=(b=p.data)==null?void 0:b.results)==null?void 0:v.map(s=>e.jsxs(u,{to:`/tasks/${s.slug}`,className:"sidebar-link",children:[_(s.name,s.slug),e.jsxs("span",{className:"count",children:[s.share_lift.toFixed(1),"x"]})]},s.id))]})]}),e.jsxs("div",{children:[S()&&e.jsx(G,{}),e.jsxs("div",{className:"sort-bar",children:[e.jsx("div",{className:"sort-options",children:W.map(([s,a])=>e.jsx("button",{className:`sort-btn ${d===s?"active":""}`,onClick:()=>m(s),children:a},s))}),e.jsx("div",{className:"sort-options sort-options-time",children:B.map(s=>e.jsx("button",{className:`sort-btn sort-btn-time ${x===s?"active":""}`,onClick:()=>h(s),children:s},s))})]}),A&&e.jsx(H,{variant:"destructive",className:"mb-4",children:e.jsx(U,{children:"Failed to load papers. Please try again."})}),w?e.jsx("div",{className:"paper-list",children:Array.from({length:6}).map((s,a)=>e.jsxs("div",{className:"paper-card",children:[e.jsx("div",{className:"paper-thumb-wrap",children:e.jsx(l,{className:"paper-thumb-skeleton"})}),e.jsxs("div",{className:"paper-body",style:{flex:1,gap:12},children:[e.jsx(l,{className:"h-6 w-3/4"}),e.jsx(l,{className:"h-4 w-1/2"}),e.jsx(l,{className:"h-12 w-full"})]})]},a))}):g.length===0?e.jsx("div",{className:"no-results",children:"No papers in this window."}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:g.map((s,a)=>e.jsx(D,{paper:s,rank:a+1},s.id))}),e.jsx("div",{ref:P,style:{height:1}}),r.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]})]})]})};export{de as default};
assets/FrameworksIndexView-Bkh1zXOU.js DELETED
@@ -1 +0,0 @@
1
- import{j as e}from"./index-EtWJP9FK.js";import{I as o}from"./components-Bs7x-Lbj.js";import{e as l,h as c}from"./transform-BnMt6tRc.js";import"./LatexTitle-ZHDCAKfZ.js";import"./katex.min-BSBacQyE.js";const g={gpu:"GPU",cpu:"CPU",apple:"Apple silicon"},i=[{id:"llm",name:"Large Language Models",blurb:"Frameworks for running, serving, fine-tuning, and post-training LLMs — from local CPU inference to large-scale GPU serving and RL.",categories:[{id:"inference",name:"Inference & Serving",blurb:"Pick your inference engine based on hardware: GPU servers for throughput, CPU or Apple silicon for local/offline use.",guideUrl:"https://x.com/TheAhmadOsman/status/2057183854444843202",guideLabel:"2026 inference engine guide",frameworks:[{slug:"vllm",name:"vLLM",org:"vLLM Project",description:"High-throughput LLM serving with PagedAttention and continuous batching.",whenToUse:"Best when you have NVIDIA GPU compute and need production-grade throughput.",platforms:["gpu"],github:"https://github.com/vllm-project/vllm",url:"https://docs.vllm.ai/"},{slug:"sglang",name:"SGLang",org:"SGLang Project",description:"Fast structured generation and multi-model serving for LLMs and VLMs.",whenToUse:"Strong choice for GPU clusters, agentic workloads, and structured outputs.",platforms:["gpu"],github:"https://github.com/sgl-project/sglang",url:"https://sgl-project.github.io/"},{slug:"llama-cpp",name:"llama.cpp",org:"ggml-org",description:"Portable C/C++ inference for LLMs with broad quantization support.",whenToUse:"Run models locally on CPU or Apple silicon without a GPU.",platforms:["cpu","apple"],github:"https://github.com/ggml-org/llama.cpp"},{slug:"mlx-lm",name:"MLX-LM",org:"Apple MLX",description:"Run and fine-tune LLMs on Apple silicon using the MLX array framework.",whenToUse:"Native Mac inference and lightweight fine-tuning on M-series chips.",platforms:["apple"],github:"https://github.com/ml-explore/mlx-lm",url:"https://ml-explore.github.io/mlx/build/html/index.html"},{slug:"mlx-vlm",name:"MLX-VLM",org:"Blaizzy",description:"Inference and fine-tuning for vision-language models on Mac via MLX.",whenToUse:"Multimodal models (image + text) on Apple silicon.",platforms:["apple"],github:"https://github.com/Blaizzy/mlx-vlm"},{slug:"ollama",name:"Ollama",org:"Ollama",description:"Easy local model pulling, quantization, and chat API for developers.",whenToUse:"Quick local prototyping — abstracts away model download and runtime setup.",platforms:["cpu","apple","gpu"],github:"https://github.com/ollama/ollama",url:"https://ollama.com/"}]},{id:"training",name:"Training & Fine-tuning",blurb:"Libraries for supervised fine-tuning (SFT), preference optimization (RLHF), and reinforcement learning from verifiable rewards (RLVR).",frameworks:[{slug:"trl",name:"TRL",org:"Hugging Face",description:"Transformer Reinforcement Learning — SFT, DPO, PPO, GRPO, and reward modeling.",whenToUse:"The standard Hugging Face stack for both SFT and RL-style post-training.",platforms:["gpu"],github:"https://github.com/huggingface/trl",url:"https://huggingface.co/docs/trl/"},{slug:"unsloth",name:"Unsloth",org:"Unsloth AI",description:"Memory-efficient, fast fine-tuning and RL for LLMs with optimized kernels.",whenToUse:"Fast iteration on SFT and RL when VRAM or training speed is the bottleneck.",platforms:["gpu"],github:"https://github.com/unslothai/unsloth",url:"https://docs.unsloth.ai/"},{slug:"prime-rl",name:"prime-rl",org:"Prime Intellect",description:"Agentic RL training at scale with distributed rollout and training loops.",whenToUse:"Large-scale RL for agents and tool-use when you need custom distributed training.",platforms:["gpu"],github:"https://github.com/PrimeIntellect-ai/prime-rl"},{slug:"verl",name:"verl",org:"HybridFlow",description:"Flexible RL post-training framework (HybridFlow) for LLM alignment at scale.",whenToUse:"Production RL post-training pipelines — PPO, GRPO, and custom reward functions.",platforms:["gpu"],github:"https://github.com/verl-project/verl",url:"https://verl.readthedocs.io/"}]}]}],m={display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:24,paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},d={fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.02em",marginBottom:4},h={fontFamily:"var(--serif)",fontStyle:"italic",fontSize:13,color:"var(--ink-soft)"},u={fontFamily:"var(--mono)",fontSize:13,fontWeight:600,letterSpacing:"0.04em",textTransform:"uppercase",color:"var(--ink)",marginBottom:6},p=({platform:r})=>{const n=l(c(r));return e.jsx("span",{className:"framework-platform-chip",style:{background:n.bg,color:n.text},children:g[r]})},f=({framework:r})=>e.jsxs("article",{className:"framework-card",children:[e.jsxs("div",{className:"framework-card-head",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"framework-card-name",children:r.name}),r.org&&e.jsx("div",{className:"framework-card-org",children:r.org})]}),r.platforms&&r.platforms.length>0&&e.jsx("div",{className:"framework-platform-row",children:r.platforms.map(n=>e.jsx(p,{platform:n},n))})]}),e.jsx("p",{className:"framework-card-desc",children:r.description}),r.whenToUse&&e.jsxs("div",{className:"framework-card-when",children:[e.jsx("span",{className:"framework-card-when-label",children:"When to use"}),r.whenToUse]}),(r.github||r.url)&&e.jsxs("div",{className:"framework-card-links",children:[r.github&&e.jsxs("a",{href:r.github,target:"_blank",rel:"noopener noreferrer",className:"framework-link",children:[e.jsx(o,{name:"github",size:13}),"GitHub"]}),r.url&&r.url!==r.github&&e.jsx("a",{href:r.url,target:"_blank",rel:"noopener noreferrer",className:"framework-link",children:"Docs"})]})]}),j=()=>{const r=i.reduce((n,t)=>n+t.categories.reduce((s,a)=>s+a.frameworks.length,0),0);return e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["AI ",e.jsx("em",{children:"Frameworks"})]}),e.jsx("div",{className:"feed-subtitle",children:"Curated libraries and tools to run, serve, and train models — pick the right stack for your hardware and workload."})]})}),i.map(n=>e.jsxs("section",{style:{marginBottom:56},children:[e.jsxs("div",{style:m,children:[e.jsxs("div",{children:[e.jsx("h2",{style:d,children:n.name}),e.jsx("div",{style:h,children:n.blurb})]}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[n.categories.length," ",n.categories.length===1?"category":"categories"," ·"," ",n.categories.reduce((t,s)=>t+s.frameworks.length,0)," frameworks"]})]}),n.categories.map(t=>e.jsxs("div",{className:"framework-category",children:[e.jsxs("div",{className:"framework-category-head",children:[e.jsxs("div",{children:[e.jsx("h3",{style:u,children:t.name}),t.blurb&&e.jsx("p",{className:"framework-category-blurb",children:t.blurb}),t.guideUrl&&e.jsxs("a",{href:t.guideUrl,target:"_blank",rel:"noopener noreferrer",className:"framework-guide-link",children:[t.guideLabel??"Read guide"," →"]})]}),e.jsxs("div",{className:"framework-category-meta",children:[t.frameworks.length," ",t.frameworks.length===1?"framework":"frameworks"]})]}),e.jsx("div",{className:"framework-grid",children:t.frameworks.map(s=>e.jsx(f,{framework:s},s.slug))})]},t.id))]},n.id)),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",marginTop:8},children:[r," frameworks across ",i.length," ",i.length===1?"domain":"domains",". More areas (vision, audio) coming soon."]})]})};export{j as default};
 
 
assets/FrameworksIndexView-Bwh0Z_ZZ.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{j as e,L as t}from"./index-CKAClQ2e.js";import{I as l}from"./components-CM9AEXO8.js";import{e as c,h as g}from"./transform-BCXN61O6.js";import"./LatexTitle-DBZLS4yb.js";import"./katex.min-BSBacQyE.js";const d={gpu:"GPU",cpu:"CPU",apple:"Apple silicon"},s=[{id:"llm",name:"Large Language Models",blurb:"Frameworks for running, serving, fine-tuning, and post-training LLMs — from local CPU inference to large-scale GPU serving and RL.",categories:[{id:"inference",name:"Inference & Serving",blurb:"Pick your inference engine based on hardware: GPU servers for throughput, CPU or Apple silicon for local/offline use.",guideUrl:"https://x.com/TheAhmadOsman/status/2057183854444843202",guideLabel:"2026 inference engine guide",frameworks:[{slug:"vllm",name:"vLLM",org:"vLLM Project",description:"High-throughput LLM serving with PagedAttention and continuous batching.",whenToUse:"Best when you have NVIDIA GPU compute and need production-grade throughput.",platforms:["gpu"],github:"https://github.com/vllm-project/vllm",url:"https://docs.vllm.ai/",paperId:"2309.06180"},{slug:"sglang",name:"SGLang",org:"SGLang Project",description:"Fast structured generation and multi-model serving for LLMs and VLMs.",whenToUse:"Strong choice for GPU clusters, agentic workloads, and structured outputs.",platforms:["gpu"],github:"https://github.com/sgl-project/sglang",url:"https://sgl-project.github.io/",paperId:"2312.07104"},{slug:"llama-cpp",name:"llama.cpp",org:"ggml-org",description:"Portable C/C++ inference for LLMs with broad quantization support.",whenToUse:"Run models locally on CPU or Apple silicon without a GPU.",platforms:["cpu","apple"],github:"https://github.com/ggml-org/llama.cpp"},{slug:"mlx-lm",name:"MLX-LM",org:"Apple MLX",description:"Run and fine-tune LLMs on Apple silicon using the MLX array framework.",whenToUse:"Native Mac inference and lightweight fine-tuning on M-series chips.",platforms:["apple"],github:"https://github.com/ml-explore/mlx-lm",url:"https://ml-explore.github.io/mlx/build/html/index.html"},{slug:"mlx-vlm",name:"MLX-VLM",org:"Blaizzy",description:"Inference and fine-tuning for vision-language models on Mac via MLX.",whenToUse:"Multimodal models (image + text) on Apple silicon.",platforms:["apple"],github:"https://github.com/Blaizzy/mlx-vlm"},{slug:"ollama",name:"Ollama",org:"Ollama",description:"Easy local model pulling, quantization, and chat API for developers.",whenToUse:"Quick local prototyping — abstracts away model download and runtime setup.",platforms:["cpu","apple","gpu"],github:"https://github.com/ollama/ollama",url:"https://ollama.com/"}]},{id:"training",name:"Training & Fine-tuning",blurb:"Libraries for supervised fine-tuning (SFT), preference optimization (RLHF), and reinforcement learning from verifiable rewards (RLVR).",frameworks:[{slug:"trl",name:"TRL",org:"Hugging Face",description:"Transformer Reinforcement Learning — SFT, DPO, PPO, GRPO, and reward modeling.",whenToUse:"The standard Hugging Face stack for both SFT and RL-style post-training.",platforms:["gpu"],github:"https://github.com/huggingface/trl",url:"https://huggingface.co/docs/trl/"},{slug:"unsloth",name:"Unsloth",org:"Unsloth AI",description:"Memory-efficient, fast fine-tuning and RL for LLMs with optimized kernels.",whenToUse:"Fast iteration on SFT and RL when VRAM or training speed is the bottleneck.",platforms:["gpu"],github:"https://github.com/unslothai/unsloth",url:"https://docs.unsloth.ai/"},{slug:"prime-rl",name:"prime-rl",org:"Prime Intellect",description:"Agentic RL training at scale with distributed rollout and training loops.",whenToUse:"Large-scale RL for agents and tool-use when you need custom distributed training.",platforms:["gpu"],github:"https://github.com/PrimeIntellect-ai/prime-rl"},{slug:"verl",name:"verl",org:"HybridFlow",description:"Flexible RL post-training framework (HybridFlow) for LLM alignment at scale.",whenToUse:"Production RL post-training pipelines — PPO, GRPO, and custom reward functions.",platforms:["gpu"],github:"https://github.com/verl-project/verl",url:"https://verl.readthedocs.io/",paperId:"2409.19256"}]}]},{id:"image-video-generation",name:"Image and video generation",blurb:"Frameworks for building, running, and accelerating image and video generation workflows.",categories:[{id:"generation-inference",name:"Generation & Inference",blurb:"Libraries, interfaces, and inference engines for diffusion and diffusion-transformer models.",frameworks:[{slug:"diffusers",name:"Diffusers",org:"Hugging Face",description:"A modular PyTorch library for pretrained diffusion models across image, video, and audio generation.",whenToUse:"Build or train customizable generation pipelines with a broad model ecosystem.",platforms:["gpu"],github:"https://github.com/huggingface/diffusers",url:"https://huggingface.co/docs/diffusers/"},{slug:"comfyui",name:"ComfyUI",org:"Comfy Org",description:"A node-based interface, API, and backend for composing diffusion generation workflows.",whenToUse:"Design and share visual generation pipelines without wiring every step in code.",platforms:["gpu"],github:"https://github.com/comfy-org/comfyui"},{slug:"sglang-diffusion",name:"SGLang Diffusion",org:"SGLang Project",description:"A high-performance serving framework for image and video generation models.",whenToUse:"Serve diffusion models with production-oriented throughput and distributed execution.",platforms:["gpu"],github:"https://github.com/sgl-project/sglang",url:"https://docs.sglang.io/docs/sglang-diffusion/index"},{slug:"cache-dit",name:"Cache-DiT",org:"Vipshop",description:"A PyTorch-native inference engine with caching, parallelism, quantization, and CPU offload for DiTs.",whenToUse:"Speed up diffusion-transformer inference with composable acceleration techniques.",platforms:["gpu"],github:"https://github.com/vipshop/cache-dit"},{slug:"fastvideo",name:"FastVideo",org:"Hao AI Lab",description:"A unified inference and post-training framework for accelerated video generation.",whenToUse:"Train, fine-tune, or serve video generation models in one optimized framework.",platforms:["gpu"],github:"https://github.com/hao-ai-lab/FastVideo"},{slug:"xdit",name:"xDiT",org:"xDiT Project",description:"A scalable inference engine for diffusion transformers using multiple parallelism strategies.",whenToUse:"Scale large image and video diffusion transformers across multiple GPUs.",platforms:["gpu"],github:"https://github.com/xdit-project/xDiT"}]}]}],m={display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:24,paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},u={fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.02em",marginBottom:4},p={fontFamily:"var(--serif)",fontStyle:"italic",fontSize:13,color:"var(--ink-soft)"},h={fontFamily:"var(--mono)",fontSize:13,fontWeight:600,letterSpacing:"0.04em",textTransform:"uppercase",color:"var(--ink)",marginBottom:6},f=({platform:i})=>{const r=c(g(i));return e.jsx("span",{className:"framework-platform-chip",style:{background:r.bg,color:r.text},children:d[i]})},b=({framework:i})=>e.jsxs("article",{className:"framework-card",children:[e.jsxs("div",{className:"framework-card-head",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"framework-card-name",children:i.name}),i.org&&e.jsx("div",{className:"framework-card-org",children:i.org})]}),i.platforms&&i.platforms.length>0&&e.jsx("div",{className:"framework-platform-row",children:i.platforms.map(r=>e.jsx(f,{platform:r},r))})]}),e.jsx("p",{className:"framework-card-desc",children:i.description}),i.whenToUse&&e.jsxs("div",{className:"framework-card-when",children:[e.jsx("span",{className:"framework-card-when-label",children:"When to use"}),i.whenToUse]}),(i.github||i.url||i.paperId)&&e.jsxs("div",{className:"framework-card-links",children:[i.paperId&&e.jsx(t,{to:`/paper/${i.paperId}`,className:"framework-link",children:"Paper"}),i.github&&e.jsxs("a",{href:i.github,target:"_blank",rel:"noopener noreferrer",className:"framework-link",children:[e.jsx(l,{name:"github",size:13}),"GitHub"]}),i.url&&i.url!==i.github&&e.jsx("a",{href:i.url,target:"_blank",rel:"noopener noreferrer",className:"framework-link",children:"Docs"})]})]}),k=()=>{const i=s.reduce((r,n)=>r+n.categories.reduce((o,a)=>o+a.frameworks.length,0),0);return e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["AI ",e.jsx("em",{children:"Frameworks"})]}),e.jsx("div",{className:"feed-subtitle",children:"Curated libraries and tools to run, serve, and train models — pick the right stack for your hardware and workload."})]})}),s.map(r=>e.jsxs("section",{style:{marginBottom:56},children:[e.jsxs("div",{style:m,children:[e.jsxs("div",{children:[e.jsx("h2",{style:u,children:r.name}),e.jsx("div",{style:p,children:r.blurb})]}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[r.categories.length," ",r.categories.length===1?"category":"categories"," ·"," ",r.categories.reduce((n,o)=>n+o.frameworks.length,0)," frameworks"]})]}),r.categories.map(n=>e.jsxs("div",{className:"framework-category",children:[e.jsxs("div",{className:"framework-category-head",children:[e.jsxs("div",{children:[e.jsx("h3",{style:h,children:n.name}),n.blurb&&e.jsx("p",{className:"framework-category-blurb",children:n.blurb}),n.guideUrl&&e.jsxs("a",{href:n.guideUrl,target:"_blank",rel:"noopener noreferrer",className:"framework-guide-link",children:[n.guideLabel??"Read guide"," →"]})]}),e.jsxs("div",{className:"framework-category-meta",children:[n.frameworks.length," ",n.frameworks.length===1?"framework":"frameworks"]})]}),e.jsx("div",{className:"framework-grid",children:n.frameworks.map(o=>e.jsx(b,{framework:o},o.slug))})]},n.id))]},r.id)),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",marginTop:8},children:[i," frameworks across ",s.length," ",s.length===1?"domain":"domains",". More areas coming soon."]})]})};export{k as default};
assets/{LatexTitle-ZHDCAKfZ.js → LatexTitle-DBZLS4yb.js} RENAMED
@@ -1 +1 @@
1
- import{j as o,r as g}from"./index-EtWJP9FK.js";import{k as T}from"./katex.min-BSBacQyE.js";const j=new Set([",",";",":","!"," ","quad","qquad","enspace","thinspace"]),C={a:"á",e:"é",i:"í",o:"ó",u:"ú",y:"ý",A:"Á",E:"É",I:"Í",O:"Ó",U:"Ú",Y:"Ý"},M={a:"à",e:"è",i:"ì",o:"ò",u:"ù",A:"À",E:"È",I:"Ì",O:"Ò",U:"Ù"},_={a:"â",e:"ê",i:"î",o:"ô",u:"û",A:"Â",E:"Ê",I:"Î",O:"Ô",U:"Û"},b={a:"ä",e:"ë",i:"ï",o:"ö",u:"ü",y:"ÿ",A:"Ä",E:"Ë",I:"Ï",O:"Ö",U:"Ü",Y:"Ÿ"},O={"'":C,"`":M,"^":_,'"':b,"~":{n:"ñ",N:"Ñ"}},E={ss:"ß",ae:"æ",AE:"Æ",oe:"œ",OE:"Œ",o:"ø",O:"Ø",l:"ł",L:"Ł"};function S(e,s){var n;return((n=O[e])==null?void 0:n[s])??null}function N(e){const s=[];let n=0,i="";const l=()=>{i&&(s.push({type:"text",content:i}),i="")};for(;n<e.length;){if(e[n]==="$"&&e[n+1]==="$"){l();const t=e.indexOf("$$",n+2);if(t===-1){i+=e.slice(n);break}s.push({type:"display",content:e.slice(n+2,t)}),n=t+2;continue}if(e[n]==="$"){l();const t=e.indexOf("$",n+1);if(t===-1){i+=e.slice(n);break}s.push({type:"inline",content:e.slice(n+1,t)}),n=t+1;continue}i+=e[n],n+=1}return l(),s}function d(e,s){if(e[s]!=="{")return null;let n=0;for(let i=s;i<e.length;i+=1)if(e[i]==="{")n+=1;else if(e[i]==="}"&&(n-=1,n===0))return{content:e.slice(s+1,i),end:i+1};return null}function $(e,s){let n=s+1;if(n>=e.length)return{name:"",end:n};if(!/[a-zA-Z]/.test(e[n]))return{name:e[n],end:n+1};const i=n;for(;n<e.length&&/[a-zA-Z]/.test(e[n]);)n+=1;return{name:e.slice(i,n),end:n}}function w(e,s){const n=e[s];if(n!=="^"&&n!=="_"||s+1>=e.length)return null;if(e[s+1]==="{"){const i=d(e,s+1);return i?{end:i.end}:null}return/[A-Za-z0-9+\-=.]/.test(e[s+1])?{end:s+2}:null}function y(e,s){let n=s;if(e[n]==="\\"){const{name:t,end:a}=$(e,n);if(!t)return null;if(n=a,e[n]==="{"){const f=d(e,n);f&&(n=f.end)}}else if(/[A-Za-z0-9]/.test(e[n])){let t=n+1;for(;t<e.length&&/[A-Za-z0-9]/.test(e[t]);)t+=1;if(e[t]!=="^"&&e[t]!=="_")return null;n=t}else return null;const i=s;let l=0;for(;n<e.length;){const t=w(e,n);if(!t)break;l+=1,n=t.end}return l===0?null:{latex:e.slice(i,n),end:n}}function p(e,s){const n=[];let i=0,l=0;const t=()=>`${s}-${l++}`,a=(f,u)=>f==="strong"?o.jsx("strong",{children:u},t()):o.jsx("em",{children:u},t());for(;i<e.length;){if(e[i]==="\\"){const{name:c,end:L}=$(e,i);if(i=L,E[c]){n.push(E[c]);continue}if(c.length===1&&i<e.length&&/[A-Za-z]/.test(e[i])){const r=S(c,e[i]);if(r){n.push(r),i+=1;continue}}if(c==="c"){const r=d(e,i);if((r==null?void 0:r.content.length)===1){const h={c:"ç",C:"Ç"}[r.content];if(h){n.push(h),i=r.end;continue}}}if(c==="textbf"||c==="mathbf"){const r=d(e,i);if(r){i=r.end,n.push(a("strong",p(r.content,t())));continue}}if(c==="emph"||c==="textit"||c==="textsl"||c==="texttt"){const r=d(e,i);if(r){i=r.end,n.push(a("em",p(r.content,t())));continue}}if(c==="color"||c==="textcolor"){const r=d(e,i);if(r){i=r.end;const h=d(e,i);h&&(i=h.end,n.push(...p(h.content,t())));continue}}if(j.has(c)){n.push(" ");continue}if(c==="~"){n.push(" ");continue}const m=d(e,i);if(m){i=m.end,n.push(...p(m.content,t()));continue}n.push(`\\${c}`);continue}if(e[i]==="~"){n.push(" "),i+=1;continue}const f=y(e,i);if(f){n.push(o.jsx(A,{latex:f.latex,display:!1},t())),i=f.end;continue}let u=i;for(;u<e.length&&e[u]!=="\\"&&e[u]!=="~"&&!y(e,u);)u+=1;u>i&&n.push(e.slice(i,u)),i=u}return n}function A({latex:e,display:s}){const n=g.useMemo(()=>{try{return T.renderToString(e.trim(),{displayMode:s,throwOnError:!1})}catch{return null}},[e,s]);return n?o.jsx("span",{className:s?"katex-display":void 0,dangerouslySetInnerHTML:{__html:n}}):o.jsx(o.Fragment,{children:s?`$$${e}$$`:`$${e}$`})}function k(e){const s=N(e),n=[];return s.forEach((i,l)=>{const t=`latex-${l}`;if(i.type==="text"){const a=p(i.content,t);a.length===1?n.push(a[0]):a.length>1&&n.push(o.jsx(g.Fragment,{children:a},t));return}if(i.type==="display"){n.push(o.jsx(A,{latex:i.content,display:!0},t));return}n.push(o.jsx(A,{latex:i.content,display:!1},t))}),n.length===1?n[0]:o.jsx(o.Fragment,{children:n})}const U=({text:e,className:s=""})=>{const n=g.useMemo(()=>k(e),[e]);return o.jsx("span",{className:s,children:n})},X=({title:e,className:s=""})=>o.jsx(U,{text:e,className:s});export{X as L,U as a};
 
1
+ import{j as o,r as g}from"./index-CKAClQ2e.js";import{k as T}from"./katex.min-BSBacQyE.js";const j=new Set([",",";",":","!"," ","quad","qquad","enspace","thinspace"]),C={a:"á",e:"é",i:"í",o:"ó",u:"ú",y:"ý",A:"Á",E:"É",I:"Í",O:"Ó",U:"Ú",Y:"Ý"},M={a:"à",e:"è",i:"ì",o:"ò",u:"ù",A:"À",E:"È",I:"Ì",O:"Ò",U:"Ù"},_={a:"â",e:"ê",i:"î",o:"ô",u:"û",A:"Â",E:"Ê",I:"Î",O:"Ô",U:"Û"},b={a:"ä",e:"ë",i:"ï",o:"ö",u:"ü",y:"ÿ",A:"Ä",E:"Ë",I:"Ï",O:"Ö",U:"Ü",Y:"Ÿ"},O={"'":C,"`":M,"^":_,'"':b,"~":{n:"ñ",N:"Ñ"}},E={ss:"ß",ae:"æ",AE:"Æ",oe:"œ",OE:"Œ",o:"ø",O:"Ø",l:"ł",L:"Ł"};function S(e,s){var n;return((n=O[e])==null?void 0:n[s])??null}function N(e){const s=[];let n=0,i="";const l=()=>{i&&(s.push({type:"text",content:i}),i="")};for(;n<e.length;){if(e[n]==="$"&&e[n+1]==="$"){l();const t=e.indexOf("$$",n+2);if(t===-1){i+=e.slice(n);break}s.push({type:"display",content:e.slice(n+2,t)}),n=t+2;continue}if(e[n]==="$"){l();const t=e.indexOf("$",n+1);if(t===-1){i+=e.slice(n);break}s.push({type:"inline",content:e.slice(n+1,t)}),n=t+1;continue}i+=e[n],n+=1}return l(),s}function d(e,s){if(e[s]!=="{")return null;let n=0;for(let i=s;i<e.length;i+=1)if(e[i]==="{")n+=1;else if(e[i]==="}"&&(n-=1,n===0))return{content:e.slice(s+1,i),end:i+1};return null}function $(e,s){let n=s+1;if(n>=e.length)return{name:"",end:n};if(!/[a-zA-Z]/.test(e[n]))return{name:e[n],end:n+1};const i=n;for(;n<e.length&&/[a-zA-Z]/.test(e[n]);)n+=1;return{name:e.slice(i,n),end:n}}function w(e,s){const n=e[s];if(n!=="^"&&n!=="_"||s+1>=e.length)return null;if(e[s+1]==="{"){const i=d(e,s+1);return i?{end:i.end}:null}return/[A-Za-z0-9+\-=.]/.test(e[s+1])?{end:s+2}:null}function y(e,s){let n=s;if(e[n]==="\\"){const{name:t,end:a}=$(e,n);if(!t)return null;if(n=a,e[n]==="{"){const f=d(e,n);f&&(n=f.end)}}else if(/[A-Za-z0-9]/.test(e[n])){let t=n+1;for(;t<e.length&&/[A-Za-z0-9]/.test(e[t]);)t+=1;if(e[t]!=="^"&&e[t]!=="_")return null;n=t}else return null;const i=s;let l=0;for(;n<e.length;){const t=w(e,n);if(!t)break;l+=1,n=t.end}return l===0?null:{latex:e.slice(i,n),end:n}}function p(e,s){const n=[];let i=0,l=0;const t=()=>`${s}-${l++}`,a=(f,u)=>f==="strong"?o.jsx("strong",{children:u},t()):o.jsx("em",{children:u},t());for(;i<e.length;){if(e[i]==="\\"){const{name:c,end:L}=$(e,i);if(i=L,E[c]){n.push(E[c]);continue}if(c.length===1&&i<e.length&&/[A-Za-z]/.test(e[i])){const r=S(c,e[i]);if(r){n.push(r),i+=1;continue}}if(c==="c"){const r=d(e,i);if((r==null?void 0:r.content.length)===1){const h={c:"ç",C:"Ç"}[r.content];if(h){n.push(h),i=r.end;continue}}}if(c==="textbf"||c==="mathbf"){const r=d(e,i);if(r){i=r.end,n.push(a("strong",p(r.content,t())));continue}}if(c==="emph"||c==="textit"||c==="textsl"||c==="texttt"){const r=d(e,i);if(r){i=r.end,n.push(a("em",p(r.content,t())));continue}}if(c==="color"||c==="textcolor"){const r=d(e,i);if(r){i=r.end;const h=d(e,i);h&&(i=h.end,n.push(...p(h.content,t())));continue}}if(j.has(c)){n.push(" ");continue}if(c==="~"){n.push(" ");continue}const m=d(e,i);if(m){i=m.end,n.push(...p(m.content,t()));continue}n.push(`\\${c}`);continue}if(e[i]==="~"){n.push(" "),i+=1;continue}const f=y(e,i);if(f){n.push(o.jsx(A,{latex:f.latex,display:!1},t())),i=f.end;continue}let u=i;for(;u<e.length&&e[u]!=="\\"&&e[u]!=="~"&&!y(e,u);)u+=1;u>i&&n.push(e.slice(i,u)),i=u}return n}function A({latex:e,display:s}){const n=g.useMemo(()=>{try{return T.renderToString(e.trim(),{displayMode:s,throwOnError:!1})}catch{return null}},[e,s]);return n?o.jsx("span",{className:s?"katex-display":void 0,dangerouslySetInnerHTML:{__html:n}}):o.jsx(o.Fragment,{children:s?`$$${e}$$`:`$${e}$`})}function k(e){const s=N(e),n=[];return s.forEach((i,l)=>{const t=`latex-${l}`;if(i.type==="text"){const a=p(i.content,t);a.length===1?n.push(a[0]):a.length>1&&n.push(o.jsx(g.Fragment,{children:a},t));return}if(i.type==="display"){n.push(o.jsx(A,{latex:i.content,display:!0},t));return}n.push(o.jsx(A,{latex:i.content,display:!1},t))}),n.length===1?n[0]:o.jsx(o.Fragment,{children:n})}const U=({text:e,className:s=""})=>{const n=g.useMemo(()=>k(e),[e]);return o.jsx("span",{className:s,children:n})},X=({title:e,className:s=""})=>o.jsx(U,{text:e,className:s});export{X as L,U as a};
assets/MarkdownText-Bj8B42V4.js DELETED
@@ -1,7 +0,0 @@
1
- import{j as F,L as ne}from"./index-EtWJP9FK.js";import{k as j}from"./katex.min-BSBacQyE.js";import{o as k,l as re,f as M,m as w,a as ie,p as I,b as L,n as O,h as oe,s as ae,c as se,v as le,S as ce,M as ue,r as he}from"./index-By9W8E5I.js";function fe(){return{enter:{mathFlow:e,mathFlowFenceMeta:t,mathText:o},exit:{mathFlow:i,mathFlowFence:n,mathFlowFenceMeta:r,mathFlowValue:l,mathText:s,mathTextData:l}};function e(a){const u={type:"element",tagName:"code",properties:{className:["language-math","math-display"]},children:[]};this.enter({type:"math",meta:null,value:"",data:{hName:"pre",hChildren:[u]}},a)}function t(){this.buffer()}function r(){const a=this.resume(),u=this.stack[this.stack.length-1];k(u.type==="math"),u.meta=a}function n(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)}function i(a){const u=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),f=this.stack[this.stack.length-1];k(f.type==="math"),this.exit(a),f.value=u;const p=f.data.hChildren[0];k(p.type==="element"),k(p.tagName==="code"),p.children.push({type:"text",value:u}),this.data.mathFlowInside=void 0}function o(a){this.enter({type:"inlineMath",value:"",data:{hName:"code",hProperties:{className:["language-math","math-inline"]},hChildren:[]}},a),this.buffer()}function s(a){const u=this.resume(),f=this.stack[this.stack.length-1];k(f.type==="inlineMath"),this.exit(a),f.value=u,f.data.hChildren.push({type:"text",value:u})}function l(a){this.config.enter.data.call(this,a),this.config.exit.data.call(this,a)}}function pe(e){let t=(e||{}).singleDollarTextMath;return t==null&&(t=!0),n.peek=i,{unsafe:[{character:"\r",inConstruct:"mathFlowMeta"},{character:`
2
- `,inConstruct:"mathFlowMeta"},{character:"$",after:t?void 0:"\\$",inConstruct:"phrasing"},{character:"$",inConstruct:"mathFlowMeta"},{atBreak:!0,character:"$",after:"\\$"}],handlers:{math:r,inlineMath:n}};function r(o,s,l,a){const u=o.value||"",f=l.createTracker(a),p="$".repeat(Math.max(re(u,"$")+1,2)),d=l.enter("mathFlow");let g=f.move(p);if(o.meta){const m=l.enter("mathFlowMeta");g+=f.move(l.safe(o.meta,{after:`
3
- `,before:g,encode:["$"],...f.current()})),m()}return g+=f.move(`
4
- `),u&&(g+=f.move(u+`
5
- `)),g+=f.move(p),d(),g}function n(o,s,l){let a=o.value||"",u=1;for(t||u++;new RegExp("(^|[^$])"+"\\$".repeat(u)+"([^$]|$)").test(a);)u++;const f="$".repeat(u);/[^ \r\n]/.test(a)&&(/^[ \r\n]/.test(a)&&/[ \r\n]$/.test(a)||/^\$|\$$/.test(a))&&(a=" "+a+" ");let p=-1;for(;++p<l.unsafe.length;){const d=l.unsafe[p];if(!d.atBreak)continue;const g=l.compilePattern(d);let m;for(;m=g.exec(a);){let h=m.index;a.codePointAt(h)===10&&a.codePointAt(h-1)===13&&h--,a=a.slice(0,h)+" "+a.slice(m.index+1)}}return f+a+f}function i(){return"$"}}const me={tokenize:de,concrete:!0,name:"mathFlow"},z={tokenize:ge,partial:!0};function de(e,t,r){const n=this,i=n.events[n.events.length-1],o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0;let s=0;return l;function l(c){return e.enter("mathFlow"),e.enter("mathFlowFence"),e.enter("mathFlowFenceSequence"),a(c)}function a(c){return c===36?(e.consume(c),s++,a):s<2?r(c):(e.exit("mathFlowFenceSequence"),M(e,u,"whitespace")(c))}function u(c){return c===null||w(c)?p(c):(e.enter("mathFlowFenceMeta"),e.enter("chunkString",{contentType:"string"}),f(c))}function f(c){return c===null||w(c)?(e.exit("chunkString"),e.exit("mathFlowFenceMeta"),p(c)):c===36?r(c):(e.consume(c),f)}function p(c){return e.exit("mathFlowFence"),n.interrupt?t(c):e.attempt(z,d,x)(c)}function d(c){return e.attempt({tokenize:b,partial:!0},x,g)(c)}function g(c){return(o?M(e,m,"linePrefix",o+1):m)(c)}function m(c){return c===null?x(c):w(c)?e.attempt(z,d,x)(c):(e.enter("mathFlowValue"),h(c))}function h(c){return c===null||w(c)?(e.exit("mathFlowValue"),m(c)):(e.consume(c),h)}function x(c){return e.exit("mathFlow"),t(c)}function b(c,v,A){let $=0;return M(c,ee,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4);function ee(y){return c.enter("mathFlowFence"),c.enter("mathFlowFenceSequence"),P(y)}function P(y){return y===36?($++,c.consume(y),P):$<s?A(y):(c.exit("mathFlowFenceSequence"),M(c,te,"whitespace")(y))}function te(y){return y===null||w(y)?(c.exit("mathFlowFence"),v(y)):A(y)}}}function ge(e,t,r){const n=this;return i;function i(s){return s===null?t(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),o)}function o(s){return n.parser.lazy[n.now().line]?r(s):t(s)}}function ye(e){let r=(e||{}).singleDollarTextMath;return r==null&&(r=!0),{tokenize:n,resolve:xe,previous:we,name:"mathText"};function n(i,o,s){let l=0,a,u;return f;function f(h){return i.enter("mathText"),i.enter("mathTextSequence"),p(h)}function p(h){return h===36?(i.consume(h),l++,p):l<2&&!r?s(h):(i.exit("mathTextSequence"),d(h))}function d(h){return h===null?s(h):h===36?(u=i.enter("mathTextSequence"),a=0,m(h)):h===32?(i.enter("space"),i.consume(h),i.exit("space"),d):w(h)?(i.enter("lineEnding"),i.consume(h),i.exit("lineEnding"),d):(i.enter("mathTextData"),g(h))}function g(h){return h===null||h===32||h===36||w(h)?(i.exit("mathTextData"),d(h)):(i.consume(h),g)}function m(h){return h===36?(i.consume(h),a++,m):a===l?(i.exit("mathTextSequence"),i.exit("mathText"),o(h)):(u.type="mathTextData",g(h))}}}function xe(e){let t=e.length-4,r=3,n,i;if((e[r][1].type==="lineEnding"||e[r][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(n=r;++n<t;)if(e[n][1].type==="mathTextData"){e[t][1].type="mathTextPadding",e[r][1].type="mathTextPadding",r+=2,t-=2;break}}for(n=r-1,t++;++n<=t;)i===void 0?n!==t&&e[n][1].type!=="lineEnding"&&(i=n):(n===t||e[n][1].type==="lineEnding")&&(e[i][1].type="mathTextData",n!==i+2&&(e[i][1].end=e[n-1][1].end,e.splice(i+2,n-i-2),t-=n-i-2,n=i+2),i=void 0);return e}function we(e){return e!==36||this.events[this.events.length-1][1].type==="characterEscape"}function Ne(e){return{flow:{36:me},text:{36:ye(e)}}}const ke={};function be(e){const t=this,r=e||ke,n=t.data(),i=n.micromarkExtensions||(n.micromarkExtensions=[]),o=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),s=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);i.push(Ne(r)),o.push(fe()),s.push(pe(r))}const D=/[#.]/g;function Fe(e,t){const r=e||"",n={};let i=0,o,s;for(;i<r.length;){D.lastIndex=i;const l=D.exec(r),a=r.slice(i,l?l.index:r.length);a&&(o?o==="#"?n.id=a:Array.isArray(n.className)?n.className.push(a):n.className=[a]:s=a,i+=a.length),l&&(o=l[0],i++)}return{type:"element",tagName:s||t||"div",properties:n,children:[]}}function K(e,t,r){const n=r?Ce(r):void 0;function i(o,s,...l){let a;if(o==null){a={type:"root",children:[]};const u=s;l.unshift(u)}else{a=Fe(o,t);const u=a.tagName.toLowerCase(),f=n?n.get(u):void 0;if(a.tagName=f||u,Me(s))l.unshift(s);else for(const[p,d]of Object.entries(s))Te(e,a.properties,p,d)}for(const u of l)E(a.children,u);return a.type==="element"&&a.tagName==="template"&&(a.content={type:"root",children:a.children},a.children=[]),a}return i}function Me(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,r=Object.keys(e);for(const n of r){const i=t[n];if(i&&typeof i=="object"){if(!Array.isArray(i))return!0;const o=i;for(const s of o)if(typeof s!="number"&&typeof s!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function Te(e,t,r,n){const i=ie(e,r);let o;if(n!=null){if(typeof n=="number"){if(Number.isNaN(n))return;o=n}else typeof n=="boolean"?o=n:typeof n=="string"?i.spaceSeparated?o=I(n):i.commaSeparated?o=L(n):i.commaOrSpaceSeparated?o=I(L(n).join(" ")):o=q(i,i.property,n):Array.isArray(n)?o=[...n]:o=i.property==="style"?Ee(n):String(n);if(Array.isArray(o)){const s=[];for(const l of o)s.push(q(i,i.property,l));o=s}i.property==="className"&&Array.isArray(t.className)&&(o=t.className.concat(o)),t[i.property]=o}}function E(e,t){if(t!=null)if(typeof t=="number"||typeof t=="string")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const r of t)E(e,r);else if(typeof t=="object"&&"type"in t)t.type==="root"?E(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function q(e,t,r){if(typeof r=="string"){if(e.number&&r&&!Number.isNaN(Number(r)))return Number(r);if((e.boolean||e.overloadedBoolean)&&(r===""||O(r)===O(t)))return!0}return r}function Ee(e){const t=[];for(const[r,n]of Object.entries(e))t.push([r,n].join(": "));return t.join("; ")}function Ce(e){const t=new Map;for(const r of e)t.set(r.toLowerCase(),r);return t}const Se=["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"],Ae=K(oe,"div"),$e=K(ae,"g",Se),T={html:"http://www.w3.org/1999/xhtml",svg:"http://www.w3.org/2000/svg"};function Pe(e,t){return U(e,{})||{type:"root",children:[]}}function U(e,t){const r=je(e,t);return r&&t.afterTransform&&t.afterTransform(e,r),r}function je(e,t){switch(e.nodeType){case 1:return ze(e,t);case 3:return Le(e);case 8:return Oe(e);case 9:return B(e,t);case 10:return Ie();case 11:return B(e,t);default:return}}function B(e,t){return{type:"root",children:X(e,t)}}function Ie(){return{type:"doctype"}}function Le(e){return{type:"text",value:e.nodeValue||""}}function Oe(e){return{type:"comment",value:e.nodeValue||""}}function ze(e,t){const r=e.namespaceURI,n=r===T.svg?$e:Ae,i=r===T.html?e.tagName.toLowerCase():e.tagName,o=r===T.html&&i==="template"?e.content:e,s=e.getAttributeNames(),l={};let a=-1;for(;++a<s.length;)l[s[a]]=e.getAttribute(s[a])||"";return n(i,l,X(o,t))}function X(e,t){const r=e.childNodes,n=[];let i=-1;for(;++i<r.length;){const o=U(r[i],t);o!==void 0&&n.push(o)}return n}new DOMParser;function De(e,t){const r=qe(e);return Pe(r)}function qe(e){const t=document.createElement("template");return t.innerHTML=e,t.content}const _=function(e,t,r){const n=se(r);if(!e||!e.type||!e.children)throw new Error("Expected parent node");if(typeof t=="number"){if(t<0||t===Number.POSITIVE_INFINITY)throw new Error("Expected positive finite number as index")}else if(t=e.children.indexOf(t),t<0)throw new Error("Expected child node or index");for(;++t<e.children.length;)if(n(e.children[t],t,e))return e.children[t]},N=function(e){if(e==null)return Re;if(typeof e=="string")return _e(e);if(typeof e=="object")return Be(e);if(typeof e=="function")return S(e);throw new Error("Expected function, string, or array as `test`")};function Be(e){const t=[];let r=-1;for(;++r<e.length;)t[r]=N(e[r]);return S(n);function n(...i){let o=-1;for(;++o<t.length;)if(t[o].apply(this,i))return!0;return!1}}function _e(e){return S(t);function t(r){return r.tagName===e}}function S(e){return t;function t(r,n,i){return!!(Ge(r)&&e.call(this,r,typeof n=="number"?n:void 0,i||void 0))}}function Re(e){return!!(e&&typeof e=="object"&&"type"in e&&e.type==="element"&&"tagName"in e&&typeof e.tagName=="string")}function Ge(e){return e!==null&&typeof e=="object"&&"type"in e&&"tagName"in e}const R=/\n/g,G=/[\t ]+/g,C=N("br"),V=N(Je),Ve=N("p"),H=N("tr"),He=N(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",Ye,Qe]),Y=N(["address","article","aside","blockquote","body","caption","center","dd","dialog","dir","dl","dt","div","figure","figcaption","footer","form,","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","legend","li","listing","main","menu","nav","ol","p","plaintext","pre","section","ul","xmp"]);function We(e,t){const r=t||{},n="children"in e?e.children:[],i=Y(e),o=Z(e,{whitespace:r.whitespace||"normal"}),s=[];(e.type==="text"||e.type==="comment")&&s.push(...Q(e,{breakBefore:!0,breakAfter:!0}));let l=-1;for(;++l<n.length;)s.push(...J(n[l],e,{whitespace:o,breakBefore:l?void 0:i,breakAfter:l<n.length-1?C(n[l+1]):i}));const a=[];let u;for(l=-1;++l<s.length;){const f=s[l];typeof f=="number"?u!==void 0&&f>u&&(u=f):f&&(u!==void 0&&u>-1&&a.push(`
6
- `.repeat(u)||" "),u=-1,a.push(f))}return a.join("")}function J(e,t,r){return e.type==="element"?Ke(e,t,r):e.type==="text"?r.whitespace==="normal"?Q(e,r):Ue(e):[]}function Ke(e,t,r){const n=Z(e,r),i=e.children||[];let o=-1,s=[];if(He(e))return s;let l,a;for(C(e)||H(e)&&_(t,e,H)?a=`
7
- `:Ve(e)?(l=2,a=2):Y(e)&&(l=1,a=1);++o<i.length;)s=s.concat(J(i[o],e,{whitespace:n,breakBefore:o?void 0:l,breakAfter:o<i.length-1?C(i[o+1]):a}));return V(e)&&_(t,e,V)&&s.push(" "),l&&s.unshift(l),a&&s.push(a),s}function Q(e,t){const r=String(e.value),n=[],i=[];let o=0;for(;o<=r.length;){R.lastIndex=o;const a=R.exec(r),u=a&&"index"in a?a.index:r.length;n.push(Xe(r.slice(o,u).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),o===0?t.breakBefore:!0,u===r.length?t.breakAfter:!0)),o=u+1}let s=-1,l;for(;++s<n.length;)n[s].charCodeAt(n[s].length-1)===8203||s<n.length-1&&n[s+1].charCodeAt(0)===8203?(i.push(n[s]),l=void 0):n[s]?(typeof l=="number"&&i.push(l),i.push(n[s]),l=0):(s===0||s===n.length-1)&&i.push(0);return i}function Ue(e){return[String(e.value)]}function Xe(e,t,r){const n=[];let i=0,o;for(;i<e.length;){G.lastIndex=i;const s=G.exec(e);o=s?s.index:e.length,!i&&!o&&s&&!t&&n.push(""),i!==o&&n.push(e.slice(i,o)),i=s?o+s[0].length:o}return i!==o&&!r&&n.push(""),n.join(" ")}function Z(e,t){if(e.type==="element"){const r=e.properties||{};switch(e.tagName){case"listing":case"plaintext":case"xmp":return"pre";case"nobr":return"nowrap";case"pre":return r.wrap?"pre-wrap":"pre";case"td":case"th":return r.noWrap?"nowrap":t.whitespace;case"textarea":return"pre-wrap"}}return t.whitespace}function Ye(e){return!!(e.properties||{}).hidden}function Je(e){return e.tagName==="td"||e.tagName==="th"}function Qe(e){return e.tagName==="dialog"&&!(e.properties||{}).open}const Ze={},ve=[];function et(e){const t=e||Ze;return function(r,n){le(r,"element",function(i,o){const s=Array.isArray(i.properties.className)?i.properties.className:ve,l=s.includes("language-math"),a=s.includes("math-display"),u=s.includes("math-inline");let f=a;if(!l&&!a&&!u)return;let p=o[o.length-1],d=i;if(i.tagName==="code"&&l&&p&&p.type==="element"&&p.tagName==="pre"&&(d=p,p=o[o.length-2],f=!0),!p)return;const g=We(d,{whitespace:"pre"});let m;try{m=j.renderToString(g,{...t,displayMode:f,throwOnError:!0})}catch(x){const b=x,c=b.name.toLowerCase();n.message("Could not render math with KaTeX",{ancestors:[...o,i],cause:b,place:i.position,ruleId:c,source:"rehype-katex"});try{m=j.renderToString(g,{...t,displayMode:f,strict:"ignore",throwOnError:!1})}catch{m=[{type:"element",tagName:"span",properties:{className:["katex-error"],style:"color:"+(t.errorColor||"#cc0000"),title:String(x)},children:[{type:"text",value:g}]}]}}typeof m=="string"&&(m=De(m).children);const h=p.children.indexOf(d);return p.children.splice(h,1,...m),ce})}}const tt=new Set(["paperswithcode.co","www.paperswithcode.co","localhost","127.0.0.1","167.235.148.241"]),W=["/methods","/paper","/papers","/tasks","/benchmark","/conferences"],nt=e=>{if(!e)return null;if(e.startsWith("/"))return W.some(t=>e===t||e.startsWith(`${t}/`))?e:null;try{const t=new URL(e,window.location.origin);if(!tt.has(t.hostname))return null;const r=`${t.pathname}${t.search}${t.hash}`;return W.some(n=>r===n||r.startsWith(`${n}/`))?r:null}catch{return null}},at=({text:e,className:t=""})=>F.jsx("div",{className:t,children:F.jsx(ue,{remarkPlugins:[he,be],rehypePlugins:[et],components:{a:({href:r,children:n,...i})=>{const o=nt(r);return o?F.jsx(ne,{to:o,...i,children:n}):F.jsx("a",{href:r,target:"_blank",rel:"noopener noreferrer",...i,children:n})}},children:e})});export{at as M};
 
 
 
 
 
 
 
 
assets/MarkdownText-Cuf1_4O5.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{j as s,L as l}from"./index-CKAClQ2e.js";import"./katex.min-BSBacQyE.js";import{M as c,r as m}from"./index-DuEHueKe.js";import{r as u,a as h}from"./index-b1s0T9nh.js";const p=new Set(["paperswithcode.co","www.paperswithcode.co","localhost","127.0.0.1","167.235.148.241"]),i=["/methods","/paper","/papers","/tasks","/benchmark","/conferences"],w=t=>{if(!t)return null;if(t.startsWith("/"))return i.some(r=>t===r||t.startsWith(`${r}/`))?t:null;try{const r=new URL(t,window.location.origin);if(!p.has(r.hostname))return null;const n=`${r.pathname}${r.search}${r.hash}`;return i.some(e=>n===e||n.startsWith(`${e}/`))?n:null}catch{return null}},P=({text:t,className:r=""})=>s.jsx("div",{className:r,children:s.jsx(c,{remarkPlugins:[m,h],rehypePlugins:[u],components:{a:({href:n,children:e,...a})=>{const o=w(n);return o?s.jsx(l,{to:o,...a,children:e}):s.jsx("a",{href:n,target:"_blank",rel:"noopener noreferrer",...a,children:e})}},children:t})});export{P as M};
assets/MethodDetailView-BhKDNFx1.js DELETED
@@ -1 +0,0 @@
1
- import{j as e,_ as E,r as y,L as M,a as g,aa as D}from"./index-EtWJP9FK.js";import{u as F}from"./useQuery-CRN8HQuX.js";import{u as B}from"./useInfiniteQuery-DMyrN_84.js";import{M as L,P as C}from"./components-Bs7x-Lbj.js";import{M as b}from"./MarkdownText-Bj8B42V4.js";import{t as P}from"./transform-BnMt6tRc.js";import{u as T}from"./useIntersectionObserver-CuGdoJlB.js";import{S as u}from"./skeleton-DMjGQB3S.js";import{A as $,a as I}from"./alert-BIanajMT.js";import"./LatexTitle-ZHDCAKfZ.js";import"./katex.min-BSBacQyE.js";import"./index-By9W8E5I.js";const t={pink:"#F8D7D9",pinkS:"#D9B0B3",yellow:"#FBEFC2",yellowS:"#C9B97D",orange:"#F8D7B3",orangeS:"#C99466",blue:"#CDE2EE",blueS:"#7FA4BA",purple:"#D4D2EA",purpleS:"#8E8AC0",green:"#CCE2C5",greenS:"#7DA475",ink:"#1A1814",faint:"#8E8678"},o=({x:i,y:s,w:r,h:l,fill:x,stroke:d,label:m,fontSize:h=10,multiline:f})=>e.jsxs("g",{children:[e.jsx("rect",{x:i,y:s,width:r,height:l,rx:"3",ry:"3",fill:x,stroke:d,strokeWidth:"1"}),f?e.jsxs(e.Fragment,{children:[e.jsx("text",{x:i+r/2,y:s+l/2-2,fontSize:h,fontFamily:"var(--sans)",fill:t.ink,textAnchor:"middle",dominantBaseline:"middle",children:f[0]}),e.jsx("text",{x:i+r/2,y:s+l/2+h-1,fontSize:h,fontFamily:"var(--sans)",fill:t.ink,textAnchor:"middle",dominantBaseline:"middle",children:f[1]})]}):e.jsx("text",{x:i+r/2,y:s+l/2,fontSize:h,fontFamily:"var(--sans)",fill:t.ink,textAnchor:"middle",dominantBaseline:"middle",children:m})]}),N=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[e.jsx("text",{x:"180",y:"20",fontSize:"11",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.faint,textAnchor:"middle",children:"Scaled Dot-Product Attention"}),e.jsx(o,{x:140,y:40,w:80,h:26,fill:t.yellow,stroke:t.yellowS,label:"MatMul",fontSize:11}),e.jsx("path",{d:"M180 66 L180 80",stroke:t.ink}),e.jsx(o,{x:140,y:80,w:80,h:26,fill:t.green,stroke:t.greenS,label:"SoftMax",fontSize:11}),e.jsx("path",{d:"M180 106 L180 120",stroke:t.ink}),e.jsx(o,{x:140,y:120,w:80,h:26,fill:t.purple,stroke:t.purpleS,label:"Mask (opt.)",fontSize:11}),e.jsx("path",{d:"M180 146 L180 160",stroke:t.ink}),e.jsx(o,{x:140,y:160,w:80,h:26,fill:t.blue,stroke:t.blueS,label:"Scale ÷√dₖ",fontSize:11}),e.jsx("path",{d:"M180 186 L180 200",stroke:t.ink}),e.jsx(o,{x:140,y:200,w:80,h:26,fill:t.yellow,stroke:t.yellowS,label:"MatMul",fontSize:11}),e.jsx("path",{d:"M156 226 L120 270",stroke:t.ink}),e.jsx("path",{d:"M180 226 L180 270",stroke:t.ink}),e.jsx("path",{d:"M204 226 L240 270",stroke:t.ink}),e.jsx(o,{x:100,y:270,w:40,h:24,fill:t.pink,stroke:t.pinkS,label:"Q",fontSize:13}),e.jsx(o,{x:160,y:270,w:40,h:24,fill:t.pink,stroke:t.pinkS,label:"K",fontSize:13}),e.jsx(o,{x:220,y:270,w:40,h:24,fill:t.pink,stroke:t.pinkS,label:"V",fontSize:13}),e.jsxs("text",{x:"180",y:"330",fontSize:"14",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.ink,textAnchor:"middle",children:["softmax(QK",e.jsx("tspan",{fontSize:"9",baselineShift:"super",children:"⊤"})," / √d) V"]})]}),R=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[[0,1,2,3].map(i=>{const s=30+i*75,r=60-i*8,l=240-i*30;return e.jsx("g",{children:e.jsx("rect",{x:s,y:(420-l)/2,width:r,height:l,rx:"2",fill:[t.blue,t.green,t.orange,t.purple][i],stroke:[t.blueS,t.greenS,t.orangeS,t.purpleS][i],strokeWidth:"1"})},i)}),e.jsx("text",{x:"60",y:"395",fontSize:"9",fontFamily:"var(--mono)",fill:t.faint,textAnchor:"middle",children:"conv"}),e.jsx("text",{x:"135",y:"395",fontSize:"9",fontFamily:"var(--mono)",fill:t.faint,textAnchor:"middle",children:"conv"}),e.jsx("text",{x:"210",y:"395",fontSize:"9",fontFamily:"var(--mono)",fill:t.faint,textAnchor:"middle",children:"conv"}),e.jsx("text",{x:"285",y:"395",fontSize:"9",fontFamily:"var(--mono)",fill:t.faint,textAnchor:"middle",children:"fc"})]}),A=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[[0,1,2,3].map(i=>{const r=60+i*80,l=100-i*12,x=50-i*6;return e.jsx("rect",{x:50,y:r,width:l,height:x,rx:"2",fill:t.blue,stroke:t.blueS,strokeWidth:"1"},`e${i}`)}),e.jsx("rect",{x:"155",y:"320",width:"50",height:"40",rx:"2",fill:t.purple,stroke:t.purpleS}),[0,1,2,3].map(i=>{const r=60+i*80,l=100-i*12,x=50-i*6;return e.jsx("rect",{x:210,y:r,width:l,height:x,rx:"2",fill:t.green,stroke:t.greenS,strokeWidth:"1"},`d${i}`)}),[0,1,2,3].map(i=>{const s=60+i*80+(50-i*6)/2,r=50+(100-i*12);return e.jsx("path",{d:`M${r} ${s} L210 ${s}`,stroke:t.faint,strokeDasharray:"4 3"},`s${i}`)}),e.jsx("text",{x:"100",y:"40",fontSize:"10",fontFamily:"var(--mono)",fill:t.faint,textAnchor:"middle",children:"encoder"}),e.jsx("text",{x:"260",y:"40",fontSize:"10",fontFamily:"var(--mono)",fill:t.faint,textAnchor:"middle",children:"decoder"}),e.jsx("text",{x:"180",y:"395",fontSize:"9",fontFamily:"var(--mono)",fill:t.faint,textAnchor:"middle",children:"skip connections preserve high-res features"})]}),O=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[[0,1,2].map(i=>[0,1,2].map(s=>e.jsx("rect",{x:20+s*40,y:40+i*40,width:"38",height:"38",fill:["#F8D7D9","#FBEFC2","#CDE2EE","#CCE2C5","#D4D2EA","#F8D7B3","#F8D7D9","#FBEFC2","#CDE2EE"][i*3+s],stroke:t.faint},`${i}-${s}`))),e.jsx("rect",{x:"40",y:"245",width:"280",height:"120",rx:"4",fill:"#EFEBE0",stroke:t.faint,strokeDasharray:"3 2"}),e.jsx(o,{x:70,y:258,w:220,h:20,fill:t.yellow,stroke:t.yellowS,label:"Norm"}),e.jsx(o,{x:70,y:282,w:220,h:28,fill:t.orange,stroke:t.orangeS,label:"Multi-Head Attention"}),e.jsx(o,{x:70,y:314,w:220,h:20,fill:t.yellow,stroke:t.yellowS,label:"Norm"}),e.jsx(o,{x:70,y:338,w:220,h:20,fill:t.blue,stroke:t.blueS,label:"MLP"}),e.jsx("text",{x:"180",y:"385",fontSize:"10",fontFamily:"var(--mono)",fill:t.faint,textAnchor:"middle",children:"Transformer Encoder · L×"})]}),_=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[e.jsx("text",{x:"180",y:"50",fontSize:"11",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.faint,textAnchor:"middle",children:"Reverse process: pure noise → sample"}),[0,1,2,3,4,5].map(i=>{const s=25+i*56,r=(5-i)/5;return e.jsxs("g",{children:[e.jsx("rect",{x:s,y:90,width:50,height:50,rx:"3",fill:`oklch(${.85-r*.1} 0.04 250)`,stroke:t.faint}),r<.4&&e.jsx("circle",{cx:s+25,cy:115,r:12-r*16,fill:t.orange,opacity:1-r*1.5})]},i)}),e.jsx("rect",{x:"60",y:"240",width:"240",height:"120",rx:"4",fill:"#FFF9EE",stroke:t.faint}),e.jsx("text",{x:"180",y:"260",fontSize:"11",fontFamily:"var(--mono)",fill:t.faint,textAnchor:"middle",children:"TRAINING OBJECTIVE"}),e.jsx("text",{x:"180",y:"295",fontSize:"14",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.ink,textAnchor:"middle",children:"L = E[‖ε − ε_θ(x_t, t)‖²]"})]}),G=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[e.jsx("text",{x:"180",y:"20",fontSize:"11",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.faint,textAnchor:"middle",children:"Generator vs. Discriminator"}),e.jsx("circle",{cx:"50",cy:"120",r:"22",fill:t.purple,stroke:t.purpleS}),e.jsx("text",{x:"50",y:"125",fontSize:"14",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.ink,textAnchor:"middle",children:"z"}),e.jsx("rect",{x:"110",y:"92",width:"80",height:"56",rx:"3",fill:t.blue,stroke:t.blueS}),e.jsx("text",{x:"150",y:"124",fontSize:"14",fontFamily:"var(--mono)",fill:t.ink,textAnchor:"middle",children:"G"}),e.jsx("rect",{x:"225",y:"100",width:"40",height:"40",rx:"3",fill:t.orange,stroke:t.orangeS}),e.jsx("rect",{x:"225",y:"195",width:"40",height:"40",rx:"3",fill:t.green,stroke:t.greenS}),e.jsx("rect",{x:"290",y:"140",width:"50",height:"50",rx:"3",fill:t.pink,stroke:t.pinkS}),e.jsx("text",{x:"315",y:"170",fontSize:"14",fontFamily:"var(--mono)",fill:t.ink,textAnchor:"middle",children:"D"})]}),q=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[e.jsx("text",{x:"180",y:"20",fontSize:"11",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.faint,textAnchor:"middle",children:"Variational Autoencoder"}),e.jsx("rect",{x:"30",y:"100",width:"40",height:"40",rx:"3",fill:t.green,stroke:t.greenS}),e.jsx("rect",{x:"100",y:"92",width:"60",height:"56",rx:"3",fill:t.blue,stroke:t.blueS}),e.jsx("text",{x:"130",y:"124",fontSize:"11",fontFamily:"var(--mono)",fill:t.ink,textAnchor:"middle",children:"Encoder"}),e.jsx("circle",{cx:"270",cy:"120",r:"14",fill:t.purple,stroke:t.purpleS}),e.jsx("text",{x:"270",y:"124",fontSize:"13",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.ink,textAnchor:"middle",children:"z"}),e.jsx("rect",{x:"100",y:"200",width:"60",height:"56",rx:"3",fill:t.orange,stroke:t.orangeS}),e.jsx("text",{x:"130",y:"232",fontSize:"11",fontFamily:"var(--mono)",fill:t.ink,textAnchor:"middle",children:"Decoder"}),e.jsx("rect",{x:"30",y:"210",width:"40",height:"40",rx:"3",fill:t.pink,stroke:t.pinkS})]}),K=[["my-skill/",""],["├── SKILL.md","# Required: metadata + instructions"],["├── scripts/","# Optional: executable code"],["├── references/","# Optional: documentation"],["├── assets/","# Optional: templates, resources"],["└── ...","# Any additional files or directories"]],Q=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[e.jsx("text",{x:"180",y:"20",fontSize:"11",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.faint,textAnchor:"middle",children:"Skill package layout"}),e.jsx("rect",{x:"28",y:"48",width:"304",height:"318",rx:"8",fill:"#FFFDF8",stroke:t.faint,strokeWidth:"1"}),K.map(([i,s],r)=>{const l=92+r*44;return e.jsxs("g",{children:[e.jsx("text",{x:"44",y:l,fontSize:"11",fontFamily:"var(--mono)",fill:t.ink,dominantBaseline:"middle",children:i}),s?e.jsx("text",{x:"138",y:l,fontSize:"8.5",fontFamily:"var(--mono)",fill:t.faint,dominantBaseline:"middle",children:s}):null]},i)})]}),V={attention:N,"self-attention":N,cnn:R,"u-net":A,unet:A,vit:O,diffusion:_,ddpm:_,gan:G,vae:q,"agent-skills":Q},W=({method:i})=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",children:[e.jsx("text",{x:"180",y:"20",fontSize:"11",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.faint,textAnchor:"middle",children:i.name||"method"}),e.jsx(o,{x:80,y:70,w:200,h:50,fill:t.blue,stroke:t.blueS,label:"Input",fontSize:12}),e.jsx("path",{d:"M180 120 L180 150",stroke:t.ink}),e.jsx(o,{x:80,y:150,w:200,h:70,fill:t.orange,stroke:t.orangeS,label:i.name||"transform",fontSize:13}),e.jsx("path",{d:"M180 220 L180 250",stroke:t.ink}),e.jsx(o,{x:80,y:250,w:200,h:50,fill:t.purple,stroke:t.purpleS,label:"Output",fontSize:12})]}),U=({method:i})=>{const s=(i.slug||"").toLowerCase(),r=V[s];if(r)return e.jsx("div",{className:"method-figure-svg method-figure-svg--schematic",children:e.jsx(r,{})});if(i.image_url){const l=s==="transformer"||s==="gpt-4"||s==="gpt-4o"?" method-figure-svg--compact":s==="rpn"?" method-figure-svg--scaled-80":"";return e.jsx("div",{className:`method-figure-svg method-figure-svg--image${l}`,children:e.jsx("img",{className:"method-figure-img",src:i.image_url,alt:`${i.name} figure`})})}return e.jsx("div",{className:"method-figure-svg method-figure-svg--schematic",children:e.jsx(W,{method:i})})},H=[["trending","trending"],["new","newest"],["cited","most cited"]],z={"on-policy-distillation":["fine-tuning","post-training","rlvr","rlhf","direct-preference-optimization-dpo"],mcp:["agent-skills"],"agent-skills":["mcp"]},oe=()=>{var k,S,v,w;const{methodSlug:i}=E(),[s,r]=y.useState("trending"),l=F({queryKey:["method",i],queryFn:()=>g.getMethod(i),enabled:!!i,staleTime:10*60*1e3}),x=s==="trending"?"trending":s==="cited"?"citation_count":"date_published",d=B({queryKey:["method-papers-infinite",i,x],queryFn:({pageParam:a=1})=>g.getMethodPapers(i,{page:a,page_size:20,order_by:x,order_dir:"desc",include_resources:!0}),getNextPageParam:a=>a.next_page,initialPageParam:1,enabled:!!i,staleTime:5*60*1e3,placeholderData:D}),m=F({queryKey:["related-methods",(k=l.data)==null?void 0:k.slug,(S=l.data)==null?void 0:S.area_id,(v=l.data)==null?void 0:v.id],queryFn:async()=>{const a=z[l.data.slug];return a?Promise.all(a.map(p=>g.getMethod(p))):(await g.getMethods({area_id:l.data.area_id,exclude_id:l.data.id,ordering:"-paper_count",page_size:8})).results},enabled:!!l.data&&(!!z[l.data.slug]||!!l.data.area_id),staleTime:10*60*1e3}),h=y.useMemo(()=>{var c;return(((c=d.data)==null?void 0:c.pages.flatMap(p=>p.results))||[]).map(P)},[d.data]),{targetRef:f,isIntersecting:j}=T({rootMargin:"200px"});if(y.useEffect(()=>{j&&d.hasNextPage&&!d.isFetchingNextPage&&d.fetchNextPage()},[j,d.hasNextPage,d.isFetchingNextPage]),l.isLoading)return e.jsxs("div",{className:"page",children:[e.jsx(u,{className:"h-12 w-1/2 mb-4"}),e.jsx(u,{className:"h-64 w-full"})]});if(l.error||!l.data)return e.jsx("div",{className:"page",children:e.jsx($,{variant:"destructive",children:e.jsx(I,{children:"Method not found."})})});const n=l.data;return e.jsxs("div",{className:"page",children:[e.jsxs("div",{className:"breadcrumb",children:[e.jsx(M,{to:"/methods",children:"Methods"}),e.jsx("span",{className:"sep",children:"/"}),e.jsx("span",{style:{color:"var(--ink)"},children:n.name})]}),e.jsxs("div",{className:`tag-hero method-hero-grid${n.slug==="grokking"?" method-hero-grid--wide-figure":""}`,children:[e.jsxs("div",{children:[e.jsx("div",{className:"tag-hero-eyebrow",children:"METHOD"}),e.jsx("h1",{className:"tag-hero-title method-hero-title",children:n.name}),n.full_name&&n.full_name!==n.name&&e.jsx("div",{style:{fontFamily:"var(--serif)",fontSize:16,fontStyle:"italic",color:"var(--ink-soft)",marginTop:8},children:n.full_name}),n.description&&e.jsx(b,{className:"method-description",text:n.description}),n.source_url&&n.source_title&&e.jsxs("div",{className:"method-source",children:[e.jsx("span",{className:"method-source-label",children:"Source"}),e.jsxs("a",{className:"method-source-link",href:n.source_url,target:"_blank",rel:"noopener noreferrer",children:[e.jsx("span",{className:"method-source-title",children:n.source_title}),n.introduced_year&&e.jsx("span",{className:"method-source-meta",children:n.introduced_year})]})]}),e.jsxs("div",{className:"tag-hero-meta",children:[e.jsxs("div",{className:"stat",children:[e.jsx("span",{className:"label",children:"Papers using"}),e.jsx("span",{className:"value",children:(n.paper_count??0).toLocaleString()})]}),n.introduced_year!=null&&e.jsxs("div",{className:"stat",children:[e.jsx("span",{className:"label",children:"Introduced"}),e.jsx("span",{className:"value",children:n.introduced_year})]})]})]}),e.jsxs("figure",{className:"method-figure-card",children:[e.jsx(U,{method:n}),n.image_credit&&e.jsx("figcaption",{children:e.jsx(b,{className:"method-image-credit",text:n.image_credit})})]})]}),(((w=m.data)==null?void 0:w.length)??0)>0&&e.jsxs("div",{className:"filter-row",children:[e.jsx("span",{className:"label",children:"Related methods"}),m.data.map(a=>e.jsx(L,{method:{slug:a.slug,name:a.name}},a.id))]}),e.jsxs("div",{className:"sort-bar",children:[e.jsx("div",{className:"sort-options",children:H.map(([a,c])=>e.jsx("button",{className:`sort-btn ${s===a?"active":""}`,onClick:()=>r(a),children:c},a))}),e.jsxs("div",{className:"results-count",children:[h.length," papers using ",n.name]})]}),d.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((a,c)=>e.jsx(u,{className:"h-40 w-full"},c))}):h.length===0?e.jsx("div",{className:"no-results",children:"No papers tagged with this method yet."}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:h.map((a,c)=>e.jsx(C,{paper:a,rank:c+1},a.id))}),e.jsx("div",{ref:f,style:{height:1}}),d.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]})};export{oe as default};
 
 
assets/MethodDetailView-D3JQs4Ab.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{j as e,e as E,r as y,L as M,b as g,ab as D}from"./index-CKAClQ2e.js";import{u as F}from"./useQuery-DVaOQYVk.js";import{u as B}from"./useInfiniteQuery-BaNuOv30.js";import{M as L,P as C}from"./components-CM9AEXO8.js";import{M as b}from"./MarkdownText-Cuf1_4O5.js";import{t as P}from"./transform-BCXN61O6.js";import{u as T}from"./useIntersectionObserver-Bzsb1rr2.js";import{S as u}from"./skeleton-BYz337Ss.js";import{A as $,a as I}from"./alert-4m2SJo0T.js";import"./LatexTitle-DBZLS4yb.js";import"./katex.min-BSBacQyE.js";import"./index-DuEHueKe.js";import"./index-b1s0T9nh.js";const t={pink:"#F8D7D9",pinkS:"#D9B0B3",yellow:"#FBEFC2",yellowS:"#C9B97D",orange:"#F8D7B3",orangeS:"#C99466",blue:"#CDE2EE",blueS:"#7FA4BA",purple:"#D4D2EA",purpleS:"#8E8AC0",green:"#CCE2C5",greenS:"#7DA475",ink:"#1A1814",faint:"#8E8678"},o=({x:i,y:s,w:r,h:l,fill:x,stroke:d,label:m,fontSize:h=10,multiline:f})=>e.jsxs("g",{children:[e.jsx("rect",{x:i,y:s,width:r,height:l,rx:"3",ry:"3",fill:x,stroke:d,strokeWidth:"1"}),f?e.jsxs(e.Fragment,{children:[e.jsx("text",{x:i+r/2,y:s+l/2-2,fontSize:h,fontFamily:"var(--sans)",fill:t.ink,textAnchor:"middle",dominantBaseline:"middle",children:f[0]}),e.jsx("text",{x:i+r/2,y:s+l/2+h-1,fontSize:h,fontFamily:"var(--sans)",fill:t.ink,textAnchor:"middle",dominantBaseline:"middle",children:f[1]})]}):e.jsx("text",{x:i+r/2,y:s+l/2,fontSize:h,fontFamily:"var(--sans)",fill:t.ink,textAnchor:"middle",dominantBaseline:"middle",children:m})]}),N=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[e.jsx("text",{x:"180",y:"20",fontSize:"11",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.faint,textAnchor:"middle",children:"Scaled Dot-Product Attention"}),e.jsx(o,{x:140,y:40,w:80,h:26,fill:t.yellow,stroke:t.yellowS,label:"MatMul",fontSize:11}),e.jsx("path",{d:"M180 66 L180 80",stroke:t.ink}),e.jsx(o,{x:140,y:80,w:80,h:26,fill:t.green,stroke:t.greenS,label:"SoftMax",fontSize:11}),e.jsx("path",{d:"M180 106 L180 120",stroke:t.ink}),e.jsx(o,{x:140,y:120,w:80,h:26,fill:t.purple,stroke:t.purpleS,label:"Mask (opt.)",fontSize:11}),e.jsx("path",{d:"M180 146 L180 160",stroke:t.ink}),e.jsx(o,{x:140,y:160,w:80,h:26,fill:t.blue,stroke:t.blueS,label:"Scale ÷√dₖ",fontSize:11}),e.jsx("path",{d:"M180 186 L180 200",stroke:t.ink}),e.jsx(o,{x:140,y:200,w:80,h:26,fill:t.yellow,stroke:t.yellowS,label:"MatMul",fontSize:11}),e.jsx("path",{d:"M156 226 L120 270",stroke:t.ink}),e.jsx("path",{d:"M180 226 L180 270",stroke:t.ink}),e.jsx("path",{d:"M204 226 L240 270",stroke:t.ink}),e.jsx(o,{x:100,y:270,w:40,h:24,fill:t.pink,stroke:t.pinkS,label:"Q",fontSize:13}),e.jsx(o,{x:160,y:270,w:40,h:24,fill:t.pink,stroke:t.pinkS,label:"K",fontSize:13}),e.jsx(o,{x:220,y:270,w:40,h:24,fill:t.pink,stroke:t.pinkS,label:"V",fontSize:13}),e.jsxs("text",{x:"180",y:"330",fontSize:"14",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.ink,textAnchor:"middle",children:["softmax(QK",e.jsx("tspan",{fontSize:"9",baselineShift:"super",children:"⊤"})," / √d) V"]})]}),R=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[[0,1,2,3].map(i=>{const s=30+i*75,r=60-i*8,l=240-i*30;return e.jsx("g",{children:e.jsx("rect",{x:s,y:(420-l)/2,width:r,height:l,rx:"2",fill:[t.blue,t.green,t.orange,t.purple][i],stroke:[t.blueS,t.greenS,t.orangeS,t.purpleS][i],strokeWidth:"1"})},i)}),e.jsx("text",{x:"60",y:"395",fontSize:"9",fontFamily:"var(--mono)",fill:t.faint,textAnchor:"middle",children:"conv"}),e.jsx("text",{x:"135",y:"395",fontSize:"9",fontFamily:"var(--mono)",fill:t.faint,textAnchor:"middle",children:"conv"}),e.jsx("text",{x:"210",y:"395",fontSize:"9",fontFamily:"var(--mono)",fill:t.faint,textAnchor:"middle",children:"conv"}),e.jsx("text",{x:"285",y:"395",fontSize:"9",fontFamily:"var(--mono)",fill:t.faint,textAnchor:"middle",children:"fc"})]}),A=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[[0,1,2,3].map(i=>{const r=60+i*80,l=100-i*12,x=50-i*6;return e.jsx("rect",{x:50,y:r,width:l,height:x,rx:"2",fill:t.blue,stroke:t.blueS,strokeWidth:"1"},`e${i}`)}),e.jsx("rect",{x:"155",y:"320",width:"50",height:"40",rx:"2",fill:t.purple,stroke:t.purpleS}),[0,1,2,3].map(i=>{const r=60+i*80,l=100-i*12,x=50-i*6;return e.jsx("rect",{x:210,y:r,width:l,height:x,rx:"2",fill:t.green,stroke:t.greenS,strokeWidth:"1"},`d${i}`)}),[0,1,2,3].map(i=>{const s=60+i*80+(50-i*6)/2,r=50+(100-i*12);return e.jsx("path",{d:`M${r} ${s} L210 ${s}`,stroke:t.faint,strokeDasharray:"4 3"},`s${i}`)}),e.jsx("text",{x:"100",y:"40",fontSize:"10",fontFamily:"var(--mono)",fill:t.faint,textAnchor:"middle",children:"encoder"}),e.jsx("text",{x:"260",y:"40",fontSize:"10",fontFamily:"var(--mono)",fill:t.faint,textAnchor:"middle",children:"decoder"}),e.jsx("text",{x:"180",y:"395",fontSize:"9",fontFamily:"var(--mono)",fill:t.faint,textAnchor:"middle",children:"skip connections preserve high-res features"})]}),O=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[[0,1,2].map(i=>[0,1,2].map(s=>e.jsx("rect",{x:20+s*40,y:40+i*40,width:"38",height:"38",fill:["#F8D7D9","#FBEFC2","#CDE2EE","#CCE2C5","#D4D2EA","#F8D7B3","#F8D7D9","#FBEFC2","#CDE2EE"][i*3+s],stroke:t.faint},`${i}-${s}`))),e.jsx("rect",{x:"40",y:"245",width:"280",height:"120",rx:"4",fill:"#EFEBE0",stroke:t.faint,strokeDasharray:"3 2"}),e.jsx(o,{x:70,y:258,w:220,h:20,fill:t.yellow,stroke:t.yellowS,label:"Norm"}),e.jsx(o,{x:70,y:282,w:220,h:28,fill:t.orange,stroke:t.orangeS,label:"Multi-Head Attention"}),e.jsx(o,{x:70,y:314,w:220,h:20,fill:t.yellow,stroke:t.yellowS,label:"Norm"}),e.jsx(o,{x:70,y:338,w:220,h:20,fill:t.blue,stroke:t.blueS,label:"MLP"}),e.jsx("text",{x:"180",y:"385",fontSize:"10",fontFamily:"var(--mono)",fill:t.faint,textAnchor:"middle",children:"Transformer Encoder · L×"})]}),_=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[e.jsx("text",{x:"180",y:"50",fontSize:"11",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.faint,textAnchor:"middle",children:"Reverse process: pure noise → sample"}),[0,1,2,3,4,5].map(i=>{const s=25+i*56,r=(5-i)/5;return e.jsxs("g",{children:[e.jsx("rect",{x:s,y:90,width:50,height:50,rx:"3",fill:`oklch(${.85-r*.1} 0.04 250)`,stroke:t.faint}),r<.4&&e.jsx("circle",{cx:s+25,cy:115,r:12-r*16,fill:t.orange,opacity:1-r*1.5})]},i)}),e.jsx("rect",{x:"60",y:"240",width:"240",height:"120",rx:"4",fill:"#FFF9EE",stroke:t.faint}),e.jsx("text",{x:"180",y:"260",fontSize:"11",fontFamily:"var(--mono)",fill:t.faint,textAnchor:"middle",children:"TRAINING OBJECTIVE"}),e.jsx("text",{x:"180",y:"295",fontSize:"14",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.ink,textAnchor:"middle",children:"L = E[‖ε − ε_θ(x_t, t)‖²]"})]}),G=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[e.jsx("text",{x:"180",y:"20",fontSize:"11",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.faint,textAnchor:"middle",children:"Generator vs. Discriminator"}),e.jsx("circle",{cx:"50",cy:"120",r:"22",fill:t.purple,stroke:t.purpleS}),e.jsx("text",{x:"50",y:"125",fontSize:"14",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.ink,textAnchor:"middle",children:"z"}),e.jsx("rect",{x:"110",y:"92",width:"80",height:"56",rx:"3",fill:t.blue,stroke:t.blueS}),e.jsx("text",{x:"150",y:"124",fontSize:"14",fontFamily:"var(--mono)",fill:t.ink,textAnchor:"middle",children:"G"}),e.jsx("rect",{x:"225",y:"100",width:"40",height:"40",rx:"3",fill:t.orange,stroke:t.orangeS}),e.jsx("rect",{x:"225",y:"195",width:"40",height:"40",rx:"3",fill:t.green,stroke:t.greenS}),e.jsx("rect",{x:"290",y:"140",width:"50",height:"50",rx:"3",fill:t.pink,stroke:t.pinkS}),e.jsx("text",{x:"315",y:"170",fontSize:"14",fontFamily:"var(--mono)",fill:t.ink,textAnchor:"middle",children:"D"})]}),q=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[e.jsx("text",{x:"180",y:"20",fontSize:"11",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.faint,textAnchor:"middle",children:"Variational Autoencoder"}),e.jsx("rect",{x:"30",y:"100",width:"40",height:"40",rx:"3",fill:t.green,stroke:t.greenS}),e.jsx("rect",{x:"100",y:"92",width:"60",height:"56",rx:"3",fill:t.blue,stroke:t.blueS}),e.jsx("text",{x:"130",y:"124",fontSize:"11",fontFamily:"var(--mono)",fill:t.ink,textAnchor:"middle",children:"Encoder"}),e.jsx("circle",{cx:"270",cy:"120",r:"14",fill:t.purple,stroke:t.purpleS}),e.jsx("text",{x:"270",y:"124",fontSize:"13",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.ink,textAnchor:"middle",children:"z"}),e.jsx("rect",{x:"100",y:"200",width:"60",height:"56",rx:"3",fill:t.orange,stroke:t.orangeS}),e.jsx("text",{x:"130",y:"232",fontSize:"11",fontFamily:"var(--mono)",fill:t.ink,textAnchor:"middle",children:"Decoder"}),e.jsx("rect",{x:"30",y:"210",width:"40",height:"40",rx:"3",fill:t.pink,stroke:t.pinkS})]}),K=[["my-skill/",""],["├── SKILL.md","# Required: metadata + instructions"],["├── scripts/","# Optional: executable code"],["├── references/","# Optional: documentation"],["├── assets/","# Optional: templates, resources"],["└── ...","# Any additional files or directories"]],Q=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[e.jsx("text",{x:"180",y:"20",fontSize:"11",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.faint,textAnchor:"middle",children:"Skill package layout"}),e.jsx("rect",{x:"28",y:"48",width:"304",height:"318",rx:"8",fill:"#FFFDF8",stroke:t.faint,strokeWidth:"1"}),K.map(([i,s],r)=>{const l=92+r*44;return e.jsxs("g",{children:[e.jsx("text",{x:"44",y:l,fontSize:"11",fontFamily:"var(--mono)",fill:t.ink,dominantBaseline:"middle",children:i}),s?e.jsx("text",{x:"138",y:l,fontSize:"8.5",fontFamily:"var(--mono)",fill:t.faint,dominantBaseline:"middle",children:s}):null]},i)})]}),V={attention:N,"self-attention":N,cnn:R,"u-net":A,unet:A,vit:O,diffusion:_,ddpm:_,gan:G,vae:q,"agent-skills":Q},W=({method:i})=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",children:[e.jsx("text",{x:"180",y:"20",fontSize:"11",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.faint,textAnchor:"middle",children:i.name||"method"}),e.jsx(o,{x:80,y:70,w:200,h:50,fill:t.blue,stroke:t.blueS,label:"Input",fontSize:12}),e.jsx("path",{d:"M180 120 L180 150",stroke:t.ink}),e.jsx(o,{x:80,y:150,w:200,h:70,fill:t.orange,stroke:t.orangeS,label:i.name||"transform",fontSize:13}),e.jsx("path",{d:"M180 220 L180 250",stroke:t.ink}),e.jsx(o,{x:80,y:250,w:200,h:50,fill:t.purple,stroke:t.purpleS,label:"Output",fontSize:12})]}),U=({method:i})=>{const s=(i.slug||"").toLowerCase(),r=V[s];if(r)return e.jsx("div",{className:"method-figure-svg method-figure-svg--schematic",children:e.jsx(r,{})});if(i.image_url){const l=s==="transformer"||s==="gpt-4"||s==="gpt-4o"?" method-figure-svg--compact":s==="rpn"?" method-figure-svg--scaled-80":"";return e.jsx("div",{className:`method-figure-svg method-figure-svg--image${l}`,children:e.jsx("img",{className:"method-figure-img",src:i.image_url,alt:`${i.name} figure`})})}return e.jsx("div",{className:"method-figure-svg method-figure-svg--schematic",children:e.jsx(W,{method:i})})},H=[["trending","trending"],["new","newest"],["cited","most cited"]],z={"on-policy-distillation":["fine-tuning","post-training","rlvr","rlhf","direct-preference-optimization-dpo"],mcp:["agent-skills"],"agent-skills":["mcp"]},de=()=>{var k,S,v,w;const{methodSlug:i}=E(),[s,r]=y.useState("trending"),l=F({queryKey:["method",i],queryFn:()=>g.getMethod(i),enabled:!!i,staleTime:10*60*1e3}),x=s==="trending"?"trending":s==="cited"?"citation_count":"date_published",d=B({queryKey:["method-papers-infinite",i,x],queryFn:({pageParam:a=1})=>g.getMethodPapers(i,{page:a,page_size:20,order_by:x,order_dir:"desc",include_resources:!0}),getNextPageParam:a=>a.next_page,initialPageParam:1,enabled:!!i,staleTime:5*60*1e3,placeholderData:D}),m=F({queryKey:["related-methods",(k=l.data)==null?void 0:k.slug,(S=l.data)==null?void 0:S.area_id,(v=l.data)==null?void 0:v.id],queryFn:async()=>{const a=z[l.data.slug];return a?Promise.all(a.map(p=>g.getMethod(p))):(await g.getMethods({area_id:l.data.area_id,exclude_id:l.data.id,ordering:"-paper_count",page_size:8})).results},enabled:!!l.data&&(!!z[l.data.slug]||!!l.data.area_id),staleTime:10*60*1e3}),h=y.useMemo(()=>{var c;return(((c=d.data)==null?void 0:c.pages.flatMap(p=>p.results))||[]).map(P)},[d.data]),{targetRef:f,isIntersecting:j}=T({rootMargin:"200px"});if(y.useEffect(()=>{j&&d.hasNextPage&&!d.isFetchingNextPage&&d.fetchNextPage()},[j,d.hasNextPage,d.isFetchingNextPage]),l.isLoading)return e.jsxs("div",{className:"page",children:[e.jsx(u,{className:"h-12 w-1/2 mb-4"}),e.jsx(u,{className:"h-64 w-full"})]});if(l.error||!l.data)return e.jsx("div",{className:"page",children:e.jsx($,{variant:"destructive",children:e.jsx(I,{children:"Method not found."})})});const n=l.data;return e.jsxs("div",{className:"page",children:[e.jsxs("div",{className:"breadcrumb",children:[e.jsx(M,{to:"/methods",children:"Methods"}),e.jsx("span",{className:"sep",children:"/"}),e.jsx("span",{style:{color:"var(--ink)"},children:n.name})]}),e.jsxs("div",{className:`tag-hero method-hero-grid${n.slug==="grokking"?" method-hero-grid--wide-figure":""}`,children:[e.jsxs("div",{children:[e.jsx("div",{className:"tag-hero-eyebrow",children:"METHOD"}),e.jsx("h1",{className:"tag-hero-title method-hero-title",children:n.name}),n.full_name&&n.full_name!==n.name&&e.jsx("div",{style:{fontFamily:"var(--serif)",fontSize:16,fontStyle:"italic",color:"var(--ink-soft)",marginTop:8},children:n.full_name}),n.description&&e.jsx(b,{className:"method-description",text:n.description}),n.source_url&&n.source_title&&e.jsxs("div",{className:"method-source",children:[e.jsx("span",{className:"method-source-label",children:"Source"}),e.jsxs("a",{className:"method-source-link",href:n.source_url,target:"_blank",rel:"noopener noreferrer",children:[e.jsx("span",{className:"method-source-title",children:n.source_title}),n.introduced_year&&e.jsx("span",{className:"method-source-meta",children:n.introduced_year})]})]}),e.jsxs("div",{className:"tag-hero-meta",children:[e.jsxs("div",{className:"stat",children:[e.jsx("span",{className:"label",children:"Papers using"}),e.jsx("span",{className:"value",children:(n.paper_count??0).toLocaleString()})]}),n.introduced_year!=null&&e.jsxs("div",{className:"stat",children:[e.jsx("span",{className:"label",children:"Introduced"}),e.jsx("span",{className:"value",children:n.introduced_year})]})]})]}),e.jsxs("figure",{className:"method-figure-card",children:[e.jsx(U,{method:n}),n.image_credit&&e.jsx("figcaption",{children:e.jsx(b,{className:"method-image-credit",text:n.image_credit})})]})]}),(((w=m.data)==null?void 0:w.length)??0)>0&&e.jsxs("div",{className:"filter-row",children:[e.jsx("span",{className:"label",children:"Related methods"}),m.data.map(a=>e.jsx(L,{method:{slug:a.slug,name:a.name}},a.id))]}),e.jsxs("div",{className:"sort-bar",children:[e.jsx("div",{className:"sort-options",children:H.map(([a,c])=>e.jsx("button",{className:`sort-btn ${s===a?"active":""}`,onClick:()=>r(a),children:c},a))}),e.jsxs("div",{className:"results-count",children:[h.length," papers using ",n.name]})]}),d.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((a,c)=>e.jsx(u,{className:"h-40 w-full"},c))}):h.length===0?e.jsx("div",{className:"no-results",children:"No papers tagged with this method yet."}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:h.map((a,c)=>e.jsx(C,{paper:a,rank:c+1},a.id))}),e.jsx("div",{ref:f,style:{height:1}}),d.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]})};export{de as default};
assets/{MethodsIndexView-CwnA2RZu.js → MethodsIndexView-DTbY1iYX.js} RENAMED
@@ -1 +1 @@
1
- import{r as u,j as e,L as x,a as c}from"./index-EtWJP9FK.js";import{u as h}from"./useQuery-CRN8HQuX.js";import{S as m}from"./skeleton-DMjGQB3S.js";import{A as g,a as j}from"./alert-BIanajMT.js";const N=()=>{var o,d;const i=h({queryKey:["areas-all"],queryFn:()=>c.getAreas({page_size:50,ordering:"name"}),staleTime:6e5}),n=h({queryKey:["methods-all"],queryFn:async()=>(await c.getMethods({page:1,page_size:500,ordering:"-paper_count"})).results,staleTime:10*60*1e3}),l=u.useMemo(()=>{if(!n.data||!i.data)return null;const a={};return n.data.forEach(r=>{const t=r.area_id??"_unassigned";(a[t]||(a[t]=[])).push(r)}),Object.values(a).forEach(r=>r.sort((t,s)=>(s.paper_count||0)-(t.paper_count||0))),a},[n.data,i.data]);return i.error||n.error?e.jsx("div",{className:"page",children:e.jsx(g,{variant:"destructive",children:e.jsx(j,{children:"Failed to load methods."})})}):e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["Methods ",e.jsx("em",{children:"library"})]}),e.jsx("div",{className:"feed-subtitle",children:"Common techniques used across AI research, with the papers that use them."})]})}),i.isLoading||n.isLoading?e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:32},children:Array.from({length:4}).map((a,r)=>e.jsxs("div",{children:[e.jsx(m,{className:"h-8 w-1/3 mb-4"}),e.jsx("div",{className:"tag-grid",children:Array.from({length:8}).map((t,s)=>e.jsx(m,{className:"h-20"},s))})]},r))}):(d=(o=i.data)==null?void 0:o.results)==null?void 0:d.map(a=>{const r=(l==null?void 0:l[a.id])||[];if(r.length===0)return null;const t=r.reduce((s,p)=>s+(p.paper_count||0),0);return e.jsxs("section",{style:{marginBottom:48},children:[e.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:24,paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},children:[e.jsx("div",{children:e.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.02em",marginBottom:4},children:a.name})}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[r.length," methods · ",t.toLocaleString()," papers"]})]}),e.jsx("div",{className:"tag-grid",children:r.map(s=>e.jsxs(x,{to:`/methods/${s.slug||s.id}`,className:"tag-cell",children:[e.jsx("div",{className:"name",style:{fontFamily:"var(--mono)",fontSize:15},children:s.name}),e.jsxs("div",{className:"meta",children:[e.jsxs("span",{children:[(s.paper_count??0).toLocaleString()," papers"]}),s.introduced_year!=null&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"·"}),e.jsx("span",{children:s.introduced_year})]})]})]},s.id))})]},a.id)})]})};export{N as default};
 
1
+ import{r as u,j as e,L as x,b as c}from"./index-CKAClQ2e.js";import{u as h}from"./useQuery-DVaOQYVk.js";import{S as m}from"./skeleton-BYz337Ss.js";import{A as g,a as j}from"./alert-4m2SJo0T.js";const N=()=>{var o,d;const i=h({queryKey:["areas-all"],queryFn:()=>c.getAreas({page_size:50,ordering:"name"}),staleTime:6e5}),n=h({queryKey:["methods-all"],queryFn:async()=>(await c.getMethods({page:1,page_size:500,ordering:"-paper_count"})).results,staleTime:10*60*1e3}),l=u.useMemo(()=>{if(!n.data||!i.data)return null;const a={};return n.data.forEach(r=>{const t=r.area_id??"_unassigned";(a[t]||(a[t]=[])).push(r)}),Object.values(a).forEach(r=>r.sort((t,s)=>(s.paper_count||0)-(t.paper_count||0))),a},[n.data,i.data]);return i.error||n.error?e.jsx("div",{className:"page",children:e.jsx(g,{variant:"destructive",children:e.jsx(j,{children:"Failed to load methods."})})}):e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["Methods ",e.jsx("em",{children:"library"})]}),e.jsx("div",{className:"feed-subtitle",children:"Common techniques used across AI research, with the papers that use them."})]})}),i.isLoading||n.isLoading?e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:32},children:Array.from({length:4}).map((a,r)=>e.jsxs("div",{children:[e.jsx(m,{className:"h-8 w-1/3 mb-4"}),e.jsx("div",{className:"tag-grid",children:Array.from({length:8}).map((t,s)=>e.jsx(m,{className:"h-20"},s))})]},r))}):(d=(o=i.data)==null?void 0:o.results)==null?void 0:d.map(a=>{const r=(l==null?void 0:l[a.id])||[];if(r.length===0)return null;const t=r.reduce((s,p)=>s+(p.paper_count||0),0);return e.jsxs("section",{style:{marginBottom:48},children:[e.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:24,paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},children:[e.jsx("div",{children:e.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.02em",marginBottom:4},children:a.name})}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[r.length," methods · ",t.toLocaleString()," papers"]})]}),e.jsx("div",{className:"tag-grid",children:r.map(s=>e.jsxs(x,{to:`/methods/${s.slug||s.id}`,className:"tag-cell",children:[e.jsx("div",{className:"name",style:{fontFamily:"var(--mono)",fontSize:15},children:s.name}),e.jsxs("div",{className:"meta",children:[e.jsxs("span",{children:[(s.paper_count??0).toLocaleString()," papers"]}),s.introduced_year!=null&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"·"}),e.jsx("span",{children:s.introduced_year})]})]})]},s.id))})]},a.id)})]})};export{N as default};
assets/{NotFound-D1qW6IOs.js → NotFound-CMFfChHB.js} RENAMED
@@ -1 +1 @@
1
- import{aA as o,r as a,j as t,L as s}from"./index-EtWJP9FK.js";const r=()=>{const e=o();return a.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",e.pathname)},[e.pathname]),t.jsxs("div",{className:"page",style:{textAlign:"center",paddingTop:96},children:[t.jsx("h1",{className:"detail-title",style:{fontSize:96,marginBottom:8},children:"404"}),t.jsx("p",{style:{fontFamily:"var(--serif)",fontStyle:"italic",color:"var(--ink-soft)",marginBottom:24},children:"That route isn't on the map."}),t.jsx(s,{to:"/",className:"action-btn",children:"Return home"})]})};export{r as default};
 
1
+ import{aF as o,r as a,j as t,L as s}from"./index-CKAClQ2e.js";const r=()=>{const e=o();return a.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",e.pathname)},[e.pathname]),t.jsxs("div",{className:"page",style:{textAlign:"center",paddingTop:96},children:[t.jsx("h1",{className:"detail-title",style:{fontSize:96,marginBottom:8},children:"404"}),t.jsx("p",{style:{fontFamily:"var(--serif)",fontStyle:"italic",color:"var(--ink-soft)",marginBottom:24},children:"That route isn't on the map."}),t.jsx(s,{to:"/",className:"action-btn",children:"Return home"})]})};export{r as default};
assets/OrganizationDetailView-DWso-WLp.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{e as j,r as y,j as e,L as f,b as v}from"./index-CKAClQ2e.js";import{u as b}from"./useQuery-DVaOQYVk.js";import{M as k}from"./MarkdownText-Cuf1_4O5.js";import{e as N,h as S,d as _}from"./transform-BCXN61O6.js";import{S as p}from"./skeleton-BYz337Ss.js";import{A as w,a as F}from"./alert-4m2SJo0T.js";import A from"./NotFound-CMFfChHB.js";import"./katex.min-BSBacQyE.js";import"./index-DuEHueKe.js";import"./index-b1s0T9nh.js";const B=i=>(i==null?void 0:i.trim().toLowerCase().replace(/[\s_]+/g,"-"))??"",z=()=>{var g,x;const{orgSlug:i}=j(),n=b({queryKey:["organization-areas-with-tasks",i],queryFn:()=>v.getOrganizationAreasWithTasks(i),enabled:!!i,staleTime:10*60*1e3}),m=y.useMemo(()=>{if(!n.data)return[];const t={general:0,vision:1,video:2,language:3,audio:4,other:5},r=o=>t[B(o)]??999;return[...n.data.results].sort((o,a)=>{const l=r(o.name),d=r(a.name);return l!==d?l-d:o.name.localeCompare(a.name)})},[n.data]),s=(g=n.data)==null?void 0:g.organization,c=((x=n.data)==null?void 0:x.total_paper_count)??0,h=m.reduce((t,r)=>t+r.tasks.length,0);if(n.error)return n.error.status===404?e.jsx(A,{}):e.jsx("div",{className:"page",children:e.jsx(w,{variant:"destructive",children:e.jsx(F,{children:"Failed to load organization. Please try again."})})});const u=s==null?void 0:s.name;return e.jsxs("div",{className:"page",children:[e.jsxs("div",{children:[e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",letterSpacing:"0.1em",marginBottom:8},children:"ORGANIZATION"}),e.jsxs("h1",{className:"feed-title",style:{display:"flex",alignItems:"center",gap:12},children:[(s==null?void 0:s.logo_url)&&e.jsx("img",{src:s.logo_url,alt:"",style:{height:"0.9em",width:"auto",borderRadius:4,objectFit:"contain"},onError:t=>{t.currentTarget.style.display="none"}}),u??e.jsx(p,{className:"h-10 w-64 inline-block"})]}),e.jsxs("div",{className:"feed-subtitle",style:{display:"flex",flexDirection:"column",gap:4},children:[e.jsxs("span",{children:[c.toLocaleString()," papers"]}),(s==null?void 0:s.website_url)&&e.jsx("a",{href:s.website_url,target:"_blank",rel:"noopener noreferrer",style:{color:"var(--accent-text)"},children:s.website_url.replace(/^https?:\/\//,"").replace(/\/$/,"")}),(s==null?void 0:s.github_url)&&e.jsx("a",{href:s.github_url,target:"_blank",rel:"noopener noreferrer",style:{color:"var(--accent-text)"},children:s.github_url.replace(/^https?:\/\//,"").replace(/\/$/,"")}),(s==null?void 0:s.hf_url)&&e.jsxs("a",{className:"bm-action-btn",href:s.hf_url,target:"_blank",rel:"noopener noreferrer",style:{alignSelf:"flex-start",marginTop:4},children:[e.jsx("span",{"aria-hidden":"true",children:"🤗"})," View on Hugging Face"]})]}),(s==null?void 0:s.description)&&e.jsx(k,{className:"method-description",text:s.description})]}),!n.isLoading&&c>0&&e.jsxs("section",{style:{marginTop:48,marginBottom:48},children:[e.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:24,paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},children:[e.jsxs("div",{children:[e.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.02em",marginBottom:4},children:"Browse papers"}),e.jsx("div",{style:{fontFamily:"var(--serif)",fontStyle:"italic",fontSize:13,color:"var(--ink-soft)"},children:"All papers attributed to this organization."})]}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[c.toLocaleString()," papers"]})]}),e.jsx("div",{className:"tag-grid",children:e.jsxs(f,{to:`/${i}/all`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:"var(--accent)"}}),"All papers"]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[c.toLocaleString()," papers"]})})]})})]}),n.isLoading?e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:32},children:Array.from({length:4}).map((t,r)=>e.jsxs("div",{children:[e.jsx(p,{className:"h-8 w-1/3 mb-4"}),e.jsx("div",{className:"tag-grid",children:Array.from({length:6}).map((o,a)=>e.jsx(p,{className:"h-24"},a))})]},r))}):m.map(t=>{const r=t.tasks;if(r.length===0)return null;const o=r.reduce((a,l)=>a+(l.paper_count||0),0);return e.jsxs("section",{style:{marginBottom:48},children:[e.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:24,paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},children:[e.jsxs("div",{children:[e.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.02em",marginBottom:4},children:t.name}),t.description&&e.jsx("div",{style:{fontFamily:"var(--serif)",fontStyle:"italic",fontSize:13,color:"var(--ink-soft)"},children:t.description})]}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[r.length," ",r.length===1?"task":"tasks"," · ",o.toLocaleString()," papers"]})]}),e.jsx("div",{className:"tag-grid",children:r.map(a=>{const l=a.slug||"",d=N(S(l));return e.jsxs(f,{to:`/${i}/${l}`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:d.dot}}),_(a.name,l)]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[(a.paper_count??0).toLocaleString()," papers"]})})]},a.id)})})]},t.id)}),h>0&&e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",marginTop:24},children:[h," tasks across ",m.filter(t=>t.tasks.length>0).length," areas."]})]})};export{z as default};
assets/OrganizationDetailView-DgzK5QKX.js DELETED
@@ -1 +0,0 @@
1
- import{_ as j,r as y,j as e,L as f,a as v}from"./index-EtWJP9FK.js";import{u as b}from"./useQuery-CRN8HQuX.js";import{M as k}from"./MarkdownText-Bj8B42V4.js";import{e as N,h as S,d as _}from"./transform-BnMt6tRc.js";import{S as p}from"./skeleton-DMjGQB3S.js";import{A as w,a as F}from"./alert-BIanajMT.js";import A from"./NotFound-D1qW6IOs.js";import"./katex.min-BSBacQyE.js";import"./index-By9W8E5I.js";const B=i=>(i==null?void 0:i.trim().toLowerCase().replace(/[\s_]+/g,"-"))??"",P=()=>{var g,x;const{orgSlug:i}=j(),n=b({queryKey:["organization-areas-with-tasks",i],queryFn:()=>v.getOrganizationAreasWithTasks(i),enabled:!!i,staleTime:10*60*1e3}),m=y.useMemo(()=>{if(!n.data)return[];const t={general:0,vision:1,video:2,language:3,audio:4,other:5},r=o=>t[B(o)]??999;return[...n.data.results].sort((o,a)=>{const l=r(o.name),d=r(a.name);return l!==d?l-d:o.name.localeCompare(a.name)})},[n.data]),s=(g=n.data)==null?void 0:g.organization,c=((x=n.data)==null?void 0:x.total_paper_count)??0,h=m.reduce((t,r)=>t+r.tasks.length,0);if(n.error)return n.error.status===404?e.jsx(A,{}):e.jsx("div",{className:"page",children:e.jsx(w,{variant:"destructive",children:e.jsx(F,{children:"Failed to load organization. Please try again."})})});const u=s==null?void 0:s.name;return e.jsxs("div",{className:"page",children:[e.jsxs("div",{children:[e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",letterSpacing:"0.1em",marginBottom:8},children:"ORGANIZATION"}),e.jsxs("h1",{className:"feed-title",style:{display:"flex",alignItems:"center",gap:12},children:[(s==null?void 0:s.logo_url)&&e.jsx("img",{src:s.logo_url,alt:"",style:{height:"0.9em",width:"auto",borderRadius:4,objectFit:"contain"},onError:t=>{t.currentTarget.style.display="none"}}),u??e.jsx(p,{className:"h-10 w-64 inline-block"})]}),e.jsxs("div",{className:"feed-subtitle",style:{display:"flex",flexDirection:"column",gap:4},children:[e.jsxs("span",{children:[c.toLocaleString()," papers"]}),(s==null?void 0:s.website_url)&&e.jsx("a",{href:s.website_url,target:"_blank",rel:"noopener noreferrer",style:{color:"var(--accent-text)"},children:s.website_url.replace(/^https?:\/\//,"").replace(/\/$/,"")}),(s==null?void 0:s.github_url)&&e.jsx("a",{href:s.github_url,target:"_blank",rel:"noopener noreferrer",style:{color:"var(--accent-text)"},children:s.github_url.replace(/^https?:\/\//,"").replace(/\/$/,"")}),(s==null?void 0:s.hf_url)&&e.jsxs("a",{className:"bm-action-btn",href:s.hf_url,target:"_blank",rel:"noopener noreferrer",style:{alignSelf:"flex-start",marginTop:4},children:[e.jsx("span",{"aria-hidden":"true",children:"🤗"})," View on Hugging Face"]})]}),(s==null?void 0:s.description)&&e.jsx(k,{className:"method-description",text:s.description})]}),!n.isLoading&&c>0&&e.jsxs("section",{style:{marginTop:48,marginBottom:48},children:[e.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:24,paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},children:[e.jsxs("div",{children:[e.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.02em",marginBottom:4},children:"Browse papers"}),e.jsx("div",{style:{fontFamily:"var(--serif)",fontStyle:"italic",fontSize:13,color:"var(--ink-soft)"},children:"All papers attributed to this organization."})]}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[c.toLocaleString()," papers"]})]}),e.jsx("div",{className:"tag-grid",children:e.jsxs(f,{to:`/${i}/all`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:"var(--accent)"}}),"All papers"]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[c.toLocaleString()," papers"]})})]})})]}),n.isLoading?e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:32},children:Array.from({length:4}).map((t,r)=>e.jsxs("div",{children:[e.jsx(p,{className:"h-8 w-1/3 mb-4"}),e.jsx("div",{className:"tag-grid",children:Array.from({length:6}).map((o,a)=>e.jsx(p,{className:"h-24"},a))})]},r))}):m.map(t=>{const r=t.tasks;if(r.length===0)return null;const o=r.reduce((a,l)=>a+(l.paper_count||0),0);return e.jsxs("section",{style:{marginBottom:48},children:[e.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:24,paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},children:[e.jsxs("div",{children:[e.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.02em",marginBottom:4},children:t.name}),t.description&&e.jsx("div",{style:{fontFamily:"var(--serif)",fontStyle:"italic",fontSize:13,color:"var(--ink-soft)"},children:t.description})]}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[r.length," ",r.length===1?"task":"tasks"," · ",o.toLocaleString()," papers"]})]}),e.jsx("div",{className:"tag-grid",children:r.map(a=>{const l=a.slug||"",d=N(S(l));return e.jsxs(f,{to:`/${i}/${l}`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:d.dot}}),_(a.name,l)]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[(a.paper_count??0).toLocaleString()," papers"]})})]},a.id)})})]},t.id)}),h>0&&e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",marginTop:24},children:[h," tasks across ",m.filter(t=>t.tasks.length>0).length," areas."]})]})};export{P as default};
 
 
assets/OrganizationTaskView-DlzWWiJb.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{e as w,u as R,r as m,j as e,L as p,b}from"./index-CKAClQ2e.js";import{u as k}from"./useQuery-DVaOQYVk.js";import{P as B}from"./components-CM9AEXO8.js";import{t as E,d as L}from"./transform-BCXN61O6.js";import{d as q}from"./usePapers-Bep4-Z-b.js";import{u as C}from"./useIntersectionObserver-Bzsb1rr2.js";import{S as I}from"./skeleton-BYz337Ss.js";import{A as Q,a as K}from"./alert-4m2SJo0T.js";import M from"./NotFound-CMFfChHB.js";import"./LatexTitle-DBZLS4yb.js";import"./katex.min-BSBacQyE.js";import"./useInfiniteQuery-BaNuOv30.js";const $=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],D=s=>s==="trending"||s==="date_published"||s==="citation_count"?s:"trending",re=()=>{var j,f,N,y,P,v,S;const{orgSlug:s,taskSlug:n}=w(),[g,_]=R(),h=D(g.get("order_by")),z=t=>{const r=new URLSearchParams(g);r.set("order_by",t),_(r)},o=n==="all",O=o?void 0:n,i=k({queryKey:["organization",s],queryFn:()=>b.getOrganization(s),enabled:!!s,staleTime:10*60*1e3}),c=k({queryKey:["task",n],queryFn:()=>b.getTask(n),enabled:!!n&&!o,staleTime:10*60*1e3}),a=q({organizationSlug:s||"",taskSlug:O,page_size:12,order_by:h,order_dir:"desc",include_resources:!0,enabled:!!s}),{targetRef:T,isIntersecting:u}=C({rootMargin:"200px"});m.useEffect(()=>{u&&a.hasNextPage&&!a.isFetchingNextPage&&a.fetchNextPage()},[u,a.hasNextPage,a.isFetchingNextPage]),m.useEffect(()=>{window.scrollTo(0,0)},[s,n]);const l=m.useMemo(()=>{var r;return(((r=a.data)==null?void 0:r.pages)??[]).flatMap(F=>F.results.map(E))},[a.data]),d=o?"All papers":L(((j=c.data)==null?void 0:j.name)||n||"",((f=c.data)==null?void 0:f.slug)||n),x=((y=(N=a.data)==null?void 0:N.pages[0])==null?void 0:y.count)??((P=i.data)==null?void 0:P.paper_count)??0,A=((v=i.data)==null?void 0:v.name)??s;return i.error||c.error||a.error?((S=i.error)==null?void 0:S.status)===404?e.jsx(M,{}):e.jsx("div",{className:"page",children:e.jsx(Q,{variant:"destructive",children:e.jsx(K,{children:"Failed to load organization papers. Please try again."})})}):e.jsxs("div",{className:"page",children:[e.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[e.jsx(p,{to:"/",children:"Home"}),e.jsx("span",{children:" / "}),e.jsx(p,{to:"/organizations",children:"Organizations"}),e.jsx("span",{children:" / "}),e.jsx(p,{to:`/${s}`,children:A}),e.jsx("span",{children:" / "}),e.jsx("span",{children:d})]}),e.jsxs("div",{style:{marginTop:16,marginBottom:28},children:[e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",letterSpacing:"0.1em",marginBottom:8},children:o?"BROWSE PAPERS":"TASK"}),e.jsx("h1",{className:"domain-mega-title",children:d}),i.data&&e.jsxs("div",{className:"task-quickstats",style:{marginTop:12},children:[e.jsxs("span",{children:[e.jsx("span",{className:"num",children:x.toLocaleString()}),"PAPERS"]}),e.jsx("span",{children:i.data.name})]})]}),e.jsxs("div",{className:"task-section-head",children:[e.jsx("div",{className:"task-section-eyebrow",children:"Organization papers · sort below"}),e.jsxs("div",{className:"task-section-title",children:["Papers ",e.jsxs("span",{className:"meta",children:["[",x.toLocaleString(),"]"]})]})]}),e.jsxs("div",{className:"sort-bar",children:[e.jsx("div",{className:"sort-options",children:$.map(([t,r])=>e.jsx("button",{className:`sort-btn ${h===t?"active":""}`,onClick:()=>z(t),children:r},t))}),e.jsxs("div",{className:"results-count",children:[l.length," loaded in ",e.jsx("span",{children:d})]})]}),a.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((t,r)=>e.jsx(I,{className:"h-40 w-full"},r))}):l.length===0?e.jsx("div",{className:"no-results",children:"No papers found for this selection."}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:l.map((t,r)=>e.jsx(B,{paper:t,rank:r+1},t.id))}),e.jsx("div",{ref:T,style:{height:1}}),a.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]})};export{re as default};
assets/OrganizationTaskView-DvHaGVlI.js DELETED
@@ -1 +0,0 @@
1
- import{_ as w,u as R,r as m,j as e,L as p,a as b}from"./index-EtWJP9FK.js";import{u as k}from"./useQuery-CRN8HQuX.js";import{P as B}from"./components-Bs7x-Lbj.js";import{t as E,d as L}from"./transform-BnMt6tRc.js";import{d as q}from"./usePapers-Bf6VWYSD.js";import{u as C}from"./useIntersectionObserver-CuGdoJlB.js";import{S as I}from"./skeleton-DMjGQB3S.js";import{A as Q,a as K}from"./alert-BIanajMT.js";import M from"./NotFound-D1qW6IOs.js";import"./LatexTitle-ZHDCAKfZ.js";import"./katex.min-BSBacQyE.js";import"./useInfiniteQuery-DMyrN_84.js";const $=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],D=s=>s==="trending"||s==="date_published"||s==="citation_count"?s:"trending",re=()=>{var j,f,N,y,P,v,S;const{orgSlug:s,taskSlug:n}=w(),[g,_]=R(),h=D(g.get("order_by")),z=t=>{const r=new URLSearchParams(g);r.set("order_by",t),_(r)},o=n==="all",O=o?void 0:n,i=k({queryKey:["organization",s],queryFn:()=>b.getOrganization(s),enabled:!!s,staleTime:10*60*1e3}),c=k({queryKey:["task",n],queryFn:()=>b.getTask(n),enabled:!!n&&!o,staleTime:10*60*1e3}),a=q({organizationSlug:s||"",taskSlug:O,page_size:12,order_by:h,order_dir:"desc",include_resources:!0,enabled:!!s}),{targetRef:T,isIntersecting:u}=C({rootMargin:"200px"});m.useEffect(()=>{u&&a.hasNextPage&&!a.isFetchingNextPage&&a.fetchNextPage()},[u,a.hasNextPage,a.isFetchingNextPage]),m.useEffect(()=>{window.scrollTo(0,0)},[s,n]);const l=m.useMemo(()=>{var r;return(((r=a.data)==null?void 0:r.pages)??[]).flatMap(F=>F.results.map(E))},[a.data]),d=o?"All papers":L(((j=c.data)==null?void 0:j.name)||n||"",((f=c.data)==null?void 0:f.slug)||n),x=((y=(N=a.data)==null?void 0:N.pages[0])==null?void 0:y.count)??((P=i.data)==null?void 0:P.paper_count)??0,A=((v=i.data)==null?void 0:v.name)??s;return i.error||c.error||a.error?((S=i.error)==null?void 0:S.status)===404?e.jsx(M,{}):e.jsx("div",{className:"page",children:e.jsx(Q,{variant:"destructive",children:e.jsx(K,{children:"Failed to load organization papers. Please try again."})})}):e.jsxs("div",{className:"page",children:[e.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[e.jsx(p,{to:"/",children:"Home"}),e.jsx("span",{children:" / "}),e.jsx(p,{to:"/organizations",children:"Organizations"}),e.jsx("span",{children:" / "}),e.jsx(p,{to:`/${s}`,children:A}),e.jsx("span",{children:" / "}),e.jsx("span",{children:d})]}),e.jsxs("div",{style:{marginTop:16,marginBottom:28},children:[e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",letterSpacing:"0.1em",marginBottom:8},children:o?"BROWSE PAPERS":"TASK"}),e.jsx("h1",{className:"domain-mega-title",children:d}),i.data&&e.jsxs("div",{className:"task-quickstats",style:{marginTop:12},children:[e.jsxs("span",{children:[e.jsx("span",{className:"num",children:x.toLocaleString()}),"PAPERS"]}),e.jsx("span",{children:i.data.name})]})]}),e.jsxs("div",{className:"task-section-head",children:[e.jsx("div",{className:"task-section-eyebrow",children:"Organization papers · sort below"}),e.jsxs("div",{className:"task-section-title",children:["Papers ",e.jsxs("span",{className:"meta",children:["[",x.toLocaleString(),"]"]})]})]}),e.jsxs("div",{className:"sort-bar",children:[e.jsx("div",{className:"sort-options",children:$.map(([t,r])=>e.jsx("button",{className:`sort-btn ${h===t?"active":""}`,onClick:()=>z(t),children:r},t))}),e.jsxs("div",{className:"results-count",children:[l.length," loaded in ",e.jsx("span",{children:d})]})]}),a.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((t,r)=>e.jsx(I,{className:"h-40 w-full"},r))}):l.length===0?e.jsx("div",{className:"no-results",children:"No papers found for this selection."}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:l.map((t,r)=>e.jsx(B,{paper:t,rank:r+1},t.id))}),e.jsx("div",{ref:T,style:{height:1}}),a.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]})};export{re as default};
 
 
assets/{OrganizationsIndexView-Dg5NQ77l.js → OrganizationsIndexView-B7IBGTg1.js} RENAMED
@@ -1 +1 @@
1
- import{j as e,L as l,a as o}from"./index-EtWJP9FK.js";import{u as d}from"./useQuery-CRN8HQuX.js";import{S as c}from"./skeleton-DMjGQB3S.js";import{A as m,a as h}from"./alert-BIanajMT.js";const g={display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:24,paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},f=()=>{var n;const t=d({queryKey:["organizations"],queryFn:()=>o.getOrganizations(),staleTime:6e5});if(t.error)return e.jsx("div",{className:"page",children:e.jsx(m,{variant:"destructive",children:e.jsx(h,{children:"Failed to load organizations. Please try again."})})});const i=((n=t.data)==null?void 0:n.results)??[],r=i.reduce((a,s)=>a+(s.paper_count??0),0);return e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["All ",e.jsx("em",{children:"Organizations"})]}),e.jsx("div",{className:"feed-subtitle",children:"Browse research papers grouped by the labs and companies behind them."})]})}),t.isLoading?e.jsx("div",{className:"tag-grid",children:Array.from({length:6}).map((a,s)=>e.jsx(c,{className:"h-24"},s))}):e.jsxs("section",{style:{marginBottom:48},children:[e.jsxs("div",{style:g,children:[e.jsx("div",{children:e.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.02em",marginBottom:4},children:"Organizations"})}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[i.length," ",i.length===1?"organization":"organizations"," ·"," ",r.toLocaleString()," papers"]})]}),e.jsx("div",{className:"tag-grid",children:i.map(a=>e.jsxs(l,{to:`/${a.slug}`,className:"tag-cell",children:[e.jsxs("div",{className:"name",style:{display:"flex",alignItems:"center",gap:10},children:[a.logo_url&&e.jsx("img",{src:a.logo_url,alt:"",width:24,height:24,style:{borderRadius:4,objectFit:"contain",flexShrink:0},onError:s=>{s.currentTarget.style.display="none"}}),a.name]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[(a.paper_count??0).toLocaleString()," papers"]})})]},a.id))})]})]})};export{f as default};
 
1
+ import{j as e,L as l,b as o}from"./index-CKAClQ2e.js";import{u as d}from"./useQuery-DVaOQYVk.js";import{S as c}from"./skeleton-BYz337Ss.js";import{A as m,a as h}from"./alert-4m2SJo0T.js";const g={display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:24,paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},f=()=>{var n;const t=d({queryKey:["organizations"],queryFn:()=>o.getOrganizations(),staleTime:6e5});if(t.error)return e.jsx("div",{className:"page",children:e.jsx(m,{variant:"destructive",children:e.jsx(h,{children:"Failed to load organizations. Please try again."})})});const i=((n=t.data)==null?void 0:n.results)??[],r=i.reduce((a,s)=>a+(s.paper_count??0),0);return e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["All ",e.jsx("em",{children:"Organizations"})]}),e.jsx("div",{className:"feed-subtitle",children:"Browse research papers grouped by the labs and companies behind them."})]})}),t.isLoading?e.jsx("div",{className:"tag-grid",children:Array.from({length:6}).map((a,s)=>e.jsx(c,{className:"h-24"},s))}):e.jsxs("section",{style:{marginBottom:48},children:[e.jsxs("div",{style:g,children:[e.jsx("div",{children:e.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.02em",marginBottom:4},children:"Organizations"})}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[i.length," ",i.length===1?"organization":"organizations"," ·"," ",r.toLocaleString()," papers"]})]}),e.jsx("div",{className:"tag-grid",children:i.map(a=>e.jsxs(l,{to:`/${a.slug}`,className:"tag-cell",children:[e.jsxs("div",{className:"name",style:{display:"flex",alignItems:"center",gap:10},children:[a.logo_url&&e.jsx("img",{src:a.logo_url,alt:"",width:24,height:24,style:{borderRadius:4,objectFit:"contain",flexShrink:0},onError:s=>{s.currentTarget.style.display="none"}}),a.name]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[(a.paper_count??0).toLocaleString()," papers"]})})]},a.id))})]})]})};export{f as default};
assets/{PaperDetailView-Bru90vpg.js → PaperDetailView-kJzlR0WC.js} RENAMED
The diff for this file is too large to render. See raw diff
 
assets/{PapersListView-CTCotQCh.js → PapersListView-BD2Du3yj.js} RENAMED
@@ -1 +1 @@
1
- import{u as A,r as i,j as e,L as I,a as T}from"./index-EtWJP9FK.js";import{I as F,P as L}from"./components-Bs7x-Lbj.js";import{t as C,d as R}from"./transform-BnMt6tRc.js";import{u as k}from"./usePapers-Bf6VWYSD.js";import{u as D}from"./useDebounce-C4wL9Bi_.js";import{u as E,P as O}from"./usePeriodFilter-BLumPhqb.js";import{u as B}from"./useIntersectionObserver-CuGdoJlB.js";import{S as c}from"./skeleton-DMjGQB3S.js";import{A as $,a as M}from"./alert-BIanajMT.js";import{u as q}from"./useQuery-CRN8HQuX.js";import"./LatexTitle-ZHDCAKfZ.js";import"./katex.min-BSBacQyE.js";import"./useInfiniteQuery-DMyrN_84.js";const z=[["trending","trending"],["new","newest"],["cited","most cited"]],re=()=>{var x,g,j,f;const[d,N]=A(),o=d.get("search")||"",[p,v]=i.useState(o),t=D(p,300);i.useEffect(()=>{if(t===o)return;const s=new URLSearchParams(d);t?s.set("search",t):s.delete("search"),N(s,{replace:!0})},[t]);const[n,b]=i.useState("new"),{period:P,setPeriod:y,publishedAfter:S}=E("All Time"),a=k({page_size:20,order_by:n==="trending"?"trending":n==="cited"?"citation_count":"date_published",order_dir:"desc",search:t||void 0,published_after:S,include_resources:!0}),m=q({queryKey:["top-tasks-sidebar"],queryFn:()=>T.getTopTasks({limit:8}),staleTime:10*60*1e3}),l=i.useMemo(()=>{var r;return(((r=a.data)==null?void 0:r.pages.flatMap(_=>_.results))||[]).map(C)},[a.data]),{targetRef:w,isIntersecting:h}=B({rootMargin:"200px"});i.useEffect(()=>{h&&a.hasNextPage&&!a.isFetchingNextPage&&a.fetchNextPage()},[h,a.hasNextPage,a.isFetchingNextPage]);const u=((j=(g=(x=a.data)==null?void 0:x.pages)==null?void 0:g[0])==null?void 0:j.count)??0;return e.jsxs("div",{className:"page",children:[e.jsxs("div",{className:"feed-header",children:[e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["All ",e.jsx("em",{children:"Papers"})]}),e.jsxs("div",{className:"feed-subtitle",children:["Search the full corpus. ",u>0&&`${u.toLocaleString()} papers indexed.`]})]}),e.jsx("div",{className:"period-switch",children:O.map(s=>e.jsx("button",{className:`period-btn ${P===s?"active":""}`,onClick:()=>y(s),children:s},s))})]}),e.jsx("div",{className:"papers-search-row",children:e.jsxs("div",{className:"papers-search-input-wrap",children:[e.jsx(F,{name:"search",size:14}),e.jsx("input",{className:"papers-search-input",placeholder:"Search title or abstract…",value:p,onChange:s=>v(s.target.value)})]})}),e.jsxs("div",{className:"layout-with-sidebar",children:[e.jsx("aside",{className:"sidebar",children:e.jsxs("div",{className:"sidebar-section",children:[e.jsx("div",{className:"sidebar-label",children:"Top Domains"}),m.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((s,r)=>e.jsx(c,{className:"h-5 w-full"},r))}),(f=m.data)==null?void 0:f.map(s=>e.jsxs(I,{to:`/tasks/${s.slug}`,className:"sidebar-link",children:[R(s.name,s.slug),s.paper_count!=null&&e.jsx("span",{className:"count",children:s.paper_count})]},s.id))]})}),e.jsxs("div",{children:[e.jsxs("div",{className:"sort-bar",children:[e.jsx("div",{className:"sort-options",children:z.map(([s,r])=>e.jsx("button",{className:`sort-btn ${n===s?"active":""}`,onClick:()=>b(s),children:r},s))}),e.jsxs("div",{className:"results-count",children:[l.length," loaded"]})]}),a.error&&e.jsx($,{variant:"destructive",className:"mb-4",children:e.jsx(M,{children:"Failed to load papers. Please try again."})}),a.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:6}).map((s,r)=>e.jsxs("div",{className:"paper-card",children:[e.jsx(c,{className:"h-[220px] w-[160px]"}),e.jsxs("div",{className:"paper-body",style:{flex:1,gap:12},children:[e.jsx(c,{className:"h-6 w-3/4"}),e.jsx(c,{className:"h-4 w-1/2"}),e.jsx(c,{className:"h-12 w-full"})]})]},r))}):l.length===0?e.jsx("div",{className:"no-results",children:"No matching papers."}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:l.map((s,r)=>e.jsx(L,{paper:s,rank:r+1},s.id))}),e.jsx("div",{ref:w,style:{height:1}}),a.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]})]})]})};export{re as default};
 
1
+ import{u as A,r as i,j as e,L as I,b as T}from"./index-CKAClQ2e.js";import{I as F,P as L}from"./components-CM9AEXO8.js";import{t as C,d as R}from"./transform-BCXN61O6.js";import{u as k}from"./usePapers-Bep4-Z-b.js";import{u as D}from"./useDebounce-CflHGu5P.js";import{u as E,P as O}from"./usePeriodFilter-BjXqo8oe.js";import{u as B}from"./useIntersectionObserver-Bzsb1rr2.js";import{S as c}from"./skeleton-BYz337Ss.js";import{A as $,a as M}from"./alert-4m2SJo0T.js";import{u as q}from"./useQuery-DVaOQYVk.js";import"./LatexTitle-DBZLS4yb.js";import"./katex.min-BSBacQyE.js";import"./useInfiniteQuery-BaNuOv30.js";const z=[["trending","trending"],["new","newest"],["cited","most cited"]],re=()=>{var x,g,j,f;const[d,N]=A(),o=d.get("search")||"",[p,v]=i.useState(o),t=D(p,300);i.useEffect(()=>{if(t===o)return;const s=new URLSearchParams(d);t?s.set("search",t):s.delete("search"),N(s,{replace:!0})},[t]);const[n,b]=i.useState("new"),{period:P,setPeriod:y,publishedAfter:S}=E("All Time"),a=k({page_size:20,order_by:n==="trending"?"trending":n==="cited"?"citation_count":"date_published",order_dir:"desc",search:t||void 0,published_after:S,include_resources:!0}),m=q({queryKey:["top-tasks-sidebar"],queryFn:()=>T.getTopTasks({limit:8}),staleTime:10*60*1e3}),l=i.useMemo(()=>{var r;return(((r=a.data)==null?void 0:r.pages.flatMap(_=>_.results))||[]).map(C)},[a.data]),{targetRef:w,isIntersecting:h}=B({rootMargin:"200px"});i.useEffect(()=>{h&&a.hasNextPage&&!a.isFetchingNextPage&&a.fetchNextPage()},[h,a.hasNextPage,a.isFetchingNextPage]);const u=((j=(g=(x=a.data)==null?void 0:x.pages)==null?void 0:g[0])==null?void 0:j.count)??0;return e.jsxs("div",{className:"page",children:[e.jsxs("div",{className:"feed-header",children:[e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["All ",e.jsx("em",{children:"Papers"})]}),e.jsxs("div",{className:"feed-subtitle",children:["Search the full corpus. ",u>0&&`${u.toLocaleString()} papers indexed.`]})]}),e.jsx("div",{className:"period-switch",children:O.map(s=>e.jsx("button",{className:`period-btn ${P===s?"active":""}`,onClick:()=>y(s),children:s},s))})]}),e.jsx("div",{className:"papers-search-row",children:e.jsxs("div",{className:"papers-search-input-wrap",children:[e.jsx(F,{name:"search",size:14}),e.jsx("input",{className:"papers-search-input",placeholder:"Search title or abstract…",value:p,onChange:s=>v(s.target.value)})]})}),e.jsxs("div",{className:"layout-with-sidebar",children:[e.jsx("aside",{className:"sidebar",children:e.jsxs("div",{className:"sidebar-section",children:[e.jsx("div",{className:"sidebar-label",children:"Top Domains"}),m.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((s,r)=>e.jsx(c,{className:"h-5 w-full"},r))}),(f=m.data)==null?void 0:f.map(s=>e.jsxs(I,{to:`/tasks/${s.slug}`,className:"sidebar-link",children:[R(s.name,s.slug),s.paper_count!=null&&e.jsx("span",{className:"count",children:s.paper_count})]},s.id))]})}),e.jsxs("div",{children:[e.jsxs("div",{className:"sort-bar",children:[e.jsx("div",{className:"sort-options",children:z.map(([s,r])=>e.jsx("button",{className:`sort-btn ${n===s?"active":""}`,onClick:()=>b(s),children:r},s))}),e.jsxs("div",{className:"results-count",children:[l.length," loaded"]})]}),a.error&&e.jsx($,{variant:"destructive",className:"mb-4",children:e.jsx(M,{children:"Failed to load papers. Please try again."})}),a.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:6}).map((s,r)=>e.jsxs("div",{className:"paper-card",children:[e.jsx(c,{className:"h-[220px] w-[160px]"}),e.jsxs("div",{className:"paper-body",style:{flex:1,gap:12},children:[e.jsx(c,{className:"h-6 w-3/4"}),e.jsx(c,{className:"h-4 w-1/2"}),e.jsx(c,{className:"h-12 w-full"})]})]},r))}):l.length===0?e.jsx("div",{className:"no-results",children:"No matching papers."}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:l.map((s,r)=>e.jsx(L,{paper:s,rank:r+1},s.id))}),e.jsx("div",{ref:w,style:{height:1}}),a.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]})]})]})};export{re as default};
assets/SavedPapersView-CdgbZIjk.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{f as o,j as s,a0 as m,L as p,b as h}from"./index-CKAClQ2e.js";import{u as x}from"./useQuery-DVaOQYVk.js";import{T as u,P as j}from"./components-CM9AEXO8.js";import{S as r}from"./skeleton-BYz337Ss.js";import{A as v,a as N}from"./alert-4m2SJo0T.js";import{t as g}from"./transform-BCXN61O6.js";import"./LatexTitle-DBZLS4yb.js";import"./katex.min-BSBacQyE.js";const L=()=>{var l;const{user:d,isLoading:c}=o(),a=x({queryKey:["my-bookmarks"],queryFn:()=>h.getMyBookmarks(),enabled:!!d,staleTime:30*1e3,refetchOnWindowFocus:!1});return c?s.jsxs("div",{className:"page",children:[s.jsx(r,{className:"h-10 w-1/3 mb-4"}),s.jsx(r,{className:"h-6 w-1/2 mb-8"})]}):d?s.jsxs("div",{className:"page",children:[s.jsx("div",{className:"feed-header",children:s.jsxs("div",{children:[s.jsxs("h1",{className:"feed-title",children:["Saved ",s.jsx("em",{children:"Papers"})]}),s.jsx("div",{className:"feed-subtitle",children:(l=a.data)!=null&&l.count?`${a.data.count.toLocaleString()} saved · grouped by domain`:"Your bookmarked papers, grouped by domain."})]})}),a.error&&s.jsx(v,{variant:"destructive",className:"mb-4",children:s.jsx(N,{children:"Failed to load your saved papers. Please try again."})}),a.isLoading?s.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((i,e)=>s.jsxs("div",{className:"paper-card",children:[s.jsx(r,{className:"h-[220px] w-[160px]"}),s.jsxs("div",{className:"paper-body",style:{flex:1,gap:12},children:[s.jsx(r,{className:"h-6 w-3/4"}),s.jsx(r,{className:"h-4 w-1/2"}),s.jsx(r,{className:"h-12 w-full"})]})]},e))}):!a.data||a.data.count===0?s.jsxs("div",{className:"no-results",children:["No saved papers yet."," ",s.jsx(p,{to:"/papers",className:"sidebar-link",style:{display:"inline"},children:"Browse papers →"})]}):a.data.areas.map(i=>s.jsxs("section",{className:"saved-area-section",children:[s.jsx("h2",{className:"saved-area-heading",children:i.name}),i.tasks.map(e=>{const n=e.papers.length;return s.jsxs("div",{className:"saved-task-block",children:[s.jsxs("div",{className:"saved-task-row",children:[e.slug?s.jsx(u,{slug:e.slug,label:e.name}):s.jsx("span",{className:"tag-chip",style:{background:"var(--surface)"},children:e.name}),s.jsxs("span",{className:"saved-task-count",children:[n," ",n===1?"paper":"papers"]})]}),s.jsx("div",{className:"paper-list",children:e.papers.map(t=>s.jsx(j,{paper:g(t),rank:1},t.id))})]},`task-${i.id??"other"}-${e.id??"untagged"}`)})]},`area-${i.id??"other"}`))]}):s.jsxs("div",{className:"page",children:[s.jsx("div",{className:"feed-header",children:s.jsxs("div",{children:[s.jsxs("h1",{className:"feed-title",children:["Saved ",s.jsx("em",{children:"Papers"})]}),s.jsx("div",{className:"feed-subtitle",children:"Sign in with Hugging Face to save papers and revisit them later."})]})}),s.jsx("div",{className:"saved-signin-panel",children:s.jsx(m,{returnTo:"/saved"})})]})};export{L as default};
assets/SavedPapersView-CsjFlkCI.js DELETED
@@ -1 +0,0 @@
1
- import{V as o,j as s,U as m,L as p,a as h}from"./index-EtWJP9FK.js";import{u as x}from"./useQuery-CRN8HQuX.js";import{T as u,P as j}from"./components-Bs7x-Lbj.js";import{S as r}from"./skeleton-DMjGQB3S.js";import{A as v,a as N}from"./alert-BIanajMT.js";import{t as g}from"./transform-BnMt6tRc.js";import"./LatexTitle-ZHDCAKfZ.js";import"./katex.min-BSBacQyE.js";const L=()=>{var l;const{user:d,isLoading:c}=o(),a=x({queryKey:["my-bookmarks"],queryFn:()=>h.getMyBookmarks(),enabled:!!d,staleTime:30*1e3,refetchOnWindowFocus:!1});return c?s.jsxs("div",{className:"page",children:[s.jsx(r,{className:"h-10 w-1/3 mb-4"}),s.jsx(r,{className:"h-6 w-1/2 mb-8"})]}):d?s.jsxs("div",{className:"page",children:[s.jsx("div",{className:"feed-header",children:s.jsxs("div",{children:[s.jsxs("h1",{className:"feed-title",children:["Saved ",s.jsx("em",{children:"Papers"})]}),s.jsx("div",{className:"feed-subtitle",children:(l=a.data)!=null&&l.count?`${a.data.count.toLocaleString()} saved · grouped by domain`:"Your bookmarked papers, grouped by domain."})]})}),a.error&&s.jsx(v,{variant:"destructive",className:"mb-4",children:s.jsx(N,{children:"Failed to load your saved papers. Please try again."})}),a.isLoading?s.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((i,e)=>s.jsxs("div",{className:"paper-card",children:[s.jsx(r,{className:"h-[220px] w-[160px]"}),s.jsxs("div",{className:"paper-body",style:{flex:1,gap:12},children:[s.jsx(r,{className:"h-6 w-3/4"}),s.jsx(r,{className:"h-4 w-1/2"}),s.jsx(r,{className:"h-12 w-full"})]})]},e))}):!a.data||a.data.count===0?s.jsxs("div",{className:"no-results",children:["No saved papers yet."," ",s.jsx(p,{to:"/papers",className:"sidebar-link",style:{display:"inline"},children:"Browse papers →"})]}):a.data.areas.map(i=>s.jsxs("section",{className:"saved-area-section",children:[s.jsx("h2",{className:"saved-area-heading",children:i.name}),i.tasks.map(e=>{const n=e.papers.length;return s.jsxs("div",{className:"saved-task-block",children:[s.jsxs("div",{className:"saved-task-row",children:[e.slug?s.jsx(u,{slug:e.slug,label:e.name}):s.jsx("span",{className:"tag-chip",style:{background:"var(--surface)"},children:e.name}),s.jsxs("span",{className:"saved-task-count",children:[n," ",n===1?"paper":"papers"]})]}),s.jsx("div",{className:"paper-list",children:e.papers.map(t=>s.jsx(j,{paper:g(t),rank:1},t.id))})]},`task-${i.id??"other"}-${e.id??"untagged"}`)})]},`area-${i.id??"other"}`))]}):s.jsxs("div",{className:"page",children:[s.jsx("div",{className:"feed-header",children:s.jsxs("div",{children:[s.jsxs("h1",{className:"feed-title",children:["Saved ",s.jsx("em",{children:"Papers"})]}),s.jsx("div",{className:"feed-subtitle",children:"Sign in with Hugging Face to save papers and revisit them later."})]})}),s.jsx("div",{className:"saved-signin-panel",children:s.jsx(m,{returnTo:"/saved"})})]})};export{L as default};
 
 
assets/SearchOverlay-BfvQXhZ6.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{r as C,a as L,R as T,i as $,j as s,b as m}from"./index-CKAClQ2e.js";import{u as p}from"./useQuery-DVaOQYVk.js";import{L as A}from"./LatexTitle-DBZLS4yb.js";import{u as D}from"./useDebounce-CflHGu5P.js";import{e as z,h as M,d as B}from"./transform-BCXN61O6.js";import"./katex.min-BSBacQyE.js";const I=10,H=({open:n,onClose:l})=>{var _,f,F,q,E,P;const v=C.useRef(null),w=L(),[c,R]=T.useState(""),[h,g]=T.useState(1),a=D(c,200),x=$();C.useEffect(()=>{var r;if(!n)return;(r=v.current)==null||r.focus();const e=K=>{K.key==="Escape"&&l()};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[n,l]);const t=p({queryKey:["search-papers",a,h],queryFn:()=>m.searchPapers(a,h,I),enabled:n&&a.length>=2,staleTime:6e4}),k=p({queryKey:["search-tasks",a],queryFn:()=>m.getTasks({q:a,page_size:6}),enabled:n&&a.length>=2,staleTime:6e4}),y=p({queryKey:["search-methods",a],queryFn:()=>m.getMethods({q:a,page_size:6}),enabled:n&&a.length>=2,staleTime:6e4}),N=p({queryKey:["search-benchmarks",a],queryFn:()=>m.getDatasets({q:a,page_size:6,ordering:"-paper_count",min_eval_count:2}),enabled:n&&a.length>=2,staleTime:6e4});if(!n)return null;const o=((_=k.data)==null?void 0:_.results)||[],d=((f=y.data)==null?void 0:f.results)||[],u=((F=N.data)==null?void 0:F.results)||[],j=((q=t.data)==null?void 0:q.results)||[],Q=t.isFetching||k.isFetching||y.isFetching||N.isFetching,S=o.length||j.length||d.length||u.length,i=e=>{l(),w(e)},b=()=>{const e=c.trim();e&&i(`/chat?q=${encodeURIComponent(e)}`)};return s.jsx("div",{className:"search-overlay",onClick:l,children:s.jsxs("div",{className:"search-modal",onClick:e=>e.stopPropagation(),children:[s.jsx("input",{ref:v,className:"search-modal-input",placeholder:"Search papers, tasks, methods, or benchmarks…",value:c,onChange:e=>{R(e.target.value),g(1)},onKeyDown:e=>{x&&e.key==="Enter"&&(e.preventDefault(),b())}}),s.jsxs("div",{className:"search-results",children:[x&&c.trim()&&s.jsxs("button",{type:"button",className:"search-ask-row",onClick:b,children:[s.jsx("span",{className:"search-ask-chip",children:"assistant"}),s.jsxs("span",{className:"search-ask-text",children:["Ask: “",c.trim(),"”"]}),s.jsx("kbd",{children:"↵"})]}),!a&&s.jsxs("div",{className:"search-empty",children:["Try “diffusion”, “object detection”, or an arXiv id.",x&&s.jsx("span",{className:"search-empty-sub",children:"Press Enter to ask the assistant"})]}),a&&!Q&&!S&&s.jsxs("div",{className:"search-empty",children:['No matches for "',c,'"']}),o.length>0&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"search-section-label",children:["Tasks · ",o.length]}),o.map(e=>{const r=z(M(e.slug||""));return s.jsxs("div",{className:"search-result-tag",onClick:()=>i(`/tasks/${e.slug}`),children:[s.jsx("span",{className:"dot",style:{width:6,height:6,borderRadius:"50%",background:r.dot}}),s.jsx("span",{className:"name",children:B(e.name,e.slug)}),e.paper_count!=null&&s.jsxs("span",{className:"count",children:[e.paper_count," papers"]})]},e.id)})]}),d.length>0&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"search-section-label",children:["Methods · ",d.length]}),d.map(e=>s.jsxs("div",{className:"search-result-tag",onClick:()=>i(`/methods/${e.slug||e.id}`),children:[s.jsx("span",{style:{fontFamily:"var(--mono)",fontWeight:600},children:e.name}),e.paper_count!=null&&s.jsxs("span",{className:"count",children:[e.paper_count," papers"]})]},e.id))]}),u.length>0&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"search-section-label",children:["Benchmarks · ",u.length]}),u.map(e=>s.jsxs("div",{className:"search-result-tag",onClick:()=>i(`/benchmark/${e.slug||e.id}`),children:[s.jsx("span",{className:"name",children:e.name}),e.paper_count!=null&&e.paper_count>0&&s.jsxs("span",{className:"count",children:[e.paper_count," entries"]})]},e.id))]}),j.length>0&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"search-section-label",children:["Papers · page ",h]}),j.map(e=>{var r;return s.jsxs("div",{className:"search-result",onClick:()=>i(`/paper/${e.arxiv_id||e.id}`),children:[s.jsx("div",{className:"search-result-title",children:s.jsx(A,{title:e.title})}),s.jsxs("div",{className:"search-result-meta",children:[s.jsx("span",{children:e.arxiv_id?`arXiv:${e.arxiv_id}`:"External resource"}),((r=e.authors)==null?void 0:r[0])&&s.jsxs(s.Fragment,{children:[s.jsx("span",{children:"·"}),s.jsxs("span",{children:[e.authors[0],e.authors.length>1?" et al.":""]})]}),e.citation_count!=null&&s.jsxs(s.Fragment,{children:[s.jsx("span",{children:"·"}),s.jsxs("span",{children:["↑ ",e.citation_count.toLocaleString()]})]})]})]},e.id)}),(((E=t.data)==null?void 0:E.previous_page)||((P=t.data)==null?void 0:P.next_page))&&s.jsxs("div",{className:"search-paper-pagination",children:[s.jsx("button",{type:"button",disabled:!t.data.previous_page||t.isFetching,onClick:()=>{var e;return g(((e=t.data)==null?void 0:e.previous_page)||1)},children:"Previous"}),s.jsxs("span",{children:["Page ",h]}),s.jsx("button",{type:"button",disabled:!t.data.next_page||t.isFetching,onClick:()=>{var e;(e=t.data)!=null&&e.next_page&&g(t.data.next_page)},children:"Next"})]})]})]})]})})};export{H as default};
assets/SearchOverlay-BrGWIn4M.js DELETED
@@ -1 +0,0 @@
1
- import{r as P,a0 as S,W as E,j as s,a as u}from"./index-EtWJP9FK.js";import{u as m}from"./useQuery-CRN8HQuX.js";import{L}from"./LatexTitle-ZHDCAKfZ.js";import{u as K}from"./useDebounce-C4wL9Bi_.js";import{e as $,h as z,d as M}from"./transform-BnMt6tRc.js";import"./katex.min-BSBacQyE.js";const A=10,O=({open:n,onClose:c})=>{var _,k,b,f,F,q;const j=P.useRef(null),T=S(),[p,C]=E.useState(""),[i,g]=E.useState(1),a=K(p,200);P.useEffect(()=>{var r;if(!n)return;(r=j.current)==null||r.focus();const e=R=>{R.key==="Escape"&&c()};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[n,c]);const t=m({queryKey:["search-papers",a,i],queryFn:()=>u.searchPapers(a,i,A),enabled:n&&a.length>=2,staleTime:6e4}),v=m({queryKey:["search-tasks",a],queryFn:()=>u.getTasks({q:a,page_size:6}),enabled:n&&a.length>=2,staleTime:6e4}),y=m({queryKey:["search-methods",a],queryFn:()=>u.getMethods({q:a,page_size:6}),enabled:n&&a.length>=2,staleTime:6e4}),N=m({queryKey:["search-benchmarks",a],queryFn:()=>u.getDatasets({q:a,page_size:6,ordering:"-paper_count",min_eval_count:2}),enabled:n&&a.length>=2,staleTime:6e4});if(!n)return null;const l=((_=v.data)==null?void 0:_.results)||[],h=((k=y.data)==null?void 0:k.results)||[],d=((b=N.data)==null?void 0:b.results)||[],x=((f=t.data)==null?void 0:f.results)||[],w=t.isFetching||v.isFetching||y.isFetching||N.isFetching,Q=l.length||x.length||h.length||d.length,o=e=>{c(),T(e)};return s.jsx("div",{className:"search-overlay",onClick:c,children:s.jsxs("div",{className:"search-modal",onClick:e=>e.stopPropagation(),children:[s.jsx("input",{ref:j,className:"search-modal-input",placeholder:"Search papers, tasks, methods, or benchmarks…",value:p,onChange:e=>{C(e.target.value),g(1)}}),s.jsxs("div",{className:"search-results",children:[!a&&s.jsx("div",{className:"search-empty",children:"Try “diffusion”, “object detection”, or an arXiv id."}),a&&!w&&!Q&&s.jsxs("div",{className:"search-empty",children:['No matches for "',p,'"']}),l.length>0&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"search-section-label",children:["Tasks · ",l.length]}),l.map(e=>{const r=$(z(e.slug||""));return s.jsxs("div",{className:"search-result-tag",onClick:()=>o(`/tasks/${e.slug}`),children:[s.jsx("span",{className:"dot",style:{width:6,height:6,borderRadius:"50%",background:r.dot}}),s.jsx("span",{className:"name",children:M(e.name,e.slug)}),e.paper_count!=null&&s.jsxs("span",{className:"count",children:[e.paper_count," papers"]})]},e.id)})]}),h.length>0&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"search-section-label",children:["Methods · ",h.length]}),h.map(e=>s.jsxs("div",{className:"search-result-tag",onClick:()=>o(`/methods/${e.slug||e.id}`),children:[s.jsx("span",{style:{fontFamily:"var(--mono)",fontWeight:600},children:e.name}),e.paper_count!=null&&s.jsxs("span",{className:"count",children:[e.paper_count," papers"]})]},e.id))]}),d.length>0&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"search-section-label",children:["Benchmarks · ",d.length]}),d.map(e=>s.jsxs("div",{className:"search-result-tag",onClick:()=>o(`/benchmark/${e.slug||e.id}`),children:[s.jsx("span",{className:"name",children:e.name}),e.paper_count!=null&&e.paper_count>0&&s.jsxs("span",{className:"count",children:[e.paper_count," entries"]})]},e.id))]}),x.length>0&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"search-section-label",children:["Papers · page ",i]}),x.map(e=>{var r;return s.jsxs("div",{className:"search-result",onClick:()=>o(`/paper/${e.arxiv_id||e.id}`),children:[s.jsx("div",{className:"search-result-title",children:s.jsx(L,{title:e.title})}),s.jsxs("div",{className:"search-result-meta",children:[s.jsx("span",{children:e.arxiv_id?`arXiv:${e.arxiv_id}`:"External resource"}),((r=e.authors)==null?void 0:r[0])&&s.jsxs(s.Fragment,{children:[s.jsx("span",{children:"·"}),s.jsxs("span",{children:[e.authors[0],e.authors.length>1?" et al.":""]})]}),e.citation_count!=null&&s.jsxs(s.Fragment,{children:[s.jsx("span",{children:"·"}),s.jsxs("span",{children:["↑ ",e.citation_count.toLocaleString()]})]})]})]},e.id)}),(((F=t.data)==null?void 0:F.previous_page)||((q=t.data)==null?void 0:q.next_page))&&s.jsxs("div",{className:"search-paper-pagination",children:[s.jsx("button",{type:"button",disabled:!t.data.previous_page||t.isFetching,onClick:()=>{var e;return g(((e=t.data)==null?void 0:e.previous_page)||1)},children:"Previous"}),s.jsxs("span",{children:["Page ",i]}),s.jsx("button",{type:"button",disabled:!t.data.next_page||t.isFetching,onClick:()=>{var e;(e=t.data)!=null&&e.next_page&&g(t.data.next_page)},children:"Next"})]})]})]})]})})};export{O as default};
 
 
assets/{SettingsView-CSMwTHXQ.js → SettingsView-SbsmiR2R.js} RENAMED
@@ -1,4 +1,4 @@
1
- import{c as t,V as m,a1 as u,af as p,W as x,j as e,U as y}from"./index-EtWJP9FK.js";import{S as j}from"./switch-_Nji6Le5.js";import{f as g,D as v}from"./latexPlainText-ChVkH0gY.js";import"./index-C858g2Nu.js";/**
2
  * @license lucide-react v0.462.0 - ISC
3
  *
4
  * This source code is licensed under the ISC license.
@@ -13,4 +13,4 @@ import{c as t,V as m,a1 as u,af as p,W as x,j as e,U as y}from"./index-EtWJP9FK.
13
  *
14
  * This source code is licensed under the ISC license.
15
  * See the LICENSE file in the root directory of this source tree.
16
- */const N=t("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]),A=()=>{const{user:i}=m(),{preferences:n,setHideClosedSourceEvals:c,canPersist:l}=u(),{theme:o,setTheme:r}=p(),d=o??"system";return x.useEffect(()=>(document.title=g("Settings"),()=>{document.title=v}),[]),e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsx("h1",{className:"feed-title",children:e.jsx("em",{children:"Settings"})}),e.jsx("div",{className:"feed-subtitle",children:"Control how papers and benchmarks are displayed across the site."})]})}),e.jsxs("section",{className:"settings-section",children:[e.jsx("h2",{className:"settings-section-title",children:"Appearance"}),e.jsx("div",{className:"theme-options","aria-label":"Color theme",children:[{value:"system",label:"System",description:"Match your device",icon:k},{value:"light",label:"Light",description:"Always use light mode",icon:N},{value:"dark",label:"Dark",description:"Always use dark mode",icon:f}].map(s=>{const h=s.icon,a=d===s.value;return e.jsxs("button",{type:"button",className:`theme-option ${a?"is-selected":""}`,"aria-pressed":a,onClick:()=>r(s.value),children:[e.jsx(h,{"aria-hidden":"true"}),e.jsxs("span",{className:"theme-option-copy",children:[e.jsx("span",{className:"theme-option-label",children:s.label}),e.jsx("span",{className:"theme-option-desc",children:s.description})]})]},s.value)})})]}),e.jsxs("section",{className:"settings-section",children:[e.jsx("h2",{className:"settings-section-title",children:"Evaluations"}),e.jsxs("div",{className:"settings-row",children:[e.jsxs("label",{className:"settings-row-text",htmlFor:"hide-closed-source-evals",children:[e.jsx("span",{className:"settings-row-label",children:"Hide closed-source models"}),e.jsx("span",{className:"settings-row-desc",children:"When enabled, evaluations of closed-source models (proprietary APIs and unreleased flagship models) are hidden from benchmark leaderboards and paper result tables."})]}),e.jsx(j,{id:"hide-closed-source-evals",checked:n.hide_closed_source_evals,onCheckedChange:s=>{c(!!s)}})]}),!l&&!i&&e.jsxs("div",{className:"settings-note",children:[e.jsx("span",{children:"You are browsing as a guest, so this choice only applies to the current session. Sign in to save it to your account."}),e.jsx("div",{className:"settings-note-action",children:e.jsx(y,{returnTo:"/settings"})})]})]})]})};export{A as default};
 
1
+ import{g as t,f as m,a3 as u,ag as p,R as x,j as e,a0 as y}from"./index-CKAClQ2e.js";import{S as g}from"./switch-CjKtXruW.js";import{f as j,D as v}from"./latexPlainText-ChVkH0gY.js";import"./index-DCl-K7k4.js";/**
2
  * @license lucide-react v0.462.0 - ISC
3
  *
4
  * This source code is licensed under the ISC license.
 
13
  *
14
  * This source code is licensed under the ISC license.
15
  * See the LICENSE file in the root directory of this source tree.
16
+ */const N=t("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]),A=()=>{const{user:i}=m(),{preferences:n,setHideClosedSourceEvals:c,canPersist:l}=u(),{theme:o,setTheme:r}=p(),d=o??"system";return x.useEffect(()=>(document.title=j("Settings"),()=>{document.title=v}),[]),e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsx("h1",{className:"feed-title",children:e.jsx("em",{children:"Settings"})}),e.jsx("div",{className:"feed-subtitle",children:"Control how papers and benchmarks are displayed across the site."})]})}),e.jsxs("section",{className:"settings-section",children:[e.jsx("h2",{className:"settings-section-title",children:"Appearance"}),e.jsx("div",{className:"theme-options","aria-label":"Color theme",children:[{value:"system",label:"System",description:"Match your device",icon:k},{value:"light",label:"Light",description:"Always use light mode",icon:N},{value:"dark",label:"Dark",description:"Always use dark mode",icon:f}].map(s=>{const h=s.icon,a=d===s.value;return e.jsxs("button",{type:"button",className:`theme-option ${a?"is-selected":""}`,"aria-pressed":a,onClick:()=>r(s.value),children:[e.jsx(h,{"aria-hidden":"true"}),e.jsxs("span",{className:"theme-option-copy",children:[e.jsx("span",{className:"theme-option-label",children:s.label}),e.jsx("span",{className:"theme-option-desc",children:s.description})]})]},s.value)})})]}),e.jsxs("section",{className:"settings-section",children:[e.jsx("h2",{className:"settings-section-title",children:"Evaluations"}),e.jsxs("div",{className:"settings-row",children:[e.jsxs("label",{className:"settings-row-text",htmlFor:"hide-closed-source-evals",children:[e.jsx("span",{className:"settings-row-label",children:"Hide closed-source models"}),e.jsx("span",{className:"settings-row-desc",children:"When enabled, evaluations of closed-source models (proprietary APIs and unreleased flagship models) are hidden from benchmark leaderboards and paper result tables."})]}),e.jsx(g,{id:"hide-closed-source-evals",checked:n.hide_closed_source_evals,onCheckedChange:s=>{c(!!s)}})]}),!l&&!i&&e.jsxs("div",{className:"settings-note",children:[e.jsx("span",{children:"You are browsing as a guest, so this choice only applies to the current session. Sign in to save it to your account."}),e.jsx("div",{className:"settings-note-action",children:e.jsx(y,{returnTo:"/settings"})})]})]})]})};export{A as default};
assets/{SubmissionsDashboard-DKm6cw14.js → SubmissionsDashboard-ujtr3pP6.js} RENAMED
@@ -1,6 +1,6 @@
1
- var fe=s=>{throw TypeError(s)};var X=(s,t,i)=>t.has(s)||fe("Cannot "+i);var f=(s,t,i)=>(X(s,t,"read from private field"),i?i.call(s):t.get(s)),w=(s,t,i)=>t.has(s)?fe("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(s):t.set(s,i),y=(s,t,i,n)=>(X(s,t,"write to private field"),n?n.call(s,i):t.set(s,i),i),E=(s,t,i)=>(X(s,t,"access private method"),i);import{ai as Ae,aj as ee,ak as Oe,al as Me,o as ke,r as $,am as Qe,c as qe,j as e,an as Se,ao as Fe,W as N,k as M,ap as Ie,V as Le,n as we,aq as Ue,ar as De,as as $e,at as Pe,au as Te,av as Be,aw as se}from"./index-EtWJP9FK.js";import{Q as Ee,b as ze,c as He,e as Ke,d as Je,f as Ve,s as pe,g as Ye,h as Ge,u as be}from"./useQuery-CRN8HQuX.js";import{u as ge}from"./useMutation-mofpylMn.js";import{R as We,S as Xe,C as Ze,a as es}from"./shield-alert-jFMnBCT6.js";import{L as P}from"./loader-circle-CjqhkEcV.js";function je(s,t){const i=new Set(t);return s.filter(n=>!i.has(n))}function ss(s,t,i){const n=s.slice(0);return n[t]=i,n}var L,_,U,I,k,O,T,B,z,H,v,te,ie,Ce,ne,re,ae,_e,ts=(_e=class extends Ae{constructor(t,i,n){super();w(this,v);w(this,L);w(this,_);w(this,U);w(this,I);w(this,k);w(this,O);w(this,T);w(this,B);w(this,z);w(this,H,[]);y(this,L,t),y(this,I,n),y(this,U,[]),y(this,k,[]),y(this,_,[]),this.setQueries(i)}onSubscribe(){this.listeners.size===1&&f(this,k).forEach(t=>{t.subscribe(i=>{E(this,v,re).call(this,t,i)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,f(this,k).forEach(t=>{t.destroy()})}setQueries(t,i){y(this,U,t),y(this,I,i),ee.batch(()=>{const n=f(this,k),r=E(this,v,ne).call(this,f(this,U));r.forEach(a=>a.observer.setOptions(a.defaultedQueryOptions));const o=r.map(a=>a.observer),l=o.map(a=>a.getCurrentResult()),u=n.length!==o.length,h=o.some((a,c)=>a!==n[c]),j=u||h,x=j?!0:l.some((a,c)=>{const d=f(this,_)[c];return!d||!Oe(a,d)});!j&&!x||(j&&(y(this,H,r),y(this,k,o)),y(this,_,l),this.hasListeners()&&(j&&(je(n,o).forEach(a=>{a.destroy()}),je(o,n).forEach(a=>{a.subscribe(c=>{E(this,v,re).call(this,a,c)})})),E(this,v,ae).call(this)))})}getCurrentResult(){return f(this,_)}getQueries(){return f(this,k).map(t=>t.getCurrentQuery())}getObservers(){return f(this,k)}getOptimisticResult(t,i){const n=E(this,v,ne).call(this,t),r=n.map(l=>l.observer.getOptimisticResult(l.defaultedQueryOptions)),o=n.map(l=>l.defaultedQueryOptions.queryHash);return[r,l=>E(this,v,ie).call(this,l??r,i,o),()=>E(this,v,te).call(this,r,n)]}},L=new WeakMap,_=new WeakMap,U=new WeakMap,I=new WeakMap,k=new WeakMap,O=new WeakMap,T=new WeakMap,B=new WeakMap,z=new WeakMap,H=new WeakMap,v=new WeakSet,te=function(t,i){return i.map((n,r)=>{const o=t[r];return n.defaultedQueryOptions.notifyOnChangeProps?o:n.observer.trackResult(o,l=>{i.forEach(u=>{u.observer.trackProp(l)})})})},ie=function(t,i,n){if(i){const r=f(this,z),o=n!==void 0&&r!==void 0&&(r.length!==n.length||n.some((l,u)=>l!==r[u]));return(!f(this,O)||f(this,_)!==f(this,B)||o||i!==f(this,T))&&(y(this,T,i),y(this,B,f(this,_)),n!==void 0&&y(this,z,n),y(this,O,Me(f(this,O),i(t)))),f(this,O)}return t},Ce=function(){var t;return((t=f(this,I))==null?void 0:t.combine)!==void 0&&f(this,k).some((i,n)=>{var r;return i.options.suspense&&((r=f(this,_)[n])==null?void 0:r.data)===void 0})},ne=function(t){const i=new Map;f(this,k).forEach(r=>{const o=r.options.queryHash;if(!o)return;const l=i.get(o);l?l.push(r):i.set(o,[r])});const n=[];return t.forEach(r=>{var h;const o=f(this,L).defaultQueryOptions(r),u=((h=i.get(o.queryHash))==null?void 0:h.shift())??new Ee(f(this,L),o);n.push({defaultedQueryOptions:o,observer:u})}),n},re=function(t,i){const n=f(this,k).indexOf(t);n!==-1&&(y(this,_,ss(f(this,_),n,i)),E(this,v,ae).call(this))},ae=function(){var t;if(this.hasListeners()){const i=E(this,v,te).call(this,f(this,_),f(this,H)),n=E(this,v,Ce).call(this),r=f(this,O),o=n?r:E(this,v,ie).call(this,i,(t=f(this,I))==null?void 0:t.combine);(n||r!==o)&&ee.batch(()=>{this.listeners.forEach(l=>{l(f(this,_))})})}},_e);function G({queries:s,...t},i){const n=ke(),r=ze(),o=He(),l=$.useMemo(()=>s.map(m=>{const p=n.defaultQueryOptions(m);return p._optimisticResults=r?"isRestoring":"optimistic",p}),[s,n,r]);l.forEach(m=>{Ke(m);const p=n.getQueryCache().get(m.queryHash);Je(m,o,p)}),Ve(o);const[u]=$.useState(()=>new ts(n,l,t)),[h,j,x]=u.getOptimisticResult(l,t.combine),a=!r&&t.subscribed!==!1;$.useSyncExternalStore($.useCallback(m=>a?u.subscribe(ee.batchCalls(m)):Qe,[u,a]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),$.useEffect(()=>{u.setQueries(l,t)},[l,t,u]);const d=h.some((m,p)=>pe(l[p],m))?h.flatMap((m,p)=>{const S=l[p];if(S&&pe(S,m)){const q=new Ee(n,S);return Ye(S,q,o)}return[]}):[];if(d.length>0)throw Promise.all(d);const g=h.find((m,p)=>{const S=l[p];return S&&Ge({result:m,errorResetBoundary:o,throwOnError:S.throwOnError,query:n.getQueryCache().get(S.queryHash),suspense:S.suspense})});if(g!=null&&g.error)throw g.error;return j(x())}/**
2
  * @license lucide-react v0.462.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 is=qe("Inbox",[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]]),Q=s=>s&&typeof s=="object"&&!Array.isArray(s)?s:{},xe=s=>Array.isArray(s)?s.map(t=>{const i=Q(t),n=Number(i.id);return Number.isFinite(n)?{id:n,name:typeof i.name=="string"?i.name:`#${n}`,slug:typeof i.slug=="string"?i.slug:void 0}:null}).filter(t=>!!t):[],ve=s=>Array.isArray(s)?s.map(Number).filter(t=>Number.isFinite(t)):[],J=s=>Array.isArray(s)?s.map(t=>{const i=Q(t);return typeof i.url!="string"?null:{url:i.url,is_official:!!i.is_official}}).filter(t=>!!t):[],ns=s=>Array.isArray(s)?s.map(t=>Q(t)):[],rs=s=>Array.isArray(s)?s.map(t=>Q(t)):[],as=s=>s.replace(/_/g," ");function os({currentPayload:s,proposedPayload:t}){const[i,n]=N.useState(!1);return e.jsxs("div",{className:"submission-raw-toggle",children:[e.jsx("button",{type:"button",className:"raw-json-btn",onClick:()=>n(r=>!r),children:i?"Hide raw JSON":"Show raw JSON"}),i&&e.jsxs("div",{className:"submission-json-grid",children:[e.jsx(oe,{title:"Current payload",value:s??{}}),e.jsx(oe,{title:"Proposed payload",value:t})]})]})}function oe({title:s,value:t}){return e.jsxs("div",{className:"submission-json-block",children:[e.jsx("div",{className:"submission-diff-label",children:s}),e.jsx("pre",{children:JSON.stringify(t,null,2)})]})}function Ne({currentItems:s,proposedIds:t,queryPrefix:i,fetchEntity:n}){const r=N.useMemo(()=>Array.from(new Set([...s.map(c=>c.id),...t])).sort((c,d)=>c-d),[s,t]),o=G({queries:r.map(c=>({queryKey:[i,String(c)],queryFn:()=>n(String(c)),staleTime:5*60*1e3}))}),l=N.useMemo(()=>{const c=new Map;return s.forEach(d=>c.set(d.id,d.name)),o.forEach(d=>{const g=d.data;if(!g)return;const m=Number(g.id);Number.isFinite(m)&&c.set(m,g.name)}),c},[s,o]),u=new Set(s.map(c=>c.id)),h=new Set(t),j=r.filter(c=>u.has(c)&&!h.has(c)),x=r.filter(c=>!u.has(c)&&h.has(c)),a=(c,d)=>{const g=d==="current"&&j.includes(c),m=d==="proposed"&&x.includes(c);return e.jsx("span",{className:M("submission-diff-pill",g&&"removed",m&&"added"),children:l.get(c)??`#${c}`},c)};return e.jsxs("div",{className:"submission-diff-columns",children:[e.jsx(D,{title:"Currently tagged",children:s.length>0?s.map(c=>a(c.id,"current")):e.jsx(R,{children:"No current tags"})}),e.jsx(D,{title:"Will be tagged",children:t.length>0?t.map(c=>a(c,"proposed")):e.jsx(R,{children:"No proposed tags"})})]})}function ce({label:s,currentItems:t,proposedItems:i}){const n=new Map(t.map(l=>[l.url,l])),r=new Map(i.map(l=>[l.url,l])),o=Array.from(new Set([...n.keys(),...r.keys()])).sort();return o.length===0?e.jsxs(R,{children:["No ",s," in this submission."]}):e.jsx("div",{className:"submission-url-list",children:o.map(l=>{var c;const u=n.get(l),h=r.get(l),j=!u&&h,x=u&&!h,a=u&&h&&u.is_official!==h.is_official;return e.jsx("div",{className:M("submission-url-row",j&&"added",x&&"removed",a&&"changed"),children:e.jsxs("div",{className:"submission-url-content",children:[e.jsx("a",{href:l,target:"_blank",rel:"noopener noreferrer",className:M("submission-url-link",x&&"removed"),children:l}),j&&e.jsx("span",{className:"submission-pill status approved",children:"Added"}),x&&e.jsx("span",{className:"submission-pill status rejected",children:"Removed"}),a&&e.jsxs("span",{className:"submission-pill changed",children:["Official: ",String(u.is_official)," ","->"," ",String(h.is_official)]}),((c=h??u)==null?void 0:c.is_official)&&e.jsx("span",{className:"submission-pill",children:"Official"})]})},l)})})}function cs({currentPayload:s,proposedPayload:t}){const i=ns(Q(s).evaluations),n=rs(t.operations),r=N.useMemo(()=>{const a=new Set;return i.forEach(c=>{c.task_id&&a.add(Number(c.task_id))}),n.forEach(c=>{const d=c.data;d!=null&&d.task_id&&a.add(Number(d.task_id))}),Array.from(a).filter(c=>Number.isFinite(c))},[i,n]),o=N.useMemo(()=>{const a=new Set;return i.forEach(c=>{c.dataset_id&&a.add(Number(c.dataset_id))}),n.forEach(c=>{const d=c.data;d!=null&&d.dataset_id&&a.add(Number(d.dataset_id))}),Array.from(a).filter(c=>Number.isFinite(c))},[i,n]),l=G({queries:r.map(a=>({queryKey:["task",String(a)],queryFn:()=>Se(String(a)),staleTime:5*60*1e3}))}),u=G({queries:o.map(a=>({queryKey:["dataset",String(a)],queryFn:()=>Ie(String(a)),staleTime:5*60*1e3}))}),h=N.useMemo(()=>{const a=new Map;return l.forEach(c=>{const d=c.data;if(!d)return;const g=Number(d.id);Number.isFinite(g)&&a.set(g,d.name)}),a},[l]),j=N.useMemo(()=>{const a=new Map;return u.forEach(c=>{const d=c.data;if(!d)return;const g=Number(d.id);Number.isFinite(g)&&a.set(g,d.name)}),a},[u]),x=new Map(i.filter(a=>a.id!=null).map(a=>[Number(a.id),a]));return n.length===0?e.jsx(R,{children:"No evaluation operations in this payload."}):e.jsx("div",{className:"submission-eval-list",children:n.map((a,c)=>{const d=a.evaluation_id?x.get(a.evaluation_id):void 0,m=(a.op==="update"?{...d,...a.data}:a.data??d)??{};return e.jsxs("div",{className:"submission-eval-op",children:[e.jsxs("div",{className:"submission-eval-op-header",children:[e.jsx("span",{className:M("submission-pill status",a.op==="create"&&"approved",a.op==="update"&&"changed",a.op==="delete"&&"rejected"),children:a.op??"unknown"}),a.evaluation_id&&e.jsxs("span",{className:"submission-meta",children:["Evaluation #",a.evaluation_id]})]}),a.op&&["create","update","delete"].includes(a.op)?e.jsx(ls,{evaluation:m,taskNames:h,datasetNames:j}):e.jsx(oe,{title:"Unsupported operation",value:a})]},`${a.op}-${a.evaluation_id??c}`)})})}function ls({evaluation:s,taskNames:t,datasetNames:i}){const n=s.task_id?Number(s.task_id):void 0,r=s.dataset_id?Number(s.dataset_id):void 0,o=s.metrics??{};return e.jsxs("div",{className:"submission-eval-fields",children:[e.jsx(A,{label:"Task",value:n?t.get(n)??`#${n}`:null}),e.jsx(A,{label:"Dataset",value:r?i.get(r)??`#${r}`:null}),e.jsx(A,{label:"Model",value:s.model_name||null}),e.jsx(A,{label:"Harness",value:s.harness||null}),e.jsx(A,{label:"Best rank",value:s.best_rank??null}),e.jsx(A,{label:"Parameters",value:s.num_parameters??null}),e.jsx(A,{label:"HF model URL",value:s.hf_model_url||null}),e.jsx(A,{label:"Open source",value:s.is_open===void 0?null:s.is_open?"Yes":"No"}),e.jsxs("div",{className:"submission-eval-metrics",children:[e.jsx("div",{className:"submission-diff-label",children:"Metrics"}),Object.keys(o).length>0?e.jsx("div",{className:"submission-metric-list",children:Object.entries(o).map(([l,u])=>e.jsxs("span",{className:"submission-metric-pill",children:[l,": ",String(u)]},l))}):e.jsx(R,{children:"No metrics"})]})]})}function A({label:s,value:t}){return e.jsxs("div",{children:[e.jsx("div",{className:"submission-diff-label",children:s}),e.jsx("div",{className:"submission-field-value",children:t??e.jsx("span",{className:"submission-muted",children:"Not set"})})]})}function ds({currentPayload:s,proposedPayload:t}){const i=Q(s).source_url,n=t.source_url;return e.jsxs("div",{className:"submission-diff-columns",children:[e.jsx(D,{title:"Current source URL",children:typeof i=="string"&&i?e.jsx("a",{className:"submission-url-link",href:i,target:"_blank",rel:"noopener noreferrer",children:i}):e.jsx(R,{children:"No current URL"})}),e.jsx(D,{title:"Proposed source URL",children:typeof n=="string"&&n?e.jsx("a",{className:"submission-url-link",href:n,target:"_blank",rel:"noopener noreferrer",children:n}):e.jsx(R,{children:"No proposed URL"})})]})}function V({kind:s,proposedPayload:t}){const i=typeof t.name=="string"?t.name:"",n=typeof t.description=="string"?t.description:"";return e.jsxs("div",{className:"submission-diff-columns",children:[e.jsx(D,{title:`Suggested ${s} name`,children:i?e.jsx("span",{className:"submission-diff-pill added",children:i}):e.jsx(R,{children:"No name provided"})}),e.jsx(D,{title:"Description",children:n?e.jsx("span",{className:"submission-field-value",children:n}):e.jsx(R,{children:"No description provided"})})]})}function D({title:s,children:t}){return e.jsxs("div",{className:"submission-diff-column",children:[e.jsx("div",{className:"submission-diff-label",children:s}),e.jsx("div",{className:"submission-diff-pills",children:t})]})}function R({children:s}){return e.jsx("span",{className:"submission-muted",children:s})}function us({currentPayload:s,proposedPayload:t}){const i=Q(s),n=[{key:"hf_models",label:"Models"},{key:"hf_datasets",label:"Datasets"},{key:"hf_spaces",label:"Spaces"}];return e.jsx("div",{className:"submission-hf-artifacts-diff",children:n.map(({key:r,label:o})=>{const l=Array.isArray(i[r])?i[r].filter(h=>typeof h=="string"):[],u=Array.isArray(t[r])?t[r].filter(h=>typeof h=="string"):[];return e.jsxs("div",{className:"submission-hf-artifacts-section",children:[e.jsx("div",{className:"submission-diff-label",children:o}),e.jsx(ce,{label:o.toLowerCase(),currentItems:l.map(h=>({url:h,is_official:!1})),proposedItems:u.map(h=>({url:h,is_official:!1}))})]},r)})})}function ms({editType:s,currentPayload:t,proposedPayload:i}){const n=Q(t);let r;return s==="tasks"?r=e.jsx(Ne,{currentItems:xe(n.tasks),proposedIds:ve(i.task_ids),queryPrefix:"task",fetchEntity:Se}):s==="methods"?r=e.jsx(Ne,{currentItems:xe(n.methods),proposedIds:ve(i.method_ids),queryPrefix:"method",fetchEntity:Fe}):s==="repositories"?r=e.jsx(ce,{label:"repositories",currentItems:J(n.repositories),proposedItems:J(i.repositories)}):s==="project_pages"?r=e.jsx(ce,{label:"project pages",currentItems:J(n.project_pages),proposedItems:J(i.project_pages)}):s==="evaluations"?r=e.jsx(cs,{currentPayload:t,proposedPayload:i}):s==="source_url"?r=e.jsx(ds,{currentPayload:t,proposedPayload:i}):s==="hf_artifacts"?r=e.jsx(us,{currentPayload:t,proposedPayload:i}):s==="new_task"?r=e.jsx(V,{kind:"task",proposedPayload:i}):s==="new_method"?r=e.jsx(V,{kind:"method",proposedPayload:i}):s==="new_benchmark"?r=e.jsx(V,{kind:"benchmark",proposedPayload:i}):s==="new_metric"?r=e.jsx(V,{kind:"metric",proposedPayload:i}):r=e.jsxs("div",{className:"submission-empty submission-empty-warn",children:["No custom renderer exists yet for ",as(s),"."]}),e.jsxs("div",{className:"submission-diff-body",children:[r,e.jsx(os,{currentPayload:t,proposedPayload:i})]})}const Z=25,hs=["pending","approved","rejected","all"],fs=["all","tasks","methods","evaluations","repositories","project_pages","source_url","new_task","new_method","new_benchmark","new_metric"],le=["pending","approved","rejected"];function ps(s){return s.slice(0,2).toUpperCase()}function Y(s){return s.replace(/_/g," ")}function ye(s){if(!s)return"unknown time";const t=new Date(s);if(Number.isNaN(t.getTime()))return s;const i=Date.now()-t.getTime(),n=Math.floor(i/6e4),r=Math.floor(i/36e5),o=Math.floor(i/864e5);return n<1?"just now":n<60?`${n}m ago`:r<24?`${r}h ago`:o<14?`${o}d ago`:t.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}function de(s,t){var n;const i=s;if(i.response)try{const r=JSON.parse(i.response);if(typeof(r==null?void 0:r.detail)=="string")return r.detail;if(Array.isArray(r==null?void 0:r.detail)&&((n=r.detail[0])!=null&&n.msg))return r.detail[0].msg}catch{return i.response}return i.message||t}function bs(s){return s==="approved"?"approved":s==="rejected"?"rejected":"pending"}function gs(s,t){return(s==null?void 0:s.arxiv_id)||(s==null?void 0:s.id)||String(t)}function js(s){return[...s].sort((t,i)=>new Date(i.created_at).getTime()-new Date(t.created_at).getTime())}async function xs(s,t,i){const n=t==="all"?void 0:t;if(s!=="all")return se({status:s,edit_type:n,limit:i,offset:0});const r=await Promise.all(le.map(o=>se({status:o,edit_type:n,limit:i,offset:0})));return{count:r.reduce((o,l)=>o+l.count,0),results:js(r.flatMap(o=>o.results)).slice(0,i)}}function vs(){return e.jsx("div",{className:"page",children:e.jsxs("div",{className:"submission-empty submission-empty-warn",children:[e.jsx(Xe,{size:22}),e.jsx("h1",{children:"Admin access required"}),e.jsx("p",{children:"Sign in with an allowlisted Hugging Face admin account to review paper edit submissions."})]})})}function Ns(){return e.jsx("div",{className:"page",children:e.jsxs("div",{className:"submission-loading",children:[e.jsx(P,{className:"spin",size:18}),e.jsx("span",{children:"Checking admin session..."})]})})}function ys({submission:s,paper:t}){const[i,n]=N.useState(s.admin_note??""),r=ke(),{toast:o}=we(),l=gs(t,s.paper_id),u=(t==null?void 0:t.title)||`Paper #${s.paper_id}`,h=`https://huggingface.co/${encodeURIComponent(s.hf_username)}/avatar`,j=s.status==="pending";N.useEffect(()=>{n(s.admin_note??"")},[s.admin_note,s.id]);const x=N.useCallback(p=>{r.invalidateQueries({queryKey:["pendingPaperEdits"]}),r.invalidateQueries({queryKey:["pendingPaperEdit",p.id]}),r.invalidateQueries({queryKey:["paper",String(p.paper_id)]}),r.invalidateQueries({queryKey:["paper-summary",String(p.paper_id)]}),t!=null&&t.arxiv_id&&r.invalidateQueries({queryKey:["paper-arxiv",t.arxiv_id]}),p.edit_type==="evaluations"&&r.invalidateQueries({queryKey:["evaluations","paper",String(p.paper_id)]})},[t==null?void 0:t.arxiv_id,r]),a=ge({mutationFn:()=>Te(s.id,{admin_note:i.trim()||void 0}),onSuccess:p=>{x(p),o({title:"Submission approved",description:`Applied ${Y(s.edit_type)} changes for ${u}.`})},onError:p=>{o({title:"Could not approve submission",description:de(p,"Approval failed. Please try again."),variant:"destructive"})}}),c=ge({mutationFn:()=>Be(s.id,{admin_note:i.trim()||void 0}),onSuccess:p=>{x(p),o({title:"Submission rejected",description:`Rejected ${Y(s.edit_type)} changes for ${u}.`})},onError:p=>{o({title:"Could not reject submission",description:de(p,"Rejection failed. Please try again."),variant:"destructive"})}}),d=a.isPending,g=c.isPending,m=d||g;return e.jsxs("article",{id:`submission-${s.id}`,className:"submission-card",children:[e.jsxs("header",{className:"submission-card-header",children:[e.jsxs("div",{className:"submission-card-top",children:[e.jsxs("div",{children:[e.jsx("a",{href:`/paper/${encodeURIComponent(l)}`,target:"_blank",rel:"noopener noreferrer",className:"submission-title",children:u}),e.jsxs("div",{className:"submission-meta",children:[e.jsxs("span",{children:["#",s.id]}),e.jsxs("span",{children:["Paper #",s.paper_id]}),e.jsx("span",{children:ye(s.created_at)})]})]}),e.jsxs("div",{className:"submission-badges",children:[e.jsx("span",{className:"submission-pill",children:Y(s.edit_type)}),s.is_author&&e.jsx("span",{className:"submission-pill author",children:"Linked author"}),e.jsx("span",{className:M("submission-pill status",bs(s.status)),children:s.status})]})]}),e.jsxs("a",{href:`https://huggingface.co/${encodeURIComponent(s.hf_username)}`,target:"_blank",rel:"noopener noreferrer",className:"submission-user",children:[e.jsxs(De,{className:"h-6 w-6",children:[e.jsx($e,{src:h,alt:s.hf_username}),e.jsx(Pe,{className:"text-[10px]",children:ps(s.hf_username)})]}),e.jsxs("span",{children:["@",s.hf_username]})]})]}),e.jsx("div",{className:"submission-diff",children:e.jsx(ms,{editType:s.edit_type,currentPayload:s.current_payload,proposedPayload:s.proposed_payload})}),e.jsx("footer",{className:"submission-actions",children:j?e.jsxs(e.Fragment,{children:[e.jsx("textarea",{value:i,onChange:p=>n(p.target.value),placeholder:"Optional admin note",className:"submission-note",disabled:m}),e.jsxs("div",{className:"submission-action-buttons",children:[e.jsxs("button",{type:"button",onClick:()=>c.mutate(),disabled:m,className:"submission-action-btn reject",children:[g?e.jsx(P,{className:"spin",size:14}):e.jsx(Ze,{size:14}),"Reject"]}),e.jsxs("button",{type:"button",onClick:()=>a.mutate(),disabled:m,className:"submission-action-btn approve",children:[d?e.jsx(P,{className:"spin",size:14}):e.jsx(es,{size:14}),"Approve"]})]})]}):e.jsxs("div",{className:"submission-reviewed",children:[e.jsxs("span",{children:["Reviewed by ",e.jsx("strong",{children:s.reviewed_by||"unknown"}),s.reviewed_at?` ${ye(s.reviewed_at)}`:""]}),s.admin_note&&e.jsxs("span",{children:["Admin note: ",e.jsx("strong",{children:s.admin_note})]})]})})]})}function Rs(){var ue,me,he;const{user:s,isLoading:t}=Le(),{toast:i}=we(),[n,r]=N.useState("pending"),[o,l]=N.useState("all"),[u,h]=N.useState(Z),j=!!(s!=null&&s.is_admin);N.useEffect(()=>{h(Z)},[n,o]);const x=be({queryKey:["pendingPaperEdits","counts",o],queryFn:async()=>{const b=o==="all"?void 0:o,F=await Promise.all(le.map(C=>se({status:C,edit_type:b,limit:1,offset:0})));return Object.fromEntries(F.map((C,K)=>[le[K],C.count]))},enabled:j,staleTime:30*1e3}),a=be({queryKey:["pendingPaperEdits",{status:n,editType:o,visibleLimit:u}],queryFn:()=>xs(n,o,u),enabled:j,retry:!1}),c=N.useMemo(()=>{var b;return Array.from(new Set((((b=a.data)==null?void 0:b.results)??[]).map(F=>F.paper_id))).sort((F,C)=>F-C)},[(ue=a.data)==null?void 0:ue.results]),d=G({queries:c.map(b=>({queryKey:["paper-summary",String(b)],queryFn:()=>Ue(String(b),!1),enabled:j,staleTime:5*60*1e3}))}),g=N.useMemo(()=>{const b=new Map;return d.forEach(F=>{const C=F.data;if(!C)return;const K=Number(C.id);Number.isFinite(K)&&b.set(K,C)}),b},[d]);if(N.useEffect(()=>{a.error&&i({title:"Could not load submissions",description:de(a.error,"Failed to load pending paper edits."),variant:"destructive"})},[a.error,i]),t)return e.jsx(Ns,{});if(!j)return e.jsx(vs,{});const m=x.data,p=m?m.pending+m.approved+m.rejected:void 0,S={pending:m==null?void 0:m.pending,approved:m==null?void 0:m.approved,rejected:m==null?void 0:m.rejected,all:p},q=((me=a.data)==null?void 0:me.results)??[],W=((he=a.data)==null?void 0:he.count)??0,Re=q.length<W;return e.jsxs("div",{className:"page submissions-page",children:[e.jsxs("div",{className:"feed-header",children:[e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["Pending ",e.jsx("em",{children:"Edits"})]}),e.jsx("div",{className:"feed-subtitle",children:"Review submitted changes to paper metadata and benchmark results"})]}),e.jsxs("button",{type:"button",className:"feedback-link",onClick:()=>{x.refetch(),a.refetch()},disabled:a.isFetching||x.isFetching,children:[e.jsx(We,{className:M((a.isFetching||x.isFetching)&&"spin"),size:14}),"Refresh"]})]}),e.jsxs("div",{className:"submissions-filter-panel",children:[e.jsxs("div",{className:"submission-filter-block",children:[e.jsx("div",{className:"sidebar-label",children:"Status"}),e.jsx("div",{className:"period-switch",children:hs.map(b=>e.jsxs("button",{type:"button",className:M("period-btn",n===b&&"active"),onClick:()=>r(b),children:[b,S[b]!=null&&e.jsx("span",{className:"submission-count",children:S[b]})]},b))})]}),e.jsxs("div",{className:"submission-filter-block",children:[e.jsx("div",{className:"sidebar-label",children:"Edit Type"}),e.jsx("div",{className:"sort-options submissions-type-options",children:fs.map(b=>e.jsx("button",{type:"button",className:M("sort-btn",o===b&&"active"),onClick:()=>l(b),children:Y(b)},b))})]})]}),e.jsxs("div",{children:[e.jsx("div",{className:"sort-bar submissions-sort-bar",children:e.jsx("div",{children:e.jsx("div",{className:"sort-options",children:e.jsx("span",{className:"results-count",children:a.isFetching?"refreshing":`${W} submissions`})})})}),a.isLoading?e.jsxs("div",{className:"submission-loading",children:[e.jsx(P,{className:"spin",size:18}),e.jsx("span",{children:"Loading submissions..."})]}):q.length===0?e.jsxs("div",{className:"submission-empty",children:[e.jsx(is,{size:28}),e.jsx("h2",{children:"No pending submissions."}),e.jsxs("p",{children:["The SQL and curl fallback is still documented in"," ",e.jsx("a",{href:"https://github.com/huggingface/paperswithcode/blob/main/docs/operations.md",target:"_blank",rel:"noopener noreferrer",children:"operations.md"}),"."]})]}):e.jsx("div",{className:"submission-list",children:q.map(b=>e.jsx(ys,{submission:b,paper:g.get(b.paper_id)},b.id))}),q.length>0&&e.jsxs("div",{className:"submission-pagination",children:[e.jsxs("p",{children:["Showing ",q.length," of ",W," submissions"]}),Re&&e.jsxs("button",{type:"button",className:"feedback-link",onClick:()=>h(b=>b+Z),disabled:a.isFetching,children:[a.isFetching&&e.jsx(P,{className:"spin",size:14}),"Load more"]})]})]})]})}export{Rs as default};
 
1
+ var fe=s=>{throw TypeError(s)};var Z=(s,t,i)=>t.has(s)||fe("Cannot "+i);var f=(s,t,i)=>(Z(s,t,"read from private field"),i?i.call(s):t.get(s)),w=(s,t,i)=>t.has(s)?fe("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(s):t.set(s,i),N=(s,t,i,n)=>(Z(s,t,"write to private field"),n?n.call(s,i):t.set(s,i),i),E=(s,t,i)=>(Z(s,t,"access private method"),i);import{an as Ae,ao as ee,ap as Oe,aq as Me,x as ke,r as $,ar as qe,g as Qe,j as e,as as Se,at as Fe,R as y,q as M,au as Ie,f as Le,v as we,av as Ue,aw as De,ax as $e,ay as Pe,az as Te,aA as Be,aB as se}from"./index-CKAClQ2e.js";import{Q as Ee,b as ze,c as He,e as Ke,d as Je,f as Ye,s as pe,g as Ge,h as Ve,u as be}from"./useQuery-DVaOQYVk.js";import{u as ge}from"./useMutation-Dlnk3g_k.js";import{R as Xe,S as Ze,C as We,a as es}from"./shield-alert-LlFuaC5a.js";import{L as P}from"./loader-circle-IFHZqWi9.js";function je(s,t){const i=new Set(t);return s.filter(n=>!i.has(n))}function ss(s,t,i){const n=s.slice(0);return n[t]=i,n}var L,_,U,I,k,O,T,B,z,H,v,te,ie,Ce,ne,re,ae,_e,ts=(_e=class extends Ae{constructor(t,i,n){super();w(this,v);w(this,L);w(this,_);w(this,U);w(this,I);w(this,k);w(this,O);w(this,T);w(this,B);w(this,z);w(this,H,[]);N(this,L,t),N(this,I,n),N(this,U,[]),N(this,k,[]),N(this,_,[]),this.setQueries(i)}onSubscribe(){this.listeners.size===1&&f(this,k).forEach(t=>{t.subscribe(i=>{E(this,v,re).call(this,t,i)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,f(this,k).forEach(t=>{t.destroy()})}setQueries(t,i){N(this,U,t),N(this,I,i),ee.batch(()=>{const n=f(this,k),r=E(this,v,ne).call(this,f(this,U));r.forEach(a=>a.observer.setOptions(a.defaultedQueryOptions));const o=r.map(a=>a.observer),l=o.map(a=>a.getCurrentResult()),u=n.length!==o.length,h=o.some((a,c)=>a!==n[c]),j=u||h,x=j?!0:l.some((a,c)=>{const d=f(this,_)[c];return!d||!Oe(a,d)});!j&&!x||(j&&(N(this,H,r),N(this,k,o)),N(this,_,l),this.hasListeners()&&(j&&(je(n,o).forEach(a=>{a.destroy()}),je(o,n).forEach(a=>{a.subscribe(c=>{E(this,v,re).call(this,a,c)})})),E(this,v,ae).call(this)))})}getCurrentResult(){return f(this,_)}getQueries(){return f(this,k).map(t=>t.getCurrentQuery())}getObservers(){return f(this,k)}getOptimisticResult(t,i){const n=E(this,v,ne).call(this,t),r=n.map(l=>l.observer.getOptimisticResult(l.defaultedQueryOptions)),o=n.map(l=>l.defaultedQueryOptions.queryHash);return[r,l=>E(this,v,ie).call(this,l??r,i,o),()=>E(this,v,te).call(this,r,n)]}},L=new WeakMap,_=new WeakMap,U=new WeakMap,I=new WeakMap,k=new WeakMap,O=new WeakMap,T=new WeakMap,B=new WeakMap,z=new WeakMap,H=new WeakMap,v=new WeakSet,te=function(t,i){return i.map((n,r)=>{const o=t[r];return n.defaultedQueryOptions.notifyOnChangeProps?o:n.observer.trackResult(o,l=>{i.forEach(u=>{u.observer.trackProp(l)})})})},ie=function(t,i,n){if(i){const r=f(this,z),o=n!==void 0&&r!==void 0&&(r.length!==n.length||n.some((l,u)=>l!==r[u]));return(!f(this,O)||f(this,_)!==f(this,B)||o||i!==f(this,T))&&(N(this,T,i),N(this,B,f(this,_)),n!==void 0&&N(this,z,n),N(this,O,Me(f(this,O),i(t)))),f(this,O)}return t},Ce=function(){var t;return((t=f(this,I))==null?void 0:t.combine)!==void 0&&f(this,k).some((i,n)=>{var r;return i.options.suspense&&((r=f(this,_)[n])==null?void 0:r.data)===void 0})},ne=function(t){const i=new Map;f(this,k).forEach(r=>{const o=r.options.queryHash;if(!o)return;const l=i.get(o);l?l.push(r):i.set(o,[r])});const n=[];return t.forEach(r=>{var h;const o=f(this,L).defaultQueryOptions(r),u=((h=i.get(o.queryHash))==null?void 0:h.shift())??new Ee(f(this,L),o);n.push({defaultedQueryOptions:o,observer:u})}),n},re=function(t,i){const n=f(this,k).indexOf(t);n!==-1&&(N(this,_,ss(f(this,_),n,i)),E(this,v,ae).call(this))},ae=function(){var t;if(this.hasListeners()){const i=E(this,v,te).call(this,f(this,_),f(this,H)),n=E(this,v,Ce).call(this),r=f(this,O),o=n?r:E(this,v,ie).call(this,i,(t=f(this,I))==null?void 0:t.combine);(n||r!==o)&&ee.batch(()=>{this.listeners.forEach(l=>{l(f(this,_))})})}},_e);function V({queries:s,...t},i){const n=ke(),r=ze(),o=He(),l=$.useMemo(()=>s.map(m=>{const p=n.defaultQueryOptions(m);return p._optimisticResults=r?"isRestoring":"optimistic",p}),[s,n,r]);l.forEach(m=>{Ke(m);const p=n.getQueryCache().get(m.queryHash);Je(m,o,p)}),Ye(o);const[u]=$.useState(()=>new ts(n,l,t)),[h,j,x]=u.getOptimisticResult(l,t.combine),a=!r&&t.subscribed!==!1;$.useSyncExternalStore($.useCallback(m=>a?u.subscribe(ee.batchCalls(m)):qe,[u,a]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),$.useEffect(()=>{u.setQueries(l,t)},[l,t,u]);const d=h.some((m,p)=>pe(l[p],m))?h.flatMap((m,p)=>{const S=l[p];if(S&&pe(S,m)){const Q=new Ee(n,S);return Ge(S,Q,o)}return[]}):[];if(d.length>0)throw Promise.all(d);const g=h.find((m,p)=>{const S=l[p];return S&&Ve({result:m,errorResetBoundary:o,throwOnError:S.throwOnError,query:n.getQueryCache().get(S.queryHash),suspense:S.suspense})});if(g!=null&&g.error)throw g.error;return j(x())}/**
2
  * @license lucide-react v0.462.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 is=Qe("Inbox",[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]]),q=s=>s&&typeof s=="object"&&!Array.isArray(s)?s:{},xe=s=>Array.isArray(s)?s.map(t=>{const i=q(t),n=Number(i.id);return Number.isFinite(n)?{id:n,name:typeof i.name=="string"?i.name:`#${n}`,slug:typeof i.slug=="string"?i.slug:void 0}:null}).filter(t=>!!t):[],ve=s=>Array.isArray(s)?s.map(Number).filter(t=>Number.isFinite(t)):[],J=s=>Array.isArray(s)?s.map(t=>{const i=q(t);return typeof i.url!="string"?null:{url:i.url,is_official:!!i.is_official}}).filter(t=>!!t):[],ns=s=>Array.isArray(s)?s.map(t=>q(t)):[],rs=s=>Array.isArray(s)?s.map(t=>q(t)):[],as=s=>s.replace(/_/g," ");function os({currentPayload:s,proposedPayload:t}){const[i,n]=y.useState(!1);return e.jsxs("div",{className:"submission-raw-toggle",children:[e.jsx("button",{type:"button",className:"raw-json-btn",onClick:()=>n(r=>!r),children:i?"Hide raw JSON":"Show raw JSON"}),i&&e.jsxs("div",{className:"submission-json-grid",children:[e.jsx(oe,{title:"Current payload",value:s??{}}),e.jsx(oe,{title:"Proposed payload",value:t})]})]})}function oe({title:s,value:t}){return e.jsxs("div",{className:"submission-json-block",children:[e.jsx("div",{className:"submission-diff-label",children:s}),e.jsx("pre",{children:JSON.stringify(t,null,2)})]})}function ye({currentItems:s,proposedIds:t,queryPrefix:i,fetchEntity:n}){const r=y.useMemo(()=>Array.from(new Set([...s.map(c=>c.id),...t])).sort((c,d)=>c-d),[s,t]),o=V({queries:r.map(c=>({queryKey:[i,String(c)],queryFn:()=>n(String(c)),staleTime:5*60*1e3}))}),l=y.useMemo(()=>{const c=new Map;return s.forEach(d=>c.set(d.id,d.name)),o.forEach(d=>{const g=d.data;if(!g)return;const m=Number(g.id);Number.isFinite(m)&&c.set(m,g.name)}),c},[s,o]),u=new Set(s.map(c=>c.id)),h=new Set(t),j=r.filter(c=>u.has(c)&&!h.has(c)),x=r.filter(c=>!u.has(c)&&h.has(c)),a=(c,d)=>{const g=d==="current"&&j.includes(c),m=d==="proposed"&&x.includes(c);return e.jsx("span",{className:M("submission-diff-pill",g&&"removed",m&&"added"),children:l.get(c)??`#${c}`},c)};return e.jsxs("div",{className:"submission-diff-columns",children:[e.jsx(D,{title:"Currently tagged",children:s.length>0?s.map(c=>a(c.id,"current")):e.jsx(R,{children:"No current tags"})}),e.jsx(D,{title:"Will be tagged",children:t.length>0?t.map(c=>a(c,"proposed")):e.jsx(R,{children:"No proposed tags"})})]})}function ce({label:s,currentItems:t,proposedItems:i}){const n=new Map(t.map(l=>[l.url,l])),r=new Map(i.map(l=>[l.url,l])),o=Array.from(new Set([...n.keys(),...r.keys()])).sort();return o.length===0?e.jsxs(R,{children:["No ",s," in this submission."]}):e.jsx("div",{className:"submission-url-list",children:o.map(l=>{var c;const u=n.get(l),h=r.get(l),j=!u&&h,x=u&&!h,a=u&&h&&u.is_official!==h.is_official;return e.jsx("div",{className:M("submission-url-row",j&&"added",x&&"removed",a&&"changed"),children:e.jsxs("div",{className:"submission-url-content",children:[e.jsx("a",{href:l,target:"_blank",rel:"noopener noreferrer",className:M("submission-url-link",x&&"removed"),children:l}),j&&e.jsx("span",{className:"submission-pill status approved",children:"Added"}),x&&e.jsx("span",{className:"submission-pill status rejected",children:"Removed"}),a&&e.jsxs("span",{className:"submission-pill changed",children:["Official: ",String(u.is_official)," ","->"," ",String(h.is_official)]}),((c=h??u)==null?void 0:c.is_official)&&e.jsx("span",{className:"submission-pill",children:"Official"})]})},l)})})}function cs({currentPayload:s,proposedPayload:t}){const i=ns(q(s).evaluations),n=rs(t.operations),r=y.useMemo(()=>{const a=new Set;return i.forEach(c=>{c.task_id&&a.add(Number(c.task_id))}),n.forEach(c=>{const d=c.data;d!=null&&d.task_id&&a.add(Number(d.task_id))}),Array.from(a).filter(c=>Number.isFinite(c))},[i,n]),o=y.useMemo(()=>{const a=new Set;return i.forEach(c=>{c.dataset_id&&a.add(Number(c.dataset_id))}),n.forEach(c=>{const d=c.data;d!=null&&d.dataset_id&&a.add(Number(d.dataset_id))}),Array.from(a).filter(c=>Number.isFinite(c))},[i,n]),l=V({queries:r.map(a=>({queryKey:["task",String(a)],queryFn:()=>Se(String(a)),staleTime:5*60*1e3}))}),u=V({queries:o.map(a=>({queryKey:["dataset",String(a)],queryFn:()=>Ie(String(a)),staleTime:5*60*1e3}))}),h=y.useMemo(()=>{const a=new Map;return l.forEach(c=>{const d=c.data;if(!d)return;const g=Number(d.id);Number.isFinite(g)&&a.set(g,d.name)}),a},[l]),j=y.useMemo(()=>{const a=new Map;return u.forEach(c=>{const d=c.data;if(!d)return;const g=Number(d.id);Number.isFinite(g)&&a.set(g,d.name)}),a},[u]),x=new Map(i.filter(a=>a.id!=null).map(a=>[Number(a.id),a]));return n.length===0?e.jsx(R,{children:"No evaluation operations in this payload."}):e.jsx("div",{className:"submission-eval-list",children:n.map((a,c)=>{const d=a.evaluation_id?x.get(a.evaluation_id):void 0,m=(a.op==="update"?{...d,...a.data}:a.data??d)??{};return e.jsxs("div",{className:"submission-eval-op",children:[e.jsxs("div",{className:"submission-eval-op-header",children:[e.jsx("span",{className:M("submission-pill status",a.op==="create"&&"approved",a.op==="update"&&"changed",a.op==="delete"&&"rejected"),children:a.op??"unknown"}),a.evaluation_id&&e.jsxs("span",{className:"submission-meta",children:["Evaluation #",a.evaluation_id]})]}),a.op&&["create","update","delete"].includes(a.op)?e.jsx(ls,{evaluation:m,taskNames:h,datasetNames:j}):e.jsx(oe,{title:"Unsupported operation",value:a})]},`${a.op}-${a.evaluation_id??c}`)})})}function ls({evaluation:s,taskNames:t,datasetNames:i}){const n=s.task_id?Number(s.task_id):void 0,r=s.dataset_id?Number(s.dataset_id):void 0,o=s.metrics??{};return e.jsxs("div",{className:"submission-eval-fields",children:[e.jsx(A,{label:"Task",value:n?t.get(n)??`#${n}`:null}),e.jsx(A,{label:"Dataset",value:r?i.get(r)??`#${r}`:null}),e.jsx(A,{label:"Model",value:s.model_name||null}),e.jsx(A,{label:"Harness",value:s.harness||null}),e.jsx(A,{label:"Best rank",value:s.best_rank??null}),e.jsx(A,{label:"Parameters",value:s.num_parameters??null}),e.jsx(A,{label:"HF model URL",value:s.hf_model_url||null}),e.jsx(A,{label:"Open source",value:s.is_open===void 0?null:s.is_open?"Yes":"No"}),e.jsxs("div",{className:"submission-eval-metrics",children:[e.jsx("div",{className:"submission-diff-label",children:"Metrics"}),Object.keys(o).length>0?e.jsx("div",{className:"submission-metric-list",children:Object.entries(o).map(([l,u])=>e.jsxs("span",{className:"submission-metric-pill",children:[l,": ",String(u)]},l))}):e.jsx(R,{children:"No metrics"})]})]})}function A({label:s,value:t}){return e.jsxs("div",{children:[e.jsx("div",{className:"submission-diff-label",children:s}),e.jsx("div",{className:"submission-field-value",children:t??e.jsx("span",{className:"submission-muted",children:"Not set"})})]})}function ds({currentPayload:s,proposedPayload:t}){const i=q(s).source_url,n=t.source_url;return e.jsxs("div",{className:"submission-diff-columns",children:[e.jsx(D,{title:"Current source URL",children:typeof i=="string"&&i?e.jsx("a",{className:"submission-url-link",href:i,target:"_blank",rel:"noopener noreferrer",children:i}):e.jsx(R,{children:"No current URL"})}),e.jsx(D,{title:"Proposed source URL",children:typeof n=="string"&&n?e.jsx("a",{className:"submission-url-link",href:n,target:"_blank",rel:"noopener noreferrer",children:n}):e.jsx(R,{children:"No proposed URL"})})]})}function Y({kind:s,proposedPayload:t}){const i=typeof t.name=="string"?t.name:"",n=typeof t.description=="string"?t.description:"";return e.jsxs("div",{className:"submission-diff-columns",children:[e.jsx(D,{title:`Suggested ${s} name`,children:i?e.jsx("span",{className:"submission-diff-pill added",children:i}):e.jsx(R,{children:"No name provided"})}),e.jsx(D,{title:"Description",children:n?e.jsx("span",{className:"submission-field-value",children:n}):e.jsx(R,{children:"No description provided"})})]})}function D({title:s,children:t}){return e.jsxs("div",{className:"submission-diff-column",children:[e.jsx("div",{className:"submission-diff-label",children:s}),e.jsx("div",{className:"submission-diff-pills",children:t})]})}function R({children:s}){return e.jsx("span",{className:"submission-muted",children:s})}function us({currentPayload:s,proposedPayload:t}){const i=q(s),n=[{key:"hf_models",label:"Models"},{key:"hf_datasets",label:"Datasets"},{key:"hf_spaces",label:"Spaces"}];return e.jsx("div",{className:"submission-hf-artifacts-diff",children:n.map(({key:r,label:o})=>{const l=Array.isArray(i[r])?i[r].filter(h=>typeof h=="string"):[],u=Array.isArray(t[r])?t[r].filter(h=>typeof h=="string"):[];return e.jsxs("div",{className:"submission-hf-artifacts-section",children:[e.jsx("div",{className:"submission-diff-label",children:o}),e.jsx(ce,{label:o.toLowerCase(),currentItems:l.map(h=>({url:h,is_official:!1})),proposedItems:u.map(h=>({url:h,is_official:!1}))})]},r)})})}function ms({editType:s,currentPayload:t,proposedPayload:i}){const n=q(t);let r;return s==="tasks"?r=e.jsx(ye,{currentItems:xe(n.tasks),proposedIds:ve(i.task_ids),queryPrefix:"task",fetchEntity:Se}):s==="methods"?r=e.jsx(ye,{currentItems:xe(n.methods),proposedIds:ve(i.method_ids),queryPrefix:"method",fetchEntity:Fe}):s==="repositories"?r=e.jsx(ce,{label:"repositories",currentItems:J(n.repositories),proposedItems:J(i.repositories)}):s==="project_pages"?r=e.jsx(ce,{label:"project pages",currentItems:J(n.project_pages),proposedItems:J(i.project_pages)}):s==="evaluations"?r=e.jsx(cs,{currentPayload:t,proposedPayload:i}):s==="source_url"?r=e.jsx(ds,{currentPayload:t,proposedPayload:i}):s==="hf_artifacts"?r=e.jsx(us,{currentPayload:t,proposedPayload:i}):s==="new_task"?r=e.jsx(Y,{kind:"task",proposedPayload:i}):s==="new_method"?r=e.jsx(Y,{kind:"method",proposedPayload:i}):s==="new_benchmark"?r=e.jsx(Y,{kind:"benchmark",proposedPayload:i}):s==="new_metric"?r=e.jsx(Y,{kind:"metric",proposedPayload:i}):r=e.jsxs("div",{className:"submission-empty submission-empty-warn",children:["No custom renderer exists yet for ",as(s),"."]}),e.jsxs("div",{className:"submission-diff-body",children:[r,e.jsx(os,{currentPayload:t,proposedPayload:i})]})}const W=25,hs=["pending","approved","rejected","all"],fs=["all","tasks","methods","evaluations","repositories","project_pages","source_url","new_task","new_method","new_benchmark","new_metric"],le=["pending","approved","rejected"];function ps(s){return s.slice(0,2).toUpperCase()}function G(s){return s.replace(/_/g," ")}function Ne(s){if(!s)return"unknown time";const t=new Date(s);if(Number.isNaN(t.getTime()))return s;const i=Date.now()-t.getTime(),n=Math.floor(i/6e4),r=Math.floor(i/36e5),o=Math.floor(i/864e5);return n<1?"just now":n<60?`${n}m ago`:r<24?`${r}h ago`:o<14?`${o}d ago`:t.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}function de(s,t){var n;const i=s;if(i.response)try{const r=JSON.parse(i.response);if(typeof(r==null?void 0:r.detail)=="string")return r.detail;if(Array.isArray(r==null?void 0:r.detail)&&((n=r.detail[0])!=null&&n.msg))return r.detail[0].msg}catch{return i.response}return i.message||t}function bs(s){return s==="approved"?"approved":s==="rejected"?"rejected":"pending"}function gs(s,t){return(s==null?void 0:s.arxiv_id)||(s==null?void 0:s.id)||String(t)}function js(s){return[...s].sort((t,i)=>new Date(i.created_at).getTime()-new Date(t.created_at).getTime())}async function xs(s,t,i){const n=t==="all"?void 0:t;if(s!=="all")return se({status:s,edit_type:n,limit:i,offset:0});const r=await Promise.all(le.map(o=>se({status:o,edit_type:n,limit:i,offset:0})));return{count:r.reduce((o,l)=>o+l.count,0),results:js(r.flatMap(o=>o.results)).slice(0,i)}}function vs(){return e.jsx("div",{className:"page",children:e.jsxs("div",{className:"submission-empty submission-empty-warn",children:[e.jsx(Ze,{size:22}),e.jsx("h1",{children:"Admin access required"}),e.jsx("p",{children:"Sign in with an allowlisted Hugging Face admin account to review paper edit submissions."})]})})}function ys(){return e.jsx("div",{className:"page",children:e.jsxs("div",{className:"submission-loading",children:[e.jsx(P,{className:"spin",size:18}),e.jsx("span",{children:"Checking admin session..."})]})})}function Ns({submission:s,paper:t}){const[i,n]=y.useState(s.admin_note??""),r=ke(),{toast:o}=we(),l=gs(t,s.paper_id),u=(t==null?void 0:t.title)||`Paper #${s.paper_id}`,h=`https://huggingface.co/${encodeURIComponent(s.hf_username)}/avatar`,j=s.status==="pending";y.useEffect(()=>{n(s.admin_note??"")},[s.admin_note,s.id]);const x=y.useCallback(p=>{r.invalidateQueries({queryKey:["pendingPaperEdits"]}),r.invalidateQueries({queryKey:["pendingPaperEdit",p.id]}),r.invalidateQueries({queryKey:["paper",String(p.paper_id)]}),r.invalidateQueries({queryKey:["paper-summary",String(p.paper_id)]}),t!=null&&t.arxiv_id&&r.invalidateQueries({queryKey:["paper-arxiv",t.arxiv_id]}),p.edit_type==="evaluations"&&r.invalidateQueries({queryKey:["evaluations","paper",String(p.paper_id)]})},[t==null?void 0:t.arxiv_id,r]),a=ge({mutationFn:()=>Te(s.id,{admin_note:i.trim()||void 0}),onSuccess:p=>{x(p),o({title:"Submission approved",description:`Applied ${G(s.edit_type)} changes for ${u}.`})},onError:p=>{o({title:"Could not approve submission",description:de(p,"Approval failed. Please try again."),variant:"destructive"})}}),c=ge({mutationFn:()=>Be(s.id,{admin_note:i.trim()||void 0}),onSuccess:p=>{x(p),o({title:"Submission rejected",description:`Rejected ${G(s.edit_type)} changes for ${u}.`})},onError:p=>{o({title:"Could not reject submission",description:de(p,"Rejection failed. Please try again."),variant:"destructive"})}}),d=a.isPending,g=c.isPending,m=d||g;return e.jsxs("article",{id:`submission-${s.id}`,className:"submission-card",children:[e.jsxs("header",{className:"submission-card-header",children:[e.jsxs("div",{className:"submission-card-top",children:[e.jsxs("div",{children:[e.jsx("a",{href:`/paper/${encodeURIComponent(l)}`,target:"_blank",rel:"noopener noreferrer",className:"submission-title",children:u}),e.jsxs("div",{className:"submission-meta",children:[e.jsxs("span",{children:["#",s.id]}),e.jsxs("span",{children:["Paper #",s.paper_id]}),e.jsx("span",{children:Ne(s.created_at)})]})]}),e.jsxs("div",{className:"submission-badges",children:[e.jsx("span",{className:"submission-pill",children:G(s.edit_type)}),s.is_author&&e.jsx("span",{className:"submission-pill author",children:"Linked author"}),e.jsx("span",{className:M("submission-pill status",bs(s.status)),children:s.status})]})]}),e.jsxs("a",{href:`https://huggingface.co/${encodeURIComponent(s.hf_username)}`,target:"_blank",rel:"noopener noreferrer",className:"submission-user",children:[e.jsxs(De,{className:"h-6 w-6",children:[e.jsx($e,{src:h,alt:s.hf_username}),e.jsx(Pe,{className:"text-[10px]",children:ps(s.hf_username)})]}),e.jsxs("span",{children:["@",s.hf_username]})]})]}),e.jsx("div",{className:"submission-diff",children:e.jsx(ms,{editType:s.edit_type,currentPayload:s.current_payload,proposedPayload:s.proposed_payload})}),e.jsx("footer",{className:"submission-actions",children:j?e.jsxs(e.Fragment,{children:[e.jsx("textarea",{value:i,onChange:p=>n(p.target.value),placeholder:"Optional admin note",className:"submission-note",disabled:m}),e.jsxs("div",{className:"submission-action-buttons",children:[e.jsxs("button",{type:"button",onClick:()=>c.mutate(),disabled:m,className:"submission-action-btn reject",children:[g?e.jsx(P,{className:"spin",size:14}):e.jsx(We,{size:14}),"Reject"]}),e.jsxs("button",{type:"button",onClick:()=>a.mutate(),disabled:m,className:"submission-action-btn approve",children:[d?e.jsx(P,{className:"spin",size:14}):e.jsx(es,{size:14}),"Approve"]})]})]}):e.jsxs("div",{className:"submission-reviewed",children:[e.jsxs("span",{children:["Reviewed by ",e.jsx("strong",{children:s.reviewed_by||"unknown"}),s.reviewed_at?` ${Ne(s.reviewed_at)}`:""]}),s.admin_note&&e.jsxs("span",{children:["Admin note: ",e.jsx("strong",{children:s.admin_note})]})]})})]})}function Rs(){var ue,me,he;const{user:s,isLoading:t}=Le(),{toast:i}=we(),[n,r]=y.useState("pending"),[o,l]=y.useState("all"),[u,h]=y.useState(W),j=!!(s!=null&&s.is_admin);y.useEffect(()=>{h(W)},[n,o]);const x=be({queryKey:["pendingPaperEdits","counts",o],queryFn:async()=>{const b=o==="all"?void 0:o,F=await Promise.all(le.map(C=>se({status:C,edit_type:b,limit:1,offset:0})));return Object.fromEntries(F.map((C,K)=>[le[K],C.count]))},enabled:j,staleTime:30*1e3}),a=be({queryKey:["pendingPaperEdits",{status:n,editType:o,visibleLimit:u}],queryFn:()=>xs(n,o,u),enabled:j,retry:!1}),c=y.useMemo(()=>{var b;return Array.from(new Set((((b=a.data)==null?void 0:b.results)??[]).map(F=>F.paper_id))).sort((F,C)=>F-C)},[(ue=a.data)==null?void 0:ue.results]),d=V({queries:c.map(b=>({queryKey:["paper-summary",String(b)],queryFn:()=>Ue(String(b),!1),enabled:j,staleTime:5*60*1e3}))}),g=y.useMemo(()=>{const b=new Map;return d.forEach(F=>{const C=F.data;if(!C)return;const K=Number(C.id);Number.isFinite(K)&&b.set(K,C)}),b},[d]);if(y.useEffect(()=>{a.error&&i({title:"Could not load submissions",description:de(a.error,"Failed to load pending paper edits."),variant:"destructive"})},[a.error,i]),t)return e.jsx(ys,{});if(!j)return e.jsx(vs,{});const m=x.data,p=m?m.pending+m.approved+m.rejected:void 0,S={pending:m==null?void 0:m.pending,approved:m==null?void 0:m.approved,rejected:m==null?void 0:m.rejected,all:p},Q=((me=a.data)==null?void 0:me.results)??[],X=((he=a.data)==null?void 0:he.count)??0,Re=Q.length<X;return e.jsxs("div",{className:"page submissions-page",children:[e.jsxs("div",{className:"feed-header",children:[e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["Pending ",e.jsx("em",{children:"Edits"})]}),e.jsx("div",{className:"feed-subtitle",children:"Review submitted changes to paper metadata and benchmark results"})]}),e.jsxs("button",{type:"button",className:"feedback-link",onClick:()=>{x.refetch(),a.refetch()},disabled:a.isFetching||x.isFetching,children:[e.jsx(Xe,{className:M((a.isFetching||x.isFetching)&&"spin"),size:14}),"Refresh"]})]}),e.jsxs("div",{className:"submissions-filter-panel",children:[e.jsxs("div",{className:"submission-filter-block",children:[e.jsx("div",{className:"sidebar-label",children:"Status"}),e.jsx("div",{className:"period-switch",children:hs.map(b=>e.jsxs("button",{type:"button",className:M("period-btn",n===b&&"active"),onClick:()=>r(b),children:[b,S[b]!=null&&e.jsx("span",{className:"submission-count",children:S[b]})]},b))})]}),e.jsxs("div",{className:"submission-filter-block",children:[e.jsx("div",{className:"sidebar-label",children:"Edit Type"}),e.jsx("div",{className:"sort-options submissions-type-options",children:fs.map(b=>e.jsx("button",{type:"button",className:M("sort-btn",o===b&&"active"),onClick:()=>l(b),children:G(b)},b))})]})]}),e.jsxs("div",{children:[e.jsx("div",{className:"sort-bar submissions-sort-bar",children:e.jsx("div",{children:e.jsx("div",{className:"sort-options",children:e.jsx("span",{className:"results-count",children:a.isFetching?"refreshing":`${X} submissions`})})})}),a.isLoading?e.jsxs("div",{className:"submission-loading",children:[e.jsx(P,{className:"spin",size:18}),e.jsx("span",{children:"Loading submissions..."})]}):Q.length===0?e.jsxs("div",{className:"submission-empty",children:[e.jsx(is,{size:28}),e.jsx("h2",{children:"No pending submissions."}),e.jsxs("p",{children:["The SQL and curl fallback is still documented in"," ",e.jsx("a",{href:"https://github.com/huggingface/paperswithcode/blob/main/docs/operations.md",target:"_blank",rel:"noopener noreferrer",children:"operations.md"}),"."]})]}):e.jsx("div",{className:"submission-list",children:Q.map(b=>e.jsx(Ns,{submission:b,paper:g.get(b.paper_id)},b.id))}),Q.length>0&&e.jsxs("div",{className:"submission-pagination",children:[e.jsxs("p",{children:["Showing ",Q.length," of ",X," submissions"]}),Re&&e.jsxs("button",{type:"button",className:"feedback-link",onClick:()=>h(b=>b+W),disabled:a.isFetching,children:[a.isFetching&&e.jsx(P,{className:"spin",size:14}),"Load more"]})]})]})]})}export{Rs as default};
assets/SubmitView-Cm2YYgBs.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{a as R,x as T,v as _,R as n,j as e,ah as D}from"./index-CKAClQ2e.js";import{u as k}from"./useMutation-Dlnk3g_k.js";import{A as w,a as C}from"./alert-4m2SJo0T.js";import{B as j}from"./button-q4EOT22d.js";import{I as h,T as z}from"./textarea-_XXxLwnd.js";const E=/^\d{4}\.\d{4,5}(v\d+)?$/i,F=/^[a-z-]+(\.[A-Z]{2})?\/\d{7}$/,X=/^https?:\/\/(?:www\.)?arxiv\.org\//i;function S(r){const a=r.trim();return a?E.test(a)||F.test(a)||X.test(a)?"arxiv":/^https?:\/\//i.test(a)?"external":"arxiv":"empty"}function L(r,a){const i=r.trim();if(S(i)==="arxiv")return/^https?:\/\//i.test(i)?{source_url:i}:{arxiv_id:i};const s={source_url:i},l=a.title.trim();l&&(s.title=l);const p=a.abstract.trim();p&&(s.abstract=p);const o=a.authors.split(/[,\n]/).map(x=>x.trim()).filter(Boolean);return o.length>0&&(s.authors=o),a.datePublished&&(s.date_published=a.datePublished),s}function q(r){const a=r;if(!a)return"Submission failed";if(a.response)try{const i=JSON.parse(a.response);if(typeof i.detail=="string")return i.detail}catch{return a.response}return a.message||"Submission failed"}const Q=()=>{const r=R(),a=T(),{toast:i}=_(),[d,s]=n.useState(""),[l,p]=n.useState(""),[o,x]=n.useState(""),[f,I]=n.useState(""),[y,A]=n.useState(""),[b,g]=n.useState(null),u=S(d),v=u==="external",c=k({mutationFn:t=>D(t),onSuccess:t=>{a.invalidateQueries({queryKey:["papers"],refetchType:"none"}),a.invalidateQueries({queryKey:["papers-infinite"],refetchType:"none"}),a.invalidateQueries({queryKey:["trending-papers"],refetchType:"none"});const m=t.refreshed&&t.created&&t.latest_version;i({title:m?`Paper updated to ${t.latest_version}`:t.created?"Paper submitted":"Paper already indexed",description:m?"Opening the updated paper page…":t.created?"Opening the paper page…":"Opening the existing paper page…"}),r(`/paper/${t.route_identifier}`)},onError:t=>{g(q(t))}}),P=t=>{if(t.preventDefault(),g(null),u==="empty"){g("Enter an arXiv ID or a paper URL to submit.");return}const m=L(d,{title:l,abstract:o,authors:f,datePublished:y});c.mutate(m)};return e.jsxs("div",{className:"page",style:{maxWidth:720},children:[e.jsx("h1",{className:"detail-title",children:"Submit a paper"}),e.jsx("p",{style:{fontFamily:"var(--serif)",color:"var(--ink-soft)",marginTop:12,lineHeight:1.55},children:"Index an arXiv paper or add a non-arXiv paper (blog post, technical report, model release page). Submissions are public and appear in the feed immediately."}),e.jsxs("form",{onSubmit:P,style:{marginTop:28,display:"grid",gap:20},children:[e.jsxs("div",{style:{display:"grid",gap:8},children:[e.jsx("label",{htmlFor:"submit-input",style:{fontWeight:600,fontSize:14},children:"arXiv ID or paper URL"}),e.jsx(h,{id:"submit-input",value:d,onChange:t=>s(t.target.value),placeholder:"2501.12345 · https://arxiv.org/abs/2501.12345 · https://blog.example.com/release",autoFocus:!0,required:!0}),e.jsx("div",{style:{fontSize:12,color:"var(--ink-soft)",minHeight:18},children:u==="arxiv"?"Detected: arXiv paper — metadata will be fetched automatically.":u==="external"?"Detected: external URL — we'll extract metadata and you can override below.":"Paste an arXiv ID like 2501.12345 or any paper/blog URL."})]}),v&&e.jsxs("fieldset",{style:{border:"1px solid var(--rule)",borderRadius:8,padding:"16px 20px 20px",display:"grid",gap:16},children:[e.jsx("legend",{style:{padding:"0 8px",fontSize:12,color:"var(--ink-soft)",textTransform:"uppercase",letterSpacing:.5},children:"External paper details (optional)"}),e.jsxs("div",{style:{display:"grid",gap:8},children:[e.jsx("label",{htmlFor:"submit-title",style:{fontSize:13},children:"Title"}),e.jsx(h,{id:"submit-title",value:l,onChange:t=>p(t.target.value),placeholder:"Leave blank to extract automatically"})]}),e.jsxs("div",{style:{display:"grid",gap:8},children:[e.jsx("label",{htmlFor:"submit-abstract",style:{fontSize:13},children:"Abstract or summary"}),e.jsx(z,{id:"submit-abstract",value:o,onChange:t=>x(t.target.value),rows:4,placeholder:"Leave blank to extract automatically"})]}),e.jsxs("div",{style:{display:"grid",gap:8},children:[e.jsx("label",{htmlFor:"submit-authors",style:{fontSize:13},children:"Authors (comma-separated)"}),e.jsx(h,{id:"submit-authors",value:f,onChange:t=>I(t.target.value),placeholder:"Jane Smith, John Doe"})]}),e.jsxs("div",{style:{display:"grid",gap:8},children:[e.jsx("label",{htmlFor:"submit-date",style:{fontSize:13},children:"Publication date"}),e.jsx(h,{id:"submit-date",type:"date",value:y,onChange:t=>A(t.target.value),style:{maxWidth:220}}),e.jsx("div",{style:{fontSize:12,color:"var(--ink-soft)"},children:"Required only if we cannot infer a date from the page."})]})]}),b&&e.jsx(w,{variant:"destructive",children:e.jsx(C,{children:b})}),e.jsxs("div",{style:{display:"flex",gap:12,alignItems:"center"},children:[e.jsx(j,{type:"submit",disabled:c.isPending,children:c.isPending?v?"Fetching & indexing…":"Indexing…":"Submit paper"}),e.jsx(j,{type:"button",variant:"outline",onClick:()=>r(-1),disabled:c.isPending,children:"Cancel"})]})]})]})};export{Q as default};
assets/SubmitView-Hxf-ulH3.js DELETED
@@ -1 +0,0 @@
1
- import{a0 as R,o as T,n as _,W as n,j as e,ag as D}from"./index-EtWJP9FK.js";import{u as k}from"./useMutation-mofpylMn.js";import{A as w,a as C}from"./alert-BIanajMT.js";import{B as j}from"./button-C_tMg-gR.js";import{I as h,T as z}from"./textarea-bD7Zo1RO.js";const E=/^\d{4}\.\d{4,5}(v\d+)?$/i,F=/^[a-z-]+(\.[A-Z]{2})?\/\d{7}$/,X=/^https?:\/\/(?:www\.)?arxiv\.org\//i;function S(r){const a=r.trim();return a?E.test(a)||F.test(a)||X.test(a)?"arxiv":/^https?:\/\//i.test(a)?"external":"arxiv":"empty"}function L(r,a){const i=r.trim();if(S(i)==="arxiv")return/^https?:\/\//i.test(i)?{source_url:i}:{arxiv_id:i};const s={source_url:i},l=a.title.trim();l&&(s.title=l);const p=a.abstract.trim();p&&(s.abstract=p);const o=a.authors.split(/[,\n]/).map(g=>g.trim()).filter(Boolean);return o.length>0&&(s.authors=o),a.datePublished&&(s.date_published=a.datePublished),s}function q(r){const a=r;if(!a)return"Submission failed";if(a.response)try{const i=JSON.parse(a.response);if(typeof i.detail=="string")return i.detail}catch{return a.response}return a.message||"Submission failed"}const Q=()=>{const r=R(),a=T(),{toast:i}=_(),[d,s]=n.useState(""),[l,p]=n.useState(""),[o,g]=n.useState(""),[f,I]=n.useState(""),[y,A]=n.useState(""),[b,x]=n.useState(null),u=S(d),v=u==="external",c=k({mutationFn:t=>D(t),onSuccess:t=>{a.invalidateQueries({queryKey:["papers"],refetchType:"none"}),a.invalidateQueries({queryKey:["papers-infinite"],refetchType:"none"}),a.invalidateQueries({queryKey:["trending-papers"],refetchType:"none"});const m=t.refreshed&&t.created&&t.latest_version;i({title:m?`Paper updated to ${t.latest_version}`:t.created?"Paper submitted":"Paper already indexed",description:m?"Opening the updated paper page…":t.created?"Opening the paper page…":"Opening the existing paper page…"}),r(`/paper/${t.route_identifier}`)},onError:t=>{x(q(t))}}),P=t=>{if(t.preventDefault(),x(null),u==="empty"){x("Enter an arXiv ID or a paper URL to submit.");return}const m=L(d,{title:l,abstract:o,authors:f,datePublished:y});c.mutate(m)};return e.jsxs("div",{className:"page",style:{maxWidth:720},children:[e.jsx("h1",{className:"detail-title",children:"Submit a paper"}),e.jsx("p",{style:{fontFamily:"var(--serif)",color:"var(--ink-soft)",marginTop:12,lineHeight:1.55},children:"Index an arXiv paper or add a non-arXiv paper (blog post, technical report, model release page). Submissions are public and appear in the feed immediately."}),e.jsxs("form",{onSubmit:P,style:{marginTop:28,display:"grid",gap:20},children:[e.jsxs("div",{style:{display:"grid",gap:8},children:[e.jsx("label",{htmlFor:"submit-input",style:{fontWeight:600,fontSize:14},children:"arXiv ID or paper URL"}),e.jsx(h,{id:"submit-input",value:d,onChange:t=>s(t.target.value),placeholder:"2501.12345 · https://arxiv.org/abs/2501.12345 · https://blog.example.com/release",autoFocus:!0,required:!0}),e.jsx("div",{style:{fontSize:12,color:"var(--ink-soft)",minHeight:18},children:u==="arxiv"?"Detected: arXiv paper — metadata will be fetched automatically.":u==="external"?"Detected: external URL — we'll extract metadata and you can override below.":"Paste an arXiv ID like 2501.12345 or any paper/blog URL."})]}),v&&e.jsxs("fieldset",{style:{border:"1px solid var(--rule)",borderRadius:8,padding:"16px 20px 20px",display:"grid",gap:16},children:[e.jsx("legend",{style:{padding:"0 8px",fontSize:12,color:"var(--ink-soft)",textTransform:"uppercase",letterSpacing:.5},children:"External paper details (optional)"}),e.jsxs("div",{style:{display:"grid",gap:8},children:[e.jsx("label",{htmlFor:"submit-title",style:{fontSize:13},children:"Title"}),e.jsx(h,{id:"submit-title",value:l,onChange:t=>p(t.target.value),placeholder:"Leave blank to extract automatically"})]}),e.jsxs("div",{style:{display:"grid",gap:8},children:[e.jsx("label",{htmlFor:"submit-abstract",style:{fontSize:13},children:"Abstract or summary"}),e.jsx(z,{id:"submit-abstract",value:o,onChange:t=>g(t.target.value),rows:4,placeholder:"Leave blank to extract automatically"})]}),e.jsxs("div",{style:{display:"grid",gap:8},children:[e.jsx("label",{htmlFor:"submit-authors",style:{fontSize:13},children:"Authors (comma-separated)"}),e.jsx(h,{id:"submit-authors",value:f,onChange:t=>I(t.target.value),placeholder:"Jane Smith, John Doe"})]}),e.jsxs("div",{style:{display:"grid",gap:8},children:[e.jsx("label",{htmlFor:"submit-date",style:{fontSize:13},children:"Publication date"}),e.jsx(h,{id:"submit-date",type:"date",value:y,onChange:t=>A(t.target.value),style:{maxWidth:220}}),e.jsx("div",{style:{fontSize:12,color:"var(--ink-soft)"},children:"Required only if we cannot infer a date from the page."})]})]}),b&&e.jsx(w,{variant:"destructive",children:e.jsx(C,{children:b})}),e.jsxs("div",{style:{display:"flex",gap:12,alignItems:"center"},children:[e.jsx(j,{type:"submit",disabled:c.isPending,children:c.isPending?v?"Fetching & indexing…":"Indexing…":"Submit paper"}),e.jsx(j,{type:"button",variant:"outline",onClick:()=>r(-1),disabled:c.isPending,children:"Cancel"})]})]})]})};export{Q as default};
 
 
assets/TagBrowseView-BnBgGfmw.js ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import{g as z,e as X,a as Y,u as ss,r as m,a3 as es,j as s,L as p,R as as,c as ns,b as ts}from"./index-CKAClQ2e.js";import{u as rs}from"./useQuery-DVaOQYVk.js";import{P as cs,M as is}from"./components-CM9AEXO8.js";import{M as _}from"./MarkdownText-Cuf1_4O5.js";import{t as ls,d as N}from"./transform-BCXN61O6.js";import{b as ds}from"./usePapers-Bep4-Z-b.js";import{u as os}from"./useIntersectionObserver-Bzsb1rr2.js";import{S as v}from"./skeleton-BYz337Ss.js";import{A as ms,a as hs}from"./alert-4m2SJo0T.js";import{G as ps}from"./github-BsrYosCi.js";import"./LatexTitle-DBZLS4yb.js";import"./katex.min-BSBacQyE.js";import"./index-DuEHueKe.js";import"./index-b1s0T9nh.js";import"./useInfiniteQuery-BaNuOv30.js";/**
2
+ * @license lucide-react v0.462.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 A=z("Pin",[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]]);/**
7
+ * @license lucide-react v0.462.0 - ISC
8
+ *
9
+ * This source code is licensed under the ISC license.
10
+ * See the LICENSE file in the root directory of this source tree.
11
+ */const us=z("Trophy",[["path",{d:"M6 9H4.5a2.5 2.5 0 0 1 0-5H6",key:"17hqa7"}],["path",{d:"M18 9h1.5a2.5 2.5 0 0 0 0-5H18",key:"lmptdp"}],["path",{d:"M4 22h16",key:"57wxv0"}],["path",{d:"M10 14.66V17c0 .55-.47.98-.97 1.21C7.85 18.75 7 20.24 7 22",key:"1nw9bq"}],["path",{d:"M14 14.66V17c0 .55.47.98.97 1.21C16.15 18.75 17 20.24 17 22",key:"1np0yb"}],["path",{d:"M18 2H6v7a6 6 0 0 0 12 0V2Z",key:"u46fv3"}]]),xs=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],gs=r=>r==="trending"||r==="date_published"||r==="citation_count"?r:"trending",S=3,js=r=>new Intl.NumberFormat("en",{notation:r>=1e3?"compact":"standard",maximumFractionDigits:1}).format(r),ks=r=>[...r].sort((u,x)=>{const g=u.slug==="classic-language-modeling",j=x.slug==="classic-language-modeling";return g!==j?g?1:-1:0}),Fs=()=>{var F,L,R,I;const{taskSlug:r}=X(),u=Y(),[x,g]=ss(),j=gs(x.get("order_by")),O=e=>{const a=new URLSearchParams(x);a.set("order_by",e),g(a)},[E,H]=m.useState(!1),[V,D]=m.useState(()=>new Set),{preferences:U}=es(),P=(e,a)=>{const n=e||"";return a?`/benchmark/${n}?task=${encodeURIComponent(a)}`:`/benchmark/${n}`},M=U.hide_closed_source_evals?!0:void 0,c=rs({queryKey:["task-page",r,M],queryFn:()=>ts.getTaskPage(r,{is_open:M}),enabled:!!r,staleTime:10*60*1e3}),k=m.useMemo(()=>{var e;return ks(((e=c.data)==null?void 0:e.children)||[])},[c.data]),f=m.useMemo(()=>{var a;const e=new Map;return(((a=c.data)==null?void 0:a.subtask_benchmarks)||[]).forEach(n=>{e.set(n.subtask_id,n.benchmarks||[])}),e},[c.data]),i=ds({taskId:((L=(F=c.data)==null?void 0:F.task)==null?void 0:L.id)||"",page_size:20,order_by:j,order_dir:"desc",include_resources:!0,enabled:!!((I=(R=c.data)==null?void 0:R.task)!=null&&I.id)}),y=m.useMemo(()=>{var a;return(((a=i.data)==null?void 0:a.pages.flatMap(n=>n.results))||[]).map(ls)},[i.data]),w=m.useMemo(()=>{var a;const e={};return(a=i.data)==null||a.pages.forEach(n=>n.results.forEach(h=>(h.methods||[]).forEach(d=>{const l=d.slug||d.id;e[l]||(e[l]={id:d.id,name:d.name,slug:d.slug||"",count:0}),e[l].count++}))),Object.values(e).sort((n,h)=>h.count-n.count).slice(0,8)},[i.data]),{targetRef:q,isIntersecting:T}=os({rootMargin:"200px"});if(m.useEffect(()=>{T&&i.hasNextPage&&!i.isFetchingNextPage&&i.fetchNextPage()},[T,i.hasNextPage,i.isFetchingNextPage]),c.isLoading)return s.jsxs("div",{className:"page",children:[s.jsx(v,{className:"h-12 w-1/2 mb-4"}),s.jsx(v,{className:"h-6 w-1/3 mb-8"}),s.jsx(v,{className:"h-64 w-full"})]});if(c.error||!c.data)return s.jsx("div",{className:"page",children:s.jsx(ms,{variant:"destructive",children:s.jsx(hs,{children:"Task not found."})})});const t=c.data.task,K=c.data.parents||[],b=N(t.name,t.slug),C=(c.data.sisters||[]).filter(e=>e.id!==t.id),$=c.data.recommended_frameworks||[],o=c.data.benchmarks||[],Q=k.some(e=>(f.get(e.id)||[]).length>0),G=k.length>0,B=o.length>0,W=(()=>{const e=new Set;return o.forEach(a=>e.add(a.id)),f.forEach(a=>a.forEach(n=>e.add(n.id))),e.size})(),Z=e=>{D(a=>{const n=new Set(a);return n.has(e)?n.delete(e):n.add(e),n})};return s.jsxs("div",{className:"page",children:[s.jsxs("div",{className:"breadcrumb",children:[s.jsx(p,{to:"/",children:"Papers"}),s.jsx("span",{className:"sep",children:"/"}),s.jsx(p,{to:"/tasks",children:"Tasks"}),[...K].reverse().map(e=>s.jsxs(as.Fragment,{children:[s.jsx("span",{className:"sep",children:"/"}),s.jsx(p,{to:`/tasks/${e.slug||e.id}`,children:N(e.name,e.slug)})]},e.id)),s.jsx("span",{className:"sep",children:"/"}),s.jsx("span",{style:{color:"var(--accent-text)"},children:t.name.toUpperCase()})]}),s.jsxs("div",{className:t.image_url?"task-hero-grid":void 0,children:[s.jsxs("div",{children:[s.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",letterSpacing:"0.1em",marginBottom:8},children:"TASK"}),s.jsx("h1",{className:"domain-mega-title",children:b}),t.description&&s.jsx(_,{className:"task-explainer",text:t.description}),t.research_trends&&t.research_trends.length>0&&s.jsxs("section",{className:"task-research-trends","aria-labelledby":"task-research-trends-title",children:[s.jsx("div",{id:"task-research-trends-title",className:"task-research-trends-title",children:"Key trends"}),s.jsx("ul",{children:t.research_trends.map((e,a)=>s.jsx("li",{children:s.jsx(_,{text:e})},a))})]}),s.jsxs("div",{className:"task-quickstats",children:[s.jsxs("span",{children:[s.jsx("span",{className:"num",children:(t.paper_count??0).toLocaleString()}),"PAPERS"]}),s.jsxs("span",{children:[s.jsx("span",{className:"num",children:W}),"BENCHMARKS"]}),s.jsxs("span",{children:[s.jsxs("span",{className:"num",children:[w.length,"+"]}),"METHODS USED"]})]}),$.length>0&&s.jsxs("div",{className:"task-framework-links",children:[s.jsx("span",{className:"task-framework-links-label",children:"Recommended frameworks"}),$.map(e=>{const a=e.owner&&e.name?`${e.owner}/${e.name}`:e.name||e.url.replace(/^https?:\/\/github\.com\//,"");return s.jsxs("a",{href:e.url,className:"task-framework-link",target:"_blank",rel:"noreferrer",children:[s.jsx(ps,{size:13,strokeWidth:1.8,"aria-hidden":"true"}),s.jsx("span",{children:a}),s.jsxs("span",{className:"task-framework-link-stars",children:["★ ",js(e.num_stars)]})]},e.id)})]})]}),t.image_url&&s.jsxs("figure",{className:`task-figure-card${t.slug==="omni-models"?" task-figure-card--compact":""}`,children:[s.jsx("div",{className:"task-figure-img-wrap",children:s.jsx("img",{className:"task-figure-img",src:ns(t.image_url)??void 0,alt:`${b} schematic`,onError:e=>{var a,n;(n=(a=e.currentTarget.parentElement)==null?void 0:a.parentElement)==null||n.style.setProperty("display","none")}})}),s.jsxs("figcaption",{children:["Figure · ",b,t.image_credit&&s.jsxs(s.Fragment,{children:[s.jsx("br",{}),s.jsx(_,{className:"task-image-credit",text:t.image_credit})]})]})]})]}),s.jsxs("div",{className:"task-page-grid",style:{marginTop:28},children:[s.jsxs("div",{children:[B&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"task-section-head",children:[s.jsx("div",{className:"task-section-eyebrow",children:"Leaderboards · click any"}),s.jsxs("div",{className:"task-section-title",children:["Benchmarks ",s.jsxs("span",{className:"meta",children:["[",o.length,"]"]})]})]}),(E?o:o.slice(0,5)).map((e,a)=>s.jsxs("div",{className:"bench-row",onClick:()=>u(P(e.slug||e.id,r)),children:[s.jsx("div",{className:"bench-row-num",children:String(a+1).padStart(2,"0")}),s.jsxs("div",{className:"bench-row-main",children:[s.jsx("div",{className:"bench-row-name",children:e.name}),s.jsxs("div",{className:"bench-row-sub",children:[e.featured_rank!=null&&s.jsxs("span",{className:"bench-pin",children:[s.jsx(A,{size:11,className:"bench-pin-icon"})," pinned"]}),e.paper_count!=null&&s.jsxs("span",{children:[s.jsx("strong",{children:e.paper_count})," ENTRIES"]})]})]}),e.best_model_name&&s.jsxs("div",{className:"bench-row-best",children:[s.jsx(us,{size:13,className:"bench-row-best-icon"}),s.jsx("span",{className:"bench-row-best-name",children:e.best_model_name})]}),s.jsx("div",{className:"bench-row-arrow",children:"→"})]},e.id)),o.length>5&&s.jsx("button",{type:"button",className:"bench-show-more",onClick:()=>H(e=>!e),children:E?"− show top 5":`+ show ${o.length-5} more benchmarks`})]}),G&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"task-section-head",style:B?{marginTop:36}:void 0,children:[s.jsx("div",{className:"task-section-eyebrow",children:Q?"Benchmarks by capability":"Task hierarchy"}),s.jsxs("div",{className:"task-section-title",children:["Subtasks ",s.jsxs("span",{className:"meta",children:["[",k.length,"]"]})]})]}),s.jsx("div",{className:"subtask-grid",children:k.map(e=>{const a=f.get(e.id)||[],n=V.has(e.id),h=n?a:a.slice(0,S),d=a.length-S;return s.jsxs("div",{className:"subtask-section",children:[s.jsxs("div",{className:"subtask-head",children:[s.jsx(p,{to:`/tasks/${e.slug||e.id}`,className:"subtask-head-name",children:N(e.name,e.slug)}),s.jsx("span",{className:"subtask-head-meta",children:a.length>0?`[${a.length} benchmark${a.length===1?"":"s"}]`:`[${(e.paper_count??0).toLocaleString()} papers]`})]}),h.length>0?h.map((l,J)=>s.jsxs("div",{className:"bench-row",onClick:()=>u(P(l.slug||l.id,e.slug||e.id)),children:[s.jsx("div",{className:"bench-row-num",children:String(J+1).padStart(2,"0")}),s.jsxs("div",{className:"bench-row-main",children:[s.jsx("div",{className:"bench-row-name",children:l.name}),s.jsxs("div",{className:"bench-row-sub",children:[l.featured_rank!=null&&s.jsxs("span",{className:"bench-pin",children:[s.jsx(A,{size:11,className:"bench-pin-icon"})," pinned"]}),l.paper_count!=null&&s.jsxs("span",{children:[s.jsx("strong",{children:l.paper_count})," ENTRIES"]})]})]}),s.jsx("div",{className:"bench-row-arrow",children:"→"})]},l.id)):s.jsxs(p,{to:`/tasks/${e.slug||e.id}`,className:"subtask-summary",children:[s.jsxs("span",{children:[(e.paper_count??0).toLocaleString()," papers"]}),e.description&&s.jsx("span",{className:"subtask-summary-desc",children:e.description})]}),d>0&&s.jsx("button",{type:"button",className:"bench-show-more",onClick:()=>Z(e.id),children:n?`− show top ${S}`:`+ show ${d} more benchmark${d===1?"":"s"}`})]},e.id)})})]}),s.jsxs("div",{className:"task-section-head",style:{marginTop:36},children:[s.jsx("div",{className:"task-section-eyebrow",children:"Top trending · sort below"}),s.jsxs("div",{className:"task-section-title",children:["Papers ",s.jsxs("span",{className:"meta",children:["[",(t.paper_count??0).toLocaleString(),"]"]})]})]}),s.jsxs("div",{className:"sort-bar",children:[s.jsx("div",{className:"sort-options",children:xs.map(([e,a])=>s.jsx("button",{className:`sort-btn ${j===e?"active":""}`,onClick:()=>O(e),children:a},e))}),s.jsxs("div",{className:"results-count",children:[y.length," loaded in ",s.jsx("span",{children:b})]})]}),i.isLoading?s.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((e,a)=>s.jsx(v,{className:"h-40 w-full"},a))}):y.length===0?s.jsx("div",{className:"no-results",children:"No papers in this task yet."}):s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"paper-list",children:y.map((e,a)=>s.jsx(cs,{paper:e,rank:a+1},e.id))}),s.jsx("div",{ref:q,style:{height:1}}),i.isFetchingNextPage&&s.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]}),s.jsxs("aside",{className:"task-side",children:[C.length>0&&s.jsxs("div",{className:"side-block",children:[s.jsx("div",{className:"side-block-num",children:"01/"}),s.jsx("div",{className:"side-block-label",children:"Sister Tasks"}),C.slice(0,8).map(e=>s.jsxs(p,{to:`/tasks/${e.slug||e.id}`,className:"side-link-row",children:[s.jsx("span",{children:N(e.name,e.slug)}),e.paper_count!=null&&s.jsx("span",{className:"count",children:e.paper_count.toLocaleString()})]},e.id))]}),w.length>0&&s.jsxs("div",{className:"side-block",children:[s.jsx("div",{className:"side-block-num",children:"02/"}),s.jsx("div",{className:"side-block-label",children:"Common Methods"}),w.map(e=>s.jsxs("div",{className:"side-method-row",children:[s.jsx(is,{method:{slug:e.slug,name:e.name}}),s.jsxs("span",{className:"num",children:["·",e.count]})]},e.id))]})]})]})]})};export{Fs as default};
assets/TagBrowseView-Dd43meiQ.js DELETED
@@ -1,11 +0,0 @@
1
- import{c as A,_ as J,a0 as X,u as Y,r as h,a1 as ss,j as s,L as m,W as es,a6 as as,a as ns}from"./index-EtWJP9FK.js";import{u as ts}from"./useQuery-CRN8HQuX.js";import{P as rs,M as cs}from"./components-Bs7x-Lbj.js";import{M as S}from"./MarkdownText-Bj8B42V4.js";import{t as is,d as u}from"./transform-BnMt6tRc.js";import{b as ls}from"./usePapers-Bf6VWYSD.js";import{u as ds}from"./useIntersectionObserver-CuGdoJlB.js";import{S as f}from"./skeleton-DMjGQB3S.js";import{A as os,a as hs}from"./alert-BIanajMT.js";import"./LatexTitle-ZHDCAKfZ.js";import"./katex.min-BSBacQyE.js";import"./index-By9W8E5I.js";import"./useInfiniteQuery-DMyrN_84.js";/**
2
- * @license lucide-react v0.462.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 R=A("Pin",[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]]);/**
7
- * @license lucide-react v0.462.0 - ISC
8
- *
9
- * This source code is licensed under the ISC license.
10
- * See the LICENSE file in the root directory of this source tree.
11
- */const ms=A("Trophy",[["path",{d:"M6 9H4.5a2.5 2.5 0 0 1 0-5H6",key:"17hqa7"}],["path",{d:"M18 9h1.5a2.5 2.5 0 0 0 0-5H18",key:"lmptdp"}],["path",{d:"M4 22h16",key:"57wxv0"}],["path",{d:"M10 14.66V17c0 .55-.47.98-.97 1.21C7.85 18.75 7 20.24 7 22",key:"1nw9bq"}],["path",{d:"M14 14.66V17c0 .55.47.98.97 1.21C16.15 18.75 17 20.24 17 22",key:"1np0yb"}],["path",{d:"M18 2H6v7a6 6 0 0 0 12 0V2Z",key:"u46fv3"}]]),ps=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],us=c=>c==="trending"||c==="date_published"||c==="citation_count"?c:"trending",E=3,xs=c=>[...c].sort((x,g)=>{const j=x.slug==="classic-language-modeling",k=g.slug==="classic-language-modeling";return j!==k?j?1:-1:0}),Ms=()=>{var B,L,F,I;const{taskSlug:c}=J(),x=X(),[g,j]=Y(),k=us(g.get("order_by")),O=e=>{const a=new URLSearchParams(g);a.set("order_by",e),j(a)},[P,z]=h.useState(!1),[H,V]=h.useState(()=>new Set),{preferences:D}=ss(),M=(e,a)=>{const n=e||"";return a?`/benchmark/${n}?task=${encodeURIComponent(a)}`:`/benchmark/${n}`},T=D.hide_closed_source_evals?!0:void 0,r=ts({queryKey:["task-page",c,T],queryFn:()=>ns.getTaskPage(c,{is_open:T}),enabled:!!c,staleTime:10*60*1e3}),b=h.useMemo(()=>{var e;return xs(((e=r.data)==null?void 0:e.children)||[])},[r.data]),y=h.useMemo(()=>{var a;const e=new Map;return(((a=r.data)==null?void 0:a.subtask_benchmarks)||[]).forEach(n=>{e.set(n.subtask_id,n.benchmarks||[])}),e},[r.data]),i=ls({taskId:((L=(B=r.data)==null?void 0:B.task)==null?void 0:L.id)||"",page_size:20,order_by:k,order_dir:"desc",include_resources:!0,enabled:!!((I=(F=r.data)==null?void 0:F.task)!=null&&I.id)}),w=h.useMemo(()=>{var a;return(((a=i.data)==null?void 0:a.pages.flatMap(n=>n.results))||[]).map(is)},[i.data]),_=h.useMemo(()=>{var a;const e={};return(a=i.data)==null||a.pages.forEach(n=>n.results.forEach(p=>(p.methods||[]).forEach(d=>{const l=d.slug||d.id;e[l]||(e[l]={id:d.id,name:d.name,slug:d.slug||"",count:0}),e[l].count++}))),Object.values(e).sort((n,p)=>p.count-n.count).slice(0,8)},[i.data]),{targetRef:U,isIntersecting:C}=ds({rootMargin:"200px"});if(h.useEffect(()=>{C&&i.hasNextPage&&!i.isFetchingNextPage&&i.fetchNextPage()},[C,i.hasNextPage,i.isFetchingNextPage]),r.isLoading)return s.jsxs("div",{className:"page",children:[s.jsx(f,{className:"h-12 w-1/2 mb-4"}),s.jsx(f,{className:"h-6 w-1/3 mb-8"}),s.jsx(f,{className:"h-64 w-full"})]});if(r.error||!r.data)return s.jsx("div",{className:"page",children:s.jsx(os,{variant:"destructive",children:s.jsx(hs,{children:"Task not found."})})});const t=r.data.task,q=r.data.parents||[],N=u(t.name,t.slug),v=(r.data.sisters||[]).filter(e=>e.id!==t.id),o=r.data.benchmarks||[],K=b.some(e=>(y.get(e.id)||[]).length>0),Q=b.length>0,$=o.length>0,W=(()=>{const e=new Set;return o.forEach(a=>e.add(a.id)),y.forEach(a=>a.forEach(n=>e.add(n.id))),e.size})(),Z=e=>{V(a=>{const n=new Set(a);return n.has(e)?n.delete(e):n.add(e),n})};return s.jsxs("div",{className:"page",children:[s.jsxs("div",{className:"breadcrumb",children:[s.jsx(m,{to:"/",children:"Papers"}),s.jsx("span",{className:"sep",children:"/"}),s.jsx(m,{to:"/tasks",children:"Tasks"}),[...q].reverse().map(e=>s.jsxs(es.Fragment,{children:[s.jsx("span",{className:"sep",children:"/"}),s.jsx(m,{to:`/tasks/${e.slug||e.id}`,children:u(e.name,e.slug)})]},e.id)),s.jsx("span",{className:"sep",children:"/"}),s.jsx("span",{style:{color:"var(--accent-text)"},children:t.name.toUpperCase()})]}),s.jsxs("div",{className:t.image_url?"task-hero-grid":void 0,children:[s.jsxs("div",{children:[s.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",letterSpacing:"0.1em",marginBottom:8},children:"TASK"}),s.jsx("h1",{className:"domain-mega-title",children:N}),t.description&&s.jsx(S,{className:"task-explainer",text:t.description}),t.research_trends&&t.research_trends.length>0&&s.jsxs("section",{className:"task-research-trends","aria-labelledby":"task-research-trends-title",children:[s.jsx("div",{id:"task-research-trends-title",className:"task-research-trends-title",children:"Key trends"}),s.jsx("ul",{children:t.research_trends.map((e,a)=>s.jsx("li",{children:s.jsx(S,{text:e})},a))})]}),s.jsxs("div",{className:"task-quickstats",children:[s.jsxs("span",{children:[s.jsx("span",{className:"num",children:(t.paper_count??0).toLocaleString()}),"PAPERS"]}),s.jsxs("span",{children:[s.jsx("span",{className:"num",children:W}),"BENCHMARKS"]}),s.jsxs("span",{children:[s.jsxs("span",{className:"num",children:[_.length,"+"]}),"METHODS USED"]})]}),v.length>0&&s.jsxs("div",{className:"task-sister-links",children:[s.jsx("span",{className:"task-sister-links-label",children:"Sister tasks"}),v.slice(0,8).map(e=>s.jsxs(m,{to:`/tasks/${e.slug||e.id}`,className:"task-sister-link",children:[u(e.name,e.slug),e.paper_count!=null&&s.jsx("span",{className:"task-sister-link-count",children:e.paper_count.toLocaleString()})]},e.id))]})]}),t.image_url&&s.jsxs("figure",{className:`task-figure-card${t.slug==="omni-models"?" task-figure-card--compact":""}`,children:[s.jsx("div",{className:"task-figure-img-wrap",children:s.jsx("img",{className:"task-figure-img",src:as(t.image_url)??void 0,alt:`${N} schematic`,onError:e=>{var a,n;(n=(a=e.currentTarget.parentElement)==null?void 0:a.parentElement)==null||n.style.setProperty("display","none")}})}),s.jsxs("figcaption",{children:["Figure · ",N,t.image_credit&&s.jsxs(s.Fragment,{children:[s.jsx("br",{}),s.jsx(S,{className:"task-image-credit",text:t.image_credit})]})]})]})]}),s.jsxs("div",{className:"task-page-grid",style:{marginTop:28},children:[s.jsxs("div",{children:[$&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"task-section-head",children:[s.jsx("div",{className:"task-section-eyebrow",children:"Leaderboards · click any"}),s.jsxs("div",{className:"task-section-title",children:["Benchmarks ",s.jsxs("span",{className:"meta",children:["[",o.length,"]"]})]})]}),(P?o:o.slice(0,5)).map((e,a)=>s.jsxs("div",{className:"bench-row",onClick:()=>x(M(e.slug||e.id,c)),children:[s.jsx("div",{className:"bench-row-num",children:String(a+1).padStart(2,"0")}),s.jsxs("div",{className:"bench-row-main",children:[s.jsx("div",{className:"bench-row-name",children:e.name}),s.jsxs("div",{className:"bench-row-sub",children:[e.featured_rank!=null&&s.jsxs("span",{className:"bench-pin",children:[s.jsx(R,{size:11,className:"bench-pin-icon"})," pinned"]}),e.paper_count!=null&&s.jsxs("span",{children:[s.jsx("strong",{children:e.paper_count})," ENTRIES"]})]})]}),e.best_model_name&&s.jsxs("div",{className:"bench-row-best",children:[s.jsx(ms,{size:13,className:"bench-row-best-icon"}),s.jsx("span",{className:"bench-row-best-name",children:e.best_model_name})]}),s.jsx("div",{className:"bench-row-arrow",children:"→"})]},e.id)),o.length>5&&s.jsx("button",{type:"button",className:"bench-show-more",onClick:()=>z(e=>!e),children:P?"− show top 5":`+ show ${o.length-5} more benchmarks`})]}),Q&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"task-section-head",style:$?{marginTop:36}:void 0,children:[s.jsx("div",{className:"task-section-eyebrow",children:K?"Benchmarks by capability":"Task hierarchy"}),s.jsxs("div",{className:"task-section-title",children:["Subtasks ",s.jsxs("span",{className:"meta",children:["[",b.length,"]"]})]})]}),s.jsx("div",{className:"subtask-grid",children:b.map(e=>{const a=y.get(e.id)||[],n=H.has(e.id),p=n?a:a.slice(0,E),d=a.length-E;return s.jsxs("div",{className:"subtask-section",children:[s.jsxs("div",{className:"subtask-head",children:[s.jsx(m,{to:`/tasks/${e.slug||e.id}`,className:"subtask-head-name",children:u(e.name,e.slug)}),s.jsx("span",{className:"subtask-head-meta",children:a.length>0?`[${a.length} benchmark${a.length===1?"":"s"}]`:`[${(e.paper_count??0).toLocaleString()} papers]`})]}),p.length>0?p.map((l,G)=>s.jsxs("div",{className:"bench-row",onClick:()=>x(M(l.slug||l.id,e.slug||e.id)),children:[s.jsx("div",{className:"bench-row-num",children:String(G+1).padStart(2,"0")}),s.jsxs("div",{className:"bench-row-main",children:[s.jsx("div",{className:"bench-row-name",children:l.name}),s.jsxs("div",{className:"bench-row-sub",children:[l.featured_rank!=null&&s.jsxs("span",{className:"bench-pin",children:[s.jsx(R,{size:11,className:"bench-pin-icon"})," pinned"]}),l.paper_count!=null&&s.jsxs("span",{children:[s.jsx("strong",{children:l.paper_count})," ENTRIES"]})]})]}),s.jsx("div",{className:"bench-row-arrow",children:"→"})]},l.id)):s.jsxs(m,{to:`/tasks/${e.slug||e.id}`,className:"subtask-summary",children:[s.jsxs("span",{children:[(e.paper_count??0).toLocaleString()," papers"]}),e.description&&s.jsx("span",{className:"subtask-summary-desc",children:e.description})]}),d>0&&s.jsx("button",{type:"button",className:"bench-show-more",onClick:()=>Z(e.id),children:n?`− show top ${E}`:`+ show ${d} more benchmark${d===1?"":"s"}`})]},e.id)})})]}),s.jsxs("div",{className:"task-section-head",style:{marginTop:36},children:[s.jsx("div",{className:"task-section-eyebrow",children:"Top trending · sort below"}),s.jsxs("div",{className:"task-section-title",children:["Papers ",s.jsxs("span",{className:"meta",children:["[",(t.paper_count??0).toLocaleString(),"]"]})]})]}),s.jsxs("div",{className:"sort-bar",children:[s.jsx("div",{className:"sort-options",children:ps.map(([e,a])=>s.jsx("button",{className:`sort-btn ${k===e?"active":""}`,onClick:()=>O(e),children:a},e))}),s.jsxs("div",{className:"results-count",children:[w.length," loaded in ",s.jsx("span",{children:N})]})]}),i.isLoading?s.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((e,a)=>s.jsx(f,{className:"h-40 w-full"},a))}):w.length===0?s.jsx("div",{className:"no-results",children:"No papers in this task yet."}):s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"paper-list",children:w.map((e,a)=>s.jsx(rs,{paper:e,rank:a+1},e.id))}),s.jsx("div",{ref:U,style:{height:1}}),i.isFetchingNextPage&&s.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]}),s.jsxs("aside",{className:"task-side",children:[v.length>0&&s.jsxs("div",{className:"side-block",children:[s.jsx("div",{className:"side-block-num",children:"01/"}),s.jsx("div",{className:"side-block-label",children:"Sister Tasks"}),v.slice(0,8).map(e=>s.jsxs(m,{to:`/tasks/${e.slug||e.id}`,className:"side-link-row",children:[s.jsx("span",{children:u(e.name,e.slug)}),e.paper_count!=null&&s.jsx("span",{className:"count",children:e.paper_count.toLocaleString()})]},e.id))]}),_.length>0&&s.jsxs("div",{className:"side-block",children:[s.jsx("div",{className:"side-block-num",children:"02/"}),s.jsx("div",{className:"side-block-label",children:"Common Methods"}),_.map(e=>s.jsxs("div",{className:"side-method-row",children:[s.jsx(cs,{method:{slug:e.slug,name:e.name}}),s.jsxs("span",{className:"num",children:["·",e.count]})]},e.id))]})]})]})]})};export{Ms as default};
 
 
 
 
 
 
 
 
 
 
 
 
assets/{TagsIndexView-CA1ETfoO.js → TagsIndexView-CfBj37Ze.js} RENAMED
@@ -1 +1 @@
1
- import{r as d,j as e,L as h,a as p}from"./index-EtWJP9FK.js";import{u as g}from"./useQuery-CRN8HQuX.js";import{e as x,h as f,d as u}from"./transform-BnMt6tRc.js";import{S as m}from"./skeleton-DMjGQB3S.js";import{A as j,a as y}from"./alert-BIanajMT.js";const v=r=>(r==null?void 0:r.trim().toLowerCase().replace(/[\s_]+/g,"-"))??"",b=()=>{const r=g({queryKey:["areas-with-tasks"],queryFn:()=>p.getAreasWithTasks(),staleTime:6e5}),o=d.useMemo(()=>{if(!r.data)return[];const s={general:0,vision:1,video:2,language:3,audio:4,other:5},a=n=>s[v(n)]??999;return[...r.data.results].sort((n,t)=>{const i=a(n.name),l=a(t.name);return i!==l?i-l:n.name.localeCompare(t.name)})},[r.data]),c=d.useMemo(()=>o.reduce((s,a)=>s+a.tasks.length,0),[o]);return r.error?e.jsx("div",{className:"page",children:e.jsx(j,{variant:"destructive",children:e.jsx(y,{children:"Failed to load taxonomy. Please try again."})})}):e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["All ",e.jsx("em",{children:"Domains"})]}),e.jsx("div",{className:"feed-subtitle",children:"Browse research by area. Click any task to see trending work."})]})}),r.isLoading?e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:32},children:Array.from({length:4}).map((s,a)=>e.jsxs("div",{children:[e.jsx(m,{className:"h-8 w-1/3 mb-4"}),e.jsx("div",{className:"tag-grid",children:Array.from({length:6}).map((n,t)=>e.jsx(m,{className:"h-24"},t))})]},a))}):o.map(s=>{const a=s.tasks;if(a.length===0)return null;const n=a.reduce((t,i)=>t+(i.paper_count||0),0);return e.jsxs("section",{style:{marginBottom:48},children:[e.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:24,paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},children:[e.jsxs("div",{children:[e.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.02em",marginBottom:4},children:s.name}),s.description&&e.jsx("div",{style:{fontFamily:"var(--serif)",fontStyle:"italic",fontSize:13,color:"var(--ink-soft)"},children:s.description})]}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[a.length," ",a.length===1?"task":"tasks"," · ",n.toLocaleString()," papers"]})]}),e.jsx("div",{className:"tag-grid",children:a.map(t=>{const i=t.slug||"",l=x(f(i));return e.jsxs(h,{to:`/tasks/${i}`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:l.dot}}),u(t.name,i)]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[(t.paper_count??0).toLocaleString()," papers"]})})]},t.id)})})]},s.id)}),c>0&&e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",marginTop:24},children:[c," tasks across ",o.filter(s=>s.tasks.length>0).length," areas."]})]})};export{b as default};
 
1
+ import{r as d,j as e,L as h,b as p}from"./index-CKAClQ2e.js";import{u as g}from"./useQuery-DVaOQYVk.js";import{e as x,h as f,d as u}from"./transform-BCXN61O6.js";import{S as m}from"./skeleton-BYz337Ss.js";import{A as j,a as y}from"./alert-4m2SJo0T.js";const v=r=>(r==null?void 0:r.trim().toLowerCase().replace(/[\s_]+/g,"-"))??"",w=()=>{const r=g({queryKey:["areas-with-tasks"],queryFn:()=>p.getAreasWithTasks(),staleTime:6e5}),o=d.useMemo(()=>{if(!r.data)return[];const s={general:0,vision:1,video:2,language:3,audio:4,other:5},a=n=>s[v(n)]??999;return[...r.data.results].sort((n,t)=>{const i=a(n.name),l=a(t.name);return i!==l?i-l:n.name.localeCompare(t.name)})},[r.data]),c=d.useMemo(()=>o.reduce((s,a)=>s+a.tasks.length,0),[o]);return r.error?e.jsx("div",{className:"page",children:e.jsx(j,{variant:"destructive",children:e.jsx(y,{children:"Failed to load taxonomy. Please try again."})})}):e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["All ",e.jsx("em",{children:"Domains"})]}),e.jsx("div",{className:"feed-subtitle",children:"Browse research by area. Click any task to see trending work."})]})}),r.isLoading?e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:32},children:Array.from({length:4}).map((s,a)=>e.jsxs("div",{children:[e.jsx(m,{className:"h-8 w-1/3 mb-4"}),e.jsx("div",{className:"tag-grid",children:Array.from({length:6}).map((n,t)=>e.jsx(m,{className:"h-24"},t))})]},a))}):o.map(s=>{const a=s.tasks;if(a.length===0)return null;const n=a.reduce((t,i)=>t+(i.paper_count||0),0);return e.jsxs("section",{style:{marginBottom:48},children:[e.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:24,paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},children:[e.jsxs("div",{children:[e.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.02em",marginBottom:4},children:s.name}),s.description&&e.jsx("div",{style:{fontFamily:"var(--serif)",fontStyle:"italic",fontSize:13,color:"var(--ink-soft)"},children:s.description})]}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[a.length," ",a.length===1?"task":"tasks"," · ",n.toLocaleString()," papers"]})]}),e.jsx("div",{className:"tag-grid",children:a.map(t=>{const i=t.slug||"",l=x(f(i));return e.jsxs(h,{to:`/tasks/${i}`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:l.dot}}),u(t.name,i)]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[(t.paper_count??0).toLocaleString()," papers"]})})]},t.id)})})]},s.id)}),c>0&&e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",marginTop:24},children:[c," tasks across ",o.filter(s=>s.tasks.length>0).length," areas."]})]})};export{w as default};
assets/{alert-BIanajMT.js → alert-4m2SJo0T.js} RENAMED
@@ -1 +1 @@
1
- import{r as a,j as s,k as l,m as i}from"./index-EtWJP9FK.js";const o=i("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),n=a.forwardRef(({className:e,variant:t,...r},d)=>s.jsx("div",{ref:d,role:"alert",className:l(o({variant:t}),e),...r}));n.displayName="Alert";const v=a.forwardRef(({className:e,...t},r)=>s.jsx("h5",{ref:r,className:l("mb-1 font-medium leading-none tracking-tight",e),...t}));v.displayName="AlertTitle";const c=a.forwardRef(({className:e,...t},r)=>s.jsx("div",{ref:r,className:l("text-sm [&_p]:leading-relaxed",e),...t}));c.displayName="AlertDescription";export{n as A,c as a};
 
1
+ import{r as a,j as s,q as l,t as i}from"./index-CKAClQ2e.js";const o=i("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),n=a.forwardRef(({className:t,variant:e,...r},d)=>s.jsx("div",{ref:d,role:"alert",className:l(o({variant:e}),t),...r}));n.displayName="Alert";const v=a.forwardRef(({className:t,...e},r)=>s.jsx("h5",{ref:r,className:l("mb-1 font-medium leading-none tracking-tight",t),...e}));v.displayName="AlertTitle";const c=a.forwardRef(({className:t,...e},r)=>s.jsx("div",{ref:r,className:l("text-sm [&_p]:leading-relaxed",t),...e}));c.displayName="AlertDescription";export{n as A,c as a};
assets/{button-C_tMg-gR.js → button-q4EOT22d.js} RENAMED
@@ -1 +1 @@
1
- import{r as a,j as d,ah as u,k as c,m as f}from"./index-EtWJP9FK.js";const g=f("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),v=a.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...o},s)=>{const i=n?u:"button";return d.jsx(i,{className:c(g({variant:t,size:r,className:e})),ref:s,...o})});v.displayName="Button";export{v as B};
 
1
+ import{r as a,j as d,am as u,q as c,t as f}from"./index-CKAClQ2e.js";const g=f("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),v=a.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...o},s)=>{const i=n?u:"button";return d.jsx(i,{className:c(g({variant:t,size:r,className:e})),ref:s,...o})});v.displayName="Button";export{v as B};
assets/chatSessions-mebqdAa-.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{j as o,d as p}from"./index-CKAClQ2e.js";const m=({light:t})=>o.jsx("span",{className:`chat-spinner${t?" chat-spinner-light":""}`}),g=({open:t})=>o.jsx("svg",{className:`chat-chev${t?" chat-chev-open":""}`,width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:o.jsx("path",{d:"m6 9 6 6 6-6"})}),x=()=>o.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[o.jsx("circle",{cx:"12",cy:"12",r:"9"}),o.jsx("path",{d:"m9 12 2 2 4-4"})]}),w=({size:t=14})=>o.jsxs("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[o.jsx("circle",{cx:"11",cy:"11",r:"7"}),o.jsx("path",{d:"m21 21-4.3-4.3"})]}),j=()=>o.jsx("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",children:o.jsx("path",{d:"M12 19V5M5 12l7-7 7 7"})}),C=()=>o.jsx("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:o.jsx("path",{d:"M12 5v14M5 12h14"})}),k=()=>o.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",children:[o.jsx("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),o.jsx("path",{d:"M9 4v16"})]}),y=()=>o.jsx("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:o.jsx("path",{d:"M3 6h18M8 6V4a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v2M6 6l1 14a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2l1-14"})}),S=({models:t,selectedModel:s,onModelChange:n,disabled:e})=>{var i;const r=((i=t.find(a=>a.id===s))==null?void 0:i.label)??`${s} (unavailable)`,c=Math.min(Math.max(r.length+5,12),32);return o.jsxs("select",{className:"chat-model-select",style:{width:`${c}ch`},value:s,disabled:e,onChange:a=>n(a.target.value),"aria-label":"Research model",children:[!t.some(a=>a.id===s)&&o.jsx("option",{value:s,disabled:!0,children:r}),t.map(a=>o.jsx("option",{value:a.id,children:a.label},a.id))]})},h="pwc:chat-oauth-draft",u="pwc:chat-oauth-model",d="pwc:chat-oauth-auto-send";function _(t,s){const n=t.trim();n&&(sessionStorage.setItem(h,n),sessionStorage.setItem(d,"1"),s&&sessionStorage.setItem(u,s))}function T(){var s;if(typeof window>"u"||sessionStorage.getItem(d)!=="1")return null;const t=(s=sessionStorage.getItem(h))==null?void 0:s.trim();return t?{prompt:t,model:sessionStorage.getItem(u)}:null}function M(){sessionStorage.removeItem(h),sessionStorage.removeItem(u),sessionStorage.removeItem(d)}const f="deepseek-ai/DeepSeek-V4-Flash",b=[{id:f,label:"DeepSeek V4 Flash"},{id:"zai-org/GLM-5.2",label:"GLM 5.2"}];async function l(t,s){const n=await fetch(p(t),{credentials:"include",headers:{"Content-Type":"application/json",...s==null?void 0:s.headers},...s});if(!n.ok){const e=await n.json().catch(()=>null),r=e==null?void 0:e.detail;throw new Error((r==null?void 0:r.message)||r||`Chat request failed (${n.status})`)}return n.status===204?void 0:n.json()}async function D(){const t=[];let s=null;do{const n=new URLSearchParams({limit:"50"});s&&n.set("cursor",s);const e=await l(`/api/v1/chat/sessions?${n.toString()}`);t.push(...e.items),s=e.next_cursor}while(s&&t.length<100);return t}function I(t){return l(`/api/v1/chat/sessions/${t}`)}function L(t,s){return l(`/api/v1/chat/sessions/${t}`,{method:"PATCH",body:JSON.stringify(s)})}function A(t){return l(`/api/v1/chat/sessions/${t}`,{method:"DELETE"})}async function E(){return l("/api/v1/chat/models")}function $(t){const s=e=>e.map(r=>r.kind==="reasoning"?{...r,active:!1,open:!1}:r.kind==="tool"?{...r,status:"done",open:!1}:{...r,done:!0}),n=e=>e==="provider_error"?"The model provider failed before completing the response. You can edit and retry your question.":e==="persistence_error"?"The response could not be saved. You can edit and retry your question.":e==="transcript_mirror_error"?"The conversation could not be saved. Please try again in a new chat.":"The response did not complete. You can edit and retry your question.";return t.messages.flatMap(e=>{if(e.role==="assistant")return[{id:e.id,role:"assistant",blocks:s(e.display_blocks),followups:e.followups,streaming:!1}];const r={id:e.id,role:"user",text:e.content,revision:e.revision,status:e.status,error:e.status==="complete"?void 0:e.error_code||e.status};return e.status!=="error"?[r]:[r,{id:`${e.id}-error`,role:"assistant",blocks:s(e.display_blocks),streaming:!1,error:n(e.error_code)}]})}function q(t){const s=Date.now(),n=new Date().setHours(0,0,0,0),e=[{label:"Today",items:[]},{label:"Previous 7 Days",items:[]},{label:"Previous 30 Days",items:[]},{label:"Older",items:[]}];for(const r of[...t].sort((c,i)=>Date.parse(i.updated_at)-Date.parse(c.updated_at))){const c=Date.parse(r.updated_at),i=s-c;c>=n?e[0].items.push(r):i<7*864e5?e[1].items.push(r):i<30*864e5?e[2].items.push(r):e[3].items.push(r)}return e.filter(r=>r.items.length>0)}export{j as A,x as C,f as D,b as F,S as M,C as P,m as S,y as T,g as a,w as b,h as c,u as d,d as e,M as f,E as g,I as h,k as i,q as j,A as k,D as l,_ as q,T as r,$ as t,L as u};
assets/{codexAddEvals-D4idoo-w.js → codexAddEvals-BhjClbnO.js} RENAMED
@@ -1,6 +1,6 @@
1
- import{c as o,j as i,k as c,m as d,Z as n}from"./index-EtWJP9FK.js";/**
2
  * @license lucide-react v0.462.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 p=o("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]),u=d("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function f({className:e,variant:a,...t}){return i.jsx("div",{className:c(u({variant:a}),e),...t})}function x(){const e="true".toLowerCase();return e==="1"||e==="true"||e==="yes"}function b(){const e="true".toLowerCase();return e==="1"||e==="true"||e==="yes"}async function r(e){var s;if(e.ok)return await e.json();const a=await e.json().catch(()=>null),t=((s=a==null?void 0:a.detail)==null?void 0:s.message)??(a==null?void 0:a.detail);throw new Error(typeof t=="string"?t:"Could not run Codex.")}async function h(e){const a=await fetch(n("/api/v1/admin/codex-add-evals/jobs"),{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({paper_id:e})});return r(a)}async function v(e){const a=await fetch(n(`/api/v1/admin/codex-add-evals/jobs/${e}`),{credentials:"include"});return r(a)}async function g(e){return r(await fetch(n(`/api/v1/admin/codex-add-evals/jobs/${e}`),{method:"DELETE",credentials:"include"}))}async function y(e){const a=await fetch(n("/api/v1/admin/codex-enrich-paper/jobs"),{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({paper_id:e})});return r(a)}async function m(e){const a=await fetch(n(`/api/v1/admin/codex-enrich-paper/jobs/${e}`),{credentials:"include"});return r(a)}async function E(e){return r(await fetch(n(`/api/v1/admin/codex-enrich-paper/jobs/${e}`),{method:"DELETE",credentials:"include"}))}async function w(e=100){const a=await fetch(n(`/api/v1/admin/codex-curation/jobs?limit=${e}`),{credentials:"include",cache:"no-store"});if(a.ok)return await a.json();const t=new Error(`Could not load Codex jobs (${a.status}).`);throw Object.assign(t,{status:a.status}),t}export{f as B,p as D,g as a,v as b,E as c,h as d,x as e,w as f,m as g,b as i,y as s};
 
1
+ import{g as o,j as i,q as c,t as d,d as n}from"./index-CKAClQ2e.js";/**
2
  * @license lucide-react v0.462.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 p=o("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]),u=d("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function f({className:e,variant:a,...t}){return i.jsx("div",{className:c(u({variant:a}),e),...t})}function x(){const e="0".toLowerCase();return e==="1"||e==="true"||e==="yes"}function b(){const e="0".toLowerCase();return e==="1"||e==="true"||e==="yes"}async function r(e){var s;if(e.ok)return await e.json();const a=await e.json().catch(()=>null),t=((s=a==null?void 0:a.detail)==null?void 0:s.message)??(a==null?void 0:a.detail);throw new Error(typeof t=="string"?t:"Could not run Codex.")}async function h(e){const a=await fetch(n("/api/v1/admin/codex-add-evals/jobs"),{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({paper_id:e})});return r(a)}async function v(e){const a=await fetch(n(`/api/v1/admin/codex-add-evals/jobs/${e}`),{credentials:"include"});return r(a)}async function g(e){return r(await fetch(n(`/api/v1/admin/codex-add-evals/jobs/${e}`),{method:"DELETE",credentials:"include"}))}async function y(e){const a=await fetch(n("/api/v1/admin/codex-enrich-paper/jobs"),{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({paper_id:e})});return r(a)}async function m(e){const a=await fetch(n(`/api/v1/admin/codex-enrich-paper/jobs/${e}`),{credentials:"include"});return r(a)}async function E(e){return r(await fetch(n(`/api/v1/admin/codex-enrich-paper/jobs/${e}`),{method:"DELETE",credentials:"include"}))}async function w(e=100){const a=await fetch(n(`/api/v1/admin/codex-curation/jobs?limit=${e}`),{credentials:"include",cache:"no-store"});if(a.ok)return await a.json();const t=new Error(`Could not load Codex jobs (${a.status}).`);throw Object.assign(t,{status:a.status}),t}export{f as B,p as D,g as a,v as b,E as c,h as d,x as e,w as f,m as g,b as i,y as s};
assets/components-Bs7x-Lbj.js DELETED
@@ -1 +0,0 @@
1
- import{o as R,W as g,a as T,j as e,L,a0 as w}from"./index-EtWJP9FK.js";import{L as E,a as z}from"./LatexTitle-ZHDCAKfZ.js";import{h as P,d as Z,f as B,e as H}from"./transform-BnMt6tRc.js";const D=({slug:t,label:s,onClick:r})=>{const l=w(),x=P(t),o=H(x),h=i=>{if(i.stopPropagation(),r){r(t);return}l(`/tasks/${t}`)};return e.jsxs("span",{className:"tag-chip",style:{background:o.bg,color:o.text},onClick:h,children:[e.jsx("span",{className:"dot",style:{background:o.dot}}),Z(s||B(t),t)]})},G=({method:t,onClick:s})=>{const r=w(),l=t.slug||t.id||"";if(!l)return null;const x=o=>{if(o.stopPropagation(),s){s(l);return}r(`/methods/${l}`)};return e.jsx("span",{className:"method-chip",onClick:x,children:t.name})},N={1:"SOTA 🏆",2:"#2",3:"#3"},F=({units:t,paperHref:s})=>{const r=g.useRef(null),l=g.useRef(null),[x,o]=g.useState(t.length);if(g.useLayoutEffect(()=>{const n=r.current,a=l.current;if(!n||!a||t.length===0)return;const m=f=>(a.textContent=f,a.scrollWidth),M=()=>{const f=n.clientWidth;if(f<=0)return;let c=0,d=0;for(const C of t){const p=m(C.measureText);if(c+p<=f)c+=p,d+=1;else break}if(d<t.length){for(;d>0&&c+m(` · +${t.length-d} more`)>f;)d-=1,c-=m(t[d].measureText);d===0&&(d=1)}o(d)};M();const u=new ResizeObserver(M);return u.observe(n),()=>u.disconnect()},[t]),t.length===0)return null;const h=t.slice(0,Math.max(1,Math.min(x,t.length))),i=t.length-h.length;return e.jsxs("div",{className:"paper-sota",ref:r,children:[e.jsx("span",{ref:l,className:"paper-sota-measure","aria-hidden":"true"}),h.map((n,a)=>e.jsxs(g.Fragment,{children:[n.isGroupStart?e.jsxs(e.Fragment,{children:[a>0&&e.jsx("span",{className:"paper-sota-sep",children:" · "}),e.jsx("span",{className:`paper-sota-label${n.rank===1?" paper-sota-label--sota":""}`,children:N[n.rank]}),e.jsx("span",{className:"paper-sota-on",children:" on "})]}):e.jsx("span",{className:"paper-sota-sep",children:", "}),n.slug?e.jsx(L,{to:`/benchmark/${n.slug}`,className:"paper-sota-name",onClick:m=>m.stopPropagation(),children:n.name}):e.jsx("span",{className:"paper-sota-name",children:n.name})]},`${n.slug||n.name}-${a}`)),i>0&&e.jsxs(L,{to:`${s}#results`,className:"paper-sota-more",onClick:n=>n.stopPropagation(),children:[" · +",i," more"]})]})},I=({ranks:t,paperHref:s,wrap:r=!1})=>{const l=g.useMemo(()=>{const o=[];let h=!0;for(const i of[1,2,3]){const n=t.filter(a=>a.rank===i);n.forEach((a,m)=>{const M=m===0,u=M?`${h?"":" · "}${N[i]} on `:", ";o.push({name:a.name,slug:a.slug,rank:i,isGroupStart:M,measureText:u+a.name})}),n.length>0&&(h=!1)}return o},[t]),x=g.useMemo(()=>[1,2,3].map(o=>t.filter(i=>i.rank===o).map((i,n)=>({name:i.name,slug:i.slug,rank:o,isGroupStart:n===0,measureText:(n===0?`${N[o]} on `:", ")+i.name}))).filter(o=>o.length>0),[t]);return r?x.length===0?null:e.jsx("div",{className:"paper-sota-stack",children:x.map(o=>e.jsx(F,{units:o,paperHref:s},o[0].rank))}):l.length===0?null:e.jsx(F,{units:l,paperHref:s})},O=({name:t,size:s=14})=>{const r={search:e.jsx("path",{d:"M11 11l3 3M7 12.5a5.5 5.5 0 110-11 5.5 5.5 0 010 11z",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round"}),arrowUp:e.jsx("path",{d:"M8 3l5 6H3l5-6z",fill:"currentColor"}),arrowLeft:e.jsx("path",{d:"M9 3l-4 5 4 5",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"}),arrowRight:e.jsx("path",{d:"M7 3l4 5-4 5",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"}),external:e.jsx("path",{d:"M5 3h-2v8h8v-2M9 3h3v3M7 9l5-5",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"}),github:e.jsx("path",{d:"M8 1a7 7 0 00-2.21 13.64c.35.06.48-.15.48-.34v-1.2c-1.95.42-2.36-.94-2.36-.94-.32-.81-.78-1.03-.78-1.03-.64-.43.05-.43.05-.43.7.05 1.07.72 1.07.72.62 1.07 1.64.76 2.04.58.06-.45.24-.76.44-.94-1.55-.18-3.18-.78-3.18-3.46 0-.76.27-1.39.72-1.88-.07-.18-.31-.89.07-1.86 0 0 .59-.19 1.92.72.56-.15 1.16-.23 1.75-.24.59 0 1.19.08 1.75.24 1.33-.9 1.92-.72 1.92-.72.38.97.14 1.68.07 1.86.45.49.72 1.12.72 1.88 0 2.69-1.64 3.28-3.19 3.45.25.22.48.65.48 1.32v1.95c0 .19.13.41.49.34A7 7 0 008 1z",fill:"currentColor"}),citation:e.jsx("path",{d:"M3 4h3v3H3zM4 7v1.5a1.5 1.5 0 01-1.5 1.5M9 4h3v3H9zM10 7v1.5a1.5 1.5 0 01-1.5 1.5",stroke:"currentColor",strokeWidth:"1.2",fill:"none"}),bookmark:e.jsx("path",{d:"M4 2h8v12l-4-3-4 3V2z",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinejoin:"round"}),chart:e.jsx("path",{d:"M2 13h12M3 11l3-4 3 2 4-5",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"}),chat:e.jsx("path",{d:"M3 3h10v7H7l-3 3v-3H3V3z",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinejoin:"round"}),pdf:e.jsx("path",{d:"M5 2h5l3 3v9H5V2z",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinejoin:"round"}),copy:e.jsx("path",{d:"M5 5h7v8H5V5zM3 3h7v2M3 3v8h2",stroke:"currentColor",strokeWidth:"1.2",fill:"none",strokeLinejoin:"round"}),sparkle:e.jsx("path",{d:"M8 2l1.2 3.8L13 7l-3.8 1.2L8 12l-1.2-3.8L3 7l3.8-1.2L8 2z",fill:"currentColor"}),user:e.jsx("path",{d:"M8 8a3 3 0 100-6 3 3 0 000 6zM2 14c0-3 2.5-5 6-5s6 2 6 5",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round"}),globe:e.jsx("path",{d:"M8 1.5a6.5 6.5 0 100 13 6.5 6.5 0 000-13zM1.5 8h13M8 1.5c1.7 1.9 2.6 4.2 2.6 6.5s-.9 4.6-2.6 6.5M8 1.5C6.3 3.4 5.4 5.7 5.4 8s.9 4.6 2.6 6.5",stroke:"currentColor",strokeWidth:"1.2",fill:"none",strokeLinecap:"round"}),menu:e.jsx("path",{d:"M2 4h12M2 8h12M2 12h12",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),close:e.jsx("path",{d:"M3 3l10 10M13 3L3 13",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})};return e.jsx("svg",{className:s===11?"icon-sm":"icon",viewBox:"0 0 16 16",width:s,height:s,children:r[t]})},U=({size:t=16})=>e.jsxs("svg",{className:"hf-logo",width:t,height:t,viewBox:"0 0 95 88",fill:"none","aria-hidden":"true",focusable:"false",children:[e.jsx("path",{fill:"#FFD21E",d:"M47.21 76.5a34.75 34.75 0 1 0 0-69.5 34.75 34.75 0 0 0 0 69.5Z"}),e.jsx("path",{fill:"#FF9D0B",d:"M81.96 41.75a34.75 34.75 0 1 0-69.5 0 34.75 34.75 0 0 0 69.5 0Zm-73.5 0a38.75 38.75 0 1 1 77.5 0 38.75 38.75 0 0 1-77.5 0Z"}),e.jsx("path",{fill:"#3A3B45",d:"M58.5 32.3c1.28.44 1.78 3.06 3.07 2.38a5 5 0 1 0-6.76-2.07c.61 1.15 2.55-.72 3.7-.32ZM34.95 32.3c-1.28.44-1.79 3.06-3.07 2.38a5 5 0 1 1 6.76-2.07c-.61 1.15-2.56-.72-3.7-.32Z"}),e.jsx("path",{fill:"#FF323D",d:"M46.96 56.29c9.83 0 13-8.76 13-13.26 0-2.34-1.57-1.6-4.09-.36-2.33 1.15-5.46 2.74-8.9 2.74-7.19 0-13-6.88-13-2.38s3.16 13.26 13 13.26Z"}),e.jsx("path",{fill:"#3A3B45",fillRule:"evenodd",clipRule:"evenodd",d:"M39.43 54a8.7 8.7 0 0 1 5.3-4.49c.4-.12.81.57 1.24 1.28.4.68.82 1.37 1.24 1.37.45 0 .9-.68 1.33-1.35.45-.7.89-1.38 1.32-1.25a8.61 8.61 0 0 1 5 4.17c3.73-2.94 5.1-7.74 5.1-10.7 0-2.34-1.57-1.6-4.09-.36l-.14.07c-2.31 1.15-5.39 2.67-8.77 2.67s-6.45-1.52-8.77-2.67c-2.6-1.29-4.23-2.1-4.23.29 0 3.05 1.46 8.06 5.47 10.97Z"}),e.jsx("path",{fill:"#FF9D0B",d:"M70.71 37a3.25 3.25 0 1 0 0-6.5 3.25 3.25 0 0 0 0 6.5ZM24.21 37a3.25 3.25 0 1 0 0-6.5 3.25 3.25 0 0 0 0 6.5ZM17.52 48c-1.62 0-3.06.66-4.07 1.87a5.97 5.97 0 0 0-1.33 3.76 7.1 7.1 0 0 0-1.94-.3c-1.55 0-2.95.59-3.94 1.66a5.8 5.8 0 0 0-.8 7 5.3 5.3 0 0 0-1.79 2.82c-.24.9-.48 2.8.8 4.74a5.22 5.22 0 0 0-.37 5.02c1.02 2.32 3.57 4.14 8.52 6.1 3.07 1.22 5.89 2 5.91 2.01a44.33 44.33 0 0 0 10.93 1.6c5.86 0 10.05-1.8 12.46-5.34 3.88-5.69 3.33-10.9-1.7-15.92-2.77-2.78-4.62-6.87-5-7.77-.78-2.66-2.84-5.62-6.25-5.62a5.7 5.7 0 0 0-4.6 2.46c-1-1.26-1.98-2.25-2.86-2.82A7.4 7.4 0 0 0 17.52 48Zm0 4c.51 0 1.14.22 1.82.65 2.14 1.36 6.25 8.43 7.76 11.18.5.92 1.37 1.31 2.14 1.31 1.55 0 2.75-1.53.15-3.48-3.92-2.93-2.55-7.72-.68-8.01.08-.02.17-.02.24-.02 1.7 0 2.45 2.93 2.45 2.93s2.2 5.52 5.98 9.3c3.77 3.77 3.97 6.8 1.22 10.83-1.88 2.75-5.47 3.58-9.16 3.58-3.81 0-7.73-.9-9.92-1.46-.11-.03-13.45-3.8-11.76-7 .28-.54.75-.76 1.34-.76 2.38 0 6.7 3.54 8.57 3.54.41 0 .7-.17.83-.6.79-2.85-12.06-4.05-10.98-8.17.2-.73.71-1.02 1.44-1.02 3.14 0 10.2 5.53 11.68 5.53.11 0 .2-.03.24-.1.74-1.2.33-2.04-4.9-5.2-5.21-3.16-8.88-5.06-6.8-7.33.24-.26.58-.38 1-.38 3.17 0 10.66 6.82 10.66 6.82s2.02 2.1 3.25 2.1c.28 0 .52-.1.68-.38.86-1.46-8.06-8.22-8.56-11.01-.34-1.9.24-2.85 1.31-2.85Z"}),e.jsx("path",{fill:"#FFD21E",d:"M38.6 76.69c2.75-4.04 2.55-7.07-1.22-10.84-3.78-3.77-5.98-9.3-5.98-9.3s-.82-3.2-2.69-2.9c-1.87.3-3.24 5.08.68 8.01 3.91 2.93-.78 4.92-2.29 2.17-1.5-2.75-5.62-9.82-7.76-11.18-2.13-1.35-3.63-.6-3.13 2.2.5 2.79 9.43 9.55 8.56 11-.87 1.47-3.93-1.71-3.93-1.71s-9.57-8.71-11.66-6.44c-2.08 2.27 1.59 4.17 6.8 7.33 5.23 3.16 5.64 4 4.9 5.2-.75 1.2-12.28-8.53-13.36-4.4-1.08 4.11 11.77 5.3 10.98 8.15-.8 2.85-9.06-5.38-10.74-2.18-1.7 3.21 11.65 6.98 11.76 7.01 4.3 1.12 15.25 3.49 19.08-2.12Z"}),e.jsx("path",{fill:"#FF9D0B",d:"M77.4 48c1.62 0 3.07.66 4.07 1.87a5.97 5.97 0 0 1 1.33 3.76 7.1 7.1 0 0 1 1.95-.3c1.55 0 2.95.59 3.94 1.66a5.8 5.8 0 0 1 .8 7 5.3 5.3 0 0 1 1.78 2.82c.24.9.48 2.8-.8 4.74a5.22 5.22 0 0 1 .37 5.02c-1.02 2.32-3.57 4.14-8.51 6.1-3.08 1.22-5.9 2-5.92 2.01a44.33 44.33 0 0 1-10.93 1.6c-5.86 0-10.05-1.8-12.46-5.34-3.88-5.69-3.33-10.9 1.7-15.92 2.78-2.78 4.63-6.87 5.01-7.77.78-2.66 2.83-5.62 6.24-5.62a5.7 5.7 0 0 1 4.6 2.46c1-1.26 1.98-2.25 2.87-2.82A7.4 7.4 0 0 1 77.4 48Zm0 4c-.51 0-1.13.22-1.82.65-2.13 1.36-6.25 8.43-7.76 11.18a2.43 2.43 0 0 1-2.14 1.31c-1.54 0-2.75-1.53-.14-3.48 3.91-2.93 2.54-7.72.67-8.01a1.54 1.54 0 0 0-.24-.02c-1.7 0-2.45 2.93-2.45 2.93s-2.2 5.52-5.97 9.3c-3.78 3.77-3.98 6.8-1.22 10.83 1.87 2.75 5.47 3.58 9.15 3.58 3.82 0 7.73-.9 9.93-1.46.1-.03 13.45-3.8 11.76-7-.29-.54-.75-.76-1.34-.76-2.38 0-6.71 3.54-8.57 3.54-.42 0-.71-.17-.83-.6-.8-2.85 12.05-4.05 10.97-8.17-.19-.73-.7-1.02-1.44-1.02-3.14 0-10.2 5.53-11.68 5.53-.1 0-.19-.03-.23-.1-.74-1.2-.34-2.04 4.88-5.2 5.23-3.16 8.9-5.06 6.8-7.33-.23-.26-.57-.38-.98-.38-3.18 0-10.67 6.82-10.67 6.82s-2.02 2.1-3.24 2.1a.74.74 0 0 1-.68-.38c-.87-1.46 8.05-8.22 8.55-11.01.34-1.9-.24-2.85-1.31-2.85Z"}),e.jsx("path",{fill:"#FFD21E",d:"M56.33 76.69c-2.75-4.04-2.56-7.07 1.22-10.84 3.77-3.77 5.97-9.3 5.97-9.3s.82-3.2 2.7-2.9c1.86.3 3.23 5.08-.68 8.01-3.92 2.93.78 4.92 2.28 2.17 1.51-2.75 5.63-9.82 7.76-11.18 2.13-1.35 3.64-.6 3.13 2.2-.5 2.79-9.42 9.55-8.55 11 .86 1.47 3.92-1.71 3.92-1.71s9.58-8.71 11.66-6.44c2.08 2.27-1.58 4.17-6.8 7.33-5.23 3.16-5.63 4-4.9 5.2.75 1.2 12.28-8.53 13.36-4.4 1.08 4.11-11.76 5.3-10.97 8.15.8 2.85 9.05-5.38 10.74-2.18 1.69 3.21-11.65 6.98-11.76 7.01-4.31 1.12-15.26 3.49-19.08-2.12Z"})]}),K=t=>{let s=2166136261;for(let r=0;r<t.length;r++)s=Math.imul(s^t.charCodeAt(r),16777619);return()=>(s=Math.imul(s^s>>>15,2246822507),s=Math.imul(s^s>>>13,3266489909),s^=s>>>16,(s>>>0)%1e4/1e4)},_=({paperId:t})=>{const s=K(t),r=160,l=220,x=[.85+s()*.1,.55+s()*.25],o=.45+s()*.3,h=[],i=9+Math.floor(s()*3);for(let k=0;k<i;k++)h.push(.55+s()*.4);const n=s()>.3,a=Math.floor(s()*3),m=[],M=6+Math.floor(s()*3);for(let k=0;k<M;k++)m.push(.5+s()*.45);const u="#9A9588",f="#3A352D",c=5,d=(r-c*2-2)/2,C=c,p=c+d+2;let b=c+2;const S=b;b+=6;const W=b+1;b+=5;const A=b;b+=3;const j=b+1;return e.jsx("div",{style:{width:r,height:l,background:"#FDFCF9",border:"1px solid var(--hairline-strong)",borderRadius:2,boxShadow:"0 1px 0 rgba(0,0,0,0.04), 0 4px 8px -4px rgba(0,0,0,0.08)",flexShrink:0,overflow:"hidden",position:"relative"},children:e.jsxs("svg",{width:r,height:l,viewBox:`0 0 ${r} ${l}`,style:{display:"block"},children:[x.map((k,v)=>e.jsx("rect",{x:c+(r-c*2)*(1-k)/2,y:S+v*2.4,width:(r-c*2)*k,height:1.4,fill:f,rx:.3},`t${v}`)),e.jsx("rect",{x:c+(r-c*2)*(1-o)/2,y:W,width:(r-c*2)*o,height:.9,fill:u,opacity:.7,rx:.2}),e.jsx("rect",{x:c,y:A,width:6,height:1,fill:f,opacity:.6}),h.map((k,v)=>{const y=j+v*2.1;return y>l-c-1?null:e.jsx("rect",{x:C,y,width:d*k,height:.8,fill:u,opacity:.55,rx:.2},`l${v}`)}),n&&e.jsxs("g",{children:[e.jsx("rect",{x:p,y:j,width:d,height:14,fill:"#F0EBE0",stroke:u,strokeWidth:.3,opacity:.9}),a===0&&e.jsx("g",{stroke:f,strokeWidth:.4,fill:"none",opacity:.6,children:e.jsx("polyline",{points:`${p+2},${j+11} ${p+6},${j+8} ${p+10},${j+9} ${p+14},${j+5} ${p+18},${j+6} ${p+22},${j+3}`})}),a===1&&e.jsxs("g",{opacity:.55,children:[e.jsx("circle",{cx:p+d/2,cy:j+7,r:3.5,fill:f}),e.jsx("rect",{x:p+2,y:j+11,width:d-4,height:1.5,fill:u})]}),a===2&&e.jsxs("g",{opacity:.55,children:[e.jsx("rect",{x:p+3,y:j+5,width:d-6,height:1,fill:f}),e.jsx("rect",{x:p+6,y:j+8,width:d-12,height:.8,fill:f})]})]}),m.map((k,v)=>{const y=j+(n?16:0)+v*2.1;return y>l-c-1?null:e.jsx("rect",{x:p,y,width:d*k,height:.8,fill:u,opacity:.55,rx:.2},`r${v}`)})]})})},V=({paperId:t,title:s,thumbnailUrl:r,priority:l=!1})=>{const[x,o]=g.useState(!1),[h,i]=g.useState(0),[n,a]=g.useState(l),m=g.useRef(null);g.useEffect(()=>{o(!1),i(0)},[r]);const M=g.useMemo(()=>{if(!r)return null;if(h===0)return r;const u=r.includes("?")?"&":"?";return`${r}${u}retry=${h}`},[r,h]);return g.useEffect(()=>{if(l||n)return;const u=m.current;if(!u)return;const f=new IntersectionObserver(([c])=>{c.isIntersecting&&(a(!0),f.disconnect())},{rootMargin:"250px"});return f.observe(u),()=>f.disconnect()},[l,n]),r&&!x?e.jsx("div",{ref:m,style:{width:160,height:220,background:"#FDFCF9",border:"1px solid var(--hairline-strong)",borderRadius:2,boxShadow:"0 1px 0 rgba(0,0,0,0.04), 0 4px 8px -4px rgba(0,0,0,0.08)",flexShrink:0,overflow:"hidden",position:"relative"},children:(l||n)&&M&&e.jsx("img",{src:M,alt:`Thumbnail for ${s}`,loading:l?"eager":"lazy",decoding:"async",fetchPriority:l?"high":"auto",style:{width:"100%",height:"100%",objectFit:"contain",display:"block"},onError:()=>{if(h<1){i(u=>u+1);return}o(!0)}},M)}):e.jsx(_,{paperId:t})},q="language-modeling";function $(t){return t?t.toLowerCase().replace(/\(.*?\)/g," ").replace(/[^a-z]+/g," ").replace(/\bllm\b/g," ").replace(/\s+/g," ").trim().replace(/s$/,""):""}function Y(t){return $(t.slug)==="large language model"||$(t.name)==="large language model"}function Q(t){return t.tags.includes(q)?t.methods.filter(s=>!Y(s)):t.methods}const se=({paper:t,rank:s,onClickTag:r})=>{const l=R(),x=`/paper/${t.id}`,o=g.useCallback(()=>{l.prefetchQuery({queryKey:["paper-arxiv",t.id],queryFn:()=>T.getPaperByArxivId(t.id,!0),staleTime:10*60*1e3})},[t.id,l]),h=t.authors.slice(0,3).join(", "),i=t.authors.length,n=Q(t);return e.jsxs("article",{className:"paper-card",children:[s!=null&&e.jsx(L,{to:x,className:"paper-thumb-wrap",onFocus:o,onMouseEnter:o,children:e.jsx(V,{paperId:t.id,title:t.title,thumbnailUrl:t.thumbnailUrl,priority:s<=3})}),e.jsxs("div",{className:"paper-body",children:[e.jsxs("div",{className:"paper-body-main",children:[e.jsx("h3",{className:"paper-title",children:e.jsx(L,{to:x,onFocus:o,onMouseEnter:o,children:e.jsx(E,{title:t.title})})}),e.jsxs("div",{className:"paper-authors",children:[h,i>3&&e.jsxs("span",{children:[", ","+",i-3," authors"]}),t.date&&e.jsxs(e.Fragment,{children:[i>0?" · ":"",e.jsx("span",{children:t.date})]}),t.citations>0&&e.jsxs(e.Fragment,{children:[i>0||t.date?" · ":"",e.jsxs("span",{children:[t.citations.toLocaleString()," citations"]})]})]}),t.abstract&&e.jsx("p",{className:"paper-abstract",children:e.jsx(z,{text:t.abstract})}),t.sotaRanks.length>0&&e.jsx(I,{ranks:t.sotaRanks,paperHref:x}),(t.tags.length>0||n.length>0)&&e.jsxs("div",{className:"paper-tags paper-tags--clamped",children:[t.tags.map(a=>e.jsx(D,{slug:a,onClick:r},a)),n.map(a=>e.jsx(G,{method:a},a.id||a.slug||a.name))]})]}),(t.githubUrl||t.hfUrl)&&e.jsxs("div",{className:"paper-resources",children:[t.githubUrl&&e.jsxs("a",{className:"paper-resource is-link",href:t.githubUrl,target:"_blank",rel:"noopener noreferrer","aria-label":"Open GitHub repository",onClick:a=>a.stopPropagation(),children:[e.jsx(O,{name:"github",size:20}),t.velocity24h!=null&&t.velocity24h>0&&e.jsxs("span",{className:"resource-stat",children:[e.jsxs("span",{className:"resource-value",children:[e.jsx("span",{className:"gh-rate-arrow",children:"↑"}),J(t.velocity24h)]}),e.jsx("span",{className:"resource-label",children:"stars / hr"})]})]}),t.hfUrl&&t.hfKind&&e.jsxs("a",{className:"paper-resource is-link",href:t.hfUrl,target:"_blank",rel:"noopener noreferrer","aria-label":`Open Hugging Face ${t.hfKind}`,onClick:a=>a.stopPropagation(),children:[e.jsx(U,{size:20}),e.jsxs("span",{className:"resource-stat",children:[e.jsx("span",{className:"resource-value",children:t.hfCount}),e.jsx("span",{className:"resource-label",children:t.hfKind})]})]})]})]})]})};function J(t){return t.toFixed(1)}export{O as I,G as M,se as P,I as S,D as T,V as a};
 
 
assets/components-CM9AEXO8.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{x as R,R as g,b as T,j as e,L,a as w}from"./index-CKAClQ2e.js";import{L as E,a as z}from"./LatexTitle-DBZLS4yb.js";import{h as P,d as Z,f as B,e as H}from"./transform-BCXN61O6.js";const D=({slug:t,label:s,onClick:r})=>{const l=w(),x=P(t),o=H(x),h=i=>{if(i.stopPropagation(),r){r(t);return}l(`/tasks/${t}`)};return e.jsxs("span",{className:"tag-chip",style:{background:o.bg,color:o.text},onClick:h,children:[e.jsx("span",{className:"dot",style:{background:o.dot}}),Z(s||B(t),t)]})},G=({method:t,onClick:s})=>{const r=w(),l=t.slug||t.id||"";if(!l)return null;const x=o=>{if(o.stopPropagation(),s){s(l);return}r(`/methods/${l}`)};return e.jsx("span",{className:"method-chip",onClick:x,children:t.name})},N={1:"SOTA 🏆",2:"#2",3:"#3"},F=({units:t,paperHref:s})=>{const r=g.useRef(null),l=g.useRef(null),[x,o]=g.useState(t.length);if(g.useLayoutEffect(()=>{const n=r.current,a=l.current;if(!n||!a||t.length===0)return;const m=f=>(a.textContent=f,a.scrollWidth),M=()=>{const f=n.clientWidth;if(f<=0)return;let c=0,d=0;for(const C of t){const p=m(C.measureText);if(c+p<=f)c+=p,d+=1;else break}if(d<t.length){for(;d>0&&c+m(` · +${t.length-d} more`)>f;)d-=1,c-=m(t[d].measureText);d===0&&(d=1)}o(d)};M();const u=new ResizeObserver(M);return u.observe(n),()=>u.disconnect()},[t]),t.length===0)return null;const h=t.slice(0,Math.max(1,Math.min(x,t.length))),i=t.length-h.length;return e.jsxs("div",{className:"paper-sota",ref:r,children:[e.jsx("span",{ref:l,className:"paper-sota-measure","aria-hidden":"true"}),h.map((n,a)=>e.jsxs(g.Fragment,{children:[n.isGroupStart?e.jsxs(e.Fragment,{children:[a>0&&e.jsx("span",{className:"paper-sota-sep",children:" · "}),e.jsx("span",{className:`paper-sota-label${n.rank===1?" paper-sota-label--sota":""}`,children:N[n.rank]}),e.jsx("span",{className:"paper-sota-on",children:" on "})]}):e.jsx("span",{className:"paper-sota-sep",children:", "}),n.slug?e.jsx(L,{to:`/benchmark/${n.slug}`,className:"paper-sota-name",onClick:m=>m.stopPropagation(),children:n.name}):e.jsx("span",{className:"paper-sota-name",children:n.name})]},`${n.slug||n.name}-${a}`)),i>0&&e.jsxs(L,{to:`${s}#results`,className:"paper-sota-more",onClick:n=>n.stopPropagation(),children:[" · +",i," more"]})]})},I=({ranks:t,paperHref:s,wrap:r=!1})=>{const l=g.useMemo(()=>{const o=[];let h=!0;for(const i of[1,2,3]){const n=t.filter(a=>a.rank===i);n.forEach((a,m)=>{const M=m===0,u=M?`${h?"":" · "}${N[i]} on `:", ";o.push({name:a.name,slug:a.slug,rank:i,isGroupStart:M,measureText:u+a.name})}),n.length>0&&(h=!1)}return o},[t]),x=g.useMemo(()=>[1,2,3].map(o=>t.filter(i=>i.rank===o).map((i,n)=>({name:i.name,slug:i.slug,rank:o,isGroupStart:n===0,measureText:(n===0?`${N[o]} on `:", ")+i.name}))).filter(o=>o.length>0),[t]);return r?x.length===0?null:e.jsx("div",{className:"paper-sota-stack",children:x.map(o=>e.jsx(F,{units:o,paperHref:s},o[0].rank))}):l.length===0?null:e.jsx(F,{units:l,paperHref:s})},O=({name:t,size:s=14})=>{const r={search:e.jsx("path",{d:"M11 11l3 3M7 12.5a5.5 5.5 0 110-11 5.5 5.5 0 010 11z",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round"}),arrowUp:e.jsx("path",{d:"M8 3l5 6H3l5-6z",fill:"currentColor"}),arrowLeft:e.jsx("path",{d:"M9 3l-4 5 4 5",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"}),arrowRight:e.jsx("path",{d:"M7 3l4 5-4 5",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"}),external:e.jsx("path",{d:"M5 3h-2v8h8v-2M9 3h3v3M7 9l5-5",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"}),github:e.jsx("path",{d:"M8 1a7 7 0 00-2.21 13.64c.35.06.48-.15.48-.34v-1.2c-1.95.42-2.36-.94-2.36-.94-.32-.81-.78-1.03-.78-1.03-.64-.43.05-.43.05-.43.7.05 1.07.72 1.07.72.62 1.07 1.64.76 2.04.58.06-.45.24-.76.44-.94-1.55-.18-3.18-.78-3.18-3.46 0-.76.27-1.39.72-1.88-.07-.18-.31-.89.07-1.86 0 0 .59-.19 1.92.72.56-.15 1.16-.23 1.75-.24.59 0 1.19.08 1.75.24 1.33-.9 1.92-.72 1.92-.72.38.97.14 1.68.07 1.86.45.49.72 1.12.72 1.88 0 2.69-1.64 3.28-3.19 3.45.25.22.48.65.48 1.32v1.95c0 .19.13.41.49.34A7 7 0 008 1z",fill:"currentColor"}),citation:e.jsx("path",{d:"M3 4h3v3H3zM4 7v1.5a1.5 1.5 0 01-1.5 1.5M9 4h3v3H9zM10 7v1.5a1.5 1.5 0 01-1.5 1.5",stroke:"currentColor",strokeWidth:"1.2",fill:"none"}),bookmark:e.jsx("path",{d:"M4 2h8v12l-4-3-4 3V2z",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinejoin:"round"}),chart:e.jsx("path",{d:"M2 13h12M3 11l3-4 3 2 4-5",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"}),chat:e.jsx("path",{d:"M3 3h10v7H7l-3 3v-3H3V3z",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinejoin:"round"}),pdf:e.jsx("path",{d:"M5 2h5l3 3v9H5V2z",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinejoin:"round"}),copy:e.jsx("path",{d:"M5 5h7v8H5V5zM3 3h7v2M3 3v8h2",stroke:"currentColor",strokeWidth:"1.2",fill:"none",strokeLinejoin:"round"}),sparkle:e.jsx("path",{d:"M8 2l1.2 3.8L13 7l-3.8 1.2L8 12l-1.2-3.8L3 7l3.8-1.2L8 2z",fill:"currentColor"}),user:e.jsx("path",{d:"M8 8a3 3 0 100-6 3 3 0 000 6zM2 14c0-3 2.5-5 6-5s6 2 6 5",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round"}),globe:e.jsx("path",{d:"M8 1.5a6.5 6.5 0 100 13 6.5 6.5 0 000-13zM1.5 8h13M8 1.5c1.7 1.9 2.6 4.2 2.6 6.5s-.9 4.6-2.6 6.5M8 1.5C6.3 3.4 5.4 5.7 5.4 8s.9 4.6 2.6 6.5",stroke:"currentColor",strokeWidth:"1.2",fill:"none",strokeLinecap:"round"}),menu:e.jsx("path",{d:"M2 4h12M2 8h12M2 12h12",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),close:e.jsx("path",{d:"M3 3l10 10M13 3L3 13",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})};return e.jsx("svg",{className:s===11?"icon-sm":"icon",viewBox:"0 0 16 16",width:s,height:s,children:r[t]})},U=({size:t=16})=>e.jsxs("svg",{className:"hf-logo",width:t,height:t,viewBox:"0 0 95 88",fill:"none","aria-hidden":"true",focusable:"false",children:[e.jsx("path",{fill:"#FFD21E",d:"M47.21 76.5a34.75 34.75 0 1 0 0-69.5 34.75 34.75 0 0 0 0 69.5Z"}),e.jsx("path",{fill:"#FF9D0B",d:"M81.96 41.75a34.75 34.75 0 1 0-69.5 0 34.75 34.75 0 0 0 69.5 0Zm-73.5 0a38.75 38.75 0 1 1 77.5 0 38.75 38.75 0 0 1-77.5 0Z"}),e.jsx("path",{fill:"#3A3B45",d:"M58.5 32.3c1.28.44 1.78 3.06 3.07 2.38a5 5 0 1 0-6.76-2.07c.61 1.15 2.55-.72 3.7-.32ZM34.95 32.3c-1.28.44-1.79 3.06-3.07 2.38a5 5 0 1 1 6.76-2.07c-.61 1.15-2.56-.72-3.7-.32Z"}),e.jsx("path",{fill:"#FF323D",d:"M46.96 56.29c9.83 0 13-8.76 13-13.26 0-2.34-1.57-1.6-4.09-.36-2.33 1.15-5.46 2.74-8.9 2.74-7.19 0-13-6.88-13-2.38s3.16 13.26 13 13.26Z"}),e.jsx("path",{fill:"#3A3B45",fillRule:"evenodd",clipRule:"evenodd",d:"M39.43 54a8.7 8.7 0 0 1 5.3-4.49c.4-.12.81.57 1.24 1.28.4.68.82 1.37 1.24 1.37.45 0 .9-.68 1.33-1.35.45-.7.89-1.38 1.32-1.25a8.61 8.61 0 0 1 5 4.17c3.73-2.94 5.1-7.74 5.1-10.7 0-2.34-1.57-1.6-4.09-.36l-.14.07c-2.31 1.15-5.39 2.67-8.77 2.67s-6.45-1.52-8.77-2.67c-2.6-1.29-4.23-2.1-4.23.29 0 3.05 1.46 8.06 5.47 10.97Z"}),e.jsx("path",{fill:"#FF9D0B",d:"M70.71 37a3.25 3.25 0 1 0 0-6.5 3.25 3.25 0 0 0 0 6.5ZM24.21 37a3.25 3.25 0 1 0 0-6.5 3.25 3.25 0 0 0 0 6.5ZM17.52 48c-1.62 0-3.06.66-4.07 1.87a5.97 5.97 0 0 0-1.33 3.76 7.1 7.1 0 0 0-1.94-.3c-1.55 0-2.95.59-3.94 1.66a5.8 5.8 0 0 0-.8 7 5.3 5.3 0 0 0-1.79 2.82c-.24.9-.48 2.8.8 4.74a5.22 5.22 0 0 0-.37 5.02c1.02 2.32 3.57 4.14 8.52 6.1 3.07 1.22 5.89 2 5.91 2.01a44.33 44.33 0 0 0 10.93 1.6c5.86 0 10.05-1.8 12.46-5.34 3.88-5.69 3.33-10.9-1.7-15.92-2.77-2.78-4.62-6.87-5-7.77-.78-2.66-2.84-5.62-6.25-5.62a5.7 5.7 0 0 0-4.6 2.46c-1-1.26-1.98-2.25-2.86-2.82A7.4 7.4 0 0 0 17.52 48Zm0 4c.51 0 1.14.22 1.82.65 2.14 1.36 6.25 8.43 7.76 11.18.5.92 1.37 1.31 2.14 1.31 1.55 0 2.75-1.53.15-3.48-3.92-2.93-2.55-7.72-.68-8.01.08-.02.17-.02.24-.02 1.7 0 2.45 2.93 2.45 2.93s2.2 5.52 5.98 9.3c3.77 3.77 3.97 6.8 1.22 10.83-1.88 2.75-5.47 3.58-9.16 3.58-3.81 0-7.73-.9-9.92-1.46-.11-.03-13.45-3.8-11.76-7 .28-.54.75-.76 1.34-.76 2.38 0 6.7 3.54 8.57 3.54.41 0 .7-.17.83-.6.79-2.85-12.06-4.05-10.98-8.17.2-.73.71-1.02 1.44-1.02 3.14 0 10.2 5.53 11.68 5.53.11 0 .2-.03.24-.1.74-1.2.33-2.04-4.9-5.2-5.21-3.16-8.88-5.06-6.8-7.33.24-.26.58-.38 1-.38 3.17 0 10.66 6.82 10.66 6.82s2.02 2.1 3.25 2.1c.28 0 .52-.1.68-.38.86-1.46-8.06-8.22-8.56-11.01-.34-1.9.24-2.85 1.31-2.85Z"}),e.jsx("path",{fill:"#FFD21E",d:"M38.6 76.69c2.75-4.04 2.55-7.07-1.22-10.84-3.78-3.77-5.98-9.3-5.98-9.3s-.82-3.2-2.69-2.9c-1.87.3-3.24 5.08.68 8.01 3.91 2.93-.78 4.92-2.29 2.17-1.5-2.75-5.62-9.82-7.76-11.18-2.13-1.35-3.63-.6-3.13 2.2.5 2.79 9.43 9.55 8.56 11-.87 1.47-3.93-1.71-3.93-1.71s-9.57-8.71-11.66-6.44c-2.08 2.27 1.59 4.17 6.8 7.33 5.23 3.16 5.64 4 4.9 5.2-.75 1.2-12.28-8.53-13.36-4.4-1.08 4.11 11.77 5.3 10.98 8.15-.8 2.85-9.06-5.38-10.74-2.18-1.7 3.21 11.65 6.98 11.76 7.01 4.3 1.12 15.25 3.49 19.08-2.12Z"}),e.jsx("path",{fill:"#FF9D0B",d:"M77.4 48c1.62 0 3.07.66 4.07 1.87a5.97 5.97 0 0 1 1.33 3.76 7.1 7.1 0 0 1 1.95-.3c1.55 0 2.95.59 3.94 1.66a5.8 5.8 0 0 1 .8 7 5.3 5.3 0 0 1 1.78 2.82c.24.9.48 2.8-.8 4.74a5.22 5.22 0 0 1 .37 5.02c-1.02 2.32-3.57 4.14-8.51 6.1-3.08 1.22-5.9 2-5.92 2.01a44.33 44.33 0 0 1-10.93 1.6c-5.86 0-10.05-1.8-12.46-5.34-3.88-5.69-3.33-10.9 1.7-15.92 2.78-2.78 4.63-6.87 5.01-7.77.78-2.66 2.83-5.62 6.24-5.62a5.7 5.7 0 0 1 4.6 2.46c1-1.26 1.98-2.25 2.87-2.82A7.4 7.4 0 0 1 77.4 48Zm0 4c-.51 0-1.13.22-1.82.65-2.13 1.36-6.25 8.43-7.76 11.18a2.43 2.43 0 0 1-2.14 1.31c-1.54 0-2.75-1.53-.14-3.48 3.91-2.93 2.54-7.72.67-8.01a1.54 1.54 0 0 0-.24-.02c-1.7 0-2.45 2.93-2.45 2.93s-2.2 5.52-5.97 9.3c-3.78 3.77-3.98 6.8-1.22 10.83 1.87 2.75 5.47 3.58 9.15 3.58 3.82 0 7.73-.9 9.93-1.46.1-.03 13.45-3.8 11.76-7-.29-.54-.75-.76-1.34-.76-2.38 0-6.71 3.54-8.57 3.54-.42 0-.71-.17-.83-.6-.8-2.85 12.05-4.05 10.97-8.17-.19-.73-.7-1.02-1.44-1.02-3.14 0-10.2 5.53-11.68 5.53-.1 0-.19-.03-.23-.1-.74-1.2-.34-2.04 4.88-5.2 5.23-3.16 8.9-5.06 6.8-7.33-.23-.26-.57-.38-.98-.38-3.18 0-10.67 6.82-10.67 6.82s-2.02 2.1-3.24 2.1a.74.74 0 0 1-.68-.38c-.87-1.46 8.05-8.22 8.55-11.01.34-1.9-.24-2.85-1.31-2.85Z"}),e.jsx("path",{fill:"#FFD21E",d:"M56.33 76.69c-2.75-4.04-2.56-7.07 1.22-10.84 3.77-3.77 5.97-9.3 5.97-9.3s.82-3.2 2.7-2.9c1.86.3 3.23 5.08-.68 8.01-3.92 2.93.78 4.92 2.28 2.17 1.51-2.75 5.63-9.82 7.76-11.18 2.13-1.35 3.64-.6 3.13 2.2-.5 2.79-9.42 9.55-8.55 11 .86 1.47 3.92-1.71 3.92-1.71s9.58-8.71 11.66-6.44c2.08 2.27-1.58 4.17-6.8 7.33-5.23 3.16-5.63 4-4.9 5.2.75 1.2 12.28-8.53 13.36-4.4 1.08 4.11-11.76 5.3-10.97 8.15.8 2.85 9.05-5.38 10.74-2.18 1.69 3.21-11.65 6.98-11.76 7.01-4.31 1.12-15.26 3.49-19.08-2.12Z"})]}),K=t=>{let s=2166136261;for(let r=0;r<t.length;r++)s=Math.imul(s^t.charCodeAt(r),16777619);return()=>(s=Math.imul(s^s>>>15,2246822507),s=Math.imul(s^s>>>13,3266489909),s^=s>>>16,(s>>>0)%1e4/1e4)},_=({paperId:t})=>{const s=K(t),r=160,l=220,x=[.85+s()*.1,.55+s()*.25],o=.45+s()*.3,h=[],i=9+Math.floor(s()*3);for(let k=0;k<i;k++)h.push(.55+s()*.4);const n=s()>.3,a=Math.floor(s()*3),m=[],M=6+Math.floor(s()*3);for(let k=0;k<M;k++)m.push(.5+s()*.45);const u="#9A9588",f="#3A352D",c=5,d=(r-c*2-2)/2,C=c,p=c+d+2;let b=c+2;const S=b;b+=6;const W=b+1;b+=5;const A=b;b+=3;const j=b+1;return e.jsx("div",{style:{width:r,height:l,background:"#FDFCF9",border:"1px solid var(--hairline-strong)",borderRadius:2,boxShadow:"0 1px 0 rgba(0,0,0,0.04), 0 4px 8px -4px rgba(0,0,0,0.08)",flexShrink:0,overflow:"hidden",position:"relative"},children:e.jsxs("svg",{width:r,height:l,viewBox:`0 0 ${r} ${l}`,style:{display:"block"},children:[x.map((k,v)=>e.jsx("rect",{x:c+(r-c*2)*(1-k)/2,y:S+v*2.4,width:(r-c*2)*k,height:1.4,fill:f,rx:.3},`t${v}`)),e.jsx("rect",{x:c+(r-c*2)*(1-o)/2,y:W,width:(r-c*2)*o,height:.9,fill:u,opacity:.7,rx:.2}),e.jsx("rect",{x:c,y:A,width:6,height:1,fill:f,opacity:.6}),h.map((k,v)=>{const y=j+v*2.1;return y>l-c-1?null:e.jsx("rect",{x:C,y,width:d*k,height:.8,fill:u,opacity:.55,rx:.2},`l${v}`)}),n&&e.jsxs("g",{children:[e.jsx("rect",{x:p,y:j,width:d,height:14,fill:"#F0EBE0",stroke:u,strokeWidth:.3,opacity:.9}),a===0&&e.jsx("g",{stroke:f,strokeWidth:.4,fill:"none",opacity:.6,children:e.jsx("polyline",{points:`${p+2},${j+11} ${p+6},${j+8} ${p+10},${j+9} ${p+14},${j+5} ${p+18},${j+6} ${p+22},${j+3}`})}),a===1&&e.jsxs("g",{opacity:.55,children:[e.jsx("circle",{cx:p+d/2,cy:j+7,r:3.5,fill:f}),e.jsx("rect",{x:p+2,y:j+11,width:d-4,height:1.5,fill:u})]}),a===2&&e.jsxs("g",{opacity:.55,children:[e.jsx("rect",{x:p+3,y:j+5,width:d-6,height:1,fill:f}),e.jsx("rect",{x:p+6,y:j+8,width:d-12,height:.8,fill:f})]})]}),m.map((k,v)=>{const y=j+(n?16:0)+v*2.1;return y>l-c-1?null:e.jsx("rect",{x:p,y,width:d*k,height:.8,fill:u,opacity:.55,rx:.2},`r${v}`)})]})})},V=({paperId:t,title:s,thumbnailUrl:r,priority:l=!1})=>{const[x,o]=g.useState(!1),[h,i]=g.useState(0),[n,a]=g.useState(l),m=g.useRef(null);g.useEffect(()=>{o(!1),i(0)},[r]);const M=g.useMemo(()=>{if(!r)return null;if(h===0)return r;const u=r.includes("?")?"&":"?";return`${r}${u}retry=${h}`},[r,h]);return g.useEffect(()=>{if(l||n)return;const u=m.current;if(!u)return;const f=new IntersectionObserver(([c])=>{c.isIntersecting&&(a(!0),f.disconnect())},{rootMargin:"250px"});return f.observe(u),()=>f.disconnect()},[l,n]),r&&!x?e.jsx("div",{ref:m,style:{width:160,height:220,background:"#FDFCF9",border:"1px solid var(--hairline-strong)",borderRadius:2,boxShadow:"0 1px 0 rgba(0,0,0,0.04), 0 4px 8px -4px rgba(0,0,0,0.08)",flexShrink:0,overflow:"hidden",position:"relative"},children:(l||n)&&M&&e.jsx("img",{src:M,alt:`Thumbnail for ${s}`,loading:l?"eager":"lazy",decoding:"async",fetchPriority:l?"high":"auto",style:{width:"100%",height:"100%",objectFit:"contain",display:"block"},onError:()=>{if(h<1){i(u=>u+1);return}o(!0)}},M)}):e.jsx(_,{paperId:t})},q="language-modeling";function $(t){return t?t.toLowerCase().replace(/\(.*?\)/g," ").replace(/[^a-z]+/g," ").replace(/\bllm\b/g," ").replace(/\s+/g," ").trim().replace(/s$/,""):""}function Y(t){return $(t.slug)==="large language model"||$(t.name)==="large language model"}function Q(t){return t.tags.includes(q)?t.methods.filter(s=>!Y(s)):t.methods}const se=({paper:t,rank:s,onClickTag:r})=>{const l=R(),x=`/paper/${t.id}`,o=g.useCallback(()=>{l.prefetchQuery({queryKey:["paper-arxiv",t.id],queryFn:()=>T.getPaperByArxivId(t.id,!0),staleTime:10*60*1e3})},[t.id,l]),h=t.authors.slice(0,3).join(", "),i=t.authors.length,n=Q(t);return e.jsxs("article",{className:"paper-card",children:[s!=null&&e.jsx(L,{to:x,className:"paper-thumb-wrap",onFocus:o,onMouseEnter:o,children:e.jsx(V,{paperId:t.id,title:t.title,thumbnailUrl:t.thumbnailUrl,priority:s<=3})}),e.jsxs("div",{className:"paper-body",children:[e.jsxs("div",{className:"paper-body-main",children:[e.jsx("h3",{className:"paper-title",children:e.jsx(L,{to:x,onFocus:o,onMouseEnter:o,children:e.jsx(E,{title:t.title})})}),e.jsxs("div",{className:"paper-authors",children:[h,i>3&&e.jsxs("span",{children:[", ","+",i-3," authors"]}),t.date&&e.jsxs(e.Fragment,{children:[i>0?" · ":"",e.jsx("span",{children:t.date})]}),t.citations>0&&e.jsxs(e.Fragment,{children:[i>0||t.date?" · ":"",e.jsxs("span",{children:[t.citations.toLocaleString()," citations"]})]})]}),t.abstract&&e.jsx("p",{className:"paper-abstract",children:e.jsx(z,{text:t.abstract})}),t.sotaRanks.length>0&&e.jsx(I,{ranks:t.sotaRanks,paperHref:x}),(t.tags.length>0||n.length>0)&&e.jsxs("div",{className:"paper-tags paper-tags--clamped",children:[t.tags.map(a=>e.jsx(D,{slug:a,onClick:r},a)),n.map(a=>e.jsx(G,{method:a},a.id||a.slug||a.name))]})]}),(t.githubUrl||t.hfUrl)&&e.jsxs("div",{className:"paper-resources",children:[t.githubUrl&&e.jsxs("a",{className:"paper-resource is-link",href:t.githubUrl,target:"_blank",rel:"noopener noreferrer","aria-label":"Open GitHub repository",onClick:a=>a.stopPropagation(),children:[e.jsx(O,{name:"github",size:20}),t.velocity24h!=null&&t.velocity24h>0&&e.jsxs("span",{className:"resource-stat",children:[e.jsxs("span",{className:"resource-value",children:[e.jsx("span",{className:"gh-rate-arrow",children:"↑"}),J(t.velocity24h)]}),e.jsx("span",{className:"resource-label",children:"stars / hr"})]})]}),t.hfUrl&&t.hfKind&&e.jsxs("a",{className:"paper-resource is-link",href:t.hfUrl,target:"_blank",rel:"noopener noreferrer","aria-label":`Open Hugging Face ${t.hfKind}`,onClick:a=>a.stopPropagation(),children:[e.jsx(U,{size:20}),e.jsxs("span",{className:"resource-stat",children:[e.jsx("span",{className:"resource-value",children:t.hfCount}),e.jsx("span",{className:"resource-label",children:t.hfKind})]})]})]})]})]})};function J(t){return t.toFixed(1)}export{O as I,G as M,se as P,I as S,D as T,V as a};
assets/{dialog-foJeJzmC.js → dialog--MrJxlEO.js} RENAMED
@@ -1,5 +1,5 @@
1
- import{r as s,j as i,z as q,d as J,A as R,P as N,E as K,b as D,f as x,i as U,e as h,F as X,G as Y,H as Q,I as ee,J as te,a9 as oe,X as ne,k as p}from"./index-EtWJP9FK.js";function ae(e){const t=re(e),o=s.forwardRef((a,n)=>{const{children:r,...l}=a,c=s.Children.toArray(r),d=c.find(ie);if(d){const u=d.props.children,m=c.map(v=>v===d?s.Children.count(u)>1?s.Children.only(null):s.isValidElement(u)?u.props.children:null:v);return i.jsx(t,{...l,ref:n,children:s.isValidElement(u)?s.cloneElement(u,void 0,m):null})}return i.jsx(t,{...l,ref:n,children:r})});return o.displayName=`${e}.Slot`,o}function re(e){const t=s.forwardRef((o,a)=>{const{children:n,...r}=o;if(s.isValidElement(n)){const l=ce(n),c=le(r,n.props);return n.type!==s.Fragment&&(c.ref=a?q(a,l):l),s.cloneElement(n,c)}return s.Children.count(n)>1?s.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var se=Symbol("radix.slottable");function ie(e){return s.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===se}function le(e,t){const o={...t};for(const a in t){const n=e[a],r=t[a];/^on[A-Z]/.test(a)?n&&r?o[a]=(...c)=>{const d=r(...c);return n(...c),d}:n&&(o[a]=n):a==="style"?o[a]={...n,...r}:a==="className"&&(o[a]=[n,r].filter(Boolean).join(" "))}return{...e,...o}}function ce(e){var a,n;let t=(a=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:a.get,o=t&&"isReactWarning"in t&&t.isReactWarning;return o?e.ref:(t=(n=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:n.get,o=t&&"isReactWarning"in t&&t.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}var C="Dialog",[b]=U(C),[de,f]=b(C),P=e=>{const{__scopeDialog:t,children:o,open:a,defaultOpen:n,onOpenChange:r,modal:l=!0}=e,c=s.useRef(null),d=s.useRef(null),[u,m]=J({prop:a,defaultProp:n??!1,onChange:r,caller:C});return i.jsx(de,{scope:t,triggerRef:c,contentRef:d,contentId:R(),titleId:R(),descriptionId:R(),open:u,onOpenChange:m,onOpenToggle:s.useCallback(()=>m(v=>!v),[m]),modal:l,children:o})};P.displayName=C;var O="DialogTrigger",ue=s.forwardRef((e,t)=>{const{__scopeDialog:o,...a}=e,n=f(O,o),r=h(t,n.triggerRef);return i.jsx(D.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":j(n.open),...a,ref:r,onClick:x(e.onClick,n.onOpenToggle)})});ue.displayName=O;var E="DialogPortal",[fe,I]=b(E,{forceMount:void 0}),A=e=>{const{__scopeDialog:t,forceMount:o,children:a,container:n}=e,r=f(E,t);return i.jsx(fe,{scope:t,forceMount:o,children:s.Children.map(a,l=>i.jsx(N,{present:o||r.open,children:i.jsx(K,{asChild:!0,container:n,children:l})}))})};A.displayName=E;var y="DialogOverlay",w=s.forwardRef((e,t)=>{const o=I(y,e.__scopeDialog),{forceMount:a=o.forceMount,...n}=e,r=f(y,e.__scopeDialog);return r.modal?i.jsx(N,{present:a||r.open,children:i.jsx(pe,{...n,ref:t})}):null});w.displayName=y;var ge=ae("DialogOverlay.RemoveScroll"),pe=s.forwardRef((e,t)=>{const{__scopeDialog:o,...a}=e,n=f(y,o);return i.jsx(Y,{as:ge,allowPinchZoom:!0,shards:[n.contentRef],children:i.jsx(D.div,{"data-state":j(n.open),...a,ref:t,style:{pointerEvents:"auto",...a.style}})})}),g="DialogContent",T=s.forwardRef((e,t)=>{const o=I(g,e.__scopeDialog),{forceMount:a=o.forceMount,...n}=e,r=f(g,e.__scopeDialog);return i.jsx(N,{present:a||r.open,children:r.modal?i.jsx(me,{...n,ref:t}):i.jsx(xe,{...n,ref:t})})});T.displayName=g;var me=s.forwardRef((e,t)=>{const o=f(g,e.__scopeDialog),a=s.useRef(null),n=h(t,o.contentRef,a);return s.useEffect(()=>{const r=a.current;if(r)return X(r)},[]),i.jsx(S,{...e,ref:n,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:x(e.onCloseAutoFocus,r=>{var l;r.preventDefault(),(l=o.triggerRef.current)==null||l.focus()}),onPointerDownOutside:x(e.onPointerDownOutside,r=>{const l=r.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0;(l.button===2||c)&&r.preventDefault()}),onFocusOutside:x(e.onFocusOutside,r=>r.preventDefault())})}),xe=s.forwardRef((e,t)=>{const o=f(g,e.__scopeDialog),a=s.useRef(!1),n=s.useRef(!1);return i.jsx(S,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:r=>{var l,c;(l=e.onCloseAutoFocus)==null||l.call(e,r),r.defaultPrevented||(a.current||(c=o.triggerRef.current)==null||c.focus(),r.preventDefault()),a.current=!1,n.current=!1},onInteractOutside:r=>{var d,u;(d=e.onInteractOutside)==null||d.call(e,r),r.defaultPrevented||(a.current=!0,r.detail.originalEvent.type==="pointerdown"&&(n.current=!0));const l=r.target;((u=o.triggerRef.current)==null?void 0:u.contains(l))&&r.preventDefault(),r.detail.originalEvent.type==="focusin"&&n.current&&r.preventDefault()}})}),S=s.forwardRef((e,t)=>{const{__scopeDialog:o,trapFocus:a,onOpenAutoFocus:n,onCloseAutoFocus:r,...l}=e,c=f(g,o),d=s.useRef(null),u=h(t,d);return Q(),i.jsxs(i.Fragment,{children:[i.jsx(ee,{asChild:!0,loop:!0,trapped:a,onMountAutoFocus:n,onUnmountAutoFocus:r,children:i.jsx(te,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":j(c.open),...l,ref:u,onDismiss:()=>c.onOpenChange(!1)})}),i.jsxs(i.Fragment,{children:[i.jsx(De,{titleId:c.titleId}),i.jsx(ye,{contentRef:d,descriptionId:c.descriptionId})]})]})}),_="DialogTitle",F=s.forwardRef((e,t)=>{const{__scopeDialog:o,...a}=e,n=f(_,o);return i.jsx(D.h2,{id:n.titleId,...a,ref:t})});F.displayName=_;var M="DialogDescription",W=s.forwardRef((e,t)=>{const{__scopeDialog:o,...a}=e,n=f(M,o);return i.jsx(D.p,{id:n.descriptionId,...a,ref:t})});W.displayName=M;var $="DialogClose",k=s.forwardRef((e,t)=>{const{__scopeDialog:o,...a}=e,n=f($,o);return i.jsx(D.button,{type:"button",...a,ref:t,onClick:x(e.onClick,()=>n.onOpenChange(!1))})});k.displayName=$;function j(e){return e?"open":"closed"}var L="DialogTitleWarning",[Ie,G]=oe(L,{contentName:g,titleName:_,docsSlug:"dialog"}),De=({titleId:e})=>{const t=G(L),o=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
2
 
3
  If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
4
 
5
- For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return s.useEffect(()=>{e&&(document.getElementById(e)||console.error(o))},[o,e]),null},ve="DialogDescriptionWarning",ye=({contentRef:e,descriptionId:t})=>{const a=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${G(ve).contentName}}.`;return s.useEffect(()=>{var r;const n=(r=e.current)==null?void 0:r.getAttribute("aria-describedby");t&&n&&(document.getElementById(t)||console.warn(a))},[a,e,t]),null},Ce=P,Re=A,V=w,H=T,z=F,B=W,Ne=k;const Ae=Ce,he=Re,Z=s.forwardRef(({className:e,...t},o)=>i.jsx(V,{ref:o,className:p("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));Z.displayName=V.displayName;const Ee=s.forwardRef(({className:e,children:t,...o},a)=>i.jsxs(he,{children:[i.jsx(Z,{}),i.jsxs(H,{ref:a,className:p("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...o,children:[t,i.jsxs(Ne,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-accent data-[state=open]:text-muted-foreground hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[i.jsx(ne,{className:"h-4 w-4"}),i.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Ee.displayName=H.displayName;const _e=({className:e,...t})=>i.jsx("div",{className:p("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});_e.displayName="DialogHeader";const je=({className:e,...t})=>i.jsx("div",{className:p("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});je.displayName="DialogFooter";const be=s.forwardRef(({className:e,...t},o)=>i.jsx(z,{ref:o,className:p("text-lg font-semibold leading-none tracking-tight",e),...t}));be.displayName=z.displayName;const Pe=s.forwardRef(({className:e,...t},o)=>i.jsx(B,{ref:o,className:p("text-sm text-muted-foreground",e),...t}));Pe.displayName=B.displayName;export{H as C,Ae as D,V as O,Re as P,Ce as R,Ee as a,_e as b,be as c,Pe as d,je as e};
 
1
+ import{r as s,j as i,G as Z,l as K,I as R,P as N,M as Q,k as D,n as x,p as U,m as h,N as X,O as Y,Q as J,S as ee,T as te,aa as oe,X as ne,q as p}from"./index-CKAClQ2e.js";function ae(e){const t=re(e),o=s.forwardRef((a,n)=>{const{children:r,...l}=a,c=s.Children.toArray(r),d=c.find(ie);if(d){const u=d.props.children,m=c.map(v=>v===d?s.Children.count(u)>1?s.Children.only(null):s.isValidElement(u)?u.props.children:null:v);return i.jsx(t,{...l,ref:n,children:s.isValidElement(u)?s.cloneElement(u,void 0,m):null})}return i.jsx(t,{...l,ref:n,children:r})});return o.displayName=`${e}.Slot`,o}function re(e){const t=s.forwardRef((o,a)=>{const{children:n,...r}=o;if(s.isValidElement(n)){const l=ce(n),c=le(r,n.props);return n.type!==s.Fragment&&(c.ref=a?Z(a,l):l),s.cloneElement(n,c)}return s.Children.count(n)>1?s.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var se=Symbol("radix.slottable");function ie(e){return s.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===se}function le(e,t){const o={...t};for(const a in t){const n=e[a],r=t[a];/^on[A-Z]/.test(a)?n&&r?o[a]=(...c)=>{const d=r(...c);return n(...c),d}:n&&(o[a]=n):a==="style"?o[a]={...n,...r}:a==="className"&&(o[a]=[n,r].filter(Boolean).join(" "))}return{...e,...o}}function ce(e){var a,n;let t=(a=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:a.get,o=t&&"isReactWarning"in t&&t.isReactWarning;return o?e.ref:(t=(n=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:n.get,o=t&&"isReactWarning"in t&&t.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}var C="Dialog",[b]=U(C),[de,f]=b(C),O=e=>{const{__scopeDialog:t,children:o,open:a,defaultOpen:n,onOpenChange:r,modal:l=!0}=e,c=s.useRef(null),d=s.useRef(null),[u,m]=K({prop:a,defaultProp:n??!1,onChange:r,caller:C});return i.jsx(de,{scope:t,triggerRef:c,contentRef:d,contentId:R(),titleId:R(),descriptionId:R(),open:u,onOpenChange:m,onOpenToggle:s.useCallback(()=>m(v=>!v),[m]),modal:l,children:o})};O.displayName=C;var P="DialogTrigger",ue=s.forwardRef((e,t)=>{const{__scopeDialog:o,...a}=e,n=f(P,o),r=h(t,n.triggerRef);return i.jsx(D.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":j(n.open),...a,ref:r,onClick:x(e.onClick,n.onOpenToggle)})});ue.displayName=P;var E="DialogPortal",[fe,I]=b(E,{forceMount:void 0}),w=e=>{const{__scopeDialog:t,forceMount:o,children:a,container:n}=e,r=f(E,t);return i.jsx(fe,{scope:t,forceMount:o,children:s.Children.map(a,l=>i.jsx(N,{present:o||r.open,children:i.jsx(Q,{asChild:!0,container:n,children:l})}))})};w.displayName=E;var y="DialogOverlay",A=s.forwardRef((e,t)=>{const o=I(y,e.__scopeDialog),{forceMount:a=o.forceMount,...n}=e,r=f(y,e.__scopeDialog);return r.modal?i.jsx(N,{present:a||r.open,children:i.jsx(pe,{...n,ref:t})}):null});A.displayName=y;var ge=ae("DialogOverlay.RemoveScroll"),pe=s.forwardRef((e,t)=>{const{__scopeDialog:o,...a}=e,n=f(y,o);return i.jsx(Y,{as:ge,allowPinchZoom:!0,shards:[n.contentRef],children:i.jsx(D.div,{"data-state":j(n.open),...a,ref:t,style:{pointerEvents:"auto",...a.style}})})}),g="DialogContent",T=s.forwardRef((e,t)=>{const o=I(g,e.__scopeDialog),{forceMount:a=o.forceMount,...n}=e,r=f(g,e.__scopeDialog);return i.jsx(N,{present:a||r.open,children:r.modal?i.jsx(me,{...n,ref:t}):i.jsx(xe,{...n,ref:t})})});T.displayName=g;var me=s.forwardRef((e,t)=>{const o=f(g,e.__scopeDialog),a=s.useRef(null),n=h(t,o.contentRef,a);return s.useEffect(()=>{const r=a.current;if(r)return X(r)},[]),i.jsx(S,{...e,ref:n,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:x(e.onCloseAutoFocus,r=>{var l;r.preventDefault(),(l=o.triggerRef.current)==null||l.focus()}),onPointerDownOutside:x(e.onPointerDownOutside,r=>{const l=r.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0;(l.button===2||c)&&r.preventDefault()}),onFocusOutside:x(e.onFocusOutside,r=>r.preventDefault())})}),xe=s.forwardRef((e,t)=>{const o=f(g,e.__scopeDialog),a=s.useRef(!1),n=s.useRef(!1);return i.jsx(S,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:r=>{var l,c;(l=e.onCloseAutoFocus)==null||l.call(e,r),r.defaultPrevented||(a.current||(c=o.triggerRef.current)==null||c.focus(),r.preventDefault()),a.current=!1,n.current=!1},onInteractOutside:r=>{var d,u;(d=e.onInteractOutside)==null||d.call(e,r),r.defaultPrevented||(a.current=!0,r.detail.originalEvent.type==="pointerdown"&&(n.current=!0));const l=r.target;((u=o.triggerRef.current)==null?void 0:u.contains(l))&&r.preventDefault(),r.detail.originalEvent.type==="focusin"&&n.current&&r.preventDefault()}})}),S=s.forwardRef((e,t)=>{const{__scopeDialog:o,trapFocus:a,onOpenAutoFocus:n,onCloseAutoFocus:r,...l}=e,c=f(g,o),d=s.useRef(null),u=h(t,d);return J(),i.jsxs(i.Fragment,{children:[i.jsx(ee,{asChild:!0,loop:!0,trapped:a,onMountAutoFocus:n,onUnmountAutoFocus:r,children:i.jsx(te,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":j(c.open),...l,ref:u,onDismiss:()=>c.onOpenChange(!1)})}),i.jsxs(i.Fragment,{children:[i.jsx(De,{titleId:c.titleId}),i.jsx(ye,{contentRef:d,descriptionId:c.descriptionId})]})]})}),_="DialogTitle",M=s.forwardRef((e,t)=>{const{__scopeDialog:o,...a}=e,n=f(_,o);return i.jsx(D.h2,{id:n.titleId,...a,ref:t})});M.displayName=_;var F="DialogDescription",W=s.forwardRef((e,t)=>{const{__scopeDialog:o,...a}=e,n=f(F,o);return i.jsx(D.p,{id:n.descriptionId,...a,ref:t})});W.displayName=F;var $="DialogClose",k=s.forwardRef((e,t)=>{const{__scopeDialog:o,...a}=e,n=f($,o);return i.jsx(D.button,{type:"button",...a,ref:t,onClick:x(e.onClick,()=>n.onOpenChange(!1))})});k.displayName=$;function j(e){return e?"open":"closed"}var L="DialogTitleWarning",[Ie,G]=oe(L,{contentName:g,titleName:_,docsSlug:"dialog"}),De=({titleId:e})=>{const t=G(L),o=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
2
 
3
  If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
4
 
5
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return s.useEffect(()=>{e&&(document.getElementById(e)||console.error(o))},[o,e]),null},ve="DialogDescriptionWarning",ye=({contentRef:e,descriptionId:t})=>{const a=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${G(ve).contentName}}.`;return s.useEffect(()=>{var r;const n=(r=e.current)==null?void 0:r.getAttribute("aria-describedby");t&&n&&(document.getElementById(t)||console.warn(a))},[a,e,t]),null},Ce=O,Re=w,V=A,H=T,B=M,z=W,Ne=k;const we=Ce,he=Re,q=s.forwardRef(({className:e,...t},o)=>i.jsx(V,{ref:o,className:p("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));q.displayName=V.displayName;const Ee=s.forwardRef(({className:e,children:t,...o},a)=>i.jsxs(he,{children:[i.jsx(q,{}),i.jsxs(H,{ref:a,className:p("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...o,children:[t,i.jsxs(Ne,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-accent data-[state=open]:text-muted-foreground hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[i.jsx(ne,{className:"h-4 w-4"}),i.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Ee.displayName=H.displayName;const _e=({className:e,...t})=>i.jsx("div",{className:p("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});_e.displayName="DialogHeader";const je=({className:e,...t})=>i.jsx("div",{className:p("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});je.displayName="DialogFooter";const be=s.forwardRef(({className:e,...t},o)=>i.jsx(B,{ref:o,className:p("text-lg font-semibold leading-none tracking-tight",e),...t}));be.displayName=B.displayName;const Oe=s.forwardRef(({className:e,...t},o)=>i.jsx(z,{ref:o,className:p("text-sm text-muted-foreground",e),...t}));Oe.displayName=z.displayName;export{H as C,we as D,V as O,Re as P,Ce as R,Ee as a,_e as b,be as c,Oe as d,je as e};
assets/github-BsrYosCi.js ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ import{g as c}from"./index-CKAClQ2e.js";/**
2
+ * @license lucide-react v0.462.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 e=c("Github",[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]]);export{e as G};
assets/hover-card-DZ5zXJ4P.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{r as n,l as k,j as c,H as F,J as I,k as U,n as l,K as T,P as O,M as $,p as W,m as z,T as B,U as K,V as G,q as V}from"./index-CKAClQ2e.js";var E,g="HoverCard",[y]=W(g,[T]),w=T(),[q,S]=y(g),N=e=>{const{__scopeHoverCard:o,children:r,open:s,defaultOpen:a,onOpenChange:i,openDelay:f=700,closeDelay:v=300}=e,d=w(o),C=n.useRef(0),u=n.useRef(0),h=n.useRef(!1),p=n.useRef(!1),[m,t]=k({prop:s,defaultProp:a??!1,onChange:i,caller:g}),x=n.useCallback(()=>{clearTimeout(u.current),C.current=window.setTimeout(()=>t(!0),f)},[f,t]),P=n.useCallback(()=>{clearTimeout(C.current),!h.current&&!p.current&&(u.current=window.setTimeout(()=>t(!1),v))},[v,t]),M=n.useCallback(()=>t(!1),[t]);return n.useEffect(()=>()=>{clearTimeout(C.current),clearTimeout(u.current)},[]),c.jsx(q,{scope:o,open:m,onOpenChange:t,onOpen:x,onClose:P,onDismiss:M,hasSelectionRef:h,isPointerDownOnContentRef:p,children:c.jsx(F,{...d,children:r})})};N.displayName=g;var _="HoverCardTrigger",D=n.forwardRef((e,o)=>{const{__scopeHoverCard:r,...s}=e,a=S(_,r),i=w(r);return c.jsx(I,{asChild:!0,...i,children:c.jsx(U.a,{"data-state":a.open?"open":"closed",...s,ref:o,onPointerEnter:l(e.onPointerEnter,b(a.onOpen)),onPointerLeave:l(e.onPointerLeave,b(a.onClose)),onFocus:l(e.onFocus,a.onOpen),onBlur:l(e.onBlur,a.onClose),onTouchStart:l(e.onTouchStart,f=>f.preventDefault())})})});D.displayName=_;var H="HoverCardPortal",[J,Q]=y(H,{forceMount:void 0}),j=e=>{const{__scopeHoverCard:o,forceMount:r,children:s,container:a}=e,i=S(H,o);return c.jsx(J,{scope:o,forceMount:r,children:c.jsx(O,{present:r||i.open,children:c.jsx($,{asChild:!0,container:a,children:s})})})};j.displayName=H;var R="HoverCardContent",A=n.forwardRef((e,o)=>{const r=Q(R,e.__scopeHoverCard),{forceMount:s=r.forceMount,...a}=e,i=S(R,e.__scopeHoverCard);return c.jsx(O,{present:s||i.open,children:c.jsx(X,{"data-state":i.open?"open":"closed",...a,onPointerEnter:l(e.onPointerEnter,b(i.onOpen)),onPointerLeave:l(e.onPointerLeave,b(i.onClose)),ref:o})})});A.displayName=R;var X=n.forwardRef((e,o)=>{const{__scopeHoverCard:r,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:i,onInteractOutside:f,...v}=e,d=S(R,r),C=w(r),u=n.useRef(null),h=z(o,u),[p,m]=n.useState(!1);return n.useEffect(()=>{if(p){const t=document.body;return E=t.style.userSelect||t.style.webkitUserSelect,t.style.userSelect="none",t.style.webkitUserSelect="none",()=>{t.style.userSelect=E,t.style.webkitUserSelect=E}}},[p]),n.useEffect(()=>{if(u.current){const t=()=>{m(!1),d.isPointerDownOnContentRef.current=!1,setTimeout(()=>{var P;((P=document.getSelection())==null?void 0:P.toString())!==""&&(d.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",t),()=>{document.removeEventListener("pointerup",t),d.hasSelectionRef.current=!1,d.isPointerDownOnContentRef.current=!1}}},[d.isPointerDownOnContentRef,d.hasSelectionRef]),n.useEffect(()=>{u.current&&ee(u.current).forEach(x=>x.setAttribute("tabindex","-1"))}),c.jsx(B,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:f,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:l(i,t=>{t.preventDefault()}),onDismiss:d.onDismiss,children:c.jsx(K,{...C,...v,onPointerDown:l(v.onPointerDown,t=>{t.currentTarget.contains(t.target)&&m(!0),d.hasSelectionRef.current=!1,d.isPointerDownOnContentRef.current=!0}),ref:h,style:{...v.style,userSelect:p?"text":void 0,WebkitUserSelect:p?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})}),Y="HoverCardArrow",Z=n.forwardRef((e,o)=>{const{__scopeHoverCard:r,...s}=e,a=w(r);return c.jsx(G,{...a,...s,ref:o})});Z.displayName=Y;function b(e){return o=>o.pointerType==="touch"?void 0:e()}function ee(e){const o=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:s=>s.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;r.nextNode();)o.push(r.currentNode);return o}var te=N,oe=D,re=j,L=A;const se=te,ce=oe,ne=n.forwardRef(({className:e,align:o="center",sideOffset:r=4,...s},a)=>c.jsx(re,{children:c.jsx(L,{ref:a,align:o,sideOffset:r,className:V("z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...s})}));ne.displayName=L.displayName;export{se as H,ce as a,ne as b};