nielsr HF Staff commited on
Commit
0f0393f
·
verified ·
1 Parent(s): 2d467ce

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-CyOmaBbl.js → AiDeadlinesView-CUhlFpnN.js} +1 -1
  2. assets/{ArtifactWorkspace-DKTpoNk6.js → ArtifactWorkspace-Dc7yVRVJ.js} +1 -1
  3. assets/{AuthorDetailView-OhKD_o9_.js → AuthorDetailView-Cn8yXNDW.js} +1 -1
  4. assets/{BenchmarkDetailView-BWgmyLjB.js → BenchmarkDetailView-qDtq_gct.js} +1 -1
  5. assets/{BenchmarkTrendSparkline-CPm3KYmF.js → BenchmarkTrendSparkline-CtBP2P-b.js} +1 -1
  6. assets/{ChatView-0-C1aJrh.js → ChatView-DCf7eWmY.js} +1 -1
  7. assets/{ConferenceDetailView-xWYVOaEc.js → ConferenceDetailView-CTl8kqWJ.js} +1 -1
  8. assets/{ConferenceTaskView-CyblgNlJ.js → ConferenceTaskView-DBlpmGuy.js} +1 -1
  9. assets/{ConferencesIndexView-TJvAhi_e.js → ConferencesIndexView-mh0QIX5t.js} +1 -1
  10. assets/{CronDashboard-By47FV_c.js → CronDashboard-CWLth6eB.js} +1 -1
  11. assets/{ExternalSourceEvalBadge-D-cpVwI4.js → ExternalSourceEvalBadge-DJbjkUvR.js} +1 -1
  12. assets/{FeedView-DDAtySqL.js → FeedView-CD558xIp.js} +1 -1
  13. assets/{FrameworksIndexView-CbrT4qBE.js → FrameworksIndexView-BNxrGbcA.js} +1 -1
  14. assets/{LatexTitle-Cb0dDCMw.js → LatexTitle-DPJPslOM.js} +1 -1
  15. assets/{MarkdownText-_ZQTzPOU.js → MarkdownText-DeevkxdU.js} +1 -1
  16. assets/{MethodDetailView-nir03v4e.js → MethodDetailView-B8j5YLI4.js} +1 -1
  17. assets/{MethodsIndexView-CUGiY_lq.js → MethodsIndexView-DShrbgnI.js} +1 -1
  18. assets/{NotFound-DI_FDclS.js → NotFound-DoU3elKs.js} +1 -1
  19. assets/{OrganizationContributionGraph-6dHF7Irk.js → OrganizationContributionGraph-DWn4WvRK.js} +1 -1
  20. assets/OrganizationDetailView-D7ul9JVM.js +0 -1
  21. assets/OrganizationDetailView-DAPk8dW-.js +1 -0
  22. assets/{OrganizationPaperFeed-B4pxo9zJ.js → OrganizationPaperFeed-C1gWdGPr.js} +1 -1
  23. assets/OrganizationTaskView-BYKP_Ay6.js +1 -0
  24. assets/OrganizationTaskView-jzl3MtNc.js +0 -1
  25. assets/{OrganizationsIndexView-CTiEHX3_.js → OrganizationsIndexView-BF3t-ISH.js} +1 -1
  26. assets/{PaperDetailView-DLBdTe9q.js → PaperDetailView-BqZOoHVB.js} +1 -1
  27. assets/{PaperPreviewLink-DVTrFkw2.js → PaperPreviewLink-_SPYeWhn.js} +1 -1
  28. assets/{PaperReaderView-CsV08V1_.js → PaperReaderView-CEyWN84M.js} +1 -1
  29. assets/{PapersListView-C2yhQGQQ.js → PapersListView-aXh7BE0b.js} +1 -1
  30. assets/{PrivacyView-ClhArF94.js → PrivacyView-SeXnet82.js} +1 -1
  31. assets/{RateLimitsView-C_Yb_rs_.js → RateLimitsView-wCJiZ2hk.js} +1 -1
  32. assets/{SavedPapersView-COJIJ1Li.js → SavedPapersView-IIw_pCIA.js} +1 -1
  33. assets/{SearchOverlay-BHdLfr8q.js → SearchOverlay-B4h5u4qN.js} +1 -1
  34. assets/{SettingsView-CHsKxhRG.js → SettingsView-BCz54bXj.js} +1 -1
  35. assets/{SharedChatView-lB4B70J6.js → SharedChatView-Dubmg_WO.js} +1 -1
  36. assets/{SignInToEditDialog-vE3vqpo1.js → SignInToEditDialog-C1ykF6wM.js} +1 -1
  37. assets/{StagingAccessRequestView-Bv_tfz92.js → StagingAccessRequestView-Dbbz0TFf.js} +1 -1
  38. assets/{SubmissionsDashboard-CxcSWVQa.js → SubmissionsDashboard-Ce5oydU-.js} +1 -1
  39. assets/{SubmitView-DWNoV2Zf.js → SubmitView-C-DR0i2q.js} +1 -1
  40. assets/{TagBrowseView-ChxQM8Bx.js → TagBrowseView-ai8FONod.js} +1 -1
  41. assets/{TagsIndexView-Bl4HORMo.js → TagsIndexView-DL7Mu597.js} +1 -1
  42. assets/{TaxonomySuggestionTile-BuaFf3aB.js → TaxonomySuggestionTile-VrAsjN5R.js} +1 -1
  43. assets/{TrendsView-DNNCjmYo.js → TrendsView-oxMhMBQy.js} +1 -1
  44. assets/{UserProfileView-8GBCsDpk.js → UserProfileView-CKhi-66U.js} +1 -1
  45. assets/{alert-BiDOKM0e.js → alert-D4lZhgu4.js} +1 -1
  46. assets/{button-BL7Wfk99.js → button-wuesmQpV.js} +1 -1
  47. assets/{catalog-DOuThn7M.js → catalog-BsVxStBB.js} +1 -1
  48. assets/{chat-D9bQn_8F.js → chat-dMs5c7qZ.js} +1 -1
  49. assets/chatLaunch--jg98Oug.js +0 -9
  50. assets/chatLaunch-BxzD44NH.js +9 -0
assets/{AiDeadlinesView-CyOmaBbl.js → AiDeadlinesView-CUhlFpnN.js} RENAMED
@@ -1,3 +1,3 @@
1
- import{r as x,j as t}from"./index-BJHhPv_M.js";import{u as A}from"./useQuery-B9A-sza5.js";import{c as B}from"./catalog-DOuThn7M.js";import{S as U}from"./switch-BlIsVzQQ.js";import{S as W}from"./skeleton-utCOClux.js";import{A as O,a as V}from"./alert-BiDOKM0e.js";import{s as z}from"./safeExternalHref-CkBrsh84.js";import{D as P,a as G,b as Y,c as H,d as K}from"./dialog-DINVvlE3.js";import"./index-mZqTNISL.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"]),Q=e=>e.trim().toLowerCase().replace(/\s+/g,"-"),D=e=>Array.from(new Set((e.tags??[]).map(Q).filter(a=>q.has(a)))),F=e=>new Date(e).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),I=(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}`},M=e=>[...e.deadlines??[]].sort((a,n)=>new Date(a.deadline_at).getTime()-new Date(n.deadline_at).getTime()),T=(e,a)=>M(e).find(n=>new Date(n.deadline_at).getTime()>a)??null,L=e=>{const a=M(e);return a.length?a[a.length-1]:null},J=(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`},X=(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)"},Z=(e,a)=>{const n=Math.ceil((e-a)/b);return n<=0?"passed":`${n} ${n===1?"day":"days"}`},R=(e,a)=>{const n=I(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}/,""),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=`https://calendar.google.com/calendar/render?action=TEMPLATE&text=${encodeURIComponent(o)}&dates=${C(n)}/${C(r)}&details=${encodeURIComponent(R(e,a))}&location=${encodeURIComponent(i)}`,m=z(s);m&&window.open(m,"_blank","noopener,noreferrer")},te=(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
  `),m=new Blob([s],{type:"text/calendar;charset=utf-8"}),c=document.createElement("a");c.href=URL.createObjectURL(m),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)},ne=({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?M(e):[],[e]),s=x.useMemo(()=>e?T(e,r):null,[e,r]),m=e?I(e.start_date,e.end_date):null,c=e?e.venue||[e.city,e.country].filter(Boolean).join(", ")||e.location:null,u=s?new Date(s.deadline_at).getTime():null;return t.jsx(P,{open:a,onOpenChange:n,children:t.jsx(G,{className:"max-w-xl",style:{background:"var(--bg-elevated)",maxHeight:"85vh",overflowY:"auto"},children:e&&t.jsxs(t.Fragment,{children:[t.jsxs(Y,{children:[t.jsx(H,{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:[m&&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:m})]}),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})]})]}),u!=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:_(u,r)},children:X(u,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,p)=>{const y=new Date(d.deadline_at).getTime(),l=s!=null&&d.deadline_at===s.deadline_at&&d.type===s.type,h=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:h&&!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:_(h?null:y,r)},children:Z(y,r)})]},`${d.type??"deadline"}-${p}`)})]}),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:z(e.url)??void 0,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:()=>ee(e,s),style:{background:"var(--bg-subtle)",color:"var(--ink-soft)"},children:"+ Google Calendar"}),t.jsx("button",{type:"button",className:"tag-chip",onClick:()=>te(e,s),style:{background:"var(--bg-subtle)",color:"var(--ink-soft)"},children:"+ Apple / .ics"})]})]})]})]})})})},E=({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(U,{id:e,checked:n,onCheckedChange:r}),t.jsx("label",{htmlFor:e,style:{cursor:"pointer"},children:a})]}),ae=({conf:e,now:a,selectedDomains:n,onToggleDomain:r,onOpen:o})=>{const i=T(e,a),s=i??L(e),m=s?new Date(s.deadline_at).getTime():null,c=_(i?m:null,a),u=I(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:p=>{(p.key==="Enter"||p.key===" ")&&(p.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:z(e.url)??void 0,target:"_blank",rel:"noopener noreferrer",onClick:p=>p.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:m!=null?J(m,a):"TBD"})]}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4,fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)"},children:[u&&t.jsx("span",{children:u}),d&&t.jsx("span",{children:d})]}),D(e).length>0&&t.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:D(e).map(p=>{const y=n.has(p);return t.jsx("button",{className:"tag-chip",onClick:l=>{l.stopPropagation(),r(p)},style:{background:y?"var(--ink)":"var(--bg-subtle)",color:y?"var(--bg)":"var(--ink-soft)"},children:k(p)},p)})})]})},ue=()=>{const[e,a]=x.useState(!0),[n,r]=x.useState(!1),[o,i]=x.useState(new Set),[s,m]=x.useState(null),c=x.useMemo(()=>Date.now(),[]),u=A({queryKey:["conference-deadlines"],queryFn:()=>B.conferenceDeadlines(),staleTime:10*60*1e3}),d=l=>{i(h=>{const g=new Set(h);return g.has(l)?g.delete(l):g.add(l),g})},p=x.useMemo(()=>{var h;const l=new Map;return(h=u.data)==null||h.results.forEach(g=>{D(g).forEach(j=>l.set(j,(l.get(j)??0)+1))}),Array.from(l.entries()).sort((g,j)=>j[1]-g[1]).map(([g])=>g)},[u.data]),y=x.useMemo(()=>{var j;const h=(((j=u.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))),g=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[...h].sort((f,w)=>{const v=g(f),N=g(w);return v.group!==N.group?v.group-N.group:v.time-N.time})},[u.data,e,n,o,c]);return u.error?t.jsx("div",{className:"page",children:t.jsx(O,{variant:"destructive",children:t.jsx(V,{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(E,{id:"top-tier-only",label:"Top tier only",checked:e,onChange:a}),t.jsx(E,{id:"show-past",label:"Show past conferences",checked:n,onChange:r})]}),p.length>0&&t.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:6,marginBottom:24},children:[p.map(l=>{const h=o.has(l);return t.jsx("button",{className:"tag-chip",onClick:()=>d(l),style:{background:h?"var(--ink)":"var(--bg-subtle)",color:h?"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:u.isLoading?"…":`${y.length} conferences`})}),u.isLoading?t.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(320px, 1fr))",gap:16},children:Array.from({length:6}).map((l,h)=>t.jsx(W,{className:"h-44"},h))}):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(ae,{conf:l,now:c,selectedDomains:o,onToggleDomain:d,onOpen:m},l.id))}),t.jsx(ne,{conf:s,open:s!==null,onOpenChange:l=>{l||m(null)}})]})};export{ue as default};
 
1
+ import{r as x,j as t}from"./index-BfGRWIiQ.js";import{u as A}from"./useQuery-uhyHf514.js";import{c as B}from"./catalog-BsVxStBB.js";import{S as U}from"./switch-Do_Ydvtn.js";import{S as W}from"./skeleton-7gHbNXZz.js";import{A as O,a as V}from"./alert-D4lZhgu4.js";import{s as z}from"./safeExternalHref-CkBrsh84.js";import{D as P,a as G,b as Y,c as H,d as K}from"./dialog-Ci3RQLed.js";import"./index-DPh0SyoW.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"]),Q=e=>e.trim().toLowerCase().replace(/\s+/g,"-"),D=e=>Array.from(new Set((e.tags??[]).map(Q).filter(a=>q.has(a)))),F=e=>new Date(e).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),I=(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}`},M=e=>[...e.deadlines??[]].sort((a,n)=>new Date(a.deadline_at).getTime()-new Date(n.deadline_at).getTime()),T=(e,a)=>M(e).find(n=>new Date(n.deadline_at).getTime()>a)??null,L=e=>{const a=M(e);return a.length?a[a.length-1]:null},J=(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`},X=(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)"},Z=(e,a)=>{const n=Math.ceil((e-a)/b);return n<=0?"passed":`${n} ${n===1?"day":"days"}`},R=(e,a)=>{const n=I(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}/,""),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=`https://calendar.google.com/calendar/render?action=TEMPLATE&text=${encodeURIComponent(o)}&dates=${C(n)}/${C(r)}&details=${encodeURIComponent(R(e,a))}&location=${encodeURIComponent(i)}`,m=z(s);m&&window.open(m,"_blank","noopener,noreferrer")},te=(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
  `),m=new Blob([s],{type:"text/calendar;charset=utf-8"}),c=document.createElement("a");c.href=URL.createObjectURL(m),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)},ne=({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?M(e):[],[e]),s=x.useMemo(()=>e?T(e,r):null,[e,r]),m=e?I(e.start_date,e.end_date):null,c=e?e.venue||[e.city,e.country].filter(Boolean).join(", ")||e.location:null,u=s?new Date(s.deadline_at).getTime():null;return t.jsx(P,{open:a,onOpenChange:n,children:t.jsx(G,{className:"max-w-xl",style:{background:"var(--bg-elevated)",maxHeight:"85vh",overflowY:"auto"},children:e&&t.jsxs(t.Fragment,{children:[t.jsxs(Y,{children:[t.jsx(H,{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:[m&&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:m})]}),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})]})]}),u!=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:_(u,r)},children:X(u,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,p)=>{const y=new Date(d.deadline_at).getTime(),l=s!=null&&d.deadline_at===s.deadline_at&&d.type===s.type,h=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:h&&!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:_(h?null:y,r)},children:Z(y,r)})]},`${d.type??"deadline"}-${p}`)})]}),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:z(e.url)??void 0,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:()=>ee(e,s),style:{background:"var(--bg-subtle)",color:"var(--ink-soft)"},children:"+ Google Calendar"}),t.jsx("button",{type:"button",className:"tag-chip",onClick:()=>te(e,s),style:{background:"var(--bg-subtle)",color:"var(--ink-soft)"},children:"+ Apple / .ics"})]})]})]})]})})})},E=({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(U,{id:e,checked:n,onCheckedChange:r}),t.jsx("label",{htmlFor:e,style:{cursor:"pointer"},children:a})]}),ae=({conf:e,now:a,selectedDomains:n,onToggleDomain:r,onOpen:o})=>{const i=T(e,a),s=i??L(e),m=s?new Date(s.deadline_at).getTime():null,c=_(i?m:null,a),u=I(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:p=>{(p.key==="Enter"||p.key===" ")&&(p.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:z(e.url)??void 0,target:"_blank",rel:"noopener noreferrer",onClick:p=>p.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:m!=null?J(m,a):"TBD"})]}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4,fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)"},children:[u&&t.jsx("span",{children:u}),d&&t.jsx("span",{children:d})]}),D(e).length>0&&t.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:D(e).map(p=>{const y=n.has(p);return t.jsx("button",{className:"tag-chip",onClick:l=>{l.stopPropagation(),r(p)},style:{background:y?"var(--ink)":"var(--bg-subtle)",color:y?"var(--bg)":"var(--ink-soft)"},children:k(p)},p)})})]})},ue=()=>{const[e,a]=x.useState(!0),[n,r]=x.useState(!1),[o,i]=x.useState(new Set),[s,m]=x.useState(null),c=x.useMemo(()=>Date.now(),[]),u=A({queryKey:["conference-deadlines"],queryFn:()=>B.conferenceDeadlines(),staleTime:10*60*1e3}),d=l=>{i(h=>{const g=new Set(h);return g.has(l)?g.delete(l):g.add(l),g})},p=x.useMemo(()=>{var h;const l=new Map;return(h=u.data)==null||h.results.forEach(g=>{D(g).forEach(j=>l.set(j,(l.get(j)??0)+1))}),Array.from(l.entries()).sort((g,j)=>j[1]-g[1]).map(([g])=>g)},[u.data]),y=x.useMemo(()=>{var j;const h=(((j=u.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))),g=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[...h].sort((f,w)=>{const v=g(f),N=g(w);return v.group!==N.group?v.group-N.group:v.time-N.time})},[u.data,e,n,o,c]);return u.error?t.jsx("div",{className:"page",children:t.jsx(O,{variant:"destructive",children:t.jsx(V,{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(E,{id:"top-tier-only",label:"Top tier only",checked:e,onChange:a}),t.jsx(E,{id:"show-past",label:"Show past conferences",checked:n,onChange:r})]}),p.length>0&&t.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:6,marginBottom:24},children:[p.map(l=>{const h=o.has(l);return t.jsx("button",{className:"tag-chip",onClick:()=>d(l),style:{background:h?"var(--ink)":"var(--bg-subtle)",color:h?"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:u.isLoading?"…":`${y.length} conferences`})}),u.isLoading?t.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(320px, 1fr))",gap:16},children:Array.from({length:6}).map((l,h)=>t.jsx(W,{className:"h-44"},h))}):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(ae,{conf:l,now:c,selectedDomains:o,onToggleDomain:d,onOpen:m},l.id))}),t.jsx(ne,{conf:s,open:s!==null,onOpenChange:l=>{l||m(null)}})]})};export{ue as default};
assets/{ArtifactWorkspace-DKTpoNk6.js → ArtifactWorkspace-Dc7yVRVJ.js} RENAMED
@@ -1,4 +1,4 @@
1
- var xN=Object.defineProperty;var Mk=n=>{throw TypeError(n)};var EN=(n,e,t)=>e in n?xN(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var re=(n,e,t)=>EN(n,typeof e!="symbol"?e+"":e,t),C0=(n,e,t)=>e.has(n)||Mk("Cannot "+t);var d=(n,e,t)=>(C0(n,e,"read from private field"),t?t.call(n):e.get(n)),R=(n,e,t)=>e.has(n)?Mk("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(n):e.set(n,t),E=(n,e,t,s)=>(C0(n,e,"write to private field"),s?s.call(n,t):e.set(n,t),t),C=(n,e,t)=>(C0(n,e,"access private method"),t);var os=(n,e,t,s)=>({set _(i){E(n,e,i,t)},get _(){return d(n,e,s)}});import{d as bo,r as J,j as S,z as ee,S as y_,E as sn,_ as zp,U as Ry,L as Ik,X as v_,g as CN,C as $N}from"./index-BJHhPv_M.js";import{u as sC,P as iC,b as rC,M as TN,R as PN,W as RN,d as b_,A as MN,l as IN,J as ON,K as NN,L as LN,N as oC,O as DN}from"./chatLaunch--jg98Oug.js";import"./katex.min-BSBacQyE.js";import{H as My,a as Iy,b as Oy}from"./hover-card-CBNxKixP.js";import{u as ra}from"./useQuery-B9A-sza5.js";import{f as FN,p as jN,T as zN}from"./github-B2SnkTVu.js";import{G as Ny}from"./github-BnuvDeYu.js";import{r as HN,a as BN,P as aC}from"./PaperPreviewLink-DVTrFkw2.js";import{M as qN,r as UN,d as VN}from"./index-RvWGcsIO.js";import{c as Ok}from"./chat-D9bQn_8F.js";import{F as WN}from"./file-text-D0p5b00d.js";import{u as Hp}from"./useMutation-rrsjzB5Q.js";import{E as lC}from"./external-link-h2XFtnTN.js";/**
2
  * @license lucide-react v0.462.0 - ISC
3
  *
4
  * This source code is licensed under the ISC license.
 
1
+ var xN=Object.defineProperty;var Mk=n=>{throw TypeError(n)};var EN=(n,e,t)=>e in n?xN(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var re=(n,e,t)=>EN(n,typeof e!="symbol"?e+"":e,t),C0=(n,e,t)=>e.has(n)||Mk("Cannot "+t);var d=(n,e,t)=>(C0(n,e,"read from private field"),t?t.call(n):e.get(n)),R=(n,e,t)=>e.has(n)?Mk("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(n):e.set(n,t),E=(n,e,t,s)=>(C0(n,e,"write to private field"),s?s.call(n,t):e.set(n,t),t),C=(n,e,t)=>(C0(n,e,"access private method"),t);var os=(n,e,t,s)=>({set _(i){E(n,e,i,t)},get _(){return d(n,e,s)}});import{d as bo,r as J,j as S,z as ee,S as y_,E as sn,_ as zp,U as Ry,L as Ik,X as v_,g as CN,C as $N}from"./index-BfGRWIiQ.js";import{u as sC,P as iC,b as rC,M as TN,R as PN,W as RN,d as b_,A as MN,l as IN,J as ON,K as NN,L as LN,N as oC,O as DN}from"./chatLaunch-BxzD44NH.js";import"./katex.min-BSBacQyE.js";import{H as My,a as Iy,b as Oy}from"./hover-card-HVpXfIHl.js";import{u as ra}from"./useQuery-uhyHf514.js";import{f as FN,p as jN,T as zN}from"./github-BbqV1Jxk.js";import{G as Ny}from"./github-BM40zlYO.js";import{r as HN,a as BN,P as aC}from"./PaperPreviewLink-_SPYeWhn.js";import{M as qN,r as UN,d as VN}from"./index-BqZK5Cw1.js";import{c as Ok}from"./chat-dMs5c7qZ.js";import{F as WN}from"./file-text-FxV6g_yZ.js";import{u as Hp}from"./useMutation-Dw9DDJRs.js";import{E as lC}from"./external-link-C3NMRHh9.js";/**
2
  * @license lucide-react v0.462.0 - ISC
3
  *
4
  * This source code is licensed under the ISC license.
assets/{AuthorDetailView-OhKD_o9_.js → AuthorDetailView-Cn8yXNDW.js} RENAMED
@@ -1 +1 @@
1
- import{c as m,j as e,L as x}from"./index-BJHhPv_M.js";import{u as h}from"./useQuery-B9A-sza5.js";import{p as d}from"./papers-CWyBrS8M.js";import{S as c}from"./skeleton-utCOClux.js";import g from"./NotFound-DI_FDclS.js";const _=()=>{var i,l,n,o,u;const{authorId:a}=m(),r=h({queryKey:["author",a],queryFn:()=>d.getAuthor(a),enabled:!!a}),t=h({queryKey:["author-papers",a],queryFn:()=>d.authorPapers(a,{page:1,page_size:20}),enabled:!!a});return((i=r.error)==null?void 0:i.status)===404?e.jsx(g,{}):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(x,{to:`/paper/${p}`,children:s.title})},s.id)})})]})]})};export{_ as default};
 
1
+ import{c as m,j as e,L as x}from"./index-BfGRWIiQ.js";import{u as h}from"./useQuery-uhyHf514.js";import{p as d}from"./papers-PnGxH-RF.js";import{S as c}from"./skeleton-7gHbNXZz.js";import g from"./NotFound-DoU3elKs.js";const _=()=>{var i,l,n,o,u;const{authorId:a}=m(),r=h({queryKey:["author",a],queryFn:()=>d.getAuthor(a),enabled:!!a}),t=h({queryKey:["author-papers",a],queryFn:()=>d.authorPapers(a,{page:1,page_size:20}),enabled:!!a});return((i=r.error)==null?void 0:i.status)===404?e.jsx(g,{}):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(x,{to:`/paper/${p}`,children:s.title})},s.id)})})]})]})};export{_ as default};
assets/{BenchmarkDetailView-BWgmyLjB.js → BenchmarkDetailView-qDtq_gct.js} RENAMED
@@ -1,2 +1,2 @@
1
- import{u as Lt,r as v,j as s,s as ce,e as Mt,c as It,a as At,f as Bt,L as ae}from"./index-BJHhPv_M.js";import{u as ee}from"./useQuery-B9A-sza5.js";import{c as ne}from"./catalog-DOuThn7M.js";import{C as Dt,E as Ht,e as Vt}from"./ExternalSourceEvalBadge-D-cpVwI4.js";import{S as ye}from"./skeleton-utCOClux.js";import{S as ot}from"./switch-BlIsVzQQ.js";import{A as Ut,a as qt}from"./alert-BiDOKM0e.js";import{L as ve}from"./LatexTitle-Cb0dDCMw.js";import{B as Ot}from"./BenchmarkTrendSparkline-CPm3KYmF.js";import{I as Wt}from"./components-wRHDLoMO.js";import{s as zt}from"./safeExternalHref-CkBrsh84.js";import{s as Kt}from"./slug-BpH-Nkvz.js";import"./papers-CWyBrS8M.js";import"./hover-card-CBNxKixP.js";import"./index-mZqTNISL.js";import"./katex.min-BSBacQyE.js";import"./transform-DDP8kg8V.js";function Gt(e,t,r){const a=t?(e??[]).filter(l=>l.task_id===t):e??[],n=a.filter(l=>l.is_open===!1),i=n.reduce((l,o)=>l?(o.best_rank??Number.POSITIVE_INFINITY)<(l.best_rank??Number.POSITIVE_INFINITY)?o:l:o,null);return{visible:r?a.filter(l=>l.is_open!==!1):a,hiddenClosed:n,topHiddenClosed:i}}function ct(e){const t=e.length===7?`${e}-01`:e,r=new Date(t).getTime();return Number.isFinite(r)?r:0}const Fe=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Le(e){const t=new Date(e);return{year:t.getFullYear(),month:t.getMonth()}}function Qt(e,t){if(e===t){const{year:m,month:g}=Le(e);return[{timestamp:new Date(m,g,1).getTime(),key:`${m}-${g}`,label:`${Fe[g]} ${m}`}]}const r=Le(e),a=Le(t);if(r.year===a.year){const m=a.month-r.month+1;let g=1;const h=12;m>h&&(g=Math.ceil(m/h));const y=[];for(let x=r.month;x<=a.month;x+=g)y.push({timestamp:new Date(r.year,x,1).getTime(),key:`${r.year}-${x}`,label:m<=3?`${Fe[x]} ${r.year}`:Fe[x]});return y}const n=a.year-r.year+1;let i=1;const l=12;n>l&&(i=Math.ceil(n/l));const o=[];for(let m=r.year;m<=a.year;m+=i)o.push({timestamp:new Date(m,0,1).getTime(),key:String(m),label:String(m)});return o}const Xt=({points:e,metric:t})=>{const r=Lt(),[a,n]=v.useState(null),i=880,l=320,o=60,m=30,g=40,h=50,y=e.map(d=>d.value),x=Math.min(...y),z=Math.max(...y)-x||1,de=i-o-m,M=l-g-h,T=e.map(d=>ct(d.date)),X=Math.min(...T),I=Math.max(...T),ue=I-X||1,te=d=>X===I?o+de/2:o+(d-X)/ue*de,Y=e.map((d,f)=>{const R=te(ct(d.date)),_=(d.value-x)/z,w=g+M*(1-_);return{x:R,y:w,data:d,idx:f}}),N=Y.filter(d=>d.data.isSota);let q="";if(N.length>=2){q=`M${N[0].x},${N[0].y}`;for(let d=1;d<N.length;d++){const f=N[d-1],R=N[d],_=(f.x+R.x)/2;q+=` C${_},${f.y} ${_},${R.y} ${R.x},${R.y}`}}const D=5.4,re=8,Se=9,J=d=>{const f=d.data.modelName||d.data.paperTitle||"";if(!f)return null;const R=f.length>22?f.slice(0,21)+"…":f,_=R.length*D;let w=d.x-_/2,j=d.x+_/2,V="middle";return w<o?(w=o,j=o+_,V="start"):j>i-m&&(j=i-m,w=j-_,V="end"),{x:V==="start"?o:V==="end"?i-m:d.x,y:d.y-Se,text:R,anchor:V,left:w,right:j}},P=[],O=N.length>0?J(N[N.length-1]):null;let me=-1/0;for(let d=0;d<N.length-1;d++){const f=J(N[d]);f&&(f.left<me+re||O&&f.right>O.left-re||(me=f.right,P.push({x:f.x,y:f.y,text:f.text,anchor:f.anchor})))}O&&P.push({x:O.x,y:O.y,text:O.text,anchor:O.anchor});const He=Qt(X,I),b=5,Ce=d=>n(f=>f===d?null:f),K=d=>{d&&r(`/paper/${d}`)},G=(d,f)=>{const _=`${d.data.modelName||d.data.paperTitle||"Unknown model"}: ${ce(d.data.value)} on ${d.data.dateLabel}`,w=!!d.data.paperRouteId;return s.jsxs("g",{children:[f,s.jsx("circle",{cx:d.x,cy:d.y,r:"10",fill:"transparent",style:{cursor:w?"pointer":"default",outline:"none"},tabIndex:0,role:w?"link":"img","aria-label":_,onMouseEnter:()=>n(d.idx),onMouseLeave:()=>Ce(d.idx),onFocus:()=>n(d.idx),onBlur:()=>Ce(d.idx),onClick:()=>K(d.data.paperRouteId),onKeyDown:j=>{w&&(j.key==="Enter"||j.key===" ")&&(j.preventDefault(),K(d.data.paperRouteId))},children:s.jsx("title",{children:_})})]},d.idx)};return s.jsxs("svg",{width:"100%",viewBox:`0 0 ${i} ${l}`,style:{display:"block"},children:[s.jsx("text",{x:o-38,y:g+M/2,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-faint)",textAnchor:"middle",transform:`rotate(-90 ${o-38} ${g+M/2})`,children:t}),Array.from({length:b}).map((d,f)=>{const R=f/(b-1),_=g+M*(1-R),w=x+z*R;return s.jsxs("g",{children:[s.jsx("line",{x1:o,y1:_,x2:i-m,y2:_,stroke:"var(--hairline)",strokeWidth:"1"}),s.jsx("text",{x:o-10,y:_+4,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-faint)",textAnchor:"end",children:ce(w)})]},f)}),He.map(d=>{const f=te(d.timestamp);return s.jsx("text",{x:f,y:l-h+18,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-soft)",textAnchor:"middle",children:d.label},d.key)}),Y.filter(d=>!d.data.isSota).map(d=>{const f=a===d.idx;return G(d,s.jsx("circle",{cx:d.x,cy:d.y,r:f?3:2,fill:"var(--ink-faint)",opacity:f?1:.45,style:{transition:"r 0.12s ease, opacity 0.12s ease"}}))}),q&&s.jsx("path",{d:q,stroke:"var(--accent)",strokeWidth:"2",fill:"none",strokeLinejoin:"round",strokeLinecap:"round"}),N.map(d=>{const f=a===d.idx;return G(d,s.jsx("circle",{cx:d.x,cy:d.y,r:f?4.5:3,fill:f?"var(--accent)":"var(--bg-elevated)",stroke:"var(--accent)",strokeWidth:"1.5",style:{transition:"r 0.12s ease, fill 0.12s ease"}}))}),P.map((d,f)=>s.jsx("text",{x:d.x,y:d.y,fontSize:"9.5",fontFamily:"var(--mono)",fill:"var(--ink-soft)",textAnchor:d.anchor,pointerEvents:"none",style:{paintOrder:"stroke",stroke:"var(--bg-elevated)",strokeWidth:3,strokeLinejoin:"round"},children:d.text},`label-${f}`)),a!==null&&Y[a]&&(()=>{const d=Y[a],f=d.data.modelName||d.data.paperTitle||"Unknown model",_=`${f.length>40?f.slice(0,39)+"…":f}: ${ce(d.data.value)}`,j=Math.max(120,Math.min(340,_.length*6.6+24)),V=30;let W=d.x-j/2;W<o&&(W=o),W+j>i-m&&(W=i-m-j);const fe=d.y-V-14>=g?d.y-V-12:d.y+12;return s.jsxs("g",{pointerEvents:"none",children:[s.jsx("rect",{x:W,y:fe,width:j,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))"}}),s.jsx("text",{x:W+12,y:fe+19,fontSize:"12",fontFamily:"var(--sans)",fill:"var(--ink)",fontWeight:500,children:_})]})})()]})};function Yt(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(),a=r.createElement("base"),n=r.createElement("a");return r.head.appendChild(a),r.body.appendChild(n),t&&(a.href=t),n.href=e,n.href}const Jt=(()=>{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,a=e.length;r<a;r++)t.push(e[r]);return t}let ie=null;function vt(e={}){return ie||(e.includeStyleProperties?(ie=e.includeStyleProperties,ie):(ie=Q(window.getComputedStyle(document.documentElement)),ie))}function _e(e,t){const a=(e.ownerDocument.defaultView||window).getComputedStyle(e).getPropertyValue(t);return a?parseFloat(a.replace("px","")):0}function Zt(e){const t=_e(e,"border-left-width"),r=_e(e,"border-right-width");return e.clientWidth+t+r}function er(e){const t=_e(e,"border-top-width"),r=_e(e,"border-bottom-width");return e.clientHeight+t+r}function _t(e,t={}){const r=t.width||Zt(e),a=t.height||er(e);return{width:r,height:a}}function tr(){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 H=16384;function rr(e){(e.width>H||e.height>H)&&(e.width>H&&e.height>H?e.width>e.height?(e.height*=H/e.width,e.width=H):(e.width*=H/e.height,e.height=H):e.width>H?(e.height*=H/e.width,e.width=H):(e.width*=H/e.height,e.height=H))}function sr(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 a=window.atob(e.toDataURL(t.type?t.type:void 0,t.quality?t.quality:void 0).split(",")[1]),n=a.length,i=new Uint8Array(n);for(let l=0;l<n;l+=1)i[l]=a.charCodeAt(l);r(new Blob([i],{type:t.type?t.type:"image/png"}))})}function je(e){return new Promise((t,r)=>{const a=new Image;a.onload=()=>{a.decode().then(()=>{requestAnimationFrame(()=>t(a))})},a.onerror=r,a.crossOrigin="anonymous",a.decoding="async",a.src=e})}async function ar(e){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then(t=>`data:image/svg+xml;charset=utf-8,${t}`)}async function nr(e,t,r){const a="http://www.w3.org/2000/svg",n=document.createElementNS(a,"svg"),i=document.createElementNS(a,"foreignObject");return n.setAttribute("width",`${t}`),n.setAttribute("height",`${r}`),n.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"),n.appendChild(i),i.appendChild(e),ar(n)}const B=(e,t)=>{if(e instanceof t)return!0;const r=Object.getPrototypeOf(e);return r===null?!1:r.constructor.name===t.name||B(r,t)};function ir(e){const t=e.getPropertyValue("content");return`${e.cssText} content: '${t.replace(/'|"/g,"")}';`}function lr(e,t){return vt(t).map(r=>{const a=e.getPropertyValue(r),n=e.getPropertyPriority(r);return`${r}: ${a}${n?" !important":""};`}).join(" ")}function or(e,t,r,a){const n=`.${e}:${t}`,i=r.cssText?ir(r):lr(r,a);return document.createTextNode(`${n}{${i}}`)}function dt(e,t,r,a){const n=window.getComputedStyle(e,r),i=n.getPropertyValue("content");if(i===""||i==="none")return;const l=Jt();try{t.className=`${t.className} ${l}`}catch{return}const o=document.createElement("style");o.appendChild(or(l,r,n,a)),t.appendChild(o)}function cr(e,t,r){dt(e,t,":before",r),dt(e,t,":after",r)}const ut="application/font-woff",mt="image/jpeg",dr={woff:ut,woff2:ut,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:mt,jpeg:mt,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function ur(e){const t=/\.([^./]*?)$/g.exec(e);return t?t[1]:""}function Be(e){const t=ur(e).toLowerCase();return dr[t]||""}function mr(e){return e.split(/,/)[1]}function Ie(e){return e.search(/^(data:)/)!==-1}function hr(e,t){return`data:${t};base64,${e}`}async function jt(e,t,r){const a=await fetch(e,t);if(a.status===404)throw new Error(`Resource "${a.url}" not found`);const n=await a.blob();return new Promise((i,l)=>{const o=new FileReader;o.onerror=l,o.onloadend=()=>{try{i(r({res:a,result:o.result}))}catch(m){l(m)}},o.readAsDataURL(n)})}const Me={};function fr(e,t,r){let a=e.replace(/\?.*/,"");return r&&(a=e),/ttf|otf|eot|woff2?/i.test(a)&&(a=a.replace(/.*\//,"")),t?`[${t}]${a}`:a}async function De(e,t,r){const a=fr(e,t,r.includeQueryParams);if(Me[a]!=null)return Me[a];r.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+new Date().getTime());let n;try{const i=await jt(e,r.fetchRequestInit,({res:l,result:o})=>(t||(t=l.headers.get("Content-Type")||""),mr(o)));n=hr(i,t)}catch(i){n=r.imagePlaceholder||"";let l=`Failed to fetch resource: ${e}`;i&&(l=typeof i=="string"?i:i.message),l&&console.warn(l)}return Me[a]=n,n}async function pr(e){const t=e.toDataURL();return t==="data:,"?e.cloneNode(!1):je(t)}async function gr(e,t){if(e.currentSrc){const i=document.createElement("canvas"),l=i.getContext("2d");i.width=e.clientWidth,i.height=e.clientHeight,l==null||l.drawImage(e,0,0,i.width,i.height);const o=i.toDataURL();return je(o)}const r=e.poster,a=Be(r),n=await De(r,a,t);return je(n)}async function xr(e,t){var r;try{if(!((r=e==null?void 0:e.contentDocument)===null||r===void 0)&&r.body)return await ke(e.contentDocument.body,t,!0)}catch{}return e.cloneNode(!1)}async function br(e,t){return B(e,HTMLCanvasElement)?pr(e):B(e,HTMLVideoElement)?gr(e,t):B(e,HTMLIFrameElement)?xr(e,t):e.cloneNode(kt(e))}const yr=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SLOT",kt=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SVG";async function wr(e,t,r){var a,n;if(kt(t))return t;let i=[];return yr(e)&&e.assignedNodes?i=Q(e.assignedNodes()):B(e,HTMLIFrameElement)&&(!((a=e.contentDocument)===null||a===void 0)&&a.body)?i=Q(e.contentDocument.body.childNodes):i=Q(((n=e.shadowRoot)!==null&&n!==void 0?n:e).childNodes),i.length===0||B(e,HTMLVideoElement)||await i.reduce((l,o)=>l.then(()=>ke(o,r)).then(m=>{m&&t.appendChild(m)}),Promise.resolve()),t}function vr(e,t,r){const a=t.style;if(!a)return;const n=window.getComputedStyle(e);n.cssText?(a.cssText=n.cssText,a.transformOrigin=n.transformOrigin):vt(r).forEach(i=>{let l=n.getPropertyValue(i);i==="font-size"&&l.endsWith("px")&&(l=`${Math.floor(parseFloat(l.substring(0,l.length-2)))-.1}px`),B(e,HTMLIFrameElement)&&i==="display"&&l==="inline"&&(l="block"),i==="d"&&t.getAttribute("d")&&(l=`path(${t.getAttribute("d")})`),a.setProperty(i,l,n.getPropertyPriority(i))})}function _r(e,t){B(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),B(e,HTMLInputElement)&&t.setAttribute("value",e.value)}function jr(e,t){if(B(e,HTMLSelectElement)){const r=t,a=Array.from(r.children).find(n=>e.value===n.getAttribute("value"));a&&a.setAttribute("selected","")}}function kr(e,t,r){return B(t,Element)&&(vr(e,t,r),cr(e,t,r),_r(e,t),jr(e,t)),t}async function Sr(e,t){const r=e.querySelectorAll?e.querySelectorAll("use"):[];if(r.length===0)return e;const a={};for(let i=0;i<r.length;i++){const o=r[i].getAttribute("xlink:href");if(o){const m=e.querySelector(o),g=document.querySelector(o);!m&&g&&!a[o]&&(a[o]=await ke(g,t,!0))}}const n=Object.values(a);if(n.length){const i="http://www.w3.org/1999/xhtml",l=document.createElementNS(i,"svg");l.setAttribute("xmlns",i),l.style.position="absolute",l.style.width="0",l.style.height="0",l.style.overflow="hidden",l.style.display="none";const o=document.createElementNS(i,"defs");l.appendChild(o);for(let m=0;m<n.length;m++)o.appendChild(n[m]);e.appendChild(l)}return e}async function ke(e,t,r){return!r&&t.filter&&!t.filter(e)?null:Promise.resolve(e).then(a=>br(a,t)).then(a=>wr(e,a,t)).then(a=>kr(e,a,t)).then(a=>Sr(a,t))}const St=/url\((['"]?)([^'"]+?)\1\)/g,Cr=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,Er=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function Nr(e){const t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}function Rr(e){const t=[];return e.replace(St,(r,a,n)=>(t.push(n),r)),t.filter(r=>!Ie(r))}async function $r(e,t,r,a,n){try{const i=r?Yt(t,r):t,l=Be(t);let o;return n||(o=await De(i,l,a)),e.replace(Nr(t),`$1${o}$3`)}catch{}return e}function Tr(e,{preferredFontFormat:t}){return t?e.replace(Er,r=>{for(;;){const[a,,n]=Cr.exec(r)||[];if(!n)return"";if(n===t)return`src: ${a};`}}):e}function Ct(e){return e.search(St)!==-1}async function Et(e,t,r){if(!Ct(e))return e;const a=Tr(e,r);return Rr(a).reduce((i,l)=>i.then(o=>$r(o,l,t,r)),Promise.resolve(a))}async function le(e,t,r){var a;const n=(a=t.style)===null||a===void 0?void 0:a.getPropertyValue(e);if(n){const i=await Et(n,null,r);return t.style.setProperty(e,i,t.style.getPropertyPriority(e)),!0}return!1}async function Pr(e,t){await le("background",e,t)||await le("background-image",e,t),await le("mask",e,t)||await le("-webkit-mask",e,t)||await le("mask-image",e,t)||await le("-webkit-mask-image",e,t)}async function Fr(e,t){const r=B(e,HTMLImageElement);if(!(r&&!Ie(e.src))&&!(B(e,SVGImageElement)&&!Ie(e.href.baseVal)))return;const a=r?e.src:e.href.baseVal,n=await De(a,Be(a),t);await new Promise((i,l)=>{e.onload=i,e.onerror=t.onImageErrorHandler?(...m)=>{try{i(t.onImageErrorHandler(...m))}catch(g){l(g)}}:l;const o=e;o.decode&&(o.decode=i),o.loading==="lazy"&&(o.loading="eager"),r?(e.srcset="",e.src=n):e.href.baseVal=n})}async function Lr(e,t){const a=Q(e.childNodes).map(n=>Nt(n,t));await Promise.all(a).then(()=>e)}async function Nt(e,t){B(e,Element)&&(await Pr(e,t),await Fr(e,t),await Lr(e,t))}function Mr(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 a=t.style;return a!=null&&Object.keys(a).forEach(n=>{r[n]=a[n]}),e}const ht={};async function ft(e){let t=ht[e];if(t!=null)return t;const a=await(await fetch(e)).text();return t={url:e,cssText:a},ht[e]=t,t}async function pt(e,t){let r=e.cssText;const a=/url\(["']?([^"')]+)["']?\)/g,i=(r.match(/url\([^)]+\)/g)||[]).map(async l=>{let o=l.replace(a,"$1");return o.startsWith("https://")||(o=new URL(o,e.url).href),jt(o,t.fetchRequestInit,({result:m})=>(r=r.replace(l,`url(${m})`),[l,m]))});return Promise.all(i).then(()=>r)}function gt(e){if(e==null)return[];const t=[],r=/(\/\*[\s\S]*?\*\/)/gi;let a=e.replace(r,"");const n=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){const m=n.exec(a);if(m===null)break;t.push(m[0])}a=a.replace(n,"");const i=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,l="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})",o=new RegExp(l,"gi");for(;;){let m=i.exec(a);if(m===null){if(m=o.exec(a),m===null)break;i.lastIndex=o.lastIndex}else o.lastIndex=i.lastIndex;t.push(m[0])}return t}async function Ir(e,t){const r=[],a=[];return e.forEach(n=>{if("cssRules"in n)try{Q(n.cssRules||[]).forEach((i,l)=>{if(i.type===CSSRule.IMPORT_RULE){let o=l+1;const m=i.href,g=ft(m).then(h=>pt(h,t)).then(h=>gt(h).forEach(y=>{try{n.insertRule(y,y.startsWith("@import")?o+=1:n.cssRules.length)}catch(x){console.error("Error inserting rule from remote css",{rule:y,error:x})}})).catch(h=>{console.error("Error loading remote css",h.toString())});a.push(g)}})}catch(i){const l=e.find(o=>o.href==null)||document.styleSheets[0];n.href!=null&&a.push(ft(n.href).then(o=>pt(o,t)).then(o=>gt(o).forEach(m=>{l.insertRule(m,l.cssRules.length)})).catch(o=>{console.error("Error loading remote stylesheet",o)})),console.error("Error inlining remote css file",i)}}),Promise.all(a).then(()=>(e.forEach(n=>{if("cssRules"in n)try{Q(n.cssRules||[]).forEach(i=>{r.push(i)})}catch(i){console.error(`Error while reading CSS rules from ${n.href}`,i)}}),r))}function Ar(e){return e.filter(t=>t.type===CSSRule.FONT_FACE_RULE).filter(t=>Ct(t.style.getPropertyValue("src")))}async function Br(e,t){if(e.ownerDocument==null)throw new Error("Provided element is not within a Document");const r=Q(e.ownerDocument.styleSheets),a=await Ir(r,t);return Ar(a)}function Rt(e){return e.trim().replace(/["']/g,"")}function Dr(e){const t=new Set;function r(a){(a.style.fontFamily||getComputedStyle(a).fontFamily).split(",").forEach(i=>{t.add(Rt(i))}),Array.from(a.children).forEach(i=>{i instanceof HTMLElement&&r(i)})}return r(e),t}async function Hr(e,t){const r=await Br(e,t),a=Dr(e);return(await Promise.all(r.filter(i=>a.has(Rt(i.style.fontFamily))).map(i=>{const l=i.parentStyleSheet?i.parentStyleSheet.href:null;return Et(i.cssText,l,t)}))).join(`
2
  `)}async function Vr(e,t){const r=t.fontEmbedCSS!=null?t.fontEmbedCSS:t.skipFonts?null:await Hr(e,t);if(r){const a=document.createElement("style"),n=document.createTextNode(r);a.appendChild(n),e.firstChild?e.insertBefore(a,e.firstChild):e.appendChild(a)}}async function Ur(e,t={}){const{width:r,height:a}=_t(e,t),n=await ke(e,t,!0);return await Vr(n,t),await Nt(n,t),Mr(n,t),await nr(n,r,a)}async function qr(e,t={}){const{width:r,height:a}=_t(e,t),n=await Ur(e,t),i=await je(n),l=document.createElement("canvas"),o=l.getContext("2d"),m=t.pixelRatio||tr(),g=t.canvasWidth||r,h=t.canvasHeight||a;return l.width=g*m,l.height=h*m,t.skipAutoScale||rr(l),l.style.width=`${g}`,l.style.height=`${h}`,t.backgroundColor&&(o.fillStyle=t.backgroundColor,o.fillRect(0,0,l.width,l.height)),o.drawImage(i,0,0,l.width,l.height),l}async function Or(e,t={}){const r=await qr(e,t);return await sr(r)}const Ae="#ffffff";function Wr(){return typeof window>"u"?Ae:window.getComputedStyle(document.documentElement).getPropertyValue("--bg-elevated").trim()||Ae}function zr(e){if(typeof window>"u")return Ae;const t=window.getComputedStyle(e).backgroundColor;return!t||t==="rgba(0, 0, 0, 0)"||t==="transparent"?Wr():t}async function Kr(e){var r,a;if(typeof window>"u"||!((a=(r=window.navigator)==null?void 0:r.clipboard)!=null&&a.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 Or(e,{pixelRatio:2,cacheBust:!0,backgroundColor:zr(e)});if(!t)throw new Error("Failed to render screenshot.");await window.navigator.clipboard.write([new window.ClipboardItem({"image/png":t})])}const xt=({targetRef:e,label:t})=>{const{toast:r}=Mt(),[a,n]=v.useState("idle"),i=v.useRef(null);v.useEffect(()=>()=>{i.current!==null&&window.clearTimeout(i.current)},[]);const l=v.useCallback(async()=>{const m=e.current;if(m){n("copying"),m.classList.add("is-capturing"),m.offsetHeight,await new Promise(g=>window.requestAnimationFrame(()=>g()));try{await Kr(m),n("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(()=>n("idle"),1500)}catch(g){n("idle"),r({title:"Copy failed",description:g instanceof Error&&g.message?g.message:"Could not copy the screenshot to your clipboard.",variant:"destructive"})}finally{m.classList.remove("is-capturing")}}},[e,t,r]),o=a==="copied"?"Copied":a==="copying"?"Copying…":"Copy image";return s.jsxs("button",{type:"button",className:"bm-copy-btn",onClick:l,disabled:a==="copying","aria-label":`Copy ${t} screenshot to clipboard`,title:`Copy ${t} screenshot to clipboard`,children:[s.jsx(Wt,{name:"copy",size:11}),o]})};function oe(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}const $t=[{label:"All",maxParametersExclusive:void 0},{label:"<1B",maxParametersExclusive:1e9},{label:"<3B",maxParametersExclusive:3e9},{label:"<6B",maxParametersExclusive:6e9},{label:"<12B",maxParametersExclusive:12e9},{label:"<32B",maxParametersExclusive:32e9},{label:"<128B",maxParametersExclusive:128e9},{label:"<500B",maxParametersExclusive:5e11}];function Gr(e){const t=e===null?void 0:Number(e);return $t.some(r=>r.maxParametersExclusive===t)?t:void 0}function Qr(e){return new Intl.NumberFormat("en",{notation:"compact",maximumSignificantDigits:3}).format(e)}function Xr(e){return[e.paper_id,e.task_id,e.dataset_id,e.model_name,e.harness??""].join("|")}function Yr(e){const t=new Map;for(const r of e){const a=Xr(r),n=t.get(a);if(!n){t.set(a,{...r,metrics:{...r.metrics||{}},sourceEvaluationIds:[r.id],ranksByMetric:r.best_metric&&r.best_rank!=null?{[r.best_metric]:r.best_rank}:{},parameterCount:r.num_parameters??null,hasParameterConflict:!1});continue}n.metrics={...n.metrics,...r.metrics||{}},n.sourceEvaluationIds.push(r.id),r.best_metric&&r.best_rank!=null&&(n.ranksByMetric[r.best_metric]=r.best_rank),r.num_parameters!=null&&!n.hasParameterConflict&&(n.parameterCount===null?n.parameterCount=r.num_parameters:n.parameterCount!==r.num_parameters&&(n.parameterCount=null,n.hasParameterConflict=!0))}return Array.from(t.values())}function bt(e,t){return t===void 0?e:e.filter(r=>r.parameterCount!==null&&r.parameterCount<t)}function yt(e,t){return t?e.id===t||e.sourceEvaluationIds.includes(t):!1}function wt(e,t){return e.ranksByMetric[t]??e.best_rank??9999}function Jr(e,t,r){if(e.length===0)return{points:[],sota:0,sotaModel:""};const a=e.map(h=>{var E;const y=oe((E=h.metrics)==null?void 0:E[t]),x=h.paper_published_date||"";return{eval:h,value:y,date:x}}).filter(h=>h.value!==null&&!!h.date).sort((h,y)=>h.date.localeCompare(y.date)),n=[];let i=null;for(const h of a){const y=i==null?!0:r==="↓"?h.value<i:h.value>i;y&&(i=h.value),n.push({value:h.value,date:h.date,dateLabel:h.date.slice(0,7),modelName:h.eval.model_name||"",paperTitle:h.eval.paper_title||"",paperRouteId:h.eval.paper_arxiv_id||h.eval.paper_id||null,isSota:y})}const o=e.map(h=>{var y;return{eval:h,value:oe((y=h.metrics)==null?void 0:y[t])}}).filter(h=>h.value!==null).sort((h,y)=>r==="↓"?h.value-y.value:y.value-h.value)[0],m=(o==null?void 0:o.value)??0,g=(o==null?void 0:o.eval.model_name)||(o==null?void 0:o.eval.paper_title)||"";return{points:n,sota:m,sotaModel:g}}const Zr=5;function es(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 a=t.match(/^(?:https?:\/\/(?:www\.)?paperswithcode\.co)?\/paper\/([^/?#]+)/i);return(a==null?void 0:a[1])??null}function we(e,t){return e?s.jsx(ve,{title:e}):t||"—"}const ys=()=>{var qe,Oe,We,ze,Ke,Ge,Qe,Xe,Ye,Je,Ze,et,tt,rt;const{datasetSlug:e}=It(),[t,r]=At(),a=t.get("task")||void 0,n=t.get("eval")||void 0,i=Gr(t.get("max_parameters_exclusive")),{preferences:l,setHideClosedSourceEvals:o}=Bt(),m=v.useRef(null),g=v.useRef(!1),h=v.useRef(null),y=v.useRef(null),x=ee({queryKey:["dataset",e,"with-paper",a,l.hide_closed_source_evals?"open":"all"],queryFn:()=>ne.getDatasetBySlug(e,{include_paper:!0,task:a,is_open:l.hide_closed_source_evals?!0:void 0}),enabled:!!e,staleTime:10*60*1e3}),E=ee({queryKey:["dataset-evals",(qe=x.data)==null?void 0:qe.id],queryFn:()=>Vt.byDataset(x.data.id),enabled:!!((Oe=x.data)!=null&&Oe.id),staleTime:5*60*1e3}),z=ee({queryKey:["dataset-tasks",(We=x.data)==null?void 0:We.id],queryFn:()=>ne.datasetTasks(x.data.id),enabled:!!((ze=x.data)!=null&&ze.id),staleTime:10*60*1e3}),de=ee({queryKey:["metric-directions"],queryFn:()=>ne.metricDirections(),staleTime:60*60*1e3}),M=v.useMemo(()=>{var c;return!n||!((c=E.data)!=null&&c.length)?null:E.data.find(p=>p.id===n)||null},[n,E.data]),T=v.useMemo(()=>{const c=z.data||[];if(c.length===0)return null;if(M!=null&&M.task_id&&c.some(u=>u.id===M.task_id))return M.task_id;if(a){const u=c.find(C=>C.slug===a);if(u)return u.id}if(c.length===1)return c[0].id;const p=E.data||[];if(p.length>0){const u=new Map;for(const k of p)u.set(k.task_id,(u.get(k.task_id)||0)+1);let C=null,L=-1;for(const k of c){const A=u.get(k.id)||0;A>L&&(L=A,C=k.id)}if(C)return C}return c[0].id},[z.data,E.data,a,M]),X=ee({queryKey:["task-benchmark-trends",T,l.hide_closed_source_evals?!0:void 0],queryFn:()=>ne.trendingBenchmarks(T,{limit:100,min_recent_papers:0,is_open:l.hide_closed_source_evals?!0:void 0}),enabled:!!T&&!!((Ke=x.data)!=null&&Ke.id),staleTime:10*60*1e3}),I=v.useMemo(()=>{var c;return(((c=X.data)==null?void 0:c.results)||[]).find(p=>{var u;return p.id===((u=x.data)==null?void 0:u.id)})||null},[X.data,(Ge=x.data)==null?void 0:Ge.id]),ue=ee({queryKey:["leaderboard-metrics",(Qe=x.data)==null?void 0:Qe.id,T],queryFn:()=>ne.leaderboardMetrics(x.data.id,T),enabled:!!((Xe=x.data)!=null&&Xe.id)&&!!T,staleTime:10*60*1e3}),te=v.useMemo(()=>Gt(E.data,T,l.hide_closed_source_evals),[E.data,T,l.hide_closed_source_evals]),Y=te.visible,N=te.hiddenClosed,q=te.topHiddenClosed,D=v.useMemo(()=>Yr(Y),[Y]),re=v.useMemo(()=>bt(D,i),[D,i]),Se=v.useMemo(()=>{const c=new Set;return D.forEach(p=>{p.best_metric&&c.add(p.best_metric),Object.keys(p.metrics||{}).forEach(u=>c.add(u))}),Array.from(c)},[D]),J=v.useMemo(()=>(ue.data||[]).map(c=>c.metric_name),[ue.data]),P=J.length?J:Se,O=v.useMemo(()=>{var C,L;if(D.length===0)return P[0]||"";const c=new Map;for(const k of D){const A=k.best_metric;!A||oe((C=k.metrics)==null?void 0:C[A])===null||J.length&&!P.includes(A)||c.set(A,(c.get(A)||0)+1)}let p=null,u=0;for(const[k,A]of c)A>u&&(u=A,p=k);return p||P[0]||((L=D[0])==null?void 0:L.best_metric)||""},[D,P,J]),me=(Ye=t.get("metric"))==null?void 0:Ye.trim(),b=(me?P.find(c=>c.toLocaleLowerCase()===me.toLocaleLowerCase()):void 0)||(M==null?void 0:M.best_metric)||O,K=(((Ze=(Je=de.data)==null?void 0:Je.directions)==null?void 0:Ze[b])||"higher_is_better")==="lower_is_better"?"↓":"↑",G=v.useMemo(()=>!b||!P.includes(b)?P:[b,...P.filter(c=>c!==b)],[P,b]),d=v.useMemo(()=>G.length===0?b?[b]:[]:G.slice(0,Zr),[G,b]),{points:f,sota:R,sotaModel:_}=v.useMemo(()=>Jr(re,b,K),[re,b,K]),w=i===void 0?(et=x.data)==null?void 0:et.leaderboard_summary:void 0,j=E.isSuccess&&z.isSuccess&&de.isSuccess&&(!T||ue.isSuccess),V=j?b:w==null?void 0:w.metric,W=j?R:w==null?void 0:w.value,Ee=j?_:w==null?void 0:w.model_name,fe=!j&&!w,pe=i!==void 0&&!j;v.useEffect(()=>{if(g.current||!n||!E.data||E.data.length===0)return;const c=m.current;c&&(g.current=!0,c.scrollIntoView({behavior:"smooth",block:"start"}))},[n,E.data]);const U=v.useMemo(()=>{const c=z.data||[];return T?c.find(p=>p.id===T)||c[0]||null:c[0]||null},[z.data,T]),Ne=ee({queryKey:["area",U==null?void 0:U.area_id],queryFn:()=>ne.getArea(U.area_id),enabled:!!(U!=null&&U.area_id),staleTime:10*60*1e3});if(x.isLoading)return s.jsxs("div",{className:"page",children:[s.jsx(ye,{className:"h-12 w-1/2 mb-6"}),s.jsx(ye,{className:"h-64 w-full"})]});if(x.error||!x.data)return s.jsx("div",{className:"page",children:s.jsx(Ut,{variant:"destructive",children:s.jsx(qt,{children:"Benchmark not found."})})});const S=x.data,ge=re.slice().sort((c,p)=>{var L,k;const u=oe((L=c.metrics)==null?void 0:L[b]),C=oe((k=p.metrics)==null?void 0:k[b]);return u!==null&&C!==null?K==="↓"?u-C:C-u:u!==null?-1:C!==null?1:wt(c,b)-wt(p,b)}),Ve=!!S.supports_harness,Re={parameter_coverage_known:D.filter(c=>c.parameterCount!==null).length,parameter_coverage_total:D.length},xe=Re.parameter_coverage_known>0,Tt=c=>bt(D,c).length>0,Ue=c=>{r(p=>{const u=new URLSearchParams(p);return c===void 0?u.delete("max_parameters_exclusive"):u.set("max_parameters_exclusive",String(c)),u})},$e=c=>{r(p=>{const u=new URLSearchParams(p);return u.set("metric",c),u})},$=n&&ge.find(c=>yt(c,n))||null,F=S.introducing_paper??void 0,he=(F==null?void 0:F.arxiv_id)||(F==null?void 0:F.id)||es(S.paper_url),Z=(F==null?void 0:F.title)||S.introducing_paper_title||null,se=((tt=F==null?void 0:F.published)==null?void 0:tt.slice(0,4))||S.introduced_year||null,Pt=!!he||!!S.paper_url||!!Z,Ft=F!=null&&F.arxiv_id||(rt=S.paper_url)!=null&&rt.match(/^https?:\/\/(?:www\.)?arxiv\.org\//i)?`arXiv:${he}`:`Paper ${he}`;return s.jsx("div",{className:"page",children:s.jsxs("div",{className:"bm-page",children:[s.jsxs("div",{className:"breadcrumb",children:[s.jsx(ae,{to:"/tasks",children:"Tasks"}),Ne.data&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"sep",children:"/"}),s.jsx(ae,{to:`/tasks#area-${Kt(Ne.data.name)}`,children:Ne.data.name})]}),U&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"sep",children:"/"}),s.jsx(ae,{to:`/tasks/${U.slug||U.id}`,children:U.name})]}),s.jsx("span",{className:"sep",children:"/"}),s.jsx("span",{style:{color:"var(--accent-text)"},children:S.name})]}),s.jsxs("div",{className:"bm-title-row",children:[s.jsx("h1",{className:"bm-title",children:S.name}),I&&s.jsxs("div",{className:"bm-title-trend","aria-label":`${S.name} reporting trend`,children:[s.jsx(Ot,{history:I.history,benchmarkName:I.name}),s.jsxs("span",{className:"bm-title-trend-summary",children:[s.jsx("strong",{children:I.recent_paper_count})," ",I.recent_paper_count===1?"paper":"papers",I.rate_change==null?I.recent_paper_count>0&&s.jsx("span",{className:"benchmark-trend-change is-new",children:"new"}):s.jsxs("span",{className:`benchmark-trend-change ${I.rate_change>=1?"is-up":"is-down"}`,children:[I.rate_change>=1?"↑":"↓"," ",I.rate_change.toFixed(1),"×"]})]})]})]}),s.jsxs("div",{className:"bm-subtitle",children:[fe?s.jsx(ye,{className:"h-5 w-64 bm-summary-skeleton","aria-label":"Loading benchmark summary"}):s.jsxs("span",{children:[V&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"metric-tag",children:V}),s.jsx("span",{style:{color:"var(--hairline-strong)",margin:"0 8px"},children:"·"})]}),Ee?s.jsxs("span",{children:["Best: ",s.jsx("span",{className:"best-name",children:ce(W)})," by ",s.jsx("span",{className:"best-name",style:{fontStyle:"normal"},children:Ee})]}):s.jsxs("span",{children:[ge.length," evaluations"]})]}),S.hf_url&&s.jsxs("a",{className:"bm-action-btn",href:S.hf_url,target:"_blank",rel:"noopener noreferrer",children:[s.jsx("span",{"aria-hidden":"true",children:"🤗"})," View on Hugging Face"]})]}),S.description&&s.jsx("p",{className:"bm-description",children:S.description}),l.hide_closed_source_evals&&N.length>0&&s.jsxs("div",{className:"bm-hidden-closed-notice",children:[s.jsxs("span",{children:[N.length," closed-source ",N.length===1?"row is":"rows are"," hidden",q!=null&&q.model_name?s.jsxs(s.Fragment,{children:[", including ",s.jsx("strong",{children:q.model_name})]}):null,"."]}),s.jsx("button",{type:"button",className:"bm-hidden-closed-action",onClick:()=>{o(!1)},children:"Show closed-source"})]}),Pt&&s.jsxs("div",{className:"method-source",style:{marginTop:0,marginBottom:18},children:[s.jsx("span",{className:"method-source-label",children:"Source"}),he?s.jsxs(ae,{to:`/paper/${he}`,target:"_blank",rel:"noopener noreferrer",className:"method-source-link",children:[s.jsx("span",{className:"method-source-title",children:Z?s.jsx(ve,{title:Z}):Ft}),se&&s.jsx("span",{className:"method-source-meta",children:se})]}):S.paper_url?s.jsxs("a",{href:zt(S.paper_url)??void 0,target:"_blank",rel:"noopener noreferrer",className:"method-source-link",children:[s.jsx("span",{className:"method-source-title",children:Z?s.jsx(ve,{title:Z}):S.paper_url}),se&&s.jsx("span",{className:"method-source-meta",children:se})]}):s.jsxs("div",{className:"method-source-link is-static",children:[s.jsx("span",{className:"method-source-title",children:Z?s.jsx(ve,{title:Z}):null}),se&&s.jsx("span",{className:"method-source-meta",children:se})]})]}),!pe&&f.length>0&&s.jsxs("div",{className:"bm-card",ref:h,children:[s.jsxs("div",{className:"bm-card-screenshot-header","aria-hidden":"true",children:[s.jsxs("div",{className:"bm-card-screenshot-title",children:[s.jsx("span",{className:"bm-card-screenshot-eyebrow",children:"Benchmark"}),s.jsx("span",{className:"bm-card-screenshot-name",children:S.name})]}),s.jsxs("div",{className:"bm-card-screenshot-brand",children:[s.jsxs("span",{className:"brand",children:[s.jsx("span",{className:"brand-mark"}),s.jsxs("span",{className:"brand-name",children:["Papers ",s.jsx("em",{children:"With Code"})]})]}),s.jsx("span",{className:"bm-card-screenshot-url",children:"paperswithcode.co"})]})]}),s.jsxs("div",{className:"bm-card-head",children:[s.jsx("div",{className:"bm-card-title",children:"SOTA progression"}),s.jsxs("div",{className:"bm-card-actions",children:[P.length>1&&s.jsxs("label",{className:"bm-view-select",children:[s.jsx("span",{className:"bm-view-select-label",children:"View"}),s.jsx("select",{value:b,onChange:c=>$e(c.target.value),children:G.map(c=>s.jsx("option",{value:c,children:c},c))})]}),s.jsxs("label",{className:"bm-closed-toggle",title:"Show or hide evaluations of closed-source models",children:[s.jsx(ot,{className:"bm-closed-toggle-switch",checked:!l.hide_closed_source_evals,onCheckedChange:c=>{o(!c)},"aria-label":"Show closed-source models"}),s.jsx("span",{className:"bm-closed-toggle-label",children:"Closed-source"})]}),s.jsx(xt,{targetRef:h,label:"SOTA chart"})]})]}),s.jsx("div",{className:"bm-chart-wrap",children:s.jsx(Xt,{points:f,metric:b})}),s.jsxs("div",{className:"bm-chart-foot",children:[s.jsx("span",{className:"legend-dot"}),i===void 0?"All models":"Filtered models"," over time · highlighted dots track the running best · hover for the model · click to open the paper"]})]}),$&&(()=>{var L,k;const c=$.paper_arxiv_id||$.paper_id,p=$.paper_title||($.paper_arxiv_id?`arXiv:${$.paper_arxiv_id}`:null),u=$.best_metric&&((L=$.metrics)==null?void 0:L[$.best_metric])!==void 0?$.best_metric:b,C=(k=$.metrics)==null?void 0:k[u];return s.jsxs("div",{className:"bm-highlight-banner",role:"status",children:[s.jsx("span",{className:"bm-highlight-dot","aria-hidden":"true"}),s.jsxs("div",{className:"bm-highlight-text",children:[s.jsx("span",{className:"bm-highlight-label",children:"Comparing result"}),s.jsxs("span",{className:"bm-highlight-paper",children:[$.model_name||p||"—",$.harness?` · ${$.harness}`:""]}),s.jsxs("span",{className:"bm-highlight-meta",children:[C!==void 0&&u?s.jsxs(s.Fragment,{children:[u,": ",ce(C),p?" · ":""]}):null,c?s.jsx(ae,{to:`/paper/${c}`,children:we($.paper_title,p)}):we($.paper_title,p)]})]})]})})(),s.jsxs("div",{className:"bm-card",ref:y,children:[s.jsxs("div",{className:"bm-card-screenshot-header","aria-hidden":"true",children:[s.jsxs("div",{className:"bm-card-screenshot-title",children:[s.jsx("span",{className:"bm-card-screenshot-eyebrow",children:"Benchmark"}),s.jsx("span",{className:"bm-card-screenshot-name",children:S.name})]}),s.jsxs("div",{className:"bm-card-screenshot-brand",children:[s.jsxs("span",{className:"brand",children:[s.jsx("span",{className:"brand-mark"}),s.jsxs("span",{className:"brand-name",children:["Papers ",s.jsx("em",{children:"With Code"})]})]}),s.jsx("span",{className:"bm-card-screenshot-url",children:"paperswithcode.co"})]})]}),s.jsxs("div",{className:"bm-card-head",children:[s.jsx("div",{className:"bm-card-title",children:"Leaderboard"}),s.jsxs("div",{className:"bm-card-actions",children:[P.length>1&&s.jsxs("label",{className:"bm-view-select",children:[s.jsx("span",{className:"bm-view-select-label",children:"View"}),s.jsx("select",{value:b,onChange:c=>$e(c.target.value),children:G.map(c=>s.jsx("option",{value:c,children:c},c))})]}),s.jsxs("label",{className:"bm-closed-toggle",title:"Show or hide evaluations of closed-source models",children:[s.jsx(ot,{className:"bm-closed-toggle-switch",checked:!l.hide_closed_source_evals,onCheckedChange:c=>{o(!c)},"aria-label":"Show closed-source models"}),s.jsx("span",{className:"bm-closed-toggle-label",children:"Closed-source"})]}),!pe&&!xe&&E.isSuccess?s.jsx("span",{className:"bm-parameter-unavailable",children:"Parameter metadata unavailable"}):null,s.jsx(xt,{targetRef:y,label:"leaderboard"})]})]}),!pe&&xe&&s.jsxs("div",{className:"bm-parameter-filter-bar",children:[s.jsx("span",{className:"bm-parameter-filter-label",children:"Parameters Size"}),s.jsx("div",{className:"bm-parameter-filter-options",role:"group","aria-label":"Filter leaderboard by parameter size",children:$t.map(c=>{const p=i===c.maxParametersExclusive,u=!p&&!Tt(c.maxParametersExclusive);return s.jsx("button",{type:"button",className:`bm-parameter-filter-option${p?" is-active":""}`,"aria-pressed":p,disabled:u,onClick:()=>Ue(c.maxParametersExclusive),children:c.label},c.label)})}),s.jsxs("span",{className:"bm-parameter-coverage",children:["Parameters known for ",Re.parameter_coverage_known," of ",Re.parameter_coverage_total," entries"]})]}),E.isLoading||pe?s.jsx("div",{style:{padding:16},children:Array.from({length:5}).map((c,p)=>s.jsx(ye,{className:"h-10 w-full mb-2"},p))}):ge.length===0?i?s.jsxs("div",{className:"no-results",children:["No known parameter counts match this filter. "," ",s.jsx("button",{type:"button",className:"bm-empty-filter-action",onClick:()=>Ue(void 0),children:"Show all"})]}):s.jsx("div",{className:"no-results",children:"No evaluations submitted yet."}):s.jsx("div",{className:"bm-table-scroll",children:s.jsxs("table",{className:"bm-table",children:[s.jsx("thead",{children:s.jsxs("tr",{children:[s.jsx("th",{className:"col-rank",children:"Rank"}),s.jsx("th",{className:"col-model",children:"Model"}),Ve&&s.jsx("th",{className:"col-harness",children:"Harness"}),xe&&s.jsx("th",{className:"col-parameters",children:"Parameters"}),d.map(c=>{const p=c===b;return s.jsx("th",{className:`col-value ${p?"is-active":""}`,"aria-sort":p?K==="↓"?"ascending":"descending":"none",children:s.jsxs("button",{type:"button",className:"bm-metric-header",onClick:()=>$e(c),"aria-pressed":p,title:`Sort by ${c}`,children:[c,p?` ${K}`:""]})},c)}),s.jsx("th",{className:"col-paper",children:"Paper"}),s.jsx("th",{className:"col-year",children:"Year"})]})}),s.jsx("tbody",{children:(()=>{let c=null,p=0;return ge.map((u,C)=>{var at,nt;const L=oe((at=u.metrics)==null?void 0:at[b]);let k=null;L!==null&&((c===null||L!==c)&&(p=C+1,c=L),k=p);const A=u.paper_arxiv_id||u.paper_id,st=u.paper_title||(u.paper_arxiv_id?`arXiv:${u.paper_arxiv_id}`:null),Te=yt(u,n);return s.jsxs("tr",{ref:Te?m:void 0,className:Te?"is-highlighted":void 0,children:[s.jsx("td",{className:"col-rank",children:k??"—"}),s.jsxs("td",{className:"col-model",children:[Te&&s.jsx("span",{className:"bm-row-marker","aria-hidden":"true"}),u.hf_model_url?s.jsx("a",{href:u.hf_model_url,target:"_blank",rel:"noopener noreferrer",className:"bm-model-link",title:`Open ${u.model_name||"model"} on Hugging Face`,children:u.model_name||"—"}):u.model_name||"—",u.is_open===!1&&s.jsx(Dt,{}),(u.external??u.is_external)&&s.jsx(Ht,{sourceUrl:u.source_url||u.external_source_url||u.result_url})]}),Ve&&s.jsx("td",{className:"col-harness",children:u.harness||"—"}),xe&&s.jsx("td",{className:"col-parameters",title:u.parameterCount===null?void 0:u.parameterCount.toLocaleString("en-US"),"aria-label":u.parameterCount===null?"Parameters unknown":`${u.parameterCount.toLocaleString("en-US")} parameters`,children:u.parameterCount===null?"—":Qr(u.parameterCount)}),d.map(Pe=>{var lt;const it=Pe===b,be=(lt=u.metrics)==null?void 0:lt[Pe];return s.jsx("td",{className:`col-value${it?" is-active":""}${it&&k===1?" is-best":""}`,children:be!=null&&be!==""?ce(be):"—"},Pe)}),s.jsx("td",{className:"col-paper",children:A?s.jsx(ae,{to:`/paper/${A}`,children:we(u.paper_title,st)}):we(u.paper_title,st)}),s.jsx("td",{className:"col-year",children:((nt=u.paper_published_date)==null?void 0:nt.slice(0,4))||"—"})]},u.id)})})()})]})})]})]})})};export{ys as default};
 
1
+ import{u as Lt,r as v,j as s,s as ce,e as Mt,c as It,a as At,f as Bt,L as ae}from"./index-BfGRWIiQ.js";import{u as ee}from"./useQuery-uhyHf514.js";import{c as ne}from"./catalog-BsVxStBB.js";import{C as Dt,E as Ht,e as Vt}from"./ExternalSourceEvalBadge-DJbjkUvR.js";import{S as ye}from"./skeleton-7gHbNXZz.js";import{S as ot}from"./switch-Do_Ydvtn.js";import{A as Ut,a as qt}from"./alert-D4lZhgu4.js";import{L as ve}from"./LatexTitle-DPJPslOM.js";import{B as Ot}from"./BenchmarkTrendSparkline-CtBP2P-b.js";import{I as Wt}from"./components-fo0inhXZ.js";import{s as zt}from"./safeExternalHref-CkBrsh84.js";import{s as Kt}from"./slug-BpH-Nkvz.js";import"./papers-PnGxH-RF.js";import"./hover-card-HVpXfIHl.js";import"./index-DPh0SyoW.js";import"./katex.min-BSBacQyE.js";import"./transform-BVvRkYPJ.js";function Gt(e,t,r){const a=t?(e??[]).filter(l=>l.task_id===t):e??[],n=a.filter(l=>l.is_open===!1),i=n.reduce((l,o)=>l?(o.best_rank??Number.POSITIVE_INFINITY)<(l.best_rank??Number.POSITIVE_INFINITY)?o:l:o,null);return{visible:r?a.filter(l=>l.is_open!==!1):a,hiddenClosed:n,topHiddenClosed:i}}function ct(e){const t=e.length===7?`${e}-01`:e,r=new Date(t).getTime();return Number.isFinite(r)?r:0}const Fe=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Le(e){const t=new Date(e);return{year:t.getFullYear(),month:t.getMonth()}}function Qt(e,t){if(e===t){const{year:m,month:g}=Le(e);return[{timestamp:new Date(m,g,1).getTime(),key:`${m}-${g}`,label:`${Fe[g]} ${m}`}]}const r=Le(e),a=Le(t);if(r.year===a.year){const m=a.month-r.month+1;let g=1;const h=12;m>h&&(g=Math.ceil(m/h));const y=[];for(let x=r.month;x<=a.month;x+=g)y.push({timestamp:new Date(r.year,x,1).getTime(),key:`${r.year}-${x}`,label:m<=3?`${Fe[x]} ${r.year}`:Fe[x]});return y}const n=a.year-r.year+1;let i=1;const l=12;n>l&&(i=Math.ceil(n/l));const o=[];for(let m=r.year;m<=a.year;m+=i)o.push({timestamp:new Date(m,0,1).getTime(),key:String(m),label:String(m)});return o}const Xt=({points:e,metric:t})=>{const r=Lt(),[a,n]=v.useState(null),i=880,l=320,o=60,m=30,g=40,h=50,y=e.map(d=>d.value),x=Math.min(...y),z=Math.max(...y)-x||1,de=i-o-m,M=l-g-h,T=e.map(d=>ct(d.date)),X=Math.min(...T),I=Math.max(...T),ue=I-X||1,te=d=>X===I?o+de/2:o+(d-X)/ue*de,Y=e.map((d,f)=>{const R=te(ct(d.date)),_=(d.value-x)/z,w=g+M*(1-_);return{x:R,y:w,data:d,idx:f}}),N=Y.filter(d=>d.data.isSota);let q="";if(N.length>=2){q=`M${N[0].x},${N[0].y}`;for(let d=1;d<N.length;d++){const f=N[d-1],R=N[d],_=(f.x+R.x)/2;q+=` C${_},${f.y} ${_},${R.y} ${R.x},${R.y}`}}const D=5.4,re=8,Se=9,J=d=>{const f=d.data.modelName||d.data.paperTitle||"";if(!f)return null;const R=f.length>22?f.slice(0,21)+"…":f,_=R.length*D;let w=d.x-_/2,j=d.x+_/2,V="middle";return w<o?(w=o,j=o+_,V="start"):j>i-m&&(j=i-m,w=j-_,V="end"),{x:V==="start"?o:V==="end"?i-m:d.x,y:d.y-Se,text:R,anchor:V,left:w,right:j}},P=[],O=N.length>0?J(N[N.length-1]):null;let me=-1/0;for(let d=0;d<N.length-1;d++){const f=J(N[d]);f&&(f.left<me+re||O&&f.right>O.left-re||(me=f.right,P.push({x:f.x,y:f.y,text:f.text,anchor:f.anchor})))}O&&P.push({x:O.x,y:O.y,text:O.text,anchor:O.anchor});const He=Qt(X,I),b=5,Ce=d=>n(f=>f===d?null:f),K=d=>{d&&r(`/paper/${d}`)},G=(d,f)=>{const _=`${d.data.modelName||d.data.paperTitle||"Unknown model"}: ${ce(d.data.value)} on ${d.data.dateLabel}`,w=!!d.data.paperRouteId;return s.jsxs("g",{children:[f,s.jsx("circle",{cx:d.x,cy:d.y,r:"10",fill:"transparent",style:{cursor:w?"pointer":"default",outline:"none"},tabIndex:0,role:w?"link":"img","aria-label":_,onMouseEnter:()=>n(d.idx),onMouseLeave:()=>Ce(d.idx),onFocus:()=>n(d.idx),onBlur:()=>Ce(d.idx),onClick:()=>K(d.data.paperRouteId),onKeyDown:j=>{w&&(j.key==="Enter"||j.key===" ")&&(j.preventDefault(),K(d.data.paperRouteId))},children:s.jsx("title",{children:_})})]},d.idx)};return s.jsxs("svg",{width:"100%",viewBox:`0 0 ${i} ${l}`,style:{display:"block"},children:[s.jsx("text",{x:o-38,y:g+M/2,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-faint)",textAnchor:"middle",transform:`rotate(-90 ${o-38} ${g+M/2})`,children:t}),Array.from({length:b}).map((d,f)=>{const R=f/(b-1),_=g+M*(1-R),w=x+z*R;return s.jsxs("g",{children:[s.jsx("line",{x1:o,y1:_,x2:i-m,y2:_,stroke:"var(--hairline)",strokeWidth:"1"}),s.jsx("text",{x:o-10,y:_+4,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-faint)",textAnchor:"end",children:ce(w)})]},f)}),He.map(d=>{const f=te(d.timestamp);return s.jsx("text",{x:f,y:l-h+18,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-soft)",textAnchor:"middle",children:d.label},d.key)}),Y.filter(d=>!d.data.isSota).map(d=>{const f=a===d.idx;return G(d,s.jsx("circle",{cx:d.x,cy:d.y,r:f?3:2,fill:"var(--ink-faint)",opacity:f?1:.45,style:{transition:"r 0.12s ease, opacity 0.12s ease"}}))}),q&&s.jsx("path",{d:q,stroke:"var(--accent)",strokeWidth:"2",fill:"none",strokeLinejoin:"round",strokeLinecap:"round"}),N.map(d=>{const f=a===d.idx;return G(d,s.jsx("circle",{cx:d.x,cy:d.y,r:f?4.5:3,fill:f?"var(--accent)":"var(--bg-elevated)",stroke:"var(--accent)",strokeWidth:"1.5",style:{transition:"r 0.12s ease, fill 0.12s ease"}}))}),P.map((d,f)=>s.jsx("text",{x:d.x,y:d.y,fontSize:"9.5",fontFamily:"var(--mono)",fill:"var(--ink-soft)",textAnchor:d.anchor,pointerEvents:"none",style:{paintOrder:"stroke",stroke:"var(--bg-elevated)",strokeWidth:3,strokeLinejoin:"round"},children:d.text},`label-${f}`)),a!==null&&Y[a]&&(()=>{const d=Y[a],f=d.data.modelName||d.data.paperTitle||"Unknown model",_=`${f.length>40?f.slice(0,39)+"…":f}: ${ce(d.data.value)}`,j=Math.max(120,Math.min(340,_.length*6.6+24)),V=30;let W=d.x-j/2;W<o&&(W=o),W+j>i-m&&(W=i-m-j);const fe=d.y-V-14>=g?d.y-V-12:d.y+12;return s.jsxs("g",{pointerEvents:"none",children:[s.jsx("rect",{x:W,y:fe,width:j,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))"}}),s.jsx("text",{x:W+12,y:fe+19,fontSize:"12",fontFamily:"var(--sans)",fill:"var(--ink)",fontWeight:500,children:_})]})})()]})};function Yt(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(),a=r.createElement("base"),n=r.createElement("a");return r.head.appendChild(a),r.body.appendChild(n),t&&(a.href=t),n.href=e,n.href}const Jt=(()=>{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,a=e.length;r<a;r++)t.push(e[r]);return t}let ie=null;function vt(e={}){return ie||(e.includeStyleProperties?(ie=e.includeStyleProperties,ie):(ie=Q(window.getComputedStyle(document.documentElement)),ie))}function _e(e,t){const a=(e.ownerDocument.defaultView||window).getComputedStyle(e).getPropertyValue(t);return a?parseFloat(a.replace("px","")):0}function Zt(e){const t=_e(e,"border-left-width"),r=_e(e,"border-right-width");return e.clientWidth+t+r}function er(e){const t=_e(e,"border-top-width"),r=_e(e,"border-bottom-width");return e.clientHeight+t+r}function _t(e,t={}){const r=t.width||Zt(e),a=t.height||er(e);return{width:r,height:a}}function tr(){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 H=16384;function rr(e){(e.width>H||e.height>H)&&(e.width>H&&e.height>H?e.width>e.height?(e.height*=H/e.width,e.width=H):(e.width*=H/e.height,e.height=H):e.width>H?(e.height*=H/e.width,e.width=H):(e.width*=H/e.height,e.height=H))}function sr(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 a=window.atob(e.toDataURL(t.type?t.type:void 0,t.quality?t.quality:void 0).split(",")[1]),n=a.length,i=new Uint8Array(n);for(let l=0;l<n;l+=1)i[l]=a.charCodeAt(l);r(new Blob([i],{type:t.type?t.type:"image/png"}))})}function je(e){return new Promise((t,r)=>{const a=new Image;a.onload=()=>{a.decode().then(()=>{requestAnimationFrame(()=>t(a))})},a.onerror=r,a.crossOrigin="anonymous",a.decoding="async",a.src=e})}async function ar(e){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then(t=>`data:image/svg+xml;charset=utf-8,${t}`)}async function nr(e,t,r){const a="http://www.w3.org/2000/svg",n=document.createElementNS(a,"svg"),i=document.createElementNS(a,"foreignObject");return n.setAttribute("width",`${t}`),n.setAttribute("height",`${r}`),n.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"),n.appendChild(i),i.appendChild(e),ar(n)}const B=(e,t)=>{if(e instanceof t)return!0;const r=Object.getPrototypeOf(e);return r===null?!1:r.constructor.name===t.name||B(r,t)};function ir(e){const t=e.getPropertyValue("content");return`${e.cssText} content: '${t.replace(/'|"/g,"")}';`}function lr(e,t){return vt(t).map(r=>{const a=e.getPropertyValue(r),n=e.getPropertyPriority(r);return`${r}: ${a}${n?" !important":""};`}).join(" ")}function or(e,t,r,a){const n=`.${e}:${t}`,i=r.cssText?ir(r):lr(r,a);return document.createTextNode(`${n}{${i}}`)}function dt(e,t,r,a){const n=window.getComputedStyle(e,r),i=n.getPropertyValue("content");if(i===""||i==="none")return;const l=Jt();try{t.className=`${t.className} ${l}`}catch{return}const o=document.createElement("style");o.appendChild(or(l,r,n,a)),t.appendChild(o)}function cr(e,t,r){dt(e,t,":before",r),dt(e,t,":after",r)}const ut="application/font-woff",mt="image/jpeg",dr={woff:ut,woff2:ut,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:mt,jpeg:mt,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function ur(e){const t=/\.([^./]*?)$/g.exec(e);return t?t[1]:""}function Be(e){const t=ur(e).toLowerCase();return dr[t]||""}function mr(e){return e.split(/,/)[1]}function Ie(e){return e.search(/^(data:)/)!==-1}function hr(e,t){return`data:${t};base64,${e}`}async function jt(e,t,r){const a=await fetch(e,t);if(a.status===404)throw new Error(`Resource "${a.url}" not found`);const n=await a.blob();return new Promise((i,l)=>{const o=new FileReader;o.onerror=l,o.onloadend=()=>{try{i(r({res:a,result:o.result}))}catch(m){l(m)}},o.readAsDataURL(n)})}const Me={};function fr(e,t,r){let a=e.replace(/\?.*/,"");return r&&(a=e),/ttf|otf|eot|woff2?/i.test(a)&&(a=a.replace(/.*\//,"")),t?`[${t}]${a}`:a}async function De(e,t,r){const a=fr(e,t,r.includeQueryParams);if(Me[a]!=null)return Me[a];r.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+new Date().getTime());let n;try{const i=await jt(e,r.fetchRequestInit,({res:l,result:o})=>(t||(t=l.headers.get("Content-Type")||""),mr(o)));n=hr(i,t)}catch(i){n=r.imagePlaceholder||"";let l=`Failed to fetch resource: ${e}`;i&&(l=typeof i=="string"?i:i.message),l&&console.warn(l)}return Me[a]=n,n}async function pr(e){const t=e.toDataURL();return t==="data:,"?e.cloneNode(!1):je(t)}async function gr(e,t){if(e.currentSrc){const i=document.createElement("canvas"),l=i.getContext("2d");i.width=e.clientWidth,i.height=e.clientHeight,l==null||l.drawImage(e,0,0,i.width,i.height);const o=i.toDataURL();return je(o)}const r=e.poster,a=Be(r),n=await De(r,a,t);return je(n)}async function xr(e,t){var r;try{if(!((r=e==null?void 0:e.contentDocument)===null||r===void 0)&&r.body)return await ke(e.contentDocument.body,t,!0)}catch{}return e.cloneNode(!1)}async function br(e,t){return B(e,HTMLCanvasElement)?pr(e):B(e,HTMLVideoElement)?gr(e,t):B(e,HTMLIFrameElement)?xr(e,t):e.cloneNode(kt(e))}const yr=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SLOT",kt=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SVG";async function wr(e,t,r){var a,n;if(kt(t))return t;let i=[];return yr(e)&&e.assignedNodes?i=Q(e.assignedNodes()):B(e,HTMLIFrameElement)&&(!((a=e.contentDocument)===null||a===void 0)&&a.body)?i=Q(e.contentDocument.body.childNodes):i=Q(((n=e.shadowRoot)!==null&&n!==void 0?n:e).childNodes),i.length===0||B(e,HTMLVideoElement)||await i.reduce((l,o)=>l.then(()=>ke(o,r)).then(m=>{m&&t.appendChild(m)}),Promise.resolve()),t}function vr(e,t,r){const a=t.style;if(!a)return;const n=window.getComputedStyle(e);n.cssText?(a.cssText=n.cssText,a.transformOrigin=n.transformOrigin):vt(r).forEach(i=>{let l=n.getPropertyValue(i);i==="font-size"&&l.endsWith("px")&&(l=`${Math.floor(parseFloat(l.substring(0,l.length-2)))-.1}px`),B(e,HTMLIFrameElement)&&i==="display"&&l==="inline"&&(l="block"),i==="d"&&t.getAttribute("d")&&(l=`path(${t.getAttribute("d")})`),a.setProperty(i,l,n.getPropertyPriority(i))})}function _r(e,t){B(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),B(e,HTMLInputElement)&&t.setAttribute("value",e.value)}function jr(e,t){if(B(e,HTMLSelectElement)){const r=t,a=Array.from(r.children).find(n=>e.value===n.getAttribute("value"));a&&a.setAttribute("selected","")}}function kr(e,t,r){return B(t,Element)&&(vr(e,t,r),cr(e,t,r),_r(e,t),jr(e,t)),t}async function Sr(e,t){const r=e.querySelectorAll?e.querySelectorAll("use"):[];if(r.length===0)return e;const a={};for(let i=0;i<r.length;i++){const o=r[i].getAttribute("xlink:href");if(o){const m=e.querySelector(o),g=document.querySelector(o);!m&&g&&!a[o]&&(a[o]=await ke(g,t,!0))}}const n=Object.values(a);if(n.length){const i="http://www.w3.org/1999/xhtml",l=document.createElementNS(i,"svg");l.setAttribute("xmlns",i),l.style.position="absolute",l.style.width="0",l.style.height="0",l.style.overflow="hidden",l.style.display="none";const o=document.createElementNS(i,"defs");l.appendChild(o);for(let m=0;m<n.length;m++)o.appendChild(n[m]);e.appendChild(l)}return e}async function ke(e,t,r){return!r&&t.filter&&!t.filter(e)?null:Promise.resolve(e).then(a=>br(a,t)).then(a=>wr(e,a,t)).then(a=>kr(e,a,t)).then(a=>Sr(a,t))}const St=/url\((['"]?)([^'"]+?)\1\)/g,Cr=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,Er=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function Nr(e){const t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}function Rr(e){const t=[];return e.replace(St,(r,a,n)=>(t.push(n),r)),t.filter(r=>!Ie(r))}async function $r(e,t,r,a,n){try{const i=r?Yt(t,r):t,l=Be(t);let o;return n||(o=await De(i,l,a)),e.replace(Nr(t),`$1${o}$3`)}catch{}return e}function Tr(e,{preferredFontFormat:t}){return t?e.replace(Er,r=>{for(;;){const[a,,n]=Cr.exec(r)||[];if(!n)return"";if(n===t)return`src: ${a};`}}):e}function Ct(e){return e.search(St)!==-1}async function Et(e,t,r){if(!Ct(e))return e;const a=Tr(e,r);return Rr(a).reduce((i,l)=>i.then(o=>$r(o,l,t,r)),Promise.resolve(a))}async function le(e,t,r){var a;const n=(a=t.style)===null||a===void 0?void 0:a.getPropertyValue(e);if(n){const i=await Et(n,null,r);return t.style.setProperty(e,i,t.style.getPropertyPriority(e)),!0}return!1}async function Pr(e,t){await le("background",e,t)||await le("background-image",e,t),await le("mask",e,t)||await le("-webkit-mask",e,t)||await le("mask-image",e,t)||await le("-webkit-mask-image",e,t)}async function Fr(e,t){const r=B(e,HTMLImageElement);if(!(r&&!Ie(e.src))&&!(B(e,SVGImageElement)&&!Ie(e.href.baseVal)))return;const a=r?e.src:e.href.baseVal,n=await De(a,Be(a),t);await new Promise((i,l)=>{e.onload=i,e.onerror=t.onImageErrorHandler?(...m)=>{try{i(t.onImageErrorHandler(...m))}catch(g){l(g)}}:l;const o=e;o.decode&&(o.decode=i),o.loading==="lazy"&&(o.loading="eager"),r?(e.srcset="",e.src=n):e.href.baseVal=n})}async function Lr(e,t){const a=Q(e.childNodes).map(n=>Nt(n,t));await Promise.all(a).then(()=>e)}async function Nt(e,t){B(e,Element)&&(await Pr(e,t),await Fr(e,t),await Lr(e,t))}function Mr(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 a=t.style;return a!=null&&Object.keys(a).forEach(n=>{r[n]=a[n]}),e}const ht={};async function ft(e){let t=ht[e];if(t!=null)return t;const a=await(await fetch(e)).text();return t={url:e,cssText:a},ht[e]=t,t}async function pt(e,t){let r=e.cssText;const a=/url\(["']?([^"')]+)["']?\)/g,i=(r.match(/url\([^)]+\)/g)||[]).map(async l=>{let o=l.replace(a,"$1");return o.startsWith("https://")||(o=new URL(o,e.url).href),jt(o,t.fetchRequestInit,({result:m})=>(r=r.replace(l,`url(${m})`),[l,m]))});return Promise.all(i).then(()=>r)}function gt(e){if(e==null)return[];const t=[],r=/(\/\*[\s\S]*?\*\/)/gi;let a=e.replace(r,"");const n=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){const m=n.exec(a);if(m===null)break;t.push(m[0])}a=a.replace(n,"");const i=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,l="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})",o=new RegExp(l,"gi");for(;;){let m=i.exec(a);if(m===null){if(m=o.exec(a),m===null)break;i.lastIndex=o.lastIndex}else o.lastIndex=i.lastIndex;t.push(m[0])}return t}async function Ir(e,t){const r=[],a=[];return e.forEach(n=>{if("cssRules"in n)try{Q(n.cssRules||[]).forEach((i,l)=>{if(i.type===CSSRule.IMPORT_RULE){let o=l+1;const m=i.href,g=ft(m).then(h=>pt(h,t)).then(h=>gt(h).forEach(y=>{try{n.insertRule(y,y.startsWith("@import")?o+=1:n.cssRules.length)}catch(x){console.error("Error inserting rule from remote css",{rule:y,error:x})}})).catch(h=>{console.error("Error loading remote css",h.toString())});a.push(g)}})}catch(i){const l=e.find(o=>o.href==null)||document.styleSheets[0];n.href!=null&&a.push(ft(n.href).then(o=>pt(o,t)).then(o=>gt(o).forEach(m=>{l.insertRule(m,l.cssRules.length)})).catch(o=>{console.error("Error loading remote stylesheet",o)})),console.error("Error inlining remote css file",i)}}),Promise.all(a).then(()=>(e.forEach(n=>{if("cssRules"in n)try{Q(n.cssRules||[]).forEach(i=>{r.push(i)})}catch(i){console.error(`Error while reading CSS rules from ${n.href}`,i)}}),r))}function Ar(e){return e.filter(t=>t.type===CSSRule.FONT_FACE_RULE).filter(t=>Ct(t.style.getPropertyValue("src")))}async function Br(e,t){if(e.ownerDocument==null)throw new Error("Provided element is not within a Document");const r=Q(e.ownerDocument.styleSheets),a=await Ir(r,t);return Ar(a)}function Rt(e){return e.trim().replace(/["']/g,"")}function Dr(e){const t=new Set;function r(a){(a.style.fontFamily||getComputedStyle(a).fontFamily).split(",").forEach(i=>{t.add(Rt(i))}),Array.from(a.children).forEach(i=>{i instanceof HTMLElement&&r(i)})}return r(e),t}async function Hr(e,t){const r=await Br(e,t),a=Dr(e);return(await Promise.all(r.filter(i=>a.has(Rt(i.style.fontFamily))).map(i=>{const l=i.parentStyleSheet?i.parentStyleSheet.href:null;return Et(i.cssText,l,t)}))).join(`
2
  `)}async function Vr(e,t){const r=t.fontEmbedCSS!=null?t.fontEmbedCSS:t.skipFonts?null:await Hr(e,t);if(r){const a=document.createElement("style"),n=document.createTextNode(r);a.appendChild(n),e.firstChild?e.insertBefore(a,e.firstChild):e.appendChild(a)}}async function Ur(e,t={}){const{width:r,height:a}=_t(e,t),n=await ke(e,t,!0);return await Vr(n,t),await Nt(n,t),Mr(n,t),await nr(n,r,a)}async function qr(e,t={}){const{width:r,height:a}=_t(e,t),n=await Ur(e,t),i=await je(n),l=document.createElement("canvas"),o=l.getContext("2d"),m=t.pixelRatio||tr(),g=t.canvasWidth||r,h=t.canvasHeight||a;return l.width=g*m,l.height=h*m,t.skipAutoScale||rr(l),l.style.width=`${g}`,l.style.height=`${h}`,t.backgroundColor&&(o.fillStyle=t.backgroundColor,o.fillRect(0,0,l.width,l.height)),o.drawImage(i,0,0,l.width,l.height),l}async function Or(e,t={}){const r=await qr(e,t);return await sr(r)}const Ae="#ffffff";function Wr(){return typeof window>"u"?Ae:window.getComputedStyle(document.documentElement).getPropertyValue("--bg-elevated").trim()||Ae}function zr(e){if(typeof window>"u")return Ae;const t=window.getComputedStyle(e).backgroundColor;return!t||t==="rgba(0, 0, 0, 0)"||t==="transparent"?Wr():t}async function Kr(e){var r,a;if(typeof window>"u"||!((a=(r=window.navigator)==null?void 0:r.clipboard)!=null&&a.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 Or(e,{pixelRatio:2,cacheBust:!0,backgroundColor:zr(e)});if(!t)throw new Error("Failed to render screenshot.");await window.navigator.clipboard.write([new window.ClipboardItem({"image/png":t})])}const xt=({targetRef:e,label:t})=>{const{toast:r}=Mt(),[a,n]=v.useState("idle"),i=v.useRef(null);v.useEffect(()=>()=>{i.current!==null&&window.clearTimeout(i.current)},[]);const l=v.useCallback(async()=>{const m=e.current;if(m){n("copying"),m.classList.add("is-capturing"),m.offsetHeight,await new Promise(g=>window.requestAnimationFrame(()=>g()));try{await Kr(m),n("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(()=>n("idle"),1500)}catch(g){n("idle"),r({title:"Copy failed",description:g instanceof Error&&g.message?g.message:"Could not copy the screenshot to your clipboard.",variant:"destructive"})}finally{m.classList.remove("is-capturing")}}},[e,t,r]),o=a==="copied"?"Copied":a==="copying"?"Copying…":"Copy image";return s.jsxs("button",{type:"button",className:"bm-copy-btn",onClick:l,disabled:a==="copying","aria-label":`Copy ${t} screenshot to clipboard`,title:`Copy ${t} screenshot to clipboard`,children:[s.jsx(Wt,{name:"copy",size:11}),o]})};function oe(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}const $t=[{label:"All",maxParametersExclusive:void 0},{label:"<1B",maxParametersExclusive:1e9},{label:"<3B",maxParametersExclusive:3e9},{label:"<6B",maxParametersExclusive:6e9},{label:"<12B",maxParametersExclusive:12e9},{label:"<32B",maxParametersExclusive:32e9},{label:"<128B",maxParametersExclusive:128e9},{label:"<500B",maxParametersExclusive:5e11}];function Gr(e){const t=e===null?void 0:Number(e);return $t.some(r=>r.maxParametersExclusive===t)?t:void 0}function Qr(e){return new Intl.NumberFormat("en",{notation:"compact",maximumSignificantDigits:3}).format(e)}function Xr(e){return[e.paper_id,e.task_id,e.dataset_id,e.model_name,e.harness??""].join("|")}function Yr(e){const t=new Map;for(const r of e){const a=Xr(r),n=t.get(a);if(!n){t.set(a,{...r,metrics:{...r.metrics||{}},sourceEvaluationIds:[r.id],ranksByMetric:r.best_metric&&r.best_rank!=null?{[r.best_metric]:r.best_rank}:{},parameterCount:r.num_parameters??null,hasParameterConflict:!1});continue}n.metrics={...n.metrics,...r.metrics||{}},n.sourceEvaluationIds.push(r.id),r.best_metric&&r.best_rank!=null&&(n.ranksByMetric[r.best_metric]=r.best_rank),r.num_parameters!=null&&!n.hasParameterConflict&&(n.parameterCount===null?n.parameterCount=r.num_parameters:n.parameterCount!==r.num_parameters&&(n.parameterCount=null,n.hasParameterConflict=!0))}return Array.from(t.values())}function bt(e,t){return t===void 0?e:e.filter(r=>r.parameterCount!==null&&r.parameterCount<t)}function yt(e,t){return t?e.id===t||e.sourceEvaluationIds.includes(t):!1}function wt(e,t){return e.ranksByMetric[t]??e.best_rank??9999}function Jr(e,t,r){if(e.length===0)return{points:[],sota:0,sotaModel:""};const a=e.map(h=>{var E;const y=oe((E=h.metrics)==null?void 0:E[t]),x=h.paper_published_date||"";return{eval:h,value:y,date:x}}).filter(h=>h.value!==null&&!!h.date).sort((h,y)=>h.date.localeCompare(y.date)),n=[];let i=null;for(const h of a){const y=i==null?!0:r==="↓"?h.value<i:h.value>i;y&&(i=h.value),n.push({value:h.value,date:h.date,dateLabel:h.date.slice(0,7),modelName:h.eval.model_name||"",paperTitle:h.eval.paper_title||"",paperRouteId:h.eval.paper_arxiv_id||h.eval.paper_id||null,isSota:y})}const o=e.map(h=>{var y;return{eval:h,value:oe((y=h.metrics)==null?void 0:y[t])}}).filter(h=>h.value!==null).sort((h,y)=>r==="↓"?h.value-y.value:y.value-h.value)[0],m=(o==null?void 0:o.value)??0,g=(o==null?void 0:o.eval.model_name)||(o==null?void 0:o.eval.paper_title)||"";return{points:n,sota:m,sotaModel:g}}const Zr=5;function es(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 a=t.match(/^(?:https?:\/\/(?:www\.)?paperswithcode\.co)?\/paper\/([^/?#]+)/i);return(a==null?void 0:a[1])??null}function we(e,t){return e?s.jsx(ve,{title:e}):t||"—"}const ys=()=>{var qe,Oe,We,ze,Ke,Ge,Qe,Xe,Ye,Je,Ze,et,tt,rt;const{datasetSlug:e}=It(),[t,r]=At(),a=t.get("task")||void 0,n=t.get("eval")||void 0,i=Gr(t.get("max_parameters_exclusive")),{preferences:l,setHideClosedSourceEvals:o}=Bt(),m=v.useRef(null),g=v.useRef(!1),h=v.useRef(null),y=v.useRef(null),x=ee({queryKey:["dataset",e,"with-paper",a,l.hide_closed_source_evals?"open":"all"],queryFn:()=>ne.getDatasetBySlug(e,{include_paper:!0,task:a,is_open:l.hide_closed_source_evals?!0:void 0}),enabled:!!e,staleTime:10*60*1e3}),E=ee({queryKey:["dataset-evals",(qe=x.data)==null?void 0:qe.id],queryFn:()=>Vt.byDataset(x.data.id),enabled:!!((Oe=x.data)!=null&&Oe.id),staleTime:5*60*1e3}),z=ee({queryKey:["dataset-tasks",(We=x.data)==null?void 0:We.id],queryFn:()=>ne.datasetTasks(x.data.id),enabled:!!((ze=x.data)!=null&&ze.id),staleTime:10*60*1e3}),de=ee({queryKey:["metric-directions"],queryFn:()=>ne.metricDirections(),staleTime:60*60*1e3}),M=v.useMemo(()=>{var c;return!n||!((c=E.data)!=null&&c.length)?null:E.data.find(p=>p.id===n)||null},[n,E.data]),T=v.useMemo(()=>{const c=z.data||[];if(c.length===0)return null;if(M!=null&&M.task_id&&c.some(u=>u.id===M.task_id))return M.task_id;if(a){const u=c.find(C=>C.slug===a);if(u)return u.id}if(c.length===1)return c[0].id;const p=E.data||[];if(p.length>0){const u=new Map;for(const k of p)u.set(k.task_id,(u.get(k.task_id)||0)+1);let C=null,L=-1;for(const k of c){const A=u.get(k.id)||0;A>L&&(L=A,C=k.id)}if(C)return C}return c[0].id},[z.data,E.data,a,M]),X=ee({queryKey:["task-benchmark-trends",T,l.hide_closed_source_evals?!0:void 0],queryFn:()=>ne.trendingBenchmarks(T,{limit:100,min_recent_papers:0,is_open:l.hide_closed_source_evals?!0:void 0}),enabled:!!T&&!!((Ke=x.data)!=null&&Ke.id),staleTime:10*60*1e3}),I=v.useMemo(()=>{var c;return(((c=X.data)==null?void 0:c.results)||[]).find(p=>{var u;return p.id===((u=x.data)==null?void 0:u.id)})||null},[X.data,(Ge=x.data)==null?void 0:Ge.id]),ue=ee({queryKey:["leaderboard-metrics",(Qe=x.data)==null?void 0:Qe.id,T],queryFn:()=>ne.leaderboardMetrics(x.data.id,T),enabled:!!((Xe=x.data)!=null&&Xe.id)&&!!T,staleTime:10*60*1e3}),te=v.useMemo(()=>Gt(E.data,T,l.hide_closed_source_evals),[E.data,T,l.hide_closed_source_evals]),Y=te.visible,N=te.hiddenClosed,q=te.topHiddenClosed,D=v.useMemo(()=>Yr(Y),[Y]),re=v.useMemo(()=>bt(D,i),[D,i]),Se=v.useMemo(()=>{const c=new Set;return D.forEach(p=>{p.best_metric&&c.add(p.best_metric),Object.keys(p.metrics||{}).forEach(u=>c.add(u))}),Array.from(c)},[D]),J=v.useMemo(()=>(ue.data||[]).map(c=>c.metric_name),[ue.data]),P=J.length?J:Se,O=v.useMemo(()=>{var C,L;if(D.length===0)return P[0]||"";const c=new Map;for(const k of D){const A=k.best_metric;!A||oe((C=k.metrics)==null?void 0:C[A])===null||J.length&&!P.includes(A)||c.set(A,(c.get(A)||0)+1)}let p=null,u=0;for(const[k,A]of c)A>u&&(u=A,p=k);return p||P[0]||((L=D[0])==null?void 0:L.best_metric)||""},[D,P,J]),me=(Ye=t.get("metric"))==null?void 0:Ye.trim(),b=(me?P.find(c=>c.toLocaleLowerCase()===me.toLocaleLowerCase()):void 0)||(M==null?void 0:M.best_metric)||O,K=(((Ze=(Je=de.data)==null?void 0:Je.directions)==null?void 0:Ze[b])||"higher_is_better")==="lower_is_better"?"↓":"↑",G=v.useMemo(()=>!b||!P.includes(b)?P:[b,...P.filter(c=>c!==b)],[P,b]),d=v.useMemo(()=>G.length===0?b?[b]:[]:G.slice(0,Zr),[G,b]),{points:f,sota:R,sotaModel:_}=v.useMemo(()=>Jr(re,b,K),[re,b,K]),w=i===void 0?(et=x.data)==null?void 0:et.leaderboard_summary:void 0,j=E.isSuccess&&z.isSuccess&&de.isSuccess&&(!T||ue.isSuccess),V=j?b:w==null?void 0:w.metric,W=j?R:w==null?void 0:w.value,Ee=j?_:w==null?void 0:w.model_name,fe=!j&&!w,pe=i!==void 0&&!j;v.useEffect(()=>{if(g.current||!n||!E.data||E.data.length===0)return;const c=m.current;c&&(g.current=!0,c.scrollIntoView({behavior:"smooth",block:"start"}))},[n,E.data]);const U=v.useMemo(()=>{const c=z.data||[];return T?c.find(p=>p.id===T)||c[0]||null:c[0]||null},[z.data,T]),Ne=ee({queryKey:["area",U==null?void 0:U.area_id],queryFn:()=>ne.getArea(U.area_id),enabled:!!(U!=null&&U.area_id),staleTime:10*60*1e3});if(x.isLoading)return s.jsxs("div",{className:"page",children:[s.jsx(ye,{className:"h-12 w-1/2 mb-6"}),s.jsx(ye,{className:"h-64 w-full"})]});if(x.error||!x.data)return s.jsx("div",{className:"page",children:s.jsx(Ut,{variant:"destructive",children:s.jsx(qt,{children:"Benchmark not found."})})});const S=x.data,ge=re.slice().sort((c,p)=>{var L,k;const u=oe((L=c.metrics)==null?void 0:L[b]),C=oe((k=p.metrics)==null?void 0:k[b]);return u!==null&&C!==null?K==="↓"?u-C:C-u:u!==null?-1:C!==null?1:wt(c,b)-wt(p,b)}),Ve=!!S.supports_harness,Re={parameter_coverage_known:D.filter(c=>c.parameterCount!==null).length,parameter_coverage_total:D.length},xe=Re.parameter_coverage_known>0,Tt=c=>bt(D,c).length>0,Ue=c=>{r(p=>{const u=new URLSearchParams(p);return c===void 0?u.delete("max_parameters_exclusive"):u.set("max_parameters_exclusive",String(c)),u})},$e=c=>{r(p=>{const u=new URLSearchParams(p);return u.set("metric",c),u})},$=n&&ge.find(c=>yt(c,n))||null,F=S.introducing_paper??void 0,he=(F==null?void 0:F.arxiv_id)||(F==null?void 0:F.id)||es(S.paper_url),Z=(F==null?void 0:F.title)||S.introducing_paper_title||null,se=((tt=F==null?void 0:F.published)==null?void 0:tt.slice(0,4))||S.introduced_year||null,Pt=!!he||!!S.paper_url||!!Z,Ft=F!=null&&F.arxiv_id||(rt=S.paper_url)!=null&&rt.match(/^https?:\/\/(?:www\.)?arxiv\.org\//i)?`arXiv:${he}`:`Paper ${he}`;return s.jsx("div",{className:"page",children:s.jsxs("div",{className:"bm-page",children:[s.jsxs("div",{className:"breadcrumb",children:[s.jsx(ae,{to:"/tasks",children:"Tasks"}),Ne.data&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"sep",children:"/"}),s.jsx(ae,{to:`/tasks#area-${Kt(Ne.data.name)}`,children:Ne.data.name})]}),U&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"sep",children:"/"}),s.jsx(ae,{to:`/tasks/${U.slug||U.id}`,children:U.name})]}),s.jsx("span",{className:"sep",children:"/"}),s.jsx("span",{style:{color:"var(--accent-text)"},children:S.name})]}),s.jsxs("div",{className:"bm-title-row",children:[s.jsx("h1",{className:"bm-title",children:S.name}),I&&s.jsxs("div",{className:"bm-title-trend","aria-label":`${S.name} reporting trend`,children:[s.jsx(Ot,{history:I.history,benchmarkName:I.name}),s.jsxs("span",{className:"bm-title-trend-summary",children:[s.jsx("strong",{children:I.recent_paper_count})," ",I.recent_paper_count===1?"paper":"papers",I.rate_change==null?I.recent_paper_count>0&&s.jsx("span",{className:"benchmark-trend-change is-new",children:"new"}):s.jsxs("span",{className:`benchmark-trend-change ${I.rate_change>=1?"is-up":"is-down"}`,children:[I.rate_change>=1?"↑":"↓"," ",I.rate_change.toFixed(1),"×"]})]})]})]}),s.jsxs("div",{className:"bm-subtitle",children:[fe?s.jsx(ye,{className:"h-5 w-64 bm-summary-skeleton","aria-label":"Loading benchmark summary"}):s.jsxs("span",{children:[V&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"metric-tag",children:V}),s.jsx("span",{style:{color:"var(--hairline-strong)",margin:"0 8px"},children:"·"})]}),Ee?s.jsxs("span",{children:["Best: ",s.jsx("span",{className:"best-name",children:ce(W)})," by ",s.jsx("span",{className:"best-name",style:{fontStyle:"normal"},children:Ee})]}):s.jsxs("span",{children:[ge.length," evaluations"]})]}),S.hf_url&&s.jsxs("a",{className:"bm-action-btn",href:S.hf_url,target:"_blank",rel:"noopener noreferrer",children:[s.jsx("span",{"aria-hidden":"true",children:"🤗"})," View on Hugging Face"]})]}),S.description&&s.jsx("p",{className:"bm-description",children:S.description}),l.hide_closed_source_evals&&N.length>0&&s.jsxs("div",{className:"bm-hidden-closed-notice",children:[s.jsxs("span",{children:[N.length," closed-source ",N.length===1?"row is":"rows are"," hidden",q!=null&&q.model_name?s.jsxs(s.Fragment,{children:[", including ",s.jsx("strong",{children:q.model_name})]}):null,"."]}),s.jsx("button",{type:"button",className:"bm-hidden-closed-action",onClick:()=>{o(!1)},children:"Show closed-source"})]}),Pt&&s.jsxs("div",{className:"method-source",style:{marginTop:0,marginBottom:18},children:[s.jsx("span",{className:"method-source-label",children:"Source"}),he?s.jsxs(ae,{to:`/paper/${he}`,target:"_blank",rel:"noopener noreferrer",className:"method-source-link",children:[s.jsx("span",{className:"method-source-title",children:Z?s.jsx(ve,{title:Z}):Ft}),se&&s.jsx("span",{className:"method-source-meta",children:se})]}):S.paper_url?s.jsxs("a",{href:zt(S.paper_url)??void 0,target:"_blank",rel:"noopener noreferrer",className:"method-source-link",children:[s.jsx("span",{className:"method-source-title",children:Z?s.jsx(ve,{title:Z}):S.paper_url}),se&&s.jsx("span",{className:"method-source-meta",children:se})]}):s.jsxs("div",{className:"method-source-link is-static",children:[s.jsx("span",{className:"method-source-title",children:Z?s.jsx(ve,{title:Z}):null}),se&&s.jsx("span",{className:"method-source-meta",children:se})]})]}),!pe&&f.length>0&&s.jsxs("div",{className:"bm-card",ref:h,children:[s.jsxs("div",{className:"bm-card-screenshot-header","aria-hidden":"true",children:[s.jsxs("div",{className:"bm-card-screenshot-title",children:[s.jsx("span",{className:"bm-card-screenshot-eyebrow",children:"Benchmark"}),s.jsx("span",{className:"bm-card-screenshot-name",children:S.name})]}),s.jsxs("div",{className:"bm-card-screenshot-brand",children:[s.jsxs("span",{className:"brand",children:[s.jsx("span",{className:"brand-mark"}),s.jsxs("span",{className:"brand-name",children:["Papers ",s.jsx("em",{children:"With Code"})]})]}),s.jsx("span",{className:"bm-card-screenshot-url",children:"paperswithcode.co"})]})]}),s.jsxs("div",{className:"bm-card-head",children:[s.jsx("div",{className:"bm-card-title",children:"SOTA progression"}),s.jsxs("div",{className:"bm-card-actions",children:[P.length>1&&s.jsxs("label",{className:"bm-view-select",children:[s.jsx("span",{className:"bm-view-select-label",children:"View"}),s.jsx("select",{value:b,onChange:c=>$e(c.target.value),children:G.map(c=>s.jsx("option",{value:c,children:c},c))})]}),s.jsxs("label",{className:"bm-closed-toggle",title:"Show or hide evaluations of closed-source models",children:[s.jsx(ot,{className:"bm-closed-toggle-switch",checked:!l.hide_closed_source_evals,onCheckedChange:c=>{o(!c)},"aria-label":"Show closed-source models"}),s.jsx("span",{className:"bm-closed-toggle-label",children:"Closed-source"})]}),s.jsx(xt,{targetRef:h,label:"SOTA chart"})]})]}),s.jsx("div",{className:"bm-chart-wrap",children:s.jsx(Xt,{points:f,metric:b})}),s.jsxs("div",{className:"bm-chart-foot",children:[s.jsx("span",{className:"legend-dot"}),i===void 0?"All models":"Filtered models"," over time · highlighted dots track the running best · hover for the model · click to open the paper"]})]}),$&&(()=>{var L,k;const c=$.paper_arxiv_id||$.paper_id,p=$.paper_title||($.paper_arxiv_id?`arXiv:${$.paper_arxiv_id}`:null),u=$.best_metric&&((L=$.metrics)==null?void 0:L[$.best_metric])!==void 0?$.best_metric:b,C=(k=$.metrics)==null?void 0:k[u];return s.jsxs("div",{className:"bm-highlight-banner",role:"status",children:[s.jsx("span",{className:"bm-highlight-dot","aria-hidden":"true"}),s.jsxs("div",{className:"bm-highlight-text",children:[s.jsx("span",{className:"bm-highlight-label",children:"Comparing result"}),s.jsxs("span",{className:"bm-highlight-paper",children:[$.model_name||p||"—",$.harness?` · ${$.harness}`:""]}),s.jsxs("span",{className:"bm-highlight-meta",children:[C!==void 0&&u?s.jsxs(s.Fragment,{children:[u,": ",ce(C),p?" · ":""]}):null,c?s.jsx(ae,{to:`/paper/${c}`,children:we($.paper_title,p)}):we($.paper_title,p)]})]})]})})(),s.jsxs("div",{className:"bm-card",ref:y,children:[s.jsxs("div",{className:"bm-card-screenshot-header","aria-hidden":"true",children:[s.jsxs("div",{className:"bm-card-screenshot-title",children:[s.jsx("span",{className:"bm-card-screenshot-eyebrow",children:"Benchmark"}),s.jsx("span",{className:"bm-card-screenshot-name",children:S.name})]}),s.jsxs("div",{className:"bm-card-screenshot-brand",children:[s.jsxs("span",{className:"brand",children:[s.jsx("span",{className:"brand-mark"}),s.jsxs("span",{className:"brand-name",children:["Papers ",s.jsx("em",{children:"With Code"})]})]}),s.jsx("span",{className:"bm-card-screenshot-url",children:"paperswithcode.co"})]})]}),s.jsxs("div",{className:"bm-card-head",children:[s.jsx("div",{className:"bm-card-title",children:"Leaderboard"}),s.jsxs("div",{className:"bm-card-actions",children:[P.length>1&&s.jsxs("label",{className:"bm-view-select",children:[s.jsx("span",{className:"bm-view-select-label",children:"View"}),s.jsx("select",{value:b,onChange:c=>$e(c.target.value),children:G.map(c=>s.jsx("option",{value:c,children:c},c))})]}),s.jsxs("label",{className:"bm-closed-toggle",title:"Show or hide evaluations of closed-source models",children:[s.jsx(ot,{className:"bm-closed-toggle-switch",checked:!l.hide_closed_source_evals,onCheckedChange:c=>{o(!c)},"aria-label":"Show closed-source models"}),s.jsx("span",{className:"bm-closed-toggle-label",children:"Closed-source"})]}),!pe&&!xe&&E.isSuccess?s.jsx("span",{className:"bm-parameter-unavailable",children:"Parameter metadata unavailable"}):null,s.jsx(xt,{targetRef:y,label:"leaderboard"})]})]}),!pe&&xe&&s.jsxs("div",{className:"bm-parameter-filter-bar",children:[s.jsx("span",{className:"bm-parameter-filter-label",children:"Parameters Size"}),s.jsx("div",{className:"bm-parameter-filter-options",role:"group","aria-label":"Filter leaderboard by parameter size",children:$t.map(c=>{const p=i===c.maxParametersExclusive,u=!p&&!Tt(c.maxParametersExclusive);return s.jsx("button",{type:"button",className:`bm-parameter-filter-option${p?" is-active":""}`,"aria-pressed":p,disabled:u,onClick:()=>Ue(c.maxParametersExclusive),children:c.label},c.label)})}),s.jsxs("span",{className:"bm-parameter-coverage",children:["Parameters known for ",Re.parameter_coverage_known," of ",Re.parameter_coverage_total," entries"]})]}),E.isLoading||pe?s.jsx("div",{style:{padding:16},children:Array.from({length:5}).map((c,p)=>s.jsx(ye,{className:"h-10 w-full mb-2"},p))}):ge.length===0?i?s.jsxs("div",{className:"no-results",children:["No known parameter counts match this filter. "," ",s.jsx("button",{type:"button",className:"bm-empty-filter-action",onClick:()=>Ue(void 0),children:"Show all"})]}):s.jsx("div",{className:"no-results",children:"No evaluations submitted yet."}):s.jsx("div",{className:"bm-table-scroll",children:s.jsxs("table",{className:"bm-table",children:[s.jsx("thead",{children:s.jsxs("tr",{children:[s.jsx("th",{className:"col-rank",children:"Rank"}),s.jsx("th",{className:"col-model",children:"Model"}),Ve&&s.jsx("th",{className:"col-harness",children:"Harness"}),xe&&s.jsx("th",{className:"col-parameters",children:"Parameters"}),d.map(c=>{const p=c===b;return s.jsx("th",{className:`col-value ${p?"is-active":""}`,"aria-sort":p?K==="↓"?"ascending":"descending":"none",children:s.jsxs("button",{type:"button",className:"bm-metric-header",onClick:()=>$e(c),"aria-pressed":p,title:`Sort by ${c}`,children:[c,p?` ${K}`:""]})},c)}),s.jsx("th",{className:"col-paper",children:"Paper"}),s.jsx("th",{className:"col-year",children:"Year"})]})}),s.jsx("tbody",{children:(()=>{let c=null,p=0;return ge.map((u,C)=>{var at,nt;const L=oe((at=u.metrics)==null?void 0:at[b]);let k=null;L!==null&&((c===null||L!==c)&&(p=C+1,c=L),k=p);const A=u.paper_arxiv_id||u.paper_id,st=u.paper_title||(u.paper_arxiv_id?`arXiv:${u.paper_arxiv_id}`:null),Te=yt(u,n);return s.jsxs("tr",{ref:Te?m:void 0,className:Te?"is-highlighted":void 0,children:[s.jsx("td",{className:"col-rank",children:k??"—"}),s.jsxs("td",{className:"col-model",children:[Te&&s.jsx("span",{className:"bm-row-marker","aria-hidden":"true"}),u.hf_model_url?s.jsx("a",{href:u.hf_model_url,target:"_blank",rel:"noopener noreferrer",className:"bm-model-link",title:`Open ${u.model_name||"model"} on Hugging Face`,children:u.model_name||"—"}):u.model_name||"—",u.is_open===!1&&s.jsx(Dt,{}),(u.external??u.is_external)&&s.jsx(Ht,{sourceUrl:u.source_url||u.external_source_url||u.result_url})]}),Ve&&s.jsx("td",{className:"col-harness",children:u.harness||"—"}),xe&&s.jsx("td",{className:"col-parameters",title:u.parameterCount===null?void 0:u.parameterCount.toLocaleString("en-US"),"aria-label":u.parameterCount===null?"Parameters unknown":`${u.parameterCount.toLocaleString("en-US")} parameters`,children:u.parameterCount===null?"—":Qr(u.parameterCount)}),d.map(Pe=>{var lt;const it=Pe===b,be=(lt=u.metrics)==null?void 0:lt[Pe];return s.jsx("td",{className:`col-value${it?" is-active":""}${it&&k===1?" is-best":""}`,children:be!=null&&be!==""?ce(be):"—"},Pe)}),s.jsx("td",{className:"col-paper",children:A?s.jsx(ae,{to:`/paper/${A}`,children:we(u.paper_title,st)}):we(u.paper_title,st)}),s.jsx("td",{className:"col-year",children:((nt=u.paper_published_date)==null?void 0:nt.slice(0,4))||"—"})]},u.id)})})()})]})})]})]})})};export{ys as default};
assets/{BenchmarkTrendSparkline-CPm3KYmF.js → BenchmarkTrendSparkline-CtBP2P-b.js} RENAMED
@@ -1 +1 @@
1
- import{r as C,j as t}from"./index-BJHhPv_M.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-BfGRWIiQ.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/{ChatView-0-C1aJrh.js → ChatView-DCf7eWmY.js} RENAMED
@@ -1,4 +1,4 @@
1
- var $t=Object.defineProperty;var Gt=(e,r,t)=>r in e?$t(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t;var Ce=(e,r,t)=>Gt(e,typeof r!="symbol"?r+"":r,t);import{d as Kt,A as zt,O as Qt,r as i,j as s,X as Xt,e as Lt,z as ot,c as Jt,u as Zt,a as er,y as tr,g as rr,Q as nr,L as St,b as sr}from"./index-BJHhPv_M.js";import{u as ar}from"./useQuery-B9A-sza5.js";import{C as ir,U as Et,b as or,c as $e,u as cr,d as lr,A as ur,a as dr}from"./ArtifactWorkspace-DKTpoNk6.js";import{c as Ge}from"./chat-D9bQn_8F.js";import{e as fr,f as Nt,h as pr,T as hr,d as Ft,i as mr,j as gr,k as yr,l as nt,m as _r,t as kt,n as st,o as Pt,r as br,S as wr,a as vr,D as xr,s as Rr,v as Sr,w as at,x as et,y as Er,z as tt,B as rt,E as kr,F as Tr,G as Ar,H as ct,I as Ir}from"./chatLaunch--jg98Oug.js";import{S as Or}from"./chatPrompts-CDY3UGU1.js";import{u as Cr,O as jr}from"./openrouter-BtnjdC9I.js";import"./katex.min-BSBacQyE.js";import"./hover-card-CBNxKixP.js";import"./github-B2SnkTVu.js";import"./github-BnuvDeYu.js";import"./PaperPreviewLink-DVTrFkw2.js";import"./index-RvWGcsIO.js";import"./papers-CWyBrS8M.js";import"./file-text-D0p5b00d.js";import"./useMutation-rrsjzB5Q.js";import"./external-link-h2XFtnTN.js";import"./chevron-down-BVyqIjKu.js";/**
2
  * @license lucide-react v0.462.0 - ISC
3
  *
4
  * This source code is licensed under the ISC license.
 
1
+ var $t=Object.defineProperty;var Gt=(e,r,t)=>r in e?$t(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t;var Ce=(e,r,t)=>Gt(e,typeof r!="symbol"?r+"":r,t);import{d as Kt,A as zt,O as Qt,r as i,j as s,X as Xt,e as Lt,z as ot,c as Jt,u as Zt,a as er,y as tr,g as rr,Q as nr,L as St,b as sr}from"./index-BfGRWIiQ.js";import{u as ar}from"./useQuery-uhyHf514.js";import{C as ir,U as Et,b as or,c as $e,u as cr,d as lr,A as ur,a as dr}from"./ArtifactWorkspace-Dc7yVRVJ.js";import{c as Ge}from"./chat-dMs5c7qZ.js";import{e as fr,f as Nt,h as pr,T as hr,d as Ft,i as mr,j as gr,k as yr,l as nt,m as _r,t as kt,n as st,o as Pt,r as br,S as wr,a as vr,D as xr,s as Rr,v as Sr,w as at,x as et,y as Er,z as tt,B as rt,E as kr,F as Tr,G as Ar,H as ct,I as Ir}from"./chatLaunch-BxzD44NH.js";import{S as Or}from"./chatPrompts-CDY3UGU1.js";import{u as Cr,O as jr}from"./openrouter-eY8Zeuhv.js";import"./katex.min-BSBacQyE.js";import"./hover-card-HVpXfIHl.js";import"./github-BbqV1Jxk.js";import"./github-BM40zlYO.js";import"./PaperPreviewLink-_SPYeWhn.js";import"./index-BqZK5Cw1.js";import"./papers-PnGxH-RF.js";import"./file-text-FxV6g_yZ.js";import"./useMutation-Dw9DDJRs.js";import"./external-link-C3NMRHh9.js";import"./chevron-down-BovmCLHU.js";/**
2
  * @license lucide-react v0.462.0 - ISC
3
  *
4
  * This source code is licensed under the ISC license.
assets/{ConferenceDetailView-xWYVOaEc.js → ConferenceDetailView-CTl8kqWJ.js} RENAMED
@@ -1 +1 @@
1
- import{c as L,r as D,j as e,L as p}from"./index-BJHhPv_M.js";import{u as T}from"./useQuery-B9A-sza5.js";import{M as F}from"./MarkdownText-_ZQTzPOU.js";import{c as A}from"./catalog-DOuThn7M.js";import{c as B,h as C,d as E}from"./transform-DDP8kg8V.js";import{S as f}from"./skeleton-utCOClux.js";import{A as P,a as z}from"./alert-BiDOKM0e.js";import{s as M}from"./safeExternalHref-CkBrsh84.js";import"./katex.min-BSBacQyE.js";import"./PaperPreviewLink-DVTrFkw2.js";import"./index-RvWGcsIO.js";import"./hover-card-CBNxKixP.js";import"./papers-CWyBrS8M.js";const R=a=>(a==null?void 0:a.trim().toLowerCase().replace(/[\s_]+/g,"-"))??"",O=(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}`},ee=()=>{var k,S,b,_,$,w;const{confSlug:a}=L(),t=T({queryKey:["conference-areas-with-tasks",a],queryFn:()=>A.conferenceAreasWithTasks(a),enabled:!!a,staleTime:10*60*1e3}),i=D.useMemo(()=>{if(!t.data)return[];const n={general:0,vision:1,video:2,language:3,audio:4,other:5},r=o=>n[R(o)]??999;return[...t.data.results].sort((o,l)=>{const d=r(o.name),x=r(l.name);return d!==x?d-x:o.name.localeCompare(l.name)})},[t.data]),s=(k=t.data)==null?void 0:k.conference,c=((S=t.data)==null?void 0:S.total_paper_count)??0,m=((b=t.data)==null?void 0:b.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((n,r)=>n+r.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?O(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:M(s.url)??void 0,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:n=>{var r,o;(o=(r=n.currentTarget.parentElement)==null?void 0:r.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((n,r)=>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))})]},r))}):i.map(n=>{const r=n.tasks;if(r.length===0)return null;const o=r.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:n.name}),n.description&&e.jsx("div",{style:{fontFamily:"var(--serif)",fontStyle:"italic",fontSize:13,color:"var(--ink-soft)"},children:n.description})]}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[r.length," ",r.length===1?"task":"tasks"," · ",o.toLocaleString()," papers"]})]}),e.jsx("div",{className:"tag-grid",children:r.map(l=>{const d=l.slug||"",x=B(C(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)})})]},n.id)}),v>0&&e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",marginTop:24},children:[v," tasks across ",i.filter(n=>n.tasks.length>0).length," areas."]})]})};export{ee as default};
 
1
+ import{c as L,r as D,j as e,L as p}from"./index-BfGRWIiQ.js";import{u as T}from"./useQuery-uhyHf514.js";import{M as F}from"./MarkdownText-DeevkxdU.js";import{c as A}from"./catalog-BsVxStBB.js";import{c as B,h as C,d as E}from"./transform-BVvRkYPJ.js";import{S as f}from"./skeleton-7gHbNXZz.js";import{A as P,a as z}from"./alert-D4lZhgu4.js";import{s as M}from"./safeExternalHref-CkBrsh84.js";import"./katex.min-BSBacQyE.js";import"./PaperPreviewLink-_SPYeWhn.js";import"./index-BqZK5Cw1.js";import"./hover-card-HVpXfIHl.js";import"./papers-PnGxH-RF.js";const R=a=>(a==null?void 0:a.trim().toLowerCase().replace(/[\s_]+/g,"-"))??"",O=(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}`},ee=()=>{var k,S,b,_,$,w;const{confSlug:a}=L(),t=T({queryKey:["conference-areas-with-tasks",a],queryFn:()=>A.conferenceAreasWithTasks(a),enabled:!!a,staleTime:10*60*1e3}),i=D.useMemo(()=>{if(!t.data)return[];const n={general:0,vision:1,video:2,language:3,audio:4,other:5},r=o=>n[R(o)]??999;return[...t.data.results].sort((o,l)=>{const d=r(o.name),x=r(l.name);return d!==x?d-x:o.name.localeCompare(l.name)})},[t.data]),s=(k=t.data)==null?void 0:k.conference,c=((S=t.data)==null?void 0:S.total_paper_count)??0,m=((b=t.data)==null?void 0:b.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((n,r)=>n+r.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?O(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:M(s.url)??void 0,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:n=>{var r,o;(o=(r=n.currentTarget.parentElement)==null?void 0:r.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((n,r)=>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))})]},r))}):i.map(n=>{const r=n.tasks;if(r.length===0)return null;const o=r.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:n.name}),n.description&&e.jsx("div",{style:{fontFamily:"var(--serif)",fontStyle:"italic",fontSize:13,color:"var(--ink-soft)"},children:n.description})]}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[r.length," ",r.length===1?"task":"tasks"," · ",o.toLocaleString()," papers"]})]}),e.jsx("div",{className:"tag-grid",children:r.map(l=>{const d=l.slug||"",x=B(C(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)})})]},n.id)}),v>0&&e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",marginTop:24},children:[v," tasks across ",i.filter(n=>n.tasks.length>0).length," areas."]})]})};export{ee as default};
assets/{ConferenceTaskView-CyblgNlJ.js → ConferenceTaskView-DBlpmGuy.js} RENAMED
@@ -1 +1 @@
1
- import{c as $,a as W,r as P,j as e,L as y,z as G}from"./index-BJHhPv_M.js";import{u as M}from"./useQuery-B9A-sza5.js";import{P as J}from"./components-wRHDLoMO.js";import{r as X,u as Y,P as Z,a as ee,w as se}from"./paperDateRange-Cx_7ISLZ.js";import{M as h}from"./MarkdownText-_ZQTzPOU.js";import{c as z}from"./catalog-DOuThn7M.js";import{t as ae,d as te}from"./transform-DDP8kg8V.js";import{d as re}from"./usePapers-Dubaj0sc.js";import{S as ne}from"./skeleton-utCOClux.js";import{A as ie,a as oe}from"./alert-BiDOKM0e.js";import"./LatexTitle-Cb0dDCMw.js";import"./katex.min-BSBacQyE.js";import"./papers-CWyBrS8M.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-ByfOmyUl.js";import"./PaperPreviewLink-DVTrFkw2.js";import"./index-RvWGcsIO.js";import"./hover-card-CBNxKixP.js";import"./useInfiniteQuery-DeWbJxMK.js";const ce=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],le=t=>t==="trending"||t==="date_published"||t==="citation_count"?t:"trending",Ce=()=>{var A,L,O,T,B,D;const{confSlug:t,taskSlug:n}=$(),[o,u]=W(),w=le(o.get("order_by")),S=o.get("has_code")==="true",k=o.get("has_hf_artifacts")==="true",x=X(o),I=a=>{const s=new URLSearchParams(o);s.set("order_by",a),u(s)},q=a=>{const s=new URLSearchParams(o);a?s.set("has_code","true"):s.delete("has_code"),u(s)},Q=a=>{const s=new URLSearchParams(o);a?s.set("has_hf_artifacts","true"):s.delete("has_hf_artifacts"),u(s)},R=n==="all",N=n==="oral",_=n==="spotlight",l=n==="outstanding",d=n==="best-paper-finalists",f=l||d,p=R||N||_||l||d,K=p?void 0:n,U=N?"oral":_?"spotlight":l?"outstanding":d?"best_paper_finalist":void 0,m=M({queryKey:["conference",t],queryFn:()=>z.getConference(t),enabled:!!t,staleTime:10*60*1e3}),j=M({queryKey:["task",n],queryFn:()=>z.getTask(n),enabled:!!n&&!p,staleTime:10*60*1e3}),i=re({conferenceSlug:t||"",taskSlug:K,presentation:U,page_size:12,order_by:w,order_dir:"desc",include_resources:!0,has_code:S,has_hf_artifacts:k,start_date:x.startDate,end_date:x.endDate,enabled:!!t}),{targetRef:V,isIntersecting:C}=Y({rootMargin:"200px"});P.useEffect(()=>{C&&i.hasNextPage&&!i.isFetchingNextPage&&i.fetchNextPage()},[C,i.hasNextPage,i.isFetchingNextPage]),P.useEffect(()=>{window.scrollTo(0,0)},[t,n]);const v=P.useMemo(()=>{var s;return(((s=i.data)==null?void 0:s.pages)??[]).flatMap(c=>c.results)},[i.data]),b=P.useMemo(()=>v.map(ae),[v]),g=R?"All papers":N?"Oral papers":_?"Spotlight papers":l?"Outstanding papers":d?"Best paper finalists":te(((A=j.data)==null?void 0:A.name)||n||"",((L=j.data)==null?void 0:L.slug)||n),F=((T=(O=i.data)==null?void 0:O.pages[0])==null?void 0:T.count)??((B=m.data)==null?void 0:B.paper_count)??0,r=j.data;return m.error||j.error||i.error?e.jsx("div",{className:"page",children:e.jsx(ie,{variant:"destructive",children:e.jsx(oe,{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(y,{to:"/",children:"Home"}),e.jsx("span",{children:" / "}),e.jsx(y,{to:"/conferences",children:"Conferences"}),e.jsx("span",{children:" / "}),e.jsx(y,{to:`/conferences/${t}`,children:((D=m.data)==null?void 0:D.name)??t}),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&&t==="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&&t==="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&&t==="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:F.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:a=>{var s,c;(c=(s=a.currentTarget.parentElement)==null?void 0:s.parentElement)==null||c.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:f?"Award papers":"Conference papers · sort below"}),e.jsxs("div",{className:"task-section-title",children:["Papers ",e.jsxs("span",{className:"meta",children:["[",F.toLocaleString(),"]"]})]})]}),e.jsxs("div",{className:"sort-bar",children:[e.jsxs("div",{className:"paper-feed-toolbar-controls",children:[!f&&e.jsx("div",{className:"sort-options",children:ce.map(([a,s])=>e.jsx("button",{className:`sort-btn ${w===a?"active":""}`,onClick:()=>I(a),children:s},a))}),e.jsx(Z,{hasCode:S,hasHfArtifacts:k,onHasCodeChange:q,onHasHfArtifactsChange:Q,showDivider:!f})]}),e.jsx(ee,{startDate:x.startDate,endDate:x.endDate,onChange:a=>u(se(o,a))}),!f&&e.jsxs("div",{className:"results-count",children:[b.length," loaded in ",e.jsx("span",{children:g})]})]}),i.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((a,s)=>e.jsx(ne,{className:"h-40 w-full"},s))}):b.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:b.map((a,s)=>{var E;const c=(E=v[s])==null?void 0:E.conference_award,H=c==="outstanding"?"Outstanding Paper":c==="honorable_mention"?"Honorable Mention":c==="best_paper_finalist"&&!d?"Best Paper Finalist":null;return e.jsxs(G.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(J,{paper:a,rank:s+1})]},a.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{Ce as default};
 
1
+ import{c as $,a as W,r as P,j as e,L as y,z as G}from"./index-BfGRWIiQ.js";import{u as M}from"./useQuery-uhyHf514.js";import{P as J}from"./components-fo0inhXZ.js";import{r as X,u as Y,P as Z,a as ee,w as se}from"./paperDateRange-BwpPQ99I.js";import{M as h}from"./MarkdownText-DeevkxdU.js";import{c as z}from"./catalog-BsVxStBB.js";import{t as ae,d as te}from"./transform-BVvRkYPJ.js";import{d as re}from"./usePapers-SIkOY1oo.js";import{S as ne}from"./skeleton-7gHbNXZz.js";import{A as ie,a as oe}from"./alert-D4lZhgu4.js";import"./LatexTitle-DPJPslOM.js";import"./katex.min-BSBacQyE.js";import"./papers-PnGxH-RF.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-xj7LLGhl.js";import"./PaperPreviewLink-_SPYeWhn.js";import"./index-BqZK5Cw1.js";import"./hover-card-HVpXfIHl.js";import"./useInfiniteQuery-CYJcc79v.js";const ce=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],le=t=>t==="trending"||t==="date_published"||t==="citation_count"?t:"trending",Ce=()=>{var A,L,O,T,B,D;const{confSlug:t,taskSlug:n}=$(),[o,u]=W(),w=le(o.get("order_by")),S=o.get("has_code")==="true",k=o.get("has_hf_artifacts")==="true",x=X(o),I=a=>{const s=new URLSearchParams(o);s.set("order_by",a),u(s)},q=a=>{const s=new URLSearchParams(o);a?s.set("has_code","true"):s.delete("has_code"),u(s)},Q=a=>{const s=new URLSearchParams(o);a?s.set("has_hf_artifacts","true"):s.delete("has_hf_artifacts"),u(s)},R=n==="all",N=n==="oral",_=n==="spotlight",l=n==="outstanding",d=n==="best-paper-finalists",f=l||d,p=R||N||_||l||d,K=p?void 0:n,U=N?"oral":_?"spotlight":l?"outstanding":d?"best_paper_finalist":void 0,m=M({queryKey:["conference",t],queryFn:()=>z.getConference(t),enabled:!!t,staleTime:10*60*1e3}),j=M({queryKey:["task",n],queryFn:()=>z.getTask(n),enabled:!!n&&!p,staleTime:10*60*1e3}),i=re({conferenceSlug:t||"",taskSlug:K,presentation:U,page_size:12,order_by:w,order_dir:"desc",include_resources:!0,has_code:S,has_hf_artifacts:k,start_date:x.startDate,end_date:x.endDate,enabled:!!t}),{targetRef:V,isIntersecting:C}=Y({rootMargin:"200px"});P.useEffect(()=>{C&&i.hasNextPage&&!i.isFetchingNextPage&&i.fetchNextPage()},[C,i.hasNextPage,i.isFetchingNextPage]),P.useEffect(()=>{window.scrollTo(0,0)},[t,n]);const v=P.useMemo(()=>{var s;return(((s=i.data)==null?void 0:s.pages)??[]).flatMap(c=>c.results)},[i.data]),b=P.useMemo(()=>v.map(ae),[v]),g=R?"All papers":N?"Oral papers":_?"Spotlight papers":l?"Outstanding papers":d?"Best paper finalists":te(((A=j.data)==null?void 0:A.name)||n||"",((L=j.data)==null?void 0:L.slug)||n),F=((T=(O=i.data)==null?void 0:O.pages[0])==null?void 0:T.count)??((B=m.data)==null?void 0:B.paper_count)??0,r=j.data;return m.error||j.error||i.error?e.jsx("div",{className:"page",children:e.jsx(ie,{variant:"destructive",children:e.jsx(oe,{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(y,{to:"/",children:"Home"}),e.jsx("span",{children:" / "}),e.jsx(y,{to:"/conferences",children:"Conferences"}),e.jsx("span",{children:" / "}),e.jsx(y,{to:`/conferences/${t}`,children:((D=m.data)==null?void 0:D.name)??t}),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&&t==="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&&t==="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&&t==="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:F.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:a=>{var s,c;(c=(s=a.currentTarget.parentElement)==null?void 0:s.parentElement)==null||c.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:f?"Award papers":"Conference papers · sort below"}),e.jsxs("div",{className:"task-section-title",children:["Papers ",e.jsxs("span",{className:"meta",children:["[",F.toLocaleString(),"]"]})]})]}),e.jsxs("div",{className:"sort-bar",children:[e.jsxs("div",{className:"paper-feed-toolbar-controls",children:[!f&&e.jsx("div",{className:"sort-options",children:ce.map(([a,s])=>e.jsx("button",{className:`sort-btn ${w===a?"active":""}`,onClick:()=>I(a),children:s},a))}),e.jsx(Z,{hasCode:S,hasHfArtifacts:k,onHasCodeChange:q,onHasHfArtifactsChange:Q,showDivider:!f})]}),e.jsx(ee,{startDate:x.startDate,endDate:x.endDate,onChange:a=>u(se(o,a))}),!f&&e.jsxs("div",{className:"results-count",children:[b.length," loaded in ",e.jsx("span",{children:g})]})]}),i.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((a,s)=>e.jsx(ne,{className:"h-40 w-full"},s))}):b.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:b.map((a,s)=>{var E;const c=(E=v[s])==null?void 0:E.conference_award,H=c==="outstanding"?"Outstanding Paper":c==="honorable_mention"?"Honorable Mention":c==="best_paper_finalist"&&!d?"Best Paper Finalist":null;return e.jsxs(G.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(J,{paper:a,rank:s+1})]},a.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{Ce as default};
assets/{ConferencesIndexView-TJvAhi_e.js → ConferencesIndexView-mh0QIX5t.js} RENAMED
@@ -1 +1 @@
1
- import{r as u,j as e,L as d}from"./index-BJHhPv_M.js";import{u as p}from"./useQuery-B9A-sza5.js";import{c as f}from"./catalog-DOuThn7M.js";import{S as m}from"./skeleton-utCOClux.js";import{A as h,a as g}from"./alert-BiDOKM0e.js";import{T as x}from"./TaxonomySuggestionTile-BuaFf3aB.js";import"./SignInToEditDialog-vE3vqpo1.js";import"./button-BL7Wfk99.js";import"./textarea-EPRANuVM.js";import"./dialog-DINVvlE3.js";import"./useMutation-rrsjzB5Q.js";import"./submissions-Dz2yQ0h0.js";import"./loader-circle-CaPI_8_v.js";const j=(r,a)=>{if(!r)return null;const t=new Date(`${r}T00:00:00`),s=a?new Date(`${a}T00:00:00`):null,n=o=>o.toLocaleDateString("en-US",{month:"long",day:"numeric"}),i=t.getFullYear();return s&&s.getTime()!==t.getTime()?t.getMonth()===s.getMonth()?`${n(t).replace(/\d+$/,"").trim()} ${t.getDate()}–${s.getDate()}, ${i}`:`${n(t)} – ${n(s)}, ${i}`:`${n(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 a=(t=r.slug.match(/-(\d{4})$/))==null?void 0:t[1];return a?Number(a):0},y=(r,a)=>{if(r.start_date&&a.start_date){const t=r.start_date.localeCompare(a.start_date);if(t!==0)return t}else{if(r.start_date)return-1;if(a.start_date)return 1}return r.name.localeCompare(a.name)},N={display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:24,paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},M=()=>{const r=p({queryKey:["conferences"],queryFn:()=>f.conferences(),staleTime:6e5}),a=u.useMemo(()=>{var s;if(!((s=r.data)!=null&&s.results))return null;const t={};return r.data.results.forEach(n=>{const i=v(n);(t[i]||(t[i]=[])).push(n)}),Object.values(t).forEach(n=>n.sort(y)),Object.keys(t).map(Number).sort((n,i)=>i-n).map(n=>({year:n,conferences:t[n]}))},[r.data]);return r.error?e.jsx("div",{className:"page",children:e.jsx(h,{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"}),". Conference information is based on"," ",e.jsx("a",{href:"https://huggingface.co/ai-conferences",target:"_blank",rel:"noreferrer",className:"underline underline-offset-2 hover:text-foreground",children:"Hugging Face AI Conferences"}),"."]})]})}),r.isLoading?e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:32},children:Array.from({length:2}).map((t,s)=>e.jsxs("div",{children:[e.jsx(m,{className:"h-8 w-24 mb-4"}),e.jsx("div",{className:"tag-grid",children:Array.from({length:3}).map((n,i)=>e.jsx(m,{className:"h-32"},i))})]},s))}):a==null?void 0:a.map(({year:t,conferences:s})=>{const n=s.reduce((o,l)=>o+(l.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:[s.length," ",s.length===1?"conference":"conferences"," ·"," ",n.toLocaleString()," papers"]})]}),e.jsxs("div",{className:"tag-grid",children:[s.map(o=>{const l=j(o.start_date,o.end_date),c=[o.venue,o.location].filter(Boolean).join(", ");return e.jsxs(d,{to:`/conferences/${o.slug}`,className:"tag-cell",children:[e.jsx("div",{className:"name",children:o.name}),e.jsxs("div",{className:"meta",style:{display:"flex",flexDirection:"column",gap:4},children:[l&&e.jsx("span",{children:l}),c&&e.jsx("span",{children:c}),e.jsxs("span",{children:[(o.paper_count??0).toLocaleString()," papers"]})]})]},o.id)}),e.jsx(x,{kind:"conference"})]})]},t)})]})};export{M as default};
 
1
+ import{r as u,j as e,L as d}from"./index-BfGRWIiQ.js";import{u as p}from"./useQuery-uhyHf514.js";import{c as f}from"./catalog-BsVxStBB.js";import{S as m}from"./skeleton-7gHbNXZz.js";import{A as h,a as g}from"./alert-D4lZhgu4.js";import{T as x}from"./TaxonomySuggestionTile-VrAsjN5R.js";import"./SignInToEditDialog-C1ykF6wM.js";import"./button-wuesmQpV.js";import"./textarea-BA4IPzRY.js";import"./dialog-Ci3RQLed.js";import"./useMutation-Dw9DDJRs.js";import"./submissions-DXV1AUkd.js";import"./loader-circle-DgGa62N_.js";const j=(r,a)=>{if(!r)return null;const t=new Date(`${r}T00:00:00`),s=a?new Date(`${a}T00:00:00`):null,n=o=>o.toLocaleDateString("en-US",{month:"long",day:"numeric"}),i=t.getFullYear();return s&&s.getTime()!==t.getTime()?t.getMonth()===s.getMonth()?`${n(t).replace(/\d+$/,"").trim()} ${t.getDate()}–${s.getDate()}, ${i}`:`${n(t)} – ${n(s)}, ${i}`:`${n(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 a=(t=r.slug.match(/-(\d{4})$/))==null?void 0:t[1];return a?Number(a):0},y=(r,a)=>{if(r.start_date&&a.start_date){const t=r.start_date.localeCompare(a.start_date);if(t!==0)return t}else{if(r.start_date)return-1;if(a.start_date)return 1}return r.name.localeCompare(a.name)},N={display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:24,paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},M=()=>{const r=p({queryKey:["conferences"],queryFn:()=>f.conferences(),staleTime:6e5}),a=u.useMemo(()=>{var s;if(!((s=r.data)!=null&&s.results))return null;const t={};return r.data.results.forEach(n=>{const i=v(n);(t[i]||(t[i]=[])).push(n)}),Object.values(t).forEach(n=>n.sort(y)),Object.keys(t).map(Number).sort((n,i)=>i-n).map(n=>({year:n,conferences:t[n]}))},[r.data]);return r.error?e.jsx("div",{className:"page",children:e.jsx(h,{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"}),". Conference information is based on"," ",e.jsx("a",{href:"https://huggingface.co/ai-conferences",target:"_blank",rel:"noreferrer",className:"underline underline-offset-2 hover:text-foreground",children:"Hugging Face AI Conferences"}),"."]})]})}),r.isLoading?e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:32},children:Array.from({length:2}).map((t,s)=>e.jsxs("div",{children:[e.jsx(m,{className:"h-8 w-24 mb-4"}),e.jsx("div",{className:"tag-grid",children:Array.from({length:3}).map((n,i)=>e.jsx(m,{className:"h-32"},i))})]},s))}):a==null?void 0:a.map(({year:t,conferences:s})=>{const n=s.reduce((o,l)=>o+(l.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:[s.length," ",s.length===1?"conference":"conferences"," ·"," ",n.toLocaleString()," papers"]})]}),e.jsxs("div",{className:"tag-grid",children:[s.map(o=>{const l=j(o.start_date,o.end_date),c=[o.venue,o.location].filter(Boolean).join(", ");return e.jsxs(d,{to:`/conferences/${o.slug}`,className:"tag-cell",children:[e.jsx("div",{className:"name",children:o.name}),e.jsxs("div",{className:"meta",style:{display:"flex",flexDirection:"column",gap:4},children:[l&&e.jsx("span",{children:l}),c&&e.jsx("span",{children:c}),e.jsxs("span",{children:[(o.paper_count??0).toLocaleString()," papers"]})]})]},o.id)}),e.jsx(x,{kind:"conference"})]})]},t)})]})};export{M as default};
assets/{CronDashboard-By47FV_c.js → CronDashboard-CWLth6eB.js} RENAMED
@@ -1,4 +1,4 @@
1
- import{d as T,r as x,j as e,q as k,t as Qe,k as Xe,h as ne,V as Ze,R as Ye,I as es,m as ce,P as ss,p as as,v as Se,g as $e,L as rs,Z as ns,y as ts,b as is}from"./index-BJHhPv_M.js";import{u as Q}from"./useQuery-B9A-sza5.js";import{B as C,D as pe,r as cs,f as ls,h as os,j as ds,p as ms,k as us}from"./codexAddEvals-CLThdzle.js";import{B as P}from"./button-BL7Wfk99.js";import{C as hs}from"./chevron-down-BVyqIjKu.js";import{F as je}from"./file-text-D0p5b00d.js";import{C as X,R as ge,S as xs}from"./shield-alert-DD-1LZcE.js";import{L as A}from"./loader-circle-CaPI_8_v.js";import{C as me}from"./circle-check-0fZsmTpB.js";import{E as oe}from"./external-link-h2XFtnTN.js";import{u as H}from"./useMutation-rrsjzB5Q.js";import{u as ps}from"./useInfiniteQuery-DeWbJxMK.js";import{c as le}from"./catalog-DOuThn7M.js";import{c as fe}from"./chat-D9bQn_8F.js";/**
2
  * @license lucide-react v0.462.0 - ISC
3
  *
4
  * This source code is licensed under the ISC license.
 
1
+ import{d as T,r as x,j as e,q as k,t as Qe,k as Xe,h as ne,V as Ze,R as Ye,I as es,m as ce,P as ss,p as as,v as Se,g as $e,L as rs,Z as ns,y as ts,b as is}from"./index-BfGRWIiQ.js";import{u as Q}from"./useQuery-uhyHf514.js";import{B as C,D as pe,r as cs,f as ls,h as os,j as ds,p as ms,k as us}from"./codexAddEvals-BZGAy-W_.js";import{B as P}from"./button-wuesmQpV.js";import{C as hs}from"./chevron-down-BovmCLHU.js";import{F as je}from"./file-text-FxV6g_yZ.js";import{C as X,R as ge,S as xs}from"./shield-alert-CCOerJk7.js";import{L as A}from"./loader-circle-DgGa62N_.js";import{C as me}from"./circle-check-s2MhrD7m.js";import{E as oe}from"./external-link-C3NMRHh9.js";import{u as H}from"./useMutation-Dw9DDJRs.js";import{u as ps}from"./useInfiniteQuery-CYJcc79v.js";import{c as le}from"./catalog-BsVxStBB.js";import{c as fe}from"./chat-dMs5c7qZ.js";/**
2
  * @license lucide-react v0.462.0 - ISC
3
  *
4
  * This source code is licensed under the ISC license.
assets/{ExternalSourceEvalBadge-D-cpVwI4.js → ExternalSourceEvalBadge-DJbjkUvR.js} RENAMED
@@ -1 +1 @@
1
- import{a as l}from"./papers-CWyBrS8M.js";import{Z as h,j as a,L as u}from"./index-BJHhPv_M.js";import{H as c,a as d,b as p}from"./hover-card-CBNxKixP.js";import{s as g}from"./safeExternalHref-CkBrsh84.js";class m{constructor(e){this.request=e}list(e={}){const t=new URLSearchParams(Object.entries(e).filter(r=>r[1]!==void 0).map(([r,n])=>[r,String(n)])).toString();return this.request(`/evaluations/${t?`?${t}`:""}`,{cache:"no-store"})}get(e){return this.request(`/evaluations/${e}`)}async byPaper(e){return this.allPages({paper_id:Number(e),ordering:"-benchmark_popularity"})}async byDataset(e,t){return this.allPages({dataset_id:Number(e),best_metric:t,ordering:"best_rank"})}async byLeaderboard(e,t,r={}){return this.allPages({dataset_id:Number(e),task_id:Number(t),ordering:"best_rank",...r})}create(e){return this.request("/evaluations/",{method:"POST",body:JSON.stringify(e)})}update(e,t){return this.request(`/evaluations/${e}`,{method:"PUT",body:JSON.stringify(t)})}delete(e){return this.request(`/evaluations/${e}`,{method:"DELETE"})}primeCurationState(e,t=!1){return l.primeEvaluations(e,t)}batch(e,t){return l.mutateEvaluations(e,t,"/evaluations/batch",{method:"POST",body:JSON.stringify({paper_id:e,operations:t})})}async allPages(e){const r=await this.list({...e,page_size:100}),n=[...r.results];let i=r.next_page;for(;i;){const o=await this.list({...e,page:i,page_size:100});n.push(...o.results),i=o.next_page}return n}}const w=new m(h),S=()=>a.jsxs(c,{openDelay:120,closeDelay:120,children:[a.jsx(d,{asChild:!0,children:a.jsx("button",{type:"button",className:"bm-closed-source-tag","aria-label":"Closed-source model",children:"closed"})}),a.jsxs(p,{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"," ",a.jsx(u,{to:"/settings",className:"closed-eval-tooltip-link",children:"settings"}),"."]})]});function b(s){if(!s)return"Evaluation sourced outside this paper";const e=s.toLowerCase();if(e.includes("open-asr-leaderboard"))return"Open ASR Leaderboard";if(e.includes("arcprize.org"))return"ARC Prize Leaderboard";if(e.includes("frontierswe.com"))return"FrontierSWE";if(e.includes("deepswe.datacurve.ai"))return"DeepSWE";try{const t=new URL(s,"https://paperswithcode.co");return t.pathname.startsWith("/paper/")?"Source paper":t.hostname.replace(/^www\./,"")}catch{return s}}const j=({sourceUrl:s})=>{const e=g(s),t=typeof s=="string"&&s.startsWith("/paper/")?s:null,r=b(s);return a.jsxs(c,{openDelay:120,closeDelay:120,children:[a.jsx(d,{asChild:!0,children:a.jsx("button",{type:"button",className:"bm-external-source-tag","aria-label":`Externally sourced evaluation: ${r}`,children:"External"})}),a.jsxs(p,{side:"top",align:"start",className:"w-auto max-w-[280px] p-3 text-sm leading-snug",children:["This score was sourced outside this paper.",t?a.jsxs(a.Fragment,{children:[" ",a.jsx(u,{to:t,target:"_blank",rel:"noopener noreferrer",className:"external-eval-tooltip-link",children:r}),"."]}):e?a.jsxs(a.Fragment,{children:[" ",a.jsx("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:"external-eval-tooltip-link",children:r}),"."]}):a.jsxs(a.Fragment,{children:[" ",r,"."]})]})]})};export{S as C,j as E,w as e};
 
1
+ import{a as l}from"./papers-PnGxH-RF.js";import{Z as h,j as a,L as u}from"./index-BfGRWIiQ.js";import{H as c,a as d,b as p}from"./hover-card-HVpXfIHl.js";import{s as g}from"./safeExternalHref-CkBrsh84.js";class m{constructor(e){this.request=e}list(e={}){const t=new URLSearchParams(Object.entries(e).filter(r=>r[1]!==void 0).map(([r,n])=>[r,String(n)])).toString();return this.request(`/evaluations/${t?`?${t}`:""}`,{cache:"no-store"})}get(e){return this.request(`/evaluations/${e}`)}async byPaper(e){return this.allPages({paper_id:Number(e),ordering:"-benchmark_popularity"})}async byDataset(e,t){return this.allPages({dataset_id:Number(e),best_metric:t,ordering:"best_rank"})}async byLeaderboard(e,t,r={}){return this.allPages({dataset_id:Number(e),task_id:Number(t),ordering:"best_rank",...r})}create(e){return this.request("/evaluations/",{method:"POST",body:JSON.stringify(e)})}update(e,t){return this.request(`/evaluations/${e}`,{method:"PUT",body:JSON.stringify(t)})}delete(e){return this.request(`/evaluations/${e}`,{method:"DELETE"})}primeCurationState(e,t=!1){return l.primeEvaluations(e,t)}batch(e,t){return l.mutateEvaluations(e,t,"/evaluations/batch",{method:"POST",body:JSON.stringify({paper_id:e,operations:t})})}async allPages(e){const r=await this.list({...e,page_size:100}),n=[...r.results];let i=r.next_page;for(;i;){const o=await this.list({...e,page:i,page_size:100});n.push(...o.results),i=o.next_page}return n}}const w=new m(h),S=()=>a.jsxs(c,{openDelay:120,closeDelay:120,children:[a.jsx(d,{asChild:!0,children:a.jsx("button",{type:"button",className:"bm-closed-source-tag","aria-label":"Closed-source model",children:"closed"})}),a.jsxs(p,{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"," ",a.jsx(u,{to:"/settings",className:"closed-eval-tooltip-link",children:"settings"}),"."]})]});function b(s){if(!s)return"Evaluation sourced outside this paper";const e=s.toLowerCase();if(e.includes("open-asr-leaderboard"))return"Open ASR Leaderboard";if(e.includes("arcprize.org"))return"ARC Prize Leaderboard";if(e.includes("frontierswe.com"))return"FrontierSWE";if(e.includes("deepswe.datacurve.ai"))return"DeepSWE";try{const t=new URL(s,"https://paperswithcode.co");return t.pathname.startsWith("/paper/")?"Source paper":t.hostname.replace(/^www\./,"")}catch{return s}}const j=({sourceUrl:s})=>{const e=g(s),t=typeof s=="string"&&s.startsWith("/paper/")?s:null,r=b(s);return a.jsxs(c,{openDelay:120,closeDelay:120,children:[a.jsx(d,{asChild:!0,children:a.jsx("button",{type:"button",className:"bm-external-source-tag","aria-label":`Externally sourced evaluation: ${r}`,children:"External"})}),a.jsxs(p,{side:"top",align:"start",className:"w-auto max-w-[280px] p-3 text-sm leading-snug",children:["This score was sourced outside this paper.",t?a.jsxs(a.Fragment,{children:[" ",a.jsx(u,{to:t,target:"_blank",rel:"noopener noreferrer",className:"external-eval-tooltip-link",children:r}),"."]}):e?a.jsxs(a.Fragment,{children:[" ",a.jsx("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:"external-eval-tooltip-link",children:r}),"."]}):a.jsxs(a.Fragment,{children:[" ",r,"."]})]})]})};export{S as C,j as E,w as e};
assets/{FeedView-DDAtySqL.js → FeedView-CD558xIp.js} RENAMED
@@ -1 +1 @@
1
- import{u as q,r as c,i as k,j as e,a as $,L as C,b as B}from"./index-BJHhPv_M.js";import{P as K}from"./components-wRHDLoMO.js";import{r as U,u as z,P as G,a as W,w as Q}from"./paperDateRange-Cx_7ISLZ.js";import{D as V,u as X,P as Y,M as J,S as Z,a as ee,R as se,W as ae,A as te,b as re,q as ie,c as ne}from"./chatLaunch--jg98Oug.js";import{c as oe}from"./chat-D9bQn_8F.js";import{c as M}from"./catalog-DOuThn7M.js";import{S as _}from"./chatPrompts-CDY3UGU1.js";import{t as le,d as R}from"./transform-DDP8kg8V.js";import{u as ce}from"./usePapers-Dubaj0sc.js";import{S as y}from"./skeleton-utCOClux.js";import{A as de,a as me}from"./alert-BiDOKM0e.js";import{u as D}from"./useQuery-B9A-sza5.js";import"./LatexTitle-Cb0dDCMw.js";import"./katex.min-BSBacQyE.js";import"./papers-CWyBrS8M.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-ByfOmyUl.js";import"./chevron-down-BVyqIjKu.js";import"./useInfiniteQuery-DeWbJxMK.js";const he=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],H=45,pe=1800,ue=25,ge=350,xe=i=>{const[g,l]=c.useState(_[0].slice(0,1));return c.useEffect(()=>{var v,f;if(!i)return;if((f=(v=window.matchMedia)==null?void 0:v.call(window,"(prefers-reduced-motion: reduce)"))!=null&&f.matches){l(_[0]);return}let m=0,n=1,x=!1,h;l(_[0].slice(0,n));const d=()=>{const p=_[m];if(!x){if(n+=1,l(p.slice(0,n)),n===p.length){x=!0,h=window.setTimeout(d,pe);return}h=window.setTimeout(d,H);return}if(n-=1,l(p.slice(0,n)),n===0){x=!1,m=(m+1)%_.length,h=window.setTimeout(d,ge);return}h=window.setTimeout(d,ue)};return h=window.setTimeout(d,H),()=>window.clearTimeout(h)},[i]),g},fe=i=>i==="trending"||i==="date_published"||i==="citation_count"?i:"trending",be=()=>{var s,r;const i=q(),g=B()?Z:ee,[l,m]=c.useState({text:"",paperMentions:[]}),n=l.text,[x,h]=c.useState(0),[d,v]=c.useState(V),[f,p]=c.useState(!1),[o,A]=c.useState("low"),[b,E]=c.useState(!1),L=xe(!n),w=c.useRef(null),S=D({queryKey:["chatAvailability"],queryFn:()=>oe.getAvailability(),retry:!1,enabled:k()}),P=!!((s=S.data)!=null&&s.web_search_available),j=k()&&((r=S.data)==null?void 0:r.paper_mentions_enabled)!==!1,t=X({draft:l,onChange:m,enabled:j,textareaRef:w});c.useLayoutEffect(()=>{const a=w.current;if(!a)return;const u=()=>{if(a.style.height="auto",n){a.style.height=`${Math.min(a.scrollHeight,160)}px`;return}const N=a.placeholder,F=_.reduce((I,O)=>(a.placeholder=O,Math.max(I,a.scrollHeight)),0);a.placeholder=N,a.style.height=`${Math.min(F,160)}px`};return u(),window.addEventListener("resize",u),()=>window.removeEventListener("resize",u)},[n]);const T=async(a=l)=>{if(!(!a.text.trim()||b)){E(!0),ie(a,d,{webSearchEnabled:P&&f,reasoningEffort:o});try{const N=await ne(d,o);i(`/chat/${N.id}`)}catch{i("/chat")}}};return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"ask-home-new",children:"Hint: type @ to bring papers into context"}),e.jsxs("div",{className:"ask-home",children:[e.jsxs("div",{className:"ask-home-textarea-wrap",children:[e.jsx(Y,{text:l.text,mentions:l.paperMentions,scrollTop:x,variant:"home"}),e.jsx("textarea",{ref:w,rows:1,value:n,placeholder:L,"aria-label":"Ask the assistant",disabled:b,onChange:a=>t.updateText(a.target.value,a.target.selectionStart),onSelect:a=>t.refresh(a.currentTarget.selectionStart),onClick:a=>t.refresh(a.currentTarget.selectionStart),onScroll:a=>h(a.currentTarget.scrollTop),onBlur:a=>{var u,N;(N=(u=a.relatedTarget)==null?void 0:u.closest)!=null&&N.call(u,".chat-paper-picker")||window.setTimeout(t.close,0)},onKeyDown:a=>{t.keyDown(a)||a.key==="Enter"&&!a.shiftKey&&(a.preventDefault(),T())},role:j?"combobox":void 0,"aria-expanded":j?t.open:void 0,"aria-controls":t.open?t.pickerId:void 0,"aria-activedescendant":t.open&&t.results.length?`${t.optionIdPrefix}-${t.activeIndex}`:void 0,"aria-autocomplete":j?"list":void 0,"aria-describedby":t.message?"ask-home-paper-mention-message":void 0})]}),t.message&&e.jsx("div",{id:"ask-home-paper-mention-message",className:"chat-paper-mention-message",role:"alert",children:t.message}),e.jsxs("div",{className:"ask-home-foot",children:[e.jsxs("div",{className:"ask-home-provider-tools",children:[e.jsx(J,{models:g,selectedModel:d,onModelChange:v}),e.jsx(se,{value:o,onChange:A,disabled:b}),P&&e.jsx(ae,{enabled:f,onChange:p,disabled:b})]}),e.jsx("button",{type:"button",className:`chat-send${n.trim()?" chat-send-on":""}`,onClick:()=>void T(),disabled:!n.trim()||b,"aria-label":"Ask the assistant",children:e.jsx(te,{})})]}),e.jsx(re,{open:t.open,query:t.query,results:t.results,activeIndex:t.activeIndex,loading:t.loading,error:t.error,onSelect:t.select,id:t.pickerId,optionIdPrefix:t.optionIdPrefix})]})]})},Ie=()=>{var S,P,j,t,T;const[i,g]=$(),l=fe(i.get("order_by")),m=U(i),n=i.get("has_code")==="true",x=i.get("has_hf_artifacts")==="true",h=s=>{const r=new URLSearchParams(i);r.set("order_by",s),g(r)},d=s=>{const r=new URLSearchParams(i);s?r.set("has_code","true"):r.delete("has_code"),g(r)},v=s=>{const r=new URLSearchParams(i);s?r.set("has_hf_artifacts","true"):r.delete("has_hf_artifacts"),g(r)},f=D({queryKey:["top-tasks-sidebar"],queryFn:()=>M.topTasks(8),staleTime:10*60*1e3}),p=D({queryKey:["trending-tasks-sidebar"],queryFn:()=>M.trendingTasks({limit:8,level:0}),staleTime:10*60*1e3}),o=ce({page_size:30,order_by:l,order_dir:"desc",start_date:m.startDate,end_date:m.endDate,include_resources:!0,has_code:n,has_hf_artifacts:x}),A=c.useMemo(()=>{var r;return(((r=o.data)==null?void 0:r.pages.flatMap(a=>a.results))||[]).map(le)},[o.data]),{targetRef:b,isIntersecting:E}=z({rootMargin:"400px"});c.useEffect(()=>{E&&o.hasNextPage&&!o.isFetchingNextPage&&o.fetchNextPage()},[E,o.hasNextPage,o.isFetchingNextPage]);const L=o.isLoading,w=o.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 sidebar-section-top-domains",children:[e.jsx("div",{className:"sidebar-label",children:"Top Domains"}),f.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((s,r)=>e.jsx(y,{className:"h-5 w-full"},r))}),(S=f.data)==null?void 0:S.map(s=>e.jsxs(C,{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.jsx(C,{to:"/tasks",className:"sidebar-link",style:{marginTop:8,fontStyle:"italic"},children:"all domains →"})]}),e.jsxs("div",{className:"sidebar-section sidebar-section-trending-domains",children:[e.jsx("div",{className:"sidebar-label",children:"Trending Domains"}),p.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((s,r)=>e.jsx(y,{className:"h-5 w-full"},r))}),((j=(P=p.data)==null?void 0:P.results)==null?void 0:j.length)===0&&!p.isLoading&&e.jsx("div",{style:{fontSize:12,color:"var(--ink-faint)"},children:"No domains gaining momentum right now."}),(T=(t=p.data)==null?void 0:t.results)==null?void 0:T.map(s=>e.jsxs(C,{to:`/tasks/${s.slug}`,className:"sidebar-link",children:[R(s.name,s.slug),e.jsxs("span",{className:"count",children:[s.share_lift.toFixed(1),"x"]})]},s.id))]})]}),e.jsxs("div",{className:"feed-main",children:[k()&&e.jsx("div",{className:"feed-chat",children:e.jsx(be,{})}),e.jsxs("div",{className:"feed-content",children:[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:he.map(([s,r])=>e.jsx("button",{className:`sort-btn ${l===s?"active":""}`,onClick:()=>h(s),children:r},s))}),e.jsx(G,{hasCode:n,hasHfArtifacts:x,onHasCodeChange:d,onHasHfArtifactsChange:v})]}),e.jsx(W,{startDate:m.startDate,endDate:m.endDate,onChange:s=>g(Q(i,s))})]}),w&&e.jsx(de,{variant:"destructive",className:"mb-4",children:e.jsx(me,{children:"Failed to load papers. Please try again."})}),L?e.jsx("div",{className:"paper-list",children:Array.from({length:6}).map((s,r)=>e.jsxs("div",{className:"paper-card",children:[e.jsx("div",{className:"paper-thumb-wrap",children:e.jsx(y,{className:"paper-thumb-skeleton"})}),e.jsxs("div",{className:"paper-body",style:{flex:1,gap:12},children:[e.jsx(y,{className:"h-6 w-3/4"}),e.jsx(y,{className:"h-4 w-1/2"}),e.jsx(y,{className:"h-12 w-full"})]})]},r))}):A.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:A.map((s,r)=>e.jsx(K,{paper:s,rank:r+1},s.id))}),e.jsx("div",{ref:b,style:{height:1}}),o.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]})]})]})]})};export{be as AskAssistant,Ie as default};
 
1
+ import{u as q,r as c,i as k,j as e,a as $,L as C,b as B}from"./index-BfGRWIiQ.js";import{P as K}from"./components-fo0inhXZ.js";import{r as U,u as z,P as G,a as W,w as Q}from"./paperDateRange-BwpPQ99I.js";import{D as V,u as X,P as Y,M as J,S as Z,a as ee,R as se,W as ae,A as te,b as re,q as ie,c as ne}from"./chatLaunch-BxzD44NH.js";import{c as oe}from"./chat-dMs5c7qZ.js";import{c as M}from"./catalog-BsVxStBB.js";import{S as _}from"./chatPrompts-CDY3UGU1.js";import{t as le,d as R}from"./transform-BVvRkYPJ.js";import{u as ce}from"./usePapers-SIkOY1oo.js";import{S as y}from"./skeleton-7gHbNXZz.js";import{A as de,a as me}from"./alert-D4lZhgu4.js";import{u as D}from"./useQuery-uhyHf514.js";import"./LatexTitle-DPJPslOM.js";import"./katex.min-BSBacQyE.js";import"./papers-PnGxH-RF.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-xj7LLGhl.js";import"./chevron-down-BovmCLHU.js";import"./useInfiniteQuery-CYJcc79v.js";const he=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],H=45,pe=1800,ue=25,ge=350,xe=i=>{const[g,l]=c.useState(_[0].slice(0,1));return c.useEffect(()=>{var v,f;if(!i)return;if((f=(v=window.matchMedia)==null?void 0:v.call(window,"(prefers-reduced-motion: reduce)"))!=null&&f.matches){l(_[0]);return}let m=0,n=1,x=!1,h;l(_[0].slice(0,n));const d=()=>{const p=_[m];if(!x){if(n+=1,l(p.slice(0,n)),n===p.length){x=!0,h=window.setTimeout(d,pe);return}h=window.setTimeout(d,H);return}if(n-=1,l(p.slice(0,n)),n===0){x=!1,m=(m+1)%_.length,h=window.setTimeout(d,ge);return}h=window.setTimeout(d,ue)};return h=window.setTimeout(d,H),()=>window.clearTimeout(h)},[i]),g},fe=i=>i==="trending"||i==="date_published"||i==="citation_count"?i:"trending",be=()=>{var s,r;const i=q(),g=B()?Z:ee,[l,m]=c.useState({text:"",paperMentions:[]}),n=l.text,[x,h]=c.useState(0),[d,v]=c.useState(V),[f,p]=c.useState(!1),[o,A]=c.useState("low"),[b,E]=c.useState(!1),L=xe(!n),w=c.useRef(null),S=D({queryKey:["chatAvailability"],queryFn:()=>oe.getAvailability(),retry:!1,enabled:k()}),P=!!((s=S.data)!=null&&s.web_search_available),j=k()&&((r=S.data)==null?void 0:r.paper_mentions_enabled)!==!1,t=X({draft:l,onChange:m,enabled:j,textareaRef:w});c.useLayoutEffect(()=>{const a=w.current;if(!a)return;const u=()=>{if(a.style.height="auto",n){a.style.height=`${Math.min(a.scrollHeight,160)}px`;return}const N=a.placeholder,F=_.reduce((I,O)=>(a.placeholder=O,Math.max(I,a.scrollHeight)),0);a.placeholder=N,a.style.height=`${Math.min(F,160)}px`};return u(),window.addEventListener("resize",u),()=>window.removeEventListener("resize",u)},[n]);const T=async(a=l)=>{if(!(!a.text.trim()||b)){E(!0),ie(a,d,{webSearchEnabled:P&&f,reasoningEffort:o});try{const N=await ne(d,o);i(`/chat/${N.id}`)}catch{i("/chat")}}};return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"ask-home-new",children:"Hint: type @ to bring papers into context"}),e.jsxs("div",{className:"ask-home",children:[e.jsxs("div",{className:"ask-home-textarea-wrap",children:[e.jsx(Y,{text:l.text,mentions:l.paperMentions,scrollTop:x,variant:"home"}),e.jsx("textarea",{ref:w,rows:1,value:n,placeholder:L,"aria-label":"Ask the assistant",disabled:b,onChange:a=>t.updateText(a.target.value,a.target.selectionStart),onSelect:a=>t.refresh(a.currentTarget.selectionStart),onClick:a=>t.refresh(a.currentTarget.selectionStart),onScroll:a=>h(a.currentTarget.scrollTop),onBlur:a=>{var u,N;(N=(u=a.relatedTarget)==null?void 0:u.closest)!=null&&N.call(u,".chat-paper-picker")||window.setTimeout(t.close,0)},onKeyDown:a=>{t.keyDown(a)||a.key==="Enter"&&!a.shiftKey&&(a.preventDefault(),T())},role:j?"combobox":void 0,"aria-expanded":j?t.open:void 0,"aria-controls":t.open?t.pickerId:void 0,"aria-activedescendant":t.open&&t.results.length?`${t.optionIdPrefix}-${t.activeIndex}`:void 0,"aria-autocomplete":j?"list":void 0,"aria-describedby":t.message?"ask-home-paper-mention-message":void 0})]}),t.message&&e.jsx("div",{id:"ask-home-paper-mention-message",className:"chat-paper-mention-message",role:"alert",children:t.message}),e.jsxs("div",{className:"ask-home-foot",children:[e.jsxs("div",{className:"ask-home-provider-tools",children:[e.jsx(J,{models:g,selectedModel:d,onModelChange:v}),e.jsx(se,{value:o,onChange:A,disabled:b}),P&&e.jsx(ae,{enabled:f,onChange:p,disabled:b})]}),e.jsx("button",{type:"button",className:`chat-send${n.trim()?" chat-send-on":""}`,onClick:()=>void T(),disabled:!n.trim()||b,"aria-label":"Ask the assistant",children:e.jsx(te,{})})]}),e.jsx(re,{open:t.open,query:t.query,results:t.results,activeIndex:t.activeIndex,loading:t.loading,error:t.error,onSelect:t.select,id:t.pickerId,optionIdPrefix:t.optionIdPrefix})]})]})},Ie=()=>{var S,P,j,t,T;const[i,g]=$(),l=fe(i.get("order_by")),m=U(i),n=i.get("has_code")==="true",x=i.get("has_hf_artifacts")==="true",h=s=>{const r=new URLSearchParams(i);r.set("order_by",s),g(r)},d=s=>{const r=new URLSearchParams(i);s?r.set("has_code","true"):r.delete("has_code"),g(r)},v=s=>{const r=new URLSearchParams(i);s?r.set("has_hf_artifacts","true"):r.delete("has_hf_artifacts"),g(r)},f=D({queryKey:["top-tasks-sidebar"],queryFn:()=>M.topTasks(8),staleTime:10*60*1e3}),p=D({queryKey:["trending-tasks-sidebar"],queryFn:()=>M.trendingTasks({limit:8,level:0}),staleTime:10*60*1e3}),o=ce({page_size:30,order_by:l,order_dir:"desc",start_date:m.startDate,end_date:m.endDate,include_resources:!0,has_code:n,has_hf_artifacts:x}),A=c.useMemo(()=>{var r;return(((r=o.data)==null?void 0:r.pages.flatMap(a=>a.results))||[]).map(le)},[o.data]),{targetRef:b,isIntersecting:E}=z({rootMargin:"400px"});c.useEffect(()=>{E&&o.hasNextPage&&!o.isFetchingNextPage&&o.fetchNextPage()},[E,o.hasNextPage,o.isFetchingNextPage]);const L=o.isLoading,w=o.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 sidebar-section-top-domains",children:[e.jsx("div",{className:"sidebar-label",children:"Top Domains"}),f.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((s,r)=>e.jsx(y,{className:"h-5 w-full"},r))}),(S=f.data)==null?void 0:S.map(s=>e.jsxs(C,{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.jsx(C,{to:"/tasks",className:"sidebar-link",style:{marginTop:8,fontStyle:"italic"},children:"all domains →"})]}),e.jsxs("div",{className:"sidebar-section sidebar-section-trending-domains",children:[e.jsx("div",{className:"sidebar-label",children:"Trending Domains"}),p.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((s,r)=>e.jsx(y,{className:"h-5 w-full"},r))}),((j=(P=p.data)==null?void 0:P.results)==null?void 0:j.length)===0&&!p.isLoading&&e.jsx("div",{style:{fontSize:12,color:"var(--ink-faint)"},children:"No domains gaining momentum right now."}),(T=(t=p.data)==null?void 0:t.results)==null?void 0:T.map(s=>e.jsxs(C,{to:`/tasks/${s.slug}`,className:"sidebar-link",children:[R(s.name,s.slug),e.jsxs("span",{className:"count",children:[s.share_lift.toFixed(1),"x"]})]},s.id))]})]}),e.jsxs("div",{className:"feed-main",children:[k()&&e.jsx("div",{className:"feed-chat",children:e.jsx(be,{})}),e.jsxs("div",{className:"feed-content",children:[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:he.map(([s,r])=>e.jsx("button",{className:`sort-btn ${l===s?"active":""}`,onClick:()=>h(s),children:r},s))}),e.jsx(G,{hasCode:n,hasHfArtifacts:x,onHasCodeChange:d,onHasHfArtifactsChange:v})]}),e.jsx(W,{startDate:m.startDate,endDate:m.endDate,onChange:s=>g(Q(i,s))})]}),w&&e.jsx(de,{variant:"destructive",className:"mb-4",children:e.jsx(me,{children:"Failed to load papers. Please try again."})}),L?e.jsx("div",{className:"paper-list",children:Array.from({length:6}).map((s,r)=>e.jsxs("div",{className:"paper-card",children:[e.jsx("div",{className:"paper-thumb-wrap",children:e.jsx(y,{className:"paper-thumb-skeleton"})}),e.jsxs("div",{className:"paper-body",style:{flex:1,gap:12},children:[e.jsx(y,{className:"h-6 w-3/4"}),e.jsx(y,{className:"h-4 w-1/2"}),e.jsx(y,{className:"h-12 w-full"})]})]},r))}):A.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:A.map((s,r)=>e.jsx(K,{paper:s,rank:r+1},s.id))}),e.jsx("div",{ref:b,style:{height:1}}),o.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]})]})]})]})};export{be as AskAssistant,Ie as default};
assets/{FrameworksIndexView-CbrT4qBE.js → FrameworksIndexView-BNxrGbcA.js} RENAMED
@@ -1 +1 @@
1
- import{u as d,j as e,L as o,z as m}from"./index-BJHhPv_M.js";import{u as p}from"./useQuery-B9A-sza5.js";import{I as h}from"./components-wRHDLoMO.js";import{c as u}from"./catalog-DOuThn7M.js";import{c as g,h as f}from"./transform-DDP8kg8V.js";import"./LatexTitle-Cb0dDCMw.js";import"./katex.min-BSBacQyE.js";import"./papers-CWyBrS8M.js";import"./safeExternalHref-CkBrsh84.js";const x={gpu:"GPU",cpu:"CPU",apple:"Apple silicon"},j={display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:24,paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},k={fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.02em",marginBottom:4},_={fontFamily:"var(--serif)",fontStyle:"italic",fontSize:13,color:"var(--ink-soft)"},v={fontFamily:"var(--mono)",fontSize:13,fontWeight:600,letterSpacing:"0.04em",textTransform:"uppercase",color:"var(--ink)",marginBottom:6},b=({platform:r})=>{const n=g(f(r));return e.jsx("span",{className:"framework-platform-chip",style:{background:n.bg,color:n.text},children:x[r]})},w=({framework:r})=>{const n=d(),l=`/papers?framework=${encodeURIComponent(r.slug)}`;return e.jsxs("article",{id:`framework-${r.slug}`,className:"framework-card framework-card-clickable",role:"link",tabIndex:0,"aria-label":`View papers implemented by ${r.name}`,onClick:a=>{a.target.closest("a, button")||n(l)},onKeyDown:a=>{a.target===a.currentTarget&&(a.key==="Enter"||a.key===" ")&&(a.preventDefault(),n(l))},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(a=>e.jsx(b,{platform:a},a))})]}),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(o,{to:`/paper/${r.introducing_paper_arxiv_id}`,className:"framework-link",children:"Introducing paper"}),r.github_url&&r.paper_count>0&&e.jsxs(o,{to:l,className:"framework-link",children:["Implements ",r.paper_count," ",r.paper_count===1?"paper":"papers"]}),r.github_url&&r.paper_count===0&&e.jsx("span",{className:"framework-link framework-link-disabled","aria-disabled":"true",children:"Implements 0 papers"}),r.github_url&&e.jsxs("a",{href:r.github_url,target:"_blank",rel:"noopener noreferrer",className:"framework-link",children:[e.jsx(h,{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"})]})]})},E=()=>{var a;const r=p({queryKey:["framework-catalog"],queryFn:()=>u.frameworkCatalog()}),n=((a=r.data)==null?void 0:a.domains)??[],l=n.reduce((i,s)=>i+s.categories.reduce((t,c)=>t+c.frameworks.length,0),0);return m.useEffect(()=>{var s;const i=window.location.hash.slice(1);i&&((s=document.getElementById(i))==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."}),n.map(i=>e.jsxs("section",{style:{marginBottom:56},children:[e.jsxs("div",{style:j,children:[e.jsxs("div",{children:[e.jsx("h2",{style:k,children:i.name}),e.jsx("div",{style:_,children:i.description})]}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[i.categories.length," ",i.categories.length===1?"category":"categories"," ·"," ",i.categories.reduce((s,t)=>s+t.frameworks.length,0)," frameworks"]})]}),i.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:v,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(t=>e.jsx(w,{framework:t},t.slug))})]},s.slug))]},i.slug)),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",marginTop:8},children:[l," frameworks across ",n.length," ",n.length===1?"domain":"domains",". More areas coming soon."]})]})};export{w as FrameworkCard,E as default};
 
1
+ import{u as d,j as e,L as o,z as m}from"./index-BfGRWIiQ.js";import{u as p}from"./useQuery-uhyHf514.js";import{I as h}from"./components-fo0inhXZ.js";import{c as u}from"./catalog-BsVxStBB.js";import{c as g,h as f}from"./transform-BVvRkYPJ.js";import"./LatexTitle-DPJPslOM.js";import"./katex.min-BSBacQyE.js";import"./papers-PnGxH-RF.js";import"./safeExternalHref-CkBrsh84.js";const x={gpu:"GPU",cpu:"CPU",apple:"Apple silicon"},j={display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:24,paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},k={fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.02em",marginBottom:4},_={fontFamily:"var(--serif)",fontStyle:"italic",fontSize:13,color:"var(--ink-soft)"},v={fontFamily:"var(--mono)",fontSize:13,fontWeight:600,letterSpacing:"0.04em",textTransform:"uppercase",color:"var(--ink)",marginBottom:6},b=({platform:r})=>{const n=g(f(r));return e.jsx("span",{className:"framework-platform-chip",style:{background:n.bg,color:n.text},children:x[r]})},w=({framework:r})=>{const n=d(),l=`/papers?framework=${encodeURIComponent(r.slug)}`;return e.jsxs("article",{id:`framework-${r.slug}`,className:"framework-card framework-card-clickable",role:"link",tabIndex:0,"aria-label":`View papers implemented by ${r.name}`,onClick:a=>{a.target.closest("a, button")||n(l)},onKeyDown:a=>{a.target===a.currentTarget&&(a.key==="Enter"||a.key===" ")&&(a.preventDefault(),n(l))},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(a=>e.jsx(b,{platform:a},a))})]}),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(o,{to:`/paper/${r.introducing_paper_arxiv_id}`,className:"framework-link",children:"Introducing paper"}),r.github_url&&r.paper_count>0&&e.jsxs(o,{to:l,className:"framework-link",children:["Implements ",r.paper_count," ",r.paper_count===1?"paper":"papers"]}),r.github_url&&r.paper_count===0&&e.jsx("span",{className:"framework-link framework-link-disabled","aria-disabled":"true",children:"Implements 0 papers"}),r.github_url&&e.jsxs("a",{href:r.github_url,target:"_blank",rel:"noopener noreferrer",className:"framework-link",children:[e.jsx(h,{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"})]})]})},E=()=>{var a;const r=p({queryKey:["framework-catalog"],queryFn:()=>u.frameworkCatalog()}),n=((a=r.data)==null?void 0:a.domains)??[],l=n.reduce((i,s)=>i+s.categories.reduce((t,c)=>t+c.frameworks.length,0),0);return m.useEffect(()=>{var s;const i=window.location.hash.slice(1);i&&((s=document.getElementById(i))==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."}),n.map(i=>e.jsxs("section",{style:{marginBottom:56},children:[e.jsxs("div",{style:j,children:[e.jsxs("div",{children:[e.jsx("h2",{style:k,children:i.name}),e.jsx("div",{style:_,children:i.description})]}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[i.categories.length," ",i.categories.length===1?"category":"categories"," ·"," ",i.categories.reduce((s,t)=>s+t.frameworks.length,0)," frameworks"]})]}),i.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:v,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(t=>e.jsx(w,{framework:t},t.slug))})]},s.slug))]},i.slug)),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",marginTop:8},children:[l," frameworks across ",n.length," ",n.length===1?"domain":"domains",". More areas coming soon."]})]})};export{w as FrameworkCard,E as default};
assets/{LatexTitle-Cb0dDCMw.js → LatexTitle-DPJPslOM.js} RENAMED
@@ -1 +1 @@
1
- import{j as u,r as E}from"./index-BJHhPv_M.js";import{k as j}from"./katex.min-BSBacQyE.js";const C=new Set([",",";",":","!"," ","quad","qquad","enspace","thinspace"]),M={a:"á",e:"é",i:"í",o:"ó",u:"ú",y:"ý",A:"Á",E:"É",I:"Í",O:"Ó",U:"Ú",Y:"Ý"},_={a:"à",e:"è",i:"ì",o:"ò",u:"ù",A:"À",E:"È",I:"Ì",O:"Ò",U:"Ù"},b={a:"â",e:"ê",i:"î",o:"ô",u:"û",A:"Â",E:"Ê",I:"Î",O:"Ô",U:"Û"},w={a:"ä",e:"ë",i:"ï",o:"ö",u:"ü",y:"ÿ",A:"Ä",E:"Ë",I:"Ï",O:"Ö",U:"Ü",Y:"Ÿ"},O={"'":M,"`":_,"^":b,'"':w,"~":{n:"ñ",N:"Ñ"}},$={ss:"ß",ae:"æ",AE:"Æ",oe:"œ",OE:"Œ",o:"ø",O:"Ø",l:"ł",L:"Ł"};function S(n,s){var e;return((e=O[n])==null?void 0:e[s])??null}function N(n){const s=[];let e=0,r="";const t=()=>{r&&(s.push({type:"text",content:r}),r="")};for(;e<n.length;){if(n[e]==="$"&&n[e+1]==="$"){t();const o=n.indexOf("$$",e+2);if(o===-1){r+=n.slice(e);break}s.push({type:"display",content:n.slice(e+2,o)}),e=o+2;continue}if(n[e]==="$"){t();const o=n.indexOf("$",e+1);if(o===-1){r+=n.slice(e);break}s.push({type:"inline",content:n.slice(e+1,o)}),e=o+1;continue}r+=n[e],e+=1}return t(),s}function d(n,s){if(n[s]!=="{")return null;let e=0;for(let r=s;r<n.length;r+=1)if(n[r]==="{")e+=1;else if(n[r]==="}"&&(e-=1,e===0))return{content:n.slice(s+1,r),end:r+1};return null}function y(n,s){let e=s+1;if(e>=n.length)return{name:"",end:e};if(!/[a-zA-Z]/.test(n[e]))return{name:n[e],end:e+1};const r=e;for(;e<n.length&&/[a-zA-Z]/.test(n[e]);)e+=1;return{name:n.slice(r,e),end:e}}function k(n,s){const e=n[s];if(e!=="^"&&e!=="_"||s+1>=n.length)return null;if(n[s+1]==="{"){const r=d(n,s+1);return r?{end:r.end}:null}return/[A-Za-z0-9+\-=.]/.test(n[s+1])?{end:s+2}:null}function L(n,s){let e=s;if(n[e]==="\\"){const{name:o,end:i}=y(n,e);if(!o)return null;if(e=i,n[e]==="{"){const a=d(n,e);a&&(e=a.end)}}else if(/[A-Za-z0-9]/.test(n[e])){let o=e+1;for(;o<n.length&&/[A-Za-z0-9]/.test(n[o]);)o+=1;if(n[o]!=="^"&&n[o]!=="_")return null;e=o}else return null;const r=s;let t=0;for(;e<n.length;){const o=k(n,e);if(!o)break;t+=1,e=o.end}return t===0?null:{latex:n.slice(r,e),end:e}}function U(n){return Array.from(new Set((n||"").trim().split(/\s+/).filter(Boolean))).sort((s,e)=>e.length-s.length)}function z(n,s,e){const r=U(s);if(!r.length)return[n];const t=r.map(i=>i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")),o=new RegExp(`(${t.join("|")})`,"gi");return n.split(o).filter(Boolean).map((i,a)=>r.some(p=>p.toLocaleLowerCase()===i.toLocaleLowerCase())?u.jsx("mark",{children:i},`${e}-mark-${a}`):i)}function m(n,s,e){const r=[];let t=0,o=0;const i=()=>`${s}-${o++}`,a=(p,f)=>p==="strong"?u.jsx("strong",{children:f},i()):u.jsx("em",{children:f},i());for(;t<n.length;){if(n[t]==="\\"){const{name:l,end:T}=y(n,t);if(t=T,$[l]){r.push($[l]);continue}if(l.length===1&&t<n.length&&/[A-Za-z]/.test(n[t])){const c=S(l,n[t]);if(c){r.push(c),t+=1;continue}}if(l==="c"){const c=d(n,t);if((c==null?void 0:c.content.length)===1){const h={c:"ç",C:"Ç"}[c.content];if(h){r.push(h),t=c.end;continue}}}if(l==="textbf"||l==="mathbf"){const c=d(n,t);if(c){t=c.end,r.push(a("strong",m(c.content,i(),e)));continue}}if(l==="emph"||l==="textit"||l==="textsl"||l==="texttt"){const c=d(n,t);if(c){t=c.end,r.push(a("em",m(c.content,i(),e)));continue}}if(l==="color"||l==="textcolor"){const c=d(n,t);if(c){t=c.end;const h=d(n,t);h&&(t=h.end,r.push(...m(h.content,i(),e)));continue}}if(C.has(l)){r.push(" ");continue}if(l==="~"){r.push(" ");continue}const A=d(n,t);if(A){t=A.end,r.push(...m(A.content,i(),e));continue}r.push(`\\${l}`);continue}if(n[t]==="~"){r.push(" "),t+=1;continue}const p=L(n,t);if(p){r.push(u.jsx(g,{latex:p.latex,display:!1},i())),t=p.end;continue}let f=t;for(;f<n.length&&n[f]!=="\\"&&n[f]!=="~"&&!L(n,f);)f+=1;f>t&&r.push(...z(n.slice(t,f),e,i())),t=f}return r}function g({latex:n,display:s}){const e=E.useMemo(()=>{try{return j.renderToString(n.trim(),{displayMode:s,throwOnError:!1})}catch{return null}},[n,s]);return e?u.jsx("span",{className:s?"katex-display":void 0,dangerouslySetInnerHTML:{__html:e}}):u.jsx(u.Fragment,{children:s?`$$${n}$$`:`$${n}$`})}function I(n,s){const e=N(n),r=[];return e.forEach((t,o)=>{const i=`latex-${o}`;if(t.type==="text"){const a=m(t.content,i,s);a.length===1?r.push(a[0]):a.length>1&&r.push(u.jsx(E.Fragment,{children:a},i));return}if(t.type==="display"){r.push(u.jsx(g,{latex:t.content,display:!0},i));return}r.push(u.jsx(g,{latex:t.content,display:!1},i))}),r.length===1?r[0]:u.jsx(u.Fragment,{children:r})}const X=({text:n,className:s="",highlight:e})=>{const r=E.useMemo(()=>I(n,e),[n,e]);return u.jsx("span",{className:s,children:r})},D=({title:n,className:s="",highlight:e})=>u.jsx(X,{text:n,className:s,highlight:e});export{D as L,X as a};
 
1
+ import{j as u,r as E}from"./index-BfGRWIiQ.js";import{k as j}from"./katex.min-BSBacQyE.js";const C=new Set([",",";",":","!"," ","quad","qquad","enspace","thinspace"]),M={a:"á",e:"é",i:"í",o:"ó",u:"ú",y:"ý",A:"Á",E:"É",I:"Í",O:"Ó",U:"Ú",Y:"Ý"},_={a:"à",e:"è",i:"ì",o:"ò",u:"ù",A:"À",E:"È",I:"Ì",O:"Ò",U:"Ù"},b={a:"â",e:"ê",i:"î",o:"ô",u:"û",A:"Â",E:"Ê",I:"Î",O:"Ô",U:"Û"},w={a:"ä",e:"ë",i:"ï",o:"ö",u:"ü",y:"ÿ",A:"Ä",E:"Ë",I:"Ï",O:"Ö",U:"Ü",Y:"Ÿ"},O={"'":M,"`":_,"^":b,'"':w,"~":{n:"ñ",N:"Ñ"}},$={ss:"ß",ae:"æ",AE:"Æ",oe:"œ",OE:"Œ",o:"ø",O:"Ø",l:"ł",L:"Ł"};function S(n,s){var e;return((e=O[n])==null?void 0:e[s])??null}function N(n){const s=[];let e=0,r="";const t=()=>{r&&(s.push({type:"text",content:r}),r="")};for(;e<n.length;){if(n[e]==="$"&&n[e+1]==="$"){t();const o=n.indexOf("$$",e+2);if(o===-1){r+=n.slice(e);break}s.push({type:"display",content:n.slice(e+2,o)}),e=o+2;continue}if(n[e]==="$"){t();const o=n.indexOf("$",e+1);if(o===-1){r+=n.slice(e);break}s.push({type:"inline",content:n.slice(e+1,o)}),e=o+1;continue}r+=n[e],e+=1}return t(),s}function d(n,s){if(n[s]!=="{")return null;let e=0;for(let r=s;r<n.length;r+=1)if(n[r]==="{")e+=1;else if(n[r]==="}"&&(e-=1,e===0))return{content:n.slice(s+1,r),end:r+1};return null}function y(n,s){let e=s+1;if(e>=n.length)return{name:"",end:e};if(!/[a-zA-Z]/.test(n[e]))return{name:n[e],end:e+1};const r=e;for(;e<n.length&&/[a-zA-Z]/.test(n[e]);)e+=1;return{name:n.slice(r,e),end:e}}function k(n,s){const e=n[s];if(e!=="^"&&e!=="_"||s+1>=n.length)return null;if(n[s+1]==="{"){const r=d(n,s+1);return r?{end:r.end}:null}return/[A-Za-z0-9+\-=.]/.test(n[s+1])?{end:s+2}:null}function L(n,s){let e=s;if(n[e]==="\\"){const{name:o,end:i}=y(n,e);if(!o)return null;if(e=i,n[e]==="{"){const a=d(n,e);a&&(e=a.end)}}else if(/[A-Za-z0-9]/.test(n[e])){let o=e+1;for(;o<n.length&&/[A-Za-z0-9]/.test(n[o]);)o+=1;if(n[o]!=="^"&&n[o]!=="_")return null;e=o}else return null;const r=s;let t=0;for(;e<n.length;){const o=k(n,e);if(!o)break;t+=1,e=o.end}return t===0?null:{latex:n.slice(r,e),end:e}}function U(n){return Array.from(new Set((n||"").trim().split(/\s+/).filter(Boolean))).sort((s,e)=>e.length-s.length)}function z(n,s,e){const r=U(s);if(!r.length)return[n];const t=r.map(i=>i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")),o=new RegExp(`(${t.join("|")})`,"gi");return n.split(o).filter(Boolean).map((i,a)=>r.some(p=>p.toLocaleLowerCase()===i.toLocaleLowerCase())?u.jsx("mark",{children:i},`${e}-mark-${a}`):i)}function m(n,s,e){const r=[];let t=0,o=0;const i=()=>`${s}-${o++}`,a=(p,f)=>p==="strong"?u.jsx("strong",{children:f},i()):u.jsx("em",{children:f},i());for(;t<n.length;){if(n[t]==="\\"){const{name:l,end:T}=y(n,t);if(t=T,$[l]){r.push($[l]);continue}if(l.length===1&&t<n.length&&/[A-Za-z]/.test(n[t])){const c=S(l,n[t]);if(c){r.push(c),t+=1;continue}}if(l==="c"){const c=d(n,t);if((c==null?void 0:c.content.length)===1){const h={c:"ç",C:"Ç"}[c.content];if(h){r.push(h),t=c.end;continue}}}if(l==="textbf"||l==="mathbf"){const c=d(n,t);if(c){t=c.end,r.push(a("strong",m(c.content,i(),e)));continue}}if(l==="emph"||l==="textit"||l==="textsl"||l==="texttt"){const c=d(n,t);if(c){t=c.end,r.push(a("em",m(c.content,i(),e)));continue}}if(l==="color"||l==="textcolor"){const c=d(n,t);if(c){t=c.end;const h=d(n,t);h&&(t=h.end,r.push(...m(h.content,i(),e)));continue}}if(C.has(l)){r.push(" ");continue}if(l==="~"){r.push(" ");continue}const A=d(n,t);if(A){t=A.end,r.push(...m(A.content,i(),e));continue}r.push(`\\${l}`);continue}if(n[t]==="~"){r.push(" "),t+=1;continue}const p=L(n,t);if(p){r.push(u.jsx(g,{latex:p.latex,display:!1},i())),t=p.end;continue}let f=t;for(;f<n.length&&n[f]!=="\\"&&n[f]!=="~"&&!L(n,f);)f+=1;f>t&&r.push(...z(n.slice(t,f),e,i())),t=f}return r}function g({latex:n,display:s}){const e=E.useMemo(()=>{try{return j.renderToString(n.trim(),{displayMode:s,throwOnError:!1})}catch{return null}},[n,s]);return e?u.jsx("span",{className:s?"katex-display":void 0,dangerouslySetInnerHTML:{__html:e}}):u.jsx(u.Fragment,{children:s?`$$${n}$$`:`$${n}$`})}function I(n,s){const e=N(n),r=[];return e.forEach((t,o)=>{const i=`latex-${o}`;if(t.type==="text"){const a=m(t.content,i,s);a.length===1?r.push(a[0]):a.length>1&&r.push(u.jsx(E.Fragment,{children:a},i));return}if(t.type==="display"){r.push(u.jsx(g,{latex:t.content,display:!0},i));return}r.push(u.jsx(g,{latex:t.content,display:!1},i))}),r.length===1?r[0]:u.jsx(u.Fragment,{children:r})}const X=({text:n,className:s="",highlight:e})=>{const r=E.useMemo(()=>I(n,e),[n,e]);return u.jsx("span",{className:s,children:r})},D=({title:n,className:s="",highlight:e})=>u.jsx(X,{text:n,className:s,highlight:e});export{D as L,X as a};
assets/{MarkdownText-_ZQTzPOU.js → MarkdownText-DeevkxdU.js} RENAMED
@@ -1 +1 @@
1
- import{n as l,j as s,L as u}from"./index-BJHhPv_M.js";import"./katex.min-BSBacQyE.js";import{r as p,a as m,P as h}from"./PaperPreviewLink-DVTrFkw2.js";import{M as d,r as w}from"./index-RvWGcsIO.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,f as r};
 
1
+ import{n as l,j as s,L as u}from"./index-BfGRWIiQ.js";import"./katex.min-BSBacQyE.js";import{r as p,a as m,P as h}from"./PaperPreviewLink-_SPYeWhn.js";import{M as d,r as w}from"./index-BqZK5Cw1.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,f as r};
assets/{MethodDetailView-nir03v4e.js → MethodDetailView-B8j5YLI4.js} RENAMED
@@ -1 +1 @@
1
- import{j as e,r as A,c as Z,a as V,L,aa as X}from"./index-BJHhPv_M.js";import{u as F}from"./useQuery-B9A-sza5.js";import{u as Y}from"./useInfiniteQuery-DeWbJxMK.js";import{M as J,P as ee}from"./components-wRHDLoMO.js";import{r as te,u as ae,P as se,a as re,w as ne}from"./paperDateRange-Cx_7ISLZ.js";import{r as ie,M as K}from"./MarkdownText-_ZQTzPOU.js";import{c as k}from"./catalog-DOuThn7M.js";import{p as le}from"./papers-CWyBrS8M.js";import{s as oe}from"./slug-BpH-Nkvz.js";import{t as ce}from"./transform-DDP8kg8V.js";import{S as M}from"./skeleton-utCOClux.js";import{A as de,a as me}from"./alert-BiDOKM0e.js";import{s as he}from"./safeExternalHref-CkBrsh84.js";import"./LatexTitle-Cb0dDCMw.js";import"./katex.min-BSBacQyE.js";import"./popover-ByfOmyUl.js";import"./PaperPreviewLink-DVTrFkw2.js";import"./index-RvWGcsIO.js";import"./hover-card-CBNxKixP.js";const a={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"},j=({x:t,y:n,w:o,h:c,fill:g,stroke:x,label:p,fontSize:i=10,multiline:y})=>e.jsxs("g",{children:[e.jsx("rect",{x:t,y:n,width:o,height:c,rx:"3",ry:"3",fill:g,stroke:x,strokeWidth:"1"}),y?e.jsxs(e.Fragment,{children:[e.jsx("text",{x:t+o/2,y:n+c/2-2,fontSize:i,fontFamily:"var(--sans)",fill:a.ink,textAnchor:"middle",dominantBaseline:"middle",children:y[0]}),e.jsx("text",{x:t+o/2,y:n+c/2+i-1,fontSize:i,fontFamily:"var(--sans)",fill:a.ink,textAnchor:"middle",dominantBaseline:"middle",children:y[1]})]}):e.jsx("text",{x:t+o/2,y:n+c/2,fontSize:i,fontFamily:"var(--sans)",fill:a.ink,textAnchor:"middle",dominantBaseline:"middle",children:p})]}),pe=()=>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:a.faint,textAnchor:"middle",children:"Scaled Dot-Product Attention"}),e.jsx(j,{x:140,y:40,w:80,h:26,fill:a.yellow,stroke:a.yellowS,label:"MatMul",fontSize:11}),e.jsx("path",{d:"M180 66 L180 80",stroke:a.ink}),e.jsx(j,{x:140,y:80,w:80,h:26,fill:a.green,stroke:a.greenS,label:"SoftMax",fontSize:11}),e.jsx("path",{d:"M180 106 L180 120",stroke:a.ink}),e.jsx(j,{x:140,y:120,w:80,h:26,fill:a.purple,stroke:a.purpleS,label:"Mask (opt.)",fontSize:11}),e.jsx("path",{d:"M180 146 L180 160",stroke:a.ink}),e.jsx(j,{x:140,y:160,w:80,h:26,fill:a.blue,stroke:a.blueS,label:"Scale ÷√dₖ",fontSize:11}),e.jsx("path",{d:"M180 186 L180 200",stroke:a.ink}),e.jsx(j,{x:140,y:200,w:80,h:26,fill:a.yellow,stroke:a.yellowS,label:"MatMul",fontSize:11}),e.jsx("path",{d:"M156 226 L120 270",stroke:a.ink}),e.jsx("path",{d:"M180 226 L180 270",stroke:a.ink}),e.jsx("path",{d:"M204 226 L240 270",stroke:a.ink}),e.jsx(j,{x:100,y:270,w:40,h:24,fill:a.pink,stroke:a.pinkS,label:"Q",fontSize:13}),e.jsx(j,{x:160,y:270,w:40,h:24,fill:a.pink,stroke:a.pinkS,label:"K",fontSize:13}),e.jsx(j,{x:220,y:270,w:40,h:24,fill:a.pink,stroke:a.pinkS,label:"V",fontSize:13}),e.jsxs("text",{x:"180",y:"330",fontSize:"14",fontFamily:"var(--serif)",fontStyle:"italic",fill:a.ink,textAnchor:"middle",children:["softmax(QK",e.jsx("tspan",{fontSize:"9",baselineShift:"super",children:"⊤"})," / √d) V"]})]}),ue=[["my-skill/",""],["├── SKILL.md","# Required: metadata + instructions"],["├── scripts/","# Optional: executable code"],["├── references/","# Optional: documentation"],["├── assets/","# Optional: templates, resources"],["└── ...","# Any additional files or directories"]],xe=()=>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:a.faint,textAnchor:"middle",children:"Skill package layout"}),e.jsx("rect",{x:"28",y:"48",width:"304",height:"318",rx:"8",fill:"#FFFDF8",stroke:a.faint,strokeWidth:"1"}),ue.map(([t,n],o)=>{const c=92+o*44;return e.jsxs("g",{children:[e.jsx("text",{x:"44",y:c,fontSize:"11",fontFamily:"var(--mono)",fill:a.ink,dominantBaseline:"middle",children:t}),n?e.jsx("text",{x:"138",y:c,fontSize:"8.5",fontFamily:"var(--mono)",fill:a.faint,dominantBaseline:"middle",children:n}):null]},t)})]}),ge={attention:pe,"agent-skills":xe},fe=({method:t})=>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:a.faint,textAnchor:"middle",children:t.name||"method"}),e.jsx(j,{x:80,y:70,w:200,h:50,fill:a.blue,stroke:a.blueS,label:"Input",fontSize:12}),e.jsx("path",{d:"M180 120 L180 150",stroke:a.ink}),e.jsx(j,{x:80,y:150,w:200,h:70,fill:a.orange,stroke:a.orangeS,label:t.name||"transform",fontSize:13}),e.jsx("path",{d:"M180 220 L180 250",stroke:a.ink}),e.jsx(j,{x:80,y:250,w:200,h:50,fill:a.purple,stroke:a.purpleS,label:"Output",fontSize:12})]}),je=({method:t})=>{const n=(t.slug||"").toLowerCase(),o=ge[n];if(o)return e.jsx("div",{className:"method-figure-svg method-figure-svg--schematic",children:e.jsx(o,{})});if(t.image_url){const c=n==="transformer"||n==="gpt-4"||n==="gpt-4o"||n==="multi-head-attention"?" method-figure-svg--compact":n==="rpn"?" method-figure-svg--scaled-80":"";return e.jsx("div",{className:`method-figure-svg method-figure-svg--image${c}`,children:e.jsx("img",{className:"method-figure-img",src:t.image_url,alt:`${t.name} figure`})})}return e.jsx("div",{className:"method-figure-svg method-figure-svg--schematic",children:e.jsx(fe,{method:t})})},C=720,B=138,u={top:8,right:10,bottom:25,left:36},Q=56,_e=new Intl.DateTimeFormat("en",{month:"short",year:"2-digit",timeZone:"UTC"}),ye=new Intl.DateTimeFormat("en",{year:"numeric",timeZone:"UTC"}),E=t=>_e.format(new Date(`${t}T00:00:00Z`)),ve=(t,n)=>{if(t===0)return new Set;const o=t>48?12:t>36?6:t>18?3:2,c=Math.max(1,Math.ceil(Q/n)),g=Math.max(o,c),x=t-1,p=new Set([0,x]);for(let i=g;i<x;i+=g)(x-i)*n>=Q&&p.add(i);return p},U=t=>{if(t.coverage_status===void 0||["complete","not_applicable"].includes(t.coverage_status))return null;const n=t.processed_paper_count!==void 0&&t.eligible_paper_count!==void 0?`; ${t.processed_paper_count.toLocaleString()} of ${t.eligible_paper_count.toLocaleString()} eligible papers processed`:"";return`Historical tagging ${t.coverage_status==="failed"?"needs retry":"in progress"}${n}`},Ne=({history:t,methodName:n})=>{const[o,c]=A.useState(null),g=Math.max(1,...t.map(d=>d.paper_count)),x=C-u.left-u.right,p=B-u.top-u.bottom,i=t.length?x/t.length:x,y=Math.max(2,i*.68),D=ve(t.length,i),h=Array.from(new Set([0,Math.ceil(g/2),g])),_=o==null?null:t[o],f=_?U(_):null;return e.jsxs("div",{className:"method-usage-chart-wrap",children:[e.jsxs("svg",{className:"method-usage-chart",viewBox:`0 0 ${C} ${B}`,role:"group","aria-label":`${n}: papers mentioning this method by publication month`,children:[e.jsxs("title",{children:[n,": papers mentioning this method by publication month"]}),h.map(d=>{const l=u.top+p-d/g*p;return e.jsxs("g",{children:[e.jsx("line",{className:"method-usage-gridline",x1:u.left,x2:C-u.right,y1:l,y2:l}),e.jsx("text",{className:"method-usage-y-label",x:u.left-8,y:l+3,textAnchor:"end",children:d})]},d)}),t.map((d,l)=>{const b=d.paper_count/g*p,v=d.paper_count>0?Math.max(1,b):0,P=u.left+i*l+(i-y)/2,w=u.top+p-v,s=o===l,S=l===t.length-1,N=U(d);return e.jsxs("g",{className:`method-usage-bar${s?" is-active":""}${S?" is-current":""}`,tabIndex:0,role:"img","aria-label":`${E(d.start_date)}: ${d.paper_count} ${d.paper_count===1?"paper":"papers"}${N?`. ${N}`:""}`,onMouseEnter:()=>c(l),onMouseLeave:()=>c(null),onFocus:()=>c(l),onBlur:()=>c(null),children:[e.jsx("rect",{className:"method-usage-bar-hit",x:u.left+i*l,y:u.top,width:i,height:p}),e.jsx("rect",{className:"method-usage-bar-mark",x:P,y:w,width:y,height:v,rx:"1.5"})]},d.start_date)}),t.map((d,l)=>D.has(l)?e.jsx("text",{className:"method-usage-x-label",x:u.left+i*(l+.5),y:B-11,textAnchor:"middle",children:t.length>48?ye.format(new Date(`${d.start_date}T00:00:00Z`)):E(d.start_date)},d.start_date):null)]}),_&&e.jsxs("div",{className:"method-usage-tooltip",role:"status",children:[e.jsx("strong",{children:E(_.start_date)}),e.jsxs("span",{children:[_.paper_count," ",_.paper_count===1?"paper":"papers",o===t.length-1?" · month to date":""]}),e.jsxs("span",{children:[(_.catalog_share??0).toFixed(2),"% of"," ",(_.catalog_paper_count??0).toLocaleString()," catalog papers"]}),f&&e.jsx("span",{children:f})]})]})},Se=[["trending","trending"],["new","newest"],["cited","most cited"]],G={"on-policy-distillation":["fine-tuning","post-training","rlvr","rlhf","direct-preference-optimization-dpo"],mcp:["agent-skills"],"agent-skills":["mcp"]},Oe=()=>{var T,z,$,H,R,q;const{methodSlug:t}=Z(),[n,o]=V(),[c,g]=A.useState("trending"),x=n.get("has_code")==="true",p=n.get("has_hf_artifacts")==="true",i=te(n),y=r=>{const m=new URLSearchParams(n);r?m.set("has_code","true"):m.delete("has_code"),o(m)},D=r=>{const m=new URLSearchParams(n);r?m.set("has_hf_artifacts","true"):m.delete("has_hf_artifacts"),o(m)},h=F({queryKey:["method",t],queryFn:()=>k.getMethod(t),enabled:!!t,staleTime:10*60*1e3}),_=F({queryKey:["areas-all"],queryFn:()=>k.listAreas({page_size:50,ordering:"name"}),enabled:!!((T=h.data)!=null&&T.area_id),staleTime:10*60*1e3}),f=F({queryKey:["method-trend",t],queryFn:()=>k.methodTrend(t),enabled:!!t&&!!h.data,staleTime:10*60*1e3}),d=c==="trending"?"trending":c==="cited"?"citation_count":"date_published",l=Y({queryKey:["method-papers-infinite",t,d,x,p,i.startDate,i.endDate],queryFn:({pageParam:r=1})=>le.forMethod(t,{page:r,page_size:20,order_by:d,order_dir:"desc",include_resources:!0,has_code:x,has_hf_artifacts:p,start_date:i.startDate,end_date:i.endDate}),getNextPageParam:r=>r.next_page,initialPageParam:1,enabled:!!t,staleTime:5*60*1e3,placeholderData:X}),b=F({queryKey:["related-methods",(z=h.data)==null?void 0:z.slug,($=h.data)==null?void 0:$.area_id,(H=h.data)==null?void 0:H.id],queryFn:async()=>{const r=h.data;if(!r)return[];const m=r.slug?G[r.slug]:void 0;return m?Promise.all(m.map(W=>k.getMethod(W))):r.area_id?(await k.listMethods({area_id:r.area_id,exclude_id:r.id,ordering:"-paper_count",page_size:8})).results:[]},enabled:!!(h.data&&(h.data.slug&&G[h.data.slug]||h.data.area_id)),staleTime:10*60*1e3}),v=A.useMemo(()=>{var m;return(((m=l.data)==null?void 0:m.pages.flatMap(O=>O.results))||[]).map(ce)},[l.data]),{targetRef:P,isIntersecting:w}=ae({rootMargin:"200px"});if(A.useEffect(()=>{w&&l.hasNextPage&&!l.isFetchingNextPage&&l.fetchNextPage()},[w,l.hasNextPage,l.isFetchingNextPage]),h.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(h.error||!h.data)return e.jsx("div",{className:"page",children:e.jsx(de,{variant:"destructive",children:e.jsx(me,{children:"Method not found."})})});const s=h.data,S=(R=_.data)==null?void 0:R.results.find(r=>r.id===s.area_id),N=ie(s.source_url),I=N?null:he(s.source_url);return e.jsxs("div",{className:"page",children:[e.jsxs("div",{className:"breadcrumb",children:[e.jsx(L,{to:"/methods",children:"Methods"}),S&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"sep",children:"/"}),e.jsx(L,{to:`/methods#area-${oe(S.name)}`,children:S.name})]}),e.jsx("span",{className:"sep",children:"/"}),e.jsx("span",{style:{color:"var(--ink)"},children:s.name})]}),e.jsxs("div",{className:`tag-hero method-hero-grid${s.slug==="grokking"||s.slug==="latent-reasoning"||s.slug==="world-action-models"?" 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:s.name}),s.full_name&&s.full_name!==s.name&&e.jsx("div",{style:{fontFamily:"var(--serif)",fontSize:16,fontStyle:"italic",color:"var(--ink-soft)",marginTop:8},children:s.full_name}),s.description&&e.jsx(K,{className:"method-description",text:s.description}),s.source_url&&s.source_title&&e.jsxs("div",{className:"method-source",children:[e.jsx("span",{className:"method-source-label",children:"Source"}),N?e.jsxs(L,{className:"method-source-link",to:N,target:"_blank",rel:"noopener noreferrer",children:[e.jsx("span",{className:"method-source-title",children:s.source_title}),s.introduced_year&&e.jsx("span",{className:"method-source-meta",children:s.introduced_year})]}):I?e.jsxs("a",{className:"method-source-link",href:I,target:"_blank",rel:"noopener noreferrer",children:[e.jsx("span",{className:"method-source-title",children:s.source_title}),s.introduced_year&&e.jsx("span",{className:"method-source-meta",children:s.introduced_year})]}):e.jsxs("div",{className:"method-source-link is-static",children:[e.jsx("span",{className:"method-source-title",children:s.source_title}),s.introduced_year&&e.jsx("span",{className:"method-source-meta",children:s.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:(s.paper_count??0).toLocaleString()})]}),f.data&&e.jsxs("div",{className:"stat",children:[e.jsx("span",{className:"label",children:"Recent mentions"}),e.jsx("span",{className:"value",children:f.data.comparison_complete?e.jsxs(e.Fragment,{children:[f.data.trend_score.toFixed(1),e.jsx("small",{children:"/mo"})]}):"Pending"})]}),s.introduced_year!=null&&e.jsxs("div",{className:"stat",children:[e.jsx("span",{className:"label",children:"Introduced"}),e.jsx("span",{className:"value",children:s.introduced_year})]})]}),f.isLoading?e.jsx(M,{className:"h-36 w-full method-trend-skeleton"}):f.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:f.data.recent_paper_count}),e.jsxs("span",{children:["papers / ",f.data.recent_days,"d"]})]})]}),e.jsx(Ne,{history:f.data.history,methodName:s.name})]}):null]}),e.jsxs("figure",{className:"method-figure-card",children:[e.jsx(je,{method:s}),s.image_credit&&e.jsx("figcaption",{children:e.jsx(K,{className:"method-image-credit",text:s.image_credit})})]})]}),(((q=b.data)==null?void 0:q.length)??0)>0&&e.jsxs("div",{className:"filter-row",children:[e.jsx("span",{className:"label",children:"Related methods"}),b.data.map(r=>e.jsx(J,{method:{slug:r.slug,name:r.name}},r.id))]}),e.jsxs("div",{className:"sort-bar",children:[e.jsxs("div",{className:"paper-feed-toolbar-controls",children:[e.jsx("div",{className:"sort-options",children:Se.map(([r,m])=>e.jsx("button",{className:`sort-btn ${c===r?"active":""}`,onClick:()=>g(r),children:m},r))}),e.jsx(se,{hasCode:x,hasHfArtifacts:p,onHasCodeChange:y,onHasHfArtifactsChange:D})]}),e.jsx(re,{startDate:i.startDate,endDate:i.endDate,onChange:r=>o(ne(n,r))}),e.jsxs("div",{className:"results-count",children:[v.length," papers mentioning ",s.name]})]}),l.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((r,m)=>e.jsx(M,{className:"h-40 w-full"},m))}):v.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:v.map((r,m)=>e.jsx(ee,{paper:r,rank:m+1},r.id))}),e.jsx("div",{ref:P,style:{height:1}}),l.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]})};export{Oe as default};
 
1
+ import{j as e,r as A,c as Z,a as V,L,aa as X}from"./index-BfGRWIiQ.js";import{u as F}from"./useQuery-uhyHf514.js";import{u as Y}from"./useInfiniteQuery-CYJcc79v.js";import{M as J,P as ee}from"./components-fo0inhXZ.js";import{r as te,u as ae,P as se,a as re,w as ne}from"./paperDateRange-BwpPQ99I.js";import{r as ie,M as K}from"./MarkdownText-DeevkxdU.js";import{c as k}from"./catalog-BsVxStBB.js";import{p as le}from"./papers-PnGxH-RF.js";import{s as oe}from"./slug-BpH-Nkvz.js";import{t as ce}from"./transform-BVvRkYPJ.js";import{S as M}from"./skeleton-7gHbNXZz.js";import{A as de,a as me}from"./alert-D4lZhgu4.js";import{s as he}from"./safeExternalHref-CkBrsh84.js";import"./LatexTitle-DPJPslOM.js";import"./katex.min-BSBacQyE.js";import"./popover-xj7LLGhl.js";import"./PaperPreviewLink-_SPYeWhn.js";import"./index-BqZK5Cw1.js";import"./hover-card-HVpXfIHl.js";const a={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"},j=({x:t,y:n,w:o,h:c,fill:g,stroke:x,label:p,fontSize:i=10,multiline:y})=>e.jsxs("g",{children:[e.jsx("rect",{x:t,y:n,width:o,height:c,rx:"3",ry:"3",fill:g,stroke:x,strokeWidth:"1"}),y?e.jsxs(e.Fragment,{children:[e.jsx("text",{x:t+o/2,y:n+c/2-2,fontSize:i,fontFamily:"var(--sans)",fill:a.ink,textAnchor:"middle",dominantBaseline:"middle",children:y[0]}),e.jsx("text",{x:t+o/2,y:n+c/2+i-1,fontSize:i,fontFamily:"var(--sans)",fill:a.ink,textAnchor:"middle",dominantBaseline:"middle",children:y[1]})]}):e.jsx("text",{x:t+o/2,y:n+c/2,fontSize:i,fontFamily:"var(--sans)",fill:a.ink,textAnchor:"middle",dominantBaseline:"middle",children:p})]}),pe=()=>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:a.faint,textAnchor:"middle",children:"Scaled Dot-Product Attention"}),e.jsx(j,{x:140,y:40,w:80,h:26,fill:a.yellow,stroke:a.yellowS,label:"MatMul",fontSize:11}),e.jsx("path",{d:"M180 66 L180 80",stroke:a.ink}),e.jsx(j,{x:140,y:80,w:80,h:26,fill:a.green,stroke:a.greenS,label:"SoftMax",fontSize:11}),e.jsx("path",{d:"M180 106 L180 120",stroke:a.ink}),e.jsx(j,{x:140,y:120,w:80,h:26,fill:a.purple,stroke:a.purpleS,label:"Mask (opt.)",fontSize:11}),e.jsx("path",{d:"M180 146 L180 160",stroke:a.ink}),e.jsx(j,{x:140,y:160,w:80,h:26,fill:a.blue,stroke:a.blueS,label:"Scale ÷√dₖ",fontSize:11}),e.jsx("path",{d:"M180 186 L180 200",stroke:a.ink}),e.jsx(j,{x:140,y:200,w:80,h:26,fill:a.yellow,stroke:a.yellowS,label:"MatMul",fontSize:11}),e.jsx("path",{d:"M156 226 L120 270",stroke:a.ink}),e.jsx("path",{d:"M180 226 L180 270",stroke:a.ink}),e.jsx("path",{d:"M204 226 L240 270",stroke:a.ink}),e.jsx(j,{x:100,y:270,w:40,h:24,fill:a.pink,stroke:a.pinkS,label:"Q",fontSize:13}),e.jsx(j,{x:160,y:270,w:40,h:24,fill:a.pink,stroke:a.pinkS,label:"K",fontSize:13}),e.jsx(j,{x:220,y:270,w:40,h:24,fill:a.pink,stroke:a.pinkS,label:"V",fontSize:13}),e.jsxs("text",{x:"180",y:"330",fontSize:"14",fontFamily:"var(--serif)",fontStyle:"italic",fill:a.ink,textAnchor:"middle",children:["softmax(QK",e.jsx("tspan",{fontSize:"9",baselineShift:"super",children:"⊤"})," / √d) V"]})]}),ue=[["my-skill/",""],["├── SKILL.md","# Required: metadata + instructions"],["├── scripts/","# Optional: executable code"],["├── references/","# Optional: documentation"],["├── assets/","# Optional: templates, resources"],["└── ...","# Any additional files or directories"]],xe=()=>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:a.faint,textAnchor:"middle",children:"Skill package layout"}),e.jsx("rect",{x:"28",y:"48",width:"304",height:"318",rx:"8",fill:"#FFFDF8",stroke:a.faint,strokeWidth:"1"}),ue.map(([t,n],o)=>{const c=92+o*44;return e.jsxs("g",{children:[e.jsx("text",{x:"44",y:c,fontSize:"11",fontFamily:"var(--mono)",fill:a.ink,dominantBaseline:"middle",children:t}),n?e.jsx("text",{x:"138",y:c,fontSize:"8.5",fontFamily:"var(--mono)",fill:a.faint,dominantBaseline:"middle",children:n}):null]},t)})]}),ge={attention:pe,"agent-skills":xe},fe=({method:t})=>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:a.faint,textAnchor:"middle",children:t.name||"method"}),e.jsx(j,{x:80,y:70,w:200,h:50,fill:a.blue,stroke:a.blueS,label:"Input",fontSize:12}),e.jsx("path",{d:"M180 120 L180 150",stroke:a.ink}),e.jsx(j,{x:80,y:150,w:200,h:70,fill:a.orange,stroke:a.orangeS,label:t.name||"transform",fontSize:13}),e.jsx("path",{d:"M180 220 L180 250",stroke:a.ink}),e.jsx(j,{x:80,y:250,w:200,h:50,fill:a.purple,stroke:a.purpleS,label:"Output",fontSize:12})]}),je=({method:t})=>{const n=(t.slug||"").toLowerCase(),o=ge[n];if(o)return e.jsx("div",{className:"method-figure-svg method-figure-svg--schematic",children:e.jsx(o,{})});if(t.image_url){const c=n==="transformer"||n==="gpt-4"||n==="gpt-4o"||n==="multi-head-attention"?" method-figure-svg--compact":n==="rpn"?" method-figure-svg--scaled-80":"";return e.jsx("div",{className:`method-figure-svg method-figure-svg--image${c}`,children:e.jsx("img",{className:"method-figure-img",src:t.image_url,alt:`${t.name} figure`})})}return e.jsx("div",{className:"method-figure-svg method-figure-svg--schematic",children:e.jsx(fe,{method:t})})},C=720,B=138,u={top:8,right:10,bottom:25,left:36},Q=56,_e=new Intl.DateTimeFormat("en",{month:"short",year:"2-digit",timeZone:"UTC"}),ye=new Intl.DateTimeFormat("en",{year:"numeric",timeZone:"UTC"}),E=t=>_e.format(new Date(`${t}T00:00:00Z`)),ve=(t,n)=>{if(t===0)return new Set;const o=t>48?12:t>36?6:t>18?3:2,c=Math.max(1,Math.ceil(Q/n)),g=Math.max(o,c),x=t-1,p=new Set([0,x]);for(let i=g;i<x;i+=g)(x-i)*n>=Q&&p.add(i);return p},U=t=>{if(t.coverage_status===void 0||["complete","not_applicable"].includes(t.coverage_status))return null;const n=t.processed_paper_count!==void 0&&t.eligible_paper_count!==void 0?`; ${t.processed_paper_count.toLocaleString()} of ${t.eligible_paper_count.toLocaleString()} eligible papers processed`:"";return`Historical tagging ${t.coverage_status==="failed"?"needs retry":"in progress"}${n}`},Ne=({history:t,methodName:n})=>{const[o,c]=A.useState(null),g=Math.max(1,...t.map(d=>d.paper_count)),x=C-u.left-u.right,p=B-u.top-u.bottom,i=t.length?x/t.length:x,y=Math.max(2,i*.68),D=ve(t.length,i),h=Array.from(new Set([0,Math.ceil(g/2),g])),_=o==null?null:t[o],f=_?U(_):null;return e.jsxs("div",{className:"method-usage-chart-wrap",children:[e.jsxs("svg",{className:"method-usage-chart",viewBox:`0 0 ${C} ${B}`,role:"group","aria-label":`${n}: papers mentioning this method by publication month`,children:[e.jsxs("title",{children:[n,": papers mentioning this method by publication month"]}),h.map(d=>{const l=u.top+p-d/g*p;return e.jsxs("g",{children:[e.jsx("line",{className:"method-usage-gridline",x1:u.left,x2:C-u.right,y1:l,y2:l}),e.jsx("text",{className:"method-usage-y-label",x:u.left-8,y:l+3,textAnchor:"end",children:d})]},d)}),t.map((d,l)=>{const b=d.paper_count/g*p,v=d.paper_count>0?Math.max(1,b):0,P=u.left+i*l+(i-y)/2,w=u.top+p-v,s=o===l,S=l===t.length-1,N=U(d);return e.jsxs("g",{className:`method-usage-bar${s?" is-active":""}${S?" is-current":""}`,tabIndex:0,role:"img","aria-label":`${E(d.start_date)}: ${d.paper_count} ${d.paper_count===1?"paper":"papers"}${N?`. ${N}`:""}`,onMouseEnter:()=>c(l),onMouseLeave:()=>c(null),onFocus:()=>c(l),onBlur:()=>c(null),children:[e.jsx("rect",{className:"method-usage-bar-hit",x:u.left+i*l,y:u.top,width:i,height:p}),e.jsx("rect",{className:"method-usage-bar-mark",x:P,y:w,width:y,height:v,rx:"1.5"})]},d.start_date)}),t.map((d,l)=>D.has(l)?e.jsx("text",{className:"method-usage-x-label",x:u.left+i*(l+.5),y:B-11,textAnchor:"middle",children:t.length>48?ye.format(new Date(`${d.start_date}T00:00:00Z`)):E(d.start_date)},d.start_date):null)]}),_&&e.jsxs("div",{className:"method-usage-tooltip",role:"status",children:[e.jsx("strong",{children:E(_.start_date)}),e.jsxs("span",{children:[_.paper_count," ",_.paper_count===1?"paper":"papers",o===t.length-1?" · month to date":""]}),e.jsxs("span",{children:[(_.catalog_share??0).toFixed(2),"% of"," ",(_.catalog_paper_count??0).toLocaleString()," catalog papers"]}),f&&e.jsx("span",{children:f})]})]})},Se=[["trending","trending"],["new","newest"],["cited","most cited"]],G={"on-policy-distillation":["fine-tuning","post-training","rlvr","rlhf","direct-preference-optimization-dpo"],mcp:["agent-skills"],"agent-skills":["mcp"]},Oe=()=>{var T,z,$,H,R,q;const{methodSlug:t}=Z(),[n,o]=V(),[c,g]=A.useState("trending"),x=n.get("has_code")==="true",p=n.get("has_hf_artifacts")==="true",i=te(n),y=r=>{const m=new URLSearchParams(n);r?m.set("has_code","true"):m.delete("has_code"),o(m)},D=r=>{const m=new URLSearchParams(n);r?m.set("has_hf_artifacts","true"):m.delete("has_hf_artifacts"),o(m)},h=F({queryKey:["method",t],queryFn:()=>k.getMethod(t),enabled:!!t,staleTime:10*60*1e3}),_=F({queryKey:["areas-all"],queryFn:()=>k.listAreas({page_size:50,ordering:"name"}),enabled:!!((T=h.data)!=null&&T.area_id),staleTime:10*60*1e3}),f=F({queryKey:["method-trend",t],queryFn:()=>k.methodTrend(t),enabled:!!t&&!!h.data,staleTime:10*60*1e3}),d=c==="trending"?"trending":c==="cited"?"citation_count":"date_published",l=Y({queryKey:["method-papers-infinite",t,d,x,p,i.startDate,i.endDate],queryFn:({pageParam:r=1})=>le.forMethod(t,{page:r,page_size:20,order_by:d,order_dir:"desc",include_resources:!0,has_code:x,has_hf_artifacts:p,start_date:i.startDate,end_date:i.endDate}),getNextPageParam:r=>r.next_page,initialPageParam:1,enabled:!!t,staleTime:5*60*1e3,placeholderData:X}),b=F({queryKey:["related-methods",(z=h.data)==null?void 0:z.slug,($=h.data)==null?void 0:$.area_id,(H=h.data)==null?void 0:H.id],queryFn:async()=>{const r=h.data;if(!r)return[];const m=r.slug?G[r.slug]:void 0;return m?Promise.all(m.map(W=>k.getMethod(W))):r.area_id?(await k.listMethods({area_id:r.area_id,exclude_id:r.id,ordering:"-paper_count",page_size:8})).results:[]},enabled:!!(h.data&&(h.data.slug&&G[h.data.slug]||h.data.area_id)),staleTime:10*60*1e3}),v=A.useMemo(()=>{var m;return(((m=l.data)==null?void 0:m.pages.flatMap(O=>O.results))||[]).map(ce)},[l.data]),{targetRef:P,isIntersecting:w}=ae({rootMargin:"200px"});if(A.useEffect(()=>{w&&l.hasNextPage&&!l.isFetchingNextPage&&l.fetchNextPage()},[w,l.hasNextPage,l.isFetchingNextPage]),h.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(h.error||!h.data)return e.jsx("div",{className:"page",children:e.jsx(de,{variant:"destructive",children:e.jsx(me,{children:"Method not found."})})});const s=h.data,S=(R=_.data)==null?void 0:R.results.find(r=>r.id===s.area_id),N=ie(s.source_url),I=N?null:he(s.source_url);return e.jsxs("div",{className:"page",children:[e.jsxs("div",{className:"breadcrumb",children:[e.jsx(L,{to:"/methods",children:"Methods"}),S&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"sep",children:"/"}),e.jsx(L,{to:`/methods#area-${oe(S.name)}`,children:S.name})]}),e.jsx("span",{className:"sep",children:"/"}),e.jsx("span",{style:{color:"var(--ink)"},children:s.name})]}),e.jsxs("div",{className:`tag-hero method-hero-grid${s.slug==="grokking"||s.slug==="latent-reasoning"||s.slug==="world-action-models"?" 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:s.name}),s.full_name&&s.full_name!==s.name&&e.jsx("div",{style:{fontFamily:"var(--serif)",fontSize:16,fontStyle:"italic",color:"var(--ink-soft)",marginTop:8},children:s.full_name}),s.description&&e.jsx(K,{className:"method-description",text:s.description}),s.source_url&&s.source_title&&e.jsxs("div",{className:"method-source",children:[e.jsx("span",{className:"method-source-label",children:"Source"}),N?e.jsxs(L,{className:"method-source-link",to:N,target:"_blank",rel:"noopener noreferrer",children:[e.jsx("span",{className:"method-source-title",children:s.source_title}),s.introduced_year&&e.jsx("span",{className:"method-source-meta",children:s.introduced_year})]}):I?e.jsxs("a",{className:"method-source-link",href:I,target:"_blank",rel:"noopener noreferrer",children:[e.jsx("span",{className:"method-source-title",children:s.source_title}),s.introduced_year&&e.jsx("span",{className:"method-source-meta",children:s.introduced_year})]}):e.jsxs("div",{className:"method-source-link is-static",children:[e.jsx("span",{className:"method-source-title",children:s.source_title}),s.introduced_year&&e.jsx("span",{className:"method-source-meta",children:s.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:(s.paper_count??0).toLocaleString()})]}),f.data&&e.jsxs("div",{className:"stat",children:[e.jsx("span",{className:"label",children:"Recent mentions"}),e.jsx("span",{className:"value",children:f.data.comparison_complete?e.jsxs(e.Fragment,{children:[f.data.trend_score.toFixed(1),e.jsx("small",{children:"/mo"})]}):"Pending"})]}),s.introduced_year!=null&&e.jsxs("div",{className:"stat",children:[e.jsx("span",{className:"label",children:"Introduced"}),e.jsx("span",{className:"value",children:s.introduced_year})]})]}),f.isLoading?e.jsx(M,{className:"h-36 w-full method-trend-skeleton"}):f.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:f.data.recent_paper_count}),e.jsxs("span",{children:["papers / ",f.data.recent_days,"d"]})]})]}),e.jsx(Ne,{history:f.data.history,methodName:s.name})]}):null]}),e.jsxs("figure",{className:"method-figure-card",children:[e.jsx(je,{method:s}),s.image_credit&&e.jsx("figcaption",{children:e.jsx(K,{className:"method-image-credit",text:s.image_credit})})]})]}),(((q=b.data)==null?void 0:q.length)??0)>0&&e.jsxs("div",{className:"filter-row",children:[e.jsx("span",{className:"label",children:"Related methods"}),b.data.map(r=>e.jsx(J,{method:{slug:r.slug,name:r.name}},r.id))]}),e.jsxs("div",{className:"sort-bar",children:[e.jsxs("div",{className:"paper-feed-toolbar-controls",children:[e.jsx("div",{className:"sort-options",children:Se.map(([r,m])=>e.jsx("button",{className:`sort-btn ${c===r?"active":""}`,onClick:()=>g(r),children:m},r))}),e.jsx(se,{hasCode:x,hasHfArtifacts:p,onHasCodeChange:y,onHasHfArtifactsChange:D})]}),e.jsx(re,{startDate:i.startDate,endDate:i.endDate,onChange:r=>o(ne(n,r))}),e.jsxs("div",{className:"results-count",children:[v.length," papers mentioning ",s.name]})]}),l.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((r,m)=>e.jsx(M,{className:"h-40 w-full"},m))}):v.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:v.map((r,m)=>e.jsx(ee,{paper:r,rank:m+1},r.id))}),e.jsx("div",{ref:P,style:{height:1}}),l.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]})};export{Oe as default};
assets/{MethodsIndexView-CUGiY_lq.js → MethodsIndexView-DShrbgnI.js} RENAMED
@@ -1,4 +1,4 @@
1
- import{d as g,r as d,j as e,L as f}from"./index-BJHhPv_M.js";import{u as m}from"./useQuery-B9A-sza5.js";import{c as h}from"./catalog-DOuThn7M.js";import{s as j}from"./slug-BpH-Nkvz.js";import{S as p}from"./skeleton-utCOClux.js";import{A as y,a as v}from"./alert-BiDOKM0e.js";import{T as _}from"./TaxonomySuggestionTile-BuaFf3aB.js";import"./SignInToEditDialog-vE3vqpo1.js";import"./button-BL7Wfk99.js";import"./textarea-EPRANuVM.js";import"./dialog-DINVvlE3.js";import"./useMutation-rrsjzB5Q.js";import"./submissions-Dz2yQ0h0.js";import"./loader-circle-CaPI_8_v.js";/**
2
  * @license lucide-react v0.462.0 - ISC
3
  *
4
  * This source code is licensed under the ISC license.
 
1
+ import{d as g,r as d,j as e,L as f}from"./index-BfGRWIiQ.js";import{u as m}from"./useQuery-uhyHf514.js";import{c as h}from"./catalog-BsVxStBB.js";import{s as j}from"./slug-BpH-Nkvz.js";import{S as p}from"./skeleton-7gHbNXZz.js";import{A as y,a as v}from"./alert-D4lZhgu4.js";import{T as _}from"./TaxonomySuggestionTile-VrAsjN5R.js";import"./SignInToEditDialog-C1ykF6wM.js";import"./button-wuesmQpV.js";import"./textarea-BA4IPzRY.js";import"./dialog-Ci3RQLed.js";import"./useMutation-Dw9DDJRs.js";import"./submissions-DXV1AUkd.js";import"./loader-circle-DgGa62N_.js";/**
2
  * @license lucide-react v0.462.0 - ISC
3
  *
4
  * This source code is licensed under the ISC license.
assets/{NotFound-DI_FDclS.js → NotFound-DoU3elKs.js} RENAMED
@@ -1 +1 @@
1
- import{ay as o,r as a,j as t,L as s}from"./index-BJHhPv_M.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{ay as o,r as a,j as t,L as s}from"./index-BfGRWIiQ.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/{OrganizationContributionGraph-6dHF7Irk.js → OrganizationContributionGraph-DWn4WvRK.js} RENAMED
@@ -1 +1 @@
1
- import{r as b,j as o}from"./index-BJHhPv_M.js";import{u as z}from"./useQuery-B9A-sza5.js";import{S as T}from"./skeleton-utCOClux.js";import{c as w}from"./catalog-DOuThn7M.js";const x=24*60*60*1e3,f=12,y=3,v=new Map([[1,"Mon"],[3,"Wed"],[5,"Fri"]]),$=n=>new Date(`${n}T00:00:00Z`),N=n=>n.toISOString().slice(0,10),_=(n,r)=>{if(n===0)return 0;const i=r.findIndex(s=>n<=s);return i===-1?4:i+1},D=n=>{const r=$(n.start_date),i=$(n.end_date),s=new Date(r.getTime()-r.getUTCDay()*x),h=new Date(i.getTime()+(6-i.getUTCDay())*x),p=new Map(n.results.map(e=>[e.date,e.paper_count])),u=n.results.map(e=>e.paper_count).sort((e,m)=>e-m),c=[.25,.5,.75].map(e=>u[Math.min(u.length-1,Math.floor(u.length*e))]??1),l=[];for(let e=s.getTime();e<=h.getTime();e+=x){const m=new Date(e),d=N(m),g=e>=r.getTime()&&e<=i.getTime(),C=g?p.get(d)??0:0;l.push({key:d,date:m,count:C,inRange:g,level:_(C,c)})}const t=l.length/7,a=[];let j=-1;for(let e=0;e<t;e+=1){const d=l.slice(e*7,e*7+7).find(g=>g.inRange&&(e===0||g.date.getUTCDate()<=7));d&&d.date.getUTCMonth()!==j&&(j=d.date.getUTCMonth(),a.length>0&&e-a[a.length-1].column<3&&a.pop(),a.push({label:d.date.toLocaleString("en",{month:"short",timeZone:"UTC"}),column:e}))}return{days:l,months:a,weekCount:t}},L=({data:n,organizationName:r,title:i="Paper contributions",noun:s="paper"})=>{const h=b.useRef(null),{days:p,months:u,weekCount:c}=b.useMemo(()=>D(n),[n]),l=c*f+(c-1)*y;return b.useEffect(()=>{const t=h.current;t&&(t.scrollLeft=t.scrollWidth)},[c]),o.jsxs("section",{className:"organization-contributions","aria-labelledby":"organization-contributions-title",children:[o.jsxs("div",{className:"organization-contributions-header",children:[o.jsx("h2",{id:"organization-contributions-title",className:"organization-contributions-title",children:i}),o.jsxs("p",{className:"organization-contributions-summary",children:[n.total_count.toLocaleString()," ",n.total_count===1?s:`${s}s`," recorded in the last year"]})]}),o.jsx("div",{className:"organization-contributions-scroll",ref:h,children:o.jsxs("div",{className:"organization-contributions-plot",style:{width:l+34},role:"img","aria-label":`${r} recorded ${n.total_count} ${n.total_count===1?s:`${s}s`} in the last year`,children:[o.jsx("div",{className:"organization-contributions-weekdays","aria-hidden":"true",children:Array.from({length:7}).map((t,a)=>o.jsx("span",{children:v.get(a)??""},a))}),o.jsxs("div",{children:[o.jsx("div",{className:"organization-contributions-months",style:{width:l,gridTemplateColumns:`repeat(${c}, ${f}px)`},"aria-hidden":"true",children:u.map(t=>o.jsx("span",{style:{gridColumnStart:t.column+1},children:t.label},`${t.label}-${t.column}`))}),o.jsx("div",{className:"organization-contributions-grid",style:{width:l,gridTemplateColumns:`repeat(${c}, ${f}px)`},"aria-hidden":"true",children:p.map(t=>o.jsx("span",{className:`organization-contribution-cell ${t.inRange?`level-${t.level}`:"is-outside"}`,title:t.inRange?`${t.count} ${t.count===1?s:`${s}s`} on ${t.date.toLocaleDateString("en",{dateStyle:"long",timeZone:"UTC"})}`:void 0},t.key))})]})]})}),o.jsxs("div",{className:"organization-contributions-legend","aria-hidden":"true",children:[o.jsx("span",{children:"Fewer"}),[0,1,2,3,4].map(t=>o.jsx("span",{className:`organization-contribution-cell level-${t}`},t)),o.jsx("span",{children:"More"})]})]})},A=({organizationSlug:n,organizationName:r})=>{const i=z({queryKey:["organization-contributions",n],queryFn:()=>w.organizationContributions(n),staleTime:6e5});return i.isLoading?o.jsx(T,{className:"organization-contributions-skeleton"}):i.data?o.jsx(L,{data:i.data,organizationName:r}):null};export{L as C,A as O};
 
1
+ import{r as b,j as o}from"./index-BfGRWIiQ.js";import{u as z}from"./useQuery-uhyHf514.js";import{S as T}from"./skeleton-7gHbNXZz.js";import{c as w}from"./catalog-BsVxStBB.js";const x=24*60*60*1e3,f=12,y=3,v=new Map([[1,"Mon"],[3,"Wed"],[5,"Fri"]]),$=n=>new Date(`${n}T00:00:00Z`),N=n=>n.toISOString().slice(0,10),_=(n,r)=>{if(n===0)return 0;const i=r.findIndex(s=>n<=s);return i===-1?4:i+1},D=n=>{const r=$(n.start_date),i=$(n.end_date),s=new Date(r.getTime()-r.getUTCDay()*x),h=new Date(i.getTime()+(6-i.getUTCDay())*x),p=new Map(n.results.map(e=>[e.date,e.paper_count])),u=n.results.map(e=>e.paper_count).sort((e,m)=>e-m),c=[.25,.5,.75].map(e=>u[Math.min(u.length-1,Math.floor(u.length*e))]??1),l=[];for(let e=s.getTime();e<=h.getTime();e+=x){const m=new Date(e),d=N(m),g=e>=r.getTime()&&e<=i.getTime(),C=g?p.get(d)??0:0;l.push({key:d,date:m,count:C,inRange:g,level:_(C,c)})}const t=l.length/7,a=[];let j=-1;for(let e=0;e<t;e+=1){const d=l.slice(e*7,e*7+7).find(g=>g.inRange&&(e===0||g.date.getUTCDate()<=7));d&&d.date.getUTCMonth()!==j&&(j=d.date.getUTCMonth(),a.length>0&&e-a[a.length-1].column<3&&a.pop(),a.push({label:d.date.toLocaleString("en",{month:"short",timeZone:"UTC"}),column:e}))}return{days:l,months:a,weekCount:t}},L=({data:n,organizationName:r,title:i="Paper contributions",noun:s="paper"})=>{const h=b.useRef(null),{days:p,months:u,weekCount:c}=b.useMemo(()=>D(n),[n]),l=c*f+(c-1)*y;return b.useEffect(()=>{const t=h.current;t&&(t.scrollLeft=t.scrollWidth)},[c]),o.jsxs("section",{className:"organization-contributions","aria-labelledby":"organization-contributions-title",children:[o.jsxs("div",{className:"organization-contributions-header",children:[o.jsx("h2",{id:"organization-contributions-title",className:"organization-contributions-title",children:i}),o.jsxs("p",{className:"organization-contributions-summary",children:[n.total_count.toLocaleString()," ",n.total_count===1?s:`${s}s`," recorded in the last year"]})]}),o.jsx("div",{className:"organization-contributions-scroll",ref:h,children:o.jsxs("div",{className:"organization-contributions-plot",style:{width:l+34},role:"img","aria-label":`${r} recorded ${n.total_count} ${n.total_count===1?s:`${s}s`} in the last year`,children:[o.jsx("div",{className:"organization-contributions-weekdays","aria-hidden":"true",children:Array.from({length:7}).map((t,a)=>o.jsx("span",{children:v.get(a)??""},a))}),o.jsxs("div",{children:[o.jsx("div",{className:"organization-contributions-months",style:{width:l,gridTemplateColumns:`repeat(${c}, ${f}px)`},"aria-hidden":"true",children:u.map(t=>o.jsx("span",{style:{gridColumnStart:t.column+1},children:t.label},`${t.label}-${t.column}`))}),o.jsx("div",{className:"organization-contributions-grid",style:{width:l,gridTemplateColumns:`repeat(${c}, ${f}px)`},"aria-hidden":"true",children:p.map(t=>o.jsx("span",{className:`organization-contribution-cell ${t.inRange?`level-${t.level}`:"is-outside"}`,title:t.inRange?`${t.count} ${t.count===1?s:`${s}s`} on ${t.date.toLocaleDateString("en",{dateStyle:"long",timeZone:"UTC"})}`:void 0},t.key))})]})]})}),o.jsxs("div",{className:"organization-contributions-legend","aria-hidden":"true",children:[o.jsx("span",{children:"Fewer"}),[0,1,2,3,4].map(t=>o.jsx("span",{className:`organization-contribution-cell level-${t}`},t)),o.jsx("span",{children:"More"})]})]})},A=({organizationSlug:n,organizationName:r})=>{const i=z({queryKey:["organization-contributions",n],queryFn:()=>w.organizationContributions(n),staleTime:6e5});return i.isLoading?o.jsx(T,{className:"organization-contributions-skeleton"}):i.data?o.jsx(L,{data:i.data,organizationName:r}):null};export{L as C,A as O};
assets/OrganizationDetailView-D7ul9JVM.js DELETED
@@ -1 +0,0 @@
1
- import{c as t,j as r}from"./index-BJHhPv_M.js";import{O as i}from"./OrganizationPaperFeed-B4pxo9zJ.js";import m from"./NotFound-DI_FDclS.js";import"./useQuery-B9A-sza5.js";import"./components-wRHDLoMO.js";import"./LatexTitle-Cb0dDCMw.js";import"./katex.min-BSBacQyE.js";import"./transform-DDP8kg8V.js";import"./papers-CWyBrS8M.js";import"./safeExternalHref-CkBrsh84.js";import"./MarkdownText-_ZQTzPOU.js";import"./PaperPreviewLink-DVTrFkw2.js";import"./index-RvWGcsIO.js";import"./hover-card-CBNxKixP.js";import"./OrganizationContributionGraph-6dHF7Irk.js";import"./skeleton-utCOClux.js";import"./catalog-DOuThn7M.js";import"./paperDateRange-Cx_7ISLZ.js";import"./popover-ByfOmyUl.js";import"./alert-BiDOKM0e.js";import"./searchable-select-NpNOjZCr.js";import"./button-BL7Wfk99.js";import"./dialog-DINVvlE3.js";import"./loader-circle-CaPI_8_v.js";import"./usePapers-Dubaj0sc.js";import"./useInfiniteQuery-DeWbJxMK.js";const k=()=>{const{orgSlug:o}=t();return o?r.jsx(i,{organizationSlug:o}):r.jsx(m,{})};export{k as default};
 
 
assets/OrganizationDetailView-DAPk8dW-.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{c as t,j as r}from"./index-BfGRWIiQ.js";import{O as i}from"./OrganizationPaperFeed-C1gWdGPr.js";import m from"./NotFound-DoU3elKs.js";import"./useQuery-uhyHf514.js";import"./components-fo0inhXZ.js";import"./LatexTitle-DPJPslOM.js";import"./katex.min-BSBacQyE.js";import"./transform-BVvRkYPJ.js";import"./papers-PnGxH-RF.js";import"./safeExternalHref-CkBrsh84.js";import"./MarkdownText-DeevkxdU.js";import"./PaperPreviewLink-_SPYeWhn.js";import"./index-BqZK5Cw1.js";import"./hover-card-HVpXfIHl.js";import"./OrganizationContributionGraph-DWn4WvRK.js";import"./skeleton-7gHbNXZz.js";import"./catalog-BsVxStBB.js";import"./paperDateRange-BwpPQ99I.js";import"./popover-xj7LLGhl.js";import"./alert-D4lZhgu4.js";import"./searchable-select-CyD8AolE.js";import"./button-wuesmQpV.js";import"./dialog-Ci3RQLed.js";import"./loader-circle-DgGa62N_.js";import"./usePapers-SIkOY1oo.js";import"./useInfiniteQuery-CYJcc79v.js";const k=()=>{const{orgSlug:o}=t();return o?r.jsx(i,{organizationSlug:o}):r.jsx(m,{})};export{k as default};
assets/{OrganizationPaperFeed-B4pxo9zJ.js → OrganizationPaperFeed-C1gWdGPr.js} RENAMED
@@ -1 +1 @@
1
- import{u as E,a as Q,r as d,j as e,L as A}from"./index-BJHhPv_M.js";import{u as C}from"./useQuery-B9A-sza5.js";import{P as U}from"./components-wRHDLoMO.js";import{M as B}from"./MarkdownText-_ZQTzPOU.js";import{O as G}from"./OrganizationContributionGraph-6dHF7Irk.js";import{r as K,u as W,P as Z,a as z,w as J}from"./paperDateRange-Cx_7ISLZ.js";import{A as V,a as X}from"./alert-BiDOKM0e.js";import{S as Y}from"./searchable-select-NpNOjZCr.js";import{S as $}from"./skeleton-utCOClux.js";import{e as ee}from"./usePapers-Dubaj0sc.js";import{c as D}from"./catalog-DOuThn7M.js";import{d as R,t as ae}from"./transform-DDP8kg8V.js";import se from"./NotFound-DI_FDclS.js";const re=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],te=n=>n==="date_published"||n==="citation_count"?n:"trending",xe=({organizationSlug:n,taskSlug:p})=>{var y,P,v,F,L,k,w,O;const T=E(),[o,h]=Q(),[I,u]=d.useState(!1),g=te(o.get("order_by")),_=o.get("has_code")==="true",f=o.get("has_hf_artifacts")==="true",m=K(o),x=C({queryKey:["organization",n],queryFn:()=>D.getOrganization(n),staleTime:10*60*1e3}),c=C({queryKey:["organization-areas-with-tasks",n],queryFn:()=>D.organizationAreasWithTasks(n),staleTime:10*60*1e3}),i=ee({organizationSlug:n,taskSlug:p,page_size:12,order_by:g,order_dir:"desc",include_resources:!0,has_code:_,has_hf_artifacts:f,start_date:m.startDate,end_date:m.endDate,enabled:!!n}),{targetRef:M,isIntersecting:j}=W({rootMargin:"200px"});d.useEffect(()=>{j&&i.hasNextPage&&!i.isFetchingNextPage&&i.fetchNextPage()},[j,i.hasNextPage,i.isFetchingNextPage]),d.useEffect(()=>{u(!1)},[n,p]);const b=d.useMemo(()=>{var s;return(((s=c.data)==null?void 0:s.results)??[]).flatMap(r=>r.tasks.filter(t=>!!t.slug).map(t=>({...t,slug:t.slug,label:R(t.name,t.slug)})))},[c.data]),l=b.find(s=>s.slug===p),N=d.useMemo(()=>{var s;return(((s=i.data)==null?void 0:s.pages)??[]).flatMap(r=>r.results.map(ae))},[i.data]),a=x.data??((y=c.data)==null?void 0:y.organization),H=((v=(P=i.data)==null?void 0:P.pages[0])==null?void 0:v.count)??0;if(((F=x.error)==null?void 0:F.status)===404||((L=c.error)==null?void 0:L.status)===404||((k=i.error)==null?void 0:k.status)===404)return e.jsx(se,{});if(c.error||i.error)return e.jsx("div",{className:"page",children:e.jsx(V,{variant:"destructive",children:e.jsx(X,{children:"Failed to load organization papers. Please try again."})})});const S=s=>{const r=s.trim().toLocaleLowerCase();return b.filter(t=>`${t.label} ${t.slug}`.toLocaleLowerCase().includes(r)).map(t=>({value:t.slug,label:t.label,description:`${t.paper_count.toLocaleString()} ${t.paper_count===1?"paper":"papers"}`}))},q=s=>{const r=s==="__all__"?`/orgs/${n}`:`/orgs/${n}/${s}`,t=o.toString();T({pathname:r,search:t?`?${t}`:""})};return e.jsxs("div",{className:"page",children:[e.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[e.jsx(A,{to:"/",children:"Home"}),e.jsx("span",{children:" / "}),e.jsx(A,{to:"/organizations",children:"Organizations"}),e.jsx("span",{children:" / "}),e.jsx("span",{children:(a==null?void 0:a.name)??n}),l&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:" / "}),e.jsx("span",{children:R(l.name,l.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:[a!=null&&a.logo_url&&!I?e.jsx("img",{src:a.logo_url,alt:"",width:58,height:58,onError:()=>u(!0)}):a?e.jsx("span",{className:"organization-logo organization-logo--fallback","aria-hidden":"true",children:a.name.slice(0,1).toUpperCase()}):null,(a==null?void 0:a.name)??e.jsx($,{className:"h-12 w-64"})]}),a&&e.jsxs("div",{className:"feed-subtitle",children:[((w=a.paper_count)==null?void 0:w.toLocaleString())??0," papers",(a.organization_trending_score??0)>0&&a.trending_rank&&e.jsxs(e.Fragment,{children:[" · #",a.trending_rank," trending this month"]})]}),(a==null?void 0:a.description)&&e.jsx(B,{className:"method-description",text:a.description}),a&&e.jsxs("div",{className:"organization-hero-links",children:[a.website_url&&e.jsx("a",{href:a.website_url,target:"_blank",rel:"noreferrer",children:"Website ↗"}),a.hf_url&&e.jsx("a",{href:a.hf_url,target:"_blank",rel:"noreferrer",children:"Hugging Face ↗"}),a.github_url&&e.jsx("a",{href:a.github_url,target:"_blank",rel:"noreferrer",children:"GitHub ↗"})]})]}),a&&e.jsx(G,{organizationSlug:n,organizationName:a.name})]}),e.jsxs("div",{className:"sort-bar",style:{alignItems:"center",gap:16},children:[e.jsx("div",{style:{minWidth:260},children:e.jsx(Y,{value:p??"__all__",onChange:q,placeholder:"All tasks",searchPlaceholder:"Search organization tasks...",emptyMessage:"No matching tasks.",ariaLabel:"Filter papers by task",selectedOption:l?{value:l.slug,label:l.label,description:`${l.paper_count.toLocaleString()} ${l.paper_count===1?"paper":"papers"}`}:{value:"__all__",label:"All tasks",description:`${((O=a==null?void 0:a.paper_count)==null?void 0:O.toLocaleString())??0} papers`},queryKey:["organization-task-options",n],queryFn:async s=>{var r;return[{value:"__all__",label:"All tasks",description:`${((r=a==null?void 0:a.paper_count)==null?void 0:r.toLocaleString())??0} papers`},...S(s)]},enabled:!c.isLoading,className:"h-[38px]"})}),e.jsxs("div",{className:"paper-feed-toolbar-controls",children:[e.jsx("div",{className:"sort-options",children:re.map(([s,r])=>e.jsx("button",{type:"button",className:`sort-btn ${g===s?"active":""}`,onClick:()=>{const t=new URLSearchParams(o);s==="trending"?t.delete("order_by"):t.set("order_by",s),h(t)},children:r},s))}),e.jsx(Z,{hasCode:_,hasHfArtifacts:f,onHasCodeChange:s=>{const r=new URLSearchParams(o);s?r.set("has_code","true"):r.delete("has_code"),h(r)},onHasHfArtifactsChange:s=>{const r=new URLSearchParams(o);s?r.set("has_hf_artifacts","true"):r.delete("has_hf_artifacts"),h(r)}})]}),e.jsx(z,{startDate:m.startDate,endDate:m.endDate,onChange:s=>h(J(o,s))}),e.jsxs("div",{className:"results-count",children:[H.toLocaleString()," papers"]})]}),i.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((s,r)=>e.jsx($,{className:"h-40 w-full"},r))}):N.length===0?e.jsx("div",{className:"no-results",children:(a==null?void 0:a.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:N.map((s,r)=>e.jsx(U,{paper:s,rank:r+1,showInstitution:!1},s.id))}),e.jsx("div",{ref:M,style:{height:1}}),i.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center"},children:"Loading more…"})]})]})};export{xe as O};
 
1
+ import{u as E,a as Q,r as d,j as e,L as A}from"./index-BfGRWIiQ.js";import{u as C}from"./useQuery-uhyHf514.js";import{P as U}from"./components-fo0inhXZ.js";import{M as B}from"./MarkdownText-DeevkxdU.js";import{O as G}from"./OrganizationContributionGraph-DWn4WvRK.js";import{r as K,u as W,P as Z,a as z,w as J}from"./paperDateRange-BwpPQ99I.js";import{A as V,a as X}from"./alert-D4lZhgu4.js";import{S as Y}from"./searchable-select-CyD8AolE.js";import{S as $}from"./skeleton-7gHbNXZz.js";import{e as ee}from"./usePapers-SIkOY1oo.js";import{c as D}from"./catalog-BsVxStBB.js";import{d as R,t as ae}from"./transform-BVvRkYPJ.js";import se from"./NotFound-DoU3elKs.js";const re=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],te=n=>n==="date_published"||n==="citation_count"?n:"trending",xe=({organizationSlug:n,taskSlug:p})=>{var y,P,v,F,L,k,w,O;const T=E(),[o,h]=Q(),[I,u]=d.useState(!1),g=te(o.get("order_by")),_=o.get("has_code")==="true",f=o.get("has_hf_artifacts")==="true",m=K(o),x=C({queryKey:["organization",n],queryFn:()=>D.getOrganization(n),staleTime:10*60*1e3}),c=C({queryKey:["organization-areas-with-tasks",n],queryFn:()=>D.organizationAreasWithTasks(n),staleTime:10*60*1e3}),i=ee({organizationSlug:n,taskSlug:p,page_size:12,order_by:g,order_dir:"desc",include_resources:!0,has_code:_,has_hf_artifacts:f,start_date:m.startDate,end_date:m.endDate,enabled:!!n}),{targetRef:M,isIntersecting:j}=W({rootMargin:"200px"});d.useEffect(()=>{j&&i.hasNextPage&&!i.isFetchingNextPage&&i.fetchNextPage()},[j,i.hasNextPage,i.isFetchingNextPage]),d.useEffect(()=>{u(!1)},[n,p]);const b=d.useMemo(()=>{var s;return(((s=c.data)==null?void 0:s.results)??[]).flatMap(r=>r.tasks.filter(t=>!!t.slug).map(t=>({...t,slug:t.slug,label:R(t.name,t.slug)})))},[c.data]),l=b.find(s=>s.slug===p),N=d.useMemo(()=>{var s;return(((s=i.data)==null?void 0:s.pages)??[]).flatMap(r=>r.results.map(ae))},[i.data]),a=x.data??((y=c.data)==null?void 0:y.organization),H=((v=(P=i.data)==null?void 0:P.pages[0])==null?void 0:v.count)??0;if(((F=x.error)==null?void 0:F.status)===404||((L=c.error)==null?void 0:L.status)===404||((k=i.error)==null?void 0:k.status)===404)return e.jsx(se,{});if(c.error||i.error)return e.jsx("div",{className:"page",children:e.jsx(V,{variant:"destructive",children:e.jsx(X,{children:"Failed to load organization papers. Please try again."})})});const S=s=>{const r=s.trim().toLocaleLowerCase();return b.filter(t=>`${t.label} ${t.slug}`.toLocaleLowerCase().includes(r)).map(t=>({value:t.slug,label:t.label,description:`${t.paper_count.toLocaleString()} ${t.paper_count===1?"paper":"papers"}`}))},q=s=>{const r=s==="__all__"?`/orgs/${n}`:`/orgs/${n}/${s}`,t=o.toString();T({pathname:r,search:t?`?${t}`:""})};return e.jsxs("div",{className:"page",children:[e.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[e.jsx(A,{to:"/",children:"Home"}),e.jsx("span",{children:" / "}),e.jsx(A,{to:"/organizations",children:"Organizations"}),e.jsx("span",{children:" / "}),e.jsx("span",{children:(a==null?void 0:a.name)??n}),l&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:" / "}),e.jsx("span",{children:R(l.name,l.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:[a!=null&&a.logo_url&&!I?e.jsx("img",{src:a.logo_url,alt:"",width:58,height:58,onError:()=>u(!0)}):a?e.jsx("span",{className:"organization-logo organization-logo--fallback","aria-hidden":"true",children:a.name.slice(0,1).toUpperCase()}):null,(a==null?void 0:a.name)??e.jsx($,{className:"h-12 w-64"})]}),a&&e.jsxs("div",{className:"feed-subtitle",children:[((w=a.paper_count)==null?void 0:w.toLocaleString())??0," papers",(a.organization_trending_score??0)>0&&a.trending_rank&&e.jsxs(e.Fragment,{children:[" · #",a.trending_rank," trending this month"]})]}),(a==null?void 0:a.description)&&e.jsx(B,{className:"method-description",text:a.description}),a&&e.jsxs("div",{className:"organization-hero-links",children:[a.website_url&&e.jsx("a",{href:a.website_url,target:"_blank",rel:"noreferrer",children:"Website ↗"}),a.hf_url&&e.jsx("a",{href:a.hf_url,target:"_blank",rel:"noreferrer",children:"Hugging Face ↗"}),a.github_url&&e.jsx("a",{href:a.github_url,target:"_blank",rel:"noreferrer",children:"GitHub ↗"})]})]}),a&&e.jsx(G,{organizationSlug:n,organizationName:a.name})]}),e.jsxs("div",{className:"sort-bar",style:{alignItems:"center",gap:16},children:[e.jsx("div",{style:{minWidth:260},children:e.jsx(Y,{value:p??"__all__",onChange:q,placeholder:"All tasks",searchPlaceholder:"Search organization tasks...",emptyMessage:"No matching tasks.",ariaLabel:"Filter papers by task",selectedOption:l?{value:l.slug,label:l.label,description:`${l.paper_count.toLocaleString()} ${l.paper_count===1?"paper":"papers"}`}:{value:"__all__",label:"All tasks",description:`${((O=a==null?void 0:a.paper_count)==null?void 0:O.toLocaleString())??0} papers`},queryKey:["organization-task-options",n],queryFn:async s=>{var r;return[{value:"__all__",label:"All tasks",description:`${((r=a==null?void 0:a.paper_count)==null?void 0:r.toLocaleString())??0} papers`},...S(s)]},enabled:!c.isLoading,className:"h-[38px]"})}),e.jsxs("div",{className:"paper-feed-toolbar-controls",children:[e.jsx("div",{className:"sort-options",children:re.map(([s,r])=>e.jsx("button",{type:"button",className:`sort-btn ${g===s?"active":""}`,onClick:()=>{const t=new URLSearchParams(o);s==="trending"?t.delete("order_by"):t.set("order_by",s),h(t)},children:r},s))}),e.jsx(Z,{hasCode:_,hasHfArtifacts:f,onHasCodeChange:s=>{const r=new URLSearchParams(o);s?r.set("has_code","true"):r.delete("has_code"),h(r)},onHasHfArtifactsChange:s=>{const r=new URLSearchParams(o);s?r.set("has_hf_artifacts","true"):r.delete("has_hf_artifacts"),h(r)}})]}),e.jsx(z,{startDate:m.startDate,endDate:m.endDate,onChange:s=>h(J(o,s))}),e.jsxs("div",{className:"results-count",children:[H.toLocaleString()," papers"]})]}),i.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((s,r)=>e.jsx($,{className:"h-40 w-full"},r))}):N.length===0?e.jsx("div",{className:"no-results",children:(a==null?void 0:a.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:N.map((s,r)=>e.jsx(U,{paper:s,rank:r+1,showInstitution:!1},s.id))}),e.jsx("div",{ref:M,style:{height:1}}),i.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center"},children:"Loading more…"})]})]})};export{xe as O};
assets/OrganizationTaskView-BYKP_Ay6.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{c as i,j as t}from"./index-BfGRWIiQ.js";import{O as m}from"./OrganizationPaperFeed-C1gWdGPr.js";import p from"./NotFound-DoU3elKs.js";import"./useQuery-uhyHf514.js";import"./components-fo0inhXZ.js";import"./LatexTitle-DPJPslOM.js";import"./katex.min-BSBacQyE.js";import"./transform-BVvRkYPJ.js";import"./papers-PnGxH-RF.js";import"./safeExternalHref-CkBrsh84.js";import"./MarkdownText-DeevkxdU.js";import"./PaperPreviewLink-_SPYeWhn.js";import"./index-BqZK5Cw1.js";import"./hover-card-HVpXfIHl.js";import"./OrganizationContributionGraph-DWn4WvRK.js";import"./skeleton-7gHbNXZz.js";import"./catalog-BsVxStBB.js";import"./paperDateRange-BwpPQ99I.js";import"./popover-xj7LLGhl.js";import"./alert-D4lZhgu4.js";import"./searchable-select-CyD8AolE.js";import"./button-wuesmQpV.js";import"./dialog-Ci3RQLed.js";import"./loader-circle-DgGa62N_.js";import"./usePapers-SIkOY1oo.js";import"./useInfiniteQuery-CYJcc79v.js";const q=()=>{const{orgSlug:o,taskSlug:r}=i();return o&&r?t.jsx(m,{organizationSlug:o,taskSlug:r}):t.jsx(p,{})};export{q as default};
assets/OrganizationTaskView-jzl3MtNc.js DELETED
@@ -1 +0,0 @@
1
- import{c as i,j as t}from"./index-BJHhPv_M.js";import{O as m}from"./OrganizationPaperFeed-B4pxo9zJ.js";import p from"./NotFound-DI_FDclS.js";import"./useQuery-B9A-sza5.js";import"./components-wRHDLoMO.js";import"./LatexTitle-Cb0dDCMw.js";import"./katex.min-BSBacQyE.js";import"./transform-DDP8kg8V.js";import"./papers-CWyBrS8M.js";import"./safeExternalHref-CkBrsh84.js";import"./MarkdownText-_ZQTzPOU.js";import"./PaperPreviewLink-DVTrFkw2.js";import"./index-RvWGcsIO.js";import"./hover-card-CBNxKixP.js";import"./OrganizationContributionGraph-6dHF7Irk.js";import"./skeleton-utCOClux.js";import"./catalog-DOuThn7M.js";import"./paperDateRange-Cx_7ISLZ.js";import"./popover-ByfOmyUl.js";import"./alert-BiDOKM0e.js";import"./searchable-select-NpNOjZCr.js";import"./button-BL7Wfk99.js";import"./dialog-DINVvlE3.js";import"./loader-circle-CaPI_8_v.js";import"./usePapers-Dubaj0sc.js";import"./useInfiniteQuery-DeWbJxMK.js";const q=()=>{const{orgSlug:o,taskSlug:r}=i();return o&&r?t.jsx(m,{organizationSlug:o,taskSlug:r}):t.jsx(p,{})};export{q as default};
 
 
assets/{OrganizationsIndexView-CTiEHX3_.js → OrganizationsIndexView-BF3t-ISH.js} RENAMED
@@ -1 +1 @@
1
- import{a as u,r as g,j as e,L as x}from"./index-BJHhPv_M.js";import{u as j}from"./useQuery-B9A-sza5.js";import{A as y,a as f}from"./alert-BiDOKM0e.js";import{S as _}from"./skeleton-utCOClux.js";import{c as N}from"./catalog-DOuThn7M.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)})})},A=()=>{var h;const[n,d]=u(),t=v(n.get("sort")),c=n.get("q")??"",o=j({queryKey:["organizations","featured"],queryFn:()=>N.organizationIndex(),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 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(_,{className:"organization-card-skeleton"},a))}):o.error?e.jsx(y,{variant:"destructive",children:e.jsxs(f,{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{A as default};
 
1
+ import{a as u,r as g,j as e,L as x}from"./index-BfGRWIiQ.js";import{u as j}from"./useQuery-uhyHf514.js";import{A as y,a as f}from"./alert-D4lZhgu4.js";import{S as _}from"./skeleton-7gHbNXZz.js";import{c as N}from"./catalog-BsVxStBB.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)})})},A=()=>{var h;const[n,d]=u(),t=v(n.get("sort")),c=n.get("q")??"",o=j({queryKey:["organizations","featured"],queryFn:()=>N.organizationIndex(),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 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(_,{className:"organization-card-skeleton"},a))}):o.error?e.jsx(y,{variant:"destructive",children:e.jsxs(f,{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{A as default};
assets/{PaperDetailView-DLBdTe9q.js → PaperDetailView-BqZOoHVB.js} RENAMED
@@ -1,4 +1,4 @@
1
- import{d as Dt,n as Ss,u as Ht,e as te,f as Ps,r as p,j as e,g as de,C as he,P as Mt,h as xe,k as zt,l as Se,m as Ce,o as qt,p as ht,q as Re,X as pt,L as le,s as Is,t as $s,R as As,I as Rs,v as Kt,w as Fs,x as Ls,T as Ts,A as it,y as Le,z as Fe,B as ot,D as Ot,E as Us,c as Bs,F as Ds,b as Hs,G as Ms,H as zs,J as qs,K as Ks,M as Os}from"./index-BJHhPv_M.js";import{I as G,T as Qs,M as Gs,S as Vs,a as Js}from"./components-wRHDLoMO.js";import{L as Ae,a as Xs}from"./LatexTitle-Cb0dDCMw.js";import{e as Te,C as Ws,E as Ys}from"./ExternalSourceEvalBadge-D-cpVwI4.js";import{p as V}from"./papers-CWyBrS8M.js";import{s as ce}from"./safeExternalHref-CkBrsh84.js";import{u as Z}from"./useQuery-B9A-sza5.js";import{b as Zs}from"./usePapers-Dubaj0sc.js";import{f as ea,D as ta}from"./latexPlainText-DI8YEXVe.js";import{s as sa}from"./transform-DDP8kg8V.js";import{S as Ne}from"./skeleton-utCOClux.js";import{A as aa,a as ra}from"./alert-BiDOKM0e.js";import{B as D}from"./button-BL7Wfk99.js";import{I as W}from"./textarea-EPRANuVM.js";import{D as se,a as ae,b as re,c as ne,d as ie,e as oe}from"./dialog-DINVvlE3.js";import{S as Et,a as Ee}from"./searchable-select-NpNOjZCr.js";import{u as ue}from"./useMutation-rrsjzB5Q.js";import{c as ge}from"./catalog-DOuThn7M.js";import{s as pe}from"./submissions-Dz2yQ0h0.js";import{P as Ue,S as ft,L as Y,a as na}from"./SignInToEditDialog-vE3vqpo1.js";import{L as ee}from"./loader-circle-CaPI_8_v.js";import{T as Be,n as Ge,g as St}from"./github-B2SnkTVu.js";import{D as ia,B as Qt,c as oa,g as la,s as ca,a as da,b as ua,d as ma,i as ha,e as pa}from"./codexAddEvals-CLThdzle.js";import{u as Gt}from"./index-mZqTNISL.js";import{G as Pt}from"./github-BnuvDeYu.js";import{M as fa,r as ga}from"./index-RvWGcsIO.js";import{S as It,s as xa}from"./savedPapersAuth-QFHV9d-7.js";import"./katex.min-BSBacQyE.js";import"./hover-card-CBNxKixP.js";import"./useInfiniteQuery-DeWbJxMK.js";import"./popover-ByfOmyUl.js";/**
2
  * @license lucide-react v0.462.0 - ISC
3
  *
4
  * This source code is licensed under the ISC license.
 
1
+ import{d as Dt,n as Ss,u as Ht,e as te,f as Ps,r as p,j as e,g as de,C as he,P as Mt,h as xe,k as zt,l as Se,m as Ce,o as qt,p as ht,q as Re,X as pt,L as le,s as Is,t as $s,R as As,I as Rs,v as Kt,w as Fs,x as Ls,T as Ts,A as it,y as Le,z as Fe,B as ot,D as Ot,E as Us,c as Bs,F as Ds,b as Hs,G as Ms,H as zs,J as qs,K as Ks,M as Os}from"./index-BfGRWIiQ.js";import{I as G,T as Qs,M as Gs,S as Vs,a as Js}from"./components-fo0inhXZ.js";import{L as Ae,a as Xs}from"./LatexTitle-DPJPslOM.js";import{e as Te,C as Ws,E as Ys}from"./ExternalSourceEvalBadge-DJbjkUvR.js";import{p as V}from"./papers-PnGxH-RF.js";import{s as ce}from"./safeExternalHref-CkBrsh84.js";import{u as Z}from"./useQuery-uhyHf514.js";import{b as Zs}from"./usePapers-SIkOY1oo.js";import{f as ea,D as ta}from"./latexPlainText-DI8YEXVe.js";import{s as sa}from"./transform-BVvRkYPJ.js";import{S as Ne}from"./skeleton-7gHbNXZz.js";import{A as aa,a as ra}from"./alert-D4lZhgu4.js";import{B as D}from"./button-wuesmQpV.js";import{I as W}from"./textarea-BA4IPzRY.js";import{D as se,a as ae,b as re,c as ne,d as ie,e as oe}from"./dialog-Ci3RQLed.js";import{S as Et,a as Ee}from"./searchable-select-CyD8AolE.js";import{u as ue}from"./useMutation-Dw9DDJRs.js";import{c as ge}from"./catalog-BsVxStBB.js";import{s as pe}from"./submissions-DXV1AUkd.js";import{P as Ue,S as ft,L as Y,a as na}from"./SignInToEditDialog-C1ykF6wM.js";import{L as ee}from"./loader-circle-DgGa62N_.js";import{T as Be,n as Ge,g as St}from"./github-BbqV1Jxk.js";import{D as ia,B as Qt,c as oa,g as la,s as ca,a as da,b as ua,d as ma,i as ha,e as pa}from"./codexAddEvals-BZGAy-W_.js";import{u as Gt}from"./index-DPh0SyoW.js";import{G as Pt}from"./github-BM40zlYO.js";import{M as fa,r as ga}from"./index-BqZK5Cw1.js";import{S as It,s as xa}from"./savedPapersAuth-BO0Yd9eL.js";import"./katex.min-BSBacQyE.js";import"./hover-card-HVpXfIHl.js";import"./useInfiniteQuery-CYJcc79v.js";import"./popover-xj7LLGhl.js";/**
2
  * @license lucide-react v0.462.0 - ISC
3
  *
4
  * This source code is licensed under the ISC license.
assets/{PaperPreviewLink-DVTrFkw2.js → PaperPreviewLink-_SPYeWhn.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 z,h as ie,s as ae,c as oe,v as se,S as le}from"./index-RvWGcsIO.js";import{k as L}from"./katex.min-BSBacQyE.js";import{j as f,z as T,M as ce,n as ue,L as he}from"./index-BJHhPv_M.js";import{u as pe}from"./useQuery-B9A-sza5.js";import{H as me,a as fe,b as de}from"./hover-card-CBNxKixP.js";import{p as ge}from"./papers-CWyBrS8M.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 z,h as ie,s as ae,c as oe,v as se,S as le}from"./index-BqZK5Cw1.js";import{k as L}from"./katex.min-BSBacQyE.js";import{j as f,z as T,M as ce,n as ue,L as he}from"./index-BfGRWIiQ.js";import{u as pe}from"./useQuery-uhyHf514.js";import{H as me,a as fe,b as de}from"./hover-card-HVpXfIHl.js";import{p as ge}from"./papers-PnGxH-RF.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/{PaperReaderView-CsV08V1_.js → PaperReaderView-CEyWN84M.js} RENAMED
@@ -1 +1 @@
1
- import{c as ne,j as i,n as Pe,M as ye,r as s,N as Ce,L as K}from"./index-BJHhPv_M.js";import{u as _e}from"./useQuery-B9A-sza5.js";import{A as je,u as Ie,a as $e,P as Ae}from"./ArtifactWorkspace-DKTpoNk6.js";import{b as ke}from"./usePapers-Dubaj0sc.js";import{c as Ne}from"./chat-D9bQn_8F.js";import{s as q}from"./safeExternalHref-CkBrsh84.js";import{ChatExperience as Ee}from"./ChatView-0-C1aJrh.js";import"./chatLaunch--jg98Oug.js";import"./chevron-down-BVyqIjKu.js";import"./papers-CWyBrS8M.js";import"./katex.min-BSBacQyE.js";import"./hover-card-CBNxKixP.js";import"./github-B2SnkTVu.js";import"./github-BnuvDeYu.js";import"./PaperPreviewLink-DVTrFkw2.js";import"./index-RvWGcsIO.js";import"./file-text-D0p5b00d.js";import"./useMutation-rrsjzB5Q.js";import"./external-link-h2XFtnTN.js";import"./useInfiniteQuery-DeWbJxMK.js";import"./chatPrompts-CDY3UGU1.js";import"./openrouter-BtnjdC9I.js";const ie=66,Te=240,D="pwc:reader:split-ratio",A=r=>`pwc:reader:session:${r}`,B=r=>`pwc:reader:assistant-collapsed:${r}`,oe=r=>`pwc:reader:page:${r}`;function U(r){const n=Number(sessionStorage.getItem(oe(r)));return Number.isInteger(n)&&n>0?n:1}function ze(){const r=Number(localStorage.getItem(D));return Number.isFinite(r)&&r>=45&&r<=75?r:ie}function Le(r){const n=q(r);if(!n)return null;const o=new URL(n);return(o.hostname==="arxiv.org"||o.hostname==="www.arxiv.org")&&o.pathname.startsWith("/pdf/")&&o.pathname.endsWith(".pdf")&&(o.pathname=o.pathname.slice(0,-4)),o.href}function Me(r){return new URL(r).hostname.replace(/^www\./,"")}function Fe(r){if(!r)return{};const n={};for(const t of r.repositories??[]){if(!t.is_official)continue;const c=q(t.url);if(!c)continue;const v=new URL(c),p=v.pathname.split("/").filter(Boolean);if((v.hostname==="github.com"||v.hostname==="www.github.com")&&p.length>=2){n.repository={href:c,stars:t.num_stars||0};break}}const o=[...r.project_pages??[]].sort((t,c)=>Number(c.is_official)-Number(t.is_official));for(const t of o){const c=q(t.url);if(c){n.projectPage={href:c,label:Me(c)};break}}const g=r.hf_artifact_summary?r.hf_artifact_summary.model_count+r.hf_artifact_summary.dataset_count+r.hf_artifact_summary.space_count:new Set([...r.hf_models??[],...r.hf_datasets??[],...r.hf_spaces??[]]).size;return g>0&&r.arxiv_id&&(n.huggingFace={href:`https://huggingface.co/papers/${r.arxiv_id.replace(/v\d+$/i,"")}`,count:g}),n}function We(){var te,re,ae,se;const{paperId:r}=ne(),n=Pe(r??"").replace(/v\d+$/i,""),o=ke(n,!!n),g=_e({queryKey:["chatAvailability"],queryFn:()=>Ne.getAvailability(),refetchInterval:3e4,retry:!1}),t=o.data,c=(t==null?void 0:t.source)==="external"?ye(`/paper-assets/external/${t.id}/paper.pdf`):Le(t==null?void 0:t.url_pdf),v=Fe(t),p=((te=t==null?void 0:t.arxiv_id)==null?void 0:te.replace(/v\d+$/i,""))||n,[P,k]=s.useState(()=>sessionStorage.getItem(A(n))||void 0),[w,N]=s.useState(ze),[f,O]=s.useState(()=>sessionStorage.getItem(B(n))==="1"),[m,y]=s.useState("paper"),[E,R]=s.useState(),[ce,b]=s.useState(""),[le,de]=s.useState(()=>U(n)),[S,ue]=s.useState(0),[V,X]=s.useState(!1),[fe,T]=s.useState(!1),C=s.useRef(null),z=s.useRef(null),L=s.useRef(null),Q=s.useRef(null),_=s.useRef(!1),j=s.useRef(0),h=s.useRef(0),M=s.useRef(0),x=s.useRef(w),F=s.useRef(U(n)),W=s.useRef(t==null?void 0:t.version),Y=Ie().reset,G=s.useRef(`${n}:${P??"new"}`),l=S>=840;s.useEffect(()=>{const e=`${n}:${P??"new"}`;G.current!==e&&(G.current=e,Y())},[P,Y,n]),s.useEffect(()=>{t!=null&&t.version&&W.current&&t.version!==W.current&&(R(void 0),b("")),W.current=t==null?void 0:t.version},[t==null?void 0:t.version]),s.useEffect(()=>{window.clearTimeout(j.current),T(!1);const e=sessionStorage.getItem(A(n));k(e||void 0),O(sessionStorage.getItem(B(n))==="1"),y("paper"),R(void 0),b("");const a=U(n);F.current=a,de(a)},[n]),s.useEffect(()=>()=>{window.clearTimeout(j.current),cancelAnimationFrame(h.current)},[]),s.useLayoutEffect(()=>{const e=C.current;if(!e)return;const a=()=>ue(e.clientWidth);a();const d=new ResizeObserver(a);return d.observe(e),()=>d.disconnect()},[t]),s.useEffect(()=>{if(!t)return;document.title=`${t.title} — Papers With Code reader`;let e=document.querySelector('meta[name="robots"]');const a=!e;e||(e=document.createElement("meta"),e.name="robots",document.head.appendChild(e));const d=e.content;e.content="noindex, nofollow";let u=document.querySelector('link[rel="canonical"]');const Se=!u;u||(u=document.createElement("link"),u.rel="canonical",document.head.appendChild(u));const xe=u.href;return u.href=`${window.location.origin}/paper/${p}`,()=>{document.title="Papers With Code",a?e==null||e.remove():e&&(e.content=d),Se?u==null||u.remove():u&&(u.href=xe)}},[p,t]);const I=s.useCallback(e=>{if(!S)return Math.max(45,Math.min(75,e));const a=480/S*100,d=100-360/S*100;return Math.max(a,Math.min(d,e))},[S]);s.useEffect(()=>N(e=>{const a=I(e);return x.current=a,a}),[I]);const $=e=>{const a=I(e);x.current=a,N(a),localStorage.setItem(D,String(a))},J=e=>{var d;const a=I(e);x.current=a,z.current&&(z.current.style.width=`${a}%`),L.current&&(L.current.style.width=`${100-a}%`),(d=Q.current)==null||d.setAttribute("aria-valuenow",String(Math.round(a)))},Z=e=>{M.current=e,!h.current&&(h.current=requestAnimationFrame(()=>{var d;h.current=0;const a=(d=C.current)==null?void 0:d.getBoundingClientRect();a!=null&&a.width&&J((M.current-a.left)/a.width*100)}))},pe=e=>{_.current=!0,X(!0),e.currentTarget.setPointerCapture(e.pointerId),Z(e.clientX)},H=()=>{var e;if(_.current){if(h.current){cancelAnimationFrame(h.current),h.current=0;const a=(e=C.current)==null?void 0:e.getBoundingClientRect();a!=null&&a.width&&J((M.current-a.left)/a.width*100)}_.current=!1,N(x.current),localStorage.setItem(D,String(x.current)),X(!1)}},ee=e=>{window.clearTimeout(j.current),T(!0),O(e),sessionStorage.setItem(B(n),e?"1":"0"),j.current=window.setTimeout(()=>T(!1),Te+40)},me=e=>{k(e),sessionStorage.setItem(A(n),e)},he=()=>{k(void 0),sessionStorage.removeItem(A(n)),R(void 0),b("")},ge=((re=g.data)==null?void 0:re.paper_reader_selection_enabled)===!0,be=e=>{R(e),b(`Selection from page ${e.page} added to chat`),l&&f&&ee(!1)},ve=s.useCallback(e=>{R(e),e||b("")},[]),we=Ce()&&((ae=g.data)==null?void 0:ae.paper_reader_chat_enabled)!==!1,Re=t&&we?i.jsx(Ee,{mode:"paper",routeSessionId:P,primaryPaper:{id:t.id,routeId:p,title:t.title},currentPage:()=>F.current,paperSelection:E,onPaperSelectionChange:ve,onSessionId:me,onReaderSubmit:()=>y("assistant"),onReaderNewChat:he}):i.jsx("div",{className:"reader-chat-unavailable",children:"Chat is not enabled for this preview."});return o.isLoading?i.jsx("div",{className:"reader-status",role:"status",children:"Loading paper…"}):o.error||!t?i.jsxs("div",{className:"reader-status",role:"alert",children:[i.jsx("p",{children:"Paper not found."}),i.jsx(K,{to:"/papers",children:"Browse papers"})]}):((se=g.data)==null?void 0:se.native_pdf_reader_enabled)===!1?i.jsxs("div",{className:"reader-status",role:"alert",children:[i.jsx("p",{children:"The native reader is currently unavailable."}),i.jsx(K,{to:`/paper/${p}`,children:"Back to paper"})]}):c?i.jsxs("div",{className:"paper-reader-shell",children:[!l&&i.jsxs("div",{className:"reader-tabs",role:"tablist","aria-label":"Reader panels",children:[i.jsx("button",{type:"button",role:"tab","aria-selected":m==="paper",onClick:()=>y("paper"),children:"Paper"}),i.jsxs("button",{type:"button",role:"tab","aria-selected":m==="assistant","aria-label":E&&m!=="assistant"?"Chat, selection attached":"Chat",onClick:()=>y("assistant"),children:["Chat",E&&m!=="assistant"&&i.jsx("span",{className:"reader-tab-pending","aria-hidden":"true"})]})]}),i.jsx($e,{variant:"reader",children:i.jsxs("div",{ref:C,className:`reader-workspace${l?" is-desktop":" is-tabs"}${f?" is-assistant-collapsed":""}${V?" is-resizing":""}`,"data-testid":"paper-chat-workspace",children:[i.jsx("section",{ref:z,className:`reader-paper-pane${!l&&m!=="paper"?" is-hidden":""}`,style:l?{width:f?"100%":`${w}%`}:void 0,role:"tabpanel","aria-label":"Paper","aria-hidden":!l&&m!=="paper",children:i.jsx(Ae,{url:c,paperKey:p,paperTitle:t.title,paperHref:`/paper/${p}`,resources:v,initialPage:le,resizeActive:V||fe,selectionEnabled:ge,paperVersion:t.version,loadErrorMessage:t.source==="external"?"Paper content is still being prepared. Please try again later.":void 0,onPaperSelection:be,onPaperSelectionError:b,onPageChange:e=>{F.current=e,sessionStorage.setItem(oe(n),String(e))}})}),l&&!f&&i.jsx("div",{ref:Q,className:"reader-resize-handle",role:"separator","aria-label":"Resize paper and Chat panels","aria-orientation":"vertical","aria-valuemin":45,"aria-valuemax":75,"aria-valuenow":Math.round(w),tabIndex:0,onPointerDown:pe,onPointerMove:e=>{_.current&&Z(e.clientX)},onPointerUp:H,onPointerCancel:H,onLostPointerCapture:H,onDoubleClick:()=>$(ie),onKeyDown:e=>{(e.key==="ArrowLeft"||e.key==="ArrowRight")&&(e.preventDefault(),$(w+(e.key==="ArrowRight"?2:-2))),e.key==="Home"&&$(45),e.key==="End"&&$(75)}}),i.jsx("aside",{ref:L,id:"reader-chat-panel",className:`reader-assistant-pane${!l&&m!=="assistant"?" is-hidden":""}${l&&f?" is-collapsed":""}`,style:l?{width:f?0:`${100-w}%`}:void 0,role:"tabpanel","aria-label":"Chat","aria-hidden":!l&&m!=="assistant"||f,children:Re}),i.jsx("div",{className:"sr-only","aria-live":"polite",children:ce}),l&&i.jsx("button",{type:"button",className:"reader-collapse-assistant","aria-controls":"reader-chat-panel","aria-expanded":!f,onClick:()=>ee(!f),children:f?"Open chat":"Hide chat"})]})})]}):i.jsxs("div",{className:"reader-status",role:"alert",children:[i.jsx("p",{children:"Native reading is unavailable for this resource."}),i.jsx(K,{to:`/paper/${p}`,children:"Back to paper"})]})}function lt(){const{paperId:r=""}=ne();return i.jsx(je,{workspaceKey:`reader:${r}`,children:i.jsx(We,{})})}export{lt as default,Le as directArxivPdfHref,Fe as readerToolbarResources};
 
1
+ import{c as ne,j as i,n as Pe,M as ye,r as s,N as Ce,L as K}from"./index-BfGRWIiQ.js";import{u as _e}from"./useQuery-uhyHf514.js";import{A as je,u as Ie,a as $e,P as Ae}from"./ArtifactWorkspace-Dc7yVRVJ.js";import{b as ke}from"./usePapers-SIkOY1oo.js";import{c as Ne}from"./chat-dMs5c7qZ.js";import{s as q}from"./safeExternalHref-CkBrsh84.js";import{ChatExperience as Ee}from"./ChatView-DCf7eWmY.js";import"./chatLaunch-BxzD44NH.js";import"./chevron-down-BovmCLHU.js";import"./papers-PnGxH-RF.js";import"./katex.min-BSBacQyE.js";import"./hover-card-HVpXfIHl.js";import"./github-BbqV1Jxk.js";import"./github-BM40zlYO.js";import"./PaperPreviewLink-_SPYeWhn.js";import"./index-BqZK5Cw1.js";import"./file-text-FxV6g_yZ.js";import"./useMutation-Dw9DDJRs.js";import"./external-link-C3NMRHh9.js";import"./useInfiniteQuery-CYJcc79v.js";import"./chatPrompts-CDY3UGU1.js";import"./openrouter-eY8Zeuhv.js";const ie=66,Te=240,D="pwc:reader:split-ratio",A=r=>`pwc:reader:session:${r}`,B=r=>`pwc:reader:assistant-collapsed:${r}`,oe=r=>`pwc:reader:page:${r}`;function U(r){const n=Number(sessionStorage.getItem(oe(r)));return Number.isInteger(n)&&n>0?n:1}function ze(){const r=Number(localStorage.getItem(D));return Number.isFinite(r)&&r>=45&&r<=75?r:ie}function Le(r){const n=q(r);if(!n)return null;const o=new URL(n);return(o.hostname==="arxiv.org"||o.hostname==="www.arxiv.org")&&o.pathname.startsWith("/pdf/")&&o.pathname.endsWith(".pdf")&&(o.pathname=o.pathname.slice(0,-4)),o.href}function Me(r){return new URL(r).hostname.replace(/^www\./,"")}function Fe(r){if(!r)return{};const n={};for(const t of r.repositories??[]){if(!t.is_official)continue;const c=q(t.url);if(!c)continue;const v=new URL(c),p=v.pathname.split("/").filter(Boolean);if((v.hostname==="github.com"||v.hostname==="www.github.com")&&p.length>=2){n.repository={href:c,stars:t.num_stars||0};break}}const o=[...r.project_pages??[]].sort((t,c)=>Number(c.is_official)-Number(t.is_official));for(const t of o){const c=q(t.url);if(c){n.projectPage={href:c,label:Me(c)};break}}const g=r.hf_artifact_summary?r.hf_artifact_summary.model_count+r.hf_artifact_summary.dataset_count+r.hf_artifact_summary.space_count:new Set([...r.hf_models??[],...r.hf_datasets??[],...r.hf_spaces??[]]).size;return g>0&&r.arxiv_id&&(n.huggingFace={href:`https://huggingface.co/papers/${r.arxiv_id.replace(/v\d+$/i,"")}`,count:g}),n}function We(){var te,re,ae,se;const{paperId:r}=ne(),n=Pe(r??"").replace(/v\d+$/i,""),o=ke(n,!!n),g=_e({queryKey:["chatAvailability"],queryFn:()=>Ne.getAvailability(),refetchInterval:3e4,retry:!1}),t=o.data,c=(t==null?void 0:t.source)==="external"?ye(`/paper-assets/external/${t.id}/paper.pdf`):Le(t==null?void 0:t.url_pdf),v=Fe(t),p=((te=t==null?void 0:t.arxiv_id)==null?void 0:te.replace(/v\d+$/i,""))||n,[P,k]=s.useState(()=>sessionStorage.getItem(A(n))||void 0),[w,N]=s.useState(ze),[f,O]=s.useState(()=>sessionStorage.getItem(B(n))==="1"),[m,y]=s.useState("paper"),[E,R]=s.useState(),[ce,b]=s.useState(""),[le,de]=s.useState(()=>U(n)),[S,ue]=s.useState(0),[V,X]=s.useState(!1),[fe,T]=s.useState(!1),C=s.useRef(null),z=s.useRef(null),L=s.useRef(null),Q=s.useRef(null),_=s.useRef(!1),j=s.useRef(0),h=s.useRef(0),M=s.useRef(0),x=s.useRef(w),F=s.useRef(U(n)),W=s.useRef(t==null?void 0:t.version),Y=Ie().reset,G=s.useRef(`${n}:${P??"new"}`),l=S>=840;s.useEffect(()=>{const e=`${n}:${P??"new"}`;G.current!==e&&(G.current=e,Y())},[P,Y,n]),s.useEffect(()=>{t!=null&&t.version&&W.current&&t.version!==W.current&&(R(void 0),b("")),W.current=t==null?void 0:t.version},[t==null?void 0:t.version]),s.useEffect(()=>{window.clearTimeout(j.current),T(!1);const e=sessionStorage.getItem(A(n));k(e||void 0),O(sessionStorage.getItem(B(n))==="1"),y("paper"),R(void 0),b("");const a=U(n);F.current=a,de(a)},[n]),s.useEffect(()=>()=>{window.clearTimeout(j.current),cancelAnimationFrame(h.current)},[]),s.useLayoutEffect(()=>{const e=C.current;if(!e)return;const a=()=>ue(e.clientWidth);a();const d=new ResizeObserver(a);return d.observe(e),()=>d.disconnect()},[t]),s.useEffect(()=>{if(!t)return;document.title=`${t.title} — Papers With Code reader`;let e=document.querySelector('meta[name="robots"]');const a=!e;e||(e=document.createElement("meta"),e.name="robots",document.head.appendChild(e));const d=e.content;e.content="noindex, nofollow";let u=document.querySelector('link[rel="canonical"]');const Se=!u;u||(u=document.createElement("link"),u.rel="canonical",document.head.appendChild(u));const xe=u.href;return u.href=`${window.location.origin}/paper/${p}`,()=>{document.title="Papers With Code",a?e==null||e.remove():e&&(e.content=d),Se?u==null||u.remove():u&&(u.href=xe)}},[p,t]);const I=s.useCallback(e=>{if(!S)return Math.max(45,Math.min(75,e));const a=480/S*100,d=100-360/S*100;return Math.max(a,Math.min(d,e))},[S]);s.useEffect(()=>N(e=>{const a=I(e);return x.current=a,a}),[I]);const $=e=>{const a=I(e);x.current=a,N(a),localStorage.setItem(D,String(a))},J=e=>{var d;const a=I(e);x.current=a,z.current&&(z.current.style.width=`${a}%`),L.current&&(L.current.style.width=`${100-a}%`),(d=Q.current)==null||d.setAttribute("aria-valuenow",String(Math.round(a)))},Z=e=>{M.current=e,!h.current&&(h.current=requestAnimationFrame(()=>{var d;h.current=0;const a=(d=C.current)==null?void 0:d.getBoundingClientRect();a!=null&&a.width&&J((M.current-a.left)/a.width*100)}))},pe=e=>{_.current=!0,X(!0),e.currentTarget.setPointerCapture(e.pointerId),Z(e.clientX)},H=()=>{var e;if(_.current){if(h.current){cancelAnimationFrame(h.current),h.current=0;const a=(e=C.current)==null?void 0:e.getBoundingClientRect();a!=null&&a.width&&J((M.current-a.left)/a.width*100)}_.current=!1,N(x.current),localStorage.setItem(D,String(x.current)),X(!1)}},ee=e=>{window.clearTimeout(j.current),T(!0),O(e),sessionStorage.setItem(B(n),e?"1":"0"),j.current=window.setTimeout(()=>T(!1),Te+40)},me=e=>{k(e),sessionStorage.setItem(A(n),e)},he=()=>{k(void 0),sessionStorage.removeItem(A(n)),R(void 0),b("")},ge=((re=g.data)==null?void 0:re.paper_reader_selection_enabled)===!0,be=e=>{R(e),b(`Selection from page ${e.page} added to chat`),l&&f&&ee(!1)},ve=s.useCallback(e=>{R(e),e||b("")},[]),we=Ce()&&((ae=g.data)==null?void 0:ae.paper_reader_chat_enabled)!==!1,Re=t&&we?i.jsx(Ee,{mode:"paper",routeSessionId:P,primaryPaper:{id:t.id,routeId:p,title:t.title},currentPage:()=>F.current,paperSelection:E,onPaperSelectionChange:ve,onSessionId:me,onReaderSubmit:()=>y("assistant"),onReaderNewChat:he}):i.jsx("div",{className:"reader-chat-unavailable",children:"Chat is not enabled for this preview."});return o.isLoading?i.jsx("div",{className:"reader-status",role:"status",children:"Loading paper…"}):o.error||!t?i.jsxs("div",{className:"reader-status",role:"alert",children:[i.jsx("p",{children:"Paper not found."}),i.jsx(K,{to:"/papers",children:"Browse papers"})]}):((se=g.data)==null?void 0:se.native_pdf_reader_enabled)===!1?i.jsxs("div",{className:"reader-status",role:"alert",children:[i.jsx("p",{children:"The native reader is currently unavailable."}),i.jsx(K,{to:`/paper/${p}`,children:"Back to paper"})]}):c?i.jsxs("div",{className:"paper-reader-shell",children:[!l&&i.jsxs("div",{className:"reader-tabs",role:"tablist","aria-label":"Reader panels",children:[i.jsx("button",{type:"button",role:"tab","aria-selected":m==="paper",onClick:()=>y("paper"),children:"Paper"}),i.jsxs("button",{type:"button",role:"tab","aria-selected":m==="assistant","aria-label":E&&m!=="assistant"?"Chat, selection attached":"Chat",onClick:()=>y("assistant"),children:["Chat",E&&m!=="assistant"&&i.jsx("span",{className:"reader-tab-pending","aria-hidden":"true"})]})]}),i.jsx($e,{variant:"reader",children:i.jsxs("div",{ref:C,className:`reader-workspace${l?" is-desktop":" is-tabs"}${f?" is-assistant-collapsed":""}${V?" is-resizing":""}`,"data-testid":"paper-chat-workspace",children:[i.jsx("section",{ref:z,className:`reader-paper-pane${!l&&m!=="paper"?" is-hidden":""}`,style:l?{width:f?"100%":`${w}%`}:void 0,role:"tabpanel","aria-label":"Paper","aria-hidden":!l&&m!=="paper",children:i.jsx(Ae,{url:c,paperKey:p,paperTitle:t.title,paperHref:`/paper/${p}`,resources:v,initialPage:le,resizeActive:V||fe,selectionEnabled:ge,paperVersion:t.version,loadErrorMessage:t.source==="external"?"Paper content is still being prepared. Please try again later.":void 0,onPaperSelection:be,onPaperSelectionError:b,onPageChange:e=>{F.current=e,sessionStorage.setItem(oe(n),String(e))}})}),l&&!f&&i.jsx("div",{ref:Q,className:"reader-resize-handle",role:"separator","aria-label":"Resize paper and Chat panels","aria-orientation":"vertical","aria-valuemin":45,"aria-valuemax":75,"aria-valuenow":Math.round(w),tabIndex:0,onPointerDown:pe,onPointerMove:e=>{_.current&&Z(e.clientX)},onPointerUp:H,onPointerCancel:H,onLostPointerCapture:H,onDoubleClick:()=>$(ie),onKeyDown:e=>{(e.key==="ArrowLeft"||e.key==="ArrowRight")&&(e.preventDefault(),$(w+(e.key==="ArrowRight"?2:-2))),e.key==="Home"&&$(45),e.key==="End"&&$(75)}}),i.jsx("aside",{ref:L,id:"reader-chat-panel",className:`reader-assistant-pane${!l&&m!=="assistant"?" is-hidden":""}${l&&f?" is-collapsed":""}`,style:l?{width:f?0:`${100-w}%`}:void 0,role:"tabpanel","aria-label":"Chat","aria-hidden":!l&&m!=="assistant"||f,children:Re}),i.jsx("div",{className:"sr-only","aria-live":"polite",children:ce}),l&&i.jsx("button",{type:"button",className:"reader-collapse-assistant","aria-controls":"reader-chat-panel","aria-expanded":!f,onClick:()=>ee(!f),children:f?"Open chat":"Hide chat"})]})})]}):i.jsxs("div",{className:"reader-status",role:"alert",children:[i.jsx("p",{children:"Native reading is unavailable for this resource."}),i.jsx(K,{to:`/paper/${p}`,children:"Back to paper"})]})}function lt(){const{paperId:r=""}=ne();return i.jsx(je,{workspaceKey:`reader:${r}`,children:i.jsx(We,{})})}export{lt as default,Le as directArxivPdfHref,Fe as readerToolbarResources};
assets/{PapersListView-C2yhQGQQ.js → PapersListView-aXh7BE0b.js} RENAMED
@@ -1 +1 @@
1
- import{a as X,r as x,A as J,j as e,L as j,i as W}from"./index-BJHhPv_M.js";import{I as U,T as Y,P as Z}from"./components-wRHDLoMO.js";import{c as ee}from"./catalog-DOuThn7M.js";import{t as se,d as ae}from"./transform-DDP8kg8V.js";import{u as re,a as te}from"./usePapers-Dubaj0sc.js";import{u as ne}from"./useDebounce-CsEgrdpj.js";import{r as ie,u as oe,a as ce,w as le,P as de}from"./paperDateRange-Cx_7ISLZ.js";import{S as _}from"./skeleton-utCOClux.js";import{A as me,a as he}from"./alert-BiDOKM0e.js";import{u as pe}from"./useQuery-B9A-sza5.js";import"./LatexTitle-Cb0dDCMw.js";import"./katex.min-BSBacQyE.js";import"./papers-CWyBrS8M.js";import"./safeExternalHref-CkBrsh84.js";import"./useInfiniteQuery-DeWbJxMK.js";import"./popover-ByfOmyUl.js";const v=360;function ue(a,o){const m=a.toLocaleLowerCase();return o.trim().split(/\s+/).filter(Boolean).reduce((c,t)=>{const l=m.indexOf(t.toLocaleLowerCase());return l>=0&&(c<0||l<c)?l:c},-1)}function z(a,o,m){if((a.slice(0,o).match(/\$/g)||[]).length%2===0)return o;if(m==="start")return a.lastIndexOf("$",o)+1;const t=a.indexOf("$",o);return t>=0?t+1:o}function fe(a,o){if(a.length<=v)return a;const m=ue(a,o);if(m<0||m<v*.6)return a;let c=Math.max(0,m-Math.floor(v*.35)),t=Math.min(a.length,c+v);return c=z(a,c,"start"),t=z(a,t,"end"),`${c>0?"…":""}${a.slice(c,t).trim()}${t<a.length?"…":""}`}const xe=[["trending","trending"],["new","newest"],["cited","most cited"]],ge=[["relevance","relevance"],["new","newest"],["cited","most cited"]],je=a=>new Intl.NumberFormat("en",{notation:a>=1e3?"compact":"standard",maximumFractionDigits:1}).format(a),$e=()=>{var I,$,T,O,B,H,M,q,G;const[a,o]=X(),m=a.get("framework")||void 0,c=a.get("repository")||void 0,t=!!(m||c),l=a.get("search")||"",[F,C]=x.useState(l),p=ne(F,300),n=!t&&l.trim().length>0;x.useEffect(()=>C(l),[l]),x.useEffect(()=>{if(p===l)return;const s=new URLSearchParams(a);p?s.set("search",p):s.delete("search"),o(s,{replace:!0})},[p]),x.useEffect(()=>{const s=a.get("order_by"),i=new URLSearchParams(a);n&&!["relevance","date_published","citation_count"].includes(s||"")?(i.set("order_by","relevance"),o(i,{replace:!0})):!n&&s==="relevance"&&(i.delete("order_by"),o(i,{replace:!0}))},[n,a,o]);const L=a.get("order_by"),g=L==="citation_count"?"cited":L==="date_published"?"new":n?"relevance":"trending",u=ie(a),w=a.get("has_hf_artifacts")==="true",k=!t&&a.get("has_code")==="true",y=(s,i)=>{const h=new URLSearchParams(a);i?h.set(s,i):h.delete(s),o(h)},Q=s=>{y("order_by",s==="cited"?"citation_count":s==="new"?"date_published":s)},b=re({page_size:20,order_by:g==="trending"?"trending":g==="cited"?"citation_count":"date_published",order_dir:"desc",search:t&&p||void 0,start_date:u.startDate,end_date:u.endDate,include_resources:!0,conference:a.get("conference")||void 0,latest_only:a.get("latest_only")!=="false",has_code:k,has_hf_artifacts:w,framework:m,repository:c,enabled:!n}),R=te({q:p.trim(),order_by:g==="cited"?"citation_count":g==="new"?"date_published":"relevance",start_date:u.startDate,end_date:u.endDate,has_code:k,has_hf_artifacts:w,enabled:n}),d=n?R:b,A=pe({queryKey:["top-tasks-sidebar"],queryFn:()=>ee.topTasks(8),enabled:!t&&!n,staleTime:10*60*1e3}),N=x.useMemo(()=>{var i;return(((i=d.data)==null?void 0:i.pages.flatMap(h=>h.results))||[]).map(h=>{const S=se(h);return n?{...S,abstract:fe(S.abstract,l)}:S})},[d.data,n,l]),{targetRef:K,isIntersecting:D}=oe({rootMargin:"200px"});x.useEffect(()=>{D&&d.hasNextPage&&!d.isFetchingNextPage&&d.fetchNextPage()},[D,d.hasNextPage,d.isFetchingNextPage]);const f=((T=($=(I=b.data)==null?void 0:I.pages)==null?void 0:$[0])==null?void 0:T.count)??0,r=(H=(B=(O=b.data)==null?void 0:O.pages)==null?void 0:B[0])==null?void 0:H.scope,P=(q=(M=R.data)==null?void 0:M.pages)==null?void 0:q.at(-1),E=m&&d.error instanceof J&&d.error.status===404,V=(r==null?void 0:r.kind)==="framework"?r.framework_name:r==null?void 0:r.repository;return e.jsxs("div",{className:"page",children:[(r==null?void 0:r.kind)==="framework"&&e.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[e.jsx(j,{to:"/",children:"Papers"}),e.jsx("span",{className:"sep",children:"/"}),e.jsx(j,{to:"/frameworks",children:"Frameworks"}),e.jsx("span",{className:"sep",children:"/"}),e.jsx("span",{style:{color:"var(--ink)"},children:r.framework_name})]}),e.jsxs("div",{className:"feed-header",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"feed-title",children:t?e.jsxs(e.Fragment,{children:["Papers implemented by ",e.jsx("em",{children:V||m||c})]}):n?e.jsxs(e.Fragment,{children:["Search results for ",e.jsxs("em",{children:["“",l,"”"]})]}):e.jsxs(e.Fragment,{children:["All ",e.jsx("em",{children:"Papers"})]})}),e.jsx("div",{className:"feed-subtitle",children:t?(r==null?void 0:r.kind)==="framework"?f>0&&`${f.toLocaleString()} papers.`:r!=null&&r.repository?e.jsxs(e.Fragment,{children:["GitHub repository ",e.jsx("strong",{children:r.repository}),". ",f>0&&`${f.toLocaleString()} papers.`]}):"Repository-scoped paper feed.":n?`${N.length} loaded from the most relevant results.`:e.jsxs(e.Fragment,{children:["Search the full corpus. ",f>0&&`${f.toLocaleString()} papers indexed.`]})}),t&&r&&e.jsxs("div",{className:"paper-feed-scope-links",children:[e.jsxs("div",{className:"paper-feed-primary-links",children:[r.github_url&&e.jsxs("a",{href:r.github_url,target:"_blank",rel:"noopener noreferrer",className:r.kind==="framework"?"task-framework-link":"framework-link",children:[e.jsx(U,{name:"github",size:13}),r.kind==="framework"?e.jsxs(e.Fragment,{children:[e.jsx("span",{children:r.repository||"GitHub"}),r.num_stars!=null&&e.jsxs("span",{className:"task-framework-link-stars",children:["★ ",je(r.num_stars)]})]}):"GitHub"]}),r.kind==="framework"&&r.introducing_paper_arxiv_id&&e.jsx(j,{to:`/paper/${r.introducing_paper_arxiv_id}`,className:"framework-link",children:"Introducing paper"})]}),r.kind==="framework"&&r.recommended_tasks&&r.recommended_tasks.length>0&&e.jsx("div",{className:"paper-feed-task-tags",children:r.recommended_tasks.map(s=>s.slug?e.jsx(Y,{slug:s.slug,label:s.name},s.id):null)})]})]}),e.jsx(ce,{startDate:u.startDate,endDate:u.endDate,onChange:s=>o(le(a,s))})]}),e.jsx("div",{className:"papers-search-row",children:e.jsxs("div",{className:"papers-search-input-wrap",children:[e.jsx(U,{name:"search",size:14}),e.jsx("input",{className:"papers-search-input",placeholder:"Search title or abstract…",value:F,onChange:s=>C(s.target.value)})]})}),e.jsxs("div",{className:t||n?"papers-feed-layout-scoped":"layout-with-sidebar",children:[!t&&!n&&e.jsx("aside",{className:"sidebar",children:e.jsxs("div",{className:"sidebar-section",children:[e.jsx("div",{className:"sidebar-label",children:"Top Domains"}),A.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((s,i)=>e.jsx(_,{className:"h-5 w-full"},i))}),(G=A.data)==null?void 0:G.map(s=>e.jsxs(j,{to:`/tasks/${s.slug}`,className:"sidebar-link",children:[ae(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.jsxs("div",{className:"paper-feed-toolbar-controls",children:[e.jsx("div",{className:"sort-options",children:(n?ge:xe).map(([s,i])=>e.jsx("button",{className:`sort-btn ${g===s?"active":""}`,onClick:()=>Q(s),children:i},s))}),e.jsx(de,{hasCode:k,hasHfArtifacts:w,onHasCodeChange:s=>y("has_code",s?"true":void 0),onHasHfArtifactsChange:s=>y("has_hf_artifacts",s?"true":void 0),showHasCode:!t})]}),e.jsxs("div",{className:"results-count",children:[N.length," loaded"]})]}),E?e.jsx("div",{className:"no-results",children:"Framework not found."}):d.error&&e.jsx(me,{variant:"destructive",className:"mb-4",children:e.jsx(he,{children:"Failed to load papers. Please try again."})}),!E&&(d.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:6}).map((s,i)=>e.jsxs("div",{className:"paper-card",children:[e.jsx(_,{className:"h-[220px] w-[160px]"}),e.jsxs("div",{className:"paper-body",style:{flex:1,gap:12},children:[e.jsx(_,{className:"h-6 w-3/4"}),e.jsx(_,{className:"h-4 w-1/2"}),e.jsx(_,{className:"h-12 w-full"})]})]},i))}):N.length===0?e.jsxs("div",{className:"no-results",children:[e.jsx("p",{children:"No matching papers."}),n&&W()&&e.jsx(j,{to:`/chat?q=${encodeURIComponent(l.trim())}`,children:"Ask the assistant instead"})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:N.map((s,i)=>e.jsx(Z,{paper:s,rank:i+1,highlightQuery:n?l:void 0},s.id))}),e.jsx("div",{ref:K,style:{height:1}}),d.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"}),!d.hasNextPage&&!d.isFetchingNextPage&&n&&e.jsx("div",{className:"search-results-end",children:P!=null&&P.cap_reached?"End of the top 100 results":"End of results"})]}))]})]})]})};export{$e as default};
 
1
+ import{a as X,r as x,A as J,j as e,L as j,i as W}from"./index-BfGRWIiQ.js";import{I as U,T as Y,P as Z}from"./components-fo0inhXZ.js";import{c as ee}from"./catalog-BsVxStBB.js";import{t as se,d as ae}from"./transform-BVvRkYPJ.js";import{u as re,a as te}from"./usePapers-SIkOY1oo.js";import{u as ne}from"./useDebounce-BGkjLfol.js";import{r as ie,u as oe,a as ce,w as le,P as de}from"./paperDateRange-BwpPQ99I.js";import{S as _}from"./skeleton-7gHbNXZz.js";import{A as me,a as he}from"./alert-D4lZhgu4.js";import{u as pe}from"./useQuery-uhyHf514.js";import"./LatexTitle-DPJPslOM.js";import"./katex.min-BSBacQyE.js";import"./papers-PnGxH-RF.js";import"./safeExternalHref-CkBrsh84.js";import"./useInfiniteQuery-CYJcc79v.js";import"./popover-xj7LLGhl.js";const v=360;function ue(a,o){const m=a.toLocaleLowerCase();return o.trim().split(/\s+/).filter(Boolean).reduce((c,t)=>{const l=m.indexOf(t.toLocaleLowerCase());return l>=0&&(c<0||l<c)?l:c},-1)}function z(a,o,m){if((a.slice(0,o).match(/\$/g)||[]).length%2===0)return o;if(m==="start")return a.lastIndexOf("$",o)+1;const t=a.indexOf("$",o);return t>=0?t+1:o}function fe(a,o){if(a.length<=v)return a;const m=ue(a,o);if(m<0||m<v*.6)return a;let c=Math.max(0,m-Math.floor(v*.35)),t=Math.min(a.length,c+v);return c=z(a,c,"start"),t=z(a,t,"end"),`${c>0?"…":""}${a.slice(c,t).trim()}${t<a.length?"…":""}`}const xe=[["trending","trending"],["new","newest"],["cited","most cited"]],ge=[["relevance","relevance"],["new","newest"],["cited","most cited"]],je=a=>new Intl.NumberFormat("en",{notation:a>=1e3?"compact":"standard",maximumFractionDigits:1}).format(a),$e=()=>{var I,$,T,O,B,H,M,q,G;const[a,o]=X(),m=a.get("framework")||void 0,c=a.get("repository")||void 0,t=!!(m||c),l=a.get("search")||"",[F,C]=x.useState(l),p=ne(F,300),n=!t&&l.trim().length>0;x.useEffect(()=>C(l),[l]),x.useEffect(()=>{if(p===l)return;const s=new URLSearchParams(a);p?s.set("search",p):s.delete("search"),o(s,{replace:!0})},[p]),x.useEffect(()=>{const s=a.get("order_by"),i=new URLSearchParams(a);n&&!["relevance","date_published","citation_count"].includes(s||"")?(i.set("order_by","relevance"),o(i,{replace:!0})):!n&&s==="relevance"&&(i.delete("order_by"),o(i,{replace:!0}))},[n,a,o]);const L=a.get("order_by"),g=L==="citation_count"?"cited":L==="date_published"?"new":n?"relevance":"trending",u=ie(a),w=a.get("has_hf_artifacts")==="true",k=!t&&a.get("has_code")==="true",y=(s,i)=>{const h=new URLSearchParams(a);i?h.set(s,i):h.delete(s),o(h)},Q=s=>{y("order_by",s==="cited"?"citation_count":s==="new"?"date_published":s)},b=re({page_size:20,order_by:g==="trending"?"trending":g==="cited"?"citation_count":"date_published",order_dir:"desc",search:t&&p||void 0,start_date:u.startDate,end_date:u.endDate,include_resources:!0,conference:a.get("conference")||void 0,latest_only:a.get("latest_only")!=="false",has_code:k,has_hf_artifacts:w,framework:m,repository:c,enabled:!n}),R=te({q:p.trim(),order_by:g==="cited"?"citation_count":g==="new"?"date_published":"relevance",start_date:u.startDate,end_date:u.endDate,has_code:k,has_hf_artifacts:w,enabled:n}),d=n?R:b,A=pe({queryKey:["top-tasks-sidebar"],queryFn:()=>ee.topTasks(8),enabled:!t&&!n,staleTime:10*60*1e3}),N=x.useMemo(()=>{var i;return(((i=d.data)==null?void 0:i.pages.flatMap(h=>h.results))||[]).map(h=>{const S=se(h);return n?{...S,abstract:fe(S.abstract,l)}:S})},[d.data,n,l]),{targetRef:K,isIntersecting:D}=oe({rootMargin:"200px"});x.useEffect(()=>{D&&d.hasNextPage&&!d.isFetchingNextPage&&d.fetchNextPage()},[D,d.hasNextPage,d.isFetchingNextPage]);const f=((T=($=(I=b.data)==null?void 0:I.pages)==null?void 0:$[0])==null?void 0:T.count)??0,r=(H=(B=(O=b.data)==null?void 0:O.pages)==null?void 0:B[0])==null?void 0:H.scope,P=(q=(M=R.data)==null?void 0:M.pages)==null?void 0:q.at(-1),E=m&&d.error instanceof J&&d.error.status===404,V=(r==null?void 0:r.kind)==="framework"?r.framework_name:r==null?void 0:r.repository;return e.jsxs("div",{className:"page",children:[(r==null?void 0:r.kind)==="framework"&&e.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[e.jsx(j,{to:"/",children:"Papers"}),e.jsx("span",{className:"sep",children:"/"}),e.jsx(j,{to:"/frameworks",children:"Frameworks"}),e.jsx("span",{className:"sep",children:"/"}),e.jsx("span",{style:{color:"var(--ink)"},children:r.framework_name})]}),e.jsxs("div",{className:"feed-header",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"feed-title",children:t?e.jsxs(e.Fragment,{children:["Papers implemented by ",e.jsx("em",{children:V||m||c})]}):n?e.jsxs(e.Fragment,{children:["Search results for ",e.jsxs("em",{children:["“",l,"”"]})]}):e.jsxs(e.Fragment,{children:["All ",e.jsx("em",{children:"Papers"})]})}),e.jsx("div",{className:"feed-subtitle",children:t?(r==null?void 0:r.kind)==="framework"?f>0&&`${f.toLocaleString()} papers.`:r!=null&&r.repository?e.jsxs(e.Fragment,{children:["GitHub repository ",e.jsx("strong",{children:r.repository}),". ",f>0&&`${f.toLocaleString()} papers.`]}):"Repository-scoped paper feed.":n?`${N.length} loaded from the most relevant results.`:e.jsxs(e.Fragment,{children:["Search the full corpus. ",f>0&&`${f.toLocaleString()} papers indexed.`]})}),t&&r&&e.jsxs("div",{className:"paper-feed-scope-links",children:[e.jsxs("div",{className:"paper-feed-primary-links",children:[r.github_url&&e.jsxs("a",{href:r.github_url,target:"_blank",rel:"noopener noreferrer",className:r.kind==="framework"?"task-framework-link":"framework-link",children:[e.jsx(U,{name:"github",size:13}),r.kind==="framework"?e.jsxs(e.Fragment,{children:[e.jsx("span",{children:r.repository||"GitHub"}),r.num_stars!=null&&e.jsxs("span",{className:"task-framework-link-stars",children:["★ ",je(r.num_stars)]})]}):"GitHub"]}),r.kind==="framework"&&r.introducing_paper_arxiv_id&&e.jsx(j,{to:`/paper/${r.introducing_paper_arxiv_id}`,className:"framework-link",children:"Introducing paper"})]}),r.kind==="framework"&&r.recommended_tasks&&r.recommended_tasks.length>0&&e.jsx("div",{className:"paper-feed-task-tags",children:r.recommended_tasks.map(s=>s.slug?e.jsx(Y,{slug:s.slug,label:s.name},s.id):null)})]})]}),e.jsx(ce,{startDate:u.startDate,endDate:u.endDate,onChange:s=>o(le(a,s))})]}),e.jsx("div",{className:"papers-search-row",children:e.jsxs("div",{className:"papers-search-input-wrap",children:[e.jsx(U,{name:"search",size:14}),e.jsx("input",{className:"papers-search-input",placeholder:"Search title or abstract…",value:F,onChange:s=>C(s.target.value)})]})}),e.jsxs("div",{className:t||n?"papers-feed-layout-scoped":"layout-with-sidebar",children:[!t&&!n&&e.jsx("aside",{className:"sidebar",children:e.jsxs("div",{className:"sidebar-section",children:[e.jsx("div",{className:"sidebar-label",children:"Top Domains"}),A.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((s,i)=>e.jsx(_,{className:"h-5 w-full"},i))}),(G=A.data)==null?void 0:G.map(s=>e.jsxs(j,{to:`/tasks/${s.slug}`,className:"sidebar-link",children:[ae(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.jsxs("div",{className:"paper-feed-toolbar-controls",children:[e.jsx("div",{className:"sort-options",children:(n?ge:xe).map(([s,i])=>e.jsx("button",{className:`sort-btn ${g===s?"active":""}`,onClick:()=>Q(s),children:i},s))}),e.jsx(de,{hasCode:k,hasHfArtifacts:w,onHasCodeChange:s=>y("has_code",s?"true":void 0),onHasHfArtifactsChange:s=>y("has_hf_artifacts",s?"true":void 0),showHasCode:!t})]}),e.jsxs("div",{className:"results-count",children:[N.length," loaded"]})]}),E?e.jsx("div",{className:"no-results",children:"Framework not found."}):d.error&&e.jsx(me,{variant:"destructive",className:"mb-4",children:e.jsx(he,{children:"Failed to load papers. Please try again."})}),!E&&(d.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:6}).map((s,i)=>e.jsxs("div",{className:"paper-card",children:[e.jsx(_,{className:"h-[220px] w-[160px]"}),e.jsxs("div",{className:"paper-body",style:{flex:1,gap:12},children:[e.jsx(_,{className:"h-6 w-3/4"}),e.jsx(_,{className:"h-4 w-1/2"}),e.jsx(_,{className:"h-12 w-full"})]})]},i))}):N.length===0?e.jsxs("div",{className:"no-results",children:[e.jsx("p",{children:"No matching papers."}),n&&W()&&e.jsx(j,{to:`/chat?q=${encodeURIComponent(l.trim())}`,children:"Ask the assistant instead"})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:N.map((s,i)=>e.jsx(Z,{paper:s,rank:i+1,highlightQuery:n?l:void 0},s.id))}),e.jsx("div",{ref:K,style:{height:1}}),d.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"}),!d.hasNextPage&&!d.isFetchingNextPage&&n&&e.jsx("div",{className:"search-results-end",children:P!=null&&P.cap_reached?"End of the top 100 results":"End of results"})]}))]})]})]})};export{$e as default};
assets/{PrivacyView-ClhArF94.js → PrivacyView-SeXnet82.js} RENAMED
@@ -1 +1 @@
1
- import{z as s,j as e}from"./index-BJHhPv_M.js";import{f as i,D as r}from"./latexPlainText-DI8YEXVe.js";const n=()=>(s.useEffect(()=>(document.title=i("Privacy Policy"),()=>{document.title=r}),[]),e.jsxs("article",{className:"page legal-page",children:[e.jsxs("header",{className:"legal-header",children:[e.jsx("p",{className:"legal-kicker",children:"Legal"}),e.jsx("h1",{children:"Privacy Policy"}),e.jsx("p",{className:"legal-effective-date",children:"Effective August 11, 2026"})]}),e.jsx("p",{children:"This Privacy Policy explains how Hugging Face, Inc. (“Hugging Face,” “we,” or “us”) collects, uses, and shares information when you use Papers With Code, including its website, research assistant, APIs, and related services (the “Service”)."}),e.jsxs("section",{children:[e.jsx("h2",{children:"1. Information we collect"}),e.jsx("h3",{children:"Information you provide"}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Account information."})," If you sign in with Hugging Face, we receive account identifiers and profile details needed to authenticate you, such as your user ID, username, and avatar. If you request contributor access, we also receive and retain the verified email address associated with your Hugging Face account so we can review and communicate about your request."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Contributions and preferences."})," We collect information you submit or save, such as paper submissions and edits, bookmarks, display preferences, feedback, and communications with us. Material you submit to a public research page may be publicly visible."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Research assistant content."})," We collect your questions, conversation history, generated answers, citations, tool calls and results, and feedback about answers. Chats are private to your account unless you choose to create a share link; anyone with that link may be able to view the shared chat."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Provider and billing information."})," If you enable a model provider, we process the authorization or API credentials needed to make requests on your behalf. Hugging Face or another provider processes its own billing information under its terms. Papers With Code does not collect your payment-card details."]})]}),e.jsx("h3",{children:"Information collected automatically"}),e.jsx("p",{children:"We collect technical and usage information such as IP address, browser and device type, operating system, pages or features used, dates and times, referring pages, request identifiers, cookies, logs, and diagnostic data. For research-assistant requests, this may include the selected model, token and cost details, latency, errors, and other operational metadata."}),e.jsx("h3",{children:"Research assistant tracing"}),e.jsxs("p",{children:["To evaluate, debug, secure, and improve the research assistant, we use Langfuse to record traces. A trace may contain the complete text of your question and the assistant's answer, as well as tool inputs, tool outputs, retrieved research material, model details, usage data, and related operational metadata.",e.jsx("strong",{children:" This trace content is not redacted before it is sent to Langfuse."})]}),e.jsx("p",{children:"Papers With Code is designed for questions about research literature. Do not put passwords, API keys, confidential information, health or financial data, or other sensitive personal information in research-assistant prompts."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"2. How we use information"}),e.jsx("p",{children:"We use information to:"}),e.jsxs("ul",{children:[e.jsx("li",{children:"provide, personalize, maintain, and operate the Service;"}),e.jsx("li",{children:"authenticate users and keep accounts and the Service secure;"}),e.jsx("li",{children:"run research-assistant requests and preserve conversation history;"}),e.jsx("li",{children:"measure performance, troubleshoot failures, and improve quality;"}),e.jsx("li",{children:"review contributions, prevent abuse, and enforce applicable terms;"}),e.jsx("li",{children:"communicate with you and respond to requests; and"}),e.jsx("li",{children:"comply with law and protect users, Hugging Face, and the public."})]})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"3. How we share information"}),e.jsx("p",{children:"We may share information in these circumstances:"}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Service providers."})," Vendors process information for hosting, authentication, analytics, observability, security, and support. These include Hugging Face services, Langfuse for research-assistant tracing, Plausible for website analytics, and infrastructure providers."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Model providers."})," Research-assistant content is sent to the model provider you use, such as Hugging Face Inference Providers or OpenRouter, so it can generate a response. That provider's privacy terms also apply to its processing."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Public and shared content."})," Contributions intended for public pages are public. A chat is disclosed through the Service when you create and distribute a share link."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Legal, safety, and corporate events."})," We may disclose information when reasonably necessary to comply with law, protect rights and safety, investigate abuse, or complete a merger, acquisition, financing, or transfer of assets."]})]}),e.jsx("p",{children:"We do not sell your personal information."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"4. Cookies and analytics"}),e.jsx("p",{children:"We use cookies and similar storage when needed for sign-in, security, preferences, and operation of the Service. We also use Plausible to understand aggregate website usage. You can control cookies through your browser, but disabling necessary cookies may prevent account features from working."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"5. Legal bases"}),e.jsx("p",{children:"Where applicable law requires a legal basis, we process information as needed to perform our agreement with you, with your consent, to comply with legal obligations, and for legitimate interests such as operating, securing, and improving the Service. You may withdraw consent where consent is the basis for processing, without affecting earlier processing."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"6. Retention and deletion"}),e.jsx("p",{children:"Private chats are retained until you delete them, subject to limits of 100 active chats and 100 MB of chat data per user. Archiving hides a chat and frees active-chat quota but does not delete it. You may deliberately share an unlisted snapshot; deleting its private chat removes the durable transcript, workspace reference, and share link after deletion is verified. No dedicated private-chat export format is currently offered."}),e.jsx("p",{children:"We keep information for as long as reasonably needed for the purposes described here, including providing the Service, maintaining security and audit records, resolving disputes, and meeting legal obligations. Retention periods vary by data type and service provider. You can delete individual chats in the Service. Deletion may not immediately remove information from backups, security logs, or third-party systems where limited retention is required."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"7. Security and international transfers"}),e.jsx("p",{children:"We use reasonable administrative, technical, and organizational safeguards, but no internet service can guarantee absolute security. We and our service providers may process information in the United States and other countries, which may have different data-protection laws from your country. Where required, we use appropriate safeguards for international transfers."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"8. Your privacy rights"}),e.jsx("p",{children:"Depending on where you live, you may have rights to access, correct, delete, or receive a copy of your personal information; object to or restrict processing; withdraw consent; or appeal a decision about a request. You may also have the right to complain to a data-protection authority. We may need to verify your identity before fulfilling a request."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"9. Children"}),e.jsx("p",{children:"The Service is not directed to children under 13, and we do not knowingly collect personal information from children under 13. If you believe a child has provided personal information, please contact us."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"10. Changes to this policy"}),e.jsx("p",{children:"We may update this policy as the Service changes. We will post the revised policy here and update its effective date. If a change is material, we will provide additional notice when appropriate."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"11. Contact us"}),e.jsxs("p",{children:["For questions or privacy requests, contact"," ",e.jsx("a",{href:"mailto:privacy@huggingface.co",children:"privacy@huggingface.co"}),". Please do not include passwords, API keys, or other sensitive credentials in your message."]})]})]}));export{n as default};
 
1
+ import{z as s,j as e}from"./index-BfGRWIiQ.js";import{f as i,D as r}from"./latexPlainText-DI8YEXVe.js";const n=()=>(s.useEffect(()=>(document.title=i("Privacy Policy"),()=>{document.title=r}),[]),e.jsxs("article",{className:"page legal-page",children:[e.jsxs("header",{className:"legal-header",children:[e.jsx("p",{className:"legal-kicker",children:"Legal"}),e.jsx("h1",{children:"Privacy Policy"}),e.jsx("p",{className:"legal-effective-date",children:"Effective August 11, 2026"})]}),e.jsx("p",{children:"This Privacy Policy explains how Hugging Face, Inc. (“Hugging Face,” “we,” or “us”) collects, uses, and shares information when you use Papers With Code, including its website, research assistant, APIs, and related services (the “Service”)."}),e.jsxs("section",{children:[e.jsx("h2",{children:"1. Information we collect"}),e.jsx("h3",{children:"Information you provide"}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Account information."})," If you sign in with Hugging Face, we receive account identifiers and profile details needed to authenticate you, such as your user ID, username, and avatar. If you request contributor access, we also receive and retain the verified email address associated with your Hugging Face account so we can review and communicate about your request."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Contributions and preferences."})," We collect information you submit or save, such as paper submissions and edits, bookmarks, display preferences, feedback, and communications with us. Material you submit to a public research page may be publicly visible."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Research assistant content."})," We collect your questions, conversation history, generated answers, citations, tool calls and results, and feedback about answers. Chats are private to your account unless you choose to create a share link; anyone with that link may be able to view the shared chat."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Provider and billing information."})," If you enable a model provider, we process the authorization or API credentials needed to make requests on your behalf. Hugging Face or another provider processes its own billing information under its terms. Papers With Code does not collect your payment-card details."]})]}),e.jsx("h3",{children:"Information collected automatically"}),e.jsx("p",{children:"We collect technical and usage information such as IP address, browser and device type, operating system, pages or features used, dates and times, referring pages, request identifiers, cookies, logs, and diagnostic data. For research-assistant requests, this may include the selected model, token and cost details, latency, errors, and other operational metadata."}),e.jsx("h3",{children:"Research assistant tracing"}),e.jsxs("p",{children:["To evaluate, debug, secure, and improve the research assistant, we use Langfuse to record traces. A trace may contain the complete text of your question and the assistant's answer, as well as tool inputs, tool outputs, retrieved research material, model details, usage data, and related operational metadata.",e.jsx("strong",{children:" This trace content is not redacted before it is sent to Langfuse."})]}),e.jsx("p",{children:"Papers With Code is designed for questions about research literature. Do not put passwords, API keys, confidential information, health or financial data, or other sensitive personal information in research-assistant prompts."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"2. How we use information"}),e.jsx("p",{children:"We use information to:"}),e.jsxs("ul",{children:[e.jsx("li",{children:"provide, personalize, maintain, and operate the Service;"}),e.jsx("li",{children:"authenticate users and keep accounts and the Service secure;"}),e.jsx("li",{children:"run research-assistant requests and preserve conversation history;"}),e.jsx("li",{children:"measure performance, troubleshoot failures, and improve quality;"}),e.jsx("li",{children:"review contributions, prevent abuse, and enforce applicable terms;"}),e.jsx("li",{children:"communicate with you and respond to requests; and"}),e.jsx("li",{children:"comply with law and protect users, Hugging Face, and the public."})]})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"3. How we share information"}),e.jsx("p",{children:"We may share information in these circumstances:"}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Service providers."})," Vendors process information for hosting, authentication, analytics, observability, security, and support. These include Hugging Face services, Langfuse for research-assistant tracing, Plausible for website analytics, and infrastructure providers."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Model providers."})," Research-assistant content is sent to the model provider you use, such as Hugging Face Inference Providers or OpenRouter, so it can generate a response. That provider's privacy terms also apply to its processing."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Public and shared content."})," Contributions intended for public pages are public. A chat is disclosed through the Service when you create and distribute a share link."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Legal, safety, and corporate events."})," We may disclose information when reasonably necessary to comply with law, protect rights and safety, investigate abuse, or complete a merger, acquisition, financing, or transfer of assets."]})]}),e.jsx("p",{children:"We do not sell your personal information."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"4. Cookies and analytics"}),e.jsx("p",{children:"We use cookies and similar storage when needed for sign-in, security, preferences, and operation of the Service. We also use Plausible to understand aggregate website usage. You can control cookies through your browser, but disabling necessary cookies may prevent account features from working."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"5. Legal bases"}),e.jsx("p",{children:"Where applicable law requires a legal basis, we process information as needed to perform our agreement with you, with your consent, to comply with legal obligations, and for legitimate interests such as operating, securing, and improving the Service. You may withdraw consent where consent is the basis for processing, without affecting earlier processing."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"6. Retention and deletion"}),e.jsx("p",{children:"Private chats are retained until you delete them, subject to limits of 100 active chats and 100 MB of chat data per user. Archiving hides a chat and frees active-chat quota but does not delete it. You may deliberately share an unlisted snapshot; deleting its private chat removes the durable transcript, workspace reference, and share link after deletion is verified. No dedicated private-chat export format is currently offered."}),e.jsx("p",{children:"We keep information for as long as reasonably needed for the purposes described here, including providing the Service, maintaining security and audit records, resolving disputes, and meeting legal obligations. Retention periods vary by data type and service provider. You can delete individual chats in the Service. Deletion may not immediately remove information from backups, security logs, or third-party systems where limited retention is required."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"7. Security and international transfers"}),e.jsx("p",{children:"We use reasonable administrative, technical, and organizational safeguards, but no internet service can guarantee absolute security. We and our service providers may process information in the United States and other countries, which may have different data-protection laws from your country. Where required, we use appropriate safeguards for international transfers."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"8. Your privacy rights"}),e.jsx("p",{children:"Depending on where you live, you may have rights to access, correct, delete, or receive a copy of your personal information; object to or restrict processing; withdraw consent; or appeal a decision about a request. You may also have the right to complain to a data-protection authority. We may need to verify your identity before fulfilling a request."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"9. Children"}),e.jsx("p",{children:"The Service is not directed to children under 13, and we do not knowingly collect personal information from children under 13. If you believe a child has provided personal information, please contact us."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"10. Changes to this policy"}),e.jsx("p",{children:"We may update this policy as the Service changes. We will post the revised policy here and update its effective date. If a change is material, we will provide additional notice when appropriate."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"11. Contact us"}),e.jsxs("p",{children:["For questions or privacy requests, contact"," ",e.jsx("a",{href:"mailto:privacy@huggingface.co",children:"privacy@huggingface.co"}),". Please do not include passwords, API keys, or other sensitive credentials in your message."]})]})]}));export{n as default};
assets/{RateLimitsView-C_Yb_rs_.js → RateLimitsView-wCJiZ2hk.js} RENAMED
@@ -1 +1 @@
1
- import{j as e,B as t}from"./index-BJHhPv_M.js";import{u as s}from"./useQuery-B9A-sza5.js";const n=()=>{const i=s({queryKey:["submission-rate-limit-policy"],queryFn:()=>t.getRateLimitPolicy()}).data;return e.jsxs("div",{className:"page",style:{maxWidth:760},children:[e.jsx("h1",{children:"Submission and rate-limit policy"}),i?e.jsxs(e.Fragment,{children:[e.jsxs("p",{children:["Each account may have up to ",i.active_pending," active submissions."]}),e.jsxs("p",{children:["New submissions are limited to ",i.subject_per_hour," per account and ",i.ip_per_hour," per source network in a rolling hour."]})]}):e.jsx("p",{children:"Loading current limits…"}),e.jsx("p",{children:"Duplicate, no-op, and idempotently replayed requests do not consume creation quota."}),e.jsx("p",{children:"Rate-limited responses use HTTP 429 with Retry-After, RateLimit, and RateLimit-Policy headers."}),e.jsx("p",{children:"Good-faith contributors who are blocked should contact the Papers with Code maintainers with their Hugging Face username."})]})};export{n as default};
 
1
+ import{j as e,B as t}from"./index-BfGRWIiQ.js";import{u as s}from"./useQuery-uhyHf514.js";const n=()=>{const i=s({queryKey:["submission-rate-limit-policy"],queryFn:()=>t.getRateLimitPolicy()}).data;return e.jsxs("div",{className:"page",style:{maxWidth:760},children:[e.jsx("h1",{children:"Submission and rate-limit policy"}),i?e.jsxs(e.Fragment,{children:[e.jsxs("p",{children:["Each account may have up to ",i.active_pending," active submissions."]}),e.jsxs("p",{children:["New submissions are limited to ",i.subject_per_hour," per account and ",i.ip_per_hour," per source network in a rolling hour."]})]}):e.jsx("p",{children:"Loading current limits…"}),e.jsx("p",{children:"Duplicate, no-op, and idempotently replayed requests do not consume creation quota."}),e.jsx("p",{children:"Rate-limited responses use HTTP 429 with Retry-After, RateLimit, and RateLimit-Policy headers."}),e.jsx("p",{children:"Good-faith contributors who are blocked should contact the Papers with Code maintainers with their Hugging Face username."})]})};export{n as default};
assets/{SavedPapersView-COJIJ1Li.js → SavedPapersView-IIw_pCIA.js} RENAMED
@@ -1 +1 @@
1
- import{y as h,A as g,j as e,a1 as v,L as x,B as j}from"./index-BJHhPv_M.js";import{u as N}from"./useQuery-B9A-sza5.js";import{T as b,P as f}from"./components-wRHDLoMO.js";import{S as r}from"./skeleton-utCOClux.js";import{A as k,a as y}from"./alert-BiDOKM0e.js";import{t as w}from"./transform-DDP8kg8V.js";import{s as A}from"./savedPapersAuth-QFHV9d-7.js";import"./LatexTitle-Cb0dDCMw.js";import"./katex.min-BSBacQyE.js";import"./papers-CWyBrS8M.js";import"./safeExternalHref-CkBrsh84.js";const z=()=>{var d,o;const{user:t,isLoading:u}=h(),a=N({queryKey:["my-bookmarks"],queryFn:()=>j.getBookmarks(),enabled:!!t,staleTime:30*1e3,refetchOnWindowFocus:!1}),n=a.error instanceof g&&a.error.code==="saved_papers_bucket_authorization_required",m=!!a.data&&!a.data.bucket_connected,c=()=>{window.location.assign(A())};return u?e.jsxs("div",{className:"page",children:[e.jsx(r,{className:"h-10 w-1/3 mb-4"}),e.jsx(r,{className:"h-6 w-1/2 mb-8"})]}):t?e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["Saved ",e.jsx("em",{children:"Papers"})]}),e.jsxs("div",{className:"feed-subtitle",children:[(d=a.data)!=null&&d.count?`${a.data.count.toLocaleString()} saved · grouped by domain`:"Your bookmarked papers, grouped by domain.",(o=a.data)!=null&&o.bucket_connected?e.jsxs(e.Fragment,{children:[" · ",e.jsx("a",{href:`https://huggingface.co/buckets/${t.username}/pwc-saved-papers`,target:"_blank",rel:"noopener noreferrer",children:"Open your Hugging Face Bucket"})]}):null]})]})}),n?e.jsxs("div",{className:"saved-bucket-migration",children:[e.jsx("p",{children:"Your saved papers are still safe in Papers With Code. Approve Bucket access to copy them into a private Hugging Face Bucket that belongs to you."}),e.jsx("button",{type:"button",className:"hf-signin-btn",onClick:c,children:"Approve and migrate saved papers"})]}):a.error?e.jsx(k,{variant:"destructive",className:"mb-4",children:e.jsx(y,{children:"Failed to load your saved papers. Please try again."})}):null,m?e.jsxs("div",{className:"saved-bucket-migration",children:[e.jsxs("p",{children:[a.data.count?`Your ${a.data.count.toLocaleString()} saved ${a.data.count===1?"paper is":"papers are"} still available below. `:"When you save your first paper, ","Approve Bucket access to copy saved papers into a private Hugging Face Bucket that belongs to you. The existing data is kept until the copy is verified."]}),e.jsx("button",{type:"button",className:"hf-signin-btn",onClick:c,children:a.data.count?"Approve and migrate saved papers":"Use a Hugging Face Bucket"})]}):null,n||a.error?null:a.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((i,s)=>e.jsxs("div",{className:"paper-card",children:[e.jsx(r,{className:"h-[220px] w-[160px]"}),e.jsxs("div",{className:"paper-body",style:{flex:1,gap:12},children:[e.jsx(r,{className:"h-6 w-3/4"}),e.jsx(r,{className:"h-4 w-1/2"}),e.jsx(r,{className:"h-12 w-full"})]})]},s))}):!a.data||a.data.count===0?e.jsxs("div",{className:"no-results",children:["No saved papers yet."," ",e.jsx(x,{to:"/papers",className:"sidebar-link",style:{display:"inline"},children:"Browse papers →"})]}):a.data.areas.map(i=>e.jsxs("section",{className:"saved-area-section",children:[e.jsx("h2",{className:"saved-area-heading",children:i.name}),i.tasks.map(s=>{const l=s.papers.length;return e.jsxs("div",{className:"saved-task-block",children:[e.jsxs("div",{className:"saved-task-row",children:[s.slug?e.jsx(b,{slug:s.slug,label:s.name}):e.jsx("span",{className:"tag-chip",style:{background:"var(--surface)"},children:s.name}),e.jsxs("span",{className:"saved-task-count",children:[l," ",l===1?"paper":"papers"]})]}),e.jsx("div",{className:"paper-list",children:s.papers.map(p=>e.jsx(f,{paper:w(p),rank:1},p.id))})]},`task-${i.id??"other"}-${s.id??"untagged"}`)})]},`area-${i.id??"other"}`))]}):e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["Saved ",e.jsx("em",{children:"Papers"})]}),e.jsx("div",{className:"feed-subtitle",children:"Sign in with Hugging Face to save papers and revisit them later."})]})}),e.jsx("div",{className:"saved-signin-panel",children:e.jsx(v,{returnTo:"/saved"})})]})};export{z as default};
 
1
+ import{y as h,A as g,j as e,a1 as v,L as x,B as j}from"./index-BfGRWIiQ.js";import{u as N}from"./useQuery-uhyHf514.js";import{T as b,P as f}from"./components-fo0inhXZ.js";import{S as r}from"./skeleton-7gHbNXZz.js";import{A as k,a as y}from"./alert-D4lZhgu4.js";import{t as w}from"./transform-BVvRkYPJ.js";import{s as A}from"./savedPapersAuth-BO0Yd9eL.js";import"./LatexTitle-DPJPslOM.js";import"./katex.min-BSBacQyE.js";import"./papers-PnGxH-RF.js";import"./safeExternalHref-CkBrsh84.js";const z=()=>{var d,o;const{user:t,isLoading:u}=h(),a=N({queryKey:["my-bookmarks"],queryFn:()=>j.getBookmarks(),enabled:!!t,staleTime:30*1e3,refetchOnWindowFocus:!1}),n=a.error instanceof g&&a.error.code==="saved_papers_bucket_authorization_required",m=!!a.data&&!a.data.bucket_connected,c=()=>{window.location.assign(A())};return u?e.jsxs("div",{className:"page",children:[e.jsx(r,{className:"h-10 w-1/3 mb-4"}),e.jsx(r,{className:"h-6 w-1/2 mb-8"})]}):t?e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["Saved ",e.jsx("em",{children:"Papers"})]}),e.jsxs("div",{className:"feed-subtitle",children:[(d=a.data)!=null&&d.count?`${a.data.count.toLocaleString()} saved · grouped by domain`:"Your bookmarked papers, grouped by domain.",(o=a.data)!=null&&o.bucket_connected?e.jsxs(e.Fragment,{children:[" · ",e.jsx("a",{href:`https://huggingface.co/buckets/${t.username}/pwc-saved-papers`,target:"_blank",rel:"noopener noreferrer",children:"Open your Hugging Face Bucket"})]}):null]})]})}),n?e.jsxs("div",{className:"saved-bucket-migration",children:[e.jsx("p",{children:"Your saved papers are still safe in Papers With Code. Approve Bucket access to copy them into a private Hugging Face Bucket that belongs to you."}),e.jsx("button",{type:"button",className:"hf-signin-btn",onClick:c,children:"Approve and migrate saved papers"})]}):a.error?e.jsx(k,{variant:"destructive",className:"mb-4",children:e.jsx(y,{children:"Failed to load your saved papers. Please try again."})}):null,m?e.jsxs("div",{className:"saved-bucket-migration",children:[e.jsxs("p",{children:[a.data.count?`Your ${a.data.count.toLocaleString()} saved ${a.data.count===1?"paper is":"papers are"} still available below. `:"When you save your first paper, ","Approve Bucket access to copy saved papers into a private Hugging Face Bucket that belongs to you. The existing data is kept until the copy is verified."]}),e.jsx("button",{type:"button",className:"hf-signin-btn",onClick:c,children:a.data.count?"Approve and migrate saved papers":"Use a Hugging Face Bucket"})]}):null,n||a.error?null:a.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((i,s)=>e.jsxs("div",{className:"paper-card",children:[e.jsx(r,{className:"h-[220px] w-[160px]"}),e.jsxs("div",{className:"paper-body",style:{flex:1,gap:12},children:[e.jsx(r,{className:"h-6 w-3/4"}),e.jsx(r,{className:"h-4 w-1/2"}),e.jsx(r,{className:"h-12 w-full"})]})]},s))}):!a.data||a.data.count===0?e.jsxs("div",{className:"no-results",children:["No saved papers yet."," ",e.jsx(x,{to:"/papers",className:"sidebar-link",style:{display:"inline"},children:"Browse papers →"})]}):a.data.areas.map(i=>e.jsxs("section",{className:"saved-area-section",children:[e.jsx("h2",{className:"saved-area-heading",children:i.name}),i.tasks.map(s=>{const l=s.papers.length;return e.jsxs("div",{className:"saved-task-block",children:[e.jsxs("div",{className:"saved-task-row",children:[s.slug?e.jsx(b,{slug:s.slug,label:s.name}):e.jsx("span",{className:"tag-chip",style:{background:"var(--surface)"},children:s.name}),e.jsxs("span",{className:"saved-task-count",children:[l," ",l===1?"paper":"papers"]})]}),e.jsx("div",{className:"paper-list",children:s.papers.map(p=>e.jsx(f,{paper:w(p),rank:1},p.id))})]},`task-${i.id??"other"}-${s.id??"untagged"}`)})]},`area-${i.id??"other"}`))]}):e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["Saved ",e.jsx("em",{children:"Papers"})]}),e.jsx("div",{className:"feed-subtitle",children:"Sign in with Hugging Face to save papers and revisit them later."})]})}),e.jsx("div",{className:"saved-signin-panel",children:e.jsx(v,{returnTo:"/saved"})})]})};export{z as default};
assets/{SearchOverlay-BHdLfr8q.js → SearchOverlay-B4h5u4qN.js} RENAMED
@@ -1 +1 @@
1
- import{r as q,u as Q,z as P,i as $,j as e}from"./index-BJHhPv_M.js";import{u as m}from"./useQuery-B9A-sza5.js";import{L as A}from"./LatexTitle-Cb0dDCMw.js";import{c as g}from"./catalog-DOuThn7M.js";import{p as K}from"./papers-CWyBrS8M.js";import{u as L}from"./useDebounce-CsEgrdpj.js";import{c as S,h as z,d as D}from"./transform-DDP8kg8V.js";import"./katex.min-BSBacQyE.js";const I=10,Z=({open:t,onClose:l})=>{var f,b,_,F;const x=q.useRef(null),E=Q(),[n,w]=P.useState(""),a=L(n,200),u=n.trim(),p=$();q.useEffect(()=>{var r;if(!t)return;(r=x.current)==null||r.focus();const s=R=>{R.key==="Escape"&&l()};return window.addEventListener("keydown",s),()=>window.removeEventListener("keydown",s)},[t,l]);const j=m({queryKey:["search-papers",a],queryFn:()=>K.search(a,1,I),enabled:t&&a.length>=2,staleTime:6e4}),y=m({queryKey:["search-tasks",a],queryFn:()=>g.listTasks({q:a,page_size:6}),enabled:t&&a.length>=2,staleTime:6e4}),k=m({queryKey:["search-methods",a],queryFn:()=>g.listMethods({q:a,page_size:6}),enabled:t&&a.length>=2,staleTime:6e4}),v=m({queryKey:["search-benchmarks",a],queryFn:()=>g.listDatasets({q:a,page_size:6}),enabled:t&&a.length>=2,staleTime:6e4});if(!t)return null;const i=((f=y.data)==null?void 0:f.results)||[],h=((b=k.data)==null?void 0:b.results)||[],o=((_=v.data)==null?void 0:_.results)||[],d=((F=j.data)==null?void 0:F.results)||[],C=j.isFetching||y.isFetching||k.isFetching||v.isFetching,T=i.length||d.length||h.length||o.length,c=s=>{l(),E(s)},N=()=>{const s=n.trim();s&&c(`/chat?q=${encodeURIComponent(s)}`)};return e.jsx("div",{className:"search-overlay",onClick:l,children:e.jsxs("div",{className:"search-modal",onClick:s=>s.stopPropagation(),children:[e.jsx("input",{ref:x,className:"search-modal-input",placeholder:"Search papers, tasks, methods, or benchmarks…",value:n,onChange:s=>w(s.target.value),onKeyDown:s=>{p&&s.key==="Enter"&&(s.preventDefault(),N())}}),e.jsxs("div",{className:"search-results",children:[p&&n.trim()&&e.jsxs("button",{type:"button",className:"search-ask-row",onClick:N,children:[e.jsx("span",{className:"search-ask-chip",children:"assistant"}),e.jsxs("span",{className:"search-ask-text",children:["Ask: “",n.trim(),"”"]}),e.jsx("kbd",{children:"↵"})]}),!a&&e.jsxs("div",{className:"search-empty",children:["Try “diffusion”, “object detection”, or an arXiv id.",p&&e.jsx("span",{className:"search-empty-sub",children:"Press Enter to ask the assistant"})]}),a&&!C&&!T&&e.jsxs("div",{className:"search-empty",children:['No matches for "',n,'"']}),i.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"search-section-label",children:["Tasks · ",i.length]}),i.map(s=>{const r=S(z(s.slug||""));return e.jsxs("div",{className:"search-result-tag",onClick:()=>c(`/tasks/${s.slug}`),children:[e.jsx("span",{className:"dot",style:{width:6,height:6,borderRadius:"50%",background:r.dot}}),e.jsx("span",{className:"name",children:D(s.name,s.slug)}),s.paper_count!=null&&e.jsxs("span",{className:"count",children:[s.paper_count," papers"]})]},s.id)})]}),h.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"search-section-label",children:["Methods · ",h.length]}),h.map(s=>e.jsxs("div",{className:"search-result-tag",onClick:()=>c(`/methods/${s.slug||s.id}`),children:[e.jsx("span",{style:{fontFamily:"var(--mono)",fontWeight:600},children:s.name}),s.paper_count!=null&&e.jsxs("span",{className:"count",children:[s.paper_count," papers"]})]},s.id))]}),o.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"search-section-label",children:["Benchmarks · ",o.length]}),o.map(s=>e.jsxs("div",{className:"search-result-tag",onClick:()=>c(`/benchmark/${s.slug||s.id}`),children:[e.jsx("span",{className:"name",children:s.name}),s.paper_count!=null&&s.paper_count>0&&e.jsxs("span",{className:"count",children:[s.paper_count," entries"]})]},s.id))]}),d.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"search-section-label",children:["Papers · ",d.length]}),d.map(s=>{var r;return e.jsxs("div",{className:"search-result",onClick:()=>c(`/paper/${s.arxiv_id||s.id}`),children:[e.jsx("div",{className:"search-result-title",children:e.jsx(A,{title:s.title})}),e.jsxs("div",{className:"search-result-meta",children:[e.jsx("span",{children:s.arxiv_id?`arXiv:${s.arxiv_id}`:"External resource"}),((r=s.authors)==null?void 0:r[0])&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"·"}),e.jsxs("span",{children:[s.authors[0],s.authors.length>1?" et al.":""]})]}),s.citation_count!=null&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"·"}),e.jsxs("span",{children:["↑ ",s.citation_count.toLocaleString()]})]})]})]},s.id)})]}),u.length>=2&&e.jsxs("button",{type:"button",className:"search-view-all-row",onClick:()=>c(`/papers?search=${encodeURIComponent(u)}`),children:["View all paper results for “",u,"”"]})]})]})})};export{Z as default};
 
1
+ import{r as q,u as Q,z as P,i as $,j as e}from"./index-BfGRWIiQ.js";import{u as m}from"./useQuery-uhyHf514.js";import{L as A}from"./LatexTitle-DPJPslOM.js";import{c as g}from"./catalog-BsVxStBB.js";import{p as K}from"./papers-PnGxH-RF.js";import{u as L}from"./useDebounce-BGkjLfol.js";import{c as S,h as z,d as D}from"./transform-BVvRkYPJ.js";import"./katex.min-BSBacQyE.js";const I=10,Z=({open:t,onClose:l})=>{var f,b,_,F;const x=q.useRef(null),E=Q(),[n,w]=P.useState(""),a=L(n,200),u=n.trim(),p=$();q.useEffect(()=>{var r;if(!t)return;(r=x.current)==null||r.focus();const s=R=>{R.key==="Escape"&&l()};return window.addEventListener("keydown",s),()=>window.removeEventListener("keydown",s)},[t,l]);const j=m({queryKey:["search-papers",a],queryFn:()=>K.search(a,1,I),enabled:t&&a.length>=2,staleTime:6e4}),y=m({queryKey:["search-tasks",a],queryFn:()=>g.listTasks({q:a,page_size:6}),enabled:t&&a.length>=2,staleTime:6e4}),k=m({queryKey:["search-methods",a],queryFn:()=>g.listMethods({q:a,page_size:6}),enabled:t&&a.length>=2,staleTime:6e4}),v=m({queryKey:["search-benchmarks",a],queryFn:()=>g.listDatasets({q:a,page_size:6}),enabled:t&&a.length>=2,staleTime:6e4});if(!t)return null;const i=((f=y.data)==null?void 0:f.results)||[],h=((b=k.data)==null?void 0:b.results)||[],o=((_=v.data)==null?void 0:_.results)||[],d=((F=j.data)==null?void 0:F.results)||[],C=j.isFetching||y.isFetching||k.isFetching||v.isFetching,T=i.length||d.length||h.length||o.length,c=s=>{l(),E(s)},N=()=>{const s=n.trim();s&&c(`/chat?q=${encodeURIComponent(s)}`)};return e.jsx("div",{className:"search-overlay",onClick:l,children:e.jsxs("div",{className:"search-modal",onClick:s=>s.stopPropagation(),children:[e.jsx("input",{ref:x,className:"search-modal-input",placeholder:"Search papers, tasks, methods, or benchmarks…",value:n,onChange:s=>w(s.target.value),onKeyDown:s=>{p&&s.key==="Enter"&&(s.preventDefault(),N())}}),e.jsxs("div",{className:"search-results",children:[p&&n.trim()&&e.jsxs("button",{type:"button",className:"search-ask-row",onClick:N,children:[e.jsx("span",{className:"search-ask-chip",children:"assistant"}),e.jsxs("span",{className:"search-ask-text",children:["Ask: “",n.trim(),"”"]}),e.jsx("kbd",{children:"↵"})]}),!a&&e.jsxs("div",{className:"search-empty",children:["Try “diffusion”, “object detection”, or an arXiv id.",p&&e.jsx("span",{className:"search-empty-sub",children:"Press Enter to ask the assistant"})]}),a&&!C&&!T&&e.jsxs("div",{className:"search-empty",children:['No matches for "',n,'"']}),i.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"search-section-label",children:["Tasks · ",i.length]}),i.map(s=>{const r=S(z(s.slug||""));return e.jsxs("div",{className:"search-result-tag",onClick:()=>c(`/tasks/${s.slug}`),children:[e.jsx("span",{className:"dot",style:{width:6,height:6,borderRadius:"50%",background:r.dot}}),e.jsx("span",{className:"name",children:D(s.name,s.slug)}),s.paper_count!=null&&e.jsxs("span",{className:"count",children:[s.paper_count," papers"]})]},s.id)})]}),h.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"search-section-label",children:["Methods · ",h.length]}),h.map(s=>e.jsxs("div",{className:"search-result-tag",onClick:()=>c(`/methods/${s.slug||s.id}`),children:[e.jsx("span",{style:{fontFamily:"var(--mono)",fontWeight:600},children:s.name}),s.paper_count!=null&&e.jsxs("span",{className:"count",children:[s.paper_count," papers"]})]},s.id))]}),o.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"search-section-label",children:["Benchmarks · ",o.length]}),o.map(s=>e.jsxs("div",{className:"search-result-tag",onClick:()=>c(`/benchmark/${s.slug||s.id}`),children:[e.jsx("span",{className:"name",children:s.name}),s.paper_count!=null&&s.paper_count>0&&e.jsxs("span",{className:"count",children:[s.paper_count," entries"]})]},s.id))]}),d.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"search-section-label",children:["Papers · ",d.length]}),d.map(s=>{var r;return e.jsxs("div",{className:"search-result",onClick:()=>c(`/paper/${s.arxiv_id||s.id}`),children:[e.jsx("div",{className:"search-result-title",children:e.jsx(A,{title:s.title})}),e.jsxs("div",{className:"search-result-meta",children:[e.jsx("span",{children:s.arxiv_id?`arXiv:${s.arxiv_id}`:"External resource"}),((r=s.authors)==null?void 0:r[0])&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"·"}),e.jsxs("span",{children:[s.authors[0],s.authors.length>1?" et al.":""]})]}),s.citation_count!=null&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"·"}),e.jsxs("span",{children:["↑ ",s.citation_count.toLocaleString()]})]})]})]},s.id)})]}),u.length>=2&&e.jsxs("button",{type:"button",className:"search-view-all-row",onClick:()=>c(`/papers?search=${encodeURIComponent(u)}`),children:["View all paper results for “",u,"”"]})]})]})})};export{Z as default};
assets/{SettingsView-CHsKxhRG.js → SettingsView-BCz54bXj.js} RENAMED
@@ -1,4 +1,4 @@
1
- import{d as _,y as ee,f as se,ah as ne,i as te,z as c,g as ae,j as e,a1 as v,A as Q}from"./index-BJHhPv_M.js";import{u as L}from"./useQuery-B9A-sza5.js";import{u as y}from"./useMutation-rrsjzB5Q.js";import{S as B}from"./switch-BlIsVzQQ.js";import{c as r}from"./chat-D9bQn_8F.js";import{f as ie,D as le}from"./latexPlainText-DI8YEXVe.js";import{a as oe,u as re,r as ce,O as C}from"./openrouter-BtnjdC9I.js";import{E as Y}from"./external-link-h2XFtnTN.js";import"./index-mZqTNISL.js";/**
2
  * @license lucide-react v0.462.0 - ISC
3
  *
4
  * This source code is licensed under the ISC license.
 
1
+ import{d as _,y as ee,f as se,ah as ne,i as te,z as c,g as ae,j as e,a1 as v,A as Q}from"./index-BfGRWIiQ.js";import{u as L}from"./useQuery-uhyHf514.js";import{u as y}from"./useMutation-Dw9DDJRs.js";import{S as B}from"./switch-Do_Ydvtn.js";import{c as r}from"./chat-dMs5c7qZ.js";import{f as ie,D as le}from"./latexPlainText-DI8YEXVe.js";import{a as oe,u as re,r as ce,O as C}from"./openrouter-eY8Zeuhv.js";import{E as Y}from"./external-link-C3NMRHh9.js";import"./index-DPh0SyoW.js";/**
2
  * @license lucide-react v0.462.0 - ISC
3
  *
4
  * This source code is licensed under the ISC license.
assets/{SharedChatView-lB4B70J6.js → SharedChatView-Dubmg_WO.js} RENAMED
@@ -1 +1 @@
1
- import{c as f,u as x,r as h,j as e,b as g}from"./index-BJHhPv_M.js";import{u as v}from"./useQuery-B9A-sza5.js";import{A as j,a as b,C as y,U as S,b as k}from"./ArtifactWorkspace-DKTpoNk6.js";import{C as m,d as w,p as N,q as C,g as q}from"./chatLaunch--jg98Oug.js";import"./katex.min-BSBacQyE.js";import"./hover-card-CBNxKixP.js";import"./github-B2SnkTVu.js";import"./github-BnuvDeYu.js";import"./PaperPreviewLink-DVTrFkw2.js";import"./index-RvWGcsIO.js";import"./papers-CWyBrS8M.js";import"./chat-D9bQn_8F.js";import"./file-text-D0p5b00d.js";import"./useMutation-rrsjzB5Q.js";import"./external-link-h2XFtnTN.js";import"./chevron-down-BVyqIjKu.js";const _=({detail:i})=>{const[d,l]=h.useState(()=>N(i)),p=h.useMemo(()=>{const t={};for(const c of d)for(const n of c.blocks??[])if(n.kind==="tool")for(const r of n.results??[])t[r.route_id]=r;return t},[d]),u=(t,c)=>{l(n=>n.map(r=>{var a;return r.id!==t?r:{...r,blocks:(a=r.blocks)==null?void 0:a.map((s,o)=>o===c&&(s.kind==="reasoning"||s.kind==="tool")?{...s,open:!s.open}:s)}}))};return e.jsx("div",{className:"shared-chat-transcript",children:d.map(t=>t.role==="user"?e.jsx(S,{id:t.id,text:t.text??"",paperMentions:t.paperMentions??[],paperSelection:t.paperSelection},t.id):e.jsx(k,{msg:t,papers:p,onToggleBlock:u},t.id))})},G=()=>{const{shareId:i=""}=f(),d=x(),l=g(),[p,u]=h.useState(60),t=v({queryKey:["shared-chat",i],queryFn:()=>q(i),retry:(r,a)=>!(a instanceof m&&a.status===404)&&r<1});h.useEffect(()=>{const r=document.title,a=document.head.querySelector('meta[name="robots"]'),s=a==null?void 0:a.content,o=a??document.createElement("meta");return o.name="robots",o.content="noindex,nofollow",a||document.head.appendChild(o),document.title="Shared conversation",()=>{document.title=r,a?a.content=s??"":o.remove()}},[]),h.useLayoutEffect(()=>{const r=document.querySelector(".app-header");if(!r)return;const a=()=>u(r.offsetHeight);a();const s=new ResizeObserver(a);return s.observe(r),()=>s.disconnect()},[]);const c=r=>{C(r,void 0,{autoSend:!1}),d("/chat")},n=t.error instanceof m&&t.error.status===404;return t.isLoading?e.jsxs("div",{className:"shared-chat-state",role:"status",children:[e.jsx(w,{})," Loading shared conversation…"]}):n?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."})]}):t.isError||!t.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 t.refetch(),children:"Try again"})]}):e.jsx(j,{workspaceKey:`share:${i}:${t.data.updated_at}`,autoOpenOnMount:!0,children:e.jsxs("div",{className:"shared-chat-page",style:{height:`calc(100dvh - ${p}px)`},children:[e.jsxs("div",{className:"shared-chat-heading",children:[e.jsx("h1",{children:"Shared conversation"}),l&&e.jsx("span",{className:"chat-staging-badge",children:"Staging"})]}),e.jsx(b,{variant:"shared",children:e.jsxs("div",{className:"shared-chat-content","data-testid":"shared-conversation-pane",children:[e.jsx(_,{detail:t.data},t.data.updated_at),t.data.model_label&&e.jsxs("div",{className:"shared-chat-attribution",children:[e.jsxs("span",{children:["Generated with ",t.data.model_label]}),t.data.model_provider==="huggingface"&&e.jsxs("span",{children:["Powered by ",e.jsx("span",{"aria-hidden":"true",children:"🤗"})," ",e.jsx("a",{href:"https://huggingface.co/docs/inference-providers/en/index",target:"_blank",rel:"noreferrer",children:"Inference Providers"})]}),t.data.model_provider==="openrouter"&&e.jsxs("span",{children:["Powered by ",e.jsx("a",{href:"https://openrouter.ai",target:"_blank",rel:"noreferrer",children:"OpenRouter"})]}),t.data.model_provider==="openai"&&e.jsx("span",{children:"Powered by OpenAI"})]}),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."}),l&&e.jsxs("div",{className:"shared-chat-access-note",role:"note",children:[e.jsx("strong",{children:"Limited staging preview."})," Starting a chat is available only to approved Hugging Face users."]}),e.jsx(y,{onSend:r=>c(r.text),placeholder:"Ask a new research question…"})]})]})})]})})};export{G as default};
 
1
+ import{c as f,u as x,r as h,j as e,b as g}from"./index-BfGRWIiQ.js";import{u as v}from"./useQuery-uhyHf514.js";import{A as j,a as b,C as y,U as S,b as k}from"./ArtifactWorkspace-Dc7yVRVJ.js";import{C as m,d as w,p as N,q as C,g as q}from"./chatLaunch-BxzD44NH.js";import"./katex.min-BSBacQyE.js";import"./hover-card-HVpXfIHl.js";import"./github-BbqV1Jxk.js";import"./github-BM40zlYO.js";import"./PaperPreviewLink-_SPYeWhn.js";import"./index-BqZK5Cw1.js";import"./papers-PnGxH-RF.js";import"./chat-dMs5c7qZ.js";import"./file-text-FxV6g_yZ.js";import"./useMutation-Dw9DDJRs.js";import"./external-link-C3NMRHh9.js";import"./chevron-down-BovmCLHU.js";const _=({detail:i})=>{const[d,l]=h.useState(()=>N(i)),p=h.useMemo(()=>{const t={};for(const c of d)for(const n of c.blocks??[])if(n.kind==="tool")for(const r of n.results??[])t[r.route_id]=r;return t},[d]),u=(t,c)=>{l(n=>n.map(r=>{var a;return r.id!==t?r:{...r,blocks:(a=r.blocks)==null?void 0:a.map((s,o)=>o===c&&(s.kind==="reasoning"||s.kind==="tool")?{...s,open:!s.open}:s)}}))};return e.jsx("div",{className:"shared-chat-transcript",children:d.map(t=>t.role==="user"?e.jsx(S,{id:t.id,text:t.text??"",paperMentions:t.paperMentions??[],paperSelection:t.paperSelection},t.id):e.jsx(k,{msg:t,papers:p,onToggleBlock:u},t.id))})},G=()=>{const{shareId:i=""}=f(),d=x(),l=g(),[p,u]=h.useState(60),t=v({queryKey:["shared-chat",i],queryFn:()=>q(i),retry:(r,a)=>!(a instanceof m&&a.status===404)&&r<1});h.useEffect(()=>{const r=document.title,a=document.head.querySelector('meta[name="robots"]'),s=a==null?void 0:a.content,o=a??document.createElement("meta");return o.name="robots",o.content="noindex,nofollow",a||document.head.appendChild(o),document.title="Shared conversation",()=>{document.title=r,a?a.content=s??"":o.remove()}},[]),h.useLayoutEffect(()=>{const r=document.querySelector(".app-header");if(!r)return;const a=()=>u(r.offsetHeight);a();const s=new ResizeObserver(a);return s.observe(r),()=>s.disconnect()},[]);const c=r=>{C(r,void 0,{autoSend:!1}),d("/chat")},n=t.error instanceof m&&t.error.status===404;return t.isLoading?e.jsxs("div",{className:"shared-chat-state",role:"status",children:[e.jsx(w,{})," Loading shared conversation…"]}):n?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."})]}):t.isError||!t.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 t.refetch(),children:"Try again"})]}):e.jsx(j,{workspaceKey:`share:${i}:${t.data.updated_at}`,autoOpenOnMount:!0,children:e.jsxs("div",{className:"shared-chat-page",style:{height:`calc(100dvh - ${p}px)`},children:[e.jsxs("div",{className:"shared-chat-heading",children:[e.jsx("h1",{children:"Shared conversation"}),l&&e.jsx("span",{className:"chat-staging-badge",children:"Staging"})]}),e.jsx(b,{variant:"shared",children:e.jsxs("div",{className:"shared-chat-content","data-testid":"shared-conversation-pane",children:[e.jsx(_,{detail:t.data},t.data.updated_at),t.data.model_label&&e.jsxs("div",{className:"shared-chat-attribution",children:[e.jsxs("span",{children:["Generated with ",t.data.model_label]}),t.data.model_provider==="huggingface"&&e.jsxs("span",{children:["Powered by ",e.jsx("span",{"aria-hidden":"true",children:"🤗"})," ",e.jsx("a",{href:"https://huggingface.co/docs/inference-providers/en/index",target:"_blank",rel:"noreferrer",children:"Inference Providers"})]}),t.data.model_provider==="openrouter"&&e.jsxs("span",{children:["Powered by ",e.jsx("a",{href:"https://openrouter.ai",target:"_blank",rel:"noreferrer",children:"OpenRouter"})]}),t.data.model_provider==="openai"&&e.jsx("span",{children:"Powered by OpenAI"})]}),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."}),l&&e.jsxs("div",{className:"shared-chat-access-note",role:"note",children:[e.jsx("strong",{children:"Limited staging preview."})," Starting a chat is available only to approved Hugging Face users."]}),e.jsx(y,{onSend:r=>c(r.text),placeholder:"Ask a new research question…"})]})]})})]})})};export{G as default};
assets/{SignInToEditDialog-vE3vqpo1.js → SignInToEditDialog-C1ykF6wM.js} RENAMED
@@ -1,4 +1,4 @@
1
- import{d as ne,r as a,j as e,$ as ve,q as be,a0 as fe,e as je,X as ye,C as Ne,a1 as we}from"./index-BJHhPv_M.js";import{B as L}from"./button-BL7Wfk99.js";import{I as d,T as Ie}from"./textarea-EPRANuVM.js";import{D as oe,a as le,b as ce,c as de,d as me,e as Se}from"./dialog-DINVvlE3.js";import{u as _e}from"./useMutation-rrsjzB5Q.js";import{s as v,p as b}from"./submissions-Dz2yQ0h0.js";import{L as De}from"./loader-circle-CaPI_8_v.js";/**
2
  * @license lucide-react v0.462.0 - ISC
3
  *
4
  * This source code is licensed under the ISC license.
 
1
+ import{d as ne,r as a,j as e,$ as ve,q as be,a0 as fe,e as je,X as ye,C as Ne,a1 as we}from"./index-BfGRWIiQ.js";import{B as L}from"./button-wuesmQpV.js";import{I as d,T as Ie}from"./textarea-BA4IPzRY.js";import{D as oe,a as le,b as ce,c as de,d as me,e as Se}from"./dialog-Ci3RQLed.js";import{u as _e}from"./useMutation-Dw9DDJRs.js";import{s as v,p as b}from"./submissions-DXV1AUkd.js";import{L as De}from"./loader-circle-DgGa62N_.js";/**
2
  * @license lucide-react v0.462.0 - ISC
3
  *
4
  * This source code is licensed under the ISC license.
assets/{StagingAccessRequestView-Bv_tfz92.js → StagingAccessRequestView-Dbbz0TFf.js} RENAMED
@@ -1 +1 @@
1
- import{y as m,z as a,j as e,a1 as g,aJ as p}from"./index-BJHhPv_M.js";import{C as j}from"./circle-check-0fZsmTpB.js";const f=()=>{const{user:s,isLoading:u}=m(),[l,d]=a.useState(!1),[r,t]=a.useState(!1),[c,i]=a.useState(null),o=async h=>{h.preventDefault(),t(!0),i(null);try{await p.requestStagingAccess(),d(!0)}catch(n){i(n instanceof Error?n.message:"Could not submit your request.")}finally{t(!1)}};return e.jsx("main",{className:"access-request-page",children:e.jsxs("section",{className:"access-request-card","aria-labelledby":"access-request-title",children:[e.jsxs("a",{className:"access-request-brand",href:"https://paperswithcode.co",children:[e.jsx("span",{className:"brand-mark","aria-hidden":"true"}),e.jsxs("span",{className:"brand-name",children:["Papers ",e.jsx("em",{children:"with"})," Code"]})]}),l?e.jsxs("div",{className:"access-request-success",role:"status",children:[e.jsx(j,{size:34,strokeWidth:1.6,"aria-hidden":"true"}),e.jsx("h1",{id:"access-request-title",children:"Request received"}),e.jsxs("p",{children:["Thanks, @",s==null?void 0:s.username,". We’ll review your contributor access request."]})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"access-request-heading",children:[e.jsx("p",{className:"access-request-eyebrow",children:"Staging preview"}),e.jsx("h1",{id:"access-request-title",children:"Request access"}),e.jsx("p",{children:"This preview is limited to project contributors. Send us your verified Hugging Face username and email address to request access."})]}),u?e.jsx("p",{className:"access-request-status",role:"status",children:"Checking your Hugging Face account…"}):s?e.jsxs("form",{className:"access-request-form",onSubmit:o,children:[e.jsx("label",{htmlFor:"hf-username",children:"Hugging Face username"}),e.jsxs("div",{className:"access-request-input-wrap",children:[e.jsx("span",{"aria-hidden":"true",children:"@"}),e.jsx("input",{id:"hf-username",name:"hf_username",value:s.username,readOnly:!0,autoComplete:"username"})]}),e.jsxs("p",{className:"access-request-verified",children:["Username and email verified through Hugging Face sign-in. See our"," ",e.jsx("a",{href:"https://paperswithcode.co/privacy",children:"Privacy Policy"}),"."]}),c&&e.jsx("p",{className:"access-request-error",role:"alert",children:c}),e.jsx("button",{className:"access-request-submit",type:"submit",disabled:r,children:r?"Sending…":"Request access"})]}):e.jsxs("div",{className:"access-request-signin",children:[e.jsx("p",{children:"Sign in first so we can verify the account you’re requesting access for."}),e.jsx(g,{returnTo:"/request-access",label:"Sign in with Hugging Face",collectEmail:!0})]})]})]})})};export{f as default};
 
1
+ import{y as m,z as a,j as e,a1 as g,aJ as p}from"./index-BfGRWIiQ.js";import{C as j}from"./circle-check-s2MhrD7m.js";const f=()=>{const{user:s,isLoading:u}=m(),[l,d]=a.useState(!1),[r,t]=a.useState(!1),[c,i]=a.useState(null),o=async h=>{h.preventDefault(),t(!0),i(null);try{await p.requestStagingAccess(),d(!0)}catch(n){i(n instanceof Error?n.message:"Could not submit your request.")}finally{t(!1)}};return e.jsx("main",{className:"access-request-page",children:e.jsxs("section",{className:"access-request-card","aria-labelledby":"access-request-title",children:[e.jsxs("a",{className:"access-request-brand",href:"https://paperswithcode.co",children:[e.jsx("span",{className:"brand-mark","aria-hidden":"true"}),e.jsxs("span",{className:"brand-name",children:["Papers ",e.jsx("em",{children:"with"})," Code"]})]}),l?e.jsxs("div",{className:"access-request-success",role:"status",children:[e.jsx(j,{size:34,strokeWidth:1.6,"aria-hidden":"true"}),e.jsx("h1",{id:"access-request-title",children:"Request received"}),e.jsxs("p",{children:["Thanks, @",s==null?void 0:s.username,". We’ll review your contributor access request."]})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"access-request-heading",children:[e.jsx("p",{className:"access-request-eyebrow",children:"Staging preview"}),e.jsx("h1",{id:"access-request-title",children:"Request access"}),e.jsx("p",{children:"This preview is limited to project contributors. Send us your verified Hugging Face username and email address to request access."})]}),u?e.jsx("p",{className:"access-request-status",role:"status",children:"Checking your Hugging Face account…"}):s?e.jsxs("form",{className:"access-request-form",onSubmit:o,children:[e.jsx("label",{htmlFor:"hf-username",children:"Hugging Face username"}),e.jsxs("div",{className:"access-request-input-wrap",children:[e.jsx("span",{"aria-hidden":"true",children:"@"}),e.jsx("input",{id:"hf-username",name:"hf_username",value:s.username,readOnly:!0,autoComplete:"username"})]}),e.jsxs("p",{className:"access-request-verified",children:["Username and email verified through Hugging Face sign-in. See our"," ",e.jsx("a",{href:"https://paperswithcode.co/privacy",children:"Privacy Policy"}),"."]}),c&&e.jsx("p",{className:"access-request-error",role:"alert",children:c}),e.jsx("button",{className:"access-request-submit",type:"submit",disabled:r,children:r?"Sending…":"Request access"})]}):e.jsxs("div",{className:"access-request-signin",children:[e.jsx("p",{children:"Sign in first so we can verify the account you’re requesting access for."}),e.jsx(g,{returnTo:"/request-access",label:"Sign in with Hugging Face",collectEmail:!0})]})]})]})})};export{f as default};
assets/{SubmissionsDashboard-CxcSWVQa.js → SubmissionsDashboard-Ce5oydU-.js} RENAMED
@@ -1,4 +1,4 @@
1
- var be=s=>{throw TypeError(s)};var ee=(s,t,i)=>t.has(s)||be("Cannot "+i);var f=(s,t,i)=>(ee(s,t,"read from private field"),i?i.call(s):t.get(s)),R=(s,t,i)=>t.has(s)?be("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(s):t.set(s,i),k=(s,t,i,n)=>(ee(s,t,"write to private field"),n?n.call(s,i):t.set(s,i),i),O=(s,t,i)=>(ee(s,t,"access private method"),i);import{am as Ce,an as te,ao as Re,ap as Oe,g as Ne,r as z,aq as Me,d as qe,j as e,M as Ae,z as w,q as I,y as Te,e as ke,ar as Fe,as as Ie,at as Qe}from"./index-BJHhPv_M.js";import{Q as we,b as Le,c as Ue,e as De,d as $e,f as ze,s as ge,g as Be,h as He,u as ie}from"./useQuery-B9A-sza5.js";import{u as xe}from"./useMutation-rrsjzB5Q.js";import{c as Q}from"./catalog-DOuThn7M.js";import{s as $}from"./safeExternalHref-CkBrsh84.js";import{p as Ke}from"./papers-CWyBrS8M.js";import{s as H}from"./submissions-Dz2yQ0h0.js";import{R as Pe,S as Je,C as Ge}from"./shield-alert-DD-1LZcE.js";import{L as K}from"./loader-circle-CaPI_8_v.js";import{C as Ve}from"./circle-check-0fZsmTpB.js";function je(s,t){const i=new Set(t);return s.filter(n=>!i.has(n))}function We(s,t,i){const n=s.slice(0);return n[t]=i,n}var U,E,D,L,C,F,P,J,G,V,N,ne,re,Se,ae,oe,le,_e,Ye=(_e=class extends Ce{constructor(t,i,n){super();R(this,N);R(this,U);R(this,E);R(this,D);R(this,L);R(this,C);R(this,F);R(this,P);R(this,J);R(this,G);R(this,V,[]);k(this,U,t),k(this,L,n),k(this,D,[]),k(this,C,[]),k(this,E,[]),this.setQueries(i)}onSubscribe(){this.listeners.size===1&&f(this,C).forEach(t=>{t.subscribe(i=>{O(this,N,oe).call(this,t,i)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,f(this,C).forEach(t=>{t.destroy()})}setQueries(t,i){k(this,D,t),k(this,L,i),te.batch(()=>{const n=f(this,C),a=O(this,N,ae).call(this,f(this,D));a.forEach(r=>r.observer.setOptions(r.defaultedQueryOptions));const l=a.map(r=>r.observer),o=l.map(r=>r.getCurrentResult()),d=n.length!==l.length,p=l.some((r,m)=>r!==n[m]),b=d||p,x=b?!0:o.some((r,m)=>{const c=f(this,E)[m];return!c||!Re(r,c)});!b&&!x||(b&&(k(this,V,a),k(this,C,l)),k(this,E,o),this.hasListeners()&&(b&&(je(n,l).forEach(r=>{r.destroy()}),je(l,n).forEach(r=>{r.subscribe(m=>{O(this,N,oe).call(this,r,m)})})),O(this,N,le).call(this)))})}getCurrentResult(){return f(this,E)}getQueries(){return f(this,C).map(t=>t.getCurrentQuery())}getObservers(){return f(this,C)}getOptimisticResult(t,i){const n=O(this,N,ae).call(this,t),a=n.map(o=>o.observer.getOptimisticResult(o.defaultedQueryOptions)),l=n.map(o=>o.defaultedQueryOptions.queryHash);return[a,o=>O(this,N,re).call(this,o??a,i,l),()=>O(this,N,ne).call(this,a,n)]}},U=new WeakMap,E=new WeakMap,D=new WeakMap,L=new WeakMap,C=new WeakMap,F=new WeakMap,P=new WeakMap,J=new WeakMap,G=new WeakMap,V=new WeakMap,N=new WeakSet,ne=function(t,i){return i.map((n,a)=>{const l=t[a];return n.defaultedQueryOptions.notifyOnChangeProps?l:n.observer.trackResult(l,o=>{i.forEach(d=>{d.observer.trackProp(o)})})})},re=function(t,i,n){if(i){const a=f(this,G),l=n!==void 0&&a!==void 0&&(a.length!==n.length||n.some((o,d)=>o!==a[d]));return(!f(this,F)||f(this,E)!==f(this,J)||l||i!==f(this,P))&&(k(this,P,i),k(this,J,f(this,E)),n!==void 0&&k(this,G,n),k(this,F,Oe(f(this,F),i(t)))),f(this,F)}return t},Se=function(){var t;return((t=f(this,L))==null?void 0:t.combine)!==void 0&&f(this,C).some((i,n)=>{var a;return i.options.suspense&&((a=f(this,E)[n])==null?void 0:a.data)===void 0})},ae=function(t){const i=new Map;f(this,C).forEach(a=>{const l=a.options.queryHash;if(!l)return;const o=i.get(l);o?o.push(a):i.set(l,[a])});const n=[];return t.forEach(a=>{var p;const l=f(this,U).defaultQueryOptions(a),d=((p=i.get(l.queryHash))==null?void 0:p.shift())??new we(f(this,U),l);n.push({defaultedQueryOptions:l,observer:d})}),n},oe=function(t,i){const n=f(this,C).indexOf(t);n!==-1&&(k(this,E,We(f(this,E),n,i)),O(this,N,le).call(this))},le=function(){var t;if(this.hasListeners()){const i=O(this,N,ne).call(this,f(this,E),f(this,V)),n=O(this,N,Se).call(this),a=f(this,F),l=n?a:O(this,N,re).call(this,i,(t=f(this,L))==null?void 0:t.combine);(n||a!==l)&&te.batch(()=>{this.listeners.forEach(o=>{o(f(this,E))})})}},_e);function X({queries:s,...t},i){const n=Ne(),a=Le(),l=Ue(),o=z.useMemo(()=>s.map(u=>{const j=n.defaultQueryOptions(u);return j._optimisticResults=a?"isRestoring":"optimistic",j}),[s,n,a]);o.forEach(u=>{De(u);const j=n.getQueryCache().get(u.queryHash);$e(u,l,j)}),ze(l);const[d]=z.useState(()=>new Ye(n,o,t)),[p,b,x]=d.getOptimisticResult(o,t.combine),r=!a&&t.subscribed!==!1;z.useSyncExternalStore(z.useCallback(u=>r?d.subscribe(te.batchCalls(u)):Me,[d,r]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),z.useEffect(()=>{d.setQueries(o,t)},[o,t,d]);const c=p.some((u,j)=>ge(o[j],u))?p.flatMap((u,j)=>{const S=o[j];if(S&&ge(S,u)){const M=new we(n,S);return Be(S,M,l)}return[]}):[];if(c.length>0)throw Promise.all(c);const h=p.find((u,j)=>{const S=o[j];return S&&He({result:u,errorResetBoundary:l,throwOnError:S.throwOnError,query:n.getQueryCache().get(S.queryHash),suspense:S.suspense})});if(h!=null&&h.error)throw h.error;return b(x())}/**
2
  * @license lucide-react v0.462.0 - ISC
3
  *
4
  * This source code is licensed under the ISC license.
 
1
+ var be=s=>{throw TypeError(s)};var ee=(s,t,i)=>t.has(s)||be("Cannot "+i);var f=(s,t,i)=>(ee(s,t,"read from private field"),i?i.call(s):t.get(s)),R=(s,t,i)=>t.has(s)?be("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(s):t.set(s,i),k=(s,t,i,n)=>(ee(s,t,"write to private field"),n?n.call(s,i):t.set(s,i),i),O=(s,t,i)=>(ee(s,t,"access private method"),i);import{am as Ce,an as te,ao as Re,ap as Oe,g as Ne,r as z,aq as Me,d as qe,j as e,M as Ae,z as w,q as I,y as Te,e as ke,ar as Fe,as as Ie,at as Qe}from"./index-BfGRWIiQ.js";import{Q as we,b as Le,c as Ue,e as De,d as $e,f as ze,s as ge,g as Be,h as He,u as ie}from"./useQuery-uhyHf514.js";import{u as xe}from"./useMutation-Dw9DDJRs.js";import{c as Q}from"./catalog-BsVxStBB.js";import{s as $}from"./safeExternalHref-CkBrsh84.js";import{p as Ke}from"./papers-PnGxH-RF.js";import{s as H}from"./submissions-DXV1AUkd.js";import{R as Pe,S as Je,C as Ge}from"./shield-alert-CCOerJk7.js";import{L as K}from"./loader-circle-DgGa62N_.js";import{C as Ve}from"./circle-check-s2MhrD7m.js";function je(s,t){const i=new Set(t);return s.filter(n=>!i.has(n))}function We(s,t,i){const n=s.slice(0);return n[t]=i,n}var U,E,D,L,C,F,P,J,G,V,N,ne,re,Se,ae,oe,le,_e,Ye=(_e=class extends Ce{constructor(t,i,n){super();R(this,N);R(this,U);R(this,E);R(this,D);R(this,L);R(this,C);R(this,F);R(this,P);R(this,J);R(this,G);R(this,V,[]);k(this,U,t),k(this,L,n),k(this,D,[]),k(this,C,[]),k(this,E,[]),this.setQueries(i)}onSubscribe(){this.listeners.size===1&&f(this,C).forEach(t=>{t.subscribe(i=>{O(this,N,oe).call(this,t,i)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,f(this,C).forEach(t=>{t.destroy()})}setQueries(t,i){k(this,D,t),k(this,L,i),te.batch(()=>{const n=f(this,C),a=O(this,N,ae).call(this,f(this,D));a.forEach(r=>r.observer.setOptions(r.defaultedQueryOptions));const l=a.map(r=>r.observer),o=l.map(r=>r.getCurrentResult()),d=n.length!==l.length,p=l.some((r,m)=>r!==n[m]),b=d||p,x=b?!0:o.some((r,m)=>{const c=f(this,E)[m];return!c||!Re(r,c)});!b&&!x||(b&&(k(this,V,a),k(this,C,l)),k(this,E,o),this.hasListeners()&&(b&&(je(n,l).forEach(r=>{r.destroy()}),je(l,n).forEach(r=>{r.subscribe(m=>{O(this,N,oe).call(this,r,m)})})),O(this,N,le).call(this)))})}getCurrentResult(){return f(this,E)}getQueries(){return f(this,C).map(t=>t.getCurrentQuery())}getObservers(){return f(this,C)}getOptimisticResult(t,i){const n=O(this,N,ae).call(this,t),a=n.map(o=>o.observer.getOptimisticResult(o.defaultedQueryOptions)),l=n.map(o=>o.defaultedQueryOptions.queryHash);return[a,o=>O(this,N,re).call(this,o??a,i,l),()=>O(this,N,ne).call(this,a,n)]}},U=new WeakMap,E=new WeakMap,D=new WeakMap,L=new WeakMap,C=new WeakMap,F=new WeakMap,P=new WeakMap,J=new WeakMap,G=new WeakMap,V=new WeakMap,N=new WeakSet,ne=function(t,i){return i.map((n,a)=>{const l=t[a];return n.defaultedQueryOptions.notifyOnChangeProps?l:n.observer.trackResult(l,o=>{i.forEach(d=>{d.observer.trackProp(o)})})})},re=function(t,i,n){if(i){const a=f(this,G),l=n!==void 0&&a!==void 0&&(a.length!==n.length||n.some((o,d)=>o!==a[d]));return(!f(this,F)||f(this,E)!==f(this,J)||l||i!==f(this,P))&&(k(this,P,i),k(this,J,f(this,E)),n!==void 0&&k(this,G,n),k(this,F,Oe(f(this,F),i(t)))),f(this,F)}return t},Se=function(){var t;return((t=f(this,L))==null?void 0:t.combine)!==void 0&&f(this,C).some((i,n)=>{var a;return i.options.suspense&&((a=f(this,E)[n])==null?void 0:a.data)===void 0})},ae=function(t){const i=new Map;f(this,C).forEach(a=>{const l=a.options.queryHash;if(!l)return;const o=i.get(l);o?o.push(a):i.set(l,[a])});const n=[];return t.forEach(a=>{var p;const l=f(this,U).defaultQueryOptions(a),d=((p=i.get(l.queryHash))==null?void 0:p.shift())??new we(f(this,U),l);n.push({defaultedQueryOptions:l,observer:d})}),n},oe=function(t,i){const n=f(this,C).indexOf(t);n!==-1&&(k(this,E,We(f(this,E),n,i)),O(this,N,le).call(this))},le=function(){var t;if(this.hasListeners()){const i=O(this,N,ne).call(this,f(this,E),f(this,V)),n=O(this,N,Se).call(this),a=f(this,F),l=n?a:O(this,N,re).call(this,i,(t=f(this,L))==null?void 0:t.combine);(n||a!==l)&&te.batch(()=>{this.listeners.forEach(o=>{o(f(this,E))})})}},_e);function X({queries:s,...t},i){const n=Ne(),a=Le(),l=Ue(),o=z.useMemo(()=>s.map(u=>{const j=n.defaultQueryOptions(u);return j._optimisticResults=a?"isRestoring":"optimistic",j}),[s,n,a]);o.forEach(u=>{De(u);const j=n.getQueryCache().get(u.queryHash);$e(u,l,j)}),ze(l);const[d]=z.useState(()=>new Ye(n,o,t)),[p,b,x]=d.getOptimisticResult(o,t.combine),r=!a&&t.subscribed!==!1;z.useSyncExternalStore(z.useCallback(u=>r?d.subscribe(te.batchCalls(u)):Me,[d,r]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),z.useEffect(()=>{d.setQueries(o,t)},[o,t,d]);const c=p.some((u,j)=>ge(o[j],u))?p.flatMap((u,j)=>{const S=o[j];if(S&&ge(S,u)){const M=new we(n,S);return Be(S,M,l)}return[]}):[];if(c.length>0)throw Promise.all(c);const h=p.find((u,j)=>{const S=o[j];return S&&He({result:u,errorResetBoundary:l,throwOnError:S.throwOnError,query:n.getQueryCache().get(S.queryHash),suspense:S.suspense})});if(h!=null&&h.error)throw h.error;return b(x())}/**
2
  * @license lucide-react v0.462.0 - ISC
3
  *
4
  * This source code is licensed under the ISC license.
assets/{SubmitView-DWNoV2Zf.js → SubmitView-C-DR0i2q.js} RENAMED
@@ -1 +1 @@
1
- import{u as D,g as k,e as C,y as E,z as d,j as e,x as z}from"./index-BJHhPv_M.js";import{u as L}from"./useMutation-rrsjzB5Q.js";import{A as F,a as X}from"./alert-BiDOKM0e.js";import{B as _}from"./button-BL7Wfk99.js";import{I as g,T as q}from"./textarea-EPRANuVM.js";import{p as N}from"./papers-CWyBrS8M.js";const v="pwc:paper-submit-draft",U=/^\d{4}\.\d{4,5}(v\d+)?$/i,$=/^[a-z-]+(\.[A-Z]{2})?\/\d{7}$/,O=/^https?:\/\/(?:www\.)?arxiv\.org\//i;function A(n){const i=n.trim();return i?U.test(i)||$.test(i)||O.test(i)?"arxiv":/^https?:\/\//i.test(i)?"external":"arxiv":"empty"}function B(n,i){const a=n.trim();if(A(a)==="arxiv")return/^https?:\/\//i.test(a)?{source_url:a}:{arxiv_id:a};const o={source_url:a},l=i.title.trim();l&&(o.title=l);const p=i.abstract.trim();p&&(o.abstract=p);const u=i.authors.split(/[,\n]/).map(m=>m.trim()).filter(Boolean);return u.length>0&&(o.authors=u),i.datePublished&&(o.date_published=i.datePublished),o}function J(n){var a;const i=n;if(!i)return"Submission failed";if(i.response)try{const s=JSON.parse(i.response);if(typeof s.detail=="string")return s.detail;if((a=s.detail)!=null&&a.message)return`${s.detail.message} See ${s.detail.help||"/rate-limits"} for help.`}catch{return i.response}return i.message||"Submission failed"}const Y=()=>{const n=D(),i=k(),{toast:a}=C(),{user:s,isLoading:o}=E(),[l,p]=d.useState(""),[u,m]=d.useState(""),[f,S]=d.useState(""),[x,j]=d.useState(""),[y,w]=d.useState(""),[I,b]=d.useState(null);d.useEffect(()=>{const t=sessionStorage.getItem(v);if(t){sessionStorage.removeItem(v);try{const r=JSON.parse(t);p(r.input??""),m(r.title??""),S(r.abstract??""),j(r.authors??""),w(r.datePublished??"")}catch{}}},[]);const h=A(l),R=h==="external",c=L({mutationFn:t=>N.submit(t),onSuccess:t=>{if(t.pending_review){a({title:"Submission queued for review",description:"No source page was fetched and no catalog row was changed."}),c.reset();return}i.invalidateQueries({queryKey:["papers"],refetchType:"none"}),i.invalidateQueries({queryKey:["papers-infinite"],refetchType:"none"}),i.invalidateQueries({queryKey:["trending-papers"],refetchType:"none"});const r=t.refreshed&&t.created&&t.latest_version;a({title:r?`Paper updated to ${t.latest_version}`:t.created?"Paper submitted":"Paper already indexed",description:r?"Opening the updated paper page…":t.created?"Opening the paper page…":"Opening the existing paper page…"}),t.route_identifier&&n(`/paper/${t.route_identifier}`)},onError:t=>{b(J(t))}}),T=t=>{if(t.preventDefault(),b(null),h==="empty"){b("Enter an arXiv ID or a paper URL to submit.");return}if(!s){sessionStorage.setItem(v,JSON.stringify({input:l,title:u,abstract:f,authors:x,datePublished:y}));const P=z("/api/v1/auth/hf/login");window.location.assign(`${P}?return_to=${encodeURIComponent(window.location.href)}`);return}const r=B(l,{title:u,abstract:f,authors:x,datePublished:y});c.mutate(r)};return e.jsxs("div",{className:"page",style:{maxWidth:720},children:[e.jsx("h1",{className:"detail-title",children:"Submit a paper"}),e.jsxs("p",{style:{fontFamily:"var(--serif)",color:"var(--ink-soft)",marginTop:12,lineHeight:1.55},children:["Index an arXiv paper or propose a non-arXiv paper (blog post, technical report, model release page). External papers enter the submission queue and appear only after review."," ",e.jsx("a",{href:"/rate-limits",children:"Read the submission and rate-limit policy."})]}),e.jsxs("form",{onSubmit:T,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(g,{id:"submit-input",value:l,onChange:t=>p(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:h==="arxiv"?"Detected: arXiv paper — metadata will be fetched automatically.":h==="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."})]}),R&&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(g,{id:"submit-title",value:u,onChange:t=>m(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(q,{id:"submit-abstract",value:f,onChange:t=>S(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(g,{id:"submit-authors",value:x,onChange:t=>j(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(g,{id:"submit-date",type:"date",value:y,onChange:t=>w(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."})]})]}),I&&e.jsx(F,{variant:"destructive",children:e.jsx(X,{children:I})}),e.jsxs("div",{style:{display:"flex",gap:12,alignItems:"center"},children:[e.jsx(_,{type:"submit",disabled:c.isPending||o,children:o?"Checking sign-in…":c.isPending?"Submitting…":s?"Submit paper":"Sign in to submit"}),e.jsx(_,{type:"button",variant:"outline",onClick:()=>n(-1),disabled:c.isPending,children:"Cancel"})]})]})]})};export{Y as default};
 
1
+ import{u as D,g as k,e as C,y as E,z as d,j as e,x as z}from"./index-BfGRWIiQ.js";import{u as L}from"./useMutation-Dw9DDJRs.js";import{A as F,a as X}from"./alert-D4lZhgu4.js";import{B as _}from"./button-wuesmQpV.js";import{I as g,T as q}from"./textarea-BA4IPzRY.js";import{p as N}from"./papers-PnGxH-RF.js";const v="pwc:paper-submit-draft",U=/^\d{4}\.\d{4,5}(v\d+)?$/i,$=/^[a-z-]+(\.[A-Z]{2})?\/\d{7}$/,O=/^https?:\/\/(?:www\.)?arxiv\.org\//i;function A(n){const i=n.trim();return i?U.test(i)||$.test(i)||O.test(i)?"arxiv":/^https?:\/\//i.test(i)?"external":"arxiv":"empty"}function B(n,i){const a=n.trim();if(A(a)==="arxiv")return/^https?:\/\//i.test(a)?{source_url:a}:{arxiv_id:a};const o={source_url:a},l=i.title.trim();l&&(o.title=l);const p=i.abstract.trim();p&&(o.abstract=p);const u=i.authors.split(/[,\n]/).map(m=>m.trim()).filter(Boolean);return u.length>0&&(o.authors=u),i.datePublished&&(o.date_published=i.datePublished),o}function J(n){var a;const i=n;if(!i)return"Submission failed";if(i.response)try{const s=JSON.parse(i.response);if(typeof s.detail=="string")return s.detail;if((a=s.detail)!=null&&a.message)return`${s.detail.message} See ${s.detail.help||"/rate-limits"} for help.`}catch{return i.response}return i.message||"Submission failed"}const Y=()=>{const n=D(),i=k(),{toast:a}=C(),{user:s,isLoading:o}=E(),[l,p]=d.useState(""),[u,m]=d.useState(""),[f,S]=d.useState(""),[x,j]=d.useState(""),[y,w]=d.useState(""),[I,b]=d.useState(null);d.useEffect(()=>{const t=sessionStorage.getItem(v);if(t){sessionStorage.removeItem(v);try{const r=JSON.parse(t);p(r.input??""),m(r.title??""),S(r.abstract??""),j(r.authors??""),w(r.datePublished??"")}catch{}}},[]);const h=A(l),R=h==="external",c=L({mutationFn:t=>N.submit(t),onSuccess:t=>{if(t.pending_review){a({title:"Submission queued for review",description:"No source page was fetched and no catalog row was changed."}),c.reset();return}i.invalidateQueries({queryKey:["papers"],refetchType:"none"}),i.invalidateQueries({queryKey:["papers-infinite"],refetchType:"none"}),i.invalidateQueries({queryKey:["trending-papers"],refetchType:"none"});const r=t.refreshed&&t.created&&t.latest_version;a({title:r?`Paper updated to ${t.latest_version}`:t.created?"Paper submitted":"Paper already indexed",description:r?"Opening the updated paper page…":t.created?"Opening the paper page…":"Opening the existing paper page…"}),t.route_identifier&&n(`/paper/${t.route_identifier}`)},onError:t=>{b(J(t))}}),T=t=>{if(t.preventDefault(),b(null),h==="empty"){b("Enter an arXiv ID or a paper URL to submit.");return}if(!s){sessionStorage.setItem(v,JSON.stringify({input:l,title:u,abstract:f,authors:x,datePublished:y}));const P=z("/api/v1/auth/hf/login");window.location.assign(`${P}?return_to=${encodeURIComponent(window.location.href)}`);return}const r=B(l,{title:u,abstract:f,authors:x,datePublished:y});c.mutate(r)};return e.jsxs("div",{className:"page",style:{maxWidth:720},children:[e.jsx("h1",{className:"detail-title",children:"Submit a paper"}),e.jsxs("p",{style:{fontFamily:"var(--serif)",color:"var(--ink-soft)",marginTop:12,lineHeight:1.55},children:["Index an arXiv paper or propose a non-arXiv paper (blog post, technical report, model release page). External papers enter the submission queue and appear only after review."," ",e.jsx("a",{href:"/rate-limits",children:"Read the submission and rate-limit policy."})]}),e.jsxs("form",{onSubmit:T,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(g,{id:"submit-input",value:l,onChange:t=>p(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:h==="arxiv"?"Detected: arXiv paper — metadata will be fetched automatically.":h==="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."})]}),R&&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(g,{id:"submit-title",value:u,onChange:t=>m(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(q,{id:"submit-abstract",value:f,onChange:t=>S(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(g,{id:"submit-authors",value:x,onChange:t=>j(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(g,{id:"submit-date",type:"date",value:y,onChange:t=>w(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."})]})]}),I&&e.jsx(F,{variant:"destructive",children:e.jsx(X,{children:I})}),e.jsxs("div",{style:{display:"flex",gap:12,alignItems:"center"},children:[e.jsx(_,{type:"submit",disabled:c.isPending||o,children:o?"Checking sign-in…":c.isPending?"Submitting…":s?"Submit paper":"Sign in to submit"}),e.jsx(_,{type:"button",variant:"outline",onClick:()=>n(-1),disabled:c.isPending,children:"Cancel"})]})]})]})};export{Y as default};
assets/{TagBrowseView-ChxQM8Bx.js → TagBrowseView-ai8FONod.js} RENAMED
@@ -1,4 +1,4 @@
1
- import{d as je,r as h,k as X,j as e,h as O,V as _e,m as ve,P as ss,p as Ne,l as ke,W as as,z as j,Y as ts,t as rs,q as ee,L as k,c as ns,u as os,a as is,f as cs,M as ls}from"./index-BJHhPv_M.js";import{u as be}from"./useQuery-B9A-sza5.js";import{P as ds,M as ms}from"./components-wRHDLoMO.js";import{B as ps}from"./BenchmarkTrendSparkline-CPm3KYmF.js";import{r as hs,u as us,P as gs,a as xs,w as bs}from"./paperDateRange-Cx_7ISLZ.js";import{M as Y}from"./MarkdownText-_ZQTzPOU.js";import{c as fe}from"./catalog-DOuThn7M.js";import{s as fs}from"./slug-BpH-Nkvz.js";import{d as H,t as js}from"./transform-DDP8kg8V.js";import{c as _s}from"./usePapers-Dubaj0sc.js";import{S as q}from"./skeleton-utCOClux.js";import{A as vs,a as Ns}from"./alert-BiDOKM0e.js";import{C as ks}from"./chevron-down-BVyqIjKu.js";import{G as ws}from"./github-BnuvDeYu.js";import"./LatexTitle-Cb0dDCMw.js";import"./katex.min-BSBacQyE.js";import"./papers-CWyBrS8M.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-ByfOmyUl.js";import"./PaperPreviewLink-DVTrFkw2.js";import"./index-RvWGcsIO.js";import"./hover-card-CBNxKixP.js";import"./useInfiniteQuery-DeWbJxMK.js";/**
2
  * @license lucide-react v0.462.0 - ISC
3
  *
4
  * This source code is licensed under the ISC license.
 
1
+ import{d as je,r as h,k as X,j as e,h as O,V as _e,m as ve,P as ss,p as Ne,l as ke,W as as,z as j,Y as ts,t as rs,q as ee,L as k,c as ns,u as os,a as is,f as cs,M as ls}from"./index-BfGRWIiQ.js";import{u as be}from"./useQuery-uhyHf514.js";import{P as ds,M as ms}from"./components-fo0inhXZ.js";import{B as ps}from"./BenchmarkTrendSparkline-CtBP2P-b.js";import{r as hs,u as us,P as gs,a as xs,w as bs}from"./paperDateRange-BwpPQ99I.js";import{M as Y}from"./MarkdownText-DeevkxdU.js";import{c as fe}from"./catalog-BsVxStBB.js";import{s as fs}from"./slug-BpH-Nkvz.js";import{d as H,t as js}from"./transform-BVvRkYPJ.js";import{c as _s}from"./usePapers-SIkOY1oo.js";import{S as q}from"./skeleton-7gHbNXZz.js";import{A as vs,a as Ns}from"./alert-D4lZhgu4.js";import{C as ks}from"./chevron-down-BovmCLHU.js";import{G as ws}from"./github-BM40zlYO.js";import"./LatexTitle-DPJPslOM.js";import"./katex.min-BSBacQyE.js";import"./papers-PnGxH-RF.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-xj7LLGhl.js";import"./PaperPreviewLink-_SPYeWhn.js";import"./index-BqZK5Cw1.js";import"./hover-card-HVpXfIHl.js";import"./useInfiniteQuery-CYJcc79v.js";/**
2
  * @license lucide-react v0.462.0 - ISC
3
  *
4
  * This source code is licensed under the ISC license.
assets/{TagsIndexView-Bl4HORMo.js → TagsIndexView-DL7Mu597.js} RENAMED
@@ -1 +1 @@
1
- import{r as m,j as s,L as p}from"./index-BJHhPv_M.js";import{u as h}from"./useQuery-B9A-sza5.js";import{c as g}from"./catalog-DOuThn7M.js";import{c as x,h as f,d as u}from"./transform-DDP8kg8V.js";import{s as j}from"./slug-BpH-Nkvz.js";import{S as d}from"./skeleton-utCOClux.js";import{A as y,a as k}from"./alert-BiDOKM0e.js";import{T as v}from"./TaxonomySuggestionTile-BuaFf3aB.js";import"./SignInToEditDialog-vE3vqpo1.js";import"./button-BL7Wfk99.js";import"./textarea-EPRANuVM.js";import"./dialog-DINVvlE3.js";import"./useMutation-rrsjzB5Q.js";import"./submissions-Dz2yQ0h0.js";import"./loader-circle-CaPI_8_v.js";const N=r=>(r==null?void 0:r.trim().toLowerCase().replace(/[\s_]+/g,"-"))??"",I=()=>{const r=h({queryKey:["areas-with-tasks"],queryFn:()=>g.areasWithTasks(),staleTime:6e5}),o=m.useMemo(()=>{if(!r.data)return[];const e={general:0,vision:1,video:2,language:3,audio:4,other:5},a=n=>e[N(n)]??999;return[...r.data.results].sort((n,t)=>{const i=a(n.name),l=a(t.name);return i!==l?i-l:n.name.localeCompare(t.name)})},[r.data]),c=m.useMemo(()=>o.reduce((e,a)=>e+a.tasks.length,0),[o]);return r.error?s.jsx("div",{className:"page",children:s.jsx(y,{variant:"destructive",children:s.jsx(k,{children:"Failed to load taxonomy. Please try again."})})}):s.jsxs("div",{className:"page",children:[s.jsx("div",{className:"feed-header",children:s.jsxs("div",{children:[s.jsxs("h1",{className:"feed-title",children:["All ",s.jsx("em",{children:"Domains"})]}),s.jsx("div",{className:"feed-subtitle",children:"Browse research by area. Click any task to see trending work."})]})}),r.isLoading?s.jsx("div",{style:{display:"flex",flexDirection:"column",gap:32},children:Array.from({length:4}).map((e,a)=>s.jsxs("div",{children:[s.jsx(d,{className:"h-8 w-1/3 mb-4"}),s.jsx("div",{className:"tag-grid",children:Array.from({length:6}).map((n,t)=>s.jsx(d,{className:"h-24"},t))})]},a))}):o.map(e=>{const a=e.tasks;if(a.length===0)return null;const n=a.reduce((t,i)=>t+(i.paper_count||0),0);return s.jsxs("section",{id:`area-${j(e.name)}`,style:{marginBottom:48},children:[s.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:24,paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},children:[s.jsxs("div",{children:[s.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.02em",marginBottom:4},children:e.name}),e.description&&s.jsx("div",{style:{fontFamily:"var(--serif)",fontStyle:"italic",fontSize:13,color:"var(--ink-soft)"},children:e.description})]}),s.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[a.length," ",a.length===1?"task":"tasks"," · ",n.toLocaleString()," papers"]})]}),s.jsxs("div",{className:"tag-grid",children:[a.map(t=>{const i=t.slug||"",l=x(f(i));return s.jsxs(p,{to:`/tasks/${i}`,className:"tag-cell",children:[s.jsxs("div",{className:"name",children:[s.jsx("span",{className:"dot",style:{background:l.dot}}),u(t.name,i)]}),s.jsx("div",{className:"meta",children:s.jsxs("span",{children:[(t.paper_count??0).toLocaleString()," papers"]})})]},t.id)}),s.jsx(v,{kind:"task"})]})]},e.id)}),c>0&&s.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",marginTop:24},children:[c," tasks across ",o.filter(e=>e.tasks.length>0).length," areas."]})]})};export{I as default};
 
1
+ import{r as m,j as s,L as p}from"./index-BfGRWIiQ.js";import{u as h}from"./useQuery-uhyHf514.js";import{c as g}from"./catalog-BsVxStBB.js";import{c as x,h as f,d as u}from"./transform-BVvRkYPJ.js";import{s as j}from"./slug-BpH-Nkvz.js";import{S as d}from"./skeleton-7gHbNXZz.js";import{A as y,a as k}from"./alert-D4lZhgu4.js";import{T as v}from"./TaxonomySuggestionTile-VrAsjN5R.js";import"./SignInToEditDialog-C1ykF6wM.js";import"./button-wuesmQpV.js";import"./textarea-BA4IPzRY.js";import"./dialog-Ci3RQLed.js";import"./useMutation-Dw9DDJRs.js";import"./submissions-DXV1AUkd.js";import"./loader-circle-DgGa62N_.js";const N=r=>(r==null?void 0:r.trim().toLowerCase().replace(/[\s_]+/g,"-"))??"",I=()=>{const r=h({queryKey:["areas-with-tasks"],queryFn:()=>g.areasWithTasks(),staleTime:6e5}),o=m.useMemo(()=>{if(!r.data)return[];const e={general:0,vision:1,video:2,language:3,audio:4,other:5},a=n=>e[N(n)]??999;return[...r.data.results].sort((n,t)=>{const i=a(n.name),l=a(t.name);return i!==l?i-l:n.name.localeCompare(t.name)})},[r.data]),c=m.useMemo(()=>o.reduce((e,a)=>e+a.tasks.length,0),[o]);return r.error?s.jsx("div",{className:"page",children:s.jsx(y,{variant:"destructive",children:s.jsx(k,{children:"Failed to load taxonomy. Please try again."})})}):s.jsxs("div",{className:"page",children:[s.jsx("div",{className:"feed-header",children:s.jsxs("div",{children:[s.jsxs("h1",{className:"feed-title",children:["All ",s.jsx("em",{children:"Domains"})]}),s.jsx("div",{className:"feed-subtitle",children:"Browse research by area. Click any task to see trending work."})]})}),r.isLoading?s.jsx("div",{style:{display:"flex",flexDirection:"column",gap:32},children:Array.from({length:4}).map((e,a)=>s.jsxs("div",{children:[s.jsx(d,{className:"h-8 w-1/3 mb-4"}),s.jsx("div",{className:"tag-grid",children:Array.from({length:6}).map((n,t)=>s.jsx(d,{className:"h-24"},t))})]},a))}):o.map(e=>{const a=e.tasks;if(a.length===0)return null;const n=a.reduce((t,i)=>t+(i.paper_count||0),0);return s.jsxs("section",{id:`area-${j(e.name)}`,style:{marginBottom:48},children:[s.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:24,paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},children:[s.jsxs("div",{children:[s.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.02em",marginBottom:4},children:e.name}),e.description&&s.jsx("div",{style:{fontFamily:"var(--serif)",fontStyle:"italic",fontSize:13,color:"var(--ink-soft)"},children:e.description})]}),s.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[a.length," ",a.length===1?"task":"tasks"," · ",n.toLocaleString()," papers"]})]}),s.jsxs("div",{className:"tag-grid",children:[a.map(t=>{const i=t.slug||"",l=x(f(i));return s.jsxs(p,{to:`/tasks/${i}`,className:"tag-cell",children:[s.jsxs("div",{className:"name",children:[s.jsx("span",{className:"dot",style:{background:l.dot}}),u(t.name,i)]}),s.jsx("div",{className:"meta",children:s.jsxs("span",{children:[(t.paper_count??0).toLocaleString()," papers"]})})]},t.id)}),s.jsx(v,{kind:"task"})]})]},e.id)}),c>0&&s.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",marginTop:24},children:[c," tasks across ",o.filter(e=>e.tasks.length>0).length," areas."]})]})};export{I as default};
assets/{TaxonomySuggestionTile-BuaFf3aB.js → TaxonomySuggestionTile-VrAsjN5R.js} RENAMED
@@ -1 +1 @@
1
- import{y as u,r as o,j as e}from"./index-BJHhPv_M.js";import{P as c,S as m,a as p}from"./SignInToEditDialog-vE3vqpo1.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{y as u,r as o,j as e}from"./index-BfGRWIiQ.js";import{P as c,S as m,a as p}from"./SignInToEditDialog-C1ykF6wM.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-DNNCjmYo.js → TrendsView-oxMhMBQy.js} RENAMED
@@ -1 +1 @@
1
- import{Z as I,z as X,j as e}from"./index-BJHhPv_M.js";import{u as G}from"./useQuery-B9A-sza5.js";import{A as J,a as E}from"./alert-BiDOKM0e.js";import{S as P}from"./skeleton-utCOClux.js";class Q{constructor(r){this.request=r}trends(){return this.request("/stats/trends")}}const V=new Q(I),m=t=>{const r=/^(\d{4})-(0[1-9]|1[0-2])$/.exec(t);if(!r)return t;const[,s,l]=r;return`${["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][Number(l)-1]} '${s.slice(2)}`},Y=()=>V.trends(),f=980,j=400,x=62,B=26,g=30,Z=58,u=f-x-B,A=j-g-Z,v=g+A,K=t=>{if(t.length<3)return t.map((s,l)=>`${l?"L":"M"}${s[0]} ${s[1]}`).join(" ");let r=`M${t[0][0]} ${t[0][1]}`;for(let s=0;s<t.length-1;s+=1){const l=t[s-1]??t[s],c=t[s],o=t[s+1],a=t[s+2]??o,y=c[0]+(o[0]-l[0])/6,i=c[1]+(o[1]-l[1])/6,b=o[0]-(a[0]-c[0])/6,d=o[1]-(a[1]-c[1])/6;r+=` C ${y} ${i} ${b} ${d} ${o[0]} ${o[1]}`}return r},z={fontFamily:"var(--mono)",fontSize:12,fill:"var(--ink-faint)"},W={fontFamily:"var(--mono)",fontSize:11,fontWeight:600,letterSpacing:"0.14em",fill:"var(--ink-faint)",textTransform:"uppercase"},L=({id:t,data:r,color:s,yTicks:l,yLabel:c,xLabel:o})=>{const[a,y]=X.useState(null),i=r.length,b=l[l.length-1],d=n=>x+u*(i===1?0:n/(i-1)),p=n=>g+A*(1-n/b);if(i===0)return null;const R=r.map((n,h)=>[d(h),p(n.percent)]),F=K(R),_=`${F} L ${d(i-1)} ${v} L ${x} ${v} Z`,w=i<=12?1:Math.ceil(i/8),O=n=>{const h=n.currentTarget.getBoundingClientRect(),S=(n.clientX-h.left)/h.width*f,k=i>1?u/(i-1):u,q=Math.max(0,Math.min(i-1,Math.round((S-x)/k)));y(q)},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(r[0].month)} (${r[0].percent}%) to ${m(r[i-1].month)} (${r[i-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:s,stopOpacity:.26}}),e.jsx("stop",{offset:"100%",style:{stopColor:s,stopOpacity:.02}})]})}),l.map(n=>e.jsxs("g",{children:[e.jsx("line",{x1:x,x2:f-B,y1:p(n),y2:p(n),stroke:"var(--hairline)",strokeWidth:1}),e.jsxs("text",{x:x-14,y:p(n)+4,textAnchor:"end",style:z,children:[n,"%"]})]},n)),e.jsx("path",{d:_,fill:`url(#${H})`}),e.jsx("path",{d:F,fill:"none",stroke:s,strokeWidth:2,strokeLinejoin:"round",strokeLinecap:"round"}),r.map((n,h)=>{const S=h===i-1,k=h%w===0&&i-1-h>=w/2;return!S&&!k?null:e.jsx("text",{x:d(h),y:v+24,textAnchor:"middle",style:z,children:m(n.month)},n.month)}),e.jsx("text",{x:x+u/2,y:j-4,textAnchor:"middle",style:W,children:o}),e.jsx("text",{transform:`translate(16 ${g+A/2}) rotate(-90)`,textAnchor:"middle",style:W,children:c}),a!=null&&e.jsxs(e.Fragment,{children:[e.jsx("line",{x1:d(a),x2:d(a),y1:g,y2:v,stroke:s,strokeWidth:1,strokeDasharray:"3 4",opacity:.5}),e.jsx("circle",{cx:d(a),cy:p(r[a].percent),r:5,fill:"var(--bg)",stroke:s,strokeWidth:2})]})]}),a!=null&&e.jsxs("div",{style:{position:"absolute",left:`${d(a)/f*100}%`,top:`${p(r[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(r[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:s,display:"inline-block"}}),r[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:r.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)"},M={fontFamily:"var(--serif)",fontSize:18,lineHeight:1.55,color:"var(--ink-soft)",maxWidth:620,margin:"0 0 8px"},C={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},re=()=>{const t=G({queryKey:["research-trends"],queryFn:Y,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(J,{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:M,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(L,{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:M,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(L,{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:C,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:C,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{re as default};
 
1
+ import{Z as I,z as X,j as e}from"./index-BfGRWIiQ.js";import{u as G}from"./useQuery-uhyHf514.js";import{A as J,a as E}from"./alert-D4lZhgu4.js";import{S as P}from"./skeleton-7gHbNXZz.js";class Q{constructor(r){this.request=r}trends(){return this.request("/stats/trends")}}const V=new Q(I),m=t=>{const r=/^(\d{4})-(0[1-9]|1[0-2])$/.exec(t);if(!r)return t;const[,s,l]=r;return`${["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][Number(l)-1]} '${s.slice(2)}`},Y=()=>V.trends(),f=980,j=400,x=62,B=26,g=30,Z=58,u=f-x-B,A=j-g-Z,v=g+A,K=t=>{if(t.length<3)return t.map((s,l)=>`${l?"L":"M"}${s[0]} ${s[1]}`).join(" ");let r=`M${t[0][0]} ${t[0][1]}`;for(let s=0;s<t.length-1;s+=1){const l=t[s-1]??t[s],c=t[s],o=t[s+1],a=t[s+2]??o,y=c[0]+(o[0]-l[0])/6,i=c[1]+(o[1]-l[1])/6,b=o[0]-(a[0]-c[0])/6,d=o[1]-(a[1]-c[1])/6;r+=` C ${y} ${i} ${b} ${d} ${o[0]} ${o[1]}`}return r},z={fontFamily:"var(--mono)",fontSize:12,fill:"var(--ink-faint)"},W={fontFamily:"var(--mono)",fontSize:11,fontWeight:600,letterSpacing:"0.14em",fill:"var(--ink-faint)",textTransform:"uppercase"},L=({id:t,data:r,color:s,yTicks:l,yLabel:c,xLabel:o})=>{const[a,y]=X.useState(null),i=r.length,b=l[l.length-1],d=n=>x+u*(i===1?0:n/(i-1)),p=n=>g+A*(1-n/b);if(i===0)return null;const R=r.map((n,h)=>[d(h),p(n.percent)]),F=K(R),_=`${F} L ${d(i-1)} ${v} L ${x} ${v} Z`,w=i<=12?1:Math.ceil(i/8),O=n=>{const h=n.currentTarget.getBoundingClientRect(),S=(n.clientX-h.left)/h.width*f,k=i>1?u/(i-1):u,q=Math.max(0,Math.min(i-1,Math.round((S-x)/k)));y(q)},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(r[0].month)} (${r[0].percent}%) to ${m(r[i-1].month)} (${r[i-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:s,stopOpacity:.26}}),e.jsx("stop",{offset:"100%",style:{stopColor:s,stopOpacity:.02}})]})}),l.map(n=>e.jsxs("g",{children:[e.jsx("line",{x1:x,x2:f-B,y1:p(n),y2:p(n),stroke:"var(--hairline)",strokeWidth:1}),e.jsxs("text",{x:x-14,y:p(n)+4,textAnchor:"end",style:z,children:[n,"%"]})]},n)),e.jsx("path",{d:_,fill:`url(#${H})`}),e.jsx("path",{d:F,fill:"none",stroke:s,strokeWidth:2,strokeLinejoin:"round",strokeLinecap:"round"}),r.map((n,h)=>{const S=h===i-1,k=h%w===0&&i-1-h>=w/2;return!S&&!k?null:e.jsx("text",{x:d(h),y:v+24,textAnchor:"middle",style:z,children:m(n.month)},n.month)}),e.jsx("text",{x:x+u/2,y:j-4,textAnchor:"middle",style:W,children:o}),e.jsx("text",{transform:`translate(16 ${g+A/2}) rotate(-90)`,textAnchor:"middle",style:W,children:c}),a!=null&&e.jsxs(e.Fragment,{children:[e.jsx("line",{x1:d(a),x2:d(a),y1:g,y2:v,stroke:s,strokeWidth:1,strokeDasharray:"3 4",opacity:.5}),e.jsx("circle",{cx:d(a),cy:p(r[a].percent),r:5,fill:"var(--bg)",stroke:s,strokeWidth:2})]})]}),a!=null&&e.jsxs("div",{style:{position:"absolute",left:`${d(a)/f*100}%`,top:`${p(r[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(r[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:s,display:"inline-block"}}),r[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:r.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)"},M={fontFamily:"var(--serif)",fontSize:18,lineHeight:1.55,color:"var(--ink-soft)",maxWidth:620,margin:"0 0 8px"},C={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},re=()=>{const t=G({queryKey:["research-trends"],queryFn:Y,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(J,{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:M,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(L,{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:M,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(L,{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:C,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:C,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{re as default};
assets/{UserProfileView-8GBCsDpk.js → UserProfileView-CKhi-66U.js} RENAMED
@@ -1 +1 @@
1
- import{ak as i,A as n,c as o,j as e,ax as d}from"./index-BJHhPv_M.js";import{u as l}from"./useQuery-B9A-sza5.js";import{C as c}from"./OrganizationContributionGraph-6dHF7Irk.js";import"./skeleton-utCOClux.js";import"./catalog-DOuThn7M.js";const p={async get(t){const a=await i(`/profiles/${encodeURIComponent(t)}`);if(!a.ok)throw new n(a,await a.text());const r=await a.json();if(!a.redirected)return r;const s=decodeURIComponent(new URL(a.url).pathname.split("/").pop()||r.username);return{...r,username:s,redirected_from_alias:!0}}},f=()=>{const{username:t=""}=o(),a=l({queryKey:["user-profile",t.toLowerCase()],queryFn:()=>p.get(t)});return a.isLoading?e.jsx("div",{className:"page",children:"Loading profile…"}):a.data?a.data.redirected_from_alias?e.jsx(d,{to:`/${a.data.username}`,replace:!0}):e.jsxs("div",{className:"page",style:{maxWidth:960},children:[e.jsxs("h1",{children:["@",a.data.username]}),e.jsx("p",{children:"Canonical Papers with Code contributions"}),e.jsx(c,{data:a.data.calendar,organizationName:`@${a.data.username}`,title:"Canonical contributions",noun:"contribution"}),a.data.is_owner&&e.jsxs("section",{className:"mt-10",children:[e.jsx("h2",{children:"Your submissions"}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Limits and duplicate behavior are documented on ",e.jsx("a",{href:"/rate-limits",children:"the policy page"}),"."]}),e.jsx("div",{className:"mt-4 space-y-3",children:a.data.submissions.map(r=>e.jsxs("article",{className:"rounded-md border p-4",children:[e.jsx("strong",{children:r.edit_type})," · ",r.status,e.jsxs("details",{className:"mt-2 text-xs",children:[e.jsx("summary",{children:"Original and applied payload"}),e.jsx("pre",{children:JSON.stringify({proposed:r.proposed_payload,applied:r.applied_payload},null,2)})]}),r.review_reason&&e.jsx("p",{children:r.review_reason})]},r.id))})]})]}):e.jsx("div",{className:"page",children:e.jsx("h1",{children:"Profile not found"})})};export{f as default};
 
1
+ import{ak as i,A as n,c as o,j as e,ax as d}from"./index-BfGRWIiQ.js";import{u as l}from"./useQuery-uhyHf514.js";import{C as c}from"./OrganizationContributionGraph-DWn4WvRK.js";import"./skeleton-7gHbNXZz.js";import"./catalog-BsVxStBB.js";const p={async get(t){const a=await i(`/profiles/${encodeURIComponent(t)}`);if(!a.ok)throw new n(a,await a.text());const r=await a.json();if(!a.redirected)return r;const s=decodeURIComponent(new URL(a.url).pathname.split("/").pop()||r.username);return{...r,username:s,redirected_from_alias:!0}}},f=()=>{const{username:t=""}=o(),a=l({queryKey:["user-profile",t.toLowerCase()],queryFn:()=>p.get(t)});return a.isLoading?e.jsx("div",{className:"page",children:"Loading profile…"}):a.data?a.data.redirected_from_alias?e.jsx(d,{to:`/${a.data.username}`,replace:!0}):e.jsxs("div",{className:"page",style:{maxWidth:960},children:[e.jsxs("h1",{children:["@",a.data.username]}),e.jsx("p",{children:"Canonical Papers with Code contributions"}),e.jsx(c,{data:a.data.calendar,organizationName:`@${a.data.username}`,title:"Canonical contributions",noun:"contribution"}),a.data.is_owner&&e.jsxs("section",{className:"mt-10",children:[e.jsx("h2",{children:"Your submissions"}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Limits and duplicate behavior are documented on ",e.jsx("a",{href:"/rate-limits",children:"the policy page"}),"."]}),e.jsx("div",{className:"mt-4 space-y-3",children:a.data.submissions.map(r=>e.jsxs("article",{className:"rounded-md border p-4",children:[e.jsx("strong",{children:r.edit_type})," · ",r.status,e.jsxs("details",{className:"mt-2 text-xs",children:[e.jsx("summary",{children:"Original and applied payload"}),e.jsx("pre",{children:JSON.stringify({proposed:r.proposed_payload,applied:r.applied_payload},null,2)})]}),r.review_reason&&e.jsx("p",{children:r.review_reason})]},r.id))})]})]}):e.jsx("div",{className:"page",children:e.jsx("h1",{children:"Profile not found"})})};export{f as default};
assets/{alert-BiDOKM0e.js → alert-D4lZhgu4.js} RENAMED
@@ -1 +1 @@
1
- import{r as a,j as s,q as l,a0 as i}from"./index-BJHhPv_M.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,a0 as i}from"./index-BfGRWIiQ.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-BL7Wfk99.js → button-wuesmQpV.js} RENAMED
@@ -1 +1 @@
1
- import{r as a,j as d,al as u,q as c,a0 as f}from"./index-BJHhPv_M.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"}}),l=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})});l.displayName="Button";export{l as B};
 
1
+ import{r as a,j as d,al as u,q as c,a0 as f}from"./index-BfGRWIiQ.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"}}),l=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})});l.displayName="Button";export{l as B};
assets/{catalog-DOuThn7M.js → catalog-BsVxStBB.js} RENAMED
@@ -1 +1 @@
1
- import{Z as o}from"./index-BJHhPv_M.js";function s(a,e){const t=new URLSearchParams;for(const[i,n]of Object.entries(e??{}))n!==void 0&&n!==""&&t.set(i,String(n));const r=t.toString();return`${a}${r?`?${r}`:""}`}class u{constructor(e){this.request=e}listAreas(e){return this.request(s("/areas/",e))}getArea(e){return this.request(`/areas/${e}`)}areasWithTasks(){return this.request("/areas/with-tasks/")}listTasks(e){return this.request(s("/tasks/",e))}getTask(e){return this.request(`/tasks/${e}`)}topTasks(e){return this.request(s("/tasks/top",{limit:e}))}trendingTasks(e){return this.request(s("/tasks/trending",e))}taskChildren(e,t){return this.request(s(`/tasks/${e}/children`,t))}taskParents(e){return this.request(`/tasks/${e}/parents`)}taskPage(e,t){return this.request(s(`/tasks/${e}/page`,t))}trendingBenchmarks(e,t){return this.request(s(`/tasks/${encodeURIComponent(e)}/trending-benchmarks`,t))}frameworkCatalog(){return this.request("/frameworks/")}listMethods(e){return this.request(s("/methods/",e))}methodIndex(){return this.request("/methods/index/cards")}getMethod(e){return this.request(`/methods/${encodeURIComponent(e)}`)}methodTrend(e,t){return this.request(s(`/methods/${encodeURIComponent(e)}/trend`,t))}listDatasets(e){const{task_id:t,...r}=e??{};return this.request(s("/datasets/",{...r,task:r.task??t}))}getDataset(e){return this.request(`/datasets/${e}`)}getDatasetBySlug(e,t){return this.request(s(`/datasets/${e}`,t))}async datasetTasks(e){return(await this.request(`/datasets/${e}/tasks/`)).results}async leaderboardMetrics(e,t){return(await this.request(`/datasets/${e}/tasks/${t}/metrics`)).metrics}metricDirections(){return this.request("/metrics/directions")}conferences(){return this.request("/conferences/")}conferenceDeadlines(){return this.request("/conferences/deadlines")}getConference(e){return this.request(`/conferences/${e}`)}conferenceAreasWithTasks(e){return this.request(`/conferences/${e}/areas-with-tasks`)}organizations(e=!1){return this.request(`/organizations/${e?"?featured_only=true":""}`)}organizationIndex(){return this.request("/organizations/index/cards")}getOrganization(e){return this.request(`/organizations/${e}`)}organizationContributions(e){return this.request(`/organizations/${e}/contributions`)}organizationAreasWithTasks(e){return this.request(`/organizations/${e}/areas-with-tasks`)}audit(e){return this.request(s("/admin/catalog-audit",{cursor:e}))}acknowledgeAudit(){return this.request("/admin/catalog-audit/acknowledge",{method:"POST"})}rollbackEvent(e){return this.request(`/admin/catalog-audit/${e}/rollback`,{method:"POST"})}}const c=new u(o);export{c};
 
1
+ import{Z as o}from"./index-BfGRWIiQ.js";function s(a,e){const t=new URLSearchParams;for(const[i,n]of Object.entries(e??{}))n!==void 0&&n!==""&&t.set(i,String(n));const r=t.toString();return`${a}${r?`?${r}`:""}`}class u{constructor(e){this.request=e}listAreas(e){return this.request(s("/areas/",e))}getArea(e){return this.request(`/areas/${e}`)}areasWithTasks(){return this.request("/areas/with-tasks/")}listTasks(e){return this.request(s("/tasks/",e))}getTask(e){return this.request(`/tasks/${e}`)}topTasks(e){return this.request(s("/tasks/top",{limit:e}))}trendingTasks(e){return this.request(s("/tasks/trending",e))}taskChildren(e,t){return this.request(s(`/tasks/${e}/children`,t))}taskParents(e){return this.request(`/tasks/${e}/parents`)}taskPage(e,t){return this.request(s(`/tasks/${e}/page`,t))}trendingBenchmarks(e,t){return this.request(s(`/tasks/${encodeURIComponent(e)}/trending-benchmarks`,t))}frameworkCatalog(){return this.request("/frameworks/")}listMethods(e){return this.request(s("/methods/",e))}methodIndex(){return this.request("/methods/index/cards")}getMethod(e){return this.request(`/methods/${encodeURIComponent(e)}`)}methodTrend(e,t){return this.request(s(`/methods/${encodeURIComponent(e)}/trend`,t))}listDatasets(e){const{task_id:t,...r}=e??{};return this.request(s("/datasets/",{...r,task:r.task??t}))}getDataset(e){return this.request(`/datasets/${e}`)}getDatasetBySlug(e,t){return this.request(s(`/datasets/${e}`,t))}async datasetTasks(e){return(await this.request(`/datasets/${e}/tasks/`)).results}async leaderboardMetrics(e,t){return(await this.request(`/datasets/${e}/tasks/${t}/metrics`)).metrics}metricDirections(){return this.request("/metrics/directions")}conferences(){return this.request("/conferences/")}conferenceDeadlines(){return this.request("/conferences/deadlines")}getConference(e){return this.request(`/conferences/${e}`)}conferenceAreasWithTasks(e){return this.request(`/conferences/${e}/areas-with-tasks`)}organizations(e=!1){return this.request(`/organizations/${e?"?featured_only=true":""}`)}organizationIndex(){return this.request("/organizations/index/cards")}getOrganization(e){return this.request(`/organizations/${e}`)}organizationContributions(e){return this.request(`/organizations/${e}/contributions`)}organizationAreasWithTasks(e){return this.request(`/organizations/${e}/areas-with-tasks`)}audit(e){return this.request(s("/admin/catalog-audit",{cursor:e}))}acknowledgeAudit(){return this.request("/admin/catalog-audit/acknowledge",{method:"POST"})}rollbackEvent(e){return this.request(`/admin/catalog-audit/${e}/rollback`,{method:"POST"})}}const c=new u(o);export{c};
assets/{chat-D9bQn_8F.js → chat-dMs5c7qZ.js} RENAMED
@@ -1 +1 @@
1
- import{Z as n,ak as s}from"./index-BJHhPv_M.js";class o{constructor(e){this.request=e}listSessions(e){const t=new URLSearchParams({limit:"50"});return e&&t.set("cursor",e),this.request(`/chat/sessions?${t.toString()}`)}createSession(e,t="low"){return this.request("/chat/sessions",{method:"POST",body:JSON.stringify({selected_model:e||null,reasoning_effort:t})})}getSession(e){return this.request(`/chat/sessions/${e}`)}updateSession(e,t){return this.request(`/chat/sessions/${e}`,{method:"PATCH",body:JSON.stringify(t)})}removeSession(e){return this.request(`/chat/sessions/${e}`,{method:"DELETE"})}archiveOldChats(){return this.request("/chat/sessions/archive-old",{method:"POST"})}archiveOldestChats(){return this.request("/chat/sessions/archive-oldest",{method:"POST"})}cancelSession(e){return this.request(`/chat/sessions/${e}/cancel`,{method:"POST"})}createOrRefreshShare(e){return this.request(`/chat/sessions/${e}/share`,{method:"POST"})}getSharedChat(e){return this.request(`/chat/shares/${encodeURIComponent(e)}`,{credentials:"omit"})}getModels(){return this.request("/chat/models")}getUsage(){return this.request("/chat/usage",{cache:"no-store"})}getAvailability(){return this.request("/chat/availability",{cache:"no-store"})}getInferenceBilling(){return this.request("/me/inference-billing",{cache:"no-store"})}selectInferenceBillingAccount(e){return this.request("/me/inference-billing",{method:"PATCH",body:JSON.stringify({bill_to:e})})}prewarmPaperContext(e){return this.request("/chat/paper-context/prewarm",{method:"POST",body:JSON.stringify({route_id:e}),credentials:"omit",cache:"no-store"})}getSandboxSpend(e){const t=e?`?environment=${encodeURIComponent(e)}`:"";return this.request(`/chat/admin/sandbox-spend${t}`,{cache:"no-store"})}getWebSearchBudget(){return this.request("/chat/admin/web-search-budget",{cache:"no-store"})}getOpenRouterCredential(){return this.request("/chat/openrouter-key",{cache:"no-store"})}connectOpenRouterCredential(e){return this.request("/chat/openrouter-key",{method:"PUT",body:JSON.stringify({api_key:e})})}setOpenRouterFallback(e){return this.request("/chat/openrouter-key",{method:"PATCH",body:JSON.stringify({enabled:e})})}disconnectOpenRouterCredential(){return this.request("/chat/openrouter-key",{method:"DELETE"})}reportLatency(e,t){return s(`/chat/latency/${encodeURIComponent(e)}`,{method:"POST",keepalive:!0,body:JSON.stringify(t)})}reportFeedback(e,t,r){return this.request(`/chat/messages/${encodeURIComponent(e)}/feedback`,{method:"POST",body:JSON.stringify({value:t,...r?{comment:r}:{}})})}stream(e,t){return s("/chat/stream",{method:"POST",headers:{Accept:"text/event-stream"},body:JSON.stringify(e),signal:t})}resumeStream(e,t){return s(`/chat/sessions/${encodeURIComponent(e)}/stream`,{method:"GET",headers:{Accept:"text/event-stream"},signal:t})}}const h=new o(n);export{h as c};
 
1
+ import{Z as n,ak as s}from"./index-BfGRWIiQ.js";class o{constructor(e){this.request=e}listSessions(e){const t=new URLSearchParams({limit:"50"});return e&&t.set("cursor",e),this.request(`/chat/sessions?${t.toString()}`)}createSession(e,t="low"){return this.request("/chat/sessions",{method:"POST",body:JSON.stringify({selected_model:e||null,reasoning_effort:t})})}getSession(e){return this.request(`/chat/sessions/${e}`)}updateSession(e,t){return this.request(`/chat/sessions/${e}`,{method:"PATCH",body:JSON.stringify(t)})}removeSession(e){return this.request(`/chat/sessions/${e}`,{method:"DELETE"})}archiveOldChats(){return this.request("/chat/sessions/archive-old",{method:"POST"})}archiveOldestChats(){return this.request("/chat/sessions/archive-oldest",{method:"POST"})}cancelSession(e){return this.request(`/chat/sessions/${e}/cancel`,{method:"POST"})}createOrRefreshShare(e){return this.request(`/chat/sessions/${e}/share`,{method:"POST"})}getSharedChat(e){return this.request(`/chat/shares/${encodeURIComponent(e)}`,{credentials:"omit"})}getModels(){return this.request("/chat/models")}getUsage(){return this.request("/chat/usage",{cache:"no-store"})}getAvailability(){return this.request("/chat/availability",{cache:"no-store"})}getInferenceBilling(){return this.request("/me/inference-billing",{cache:"no-store"})}selectInferenceBillingAccount(e){return this.request("/me/inference-billing",{method:"PATCH",body:JSON.stringify({bill_to:e})})}prewarmPaperContext(e){return this.request("/chat/paper-context/prewarm",{method:"POST",body:JSON.stringify({route_id:e}),credentials:"omit",cache:"no-store"})}getSandboxSpend(e){const t=e?`?environment=${encodeURIComponent(e)}`:"";return this.request(`/chat/admin/sandbox-spend${t}`,{cache:"no-store"})}getWebSearchBudget(){return this.request("/chat/admin/web-search-budget",{cache:"no-store"})}getOpenRouterCredential(){return this.request("/chat/openrouter-key",{cache:"no-store"})}connectOpenRouterCredential(e){return this.request("/chat/openrouter-key",{method:"PUT",body:JSON.stringify({api_key:e})})}setOpenRouterFallback(e){return this.request("/chat/openrouter-key",{method:"PATCH",body:JSON.stringify({enabled:e})})}disconnectOpenRouterCredential(){return this.request("/chat/openrouter-key",{method:"DELETE"})}reportLatency(e,t){return s(`/chat/latency/${encodeURIComponent(e)}`,{method:"POST",keepalive:!0,body:JSON.stringify(t)})}reportFeedback(e,t,r){return this.request(`/chat/messages/${encodeURIComponent(e)}/feedback`,{method:"POST",body:JSON.stringify({value:t,...r?{comment:r}:{}})})}stream(e,t){return s("/chat/stream",{method:"POST",headers:{Accept:"text/event-stream"},body:JSON.stringify(e),signal:t})}resumeStream(e,t){return s(`/chat/sessions/${encodeURIComponent(e)}/stream`,{method:"GET",headers:{Accept:"text/event-stream"},signal:t})}}const h=new o(n);export{h as c};
assets/chatLaunch--jg98Oug.js DELETED
@@ -1,9 +0,0 @@
1
- import{d as ae,j as a,A as ce,r as j,C as le,z as h}from"./index-BJHhPv_M.js";import{c as m}from"./chat-D9bQn_8F.js";import{C as ue}from"./chevron-down-BVyqIjKu.js";import{u as pe}from"./useQuery-B9A-sza5.js";import{p as de}from"./papers-CWyBrS8M.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 he=ae("Earth",[["path",{d:"M21.54 15H17a2 2 0 0 0-2 2v4.54",key:"1djwo0"}],["path",{d:"M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17",key:"1tzkfa"}],["path",{d:"M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05",key:"14pb5j"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]),Ie=({light:e})=>a.jsx("span",{className:`chat-spinner${e?" chat-spinner-light":""}`}),Pe=({open:e})=>a.jsx("svg",{className:`chat-chev${e?" chat-chev-open":""}`,width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:a.jsx("path",{d:"m6 9 6 6 6-6"})}),Ae=()=>a.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[a.jsx("circle",{cx:"12",cy:"12",r:"9"}),a.jsx("path",{d:"m9 12 2 2 4-4"})]}),je=({size:e=14})=>a.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[a.jsx("circle",{cx:"11",cy:"11",r:"7"}),a.jsx("path",{d:"m21 21-4.3-4.3"})]}),Me=()=>a.jsx("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",children:a.jsx("path",{d:"M12 19V5M5 12l7-7 7 7"})}),Te=()=>a.jsx("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:a.jsx("path",{d:"M12 5v14M5 12h14"})}),Oe=()=>a.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",children:[a.jsx("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),a.jsx("path",{d:"M9 4v16"})]}),De=()=>a.jsx("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:a.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"})}),$="gpt-5.6-luna@openai",G="deepseek-ai/DeepSeek-V4-Flash-0731",z="openai/gpt-5.6-luna";function Ne(e,r){var t;return((t=e.find(n=>n.id===r))==null?void 0:t.provider)??(r===z?"openrouter":r===$?"openai":"huggingface")}function fe(e,r){var t;return((t=e.find(n=>n.id===r))==null?void 0:t.label)??(r===z?"GPT-5.6 Luna (Legacy OpenRouter)":r===$?"GPT-5.6 Luna":`${r} (unavailable)`)}const Re=[{id:$,label:"GPT-5.6 Luna",provider:"openai"},{id:G,label:"DeepSeek V4 Flash",provider:"huggingface"}],Le=[{id:G,label:"DeepSeek V4 Flash",provider:"huggingface"},{id:"moonshotai/Kimi-K3",label:"Kimi K3",provider:"huggingface"},{id:"gpt-5.6-luna@openrouter",label:"GPT-5.6 Luna",provider:"openrouter"},{id:"gpt-5.6-luna@openai",label:"GPT-5.6 Luna (Direct)",provider:"openai"}];class ge extends Error{constructor(r,t){super(r),this.status=t}}async function Fe(){const e=[];let r=null;do{const t=await m.listSessions(r);e.push(...t.items),r=t.next_cursor}while(r&&e.length<100);return e}function $e(e,r="low"){return m.createSession(e,r)}function He(e){return m.getSession(e)}function Be(e,r){return m.updateSession(e,r)}function We(e){return m.removeSession(e)}function qe(){return m.archiveOldChats()}function Ve(){return m.archiveOldestChats()}function Ye(e){return m.cancelSession(e)}function Ke(e){return m.createOrRefreshShare(e)}async function Ue(e){try{return await m.getSharedChat(e)}catch(r){throw r instanceof ce?new ge(r.message,r.status):r}}async function Ge(){return m.getModels()}function F(e,r){const t=e.map(n=>n.kind==="reasoning"?{...n,active:!1,open:!1}:n.kind==="tool"?{...n,status:n.status==="running"?"error":n.status,open:r&&(n.status==="error"||n.status==="denied"||n.status==="running")}:n.kind==="app"?{...n,schema_version:1,result:n.result??{content:[],structuredContent:{},isError:!1},csp:n.csp??{},permissions:n.permissions??{clipboardWrite:!0},height:n.height||525,public_fork:!!n.public_fork}:n.kind==="artifact"?{...n}:{...n,done:!0});return t.filter((n,o)=>{const c=t[o-1];return!(n.kind==="reasoning"&&(c==null?void 0:c.kind)==="reasoning"&&n.text===c.text)})}function Q(e){if(e!=null&&e.text)return{routeId:e.route_id,paperVersion:e.paper_version,page:e.page,text:e.text}}function ze(e){const r=t=>t==="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.":t==="hf_inference_credential_expired"?"Your Hugging Face Inference Providers authorization is missing or expired. Re-sign in with Hugging Face to continue.":t==="provider_rate_limit"?"The selected model is temporarily rate-limited. Try again shortly.":t==="provider_timeout"?"The model provider timed out. Try again shortly.":t==="openrouter_monthly_budget_exhausted"?"The remaining shared Papers With Code OpenRouter allowance was not enough to continue this response.":t==="openrouter_staging_funding_disabled"?"Shared staging credits have ended because chat is now live on paperswithcode.co. Continue there with your included monthly allowance.":t==="openrouter_unavailable"?"OpenRouter is currently unavailable. However, you can still bring your own key in Settings.":t==="openrouter_byok_credential_invalid"?"Your OpenRouter API key is no longer valid. Reconnect it in Settings, then try again.":t==="openrouter_byok_billing_error"?"Your OpenRouter key is connected, but OpenRouter rejected billing for the account behind it. A key spending limit is not an account credit balance. Add credits or enable pay-as-you-go in OpenRouter, then try again.":t==="openrouter_byok_rate_limit"?"Your OpenRouter API key is temporarily rate-limited.":["provider_error","provider_unavailable"].includes(t??"")?"The model provider failed before completing the response. You can edit and retry your question.":t==="persistence_error"?"The response could not be saved. You can edit and retry your question.":t==="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 e.messages.flatMap(t=>{if(t.role==="assistant")return[{id:t.id,role:"assistant",blocks:F(t.display_blocks,!0),followups:t.followups,citations:t.citations,finishReason:t.finish_reason??void 0,streaming:!1}];const n={id:t.id,role:"user",text:t.content,paperMentions:(t.paper_mentions??[]).map(c=>({...c,key:c.occurrence_id})),paperSelection:Q(t.paper_selection),revision:t.revision,status:t.status,error:t.status==="complete"?void 0:t.error_code||t.status};if(!["error","interrupted"].includes(t.status))return[n];const o=t.status==="interrupted";return[n,{id:`${t.id}-${o?"interrupted":"error"}`,role:"assistant",blocks:F(t.display_blocks,!0),streaming:!1,finishReason:o?"stopped":void 0,error:o?void 0:r(t.error_code),errorCode:o?void 0:t.error_code??void 0}]})}function Qe(e){return e.messages.map(r=>r.role==="user"?{id:r.id,role:"user",text:r.content,paperMentions:(r.paper_mentions??[]).map(t=>({...t,key:t.occurrence_id})),paperSelection:Q(r.paper_selection)}:{id:r.id,role:"assistant",blocks:F(r.display_blocks,!1),citations:r.citations,finishReason:r.finish_reason??void 0,error:r.error??void 0,streaming:!1})}function Xe(e){const r=Date.now(),t=new Date().setHours(0,0,0,0),n=[{label:"Today",items:[]},{label:"Previous 7 Days",items:[]},{label:"Previous 30 Days",items:[]},{label:"Older",items:[]}];for(const o of[...e].sort((c,i)=>Date.parse(i.updated_at)-Date.parse(c.updated_at))){const c=Date.parse(o.updated_at),i=r-c;c>=t?n[0].items.push(o):i<7*864e5?n[1].items.push(o):i<30*864e5?n[2].items.push(o):n[3].items.push(o)}return n.filter(o=>o.items.length>0)}const me=[{provider:"huggingface",label:"Hugging Face Inference Providers"},{provider:"openrouter",label:"OpenRouter"},{provider:"openai",label:"OpenAI"}],Je=({models:e,selectedModel:r,onModelChange:t,disabled:n})=>{var i;const o=fe(e,r),c=e.filter(s=>!s.provider);return e.length===1&&((i=e[0])==null?void 0:i.id)===r?a.jsx("span",{className:"chat-model-label","aria-label":"Research model",children:o}):a.jsxs("span",{className:`chat-model-picker${n?" is-disabled":""}`,children:[a.jsx("span",{className:"chat-model-picker-sizer","aria-hidden":"true",children:o}),a.jsxs("select",{className:"chat-model-select",value:r,disabled:n,onChange:s=>t(s.target.value),"aria-label":"Research model",children:[!e.some(s=>s.id===r)&&a.jsx("option",{value:r,disabled:!0,children:o}),c.map(s=>a.jsx("option",{value:s.id,children:s.label},s.id)),me.map(({provider:s,label:p})=>{const d=e.filter(u=>u.provider===s);return d.length===0?null:a.jsx("optgroup",{label:p,children:d.map(u=>a.jsx("option",{value:u.id,children:u.label},u.id))},s)})]}),a.jsx("svg",{className:"chat-model-picker-chevron",viewBox:"0 0 12 8","aria-hidden":"true",children:a.jsx("path",{d:"m1 1 5 5 5-5"})})]})},L=[{value:"low",label:"Low",description:"Faster and more concise"},{value:"high",label:"High",description:"More thorough"},{value:"max",label:"Max",description:"Deepest and slowest"}],Ze=({value:e,onChange:r,disabled:t=!1})=>{const[n,o]=j.useState(!1),c=j.useRef(null),i=L.find(s=>s.value===e)??L[0];return j.useEffect(()=>{if(!n)return;const s=d=>{var u;(u=c.current)!=null&&u.contains(d.target)||o(!1)},p=d=>{d.key==="Escape"&&o(!1)};return document.addEventListener("mousedown",s),document.addEventListener("keydown",p),()=>{document.removeEventListener("mousedown",s),document.removeEventListener("keydown",p)}},[n]),j.useEffect(()=>{t&&o(!1)},[t]),a.jsxs("div",{className:"chat-effort-picker",ref:c,children:[a.jsxs("button",{type:"button",className:"chat-effort-trigger","aria-label":`Reasoning effort: ${i.label}`,"aria-haspopup":"listbox","aria-expanded":n,disabled:t,onClick:()=>o(s=>!s),children:[a.jsx("span",{children:i.label}),a.jsx(ue,{size:13,"aria-hidden":"true"})]}),n&&a.jsxs("div",{className:"chat-effort-menu",role:"listbox","aria-label":"Reasoning effort",children:[a.jsx("div",{className:"chat-effort-menu-label","aria-hidden":"true",children:"Reasoning effort"}),L.map(s=>a.jsxs("button",{type:"button",className:`chat-effort-option${s.value===e?" is-selected":""}`,role:"option","aria-selected":s.value===e,onClick:()=>{r(s.value),o(!1)},children:[a.jsxs("span",{className:"chat-effort-option-copy",children:[a.jsx("strong",{children:s.label}),a.jsx("small",{children:s.description})]}),s.value===e&&a.jsx(le,{size:15,"aria-hidden":"true"})]},s.value))]})]})},et=({text:e,mentions:r,scrollTop:t=0,variant:n="composer"})=>{const o=[];let c=0;for(const i of[...r].sort((s,p)=>s.start-p.start)){const s=e.slice(i.start,i.end),p=s===i.title||s===`@${i.title}`;i.start<c||i.end>e.length||!p||(o.push(e.slice(c,i.start)),o.push(a.jsx("span",{className:`chat-paper-inline-highlight${i.unavailable?" is-unavailable":""}`,"data-paper-route-id":i.route_id,children:s},i.key)),c=i.end)}return o.push(e.slice(c)),e.endsWith(`
7
- `)&&o.push("​"),a.jsx("div",{"aria-hidden":"true",className:`chat-paper-highlight-layer chat-paper-highlight-layer-${n}`,children:a.jsx("div",{style:{transform:`translateY(-${t}px)`},children:o})})},tt=({open:e,query:r,results:t,activeIndex:n,loading:o,error:c,onSelect:i,id:s="chat-paper-picker",optionIdPrefix:p="chat-paper-option"})=>{if(!e)return null;const d=r.trim()?o?"Searching papers…":c?"Paper search is unavailable":t.length?`${t.length} paper${t.length===1?"":"s"} found`:"No papers found":"Type to search papers";return a.jsxs("div",{className:"chat-paper-picker",id:s,role:"listbox","aria-label":"Paper results",children:[a.jsx("div",{className:"chat-paper-picker-status",role:"status","aria-live":"polite",children:d}),t.map((u,g)=>{const N=u.arxiv_id||u.id,b=u.arxiv_id||(()=>{try{return u.source_url?new URL(u.source_url).hostname:"External resource"}catch{return"External resource"}})();return a.jsxs("button",{type:"button",id:`${p}-${g}`,role:"option","aria-selected":g===n,className:`chat-paper-option${g===n?" is-active":""}`,onMouseDown:P=>{P.preventDefault(),i(u)},children:[a.jsx("span",{className:"chat-paper-option-title",children:u.title}),a.jsx("span",{className:"chat-paper-option-meta",children:b})]},N)})]})},X=8e3,J=16384,Z=1e4,S={crossPage:"Select text within one PDF page.",outside:"Select text from the paper, not the surrounding interface.",tooLarge:"Select a shorter passage (maximum 8,000 characters)."};function ee(e){return new TextEncoder().encode(e).length}function te(e){return e.replace(/\r\n/g,`
8
- `).replace(/\r/g,`
9
- `).replace(/\u00a0/g," ").replace(/[^\S\n]+/g," ").trim()}function rt(e){return`${e.routeId}\0${e.paperVersion}\0${e.page}\0${e.text}`}function nt(e){return{route_id:e.routeId,paper_version:e.paperVersion,page:e.page,text:e.text}}function I(e="",r){return r?{text:e,paperMentions:[],paperSelection:r}:{text:e,paperMentions:[]}}function V(e,r,t){return e.paperSelection?{text:r,paperMentions:t,paperSelection:e.paperSelection}:{text:r,paperMentions:t}}function ve(e){if(!e||typeof e!="object")return;const r=e;if(typeof r.routeId!="string"||!r.routeId.trim()||typeof r.paperVersion!="string"||!r.paperVersion.trim())return;const t=r.page;if(typeof t!="number"||!Number.isInteger(t)||t<1||t>Z||typeof r.text!="string")return;const n=te(r.text);if(n&&!(n.length>X)&&!(ee(n)>J))return{routeId:r.routeId.trim(),paperVersion:r.paperVersion.trim(),page:t,text:n}}function ye(e,r){if(typeof e=="string")return I(e);if(!e||typeof e!="object")return r===void 0?null:I(r);const t=e;if(typeof t.text!="string"||!Array.isArray(t.paperMentions))return r===void 0?null:I(r);const n=ve(t.paperSelection);return n?{text:t.text,paperMentions:t.paperMentions,paperSelection:n}:{text:t.text,paperMentions:t.paperMentions}}function re(e){return e?e instanceof Element?e:e.parentElement:null}function Y(e,r){const t=re(e);if(!t||!r.contains(t)||!t.closest(".textLayer"))return null;const n=t.closest(".pdf-page[data-page]");if(!n||!r.contains(n))return null;const o=Number(n.dataset.page);return!Number.isInteger(o)||o<1||o>Z?null:o}function st(e){const{selection:r,pagesRoot:t,routeId:n,paperVersion:o,numPages:c}=e;if(!t||!r||r.rangeCount!==1)return r&&r.rangeCount>1?{ok:!1,error:S.crossPage}:{ok:!1,error:null};const i=r.getRangeAt(0);if(i.collapsed)return{ok:!1,error:null};const s=Y(i.startContainer,t),p=Y(i.endContainer,t),d=re(i.commonAncestorContainer);if(!d||!t.contains(d))return{ok:!1,error:S.outside};if(s===null||p===null)return{ok:!1,error:S.outside};if(s!==p)return{ok:!1,error:S.crossPage};if(c&&(s<1||s>c))return{ok:!1,error:S.crossPage};const u=r.toString(),g=te(u);return g?g.length>X||ee(g)>J?{ok:!1,error:S.tooLarge}:{ok:!0,selection:{routeId:n,paperVersion:o,page:s,text:g}}:{ok:!1,error:S.crossPage}}const xe=10,_e=3;function K(e,r){const n=e.slice(0,r).lastIndexOf("@");if(n<0)return null;const o=n>0?e[n-1]:"";if(o&&/[\p{L}\p{M}\p{N}_@]/u.test(o))return null;const c=e.slice(n+1,r);return/[\n\r@]/.test(c)?null:{start:n,end:r,query:c}}function U(e,r,t){let n=0;for(;n<e.length&&n<r.length&&e[n]===r[n];)n+=1;let o=0;for(;o<e.length-n&&o<r.length-n&&e[e.length-1-o]===r[r.length-1-o];)o+=1;const c=e.length-o,i=r.length-e.length;return t.flatMap(s=>s.end<=n?[s]:s.start>=c?[{...s,start:s.start+i,end:s.end+i}]:[])}function ot({draft:e,onChange:r,enabled:t,textareaRef:n}){var B;const o=`chat-paper-picker-${h.useId().replace(/:/g,"")}`,c=`${o}-option`,[i,s]=h.useState(null),[p,d]=h.useState(""),[u,g]=h.useState(0),[N,b]=h.useState(""),P=h.useRef(new Set);h.useEffect(()=>{t||s(null)},[t]),h.useEffect(()=>{const l=window.setTimeout(()=>d((i==null?void 0:i.query.trim())??""),150);return()=>window.clearTimeout(l)},[i==null?void 0:i.query]);const w=pe({queryKey:["chat-paper-mention-search",p.toLowerCase()],queryFn:({signal:l})=>de.search(p,1,10,"hybrid",l),enabled:t&&!!i&&p.length>=1,staleTime:3e4,refetchOnWindowFocus:!1,retry:!1}),v=h.useMemo(()=>{var l;return((l=w.data)==null?void 0:l.results)??[]},[(B=w.data)==null?void 0:B.results]);h.useEffect(()=>g(0),[p]),h.useEffect(()=>{var l;(l=document.getElementById(`${c}-${u}`))==null||l.scrollIntoView({block:"nearest"})},[u,c]);const ne=h.useCallback(l=>{var y;if(!t){s(null);return}const f=l??((y=n.current)==null?void 0:y.selectionStart)??e.text.length;if(e.paperMentions.some(x=>f>x.start&&f<=x.end)){s(null);return}s(K(e.text,f))},[e.paperMentions,e.text,t,n]),se=h.useCallback((l,f)=>{var k;const y=U(e.text,l,e.paperMentions),x=V(e,l,y);r(x);const _=f??((k=n.current)==null?void 0:k.selectionStart)??l.length;t&&!y.some(C=>_>C.start&&_<=C.end)?s(K(l,_)):s(null)},[e,t,r,n]),R=h.useCallback(l=>{if(!i)return!1;const f=l.arxiv_id||l.id,y=new Set(e.paperMentions.map(E=>E.route_id));if(e.paperMentions.length>=xe)return b("A message can contain at most 10 paper mentions."),!1;if(!y.has(f)&&y.size>=_e)return b("A message can attach at most 3 distinct papers."),!1;const x=l.title,_=e.text.slice(i.end),k=_.length===0,C=e.text.slice(0,i.start)+x+(k?" ":"")+_,ie=U(e.text,C,e.paperMentions),W={key:crypto.randomUUID(),route_id:f,title:l.title,source:l.source==="external"?"external":"arxiv",start:i.start,end:i.start+x.length};return r(V(e,C,[...ie,W].sort((E,A)=>E.start-A.start))),s(null),b(""),window.requestAnimationFrame(()=>{var A,q;const E=W.end+(k||_.startsWith(" ")?1:0);(A=n.current)==null||A.focus(),(q=n.current)==null||q.setSelectionRange(E,E)}),P.current.has(f)||(P.current.add(f),m.prewarmPaperContext(f).catch(()=>{})),!0},[i,e,r,n]),oe=h.useCallback(l=>!i||l.nativeEvent.isComposing?!1:l.key==="Tab"?(s(null),!1):l.key==="Escape"?(l.preventDefault(),s(null),!0):l.key==="ArrowDown"||l.key==="ArrowUp"?(l.preventDefault(),v.length&&g(f=>l.key==="ArrowDown"?(f+1)%v.length:(f-1+v.length)%v.length),!0):l.key==="Home"&&v.length?(l.preventDefault(),g(0),!0):l.key==="End"&&v.length?(l.preventDefault(),g(v.length-1),!0):l.key==="Enter"&&!l.shiftKey?(l.preventDefault(),v[u]?R(v[u]):w.isFetching||s(null),!0):!1,[i,u,v,w.isFetching,R]);return{open:!!i,query:(i==null?void 0:i.query)??"",results:v,activeIndex:u,loading:w.isFetching,error:w.isError,message:N,pickerId:o,optionIdPrefix:c,updateText:se,refresh:ne,select:R,keyDown:oe,close:()=>s(null)}}const it=({enabled:e,onChange:r,disabled:t=!1})=>a.jsxs("button",{type:"button",className:`chat-web-search-toggle${e?" is-enabled":""}`,role:"switch","aria-checked":e,"aria-label":"Web search",title:"Allow public-web search when useful; enabled search queries are processed by Exa",disabled:t,onClick:()=>r(!e),children:[a.jsx(he,{size:15,"aria-hidden":"true"}),a.jsx("span",{children:"Web"})]}),H="pwc:chat-oauth-draft",M="pwc:chat-oauth-model",T="pwc:chat-oauth-auto-send",Se="pwc:chat-oauth-attempted",O="pwc:chat-web-search-enabled",D="pwc:chat-reasoning-effort";function at(e,r,t={}){const n=typeof e=="string"?e:e.text,o=n.length-n.trimStart().length,c=n.trim();if(!c)return;const i=o+c.length,s=typeof e=="string"?[]:e.paperMentions.filter(d=>d.start>=o&&d.end<=i).map(d=>({...d,start:d.start-o,end:d.end-o})),p={text:c,paperMentions:s,...typeof e!="string"&&e.paperSelection?{paperSelection:e.paperSelection}:{}};sessionStorage.setItem(H,p.paperMentions.length||p.paperSelection?JSON.stringify(p):c),t.autoSend===!1?sessionStorage.removeItem(T):sessionStorage.setItem(T,"1"),r?sessionStorage.setItem(M,r):sessionStorage.removeItem(M),t.webSearchEnabled?sessionStorage.setItem(O,"1"):sessionStorage.removeItem(O),sessionStorage.setItem(D,t.reasoningEffort??"low")}function ct(){var n;if(typeof window>"u"||sessionStorage.getItem(T)!=="1")return null;const e=(n=sessionStorage.getItem(H))==null?void 0:n.trim();if(!e)return null;let r=I(e);try{r=ye(JSON.parse(e),e)??I(e)}catch{}const t=r.text.trim();return t?{prompt:t,draft:{...r,text:t},model:sessionStorage.getItem(M),webSearchEnabled:sessionStorage.getItem(O)==="1",reasoningEffort:["low","high","max"].includes(sessionStorage.getItem(D)??"")?sessionStorage.getItem(D):"low"}:null}function lt(){sessionStorage.removeItem(H),sessionStorage.removeItem(M),sessionStorage.removeItem(T),sessionStorage.removeItem(Se),sessionStorage.removeItem(O),sessionStorage.removeItem(D)}export{Me as A,Se as B,ge as C,$ as D,lt as E,Ge as F,ye as G,Be as H,We as I,st as J,rt as K,Ae as L,Je as M,Pe as N,je as O,et as P,Ze as R,Le as S,De as T,it as W,Re as a,tt as b,$e as c,Ie as d,Te as e,Oe as f,Ue as g,Xe as h,Ke as i,Ve as j,qe as k,I as l,Ye as m,He as n,ze as o,Qe as p,at as q,ct as r,Ne as s,nt as t,ot as u,Fe as v,H as w,M as x,D as y,T as z};
 
 
 
 
 
 
 
 
 
 
assets/chatLaunch-BxzD44NH.js ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ import{d as ie,j as a,A as ae,r as P,C as ce,z as h}from"./index-BfGRWIiQ.js";import{c as m}from"./chat-dMs5c7qZ.js";import{C as le}from"./chevron-down-BovmCLHU.js";import{u as ue}from"./useQuery-uhyHf514.js";import{p as pe}from"./papers-PnGxH-RF.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 de=ie("Earth",[["path",{d:"M21.54 15H17a2 2 0 0 0-2 2v4.54",key:"1djwo0"}],["path",{d:"M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17",key:"1tzkfa"}],["path",{d:"M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05",key:"14pb5j"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]),Me=({light:e})=>a.jsx("span",{className:`chat-spinner${e?" chat-spinner-light":""}`}),Ae=({open:e})=>a.jsx("svg",{className:`chat-chev${e?" chat-chev-open":""}`,width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:a.jsx("path",{d:"m6 9 6 6 6-6"})}),Pe=()=>a.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[a.jsx("circle",{cx:"12",cy:"12",r:"9"}),a.jsx("path",{d:"m9 12 2 2 4-4"})]}),Te=({size:e=14})=>a.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[a.jsx("circle",{cx:"11",cy:"11",r:"7"}),a.jsx("path",{d:"m21 21-4.3-4.3"})]}),je=()=>a.jsx("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",children:a.jsx("path",{d:"M12 19V5M5 12l7-7 7 7"})}),Oe=()=>a.jsx("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:a.jsx("path",{d:"M12 5v14M5 12h14"})}),De=()=>a.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",children:[a.jsx("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),a.jsx("path",{d:"M9 4v16"})]}),Ne=()=>a.jsx("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:a.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"})}),H="gpt-5.6-luna@openai",he="deepseek-ai/DeepSeek-V4-Flash-0731",fe="zai-org/GLM-5.3-Flash",U="openai/gpt-5.6-luna";function Re(e,r){var t;return((t=e.find(n=>n.id===r))==null?void 0:t.provider)??(r===U?"openrouter":r===H?"openai":"huggingface")}function ge(e,r){var t;return((t=e.find(n=>n.id===r))==null?void 0:t.label)??(r===U?"GPT-5.6 Luna (Legacy OpenRouter)":r===H?"GPT-5.6 Luna":`${r} (unavailable)`)}const Le=[{id:H,label:"GPT-5.6 Luna",provider:"openai"},{id:fe,label:"GLM-5.3-Flash",provider:"huggingface"}],Fe=[{id:he,label:"DeepSeek V4 Flash",provider:"huggingface"},{id:"moonshotai/Kimi-K3",label:"Kimi K3",provider:"huggingface"},{id:"gpt-5.6-luna@openrouter",label:"GPT-5.6 Luna",provider:"openrouter"},{id:"gpt-5.6-luna@openai",label:"GPT-5.6 Luna (Direct)",provider:"openai"}];class me extends Error{constructor(r,t){super(r),this.status=t}}async function He(){const e=[];let r=null;do{const t=await m.listSessions(r);e.push(...t.items),r=t.next_cursor}while(r&&e.length<100);return e}function $e(e,r="low"){return m.createSession(e,r)}function Be(e){return m.getSession(e)}function We(e,r){return m.updateSession(e,r)}function qe(e){return m.removeSession(e)}function Ye(){return m.archiveOldChats()}function Ke(){return m.archiveOldestChats()}function Ve(e){return m.cancelSession(e)}function Ge(e){return m.createOrRefreshShare(e)}async function Ue(e){try{return await m.getSharedChat(e)}catch(r){throw r instanceof ae?new me(r.message,r.status):r}}async function ze(){return m.getModels()}function F(e,r){const t=e.map(n=>n.kind==="reasoning"?{...n,active:!1,open:!1}:n.kind==="tool"?{...n,status:n.status==="running"?"error":n.status,open:r&&(n.status==="error"||n.status==="denied"||n.status==="running")}:n.kind==="app"?{...n,schema_version:1,result:n.result??{content:[],structuredContent:{},isError:!1},csp:n.csp??{},permissions:n.permissions??{clipboardWrite:!0},height:n.height||525,public_fork:!!n.public_fork}:n.kind==="artifact"?{...n}:{...n,done:!0});return t.filter((n,o)=>{const c=t[o-1];return!(n.kind==="reasoning"&&(c==null?void 0:c.kind)==="reasoning"&&n.text===c.text)})}function z(e){if(e!=null&&e.text)return{routeId:e.route_id,paperVersion:e.paper_version,page:e.page,text:e.text}}function Qe(e){const r=t=>t==="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.":t==="hf_inference_credential_expired"?"Your Hugging Face Inference Providers authorization is missing or expired. Re-sign in with Hugging Face to continue.":t==="provider_rate_limit"?"The selected model is temporarily rate-limited. Try again shortly.":t==="provider_timeout"?"The model provider timed out. Try again shortly.":t==="openrouter_monthly_budget_exhausted"?"The remaining shared Papers With Code OpenRouter allowance was not enough to continue this response.":t==="openrouter_staging_funding_disabled"?"Shared staging credits have ended because chat is now live on paperswithcode.co. Continue there with your included monthly allowance.":t==="openrouter_unavailable"?"OpenRouter is currently unavailable. However, you can still bring your own key in Settings.":t==="openrouter_byok_credential_invalid"?"Your OpenRouter API key is no longer valid. Reconnect it in Settings, then try again.":t==="openrouter_byok_billing_error"?"Your OpenRouter key is connected, but OpenRouter rejected billing for the account behind it. A key spending limit is not an account credit balance. Add credits or enable pay-as-you-go in OpenRouter, then try again.":t==="openrouter_byok_rate_limit"?"Your OpenRouter API key is temporarily rate-limited.":["provider_error","provider_unavailable"].includes(t??"")?"The model provider failed before completing the response. You can edit and retry your question.":t==="persistence_error"?"The response could not be saved. You can edit and retry your question.":t==="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 e.messages.flatMap(t=>{if(t.role==="assistant")return[{id:t.id,role:"assistant",blocks:F(t.display_blocks,!0),followups:t.followups,citations:t.citations,finishReason:t.finish_reason??void 0,streaming:!1}];const n={id:t.id,role:"user",text:t.content,paperMentions:(t.paper_mentions??[]).map(c=>({...c,key:c.occurrence_id})),paperSelection:z(t.paper_selection),revision:t.revision,status:t.status,error:t.status==="complete"?void 0:t.error_code||t.status};if(!["error","interrupted"].includes(t.status))return[n];const o=t.status==="interrupted";return[n,{id:`${t.id}-${o?"interrupted":"error"}`,role:"assistant",blocks:F(t.display_blocks,!0),streaming:!1,finishReason:o?"stopped":void 0,error:o?void 0:r(t.error_code),errorCode:o?void 0:t.error_code??void 0}]})}function Xe(e){return e.messages.map(r=>r.role==="user"?{id:r.id,role:"user",text:r.content,paperMentions:(r.paper_mentions??[]).map(t=>({...t,key:t.occurrence_id})),paperSelection:z(r.paper_selection)}:{id:r.id,role:"assistant",blocks:F(r.display_blocks,!1),citations:r.citations,finishReason:r.finish_reason??void 0,error:r.error??void 0,streaming:!1})}function Je(e){const r=Date.now(),t=new Date().setHours(0,0,0,0),n=[{label:"Today",items:[]},{label:"Previous 7 Days",items:[]},{label:"Previous 30 Days",items:[]},{label:"Older",items:[]}];for(const o of[...e].sort((c,i)=>Date.parse(i.updated_at)-Date.parse(c.updated_at))){const c=Date.parse(o.updated_at),i=r-c;c>=t?n[0].items.push(o):i<7*864e5?n[1].items.push(o):i<30*864e5?n[2].items.push(o):n[3].items.push(o)}return n.filter(o=>o.items.length>0)}const ve=[{provider:"huggingface",label:"Hugging Face Inference Providers"},{provider:"openrouter",label:"OpenRouter"},{provider:"openai",label:"OpenAI"}],Ze=({models:e,selectedModel:r,onModelChange:t,disabled:n})=>{var i;const o=ge(e,r),c=e.filter(s=>!s.provider);return e.length===1&&((i=e[0])==null?void 0:i.id)===r?a.jsx("span",{className:"chat-model-label","aria-label":"Research model",children:o}):a.jsxs("span",{className:`chat-model-picker${n?" is-disabled":""}`,children:[a.jsx("span",{className:"chat-model-picker-sizer","aria-hidden":"true",children:o}),a.jsxs("select",{className:"chat-model-select",value:r,disabled:n,onChange:s=>t(s.target.value),"aria-label":"Research model",children:[!e.some(s=>s.id===r)&&a.jsx("option",{value:r,disabled:!0,children:o}),c.map(s=>a.jsx("option",{value:s.id,children:s.label},s.id)),ve.map(({provider:s,label:p})=>{const d=e.filter(u=>u.provider===s);return d.length===0?null:a.jsx("optgroup",{label:p,children:d.map(u=>a.jsx("option",{value:u.id,children:u.label},u.id))},s)})]}),a.jsx("svg",{className:"chat-model-picker-chevron",viewBox:"0 0 12 8","aria-hidden":"true",children:a.jsx("path",{d:"m1 1 5 5 5-5"})})]})},L=[{value:"low",label:"Low",description:"Faster and more concise"},{value:"high",label:"High",description:"More thorough"},{value:"max",label:"Max",description:"Deepest and slowest"}],et=({value:e,onChange:r,disabled:t=!1})=>{const[n,o]=P.useState(!1),c=P.useRef(null),i=L.find(s=>s.value===e)??L[0];return P.useEffect(()=>{if(!n)return;const s=d=>{var u;(u=c.current)!=null&&u.contains(d.target)||o(!1)},p=d=>{d.key==="Escape"&&o(!1)};return document.addEventListener("mousedown",s),document.addEventListener("keydown",p),()=>{document.removeEventListener("mousedown",s),document.removeEventListener("keydown",p)}},[n]),P.useEffect(()=>{t&&o(!1)},[t]),a.jsxs("div",{className:"chat-effort-picker",ref:c,children:[a.jsxs("button",{type:"button",className:"chat-effort-trigger","aria-label":`Reasoning effort: ${i.label}`,"aria-haspopup":"listbox","aria-expanded":n,disabled:t,onClick:()=>o(s=>!s),children:[a.jsx("span",{children:i.label}),a.jsx(le,{size:13,"aria-hidden":"true"})]}),n&&a.jsxs("div",{className:"chat-effort-menu",role:"listbox","aria-label":"Reasoning effort",children:[a.jsx("div",{className:"chat-effort-menu-label","aria-hidden":"true",children:"Reasoning effort"}),L.map(s=>a.jsxs("button",{type:"button",className:`chat-effort-option${s.value===e?" is-selected":""}`,role:"option","aria-selected":s.value===e,onClick:()=>{r(s.value),o(!1)},children:[a.jsxs("span",{className:"chat-effort-option-copy",children:[a.jsx("strong",{children:s.label}),a.jsx("small",{children:s.description})]}),s.value===e&&a.jsx(ce,{size:15,"aria-hidden":"true"})]},s.value))]})]})},tt=({text:e,mentions:r,scrollTop:t=0,variant:n="composer"})=>{const o=[];let c=0;for(const i of[...r].sort((s,p)=>s.start-p.start)){const s=e.slice(i.start,i.end),p=s===i.title||s===`@${i.title}`;i.start<c||i.end>e.length||!p||(o.push(e.slice(c,i.start)),o.push(a.jsx("span",{className:`chat-paper-inline-highlight${i.unavailable?" is-unavailable":""}`,"data-paper-route-id":i.route_id,children:s},i.key)),c=i.end)}return o.push(e.slice(c)),e.endsWith(`
7
+ `)&&o.push("​"),a.jsx("div",{"aria-hidden":"true",className:`chat-paper-highlight-layer chat-paper-highlight-layer-${n}`,children:a.jsx("div",{style:{transform:`translateY(-${t}px)`},children:o})})},rt=({open:e,query:r,results:t,activeIndex:n,loading:o,error:c,onSelect:i,id:s="chat-paper-picker",optionIdPrefix:p="chat-paper-option"})=>{if(!e)return null;const d=r.trim()?o?"Searching papers…":c?"Paper search is unavailable":t.length?`${t.length} paper${t.length===1?"":"s"} found`:"No papers found":"Type to search papers";return a.jsxs("div",{className:"chat-paper-picker",id:s,role:"listbox","aria-label":"Paper results",children:[a.jsx("div",{className:"chat-paper-picker-status",role:"status","aria-live":"polite",children:d}),t.map((u,g)=>{const N=u.arxiv_id||u.id,b=u.arxiv_id||(()=>{try{return u.source_url?new URL(u.source_url).hostname:"External resource"}catch{return"External resource"}})();return a.jsxs("button",{type:"button",id:`${p}-${g}`,role:"option","aria-selected":g===n,className:`chat-paper-option${g===n?" is-active":""}`,onMouseDown:M=>{M.preventDefault(),i(u)},children:[a.jsx("span",{className:"chat-paper-option-title",children:u.title}),a.jsx("span",{className:"chat-paper-option-meta",children:b})]},N)})]})},Q=8e3,X=16384,J=1e4,S={crossPage:"Select text within one PDF page.",outside:"Select text from the paper, not the surrounding interface.",tooLarge:"Select a shorter passage (maximum 8,000 characters)."};function Z(e){return new TextEncoder().encode(e).length}function ee(e){return e.replace(/\r\n/g,`
8
+ `).replace(/\r/g,`
9
+ `).replace(/\u00a0/g," ").replace(/[^\S\n]+/g," ").trim()}function nt(e){return`${e.routeId}\0${e.paperVersion}\0${e.page}\0${e.text}`}function st(e){return{route_id:e.routeId,paper_version:e.paperVersion,page:e.page,text:e.text}}function I(e="",r){return r?{text:e,paperMentions:[],paperSelection:r}:{text:e,paperMentions:[]}}function Y(e,r,t){return e.paperSelection?{text:r,paperMentions:t,paperSelection:e.paperSelection}:{text:r,paperMentions:t}}function ye(e){if(!e||typeof e!="object")return;const r=e;if(typeof r.routeId!="string"||!r.routeId.trim()||typeof r.paperVersion!="string"||!r.paperVersion.trim())return;const t=r.page;if(typeof t!="number"||!Number.isInteger(t)||t<1||t>J||typeof r.text!="string")return;const n=ee(r.text);if(n&&!(n.length>Q)&&!(Z(n)>X))return{routeId:r.routeId.trim(),paperVersion:r.paperVersion.trim(),page:t,text:n}}function xe(e,r){if(typeof e=="string")return I(e);if(!e||typeof e!="object")return r===void 0?null:I(r);const t=e;if(typeof t.text!="string"||!Array.isArray(t.paperMentions))return r===void 0?null:I(r);const n=ye(t.paperSelection);return n?{text:t.text,paperMentions:t.paperMentions,paperSelection:n}:{text:t.text,paperMentions:t.paperMentions}}function te(e){return e?e instanceof Element?e:e.parentElement:null}function K(e,r){const t=te(e);if(!t||!r.contains(t)||!t.closest(".textLayer"))return null;const n=t.closest(".pdf-page[data-page]");if(!n||!r.contains(n))return null;const o=Number(n.dataset.page);return!Number.isInteger(o)||o<1||o>J?null:o}function ot(e){const{selection:r,pagesRoot:t,routeId:n,paperVersion:o,numPages:c}=e;if(!t||!r||r.rangeCount!==1)return r&&r.rangeCount>1?{ok:!1,error:S.crossPage}:{ok:!1,error:null};const i=r.getRangeAt(0);if(i.collapsed)return{ok:!1,error:null};const s=K(i.startContainer,t),p=K(i.endContainer,t),d=te(i.commonAncestorContainer);if(!d||!t.contains(d))return{ok:!1,error:S.outside};if(s===null||p===null)return{ok:!1,error:S.outside};if(s!==p)return{ok:!1,error:S.crossPage};if(c&&(s<1||s>c))return{ok:!1,error:S.crossPage};const u=r.toString(),g=ee(u);return g?g.length>Q||Z(g)>X?{ok:!1,error:S.tooLarge}:{ok:!0,selection:{routeId:n,paperVersion:o,page:s,text:g}}:{ok:!1,error:S.crossPage}}const _e=10,Se=3;function V(e,r){const n=e.slice(0,r).lastIndexOf("@");if(n<0)return null;const o=n>0?e[n-1]:"";if(o&&/[\p{L}\p{M}\p{N}_@]/u.test(o))return null;const c=e.slice(n+1,r);return/[\n\r@]/.test(c)?null:{start:n,end:r,query:c}}function G(e,r,t){let n=0;for(;n<e.length&&n<r.length&&e[n]===r[n];)n+=1;let o=0;for(;o<e.length-n&&o<r.length-n&&e[e.length-1-o]===r[r.length-1-o];)o+=1;const c=e.length-o,i=r.length-e.length;return t.flatMap(s=>s.end<=n?[s]:s.start>=c?[{...s,start:s.start+i,end:s.end+i}]:[])}function it({draft:e,onChange:r,enabled:t,textareaRef:n}){var B;const o=`chat-paper-picker-${h.useId().replace(/:/g,"")}`,c=`${o}-option`,[i,s]=h.useState(null),[p,d]=h.useState(""),[u,g]=h.useState(0),[N,b]=h.useState(""),M=h.useRef(new Set);h.useEffect(()=>{t||s(null)},[t]),h.useEffect(()=>{const l=window.setTimeout(()=>d((i==null?void 0:i.query.trim())??""),150);return()=>window.clearTimeout(l)},[i==null?void 0:i.query]);const w=ue({queryKey:["chat-paper-mention-search",p.toLowerCase()],queryFn:({signal:l})=>pe.search(p,1,10,"hybrid",l),enabled:t&&!!i&&p.length>=1,staleTime:3e4,refetchOnWindowFocus:!1,retry:!1}),v=h.useMemo(()=>{var l;return((l=w.data)==null?void 0:l.results)??[]},[(B=w.data)==null?void 0:B.results]);h.useEffect(()=>g(0),[p]),h.useEffect(()=>{var l;(l=document.getElementById(`${c}-${u}`))==null||l.scrollIntoView({block:"nearest"})},[u,c]);const re=h.useCallback(l=>{var y;if(!t){s(null);return}const f=l??((y=n.current)==null?void 0:y.selectionStart)??e.text.length;if(e.paperMentions.some(x=>f>x.start&&f<=x.end)){s(null);return}s(V(e.text,f))},[e.paperMentions,e.text,t,n]),ne=h.useCallback((l,f)=>{var k;const y=G(e.text,l,e.paperMentions),x=Y(e,l,y);r(x);const _=f??((k=n.current)==null?void 0:k.selectionStart)??l.length;t&&!y.some(C=>_>C.start&&_<=C.end)?s(V(l,_)):s(null)},[e,t,r,n]),R=h.useCallback(l=>{if(!i)return!1;const f=l.arxiv_id||l.id,y=new Set(e.paperMentions.map(E=>E.route_id));if(e.paperMentions.length>=_e)return b("A message can contain at most 10 paper mentions."),!1;if(!y.has(f)&&y.size>=Se)return b("A message can attach at most 3 distinct papers."),!1;const x=l.title,_=e.text.slice(i.end),k=_.length===0,C=e.text.slice(0,i.start)+x+(k?" ":"")+_,oe=G(e.text,C,e.paperMentions),W={key:crypto.randomUUID(),route_id:f,title:l.title,source:l.source==="external"?"external":"arxiv",start:i.start,end:i.start+x.length};return r(Y(e,C,[...oe,W].sort((E,A)=>E.start-A.start))),s(null),b(""),window.requestAnimationFrame(()=>{var A,q;const E=W.end+(k||_.startsWith(" ")?1:0);(A=n.current)==null||A.focus(),(q=n.current)==null||q.setSelectionRange(E,E)}),M.current.has(f)||(M.current.add(f),m.prewarmPaperContext(f).catch(()=>{})),!0},[i,e,r,n]),se=h.useCallback(l=>!i||l.nativeEvent.isComposing?!1:l.key==="Tab"?(s(null),!1):l.key==="Escape"?(l.preventDefault(),s(null),!0):l.key==="ArrowDown"||l.key==="ArrowUp"?(l.preventDefault(),v.length&&g(f=>l.key==="ArrowDown"?(f+1)%v.length:(f-1+v.length)%v.length),!0):l.key==="Home"&&v.length?(l.preventDefault(),g(0),!0):l.key==="End"&&v.length?(l.preventDefault(),g(v.length-1),!0):l.key==="Enter"&&!l.shiftKey?(l.preventDefault(),v[u]?R(v[u]):w.isFetching||s(null),!0):!1,[i,u,v,w.isFetching,R]);return{open:!!i,query:(i==null?void 0:i.query)??"",results:v,activeIndex:u,loading:w.isFetching,error:w.isError,message:N,pickerId:o,optionIdPrefix:c,updateText:ne,refresh:re,select:R,keyDown:se,close:()=>s(null)}}const at=({enabled:e,onChange:r,disabled:t=!1})=>a.jsxs("button",{type:"button",className:`chat-web-search-toggle${e?" is-enabled":""}`,role:"switch","aria-checked":e,"aria-label":"Web search",title:"Allow public-web search when useful; enabled search queries are processed by Exa",disabled:t,onClick:()=>r(!e),children:[a.jsx(de,{size:15,"aria-hidden":"true"}),a.jsx("span",{children:"Web"})]}),$="pwc:chat-oauth-draft",T="pwc:chat-oauth-model",j="pwc:chat-oauth-auto-send",we="pwc:chat-oauth-attempted",O="pwc:chat-web-search-enabled",D="pwc:chat-reasoning-effort";function ct(e,r,t={}){const n=typeof e=="string"?e:e.text,o=n.length-n.trimStart().length,c=n.trim();if(!c)return;const i=o+c.length,s=typeof e=="string"?[]:e.paperMentions.filter(d=>d.start>=o&&d.end<=i).map(d=>({...d,start:d.start-o,end:d.end-o})),p={text:c,paperMentions:s,...typeof e!="string"&&e.paperSelection?{paperSelection:e.paperSelection}:{}};sessionStorage.setItem($,p.paperMentions.length||p.paperSelection?JSON.stringify(p):c),t.autoSend===!1?sessionStorage.removeItem(j):sessionStorage.setItem(j,"1"),r?sessionStorage.setItem(T,r):sessionStorage.removeItem(T),t.webSearchEnabled?sessionStorage.setItem(O,"1"):sessionStorage.removeItem(O),sessionStorage.setItem(D,t.reasoningEffort??"low")}function lt(){var n;if(typeof window>"u"||sessionStorage.getItem(j)!=="1")return null;const e=(n=sessionStorage.getItem($))==null?void 0:n.trim();if(!e)return null;let r=I(e);try{r=xe(JSON.parse(e),e)??I(e)}catch{}const t=r.text.trim();return t?{prompt:t,draft:{...r,text:t},model:sessionStorage.getItem(T),webSearchEnabled:sessionStorage.getItem(O)==="1",reasoningEffort:["low","high","max"].includes(sessionStorage.getItem(D)??"")?sessionStorage.getItem(D):"low"}:null}function ut(){sessionStorage.removeItem($),sessionStorage.removeItem(T),sessionStorage.removeItem(j),sessionStorage.removeItem(we),sessionStorage.removeItem(O),sessionStorage.removeItem(D)}export{je as A,we as B,me as C,H as D,ut as E,ze as F,xe as G,We as H,qe as I,ot as J,nt as K,Pe as L,Ze as M,Ae as N,Te as O,tt as P,et as R,Fe as S,Ne as T,at as W,Le as a,rt as b,$e as c,Me as d,Oe as e,De as f,Ue as g,Je as h,Ge as i,Ke as j,Ye as k,I as l,Ve as m,Be as n,Qe as o,Xe as p,ct as q,lt as r,Re as s,st as t,it as u,He as v,$ as w,T as x,D as y,j as z};