nielsr HF Staff commited on
Commit
f59f133
·
verified ·
1 Parent(s): c9d2c73

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-BF3ZE1Ou.js → AiDeadlinesView-CcuFzMVp.js} +1 -1
  2. assets/{AuthorDetailView-DuFzT3cS.js → AuthorDetailView-BalTJwLb.js} +1 -1
  3. assets/BenchmarkDetailView-BPaHiDWj.js +0 -2
  4. assets/BenchmarkDetailView-DS2Mrskn.css +1 -0
  5. assets/BenchmarkDetailView-DSQ_qbDf.js +2 -0
  6. assets/{BenchmarkTrendSparkline-BaFH-Xk5.js → BenchmarkTrendSparkline-CemWtN8L.js} +1 -1
  7. assets/{ChatMessage-CsXFCs8i.js → ChatMessage-CY41UkDl.js} +1 -1
  8. assets/{ChatView-exilf4p2.js → ChatView-DEbm5NTT.js} +4 -4
  9. assets/{ConferenceDetailView-CxXP2hDY.js → ConferenceDetailView-DUkLzxhe.js} +1 -1
  10. assets/{ConferenceTaskView-DTXm7nox.js → ConferenceTaskView-5T634INZ.js} +1 -1
  11. assets/{ConferencesIndexView-Ai9jUDcL.js → ConferencesIndexView-CYZZr65z.js} +1 -1
  12. assets/{ContributionsPage-uJ9KKckR.js → ContributionsPage-c4YZ8qaS.js} +1 -1
  13. assets/{CronDashboard-BGf2xxv6.js → CronDashboard-D5xcrkix.js} +1 -1
  14. assets/{ExternalSourceEvalBadge-CrNqFzv-.js → ExternalSourceEvalBadge-C2oFJsOX.js} +1 -1
  15. assets/ExternalSourceEvalBadge-DXfuqNnO.css +1 -0
  16. assets/{FeedView-Ckhi5XA2.js → FeedView-D-5_v1-m.js} +1 -1
  17. assets/{FrameworksIndexView-C8GZQYF_.js → FrameworksIndexView-Pda1JTNy.js} +1 -1
  18. assets/{LatexTitle-CqLY2qFp.js → LatexTitle-DhaqzMPt.js} +1 -1
  19. assets/{MarkdownText-B_dvaNfN.js → MarkdownText-CnXxe_CG.js} +1 -1
  20. assets/{MethodDetailView-XKPkm91i.js → MethodDetailView-Bld6Pqgc.js} +1 -1
  21. assets/{MethodsIndexView-C16245Ew.js → MethodsIndexView-DykiOy0N.js} +1 -1
  22. assets/{NotFound-W25aHhEQ.js → NotFound-548Mtue8.js} +1 -1
  23. assets/OrganizationDetailView-BVPFm-oR.js +1 -0
  24. assets/OrganizationDetailView-BiECW6bI.js +0 -1
  25. assets/{OrganizationPaperFeed-BKxoVONj.js → OrganizationPaperFeed-BUyZ0w23.js} +1 -1
  26. assets/OrganizationTaskView-7YycaNmf.js +0 -1
  27. assets/OrganizationTaskView-DyBI7n3E.js +1 -0
  28. assets/{OrganizationsIndexView-Zk-3iqcg.js → OrganizationsIndexView-UN_8x2A9.js} +1 -1
  29. assets/PaperDetailView-C8MLtf05.js +0 -0
  30. assets/PaperDetailView-Co_a-Bpv.js +0 -0
  31. assets/{PaperFeedFilters-vnoti5eB.js → PaperFeedFilters-DC6dQXvU.js} +1 -1
  32. assets/{PaperPreviewLink-BrlkKB05.js → PaperPreviewLink-DyP6osoH.js} +1 -1
  33. assets/{PapersListView-CW3V6tES.js → PapersListView-VUKbGSmy.js} +1 -1
  34. assets/{SavedPapersView-DvrP8JZD.js → SavedPapersView-u-XNvlO6.js} +1 -1
  35. assets/{SearchOverlay-DgRrJ2zx.js → SearchOverlay-CTTBwlHC.js} +1 -1
  36. assets/{SettingsView-C7bMPoNs.js → SettingsView-Cvm3041a.js} +1 -1
  37. assets/{SharedChatView-Dm1tLTjl.js → SharedChatView-BkB_JCFN.js} +1 -1
  38. assets/{SignInToEditDialog-eRf-3xm2.js → SignInToEditDialog-CAja351o.js} +1 -1
  39. assets/SubmissionsDashboard-HTFCR6W8.js +6 -0
  40. assets/SubmissionsDashboard-ZmQAIt-P.js +0 -6
  41. assets/{SubmitView-BBHau2HD.js → SubmitView-rBMOkIq3.js} +1 -1
  42. assets/{TagBrowseView-DZGSQG0I.js → TagBrowseView-DtRgDRtT.js} +1 -1
  43. assets/{TagsIndexView-bSwqRVl_.js → TagsIndexView-BUE8Nu6n.js} +1 -1
  44. assets/{TaxonomySuggestionTile-DEtB0B70.js → TaxonomySuggestionTile-CvtfLtQL.js} +1 -1
  45. assets/{TrendsView-Hknym7NC.js → TrendsView-P28q3Sbj.js} +1 -1
  46. assets/{alert-BCeSLEYS.js → alert-B5Pni1K6.js} +1 -1
  47. assets/{button-DR_Fc3Hk.js → button-Oqi1rHf_.js} +1 -1
  48. assets/{chatSessions-L9GbPmnt.js → chatSessions-Roa-dbFO.js} +1 -1
  49. assets/{chevron-down-Com83sGm.js → chevron-down-CzkIrRvq.js} +1 -1
  50. assets/{codexAddEvals-DMs98_B2.js → codexAddEvals-CGZnlQWY.js} +1 -1
assets/{AiDeadlinesView-BF3ZE1Ou.js → AiDeadlinesView-CcuFzMVp.js} RENAMED
@@ -1,3 +1,3 @@
1
- import{r as x,j as t,b as E}from"./index-eBKbcCso.js";import{u as A}from"./useQuery-DIrXGOA7.js";import{S as B}from"./switch-DOYXT2Vb.js";import{S as U}from"./skeleton-Cd-jfjiE.js";import{A as W,a as O}from"./alert-BCeSLEYS.js";import{D as V,a as P,b as G,c as Y,d as K}from"./dialog-DhCB6EKj.js";import"./useBaseQuery-CZIeK7IO.js";import"./index-CIicyhwW.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)})})]})},me=()=>{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{me as default};
 
1
+ import{r as x,j as t,b as E}from"./index-B2CsYqS1.js";import{u as A}from"./useQuery-D09nn2D4.js";import{S as B}from"./switch-Wl4WeaN5.js";import{S as U}from"./skeleton-EzEzG6PT.js";import{A as W,a as O}from"./alert-B5Pni1K6.js";import{D as V,a as P,b as G,c as Y,d as K}from"./dialog-KRtMu_IA.js";import"./useBaseQuery-DCY5lvEf.js";import"./index-rF6L_V4R.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)})})]})},me=()=>{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{me as default};
assets/{AuthorDetailView-DuFzT3cS.js → AuthorDetailView-BalTJwLb.js} RENAMED
@@ -1 +1 @@
1
- import{e as m,j as e,L as g,b as h}from"./index-eBKbcCso.js";import{u as d}from"./useQuery-DIrXGOA7.js";import{S as c}from"./skeleton-Cd-jfjiE.js";import x from"./NotFound-W25aHhEQ.js";import"./useBaseQuery-CZIeK7IO.js";const _=()=>{var i,l,n,o,u;const{authorId:a}=m(),r=d({queryKey:["author",a],queryFn:()=>h.getAuthor(a),enabled:!!a}),t=d({queryKey:["author-papers",a],queryFn:()=>h.getAuthorPapers(a,{page:1,page_size:20}),enabled:!!a});return((i=r.error)==null?void 0:i.status)===404?e.jsx(x,{}):e.jsxs("div",{className:"page",children:[e.jsx("p",{className:"sidebar-label",children:"Author"}),e.jsx("h1",{className:"feed-title",children:((l=r.data)==null?void 0:l.full_name)??e.jsx(c,{className:"h-10 w-64 inline-block"})}),((n=r.data)==null?void 0:n.hf_username)&&e.jsxs("a",{href:`https://huggingface.co/${r.data.hf_username}`,target:"_blank",rel:"noopener noreferrer",children:["@",r.data.hf_username," on Hugging Face"]}),e.jsxs("section",{style:{marginTop:40},"aria-labelledby":"author-papers-heading",children:[e.jsx("h2",{id:"author-papers-heading",children:"Research papers"}),t.isLoading&&e.jsx(c,{className:"h-24 w-full mt-4"}),((o=t.data)==null?void 0:o.results.length)===0&&e.jsx("p",{children:"No public papers are available."}),e.jsx("ol",{className:"paper-list",children:(u=t.data)==null?void 0:u.results.map(s=>{const p=s.source==="external"?String(s.id):s.arxiv_id;return e.jsx("li",{children:e.jsx(g,{to:`/paper/${p}`,children:s.title})},s.id)})})]})]})};export{_ as default};
 
1
+ import{e as m,j as e,L as g,b as h}from"./index-B2CsYqS1.js";import{u as d}from"./useQuery-D09nn2D4.js";import{S as c}from"./skeleton-EzEzG6PT.js";import x from"./NotFound-548Mtue8.js";import"./useBaseQuery-DCY5lvEf.js";const _=()=>{var i,l,n,o,u;const{authorId:a}=m(),r=d({queryKey:["author",a],queryFn:()=>h.getAuthor(a),enabled:!!a}),t=d({queryKey:["author-papers",a],queryFn:()=>h.getAuthorPapers(a,{page:1,page_size:20}),enabled:!!a});return((i=r.error)==null?void 0:i.status)===404?e.jsx(x,{}):e.jsxs("div",{className:"page",children:[e.jsx("p",{className:"sidebar-label",children:"Author"}),e.jsx("h1",{className:"feed-title",children:((l=r.data)==null?void 0:l.full_name)??e.jsx(c,{className:"h-10 w-64 inline-block"})}),((n=r.data)==null?void 0:n.hf_username)&&e.jsxs("a",{href:`https://huggingface.co/${r.data.hf_username}`,target:"_blank",rel:"noopener noreferrer",children:["@",r.data.hf_username," on Hugging Face"]}),e.jsxs("section",{style:{marginTop:40},"aria-labelledby":"author-papers-heading",children:[e.jsx("h2",{id:"author-papers-heading",children:"Research papers"}),t.isLoading&&e.jsx(c,{className:"h-24 w-full mt-4"}),((o=t.data)==null?void 0:o.results.length)===0&&e.jsx("p",{children:"No public papers are available."}),e.jsx("ol",{className:"paper-list",children:(u=t.data)==null?void 0:u.results.map(s=>{const p=s.source==="external"?String(s.id):s.arxiv_id;return e.jsx("li",{children:e.jsx(g,{to:`/paper/${p}`,children:s.title})},s.id)})})]})]})};export{_ as default};
assets/BenchmarkDetailView-BPaHiDWj.js DELETED
@@ -1,2 +0,0 @@
1
- import{e as vt,a as jt,T as _t,r as w,j as n,L as me,_ as ne,g as kt,u as St,b as ee}from"./index-eBKbcCso.js";import{u as te}from"./useQuery-DIrXGOA7.js";import{S as xe}from"./skeleton-Cd-jfjiE.js";import{S as Je}from"./switch-DOYXT2Vb.js";import{A as Ct,a as Et}from"./alert-BCeSLEYS.js";import{L as ye}from"./LatexTitle-CqLY2qFp.js";import{I as Nt}from"./components-D8Z2f6Zw.js";import{C as Rt,E as Tt}from"./ExternalSourceEvalBadge-CrNqFzv-.js";import{B as $t}from"./BenchmarkTrendSparkline-BaFH-Xk5.js";import"./useBaseQuery-CZIeK7IO.js";import"./index-CIicyhwW.js";import"./katex.min-BSBacQyE.js";import"./transform-DM1_5UAz.js";import"./hover-card-CdeSv7Gc.js";function Mt(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"),a=r.createElement("a");return r.head.appendChild(s),r.body.appendChild(a),t&&(s.href=t),a.href=e,a.href}const Ft=(()=>{let e=0;const t=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(e+=1,`u${t()}${e}`)})();function q(e){const t=[];for(let r=0,s=e.length;r<s;r++)t.push(e[r]);return t}let re=null;function dt(e={}){return re||(e.includeStyleProperties?(re=e.includeStyleProperties,re):(re=q(window.getComputedStyle(document.documentElement)),re))}function we(e,t){const s=(e.ownerDocument.defaultView||window).getComputedStyle(e).getPropertyValue(t);return s?parseFloat(s.replace("px","")):0}function Lt(e){const t=we(e,"border-left-width"),r=we(e,"border-right-width");return e.clientWidth+t+r}function It(e){const t=we(e,"border-top-width"),r=we(e,"border-bottom-width");return e.clientHeight+t+r}function ut(e,t={}){const r=t.width||Lt(e),s=t.height||It(e);return{width:r,height:s}}function Pt(){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 D=16384;function At(e){(e.width>D||e.height>D)&&(e.width>D&&e.height>D?e.width>e.height?(e.height*=D/e.width,e.width=D):(e.width*=D/e.height,e.height=D):e.width>D?(e.height*=D/e.width,e.width=D):(e.width*=D/e.height,e.height=D))}function Dt(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]),a=s.length,i=new Uint8Array(a);for(let c=0;c<a;c+=1)i[c]=s.charCodeAt(c);r(new Blob([i],{type:t.type?t.type:"image/png"}))})}function ve(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 Bt(e){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then(t=>`data:image/svg+xml;charset=utf-8,${t}`)}async function Ht(e,t,r){const s="http://www.w3.org/2000/svg",a=document.createElementNS(s,"svg"),i=document.createElementNS(s,"foreignObject");return a.setAttribute("width",`${t}`),a.setAttribute("height",`${r}`),a.setAttribute("viewBox",`0 0 ${t} ${r}`),i.setAttribute("width","100%"),i.setAttribute("height","100%"),i.setAttribute("x","0"),i.setAttribute("y","0"),i.setAttribute("externalResourcesRequired","true"),a.appendChild(i),i.appendChild(e),Bt(a)}const P=(e,t)=>{if(e instanceof t)return!0;const r=Object.getPrototypeOf(e);return r===null?!1:r.constructor.name===t.name||P(r,t)};function Vt(e){const t=e.getPropertyValue("content");return`${e.cssText} content: '${t.replace(/'|"/g,"")}';`}function Ot(e,t){return dt(t).map(r=>{const s=e.getPropertyValue(r),a=e.getPropertyPriority(r);return`${r}: ${s}${a?" !important":""};`}).join(" ")}function Ut(e,t,r,s){const a=`.${e}:${t}`,i=r.cssText?Vt(r):Ot(r,s);return document.createTextNode(`${a}{${i}}`)}function Ze(e,t,r,s){const a=window.getComputedStyle(e,r),i=a.getPropertyValue("content");if(i===""||i==="none")return;const c=Ft();try{t.className=`${t.className} ${c}`}catch{return}const l=document.createElement("style");l.appendChild(Ut(c,r,a,s)),t.appendChild(l)}function Wt(e,t,r){Ze(e,t,":before",r),Ze(e,t,":after",r)}const et="application/font-woff",tt="image/jpeg",qt={woff:et,woff2:et,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:tt,jpeg:tt,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function zt(e){const t=/\.([^./]*?)$/g.exec(e);return t?t[1]:""}function $e(e){const t=zt(e).toLowerCase();return qt[t]||""}function Gt(e){return e.split(/,/)[1]}function Re(e){return e.search(/^(data:)/)!==-1}function Kt(e,t){return`data:${t};base64,${e}`}async function mt(e,t,r){const s=await fetch(e,t);if(s.status===404)throw new Error(`Resource "${s.url}" not found`);const a=await s.blob();return new Promise((i,c)=>{const l=new FileReader;l.onerror=c,l.onloadend=()=>{try{i(r({res:s,result:l.result}))}catch(u){c(u)}},l.readAsDataURL(a)})}const Ce={};function Qt(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 Me(e,t,r){const s=Qt(e,t,r.includeQueryParams);if(Ce[s]!=null)return Ce[s];r.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+new Date().getTime());let a;try{const i=await mt(e,r.fetchRequestInit,({res:c,result:l})=>(t||(t=c.headers.get("Content-Type")||""),Gt(l)));a=Kt(i,t)}catch(i){a=r.imagePlaceholder||"";let c=`Failed to fetch resource: ${e}`;i&&(c=typeof i=="string"?i:i.message),c&&console.warn(c)}return Ce[s]=a,a}async function Xt(e){const t=e.toDataURL();return t==="data:,"?e.cloneNode(!1):ve(t)}async function Yt(e,t){if(e.currentSrc){const i=document.createElement("canvas"),c=i.getContext("2d");i.width=e.clientWidth,i.height=e.clientHeight,c==null||c.drawImage(e,0,0,i.width,i.height);const l=i.toDataURL();return ve(l)}const r=e.poster,s=$e(r),a=await Me(r,s,t);return ve(a)}async function Jt(e,t){var r;try{if(!((r=e==null?void 0:e.contentDocument)===null||r===void 0)&&r.body)return await je(e.contentDocument.body,t,!0)}catch{}return e.cloneNode(!1)}async function Zt(e,t){return P(e,HTMLCanvasElement)?Xt(e):P(e,HTMLVideoElement)?Yt(e,t):P(e,HTMLIFrameElement)?Jt(e,t):e.cloneNode(ht(e))}const er=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SLOT",ht=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SVG";async function tr(e,t,r){var s,a;if(ht(t))return t;let i=[];return er(e)&&e.assignedNodes?i=q(e.assignedNodes()):P(e,HTMLIFrameElement)&&(!((s=e.contentDocument)===null||s===void 0)&&s.body)?i=q(e.contentDocument.body.childNodes):i=q(((a=e.shadowRoot)!==null&&a!==void 0?a:e).childNodes),i.length===0||P(e,HTMLVideoElement)||await i.reduce((c,l)=>c.then(()=>je(l,r)).then(u=>{u&&t.appendChild(u)}),Promise.resolve()),t}function rr(e,t,r){const s=t.style;if(!s)return;const a=window.getComputedStyle(e);a.cssText?(s.cssText=a.cssText,s.transformOrigin=a.transformOrigin):dt(r).forEach(i=>{let c=a.getPropertyValue(i);i==="font-size"&&c.endsWith("px")&&(c=`${Math.floor(parseFloat(c.substring(0,c.length-2)))-.1}px`),P(e,HTMLIFrameElement)&&i==="display"&&c==="inline"&&(c="block"),i==="d"&&t.getAttribute("d")&&(c=`path(${t.getAttribute("d")})`),s.setProperty(i,c,a.getPropertyPriority(i))})}function sr(e,t){P(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),P(e,HTMLInputElement)&&t.setAttribute("value",e.value)}function nr(e,t){if(P(e,HTMLSelectElement)){const r=t,s=Array.from(r.children).find(a=>e.value===a.getAttribute("value"));s&&s.setAttribute("selected","")}}function ar(e,t,r){return P(t,Element)&&(rr(e,t,r),Wt(e,t,r),sr(e,t),nr(e,t)),t}async function ir(e,t){const r=e.querySelectorAll?e.querySelectorAll("use"):[];if(r.length===0)return e;const s={};for(let i=0;i<r.length;i++){const l=r[i].getAttribute("xlink:href");if(l){const u=e.querySelector(l),p=document.querySelector(l);!u&&p&&!s[l]&&(s[l]=await je(p,t,!0))}}const a=Object.values(s);if(a.length){const i="http://www.w3.org/1999/xhtml",c=document.createElementNS(i,"svg");c.setAttribute("xmlns",i),c.style.position="absolute",c.style.width="0",c.style.height="0",c.style.overflow="hidden",c.style.display="none";const l=document.createElementNS(i,"defs");c.appendChild(l);for(let u=0;u<a.length;u++)l.appendChild(a[u]);e.appendChild(c)}return e}async function je(e,t,r){return!r&&t.filter&&!t.filter(e)?null:Promise.resolve(e).then(s=>Zt(s,t)).then(s=>tr(e,s,t)).then(s=>ar(e,s,t)).then(s=>ir(s,t))}const ft=/url\((['"]?)([^'"]+?)\1\)/g,cr=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,lr=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function or(e){const t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}function dr(e){const t=[];return e.replace(ft,(r,s,a)=>(t.push(a),r)),t.filter(r=>!Re(r))}async function ur(e,t,r,s,a){try{const i=r?Mt(t,r):t,c=$e(t);let l;return a||(l=await Me(i,c,s)),e.replace(or(t),`$1${l}$3`)}catch{}return e}function mr(e,{preferredFontFormat:t}){return t?e.replace(lr,r=>{for(;;){const[s,,a]=cr.exec(r)||[];if(!a)return"";if(a===t)return`src: ${s};`}}):e}function pt(e){return e.search(ft)!==-1}async function gt(e,t,r){if(!pt(e))return e;const s=mr(e,r);return dr(s).reduce((i,c)=>i.then(l=>ur(l,c,t,r)),Promise.resolve(s))}async function se(e,t,r){var s;const a=(s=t.style)===null||s===void 0?void 0:s.getPropertyValue(e);if(a){const i=await gt(a,null,r);return t.style.setProperty(e,i,t.style.getPropertyPriority(e)),!0}return!1}async function hr(e,t){await se("background",e,t)||await se("background-image",e,t),await se("mask",e,t)||await se("-webkit-mask",e,t)||await se("mask-image",e,t)||await se("-webkit-mask-image",e,t)}async function fr(e,t){const r=P(e,HTMLImageElement);if(!(r&&!Re(e.src))&&!(P(e,SVGImageElement)&&!Re(e.href.baseVal)))return;const s=r?e.src:e.href.baseVal,a=await Me(s,$e(s),t);await new Promise((i,c)=>{e.onload=i,e.onerror=t.onImageErrorHandler?(...u)=>{try{i(t.onImageErrorHandler(...u))}catch(p){c(p)}}:c;const l=e;l.decode&&(l.decode=i),l.loading==="lazy"&&(l.loading="eager"),r?(e.srcset="",e.src=a):e.href.baseVal=a})}async function pr(e,t){const s=q(e.childNodes).map(a=>xt(a,t));await Promise.all(s).then(()=>e)}async function xt(e,t){P(e,Element)&&(await hr(e,t),await fr(e,t),await pr(e,t))}function gr(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(a=>{r[a]=s[a]}),e}const rt={};async function st(e){let t=rt[e];if(t!=null)return t;const s=await(await fetch(e)).text();return t={url:e,cssText:s},rt[e]=t,t}async function nt(e,t){let r=e.cssText;const s=/url\(["']?([^"')]+)["']?\)/g,i=(r.match(/url\([^)]+\)/g)||[]).map(async c=>{let l=c.replace(s,"$1");return l.startsWith("https://")||(l=new URL(l,e.url).href),mt(l,t.fetchRequestInit,({result:u})=>(r=r.replace(c,`url(${u})`),[c,u]))});return Promise.all(i).then(()=>r)}function at(e){if(e==null)return[];const t=[],r=/(\/\*[\s\S]*?\*\/)/gi;let s=e.replace(r,"");const a=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){const u=a.exec(s);if(u===null)break;t.push(u[0])}s=s.replace(a,"");const i=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,c="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})",l=new RegExp(c,"gi");for(;;){let u=i.exec(s);if(u===null){if(u=l.exec(s),u===null)break;i.lastIndex=l.lastIndex}else l.lastIndex=i.lastIndex;t.push(u[0])}return t}async function xr(e,t){const r=[],s=[];return e.forEach(a=>{if("cssRules"in a)try{q(a.cssRules||[]).forEach((i,c)=>{if(i.type===CSSRule.IMPORT_RULE){let l=c+1;const u=i.href,p=st(u).then(f=>nt(f,t)).then(f=>at(f).forEach(y=>{try{a.insertRule(y,y.startsWith("@import")?l+=1:a.cssRules.length)}catch(x){console.error("Error inserting rule from remote css",{rule:y,error:x})}})).catch(f=>{console.error("Error loading remote css",f.toString())});s.push(p)}})}catch(i){const c=e.find(l=>l.href==null)||document.styleSheets[0];a.href!=null&&s.push(st(a.href).then(l=>nt(l,t)).then(l=>at(l).forEach(u=>{c.insertRule(u,c.cssRules.length)})).catch(l=>{console.error("Error loading remote stylesheet",l)})),console.error("Error inlining remote css file",i)}}),Promise.all(s).then(()=>(e.forEach(a=>{if("cssRules"in a)try{q(a.cssRules||[]).forEach(i=>{r.push(i)})}catch(i){console.error(`Error while reading CSS rules from ${a.href}`,i)}}),r))}function br(e){return e.filter(t=>t.type===CSSRule.FONT_FACE_RULE).filter(t=>pt(t.style.getPropertyValue("src")))}async function yr(e,t){if(e.ownerDocument==null)throw new Error("Provided element is not within a Document");const r=q(e.ownerDocument.styleSheets),s=await xr(r,t);return br(s)}function bt(e){return e.trim().replace(/["']/g,"")}function wr(e){const t=new Set;function r(s){(s.style.fontFamily||getComputedStyle(s).fontFamily).split(",").forEach(i=>{t.add(bt(i))}),Array.from(s.children).forEach(i=>{i instanceof HTMLElement&&r(i)})}return r(e),t}async function vr(e,t){const r=await yr(e,t),s=wr(e);return(await Promise.all(r.filter(i=>s.has(bt(i.style.fontFamily))).map(i=>{const c=i.parentStyleSheet?i.parentStyleSheet.href:null;return gt(i.cssText,c,t)}))).join(`
2
- `)}async function jr(e,t){const r=t.fontEmbedCSS!=null?t.fontEmbedCSS:t.skipFonts?null:await vr(e,t);if(r){const s=document.createElement("style"),a=document.createTextNode(r);s.appendChild(a),e.firstChild?e.insertBefore(s,e.firstChild):e.appendChild(s)}}async function _r(e,t={}){const{width:r,height:s}=ut(e,t),a=await je(e,t,!0);return await jr(a,t),await xt(a,t),gr(a,t),await Ht(a,r,s)}async function kr(e,t={}){const{width:r,height:s}=ut(e,t),a=await _r(e,t),i=await ve(a),c=document.createElement("canvas"),l=c.getContext("2d"),u=t.pixelRatio||Pt(),p=t.canvasWidth||r,f=t.canvasHeight||s;return c.width=p*u,c.height=f*u,t.skipAutoScale||At(c),c.style.width=`${p}`,c.style.height=`${f}`,t.backgroundColor&&(l.fillStyle=t.backgroundColor,l.fillRect(0,0,c.width,c.height)),l.drawImage(i,0,0,c.width,c.height),c}async function Sr(e,t={}){const r=await kr(e,t);return await Dt(r)}const Te="#ffffff";function Cr(){return typeof window>"u"?Te:window.getComputedStyle(document.documentElement).getPropertyValue("--bg-elevated").trim()||Te}function Er(e){if(typeof window>"u")return Te;const t=window.getComputedStyle(e).backgroundColor;return!t||t==="rgba(0, 0, 0, 0)"||t==="transparent"?Cr():t}async function Nr(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 Sr(e,{pixelRatio:2,cacheBust:!0,backgroundColor:Er(e)});if(!t)throw new Error("Failed to render screenshot.");await window.navigator.clipboard.write([new window.ClipboardItem({"image/png":t})])}function Rr(e,t,r){const s=t?(e??[]).filter(c=>c.task_id===t):e??[],a=s.filter(c=>c.is_open===!1),i=a.reduce((c,l)=>c?(l.best_rank??Number.POSITIVE_INFINITY)<(c.best_rank??Number.POSITIVE_INFINITY)?l:c:l,null);return{visible:r?s.filter(c=>c.is_open!==!1):s,hiddenClosed:a,topHiddenClosed:i}}const Tr=5;function $r(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 be(e,t){return e?n.jsx(ye,{title:e}):t||"—"}function it(e){const t=e.length===7?`${e}-01`:e,r=new Date(t).getTime();return Number.isFinite(r)?r:0}const Ee=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Ne(e){const t=new Date(e);return{year:t.getFullYear(),month:t.getMonth()}}function Mr(e,t){if(e===t){const{year:u,month:p}=Ne(e);return[{timestamp:new Date(u,p,1).getTime(),key:`${u}-${p}`,label:`${Ee[p]} ${u}`}]}const r=Ne(e),s=Ne(t);if(r.year===s.year){const u=s.month-r.month+1;let p=1;const f=12;u>f&&(p=Math.ceil(u/f));const y=[];for(let x=r.month;x<=s.month;x+=p)y.push({timestamp:new Date(r.year,x,1).getTime(),key:`${r.year}-${x}`,label:u<=3?`${Ee[x]} ${r.year}`:Ee[x]});return y}const a=s.year-r.year+1;let i=1;const c=12;a>c&&(i=Math.ceil(a/c));const l=[];for(let u=r.year;u<=s.year;u+=i)l.push({timestamp:new Date(u,0,1).getTime(),key:String(u),label:String(u)});return l}const Fr=({points:e,metric:t})=>{const r=St(),[s,a]=w.useState(null),i=880,c=320,l=60,u=30,p=40,f=50,y=e.map(o=>o.value),x=Math.min(...y),U=Math.max(...y)-x||1,ae=i-l-u,L=c-p-f,$=e.map(o=>it(o.date)),z=Math.min(...$),I=Math.max(...$),ie=I-z||1,Y=o=>z===I?l+ae/2:l+(o-z)/ie*ae,G=e.map((o,m)=>{const k=Y(it(o.date)),v=(o.value-x)/U,M=p+L*(1-v);return{x:k,y:M,data:o,idx:m}}),N=G.filter(o=>o.data.isSota);let O="";if(N.length>=2){O=`M${N[0].x},${N[0].y}`;for(let o=1;o<N.length;o++){const m=N[o-1],k=N[o],v=(m.x+k.x)/2;O+=` C${v},${m.y} ${v},${k.y} ${k.x},${k.y}`}}const H=5.4,fe=8,J=9,A=o=>{const m=o.data.modelName||o.data.paperTitle||"";if(!m)return null;const k=m.length>22?m.slice(0,21)+"…":m,v=k.length*H;let M=o.x-v/2,C=o.x+v/2,V="middle";return M<l?(M=l,C=l+v,V="start"):C>i-u&&(C=i-u,M=C-v,V="end"),{x:V==="start"?l:V==="end"?i-u:o.x,y:o.y-J,text:k,anchor:V,left:M,right:C}},ce=[],b=N.length>0?A(N[N.length-1]):null;let _e=-1/0;for(let o=0;o<N.length-1;o++){const m=A(N[o]);m&&(m.left<_e+fe||b&&m.right>b.left-fe||(_e=m.right,ce.push({x:m.x,y:m.y,text:m.text,anchor:m.anchor})))}b&&ce.push({x:b.x,y:b.y,text:b.text,anchor:b.anchor});const K=Mr(z,I),W=5,le=o=>a(m=>m===o?null:m),oe=o=>{o&&r(`/paper/${o}`)},pe=(o,m)=>{const v=`${o.data.modelName||o.data.paperTitle||"Unknown model"}: ${ne(o.data.value)} on ${o.data.dateLabel}`,M=!!o.data.paperRouteId;return n.jsxs("g",{children:[m,n.jsx("circle",{cx:o.x,cy:o.y,r:"10",fill:"transparent",style:{cursor:M?"pointer":"default",outline:"none"},tabIndex:0,role:M?"link":"img","aria-label":v,onMouseEnter:()=>a(o.idx),onMouseLeave:()=>le(o.idx),onFocus:()=>a(o.idx),onBlur:()=>le(o.idx),onClick:()=>oe(o.data.paperRouteId),onKeyDown:C=>{M&&(C.key==="Enter"||C.key===" ")&&(C.preventDefault(),oe(o.data.paperRouteId))},children:n.jsx("title",{children:v})})]},o.idx)};return n.jsxs("svg",{width:"100%",viewBox:`0 0 ${i} ${c}`,style:{display:"block"},children:[n.jsx("text",{x:l-38,y:p+L/2,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-faint)",textAnchor:"middle",transform:`rotate(-90 ${l-38} ${p+L/2})`,children:t}),Array.from({length:W}).map((o,m)=>{const k=m/(W-1),v=p+L*(1-k),M=x+U*k;return n.jsxs("g",{children:[n.jsx("line",{x1:l,y1:v,x2:i-u,y2:v,stroke:"var(--hairline)",strokeWidth:"1"}),n.jsx("text",{x:l-10,y:v+4,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-faint)",textAnchor:"end",children:ne(M)})]},m)}),K.map(o=>{const m=Y(o.timestamp);return n.jsx("text",{x:m,y:c-f+18,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-soft)",textAnchor:"middle",children:o.label},o.key)}),G.filter(o=>!o.data.isSota).map(o=>{const m=s===o.idx;return pe(o,n.jsx("circle",{cx:o.x,cy:o.y,r:m?3:2,fill:"var(--ink-faint)",opacity:m?1:.45,style:{transition:"r 0.12s ease, opacity 0.12s ease"}}))}),O&&n.jsx("path",{d:O,stroke:"var(--accent)",strokeWidth:"2",fill:"none",strokeLinejoin:"round",strokeLinecap:"round"}),N.map(o=>{const m=s===o.idx;return pe(o,n.jsx("circle",{cx:o.x,cy:o.y,r:m?4.5:3,fill:m?"var(--accent)":"var(--bg-elevated)",stroke:"var(--accent)",strokeWidth:"1.5",style:{transition:"r 0.12s ease, fill 0.12s ease"}}))}),ce.map((o,m)=>n.jsx("text",{x:o.x,y:o.y,fontSize:"9.5",fontFamily:"var(--mono)",fill:"var(--ink-soft)",textAnchor:o.anchor,pointerEvents:"none",style:{paintOrder:"stroke",stroke:"var(--bg-elevated)",strokeWidth:3,strokeLinejoin:"round"},children:o.text},`label-${m}`)),s!==null&&G[s]&&(()=>{const o=G[s],m=o.data.modelName||o.data.paperTitle||"Unknown model",v=`${m.length>40?m.slice(0,39)+"…":m}: ${ne(o.data.value)}`,C=Math.max(120,Math.min(340,v.length*6.6+24)),V=30;let B=o.x-C/2;B<l&&(B=l),B+C>i-u&&(B=i-u-C);const Q=o.y-V-14>=p?o.y-V-12:o.y+12;return n.jsxs("g",{pointerEvents:"none",children:[n.jsx("rect",{x:B,y:Q,width:C,height:V,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:B+12,y:Q+19,fontSize:"12",fontFamily:"var(--sans)",fill:"var(--ink)",fontWeight:500,children:v})]})})()]})};function he(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 Lr(e){return[e.paper_id,e.task_id,e.dataset_id,e.model_name,e.harness??""].join("|")}function Ir(e){const t=new Map;for(const r of e){const s=Lr(r),a=t.get(s);if(!a){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}a.metrics={...a.metrics,...r.metrics||{}},a.sourceEvaluationIds.push(r.id),r.best_metric&&r.best_rank!=null&&(a.ranksByMetric[r.best_metric]=r.best_rank)}return Array.from(t.values())}function ct(e,t){return t?e.id===t||e.sourceEvaluationIds.includes(t):!1}function lt(e,t){return e.ranksByMetric[t]??e.best_rank??9999}function Pr(e,t,r){if(e.length===0)return{points:[],sota:0,sotaModel:""};const s=e.map(f=>{var E;const y=he((E=f.metrics)==null?void 0:E[t]),x=f.paper_published_date||"";return{eval:f,value:y,date:x}}).filter(f=>f.value!==null&&!!f.date).sort((f,y)=>f.date.localeCompare(y.date)),a=[];let i=null;for(const f of s){const y=i==null?!0:r==="↓"?f.value<i:f.value>i;y&&(i=f.value),a.push({value:f.value,date:f.date,dateLabel:f.date.slice(0,7),modelName:f.eval.model_name||"",paperTitle:f.eval.paper_title||"",paperRouteId:f.eval.paper_arxiv_id||f.eval.paper_id||null,isSota:y})}const l=e.map(f=>{var y;return{eval:f,value:he((y=f.metrics)==null?void 0:y[t])}}).filter(f=>f.value!==null).sort((f,y)=>r==="↓"?f.value-y.value:y.value-f.value)[0],u=(l==null?void 0:l.value)??0,p=(l==null?void 0:l.eval.model_name)||(l==null?void 0:l.eval.paper_title)||"";return{points:a,sota:u,sotaModel:p}}const ot=({targetRef:e,label:t})=>{const{toast:r}=kt(),[s,a]=w.useState("idle"),i=w.useRef(null);w.useEffect(()=>()=>{i.current!==null&&window.clearTimeout(i.current)},[]);const c=w.useCallback(async()=>{const u=e.current;if(u){a("copying"),u.classList.add("is-capturing"),u.offsetHeight,await new Promise(p=>window.requestAnimationFrame(()=>p()));try{await Nr(u),a("copied"),r({title:"Screenshot copied",description:`Image of the ${t} copied to your clipboard.`}),i.current!==null&&window.clearTimeout(i.current),i.current=window.setTimeout(()=>a("idle"),1500)}catch(p){a("idle"),r({title:"Copy failed",description:p instanceof Error&&p.message?p.message:"Could not copy the screenshot to your clipboard.",variant:"destructive"})}finally{u.classList.remove("is-capturing")}}},[e,t,r]),l=s==="copied"?"Copied":s==="copying"?"Copying…":"Copy image";return n.jsxs("button",{type:"button",className:"bm-copy-btn",onClick:c,disabled:s==="copying","aria-label":`Copy ${t} screenshot to clipboard`,title:`Copy ${t} screenshot to clipboard`,children:[n.jsx(Nt,{name:"copy",size:11}),l]})},Yr=()=>{var Le,Ie,Pe,Ae,De,Be,He,Ve,Oe,Ue,We,qe,ze;const{datasetSlug:e}=vt(),[t]=jt(),r=t.get("task")||void 0,s=t.get("eval")||void 0,{preferences:a,setHideClosedSourceEvals:i}=_t(),[c,l]=w.useState(void 0),u=w.useRef(null),p=w.useRef(!1),f=w.useRef(null),y=w.useRef(null),x=te({queryKey:["dataset",e,"with-paper",r,a.hide_closed_source_evals?"open":"all"],queryFn:()=>ee.getDatasetBySlug(e,{include_paper:!0,task:r,is_open:a.hide_closed_source_evals?!0:void 0}),enabled:!!e,staleTime:10*60*1e3}),E=te({queryKey:["dataset-evals",(Le=x.data)==null?void 0:Le.id],queryFn:()=>ee.getEvaluationsByDataset(x.data.id),enabled:!!((Ie=x.data)!=null&&Ie.id),staleTime:5*60*1e3}),U=te({queryKey:["dataset-tasks",(Pe=x.data)==null?void 0:Pe.id],queryFn:()=>ee.getDatasetTasks(x.data.id),enabled:!!((Ae=x.data)!=null&&Ae.id),staleTime:10*60*1e3}),ae=te({queryKey:["metric-directions"],queryFn:()=>ee.getMetricDirections(),staleTime:60*60*1e3}),L=w.useMemo(()=>{var d;return!s||!((d=E.data)!=null&&d.length)?null:E.data.find(g=>g.id===s)||null},[s,E.data]),$=w.useMemo(()=>{const d=U.data||[];if(d.length===0)return null;if(L!=null&&L.task_id&&d.some(h=>h.id===L.task_id))return L.task_id;if(r){const h=d.find(S=>S.slug===r);if(h)return h.id}if(d.length===1)return d[0].id;const g=E.data||[];if(g.length>0){const h=new Map;for(const j of g)h.set(j.task_id,(h.get(j.task_id)||0)+1);let S=null,T=-1;for(const j of d){const ue=h.get(j.id)||0;ue>T&&(T=ue,S=j.id)}if(S)return S}return d[0].id},[U.data,E.data,r,L]),z=te({queryKey:["task-benchmark-trends",$,a.hide_closed_source_evals?!0:void 0],queryFn:()=>ee.getTrendingBenchmarks($,{limit:100,min_recent_papers:0,is_open:a.hide_closed_source_evals?!0:void 0}),enabled:!!$&&!!((De=x.data)!=null&&De.id),staleTime:10*60*1e3}),I=w.useMemo(()=>{var d;return(((d=z.data)==null?void 0:d.results)||[]).find(g=>{var h;return g.id===((h=x.data)==null?void 0:h.id)})||null},[z.data,(Be=x.data)==null?void 0:Be.id]),ie=te({queryKey:["leaderboard-metrics",(He=x.data)==null?void 0:He.id,$],queryFn:()=>ee.getLeaderboardMetrics(x.data.id,$),enabled:!!((Ve=x.data)!=null&&Ve.id)&&!!$,staleTime:10*60*1e3}),Y=w.useMemo(()=>Rr(E.data,$,a.hide_closed_source_evals),[E.data,$,a.hide_closed_source_evals]),G=Y.visible,N=Y.hiddenClosed,O=Y.topHiddenClosed,H=w.useMemo(()=>Ir(G),[G]),fe=w.useMemo(()=>{const d=new Set;return H.forEach(g=>{g.best_metric&&d.add(g.best_metric),Object.keys(g.metrics||{}).forEach(h=>d.add(h))}),Array.from(d)},[H]),J=w.useMemo(()=>(ie.data||[]).map(d=>d.metric_name),[ie.data]),A=J.length?J:fe,ce=w.useMemo(()=>{var S;if(H.length===0)return A[0]||"";const d=new Map;for(const T of H)for(const j of Object.keys(T.metrics||{}))J.length&&!A.includes(j)||d.set(j,(d.get(j)||0)+1);let g=null,h=0;for(const[T,j]of d)j>h&&(h=j,g=T);return g||A[0]||((S=H[0])==null?void 0:S.best_metric)||""},[H,A,J]),b=c||(L==null?void 0:L.best_metric)||ce,K=(((Ue=(Oe=ae.data)==null?void 0:Oe.directions)==null?void 0:Ue[b])||"higher_is_better")==="lower_is_better"?"↓":"↑",W=w.useMemo(()=>!b||!A.includes(b)?A:[b,...A.filter(d=>d!==b)],[A,b]),le=w.useMemo(()=>W.length===0?b?[b]:[]:W.slice(0,Tr),[W,b]),{points:oe,sota:pe,sotaModel:o}=w.useMemo(()=>Pr(H,b,K),[H,b,K]),m=(We=x.data)==null?void 0:We.leaderboard_summary,k=E.isSuccess&&U.isSuccess&&ae.isSuccess&&(!$||ie.isSuccess),v=k?b:m==null?void 0:m.metric,M=k?pe:m==null?void 0:m.value,C=k?o:m==null?void 0:m.model_name,V=!k&&!m;w.useEffect(()=>{if(p.current||!s||!E.data||E.data.length===0)return;const d=u.current;d&&(p.current=!0,d.scrollIntoView({behavior:"smooth",block:"start"}))},[s,E.data]);const B=w.useMemo(()=>{const d=U.data||[];return $?d.find(g=>g.id===$)||d[0]||null:d[0]||null},[U.data,$]);if(x.isLoading)return n.jsxs("div",{className:"page",children:[n.jsx(xe,{className:"h-12 w-1/2 mb-6"}),n.jsx(xe,{className:"h-64 w-full"})]});if(x.error||!x.data)return n.jsx("div",{className:"page",children:n.jsx(Ct,{variant:"destructive",children:n.jsx(Et,{children:"Benchmark not found."})})});const _=x.data,Q=H.slice().sort((d,g)=>{var T,j;const h=he((T=d.metrics)==null?void 0:T[b]),S=he((j=g.metrics)==null?void 0:j[b]);return h!==null&&S!==null?K==="↓"?h-S:S-h:h!==null?-1:S!==null?1:lt(d,b)-lt(g,b)}),Fe=!!_.supports_harness,R=s&&Q.find(d=>ct(d,s))||null,F=_.introducing_paper??void 0,de=(F==null?void 0:F.arxiv_id)||(F==null?void 0:F.id)||$r(_.paper_url),X=(F==null?void 0:F.title)||_.introducing_paper_title||null,Z=((qe=F==null?void 0:F.published)==null?void 0:qe.slice(0,4))||_.introduced_year||null,yt=!!de||!!_.paper_url||!!X,wt=F!=null&&F.arxiv_id||(ze=_.paper_url)!=null&&ze.match(/^https?:\/\/(?:www\.)?arxiv\.org\//i)?`arXiv:${de}`:`Paper ${de}`;return n.jsx("div",{className:"page",children:n.jsxs("div",{className:"bm-page",children:[n.jsxs("div",{className:"breadcrumb",children:[n.jsx(me,{to:"/tasks",children:"Tasks"}),B&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"sep",children:"/"}),n.jsx(me,{to:`/tasks/${B.slug||B.id}`,children:B.name})]}),n.jsx("span",{className:"sep",children:"/"}),n.jsx("span",{style:{color:"var(--accent-text)"},children:_.name})]}),n.jsxs("div",{className:"bm-title-row",children:[n.jsx("h1",{className:"bm-title",children:_.name}),I&&n.jsxs("div",{className:"bm-title-trend","aria-label":`${_.name} reporting trend`,children:[n.jsx($t,{history:I.history,benchmarkName:I.name}),n.jsxs("span",{className:"bm-title-trend-summary",children:[n.jsx("strong",{children:I.recent_paper_count})," ",I.recent_paper_count===1?"paper":"papers",I.rate_change==null?I.recent_paper_count>0&&n.jsx("span",{className:"benchmark-trend-change is-new",children:"new"}):n.jsxs("span",{className:`benchmark-trend-change ${I.rate_change>=1?"is-up":"is-down"}`,children:[I.rate_change>=1?"↑":"↓"," ",I.rate_change.toFixed(1),"×"]})]})]})]}),n.jsxs("div",{className:"bm-subtitle",children:[V?n.jsx(xe,{className:"h-5 w-64 bm-summary-skeleton","aria-label":"Loading benchmark summary"}):n.jsxs("span",{children:[v&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"metric-tag",children:v}),n.jsx("span",{style:{color:"var(--hairline-strong)",margin:"0 8px"},children:"·"})]}),C?n.jsxs("span",{children:["Best: ",n.jsx("span",{className:"best-name",children:ne(M)})," by ",n.jsx("span",{className:"best-name",style:{fontStyle:"normal"},children:C})]}):n.jsxs("span",{children:[Q.length," evaluations"]})]}),_.hf_url&&n.jsxs("a",{className:"bm-action-btn",href:_.hf_url,target:"_blank",rel:"noopener noreferrer",children:[n.jsx("span",{"aria-hidden":"true",children:"🤗"})," View on Hugging Face"]})]}),_.description&&n.jsx("p",{className:"bm-description",children:_.description}),a.hide_closed_source_evals&&N.length>0&&n.jsxs("div",{className:"bm-hidden-closed-notice",children:[n.jsxs("span",{children:[N.length," closed-source ",N.length===1?"row is":"rows are"," hidden",O!=null&&O.model_name?n.jsxs(n.Fragment,{children:[", including ",n.jsx("strong",{children:O.model_name})]}):null,"."]}),n.jsx("button",{type:"button",className:"bm-hidden-closed-action",onClick:()=>{i(!1)},children:"Show closed-source"})]}),yt&&n.jsxs("div",{className:"method-source",style:{marginTop:0,marginBottom:18},children:[n.jsx("span",{className:"method-source-label",children:"Source"}),de?n.jsxs(me,{to:`/paper/${de}`,target:"_blank",rel:"noopener noreferrer",className:"method-source-link",children:[n.jsx("span",{className:"method-source-title",children:X?n.jsx(ye,{title:X}):wt}),Z&&n.jsx("span",{className:"method-source-meta",children:Z})]}):_.paper_url?n.jsxs("a",{href:_.paper_url,target:"_blank",rel:"noopener noreferrer",className:"method-source-link",children:[n.jsx("span",{className:"method-source-title",children:X?n.jsx(ye,{title:X}):_.paper_url}),Z&&n.jsx("span",{className:"method-source-meta",children:Z})]}):n.jsxs("div",{className:"method-source-link is-static",children:[n.jsx("span",{className:"method-source-title",children:X?n.jsx(ye,{title:X}):null}),Z&&n.jsx("span",{className:"method-source-meta",children:Z})]})]}),oe.filter(d=>d.isSota).length>=2&&n.jsxs("div",{className:"bm-card",ref:f,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:_.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:[A.length>1&&n.jsxs("label",{className:"bm-view-select",children:[n.jsx("span",{className:"bm-view-select-label",children:"View"}),n.jsx("select",{value:b,onChange:d=>l(d.target.value),children:W.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(Je,{className:"bm-closed-toggle-switch",checked:!a.hide_closed_source_evals,onCheckedChange:d=>{i(!d)},"aria-label":"Show closed-source models"}),n.jsx("span",{className:"bm-closed-toggle-label",children:"Closed-source"})]}),n.jsx(ot,{targetRef:f,label:"SOTA chart"})]})]}),n.jsx("div",{className:"bm-chart-wrap",children:n.jsx(Fr,{points:oe,metric:b})}),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"]})]}),R&&(()=>{var T,j;const d=R.paper_arxiv_id||R.paper_id,g=R.paper_title||(R.paper_arxiv_id?`arXiv:${R.paper_arxiv_id}`:null),h=R.best_metric&&((T=R.metrics)==null?void 0:T[R.best_metric])!==void 0?R.best_metric:b,S=(j=R.metrics)==null?void 0:j[h];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:[R.model_name||g||"—",R.harness?` · ${R.harness}`:""]}),n.jsxs("span",{className:"bm-highlight-meta",children:[S!==void 0&&h?n.jsxs(n.Fragment,{children:[h,": ",ne(S),g?" · ":""]}):null,d?n.jsx(me,{to:`/paper/${d}`,children:be(R.paper_title,g)}):be(R.paper_title,g)]})]})]})})(),n.jsxs("div",{className:"bm-card",ref:y,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:_.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:[A.length>1&&n.jsxs("label",{className:"bm-view-select",children:[n.jsx("span",{className:"bm-view-select-label",children:"View"}),n.jsx("select",{value:b,onChange:d=>l(d.target.value),children:W.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(Je,{className:"bm-closed-toggle-switch",checked:!a.hide_closed_source_evals,onCheckedChange:d=>{i(!d)},"aria-label":"Show closed-source models"}),n.jsx("span",{className:"bm-closed-toggle-label",children:"Closed-source"})]}),n.jsx(ot,{targetRef:y,label:"leaderboard"})]})]}),E.isLoading?n.jsx("div",{style:{padding:16},children:Array.from({length:5}).map((d,g)=>n.jsx(xe,{className:"h-10 w-full mb-2"},g))}):Q.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"}),Fe&&n.jsx("th",{className:"col-harness",children:"Harness"}),le.map(d=>{const g=d===b;return n.jsx("th",{className:`col-value ${g?"is-active":""}`,"aria-sort":g?K==="↓"?"ascending":"descending":"none",children:n.jsxs("button",{type:"button",className:"bm-metric-header",onClick:()=>l(d),"aria-pressed":g,title:`Sort by ${d}`,children:[d,g?` ${K}`:""]})},d)}),n.jsx("th",{className:"col-paper",children:"Paper"}),n.jsx("th",{className:"col-year",children:"Year"})]})}),n.jsx("tbody",{children:(()=>{let d=null,g=0;return Q.map((h,S)=>{var Ke,Qe;const T=he((Ke=h.metrics)==null?void 0:Ke[b]);let j=null;T!==null&&((d===null||T!==d)&&(g=S+1,d=T),j=g);const ue=h.paper_arxiv_id||h.paper_id,Ge=h.paper_title||(h.paper_arxiv_id?`arXiv:${h.paper_arxiv_id}`:null),ke=ct(h,s);return n.jsxs("tr",{ref:ke?u:void 0,className:ke?"is-highlighted":void 0,children:[n.jsx("td",{className:"col-rank",children:j??"—"}),n.jsxs("td",{className:"col-model",children:[ke&&n.jsx("span",{className:"bm-row-marker","aria-hidden":"true"}),h.hf_model_url?n.jsx("a",{href:h.hf_model_url,target:"_blank",rel:"noopener noreferrer",className:"bm-model-link",title:`Open ${h.model_name||"model"} on Hugging Face`,children:h.model_name||"—"}):h.model_name||"—",h.is_open===!1&&n.jsx(Rt,{}),(h.external??h.is_external)&&n.jsx(Tt,{sourceUrl:h.source_url||h.external_source_url||h.result_url})]}),Fe&&n.jsx("td",{className:"col-harness",children:h.harness||"—"}),le.map(Se=>{var Ye;const Xe=Se===b,ge=(Ye=h.metrics)==null?void 0:Ye[Se];return n.jsx("td",{className:`col-value${Xe?" is-active":""}${Xe&&j===1?" is-best":""}`,children:ge!=null&&ge!==""?ne(ge):"—"},Se)}),n.jsx("td",{className:"col-paper",children:ue?n.jsx(me,{to:`/paper/${ue}`,children:be(h.paper_title,Ge)}):be(h.paper_title,Ge)}),n.jsx("td",{className:"col-year",children:((Qe=h.paper_published_date)==null?void 0:Qe.slice(0,4))||"—"})]},h.id)})})()})]})})]})]})})};export{Yr as default};
 
 
 
assets/BenchmarkDetailView-DS2Mrskn.css ADDED
@@ -0,0 +1 @@
 
 
1
+ .bm-page{max-width:calc(50vw + 600px);margin:0 auto}.bm-title-row{display:flex;align-items:center;gap:14px;min-width:0;margin-bottom:8px}.bm-title{font-family:var(--serif);font-size:44px;font-weight:500;letter-spacing:-.015em;line-height:1.05;color:var(--ink);margin-bottom:0;text-wrap:balance}.bm-title-trend{display:inline-flex;align-items:center;gap:7px;flex:0 0 auto;color:var(--ink-faint)}.bm-title-trend .benchmark-trend-sparkline{width:72px;height:28px}.bm-title-trend .benchmark-trend-axis{display:none}.bm-title-trend-summary{display:inline-flex;align-items:center;gap:4px;font-family:var(--mono);font-size:9px;letter-spacing:.02em;white-space:nowrap}.bm-title-trend-summary strong{color:var(--ink-soft);font-size:10px}.bm-subtitle{display:flex;align-items:center;flex-wrap:wrap;gap:16px;font-family:var(--serif);font-size:15px;color:var(--ink-soft);margin-bottom:14px}.bm-subtitle .metric-tag{font-family:var(--mono);font-size:12px;color:var(--accent-text);letter-spacing:.02em}.bm-subtitle .best-name{color:var(--ink);font-weight:600;font-style:italic}.bm-description{max-width:760px;margin:0 0 18px;font-family:var(--serif);color:var(--ink-soft)}.bm-actions{display:flex;gap:10px;margin-bottom:28px}.bm-card{border:1px solid var(--hairline);border-radius:8px;background:var(--bg-elevated);padding:24px 28px 28px;margin-bottom:22px}.bm-card-head{display:flex;justify-content:space-between;align-items:baseline;margin-bottom:18px;gap:12px}.bm-card-title{font-family:var(--serif);font-size:22px;font-weight:600;letter-spacing:-.01em;color:var(--ink)}.bm-card-actions{display:inline-flex;align-items:center;gap:12px;flex-wrap:wrap;justify-content:flex-end}.bm-card-screenshot-header{display:none}.bm-card.is-capturing .bm-card-screenshot-header{display:flex;align-items:flex-start;justify-content:space-between;gap:24px;margin-bottom:18px;padding-bottom:18px;border-bottom:1px solid var(--hairline)}.bm-card-screenshot-title{display:flex;flex-direction:column;gap:6px}.bm-card-screenshot-brand{display:flex;flex-direction:column;align-items:flex-end;gap:6px;flex-shrink:0}.bm-card-screenshot-url{font-family:var(--mono);font-size:12px;letter-spacing:.04em;color:var(--ink-faint)}.bm-card-screenshot-eyebrow{font-family:var(--mono);font-size:12px;letter-spacing:.14em;text-transform:uppercase;color:var(--ink-faint)}.bm-card-screenshot-name{font-family:var(--serif);font-size:48px;font-weight:600;letter-spacing:-.01em;line-height:1.1;color:var(--ink)}.bm-card.is-capturing .bm-copy-btn{display:none}.bm-copy-btn{display:inline-flex;align-items:center;gap:6px;font-family:var(--mono);font-size:10.5px;font-weight:500;letter-spacing:.04em;color:var(--ink-faint);background:var(--bg-subtle);border:1px solid var(--hairline);padding:4px 10px;border-radius:4px;cursor:pointer;transition:color .15s,border-color .15s,background .15s}.bm-copy-btn:hover:not(:disabled){color:var(--ink);border-color:var(--ink)}.bm-copy-btn:focus-visible{outline:none;border-color:var(--ink);color:var(--ink)}.bm-copy-btn:disabled{cursor:progress;opacity:.7}.bm-view-select{display:inline-flex;align-items:center;gap:8px;font-family:var(--sans);font-size:12px;color:var(--ink-soft)}.bm-view-select-label{font-family:var(--mono);font-size:10.5px;letter-spacing:.1em;text-transform:uppercase;color:var(--ink-faint)}.bm-view-select select{font-family:var(--mono);font-size:12px;color:var(--ink);background:var(--bg-elevated);border:1px solid var(--hairline);border-radius:5px;padding:4px 8px;cursor:pointer}.bm-view-select select:hover{border-color:var(--hairline-strong)}.bm-closed-toggle{display:inline-flex;align-items:center;gap:8px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none}.bm-closed-toggle-label{font-family:var(--mono);font-size:10.5px;letter-spacing:.1em;text-transform:uppercase;color:var(--ink-faint);white-space:nowrap}.bm-closed-toggle-switch{transform:scale(.8);transform-origin:right center}.bm-card.is-capturing .bm-closed-toggle{display:none}.bm-controls{display:flex;gap:18px;align-items:center;margin-bottom:24px;font-family:var(--sans);font-size:12px;color:var(--ink-soft)}.bm-controls .label{color:var(--ink-faint);margin-right:6px}.bm-select{display:inline-flex;align-items:center;gap:6px;padding:5px 10px;border:1px solid var(--hairline);border-radius:5px;background:var(--bg-elevated);font-family:var(--mono);font-size:11px;color:var(--ink);cursor:pointer}.bm-select:hover{border-color:var(--hairline-strong)}.bm-select .caret{color:var(--ink-faint);font-size:9px}.bm-table-scroll{width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.bm-table{width:100%;border-collapse:collapse;font-family:var(--sans);font-size:14px}.bm-table thead th{font-family:var(--mono);font-size:10.5px;letter-spacing:.1em;text-transform:uppercase;color:var(--ink-faint);font-weight:500;text-align:left;padding:10px 14px;background:var(--bg-subtle);border-top:1px solid var(--hairline);border-bottom:1px solid var(--hairline)}.bm-table tbody td{padding:14px;border-bottom:1px solid var(--hairline);vertical-align:middle}.bm-table tbody tr:last-child td{border-bottom:none}.bm-table .col-rank{width:64px;color:var(--ink-faint);font-family:var(--mono);font-feature-settings:"tnum"}.bm-table .col-model{font-weight:600;color:var(--ink)}.bm-model-link{display:inline-flex;align-items:center;gap:4px;color:inherit;text-decoration:none}.bm-model-link:hover{text-decoration:underline}.bm-model-link svg{opacity:.6;flex-shrink:0}.bm-table .col-harness{font-family:var(--mono);font-size:12px;color:var(--ink-soft);width:140px;white-space:nowrap}.bm-table .col-value{font-family:var(--mono);font-feature-settings:"tnum";font-size:14px;color:var(--ink);width:86px;text-align:right;white-space:nowrap}.bm-table thead th.col-value{text-align:right}.bm-table thead th.col-value .bm-metric-header{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:0;padding:0;margin:0;font:inherit;color:inherit;letter-spacing:inherit;text-transform:inherit;text-align:right;cursor:pointer;width:100%}.bm-table thead th.col-value .bm-metric-header:hover{color:var(--ink)}.bm-table thead th.col-value .bm-metric-header:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:2px}.bm-table thead th.col-value.is-active .bm-metric-header{color:var(--ink)}.bm-table .col-value.is-active{color:var(--ink);font-weight:600}.bm-table tbody td.col-value:not(.is-active){color:var(--ink-soft)}.bm-table .col-value.is-best{color:var(--accent-text);font-weight:600}.bm-table .col-paper a{color:var(--accent-text);cursor:pointer;text-decoration:none;text-wrap:pretty}.bm-table .col-paper .katex{font-size:1em}.bm-table .col-paper a:hover{text-decoration:underline}.bm-table .col-code{width:60px;text-align:center}.bm-table .col-year{width:60px;text-align:right;font-family:var(--mono);font-size:12px;color:var(--ink-soft);font-feature-settings:"tnum"}.bm-chart-foot{text-align:center;margin-top:14px;font-family:var(--sans);font-size:12px;color:var(--ink-soft)}.bm-chart-foot .legend-dot{display:inline-block;width:8px;height:8px;border-radius:50%;background:var(--accent);margin-right:8px;vertical-align:middle}.bm-chart-wrap{background:var(--bg-elevated);padding:8px 12px}.bm-highlight-banner{display:flex;align-items:flex-start;gap:14px;padding:14px 18px;background:var(--highlight-bg);border:1px solid var(--highlight-border);border-left:3px solid var(--highlight-text);border-radius:6px;margin-bottom:22px}.bm-highlight-dot{width:9px;height:9px;border-radius:50%;background:var(--highlight-text);margin-top:7px;flex-shrink:0;box-shadow:0 0 0 4px var(--highlight-border)}.bm-highlight-text{display:flex;flex-direction:column;gap:3px;min-width:0;flex:1}.bm-highlight-label{font-family:var(--mono);font-size:10px;letter-spacing:.14em;text-transform:uppercase;color:var(--highlight-text)}.bm-highlight-paper{font-family:var(--serif);font-size:16px;font-weight:500;color:var(--ink);line-height:1.3;text-wrap:pretty}.bm-highlight-meta{font-family:var(--serif);font-size:13px;color:var(--ink-soft);font-style:italic}.bm-table tbody tr.is-highlighted{background:var(--highlight-bg);position:relative;scroll-margin-top:80px}.bm-table tbody tr.is-highlighted td{background:var(--highlight-bg)}.bm-table tbody tr.is-highlighted td:first-child{box-shadow:inset 3px 0 0 var(--highlight-text)}.bm-table tbody tr.is-highlighted .col-model{color:var(--ink)}.bm-row-marker{display:inline-block;width:7px;height:7px;border-radius:50%;background:var(--highlight-text);margin-right:8px;vertical-align:middle;box-shadow:0 0 0 2px var(--highlight-border)}.bm-hidden-closed-notice{display:flex;align-items:center;justify-content:space-between;gap:14px;max-width:760px;margin:0 0 18px;padding:10px 12px;border:1px solid var(--hairline);border-radius:6px;background:var(--bg-elevated);color:var(--ink-soft);font-family:var(--sans);font-size:13px;line-height:1.45}.bm-hidden-closed-notice strong{color:var(--ink);font-weight:600}.bm-hidden-closed-action{flex-shrink:0;border:1px solid var(--hairline-strong);border-radius:5px;background:var(--bg);color:var(--ink);padding:5px 9px;font-family:var(--mono);font-size:11px;font-weight:600;cursor:pointer}.bm-hidden-closed-action:hover{border-color:var(--ink)}.bm-hidden-closed-action:focus-visible{outline:2px solid var(--accent);outline-offset:2px}@media (max-width: 640px){.bm-title-row{align-items:flex-end;flex-wrap:wrap;gap:8px 12px}.bm-title{font-size:30px}.bm-card{padding:18px 14px 20px}.bm-card-head{flex-direction:column;align-items:stretch;gap:12px}.bm-card-actions{justify-content:flex-start}.bm-table-scroll{margin:0 -14px;padding:0 14px}.bm-table{font-size:13px}.bm-table thead th{padding:9px 10px}.bm-table tbody td{padding:11px 10px}.bm-table .col-model{max-width:160px}.bm-table .col-paper{max-width:200px}}
assets/BenchmarkDetailView-DSQ_qbDf.js ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ import{u as vt,r as w,j as n,_ as ne,g as jt,e as _t,a as kt,T as St,L as me,b as ee}from"./index-B2CsYqS1.js";import{u as te}from"./useQuery-D09nn2D4.js";import{S as xe}from"./skeleton-EzEzG6PT.js";import{S as Je}from"./switch-Wl4WeaN5.js";import{A as Ct,a as Et}from"./alert-B5Pni1K6.js";import{L as ye}from"./LatexTitle-DhaqzMPt.js";import{C as Nt,E as Rt}from"./ExternalSourceEvalBadge-C2oFJsOX.js";import{B as Tt}from"./BenchmarkTrendSparkline-CemWtN8L.js";import{I as $t}from"./components-Dt_hKhor.js";import"./useBaseQuery-DCY5lvEf.js";import"./index-rF6L_V4R.js";import"./katex.min-BSBacQyE.js";import"./hover-card-DfDU2jCA.js";import"./transform-Csq86xeP.js";function Mt(e,t,r){const s=t?(e??[]).filter(c=>c.task_id===t):e??[],a=s.filter(c=>c.is_open===!1),i=a.reduce((c,l)=>c?(l.best_rank??Number.POSITIVE_INFINITY)<(c.best_rank??Number.POSITIVE_INFINITY)?l:c:l,null);return{visible:r?s.filter(c=>c.is_open!==!1):s,hiddenClosed:a,topHiddenClosed:i}}function Ze(e){const t=e.length===7?`${e}-01`:e,r=new Date(t).getTime();return Number.isFinite(r)?r:0}const Ce=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Ee(e){const t=new Date(e);return{year:t.getFullYear(),month:t.getMonth()}}function Ft(e,t){if(e===t){const{year:u,month:p}=Ee(e);return[{timestamp:new Date(u,p,1).getTime(),key:`${u}-${p}`,label:`${Ce[p]} ${u}`}]}const r=Ee(e),s=Ee(t);if(r.year===s.year){const u=s.month-r.month+1;let p=1;const f=12;u>f&&(p=Math.ceil(u/f));const y=[];for(let x=r.month;x<=s.month;x+=p)y.push({timestamp:new Date(r.year,x,1).getTime(),key:`${r.year}-${x}`,label:u<=3?`${Ce[x]} ${r.year}`:Ce[x]});return y}const a=s.year-r.year+1;let i=1;const c=12;a>c&&(i=Math.ceil(a/c));const l=[];for(let u=r.year;u<=s.year;u+=i)l.push({timestamp:new Date(u,0,1).getTime(),key:String(u),label:String(u)});return l}const Lt=({points:e,metric:t})=>{const r=vt(),[s,a]=w.useState(null),i=880,c=320,l=60,u=30,p=40,f=50,y=e.map(o=>o.value),x=Math.min(...y),U=Math.max(...y)-x||1,ae=i-l-u,L=c-p-f,$=e.map(o=>Ze(o.date)),z=Math.min(...$),I=Math.max(...$),ie=I-z||1,Y=o=>z===I?l+ae/2:l+(o-z)/ie*ae,G=e.map((o,m)=>{const k=Y(Ze(o.date)),v=(o.value-x)/U,M=p+L*(1-v);return{x:k,y:M,data:o,idx:m}}),N=G.filter(o=>o.data.isSota);let O="";if(N.length>=2){O=`M${N[0].x},${N[0].y}`;for(let o=1;o<N.length;o++){const m=N[o-1],k=N[o],v=(m.x+k.x)/2;O+=` C${v},${m.y} ${v},${k.y} ${k.x},${k.y}`}}const H=5.4,fe=8,J=9,A=o=>{const m=o.data.modelName||o.data.paperTitle||"";if(!m)return null;const k=m.length>22?m.slice(0,21)+"…":m,v=k.length*H;let M=o.x-v/2,C=o.x+v/2,V="middle";return M<l?(M=l,C=l+v,V="start"):C>i-u&&(C=i-u,M=C-v,V="end"),{x:V==="start"?l:V==="end"?i-u:o.x,y:o.y-J,text:k,anchor:V,left:M,right:C}},ce=[],b=N.length>0?A(N[N.length-1]):null;let _e=-1/0;for(let o=0;o<N.length-1;o++){const m=A(N[o]);m&&(m.left<_e+fe||b&&m.right>b.left-fe||(_e=m.right,ce.push({x:m.x,y:m.y,text:m.text,anchor:m.anchor})))}b&&ce.push({x:b.x,y:b.y,text:b.text,anchor:b.anchor});const K=Ft(z,I),W=5,le=o=>a(m=>m===o?null:m),oe=o=>{o&&r(`/paper/${o}`)},pe=(o,m)=>{const v=`${o.data.modelName||o.data.paperTitle||"Unknown model"}: ${ne(o.data.value)} on ${o.data.dateLabel}`,M=!!o.data.paperRouteId;return n.jsxs("g",{children:[m,n.jsx("circle",{cx:o.x,cy:o.y,r:"10",fill:"transparent",style:{cursor:M?"pointer":"default",outline:"none"},tabIndex:0,role:M?"link":"img","aria-label":v,onMouseEnter:()=>a(o.idx),onMouseLeave:()=>le(o.idx),onFocus:()=>a(o.idx),onBlur:()=>le(o.idx),onClick:()=>oe(o.data.paperRouteId),onKeyDown:C=>{M&&(C.key==="Enter"||C.key===" ")&&(C.preventDefault(),oe(o.data.paperRouteId))},children:n.jsx("title",{children:v})})]},o.idx)};return n.jsxs("svg",{width:"100%",viewBox:`0 0 ${i} ${c}`,style:{display:"block"},children:[n.jsx("text",{x:l-38,y:p+L/2,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-faint)",textAnchor:"middle",transform:`rotate(-90 ${l-38} ${p+L/2})`,children:t}),Array.from({length:W}).map((o,m)=>{const k=m/(W-1),v=p+L*(1-k),M=x+U*k;return n.jsxs("g",{children:[n.jsx("line",{x1:l,y1:v,x2:i-u,y2:v,stroke:"var(--hairline)",strokeWidth:"1"}),n.jsx("text",{x:l-10,y:v+4,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-faint)",textAnchor:"end",children:ne(M)})]},m)}),K.map(o=>{const m=Y(o.timestamp);return n.jsx("text",{x:m,y:c-f+18,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-soft)",textAnchor:"middle",children:o.label},o.key)}),G.filter(o=>!o.data.isSota).map(o=>{const m=s===o.idx;return pe(o,n.jsx("circle",{cx:o.x,cy:o.y,r:m?3:2,fill:"var(--ink-faint)",opacity:m?1:.45,style:{transition:"r 0.12s ease, opacity 0.12s ease"}}))}),O&&n.jsx("path",{d:O,stroke:"var(--accent)",strokeWidth:"2",fill:"none",strokeLinejoin:"round",strokeLinecap:"round"}),N.map(o=>{const m=s===o.idx;return pe(o,n.jsx("circle",{cx:o.x,cy:o.y,r:m?4.5:3,fill:m?"var(--accent)":"var(--bg-elevated)",stroke:"var(--accent)",strokeWidth:"1.5",style:{transition:"r 0.12s ease, fill 0.12s ease"}}))}),ce.map((o,m)=>n.jsx("text",{x:o.x,y:o.y,fontSize:"9.5",fontFamily:"var(--mono)",fill:"var(--ink-soft)",textAnchor:o.anchor,pointerEvents:"none",style:{paintOrder:"stroke",stroke:"var(--bg-elevated)",strokeWidth:3,strokeLinejoin:"round"},children:o.text},`label-${m}`)),s!==null&&G[s]&&(()=>{const o=G[s],m=o.data.modelName||o.data.paperTitle||"Unknown model",v=`${m.length>40?m.slice(0,39)+"…":m}: ${ne(o.data.value)}`,C=Math.max(120,Math.min(340,v.length*6.6+24)),V=30;let B=o.x-C/2;B<l&&(B=l),B+C>i-u&&(B=i-u-C);const Q=o.y-V-14>=p?o.y-V-12:o.y+12;return n.jsxs("g",{pointerEvents:"none",children:[n.jsx("rect",{x:B,y:Q,width:C,height:V,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:B+12,y:Q+19,fontSize:"12",fontFamily:"var(--sans)",fill:"var(--ink)",fontWeight:500,children:v})]})})()]})};function It(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"),a=r.createElement("a");return r.head.appendChild(s),r.body.appendChild(a),t&&(s.href=t),a.href=e,a.href}const Pt=(()=>{let e=0;const t=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(e+=1,`u${t()}${e}`)})();function q(e){const t=[];for(let r=0,s=e.length;r<s;r++)t.push(e[r]);return t}let re=null;function dt(e={}){return re||(e.includeStyleProperties?(re=e.includeStyleProperties,re):(re=q(window.getComputedStyle(document.documentElement)),re))}function we(e,t){const s=(e.ownerDocument.defaultView||window).getComputedStyle(e).getPropertyValue(t);return s?parseFloat(s.replace("px","")):0}function At(e){const t=we(e,"border-left-width"),r=we(e,"border-right-width");return e.clientWidth+t+r}function Dt(e){const t=we(e,"border-top-width"),r=we(e,"border-bottom-width");return e.clientHeight+t+r}function ut(e,t={}){const r=t.width||At(e),s=t.height||Dt(e);return{width:r,height:s}}function Bt(){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 D=16384;function Ht(e){(e.width>D||e.height>D)&&(e.width>D&&e.height>D?e.width>e.height?(e.height*=D/e.width,e.width=D):(e.width*=D/e.height,e.height=D):e.width>D?(e.height*=D/e.width,e.width=D):(e.width*=D/e.height,e.height=D))}function Vt(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]),a=s.length,i=new Uint8Array(a);for(let c=0;c<a;c+=1)i[c]=s.charCodeAt(c);r(new Blob([i],{type:t.type?t.type:"image/png"}))})}function ve(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 Ot(e){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then(t=>`data:image/svg+xml;charset=utf-8,${t}`)}async function Ut(e,t,r){const s="http://www.w3.org/2000/svg",a=document.createElementNS(s,"svg"),i=document.createElementNS(s,"foreignObject");return a.setAttribute("width",`${t}`),a.setAttribute("height",`${r}`),a.setAttribute("viewBox",`0 0 ${t} ${r}`),i.setAttribute("width","100%"),i.setAttribute("height","100%"),i.setAttribute("x","0"),i.setAttribute("y","0"),i.setAttribute("externalResourcesRequired","true"),a.appendChild(i),i.appendChild(e),Ot(a)}const P=(e,t)=>{if(e instanceof t)return!0;const r=Object.getPrototypeOf(e);return r===null?!1:r.constructor.name===t.name||P(r,t)};function Wt(e){const t=e.getPropertyValue("content");return`${e.cssText} content: '${t.replace(/'|"/g,"")}';`}function qt(e,t){return dt(t).map(r=>{const s=e.getPropertyValue(r),a=e.getPropertyPriority(r);return`${r}: ${s}${a?" !important":""};`}).join(" ")}function zt(e,t,r,s){const a=`.${e}:${t}`,i=r.cssText?Wt(r):qt(r,s);return document.createTextNode(`${a}{${i}}`)}function et(e,t,r,s){const a=window.getComputedStyle(e,r),i=a.getPropertyValue("content");if(i===""||i==="none")return;const c=Pt();try{t.className=`${t.className} ${c}`}catch{return}const l=document.createElement("style");l.appendChild(zt(c,r,a,s)),t.appendChild(l)}function Gt(e,t,r){et(e,t,":before",r),et(e,t,":after",r)}const tt="application/font-woff",rt="image/jpeg",Kt={woff:tt,woff2:tt,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:rt,jpeg:rt,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function Qt(e){const t=/\.([^./]*?)$/g.exec(e);return t?t[1]:""}function $e(e){const t=Qt(e).toLowerCase();return Kt[t]||""}function Xt(e){return e.split(/,/)[1]}function Re(e){return e.search(/^(data:)/)!==-1}function Yt(e,t){return`data:${t};base64,${e}`}async function mt(e,t,r){const s=await fetch(e,t);if(s.status===404)throw new Error(`Resource "${s.url}" not found`);const a=await s.blob();return new Promise((i,c)=>{const l=new FileReader;l.onerror=c,l.onloadend=()=>{try{i(r({res:s,result:l.result}))}catch(u){c(u)}},l.readAsDataURL(a)})}const Ne={};function Jt(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 Me(e,t,r){const s=Jt(e,t,r.includeQueryParams);if(Ne[s]!=null)return Ne[s];r.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+new Date().getTime());let a;try{const i=await mt(e,r.fetchRequestInit,({res:c,result:l})=>(t||(t=c.headers.get("Content-Type")||""),Xt(l)));a=Yt(i,t)}catch(i){a=r.imagePlaceholder||"";let c=`Failed to fetch resource: ${e}`;i&&(c=typeof i=="string"?i:i.message),c&&console.warn(c)}return Ne[s]=a,a}async function Zt(e){const t=e.toDataURL();return t==="data:,"?e.cloneNode(!1):ve(t)}async function er(e,t){if(e.currentSrc){const i=document.createElement("canvas"),c=i.getContext("2d");i.width=e.clientWidth,i.height=e.clientHeight,c==null||c.drawImage(e,0,0,i.width,i.height);const l=i.toDataURL();return ve(l)}const r=e.poster,s=$e(r),a=await Me(r,s,t);return ve(a)}async function tr(e,t){var r;try{if(!((r=e==null?void 0:e.contentDocument)===null||r===void 0)&&r.body)return await je(e.contentDocument.body,t,!0)}catch{}return e.cloneNode(!1)}async function rr(e,t){return P(e,HTMLCanvasElement)?Zt(e):P(e,HTMLVideoElement)?er(e,t):P(e,HTMLIFrameElement)?tr(e,t):e.cloneNode(ht(e))}const sr=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SLOT",ht=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SVG";async function nr(e,t,r){var s,a;if(ht(t))return t;let i=[];return sr(e)&&e.assignedNodes?i=q(e.assignedNodes()):P(e,HTMLIFrameElement)&&(!((s=e.contentDocument)===null||s===void 0)&&s.body)?i=q(e.contentDocument.body.childNodes):i=q(((a=e.shadowRoot)!==null&&a!==void 0?a:e).childNodes),i.length===0||P(e,HTMLVideoElement)||await i.reduce((c,l)=>c.then(()=>je(l,r)).then(u=>{u&&t.appendChild(u)}),Promise.resolve()),t}function ar(e,t,r){const s=t.style;if(!s)return;const a=window.getComputedStyle(e);a.cssText?(s.cssText=a.cssText,s.transformOrigin=a.transformOrigin):dt(r).forEach(i=>{let c=a.getPropertyValue(i);i==="font-size"&&c.endsWith("px")&&(c=`${Math.floor(parseFloat(c.substring(0,c.length-2)))-.1}px`),P(e,HTMLIFrameElement)&&i==="display"&&c==="inline"&&(c="block"),i==="d"&&t.getAttribute("d")&&(c=`path(${t.getAttribute("d")})`),s.setProperty(i,c,a.getPropertyPriority(i))})}function ir(e,t){P(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),P(e,HTMLInputElement)&&t.setAttribute("value",e.value)}function cr(e,t){if(P(e,HTMLSelectElement)){const r=t,s=Array.from(r.children).find(a=>e.value===a.getAttribute("value"));s&&s.setAttribute("selected","")}}function lr(e,t,r){return P(t,Element)&&(ar(e,t,r),Gt(e,t,r),ir(e,t),cr(e,t)),t}async function or(e,t){const r=e.querySelectorAll?e.querySelectorAll("use"):[];if(r.length===0)return e;const s={};for(let i=0;i<r.length;i++){const l=r[i].getAttribute("xlink:href");if(l){const u=e.querySelector(l),p=document.querySelector(l);!u&&p&&!s[l]&&(s[l]=await je(p,t,!0))}}const a=Object.values(s);if(a.length){const i="http://www.w3.org/1999/xhtml",c=document.createElementNS(i,"svg");c.setAttribute("xmlns",i),c.style.position="absolute",c.style.width="0",c.style.height="0",c.style.overflow="hidden",c.style.display="none";const l=document.createElementNS(i,"defs");c.appendChild(l);for(let u=0;u<a.length;u++)l.appendChild(a[u]);e.appendChild(c)}return e}async function je(e,t,r){return!r&&t.filter&&!t.filter(e)?null:Promise.resolve(e).then(s=>rr(s,t)).then(s=>nr(e,s,t)).then(s=>lr(e,s,t)).then(s=>or(s,t))}const ft=/url\((['"]?)([^'"]+?)\1\)/g,dr=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,ur=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function mr(e){const t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}function hr(e){const t=[];return e.replace(ft,(r,s,a)=>(t.push(a),r)),t.filter(r=>!Re(r))}async function fr(e,t,r,s,a){try{const i=r?It(t,r):t,c=$e(t);let l;return a||(l=await Me(i,c,s)),e.replace(mr(t),`$1${l}$3`)}catch{}return e}function pr(e,{preferredFontFormat:t}){return t?e.replace(ur,r=>{for(;;){const[s,,a]=dr.exec(r)||[];if(!a)return"";if(a===t)return`src: ${s};`}}):e}function pt(e){return e.search(ft)!==-1}async function gt(e,t,r){if(!pt(e))return e;const s=pr(e,r);return hr(s).reduce((i,c)=>i.then(l=>fr(l,c,t,r)),Promise.resolve(s))}async function se(e,t,r){var s;const a=(s=t.style)===null||s===void 0?void 0:s.getPropertyValue(e);if(a){const i=await gt(a,null,r);return t.style.setProperty(e,i,t.style.getPropertyPriority(e)),!0}return!1}async function gr(e,t){await se("background",e,t)||await se("background-image",e,t),await se("mask",e,t)||await se("-webkit-mask",e,t)||await se("mask-image",e,t)||await se("-webkit-mask-image",e,t)}async function xr(e,t){const r=P(e,HTMLImageElement);if(!(r&&!Re(e.src))&&!(P(e,SVGImageElement)&&!Re(e.href.baseVal)))return;const s=r?e.src:e.href.baseVal,a=await Me(s,$e(s),t);await new Promise((i,c)=>{e.onload=i,e.onerror=t.onImageErrorHandler?(...u)=>{try{i(t.onImageErrorHandler(...u))}catch(p){c(p)}}:c;const l=e;l.decode&&(l.decode=i),l.loading==="lazy"&&(l.loading="eager"),r?(e.srcset="",e.src=a):e.href.baseVal=a})}async function br(e,t){const s=q(e.childNodes).map(a=>xt(a,t));await Promise.all(s).then(()=>e)}async function xt(e,t){P(e,Element)&&(await gr(e,t),await xr(e,t),await br(e,t))}function yr(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(a=>{r[a]=s[a]}),e}const st={};async function nt(e){let t=st[e];if(t!=null)return t;const s=await(await fetch(e)).text();return t={url:e,cssText:s},st[e]=t,t}async function at(e,t){let r=e.cssText;const s=/url\(["']?([^"')]+)["']?\)/g,i=(r.match(/url\([^)]+\)/g)||[]).map(async c=>{let l=c.replace(s,"$1");return l.startsWith("https://")||(l=new URL(l,e.url).href),mt(l,t.fetchRequestInit,({result:u})=>(r=r.replace(c,`url(${u})`),[c,u]))});return Promise.all(i).then(()=>r)}function it(e){if(e==null)return[];const t=[],r=/(\/\*[\s\S]*?\*\/)/gi;let s=e.replace(r,"");const a=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){const u=a.exec(s);if(u===null)break;t.push(u[0])}s=s.replace(a,"");const i=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,c="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})",l=new RegExp(c,"gi");for(;;){let u=i.exec(s);if(u===null){if(u=l.exec(s),u===null)break;i.lastIndex=l.lastIndex}else l.lastIndex=i.lastIndex;t.push(u[0])}return t}async function wr(e,t){const r=[],s=[];return e.forEach(a=>{if("cssRules"in a)try{q(a.cssRules||[]).forEach((i,c)=>{if(i.type===CSSRule.IMPORT_RULE){let l=c+1;const u=i.href,p=nt(u).then(f=>at(f,t)).then(f=>it(f).forEach(y=>{try{a.insertRule(y,y.startsWith("@import")?l+=1:a.cssRules.length)}catch(x){console.error("Error inserting rule from remote css",{rule:y,error:x})}})).catch(f=>{console.error("Error loading remote css",f.toString())});s.push(p)}})}catch(i){const c=e.find(l=>l.href==null)||document.styleSheets[0];a.href!=null&&s.push(nt(a.href).then(l=>at(l,t)).then(l=>it(l).forEach(u=>{c.insertRule(u,c.cssRules.length)})).catch(l=>{console.error("Error loading remote stylesheet",l)})),console.error("Error inlining remote css file",i)}}),Promise.all(s).then(()=>(e.forEach(a=>{if("cssRules"in a)try{q(a.cssRules||[]).forEach(i=>{r.push(i)})}catch(i){console.error(`Error while reading CSS rules from ${a.href}`,i)}}),r))}function vr(e){return e.filter(t=>t.type===CSSRule.FONT_FACE_RULE).filter(t=>pt(t.style.getPropertyValue("src")))}async function jr(e,t){if(e.ownerDocument==null)throw new Error("Provided element is not within a Document");const r=q(e.ownerDocument.styleSheets),s=await wr(r,t);return vr(s)}function bt(e){return e.trim().replace(/["']/g,"")}function _r(e){const t=new Set;function r(s){(s.style.fontFamily||getComputedStyle(s).fontFamily).split(",").forEach(i=>{t.add(bt(i))}),Array.from(s.children).forEach(i=>{i instanceof HTMLElement&&r(i)})}return r(e),t}async function kr(e,t){const r=await jr(e,t),s=_r(e);return(await Promise.all(r.filter(i=>s.has(bt(i.style.fontFamily))).map(i=>{const c=i.parentStyleSheet?i.parentStyleSheet.href:null;return gt(i.cssText,c,t)}))).join(`
2
+ `)}async function Sr(e,t){const r=t.fontEmbedCSS!=null?t.fontEmbedCSS:t.skipFonts?null:await kr(e,t);if(r){const s=document.createElement("style"),a=document.createTextNode(r);s.appendChild(a),e.firstChild?e.insertBefore(s,e.firstChild):e.appendChild(s)}}async function Cr(e,t={}){const{width:r,height:s}=ut(e,t),a=await je(e,t,!0);return await Sr(a,t),await xt(a,t),yr(a,t),await Ut(a,r,s)}async function Er(e,t={}){const{width:r,height:s}=ut(e,t),a=await Cr(e,t),i=await ve(a),c=document.createElement("canvas"),l=c.getContext("2d"),u=t.pixelRatio||Bt(),p=t.canvasWidth||r,f=t.canvasHeight||s;return c.width=p*u,c.height=f*u,t.skipAutoScale||Ht(c),c.style.width=`${p}`,c.style.height=`${f}`,t.backgroundColor&&(l.fillStyle=t.backgroundColor,l.fillRect(0,0,c.width,c.height)),l.drawImage(i,0,0,c.width,c.height),c}async function Nr(e,t={}){const r=await Er(e,t);return await Vt(r)}const Te="#ffffff";function Rr(){return typeof window>"u"?Te:window.getComputedStyle(document.documentElement).getPropertyValue("--bg-elevated").trim()||Te}function Tr(e){if(typeof window>"u")return Te;const t=window.getComputedStyle(e).backgroundColor;return!t||t==="rgba(0, 0, 0, 0)"||t==="transparent"?Rr():t}async function $r(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 Nr(e,{pixelRatio:2,cacheBust:!0,backgroundColor:Tr(e)});if(!t)throw new Error("Failed to render screenshot.");await window.navigator.clipboard.write([new window.ClipboardItem({"image/png":t})])}const ct=({targetRef:e,label:t})=>{const{toast:r}=jt(),[s,a]=w.useState("idle"),i=w.useRef(null);w.useEffect(()=>()=>{i.current!==null&&window.clearTimeout(i.current)},[]);const c=w.useCallback(async()=>{const u=e.current;if(u){a("copying"),u.classList.add("is-capturing"),u.offsetHeight,await new Promise(p=>window.requestAnimationFrame(()=>p()));try{await $r(u),a("copied"),r({title:"Screenshot copied",description:`Image of the ${t} copied to your clipboard.`}),i.current!==null&&window.clearTimeout(i.current),i.current=window.setTimeout(()=>a("idle"),1500)}catch(p){a("idle"),r({title:"Copy failed",description:p instanceof Error&&p.message?p.message:"Could not copy the screenshot to your clipboard.",variant:"destructive"})}finally{u.classList.remove("is-capturing")}}},[e,t,r]),l=s==="copied"?"Copied":s==="copying"?"Copying…":"Copy image";return n.jsxs("button",{type:"button",className:"bm-copy-btn",onClick:c,disabled:s==="copying","aria-label":`Copy ${t} screenshot to clipboard`,title:`Copy ${t} screenshot to clipboard`,children:[n.jsx($t,{name:"copy",size:11}),l]})};function he(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 Mr(e){return[e.paper_id,e.task_id,e.dataset_id,e.model_name,e.harness??""].join("|")}function Fr(e){const t=new Map;for(const r of e){const s=Mr(r),a=t.get(s);if(!a){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}a.metrics={...a.metrics,...r.metrics||{}},a.sourceEvaluationIds.push(r.id),r.best_metric&&r.best_rank!=null&&(a.ranksByMetric[r.best_metric]=r.best_rank)}return Array.from(t.values())}function lt(e,t){return t?e.id===t||e.sourceEvaluationIds.includes(t):!1}function ot(e,t){return e.ranksByMetric[t]??e.best_rank??9999}function Lr(e,t,r){if(e.length===0)return{points:[],sota:0,sotaModel:""};const s=e.map(f=>{var E;const y=he((E=f.metrics)==null?void 0:E[t]),x=f.paper_published_date||"";return{eval:f,value:y,date:x}}).filter(f=>f.value!==null&&!!f.date).sort((f,y)=>f.date.localeCompare(y.date)),a=[];let i=null;for(const f of s){const y=i==null?!0:r==="↓"?f.value<i:f.value>i;y&&(i=f.value),a.push({value:f.value,date:f.date,dateLabel:f.date.slice(0,7),modelName:f.eval.model_name||"",paperTitle:f.eval.paper_title||"",paperRouteId:f.eval.paper_arxiv_id||f.eval.paper_id||null,isSota:y})}const l=e.map(f=>{var y;return{eval:f,value:he((y=f.metrics)==null?void 0:y[t])}}).filter(f=>f.value!==null).sort((f,y)=>r==="↓"?f.value-y.value:y.value-f.value)[0],u=(l==null?void 0:l.value)??0,p=(l==null?void 0:l.eval.model_name)||(l==null?void 0:l.eval.paper_title)||"";return{points:a,sota:u,sotaModel:p}}const Ir=5;function Pr(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 be(e,t){return e?n.jsx(ye,{title:e}):t||"—"}const Yr=()=>{var Le,Ie,Pe,Ae,De,Be,He,Ve,Oe,Ue,We,qe,ze;const{datasetSlug:e}=_t(),[t]=kt(),r=t.get("task")||void 0,s=t.get("eval")||void 0,{preferences:a,setHideClosedSourceEvals:i}=St(),[c,l]=w.useState(void 0),u=w.useRef(null),p=w.useRef(!1),f=w.useRef(null),y=w.useRef(null),x=te({queryKey:["dataset",e,"with-paper",r,a.hide_closed_source_evals?"open":"all"],queryFn:()=>ee.getDatasetBySlug(e,{include_paper:!0,task:r,is_open:a.hide_closed_source_evals?!0:void 0}),enabled:!!e,staleTime:10*60*1e3}),E=te({queryKey:["dataset-evals",(Le=x.data)==null?void 0:Le.id],queryFn:()=>ee.getEvaluationsByDataset(x.data.id),enabled:!!((Ie=x.data)!=null&&Ie.id),staleTime:5*60*1e3}),U=te({queryKey:["dataset-tasks",(Pe=x.data)==null?void 0:Pe.id],queryFn:()=>ee.getDatasetTasks(x.data.id),enabled:!!((Ae=x.data)!=null&&Ae.id),staleTime:10*60*1e3}),ae=te({queryKey:["metric-directions"],queryFn:()=>ee.getMetricDirections(),staleTime:60*60*1e3}),L=w.useMemo(()=>{var d;return!s||!((d=E.data)!=null&&d.length)?null:E.data.find(g=>g.id===s)||null},[s,E.data]),$=w.useMemo(()=>{const d=U.data||[];if(d.length===0)return null;if(L!=null&&L.task_id&&d.some(h=>h.id===L.task_id))return L.task_id;if(r){const h=d.find(S=>S.slug===r);if(h)return h.id}if(d.length===1)return d[0].id;const g=E.data||[];if(g.length>0){const h=new Map;for(const j of g)h.set(j.task_id,(h.get(j.task_id)||0)+1);let S=null,T=-1;for(const j of d){const ue=h.get(j.id)||0;ue>T&&(T=ue,S=j.id)}if(S)return S}return d[0].id},[U.data,E.data,r,L]),z=te({queryKey:["task-benchmark-trends",$,a.hide_closed_source_evals?!0:void 0],queryFn:()=>ee.getTrendingBenchmarks($,{limit:100,min_recent_papers:0,is_open:a.hide_closed_source_evals?!0:void 0}),enabled:!!$&&!!((De=x.data)!=null&&De.id),staleTime:10*60*1e3}),I=w.useMemo(()=>{var d;return(((d=z.data)==null?void 0:d.results)||[]).find(g=>{var h;return g.id===((h=x.data)==null?void 0:h.id)})||null},[z.data,(Be=x.data)==null?void 0:Be.id]),ie=te({queryKey:["leaderboard-metrics",(He=x.data)==null?void 0:He.id,$],queryFn:()=>ee.getLeaderboardMetrics(x.data.id,$),enabled:!!((Ve=x.data)!=null&&Ve.id)&&!!$,staleTime:10*60*1e3}),Y=w.useMemo(()=>Mt(E.data,$,a.hide_closed_source_evals),[E.data,$,a.hide_closed_source_evals]),G=Y.visible,N=Y.hiddenClosed,O=Y.topHiddenClosed,H=w.useMemo(()=>Fr(G),[G]),fe=w.useMemo(()=>{const d=new Set;return H.forEach(g=>{g.best_metric&&d.add(g.best_metric),Object.keys(g.metrics||{}).forEach(h=>d.add(h))}),Array.from(d)},[H]),J=w.useMemo(()=>(ie.data||[]).map(d=>d.metric_name),[ie.data]),A=J.length?J:fe,ce=w.useMemo(()=>{var S;if(H.length===0)return A[0]||"";const d=new Map;for(const T of H)for(const j of Object.keys(T.metrics||{}))J.length&&!A.includes(j)||d.set(j,(d.get(j)||0)+1);let g=null,h=0;for(const[T,j]of d)j>h&&(h=j,g=T);return g||A[0]||((S=H[0])==null?void 0:S.best_metric)||""},[H,A,J]),b=c||(L==null?void 0:L.best_metric)||ce,K=(((Ue=(Oe=ae.data)==null?void 0:Oe.directions)==null?void 0:Ue[b])||"higher_is_better")==="lower_is_better"?"↓":"↑",W=w.useMemo(()=>!b||!A.includes(b)?A:[b,...A.filter(d=>d!==b)],[A,b]),le=w.useMemo(()=>W.length===0?b?[b]:[]:W.slice(0,Ir),[W,b]),{points:oe,sota:pe,sotaModel:o}=w.useMemo(()=>Lr(H,b,K),[H,b,K]),m=(We=x.data)==null?void 0:We.leaderboard_summary,k=E.isSuccess&&U.isSuccess&&ae.isSuccess&&(!$||ie.isSuccess),v=k?b:m==null?void 0:m.metric,M=k?pe:m==null?void 0:m.value,C=k?o:m==null?void 0:m.model_name,V=!k&&!m;w.useEffect(()=>{if(p.current||!s||!E.data||E.data.length===0)return;const d=u.current;d&&(p.current=!0,d.scrollIntoView({behavior:"smooth",block:"start"}))},[s,E.data]);const B=w.useMemo(()=>{const d=U.data||[];return $?d.find(g=>g.id===$)||d[0]||null:d[0]||null},[U.data,$]);if(x.isLoading)return n.jsxs("div",{className:"page",children:[n.jsx(xe,{className:"h-12 w-1/2 mb-6"}),n.jsx(xe,{className:"h-64 w-full"})]});if(x.error||!x.data)return n.jsx("div",{className:"page",children:n.jsx(Ct,{variant:"destructive",children:n.jsx(Et,{children:"Benchmark not found."})})});const _=x.data,Q=H.slice().sort((d,g)=>{var T,j;const h=he((T=d.metrics)==null?void 0:T[b]),S=he((j=g.metrics)==null?void 0:j[b]);return h!==null&&S!==null?K==="↓"?h-S:S-h:h!==null?-1:S!==null?1:ot(d,b)-ot(g,b)}),Fe=!!_.supports_harness,R=s&&Q.find(d=>lt(d,s))||null,F=_.introducing_paper??void 0,de=(F==null?void 0:F.arxiv_id)||(F==null?void 0:F.id)||Pr(_.paper_url),X=(F==null?void 0:F.title)||_.introducing_paper_title||null,Z=((qe=F==null?void 0:F.published)==null?void 0:qe.slice(0,4))||_.introduced_year||null,yt=!!de||!!_.paper_url||!!X,wt=F!=null&&F.arxiv_id||(ze=_.paper_url)!=null&&ze.match(/^https?:\/\/(?:www\.)?arxiv\.org\//i)?`arXiv:${de}`:`Paper ${de}`;return n.jsx("div",{className:"page",children:n.jsxs("div",{className:"bm-page",children:[n.jsxs("div",{className:"breadcrumb",children:[n.jsx(me,{to:"/tasks",children:"Tasks"}),B&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"sep",children:"/"}),n.jsx(me,{to:`/tasks/${B.slug||B.id}`,children:B.name})]}),n.jsx("span",{className:"sep",children:"/"}),n.jsx("span",{style:{color:"var(--accent-text)"},children:_.name})]}),n.jsxs("div",{className:"bm-title-row",children:[n.jsx("h1",{className:"bm-title",children:_.name}),I&&n.jsxs("div",{className:"bm-title-trend","aria-label":`${_.name} reporting trend`,children:[n.jsx(Tt,{history:I.history,benchmarkName:I.name}),n.jsxs("span",{className:"bm-title-trend-summary",children:[n.jsx("strong",{children:I.recent_paper_count})," ",I.recent_paper_count===1?"paper":"papers",I.rate_change==null?I.recent_paper_count>0&&n.jsx("span",{className:"benchmark-trend-change is-new",children:"new"}):n.jsxs("span",{className:`benchmark-trend-change ${I.rate_change>=1?"is-up":"is-down"}`,children:[I.rate_change>=1?"↑":"↓"," ",I.rate_change.toFixed(1),"×"]})]})]})]}),n.jsxs("div",{className:"bm-subtitle",children:[V?n.jsx(xe,{className:"h-5 w-64 bm-summary-skeleton","aria-label":"Loading benchmark summary"}):n.jsxs("span",{children:[v&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"metric-tag",children:v}),n.jsx("span",{style:{color:"var(--hairline-strong)",margin:"0 8px"},children:"·"})]}),C?n.jsxs("span",{children:["Best: ",n.jsx("span",{className:"best-name",children:ne(M)})," by ",n.jsx("span",{className:"best-name",style:{fontStyle:"normal"},children:C})]}):n.jsxs("span",{children:[Q.length," evaluations"]})]}),_.hf_url&&n.jsxs("a",{className:"bm-action-btn",href:_.hf_url,target:"_blank",rel:"noopener noreferrer",children:[n.jsx("span",{"aria-hidden":"true",children:"🤗"})," View on Hugging Face"]})]}),_.description&&n.jsx("p",{className:"bm-description",children:_.description}),a.hide_closed_source_evals&&N.length>0&&n.jsxs("div",{className:"bm-hidden-closed-notice",children:[n.jsxs("span",{children:[N.length," closed-source ",N.length===1?"row is":"rows are"," hidden",O!=null&&O.model_name?n.jsxs(n.Fragment,{children:[", including ",n.jsx("strong",{children:O.model_name})]}):null,"."]}),n.jsx("button",{type:"button",className:"bm-hidden-closed-action",onClick:()=>{i(!1)},children:"Show closed-source"})]}),yt&&n.jsxs("div",{className:"method-source",style:{marginTop:0,marginBottom:18},children:[n.jsx("span",{className:"method-source-label",children:"Source"}),de?n.jsxs(me,{to:`/paper/${de}`,target:"_blank",rel:"noopener noreferrer",className:"method-source-link",children:[n.jsx("span",{className:"method-source-title",children:X?n.jsx(ye,{title:X}):wt}),Z&&n.jsx("span",{className:"method-source-meta",children:Z})]}):_.paper_url?n.jsxs("a",{href:_.paper_url,target:"_blank",rel:"noopener noreferrer",className:"method-source-link",children:[n.jsx("span",{className:"method-source-title",children:X?n.jsx(ye,{title:X}):_.paper_url}),Z&&n.jsx("span",{className:"method-source-meta",children:Z})]}):n.jsxs("div",{className:"method-source-link is-static",children:[n.jsx("span",{className:"method-source-title",children:X?n.jsx(ye,{title:X}):null}),Z&&n.jsx("span",{className:"method-source-meta",children:Z})]})]}),oe.filter(d=>d.isSota).length>=2&&n.jsxs("div",{className:"bm-card",ref:f,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:_.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:[A.length>1&&n.jsxs("label",{className:"bm-view-select",children:[n.jsx("span",{className:"bm-view-select-label",children:"View"}),n.jsx("select",{value:b,onChange:d=>l(d.target.value),children:W.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(Je,{className:"bm-closed-toggle-switch",checked:!a.hide_closed_source_evals,onCheckedChange:d=>{i(!d)},"aria-label":"Show closed-source models"}),n.jsx("span",{className:"bm-closed-toggle-label",children:"Closed-source"})]}),n.jsx(ct,{targetRef:f,label:"SOTA chart"})]})]}),n.jsx("div",{className:"bm-chart-wrap",children:n.jsx(Lt,{points:oe,metric:b})}),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"]})]}),R&&(()=>{var T,j;const d=R.paper_arxiv_id||R.paper_id,g=R.paper_title||(R.paper_arxiv_id?`arXiv:${R.paper_arxiv_id}`:null),h=R.best_metric&&((T=R.metrics)==null?void 0:T[R.best_metric])!==void 0?R.best_metric:b,S=(j=R.metrics)==null?void 0:j[h];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:[R.model_name||g||"—",R.harness?` · ${R.harness}`:""]}),n.jsxs("span",{className:"bm-highlight-meta",children:[S!==void 0&&h?n.jsxs(n.Fragment,{children:[h,": ",ne(S),g?" · ":""]}):null,d?n.jsx(me,{to:`/paper/${d}`,children:be(R.paper_title,g)}):be(R.paper_title,g)]})]})]})})(),n.jsxs("div",{className:"bm-card",ref:y,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:_.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:[A.length>1&&n.jsxs("label",{className:"bm-view-select",children:[n.jsx("span",{className:"bm-view-select-label",children:"View"}),n.jsx("select",{value:b,onChange:d=>l(d.target.value),children:W.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(Je,{className:"bm-closed-toggle-switch",checked:!a.hide_closed_source_evals,onCheckedChange:d=>{i(!d)},"aria-label":"Show closed-source models"}),n.jsx("span",{className:"bm-closed-toggle-label",children:"Closed-source"})]}),n.jsx(ct,{targetRef:y,label:"leaderboard"})]})]}),E.isLoading?n.jsx("div",{style:{padding:16},children:Array.from({length:5}).map((d,g)=>n.jsx(xe,{className:"h-10 w-full mb-2"},g))}):Q.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"}),Fe&&n.jsx("th",{className:"col-harness",children:"Harness"}),le.map(d=>{const g=d===b;return n.jsx("th",{className:`col-value ${g?"is-active":""}`,"aria-sort":g?K==="↓"?"ascending":"descending":"none",children:n.jsxs("button",{type:"button",className:"bm-metric-header",onClick:()=>l(d),"aria-pressed":g,title:`Sort by ${d}`,children:[d,g?` ${K}`:""]})},d)}),n.jsx("th",{className:"col-paper",children:"Paper"}),n.jsx("th",{className:"col-year",children:"Year"})]})}),n.jsx("tbody",{children:(()=>{let d=null,g=0;return Q.map((h,S)=>{var Ke,Qe;const T=he((Ke=h.metrics)==null?void 0:Ke[b]);let j=null;T!==null&&((d===null||T!==d)&&(g=S+1,d=T),j=g);const ue=h.paper_arxiv_id||h.paper_id,Ge=h.paper_title||(h.paper_arxiv_id?`arXiv:${h.paper_arxiv_id}`:null),ke=lt(h,s);return n.jsxs("tr",{ref:ke?u:void 0,className:ke?"is-highlighted":void 0,children:[n.jsx("td",{className:"col-rank",children:j??"—"}),n.jsxs("td",{className:"col-model",children:[ke&&n.jsx("span",{className:"bm-row-marker","aria-hidden":"true"}),h.hf_model_url?n.jsx("a",{href:h.hf_model_url,target:"_blank",rel:"noopener noreferrer",className:"bm-model-link",title:`Open ${h.model_name||"model"} on Hugging Face`,children:h.model_name||"—"}):h.model_name||"—",h.is_open===!1&&n.jsx(Nt,{}),(h.external??h.is_external)&&n.jsx(Rt,{sourceUrl:h.source_url||h.external_source_url||h.result_url})]}),Fe&&n.jsx("td",{className:"col-harness",children:h.harness||"—"}),le.map(Se=>{var Ye;const Xe=Se===b,ge=(Ye=h.metrics)==null?void 0:Ye[Se];return n.jsx("td",{className:`col-value${Xe?" is-active":""}${Xe&&j===1?" is-best":""}`,children:ge!=null&&ge!==""?ne(ge):"—"},Se)}),n.jsx("td",{className:"col-paper",children:ue?n.jsx(me,{to:`/paper/${ue}`,children:be(h.paper_title,Ge)}):be(h.paper_title,Ge)}),n.jsx("td",{className:"col-year",children:((Qe=h.paper_published_date)==null?void 0:Qe.slice(0,4))||"—"})]},h.id)})})()})]})})]})]})})};export{Yr as default};
assets/{BenchmarkTrendSparkline-BaFH-Xk5.js → BenchmarkTrendSparkline-CemWtN8L.js} RENAMED
@@ -1 +1 @@
1
- import{r as C,j as t}from"./index-eBKbcCso.js";const g=112,p=42,o=5,m=5,b=new Intl.DateTimeFormat("en",{month:"short",timeZone:"UTC"}),y=(e,d)=>{const r=new Date(`${e}T00:00:00Z`),n=new Date(`${d}T00:00:00Z`);return r.getUTCMonth()===n.getUTCMonth()?`${b.format(r)} ${r.getUTCDate()}–${n.getUTCDate()}`:`${b.format(r)} ${r.getUTCDate()}–${b.format(n)} ${n.getUTCDate()}`},I=({history:e,benchmarkName:d,interactive:r=!1})=>{const[n,x]=C.useState(null),h=e.map(s=>s.paper_count),M=Math.max(1,...h),f=g-o*2,T=p-m*2,v=h.length>1?f/(h.length-1):0,a=h.map((s,c)=>({x:o+v*c,y:m+T-s/M*T})),$=a.map(({x:s,y:c})=>`${s},${c}`).join(" "),_=a.length?`${o},${p-m} ${$} ${a[a.length-1].x},${p-m}`:"",D=h.reduce((s,c)=>s+c,0),u=49,N=14,i=n==null?null:a[n],j=i?Math.min(g-o-u,Math.max(o,i.x-u/2)):0,k=i?i.y>p/2?i.y-N-3:i.y+3:0;return t.jsxs("svg",{className:`benchmark-trend-sparkline${r?" is-interactive":""}`,viewBox:`0 0 ${g} ${p}`,role:r?"group":"img","aria-label":`${d}: ${D} reporting papers across the displayed trend history`,children:[t.jsxs("title",{children:[d,": ",D," reporting papers across the displayed trend history"]}),t.jsx("line",{className:"benchmark-trend-axis",x1:o,y1:p-m,x2:g-o,y2:p-m}),t.jsx("line",{className:"benchmark-trend-axis",x1:o,y1:m,x2:o,y2:p-m}),_&&t.jsx("polygon",{className:"benchmark-trend-area",points:_}),$&&t.jsx("polyline",{className:"benchmark-trend-line",points:$}),r?a.map(({x:s,y:c},l)=>t.jsxs("g",{className:"benchmark-trend-point",tabIndex:0,role:"img","aria-label":`${y(e[l].start_date,e[l].end_date)}: ${e[l].paper_count} ${e[l].paper_count===1?"paper":"papers"}`,onMouseEnter:()=>x(l),onMouseLeave:()=>x(null),onFocus:()=>x(l),onBlur:()=>x(null),children:[t.jsx("circle",{className:"benchmark-trend-point-hit",cx:s,cy:c,r:"5"}),t.jsx("circle",{className:"benchmark-trend-point-mark",cx:s,cy:c,r:"1.8"})]},`${e[l].start_date}-${e[l].end_date}`)):a.length>0&&t.jsx("circle",{className:"benchmark-trend-dot",cx:a[a.length-1].x,cy:a[a.length-1].y,r:"2.6"}),i&&n!=null&&t.jsxs("g",{className:"benchmark-trend-tooltip",pointerEvents:"none",children:[t.jsx("rect",{x:j,y:k,width:u,height:N,rx:"2"}),t.jsx("text",{x:j+3,y:k+5.4,children:y(e[n].start_date,e[n].end_date)}),t.jsxs("text",{className:"benchmark-trend-tooltip-value",x:j+3,y:k+11,children:[e[n].paper_count," ",e[n].paper_count===1?"paper":"papers"]})]})]})};export{I as B};
 
1
+ import{r as C,j as t}from"./index-B2CsYqS1.js";const g=112,p=42,o=5,m=5,b=new Intl.DateTimeFormat("en",{month:"short",timeZone:"UTC"}),y=(e,d)=>{const r=new Date(`${e}T00:00:00Z`),n=new Date(`${d}T00:00:00Z`);return r.getUTCMonth()===n.getUTCMonth()?`${b.format(r)} ${r.getUTCDate()}–${n.getUTCDate()}`:`${b.format(r)} ${r.getUTCDate()}–${b.format(n)} ${n.getUTCDate()}`},I=({history:e,benchmarkName:d,interactive:r=!1})=>{const[n,x]=C.useState(null),h=e.map(s=>s.paper_count),M=Math.max(1,...h),f=g-o*2,T=p-m*2,v=h.length>1?f/(h.length-1):0,a=h.map((s,c)=>({x:o+v*c,y:m+T-s/M*T})),$=a.map(({x:s,y:c})=>`${s},${c}`).join(" "),_=a.length?`${o},${p-m} ${$} ${a[a.length-1].x},${p-m}`:"",D=h.reduce((s,c)=>s+c,0),u=49,N=14,i=n==null?null:a[n],j=i?Math.min(g-o-u,Math.max(o,i.x-u/2)):0,k=i?i.y>p/2?i.y-N-3:i.y+3:0;return t.jsxs("svg",{className:`benchmark-trend-sparkline${r?" is-interactive":""}`,viewBox:`0 0 ${g} ${p}`,role:r?"group":"img","aria-label":`${d}: ${D} reporting papers across the displayed trend history`,children:[t.jsxs("title",{children:[d,": ",D," reporting papers across the displayed trend history"]}),t.jsx("line",{className:"benchmark-trend-axis",x1:o,y1:p-m,x2:g-o,y2:p-m}),t.jsx("line",{className:"benchmark-trend-axis",x1:o,y1:m,x2:o,y2:p-m}),_&&t.jsx("polygon",{className:"benchmark-trend-area",points:_}),$&&t.jsx("polyline",{className:"benchmark-trend-line",points:$}),r?a.map(({x:s,y:c},l)=>t.jsxs("g",{className:"benchmark-trend-point",tabIndex:0,role:"img","aria-label":`${y(e[l].start_date,e[l].end_date)}: ${e[l].paper_count} ${e[l].paper_count===1?"paper":"papers"}`,onMouseEnter:()=>x(l),onMouseLeave:()=>x(null),onFocus:()=>x(l),onBlur:()=>x(null),children:[t.jsx("circle",{className:"benchmark-trend-point-hit",cx:s,cy:c,r:"5"}),t.jsx("circle",{className:"benchmark-trend-point-mark",cx:s,cy:c,r:"1.8"})]},`${e[l].start_date}-${e[l].end_date}`)):a.length>0&&t.jsx("circle",{className:"benchmark-trend-dot",cx:a[a.length-1].x,cy:a[a.length-1].y,r:"2.6"}),i&&n!=null&&t.jsxs("g",{className:"benchmark-trend-tooltip",pointerEvents:"none",children:[t.jsx("rect",{x:j,y:k,width:u,height:N,rx:"2"}),t.jsx("text",{x:j+3,y:k+5.4,children:y(e[n].start_date,e[n].end_date)}),t.jsxs("text",{className:"benchmark-trend-tooltip-value",x:j+3,y:k+11,children:[e[n].paper_count," ",e[n].paper_count===1?"paper":"papers"]})]})]})};export{I as B};
assets/{ChatMessage-CsXFCs8i.js → ChatMessage-CY41UkDl.js} RENAMED
@@ -1,4 +1,4 @@
1
- import{c as $,r as j,j as t,R as g}from"./index-eBKbcCso.js";import{M as k,S as N,A as R,n as P,o as _,s as C}from"./chatSessions-L9GbPmnt.js";import"./katex.min-BSBacQyE.js";import{H as S,a as T,b as I}from"./hover-card-CdeSv7Gc.js";import{P as M,r as U,a as H}from"./PaperPreviewLink-BrlkKB05.js";import{M as F,r as L,d as O}from"./index-LmPbjihc.js";/**
2
  * @license lucide-react v0.462.0 - ISC
3
  *
4
  * This source code is licensed under the ISC license.
 
1
+ import{c as $,r as j,j as t,R as g}from"./index-B2CsYqS1.js";import{M as k,S as N,A as R,n as P,o as _,s as C}from"./chatSessions-Roa-dbFO.js";import"./katex.min-BSBacQyE.js";import{H as S,a as T,b as I}from"./hover-card-DfDU2jCA.js";import{P as M,r as U,a as H}from"./PaperPreviewLink-DyP6osoH.js";import{M as F,r as L,d as O}from"./index-6E7p68ra.js";/**
2
  * @license lucide-react v0.462.0 - ISC
3
  *
4
  * This source code is licensed under the ISC license.
assets/{ChatView-exilf4p2.js → ChatView-DEbm5NTT.js} RENAMED
@@ -1,16 +1,16 @@
1
- import{c as Ze,d as Re,r as i,e as et,u as tt,a as nt,f as rt,g as st,j as a}from"./index-eBKbcCso.js";import{C as je,U as at,A as ot}from"./ChatMessage-CsXFCs8i.js";import{c as it,g as ve,t as He,r as ct,F as lt,D as dt,l as ut,C as Ie,a as Ne,b as Ae,d as ht,e as ft,P as mt,f as De,h as pt,T as gt,S as Pe,u as Me,i as yt,j as bt}from"./chatSessions-L9GbPmnt.js";import{S as wt}from"./chatPrompts-CDY3UGU1.js";import"./katex.min-BSBacQyE.js";import"./hover-card-CdeSv7Gc.js";import"./PaperPreviewLink-BrlkKB05.js";import"./index-LmPbjihc.js";import"./useQuery-DIrXGOA7.js";import"./useBaseQuery-CZIeK7IO.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 _t=Ze("Share2",[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]]),A=(l,u)=>new Promise(m=>{const D=setTimeout(f,l);function f(){u==null||u.removeEventListener("abort",f),clearTimeout(D),m()}u==null||u.addEventListener("abort",f)}),V=l=>({arxiv_id:null,source:"arxiv",source_url:null,thumbnail_url:null,authors:[],published:null,conference:null,citation_count:null,tasks:[],methods:[],repositories:[],project_pages:[],...l}),H={name:"Object Detection",slug:"object-detection"},$={name:"Real-Time Object Detection",slug:"real-time-object-detection"},vt={"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:V({arxiv_id:"2502.12524",authors:[{name:"Y. Tian"},{name:"Q. Ye"},{name:"D. Doermann"}],published:"2025-02-18",citation_count:412,tasks:[H,$],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:V({arxiv_id:"2407.17140",authors:[{name:"W. Lv"},{name:"Y. Zhao"},{name:"J. Chang"}],published:"2024-07-24",citation_count:268,tasks:[H,$],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:V({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:[H,$],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:V({arxiv_id:"2406.03459",authors:[{name:"Q. Chen"},{name:"X. Su"},{name:"X. Zhang"}],published:"2024-06-05",citation_count:94,tasks:[H,$],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:V({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:[H,$],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:V({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:[H,$],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:V({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"},H],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:V({source:"external",source_url:"https://docs.ultralytics.com/models/",authors:[{name:"Ultralytics"}],published:"2025-01-02",tasks:[H,$],repositories:[{url:"https://github.com/ultralytics/ultralytics",stars:46e3}],project_pages:[{url:"https://docs.ultralytics.com"}]})}},Ge=l=>l.map(u=>vt[u]),Ye=Ge(["2502.12524","2407.17140","2410.13842","2406.03459","2304.08069","2405.14458","2401.17270","158342"]),Fe=Ge(["2410.13842","2502.12524","2407.17140","2405.14458","2304.08069"]),Ue="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.",qe="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.",Be=`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.
7
 
8
  **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.
9
 
10
  **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.
11
 
12
- **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.`,Rt=["How do these compare on edge devices like Jetson?","Show me open-vocabulary detectors","What about small-object detection?"];async function*xt(l,u){const m=()=>(u==null?void 0:u.aborted)===!0,D=l.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 A(350,u),!m()){yield{type:"reasoning_start"};for(let f=0;f<Ue.length;f+=6){if(await A(14,u),m())return;yield{type:"reasoning_delta",text:Ue.slice(f,f+6)}}if(await A(400,u),!m()&&(yield{type:"reasoning_end"},await A(300,u),!m()&&(yield{type:"tool_call",id:"call_1",name:"search_papers",args:{query:D,top_k:8}},await A(1100,u),!m()&&(yield{type:"tool_result",id:"call_1",hits:Ye.length,took_ms:214,results:Ye},await A(350,u),!m())))){yield{type:"reasoning_start"};for(let f=0;f<qe.length;f+=6){if(await A(14,u),m())return;yield{type:"reasoning_delta",text:qe.slice(f,f+6)}}if(await A(350,u),!m()&&(yield{type:"reasoning_end"},await A(300,u),!m()&&(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 A(900,u),!m()&&(yield{type:"tool_result",id:"call_2",hits:Fe.length,took_ms:176,results:Fe},await A(400,u),!m())))){for(let f=0;f<Be.length;f+=4){if(await A(11,u),m())return;yield{type:"answer_delta",text:Be.slice(f,f+4)}}yield{type:"done",followups:Rt,finish_reason:"success"}}}}}const fe=()=>{const u=String("0").trim().toLowerCase();return u==="1"||u==="true"||u==="yes"};function St(l,u){if(fe())try{fetch(Re(`/api/v1/chat/latency/${encodeURIComponent(l)}`),{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",keepalive:!0,body:JSON.stringify(u)}).catch(()=>{})}catch{}}function Ot(l,u={}){return fe()?Tt(l,u.signal):xt(l.message,u.signal)}async function*Tt(l,u){const m=await fetch(Re("/api/v1/chat/stream"),{method:"POST",headers:{"Content-Type":"application/json",Accept:"text/event-stream"},credentials:"include",body:JSON.stringify(l),signal:u});if(!m.ok||!m.body){const L=await m.json().catch(()=>null),S=L==null?void 0:L.detail;throw new Error((S==null?void 0:S.message)||S||`Chat stream failed (${m.status})`)}const D=m.body.getReader(),f=new TextDecoder;let C="";try{for(;;){const{done:L,value:S}=await D.read();if(L)break;C+=f.decode(S,{stream:!0});let _;for(;(_=C.indexOf(`
13
 
14
  `))!==-1;){const R=C.slice(0,_);C=C.slice(_+2);const j=R.split(`
15
  `).filter(O=>O.startsWith("data:")).map(O=>O.slice(5).trimStart()).join(`
16
- `);!j||j==="[DONE]"||(yield JSON.parse(j))}}}finally{D.releaseLock()}}const We="Preparing research workspace…",kt=750;function Ct(l){const[u,m]=i.useState([]),[D,f]=i.useState(!1),[C,L]=i.useState(""),S=i.useRef(!1),_=i.useRef(null),R=i.useRef(null),j=i.useRef("cleared"),O=i.useRef(null),T=i.useRef([]),g=i.useRef(l),F=i.useRef(""),z=i.useRef(""),me=i.useRef(0),N=i.useRef(0),Y=i.useRef(l.sessionId),Z=i.useRef(l.sessionId);Z.current!==l.sessionId&&(Z.current=l.sessionId,Y.current!==l.sessionId&&(N.current+=1)),g.current=l,T.current=u,i.useEffect(()=>()=>{var t;R.current!==null&&window.clearTimeout(R.current),(t=_.current)==null||t.abort()},[]),i.useEffect(()=>{S.current||(Y.current=l.sessionId)},[l.sessionId]);const pe=i.useMemo(()=>{const t={};for(const s of u)for(const o of s.blocks??[])if(o.kind==="tool")for(const c of o.results??[])t[c.route_id]=c;return t},[u]),P=()=>`m${++me.current}_${Date.now().toString(36)}`,k=t=>m(s=>{if(!s.length)return s;const o=s.slice();return o[o.length-1]=t(o[o.length-1]),o}),ae=t=>k(s=>({...s,blocks:[...s.blocks??[],t]})),U=(t,s)=>k(o=>({...o,blocks:(o.blocks??[]).map((c,w,h)=>t(c,w,h)?s(c):c)})),J=t=>(s,o,c)=>s.kind===t&&c.findLastIndex(w=>w.kind===t)===o,M=t=>{if(_.current!==t||(R.current!==null&&(window.clearTimeout(R.current),R.current=null),j.current==="cleared"))return;const s=j.current==="shown";j.current="cleared",s&&k(o=>{if(o.status!==We)return o;const{status:c,...w}=o;return w})},B=(t,s)=>{t.requestId&&St(t.requestId,s)},ee=(t,s)=>{const o=O.current;!o||o.controller!==t||(o.requestId=s,o.streamStartReported||(o.streamStartReported=!0,B(o,{submission_to_stream_start_ms:Math.max(0,performance.now()-o.submittedAt)})),o.firstVisibleAt!==void 0&&!o.firstVisibleReported&&(o.firstVisibleReported=!0,B(o,{submission_to_first_visible_delta_ms:Math.max(0,o.firstVisibleAt-o.submittedAt)})))},q=(t,s)=>{const o=O.current;!o||o.controller!==t||o.terminalReported||(o.terminalReported=!0,B(o,{terminal_classification:s}))};i.useLayoutEffect(()=>{const t=O.current;if(!t||t.firstVisibleAt!==void 0)return;const s=u.at(-1);(s==null?void 0:s.role)!=="assistant"||!(s.blocks??[]).some(c=>c.kind==="tool"||c.kind==="reasoning"&&!!c.text.trim()||c.kind==="answer"&&!!c.text.trim())||(t.firstVisibleAt=performance.now(),t.requestId&&!t.firstVisibleReported&&(t.firstVisibleReported=!0,B(t,{submission_to_first_visible_delta_ms:Math.max(0,t.firstVisibleAt-t.submittedAt)})))},[u]);const oe=t=>{switch(t.type){case"stream_start":t.session_id&&(Y.current=t.session_id,g.current.onSessionId(t.session_id));break;case"sandbox_start":case"sandbox_ready":case"workspace_ready":break;case"session_title_start":z.current="";break;case"session_title_delta":z.current+=t.text,g.current.onTitle(z.current.replace(/\s+/g," ").slice(0,80));break;case"session_title_done":z.current=t.title,g.current.onTitle(t.title);break;case"reasoning_start":ae({kind:"reasoning",text:"",active:!0,open:!0});break;case"reasoning_delta":U(J("reasoning"),s=>s.kind==="reasoning"?{...s,text:s.text+t.text}:s);break;case"reasoning_end":U(J("reasoning"),s=>s.kind==="reasoning"?{...s,active:!1,open:!1}:s);break;case"tool_call":ae({kind:"tool",id:t.id,name:t.name,args:t.args,status:"running",open:!1});break;case"tool_result":U(s=>s.kind==="tool"&&s.id===t.id,s=>s.kind==="tool"?t.status?{...s,schema_version:2,status:t.status,took_ms:t.took_ms,content:t.content,metadata:t.metadata,open:t.status!=="success"}:{...s,status:"done",hits:t.hits,took_ms:t.took_ms,results:t.results}:s);break;case"answer_delta":k(s=>{const o=s.blocks??[],c=o.at(-1);return(c==null?void 0:c.kind)==="answer"&&!c.done?{...s,blocks:[...o.slice(0,-1),{...c,text:c.text+t.text}]}:{...s,blocks:[...o,{kind:"answer",text:t.text,done:!1}]}});break;case"done":k(s=>({...s,streaming:!1,followups:t.followups,finishReason:t.finish_reason,citations:t.citations,blocks:(s.blocks??[]).map(o=>o.kind==="answer"?{...o,done:!0}:o)}));break;case"error":k(s=>({...s,streaming:!1,error:t.message,errorCode:t.code}));break}},G=async(t,s)=>{const o=await ve(t),c=He(o);return N.current!==s?null:(m(c),T.current=c,c)},ie=(t,s,o,c)=>{const w=++N.current;S.current=!0;const h=new AbortController;return _.current=h,F.current=t,Y.current=s.session_id,L(""),m(o),f(!0),O.current={controller:h,submittedAt:performance.now(),streamStartReported:!1,firstVisibleReported:!1,terminalReported:!1},R.current!==null&&window.clearTimeout(R.current),j.current="armed",R.current=window.setTimeout(()=>{R.current=null,!(_.current!==h||h.signal.aborted||N.current!==w)&&(j.current="shown",k(x=>{var y;return x.role==="assistant"&&x.streaming&&(((y=x.blocks)==null?void 0:y.length)??0)===0&&!x.error?{...x,status:We}:x}))},kt),(async()=>{var E;let x=!1,y=!1,I=!1;try{for await(const b of Ot(s,{signal:h.signal}))b.type==="stream_start"&&(x=!0,ee(h,b.request_id)),(b.type==="workspace_ready"||b.type==="reasoning_start"||b.type==="reasoning_delta"||b.type==="tool_call"||b.type==="answer_delta"||b.type==="done"||b.type==="error")&&M(h),(b.type==="done"||b.type==="error")&&(y=!0,I=b.type==="error",q(h,b.type==="error"?"error":"complete")),h.signal.aborted||oe(b)}catch(b){I=!0,h.signal.aborted||(M(h),q(h,"network_error"),oe({type:"error",message:b instanceof Error?b.message:"The assistant stream failed."}))}finally{if(_.current===h){if(M(h),!y&&!h.signal.aborted&&q(h,"network_error"),S.current=!1,f(!1),!h.signal.aborted){const b=Y.current;if(c&&!x)m(c.snapshot),T.current=c.snapshot,L("Couldn’t resend this message. Your original conversation was restored.");else if(b){c&&!c.first&&(I||!y)&&(m(c.snapshot),T.current=c.snapshot);try{const d=await G(b,w);d&&c&&!c.first&&d.some(de=>de.id===c.targetId)&&L("Couldn’t resend this message. Your original conversation was restored.")}catch{N.current===w&&k(d=>d.streaming?{...d,streaming:!1}:d)}}else k(d=>d.streaming?{...d,streaming:!1}:d);g.current.onSettled(b)}((E=O.current)==null?void 0:E.controller)===h&&(O.current=null)}}})(),!0},X=i.useCallback(t=>{const s=t.trim();if(!s||s.length>8e3||S.current)return!1;const o=T.current,c=[...o].reverse().find(E=>E.role==="user"),w=c!=null&&c.status&&c.status!=="complete"&&c.revision?{replace_message_id:c.id,prior_revision:c.revision}:null,h={id:P(),role:"user",text:s},x={id:P(),role:"assistant",streaming:!0,blocks:[]},y=w&&c?o.findLastIndex(E=>E.id===c.id):-1,I=y<0?[...o,h,x]:[...o.slice(0,y),h,x];return ie(s,{message:s,session_id:g.current.sessionId,client_message_id:crypto.randomUUID(),...!g.current.sessionId&&g.current.initialModel?{initial_model:g.current.initialModel}:{},...w??{}},I)},[]),ce=i.useCallback((t,s)=>{const o=s.trim();if(!o||o.length>8e3||S.current)return!1;const c=T.current.slice(),w=c.findIndex(d=>d.id===t&&d.role==="user");if(w<0)return!1;const h=c[w],x=c.findIndex(d=>d.role==="user"),y=w===x;if(!y&&(!g.current.sessionId||!h.revision))return!1;const I={id:h.id,role:"user",text:o,revision:y?void 0:h.revision+1,status:"generating"},E={id:P(),role:"assistant",streaming:!0,blocks:[]},b=y?[I,E]:[...c.slice(0,w),I,E];return ie(o,{message:o,session_id:y?null:g.current.sessionId,client_message_id:crypto.randomUUID(),...y&&g.current.initialModel?{initial_model:g.current.initialModel}:{},...y?{}:{replace_message_id:h.id,prior_revision:h.revision}},b,{targetId:h.id,snapshot:c,first:y})},[]),te=i.useCallback(()=>{var c;if(!_.current)return;const t=_.current;M(t),q(t,"stopped"),t.abort(),_.current=null,((c=O.current)==null?void 0:c.controller)===t&&(O.current=null),S.current=!1,f(!1),m(w=>{const h=w.at(-1);if((h==null?void 0:h.role)!=="assistant")return w;const x=(h.blocks??[]).flatMap(y=>y.kind==="tool"&&y.status==="running"?[]:y.kind==="reasoning"&&y.active?[]:y.kind==="answer"?[{...y,done:!0}]:[y]);return[...w.slice(0,-1),{...h,blocks:x,streaming:!1,finishReason:"stopped"}]}),g.current.onInterrupted(F.current);const s=Y.current;s&&it(s).catch(()=>{});const o=++N.current;window.setTimeout(()=>{s&&N.current===o?G(s,o).catch(()=>{}).finally(()=>g.current.onSettled(s)):s||g.current.onSettled(null)},450)},[]),W=i.useCallback((t,s)=>m(o=>o.map(c=>{var w;return c.id!==t?c:{...c,blocks:(w=c.blocks)==null?void 0:w.map((h,x)=>x===s&&(h.kind==="reasoning"||h.kind==="tool")?{...h,open:!h.open}:h)}})),[]),K=i.useCallback(()=>{var t;N.current+=1,R.current!==null&&(window.clearTimeout(R.current),R.current=null),j.current="cleared",(t=_.current)==null||t.abort(),_.current=null,O.current=null,S.current=!1,Y.current=null,m([]),f(!1),L("")},[]),le=i.useCallback(t=>{var s;N.current+=1,R.current!==null&&(window.clearTimeout(R.current),R.current=null),j.current="cleared",(s=_.current)==null||s.abort(),_.current=null,O.current=null,S.current=!1,m(t),f(!1),L("")},[]);return{messages:u,busy:D,papers:pe,sessionError:C,send:X,editAndResend:ce,stop:te,toggleBlock:W,reset:K,load:le}}const Et="https://huggingface.co/settings/inference-providers",Ve=()=>fe()?a.jsxs("div",{className:"chat-billing-notice",role:"note",children:[a.jsx("span",{children:"Hugging Face applies your included monthly credits first. After they run out, further chats use pay-as-you-go billing when enabled."}),a.jsx("a",{href:Et,target:"_blank",rel:"noreferrer",children:"Review usage"})]}):null,qt=()=>{var Ce,Ee,Le;const{sessionId:l}=et(),u=tt(),[m,D]=nt(),{user:f,isLoading:C}=rt(),{toast:L}=st(),[S,_]=i.useState([]),[R,j]=i.useState(!1),[O,T]=i.useState(""),[g,F]=i.useState(()=>l?{id:l,status:"loading"}:null),[z,me]=i.useState(0),N=i.useRef(ct()),Y=i.useRef(m.get("model")||((Ce=N.current)==null?void 0:Ce.model)),[Z,pe]=i.useState(lt),[P,k]=i.useState(Y.current||dt),[ae,U]=i.useState(""),[J,M]=i.useState(""),[B,ee]=i.useState(()=>{var e,n;return((e=m.get("q"))==null?void 0:e.trim())||((n=N.current)==null?void 0:n.prompt)||""}),q=i.useRef(!1),[oe,G]=i.useState(null),[ie,X]=i.useState(null),[ce,te]=i.useState(""),[W,K]=i.useState(null),[le,t]=i.useState(()=>typeof window>"u"||window.innerWidth>900),[s,o]=i.useState(!1),[c,w]=i.useState(""),h=i.useRef(new Set),x=i.useRef(!1),y=i.useRef(l),I=i.useRef(null),E=i.useRef(null);y.current=l;const b=i.useCallback(async()=>{if(!f)return;const e=!x.current;e&&j(!0);try{const n=await ut();_(r=>{const p=I.current,v=p?r.find(se=>se.id===p):void 0;if(!v)return n;const he=n.find(se=>se.id===p);return[he?{...he,title:v.title,is_busy:!0}:v,...n.filter(se=>se.id!==p)]}),x.current=!0,T("")}catch(n){T(n instanceof Error?n.message:"Could not load chats")}finally{e&&j(!1)}},[f]),d=Ct({sessionId:l??null,initialModel:P,onSessionId:e=>{I.current=e;const n=e!==y.current,r=new Date().toISOString();_(p=>p.some(v=>v.id===e)?p.map(v=>v.id===e?{...v,is_busy:!0}:v):[{id:e,title:"New chat",selected_model:P,created_at:r,updated_at:r,message_count:1,is_busy:!0},...p]),n&&U("New chat"),E.current=e,F({id:e,status:"loaded"}),u(`/chat/${e}`,{replace:!0})},onTitle:e=>{const n=I.current??y.current;n&&!h.current.has(n)&&(U(e),_(r=>r.map(p=>p.id===n?{...p,title:e}:p)))},onSettled:e=>{e&&_(n=>n.map(r=>r.id===e?{...r,is_busy:!1}:r)),I.current=null,b()},onInterrupted:e=>{M(e)}});d.load;const de=d.send;i.useEffect(()=>{d.busy&&G(null)},[d.busy]);const ne=i.useCallback(e=>{if(!f){sessionStorage.setItem(Ie,e),sessionStorage.setItem(Ne,P),sessionStorage.setItem(Ae,"1"),window.location.href=Re(`/api/v1/auth/hf/login?return_to=${encodeURIComponent("/chat")}`);return}de(e)&&(ht(),M(""))},[P,de,f]);i.useEffect(()=>{if(C||!f)return;const e=sessionStorage.getItem(Ne);e&&k(e),b(),ft().then(p=>{if(pe(p.items),!y.current){const v=Y.current||e;k(v&&p.items.some(he=>he.id===v)?v:p.default_model)}});const n=sessionStorage.getItem(Ie),r=sessionStorage.getItem(Ae)==="1";n&&(r?ee(n):M(n))},[C,b,f]),i.useEffect(()=>{if(!l){E.current!==null&&(E.current=null,d.reset()),F(null);return}if(E.current===l||(F(n=>(n==null?void 0:n.id)===l&&n.status==="loading"?n:{id:l,status:"loading"}),C||!f||d.busy))return;let e=!1;return T(""),ve(l).then(n=>{e||(d.load(He(n)),k(n.selected_model),U(n.title),E.current=l,F({id:l,status:"loaded"}))}).catch(n=>{if(e)return;const r=n instanceof Error?n.message:"Chat not found";d.reset(),T(r),F({id:l,status:"error",error:r})}),()=>{e=!0}},[C,l,f,d.busy,z]),i.useEffect(()=>{var p;const e=(p=m.get("q"))==null?void 0:p.trim();if(!e)return;q.current=!1;const n=m.get("model");n&&k(n),ee(e);const r=new URLSearchParams(m);r.delete("q"),r.delete("model"),D(r,{replace:!0})},[m,D]),i.useEffect(()=>{if(C||d.busy||!B||q.current)return;const e=window.setTimeout(()=>{if(q.current)return;q.current=!0;const n=B;ee(""),ne(n)},0);return()=>window.clearTimeout(e)},[C,d.busy,B,ne]),i.useEffect(()=>{const e=()=>{!f||d.busy||b()};return window.addEventListener("focus",e),()=>window.removeEventListener("focus",e)},[d.busy,b,f]),i.useEffect(()=>{if(!W)return;const e=()=>K(null),n=r=>{r.key==="Escape"&&e()};return window.addEventListener("click",e),window.addEventListener("keydown",n),()=>{window.removeEventListener("click",e),window.removeEventListener("keydown",n)}},[W]);const xe=()=>{I.current=null,d.reset(),M(""),U(""),u("/chat")},Se=async e=>{const n=ce.trim();if(n)try{const r=await Me(e,{title:n});h.current.add(e),e===l&&U(r.title),_(p=>p.map(v=>v.id===e?r:v)),X(null)}catch(r){T(r instanceof Error?r.message:"Rename failed")}},Ke=async e=>{const n=e===l&&d.busy;if(window.confirm(n?"Stop and delete this chat? This cannot be undone.":"Delete this chat? This cannot be undone.")){n&&d.stop();try{if(n){const r=Date.now()+3e3;for(;(await ve(e)).is_busy;){if(Date.now()>=r)throw new Error("Generation is still stopping. The chat was not deleted.");await new Promise(v=>window.setTimeout(v,150))}}await yt(e),e===l&&xe(),await b()}catch(r){T(r instanceof Error?r.message:"Delete failed")}}},Oe=async e=>{const n=P;if(k(e),!!l)try{const r=await Me(l,{selected_model:e});_(p=>p.map(v=>v.id===l?{...v,selected_model:r.selected_model}:v)),T("")}catch(r){k(n),T(r instanceof Error?r.message:"Model change failed")}},$e=async()=>{var e;if(!(!l||d.busy||s)){o(!0);try{const n=await bt(l),r=new URL(n.public_path,window.location.origin).toString();try{if(!((e=navigator.clipboard)!=null&&e.writeText))throw new Error("Clipboard unavailable");await navigator.clipboard.writeText(r),L({className:"chat-share-toast",duration:5e3,title:"Public link copied to your clipboard",description:"Anyone with this link can see this conversation."})}catch{w(r)}}catch(n){const r=n instanceof Error?n.message:"Could not share this conversation";T(r),L({variant:"destructive",title:"Share failed",description:r})}finally{o(!1)}}},[ze,Je]=i.useState(60);i.useLayoutEffect(()=>{const e=document.querySelector(".app-header");if(!e)return;const n=()=>Je(e.offsetHeight);n();const r=new ResizeObserver(n);return r.observe(e),()=>r.disconnect()},[]);const ge=i.useRef(null),ue=i.useRef(null),re=i.useRef(null);i.useEffect(()=>{d.busy||(re.current=null)},[d.busy]);const Xe=(e,n)=>{var r;ue.current=((r=ge.current)==null?void 0:r.scrollTop)??null,d.toggleBlock(e,n)};i.useLayoutEffect(()=>{const e=ge.current;if(e){if(ue.current!==null){e.scrollTop=ue.current,ue.current=null;return}if(re.current){const n=Array.from(e.querySelectorAll("[data-message-id]")).find(r=>r.dataset.messageId===re.current);if(n){const r=e.getBoundingClientRect(),p=n.getBoundingClientRect();e.scrollTop+=p.top-r.top-24;return}}e.scrollTop=e.scrollHeight}},[d.messages]);const Q=S.find(e=>e.id===l),Te=d.messages.filter(e=>e.role==="user"),ye=(Ee=Te[0])==null?void 0:Ee.id,Qe=(Le=Te.at(-1))==null?void 0:Le.id,be=d.messages.length===0,we=(g==null?void 0:g.id)===l,_e=!!(l&&(C||f&&(!we||(g==null?void 0:g.status)==="loading"))),ke=we&&(g==null?void 0:g.status)==="error"?g.error:void 0;return a.jsxs("div",{className:"chat-page",style:{height:`calc(100dvh - ${ze}px)`},children:[a.jsxs("aside",{className:`chat-sidebar${le?"":" chat-sidebar-closed"}`,children:[a.jsxs("div",{className:"chat-sidebar-top",children:[a.jsxs("button",{type:"button",className:"chat-new-chat",onClick:xe,children:[a.jsx(mt,{})," New chat"]}),a.jsx("button",{type:"button",className:"icon-btn",onClick:()=>t(!1),title:"Collapse sidebar",children:a.jsx(De,{})})]}),a.jsxs("nav",{className:"chat-sessions","aria-label":"Chat history",children:[R&&a.jsx("div",{className:"chat-sessions-empty",children:"Loading chats…"}),!R&&O&&a.jsx("div",{className:"chat-sessions-empty",children:O}),!R&&!O&&S.length===0&&a.jsx("div",{className:"chat-sessions-empty",children:"Conversations you start will show up here."}),pt(S).map(e=>a.jsxs("div",{className:"chat-session-group",children:[a.jsx("div",{className:"chat-session-group-label",children:e.label}),e.items.map(n=>a.jsxs("div",{className:`chat-session${n.id===l?" chat-session-active":""}`,role:"button",tabIndex:0,onClick:()=>u(`/chat/${n.id}`),onKeyDown:r=>{if(r.key==="Enter"&&u(`/chat/${n.id}`),r.key==="F2"&&(X(n.id),te(n.title)),r.key==="ContextMenu"||r.shiftKey&&r.key==="F10"){r.preventDefault();const p=r.currentTarget.getBoundingClientRect();K({id:n.id,x:p.right-150,y:p.bottom})}},onContextMenu:r=>{r.preventDefault(),K({id:n.id,x:r.clientX,y:r.clientY})},children:[ie===n.id?a.jsx("input",{className:"chat-session-title-input",value:ce,autoFocus:!0,maxLength:80,onClick:r=>r.stopPropagation(),onChange:r=>te(r.target.value),onBlur:()=>void Se(n.id),onKeyDown:r=>{r.stopPropagation(),r.key==="Enter"&&Se(n.id),r.key==="Escape"&&X(null)}}):a.jsx("span",{className:"chat-session-title",children:n.title}),a.jsx("button",{type:"button",className:"chat-session-menu","aria-label":"Chat actions","aria-haspopup":"menu",title:"Chat actions",onClick:r=>{r.stopPropagation();const p=r.currentTarget.getBoundingClientRect();K({id:n.id,x:p.right-150,y:p.bottom})},children:"⋯"}),a.jsx("button",{type:"button",className:"chat-session-delete","aria-label":"Delete conversation",onClick:r=>{r.stopPropagation(),Ke(n.id)},children:a.jsx(gt,{})})]},n.id))]},e.label))]}),W&&a.jsx("div",{className:"chat-session-context-menu",role:"menu",style:{left:W.x,top:W.y},onClick:e=>e.stopPropagation(),children:a.jsx("button",{type:"button",role:"menuitem",autoFocus:!0,onClick:()=>{const e=S.find(n=>n.id===W.id);e&&(X(e.id),te(e.title)),K(null)},children:"Rename chat"})})]}),a.jsxs("section",{className:"chat-main",children:[a.jsxs("div",{className:"chat-topbar",children:[!le&&a.jsx("button",{type:"button",className:"icon-btn",onClick:()=>t(!0),title:"Open sidebar",children:a.jsx(De,{})}),a.jsx("span",{className:"chat-topbar-title",children:_e?(Q==null?void 0:Q.title)||"":ae||(Q==null?void 0:Q.title)||(be?"":"New chat")}),l&&we&&(g==null?void 0:g.status)==="loaded"&&!be&&a.jsxs("button",{type:"button",className:"chat-share-button",onClick:()=>void $e(),disabled:d.busy||s||_e,"aria-label":"Share conversation",children:[s?a.jsx(Pe,{}):a.jsx(_t,{"aria-hidden":"true"}),a.jsx("span",{children:"Share"})]})]}),_e?a.jsxs("div",{className:"chat-session-loading",role:"status","aria-live":"polite",children:[a.jsx(Pe,{}),a.jsx("span",{children:"Loading conversation…"})]}):ke?a.jsxs("div",{className:"chat-session-load-error",role:"alert",children:[a.jsx("p",{children:ke}),a.jsx("button",{type:"button",onClick:()=>{F({id:l,status:"loading"}),me(e=>e+1)},children:"Try again"})]}):be?a.jsx("div",{className:"chat-empty",children:a.jsxs("div",{className:"chat-empty-inner",children:[a.jsx("div",{className:"chat-empty-eyebrow",children:"AI research assistant · Staging preview"}),a.jsxs("h1",{className:"chat-empty-title",children:["Ask ",a.jsx("em",{children:"Papers With Code"})]}),a.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."}),a.jsx(Ve,{}),a.jsx(je,{onSend:ne,busy:d.busy,onStop:d.stop,autoFocus:!0,draft:J,onDraftChange:M,models:Z,selectedModel:P,onModelChange:e=>void Oe(e)}),a.jsx("div",{className:"chat-examples",children:wt.map(e=>a.jsx("button",{type:"button",className:"chat-example",onClick:()=>ne(e),children:e},e))})]})}):a.jsxs(a.Fragment,{children:[d.sessionError&&a.jsx("div",{className:"chat-session-error",role:"alert",children:d.sessionError}),a.jsx("div",{className:"chat-conversation",ref:ge,children:a.jsx("div",{className:"chat-conversation-inner",children:d.messages.map(e=>e.role==="user"?a.jsx(at,{id:e.id,text:e.text??"",isInitial:e.id===ye,editingAllowed:!d.busy&&!!e.revision,editing:oe===e.id,editNotice:e.id===ye?"Sending will start a new chat.":e.id===Qe?"Sending will replace the response.":"Sending will replace the response and all messages after it.",onEdit:()=>G(e.id),onCancel:()=>G(null),onResend:n=>{e.id!==ye&&(re.current=e.id);const r=d.editAndResend(e.id,n);return r?G(null):re.current=null,r}},e.id):a.jsx(ot,{msg:e,papers:d.papers,onToggleBlock:Xe},e.id))})}),a.jsx("div",{className:"chat-composer-wrap",children:a.jsxs("div",{className:"chat-composer-inner",children:[a.jsx(Ve,{}),a.jsx(je,{onSend:ne,busy:d.busy,onStop:d.stop,placeholder:J?"Edit and send again…":"Ask a follow-up…",draft:J,onDraftChange:M,models:Z,selectedModel:P,onModelChange:e=>void Oe(e)}),a.jsx("div",{className:"chat-composer-foot",children:fe()?a.jsxs(a.Fragment,{children:[a.jsxs("span",{className:"chat-provider-attribution",children:["Powered by 🤗 ",a.jsx("a",{href:"https://huggingface.co/docs/inference-providers/en/index",target:"_blank",rel:"noreferrer",children:"Inference Providers"}),"."]}),a.jsx("span",{children:"The AI assistant can make mistakes. Double-check responses."})]}):a.jsx(a.Fragment,{children:"Assistant preview — responses are simulated."})})]})})]})]}),c&&a.jsx("div",{className:"chat-share-dialog-backdrop",role:"presentation",onMouseDown:()=>w(""),children:a.jsxs("div",{className:"chat-share-dialog",role:"dialog","aria-modal":"true","aria-labelledby":"chat-share-dialog-title",onMouseDown:e=>e.stopPropagation(),children:[a.jsx("h2",{id:"chat-share-dialog-title",children:"Public link created"}),a.jsx("p",{children:"It could not be copied automatically. Copy this link manually:"}),a.jsx("input",{readOnly:!0,value:c,"aria-label":"Public conversation link",autoFocus:!0,onFocus:e=>e.currentTarget.select()}),a.jsx("button",{type:"button",onClick:()=>w(""),children:"Close"})]})})]})};export{qt as default};
 
1
+ import{c as et,d as Re,r as i,e as tt,u as nt,a as rt,f as st,g as at,j as a}from"./index-B2CsYqS1.js";import{C as je,U as ot,A as it}from"./ChatMessage-CY41UkDl.js";import{c as ct,g as ve,t as Ge,r as lt,F as dt,D as ut,l as ht,C as Ie,a as Ne,b as Ae,d as ft,e as mt,P as pt,f as De,h as gt,T as yt,S as Pe,u as Me,i as bt,j as wt}from"./chatSessions-Roa-dbFO.js";import{S as _t}from"./chatPrompts-CDY3UGU1.js";import"./katex.min-BSBacQyE.js";import"./hover-card-DfDU2jCA.js";import"./PaperPreviewLink-DyP6osoH.js";import"./index-6E7p68ra.js";import"./useQuery-D09nn2D4.js";import"./useBaseQuery-DCY5lvEf.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 vt=et("Share2",[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]]),A=(l,u)=>new Promise(f=>{const D=setTimeout(m,l);function m(){u==null||u.removeEventListener("abort",m),clearTimeout(D),f()}u==null||u.addEventListener("abort",m)}),V=l=>({arxiv_id:null,source:"arxiv",source_url:null,thumbnail_url:null,authors:[],published:null,conference:null,citation_count:null,tasks:[],methods:[],repositories:[],project_pages:[],...l}),H={name:"Object Detection",slug:"object-detection"},$={name:"Real-Time Object Detection",slug:"real-time-object-detection"},Rt={"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:V({arxiv_id:"2502.12524",authors:[{name:"Y. Tian"},{name:"Q. Ye"},{name:"D. Doermann"}],published:"2025-02-18",citation_count:412,tasks:[H,$],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:V({arxiv_id:"2407.17140",authors:[{name:"W. Lv"},{name:"Y. Zhao"},{name:"J. Chang"}],published:"2024-07-24",citation_count:268,tasks:[H,$],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:V({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:[H,$],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:V({arxiv_id:"2406.03459",authors:[{name:"Q. Chen"},{name:"X. Su"},{name:"X. Zhang"}],published:"2024-06-05",citation_count:94,tasks:[H,$],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:V({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:[H,$],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:V({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:[H,$],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:V({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"},H],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:V({source:"external",source_url:"https://docs.ultralytics.com/models/",authors:[{name:"Ultralytics"}],published:"2025-01-02",tasks:[H,$],repositories:[{url:"https://github.com/ultralytics/ultralytics",stars:46e3}],project_pages:[{url:"https://docs.ultralytics.com"}]})}},Ke=l=>l.map(u=>Rt[u]),Ye=Ke(["2502.12524","2407.17140","2410.13842","2406.03459","2304.08069","2405.14458","2401.17270","158342"]),Fe=Ke(["2410.13842","2502.12524","2407.17140","2405.14458","2304.08069"]),Ue="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.",qe="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.",Be=`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.
7
 
8
  **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.
9
 
10
  **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.
11
 
12
+ **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.`,xt=["How do these compare on edge devices like Jetson?","Show me open-vocabulary detectors","What about small-object detection?"];async function*St(l,u){const f=()=>(u==null?void 0:u.aborted)===!0,D=l.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 A(350,u),!f()){yield{type:"reasoning_start"};for(let m=0;m<Ue.length;m+=6){if(await A(14,u),f())return;yield{type:"reasoning_delta",text:Ue.slice(m,m+6)}}if(await A(400,u),!f()&&(yield{type:"reasoning_end"},await A(300,u),!f()&&(yield{type:"tool_call",id:"call_1",name:"search_papers",args:{query:D,top_k:8}},await A(1100,u),!f()&&(yield{type:"tool_result",id:"call_1",hits:Ye.length,took_ms:214,results:Ye},await A(350,u),!f())))){yield{type:"reasoning_start"};for(let m=0;m<qe.length;m+=6){if(await A(14,u),f())return;yield{type:"reasoning_delta",text:qe.slice(m,m+6)}}if(await A(350,u),!f()&&(yield{type:"reasoning_end"},await A(300,u),!f()&&(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 A(900,u),!f()&&(yield{type:"tool_result",id:"call_2",hits:Fe.length,took_ms:176,results:Fe},await A(400,u),!f())))){for(let m=0;m<Be.length;m+=4){if(await A(11,u),f())return;yield{type:"answer_delta",text:Be.slice(m,m+4)}}yield{type:"done",followups:xt,finish_reason:"success"}}}}}const fe=()=>{const u=String("0").trim().toLowerCase();return u==="1"||u==="true"||u==="yes"};function Ot(l,u){if(fe())try{fetch(Re(`/api/v1/chat/latency/${encodeURIComponent(l)}`),{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",keepalive:!0,body:JSON.stringify(u)}).catch(()=>{})}catch{}}function Tt(l,u={}){return fe()?kt(l,u.signal):St(l.message,u.signal)}async function*kt(l,u){const f=await fetch(Re("/api/v1/chat/stream"),{method:"POST",headers:{"Content-Type":"application/json",Accept:"text/event-stream"},credentials:"include",body:JSON.stringify(l),signal:u});if(!f.ok||!f.body){const L=await f.json().catch(()=>null),S=L==null?void 0:L.detail;throw new Error((S==null?void 0:S.message)||S||`Chat stream failed (${f.status})`)}const D=f.body.getReader(),m=new TextDecoder;let C="";try{for(;;){const{done:L,value:S}=await D.read();if(L)break;C+=m.decode(S,{stream:!0});let _;for(;(_=C.indexOf(`
13
 
14
  `))!==-1;){const R=C.slice(0,_);C=C.slice(_+2);const j=R.split(`
15
  `).filter(O=>O.startsWith("data:")).map(O=>O.slice(5).trimStart()).join(`
16
+ `);!j||j==="[DONE]"||(yield JSON.parse(j))}}}finally{D.releaseLock()}}const We="Preparing research workspace…",Ct=750;function Ve(l,u){for(let f=l.length-1;f>=0;f-=1)if(u(l[f]))return f;return-1}function Et(l){const[u,f]=i.useState([]),[D,m]=i.useState(!1),[C,L]=i.useState(""),S=i.useRef(!1),_=i.useRef(null),R=i.useRef(null),j=i.useRef("cleared"),O=i.useRef(null),T=i.useRef([]),g=i.useRef(l),F=i.useRef(""),z=i.useRef(""),me=i.useRef(0),N=i.useRef(0),Y=i.useRef(l.sessionId),Z=i.useRef(l.sessionId);Z.current!==l.sessionId&&(Z.current=l.sessionId,Y.current!==l.sessionId&&(N.current+=1)),g.current=l,T.current=u,i.useEffect(()=>()=>{var t;R.current!==null&&window.clearTimeout(R.current),(t=_.current)==null||t.abort()},[]),i.useEffect(()=>{S.current||(Y.current=l.sessionId)},[l.sessionId]);const pe=i.useMemo(()=>{const t={};for(const s of u)for(const o of s.blocks??[])if(o.kind==="tool")for(const c of o.results??[])t[c.route_id]=c;return t},[u]),P=()=>`m${++me.current}_${Date.now().toString(36)}`,k=t=>f(s=>{if(!s.length)return s;const o=s.slice();return o[o.length-1]=t(o[o.length-1]),o}),ae=t=>k(s=>({...s,blocks:[...s.blocks??[],t]})),U=(t,s)=>k(o=>({...o,blocks:(o.blocks??[]).map((c,w,h)=>t(c,w,h)?s(c):c)})),J=t=>(s,o,c)=>s.kind===t&&Ve(c,w=>w.kind===t)===o,M=t=>{if(_.current!==t||(R.current!==null&&(window.clearTimeout(R.current),R.current=null),j.current==="cleared"))return;const s=j.current==="shown";j.current="cleared",s&&k(o=>{if(o.status!==We)return o;const{status:c,...w}=o;return w})},B=(t,s)=>{t.requestId&&Ot(t.requestId,s)},ee=(t,s)=>{const o=O.current;!o||o.controller!==t||(o.requestId=s,o.streamStartReported||(o.streamStartReported=!0,B(o,{submission_to_stream_start_ms:Math.max(0,performance.now()-o.submittedAt)})),o.firstVisibleAt!==void 0&&!o.firstVisibleReported&&(o.firstVisibleReported=!0,B(o,{submission_to_first_visible_delta_ms:Math.max(0,o.firstVisibleAt-o.submittedAt)})))},q=(t,s)=>{const o=O.current;!o||o.controller!==t||o.terminalReported||(o.terminalReported=!0,B(o,{terminal_classification:s}))};i.useLayoutEffect(()=>{const t=O.current;if(!t||t.firstVisibleAt!==void 0)return;const s=u.at(-1);(s==null?void 0:s.role)!=="assistant"||!(s.blocks??[]).some(c=>c.kind==="tool"||c.kind==="reasoning"&&!!c.text.trim()||c.kind==="answer"&&!!c.text.trim())||(t.firstVisibleAt=performance.now(),t.requestId&&!t.firstVisibleReported&&(t.firstVisibleReported=!0,B(t,{submission_to_first_visible_delta_ms:Math.max(0,t.firstVisibleAt-t.submittedAt)})))},[u]);const oe=t=>{switch(t.type){case"stream_start":t.session_id&&(Y.current=t.session_id,g.current.onSessionId(t.session_id));break;case"sandbox_start":case"sandbox_ready":case"workspace_ready":break;case"session_title_start":z.current="";break;case"session_title_delta":z.current+=t.text,g.current.onTitle(z.current.replace(/\s+/g," ").slice(0,80));break;case"session_title_done":z.current=t.title,g.current.onTitle(t.title);break;case"reasoning_start":ae({kind:"reasoning",text:"",active:!0,open:!0});break;case"reasoning_delta":U(J("reasoning"),s=>s.kind==="reasoning"?{...s,text:s.text+t.text}:s);break;case"reasoning_end":U(J("reasoning"),s=>s.kind==="reasoning"?{...s,active:!1,open:!1}:s);break;case"tool_call":ae({kind:"tool",id:t.id,name:t.name,args:t.args,status:"running",open:!1});break;case"tool_result":U(s=>s.kind==="tool"&&s.id===t.id,s=>s.kind==="tool"?t.status?{...s,schema_version:2,status:t.status,took_ms:t.took_ms,content:t.content,metadata:t.metadata,open:t.status!=="success"}:{...s,status:"done",hits:t.hits,took_ms:t.took_ms,results:t.results}:s);break;case"answer_delta":k(s=>{const o=s.blocks??[],c=o.at(-1);return(c==null?void 0:c.kind)==="answer"&&!c.done?{...s,blocks:[...o.slice(0,-1),{...c,text:c.text+t.text}]}:{...s,blocks:[...o,{kind:"answer",text:t.text,done:!1}]}});break;case"done":k(s=>({...s,streaming:!1,followups:t.followups,finishReason:t.finish_reason,citations:t.citations,blocks:(s.blocks??[]).map(o=>o.kind==="answer"?{...o,done:!0}:o)}));break;case"error":k(s=>({...s,streaming:!1,error:t.message,errorCode:t.code}));break}},G=async(t,s)=>{const o=await ve(t),c=Ge(o);return N.current!==s?null:(f(c),T.current=c,c)},ie=(t,s,o,c)=>{const w=++N.current;S.current=!0;const h=new AbortController;return _.current=h,F.current=t,Y.current=s.session_id,L(""),f(o),m(!0),O.current={controller:h,submittedAt:performance.now(),streamStartReported:!1,firstVisibleReported:!1,terminalReported:!1},R.current!==null&&window.clearTimeout(R.current),j.current="armed",R.current=window.setTimeout(()=>{R.current=null,!(_.current!==h||h.signal.aborted||N.current!==w)&&(j.current="shown",k(x=>{var y;return x.role==="assistant"&&x.streaming&&(((y=x.blocks)==null?void 0:y.length)??0)===0&&!x.error?{...x,status:We}:x}))},Ct),(async()=>{var E;let x=!1,y=!1,I=!1;try{for await(const b of Tt(s,{signal:h.signal}))b.type==="stream_start"&&(x=!0,ee(h,b.request_id)),(b.type==="workspace_ready"||b.type==="reasoning_start"||b.type==="reasoning_delta"||b.type==="tool_call"||b.type==="answer_delta"||b.type==="done"||b.type==="error")&&M(h),(b.type==="done"||b.type==="error")&&(y=!0,I=b.type==="error",q(h,b.type==="error"?"error":"complete")),h.signal.aborted||oe(b)}catch(b){I=!0,h.signal.aborted||(M(h),q(h,"network_error"),oe({type:"error",message:b instanceof Error?b.message:"The assistant stream failed."}))}finally{if(_.current===h){if(M(h),!y&&!h.signal.aborted&&q(h,"network_error"),S.current=!1,m(!1),!h.signal.aborted){const b=Y.current;if(c&&!x)f(c.snapshot),T.current=c.snapshot,L("Couldn’t resend this message. Your original conversation was restored.");else if(b){c&&!c.first&&(I||!y)&&(f(c.snapshot),T.current=c.snapshot);try{const d=await G(b,w);d&&c&&!c.first&&d.some(de=>de.id===c.targetId)&&L("Couldn’t resend this message. Your original conversation was restored.")}catch{N.current===w&&k(d=>d.streaming?{...d,streaming:!1}:d)}}else k(d=>d.streaming?{...d,streaming:!1}:d);g.current.onSettled(b)}((E=O.current)==null?void 0:E.controller)===h&&(O.current=null)}}})(),!0},X=i.useCallback(t=>{const s=t.trim();if(!s||s.length>8e3||S.current)return!1;const o=T.current,c=[...o].reverse().find(E=>E.role==="user"),w=c!=null&&c.status&&c.status!=="complete"&&c.revision?{replace_message_id:c.id,prior_revision:c.revision}:null,h={id:P(),role:"user",text:s},x={id:P(),role:"assistant",streaming:!0,blocks:[]},y=w&&c?Ve(o,E=>E.id===c.id):-1,I=y<0?[...o,h,x]:[...o.slice(0,y),h,x];return ie(s,{message:s,session_id:g.current.sessionId,client_message_id:crypto.randomUUID(),...!g.current.sessionId&&g.current.initialModel?{initial_model:g.current.initialModel}:{},...w??{}},I)},[]),ce=i.useCallback((t,s)=>{const o=s.trim();if(!o||o.length>8e3||S.current)return!1;const c=T.current.slice(),w=c.findIndex(d=>d.id===t&&d.role==="user");if(w<0)return!1;const h=c[w],x=c.findIndex(d=>d.role==="user"),y=w===x;if(!y&&(!g.current.sessionId||!h.revision))return!1;const I={id:h.id,role:"user",text:o,revision:y?void 0:h.revision+1,status:"generating"},E={id:P(),role:"assistant",streaming:!0,blocks:[]},b=y?[I,E]:[...c.slice(0,w),I,E];return ie(o,{message:o,session_id:y?null:g.current.sessionId,client_message_id:crypto.randomUUID(),...y&&g.current.initialModel?{initial_model:g.current.initialModel}:{},...y?{}:{replace_message_id:h.id,prior_revision:h.revision}},b,{targetId:h.id,snapshot:c,first:y})},[]),te=i.useCallback(()=>{var c;if(!_.current)return;const t=_.current;M(t),q(t,"stopped"),t.abort(),_.current=null,((c=O.current)==null?void 0:c.controller)===t&&(O.current=null),S.current=!1,m(!1),f(w=>{const h=w.at(-1);if((h==null?void 0:h.role)!=="assistant")return w;const x=(h.blocks??[]).flatMap(y=>y.kind==="tool"&&y.status==="running"?[]:y.kind==="reasoning"&&y.active?[]:y.kind==="answer"?[{...y,done:!0}]:[y]);return[...w.slice(0,-1),{...h,blocks:x,streaming:!1,finishReason:"stopped"}]}),g.current.onInterrupted(F.current);const s=Y.current;s&&ct(s).catch(()=>{});const o=++N.current;window.setTimeout(()=>{s&&N.current===o?G(s,o).catch(()=>{}).finally(()=>g.current.onSettled(s)):s||g.current.onSettled(null)},450)},[]),W=i.useCallback((t,s)=>f(o=>o.map(c=>{var w;return c.id!==t?c:{...c,blocks:(w=c.blocks)==null?void 0:w.map((h,x)=>x===s&&(h.kind==="reasoning"||h.kind==="tool")?{...h,open:!h.open}:h)}})),[]),K=i.useCallback(()=>{var t;N.current+=1,R.current!==null&&(window.clearTimeout(R.current),R.current=null),j.current="cleared",(t=_.current)==null||t.abort(),_.current=null,O.current=null,S.current=!1,Y.current=null,f([]),m(!1),L("")},[]),le=i.useCallback(t=>{var s;N.current+=1,R.current!==null&&(window.clearTimeout(R.current),R.current=null),j.current="cleared",(s=_.current)==null||s.abort(),_.current=null,O.current=null,S.current=!1,f(t),m(!1),L("")},[]);return{messages:u,busy:D,papers:pe,sessionError:C,send:X,editAndResend:ce,stop:te,toggleBlock:W,reset:K,load:le}}const Lt="https://huggingface.co/settings/inference-providers",He=()=>fe()?a.jsxs("div",{className:"chat-billing-notice",role:"note",children:[a.jsx("span",{children:"Hugging Face applies your included monthly credits first. After they run out, further chats use pay-as-you-go billing when enabled."}),a.jsx("a",{href:Lt,target:"_blank",rel:"noreferrer",children:"Review usage"})]}):null,Bt=()=>{var Ce,Ee,Le;const{sessionId:l}=tt(),u=nt(),[f,D]=rt(),{user:m,isLoading:C}=st(),{toast:L}=at(),[S,_]=i.useState([]),[R,j]=i.useState(!1),[O,T]=i.useState(""),[g,F]=i.useState(()=>l?{id:l,status:"loading"}:null),[z,me]=i.useState(0),N=i.useRef(lt()),Y=i.useRef(f.get("model")||((Ce=N.current)==null?void 0:Ce.model)),[Z,pe]=i.useState(dt),[P,k]=i.useState(Y.current||ut),[ae,U]=i.useState(""),[J,M]=i.useState(""),[B,ee]=i.useState(()=>{var e,n;return((e=f.get("q"))==null?void 0:e.trim())||((n=N.current)==null?void 0:n.prompt)||""}),q=i.useRef(!1),[oe,G]=i.useState(null),[ie,X]=i.useState(null),[ce,te]=i.useState(""),[W,K]=i.useState(null),[le,t]=i.useState(()=>typeof window>"u"||window.innerWidth>900),[s,o]=i.useState(!1),[c,w]=i.useState(""),h=i.useRef(new Set),x=i.useRef(!1),y=i.useRef(l),I=i.useRef(null),E=i.useRef(null);y.current=l;const b=i.useCallback(async()=>{if(!m)return;const e=!x.current;e&&j(!0);try{const n=await ht();_(r=>{const p=I.current,v=p?r.find(se=>se.id===p):void 0;if(!v)return n;const he=n.find(se=>se.id===p);return[he?{...he,title:v.title,is_busy:!0}:v,...n.filter(se=>se.id!==p)]}),x.current=!0,T("")}catch(n){T(n instanceof Error?n.message:"Could not load chats")}finally{e&&j(!1)}},[m]),d=Et({sessionId:l??null,initialModel:P,onSessionId:e=>{I.current=e;const n=e!==y.current,r=new Date().toISOString();_(p=>p.some(v=>v.id===e)?p.map(v=>v.id===e?{...v,is_busy:!0}:v):[{id:e,title:"New chat",selected_model:P,created_at:r,updated_at:r,message_count:1,is_busy:!0},...p]),n&&U("New chat"),E.current=e,F({id:e,status:"loaded"}),u(`/chat/${e}`,{replace:!0})},onTitle:e=>{const n=I.current??y.current;n&&!h.current.has(n)&&(U(e),_(r=>r.map(p=>p.id===n?{...p,title:e}:p)))},onSettled:e=>{e&&_(n=>n.map(r=>r.id===e?{...r,is_busy:!1}:r)),I.current=null,b()},onInterrupted:e=>{M(e)}});d.load;const de=d.send;i.useEffect(()=>{d.busy&&G(null)},[d.busy]);const ne=i.useCallback(e=>{if(!m){sessionStorage.setItem(Ie,e),sessionStorage.setItem(Ne,P),sessionStorage.setItem(Ae,"1"),window.location.href=Re(`/api/v1/auth/hf/login?return_to=${encodeURIComponent("/chat")}`);return}de(e)&&(ft(),M(""))},[P,de,m]);i.useEffect(()=>{if(C||!m)return;const e=sessionStorage.getItem(Ne);e&&k(e),b(),mt().then(p=>{if(pe(p.items),!y.current){const v=Y.current||e;k(v&&p.items.some(he=>he.id===v)?v:p.default_model)}});const n=sessionStorage.getItem(Ie),r=sessionStorage.getItem(Ae)==="1";n&&(r?ee(n):M(n))},[C,b,m]),i.useEffect(()=>{if(!l){E.current!==null&&(E.current=null,d.reset()),F(null);return}if(E.current===l||(F(n=>(n==null?void 0:n.id)===l&&n.status==="loading"?n:{id:l,status:"loading"}),C||!m||d.busy))return;let e=!1;return T(""),ve(l).then(n=>{e||(d.load(Ge(n)),k(n.selected_model),U(n.title),E.current=l,F({id:l,status:"loaded"}))}).catch(n=>{if(e)return;const r=n instanceof Error?n.message:"Chat not found";d.reset(),T(r),F({id:l,status:"error",error:r})}),()=>{e=!0}},[C,l,m,d.busy,z]),i.useEffect(()=>{var p;const e=(p=f.get("q"))==null?void 0:p.trim();if(!e)return;q.current=!1;const n=f.get("model");n&&k(n),ee(e);const r=new URLSearchParams(f);r.delete("q"),r.delete("model"),D(r,{replace:!0})},[f,D]),i.useEffect(()=>{if(C||d.busy||!B||q.current)return;const e=window.setTimeout(()=>{if(q.current)return;q.current=!0;const n=B;ee(""),ne(n)},0);return()=>window.clearTimeout(e)},[C,d.busy,B,ne]),i.useEffect(()=>{const e=()=>{!m||d.busy||b()};return window.addEventListener("focus",e),()=>window.removeEventListener("focus",e)},[d.busy,b,m]),i.useEffect(()=>{if(!W)return;const e=()=>K(null),n=r=>{r.key==="Escape"&&e()};return window.addEventListener("click",e),window.addEventListener("keydown",n),()=>{window.removeEventListener("click",e),window.removeEventListener("keydown",n)}},[W]);const xe=()=>{I.current=null,d.reset(),M(""),U(""),u("/chat")},Se=async e=>{const n=ce.trim();if(n)try{const r=await Me(e,{title:n});h.current.add(e),e===l&&U(r.title),_(p=>p.map(v=>v.id===e?r:v)),X(null)}catch(r){T(r instanceof Error?r.message:"Rename failed")}},$e=async e=>{const n=e===l&&d.busy;if(window.confirm(n?"Stop and delete this chat? This cannot be undone.":"Delete this chat? This cannot be undone.")){n&&d.stop();try{if(n){const r=Date.now()+3e3;for(;(await ve(e)).is_busy;){if(Date.now()>=r)throw new Error("Generation is still stopping. The chat was not deleted.");await new Promise(v=>window.setTimeout(v,150))}}await bt(e),e===l&&xe(),await b()}catch(r){T(r instanceof Error?r.message:"Delete failed")}}},Oe=async e=>{const n=P;if(k(e),!!l)try{const r=await Me(l,{selected_model:e});_(p=>p.map(v=>v.id===l?{...v,selected_model:r.selected_model}:v)),T("")}catch(r){k(n),T(r instanceof Error?r.message:"Model change failed")}},ze=async()=>{var e;if(!(!l||d.busy||s)){o(!0);try{const n=await wt(l),r=new URL(n.public_path,window.location.origin).toString();try{if(!((e=navigator.clipboard)!=null&&e.writeText))throw new Error("Clipboard unavailable");await navigator.clipboard.writeText(r),L({className:"chat-share-toast",duration:5e3,title:"Public link copied to your clipboard",description:"Anyone with this link can see this conversation."})}catch{w(r)}}catch(n){const r=n instanceof Error?n.message:"Could not share this conversation";T(r),L({variant:"destructive",title:"Share failed",description:r})}finally{o(!1)}}},[Je,Xe]=i.useState(60);i.useLayoutEffect(()=>{const e=document.querySelector(".app-header");if(!e)return;const n=()=>Xe(e.offsetHeight);n();const r=new ResizeObserver(n);return r.observe(e),()=>r.disconnect()},[]);const ge=i.useRef(null),ue=i.useRef(null),re=i.useRef(null);i.useEffect(()=>{d.busy||(re.current=null)},[d.busy]);const Qe=(e,n)=>{var r;ue.current=((r=ge.current)==null?void 0:r.scrollTop)??null,d.toggleBlock(e,n)};i.useLayoutEffect(()=>{const e=ge.current;if(e){if(ue.current!==null){e.scrollTop=ue.current,ue.current=null;return}if(re.current){const n=Array.from(e.querySelectorAll("[data-message-id]")).find(r=>r.dataset.messageId===re.current);if(n){const r=e.getBoundingClientRect(),p=n.getBoundingClientRect();e.scrollTop+=p.top-r.top-24;return}}e.scrollTop=e.scrollHeight}},[d.messages]);const Q=S.find(e=>e.id===l),Te=d.messages.filter(e=>e.role==="user"),ye=(Ee=Te[0])==null?void 0:Ee.id,Ze=(Le=Te.at(-1))==null?void 0:Le.id,be=d.messages.length===0,we=(g==null?void 0:g.id)===l,_e=!!(l&&(C||m&&(!we||(g==null?void 0:g.status)==="loading"))),ke=we&&(g==null?void 0:g.status)==="error"?g.error:void 0;return a.jsxs("div",{className:"chat-page",style:{height:`calc(100dvh - ${Je}px)`},children:[a.jsxs("aside",{className:`chat-sidebar${le?"":" chat-sidebar-closed"}`,children:[a.jsxs("div",{className:"chat-sidebar-top",children:[a.jsxs("button",{type:"button",className:"chat-new-chat",onClick:xe,children:[a.jsx(pt,{})," New chat"]}),a.jsx("button",{type:"button",className:"icon-btn",onClick:()=>t(!1),title:"Collapse sidebar",children:a.jsx(De,{})})]}),a.jsxs("nav",{className:"chat-sessions","aria-label":"Chat history",children:[R&&a.jsx("div",{className:"chat-sessions-empty",children:"Loading chats…"}),!R&&O&&a.jsx("div",{className:"chat-sessions-empty",children:O}),!R&&!O&&S.length===0&&a.jsx("div",{className:"chat-sessions-empty",children:"Conversations you start will show up here."}),gt(S).map(e=>a.jsxs("div",{className:"chat-session-group",children:[a.jsx("div",{className:"chat-session-group-label",children:e.label}),e.items.map(n=>a.jsxs("div",{className:`chat-session${n.id===l?" chat-session-active":""}`,role:"button",tabIndex:0,onClick:()=>u(`/chat/${n.id}`),onKeyDown:r=>{if(r.key==="Enter"&&u(`/chat/${n.id}`),r.key==="F2"&&(X(n.id),te(n.title)),r.key==="ContextMenu"||r.shiftKey&&r.key==="F10"){r.preventDefault();const p=r.currentTarget.getBoundingClientRect();K({id:n.id,x:p.right-150,y:p.bottom})}},onContextMenu:r=>{r.preventDefault(),K({id:n.id,x:r.clientX,y:r.clientY})},children:[ie===n.id?a.jsx("input",{className:"chat-session-title-input",value:ce,autoFocus:!0,maxLength:80,onClick:r=>r.stopPropagation(),onChange:r=>te(r.target.value),onBlur:()=>void Se(n.id),onKeyDown:r=>{r.stopPropagation(),r.key==="Enter"&&Se(n.id),r.key==="Escape"&&X(null)}}):a.jsx("span",{className:"chat-session-title",children:n.title}),a.jsx("button",{type:"button",className:"chat-session-menu","aria-label":"Chat actions","aria-haspopup":"menu",title:"Chat actions",onClick:r=>{r.stopPropagation();const p=r.currentTarget.getBoundingClientRect();K({id:n.id,x:p.right-150,y:p.bottom})},children:"⋯"}),a.jsx("button",{type:"button",className:"chat-session-delete","aria-label":"Delete conversation",onClick:r=>{r.stopPropagation(),$e(n.id)},children:a.jsx(yt,{})})]},n.id))]},e.label))]}),W&&a.jsx("div",{className:"chat-session-context-menu",role:"menu",style:{left:W.x,top:W.y},onClick:e=>e.stopPropagation(),children:a.jsx("button",{type:"button",role:"menuitem",autoFocus:!0,onClick:()=>{const e=S.find(n=>n.id===W.id);e&&(X(e.id),te(e.title)),K(null)},children:"Rename chat"})})]}),a.jsxs("section",{className:"chat-main",children:[a.jsxs("div",{className:"chat-topbar",children:[!le&&a.jsx("button",{type:"button",className:"icon-btn",onClick:()=>t(!0),title:"Open sidebar",children:a.jsx(De,{})}),a.jsx("span",{className:"chat-topbar-title",children:_e?(Q==null?void 0:Q.title)||"":ae||(Q==null?void 0:Q.title)||(be?"":"New chat")}),l&&we&&(g==null?void 0:g.status)==="loaded"&&!be&&a.jsxs("button",{type:"button",className:"chat-share-button",onClick:()=>void ze(),disabled:d.busy||s||_e,"aria-label":"Share conversation",children:[s?a.jsx(Pe,{}):a.jsx(vt,{"aria-hidden":"true"}),a.jsx("span",{children:"Share"})]})]}),_e?a.jsxs("div",{className:"chat-session-loading",role:"status","aria-live":"polite",children:[a.jsx(Pe,{}),a.jsx("span",{children:"Loading conversation…"})]}):ke?a.jsxs("div",{className:"chat-session-load-error",role:"alert",children:[a.jsx("p",{children:ke}),a.jsx("button",{type:"button",onClick:()=>{F({id:l,status:"loading"}),me(e=>e+1)},children:"Try again"})]}):be?a.jsx("div",{className:"chat-empty",children:a.jsxs("div",{className:"chat-empty-inner",children:[a.jsx("div",{className:"chat-empty-eyebrow",children:"AI research assistant · Staging preview"}),a.jsxs("h1",{className:"chat-empty-title",children:["Ask ",a.jsx("em",{children:"Papers With Code"})]}),a.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."}),a.jsx(He,{}),a.jsx(je,{onSend:ne,busy:d.busy,onStop:d.stop,autoFocus:!0,draft:J,onDraftChange:M,models:Z,selectedModel:P,onModelChange:e=>void Oe(e)}),a.jsx("div",{className:"chat-examples",children:_t.map(e=>a.jsx("button",{type:"button",className:"chat-example",onClick:()=>ne(e),children:e},e))})]})}):a.jsxs(a.Fragment,{children:[d.sessionError&&a.jsx("div",{className:"chat-session-error",role:"alert",children:d.sessionError}),a.jsx("div",{className:"chat-conversation",ref:ge,children:a.jsx("div",{className:"chat-conversation-inner",children:d.messages.map(e=>e.role==="user"?a.jsx(ot,{id:e.id,text:e.text??"",isInitial:e.id===ye,editingAllowed:!d.busy&&!!e.revision,editing:oe===e.id,editNotice:e.id===ye?"Sending will start a new chat.":e.id===Ze?"Sending will replace the response.":"Sending will replace the response and all messages after it.",onEdit:()=>G(e.id),onCancel:()=>G(null),onResend:n=>{e.id!==ye&&(re.current=e.id);const r=d.editAndResend(e.id,n);return r?G(null):re.current=null,r}},e.id):a.jsx(it,{msg:e,papers:d.papers,onToggleBlock:Qe},e.id))})}),a.jsx("div",{className:"chat-composer-wrap",children:a.jsxs("div",{className:"chat-composer-inner",children:[a.jsx(He,{}),a.jsx(je,{onSend:ne,busy:d.busy,onStop:d.stop,placeholder:J?"Edit and send again…":"Ask a follow-up…",draft:J,onDraftChange:M,models:Z,selectedModel:P,onModelChange:e=>void Oe(e)}),a.jsx("div",{className:"chat-composer-foot",children:fe()?a.jsxs(a.Fragment,{children:[a.jsxs("span",{className:"chat-provider-attribution",children:["Powered by 🤗 ",a.jsx("a",{href:"https://huggingface.co/docs/inference-providers/en/index",target:"_blank",rel:"noreferrer",children:"Inference Providers"}),"."]}),a.jsx("span",{children:"The AI assistant can make mistakes. Double-check responses."})]}):a.jsx(a.Fragment,{children:"Assistant preview — responses are simulated."})})]})})]})]}),c&&a.jsx("div",{className:"chat-share-dialog-backdrop",role:"presentation",onMouseDown:()=>w(""),children:a.jsxs("div",{className:"chat-share-dialog",role:"dialog","aria-modal":"true","aria-labelledby":"chat-share-dialog-title",onMouseDown:e=>e.stopPropagation(),children:[a.jsx("h2",{id:"chat-share-dialog-title",children:"Public link created"}),a.jsx("p",{children:"It could not be copied automatically. Copy this link manually:"}),a.jsx("input",{readOnly:!0,value:c,"aria-label":"Public conversation link",autoFocus:!0,onFocus:e=>e.currentTarget.select()}),a.jsx("button",{type:"button",onClick:()=>w(""),children:"Close"})]})})]})};export{Bt as default};
assets/{ConferenceDetailView-CxXP2hDY.js → ConferenceDetailView-DUkLzxhe.js} RENAMED
@@ -1 +1 @@
1
- import{e as L,r as D,j as e,L as p,b as C}from"./index-eBKbcCso.js";import{u as T}from"./useQuery-DIrXGOA7.js";import{M as F}from"./MarkdownText-B_dvaNfN.js";import{e as B,h as A,d as E}from"./transform-DM1_5UAz.js";import{S as f}from"./skeleton-Cd-jfjiE.js";import{A as P,a as z}from"./alert-BCeSLEYS.js";import"./useBaseQuery-CZIeK7IO.js";import"./katex.min-BSBacQyE.js";import"./PaperPreviewLink-BrlkKB05.js";import"./index-LmPbjihc.js";import"./hover-card-CdeSv7Gc.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}`},J=()=>{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{J as default};
 
1
+ import{e as L,r as D,j as e,L as p,b as C}from"./index-B2CsYqS1.js";import{u as T}from"./useQuery-D09nn2D4.js";import{M as F}from"./MarkdownText-CnXxe_CG.js";import{e as B,h as A,d as E}from"./transform-Csq86xeP.js";import{S as f}from"./skeleton-EzEzG6PT.js";import{A as P,a as z}from"./alert-B5Pni1K6.js";import"./useBaseQuery-DCY5lvEf.js";import"./katex.min-BSBacQyE.js";import"./PaperPreviewLink-DyP6osoH.js";import"./index-6E7p68ra.js";import"./hover-card-DfDU2jCA.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}`},J=()=>{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{J as default};
assets/{ConferenceTaskView-DTXm7nox.js → ConferenceTaskView-5T634INZ.js} RENAMED
@@ -1 +1 @@
1
- import{e as $,a as D,r as f,j as e,L as b,R as W,b as M}from"./index-eBKbcCso.js";import{u as z}from"./useQuery-DIrXGOA7.js";import{P as G}from"./components-D8Z2f6Zw.js";import{P as J}from"./PaperFeedFilters-vnoti5eB.js";import{M as h}from"./MarkdownText-B_dvaNfN.js";import{t as X,d as Y}from"./transform-DM1_5UAz.js";import{c as Z}from"./usePapers-B09ZSLzW.js";import{u as ee}from"./useIntersectionObserver-BjpbHbpf.js";import{S as se}from"./skeleton-Cd-jfjiE.js";import{A as ae,a as te}from"./alert-BCeSLEYS.js";import"./useBaseQuery-CZIeK7IO.js";import"./LatexTitle-CqLY2qFp.js";import"./katex.min-BSBacQyE.js";import"./PaperPreviewLink-BrlkKB05.js";import"./index-LmPbjihc.js";import"./hover-card-CdeSv7Gc.js";import"./useInfiniteQuery-PtHXMuOU.js";const re=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],ne=a=>a==="trending"||a==="date_published"||a==="citation_count"?a:"trending",be=()=>{var F,A,L,O,T,B;const{confSlug:a,taskSlug:n}=$(),[c,j]=D(),y=ne(c.get("order_by")),S=c.get("has_code")==="true",w=c.get("has_hf_artifacts")==="true",I=t=>{const s=new URLSearchParams(c);s.set("order_by",t),j(s)},q=t=>{const s=new URLSearchParams(c);t?s.set("has_code","true"):s.delete("has_code"),j(s)},Q=t=>{const s=new URLSearchParams(c);t?s.set("has_hf_artifacts","true"):s.delete("has_hf_artifacts"),j(s)},k=n==="all",P=n==="oral",N=n==="spotlight",l=n==="outstanding",d=n==="best-paper-finalists",u=l||d,p=k||P||N||l||d,K=p?void 0:n,U=P?"oral":N?"spotlight":l?"outstanding":d?"best_paper_finalist":void 0,m=z({queryKey:["conference",a],queryFn:()=>M.getConference(a),enabled:!!a,staleTime:10*60*1e3}),x=z({queryKey:["task",n],queryFn:()=>M.getTask(n),enabled:!!n&&!p,staleTime:10*60*1e3}),i=Z({conferenceSlug:a||"",taskSlug:K,presentation:U,page_size:12,order_by:y,order_dir:"desc",include_resources:!0,has_code:S,has_hf_artifacts:w,enabled:!!a}),{targetRef:V,isIntersecting:C}=ee({rootMargin:"200px"});f.useEffect(()=>{C&&i.hasNextPage&&!i.isFetchingNextPage&&i.fetchNextPage()},[C,i.hasNextPage,i.isFetchingNextPage]),f.useEffect(()=>{window.scrollTo(0,0)},[a,n]);const _=f.useMemo(()=>{var s;return(((s=i.data)==null?void 0:s.pages)??[]).flatMap(o=>o.results)},[i.data]),v=f.useMemo(()=>_.map(X),[_]),g=k?"All papers":P?"Oral papers":N?"Spotlight papers":l?"Outstanding papers":d?"Best paper finalists":Y(((F=x.data)==null?void 0:F.name)||n||"",((A=x.data)==null?void 0:A.slug)||n),R=((O=(L=i.data)==null?void 0:L.pages[0])==null?void 0:O.count)??((T=m.data)==null?void 0:T.paper_count)??0,r=x.data;return m.error||x.error||i.error?e.jsx("div",{className:"page",children:e.jsx(ae,{variant:"destructive",children:e.jsx(te,{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(b,{to:"/",children:"Home"}),e.jsx("span",{children:" / "}),e.jsx(b,{to:"/conferences",children:"Conferences"}),e.jsx("span",{children:" / "}),e.jsx(b,{to:`/conferences/${a}`,children:((B=m.data)==null?void 0:B.name)??a}),e.jsx("span",{children:" / "}),e.jsx("span",{children:g})]}),e.jsxs("div",{className:!p&&(r!=null&&r.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:p?"BROWSE PAPERS":"TASK"}),e.jsx("h1",{className:"domain-mega-title",children:g}),l&&a==="iclr-2026"&&e.jsx(h,{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/)."}),l&&a==="icml-2026"&&e.jsx(h,{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/)."}),d&&a==="cvpr-2026"&&e.jsx(h,{className:"task-explainer",text:"CVPR 2026 recognized fifteen Best Paper Award finalists, including the winners. [Read the announcement](https://x.com/CVPR/status/2062912519522717978)."}),!p&&(r==null?void 0:r.description)&&e.jsx(h,{className:"task-explainer",text:r.description}),m.data&&e.jsxs("div",{className:"task-quickstats",style:{marginTop:12},children:[e.jsxs("span",{children:[e.jsx("span",{className:"num",children:R.toLocaleString()}),"PAPERS"]}),e.jsx("span",{children:m.data.name})]})]}),!p&&(r==null?void 0:r.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:r.image_url,alt:`${g} schematic`,onError:t=>{var s,o;(o=(s=t.currentTarget.parentElement)==null?void 0:s.parentElement)==null||o.style.setProperty("display","none")}})}),e.jsxs("figcaption",{children:["Figure · ",g,r.image_credit&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(h,{className:"task-image-credit",text:r.image_credit})]})]})]})]}),e.jsxs("div",{className:"task-section-head",children:[e.jsx("div",{className:"task-section-eyebrow",children:u?"Award papers":"Conference papers · sort below"}),e.jsxs("div",{className:"task-section-title",children:["Papers ",e.jsxs("span",{className:"meta",children:["[",R.toLocaleString(),"]"]})]})]}),e.jsxs("div",{className:"sort-bar",children:[e.jsxs("div",{className:"paper-feed-toolbar-controls",children:[!u&&e.jsx("div",{className:"sort-options",children:re.map(([t,s])=>e.jsx("button",{className:`sort-btn ${y===t?"active":""}`,onClick:()=>I(t),children:s},t))}),e.jsx(J,{hasCode:S,hasHfArtifacts:w,onHasCodeChange:q,onHasHfArtifactsChange:Q,showDivider:!u})]}),!u&&e.jsxs("div",{className:"results-count",children:[v.length," loaded in ",e.jsx("span",{children:g})]})]}),i.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((t,s)=>e.jsx(se,{className:"h-40 w-full"},s))}):v.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:v.map((t,s)=>{var E;const o=(E=_[s])==null?void 0:E.conference_award,H=o==="outstanding"?"Outstanding Paper":o==="honorable_mention"?"Honorable Mention":o==="best_paper_finalist"&&!d?"Best Paper Finalist":null;return e.jsxs(W.Fragment,{children:[H&&e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",letterSpacing:"0.08em",marginBottom:8},children:H}),e.jsx(G,{paper:t,rank:s+1})]},t.id)})}),e.jsx("div",{ref:V,style:{height:1}}),i.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]})};export{be as default};
 
1
+ import{e as $,a as D,r as f,j as e,L as b,R as W,b as M}from"./index-B2CsYqS1.js";import{u as z}from"./useQuery-D09nn2D4.js";import{P as G}from"./components-Dt_hKhor.js";import{P as J}from"./PaperFeedFilters-DC6dQXvU.js";import{M as h}from"./MarkdownText-CnXxe_CG.js";import{t as X,d as Y}from"./transform-Csq86xeP.js";import{c as Z}from"./usePapers-BUvi-1N_.js";import{u as ee}from"./useIntersectionObserver-BEQRRw3B.js";import{S as se}from"./skeleton-EzEzG6PT.js";import{A as ae,a as te}from"./alert-B5Pni1K6.js";import"./useBaseQuery-DCY5lvEf.js";import"./LatexTitle-DhaqzMPt.js";import"./katex.min-BSBacQyE.js";import"./PaperPreviewLink-DyP6osoH.js";import"./index-6E7p68ra.js";import"./hover-card-DfDU2jCA.js";import"./useInfiniteQuery-gjnIRn2t.js";const re=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],ne=a=>a==="trending"||a==="date_published"||a==="citation_count"?a:"trending",be=()=>{var F,A,L,O,T,B;const{confSlug:a,taskSlug:n}=$(),[c,j]=D(),y=ne(c.get("order_by")),S=c.get("has_code")==="true",w=c.get("has_hf_artifacts")==="true",I=t=>{const s=new URLSearchParams(c);s.set("order_by",t),j(s)},q=t=>{const s=new URLSearchParams(c);t?s.set("has_code","true"):s.delete("has_code"),j(s)},Q=t=>{const s=new URLSearchParams(c);t?s.set("has_hf_artifacts","true"):s.delete("has_hf_artifacts"),j(s)},k=n==="all",P=n==="oral",N=n==="spotlight",l=n==="outstanding",d=n==="best-paper-finalists",u=l||d,p=k||P||N||l||d,K=p?void 0:n,U=P?"oral":N?"spotlight":l?"outstanding":d?"best_paper_finalist":void 0,m=z({queryKey:["conference",a],queryFn:()=>M.getConference(a),enabled:!!a,staleTime:10*60*1e3}),x=z({queryKey:["task",n],queryFn:()=>M.getTask(n),enabled:!!n&&!p,staleTime:10*60*1e3}),i=Z({conferenceSlug:a||"",taskSlug:K,presentation:U,page_size:12,order_by:y,order_dir:"desc",include_resources:!0,has_code:S,has_hf_artifacts:w,enabled:!!a}),{targetRef:V,isIntersecting:C}=ee({rootMargin:"200px"});f.useEffect(()=>{C&&i.hasNextPage&&!i.isFetchingNextPage&&i.fetchNextPage()},[C,i.hasNextPage,i.isFetchingNextPage]),f.useEffect(()=>{window.scrollTo(0,0)},[a,n]);const _=f.useMemo(()=>{var s;return(((s=i.data)==null?void 0:s.pages)??[]).flatMap(o=>o.results)},[i.data]),v=f.useMemo(()=>_.map(X),[_]),g=k?"All papers":P?"Oral papers":N?"Spotlight papers":l?"Outstanding papers":d?"Best paper finalists":Y(((F=x.data)==null?void 0:F.name)||n||"",((A=x.data)==null?void 0:A.slug)||n),R=((O=(L=i.data)==null?void 0:L.pages[0])==null?void 0:O.count)??((T=m.data)==null?void 0:T.paper_count)??0,r=x.data;return m.error||x.error||i.error?e.jsx("div",{className:"page",children:e.jsx(ae,{variant:"destructive",children:e.jsx(te,{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(b,{to:"/",children:"Home"}),e.jsx("span",{children:" / "}),e.jsx(b,{to:"/conferences",children:"Conferences"}),e.jsx("span",{children:" / "}),e.jsx(b,{to:`/conferences/${a}`,children:((B=m.data)==null?void 0:B.name)??a}),e.jsx("span",{children:" / "}),e.jsx("span",{children:g})]}),e.jsxs("div",{className:!p&&(r!=null&&r.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:p?"BROWSE PAPERS":"TASK"}),e.jsx("h1",{className:"domain-mega-title",children:g}),l&&a==="iclr-2026"&&e.jsx(h,{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/)."}),l&&a==="icml-2026"&&e.jsx(h,{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/)."}),d&&a==="cvpr-2026"&&e.jsx(h,{className:"task-explainer",text:"CVPR 2026 recognized fifteen Best Paper Award finalists, including the winners. [Read the announcement](https://x.com/CVPR/status/2062912519522717978)."}),!p&&(r==null?void 0:r.description)&&e.jsx(h,{className:"task-explainer",text:r.description}),m.data&&e.jsxs("div",{className:"task-quickstats",style:{marginTop:12},children:[e.jsxs("span",{children:[e.jsx("span",{className:"num",children:R.toLocaleString()}),"PAPERS"]}),e.jsx("span",{children:m.data.name})]})]}),!p&&(r==null?void 0:r.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:r.image_url,alt:`${g} schematic`,onError:t=>{var s,o;(o=(s=t.currentTarget.parentElement)==null?void 0:s.parentElement)==null||o.style.setProperty("display","none")}})}),e.jsxs("figcaption",{children:["Figure · ",g,r.image_credit&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(h,{className:"task-image-credit",text:r.image_credit})]})]})]})]}),e.jsxs("div",{className:"task-section-head",children:[e.jsx("div",{className:"task-section-eyebrow",children:u?"Award papers":"Conference papers · sort below"}),e.jsxs("div",{className:"task-section-title",children:["Papers ",e.jsxs("span",{className:"meta",children:["[",R.toLocaleString(),"]"]})]})]}),e.jsxs("div",{className:"sort-bar",children:[e.jsxs("div",{className:"paper-feed-toolbar-controls",children:[!u&&e.jsx("div",{className:"sort-options",children:re.map(([t,s])=>e.jsx("button",{className:`sort-btn ${y===t?"active":""}`,onClick:()=>I(t),children:s},t))}),e.jsx(J,{hasCode:S,hasHfArtifacts:w,onHasCodeChange:q,onHasHfArtifactsChange:Q,showDivider:!u})]}),!u&&e.jsxs("div",{className:"results-count",children:[v.length," loaded in ",e.jsx("span",{children:g})]})]}),i.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((t,s)=>e.jsx(se,{className:"h-40 w-full"},s))}):v.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:v.map((t,s)=>{var E;const o=(E=_[s])==null?void 0:E.conference_award,H=o==="outstanding"?"Outstanding Paper":o==="honorable_mention"?"Honorable Mention":o==="best_paper_finalist"&&!d?"Best Paper Finalist":null;return e.jsxs(W.Fragment,{children:[H&&e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",letterSpacing:"0.08em",marginBottom:8},children:H}),e.jsx(G,{paper:t,rank:s+1})]},t.id)})}),e.jsx("div",{ref:V,style:{height:1}}),i.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]})};export{be as default};
assets/{ConferencesIndexView-Ai9jUDcL.js → ConferencesIndexView-CYZZr65z.js} RENAMED
@@ -1 +1 @@
1
- import{r as p,j as e,L as d,b as u}from"./index-eBKbcCso.js";import{u as h}from"./useQuery-DIrXGOA7.js";import{S as m}from"./skeleton-Cd-jfjiE.js";import{A as f,a as g}from"./alert-BCeSLEYS.js";import{T as x}from"./TaxonomySuggestionTile-DEtB0B70.js";import"./useBaseQuery-CZIeK7IO.js";import"./SignInToEditDialog-eRf-3xm2.js";import"./button-DR_Fc3Hk.js";import"./textarea-DC0tTufA.js";import"./dialog-DhCB6EKj.js";import"./useMutation-CcYjkB_f.js";import"./loader-circle-Bz-wpQwE.js";const j=(r,n)=>{if(!r)return null;const t=new Date(`${r}T00:00:00`),a=n?new Date(`${n}T00:00:00`):null,s=l=>l.toLocaleDateString("en-US",{month:"long",day:"numeric"}),i=t.getFullYear();return a&&a.getTime()!==t.getTime()?t.getMonth()===a.getMonth()?`${s(t).replace(/\d+$/,"").trim()} ${t.getDate()}–${a.getDate()}, ${i}`:`${s(t)} – ${s(a)}, ${i}`:`${s(t)}, ${i}`},v=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},y=(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)},N={display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:24,paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},F=()=>{const r=h({queryKey:["conferences"],queryFn:()=>u.getConferences(),staleTime:6e5}),n=p.useMemo(()=>{var a;if(!((a=r.data)!=null&&a.results))return null;const t={};return r.data.results.forEach(s=>{const i=v(s);(t[i]||(t[i]=[])).push(s)}),Object.values(t).forEach(s=>s.sort(y)),Object.keys(t).map(Number).sort((s,i)=>i-s).map(s=>({year:s,conferences:t[s]}))},[r.data]);return r.error?e.jsx("div",{className:"page",children:e.jsx(f,{variant:"destructive",children:e.jsx(g,{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."}),e.jsxs("div",{className:"conference-deadlines-link",children:["Find deadlines for upcoming conferences"," ",e.jsx(d,{to:"/ai-deadlines",className:"underline underline-offset-2 hover:text-foreground",children:"here"}),"."]})]})}),r.isLoading?e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:32},children:Array.from({length:2}).map((t,a)=>e.jsxs("div",{children:[e.jsx(m,{className:"h-8 w-24 mb-4"}),e.jsx("div",{className:"tag-grid",children:Array.from({length:3}).map((s,i)=>e.jsx(m,{className:"h-32"},i))})]},a))}):n==null?void 0:n.map(({year:t,conferences:a})=>{const s=a.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:N,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:[a.length," ",a.length===1?"conference":"conferences"," ·"," ",s.toLocaleString()," papers"]})]}),e.jsxs("div",{className:"tag-grid",children:[a.map(l=>{const o=j(l.start_date,l.end_date),c=[l.venue,l.location].filter(Boolean).join(", ");return e.jsxs(d,{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)}),e.jsx(x,{kind:"conference"})]})]},t)})]})};export{F as default};
 
1
+ import{r as p,j as e,L as d,b as u}from"./index-B2CsYqS1.js";import{u as h}from"./useQuery-D09nn2D4.js";import{S as m}from"./skeleton-EzEzG6PT.js";import{A as f,a as g}from"./alert-B5Pni1K6.js";import{T as x}from"./TaxonomySuggestionTile-CvtfLtQL.js";import"./useBaseQuery-DCY5lvEf.js";import"./SignInToEditDialog-CAja351o.js";import"./button-Oqi1rHf_.js";import"./textarea-ccgKicZU.js";import"./dialog-KRtMu_IA.js";import"./useMutation-D-leEq6C.js";import"./loader-circle-CNbkR79_.js";const j=(r,n)=>{if(!r)return null;const t=new Date(`${r}T00:00:00`),a=n?new Date(`${n}T00:00:00`):null,s=l=>l.toLocaleDateString("en-US",{month:"long",day:"numeric"}),i=t.getFullYear();return a&&a.getTime()!==t.getTime()?t.getMonth()===a.getMonth()?`${s(t).replace(/\d+$/,"").trim()} ${t.getDate()}–${a.getDate()}, ${i}`:`${s(t)} – ${s(a)}, ${i}`:`${s(t)}, ${i}`},v=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},y=(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)},N={display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:24,paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},F=()=>{const r=h({queryKey:["conferences"],queryFn:()=>u.getConferences(),staleTime:6e5}),n=p.useMemo(()=>{var a;if(!((a=r.data)!=null&&a.results))return null;const t={};return r.data.results.forEach(s=>{const i=v(s);(t[i]||(t[i]=[])).push(s)}),Object.values(t).forEach(s=>s.sort(y)),Object.keys(t).map(Number).sort((s,i)=>i-s).map(s=>({year:s,conferences:t[s]}))},[r.data]);return r.error?e.jsx("div",{className:"page",children:e.jsx(f,{variant:"destructive",children:e.jsx(g,{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."}),e.jsxs("div",{className:"conference-deadlines-link",children:["Find deadlines for upcoming conferences"," ",e.jsx(d,{to:"/ai-deadlines",className:"underline underline-offset-2 hover:text-foreground",children:"here"}),"."]})]})}),r.isLoading?e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:32},children:Array.from({length:2}).map((t,a)=>e.jsxs("div",{children:[e.jsx(m,{className:"h-8 w-24 mb-4"}),e.jsx("div",{className:"tag-grid",children:Array.from({length:3}).map((s,i)=>e.jsx(m,{className:"h-32"},i))})]},a))}):n==null?void 0:n.map(({year:t,conferences:a})=>{const s=a.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:N,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:[a.length," ",a.length===1?"conference":"conferences"," ·"," ",s.toLocaleString()," papers"]})]}),e.jsxs("div",{className:"tag-grid",children:[a.map(l=>{const o=j(l.start_date,l.end_date),c=[l.venue,l.location].filter(Boolean).join(", ");return e.jsxs(d,{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)}),e.jsx(x,{kind:"conference"})]})]},t)})]})};export{F as default};
assets/{ContributionsPage-uJ9KKckR.js → ContributionsPage-c4YZ8qaS.js} RENAMED
@@ -1 +1 @@
1
- import{f as o,j as t,b as n}from"./index-eBKbcCso.js";import{u as c}from"./useInfiniteQuery-PtHXMuOU.js";import{B as d}from"./button-DR_Fc3Hk.js";import"./useBaseQuery-CZIeK7IO.js";const h=()=>{var r;const{user:s}=o(),a=c({queryKey:["contributions",s==null?void 0:s.username],queryFn:({pageParam:e})=>n.getMyContributions(e),initialPageParam:void 0,getNextPageParam:e=>e.next_cursor??void 0,enabled:!!(s!=null&&s.can_contribute)}),i=((r=a.data)==null?void 0:r.pages.flatMap(e=>e.events))??[];return s!=null&&s.can_contribute?t.jsxs("div",{className:"page max-w-5xl mx-auto px-4 py-8",children:[t.jsx("h1",{className:"text-3xl font-bold",children:"My contributions"}),t.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"Private history for catalog changes made through your contributor account."}),a.isLoading&&t.jsx("p",{className:"mt-8",children:"Loading contributions…"}),a.error&&t.jsx("p",{className:"mt-8 text-destructive",children:"Could not load contribution history."}),t.jsxs("div",{className:"mt-6 space-y-3",children:[i.map(e=>t.jsxs("article",{className:"rounded-md border p-4",children:[t.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[t.jsxs("strong",{children:[e.operation," ",e.entity_type]}),t.jsx("time",{className:"text-xs text-muted-foreground",children:new Date(e.created_at).toLocaleString()})]}),t.jsxs("p",{className:"mt-1 font-mono text-xs text-muted-foreground",children:[e.entity_id," · ",e.id]}),t.jsxs("details",{className:"mt-3 text-xs",children:[t.jsx("summary",{children:"Before / after"}),t.jsx("pre",{className:"mt-2 overflow-auto rounded bg-muted p-3",children:JSON.stringify({before:e.before,after:e.after},null,2)})]})]},e.id)),a.data&&i.length===0&&t.jsx("p",{className:"text-sm text-muted-foreground",children:"No direct edits yet."}),a.hasNextPage&&t.jsx(d,{variant:"outline",onClick:()=>a.fetchNextPage(),disabled:a.isFetchingNextPage,children:a.isFetchingNextPage?"Loading…":"Load older contributions"})]})]}):t.jsxs("div",{className:"page",children:[t.jsx("h1",{children:"Contributions"}),t.jsx("p",{children:"This history is available to project contributors and admins."})]})};export{h as default};
 
1
+ import{f as o,j as t,b as n}from"./index-B2CsYqS1.js";import{u as c}from"./useInfiniteQuery-gjnIRn2t.js";import{B as d}from"./button-Oqi1rHf_.js";import"./useBaseQuery-DCY5lvEf.js";const h=()=>{var r;const{user:s}=o(),a=c({queryKey:["contributions",s==null?void 0:s.username],queryFn:({pageParam:e})=>n.getMyContributions(e),initialPageParam:void 0,getNextPageParam:e=>e.next_cursor??void 0,enabled:!!(s!=null&&s.can_contribute)}),i=((r=a.data)==null?void 0:r.pages.flatMap(e=>e.events))??[];return s!=null&&s.can_contribute?t.jsxs("div",{className:"page max-w-5xl mx-auto px-4 py-8",children:[t.jsx("h1",{className:"text-3xl font-bold",children:"My contributions"}),t.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"Private history for catalog changes made through your contributor account."}),a.isLoading&&t.jsx("p",{className:"mt-8",children:"Loading contributions…"}),a.error&&t.jsx("p",{className:"mt-8 text-destructive",children:"Could not load contribution history."}),t.jsxs("div",{className:"mt-6 space-y-3",children:[i.map(e=>t.jsxs("article",{className:"rounded-md border p-4",children:[t.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[t.jsxs("strong",{children:[e.operation," ",e.entity_type]}),t.jsx("time",{className:"text-xs text-muted-foreground",children:new Date(e.created_at).toLocaleString()})]}),t.jsxs("p",{className:"mt-1 font-mono text-xs text-muted-foreground",children:[e.entity_id," · ",e.id]}),t.jsxs("details",{className:"mt-3 text-xs",children:[t.jsx("summary",{children:"Before / after"}),t.jsx("pre",{className:"mt-2 overflow-auto rounded bg-muted p-3",children:JSON.stringify({before:e.before,after:e.after},null,2)})]})]},e.id)),a.data&&i.length===0&&t.jsx("p",{className:"text-sm text-muted-foreground",children:"No direct edits yet."}),a.hasNextPage&&t.jsx(d,{variant:"outline",onClick:()=>a.fetchNextPage(),disabled:a.isFetchingNextPage,children:a.isFetchingNextPage?"Loading…":"Load older contributions"})]})]}):t.jsxs("div",{className:"page",children:[t.jsx("h1",{children:"Contributions"}),t.jsx("p",{children:"This history is available to project contributors and admins."})]})};export{h as default};
assets/{CronDashboard-BGf2xxv6.js → CronDashboard-D5xcrkix.js} RENAMED
@@ -1,4 +1,4 @@
1
- import{c as p,r as m,j as e,q as u,K as ke,l as Ce,k as J,a0 as Te,M as Re,N as Se,n as E,P as Me,p as Fe,O as X,L as Le,s as Ae,b as S,f as Pe}from"./index-eBKbcCso.js";import{u as $}from"./useQuery-DIrXGOA7.js";import{B as w,D as U,f as De}from"./codexAddEvals-DMs98_B2.js";import{B as M}from"./button-DR_Fc3Hk.js";import{C as Ie}from"./chevron-down-Com83sGm.js";import{C as P,a as O,R as K,S as Je}from"./shield-alert-Dga3rK1o.js";import{L as R}from"./loader-circle-Bz-wpQwE.js";import{E as Z}from"./external-link-DIVMrc1B.js";import{u as V}from"./useMutation-CcYjkB_f.js";import{u as qe}from"./useInfiniteQuery-PtHXMuOU.js";import"./useBaseQuery-CZIeK7IO.js";/**
2
  * @license lucide-react v0.462.0 - ISC
3
  *
4
  * This source code is licensed under the ISC license.
 
1
+ import{c as p,r as m,j as e,q as u,K as ke,l as Ce,k as J,a0 as Te,M as Re,N as Se,n as E,P as Me,p as Fe,O as X,L as Le,s as Ae,b as S,f as Pe}from"./index-B2CsYqS1.js";import{u as $}from"./useQuery-D09nn2D4.js";import{B as w,D as U,f as De}from"./codexAddEvals-CGZnlQWY.js";import{B as M}from"./button-Oqi1rHf_.js";import{C as Ie}from"./chevron-down-CzkIrRvq.js";import{C as P,a as O,R as K,S as Je}from"./shield-alert-D22PJX5S.js";import{L as R}from"./loader-circle-CNbkR79_.js";import{E as Z}from"./external-link-D9b8lwPM.js";import{u as V}from"./useMutation-D-leEq6C.js";import{u as qe}from"./useInfiniteQuery-gjnIRn2t.js";import"./useBaseQuery-DCY5lvEf.js";/**
2
  * @license lucide-react v0.462.0 - ISC
3
  *
4
  * This source code is licensed under the ISC license.
assets/{ExternalSourceEvalBadge-CrNqFzv-.js → ExternalSourceEvalBadge-C2oFJsOX.js} RENAMED
@@ -1 +1 @@
1
- import{j as e,L as l}from"./index-eBKbcCso.js";import{H as t,a as n,b as o}from"./hover-card-CdeSv7Gc.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};
 
1
+ import{j as e,L as l}from"./index-B2CsYqS1.js";import{H as t,a as n,b as o}from"./hover-card-DfDU2jCA.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/ExternalSourceEvalBadge-DXfuqNnO.css ADDED
@@ -0,0 +1 @@
 
 
1
+ .bm-closed-source-tag,.bm-external-source-tag{display:inline-block;margin-left:8px;padding:1px 6px;border-radius:999px;font-family:var(--mono);font-size:10px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;vertical-align:middle;cursor:help;line-height:1.4}.bm-closed-source-tag{color:var(--ink-soft);background:var(--surface-2, oklch(.95 .01 250));border:1px solid var(--border, oklch(.88 .01 250))}.bm-external-source-tag{color:var(--info-text);background:var(--info-bg);border:1px solid var(--info-border)}.bm-closed-source-tag:focus-visible,.bm-external-source-tag:focus-visible{outline:2px solid var(--hairline-strong);outline-offset:2px}
assets/{FeedView-Ckhi5XA2.js → FeedView-D-5_v1-m.js} RENAMED
@@ -1 +1 @@
1
- import{u as O,r as p,j as e,a as H,L as _,i as F,b as E}from"./index-eBKbcCso.js";import{P as I}from"./components-D8Z2f6Zw.js";import{P as q}from"./PaperFeedFilters-vnoti5eB.js";import{D as U,M as $,F as K,A as B,q as W}from"./chatSessions-L9GbPmnt.js";import{S as g}from"./chatPrompts-CDY3UGU1.js";import{t as G,d as k}from"./transform-DM1_5UAz.js";import{u as z}from"./usePapers-B09ZSLzW.js";import{u as Q}from"./useIntersectionObserver-BjpbHbpf.js";import{P as V}from"./usePeriodFilter-APVJLG-P.js";import{S as f}from"./skeleton-Cd-jfjiE.js";import{A as X,a as Y}from"./alert-BCeSLEYS.js";import{u as L}from"./useQuery-DIrXGOA7.js";import"./LatexTitle-CqLY2qFp.js";import"./katex.min-BSBacQyE.js";import"./useInfiniteQuery-PtHXMuOU.js";import"./useBaseQuery-CZIeK7IO.js";const J=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],Z={Today:"today","This Week":"week","This Month":"month","All Time":"all_time"},ee={today:"Today",week:"This Week",month:"This Month",all_time:"All Time"},S=45,se=1800,te=25,ae=350,re=a=>{const[i,d]=p.useState(g[0].slice(0,1));return p.useEffect(()=>{var r,u;if(!a)return;if((u=(r=window.matchMedia)==null?void 0:r.call(window,"(prefers-reduced-motion: reduce)"))!=null&&u.matches){d(g[0]);return}let m=0,n=1,h=!1,o;d(g[0].slice(0,n));const l=()=>{const x=g[m];if(!h){if(n+=1,d(x.slice(0,n)),n===x.length){h=!0,o=window.setTimeout(l,se);return}o=window.setTimeout(l,S);return}if(n-=1,d(x.slice(0,n)),n===0){h=!1,m=(m+1)%g.length,o=window.setTimeout(l,ae);return}o=window.setTimeout(l,te)};return o=window.setTimeout(l,S),()=>window.clearTimeout(o)},[a]),i},ie=a=>a==="trending"||a==="date_published"||a==="citation_count"?a:"trending",ne=a=>a==="today"||a==="week"||a==="month"||a==="all_time"?a:"all_time",oe=()=>{const a=O(),[i,d]=p.useState(""),[m,n]=p.useState(U),h=re(!i),o=p.useRef(null);p.useEffect(()=>{const r=o.current;r&&(r.style.height="auto",r.style.height=`${Math.min(r.scrollHeight,160)}px`)},[i]);const l=(r=i)=>{const u=r.trim();u&&(W(u,m),a("/chat"))};return e.jsxs("div",{className:"ask-home",children:[e.jsx("textarea",{ref:o,rows:1,value:i,placeholder:h,"aria-label":"Ask the assistant",onChange:r=>d(r.target.value),onKeyDown:r=>{r.key==="Enter"&&!r.shiftKey&&(r.preventDefault(),l())}}),e.jsxs("div",{className:"ask-home-foot",children:[e.jsxs("div",{className:"ask-home-provider-tools",children:[e.jsx($,{models:K,selectedModel:m,onModelChange:n}),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${i.trim()?" chat-send-on":""}`,onClick:()=>l(),disabled:!i.trim(),"aria-label":"Ask the assistant",children:e.jsx(B,{})})]})]})},we=()=>{var b,w,v,P,A;const[a,i]=H(),d=ie(a.get("order_by")),m=ne(a.get("time")),n=a.get("has_code")==="true",h=a.get("has_hf_artifacts")==="true",o=ee[m],l=s=>{const t=new URLSearchParams(a);t.set("order_by",s),i(t)},r=s=>{const t=new URLSearchParams(a);t.set("time",Z[s]),i(t)},u=s=>{const t=new URLSearchParams(a);s?t.set("has_code","true"):t.delete("has_code"),i(t)},x=s=>{const t=new URLSearchParams(a);s?t.set("has_hf_artifacts","true"):t.delete("has_hf_artifacts"),i(t)},N=L({queryKey:["top-tasks-sidebar"],queryFn:()=>E.getTopTasks({limit:8}),staleTime:10*60*1e3}),j=L({queryKey:["trending-tasks-sidebar"],queryFn:()=>E.getTrendingTasks({limit:8,level:0}),staleTime:10*60*1e3}),c=z({page_size:30,order_by:d,order_dir:"desc",time:m,include_resources:!0,has_code:n,has_hf_artifacts:h}),y=p.useMemo(()=>{var t;return(((t=c.data)==null?void 0:t.pages.flatMap(R=>R.results))||[]).map(G)},[c.data]),{targetRef:C,isIntersecting:T}=Q({rootMargin:"400px"});p.useEffect(()=>{T&&c.hasNextPage&&!c.isFetchingNextPage&&c.fetchNextPage()},[T,c.hasNextPage,c.isFetchingNextPage]);const M=c.isLoading,D=c.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"}),N.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((s,t)=>e.jsx(f,{className:"h-5 w-full"},t))}),(b=N.data)==null?void 0:b.map(s=>e.jsxs(_,{to:`/tasks/${s.slug}`,className:"sidebar-link",children:[k(s.name,s.slug),s.paper_count!=null&&e.jsx("span",{className:"count",children:s.paper_count})]},s.id)),e.jsx(_,{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"}),j.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((s,t)=>e.jsx(f,{className:"h-5 w-full"},t))}),((v=(w=j.data)==null?void 0:w.results)==null?void 0:v.length)===0&&!j.isLoading&&e.jsx("div",{style:{fontSize:12,color:"var(--ink-faint)"},children:"No domains gaining momentum right now."}),(A=(P=j.data)==null?void 0:P.results)==null?void 0:A.map(s=>e.jsxs(_,{to:`/tasks/${s.slug}`,className:"sidebar-link",children:[k(s.name,s.slug),e.jsxs("span",{className:"count",children:[s.share_lift.toFixed(1),"x"]})]},s.id))]})]}),e.jsxs("div",{children:[F()&&e.jsx(oe,{}),e.jsxs("div",{className:"sort-bar home-feed-sort-bar",children:[e.jsxs("div",{className:"paper-feed-toolbar-controls",children:[e.jsx("div",{className:"sort-options",children:J.map(([s,t])=>e.jsx("button",{className:`sort-btn ${d===s?"active":""}`,onClick:()=>l(s),children:t},s))}),e.jsx(q,{hasCode:n,hasHfArtifacts:h,onHasCodeChange:u,onHasHfArtifactsChange:x})]}),e.jsx("div",{className:"sort-options sort-options-time",children:V.map(s=>e.jsx("button",{className:`sort-btn sort-btn-time ${o===s?"active":""}`,onClick:()=>r(s),children:s},s))})]}),D&&e.jsx(X,{variant:"destructive",className:"mb-4",children:e.jsx(Y,{children:"Failed to load papers. Please try again."})}),M?e.jsx("div",{className:"paper-list",children:Array.from({length:6}).map((s,t)=>e.jsxs("div",{className:"paper-card",children:[e.jsx("div",{className:"paper-thumb-wrap",children:e.jsx(f,{className:"paper-thumb-skeleton"})}),e.jsxs("div",{className:"paper-body",style:{flex:1,gap:12},children:[e.jsx(f,{className:"h-6 w-3/4"}),e.jsx(f,{className:"h-4 w-1/2"}),e.jsx(f,{className:"h-12 w-full"})]})]},t))}):y.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:y.map((s,t)=>e.jsx(I,{paper:s,rank:t+1},s.id))}),e.jsx("div",{ref:C,style:{height:1}}),c.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]})]})]})};export{oe as AskAssistant,we as default};
 
1
+ import{u as O,r as p,j as e,a as H,L as _,i as F,b as E}from"./index-B2CsYqS1.js";import{P as I}from"./components-Dt_hKhor.js";import{P as q}from"./PaperFeedFilters-DC6dQXvU.js";import{D as U,M as $,F as K,A as B,q as W}from"./chatSessions-Roa-dbFO.js";import{S as g}from"./chatPrompts-CDY3UGU1.js";import{t as G,d as k}from"./transform-Csq86xeP.js";import{u as z}from"./usePapers-BUvi-1N_.js";import{u as Q}from"./useIntersectionObserver-BEQRRw3B.js";import{P as V}from"./usePeriodFilter-CtyKeB9n.js";import{S as f}from"./skeleton-EzEzG6PT.js";import{A as X,a as Y}from"./alert-B5Pni1K6.js";import{u as L}from"./useQuery-D09nn2D4.js";import"./LatexTitle-DhaqzMPt.js";import"./katex.min-BSBacQyE.js";import"./useInfiniteQuery-gjnIRn2t.js";import"./useBaseQuery-DCY5lvEf.js";const J=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],Z={Today:"today","This Week":"week","This Month":"month","All Time":"all_time"},ee={today:"Today",week:"This Week",month:"This Month",all_time:"All Time"},S=45,se=1800,te=25,ae=350,re=a=>{const[i,d]=p.useState(g[0].slice(0,1));return p.useEffect(()=>{var r,u;if(!a)return;if((u=(r=window.matchMedia)==null?void 0:r.call(window,"(prefers-reduced-motion: reduce)"))!=null&&u.matches){d(g[0]);return}let m=0,n=1,h=!1,o;d(g[0].slice(0,n));const l=()=>{const x=g[m];if(!h){if(n+=1,d(x.slice(0,n)),n===x.length){h=!0,o=window.setTimeout(l,se);return}o=window.setTimeout(l,S);return}if(n-=1,d(x.slice(0,n)),n===0){h=!1,m=(m+1)%g.length,o=window.setTimeout(l,ae);return}o=window.setTimeout(l,te)};return o=window.setTimeout(l,S),()=>window.clearTimeout(o)},[a]),i},ie=a=>a==="trending"||a==="date_published"||a==="citation_count"?a:"trending",ne=a=>a==="today"||a==="week"||a==="month"||a==="all_time"?a:"all_time",oe=()=>{const a=O(),[i,d]=p.useState(""),[m,n]=p.useState(U),h=re(!i),o=p.useRef(null);p.useEffect(()=>{const r=o.current;r&&(r.style.height="auto",r.style.height=`${Math.min(r.scrollHeight,160)}px`)},[i]);const l=(r=i)=>{const u=r.trim();u&&(W(u,m),a("/chat"))};return e.jsxs("div",{className:"ask-home",children:[e.jsx("textarea",{ref:o,rows:1,value:i,placeholder:h,"aria-label":"Ask the assistant",onChange:r=>d(r.target.value),onKeyDown:r=>{r.key==="Enter"&&!r.shiftKey&&(r.preventDefault(),l())}}),e.jsxs("div",{className:"ask-home-foot",children:[e.jsxs("div",{className:"ask-home-provider-tools",children:[e.jsx($,{models:K,selectedModel:m,onModelChange:n}),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${i.trim()?" chat-send-on":""}`,onClick:()=>l(),disabled:!i.trim(),"aria-label":"Ask the assistant",children:e.jsx(B,{})})]})]})},we=()=>{var b,w,v,P,A;const[a,i]=H(),d=ie(a.get("order_by")),m=ne(a.get("time")),n=a.get("has_code")==="true",h=a.get("has_hf_artifacts")==="true",o=ee[m],l=s=>{const t=new URLSearchParams(a);t.set("order_by",s),i(t)},r=s=>{const t=new URLSearchParams(a);t.set("time",Z[s]),i(t)},u=s=>{const t=new URLSearchParams(a);s?t.set("has_code","true"):t.delete("has_code"),i(t)},x=s=>{const t=new URLSearchParams(a);s?t.set("has_hf_artifacts","true"):t.delete("has_hf_artifacts"),i(t)},N=L({queryKey:["top-tasks-sidebar"],queryFn:()=>E.getTopTasks({limit:8}),staleTime:10*60*1e3}),j=L({queryKey:["trending-tasks-sidebar"],queryFn:()=>E.getTrendingTasks({limit:8,level:0}),staleTime:10*60*1e3}),c=z({page_size:30,order_by:d,order_dir:"desc",time:m,include_resources:!0,has_code:n,has_hf_artifacts:h}),y=p.useMemo(()=>{var t;return(((t=c.data)==null?void 0:t.pages.flatMap(R=>R.results))||[]).map(G)},[c.data]),{targetRef:C,isIntersecting:T}=Q({rootMargin:"400px"});p.useEffect(()=>{T&&c.hasNextPage&&!c.isFetchingNextPage&&c.fetchNextPage()},[T,c.hasNextPage,c.isFetchingNextPage]);const M=c.isLoading,D=c.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"}),N.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((s,t)=>e.jsx(f,{className:"h-5 w-full"},t))}),(b=N.data)==null?void 0:b.map(s=>e.jsxs(_,{to:`/tasks/${s.slug}`,className:"sidebar-link",children:[k(s.name,s.slug),s.paper_count!=null&&e.jsx("span",{className:"count",children:s.paper_count})]},s.id)),e.jsx(_,{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"}),j.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((s,t)=>e.jsx(f,{className:"h-5 w-full"},t))}),((v=(w=j.data)==null?void 0:w.results)==null?void 0:v.length)===0&&!j.isLoading&&e.jsx("div",{style:{fontSize:12,color:"var(--ink-faint)"},children:"No domains gaining momentum right now."}),(A=(P=j.data)==null?void 0:P.results)==null?void 0:A.map(s=>e.jsxs(_,{to:`/tasks/${s.slug}`,className:"sidebar-link",children:[k(s.name,s.slug),e.jsxs("span",{className:"count",children:[s.share_lift.toFixed(1),"x"]})]},s.id))]})]}),e.jsxs("div",{children:[F()&&e.jsx(oe,{}),e.jsxs("div",{className:"sort-bar home-feed-sort-bar",children:[e.jsxs("div",{className:"paper-feed-toolbar-controls",children:[e.jsx("div",{className:"sort-options",children:J.map(([s,t])=>e.jsx("button",{className:`sort-btn ${d===s?"active":""}`,onClick:()=>l(s),children:t},s))}),e.jsx(q,{hasCode:n,hasHfArtifacts:h,onHasCodeChange:u,onHasHfArtifactsChange:x})]}),e.jsx("div",{className:"sort-options sort-options-time",children:V.map(s=>e.jsx("button",{className:`sort-btn sort-btn-time ${o===s?"active":""}`,onClick:()=>r(s),children:s},s))})]}),D&&e.jsx(X,{variant:"destructive",className:"mb-4",children:e.jsx(Y,{children:"Failed to load papers. Please try again."})}),M?e.jsx("div",{className:"paper-list",children:Array.from({length:6}).map((s,t)=>e.jsxs("div",{className:"paper-card",children:[e.jsx("div",{className:"paper-thumb-wrap",children:e.jsx(f,{className:"paper-thumb-skeleton"})}),e.jsxs("div",{className:"paper-body",style:{flex:1,gap:12},children:[e.jsx(f,{className:"h-6 w-3/4"}),e.jsx(f,{className:"h-4 w-1/2"}),e.jsx(f,{className:"h-12 w-full"})]})]},t))}):y.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:y.map((s,t)=>e.jsx(I,{paper:s,rank:t+1},s.id))}),e.jsx("div",{ref:C,style:{height:1}}),c.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]})]})]})};export{oe as AskAssistant,we as default};
assets/{FrameworksIndexView-C8GZQYF_.js → FrameworksIndexView-Pda1JTNy.js} RENAMED
@@ -1 +1 @@
1
- import{R as c,j as e,L as d,b as m}from"./index-eBKbcCso.js";import{u as h}from"./useQuery-DIrXGOA7.js";import{I as g}from"./components-D8Z2f6Zw.js";import{e as p,h as u}from"./transform-DM1_5UAz.js";import"./useBaseQuery-CZIeK7IO.js";import"./LatexTitle-CqLY2qFp.js";import"./katex.min-BSBacQyE.js";const f={gpu:"GPU",cpu:"CPU",apple:"Apple silicon"},x={display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:24,paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},j={fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.02em",marginBottom:4},v={fontFamily:"var(--serif)",fontStyle:"italic",fontSize:13,color:"var(--ink-soft)"},k={fontFamily:"var(--mono)",fontSize:13,fontWeight:600,letterSpacing:"0.04em",textTransform:"uppercase",color:"var(--ink)",marginBottom:6},w=({platform:r})=>{const i=p(u(r));return e.jsx("span",{className:"framework-platform-chip",style:{background:i.bg,color:i.text},children:f[r]})},_=({framework:r})=>e.jsxs("article",{id:`framework-${r.slug}`,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.organization_name&&e.jsx("div",{className:"framework-card-org",children:r.organization_name})]}),r.platforms&&r.platforms.length>0&&e.jsx("div",{className:"framework-platform-row",children:r.platforms.map(i=>e.jsx(w,{platform:i},i))})]}),e.jsx("p",{className:"framework-card-desc",children:r.description}),r.when_to_use&&e.jsxs("div",{className:"framework-card-when",children:[e.jsx("span",{className:"framework-card-when-label",children:"When to use"}),r.when_to_use]}),(r.github_url||r.docs_url||r.introducing_paper_arxiv_id)&&e.jsxs("div",{className:"framework-card-links",children:[r.introducing_paper_arxiv_id&&e.jsx(d,{to:`/paper/${r.introducing_paper_arxiv_id}`,className:"framework-link",children:"Paper"}),r.github_url&&e.jsxs("a",{href:r.github_url,target:"_blank",rel:"noopener noreferrer",className:"framework-link",children:[e.jsx(g,{name:"github",size:13}),"GitHub"]}),r.docs_url&&r.docs_url!==r.github_url&&e.jsx("a",{href:r.docs_url,target:"_blank",rel:"noopener noreferrer",className:"framework-link",children:"Docs"})]})]}),B=()=>{var l;const r=h({queryKey:["framework-catalog"],queryFn:()=>m.getFrameworkCatalog()}),i=((l=r.data)==null?void 0:l.domains)??[],o=i.reduce((a,s)=>a+s.categories.reduce((n,t)=>n+t.frameworks.length,0),0);return c.useEffect(()=>{var s;const a=window.location.hash.slice(1);a&&((s=document.getElementById(a))==null||s.scrollIntoView())},[r.data]),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."})]})}),r.isLoading&&e.jsx("div",{className:"empty",children:"Loading frameworks…"}),r.isError&&e.jsx("div",{className:"empty",children:"Could not load frameworks."}),i.map(a=>e.jsxs("section",{style:{marginBottom:56},children:[e.jsxs("div",{style:x,children:[e.jsxs("div",{children:[e.jsx("h2",{style:j,children:a.name}),e.jsx("div",{style:v,children:a.description})]}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[a.categories.length," ",a.categories.length===1?"category":"categories"," ·"," ",a.categories.reduce((s,n)=>s+n.frameworks.length,0)," frameworks"]})]}),a.categories.map(s=>e.jsxs("div",{className:"framework-category",children:[e.jsxs("div",{className:"framework-category-head",children:[e.jsxs("div",{children:[e.jsx("h3",{style:k,children:s.name}),s.description&&e.jsx("p",{className:"framework-category-blurb",children:s.description}),s.guide_url&&e.jsxs("a",{href:s.guide_url,target:"_blank",rel:"noopener noreferrer",className:"framework-guide-link",children:[s.guide_label??"Read guide"," →"]})]}),e.jsxs("div",{className:"framework-category-meta",children:[s.frameworks.length," ",s.frameworks.length===1?"framework":"frameworks"]})]}),e.jsx("div",{className:"framework-grid",children:s.frameworks.map(n=>e.jsx(_,{framework:n},n.slug))})]},s.slug))]},a.slug)),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",marginTop:8},children:[o," frameworks across ",i.length," ",i.length===1?"domain":"domains",". More areas coming soon."]})]})};export{B as default};
 
1
+ import{R as c,j as e,L as d,b as m}from"./index-B2CsYqS1.js";import{u as h}from"./useQuery-D09nn2D4.js";import{I as g}from"./components-Dt_hKhor.js";import{e as p,h as u}from"./transform-Csq86xeP.js";import"./useBaseQuery-DCY5lvEf.js";import"./LatexTitle-DhaqzMPt.js";import"./katex.min-BSBacQyE.js";const f={gpu:"GPU",cpu:"CPU",apple:"Apple silicon"},x={display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:24,paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},j={fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.02em",marginBottom:4},v={fontFamily:"var(--serif)",fontStyle:"italic",fontSize:13,color:"var(--ink-soft)"},k={fontFamily:"var(--mono)",fontSize:13,fontWeight:600,letterSpacing:"0.04em",textTransform:"uppercase",color:"var(--ink)",marginBottom:6},w=({platform:r})=>{const i=p(u(r));return e.jsx("span",{className:"framework-platform-chip",style:{background:i.bg,color:i.text},children:f[r]})},_=({framework:r})=>e.jsxs("article",{id:`framework-${r.slug}`,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.organization_name&&e.jsx("div",{className:"framework-card-org",children:r.organization_name})]}),r.platforms&&r.platforms.length>0&&e.jsx("div",{className:"framework-platform-row",children:r.platforms.map(i=>e.jsx(w,{platform:i},i))})]}),e.jsx("p",{className:"framework-card-desc",children:r.description}),r.when_to_use&&e.jsxs("div",{className:"framework-card-when",children:[e.jsx("span",{className:"framework-card-when-label",children:"When to use"}),r.when_to_use]}),(r.github_url||r.docs_url||r.introducing_paper_arxiv_id)&&e.jsxs("div",{className:"framework-card-links",children:[r.introducing_paper_arxiv_id&&e.jsx(d,{to:`/paper/${r.introducing_paper_arxiv_id}`,className:"framework-link",children:"Paper"}),r.github_url&&e.jsxs("a",{href:r.github_url,target:"_blank",rel:"noopener noreferrer",className:"framework-link",children:[e.jsx(g,{name:"github",size:13}),"GitHub"]}),r.docs_url&&r.docs_url!==r.github_url&&e.jsx("a",{href:r.docs_url,target:"_blank",rel:"noopener noreferrer",className:"framework-link",children:"Docs"})]})]}),B=()=>{var l;const r=h({queryKey:["framework-catalog"],queryFn:()=>m.getFrameworkCatalog()}),i=((l=r.data)==null?void 0:l.domains)??[],o=i.reduce((a,s)=>a+s.categories.reduce((n,t)=>n+t.frameworks.length,0),0);return c.useEffect(()=>{var s;const a=window.location.hash.slice(1);a&&((s=document.getElementById(a))==null||s.scrollIntoView())},[r.data]),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."})]})}),r.isLoading&&e.jsx("div",{className:"empty",children:"Loading frameworks…"}),r.isError&&e.jsx("div",{className:"empty",children:"Could not load frameworks."}),i.map(a=>e.jsxs("section",{style:{marginBottom:56},children:[e.jsxs("div",{style:x,children:[e.jsxs("div",{children:[e.jsx("h2",{style:j,children:a.name}),e.jsx("div",{style:v,children:a.description})]}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[a.categories.length," ",a.categories.length===1?"category":"categories"," ·"," ",a.categories.reduce((s,n)=>s+n.frameworks.length,0)," frameworks"]})]}),a.categories.map(s=>e.jsxs("div",{className:"framework-category",children:[e.jsxs("div",{className:"framework-category-head",children:[e.jsxs("div",{children:[e.jsx("h3",{style:k,children:s.name}),s.description&&e.jsx("p",{className:"framework-category-blurb",children:s.description}),s.guide_url&&e.jsxs("a",{href:s.guide_url,target:"_blank",rel:"noopener noreferrer",className:"framework-guide-link",children:[s.guide_label??"Read guide"," →"]})]}),e.jsxs("div",{className:"framework-category-meta",children:[s.frameworks.length," ",s.frameworks.length===1?"framework":"frameworks"]})]}),e.jsx("div",{className:"framework-grid",children:s.frameworks.map(n=>e.jsx(_,{framework:n},n.slug))})]},s.slug))]},a.slug)),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",marginTop:8},children:[o," frameworks across ",i.length," ",i.length===1?"domain":"domains",". More areas coming soon."]})]})};export{B as default};
assets/{LatexTitle-CqLY2qFp.js → LatexTitle-DhaqzMPt.js} RENAMED
@@ -1 +1 @@
1
- import{j as o,r as g}from"./index-eBKbcCso.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-B2CsYqS1.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-B_dvaNfN.js → MarkdownText-CnXxe_CG.js} RENAMED
@@ -1 +1 @@
1
- import{S as l,j as s,L as u}from"./index-eBKbcCso.js";import"./katex.min-BSBacQyE.js";import{r as p,a as m,P as h}from"./PaperPreviewLink-BrlkKB05.js";import{M as d,r as w}from"./index-LmPbjihc.js";const x=new Set(["paperswithcode.co","www.paperswithcode.co","localhost","127.0.0.1","167.235.148.241"]),P=["/methods","/paper","/papers","/tasks","/benchmark","/conferences"];function f(n,o=window.location.origin){if(!n)return null;let t;if(n.startsWith("/"))t=n;else try{const r=new URL(n,o);if(!x.has(r.hostname))return null;t=`${r.pathname}${r.search}${r.hash}`}catch{return null}const e=t.split(/[?#]/,1)[0];return P.some(r=>e===r||e.startsWith(`${r}/`))?t:null}function k(n){const t=n.split(/[?#]/,1)[0].match(/^\/papers?\/([^/]+)$/);if(!t||t[1].includes("%"))return null;const e=t[1],r=/^\d{4}[.-]\d{4,5}(?:v\d+)?$/.test(e),a=/^[1-9]\d*$/.test(e);return!r&&!a?null:l(e)}const E=({text:n,className:o=""})=>s.jsx("div",{className:o,children:s.jsx(d,{remarkPlugins:[w,m],rehypePlugins:[p],components:{a:({href:t,children:e,node:r,...a})=>{const i=f(t);if(i){const c=k(i);return c?s.jsx(h,{routeId:c,to:i,...a,children:e}):s.jsx(u,{to:i,...a,children:e})}return s.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer",...a,children:e})}},children:n})});export{E as M};
 
1
+ import{S as l,j as s,L as u}from"./index-B2CsYqS1.js";import"./katex.min-BSBacQyE.js";import{r as p,a as m,P as h}from"./PaperPreviewLink-DyP6osoH.js";import{M as d,r as w}from"./index-6E7p68ra.js";const x=new Set(["paperswithcode.co","www.paperswithcode.co","localhost","127.0.0.1","167.235.148.241"]),P=["/methods","/paper","/papers","/tasks","/benchmark","/conferences"];function f(n,o=window.location.origin){if(!n)return null;let t;if(n.startsWith("/"))t=n;else try{const r=new URL(n,o);if(!x.has(r.hostname))return null;t=`${r.pathname}${r.search}${r.hash}`}catch{return null}const e=t.split(/[?#]/,1)[0];return P.some(r=>e===r||e.startsWith(`${r}/`))?t:null}function k(n){const t=n.split(/[?#]/,1)[0].match(/^\/papers?\/([^/]+)$/);if(!t||t[1].includes("%"))return null;const e=t[1],r=/^\d{4}[.-]\d{4,5}(?:v\d+)?$/.test(e),a=/^[1-9]\d*$/.test(e);return!r&&!a?null:l(e)}const E=({text:n,className:o=""})=>s.jsx("div",{className:o,children:s.jsx(d,{remarkPlugins:[w,m],rehypePlugins:[p],components:{a:({href:t,children:e,node:r,...a})=>{const i=f(t);if(i){const c=k(i);return c?s.jsx(h,{routeId:c,to:i,...a,children:e}):s.jsx(u,{to:i,...a,children:e})}return s.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer",...a,children:e})}},children:n})});export{E as M};
assets/{MethodDetailView-XKPkm91i.js → MethodDetailView-Bld6Pqgc.js} RENAMED
@@ -1 +1 @@
1
- import{j as e,r as E,e as W,a as V,L as R,b as v,aj as Z}from"./index-eBKbcCso.js";import{u as A}from"./useQuery-DIrXGOA7.js";import{u as X}from"./useInfiniteQuery-PtHXMuOU.js";import{M as Y,P as J}from"./components-D8Z2f6Zw.js";import{P as ee}from"./PaperFeedFilters-vnoti5eB.js";import{M as H}from"./MarkdownText-B_dvaNfN.js";import{s as te}from"./slug-BpH-Nkvz.js";import{t as se}from"./transform-DM1_5UAz.js";import{u as ae}from"./useIntersectionObserver-BjpbHbpf.js";import{S as M}from"./skeleton-Cd-jfjiE.js";import{A as ie,a as re}from"./alert-BCeSLEYS.js";import"./useBaseQuery-CZIeK7IO.js";import"./LatexTitle-CqLY2qFp.js";import"./katex.min-BSBacQyE.js";import"./PaperPreviewLink-BrlkKB05.js";import"./index-LmPbjihc.js";import"./hover-card-CdeSv7Gc.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"},p=({x:s,y:a,w:i,h:r,fill:f,stroke:j,label:g,fontSize:c=10,multiline:y})=>e.jsxs("g",{children:[e.jsx("rect",{x:s,y:a,width:i,height:r,rx:"3",ry:"3",fill:f,stroke:j,strokeWidth:"1"}),y?e.jsxs(e.Fragment,{children:[e.jsx("text",{x:s+i/2,y:a+r/2-2,fontSize:c,fontFamily:"var(--sans)",fill:t.ink,textAnchor:"middle",dominantBaseline:"middle",children:y[0]}),e.jsx("text",{x:s+i/2,y:a+r/2+c-1,fontSize:c,fontFamily:"var(--sans)",fill:t.ink,textAnchor:"middle",dominantBaseline:"middle",children:y[1]})]}):e.jsx("text",{x:s+i/2,y:a+r/2,fontSize:c,fontFamily:"var(--sans)",fill:t.ink,textAnchor:"middle",dominantBaseline:"middle",children:g})]}),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:"Scaled Dot-Product Attention"}),e.jsx(p,{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(p,{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(p,{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(p,{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(p,{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(p,{x:100,y:270,w:40,h:24,fill:t.pink,stroke:t.pinkS,label:"Q",fontSize:13}),e.jsx(p,{x:160,y:270,w:40,h:24,fill:t.pink,stroke:t.pinkS,label:"K",fontSize:13}),e.jsx(p,{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"]})]}),ne=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[[0,1,2,3].map(s=>{const a=30+s*75,i=60-s*8,r=240-s*30;return e.jsx("g",{children:e.jsx("rect",{x:a,y:(420-r)/2,width:i,height:r,rx:"2",fill:[t.blue,t.green,t.orange,t.purple][s],stroke:[t.blueS,t.greenS,t.orangeS,t.purpleS][s],strokeWidth:"1"})},s)}),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"})]}),q=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[[0,1,2,3].map(s=>{const i=60+s*80,r=100-s*12,f=50-s*6;return e.jsx("rect",{x:50,y:i,width:r,height:f,rx:"2",fill:t.blue,stroke:t.blueS,strokeWidth:"1"},`e${s}`)}),e.jsx("rect",{x:"155",y:"320",width:"50",height:"40",rx:"2",fill:t.purple,stroke:t.purpleS}),[0,1,2,3].map(s=>{const i=60+s*80,r=100-s*12,f=50-s*6;return e.jsx("rect",{x:210,y:i,width:r,height:f,rx:"2",fill:t.green,stroke:t.greenS,strokeWidth:"1"},`d${s}`)}),[0,1,2,3].map(s=>{const a=60+s*80+(50-s*6)/2,i=50+(100-s*12);return e.jsx("path",{d:`M${i} ${a} L210 ${a}`,stroke:t.faint,strokeDasharray:"4 3"},`s${s}`)}),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"})]}),le=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[[0,1,2].map(s=>[0,1,2].map(a=>e.jsx("rect",{x:20+a*40,y:40+s*40,width:"38",height:"38",fill:["#F8D7D9","#FBEFC2","#CDE2EE","#CCE2C5","#D4D2EA","#F8D7B3","#F8D7D9","#FBEFC2","#CDE2EE"][s*3+a],stroke:t.faint},`${s}-${a}`))),e.jsx("rect",{x:"40",y:"245",width:"280",height:"120",rx:"4",fill:"#EFEBE0",stroke:t.faint,strokeDasharray:"3 2"}),e.jsx(p,{x:70,y:258,w:220,h:20,fill:t.yellow,stroke:t.yellowS,label:"Norm"}),e.jsx(p,{x:70,y:282,w:220,h:28,fill:t.orange,stroke:t.orangeS,label:"Multi-Head Attention"}),e.jsx(p,{x:70,y:314,w:220,h:20,fill:t.yellow,stroke:t.yellowS,label:"Norm"}),e.jsx(p,{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×"})]}),O=()=>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(s=>{const a=25+s*56,i=(5-s)/5;return e.jsxs("g",{children:[e.jsx("rect",{x:a,y:90,width:50,height:50,rx:"3",fill:`oklch(${.85-i*.1} 0.04 250)`,stroke:t.faint}),i<.4&&e.jsx("circle",{cx:a+25,cy:115,r:12-i*16,fill:t.orange,opacity:1-i*1.5})]},s)}),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)‖²]"})]}),oe=()=>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"})]}),ce=()=>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})]}),de=[["my-skill/",""],["├── SKILL.md","# Required: metadata + instructions"],["├── scripts/","# Optional: executable code"],["├── references/","# Optional: documentation"],["├── assets/","# Optional: templates, resources"],["└── ...","# Any additional files or directories"]],he=()=>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"}),de.map(([s,a],i)=>{const r=92+i*44;return e.jsxs("g",{children:[e.jsx("text",{x:"44",y:r,fontSize:"11",fontFamily:"var(--mono)",fill:t.ink,dominantBaseline:"middle",children:s}),a?e.jsx("text",{x:"138",y:r,fontSize:"8.5",fontFamily:"var(--mono)",fill:t.faint,dominantBaseline:"middle",children:a}):null]},s)})]}),xe={attention:G,"self-attention":G,cnn:ne,"u-net":q,unet:q,vit:le,diffusion:O,ddpm:O,gan:oe,vae:ce,"agent-skills":he},me=({method:s})=>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:s.name||"method"}),e.jsx(p,{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(p,{x:80,y:150,w:200,h:70,fill:t.orange,stroke:t.orangeS,label:s.name||"transform",fontSize:13}),e.jsx("path",{d:"M180 220 L180 250",stroke:t.ink}),e.jsx(p,{x:80,y:250,w:200,h:50,fill:t.purple,stroke:t.purpleS,label:"Output",fontSize:12})]}),fe=({method:s})=>{const a=(s.slug||"").toLowerCase(),i=xe[a];if(i)return e.jsx("div",{className:"method-figure-svg method-figure-svg--schematic",children:e.jsx(i,{})});if(s.image_url){const r=a==="transformer"||a==="gpt-4"||a==="gpt-4o"?" method-figure-svg--compact":a==="rpn"?" method-figure-svg--scaled-80":"";return e.jsx("div",{className:`method-figure-svg method-figure-svg--image${r}`,children:e.jsx("img",{className:"method-figure-img",src:s.image_url,alt:`${s.name} figure`})})}return e.jsx("div",{className:"method-figure-svg method-figure-svg--schematic",children:e.jsx(me,{method:s})})},L=720,C=138,u={top:8,right:10,bottom:25,left:36},U=56,pe=new Intl.DateTimeFormat("en",{month:"short",year:"2-digit",timeZone:"UTC"}),ge=new Intl.DateTimeFormat("en",{year:"numeric",timeZone:"UTC"}),B=s=>pe.format(new Date(`${s}T00:00:00Z`)),ue=(s,a)=>{if(s===0)return new Set;const i=s>48?12:s>36?6:s>18?3:2,r=Math.max(1,Math.ceil(U/a)),f=Math.max(i,r),j=s-1,g=new Set([0,j]);for(let c=f;c<j;c+=f)(j-c)*a>=U&&g.add(c);return g},K=s=>{if(s.coverage_status===void 0||["complete","not_applicable"].includes(s.coverage_status))return null;const a=s.processed_paper_count!==void 0&&s.eligible_paper_count!==void 0?`; ${s.processed_paper_count.toLocaleString()} of ${s.eligible_paper_count.toLocaleString()} eligible papers processed`:"";return`Historical tagging ${s.coverage_status==="failed"?"needs retry":"in progress"}${a}`},je=({history:s,methodName:a})=>{const[i,r]=E.useState(null),f=Math.max(1,...s.map(n=>n.paper_count)),j=L-u.left-u.right,g=C-u.top-u.bottom,c=s.length?j/s.length:j,y=Math.max(2,c*.68),d=ue(s.length,c),z=Array.from(new Set([0,Math.ceil(f/2),f])),x=i==null?null:s[i],S=x?K(x):null;return e.jsxs("div",{className:"method-usage-chart-wrap",children:[e.jsxs("svg",{className:"method-usage-chart",viewBox:`0 0 ${L} ${C}`,role:"group","aria-label":`${a}: papers mentioning this method by publication month`,children:[e.jsxs("title",{children:[a,": papers mentioning this method by publication month"]}),z.map(n=>{const m=u.top+g-n/f*g;return e.jsxs("g",{children:[e.jsx("line",{className:"method-usage-gridline",x1:u.left,x2:L-u.right,y1:m,y2:m}),e.jsx("text",{className:"method-usage-y-label",x:u.left-8,y:m+3,textAnchor:"end",children:n})]},n)}),s.map((n,m)=>{const k=n.paper_count/f*g,b=n.paper_count>0?Math.max(1,k):0,F=u.left+c*m+(c-y)/2,l=u.top+g-b,_=i===m,N=m===s.length-1,w=K(n);return e.jsxs("g",{className:`method-usage-bar${_?" is-active":""}${N?" is-current":""}`,tabIndex:0,role:"img","aria-label":`${B(n.start_date)}: ${n.paper_count} ${n.paper_count===1?"paper":"papers"}${w?`. ${w}`:""}`,onMouseEnter:()=>r(m),onMouseLeave:()=>r(null),onFocus:()=>r(m),onBlur:()=>r(null),children:[e.jsx("rect",{className:"method-usage-bar-hit",x:u.left+c*m,y:u.top,width:c,height:g}),e.jsx("rect",{className:"method-usage-bar-mark",x:F,y:l,width:y,height:b,rx:"1.5"})]},n.start_date)}),s.map((n,m)=>d.has(m)?e.jsx("text",{className:"method-usage-x-label",x:u.left+c*(m+.5),y:C-11,textAnchor:"middle",children:s.length>48?ge.format(new Date(`${n.start_date}T00:00:00Z`)):B(n.start_date)},n.start_date):null)]}),x&&e.jsxs("div",{className:"method-usage-tooltip",role:"status",children:[e.jsx("strong",{children:B(x.start_date)}),e.jsxs("span",{children:[x.paper_count," ",x.paper_count===1?"paper":"papers",i===s.length-1?" · month to date":""]}),e.jsxs("span",{children:[(x.catalog_share??0).toFixed(2),"% of"," ",(x.catalog_paper_count??0).toLocaleString()," catalog papers"]}),S&&e.jsx("span",{children:S})]})]})},ye=[["trending","trending"],["new","newest"],["cited","most cited"]],Q={"on-policy-distillation":["fine-tuning","post-training","rlvr","rlhf","direct-preference-optimization-dpo"],mcp:["agent-skills"],"agent-skills":["mcp"]},Pe=()=>{var N,w,$,P,T,I;const{methodSlug:s}=W(),[a,i]=V(),[r,f]=E.useState("trending"),j=a.get("has_code")==="true",g=a.get("has_hf_artifacts")==="true",c=o=>{const h=new URLSearchParams(a);o?h.set("has_code","true"):h.delete("has_code"),i(h)},y=o=>{const h=new URLSearchParams(a);o?h.set("has_hf_artifacts","true"):h.delete("has_hf_artifacts"),i(h)},d=A({queryKey:["method",s],queryFn:()=>v.getMethod(s),enabled:!!s,staleTime:10*60*1e3}),z=A({queryKey:["areas-all"],queryFn:()=>v.getAreas({page_size:50,ordering:"name"}),enabled:!!((N=d.data)!=null&&N.area_id),staleTime:10*60*1e3}),x=A({queryKey:["method-trend",s],queryFn:()=>v.getMethodTrend(s),enabled:!!s&&!!d.data,staleTime:10*60*1e3}),S=r==="trending"?"trending":r==="cited"?"citation_count":"date_published",n=X({queryKey:["method-papers-infinite",s,S,j,g],queryFn:({pageParam:o=1})=>v.getMethodPapers(s,{page:o,page_size:20,order_by:S,order_dir:"desc",include_resources:!0,has_code:j,has_hf_artifacts:g}),getNextPageParam:o=>o.next_page,initialPageParam:1,enabled:!!s,staleTime:5*60*1e3,placeholderData:Z}),m=A({queryKey:["related-methods",(w=d.data)==null?void 0:w.slug,($=d.data)==null?void 0:$.area_id,(P=d.data)==null?void 0:P.id],queryFn:async()=>{const o=Q[d.data.slug];return o?Promise.all(o.map(D=>v.getMethod(D))):(await v.getMethods({area_id:d.data.area_id,exclude_id:d.data.id,ordering:"-paper_count",page_size:8})).results},enabled:!!d.data&&(!!Q[d.data.slug]||!!d.data.area_id),staleTime:10*60*1e3}),k=E.useMemo(()=>{var h;return(((h=n.data)==null?void 0:h.pages.flatMap(D=>D.results))||[]).map(se)},[n.data]),{targetRef:b,isIntersecting:F}=ae({rootMargin:"200px"});if(E.useEffect(()=>{F&&n.hasNextPage&&!n.isFetchingNextPage&&n.fetchNextPage()},[F,n.hasNextPage,n.isFetchingNextPage]),d.isLoading)return e.jsxs("div",{className:"page",children:[e.jsx(M,{className:"h-12 w-1/2 mb-4"}),e.jsx(M,{className:"h-64 w-full"})]});if(d.error||!d.data)return e.jsx("div",{className:"page",children:e.jsx(ie,{variant:"destructive",children:e.jsx(re,{children:"Method not found."})})});const l=d.data,_=(T=z.data)==null?void 0:T.results.find(o=>o.id===l.area_id);return e.jsxs("div",{className:"page",children:[e.jsxs("div",{className:"breadcrumb",children:[e.jsx(R,{to:"/methods",children:"Methods"}),_&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"sep",children:"/"}),e.jsx(R,{to:`/methods#area-${te(_.name)}`,children:_.name})]}),e.jsx("span",{className:"sep",children:"/"}),e.jsx("span",{style:{color:"var(--ink)"},children:l.name})]}),e.jsxs("div",{className:`tag-hero method-hero-grid${l.slug==="grokking"||l.slug==="latent-reasoning"?" 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:l.name}),l.full_name&&l.full_name!==l.name&&e.jsx("div",{style:{fontFamily:"var(--serif)",fontSize:16,fontStyle:"italic",color:"var(--ink-soft)",marginTop:8},children:l.full_name}),l.description&&e.jsx(H,{className:"method-description",text:l.description}),l.source_url&&l.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:l.source_url,target:"_blank",rel:"noopener noreferrer",children:[e.jsx("span",{className:"method-source-title",children:l.source_title}),l.introduced_year&&e.jsx("span",{className:"method-source-meta",children:l.introduced_year})]})]}),e.jsxs("div",{className:"tag-hero-meta",children:[e.jsxs("div",{className:"stat",children:[e.jsx("span",{className:"label",children:"Papers mentioning"}),e.jsx("span",{className:"value",children:(l.paper_count??0).toLocaleString()})]}),x.data&&e.jsxs("div",{className:"stat",children:[e.jsx("span",{className:"label",children:"Recent mentions"}),e.jsxs("span",{className:"value",children:[x.data.trend_score.toFixed(1),e.jsx("small",{children:"/mo"})]})]}),l.introduced_year!=null&&e.jsxs("div",{className:"stat",children:[e.jsx("span",{className:"label",children:"Introduced"}),e.jsx("span",{className:"value",children:l.introduced_year})]})]}),x.isLoading?e.jsx(M,{className:"h-36 w-full method-trend-skeleton"}):x.data?e.jsxs("section",{className:"method-trend-panel method-trend-panel--compact",children:[e.jsxs("div",{className:"method-trend-header",children:[e.jsx("div",{children:e.jsx("div",{className:"method-trend-eyebrow",children:"Usage trend"})}),e.jsxs("div",{className:"method-trend-summary",children:[e.jsx("strong",{children:x.data.recent_paper_count}),e.jsxs("span",{children:["papers / ",x.data.recent_days,"d"]})]})]}),e.jsx(je,{history:x.data.history,methodName:l.name})]}):null]}),e.jsxs("figure",{className:"method-figure-card",children:[e.jsx(fe,{method:l}),l.image_credit&&e.jsx("figcaption",{children:e.jsx(H,{className:"method-image-credit",text:l.image_credit})})]})]}),(((I=m.data)==null?void 0:I.length)??0)>0&&e.jsxs("div",{className:"filter-row",children:[e.jsx("span",{className:"label",children:"Related methods"}),m.data.map(o=>e.jsx(Y,{method:{slug:o.slug,name:o.name}},o.id))]}),e.jsxs("div",{className:"sort-bar",children:[e.jsxs("div",{className:"paper-feed-toolbar-controls",children:[e.jsx("div",{className:"sort-options",children:ye.map(([o,h])=>e.jsx("button",{className:`sort-btn ${r===o?"active":""}`,onClick:()=>f(o),children:h},o))}),e.jsx(ee,{hasCode:j,hasHfArtifacts:g,onHasCodeChange:c,onHasHfArtifactsChange:y})]}),e.jsxs("div",{className:"results-count",children:[k.length," papers mentioning ",l.name]})]}),n.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((o,h)=>e.jsx(M,{className:"h-40 w-full"},h))}):k.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:k.map((o,h)=>e.jsx(J,{paper:o,rank:h+1},o.id))}),e.jsx("div",{ref:b,style:{height:1}}),n.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]})};export{Pe as default};
 
1
+ import{j as e,r as E,e as W,a as V,L as R,b as v,aj as Z}from"./index-B2CsYqS1.js";import{u as A}from"./useQuery-D09nn2D4.js";import{u as X}from"./useInfiniteQuery-gjnIRn2t.js";import{M as Y,P as J}from"./components-Dt_hKhor.js";import{P as ee}from"./PaperFeedFilters-DC6dQXvU.js";import{M as H}from"./MarkdownText-CnXxe_CG.js";import{s as te}from"./slug-BpH-Nkvz.js";import{t as se}from"./transform-Csq86xeP.js";import{u as ae}from"./useIntersectionObserver-BEQRRw3B.js";import{S as M}from"./skeleton-EzEzG6PT.js";import{A as ie,a as re}from"./alert-B5Pni1K6.js";import"./useBaseQuery-DCY5lvEf.js";import"./LatexTitle-DhaqzMPt.js";import"./katex.min-BSBacQyE.js";import"./PaperPreviewLink-DyP6osoH.js";import"./index-6E7p68ra.js";import"./hover-card-DfDU2jCA.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"},p=({x:s,y:a,w:i,h:r,fill:f,stroke:j,label:g,fontSize:c=10,multiline:y})=>e.jsxs("g",{children:[e.jsx("rect",{x:s,y:a,width:i,height:r,rx:"3",ry:"3",fill:f,stroke:j,strokeWidth:"1"}),y?e.jsxs(e.Fragment,{children:[e.jsx("text",{x:s+i/2,y:a+r/2-2,fontSize:c,fontFamily:"var(--sans)",fill:t.ink,textAnchor:"middle",dominantBaseline:"middle",children:y[0]}),e.jsx("text",{x:s+i/2,y:a+r/2+c-1,fontSize:c,fontFamily:"var(--sans)",fill:t.ink,textAnchor:"middle",dominantBaseline:"middle",children:y[1]})]}):e.jsx("text",{x:s+i/2,y:a+r/2,fontSize:c,fontFamily:"var(--sans)",fill:t.ink,textAnchor:"middle",dominantBaseline:"middle",children:g})]}),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:"Scaled Dot-Product Attention"}),e.jsx(p,{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(p,{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(p,{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(p,{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(p,{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(p,{x:100,y:270,w:40,h:24,fill:t.pink,stroke:t.pinkS,label:"Q",fontSize:13}),e.jsx(p,{x:160,y:270,w:40,h:24,fill:t.pink,stroke:t.pinkS,label:"K",fontSize:13}),e.jsx(p,{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"]})]}),ne=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[[0,1,2,3].map(s=>{const a=30+s*75,i=60-s*8,r=240-s*30;return e.jsx("g",{children:e.jsx("rect",{x:a,y:(420-r)/2,width:i,height:r,rx:"2",fill:[t.blue,t.green,t.orange,t.purple][s],stroke:[t.blueS,t.greenS,t.orangeS,t.purpleS][s],strokeWidth:"1"})},s)}),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"})]}),q=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[[0,1,2,3].map(s=>{const i=60+s*80,r=100-s*12,f=50-s*6;return e.jsx("rect",{x:50,y:i,width:r,height:f,rx:"2",fill:t.blue,stroke:t.blueS,strokeWidth:"1"},`e${s}`)}),e.jsx("rect",{x:"155",y:"320",width:"50",height:"40",rx:"2",fill:t.purple,stroke:t.purpleS}),[0,1,2,3].map(s=>{const i=60+s*80,r=100-s*12,f=50-s*6;return e.jsx("rect",{x:210,y:i,width:r,height:f,rx:"2",fill:t.green,stroke:t.greenS,strokeWidth:"1"},`d${s}`)}),[0,1,2,3].map(s=>{const a=60+s*80+(50-s*6)/2,i=50+(100-s*12);return e.jsx("path",{d:`M${i} ${a} L210 ${a}`,stroke:t.faint,strokeDasharray:"4 3"},`s${s}`)}),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"})]}),le=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[[0,1,2].map(s=>[0,1,2].map(a=>e.jsx("rect",{x:20+a*40,y:40+s*40,width:"38",height:"38",fill:["#F8D7D9","#FBEFC2","#CDE2EE","#CCE2C5","#D4D2EA","#F8D7B3","#F8D7D9","#FBEFC2","#CDE2EE"][s*3+a],stroke:t.faint},`${s}-${a}`))),e.jsx("rect",{x:"40",y:"245",width:"280",height:"120",rx:"4",fill:"#EFEBE0",stroke:t.faint,strokeDasharray:"3 2"}),e.jsx(p,{x:70,y:258,w:220,h:20,fill:t.yellow,stroke:t.yellowS,label:"Norm"}),e.jsx(p,{x:70,y:282,w:220,h:28,fill:t.orange,stroke:t.orangeS,label:"Multi-Head Attention"}),e.jsx(p,{x:70,y:314,w:220,h:20,fill:t.yellow,stroke:t.yellowS,label:"Norm"}),e.jsx(p,{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×"})]}),O=()=>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(s=>{const a=25+s*56,i=(5-s)/5;return e.jsxs("g",{children:[e.jsx("rect",{x:a,y:90,width:50,height:50,rx:"3",fill:`oklch(${.85-i*.1} 0.04 250)`,stroke:t.faint}),i<.4&&e.jsx("circle",{cx:a+25,cy:115,r:12-i*16,fill:t.orange,opacity:1-i*1.5})]},s)}),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)‖²]"})]}),oe=()=>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"})]}),ce=()=>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})]}),de=[["my-skill/",""],["├── SKILL.md","# Required: metadata + instructions"],["├── scripts/","# Optional: executable code"],["├── references/","# Optional: documentation"],["├── assets/","# Optional: templates, resources"],["└── ...","# Any additional files or directories"]],he=()=>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"}),de.map(([s,a],i)=>{const r=92+i*44;return e.jsxs("g",{children:[e.jsx("text",{x:"44",y:r,fontSize:"11",fontFamily:"var(--mono)",fill:t.ink,dominantBaseline:"middle",children:s}),a?e.jsx("text",{x:"138",y:r,fontSize:"8.5",fontFamily:"var(--mono)",fill:t.faint,dominantBaseline:"middle",children:a}):null]},s)})]}),xe={attention:G,"self-attention":G,cnn:ne,"u-net":q,unet:q,vit:le,diffusion:O,ddpm:O,gan:oe,vae:ce,"agent-skills":he},me=({method:s})=>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:s.name||"method"}),e.jsx(p,{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(p,{x:80,y:150,w:200,h:70,fill:t.orange,stroke:t.orangeS,label:s.name||"transform",fontSize:13}),e.jsx("path",{d:"M180 220 L180 250",stroke:t.ink}),e.jsx(p,{x:80,y:250,w:200,h:50,fill:t.purple,stroke:t.purpleS,label:"Output",fontSize:12})]}),fe=({method:s})=>{const a=(s.slug||"").toLowerCase(),i=xe[a];if(i)return e.jsx("div",{className:"method-figure-svg method-figure-svg--schematic",children:e.jsx(i,{})});if(s.image_url){const r=a==="transformer"||a==="gpt-4"||a==="gpt-4o"?" method-figure-svg--compact":a==="rpn"?" method-figure-svg--scaled-80":"";return e.jsx("div",{className:`method-figure-svg method-figure-svg--image${r}`,children:e.jsx("img",{className:"method-figure-img",src:s.image_url,alt:`${s.name} figure`})})}return e.jsx("div",{className:"method-figure-svg method-figure-svg--schematic",children:e.jsx(me,{method:s})})},L=720,C=138,u={top:8,right:10,bottom:25,left:36},U=56,pe=new Intl.DateTimeFormat("en",{month:"short",year:"2-digit",timeZone:"UTC"}),ge=new Intl.DateTimeFormat("en",{year:"numeric",timeZone:"UTC"}),B=s=>pe.format(new Date(`${s}T00:00:00Z`)),ue=(s,a)=>{if(s===0)return new Set;const i=s>48?12:s>36?6:s>18?3:2,r=Math.max(1,Math.ceil(U/a)),f=Math.max(i,r),j=s-1,g=new Set([0,j]);for(let c=f;c<j;c+=f)(j-c)*a>=U&&g.add(c);return g},K=s=>{if(s.coverage_status===void 0||["complete","not_applicable"].includes(s.coverage_status))return null;const a=s.processed_paper_count!==void 0&&s.eligible_paper_count!==void 0?`; ${s.processed_paper_count.toLocaleString()} of ${s.eligible_paper_count.toLocaleString()} eligible papers processed`:"";return`Historical tagging ${s.coverage_status==="failed"?"needs retry":"in progress"}${a}`},je=({history:s,methodName:a})=>{const[i,r]=E.useState(null),f=Math.max(1,...s.map(n=>n.paper_count)),j=L-u.left-u.right,g=C-u.top-u.bottom,c=s.length?j/s.length:j,y=Math.max(2,c*.68),d=ue(s.length,c),z=Array.from(new Set([0,Math.ceil(f/2),f])),x=i==null?null:s[i],S=x?K(x):null;return e.jsxs("div",{className:"method-usage-chart-wrap",children:[e.jsxs("svg",{className:"method-usage-chart",viewBox:`0 0 ${L} ${C}`,role:"group","aria-label":`${a}: papers mentioning this method by publication month`,children:[e.jsxs("title",{children:[a,": papers mentioning this method by publication month"]}),z.map(n=>{const m=u.top+g-n/f*g;return e.jsxs("g",{children:[e.jsx("line",{className:"method-usage-gridline",x1:u.left,x2:L-u.right,y1:m,y2:m}),e.jsx("text",{className:"method-usage-y-label",x:u.left-8,y:m+3,textAnchor:"end",children:n})]},n)}),s.map((n,m)=>{const k=n.paper_count/f*g,b=n.paper_count>0?Math.max(1,k):0,F=u.left+c*m+(c-y)/2,l=u.top+g-b,_=i===m,N=m===s.length-1,w=K(n);return e.jsxs("g",{className:`method-usage-bar${_?" is-active":""}${N?" is-current":""}`,tabIndex:0,role:"img","aria-label":`${B(n.start_date)}: ${n.paper_count} ${n.paper_count===1?"paper":"papers"}${w?`. ${w}`:""}`,onMouseEnter:()=>r(m),onMouseLeave:()=>r(null),onFocus:()=>r(m),onBlur:()=>r(null),children:[e.jsx("rect",{className:"method-usage-bar-hit",x:u.left+c*m,y:u.top,width:c,height:g}),e.jsx("rect",{className:"method-usage-bar-mark",x:F,y:l,width:y,height:b,rx:"1.5"})]},n.start_date)}),s.map((n,m)=>d.has(m)?e.jsx("text",{className:"method-usage-x-label",x:u.left+c*(m+.5),y:C-11,textAnchor:"middle",children:s.length>48?ge.format(new Date(`${n.start_date}T00:00:00Z`)):B(n.start_date)},n.start_date):null)]}),x&&e.jsxs("div",{className:"method-usage-tooltip",role:"status",children:[e.jsx("strong",{children:B(x.start_date)}),e.jsxs("span",{children:[x.paper_count," ",x.paper_count===1?"paper":"papers",i===s.length-1?" · month to date":""]}),e.jsxs("span",{children:[(x.catalog_share??0).toFixed(2),"% of"," ",(x.catalog_paper_count??0).toLocaleString()," catalog papers"]}),S&&e.jsx("span",{children:S})]})]})},ye=[["trending","trending"],["new","newest"],["cited","most cited"]],Q={"on-policy-distillation":["fine-tuning","post-training","rlvr","rlhf","direct-preference-optimization-dpo"],mcp:["agent-skills"],"agent-skills":["mcp"]},Pe=()=>{var N,w,$,P,T,I;const{methodSlug:s}=W(),[a,i]=V(),[r,f]=E.useState("trending"),j=a.get("has_code")==="true",g=a.get("has_hf_artifacts")==="true",c=o=>{const h=new URLSearchParams(a);o?h.set("has_code","true"):h.delete("has_code"),i(h)},y=o=>{const h=new URLSearchParams(a);o?h.set("has_hf_artifacts","true"):h.delete("has_hf_artifacts"),i(h)},d=A({queryKey:["method",s],queryFn:()=>v.getMethod(s),enabled:!!s,staleTime:10*60*1e3}),z=A({queryKey:["areas-all"],queryFn:()=>v.getAreas({page_size:50,ordering:"name"}),enabled:!!((N=d.data)!=null&&N.area_id),staleTime:10*60*1e3}),x=A({queryKey:["method-trend",s],queryFn:()=>v.getMethodTrend(s),enabled:!!s&&!!d.data,staleTime:10*60*1e3}),S=r==="trending"?"trending":r==="cited"?"citation_count":"date_published",n=X({queryKey:["method-papers-infinite",s,S,j,g],queryFn:({pageParam:o=1})=>v.getMethodPapers(s,{page:o,page_size:20,order_by:S,order_dir:"desc",include_resources:!0,has_code:j,has_hf_artifacts:g}),getNextPageParam:o=>o.next_page,initialPageParam:1,enabled:!!s,staleTime:5*60*1e3,placeholderData:Z}),m=A({queryKey:["related-methods",(w=d.data)==null?void 0:w.slug,($=d.data)==null?void 0:$.area_id,(P=d.data)==null?void 0:P.id],queryFn:async()=>{const o=Q[d.data.slug];return o?Promise.all(o.map(D=>v.getMethod(D))):(await v.getMethods({area_id:d.data.area_id,exclude_id:d.data.id,ordering:"-paper_count",page_size:8})).results},enabled:!!d.data&&(!!Q[d.data.slug]||!!d.data.area_id),staleTime:10*60*1e3}),k=E.useMemo(()=>{var h;return(((h=n.data)==null?void 0:h.pages.flatMap(D=>D.results))||[]).map(se)},[n.data]),{targetRef:b,isIntersecting:F}=ae({rootMargin:"200px"});if(E.useEffect(()=>{F&&n.hasNextPage&&!n.isFetchingNextPage&&n.fetchNextPage()},[F,n.hasNextPage,n.isFetchingNextPage]),d.isLoading)return e.jsxs("div",{className:"page",children:[e.jsx(M,{className:"h-12 w-1/2 mb-4"}),e.jsx(M,{className:"h-64 w-full"})]});if(d.error||!d.data)return e.jsx("div",{className:"page",children:e.jsx(ie,{variant:"destructive",children:e.jsx(re,{children:"Method not found."})})});const l=d.data,_=(T=z.data)==null?void 0:T.results.find(o=>o.id===l.area_id);return e.jsxs("div",{className:"page",children:[e.jsxs("div",{className:"breadcrumb",children:[e.jsx(R,{to:"/methods",children:"Methods"}),_&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"sep",children:"/"}),e.jsx(R,{to:`/methods#area-${te(_.name)}`,children:_.name})]}),e.jsx("span",{className:"sep",children:"/"}),e.jsx("span",{style:{color:"var(--ink)"},children:l.name})]}),e.jsxs("div",{className:`tag-hero method-hero-grid${l.slug==="grokking"||l.slug==="latent-reasoning"?" 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:l.name}),l.full_name&&l.full_name!==l.name&&e.jsx("div",{style:{fontFamily:"var(--serif)",fontSize:16,fontStyle:"italic",color:"var(--ink-soft)",marginTop:8},children:l.full_name}),l.description&&e.jsx(H,{className:"method-description",text:l.description}),l.source_url&&l.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:l.source_url,target:"_blank",rel:"noopener noreferrer",children:[e.jsx("span",{className:"method-source-title",children:l.source_title}),l.introduced_year&&e.jsx("span",{className:"method-source-meta",children:l.introduced_year})]})]}),e.jsxs("div",{className:"tag-hero-meta",children:[e.jsxs("div",{className:"stat",children:[e.jsx("span",{className:"label",children:"Papers mentioning"}),e.jsx("span",{className:"value",children:(l.paper_count??0).toLocaleString()})]}),x.data&&e.jsxs("div",{className:"stat",children:[e.jsx("span",{className:"label",children:"Recent mentions"}),e.jsxs("span",{className:"value",children:[x.data.trend_score.toFixed(1),e.jsx("small",{children:"/mo"})]})]}),l.introduced_year!=null&&e.jsxs("div",{className:"stat",children:[e.jsx("span",{className:"label",children:"Introduced"}),e.jsx("span",{className:"value",children:l.introduced_year})]})]}),x.isLoading?e.jsx(M,{className:"h-36 w-full method-trend-skeleton"}):x.data?e.jsxs("section",{className:"method-trend-panel method-trend-panel--compact",children:[e.jsxs("div",{className:"method-trend-header",children:[e.jsx("div",{children:e.jsx("div",{className:"method-trend-eyebrow",children:"Usage trend"})}),e.jsxs("div",{className:"method-trend-summary",children:[e.jsx("strong",{children:x.data.recent_paper_count}),e.jsxs("span",{children:["papers / ",x.data.recent_days,"d"]})]})]}),e.jsx(je,{history:x.data.history,methodName:l.name})]}):null]}),e.jsxs("figure",{className:"method-figure-card",children:[e.jsx(fe,{method:l}),l.image_credit&&e.jsx("figcaption",{children:e.jsx(H,{className:"method-image-credit",text:l.image_credit})})]})]}),(((I=m.data)==null?void 0:I.length)??0)>0&&e.jsxs("div",{className:"filter-row",children:[e.jsx("span",{className:"label",children:"Related methods"}),m.data.map(o=>e.jsx(Y,{method:{slug:o.slug,name:o.name}},o.id))]}),e.jsxs("div",{className:"sort-bar",children:[e.jsxs("div",{className:"paper-feed-toolbar-controls",children:[e.jsx("div",{className:"sort-options",children:ye.map(([o,h])=>e.jsx("button",{className:`sort-btn ${r===o?"active":""}`,onClick:()=>f(o),children:h},o))}),e.jsx(ee,{hasCode:j,hasHfArtifacts:g,onHasCodeChange:c,onHasHfArtifactsChange:y})]}),e.jsxs("div",{className:"results-count",children:[k.length," papers mentioning ",l.name]})]}),n.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((o,h)=>e.jsx(M,{className:"h-40 w-full"},h))}):k.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:k.map((o,h)=>e.jsx(J,{paper:o,rank:h+1},o.id))}),e.jsx("div",{ref:b,style:{height:1}}),n.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]})};export{Pe as default};
assets/{MethodsIndexView-C16245Ew.js → MethodsIndexView-DykiOy0N.js} RENAMED
@@ -1,4 +1,4 @@
1
- import{c as g,r as d,j as e,L as j,b as m}from"./index-eBKbcCso.js";import{u as h}from"./useQuery-DIrXGOA7.js";import{s as f}from"./slug-BpH-Nkvz.js";import{S as p}from"./skeleton-Cd-jfjiE.js";import{A as y,a as v}from"./alert-BCeSLEYS.js";import{T as _}from"./TaxonomySuggestionTile-DEtB0B70.js";import"./useBaseQuery-CZIeK7IO.js";import"./SignInToEditDialog-eRf-3xm2.js";import"./button-DR_Fc3Hk.js";import"./textarea-DC0tTufA.js";import"./dialog-DhCB6EKj.js";import"./useMutation-CcYjkB_f.js";import"./loader-circle-Bz-wpQwE.js";/**
2
  * @license lucide-react v0.462.0 - ISC
3
  *
4
  * This source code is licensed under the ISC license.
 
1
+ import{c as g,r as d,j as e,L as j,b as m}from"./index-B2CsYqS1.js";import{u as h}from"./useQuery-D09nn2D4.js";import{s as f}from"./slug-BpH-Nkvz.js";import{S as p}from"./skeleton-EzEzG6PT.js";import{A as y,a as v}from"./alert-B5Pni1K6.js";import{T as _}from"./TaxonomySuggestionTile-CvtfLtQL.js";import"./useBaseQuery-DCY5lvEf.js";import"./SignInToEditDialog-CAja351o.js";import"./button-Oqi1rHf_.js";import"./textarea-ccgKicZU.js";import"./dialog-KRtMu_IA.js";import"./useMutation-D-leEq6C.js";import"./loader-circle-CNbkR79_.js";/**
2
  * @license lucide-react v0.462.0 - ISC
3
  *
4
  * This source code is licensed under the ISC license.
assets/{NotFound-W25aHhEQ.js → NotFound-548Mtue8.js} RENAMED
@@ -1 +1 @@
1
- import{aJ as o,r as a,j as t,L as s}from"./index-eBKbcCso.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{aJ as o,r as a,j as t,L as s}from"./index-B2CsYqS1.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-BVPFm-oR.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{e as t,j as r}from"./index-B2CsYqS1.js";import{O as i}from"./OrganizationPaperFeed-BUyZ0w23.js";import m from"./NotFound-548Mtue8.js";import"./useQuery-D09nn2D4.js";import"./useBaseQuery-DCY5lvEf.js";import"./components-Dt_hKhor.js";import"./LatexTitle-DhaqzMPt.js";import"./katex.min-BSBacQyE.js";import"./transform-Csq86xeP.js";import"./MarkdownText-CnXxe_CG.js";import"./PaperPreviewLink-DyP6osoH.js";import"./index-6E7p68ra.js";import"./hover-card-DfDU2jCA.js";import"./skeleton-EzEzG6PT.js";import"./PaperFeedFilters-DC6dQXvU.js";import"./alert-B5Pni1K6.js";import"./searchable-select-AkAxP90M.js";import"./button-Oqi1rHf_.js";import"./dialog-KRtMu_IA.js";import"./loader-circle-CNbkR79_.js";import"./useIntersectionObserver-BEQRRw3B.js";import"./usePapers-BUvi-1N_.js";import"./useInfiniteQuery-gjnIRn2t.js";const V=()=>{const{orgSlug:o}=t();return o?r.jsx(i,{organizationSlug:o}):r.jsx(m,{})};export{V as default};
assets/OrganizationDetailView-BiECW6bI.js DELETED
@@ -1 +0,0 @@
1
- import{e as t,j as r}from"./index-eBKbcCso.js";import{O as i}from"./OrganizationPaperFeed-BKxoVONj.js";import m from"./NotFound-W25aHhEQ.js";import"./useQuery-DIrXGOA7.js";import"./useBaseQuery-CZIeK7IO.js";import"./components-D8Z2f6Zw.js";import"./LatexTitle-CqLY2qFp.js";import"./katex.min-BSBacQyE.js";import"./transform-DM1_5UAz.js";import"./MarkdownText-B_dvaNfN.js";import"./PaperPreviewLink-BrlkKB05.js";import"./index-LmPbjihc.js";import"./hover-card-CdeSv7Gc.js";import"./skeleton-Cd-jfjiE.js";import"./PaperFeedFilters-vnoti5eB.js";import"./alert-BCeSLEYS.js";import"./searchable-select-DycSakxh.js";import"./button-DR_Fc3Hk.js";import"./dialog-DhCB6EKj.js";import"./loader-circle-Bz-wpQwE.js";import"./useIntersectionObserver-BjpbHbpf.js";import"./usePapers-B09ZSLzW.js";import"./useInfiniteQuery-PtHXMuOU.js";const V=()=>{const{orgSlug:o}=t();return o?r.jsx(i,{organizationSlug:o}):r.jsx(m,{})};export{V as default};
 
 
assets/{OrganizationPaperFeed-BKxoVONj.js → OrganizationPaperFeed-BUyZ0w23.js} RENAMED
@@ -1 +1 @@
1
- import{j as e,r as b,b as L,u as H,a as W,L as D}from"./index-eBKbcCso.js";import{u as w}from"./useQuery-DIrXGOA7.js";import{P as G}from"./components-D8Z2f6Zw.js";import{M as K}from"./MarkdownText-B_dvaNfN.js";import{S as $}from"./skeleton-Cd-jfjiE.js";import{P as Q}from"./PaperFeedFilters-vnoti5eB.js";import{A as Z,a as B}from"./alert-BCeSLEYS.js";import{a as Y}from"./searchable-select-DycSakxh.js";import{u as J}from"./useIntersectionObserver-BjpbHbpf.js";import{d as V}from"./usePapers-B09ZSLzW.js";import{d as E,t as X}from"./transform-DM1_5UAz.js";import ee from"./NotFound-W25aHhEQ.js";const v=24*60*60*1e3,C=12,te=3,se=new Map([[1,"Mon"],[3,"Wed"],[5,"Fri"]]),R=s=>new Date(`${s}T00:00:00Z`),ae=s=>s.toISOString().slice(0,10),re=(s,c)=>{if(s===0)return 0;const l=c.findIndex(d=>s<=d);return l===-1?4:l+1},ne=s=>{const c=R(s.start_date),l=R(s.end_date),d=new Date(c.getTime()-c.getUTCDay()*v),j=new Date(l.getTime()+(6-l.getUTCDay())*v),g=new Map(s.results.map(a=>[a.date,a.paper_count])),h=s.results.map(a=>a.paper_count).sort((a,N)=>a-N),n=[.25,.5,.75].map(a=>h[Math.min(h.length-1,Math.floor(h.length*a))]??1),u=[];for(let a=d.getTime();a<=j.getTime();a+=v){const N=new Date(a),m=ae(N),_=a>=c.getTime()&&a<=l.getTime(),p=_?g.get(m)??0:0;u.push({key:m,date:N,count:p,inRange:_,level:re(p,n)})}const y=u.length/7,x=[];let f=-1;for(let a=0;a<y;a+=1){const m=u.slice(a*7,a*7+7).find(_=>_.inRange&&(a===0||_.date.getUTCDate()<=7));m&&m.date.getUTCMonth()!==f&&(f=m.date.getUTCMonth(),x.length>0&&a-x[x.length-1].column<3&&x.pop(),x.push({label:m.date.toLocaleString("en",{month:"short",timeZone:"UTC"}),column:a}))}return{days:u,months:x,weekCount:y}},ie=({data:s,organizationName:c})=>{const l=b.useRef(null),{days:d,months:j,weekCount:g}=b.useMemo(()=>ne(s),[s]),h=g*C+(g-1)*te;return b.useEffect(()=>{const n=l.current;n&&(n.scrollLeft=n.scrollWidth)},[g]),e.jsxs("section",{className:"organization-contributions","aria-labelledby":"organization-contributions-title",children:[e.jsxs("div",{className:"organization-contributions-header",children:[e.jsx("h2",{id:"organization-contributions-title",className:"organization-contributions-title",children:"Paper contributions"}),e.jsxs("p",{className:"organization-contributions-summary",children:[s.total_count.toLocaleString()," ",s.total_count===1?"paper":"papers"," published in the last year"]})]}),e.jsx("div",{className:"organization-contributions-scroll",ref:l,children:e.jsxs("div",{className:"organization-contributions-plot",style:{width:h+34},role:"img","aria-label":`${c} published ${s.total_count} papers in the last year`,children:[e.jsx("div",{className:"organization-contributions-weekdays","aria-hidden":"true",children:Array.from({length:7}).map((n,u)=>e.jsx("span",{children:se.get(u)??""},u))}),e.jsxs("div",{children:[e.jsx("div",{className:"organization-contributions-months",style:{width:h,gridTemplateColumns:`repeat(${g}, ${C}px)`},"aria-hidden":"true",children:j.map(n=>e.jsx("span",{style:{gridColumnStart:n.column+1},children:n.label},`${n.label}-${n.column}`))}),e.jsx("div",{className:"organization-contributions-grid",style:{width:h,gridTemplateColumns:`repeat(${g}, ${C}px)`},"aria-hidden":"true",children:d.map(n=>e.jsx("span",{className:`organization-contribution-cell ${n.inRange?`level-${n.level}`:"is-outside"}`,title:n.inRange?`${n.count} ${n.count===1?"paper":"papers"} on ${n.date.toLocaleDateString("en",{dateStyle:"long",timeZone:"UTC"})}`:void 0},n.key))})]})]})}),e.jsxs("div",{className:"organization-contributions-legend","aria-hidden":"true",children:[e.jsx("span",{children:"Fewer"}),[0,1,2,3,4].map(n=>e.jsx("span",{className:`organization-contribution-cell level-${n}`},n)),e.jsx("span",{children:"More"})]})]})},oe=({organizationSlug:s,organizationName:c})=>{const l=w({queryKey:["organization-contributions",s],queryFn:()=>L.getOrganizationContributions(s),staleTime:6e5});return l.isLoading?e.jsx($,{className:"organization-contributions-skeleton"}):l.data?e.jsx(ie,{data:l.data,organizationName:c}):null},le=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],ce=s=>s==="date_published"||s==="citation_count"?s:"trending",ye=({organizationSlug:s,taskSlug:c})=>{var k,P,F,M,A,O,z,S;const l=H(),[d,j]=W(),[g,h]=b.useState(!1),n=ce(d.get("order_by")),u=d.get("has_code")==="true",y=d.get("has_hf_artifacts")==="true",x=w({queryKey:["organization",s],queryFn:()=>L.getOrganization(s),staleTime:10*60*1e3}),f=w({queryKey:["organization-areas-with-tasks",s],queryFn:()=>L.getOrganizationAreasWithTasks(s),staleTime:10*60*1e3}),a=V({organizationSlug:s,taskSlug:c,page_size:12,order_by:n,order_dir:"desc",include_resources:!0,has_code:u,has_hf_artifacts:y,enabled:!!s}),{targetRef:N,isIntersecting:m}=J({rootMargin:"200px"});b.useEffect(()=>{m&&a.hasNextPage&&!a.isFetchingNextPage&&a.fetchNextPage()},[m,a.hasNextPage,a.isFetchingNextPage]),b.useEffect(()=>{h(!1)},[s,c]);const _=b.useMemo(()=>{var r;return(((r=f.data)==null?void 0:r.results)??[]).flatMap(i=>i.tasks.filter(o=>!!o.slug).map(o=>({...o,slug:o.slug,label:E(o.name,o.slug)})))},[f.data]),p=_.find(r=>r.slug===c),T=b.useMemo(()=>{var r;return(((r=a.data)==null?void 0:r.pages)??[]).flatMap(i=>i.results.map(X))},[a.data]),t=x.data??((k=f.data)==null?void 0:k.organization),I=((F=(P=a.data)==null?void 0:P.pages[0])==null?void 0:F.count)??0;if(((M=x.error)==null?void 0:M.status)===404||((A=f.error)==null?void 0:A.status)===404||((O=a.error)==null?void 0:O.status)===404)return e.jsx(ee,{});if(f.error||a.error)return e.jsx("div",{className:"page",children:e.jsx(Z,{variant:"destructive",children:e.jsx(B,{children:"Failed to load organization papers. Please try again."})})});const U=r=>{const i=r.trim().toLocaleLowerCase();return _.filter(o=>`${o.label} ${o.slug}`.toLocaleLowerCase().includes(i)).map(o=>({value:o.slug,label:o.label,description:`${o.paper_count.toLocaleString()} ${o.paper_count===1?"paper":"papers"}`}))},q=r=>{const i=r==="__all__"?`/orgs/${s}`:`/orgs/${s}/${r}`,o=d.toString();l({pathname:i,search:o?`?${o}`:""})};return e.jsxs("div",{className:"page",children:[e.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[e.jsx(D,{to:"/",children:"Home"}),e.jsx("span",{children:" / "}),e.jsx(D,{to:"/organizations",children:"Organizations"}),e.jsx("span",{children:" / "}),e.jsx("span",{children:(t==null?void 0:t.name)??s}),p&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:" / "}),e.jsx("span",{children:E(p.name,p.slug)})]})]}),e.jsxs("header",{className:"organization-hero",children:[e.jsxs("div",{className:"organization-hero-profile",children:[e.jsx("div",{className:"organizations-eyebrow",children:"ORGANIZATION"}),e.jsxs("h1",{className:"feed-title organization-hero-title",children:[t!=null&&t.logo_url&&!g?e.jsx("img",{src:t.logo_url,alt:"",width:58,height:58,onError:()=>h(!0)}):t?e.jsx("span",{className:"organization-logo organization-logo--fallback","aria-hidden":"true",children:t.name.slice(0,1).toUpperCase()}):null,(t==null?void 0:t.name)??e.jsx($,{className:"h-12 w-64"})]}),t&&e.jsxs("div",{className:"feed-subtitle",children:[((z=t.paper_count)==null?void 0:z.toLocaleString())??0," papers",(t.organization_trending_score??0)>0&&t.trending_rank&&e.jsxs(e.Fragment,{children:[" · #",t.trending_rank," trending this month"]})]}),(t==null?void 0:t.description)&&e.jsx(K,{className:"method-description",text:t.description}),t&&e.jsxs("div",{className:"organization-hero-links",children:[t.website_url&&e.jsx("a",{href:t.website_url,target:"_blank",rel:"noreferrer",children:"Website ↗"}),t.hf_url&&e.jsx("a",{href:t.hf_url,target:"_blank",rel:"noreferrer",children:"Hugging Face ↗"}),t.github_url&&e.jsx("a",{href:t.github_url,target:"_blank",rel:"noreferrer",children:"GitHub ↗"})]})]}),t&&e.jsx(oe,{organizationSlug:s,organizationName:t.name})]}),e.jsxs("div",{className:"sort-bar",style:{alignItems:"center",gap:16},children:[e.jsx("div",{style:{minWidth:260},children:e.jsx(Y,{value:c??"__all__",onChange:q,placeholder:"All tasks",searchPlaceholder:"Search organization tasks...",emptyMessage:"No matching tasks.",ariaLabel:"Filter papers by task",selectedOption:p?{value:p.slug,label:p.label,description:`${p.paper_count.toLocaleString()} ${p.paper_count===1?"paper":"papers"}`}:{value:"__all__",label:"All tasks",description:`${((S=t==null?void 0:t.paper_count)==null?void 0:S.toLocaleString())??0} papers`},queryKey:["organization-task-options",s],queryFn:async r=>{var i;return[{value:"__all__",label:"All tasks",description:`${((i=t==null?void 0:t.paper_count)==null?void 0:i.toLocaleString())??0} papers`},...U(r)]},enabled:!f.isLoading,className:"h-[38px]"})}),e.jsxs("div",{className:"paper-feed-toolbar-controls",children:[e.jsx("div",{className:"sort-options",children:le.map(([r,i])=>e.jsx("button",{type:"button",className:`sort-btn ${n===r?"active":""}`,onClick:()=>{const o=new URLSearchParams(d);r==="trending"?o.delete("order_by"):o.set("order_by",r),j(o)},children:i},r))}),e.jsx(Q,{hasCode:u,hasHfArtifacts:y,onHasCodeChange:r=>{const i=new URLSearchParams(d);r?i.set("has_code","true"):i.delete("has_code"),j(i)},onHasHfArtifactsChange:r=>{const i=new URLSearchParams(d);r?i.set("has_hf_artifacts","true"):i.delete("has_hf_artifacts"),j(i)}})]}),e.jsxs("div",{className:"results-count",children:[I.toLocaleString()," papers"]})]}),a.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((r,i)=>e.jsx($,{className:"h-40 w-full"},i))}):T.length===0?e.jsx("div",{className:"no-results",children:(t==null?void 0:t.paper_count)===0?"No papers indexed yet":"No papers found for this selection."}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:T.map((r,i)=>e.jsx(G,{paper:r,rank:i+1},r.id))}),e.jsx("div",{ref:N,style:{height:1}}),a.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center"},children:"Loading more…"})]})]})};export{ye as O};
 
1
+ import{j as e,r as b,b as L,u as H,a as W,L as D}from"./index-B2CsYqS1.js";import{u as w}from"./useQuery-D09nn2D4.js";import{P as G}from"./components-Dt_hKhor.js";import{M as K}from"./MarkdownText-CnXxe_CG.js";import{S as $}from"./skeleton-EzEzG6PT.js";import{P as Q}from"./PaperFeedFilters-DC6dQXvU.js";import{A as Z,a as B}from"./alert-B5Pni1K6.js";import{a as Y}from"./searchable-select-AkAxP90M.js";import{u as J}from"./useIntersectionObserver-BEQRRw3B.js";import{d as V}from"./usePapers-BUvi-1N_.js";import{d as E,t as X}from"./transform-Csq86xeP.js";import ee from"./NotFound-548Mtue8.js";const v=24*60*60*1e3,C=12,te=3,se=new Map([[1,"Mon"],[3,"Wed"],[5,"Fri"]]),R=s=>new Date(`${s}T00:00:00Z`),ae=s=>s.toISOString().slice(0,10),re=(s,c)=>{if(s===0)return 0;const l=c.findIndex(d=>s<=d);return l===-1?4:l+1},ne=s=>{const c=R(s.start_date),l=R(s.end_date),d=new Date(c.getTime()-c.getUTCDay()*v),j=new Date(l.getTime()+(6-l.getUTCDay())*v),g=new Map(s.results.map(a=>[a.date,a.paper_count])),h=s.results.map(a=>a.paper_count).sort((a,N)=>a-N),n=[.25,.5,.75].map(a=>h[Math.min(h.length-1,Math.floor(h.length*a))]??1),u=[];for(let a=d.getTime();a<=j.getTime();a+=v){const N=new Date(a),m=ae(N),_=a>=c.getTime()&&a<=l.getTime(),p=_?g.get(m)??0:0;u.push({key:m,date:N,count:p,inRange:_,level:re(p,n)})}const y=u.length/7,x=[];let f=-1;for(let a=0;a<y;a+=1){const m=u.slice(a*7,a*7+7).find(_=>_.inRange&&(a===0||_.date.getUTCDate()<=7));m&&m.date.getUTCMonth()!==f&&(f=m.date.getUTCMonth(),x.length>0&&a-x[x.length-1].column<3&&x.pop(),x.push({label:m.date.toLocaleString("en",{month:"short",timeZone:"UTC"}),column:a}))}return{days:u,months:x,weekCount:y}},ie=({data:s,organizationName:c})=>{const l=b.useRef(null),{days:d,months:j,weekCount:g}=b.useMemo(()=>ne(s),[s]),h=g*C+(g-1)*te;return b.useEffect(()=>{const n=l.current;n&&(n.scrollLeft=n.scrollWidth)},[g]),e.jsxs("section",{className:"organization-contributions","aria-labelledby":"organization-contributions-title",children:[e.jsxs("div",{className:"organization-contributions-header",children:[e.jsx("h2",{id:"organization-contributions-title",className:"organization-contributions-title",children:"Paper contributions"}),e.jsxs("p",{className:"organization-contributions-summary",children:[s.total_count.toLocaleString()," ",s.total_count===1?"paper":"papers"," published in the last year"]})]}),e.jsx("div",{className:"organization-contributions-scroll",ref:l,children:e.jsxs("div",{className:"organization-contributions-plot",style:{width:h+34},role:"img","aria-label":`${c} published ${s.total_count} papers in the last year`,children:[e.jsx("div",{className:"organization-contributions-weekdays","aria-hidden":"true",children:Array.from({length:7}).map((n,u)=>e.jsx("span",{children:se.get(u)??""},u))}),e.jsxs("div",{children:[e.jsx("div",{className:"organization-contributions-months",style:{width:h,gridTemplateColumns:`repeat(${g}, ${C}px)`},"aria-hidden":"true",children:j.map(n=>e.jsx("span",{style:{gridColumnStart:n.column+1},children:n.label},`${n.label}-${n.column}`))}),e.jsx("div",{className:"organization-contributions-grid",style:{width:h,gridTemplateColumns:`repeat(${g}, ${C}px)`},"aria-hidden":"true",children:d.map(n=>e.jsx("span",{className:`organization-contribution-cell ${n.inRange?`level-${n.level}`:"is-outside"}`,title:n.inRange?`${n.count} ${n.count===1?"paper":"papers"} on ${n.date.toLocaleDateString("en",{dateStyle:"long",timeZone:"UTC"})}`:void 0},n.key))})]})]})}),e.jsxs("div",{className:"organization-contributions-legend","aria-hidden":"true",children:[e.jsx("span",{children:"Fewer"}),[0,1,2,3,4].map(n=>e.jsx("span",{className:`organization-contribution-cell level-${n}`},n)),e.jsx("span",{children:"More"})]})]})},oe=({organizationSlug:s,organizationName:c})=>{const l=w({queryKey:["organization-contributions",s],queryFn:()=>L.getOrganizationContributions(s),staleTime:6e5});return l.isLoading?e.jsx($,{className:"organization-contributions-skeleton"}):l.data?e.jsx(ie,{data:l.data,organizationName:c}):null},le=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],ce=s=>s==="date_published"||s==="citation_count"?s:"trending",ye=({organizationSlug:s,taskSlug:c})=>{var k,P,F,M,A,O,z,S;const l=H(),[d,j]=W(),[g,h]=b.useState(!1),n=ce(d.get("order_by")),u=d.get("has_code")==="true",y=d.get("has_hf_artifacts")==="true",x=w({queryKey:["organization",s],queryFn:()=>L.getOrganization(s),staleTime:10*60*1e3}),f=w({queryKey:["organization-areas-with-tasks",s],queryFn:()=>L.getOrganizationAreasWithTasks(s),staleTime:10*60*1e3}),a=V({organizationSlug:s,taskSlug:c,page_size:12,order_by:n,order_dir:"desc",include_resources:!0,has_code:u,has_hf_artifacts:y,enabled:!!s}),{targetRef:N,isIntersecting:m}=J({rootMargin:"200px"});b.useEffect(()=>{m&&a.hasNextPage&&!a.isFetchingNextPage&&a.fetchNextPage()},[m,a.hasNextPage,a.isFetchingNextPage]),b.useEffect(()=>{h(!1)},[s,c]);const _=b.useMemo(()=>{var r;return(((r=f.data)==null?void 0:r.results)??[]).flatMap(i=>i.tasks.filter(o=>!!o.slug).map(o=>({...o,slug:o.slug,label:E(o.name,o.slug)})))},[f.data]),p=_.find(r=>r.slug===c),T=b.useMemo(()=>{var r;return(((r=a.data)==null?void 0:r.pages)??[]).flatMap(i=>i.results.map(X))},[a.data]),t=x.data??((k=f.data)==null?void 0:k.organization),I=((F=(P=a.data)==null?void 0:P.pages[0])==null?void 0:F.count)??0;if(((M=x.error)==null?void 0:M.status)===404||((A=f.error)==null?void 0:A.status)===404||((O=a.error)==null?void 0:O.status)===404)return e.jsx(ee,{});if(f.error||a.error)return e.jsx("div",{className:"page",children:e.jsx(Z,{variant:"destructive",children:e.jsx(B,{children:"Failed to load organization papers. Please try again."})})});const U=r=>{const i=r.trim().toLocaleLowerCase();return _.filter(o=>`${o.label} ${o.slug}`.toLocaleLowerCase().includes(i)).map(o=>({value:o.slug,label:o.label,description:`${o.paper_count.toLocaleString()} ${o.paper_count===1?"paper":"papers"}`}))},q=r=>{const i=r==="__all__"?`/orgs/${s}`:`/orgs/${s}/${r}`,o=d.toString();l({pathname:i,search:o?`?${o}`:""})};return e.jsxs("div",{className:"page",children:[e.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[e.jsx(D,{to:"/",children:"Home"}),e.jsx("span",{children:" / "}),e.jsx(D,{to:"/organizations",children:"Organizations"}),e.jsx("span",{children:" / "}),e.jsx("span",{children:(t==null?void 0:t.name)??s}),p&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:" / "}),e.jsx("span",{children:E(p.name,p.slug)})]})]}),e.jsxs("header",{className:"organization-hero",children:[e.jsxs("div",{className:"organization-hero-profile",children:[e.jsx("div",{className:"organizations-eyebrow",children:"ORGANIZATION"}),e.jsxs("h1",{className:"feed-title organization-hero-title",children:[t!=null&&t.logo_url&&!g?e.jsx("img",{src:t.logo_url,alt:"",width:58,height:58,onError:()=>h(!0)}):t?e.jsx("span",{className:"organization-logo organization-logo--fallback","aria-hidden":"true",children:t.name.slice(0,1).toUpperCase()}):null,(t==null?void 0:t.name)??e.jsx($,{className:"h-12 w-64"})]}),t&&e.jsxs("div",{className:"feed-subtitle",children:[((z=t.paper_count)==null?void 0:z.toLocaleString())??0," papers",(t.organization_trending_score??0)>0&&t.trending_rank&&e.jsxs(e.Fragment,{children:[" · #",t.trending_rank," trending this month"]})]}),(t==null?void 0:t.description)&&e.jsx(K,{className:"method-description",text:t.description}),t&&e.jsxs("div",{className:"organization-hero-links",children:[t.website_url&&e.jsx("a",{href:t.website_url,target:"_blank",rel:"noreferrer",children:"Website ↗"}),t.hf_url&&e.jsx("a",{href:t.hf_url,target:"_blank",rel:"noreferrer",children:"Hugging Face ↗"}),t.github_url&&e.jsx("a",{href:t.github_url,target:"_blank",rel:"noreferrer",children:"GitHub ↗"})]})]}),t&&e.jsx(oe,{organizationSlug:s,organizationName:t.name})]}),e.jsxs("div",{className:"sort-bar",style:{alignItems:"center",gap:16},children:[e.jsx("div",{style:{minWidth:260},children:e.jsx(Y,{value:c??"__all__",onChange:q,placeholder:"All tasks",searchPlaceholder:"Search organization tasks...",emptyMessage:"No matching tasks.",ariaLabel:"Filter papers by task",selectedOption:p?{value:p.slug,label:p.label,description:`${p.paper_count.toLocaleString()} ${p.paper_count===1?"paper":"papers"}`}:{value:"__all__",label:"All tasks",description:`${((S=t==null?void 0:t.paper_count)==null?void 0:S.toLocaleString())??0} papers`},queryKey:["organization-task-options",s],queryFn:async r=>{var i;return[{value:"__all__",label:"All tasks",description:`${((i=t==null?void 0:t.paper_count)==null?void 0:i.toLocaleString())??0} papers`},...U(r)]},enabled:!f.isLoading,className:"h-[38px]"})}),e.jsxs("div",{className:"paper-feed-toolbar-controls",children:[e.jsx("div",{className:"sort-options",children:le.map(([r,i])=>e.jsx("button",{type:"button",className:`sort-btn ${n===r?"active":""}`,onClick:()=>{const o=new URLSearchParams(d);r==="trending"?o.delete("order_by"):o.set("order_by",r),j(o)},children:i},r))}),e.jsx(Q,{hasCode:u,hasHfArtifacts:y,onHasCodeChange:r=>{const i=new URLSearchParams(d);r?i.set("has_code","true"):i.delete("has_code"),j(i)},onHasHfArtifactsChange:r=>{const i=new URLSearchParams(d);r?i.set("has_hf_artifacts","true"):i.delete("has_hf_artifacts"),j(i)}})]}),e.jsxs("div",{className:"results-count",children:[I.toLocaleString()," papers"]})]}),a.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((r,i)=>e.jsx($,{className:"h-40 w-full"},i))}):T.length===0?e.jsx("div",{className:"no-results",children:(t==null?void 0:t.paper_count)===0?"No papers indexed yet":"No papers found for this selection."}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:T.map((r,i)=>e.jsx(G,{paper:r,rank:i+1},r.id))}),e.jsx("div",{ref:N,style:{height:1}}),a.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center"},children:"Loading more…"})]})]})};export{ye as O};
assets/OrganizationTaskView-7YycaNmf.js DELETED
@@ -1 +0,0 @@
1
- import{e as i,j as t}from"./index-eBKbcCso.js";import{O as m}from"./OrganizationPaperFeed-BKxoVONj.js";import p from"./NotFound-W25aHhEQ.js";import"./useQuery-DIrXGOA7.js";import"./useBaseQuery-CZIeK7IO.js";import"./components-D8Z2f6Zw.js";import"./LatexTitle-CqLY2qFp.js";import"./katex.min-BSBacQyE.js";import"./transform-DM1_5UAz.js";import"./MarkdownText-B_dvaNfN.js";import"./PaperPreviewLink-BrlkKB05.js";import"./index-LmPbjihc.js";import"./hover-card-CdeSv7Gc.js";import"./skeleton-Cd-jfjiE.js";import"./PaperFeedFilters-vnoti5eB.js";import"./alert-BCeSLEYS.js";import"./searchable-select-DycSakxh.js";import"./button-DR_Fc3Hk.js";import"./dialog-DhCB6EKj.js";import"./loader-circle-Bz-wpQwE.js";import"./useIntersectionObserver-BjpbHbpf.js";import"./usePapers-B09ZSLzW.js";import"./useInfiniteQuery-PtHXMuOU.js";const V=()=>{const{orgSlug:o,taskSlug:r}=i();return o&&r?t.jsx(m,{organizationSlug:o,taskSlug:r}):t.jsx(p,{})};export{V as default};
 
 
assets/OrganizationTaskView-DyBI7n3E.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{e as i,j as t}from"./index-B2CsYqS1.js";import{O as m}from"./OrganizationPaperFeed-BUyZ0w23.js";import p from"./NotFound-548Mtue8.js";import"./useQuery-D09nn2D4.js";import"./useBaseQuery-DCY5lvEf.js";import"./components-Dt_hKhor.js";import"./LatexTitle-DhaqzMPt.js";import"./katex.min-BSBacQyE.js";import"./transform-Csq86xeP.js";import"./MarkdownText-CnXxe_CG.js";import"./PaperPreviewLink-DyP6osoH.js";import"./index-6E7p68ra.js";import"./hover-card-DfDU2jCA.js";import"./skeleton-EzEzG6PT.js";import"./PaperFeedFilters-DC6dQXvU.js";import"./alert-B5Pni1K6.js";import"./searchable-select-AkAxP90M.js";import"./button-Oqi1rHf_.js";import"./dialog-KRtMu_IA.js";import"./loader-circle-CNbkR79_.js";import"./useIntersectionObserver-BEQRRw3B.js";import"./usePapers-BUvi-1N_.js";import"./useInfiniteQuery-gjnIRn2t.js";const V=()=>{const{orgSlug:o,taskSlug:r}=i();return o&&r?t.jsx(m,{organizationSlug:o,taskSlug:r}):t.jsx(p,{})};export{V as default};
assets/{OrganizationsIndexView-Zk-3iqcg.js → OrganizationsIndexView-UN_8x2A9.js} RENAMED
@@ -1 +1 @@
1
- import{a as u,r as g,j as e,L as x,b as j}from"./index-eBKbcCso.js";import{u as y}from"./useQuery-DIrXGOA7.js";import{A as f,a as _}from"./alert-BCeSLEYS.js";import{S as N}from"./skeleton-Cd-jfjiE.js";import"./useBaseQuery-CZIeK7IO.js";const v=n=>n==="papers"||n==="name"?n:"trending",S=({organization:n})=>{const[d,t]=g.useState(!1);return!n.logo_url||d?e.jsx("span",{className:"organization-logo organization-logo--fallback","aria-hidden":"true",children:n.name.slice(0,1).toUpperCase()}):e.jsx("span",{className:"organization-logo",children:e.jsx("img",{src:n.logo_url,alt:"",width:48,height:48,onError:()=>t(!0)})})},q=()=>{var h;const[n,d]=u(),t=v(n.get("sort")),c=n.get("q")??"",o=y({queryKey:["organizations","featured"],queryFn:()=>j.getOrganizations(!0),staleTime:10*60*1e3}),p=s=>{const a=new URLSearchParams(n),i=s.sort??t,r=s.query??c;i==="trending"?a.delete("sort"):a.set("sort",i),r.trim()?a.set("q",r):a.delete("q"),d(a)},m=g.useMemo(()=>{var i;const s=c.trim().toLocaleLowerCase(),a=(((i=o.data)==null?void 0:i.results)??[]).filter(r=>[r.name,r.slug,r.hf_slug??""].join(" ").toLocaleLowerCase().includes(s));return t==="papers"?[...a].sort((r,l)=>(l.paper_count??0)-(r.paper_count??0)||r.name.localeCompare(l.name)||r.slug.localeCompare(l.slug)):t==="name"?[...a].sort((r,l)=>r.name.localeCompare(l.name)||r.slug.localeCompare(l.slug)):a},[o.data,c,t]);return e.jsxs("div",{className:"page organizations-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:"Organizations"})]}),e.jsx("div",{className:"feed-subtitle",children:"Explore papers from 21 leading AI organizations, ranked by sustained community momentum over the past 30 days."})]})}),e.jsxs("section",{"aria-labelledby":"organizations-heading",children:[e.jsxs("div",{className:"organizations-section-heading",children:[e.jsxs("h2",{id:"organizations-heading",children:[((h=o.data)==null?void 0:h.count)??21," organizations"]}),e.jsx("span",{children:t==="trending"?"Ranked by 30-day momentum":t==="papers"?"Sorted by linked papers":"Sorted A–Z"})]}),e.jsxs("div",{className:"organizations-controls",children:[e.jsxs("label",{children:[e.jsx("span",{className:"sr-only",children:"Search organizations"}),e.jsx("input",{type:"search",value:c,onChange:s=>p({query:s.target.value}),placeholder:"Search organizations"})]}),e.jsx("div",{className:"organizations-sort","aria-label":"Sort organizations",children:[["trending","Trending"],["papers","Most papers"],["name","A–Z"]].map(([s,a])=>e.jsx("button",{type:"button",className:t===s?"active":"","aria-pressed":t===s,onClick:()=>p({sort:s}),children:a},s))})]}),o.isLoading?e.jsx("div",{className:"organizations-grid","aria-busy":"true",children:Array.from({length:6}).map((s,a)=>e.jsx(N,{className:"organization-card-skeleton"},a))}):o.error?e.jsx(f,{variant:"destructive",children:e.jsxs(_,{children:["Failed to load organizations."," ",e.jsx("button",{type:"button",onClick:()=>o.refetch(),children:"Try again"})]})}):m.length===0?e.jsxs("div",{className:"organizations-empty",children:["No organizations match “",c,"”."]}):e.jsx("div",{className:"organizations-grid",children:m.map(s=>{var r;const a=s.paper_count??0,i=s.first_paper_year&&s.latest_paper_year?s.first_paper_year===s.latest_paper_year?String(s.first_paper_year):`${s.first_paper_year}–${s.latest_paper_year}`:null;return e.jsxs(x,{to:`/orgs/${s.slug}`,className:"organization-card","aria-label":a?`Browse ${a.toLocaleString()} ${s.name} papers`:`Browse ${s.name} papers`,children:[e.jsxs("div",{className:"organization-card-header",children:[e.jsx(S,{organization:s}),e.jsxs("div",{children:[e.jsx("h3",{children:s.name}),e.jsxs("span",{children:["@",s.hf_slug??s.slug]})]})]}),e.jsxs("div",{className:"organization-card-metrics",children:[e.jsx("strong",{children:a.toLocaleString()}),e.jsx("span",{children:a===1?"paper":"papers"}),t==="trending"&&s.trending_rank&&e.jsxs("span",{className:"organization-rank",children:["#",s.trending_rank]})]}),e.jsxs("div",{className:"organization-highlight",children:[e.jsx("span",{children:"Trending paper"}),e.jsx("strong",{children:((r=s.top_trending_paper)==null?void 0:r.title)??"No papers indexed yet"})]}),e.jsxs("div",{className:"organization-card-footer",children:[i?`Publishing ${i}`:"Research archive ready",e.jsx("span",{"aria-hidden":"true",children:"↗"})]})]},s.id)})})]})]})};export{q as default};
 
1
+ import{a as u,r as g,j as e,L as x,b as j}from"./index-B2CsYqS1.js";import{u as y}from"./useQuery-D09nn2D4.js";import{A as f,a as _}from"./alert-B5Pni1K6.js";import{S as N}from"./skeleton-EzEzG6PT.js";import"./useBaseQuery-DCY5lvEf.js";const v=n=>n==="papers"||n==="name"?n:"trending",S=({organization:n})=>{const[d,t]=g.useState(!1);return!n.logo_url||d?e.jsx("span",{className:"organization-logo organization-logo--fallback","aria-hidden":"true",children:n.name.slice(0,1).toUpperCase()}):e.jsx("span",{className:"organization-logo",children:e.jsx("img",{src:n.logo_url,alt:"",width:48,height:48,onError:()=>t(!0)})})},q=()=>{var h;const[n,d]=u(),t=v(n.get("sort")),c=n.get("q")??"",o=y({queryKey:["organizations","featured"],queryFn:()=>j.getOrganizations(!0),staleTime:10*60*1e3}),p=s=>{const a=new URLSearchParams(n),i=s.sort??t,r=s.query??c;i==="trending"?a.delete("sort"):a.set("sort",i),r.trim()?a.set("q",r):a.delete("q"),d(a)},m=g.useMemo(()=>{var i;const s=c.trim().toLocaleLowerCase(),a=(((i=o.data)==null?void 0:i.results)??[]).filter(r=>[r.name,r.slug,r.hf_slug??""].join(" ").toLocaleLowerCase().includes(s));return t==="papers"?[...a].sort((r,l)=>(l.paper_count??0)-(r.paper_count??0)||r.name.localeCompare(l.name)||r.slug.localeCompare(l.slug)):t==="name"?[...a].sort((r,l)=>r.name.localeCompare(l.name)||r.slug.localeCompare(l.slug)):a},[o.data,c,t]);return e.jsxs("div",{className:"page organizations-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:"Organizations"})]}),e.jsx("div",{className:"feed-subtitle",children:"Explore papers from 21 leading AI organizations, ranked by sustained community momentum over the past 30 days."})]})}),e.jsxs("section",{"aria-labelledby":"organizations-heading",children:[e.jsxs("div",{className:"organizations-section-heading",children:[e.jsxs("h2",{id:"organizations-heading",children:[((h=o.data)==null?void 0:h.count)??21," organizations"]}),e.jsx("span",{children:t==="trending"?"Ranked by 30-day momentum":t==="papers"?"Sorted by linked papers":"Sorted A–Z"})]}),e.jsxs("div",{className:"organizations-controls",children:[e.jsxs("label",{children:[e.jsx("span",{className:"sr-only",children:"Search organizations"}),e.jsx("input",{type:"search",value:c,onChange:s=>p({query:s.target.value}),placeholder:"Search organizations"})]}),e.jsx("div",{className:"organizations-sort","aria-label":"Sort organizations",children:[["trending","Trending"],["papers","Most papers"],["name","A–Z"]].map(([s,a])=>e.jsx("button",{type:"button",className:t===s?"active":"","aria-pressed":t===s,onClick:()=>p({sort:s}),children:a},s))})]}),o.isLoading?e.jsx("div",{className:"organizations-grid","aria-busy":"true",children:Array.from({length:6}).map((s,a)=>e.jsx(N,{className:"organization-card-skeleton"},a))}):o.error?e.jsx(f,{variant:"destructive",children:e.jsxs(_,{children:["Failed to load organizations."," ",e.jsx("button",{type:"button",onClick:()=>o.refetch(),children:"Try again"})]})}):m.length===0?e.jsxs("div",{className:"organizations-empty",children:["No organizations match “",c,"”."]}):e.jsx("div",{className:"organizations-grid",children:m.map(s=>{var r;const a=s.paper_count??0,i=s.first_paper_year&&s.latest_paper_year?s.first_paper_year===s.latest_paper_year?String(s.first_paper_year):`${s.first_paper_year}–${s.latest_paper_year}`:null;return e.jsxs(x,{to:`/orgs/${s.slug}`,className:"organization-card","aria-label":a?`Browse ${a.toLocaleString()} ${s.name} papers`:`Browse ${s.name} papers`,children:[e.jsxs("div",{className:"organization-card-header",children:[e.jsx(S,{organization:s}),e.jsxs("div",{children:[e.jsx("h3",{children:s.name}),e.jsxs("span",{children:["@",s.hf_slug??s.slug]})]})]}),e.jsxs("div",{className:"organization-card-metrics",children:[e.jsx("strong",{children:a.toLocaleString()}),e.jsx("span",{children:a===1?"paper":"papers"}),t==="trending"&&s.trending_rank&&e.jsxs("span",{className:"organization-rank",children:["#",s.trending_rank]})]}),e.jsxs("div",{className:"organization-highlight",children:[e.jsx("span",{children:"Trending paper"}),e.jsx("strong",{children:((r=s.top_trending_paper)==null?void 0:r.title)??"No papers indexed yet"})]}),e.jsxs("div",{className:"organization-card-footer",children:[i?`Publishing ${i}`:"Research archive ready",e.jsx("span",{"aria-hidden":"true",children:"↗"})]})]},s.id)})})]})]})};export{q as default};
assets/PaperDetailView-C8MLtf05.js DELETED
The diff for this file is too large to render. See raw diff
 
assets/PaperDetailView-Co_a-Bpv.js ADDED
The diff for this file is too large to render. See raw diff
 
assets/{PaperFeedFilters-vnoti5eB.js → PaperFeedFilters-DC6dQXvU.js} RENAMED
@@ -1 +1 @@
1
- import{j as e}from"./index-eBKbcCso.js";import{I as i}from"./components-D8Z2f6Zw.js";const n=()=>e.jsxs("span",{className:"hf-resource-logo",children:[e.jsx("img",{className:"hf-resource-logo-black",src:"/hf-logo-monochrome-black.svg?v=20260729",alt:""}),e.jsx("img",{className:"hf-resource-logo-white",src:"/hf-logo-monochrome-white.svg?v=20260729",alt:""})]}),l=({checked:s,icon:a,label:r,onChange:o})=>e.jsxs("button",{type:"button",className:`paper-feed-filter ${s?"active":""}`,"aria-pressed":s,onClick:()=>o(!s),children:[e.jsxs("span",{className:"paper-feed-filter-content",children:[e.jsx("span",{className:"paper-feed-filter-icon","aria-hidden":"true",children:a}),r]}),s&&e.jsx("span",{className:"paper-feed-filter-check","aria-hidden":"true",children:"✓"})]}),d=({hasCode:s,hasHfArtifacts:a,onHasCodeChange:r,onHasHfArtifactsChange:o,showDivider:c=!0})=>e.jsxs("div",{className:"paper-feed-resource-controls",role:"group","aria-label":"Resource filters",children:[c&&e.jsx("span",{className:"paper-feed-resource-divider","aria-hidden":"true"}),e.jsxs("div",{className:"paper-feed-filter-options",children:[e.jsx(l,{checked:s,icon:e.jsx(i,{name:"github",size:14}),label:"Has code",onChange:r}),e.jsx(l,{checked:a,icon:e.jsx(n,{}),label:"Has artifacts",onChange:o})]})]});export{d as P};
 
1
+ import{j as e}from"./index-B2CsYqS1.js";import{I as i}from"./components-Dt_hKhor.js";const n=()=>e.jsxs("span",{className:"hf-resource-logo",children:[e.jsx("img",{className:"hf-resource-logo-black",src:"/hf-logo-monochrome-black.svg?v=20260729",alt:""}),e.jsx("img",{className:"hf-resource-logo-white",src:"/hf-logo-monochrome-white.svg?v=20260729",alt:""})]}),l=({checked:s,icon:a,label:r,onChange:o})=>e.jsxs("button",{type:"button",className:`paper-feed-filter ${s?"active":""}`,"aria-pressed":s,onClick:()=>o(!s),children:[e.jsxs("span",{className:"paper-feed-filter-content",children:[e.jsx("span",{className:"paper-feed-filter-icon","aria-hidden":"true",children:a}),r]}),s&&e.jsx("span",{className:"paper-feed-filter-check","aria-hidden":"true",children:"✓"})]}),d=({hasCode:s,hasHfArtifacts:a,onHasCodeChange:r,onHasHfArtifactsChange:o,showDivider:c=!0})=>e.jsxs("div",{className:"paper-feed-resource-controls",role:"group","aria-label":"Resource filters",children:[c&&e.jsx("span",{className:"paper-feed-resource-divider","aria-hidden":"true"}),e.jsxs("div",{className:"paper-feed-filter-options",children:[e.jsx(l,{checked:s,icon:e.jsx(i,{name:"github",size:14}),label:"Has code",onChange:r}),e.jsx(l,{checked:a,icon:e.jsx(n,{}),label:"Has artifacts",onChange:o})]})]});export{d as P};
assets/{PaperPreviewLink-BrlkKB05.js → PaperPreviewLink-DyP6osoH.js} RENAMED
@@ -1,4 +1,4 @@
1
- import{o as F,l as ne,f as v,m as b,a as re,p as I,b as $,n as L,h as ie,s as ae,c as oe,v as se,S as le}from"./index-LmPbjihc.js";import{k as z}from"./katex.min-BSBacQyE.js";import{j as f,R as T,Z as ce,S as ue,L as he,ak as pe}from"./index-eBKbcCso.js";import{u as me}from"./useQuery-DIrXGOA7.js";import{H as fe,a as de,b as ge}from"./hover-card-CdeSv7Gc.js";function xe(){return{enter:{mathFlow:e,mathFlowFenceMeta:t,mathText:o},exit:{mathFlow:i,mathFlowFence:r,mathFlowFenceMeta:n,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 n(){const a=this.resume(),u=this.stack[this.stack.length-1];F(u.type==="math"),u.meta=a}function r(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)}function i(a){const u=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),p=this.stack[this.stack.length-1];F(p.type==="math"),this.exit(a),p.value=u;const m=p.data.hChildren[0];F(m.type==="element"),F(m.tagName==="code"),m.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(),p=this.stack[this.stack.length-1];F(p.type==="inlineMath"),this.exit(a),p.value=u,p.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 ye(e){let t=(e||{}).singleDollarTextMath;return t==null&&(t=!0),r.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:n,inlineMath:r}};function n(o,s,l,a){const u=o.value||"",p=l.createTracker(a),m="$".repeat(Math.max(ne(u,"$")+1,2)),g=l.enter("mathFlow");let x=p.move(m);if(o.meta){const d=l.enter("mathFlowMeta");x+=p.move(l.safe(o.meta,{after:`
3
  `,before:x,encode:["$"],...p.current()})),d()}return x+=p.move(`
4
  `),u&&(x+=p.move(u+`
 
1
+ import{o as F,l as ne,f as v,m as b,a as re,p as I,b as $,n as L,h as ie,s as ae,c as oe,v as se,S as le}from"./index-6E7p68ra.js";import{k as z}from"./katex.min-BSBacQyE.js";import{j as f,R as T,Z as ce,S as ue,L as he,ak as pe}from"./index-B2CsYqS1.js";import{u as me}from"./useQuery-D09nn2D4.js";import{H as fe,a as de,b as ge}from"./hover-card-DfDU2jCA.js";function xe(){return{enter:{mathFlow:e,mathFlowFenceMeta:t,mathText:o},exit:{mathFlow:i,mathFlowFence:r,mathFlowFenceMeta:n,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 n(){const a=this.resume(),u=this.stack[this.stack.length-1];F(u.type==="math"),u.meta=a}function r(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)}function i(a){const u=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),p=this.stack[this.stack.length-1];F(p.type==="math"),this.exit(a),p.value=u;const m=p.data.hChildren[0];F(m.type==="element"),F(m.tagName==="code"),m.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(),p=this.stack[this.stack.length-1];F(p.type==="inlineMath"),this.exit(a),p.value=u,p.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 ye(e){let t=(e||{}).singleDollarTextMath;return t==null&&(t=!0),r.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:n,inlineMath:r}};function n(o,s,l,a){const u=o.value||"",p=l.createTracker(a),m="$".repeat(Math.max(ne(u,"$")+1,2)),g=l.enter("mathFlow");let x=p.move(m);if(o.meta){const d=l.enter("mathFlowMeta");x+=p.move(l.safe(o.meta,{after:`
3
  `,before:x,encode:["$"],...p.current()})),d()}return x+=p.move(`
4
  `),u&&(x+=p.move(u+`
assets/{PapersListView-CW3V6tES.js → PapersListView-VUKbGSmy.js} RENAMED
@@ -1 +1 @@
1
- import{a as A,r as i,j as e,L as I,b as T}from"./index-eBKbcCso.js";import{I as F,P as L}from"./components-D8Z2f6Zw.js";import{t as C,d as R}from"./transform-DM1_5UAz.js";import{u as k}from"./usePapers-B09ZSLzW.js";import{u as D}from"./useDebounce-DJNx_lIu.js";import{u as E,P as O}from"./usePeriodFilter-APVJLG-P.js";import{u as B}from"./useIntersectionObserver-BjpbHbpf.js";import{S as c}from"./skeleton-Cd-jfjiE.js";import{A as $,a as M}from"./alert-BCeSLEYS.js";import{u as q}from"./useQuery-DIrXGOA7.js";import"./LatexTitle-CqLY2qFp.js";import"./katex.min-BSBacQyE.js";import"./useInfiniteQuery-PtHXMuOU.js";import"./useBaseQuery-CZIeK7IO.js";const z=[["trending","trending"],["new","newest"],["cited","most cited"]],te=()=>{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{te as default};
 
1
+ import{a as A,r as i,j as e,L as I,b as T}from"./index-B2CsYqS1.js";import{I as F,P as L}from"./components-Dt_hKhor.js";import{t as C,d as R}from"./transform-Csq86xeP.js";import{u as k}from"./usePapers-BUvi-1N_.js";import{u as D}from"./useDebounce-DIUB57EG.js";import{u as E,P as O}from"./usePeriodFilter-CtyKeB9n.js";import{u as B}from"./useIntersectionObserver-BEQRRw3B.js";import{S as c}from"./skeleton-EzEzG6PT.js";import{A as $,a as M}from"./alert-B5Pni1K6.js";import{u as q}from"./useQuery-D09nn2D4.js";import"./LatexTitle-DhaqzMPt.js";import"./katex.min-BSBacQyE.js";import"./useInfiniteQuery-gjnIRn2t.js";import"./useBaseQuery-DCY5lvEf.js";const z=[["trending","trending"],["new","newest"],["cited","most cited"]],te=()=>{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{te as default};
assets/{SavedPapersView-DvrP8JZD.js → SavedPapersView-u-XNvlO6.js} RENAMED
@@ -1 +1 @@
1
- import{f as o,j as s,a5 as m,L as p,b as h}from"./index-eBKbcCso.js";import{u as x}from"./useQuery-DIrXGOA7.js";import{T as u,P as j}from"./components-D8Z2f6Zw.js";import{S as r}from"./skeleton-Cd-jfjiE.js";import{A as v,a as N}from"./alert-BCeSLEYS.js";import{t as g}from"./transform-DM1_5UAz.js";import"./useBaseQuery-CZIeK7IO.js";import"./LatexTitle-CqLY2qFp.js";import"./katex.min-BSBacQyE.js";const C=()=>{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{C as default};
 
1
+ import{f as o,j as s,a5 as m,L as p,b as h}from"./index-B2CsYqS1.js";import{u as x}from"./useQuery-D09nn2D4.js";import{T as u,P as j}from"./components-Dt_hKhor.js";import{S as r}from"./skeleton-EzEzG6PT.js";import{A as v,a as N}from"./alert-B5Pni1K6.js";import{t as g}from"./transform-Csq86xeP.js";import"./useBaseQuery-DCY5lvEf.js";import"./LatexTitle-DhaqzMPt.js";import"./katex.min-BSBacQyE.js";const C=()=>{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{C as default};
assets/{SearchOverlay-DgRrJ2zx.js → SearchOverlay-CTTBwlHC.js} RENAMED
@@ -1 +1 @@
1
- import{r as C,u as L,R as T,i as $,j as s,b as m}from"./index-eBKbcCso.js";import{u as p}from"./useQuery-DIrXGOA7.js";import{L as A}from"./LatexTitle-CqLY2qFp.js";import{u as D}from"./useDebounce-DJNx_lIu.js";import{e as z,h as M,d as B}from"./transform-DM1_5UAz.js";import"./useBaseQuery-CZIeK7IO.js";import"./katex.min-BSBacQyE.js";const I=10,J=({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}),enabled:n&&a.length>=2,staleTime:6e4});if(!n)return null;const o=((f=k.data)==null?void 0:f.results)||[],d=((_=y.data)==null?void 0:_.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{J as default};
 
1
+ import{r as C,u as L,R as T,i as $,j as s,b as m}from"./index-B2CsYqS1.js";import{u as p}from"./useQuery-D09nn2D4.js";import{L as A}from"./LatexTitle-DhaqzMPt.js";import{u as D}from"./useDebounce-DIUB57EG.js";import{e as z,h as M,d as B}from"./transform-Csq86xeP.js";import"./useBaseQuery-DCY5lvEf.js";import"./katex.min-BSBacQyE.js";const I=10,J=({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}),enabled:n&&a.length>=2,staleTime:6e4});if(!n)return null;const o=((f=k.data)==null?void 0:f.results)||[],d=((_=y.data)==null?void 0:_.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{J as default};
assets/{SettingsView-C7bMPoNs.js → SettingsView-Cvm3041a.js} RENAMED
@@ -1,4 +1,4 @@
1
- import{c as h,f as H,T as q,an as P,R as r,s as I,j as e,a5 as v,d}from"./index-eBKbcCso.js";import{u as B}from"./useQuery-DIrXGOA7.js";import{u as k}from"./useMutation-CcYjkB_f.js";import{S as D}from"./switch-DOYXT2Vb.js";import{f as L,D as A}from"./latexPlainText-ChVkH0gY.js";import{E as N}from"./external-link-DIVMrc1B.js";import"./useBaseQuery-CZIeK7IO.js";import"./index-CIicyhwW.js";/**
2
  * @license lucide-react v0.462.0 - ISC
3
  *
4
  * This source code is licensed under the ISC license.
 
1
+ import{c as h,f as H,T as q,an as P,R as r,s as I,j as e,a5 as v,d}from"./index-B2CsYqS1.js";import{u as B}from"./useQuery-D09nn2D4.js";import{u as k}from"./useMutation-D-leEq6C.js";import{S as D}from"./switch-Wl4WeaN5.js";import{f as L,D as A}from"./latexPlainText-DI8YEXVe.js";import{E as N}from"./external-link-D9b8lwPM.js";import"./useBaseQuery-DCY5lvEf.js";import"./index-rF6L_V4R.js";/**
2
  * @license lucide-react v0.462.0 - ISC
3
  *
4
  * This source code is licensed under the ISC license.
assets/{SharedChatView-Dm1tLTjl.js → SharedChatView-BkB_JCFN.js} RENAMED
@@ -1 +1 @@
1
- import{e as f,u as x,r as l,j as e}from"./index-eBKbcCso.js";import{u as j}from"./useQuery-DIrXGOA7.js";import{C as v,U as g,A as y}from"./ChatMessage-CsXFCs8i.js";import{k as p,S,p as k,q as C,m as b}from"./chatSessions-L9GbPmnt.js";import"./useBaseQuery-CZIeK7IO.js";import"./katex.min-BSBacQyE.js";import"./hover-card-CdeSv7Gc.js";import"./PaperPreviewLink-BrlkKB05.js";import"./index-LmPbjihc.js";const q=({detail:c})=>{const[o,r]=l.useState(()=>k(c)),d=l.useMemo(()=>{const t={};for(const s of o)for(const n of s.blocks??[])if(n.kind==="tool")for(const a of n.results??[])t[a.route_id]=a;return t},[o]),h=(t,s)=>{r(n=>n.map(a=>{var u;return a.id!==t?a:{...a,blocks:(u=a.blocks)==null?void 0:u.map((i,m)=>m===s&&(i.kind==="reasoning"||i.kind==="tool")?{...i,open:!i.open}:i)}}))};return e.jsx("div",{className:"shared-chat-transcript",children:o.map(t=>t.role==="user"?e.jsx(g,{id:t.id,text:t.text??""},t.id):e.jsx(y,{msg:t,papers:d,onToggleBlock:h},t.id))})},F=()=>{const{shareId:c=""}=f(),o=x(),r=j({queryKey:["shared-chat",c],queryFn:()=>b(c),retry:(t,s)=>!(s instanceof p&&s.status===404)&&t<1});l.useEffect(()=>{const t=document.title,s=document.head.querySelector('meta[name="robots"]'),n=s==null?void 0:s.content,a=s??document.createElement("meta");return a.name="robots",a.content="noindex,nofollow",s||document.head.appendChild(a),document.title="Shared conversation",()=>{document.title=t,s?s.content=n??"":a.remove()}},[]);const d=t=>{C(t),o("/chat")},h=r.error instanceof p&&r.error.status===404;return r.isLoading?e.jsxs("div",{className:"shared-chat-state",role:"status",children:[e.jsx(S,{})," Loading shared conversation…"]}):h?e.jsxs("div",{className:"shared-chat-state shared-chat-not-found",children:[e.jsx("h1",{children:"Shared conversation not found"}),e.jsx("p",{children:"This link is invalid or is no longer available."})]}):r.isError||!r.data?e.jsxs("div",{className:"shared-chat-state",role:"alert",children:[e.jsx("h1",{children:"Couldn’t load this conversation"}),e.jsx("p",{children:"Please check your connection and try again."}),e.jsx("button",{type:"button",onClick:()=>void r.refetch(),children:"Try again"})]}):e.jsxs("div",{className:"shared-chat-page",children:[e.jsx("div",{className:"shared-chat-heading",children:e.jsx("h1",{children:"Shared conversation"})}),e.jsxs("div",{className:"shared-chat-content",children:[e.jsx(q,{detail:r.data},r.data.updated_at),e.jsxs("section",{className:"shared-chat-fresh","aria-labelledby":"shared-chat-fresh-title",children:[e.jsx("h2",{id:"shared-chat-fresh-title",children:"Start a new conversation"}),e.jsx("p",{children:"Your new question starts with an empty context."}),e.jsx(v,{onSend:d,placeholder:"Ask a new research question…"})]})]})]})};export{F as default};
 
1
+ import{e as f,u as x,r as l,j as e}from"./index-B2CsYqS1.js";import{u as j}from"./useQuery-D09nn2D4.js";import{C as v,U as g,A as y}from"./ChatMessage-CY41UkDl.js";import{k as p,S,p as k,q as C,m as b}from"./chatSessions-Roa-dbFO.js";import"./useBaseQuery-DCY5lvEf.js";import"./katex.min-BSBacQyE.js";import"./hover-card-DfDU2jCA.js";import"./PaperPreviewLink-DyP6osoH.js";import"./index-6E7p68ra.js";const q=({detail:c})=>{const[o,r]=l.useState(()=>k(c)),d=l.useMemo(()=>{const t={};for(const s of o)for(const n of s.blocks??[])if(n.kind==="tool")for(const a of n.results??[])t[a.route_id]=a;return t},[o]),h=(t,s)=>{r(n=>n.map(a=>{var u;return a.id!==t?a:{...a,blocks:(u=a.blocks)==null?void 0:u.map((i,m)=>m===s&&(i.kind==="reasoning"||i.kind==="tool")?{...i,open:!i.open}:i)}}))};return e.jsx("div",{className:"shared-chat-transcript",children:o.map(t=>t.role==="user"?e.jsx(g,{id:t.id,text:t.text??""},t.id):e.jsx(y,{msg:t,papers:d,onToggleBlock:h},t.id))})},F=()=>{const{shareId:c=""}=f(),o=x(),r=j({queryKey:["shared-chat",c],queryFn:()=>b(c),retry:(t,s)=>!(s instanceof p&&s.status===404)&&t<1});l.useEffect(()=>{const t=document.title,s=document.head.querySelector('meta[name="robots"]'),n=s==null?void 0:s.content,a=s??document.createElement("meta");return a.name="robots",a.content="noindex,nofollow",s||document.head.appendChild(a),document.title="Shared conversation",()=>{document.title=t,s?s.content=n??"":a.remove()}},[]);const d=t=>{C(t),o("/chat")},h=r.error instanceof p&&r.error.status===404;return r.isLoading?e.jsxs("div",{className:"shared-chat-state",role:"status",children:[e.jsx(S,{})," Loading shared conversation…"]}):h?e.jsxs("div",{className:"shared-chat-state shared-chat-not-found",children:[e.jsx("h1",{children:"Shared conversation not found"}),e.jsx("p",{children:"This link is invalid or is no longer available."})]}):r.isError||!r.data?e.jsxs("div",{className:"shared-chat-state",role:"alert",children:[e.jsx("h1",{children:"Couldn’t load this conversation"}),e.jsx("p",{children:"Please check your connection and try again."}),e.jsx("button",{type:"button",onClick:()=>void r.refetch(),children:"Try again"})]}):e.jsxs("div",{className:"shared-chat-page",children:[e.jsx("div",{className:"shared-chat-heading",children:e.jsx("h1",{children:"Shared conversation"})}),e.jsxs("div",{className:"shared-chat-content",children:[e.jsx(q,{detail:r.data},r.data.updated_at),e.jsxs("section",{className:"shared-chat-fresh","aria-labelledby":"shared-chat-fresh-title",children:[e.jsx("h2",{id:"shared-chat-fresh-title",children:"Start a new conversation"}),e.jsx("p",{children:"Your new question starts with an empty context."}),e.jsx(v,{onSend:d,placeholder:"Ask a new research question…"})]})]})]})};export{F as default};
assets/{SignInToEditDialog-eRf-3xm2.js → SignInToEditDialog-CAja351o.js} RENAMED
@@ -1,4 +1,4 @@
1
- import{c as X,r as i,j as e,a3 as W,q,a4 as Q,g as Z,t as ee,X as te,C as se,a5 as ae}from"./index-eBKbcCso.js";import{B as D}from"./button-DR_Fc3Hk.js";import{I as h,T as re}from"./textarea-DC0tTufA.js";import{D as U,a as H,b as O,c as V,d as $,e as ne}from"./dialog-DhCB6EKj.js";import{u as oe}from"./useMutation-CcYjkB_f.js";import{L as ie}from"./loader-circle-Bz-wpQwE.js";/**
2
  * @license lucide-react v0.462.0 - ISC
3
  *
4
  * This source code is licensed under the ISC license.
 
1
+ import{c as X,r as i,j as e,a3 as W,q,a4 as Q,g as Z,t as ee,X as te,C as se,a5 as ae}from"./index-B2CsYqS1.js";import{B as D}from"./button-Oqi1rHf_.js";import{I as h,T as re}from"./textarea-ccgKicZU.js";import{D as U,a as H,b as O,c as V,d as $,e as ne}from"./dialog-KRtMu_IA.js";import{u as oe}from"./useMutation-D-leEq6C.js";import{L as ie}from"./loader-circle-CNbkR79_.js";/**
2
  * @license lucide-react v0.462.0 - ISC
3
  *
4
  * This source code is licensed under the ISC license.
assets/SubmissionsDashboard-HTFCR6W8.js ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ var fe=s=>{throw TypeError(s)};var G=(s,t,i)=>t.has(s)||fe("Cannot "+i);var p=(s,t,i)=>(G(s,t,"read from private field"),i?i.call(s):t.get(s)),E=(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),_=(s,t,i,n)=>(G(s,t,"write to private field"),n?n.call(s,i):t.set(s,i),i),C=(s,t,i)=>(G(s,t,"access private method"),i);import{ap as Ae,aq as ee,ar as Oe,as as Me,s as ke,r as $,at as qe,c as Fe,j as e,au as Se,av as Qe,R as N,q as Q,aw as Ie,Z as Ue,f as Le,g as we,ak as De,ax as $e,ay as Te,az as Be,aA as ze,aB as He,aC as se}from"./index-B2CsYqS1.js";import{Q as Ee,u as Ke,a as Pe,e as Je,b as We,c as Ve,s as pe,f as Ye,g as Ze}from"./useBaseQuery-DCY5lvEf.js";import{u as ge}from"./useQuery-D09nn2D4.js";import{u as be}from"./useMutation-D-leEq6C.js";import{R as Ge,S as Xe,C as es,a as ss}from"./shield-alert-D22PJX5S.js";import{L as B}from"./loader-circle-CNbkR79_.js";function je(s,t){const i=new Set(t);return s.filter(n=>!i.has(n))}function ts(s,t,i){const n=s.slice(0);return n[t]=i,n}var L,S,D,U,w,F,z,H,K,P,v,te,ie,Ce,ne,re,ae,_e,is=(_e=class extends Ae{constructor(t,i,n){super();E(this,v);E(this,L);E(this,S);E(this,D);E(this,U);E(this,w);E(this,F);E(this,z);E(this,H);E(this,K);E(this,P,[]);_(this,L,t),_(this,U,n),_(this,D,[]),_(this,w,[]),_(this,S,[]),this.setQueries(i)}onSubscribe(){this.listeners.size===1&&p(this,w).forEach(t=>{t.subscribe(i=>{C(this,v,re).call(this,t,i)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,p(this,w).forEach(t=>{t.destroy()})}setQueries(t,i){_(this,D,t),_(this,U,i),ee.batch(()=>{const n=p(this,w),r=C(this,v,ne).call(this,p(this,D));r.forEach(a=>a.observer.setOptions(a.defaultedQueryOptions));const c=r.map(a=>a.observer),l=c.map(a=>a.getCurrentResult()),d=n.length!==c.length,m=c.some((a,o)=>a!==n[o]),b=d||m,x=b?!0:l.some((a,o)=>{const u=p(this,S)[o];return!u||!Oe(a,u)});!b&&!x||(b&&(_(this,P,r),_(this,w,c)),_(this,S,l),this.hasListeners()&&(b&&(je(n,c).forEach(a=>{a.destroy()}),je(c,n).forEach(a=>{a.subscribe(o=>{C(this,v,re).call(this,a,o)})})),C(this,v,ae).call(this)))})}getCurrentResult(){return p(this,S)}getQueries(){return p(this,w).map(t=>t.getCurrentQuery())}getObservers(){return p(this,w)}getOptimisticResult(t,i){const n=C(this,v,ne).call(this,t),r=n.map(l=>l.observer.getOptimisticResult(l.defaultedQueryOptions)),c=n.map(l=>l.defaultedQueryOptions.queryHash);return[r,l=>C(this,v,ie).call(this,l??r,i,c),()=>C(this,v,te).call(this,r,n)]}},L=new WeakMap,S=new WeakMap,D=new WeakMap,U=new WeakMap,w=new WeakMap,F=new WeakMap,z=new WeakMap,H=new WeakMap,K=new WeakMap,P=new WeakMap,v=new WeakSet,te=function(t,i){return i.map((n,r)=>{const c=t[r];return n.defaultedQueryOptions.notifyOnChangeProps?c:n.observer.trackResult(c,l=>{i.forEach(d=>{d.observer.trackProp(l)})})})},ie=function(t,i,n){if(i){const r=p(this,K),c=n!==void 0&&r!==void 0&&(r.length!==n.length||n.some((l,d)=>l!==r[d]));return(!p(this,F)||p(this,S)!==p(this,H)||c||i!==p(this,z))&&(_(this,z,i),_(this,H,p(this,S)),n!==void 0&&_(this,K,n),_(this,F,Me(p(this,F),i(t)))),p(this,F)}return t},Ce=function(){var t;return((t=p(this,U))==null?void 0:t.combine)!==void 0&&p(this,w).some((i,n)=>{var r;return i.options.suspense&&((r=p(this,S)[n])==null?void 0:r.data)===void 0})},ne=function(t){const i=new Map;p(this,w).forEach(r=>{const c=r.options.queryHash;if(!c)return;const l=i.get(c);l?l.push(r):i.set(c,[r])});const n=[];return t.forEach(r=>{var m;const c=p(this,L).defaultQueryOptions(r),d=((m=i.get(c.queryHash))==null?void 0:m.shift())??new Ee(p(this,L),c);n.push({defaultedQueryOptions:c,observer:d})}),n},re=function(t,i){const n=p(this,w).indexOf(t);n!==-1&&(_(this,S,ts(p(this,S),n,i)),C(this,v,ae).call(this))},ae=function(){var t;if(this.hasListeners()){const i=C(this,v,te).call(this,p(this,S),p(this,P)),n=C(this,v,Ce).call(this),r=p(this,F),c=n?r:C(this,v,ie).call(this,i,(t=p(this,U))==null?void 0:t.combine);(n||r!==c)&&ee.batch(()=>{this.listeners.forEach(l=>{l(p(this,S))})})}},_e);function Y({queries:s,...t},i){const n=ke(),r=Ke(),c=Pe(),l=$.useMemo(()=>s.map(h=>{const y=n.defaultQueryOptions(h);return y._optimisticResults=r?"isRestoring":"optimistic",y}),[s,n,r]);l.forEach(h=>{Je(h);const y=n.getQueryCache().get(h.queryHash);We(h,c,y)}),Ve(c);const[d]=$.useState(()=>new is(n,l,t)),[m,b,x]=d.getOptimisticResult(l,t.combine),a=!r&&t.subscribed!==!1;$.useSyncExternalStore($.useCallback(h=>a?d.subscribe(ee.batchCalls(h)):qe,[d,a]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),$.useEffect(()=>{d.setQueries(l,t)},[l,t,d]);const u=m.some((h,y)=>pe(l[y],h))?m.flatMap((h,y)=>{const f=l[y];if(f&&pe(f,h)){const I=new Ee(n,f);return Ye(f,I,c)}return[]}):[];if(u.length>0)throw Promise.all(u);const j=m.find((h,y)=>{const f=l[y];return f&&Ze({result:h,errorResetBoundary:c,throwOnError:f.throwOnError,query:n.getQueryCache().get(f.queryHash),suspense:f.suspense})});if(j!=null&&j.error)throw j.error;return b(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 ns=Fe("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"}]]),M=s=>s&&typeof s=="object"&&!Array.isArray(s)?s:{},xe=s=>Array.isArray(s)?s.map(t=>{const i=M(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!==null):[],ve=s=>Array.isArray(s)?s.map(Number).filter(t=>Number.isFinite(t)):[],W=s=>Array.isArray(s)?s.map(t=>{const i=M(t);return typeof i.url!="string"?null:{url:i.url,is_official:!!i.is_official}}).filter(t=>!!t):[],rs=s=>Array.isArray(s)?s.map(t=>M(t)):[],as=s=>Array.isArray(s)?s.map(t=>M(t)):[],os=s=>s.replace(/_/g," ");function cs({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(o=>o.id),...t])).sort((o,u)=>o-u),[s,t]),c=Y({queries:r.map(o=>({queryKey:[i,String(o)],queryFn:()=>n(String(o)),staleTime:5*60*1e3}))}),l=N.useMemo(()=>{const o=new Map;return s.forEach(u=>o.set(u.id,u.name)),c.forEach(u=>{const j=u.data;if(!j)return;const h=Number(j.id);Number.isFinite(h)&&o.set(h,j.name)}),o},[s,c]),d=new Set(s.map(o=>o.id)),m=new Set(t),b=r.filter(o=>d.has(o)&&!m.has(o)),x=r.filter(o=>!d.has(o)&&m.has(o)),a=(o,u)=>{const j=u==="current"&&b.includes(o),h=u==="proposed"&&x.includes(o);return e.jsx("span",{className:Q("submission-diff-pill",j&&"removed",h&&"added"),children:l.get(o)??`#${o}`},o)};return e.jsxs("div",{className:"submission-diff-columns",children:[e.jsx(R,{title:"Currently tagged",children:s.length>0?s.map(o=>a(o.id,"current")):e.jsx(k,{children:"No current tags"})}),e.jsx(R,{title:"Will be tagged",children:t.length>0?t.map(o=>a(o,"proposed")):e.jsx(k,{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])),c=Array.from(new Set([...n.keys(),...r.keys()])).sort();return c.length===0?e.jsxs(k,{children:["No ",s," in this submission."]}):e.jsx("div",{className:"submission-url-list",children:c.map(l=>{var o;const d=n.get(l),m=r.get(l),b=!d&&m,x=d&&!m,a=d&&m&&d.is_official!==m.is_official;return e.jsx("div",{className:Q("submission-url-row",b&&"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:Q("submission-url-link",x&&"removed"),children:l}),b&&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(d.is_official)," ","->"," ",String(m.is_official)]}),((o=m??d)==null?void 0:o.is_official)&&e.jsx("span",{className:"submission-pill",children:"Official"})]})},l)})})}function ls({currentPayload:s,proposedPayload:t}){const i=rs(M(s).evaluations),n=as(t.operations),r=N.useMemo(()=>{const a=new Set;return i.forEach(o=>{o.task_id&&a.add(Number(o.task_id))}),n.forEach(o=>{const u=o.data;u!=null&&u.task_id&&a.add(Number(u.task_id))}),Array.from(a).filter(o=>Number.isFinite(o))},[i,n]),c=N.useMemo(()=>{const a=new Set;return i.forEach(o=>{o.dataset_id&&a.add(Number(o.dataset_id))}),n.forEach(o=>{const u=o.data;u!=null&&u.dataset_id&&a.add(Number(u.dataset_id))}),Array.from(a).filter(o=>Number.isFinite(o))},[i,n]),l=Y({queries:r.map(a=>({queryKey:["task",String(a)],queryFn:()=>Se(String(a)),staleTime:5*60*1e3}))}),d=Y({queries:c.map(a=>({queryKey:["dataset",String(a)],queryFn:()=>Ie(String(a)),staleTime:5*60*1e3}))}),m=N.useMemo(()=>{const a=new Map;return l.forEach(o=>{const u=o.data;if(!u)return;const j=Number(u.id);Number.isFinite(j)&&a.set(j,u.name)}),a},[l]),b=N.useMemo(()=>{const a=new Map;return d.forEach(o=>{const u=o.data;if(!u)return;const j=Number(u.id);Number.isFinite(j)&&a.set(j,u.name)}),a},[d]),x=new Map(i.filter(a=>a.id!=null).map(a=>[Number(a.id),a]));return n.length===0?e.jsx(k,{children:"No evaluation operations in this payload."}):e.jsx("div",{className:"submission-eval-list",children:n.map((a,o)=>{const u=a.evaluation_id?x.get(a.evaluation_id):void 0,h=(a.op==="update"?{...u,...a.data}:a.data??u)??{};return e.jsxs("div",{className:"submission-eval-op",children:[e.jsxs("div",{className:"submission-eval-op-header",children:[e.jsx("span",{className:Q("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(ds,{evaluation:h,taskNames:m,datasetNames:b}):e.jsx(oe,{title:"Unsupported operation",value:a})]},`${a.op}-${a.evaluation_id??o}`)})})}function ds({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,c=s.metrics??{};return e.jsxs("div",{className:"submission-eval-fields",children:[e.jsx(q,{label:"Task",value:n?t.get(n)??`#${n}`:null}),e.jsx(q,{label:"Dataset",value:r?i.get(r)??`#${r}`:null}),e.jsx(q,{label:"Model",value:s.model_name||null}),e.jsx(q,{label:"Harness",value:s.harness||null}),e.jsx(q,{label:"Best rank",value:s.best_rank??null}),e.jsx(q,{label:"Parameters",value:s.num_parameters??null}),e.jsx(q,{label:"HF model URL",value:s.hf_model_url||null}),e.jsx(q,{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(c).length>0?e.jsx("div",{className:"submission-metric-list",children:Object.entries(c).map(([l,d])=>e.jsxs("span",{className:"submission-metric-pill",children:[l,": ",String(d)]},l))}):e.jsx(k,{children:"No metrics"})]})]})}function q({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 us({currentPayload:s,proposedPayload:t}){const i=M(s).source_url,n=t.source_url;return e.jsxs("div",{className:"submission-diff-columns",children:[e.jsx(R,{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(k,{children:"No current URL"})}),e.jsx(R,{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(k,{children:"No proposed URL"})})]})}function T({kind:s,proposedPayload:t}){const i=typeof t.name=="string"?t.name:"",n=typeof t.description=="string"?t.description:"",r=typeof t.dates=="string"?t.dates:"",c=typeof t.venue=="string"?t.venue:"",l=typeof t.url=="string"?t.url:"",d=M(t.image),m=typeof d.data_url=="string"&&d.data_url.startsWith("data:image/")?d.data_url:"",b=typeof d.url=="string"?Ue(d.url)??"":m,x=typeof d.file_name=="string"?d.file_name:"Suggested image",a=typeof t.image_credit=="string"?t.image_credit:"",o=typeof t.source=="string"?t.source:"";return e.jsxs("div",{className:"submission-diff-columns",children:[e.jsx(R,{title:`Suggested ${s} name`,children:i?e.jsx("span",{className:"submission-diff-pill added",children:i}):e.jsx(k,{children:"No name provided"})}),e.jsx(R,{title:"Description",children:n?e.jsx("span",{className:"submission-field-value",children:n}):e.jsx(k,{children:"No description provided"})}),(s==="task"||s==="method")&&e.jsxs(e.Fragment,{children:[e.jsx(R,{title:"Image",children:b?e.jsx("img",{src:b,alt:x,className:"max-h-64 max-w-full rounded-md border border-border object-contain"}):e.jsx(k,{children:"No image provided"})}),e.jsx(R,{title:"Image source",children:a||e.jsx(k,{children:"No image source provided"})})]}),s==="method"&&e.jsx(R,{title:"Source",children:o?o.startsWith("http://")||o.startsWith("https://")?e.jsx("a",{className:"submission-url-link",href:o,target:"_blank",rel:"noopener noreferrer",children:o}):e.jsx("span",{className:"submission-field-value",children:o}):e.jsx(k,{children:"No source provided"})}),s==="conference"&&e.jsxs(e.Fragment,{children:[e.jsx(R,{title:"Dates",children:r||e.jsx(k,{children:"No dates provided"})}),e.jsx(R,{title:"Venue",children:c||e.jsx(k,{children:"No venue provided"})}),e.jsx(R,{title:"URL",children:l?e.jsx("a",{className:"submission-url-link",href:l,target:"_blank",rel:"noopener noreferrer",children:l}):e.jsx(k,{children:"No URL provided"})})]})]})}function R({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 k({children:s}){return e.jsx("span",{className:"submission-muted",children:s})}function ms({currentPayload:s,proposedPayload:t}){const i=M(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:c})=>{const l=Array.isArray(i[r])?i[r].filter(m=>typeof m=="string"):[],d=Array.isArray(t[r])?t[r].filter(m=>typeof m=="string"):[];return e.jsxs("div",{className:"submission-hf-artifacts-section",children:[e.jsx("div",{className:"submission-diff-label",children:c}),e.jsx(ce,{label:c.toLowerCase(),currentItems:l.map(m=>({url:m,is_official:!1})),proposedItems:d.map(m=>({url:m,is_official:!1}))})]},r)})})}function hs({editType:s,currentPayload:t,proposedPayload:i}){const n=M(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:Qe}):s==="repositories"?r=e.jsx(ce,{label:"repositories",currentItems:W(n.repositories),proposedItems:W(i.repositories)}):s==="project_pages"?r=e.jsx(ce,{label:"project pages",currentItems:W(n.project_pages),proposedItems:W(i.project_pages)}):s==="evaluations"?r=e.jsx(ls,{currentPayload:t,proposedPayload:i}):s==="source_url"?r=e.jsx(us,{currentPayload:t,proposedPayload:i}):s==="hf_artifacts"?r=e.jsx(ms,{currentPayload:t,proposedPayload:i}):s==="new_task"?r=e.jsx(T,{kind:"task",proposedPayload:i}):s==="new_method"?r=e.jsx(T,{kind:"method",proposedPayload:i}):s==="new_benchmark"?r=e.jsx(T,{kind:"benchmark",proposedPayload:i}):s==="new_metric"?r=e.jsx(T,{kind:"metric",proposedPayload:i}):s==="new_conference"?r=e.jsx(T,{kind:"conference",proposedPayload:i}):r=e.jsxs("div",{className:"submission-empty submission-empty-warn",children:["No custom renderer exists yet for ",os(s),"."]}),e.jsxs("div",{className:"submission-diff-body",children:[r,e.jsx(cs,{currentPayload:t,proposedPayload:i})]})}const X=25,fs=["pending","approved","rejected","all"],ps=["all","tasks","methods","evaluations","repositories","project_pages","source_url","new_task","new_method","new_benchmark","new_metric","new_conference"],le=["pending","approved","rejected"];function gs(s){return s.slice(0,2).toUpperCase()}function V(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),c=Math.floor(i/864e5);return n<1?"just now":n<60?`${n}m ago`:r<24?`${r}h ago`:c<14?`${c}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 js(s,t){return(s==null?void 0:s.arxiv_id)||(s==null?void 0:s.id)||String(t)}function xs(s){return[...s].sort((t,i)=>new Date(i.created_at).getTime()-new Date(t.created_at).getTime())}async function vs(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(c=>se({status:c,edit_type:n,limit:i,offset:0})));return{count:r.reduce((c,l)=>c+l.count,0),results:xs(r.flatMap(c=>c.results)).slice(0,i)}}function Ns(){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 ys(){return e.jsx("div",{className:"page",children:e.jsxs("div",{className:"submission-loading",children:[e.jsx(B,{className:"spin",size:18}),e.jsx("span",{children:"Checking admin session..."})]})})}function _s({submission:s,paper:t}){const[i,n]=N.useState(s.admin_note??""),r=ke(),{toast:c}=we(),l=s.paper_id==null,d=l?null:js(t,s.paper_id),m=l?"Taxonomy directory":(t==null?void 0:t.title)||`Paper #${s.paper_id}`,b=`https://huggingface.co/${encodeURIComponent(s.hf_username)}/avatar`,x=s.status==="pending";N.useEffect(()=>{n(s.admin_note??"")},[s.admin_note,s.id]);const a=N.useCallback(f=>{r.invalidateQueries({queryKey:["pendingPaperEdits"]}),r.invalidateQueries({queryKey:["pendingPaperEdit",f.id]}),f.paper_id!=null&&(r.invalidateQueries({queryKey:["paper",String(f.paper_id)]}),r.invalidateQueries({queryKey:["paper-summary",String(f.paper_id)]})),t!=null&&t.arxiv_id&&r.invalidateQueries({queryKey:["paper-arxiv",t.arxiv_id]}),f.edit_type==="evaluations"&&f.paper_id!=null&&r.invalidateQueries({queryKey:["evaluations","paper",String(f.paper_id)]})},[t==null?void 0:t.arxiv_id,r]),o=be({mutationFn:()=>ze(s.id,{admin_note:i.trim()||void 0}),onSuccess:f=>{a(f),c({title:"Submission approved",description:`Applied ${V(s.edit_type)} changes for ${m}.`})},onError:f=>{c({title:"Could not approve submission",description:de(f,"Approval failed. Please try again."),variant:"destructive"})}}),u=be({mutationFn:()=>He(s.id,{admin_note:i.trim()||void 0}),onSuccess:f=>{a(f),c({title:"Submission rejected",description:`Rejected ${V(s.edit_type)} changes for ${m}.`})},onError:f=>{c({title:"Could not reject submission",description:de(f,"Rejection failed. Please try again."),variant:"destructive"})}}),j=o.isPending,h=u.isPending,y=j||h;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:[d?e.jsx("a",{href:`/paper/${encodeURIComponent(d)}`,target:"_blank",rel:"noopener noreferrer",className:"submission-title",children:m}):e.jsx("div",{className:"submission-title",children:m}),e.jsxs("div",{className:"submission-meta",children:[e.jsxs("span",{children:["#",s.id]}),e.jsx("span",{children:l?"Directory suggestion":`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:V(s.edit_type)}),s.is_author&&e.jsx("span",{className:"submission-pill author",children:"Linked author"}),e.jsx("span",{className:Q("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($e,{className:"h-6 w-6",children:[e.jsx(Te,{src:b,alt:s.hf_username}),e.jsx(Be,{className:"text-[10px]",children:gs(s.hf_username)})]}),e.jsxs("span",{children:["@",s.hf_username]})]})]}),e.jsx("div",{className:"submission-diff",children:e.jsx(hs,{editType:s.edit_type,currentPayload:s.current_payload,proposedPayload:s.proposed_payload})}),e.jsx("footer",{className:"submission-actions",children:x?e.jsxs(e.Fragment,{children:[e.jsx("textarea",{value:i,onChange:f=>n(f.target.value),placeholder:"Optional admin note",className:"submission-note",disabled:y}),e.jsxs("div",{className:"submission-action-buttons",children:[e.jsxs("button",{type:"button",onClick:()=>u.mutate(),disabled:y,className:"submission-action-btn reject",children:[h?e.jsx(B,{className:"spin",size:14}):e.jsx(es,{size:14}),"Reject"]}),e.jsxs("button",{type:"button",onClick:()=>o.mutate(),disabled:y,className:"submission-action-btn approve",children:[j?e.jsx(B,{className:"spin",size:14}):e.jsx(ss,{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 Os(){var ue,me,he;const{user:s,isLoading:t}=Le(),{toast:i}=we(),[n,r]=N.useState("pending"),[c,l]=N.useState("all"),[d,m]=N.useState(X),b=!!(s!=null&&s.is_admin);N.useEffect(()=>{m(X)},[n,c]);const x=ge({queryKey:["pendingPaperEdits","counts",c],queryFn:async()=>{const g=c==="all"?void 0:c,A=await Promise.all(le.map(O=>se({status:O,edit_type:g,limit:1,offset:0})));return Object.fromEntries(A.map((O,J)=>[le[J],O.count]))},enabled:b,staleTime:30*1e3}),a=ge({queryKey:["pendingPaperEdits",{status:n,editType:c,visibleLimit:d}],queryFn:()=>vs(n,c,d),enabled:b,retry:!1}),o=N.useMemo(()=>{var g;return Array.from(new Set((((g=a.data)==null?void 0:g.results)??[]).map(A=>A.paper_id).filter(A=>A!=null))).sort((A,O)=>A-O)},[(ue=a.data)==null?void 0:ue.results]),u=Y({queries:o.map(g=>({queryKey:["paper-summary",String(g)],queryFn:()=>De(String(g),!1),enabled:b,staleTime:5*60*1e3}))}),j=N.useMemo(()=>{const g=new Map;return u.forEach(A=>{const O=A.data;if(!O)return;const J=Number(O.id);Number.isFinite(J)&&g.set(J,O)}),g},[u]);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(ys,{});if(!b)return e.jsx(Ns,{});const h=x.data,y=h?h.pending+h.approved+h.rejected:void 0,f={pending:h==null?void 0:h.pending,approved:h==null?void 0:h.approved,rejected:h==null?void 0:h.rejected,all:y},I=((me=a.data)==null?void 0:me.results)??[],Z=((he=a.data)==null?void 0:he.count)??0,Re=I.length<Z;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(Ge,{className:Q((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:fs.map(g=>e.jsxs("button",{type:"button",className:Q("period-btn",n===g&&"active"),onClick:()=>r(g),children:[g,f[g]!=null&&e.jsx("span",{className:"submission-count",children:f[g]})]},g))})]}),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:ps.map(g=>e.jsx("button",{type:"button",className:Q("sort-btn",c===g&&"active"),onClick:()=>l(g),children:V(g)},g))})]})]}),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":`${Z} submissions`})})})}),a.isLoading?e.jsxs("div",{className:"submission-loading",children:[e.jsx(B,{className:"spin",size:18}),e.jsx("span",{children:"Loading submissions..."})]}):I.length===0?e.jsxs("div",{className:"submission-empty",children:[e.jsx(ns,{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:I.map(g=>e.jsx(_s,{submission:g,paper:g.paper_id==null?void 0:j.get(g.paper_id)},g.id))}),I.length>0&&e.jsxs("div",{className:"submission-pagination",children:[e.jsxs("p",{children:["Showing ",I.length," of ",Z," submissions"]}),Re&&e.jsxs("button",{type:"button",className:"feedback-link",onClick:()=>m(g=>g+X),disabled:a.isFetching,children:[a.isFetching&&e.jsx(B,{className:"spin",size:14}),"Load more"]})]})]})]})}export{Os as default};
assets/SubmissionsDashboard-ZmQAIt-P.js DELETED
@@ -1,6 +0,0 @@
1
- var fe=s=>{throw TypeError(s)};var G=(s,t,i)=>t.has(s)||fe("Cannot "+i);var p=(s,t,i)=>(G(s,t,"read from private field"),i?i.call(s):t.get(s)),E=(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),_=(s,t,i,n)=>(G(s,t,"write to private field"),n?n.call(s,i):t.set(s,i),i),C=(s,t,i)=>(G(s,t,"access private method"),i);import{ap as Ae,aq as ee,ar as Oe,as as Me,s as ke,r as $,at as qe,c as Fe,j as e,au as Se,av as Qe,R as N,q as Q,aw as Ie,Z as Ue,f as Le,g as we,ak as De,ax as $e,ay as Te,az as Be,aA as ze,aB as He,aC as se}from"./index-eBKbcCso.js";import{Q as Ee,u as Ke,a as Pe,e as Je,b as We,c as Ve,s as pe,f as Ye,g as Ze}from"./useBaseQuery-CZIeK7IO.js";import{u as ge}from"./useQuery-DIrXGOA7.js";import{u as be}from"./useMutation-CcYjkB_f.js";import{R as Ge,S as Xe,C as es,a as ss}from"./shield-alert-Dga3rK1o.js";import{L as B}from"./loader-circle-Bz-wpQwE.js";function je(s,t){const i=new Set(t);return s.filter(n=>!i.has(n))}function ts(s,t,i){const n=s.slice(0);return n[t]=i,n}var L,S,D,U,w,F,z,H,K,P,v,te,ie,Ce,ne,re,ae,_e,is=(_e=class extends Ae{constructor(t,i,n){super();E(this,v);E(this,L);E(this,S);E(this,D);E(this,U);E(this,w);E(this,F);E(this,z);E(this,H);E(this,K);E(this,P,[]);_(this,L,t),_(this,U,n),_(this,D,[]),_(this,w,[]),_(this,S,[]),this.setQueries(i)}onSubscribe(){this.listeners.size===1&&p(this,w).forEach(t=>{t.subscribe(i=>{C(this,v,re).call(this,t,i)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,p(this,w).forEach(t=>{t.destroy()})}setQueries(t,i){_(this,D,t),_(this,U,i),ee.batch(()=>{const n=p(this,w),r=C(this,v,ne).call(this,p(this,D));r.forEach(a=>a.observer.setOptions(a.defaultedQueryOptions));const c=r.map(a=>a.observer),l=c.map(a=>a.getCurrentResult()),d=n.length!==c.length,m=c.some((a,o)=>a!==n[o]),b=d||m,x=b?!0:l.some((a,o)=>{const u=p(this,S)[o];return!u||!Oe(a,u)});!b&&!x||(b&&(_(this,P,r),_(this,w,c)),_(this,S,l),this.hasListeners()&&(b&&(je(n,c).forEach(a=>{a.destroy()}),je(c,n).forEach(a=>{a.subscribe(o=>{C(this,v,re).call(this,a,o)})})),C(this,v,ae).call(this)))})}getCurrentResult(){return p(this,S)}getQueries(){return p(this,w).map(t=>t.getCurrentQuery())}getObservers(){return p(this,w)}getOptimisticResult(t,i){const n=C(this,v,ne).call(this,t),r=n.map(l=>l.observer.getOptimisticResult(l.defaultedQueryOptions)),c=n.map(l=>l.defaultedQueryOptions.queryHash);return[r,l=>C(this,v,ie).call(this,l??r,i,c),()=>C(this,v,te).call(this,r,n)]}},L=new WeakMap,S=new WeakMap,D=new WeakMap,U=new WeakMap,w=new WeakMap,F=new WeakMap,z=new WeakMap,H=new WeakMap,K=new WeakMap,P=new WeakMap,v=new WeakSet,te=function(t,i){return i.map((n,r)=>{const c=t[r];return n.defaultedQueryOptions.notifyOnChangeProps?c:n.observer.trackResult(c,l=>{i.forEach(d=>{d.observer.trackProp(l)})})})},ie=function(t,i,n){if(i){const r=p(this,K),c=n!==void 0&&r!==void 0&&(r.length!==n.length||n.some((l,d)=>l!==r[d]));return(!p(this,F)||p(this,S)!==p(this,H)||c||i!==p(this,z))&&(_(this,z,i),_(this,H,p(this,S)),n!==void 0&&_(this,K,n),_(this,F,Me(p(this,F),i(t)))),p(this,F)}return t},Ce=function(){var t;return((t=p(this,U))==null?void 0:t.combine)!==void 0&&p(this,w).some((i,n)=>{var r;return i.options.suspense&&((r=p(this,S)[n])==null?void 0:r.data)===void 0})},ne=function(t){const i=new Map;p(this,w).forEach(r=>{const c=r.options.queryHash;if(!c)return;const l=i.get(c);l?l.push(r):i.set(c,[r])});const n=[];return t.forEach(r=>{var m;const c=p(this,L).defaultQueryOptions(r),d=((m=i.get(c.queryHash))==null?void 0:m.shift())??new Ee(p(this,L),c);n.push({defaultedQueryOptions:c,observer:d})}),n},re=function(t,i){const n=p(this,w).indexOf(t);n!==-1&&(_(this,S,ts(p(this,S),n,i)),C(this,v,ae).call(this))},ae=function(){var t;if(this.hasListeners()){const i=C(this,v,te).call(this,p(this,S),p(this,P)),n=C(this,v,Ce).call(this),r=p(this,F),c=n?r:C(this,v,ie).call(this,i,(t=p(this,U))==null?void 0:t.combine);(n||r!==c)&&ee.batch(()=>{this.listeners.forEach(l=>{l(p(this,S))})})}},_e);function Y({queries:s,...t},i){const n=ke(),r=Ke(),c=Pe(),l=$.useMemo(()=>s.map(h=>{const y=n.defaultQueryOptions(h);return y._optimisticResults=r?"isRestoring":"optimistic",y}),[s,n,r]);l.forEach(h=>{Je(h);const y=n.getQueryCache().get(h.queryHash);We(h,c,y)}),Ve(c);const[d]=$.useState(()=>new is(n,l,t)),[m,b,x]=d.getOptimisticResult(l,t.combine),a=!r&&t.subscribed!==!1;$.useSyncExternalStore($.useCallback(h=>a?d.subscribe(ee.batchCalls(h)):qe,[d,a]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),$.useEffect(()=>{d.setQueries(l,t)},[l,t,d]);const u=m.some((h,y)=>pe(l[y],h))?m.flatMap((h,y)=>{const f=l[y];if(f&&pe(f,h)){const I=new Ee(n,f);return Ye(f,I,c)}return[]}):[];if(u.length>0)throw Promise.all(u);const j=m.find((h,y)=>{const f=l[y];return f&&Ze({result:h,errorResetBoundary:c,throwOnError:f.throwOnError,query:n.getQueryCache().get(f.queryHash),suspense:f.suspense})});if(j!=null&&j.error)throw j.error;return b(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 ns=Fe("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"}]]),M=s=>s&&typeof s=="object"&&!Array.isArray(s)?s:{},xe=s=>Array.isArray(s)?s.map(t=>{const i=M(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)):[],W=s=>Array.isArray(s)?s.map(t=>{const i=M(t);return typeof i.url!="string"?null:{url:i.url,is_official:!!i.is_official}}).filter(t=>!!t):[],rs=s=>Array.isArray(s)?s.map(t=>M(t)):[],as=s=>Array.isArray(s)?s.map(t=>M(t)):[],os=s=>s.replace(/_/g," ");function cs({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(o=>o.id),...t])).sort((o,u)=>o-u),[s,t]),c=Y({queries:r.map(o=>({queryKey:[i,String(o)],queryFn:()=>n(String(o)),staleTime:5*60*1e3}))}),l=N.useMemo(()=>{const o=new Map;return s.forEach(u=>o.set(u.id,u.name)),c.forEach(u=>{const j=u.data;if(!j)return;const h=Number(j.id);Number.isFinite(h)&&o.set(h,j.name)}),o},[s,c]),d=new Set(s.map(o=>o.id)),m=new Set(t),b=r.filter(o=>d.has(o)&&!m.has(o)),x=r.filter(o=>!d.has(o)&&m.has(o)),a=(o,u)=>{const j=u==="current"&&b.includes(o),h=u==="proposed"&&x.includes(o);return e.jsx("span",{className:Q("submission-diff-pill",j&&"removed",h&&"added"),children:l.get(o)??`#${o}`},o)};return e.jsxs("div",{className:"submission-diff-columns",children:[e.jsx(R,{title:"Currently tagged",children:s.length>0?s.map(o=>a(o.id,"current")):e.jsx(k,{children:"No current tags"})}),e.jsx(R,{title:"Will be tagged",children:t.length>0?t.map(o=>a(o,"proposed")):e.jsx(k,{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])),c=Array.from(new Set([...n.keys(),...r.keys()])).sort();return c.length===0?e.jsxs(k,{children:["No ",s," in this submission."]}):e.jsx("div",{className:"submission-url-list",children:c.map(l=>{var o;const d=n.get(l),m=r.get(l),b=!d&&m,x=d&&!m,a=d&&m&&d.is_official!==m.is_official;return e.jsx("div",{className:Q("submission-url-row",b&&"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:Q("submission-url-link",x&&"removed"),children:l}),b&&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(d.is_official)," ","->"," ",String(m.is_official)]}),((o=m??d)==null?void 0:o.is_official)&&e.jsx("span",{className:"submission-pill",children:"Official"})]})},l)})})}function ls({currentPayload:s,proposedPayload:t}){const i=rs(M(s).evaluations),n=as(t.operations),r=N.useMemo(()=>{const a=new Set;return i.forEach(o=>{o.task_id&&a.add(Number(o.task_id))}),n.forEach(o=>{const u=o.data;u!=null&&u.task_id&&a.add(Number(u.task_id))}),Array.from(a).filter(o=>Number.isFinite(o))},[i,n]),c=N.useMemo(()=>{const a=new Set;return i.forEach(o=>{o.dataset_id&&a.add(Number(o.dataset_id))}),n.forEach(o=>{const u=o.data;u!=null&&u.dataset_id&&a.add(Number(u.dataset_id))}),Array.from(a).filter(o=>Number.isFinite(o))},[i,n]),l=Y({queries:r.map(a=>({queryKey:["task",String(a)],queryFn:()=>Se(String(a)),staleTime:5*60*1e3}))}),d=Y({queries:c.map(a=>({queryKey:["dataset",String(a)],queryFn:()=>Ie(String(a)),staleTime:5*60*1e3}))}),m=N.useMemo(()=>{const a=new Map;return l.forEach(o=>{const u=o.data;if(!u)return;const j=Number(u.id);Number.isFinite(j)&&a.set(j,u.name)}),a},[l]),b=N.useMemo(()=>{const a=new Map;return d.forEach(o=>{const u=o.data;if(!u)return;const j=Number(u.id);Number.isFinite(j)&&a.set(j,u.name)}),a},[d]),x=new Map(i.filter(a=>a.id!=null).map(a=>[Number(a.id),a]));return n.length===0?e.jsx(k,{children:"No evaluation operations in this payload."}):e.jsx("div",{className:"submission-eval-list",children:n.map((a,o)=>{const u=a.evaluation_id?x.get(a.evaluation_id):void 0,h=(a.op==="update"?{...u,...a.data}:a.data??u)??{};return e.jsxs("div",{className:"submission-eval-op",children:[e.jsxs("div",{className:"submission-eval-op-header",children:[e.jsx("span",{className:Q("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(ds,{evaluation:h,taskNames:m,datasetNames:b}):e.jsx(oe,{title:"Unsupported operation",value:a})]},`${a.op}-${a.evaluation_id??o}`)})})}function ds({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,c=s.metrics??{};return e.jsxs("div",{className:"submission-eval-fields",children:[e.jsx(q,{label:"Task",value:n?t.get(n)??`#${n}`:null}),e.jsx(q,{label:"Dataset",value:r?i.get(r)??`#${r}`:null}),e.jsx(q,{label:"Model",value:s.model_name||null}),e.jsx(q,{label:"Harness",value:s.harness||null}),e.jsx(q,{label:"Best rank",value:s.best_rank??null}),e.jsx(q,{label:"Parameters",value:s.num_parameters??null}),e.jsx(q,{label:"HF model URL",value:s.hf_model_url||null}),e.jsx(q,{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(c).length>0?e.jsx("div",{className:"submission-metric-list",children:Object.entries(c).map(([l,d])=>e.jsxs("span",{className:"submission-metric-pill",children:[l,": ",String(d)]},l))}):e.jsx(k,{children:"No metrics"})]})]})}function q({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 us({currentPayload:s,proposedPayload:t}){const i=M(s).source_url,n=t.source_url;return e.jsxs("div",{className:"submission-diff-columns",children:[e.jsx(R,{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(k,{children:"No current URL"})}),e.jsx(R,{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(k,{children:"No proposed URL"})})]})}function T({kind:s,proposedPayload:t}){const i=typeof t.name=="string"?t.name:"",n=typeof t.description=="string"?t.description:"",r=typeof t.dates=="string"?t.dates:"",c=typeof t.venue=="string"?t.venue:"",l=typeof t.url=="string"?t.url:"",d=M(t.image),m=typeof d.data_url=="string"&&d.data_url.startsWith("data:image/")?d.data_url:"",b=typeof d.url=="string"?Ue(d.url)??"":m,x=typeof d.file_name=="string"?d.file_name:"Suggested image",a=typeof t.image_credit=="string"?t.image_credit:"",o=typeof t.source=="string"?t.source:"";return e.jsxs("div",{className:"submission-diff-columns",children:[e.jsx(R,{title:`Suggested ${s} name`,children:i?e.jsx("span",{className:"submission-diff-pill added",children:i}):e.jsx(k,{children:"No name provided"})}),e.jsx(R,{title:"Description",children:n?e.jsx("span",{className:"submission-field-value",children:n}):e.jsx(k,{children:"No description provided"})}),(s==="task"||s==="method")&&e.jsxs(e.Fragment,{children:[e.jsx(R,{title:"Image",children:b?e.jsx("img",{src:b,alt:x,className:"max-h-64 max-w-full rounded-md border border-border object-contain"}):e.jsx(k,{children:"No image provided"})}),e.jsx(R,{title:"Image source",children:a||e.jsx(k,{children:"No image source provided"})})]}),s==="method"&&e.jsx(R,{title:"Source",children:o?o.startsWith("http://")||o.startsWith("https://")?e.jsx("a",{className:"submission-url-link",href:o,target:"_blank",rel:"noopener noreferrer",children:o}):e.jsx("span",{className:"submission-field-value",children:o}):e.jsx(k,{children:"No source provided"})}),s==="conference"&&e.jsxs(e.Fragment,{children:[e.jsx(R,{title:"Dates",children:r||e.jsx(k,{children:"No dates provided"})}),e.jsx(R,{title:"Venue",children:c||e.jsx(k,{children:"No venue provided"})}),e.jsx(R,{title:"URL",children:l?e.jsx("a",{className:"submission-url-link",href:l,target:"_blank",rel:"noopener noreferrer",children:l}):e.jsx(k,{children:"No URL provided"})})]})]})}function R({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 k({children:s}){return e.jsx("span",{className:"submission-muted",children:s})}function ms({currentPayload:s,proposedPayload:t}){const i=M(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:c})=>{const l=Array.isArray(i[r])?i[r].filter(m=>typeof m=="string"):[],d=Array.isArray(t[r])?t[r].filter(m=>typeof m=="string"):[];return e.jsxs("div",{className:"submission-hf-artifacts-section",children:[e.jsx("div",{className:"submission-diff-label",children:c}),e.jsx(ce,{label:c.toLowerCase(),currentItems:l.map(m=>({url:m,is_official:!1})),proposedItems:d.map(m=>({url:m,is_official:!1}))})]},r)})})}function hs({editType:s,currentPayload:t,proposedPayload:i}){const n=M(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:Qe}):s==="repositories"?r=e.jsx(ce,{label:"repositories",currentItems:W(n.repositories),proposedItems:W(i.repositories)}):s==="project_pages"?r=e.jsx(ce,{label:"project pages",currentItems:W(n.project_pages),proposedItems:W(i.project_pages)}):s==="evaluations"?r=e.jsx(ls,{currentPayload:t,proposedPayload:i}):s==="source_url"?r=e.jsx(us,{currentPayload:t,proposedPayload:i}):s==="hf_artifacts"?r=e.jsx(ms,{currentPayload:t,proposedPayload:i}):s==="new_task"?r=e.jsx(T,{kind:"task",proposedPayload:i}):s==="new_method"?r=e.jsx(T,{kind:"method",proposedPayload:i}):s==="new_benchmark"?r=e.jsx(T,{kind:"benchmark",proposedPayload:i}):s==="new_metric"?r=e.jsx(T,{kind:"metric",proposedPayload:i}):s==="new_conference"?r=e.jsx(T,{kind:"conference",proposedPayload:i}):r=e.jsxs("div",{className:"submission-empty submission-empty-warn",children:["No custom renderer exists yet for ",os(s),"."]}),e.jsxs("div",{className:"submission-diff-body",children:[r,e.jsx(cs,{currentPayload:t,proposedPayload:i})]})}const X=25,fs=["pending","approved","rejected","all"],ps=["all","tasks","methods","evaluations","repositories","project_pages","source_url","new_task","new_method","new_benchmark","new_metric","new_conference"],le=["pending","approved","rejected"];function gs(s){return s.slice(0,2).toUpperCase()}function V(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),c=Math.floor(i/864e5);return n<1?"just now":n<60?`${n}m ago`:r<24?`${r}h ago`:c<14?`${c}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 js(s,t){return(s==null?void 0:s.arxiv_id)||(s==null?void 0:s.id)||String(t)}function xs(s){return[...s].sort((t,i)=>new Date(i.created_at).getTime()-new Date(t.created_at).getTime())}async function vs(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(c=>se({status:c,edit_type:n,limit:i,offset:0})));return{count:r.reduce((c,l)=>c+l.count,0),results:xs(r.flatMap(c=>c.results)).slice(0,i)}}function Ns(){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 ys(){return e.jsx("div",{className:"page",children:e.jsxs("div",{className:"submission-loading",children:[e.jsx(B,{className:"spin",size:18}),e.jsx("span",{children:"Checking admin session..."})]})})}function _s({submission:s,paper:t}){const[i,n]=N.useState(s.admin_note??""),r=ke(),{toast:c}=we(),l=s.paper_id==null,d=l?null:js(t,s.paper_id),m=l?"Taxonomy directory":(t==null?void 0:t.title)||`Paper #${s.paper_id}`,b=`https://huggingface.co/${encodeURIComponent(s.hf_username)}/avatar`,x=s.status==="pending";N.useEffect(()=>{n(s.admin_note??"")},[s.admin_note,s.id]);const a=N.useCallback(f=>{r.invalidateQueries({queryKey:["pendingPaperEdits"]}),r.invalidateQueries({queryKey:["pendingPaperEdit",f.id]}),f.paper_id!=null&&(r.invalidateQueries({queryKey:["paper",String(f.paper_id)]}),r.invalidateQueries({queryKey:["paper-summary",String(f.paper_id)]})),t!=null&&t.arxiv_id&&r.invalidateQueries({queryKey:["paper-arxiv",t.arxiv_id]}),f.edit_type==="evaluations"&&f.paper_id!=null&&r.invalidateQueries({queryKey:["evaluations","paper",String(f.paper_id)]})},[t==null?void 0:t.arxiv_id,r]),o=be({mutationFn:()=>ze(s.id,{admin_note:i.trim()||void 0}),onSuccess:f=>{a(f),c({title:"Submission approved",description:`Applied ${V(s.edit_type)} changes for ${m}.`})},onError:f=>{c({title:"Could not approve submission",description:de(f,"Approval failed. Please try again."),variant:"destructive"})}}),u=be({mutationFn:()=>He(s.id,{admin_note:i.trim()||void 0}),onSuccess:f=>{a(f),c({title:"Submission rejected",description:`Rejected ${V(s.edit_type)} changes for ${m}.`})},onError:f=>{c({title:"Could not reject submission",description:de(f,"Rejection failed. Please try again."),variant:"destructive"})}}),j=o.isPending,h=u.isPending,y=j||h;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:[d?e.jsx("a",{href:`/paper/${encodeURIComponent(d)}`,target:"_blank",rel:"noopener noreferrer",className:"submission-title",children:m}):e.jsx("div",{className:"submission-title",children:m}),e.jsxs("div",{className:"submission-meta",children:[e.jsxs("span",{children:["#",s.id]}),e.jsx("span",{children:l?"Directory suggestion":`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:V(s.edit_type)}),s.is_author&&e.jsx("span",{className:"submission-pill author",children:"Linked author"}),e.jsx("span",{className:Q("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($e,{className:"h-6 w-6",children:[e.jsx(Te,{src:b,alt:s.hf_username}),e.jsx(Be,{className:"text-[10px]",children:gs(s.hf_username)})]}),e.jsxs("span",{children:["@",s.hf_username]})]})]}),e.jsx("div",{className:"submission-diff",children:e.jsx(hs,{editType:s.edit_type,currentPayload:s.current_payload,proposedPayload:s.proposed_payload})}),e.jsx("footer",{className:"submission-actions",children:x?e.jsxs(e.Fragment,{children:[e.jsx("textarea",{value:i,onChange:f=>n(f.target.value),placeholder:"Optional admin note",className:"submission-note",disabled:y}),e.jsxs("div",{className:"submission-action-buttons",children:[e.jsxs("button",{type:"button",onClick:()=>u.mutate(),disabled:y,className:"submission-action-btn reject",children:[h?e.jsx(B,{className:"spin",size:14}):e.jsx(es,{size:14}),"Reject"]}),e.jsxs("button",{type:"button",onClick:()=>o.mutate(),disabled:y,className:"submission-action-btn approve",children:[j?e.jsx(B,{className:"spin",size:14}):e.jsx(ss,{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 Os(){var ue,me,he;const{user:s,isLoading:t}=Le(),{toast:i}=we(),[n,r]=N.useState("pending"),[c,l]=N.useState("all"),[d,m]=N.useState(X),b=!!(s!=null&&s.is_admin);N.useEffect(()=>{m(X)},[n,c]);const x=ge({queryKey:["pendingPaperEdits","counts",c],queryFn:async()=>{const g=c==="all"?void 0:c,A=await Promise.all(le.map(O=>se({status:O,edit_type:g,limit:1,offset:0})));return Object.fromEntries(A.map((O,J)=>[le[J],O.count]))},enabled:b,staleTime:30*1e3}),a=ge({queryKey:["pendingPaperEdits",{status:n,editType:c,visibleLimit:d}],queryFn:()=>vs(n,c,d),enabled:b,retry:!1}),o=N.useMemo(()=>{var g;return Array.from(new Set((((g=a.data)==null?void 0:g.results)??[]).map(A=>A.paper_id).filter(A=>A!=null))).sort((A,O)=>A-O)},[(ue=a.data)==null?void 0:ue.results]),u=Y({queries:o.map(g=>({queryKey:["paper-summary",String(g)],queryFn:()=>De(String(g),!1),enabled:b,staleTime:5*60*1e3}))}),j=N.useMemo(()=>{const g=new Map;return u.forEach(A=>{const O=A.data;if(!O)return;const J=Number(O.id);Number.isFinite(J)&&g.set(J,O)}),g},[u]);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(ys,{});if(!b)return e.jsx(Ns,{});const h=x.data,y=h?h.pending+h.approved+h.rejected:void 0,f={pending:h==null?void 0:h.pending,approved:h==null?void 0:h.approved,rejected:h==null?void 0:h.rejected,all:y},I=((me=a.data)==null?void 0:me.results)??[],Z=((he=a.data)==null?void 0:he.count)??0,Re=I.length<Z;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(Ge,{className:Q((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:fs.map(g=>e.jsxs("button",{type:"button",className:Q("period-btn",n===g&&"active"),onClick:()=>r(g),children:[g,f[g]!=null&&e.jsx("span",{className:"submission-count",children:f[g]})]},g))})]}),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:ps.map(g=>e.jsx("button",{type:"button",className:Q("sort-btn",c===g&&"active"),onClick:()=>l(g),children:V(g)},g))})]})]}),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":`${Z} submissions`})})})}),a.isLoading?e.jsxs("div",{className:"submission-loading",children:[e.jsx(B,{className:"spin",size:18}),e.jsx("span",{children:"Loading submissions..."})]}):I.length===0?e.jsxs("div",{className:"submission-empty",children:[e.jsx(ns,{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:I.map(g=>e.jsx(_s,{submission:g,paper:g.paper_id==null?void 0:j.get(g.paper_id)},g.id))}),I.length>0&&e.jsxs("div",{className:"submission-pagination",children:[e.jsxs("p",{children:["Showing ",I.length," of ",Z," submissions"]}),Re&&e.jsxs("button",{type:"button",className:"feedback-link",onClick:()=>m(g=>g+X),disabled:a.isFetching,children:[a.isFetching&&e.jsx(B,{className:"spin",size:14}),"Load more"]})]})]})]})}export{Os as default};
 
 
 
 
 
 
 
assets/{SubmitView-BBHau2HD.js → SubmitView-rBMOkIq3.js} RENAMED
@@ -1 +1 @@
1
- import{u as R,s as T,g as _,R as n,j as e,ao as D}from"./index-eBKbcCso.js";import{u as k}from"./useMutation-CcYjkB_f.js";import{A as w,a as C}from"./alert-BCeSLEYS.js";import{B as j}from"./button-DR_Fc3Hk.js";import{I as h,T as z}from"./textarea-DC0tTufA.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};
 
1
+ import{u as R,s as T,g as _,R as n,j as e,ao as D}from"./index-B2CsYqS1.js";import{u as k}from"./useMutation-D-leEq6C.js";import{A as w,a as C}from"./alert-B5Pni1K6.js";import{B as j}from"./button-Oqi1rHf_.js";import{I as h,T as z}from"./textarea-ccgKicZU.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-DZGSQG0I.js → TagBrowseView-DtRgDRtT.js} RENAMED
@@ -1,4 +1,4 @@
1
- import{c as je,r as h,l as Y,j as e,k as B,a0 as _e,n as ve,P as Xe,p as Ne,m as ke,a1 as es,R as _,a2 as ss,K as as,q as J,e as ts,u as ns,a as rs,T as os,L as P,Z as cs,b as ge}from"./index-eBKbcCso.js";import{u as be}from"./useQuery-DIrXGOA7.js";import{P as is,M as ls}from"./components-D8Z2f6Zw.js";import{B as ds}from"./BenchmarkTrendSparkline-BaFH-Xk5.js";import{P as ps}from"./PaperFeedFilters-vnoti5eB.js";import{M as W}from"./MarkdownText-B_dvaNfN.js";import{t as ms,d as V}from"./transform-DM1_5UAz.js";import{b as hs}from"./usePapers-B09ZSLzW.js";import{u as us}from"./useIntersectionObserver-BjpbHbpf.js";import{S as K}from"./skeleton-Cd-jfjiE.js";import{A as xs,a as gs}from"./alert-BCeSLEYS.js";import{C as bs}from"./chevron-down-Com83sGm.js";import{G as fe}from"./github-CiEpogIF.js";import"./useBaseQuery-CZIeK7IO.js";import"./LatexTitle-CqLY2qFp.js";import"./katex.min-BSBacQyE.js";import"./PaperPreviewLink-BrlkKB05.js";import"./index-LmPbjihc.js";import"./hover-card-CdeSv7Gc.js";import"./useInfiniteQuery-PtHXMuOU.js";/**
2
  * @license lucide-react v0.462.0 - ISC
3
  *
4
  * This source code is licensed under the ISC license.
 
1
+ import{c as je,r as h,l as Y,j as e,k as B,a0 as _e,n as ve,P as Xe,p as Ne,m as ke,a1 as es,R as _,a2 as ss,K as as,q as J,e as ts,u as ns,a as rs,T as os,L as P,Z as cs,b as ge}from"./index-B2CsYqS1.js";import{u as be}from"./useQuery-D09nn2D4.js";import{P as is,M as ls}from"./components-Dt_hKhor.js";import{B as ds}from"./BenchmarkTrendSparkline-CemWtN8L.js";import{P as ps}from"./PaperFeedFilters-DC6dQXvU.js";import{M as W}from"./MarkdownText-CnXxe_CG.js";import{t as ms,d as V}from"./transform-Csq86xeP.js";import{b as hs}from"./usePapers-BUvi-1N_.js";import{u as us}from"./useIntersectionObserver-BEQRRw3B.js";import{S as K}from"./skeleton-EzEzG6PT.js";import{A as xs,a as gs}from"./alert-B5Pni1K6.js";import{C as bs}from"./chevron-down-CzkIrRvq.js";import{G as fe}from"./github-Bdgb1LGh.js";import"./useBaseQuery-DCY5lvEf.js";import"./LatexTitle-DhaqzMPt.js";import"./katex.min-BSBacQyE.js";import"./PaperPreviewLink-DyP6osoH.js";import"./index-6E7p68ra.js";import"./hover-card-DfDU2jCA.js";import"./useInfiniteQuery-gjnIRn2t.js";/**
2
  * @license lucide-react v0.462.0 - ISC
3
  *
4
  * This source code is licensed under the ISC license.
assets/{TagsIndexView-bSwqRVl_.js → TagsIndexView-BUE8Nu6n.js} RENAMED
@@ -1 +1 @@
1
- import{r as d,j as e,L as p,b as h}from"./index-eBKbcCso.js";import{u as g}from"./useQuery-DIrXGOA7.js";import{e as x,h as f,d as u}from"./transform-DM1_5UAz.js";import{S as m}from"./skeleton-Cd-jfjiE.js";import{A as j,a as y}from"./alert-BCeSLEYS.js";import{T as k}from"./TaxonomySuggestionTile-DEtB0B70.js";import"./useBaseQuery-CZIeK7IO.js";import"./SignInToEditDialog-eRf-3xm2.js";import"./button-DR_Fc3Hk.js";import"./textarea-DC0tTufA.js";import"./dialog-DhCB6EKj.js";import"./useMutation-CcYjkB_f.js";import"./loader-circle-Bz-wpQwE.js";const v=r=>(r==null?void 0:r.trim().toLowerCase().replace(/[\s_]+/g,"-"))??"",E=()=>{const r=g({queryKey:["areas-with-tasks"],queryFn:()=>h.getAreasWithTasks(),staleTime:6e5}),o=d.useMemo(()=>{if(!r.data)return[];const s={general:0,vision:1,video:2,language:3,audio:4,other:5},t=n=>s[v(n)]??999;return[...r.data.results].sort((n,a)=>{const i=t(n.name),l=t(a.name);return i!==l?i-l:n.name.localeCompare(a.name)})},[r.data]),c=d.useMemo(()=>o.reduce((s,t)=>s+t.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,t)=>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,a)=>e.jsx(m,{className:"h-24"},a))})]},t))}):o.map(s=>{const t=s.tasks;if(t.length===0)return null;const n=t.reduce((a,i)=>a+(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:[t.length," ",t.length===1?"task":"tasks"," · ",n.toLocaleString()," papers"]})]}),e.jsxs("div",{className:"tag-grid",children:[t.map(a=>{const i=a.slug||"",l=x(f(i));return e.jsxs(p,{to:`/tasks/${i}`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:l.dot}}),u(a.name,i)]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[(a.paper_count??0).toLocaleString()," papers"]})})]},a.id)}),e.jsx(k,{kind:"task"})]})]},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{E as default};
 
1
+ import{r as d,j as e,L as p,b as h}from"./index-B2CsYqS1.js";import{u as g}from"./useQuery-D09nn2D4.js";import{e as x,h as f,d as u}from"./transform-Csq86xeP.js";import{S as m}from"./skeleton-EzEzG6PT.js";import{A as j,a as y}from"./alert-B5Pni1K6.js";import{T as k}from"./TaxonomySuggestionTile-CvtfLtQL.js";import"./useBaseQuery-DCY5lvEf.js";import"./SignInToEditDialog-CAja351o.js";import"./button-Oqi1rHf_.js";import"./textarea-ccgKicZU.js";import"./dialog-KRtMu_IA.js";import"./useMutation-D-leEq6C.js";import"./loader-circle-CNbkR79_.js";const v=r=>(r==null?void 0:r.trim().toLowerCase().replace(/[\s_]+/g,"-"))??"",E=()=>{const r=g({queryKey:["areas-with-tasks"],queryFn:()=>h.getAreasWithTasks(),staleTime:6e5}),o=d.useMemo(()=>{if(!r.data)return[];const s={general:0,vision:1,video:2,language:3,audio:4,other:5},t=n=>s[v(n)]??999;return[...r.data.results].sort((n,a)=>{const i=t(n.name),l=t(a.name);return i!==l?i-l:n.name.localeCompare(a.name)})},[r.data]),c=d.useMemo(()=>o.reduce((s,t)=>s+t.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,t)=>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,a)=>e.jsx(m,{className:"h-24"},a))})]},t))}):o.map(s=>{const t=s.tasks;if(t.length===0)return null;const n=t.reduce((a,i)=>a+(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:[t.length," ",t.length===1?"task":"tasks"," · ",n.toLocaleString()," papers"]})]}),e.jsxs("div",{className:"tag-grid",children:[t.map(a=>{const i=a.slug||"",l=x(f(i));return e.jsxs(p,{to:`/tasks/${i}`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:l.dot}}),u(a.name,i)]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[(a.paper_count??0).toLocaleString()," papers"]})})]},a.id)}),e.jsx(k,{kind:"task"})]})]},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{E as default};
assets/{TaxonomySuggestionTile-DEtB0B70.js → TaxonomySuggestionTile-CvtfLtQL.js} RENAMED
@@ -1 +1 @@
1
- import{f as u,r as o,j as e}from"./index-eBKbcCso.js";import{P as c,S as m,a as p}from"./SignInToEditDialog-eRf-3xm2.js";function h({kind:s}){const{user:a}=u(),[i,n]=o.useState(!1),[l,t]=o.useState(!1),r=`Suggest a new ${s}...`,g=()=>{a?n(!0):t(!0)};return e.jsxs(e.Fragment,{children:[e.jsxs("button",{type:"button",className:"tag-cell taxonomy-suggestion-cell",onClick:g,children:[e.jsxs("div",{className:"name",children:[e.jsx(c,{className:"taxonomy-suggestion-icon","aria-hidden":"true"}),r]}),e.jsx("div",{className:"meta",children:e.jsx("span",{children:"Propose an addition"})})]}),e.jsx(m,{open:i,onOpenChange:n,kind:s}),e.jsx(p,{open:l,onOpenChange:t,sectionLabel:`${s}s`,returnTo:typeof window<"u"?window.location.pathname:`/${s}s`,taxonomySuggestion:!0})]})}export{h as T};
 
1
+ import{f as u,r as o,j as e}from"./index-B2CsYqS1.js";import{P as c,S as m,a as p}from"./SignInToEditDialog-CAja351o.js";function h({kind:s}){const{user:a}=u(),[i,n]=o.useState(!1),[l,t]=o.useState(!1),r=`Suggest a new ${s}...`,g=()=>{a?n(!0):t(!0)};return e.jsxs(e.Fragment,{children:[e.jsxs("button",{type:"button",className:"tag-cell taxonomy-suggestion-cell",onClick:g,children:[e.jsxs("div",{className:"name",children:[e.jsx(c,{className:"taxonomy-suggestion-icon","aria-hidden":"true"}),r]}),e.jsx("div",{className:"meta",children:e.jsx("span",{children:"Propose an addition"})})]}),e.jsx(m,{open:i,onOpenChange:n,kind:s}),e.jsx(p,{open:l,onOpenChange:t,sectionLabel:`${s}s`,returnTo:typeof window<"u"?window.location.pathname:`/${s}s`,taxonomySuggestion:!0})]})}export{h as T};
assets/{TrendsView-Hknym7NC.js → TrendsView-P28q3Sbj.js} RENAMED
@@ -1 +1 @@
1
- import{b as X,R as G,j as e}from"./index-eBKbcCso.js";import{u as J}from"./useQuery-DIrXGOA7.js";import{A as q,a as E}from"./alert-BCeSLEYS.js";import{S as P}from"./skeleton-Cd-jfjiE.js";import"./useBaseQuery-CZIeK7IO.js";const m=t=>{const i=/^(\d{4})-(0[1-9]|1[0-2])$/.exec(t);if(!i)return t;const[,r,l]=i;return`${["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][Number(l)-1]} '${r.slice(2)}`},Q=()=>X.getResearchTrends(),f=980,j=400,x=62,R=26,g=30,V=58,u=f-x-R,F=j-g-V,v=g+F,Y=t=>{if(t.length<3)return t.map((r,l)=>`${l?"L":"M"}${r[0]} ${r[1]}`).join(" ");let i=`M${t[0][0]} ${t[0][1]}`;for(let r=0;r<t.length-1;r+=1){const l=t[r-1]??t[r],c=t[r],o=t[r+1],a=t[r+2]??o,y=c[0]+(o[0]-l[0])/6,s=c[1]+(o[1]-l[1])/6,b=o[0]-(a[0]-c[0])/6,d=o[1]-(a[1]-c[1])/6;i+=` C ${y} ${s} ${b} ${d} ${o[0]} ${o[1]}`}return i},W={fontFamily:"var(--mono)",fontSize:12,fill:"var(--ink-faint)"},z={fontFamily:"var(--mono)",fontSize:11,fontWeight:600,letterSpacing:"0.14em",fill:"var(--ink-faint)",textTransform:"uppercase"},C=({id:t,data:i,color:r,yTicks:l,yLabel:c,xLabel:o})=>{const[a,y]=G.useState(null),s=i.length,b=l[l.length-1],d=n=>x+u*(s===1?0:n/(s-1)),p=n=>g+F*(1-n/b);if(s===0)return null;const B=i.map((n,h)=>[d(h),p(n.percent)]),A=Y(B),_=`${A} L ${d(s-1)} ${v} L ${x} ${v} Z`,w=s<=12?1:Math.ceil(s/8),O=n=>{const h=n.currentTarget.getBoundingClientRect(),S=(n.clientX-h.left)/h.width*f,k=s>1?u/(s-1):u,I=Math.max(0,Math.min(s-1,Math.round((S-x)/k)));y(I)},H=`trend-gradient-${t}`;return e.jsxs("figure",{className:"trend-chart",children:[e.jsxs("div",{className:"trend-chart-visual",children:[e.jsxs("svg",{viewBox:`0 0 ${f} ${j}`,width:"100%",role:"img","aria-label":`${c} by ${o.toLowerCase()}, from ${m(i[0].month)} (${i[0].percent}%) to ${m(i[s-1].month)} (${i[s-1].percent}%)`,style:{display:"block",overflow:"visible",cursor:"crosshair"},onPointerMove:O,onPointerLeave:()=>y(null),children:[e.jsx("defs",{children:e.jsxs("linearGradient",{id:H,x1:"0",y1:"0",x2:"0",y2:"1",children:[e.jsx("stop",{offset:"0%",style:{stopColor:r,stopOpacity:.26}}),e.jsx("stop",{offset:"100%",style:{stopColor:r,stopOpacity:.02}})]})}),l.map(n=>e.jsxs("g",{children:[e.jsx("line",{x1:x,x2:f-R,y1:p(n),y2:p(n),stroke:"var(--hairline)",strokeWidth:1}),e.jsxs("text",{x:x-14,y:p(n)+4,textAnchor:"end",style:W,children:[n,"%"]})]},n)),e.jsx("path",{d:_,fill:`url(#${H})`}),e.jsx("path",{d:A,fill:"none",stroke:r,strokeWidth:2,strokeLinejoin:"round",strokeLinecap:"round"}),i.map((n,h)=>{const S=h===s-1,k=h%w===0&&s-1-h>=w/2;return!S&&!k?null:e.jsx("text",{x:d(h),y:v+24,textAnchor:"middle",style:W,children:m(n.month)},n.month)}),e.jsx("text",{x:x+u/2,y:j-4,textAnchor:"middle",style:z,children:o}),e.jsx("text",{transform:`translate(16 ${g+F/2}) rotate(-90)`,textAnchor:"middle",style:z,children:c}),a!=null&&e.jsxs(e.Fragment,{children:[e.jsx("line",{x1:d(a),x2:d(a),y1:g,y2:v,stroke:r,strokeWidth:1,strokeDasharray:"3 4",opacity:.5}),e.jsx("circle",{cx:d(a),cy:p(i[a].percent),r:5,fill:"var(--bg)",stroke:r,strokeWidth:2})]})]}),a!=null&&e.jsxs("div",{style:{position:"absolute",left:`${d(a)/f*100}%`,top:`${p(i[a].percent)/j*100}%`,transform:"translate(-50%, calc(-100% - 14px))",background:"var(--bg-elevated)",border:"1px solid var(--hairline)",borderRadius:6,boxShadow:"0 8px 26px rgba(0,0,0,.13)",padding:"7px 12px",pointerEvents:"none",whiteSpace:"nowrap",zIndex:3},children:[e.jsx("div",{style:{fontFamily:"var(--serif)",fontStyle:"italic",color:"var(--ink-faint)",fontSize:13,marginBottom:2},children:m(i[a].month)}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:7,fontFamily:"var(--mono)",fontWeight:600,fontSize:15,color:"var(--ink)"},children:[e.jsx("span",{style:{width:8,height:8,borderRadius:2,background:r,display:"inline-block"}}),i[a].percent,"%"]})]})]}),e.jsxs("details",{className:"trend-chart-table",children:[e.jsx("summary",{style:{fontFamily:"var(--mono)",fontSize:11,letterSpacing:"0.04em",color:"var(--ink-faint)",cursor:"pointer"},children:"View data table"}),e.jsxs("table",{style:{marginTop:8,borderCollapse:"collapse",fontFamily:"var(--mono)",fontSize:12,color:"var(--ink-soft)"},children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{style:{textAlign:"left",padding:"3px 18px 3px 0"},children:o}),e.jsx("th",{style:{textAlign:"right",padding:"3px 0"},children:c})]})}),e.jsx("tbody",{children:i.map(n=>e.jsxs("tr",{children:[e.jsx("td",{style:{padding:"2px 18px 2px 0"},children:m(n.month)}),e.jsxs("td",{style:{textAlign:"right",padding:"2px 0"},children:[n.percent,"%"]})]},n.month))})]})]})]})},$={maxWidth:960,padding:"48px 0 8px",borderTop:"1px solid var(--hairline)",marginTop:48},T={fontFamily:"var(--serif)",fontSize:34,fontWeight:500,letterSpacing:"-0.02em",margin:"0 0 10px",color:"var(--ink)"},L={fontFamily:"var(--serif)",fontSize:18,lineHeight:1.55,color:"var(--ink-soft)",maxWidth:620,margin:"0 0 8px"},M={fontFamily:"var(--mono)",fontSize:12,fontWeight:600,letterSpacing:"0.14em",textTransform:"uppercase",color:"var(--ink-faint)",marginBottom:8},N={fontFamily:"var(--serif)",fontSize:17,lineHeight:1.6,color:"var(--ink-soft)",margin:0},D={height:320,marginTop:26},ne=()=>{const t=J({queryKey:["research-trends"],queryFn:Q,staleTime:36e5});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:["Research ",e.jsx("em",{children:"Trends"})]}),e.jsx("div",{className:"feed-subtitle",children:"How open science is changing across machine learning — tracked over time from arXiv and the Hugging Face Hub."})]})}),t.error&&e.jsx(q,{variant:"destructive",children:e.jsx(E,{children:"Failed to load research trends. Please try again."})}),e.jsxs("section",{style:$,children:[e.jsx("h2",{style:T,children:"Code Availability"}),e.jsx("p",{style:L,children:"The percentage of published papers that have at least one official code implementation on GitHub."}),e.jsx("div",{style:{marginTop:26},children:t.data?e.jsx(C,{id:"code",data:t.data.code_availability,color:"var(--trend-code)",yTicks:[0,20,40,60,80],yLabel:"Code Availability",xLabel:"Paper Publication Date"}):!t.error&&e.jsx(P,{style:D})})]}),e.jsxs("section",{style:$,children:[e.jsx("h2",{style:T,children:"Papers with Hugging Face artifacts"}),e.jsx("p",{style:L,children:"The percentage of published papers linked to at least one Hugging Face artifact — a model, dataset or Space — making the work directly runnable and reusable."}),e.jsx("div",{style:{marginTop:26},children:t.data?e.jsx(C,{id:"hf",data:t.data.hf_artifacts,color:"var(--trend-hf)",yTicks:[0,10,20,30,40,50],yLabel:"HF Artifact Coverage",xLabel:"Paper Publication Date"}):!t.error&&e.jsx(P,{style:D})})]}),e.jsxs("section",{style:{...$,paddingBottom:72},children:[e.jsx("h2",{style:{...T,fontSize:27},children:"How the data is collected"}),e.jsxs("div",{style:{display:"grid",gap:24,maxWidth:680},children:[e.jsxs("div",{children:[e.jsx("div",{style:M,children:"Code Availability"}),e.jsx("p",{style:N,children:"For every open-access machine learning paper, we check whether an official code implementation is linked on GitHub. The date axis is the paper's publication date."})]}),e.jsxs("div",{children:[e.jsx("div",{style:M,children:"Hugging Face artifacts"}),e.jsx("p",{style:N,children:"We resolve links between papers and the Hugging Face Hub, counting a paper as covered when it references at least one model, dataset or Space. The date axis is the paper's publication date."})]}),e.jsx("p",{style:{fontFamily:"var(--mono)",fontSize:12,lineHeight:1.6,color:"var(--ink-faint)",margin:"8px 0 0",letterSpacing:"0.02em"},children:"Figures use complete publication months. Historical Hugging Face coverage reflects artifacts currently linked in the catalog."})]})]})]})};export{ne as default};
 
1
+ import{b as X,R as G,j as e}from"./index-B2CsYqS1.js";import{u as J}from"./useQuery-D09nn2D4.js";import{A as q,a as E}from"./alert-B5Pni1K6.js";import{S as P}from"./skeleton-EzEzG6PT.js";import"./useBaseQuery-DCY5lvEf.js";const m=t=>{const i=/^(\d{4})-(0[1-9]|1[0-2])$/.exec(t);if(!i)return t;const[,r,l]=i;return`${["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][Number(l)-1]} '${r.slice(2)}`},Q=()=>X.getResearchTrends(),f=980,j=400,x=62,R=26,g=30,V=58,u=f-x-R,F=j-g-V,v=g+F,Y=t=>{if(t.length<3)return t.map((r,l)=>`${l?"L":"M"}${r[0]} ${r[1]}`).join(" ");let i=`M${t[0][0]} ${t[0][1]}`;for(let r=0;r<t.length-1;r+=1){const l=t[r-1]??t[r],c=t[r],o=t[r+1],a=t[r+2]??o,y=c[0]+(o[0]-l[0])/6,s=c[1]+(o[1]-l[1])/6,b=o[0]-(a[0]-c[0])/6,d=o[1]-(a[1]-c[1])/6;i+=` C ${y} ${s} ${b} ${d} ${o[0]} ${o[1]}`}return i},W={fontFamily:"var(--mono)",fontSize:12,fill:"var(--ink-faint)"},z={fontFamily:"var(--mono)",fontSize:11,fontWeight:600,letterSpacing:"0.14em",fill:"var(--ink-faint)",textTransform:"uppercase"},C=({id:t,data:i,color:r,yTicks:l,yLabel:c,xLabel:o})=>{const[a,y]=G.useState(null),s=i.length,b=l[l.length-1],d=n=>x+u*(s===1?0:n/(s-1)),p=n=>g+F*(1-n/b);if(s===0)return null;const B=i.map((n,h)=>[d(h),p(n.percent)]),A=Y(B),_=`${A} L ${d(s-1)} ${v} L ${x} ${v} Z`,w=s<=12?1:Math.ceil(s/8),O=n=>{const h=n.currentTarget.getBoundingClientRect(),S=(n.clientX-h.left)/h.width*f,k=s>1?u/(s-1):u,I=Math.max(0,Math.min(s-1,Math.round((S-x)/k)));y(I)},H=`trend-gradient-${t}`;return e.jsxs("figure",{className:"trend-chart",children:[e.jsxs("div",{className:"trend-chart-visual",children:[e.jsxs("svg",{viewBox:`0 0 ${f} ${j}`,width:"100%",role:"img","aria-label":`${c} by ${o.toLowerCase()}, from ${m(i[0].month)} (${i[0].percent}%) to ${m(i[s-1].month)} (${i[s-1].percent}%)`,style:{display:"block",overflow:"visible",cursor:"crosshair"},onPointerMove:O,onPointerLeave:()=>y(null),children:[e.jsx("defs",{children:e.jsxs("linearGradient",{id:H,x1:"0",y1:"0",x2:"0",y2:"1",children:[e.jsx("stop",{offset:"0%",style:{stopColor:r,stopOpacity:.26}}),e.jsx("stop",{offset:"100%",style:{stopColor:r,stopOpacity:.02}})]})}),l.map(n=>e.jsxs("g",{children:[e.jsx("line",{x1:x,x2:f-R,y1:p(n),y2:p(n),stroke:"var(--hairline)",strokeWidth:1}),e.jsxs("text",{x:x-14,y:p(n)+4,textAnchor:"end",style:W,children:[n,"%"]})]},n)),e.jsx("path",{d:_,fill:`url(#${H})`}),e.jsx("path",{d:A,fill:"none",stroke:r,strokeWidth:2,strokeLinejoin:"round",strokeLinecap:"round"}),i.map((n,h)=>{const S=h===s-1,k=h%w===0&&s-1-h>=w/2;return!S&&!k?null:e.jsx("text",{x:d(h),y:v+24,textAnchor:"middle",style:W,children:m(n.month)},n.month)}),e.jsx("text",{x:x+u/2,y:j-4,textAnchor:"middle",style:z,children:o}),e.jsx("text",{transform:`translate(16 ${g+F/2}) rotate(-90)`,textAnchor:"middle",style:z,children:c}),a!=null&&e.jsxs(e.Fragment,{children:[e.jsx("line",{x1:d(a),x2:d(a),y1:g,y2:v,stroke:r,strokeWidth:1,strokeDasharray:"3 4",opacity:.5}),e.jsx("circle",{cx:d(a),cy:p(i[a].percent),r:5,fill:"var(--bg)",stroke:r,strokeWidth:2})]})]}),a!=null&&e.jsxs("div",{style:{position:"absolute",left:`${d(a)/f*100}%`,top:`${p(i[a].percent)/j*100}%`,transform:"translate(-50%, calc(-100% - 14px))",background:"var(--bg-elevated)",border:"1px solid var(--hairline)",borderRadius:6,boxShadow:"0 8px 26px rgba(0,0,0,.13)",padding:"7px 12px",pointerEvents:"none",whiteSpace:"nowrap",zIndex:3},children:[e.jsx("div",{style:{fontFamily:"var(--serif)",fontStyle:"italic",color:"var(--ink-faint)",fontSize:13,marginBottom:2},children:m(i[a].month)}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:7,fontFamily:"var(--mono)",fontWeight:600,fontSize:15,color:"var(--ink)"},children:[e.jsx("span",{style:{width:8,height:8,borderRadius:2,background:r,display:"inline-block"}}),i[a].percent,"%"]})]})]}),e.jsxs("details",{className:"trend-chart-table",children:[e.jsx("summary",{style:{fontFamily:"var(--mono)",fontSize:11,letterSpacing:"0.04em",color:"var(--ink-faint)",cursor:"pointer"},children:"View data table"}),e.jsxs("table",{style:{marginTop:8,borderCollapse:"collapse",fontFamily:"var(--mono)",fontSize:12,color:"var(--ink-soft)"},children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{style:{textAlign:"left",padding:"3px 18px 3px 0"},children:o}),e.jsx("th",{style:{textAlign:"right",padding:"3px 0"},children:c})]})}),e.jsx("tbody",{children:i.map(n=>e.jsxs("tr",{children:[e.jsx("td",{style:{padding:"2px 18px 2px 0"},children:m(n.month)}),e.jsxs("td",{style:{textAlign:"right",padding:"2px 0"},children:[n.percent,"%"]})]},n.month))})]})]})]})},$={maxWidth:960,padding:"48px 0 8px",borderTop:"1px solid var(--hairline)",marginTop:48},T={fontFamily:"var(--serif)",fontSize:34,fontWeight:500,letterSpacing:"-0.02em",margin:"0 0 10px",color:"var(--ink)"},L={fontFamily:"var(--serif)",fontSize:18,lineHeight:1.55,color:"var(--ink-soft)",maxWidth:620,margin:"0 0 8px"},M={fontFamily:"var(--mono)",fontSize:12,fontWeight:600,letterSpacing:"0.14em",textTransform:"uppercase",color:"var(--ink-faint)",marginBottom:8},N={fontFamily:"var(--serif)",fontSize:17,lineHeight:1.6,color:"var(--ink-soft)",margin:0},D={height:320,marginTop:26},ne=()=>{const t=J({queryKey:["research-trends"],queryFn:Q,staleTime:36e5});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:["Research ",e.jsx("em",{children:"Trends"})]}),e.jsx("div",{className:"feed-subtitle",children:"How open science is changing across machine learning — tracked over time from arXiv and the Hugging Face Hub."})]})}),t.error&&e.jsx(q,{variant:"destructive",children:e.jsx(E,{children:"Failed to load research trends. Please try again."})}),e.jsxs("section",{style:$,children:[e.jsx("h2",{style:T,children:"Code Availability"}),e.jsx("p",{style:L,children:"The percentage of published papers that have at least one official code implementation on GitHub."}),e.jsx("div",{style:{marginTop:26},children:t.data?e.jsx(C,{id:"code",data:t.data.code_availability,color:"var(--trend-code)",yTicks:[0,20,40,60,80],yLabel:"Code Availability",xLabel:"Paper Publication Date"}):!t.error&&e.jsx(P,{style:D})})]}),e.jsxs("section",{style:$,children:[e.jsx("h2",{style:T,children:"Papers with Hugging Face artifacts"}),e.jsx("p",{style:L,children:"The percentage of published papers linked to at least one Hugging Face artifact — a model, dataset or Space — making the work directly runnable and reusable."}),e.jsx("div",{style:{marginTop:26},children:t.data?e.jsx(C,{id:"hf",data:t.data.hf_artifacts,color:"var(--trend-hf)",yTicks:[0,10,20,30,40,50],yLabel:"HF Artifact Coverage",xLabel:"Paper Publication Date"}):!t.error&&e.jsx(P,{style:D})})]}),e.jsxs("section",{style:{...$,paddingBottom:72},children:[e.jsx("h2",{style:{...T,fontSize:27},children:"How the data is collected"}),e.jsxs("div",{style:{display:"grid",gap:24,maxWidth:680},children:[e.jsxs("div",{children:[e.jsx("div",{style:M,children:"Code Availability"}),e.jsx("p",{style:N,children:"For every open-access machine learning paper, we check whether an official code implementation is linked on GitHub. The date axis is the paper's publication date."})]}),e.jsxs("div",{children:[e.jsx("div",{style:M,children:"Hugging Face artifacts"}),e.jsx("p",{style:N,children:"We resolve links between papers and the Hugging Face Hub, counting a paper as covered when it references at least one model, dataset or Space. The date axis is the paper's publication date."})]}),e.jsx("p",{style:{fontFamily:"var(--mono)",fontSize:12,lineHeight:1.6,color:"var(--ink-faint)",margin:"8px 0 0",letterSpacing:"0.02em"},children:"Figures use complete publication months. Historical Hugging Face coverage reflects artifacts currently linked in the catalog."})]})]})]})};export{ne as default};
assets/{alert-BCeSLEYS.js → alert-B5Pni1K6.js} RENAMED
@@ -1 +1 @@
1
- import{r as a,j as s,q as l,a4 as i}from"./index-eBKbcCso.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,a4 as i}from"./index-B2CsYqS1.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};
assets/{button-DR_Fc3Hk.js → button-Oqi1rHf_.js} RENAMED
@@ -1 +1 @@
1
- import{r as a,j as d,aI as u,q as c,a4 as f}from"./index-eBKbcCso.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,aI as u,q as c,a4 as f}from"./index-B2CsYqS1.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-L9GbPmnt.js → chatSessions-Roa-dbFO.js} RENAMED
@@ -1 +1 @@
1
- import{j as o,d as p}from"./index-eBKbcCso.js";const x=({light:t})=>o.jsx("span",{className:`chat-spinner${t?" chat-spinner-light":""}`}),w=({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"})}),S=()=>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"})]}),j=({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"})]}),_=()=>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"})}),y=()=>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"})]}),T=()=>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"})}),M=({models:t,selectedModel:s,onModelChange:r,disabled:e})=>{var c;const n=((c=t.find(a=>a.id===s))==null?void 0:c.label)??`${s} (unavailable)`,i=Math.min(Math.max(n.length+5,12),32);return o.jsxs("select",{className:"chat-model-select",style:{width:`${i}ch`},value:s,disabled:e,onChange:a=>r(a.target.value),"aria-label":"Research model",children:[!t.some(a=>a.id===s)&&o.jsx("option",{value:s,disabled:!0,children:n}),t.map(a=>o.jsx("option",{value:a.id,children:a.label},a.id))]})},l="pwc:chat-oauth-draft",h="pwc:chat-oauth-model",d="pwc:chat-oauth-auto-send";function I(t,s){const r=t.trim();r&&(sessionStorage.setItem(l,r),sessionStorage.setItem(d,"1"),s?sessionStorage.setItem(h,s):sessionStorage.removeItem(h))}function b(){var s;if(typeof window>"u"||sessionStorage.getItem(d)!=="1")return null;const t=(s=sessionStorage.getItem(l))==null?void 0:s.trim();return t?{prompt:t,model:sessionStorage.getItem(h)}:null}function k(){sessionStorage.removeItem(l),sessionStorage.removeItem(h),sessionStorage.removeItem(d)}const f="google/gemma-4-31B-it",D=[{id:f,label:"Gemma 4 31B"},{id:"zai-org/GLM-5.2",label:"GLM 5.2"},{id:"moonshotai/Kimi-K3",label:"Kimi K3"}];async function u(t,s){const r=await fetch(p(t),{credentials:"include",headers:{"Content-Type":"application/json",...s==null?void 0:s.headers},...s});if(!r.ok){const e=await r.json().catch(()=>null),n=e==null?void 0:e.detail;throw new Error((n==null?void 0:n.message)||n||`Chat request failed (${r.status})`)}return r.status===204?void 0:r.json()}class v extends Error{constructor(s,r){super(s),this.status=r}}async function m(t){const s=await fetch(p(t),{headers:{Accept:"application/json"}});if(!s.ok){const r=await s.json().catch(()=>null),e=r==null?void 0:r.detail;throw new v((e==null?void 0:e.message)||e||`Shared conversation request failed (${s.status})`,s.status)}return s.json()}async function E(){const t=[];let s=null;do{const r=new URLSearchParams({limit:"50"});s&&r.set("cursor",s);const e=await u(`/api/v1/chat/sessions?${r.toString()}`);t.push(...e.items),s=e.next_cursor}while(s&&t.length<100);return t}function $(t){return u(`/api/v1/chat/sessions/${t}`)}function A(t,s){return u(`/api/v1/chat/sessions/${t}`,{method:"PATCH",body:JSON.stringify(s)})}function L(t){return u(`/api/v1/chat/sessions/${t}`,{method:"DELETE"})}function q(t){return u(`/api/v1/chat/sessions/${t}/cancel`,{method:"POST"})}function B(t){return u(`/api/v1/chat/sessions/${t}/share`,{method:"POST"})}function P(t){return m(`/api/v1/chat/shares/${encodeURIComponent(t)}`)}async function R(){return u("/api/v1/chat/models")}function O(t){const s=e=>e.map(n=>n.kind==="reasoning"?{...n,active:!1,open:!1}:n.kind==="tool"?{...n,status:n.status==="running"?"error":n.status,open:n.status==="error"||n.status==="denied"||n.status==="running"}:{...n,done:!0}),r=e=>e==="hf_inference_billing_exhausted"?"Hugging Face could not bill this request. Your included credits may be exhausted; enable or review pay-as-you-go billing in Settings.":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,citations:e.citations,finishReason:e.finish_reason??void 0,streaming:!1}];const n={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};if(!["error","interrupted"].includes(e.status))return[n];const i=e.status==="interrupted";return[n,{id:`${e.id}-${i?"interrupted":"error"}`,role:"assistant",blocks:s(e.display_blocks),streaming:!1,finishReason:i?"stopped":void 0,error:i?void 0:r(e.error_code),errorCode:i?void 0:e.error_code??void 0}]})}function H(t){const s=r=>r.map(e=>e.kind==="reasoning"?{...e,active:!1,open:!1}:e.kind==="tool"?{...e,status:e.status==="running"?"error":e.status,open:!1}:{...e,done:!0});return t.messages.map(r=>r.role==="user"?{id:r.id,role:"user",text:r.content}:{id:r.id,role:"assistant",blocks:s(r.display_blocks),citations:r.citations,finishReason:r.finish_reason??void 0,error:r.error??void 0,streaming:!1})}function K(t){const s=Date.now(),r=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 n of[...t].sort((i,c)=>Date.parse(c.updated_at)-Date.parse(i.updated_at))){const i=Date.parse(n.updated_at),c=s-i;i>=r?e[0].items.push(n):c<7*864e5?e[1].items.push(n):c<30*864e5?e[2].items.push(n):e[3].items.push(n)}return e.filter(n=>n.items.length>0)}export{_ as A,l as C,f as D,D as F,M,C as P,x as S,T,h as a,d as b,q as c,k as d,R as e,y as f,$ as g,K as h,L as i,B as j,v as k,E as l,P as m,S as n,w as o,H as p,I as q,b as r,j as s,O as t,A as u};
 
1
+ import{j as o,d as p}from"./index-B2CsYqS1.js";const x=({light:t})=>o.jsx("span",{className:`chat-spinner${t?" chat-spinner-light":""}`}),w=({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"})}),S=()=>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"})]}),j=({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"})]}),_=()=>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"})}),y=()=>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"})]}),T=()=>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"})}),M=({models:t,selectedModel:s,onModelChange:r,disabled:e})=>{var c;const n=((c=t.find(a=>a.id===s))==null?void 0:c.label)??`${s} (unavailable)`,i=Math.min(Math.max(n.length+5,12),32);return o.jsxs("select",{className:"chat-model-select",style:{width:`${i}ch`},value:s,disabled:e,onChange:a=>r(a.target.value),"aria-label":"Research model",children:[!t.some(a=>a.id===s)&&o.jsx("option",{value:s,disabled:!0,children:n}),t.map(a=>o.jsx("option",{value:a.id,children:a.label},a.id))]})},l="pwc:chat-oauth-draft",h="pwc:chat-oauth-model",d="pwc:chat-oauth-auto-send";function I(t,s){const r=t.trim();r&&(sessionStorage.setItem(l,r),sessionStorage.setItem(d,"1"),s?sessionStorage.setItem(h,s):sessionStorage.removeItem(h))}function b(){var s;if(typeof window>"u"||sessionStorage.getItem(d)!=="1")return null;const t=(s=sessionStorage.getItem(l))==null?void 0:s.trim();return t?{prompt:t,model:sessionStorage.getItem(h)}:null}function k(){sessionStorage.removeItem(l),sessionStorage.removeItem(h),sessionStorage.removeItem(d)}const f="google/gemma-4-31B-it",D=[{id:f,label:"Gemma 4 31B"},{id:"zai-org/GLM-5.2",label:"GLM 5.2"},{id:"moonshotai/Kimi-K3",label:"Kimi K3"}];async function u(t,s){const r=await fetch(p(t),{credentials:"include",headers:{"Content-Type":"application/json",...s==null?void 0:s.headers},...s});if(!r.ok){const e=await r.json().catch(()=>null),n=e==null?void 0:e.detail;throw new Error((n==null?void 0:n.message)||n||`Chat request failed (${r.status})`)}return r.status===204?void 0:r.json()}class v extends Error{constructor(s,r){super(s),this.status=r}}async function m(t){const s=await fetch(p(t),{headers:{Accept:"application/json"}});if(!s.ok){const r=await s.json().catch(()=>null),e=r==null?void 0:r.detail;throw new v((e==null?void 0:e.message)||e||`Shared conversation request failed (${s.status})`,s.status)}return s.json()}async function E(){const t=[];let s=null;do{const r=new URLSearchParams({limit:"50"});s&&r.set("cursor",s);const e=await u(`/api/v1/chat/sessions?${r.toString()}`);t.push(...e.items),s=e.next_cursor}while(s&&t.length<100);return t}function $(t){return u(`/api/v1/chat/sessions/${t}`)}function A(t,s){return u(`/api/v1/chat/sessions/${t}`,{method:"PATCH",body:JSON.stringify(s)})}function L(t){return u(`/api/v1/chat/sessions/${t}`,{method:"DELETE"})}function q(t){return u(`/api/v1/chat/sessions/${t}/cancel`,{method:"POST"})}function B(t){return u(`/api/v1/chat/sessions/${t}/share`,{method:"POST"})}function P(t){return m(`/api/v1/chat/shares/${encodeURIComponent(t)}`)}async function R(){return u("/api/v1/chat/models")}function O(t){const s=e=>e.map(n=>n.kind==="reasoning"?{...n,active:!1,open:!1}:n.kind==="tool"?{...n,status:n.status==="running"?"error":n.status,open:n.status==="error"||n.status==="denied"||n.status==="running"}:{...n,done:!0}),r=e=>e==="hf_inference_billing_exhausted"?"Hugging Face could not bill this request. Your included credits may be exhausted; enable or review pay-as-you-go billing in Settings.":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,citations:e.citations,finishReason:e.finish_reason??void 0,streaming:!1}];const n={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};if(!["error","interrupted"].includes(e.status))return[n];const i=e.status==="interrupted";return[n,{id:`${e.id}-${i?"interrupted":"error"}`,role:"assistant",blocks:s(e.display_blocks),streaming:!1,finishReason:i?"stopped":void 0,error:i?void 0:r(e.error_code),errorCode:i?void 0:e.error_code??void 0}]})}function H(t){const s=r=>r.map(e=>e.kind==="reasoning"?{...e,active:!1,open:!1}:e.kind==="tool"?{...e,status:e.status==="running"?"error":e.status,open:!1}:{...e,done:!0});return t.messages.map(r=>r.role==="user"?{id:r.id,role:"user",text:r.content}:{id:r.id,role:"assistant",blocks:s(r.display_blocks),citations:r.citations,finishReason:r.finish_reason??void 0,error:r.error??void 0,streaming:!1})}function K(t){const s=Date.now(),r=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 n of[...t].sort((i,c)=>Date.parse(c.updated_at)-Date.parse(i.updated_at))){const i=Date.parse(n.updated_at),c=s-i;i>=r?e[0].items.push(n):c<7*864e5?e[1].items.push(n):c<30*864e5?e[2].items.push(n):e[3].items.push(n)}return e.filter(n=>n.items.length>0)}export{_ as A,l as C,f as D,D as F,M,C as P,x as S,T,h as a,d as b,q as c,k as d,R as e,y as f,$ as g,K as h,L as i,B as j,v as k,E as l,P as m,S as n,w as o,H as p,I as q,b as r,j as s,O as t,A as u};
assets/{chevron-down-Com83sGm.js → chevron-down-CzkIrRvq.js} RENAMED
@@ -1,4 +1,4 @@
1
- import{c as o}from"./index-eBKbcCso.js";/**
2
  * @license lucide-react v0.462.0 - ISC
3
  *
4
  * This source code is licensed under the ISC license.
 
1
+ import{c as o}from"./index-B2CsYqS1.js";/**
2
  * @license lucide-react v0.462.0 - ISC
3
  *
4
  * This source code is licensed under the ISC license.
assets/{codexAddEvals-DMs98_B2.js → codexAddEvals-CGZnlQWY.js} RENAMED
@@ -1,4 +1,4 @@
1
- import{c as o,j as i,q as c,a4 as d,d as n}from"./index-eBKbcCso.js";/**
2
  * @license lucide-react v0.462.0 - ISC
3
  *
4
  * This source code is licensed under the ISC license.
 
1
+ import{c as o,j as i,q as c,a4 as d,d as n}from"./index-B2CsYqS1.js";/**
2
  * @license lucide-react v0.462.0 - ISC
3
  *
4
  * This source code is licensed under the ISC license.