Spaces:
Running
Running
Sync paperswithcode.co frontend
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- assets/{AiDeadlinesView-QLJtpd_H.js → AiDeadlinesView-C9gkTOHR.js} +1 -1
- assets/{AuthorDetailView-Bes_nJWB.js → AuthorDetailView-DEW0kawX.js} +1 -1
- assets/{BenchmarkDetailView-CIoYIHKH.js → BenchmarkDetailView-eYCBkPwr.js} +1 -1
- assets/{BenchmarkTrendSparkline-DeOW3cyn.js → BenchmarkTrendSparkline-BBkCWHyp.js} +1 -1
- assets/{ChatMessage-DmNQEAuW.js → ChatMessage-BSE1CBhX.js} +2 -2
- assets/{ChatView-COMuDw74.js → ChatView-Lg73w4On.js} +0 -0
- assets/{ConferenceDetailView-B-4YlObw.js → ConferenceDetailView-CP3htnO2.js} +1 -1
- assets/{ConferenceTaskView-etOCFSqs.js → ConferenceTaskView-B10PA6ep.js} +1 -1
- assets/{ConferencesIndexView-BdyrAqSO.js → ConferencesIndexView-mpxT1Hj4.js} +1 -1
- assets/{CronDashboard-BrAJ6icl.js → CronDashboard-BaNBXdoV.js} +1 -1
- assets/{ExternalSourceEvalBadge-Birx6-ql.js → ExternalSourceEvalBadge-hiSahiUS.js} +1 -1
- assets/{FeedView-DOA64Kf-.js → FeedView-mKlfcK5Q.js} +1 -1
- assets/{FrameworksIndexView-DAvLjKaR.js → FrameworksIndexView-C3goRh1S.js} +1 -1
- assets/{LatexTitle-DDjP6qv1.js → LatexTitle-C6bpusZm.js} +1 -1
- assets/{MarkdownText-CsqI5M0J.js → MarkdownText-CJyCKyp5.js} +1 -1
- assets/{MethodDetailView-CQda1geS.js → MethodDetailView-Fvel90rL.js} +1 -1
- assets/{MethodsIndexView-BcVtthMd.js → MethodsIndexView-DfbG_Yly.js} +1 -1
- assets/{NotFound-BaZxwGyO.js → NotFound-DLqR83St.js} +1 -1
- assets/{OrganizationContributionGraph-C1bNEf2-.js → OrganizationContributionGraph-BGN6E-kG.js} +1 -1
- assets/OrganizationDetailView-CXHXpB3J.js +1 -0
- assets/OrganizationDetailView-D4aakPO5.js +0 -1
- assets/{OrganizationPaperFeed-B2CHUmpb.js → OrganizationPaperFeed-2ccVRKtd.js} +1 -1
- assets/OrganizationTaskView-Dk93NM4-.js +1 -0
- assets/OrganizationTaskView-PPqqmwjz.js +0 -1
- assets/{OrganizationsIndexView-DdW5gXNf.js → OrganizationsIndexView-CnPxrbtB.js} +1 -1
- assets/{PaperDetailView-DS4g-8pa.js → PaperDetailView-DCH8IJ0V.js} +1 -1
- assets/{PaperPreviewLink-CGM7W6Oy.js → PaperPreviewLink-Bj5C7FQg.js} +1 -1
- assets/{PapersListView-Ddb7LWCa.js → PapersListView-DQc01mn9.js} +1 -1
- assets/{PrivacyView-DDLtdOSI.js → PrivacyView-PvlIkKNe.js} +1 -1
- assets/{RateLimitsView-CJ3t0FqM.js → RateLimitsView-DlcTamGX.js} +1 -1
- assets/{SavedPapersView-Ae-ENn8t.js → SavedPapersView-Bue03GOt.js} +1 -1
- assets/{SearchOverlay-BGRpRMSP.js → SearchOverlay-DkT7Ygym.js} +1 -1
- assets/{SettingsView-0FYS2C_e.js → SettingsView-DybOUVlT.js} +1 -1
- assets/{SharedChatView-Cu89k60k.js → SharedChatView-B2BUCU8C.js} +1 -1
- assets/{SignInToEditDialog-C6Il3E4j.js → SignInToEditDialog-C3dp4YGN.js} +1 -1
- assets/{StagingAccessRequestView-DgLKCB9C.js → StagingAccessRequestView-DJ_knslP.js} +1 -1
- assets/{SubmissionsDashboard-Dr-TyZnA.js → SubmissionsDashboard-CO19bZQx.js} +1 -1
- assets/{SubmitView-Z65qy5QJ.js → SubmitView-a_ZbQmby.js} +1 -1
- assets/{TagBrowseView-DWHZnnDd.js → TagBrowseView-B9walqGg.js} +1 -1
- assets/{TagsIndexView-D_RsuOg8.js → TagsIndexView-wRpQCyWN.js} +1 -1
- assets/{TaxonomySuggestionTile-Cx2TTJKY.js → TaxonomySuggestionTile-kyXt2mVa.js} +1 -1
- assets/{TrendsView-DcIP_oUz.js → TrendsView-D6Dv_5a6.js} +1 -1
- assets/{UserProfileView-CEuvZ-tI.js → UserProfileView-BwE7555Z.js} +1 -1
- assets/{alert-B6VISE3o.js → alert-CEb_9u-E.js} +1 -1
- assets/{button-BtDGjb5F.js → button-CjgOZ0_U.js} +1 -1
- assets/{chatSessions-D7JBHRAl.js → chatSessions-CExFukoU.js} +2 -2
- assets/{chevron-down-kEL7SG7P.js → chevron-down-B4Nu78fZ.js} +1 -1
- assets/{circle-check-CY45reoB.js → circle-check-DNZM3-BA.js} +1 -1
- assets/{codexAddEvals-BTetyjem.js → codexAddEvals-C1rXVNOh.js} +1 -1
- assets/{components-o6x7RW1I.js → components-C8eWDsbC.js} +1 -1
assets/{AiDeadlinesView-QLJtpd_H.js → AiDeadlinesView-C9gkTOHR.js}
RENAMED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
-
import{r as x,j as t,c as A}from"./index-
|
| 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)})})]})},pe=()=>{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=B({queryKey:["conference-deadlines"],queryFn:()=>A.getConferenceDeadlines(),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{pe as default};
|
|
|
|
| 1 |
+
import{r as x,j as t,c as A}from"./index-DaC9z2lA.js";import{u as B}from"./useQuery-DaHFL0rL.js";import{S as U}from"./switch-B7JykEjw.js";import{S as W}from"./skeleton-DMsDaBre.js";import{A as O,a as V}from"./alert-CEb_9u-E.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-1gyncLM1.js";import"./index-BPU7_n66.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)})})]})},pe=()=>{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=B({queryKey:["conference-deadlines"],queryFn:()=>A.getConferenceDeadlines(),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{pe as default};
|
assets/{AuthorDetailView-Bes_nJWB.js → AuthorDetailView-DEW0kawX.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{f as m,j as e,L as g,c as h}from"./index-
|
|
|
|
| 1 |
+
import{f as m,j as e,L as g,c as h}from"./index-DaC9z2lA.js";import{u as d}from"./useQuery-DaHFL0rL.js";import{S as c}from"./skeleton-DMsDaBre.js";import x from"./NotFound-DLqR83St.js";const N=()=>{var l,n,i,o,u;const{authorId:a}=m(),r=d({queryKey:["author",a],queryFn:()=>h.getAuthor(a),enabled:!!a}),t=d({queryKey:["author-papers",a],queryFn:()=>h.getAuthorPapers(a,{page:1,page_size:20}),enabled:!!a});return((l=r.error)==null?void 0:l.status)===404?e.jsx(x,{}):e.jsxs("div",{className:"page",children:[e.jsx("p",{className:"sidebar-label",children:"Author"}),e.jsx("h1",{className:"feed-title",children:((n=r.data)==null?void 0:n.full_name)??e.jsx(c,{className:"h-10 w-64 inline-block"})}),((i=r.data)==null?void 0:i.hf_username)&&e.jsxs("a",{href:`https://huggingface.co/${r.data.hf_username}`,target:"_blank",rel:"noopener noreferrer",children:["@",r.data.hf_username," on Hugging Face"]}),e.jsxs("section",{style:{marginTop:40},"aria-labelledby":"author-papers-heading",children:[e.jsx("h2",{id:"author-papers-heading",children:"Research papers"}),t.isLoading&&e.jsx(c,{className:"h-24 w-full mt-4"}),((o=t.data)==null?void 0:o.results.length)===0&&e.jsx("p",{children:"No public papers are available."}),e.jsx("ol",{className:"paper-list",children:(u=t.data)==null?void 0:u.results.map(s=>{const p=s.source==="external"?String(s.id):s.arxiv_id;return e.jsx("li",{children:e.jsx(g,{to:`/paper/${p}`,children:s.title})},s.id)})})]})]})};export{N as default};
|
assets/{BenchmarkDetailView-CIoYIHKH.js → BenchmarkDetailView-eYCBkPwr.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
| 1 |
-
import{u as vt,r as w,j as n,a4 as ne,h as jt,f as _t,a as kt,_ as St,L as me,c as ee}from"./index-C7unMYuh.js";import{u as te}from"./useQuery-CwZx3Xa-.js";import{S as xe}from"./skeleton-wrT9EggK.js";import{S as Je}from"./switch-CbOC3GWX.js";import{A as Ct,a as Et}from"./alert-B6VISE3o.js";import{L as ye}from"./LatexTitle-DDjP6qv1.js";import{C as Nt,E as Rt}from"./ExternalSourceEvalBadge-Birx6-ql.js";import{B as Tt}from"./BenchmarkTrendSparkline-DeOW3cyn.js";import{I as $t}from"./components-o6x7RW1I.js";import{s as Mt}from"./safeExternalHref-CkBrsh84.js";import"./index-D6hRnwDD.js";import"./katex.min-BSBacQyE.js";import"./hover-card-Bdza16XA.js";import"./transform-CSO4KHDB.js";function Ft(e,t,r){const s=t?(e??[]).filter(c=>c.task_id===t):e??[],a=s.filter(c=>c.is_open===!1),i=a.reduce((c,l)=>c?(l.best_rank??Number.POSITIVE_INFINITY)<(c.best_rank??Number.POSITIVE_INFINITY)?l:c:l,null);return{visible:r?s.filter(c=>c.is_open!==!1):s,hiddenClosed:a,topHiddenClosed:i}}function Ze(e){const t=e.length===7?`${e}-01`:e,r=new Date(t).getTime();return Number.isFinite(r)?r:0}const Ce=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Ee(e){const t=new Date(e);return{year:t.getFullYear(),month:t.getMonth()}}function Lt(e,t){if(e===t){const{year:u,month:p}=Ee(e);return[{timestamp:new Date(u,p,1).getTime(),key:`${u}-${p}`,label:`${Ce[p]} ${u}`}]}const r=Ee(e),s=Ee(t);if(r.year===s.year){const u=s.month-r.month+1;let p=1;const f=12;u>f&&(p=Math.ceil(u/f));const y=[];for(let x=r.month;x<=s.month;x+=p)y.push({timestamp:new Date(r.year,x,1).getTime(),key:`${r.year}-${x}`,label:u<=3?`${Ce[x]} ${r.year}`:Ce[x]});return y}const a=s.year-r.year+1;let i=1;const c=12;a>c&&(i=Math.ceil(a/c));const l=[];for(let u=r.year;u<=s.year;u+=i)l.push({timestamp:new Date(u,0,1).getTime(),key:String(u),label:String(u)});return l}const It=({points:e,metric:t})=>{const r=vt(),[s,a]=w.useState(null),i=880,c=320,l=60,u=30,p=40,f=50,y=e.map(o=>o.value),x=Math.min(...y),U=Math.max(...y)-x||1,ae=i-l-u,L=c-p-f,$=e.map(o=>Ze(o.date)),z=Math.min(...$),I=Math.max(...$),ie=I-z||1,Y=o=>z===I?l+ae/2:l+(o-z)/ie*ae,G=e.map((o,m)=>{const k=Y(Ze(o.date)),v=(o.value-x)/U,M=p+L*(1-v);return{x:k,y:M,data:o,idx:m}}),N=G.filter(o=>o.data.isSota);let O="";if(N.length>=2){O=`M${N[0].x},${N[0].y}`;for(let o=1;o<N.length;o++){const m=N[o-1],k=N[o],v=(m.x+k.x)/2;O+=` C${v},${m.y} ${v},${k.y} ${k.x},${k.y}`}}const H=5.4,fe=8,J=9,A=o=>{const m=o.data.modelName||o.data.paperTitle||"";if(!m)return null;const k=m.length>22?m.slice(0,21)+"…":m,v=k.length*H;let M=o.x-v/2,C=o.x+v/2,V="middle";return M<l?(M=l,C=l+v,V="start"):C>i-u&&(C=i-u,M=C-v,V="end"),{x:V==="start"?l:V==="end"?i-u:o.x,y:o.y-J,text:k,anchor:V,left:M,right:C}},ce=[],b=N.length>0?A(N[N.length-1]):null;let _e=-1/0;for(let o=0;o<N.length-1;o++){const m=A(N[o]);m&&(m.left<_e+fe||b&&m.right>b.left-fe||(_e=m.right,ce.push({x:m.x,y:m.y,text:m.text,anchor:m.anchor})))}b&&ce.push({x:b.x,y:b.y,text:b.text,anchor:b.anchor});const K=Lt(z,I),W=5,le=o=>a(m=>m===o?null:m),oe=o=>{o&&r(`/paper/${o}`)},pe=(o,m)=>{const v=`${o.data.modelName||o.data.paperTitle||"Unknown model"}: ${ne(o.data.value)} on ${o.data.dateLabel}`,M=!!o.data.paperRouteId;return n.jsxs("g",{children:[m,n.jsx("circle",{cx:o.x,cy:o.y,r:"10",fill:"transparent",style:{cursor:M?"pointer":"default",outline:"none"},tabIndex:0,role:M?"link":"img","aria-label":v,onMouseEnter:()=>a(o.idx),onMouseLeave:()=>le(o.idx),onFocus:()=>a(o.idx),onBlur:()=>le(o.idx),onClick:()=>oe(o.data.paperRouteId),onKeyDown:C=>{M&&(C.key==="Enter"||C.key===" ")&&(C.preventDefault(),oe(o.data.paperRouteId))},children:n.jsx("title",{children:v})})]},o.idx)};return n.jsxs("svg",{width:"100%",viewBox:`0 0 ${i} ${c}`,style:{display:"block"},children:[n.jsx("text",{x:l-38,y:p+L/2,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-faint)",textAnchor:"middle",transform:`rotate(-90 ${l-38} ${p+L/2})`,children:t}),Array.from({length:W}).map((o,m)=>{const k=m/(W-1),v=p+L*(1-k),M=x+U*k;return n.jsxs("g",{children:[n.jsx("line",{x1:l,y1:v,x2:i-u,y2:v,stroke:"var(--hairline)",strokeWidth:"1"}),n.jsx("text",{x:l-10,y:v+4,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-faint)",textAnchor:"end",children:ne(M)})]},m)}),K.map(o=>{const m=Y(o.timestamp);return n.jsx("text",{x:m,y:c-f+18,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-soft)",textAnchor:"middle",children:o.label},o.key)}),G.filter(o=>!o.data.isSota).map(o=>{const m=s===o.idx;return pe(o,n.jsx("circle",{cx:o.x,cy:o.y,r:m?3:2,fill:"var(--ink-faint)",opacity:m?1:.45,style:{transition:"r 0.12s ease, opacity 0.12s ease"}}))}),O&&n.jsx("path",{d:O,stroke:"var(--accent)",strokeWidth:"2",fill:"none",strokeLinejoin:"round",strokeLinecap:"round"}),N.map(o=>{const m=s===o.idx;return pe(o,n.jsx("circle",{cx:o.x,cy:o.y,r:m?4.5:3,fill:m?"var(--accent)":"var(--bg-elevated)",stroke:"var(--accent)",strokeWidth:"1.5",style:{transition:"r 0.12s ease, fill 0.12s ease"}}))}),ce.map((o,m)=>n.jsx("text",{x:o.x,y:o.y,fontSize:"9.5",fontFamily:"var(--mono)",fill:"var(--ink-soft)",textAnchor:o.anchor,pointerEvents:"none",style:{paintOrder:"stroke",stroke:"var(--bg-elevated)",strokeWidth:3,strokeLinejoin:"round"},children:o.text},`label-${m}`)),s!==null&&G[s]&&(()=>{const o=G[s],m=o.data.modelName||o.data.paperTitle||"Unknown model",v=`${m.length>40?m.slice(0,39)+"…":m}: ${ne(o.data.value)}`,C=Math.max(120,Math.min(340,v.length*6.6+24)),V=30;let B=o.x-C/2;B<l&&(B=l),B+C>i-u&&(B=i-u-C);const Q=o.y-V-14>=p?o.y-V-12:o.y+12;return n.jsxs("g",{pointerEvents:"none",children:[n.jsx("rect",{x:B,y:Q,width:C,height:V,rx:"6",ry:"6",fill:"var(--bg-elevated)",stroke:"var(--hairline-strong)",strokeWidth:"1",style:{filter:"drop-shadow(0 2px 6px rgba(0,0,0,0.08))"}}),n.jsx("text",{x:B+12,y:Q+19,fontSize:"12",fontFamily:"var(--sans)",fill:"var(--ink)",fontWeight:500,children:v})]})})()]})};function Pt(e,t){if(e.match(/^[a-z]+:\/\//i))return e;if(e.match(/^\/\//))return window.location.protocol+e;if(e.match(/^[a-z]+:/i))return e;const r=document.implementation.createHTMLDocument(),s=r.createElement("base"),a=r.createElement("a");return r.head.appendChild(s),r.body.appendChild(a),t&&(s.href=t),a.href=e,a.href}const At=(()=>{let e=0;const t=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(e+=1,`u${t()}${e}`)})();function q(e){const t=[];for(let r=0,s=e.length;r<s;r++)t.push(e[r]);return t}let re=null;function dt(e={}){return re||(e.includeStyleProperties?(re=e.includeStyleProperties,re):(re=q(window.getComputedStyle(document.documentElement)),re))}function we(e,t){const s=(e.ownerDocument.defaultView||window).getComputedStyle(e).getPropertyValue(t);return s?parseFloat(s.replace("px","")):0}function Dt(e){const t=we(e,"border-left-width"),r=we(e,"border-right-width");return e.clientWidth+t+r}function Bt(e){const t=we(e,"border-top-width"),r=we(e,"border-bottom-width");return e.clientHeight+t+r}function ut(e,t={}){const r=t.width||Dt(e),s=t.height||Bt(e);return{width:r,height:s}}function Ht(){let e,t;try{t=process}catch{}const r=t&&t.env?t.env.devicePixelRatio:null;return r&&(e=parseInt(r,10),Number.isNaN(e)&&(e=1)),e||window.devicePixelRatio||1}const D=16384;function Vt(e){(e.width>D||e.height>D)&&(e.width>D&&e.height>D?e.width>e.height?(e.height*=D/e.width,e.width=D):(e.width*=D/e.height,e.height=D):e.width>D?(e.height*=D/e.width,e.width=D):(e.width*=D/e.height,e.height=D))}function Ot(e,t={}){return e.toBlob?new Promise(r=>{e.toBlob(r,t.type?t.type:"image/png",t.quality?t.quality:1)}):new Promise(r=>{const s=window.atob(e.toDataURL(t.type?t.type:void 0,t.quality?t.quality:void 0).split(",")[1]),a=s.length,i=new Uint8Array(a);for(let c=0;c<a;c+=1)i[c]=s.charCodeAt(c);r(new Blob([i],{type:t.type?t.type:"image/png"}))})}function ve(e){return new Promise((t,r)=>{const s=new Image;s.onload=()=>{s.decode().then(()=>{requestAnimationFrame(()=>t(s))})},s.onerror=r,s.crossOrigin="anonymous",s.decoding="async",s.src=e})}async function Ut(e){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then(t=>`data:image/svg+xml;charset=utf-8,${t}`)}async function Wt(e,t,r){const s="http://www.w3.org/2000/svg",a=document.createElementNS(s,"svg"),i=document.createElementNS(s,"foreignObject");return a.setAttribute("width",`${t}`),a.setAttribute("height",`${r}`),a.setAttribute("viewBox",`0 0 ${t} ${r}`),i.setAttribute("width","100%"),i.setAttribute("height","100%"),i.setAttribute("x","0"),i.setAttribute("y","0"),i.setAttribute("externalResourcesRequired","true"),a.appendChild(i),i.appendChild(e),Ut(a)}const P=(e,t)=>{if(e instanceof t)return!0;const r=Object.getPrototypeOf(e);return r===null?!1:r.constructor.name===t.name||P(r,t)};function qt(e){const t=e.getPropertyValue("content");return`${e.cssText} content: '${t.replace(/'|"/g,"")}';`}function zt(e,t){return dt(t).map(r=>{const s=e.getPropertyValue(r),a=e.getPropertyPriority(r);return`${r}: ${s}${a?" !important":""};`}).join(" ")}function Gt(e,t,r,s){const a=`.${e}:${t}`,i=r.cssText?qt(r):zt(r,s);return document.createTextNode(`${a}{${i}}`)}function et(e,t,r,s){const a=window.getComputedStyle(e,r),i=a.getPropertyValue("content");if(i===""||i==="none")return;const c=At();try{t.className=`${t.className} ${c}`}catch{return}const l=document.createElement("style");l.appendChild(Gt(c,r,a,s)),t.appendChild(l)}function Kt(e,t,r){et(e,t,":before",r),et(e,t,":after",r)}const tt="application/font-woff",rt="image/jpeg",Qt={woff:tt,woff2:tt,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:rt,jpeg:rt,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function Xt(e){const t=/\.([^./]*?)$/g.exec(e);return t?t[1]:""}function $e(e){const t=Xt(e).toLowerCase();return Qt[t]||""}function Yt(e){return e.split(/,/)[1]}function Re(e){return e.search(/^(data:)/)!==-1}function Jt(e,t){return`data:${t};base64,${e}`}async function mt(e,t,r){const s=await fetch(e,t);if(s.status===404)throw new Error(`Resource "${s.url}" not found`);const a=await s.blob();return new Promise((i,c)=>{const l=new FileReader;l.onerror=c,l.onloadend=()=>{try{i(r({res:s,result:l.result}))}catch(u){c(u)}},l.readAsDataURL(a)})}const Ne={};function Zt(e,t,r){let s=e.replace(/\?.*/,"");return r&&(s=e),/ttf|otf|eot|woff2?/i.test(s)&&(s=s.replace(/.*\//,"")),t?`[${t}]${s}`:s}async function Me(e,t,r){const s=Zt(e,t,r.includeQueryParams);if(Ne[s]!=null)return Ne[s];r.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+new Date().getTime());let a;try{const i=await mt(e,r.fetchRequestInit,({res:c,result:l})=>(t||(t=c.headers.get("Content-Type")||""),Yt(l)));a=Jt(i,t)}catch(i){a=r.imagePlaceholder||"";let c=`Failed to fetch resource: ${e}`;i&&(c=typeof i=="string"?i:i.message),c&&console.warn(c)}return Ne[s]=a,a}async function er(e){const t=e.toDataURL();return t==="data:,"?e.cloneNode(!1):ve(t)}async function tr(e,t){if(e.currentSrc){const i=document.createElement("canvas"),c=i.getContext("2d");i.width=e.clientWidth,i.height=e.clientHeight,c==null||c.drawImage(e,0,0,i.width,i.height);const l=i.toDataURL();return ve(l)}const r=e.poster,s=$e(r),a=await Me(r,s,t);return ve(a)}async function rr(e,t){var r;try{if(!((r=e==null?void 0:e.contentDocument)===null||r===void 0)&&r.body)return await je(e.contentDocument.body,t,!0)}catch{}return e.cloneNode(!1)}async function sr(e,t){return P(e,HTMLCanvasElement)?er(e):P(e,HTMLVideoElement)?tr(e,t):P(e,HTMLIFrameElement)?rr(e,t):e.cloneNode(ht(e))}const nr=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SLOT",ht=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SVG";async function ar(e,t,r){var s,a;if(ht(t))return t;let i=[];return nr(e)&&e.assignedNodes?i=q(e.assignedNodes()):P(e,HTMLIFrameElement)&&(!((s=e.contentDocument)===null||s===void 0)&&s.body)?i=q(e.contentDocument.body.childNodes):i=q(((a=e.shadowRoot)!==null&&a!==void 0?a:e).childNodes),i.length===0||P(e,HTMLVideoElement)||await i.reduce((c,l)=>c.then(()=>je(l,r)).then(u=>{u&&t.appendChild(u)}),Promise.resolve()),t}function ir(e,t,r){const s=t.style;if(!s)return;const a=window.getComputedStyle(e);a.cssText?(s.cssText=a.cssText,s.transformOrigin=a.transformOrigin):dt(r).forEach(i=>{let c=a.getPropertyValue(i);i==="font-size"&&c.endsWith("px")&&(c=`${Math.floor(parseFloat(c.substring(0,c.length-2)))-.1}px`),P(e,HTMLIFrameElement)&&i==="display"&&c==="inline"&&(c="block"),i==="d"&&t.getAttribute("d")&&(c=`path(${t.getAttribute("d")})`),s.setProperty(i,c,a.getPropertyPriority(i))})}function cr(e,t){P(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),P(e,HTMLInputElement)&&t.setAttribute("value",e.value)}function lr(e,t){if(P(e,HTMLSelectElement)){const r=t,s=Array.from(r.children).find(a=>e.value===a.getAttribute("value"));s&&s.setAttribute("selected","")}}function or(e,t,r){return P(t,Element)&&(ir(e,t,r),Kt(e,t,r),cr(e,t),lr(e,t)),t}async function dr(e,t){const r=e.querySelectorAll?e.querySelectorAll("use"):[];if(r.length===0)return e;const s={};for(let i=0;i<r.length;i++){const l=r[i].getAttribute("xlink:href");if(l){const u=e.querySelector(l),p=document.querySelector(l);!u&&p&&!s[l]&&(s[l]=await je(p,t,!0))}}const a=Object.values(s);if(a.length){const i="http://www.w3.org/1999/xhtml",c=document.createElementNS(i,"svg");c.setAttribute("xmlns",i),c.style.position="absolute",c.style.width="0",c.style.height="0",c.style.overflow="hidden",c.style.display="none";const l=document.createElementNS(i,"defs");c.appendChild(l);for(let u=0;u<a.length;u++)l.appendChild(a[u]);e.appendChild(c)}return e}async function je(e,t,r){return!r&&t.filter&&!t.filter(e)?null:Promise.resolve(e).then(s=>sr(s,t)).then(s=>ar(e,s,t)).then(s=>or(e,s,t)).then(s=>dr(s,t))}const ft=/url\((['"]?)([^'"]+?)\1\)/g,ur=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,mr=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function hr(e){const t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}function fr(e){const t=[];return e.replace(ft,(r,s,a)=>(t.push(a),r)),t.filter(r=>!Re(r))}async function pr(e,t,r,s,a){try{const i=r?Pt(t,r):t,c=$e(t);let l;return a||(l=await Me(i,c,s)),e.replace(hr(t),`$1${l}$3`)}catch{}return e}function gr(e,{preferredFontFormat:t}){return t?e.replace(mr,r=>{for(;;){const[s,,a]=ur.exec(r)||[];if(!a)return"";if(a===t)return`src: ${s};`}}):e}function pt(e){return e.search(ft)!==-1}async function gt(e,t,r){if(!pt(e))return e;const s=gr(e,r);return fr(s).reduce((i,c)=>i.then(l=>pr(l,c,t,r)),Promise.resolve(s))}async function se(e,t,r){var s;const a=(s=t.style)===null||s===void 0?void 0:s.getPropertyValue(e);if(a){const i=await gt(a,null,r);return t.style.setProperty(e,i,t.style.getPropertyPriority(e)),!0}return!1}async function xr(e,t){await se("background",e,t)||await se("background-image",e,t),await se("mask",e,t)||await se("-webkit-mask",e,t)||await se("mask-image",e,t)||await se("-webkit-mask-image",e,t)}async function br(e,t){const r=P(e,HTMLImageElement);if(!(r&&!Re(e.src))&&!(P(e,SVGImageElement)&&!Re(e.href.baseVal)))return;const s=r?e.src:e.href.baseVal,a=await Me(s,$e(s),t);await new Promise((i,c)=>{e.onload=i,e.onerror=t.onImageErrorHandler?(...u)=>{try{i(t.onImageErrorHandler(...u))}catch(p){c(p)}}:c;const l=e;l.decode&&(l.decode=i),l.loading==="lazy"&&(l.loading="eager"),r?(e.srcset="",e.src=a):e.href.baseVal=a})}async function yr(e,t){const s=q(e.childNodes).map(a=>xt(a,t));await Promise.all(s).then(()=>e)}async function xt(e,t){P(e,Element)&&(await xr(e,t),await br(e,t),await yr(e,t))}function wr(e,t){const{style:r}=e;t.backgroundColor&&(r.backgroundColor=t.backgroundColor),t.width&&(r.width=`${t.width}px`),t.height&&(r.height=`${t.height}px`);const s=t.style;return s!=null&&Object.keys(s).forEach(a=>{r[a]=s[a]}),e}const st={};async function nt(e){let t=st[e];if(t!=null)return t;const s=await(await fetch(e)).text();return t={url:e,cssText:s},st[e]=t,t}async function at(e,t){let r=e.cssText;const s=/url\(["']?([^"')]+)["']?\)/g,i=(r.match(/url\([^)]+\)/g)||[]).map(async c=>{let l=c.replace(s,"$1");return l.startsWith("https://")||(l=new URL(l,e.url).href),mt(l,t.fetchRequestInit,({result:u})=>(r=r.replace(c,`url(${u})`),[c,u]))});return Promise.all(i).then(()=>r)}function it(e){if(e==null)return[];const t=[],r=/(\/\*[\s\S]*?\*\/)/gi;let s=e.replace(r,"");const a=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){const u=a.exec(s);if(u===null)break;t.push(u[0])}s=s.replace(a,"");const i=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,c="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})",l=new RegExp(c,"gi");for(;;){let u=i.exec(s);if(u===null){if(u=l.exec(s),u===null)break;i.lastIndex=l.lastIndex}else l.lastIndex=i.lastIndex;t.push(u[0])}return t}async function vr(e,t){const r=[],s=[];return e.forEach(a=>{if("cssRules"in a)try{q(a.cssRules||[]).forEach((i,c)=>{if(i.type===CSSRule.IMPORT_RULE){let l=c+1;const u=i.href,p=nt(u).then(f=>at(f,t)).then(f=>it(f).forEach(y=>{try{a.insertRule(y,y.startsWith("@import")?l+=1:a.cssRules.length)}catch(x){console.error("Error inserting rule from remote css",{rule:y,error:x})}})).catch(f=>{console.error("Error loading remote css",f.toString())});s.push(p)}})}catch(i){const c=e.find(l=>l.href==null)||document.styleSheets[0];a.href!=null&&s.push(nt(a.href).then(l=>at(l,t)).then(l=>it(l).forEach(u=>{c.insertRule(u,c.cssRules.length)})).catch(l=>{console.error("Error loading remote stylesheet",l)})),console.error("Error inlining remote css file",i)}}),Promise.all(s).then(()=>(e.forEach(a=>{if("cssRules"in a)try{q(a.cssRules||[]).forEach(i=>{r.push(i)})}catch(i){console.error(`Error while reading CSS rules from ${a.href}`,i)}}),r))}function jr(e){return e.filter(t=>t.type===CSSRule.FONT_FACE_RULE).filter(t=>pt(t.style.getPropertyValue("src")))}async function _r(e,t){if(e.ownerDocument==null)throw new Error("Provided element is not within a Document");const r=q(e.ownerDocument.styleSheets),s=await vr(r,t);return jr(s)}function bt(e){return e.trim().replace(/["']/g,"")}function kr(e){const t=new Set;function r(s){(s.style.fontFamily||getComputedStyle(s).fontFamily).split(",").forEach(i=>{t.add(bt(i))}),Array.from(s.children).forEach(i=>{i instanceof HTMLElement&&r(i)})}return r(e),t}async function Sr(e,t){const r=await _r(e,t),s=kr(e);return(await Promise.all(r.filter(i=>s.has(bt(i.style.fontFamily))).map(i=>{const c=i.parentStyleSheet?i.parentStyleSheet.href:null;return gt(i.cssText,c,t)}))).join(`
|
| 2 |
`)}async function Cr(e,t){const r=t.fontEmbedCSS!=null?t.fontEmbedCSS:t.skipFonts?null:await Sr(e,t);if(r){const s=document.createElement("style"),a=document.createTextNode(r);s.appendChild(a),e.firstChild?e.insertBefore(s,e.firstChild):e.appendChild(s)}}async function Er(e,t={}){const{width:r,height:s}=ut(e,t),a=await je(e,t,!0);return await Cr(a,t),await xt(a,t),wr(a,t),await Wt(a,r,s)}async function Nr(e,t={}){const{width:r,height:s}=ut(e,t),a=await Er(e,t),i=await ve(a),c=document.createElement("canvas"),l=c.getContext("2d"),u=t.pixelRatio||Ht(),p=t.canvasWidth||r,f=t.canvasHeight||s;return c.width=p*u,c.height=f*u,t.skipAutoScale||Vt(c),c.style.width=`${p}`,c.style.height=`${f}`,t.backgroundColor&&(l.fillStyle=t.backgroundColor,l.fillRect(0,0,c.width,c.height)),l.drawImage(i,0,0,c.width,c.height),c}async function Rr(e,t={}){const r=await Nr(e,t);return await Ot(r)}const Te="#ffffff";function Tr(){return typeof window>"u"?Te:window.getComputedStyle(document.documentElement).getPropertyValue("--bg-elevated").trim()||Te}function $r(e){if(typeof window>"u")return Te;const t=window.getComputedStyle(e).backgroundColor;return!t||t==="rgba(0, 0, 0, 0)"||t==="transparent"?Tr():t}async function Mr(e){var r,s;if(typeof window>"u"||!((s=(r=window.navigator)==null?void 0:r.clipboard)!=null&&s.write))throw new Error("Clipboard image copy is not supported in this browser.");if(typeof window.ClipboardItem>"u")throw new Error("Clipboard image copy is not supported in this browser.");const t=await Rr(e,{pixelRatio:2,cacheBust:!0,backgroundColor:$r(e)});if(!t)throw new Error("Failed to render screenshot.");await window.navigator.clipboard.write([new window.ClipboardItem({"image/png":t})])}const ct=({targetRef:e,label:t})=>{const{toast:r}=jt(),[s,a]=w.useState("idle"),i=w.useRef(null);w.useEffect(()=>()=>{i.current!==null&&window.clearTimeout(i.current)},[]);const c=w.useCallback(async()=>{const u=e.current;if(u){a("copying"),u.classList.add("is-capturing"),u.offsetHeight,await new Promise(p=>window.requestAnimationFrame(()=>p()));try{await Mr(u),a("copied"),r({title:"Screenshot copied",description:`Image of the ${t} copied to your clipboard.`}),i.current!==null&&window.clearTimeout(i.current),i.current=window.setTimeout(()=>a("idle"),1500)}catch(p){a("idle"),r({title:"Copy failed",description:p instanceof Error&&p.message?p.message:"Could not copy the screenshot to your clipboard.",variant:"destructive"})}finally{u.classList.remove("is-capturing")}}},[e,t,r]),l=s==="copied"?"Copied":s==="copying"?"Copying…":"Copy image";return n.jsxs("button",{type:"button",className:"bm-copy-btn",onClick:c,disabled:s==="copying","aria-label":`Copy ${t} screenshot to clipboard`,title:`Copy ${t} screenshot to clipboard`,children:[n.jsx($t,{name:"copy",size:11}),l]})};function he(e){if(e==null)return null;if(typeof e=="number")return Number.isFinite(e)?e:null;const t=e.includes("±")?e.split("±")[0].trim():e.trim(),r=parseFloat(t);return Number.isFinite(r)?r:null}function Fr(e){return[e.paper_id,e.task_id,e.dataset_id,e.model_name,e.harness??""].join("|")}function Lr(e){const t=new Map;for(const r of e){const s=Fr(r),a=t.get(s);if(!a){t.set(s,{...r,metrics:{...r.metrics||{}},sourceEvaluationIds:[r.id],ranksByMetric:r.best_metric&&r.best_rank!=null?{[r.best_metric]:r.best_rank}:{}});continue}a.metrics={...a.metrics,...r.metrics||{}},a.sourceEvaluationIds.push(r.id),r.best_metric&&r.best_rank!=null&&(a.ranksByMetric[r.best_metric]=r.best_rank)}return Array.from(t.values())}function lt(e,t){return t?e.id===t||e.sourceEvaluationIds.includes(t):!1}function ot(e,t){return e.ranksByMetric[t]??e.best_rank??9999}function Ir(e,t,r){if(e.length===0)return{points:[],sota:0,sotaModel:""};const s=e.map(f=>{var E;const y=he((E=f.metrics)==null?void 0:E[t]),x=f.paper_published_date||"";return{eval:f,value:y,date:x}}).filter(f=>f.value!==null&&!!f.date).sort((f,y)=>f.date.localeCompare(y.date)),a=[];let i=null;for(const f of s){const y=i==null?!0:r==="↓"?f.value<i:f.value>i;y&&(i=f.value),a.push({value:f.value,date:f.date,dateLabel:f.date.slice(0,7),modelName:f.eval.model_name||"",paperTitle:f.eval.paper_title||"",paperRouteId:f.eval.paper_arxiv_id||f.eval.paper_id||null,isSota:y})}const l=e.map(f=>{var y;return{eval:f,value:he((y=f.metrics)==null?void 0:y[t])}}).filter(f=>f.value!==null).sort((f,y)=>r==="↓"?f.value-y.value:y.value-f.value)[0],u=(l==null?void 0:l.value)??0,p=(l==null?void 0:l.eval.model_name)||(l==null?void 0:l.eval.paper_title)||"";return{points:a,sota:u,sotaModel:p}}const Pr=5;function Ar(e){if(!e)return null;const t=e.trim(),r=t.match(/^https?:\/\/(?:www\.)?arxiv\.org\/(?:abs|pdf)\/([^/?#]+)/i);if(r!=null&&r[1])return r[1].replace(/\.pdf$/i,"");const s=t.match(/^(?:https?:\/\/(?:www\.)?paperswithcode\.co)?\/paper\/([^/?#]+)/i);return(s==null?void 0:s[1])??null}function be(e,t){return e?n.jsx(ye,{title:e}):t||"—"}const Jr=()=>{var Le,Ie,Pe,Ae,De,Be,He,Ve,Oe,Ue,We,qe,ze;const{datasetSlug:e}=_t(),[t]=kt(),r=t.get("task")||void 0,s=t.get("eval")||void 0,{preferences:a,setHideClosedSourceEvals:i}=St(),[c,l]=w.useState(void 0),u=w.useRef(null),p=w.useRef(!1),f=w.useRef(null),y=w.useRef(null),x=te({queryKey:["dataset",e,"with-paper",r,a.hide_closed_source_evals?"open":"all"],queryFn:()=>ee.getDatasetBySlug(e,{include_paper:!0,task:r,is_open:a.hide_closed_source_evals?!0:void 0}),enabled:!!e,staleTime:10*60*1e3}),E=te({queryKey:["dataset-evals",(Le=x.data)==null?void 0:Le.id],queryFn:()=>ee.getEvaluationsByDataset(x.data.id),enabled:!!((Ie=x.data)!=null&&Ie.id),staleTime:5*60*1e3}),U=te({queryKey:["dataset-tasks",(Pe=x.data)==null?void 0:Pe.id],queryFn:()=>ee.getDatasetTasks(x.data.id),enabled:!!((Ae=x.data)!=null&&Ae.id),staleTime:10*60*1e3}),ae=te({queryKey:["metric-directions"],queryFn:()=>ee.getMetricDirections(),staleTime:60*60*1e3}),L=w.useMemo(()=>{var d;return!s||!((d=E.data)!=null&&d.length)?null:E.data.find(g=>g.id===s)||null},[s,E.data]),$=w.useMemo(()=>{const d=U.data||[];if(d.length===0)return null;if(L!=null&&L.task_id&&d.some(h=>h.id===L.task_id))return L.task_id;if(r){const h=d.find(S=>S.slug===r);if(h)return h.id}if(d.length===1)return d[0].id;const g=E.data||[];if(g.length>0){const h=new Map;for(const j of g)h.set(j.task_id,(h.get(j.task_id)||0)+1);let S=null,T=-1;for(const j of d){const ue=h.get(j.id)||0;ue>T&&(T=ue,S=j.id)}if(S)return S}return d[0].id},[U.data,E.data,r,L]),z=te({queryKey:["task-benchmark-trends",$,a.hide_closed_source_evals?!0:void 0],queryFn:()=>ee.getTrendingBenchmarks($,{limit:100,min_recent_papers:0,is_open:a.hide_closed_source_evals?!0:void 0}),enabled:!!$&&!!((De=x.data)!=null&&De.id),staleTime:10*60*1e3}),I=w.useMemo(()=>{var d;return(((d=z.data)==null?void 0:d.results)||[]).find(g=>{var h;return g.id===((h=x.data)==null?void 0:h.id)})||null},[z.data,(Be=x.data)==null?void 0:Be.id]),ie=te({queryKey:["leaderboard-metrics",(He=x.data)==null?void 0:He.id,$],queryFn:()=>ee.getLeaderboardMetrics(x.data.id,$),enabled:!!((Ve=x.data)!=null&&Ve.id)&&!!$,staleTime:10*60*1e3}),Y=w.useMemo(()=>Ft(E.data,$,a.hide_closed_source_evals),[E.data,$,a.hide_closed_source_evals]),G=Y.visible,N=Y.hiddenClosed,O=Y.topHiddenClosed,H=w.useMemo(()=>Lr(G),[G]),fe=w.useMemo(()=>{const d=new Set;return H.forEach(g=>{g.best_metric&&d.add(g.best_metric),Object.keys(g.metrics||{}).forEach(h=>d.add(h))}),Array.from(d)},[H]),J=w.useMemo(()=>(ie.data||[]).map(d=>d.metric_name),[ie.data]),A=J.length?J:fe,ce=w.useMemo(()=>{var S;if(H.length===0)return A[0]||"";const d=new Map;for(const T of H)for(const j of Object.keys(T.metrics||{}))J.length&&!A.includes(j)||d.set(j,(d.get(j)||0)+1);let g=null,h=0;for(const[T,j]of d)j>h&&(h=j,g=T);return g||A[0]||((S=H[0])==null?void 0:S.best_metric)||""},[H,A,J]),b=c||(L==null?void 0:L.best_metric)||ce,K=(((Ue=(Oe=ae.data)==null?void 0:Oe.directions)==null?void 0:Ue[b])||"higher_is_better")==="lower_is_better"?"↓":"↑",W=w.useMemo(()=>!b||!A.includes(b)?A:[b,...A.filter(d=>d!==b)],[A,b]),le=w.useMemo(()=>W.length===0?b?[b]:[]:W.slice(0,Pr),[W,b]),{points:oe,sota:pe,sotaModel:o}=w.useMemo(()=>Ir(H,b,K),[H,b,K]),m=(We=x.data)==null?void 0:We.leaderboard_summary,k=E.isSuccess&&U.isSuccess&&ae.isSuccess&&(!$||ie.isSuccess),v=k?b:m==null?void 0:m.metric,M=k?pe:m==null?void 0:m.value,C=k?o:m==null?void 0:m.model_name,V=!k&&!m;w.useEffect(()=>{if(p.current||!s||!E.data||E.data.length===0)return;const d=u.current;d&&(p.current=!0,d.scrollIntoView({behavior:"smooth",block:"start"}))},[s,E.data]);const B=w.useMemo(()=>{const d=U.data||[];return $?d.find(g=>g.id===$)||d[0]||null:d[0]||null},[U.data,$]);if(x.isLoading)return n.jsxs("div",{className:"page",children:[n.jsx(xe,{className:"h-12 w-1/2 mb-6"}),n.jsx(xe,{className:"h-64 w-full"})]});if(x.error||!x.data)return n.jsx("div",{className:"page",children:n.jsx(Ct,{variant:"destructive",children:n.jsx(Et,{children:"Benchmark not found."})})});const _=x.data,Q=H.slice().sort((d,g)=>{var T,j;const h=he((T=d.metrics)==null?void 0:T[b]),S=he((j=g.metrics)==null?void 0:j[b]);return h!==null&&S!==null?K==="↓"?h-S:S-h:h!==null?-1:S!==null?1:ot(d,b)-ot(g,b)}),Fe=!!_.supports_harness,R=s&&Q.find(d=>lt(d,s))||null,F=_.introducing_paper??void 0,de=(F==null?void 0:F.arxiv_id)||(F==null?void 0:F.id)||Ar(_.paper_url),X=(F==null?void 0:F.title)||_.introducing_paper_title||null,Z=((qe=F==null?void 0:F.published)==null?void 0:qe.slice(0,4))||_.introduced_year||null,yt=!!de||!!_.paper_url||!!X,wt=F!=null&&F.arxiv_id||(ze=_.paper_url)!=null&&ze.match(/^https?:\/\/(?:www\.)?arxiv\.org\//i)?`arXiv:${de}`:`Paper ${de}`;return n.jsx("div",{className:"page",children:n.jsxs("div",{className:"bm-page",children:[n.jsxs("div",{className:"breadcrumb",children:[n.jsx(me,{to:"/tasks",children:"Tasks"}),B&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"sep",children:"/"}),n.jsx(me,{to:`/tasks/${B.slug||B.id}`,children:B.name})]}),n.jsx("span",{className:"sep",children:"/"}),n.jsx("span",{style:{color:"var(--accent-text)"},children:_.name})]}),n.jsxs("div",{className:"bm-title-row",children:[n.jsx("h1",{className:"bm-title",children:_.name}),I&&n.jsxs("div",{className:"bm-title-trend","aria-label":`${_.name} reporting trend`,children:[n.jsx(Tt,{history:I.history,benchmarkName:I.name}),n.jsxs("span",{className:"bm-title-trend-summary",children:[n.jsx("strong",{children:I.recent_paper_count})," ",I.recent_paper_count===1?"paper":"papers",I.rate_change==null?I.recent_paper_count>0&&n.jsx("span",{className:"benchmark-trend-change is-new",children:"new"}):n.jsxs("span",{className:`benchmark-trend-change ${I.rate_change>=1?"is-up":"is-down"}`,children:[I.rate_change>=1?"↑":"↓"," ",I.rate_change.toFixed(1),"×"]})]})]})]}),n.jsxs("div",{className:"bm-subtitle",children:[V?n.jsx(xe,{className:"h-5 w-64 bm-summary-skeleton","aria-label":"Loading benchmark summary"}):n.jsxs("span",{children:[v&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"metric-tag",children:v}),n.jsx("span",{style:{color:"var(--hairline-strong)",margin:"0 8px"},children:"·"})]}),C?n.jsxs("span",{children:["Best: ",n.jsx("span",{className:"best-name",children:ne(M)})," by ",n.jsx("span",{className:"best-name",style:{fontStyle:"normal"},children:C})]}):n.jsxs("span",{children:[Q.length," evaluations"]})]}),_.hf_url&&n.jsxs("a",{className:"bm-action-btn",href:_.hf_url,target:"_blank",rel:"noopener noreferrer",children:[n.jsx("span",{"aria-hidden":"true",children:"🤗"})," View on Hugging Face"]})]}),_.description&&n.jsx("p",{className:"bm-description",children:_.description}),a.hide_closed_source_evals&&N.length>0&&n.jsxs("div",{className:"bm-hidden-closed-notice",children:[n.jsxs("span",{children:[N.length," closed-source ",N.length===1?"row is":"rows are"," hidden",O!=null&&O.model_name?n.jsxs(n.Fragment,{children:[", including ",n.jsx("strong",{children:O.model_name})]}):null,"."]}),n.jsx("button",{type:"button",className:"bm-hidden-closed-action",onClick:()=>{i(!1)},children:"Show closed-source"})]}),yt&&n.jsxs("div",{className:"method-source",style:{marginTop:0,marginBottom:18},children:[n.jsx("span",{className:"method-source-label",children:"Source"}),de?n.jsxs(me,{to:`/paper/${de}`,target:"_blank",rel:"noopener noreferrer",className:"method-source-link",children:[n.jsx("span",{className:"method-source-title",children:X?n.jsx(ye,{title:X}):wt}),Z&&n.jsx("span",{className:"method-source-meta",children:Z})]}):_.paper_url?n.jsxs("a",{href:Mt(_.paper_url)??void 0,target:"_blank",rel:"noopener noreferrer",className:"method-source-link",children:[n.jsx("span",{className:"method-source-title",children:X?n.jsx(ye,{title:X}):_.paper_url}),Z&&n.jsx("span",{className:"method-source-meta",children:Z})]}):n.jsxs("div",{className:"method-source-link is-static",children:[n.jsx("span",{className:"method-source-title",children:X?n.jsx(ye,{title:X}):null}),Z&&n.jsx("span",{className:"method-source-meta",children:Z})]})]}),oe.filter(d=>d.isSota).length>=2&&n.jsxs("div",{className:"bm-card",ref:f,children:[n.jsxs("div",{className:"bm-card-screenshot-header","aria-hidden":"true",children:[n.jsxs("div",{className:"bm-card-screenshot-title",children:[n.jsx("span",{className:"bm-card-screenshot-eyebrow",children:"Benchmark"}),n.jsx("span",{className:"bm-card-screenshot-name",children:_.name})]}),n.jsxs("div",{className:"bm-card-screenshot-brand",children:[n.jsxs("span",{className:"brand",children:[n.jsx("span",{className:"brand-mark"}),n.jsxs("span",{className:"brand-name",children:["Papers ",n.jsx("em",{children:"With Code"})]})]}),n.jsx("span",{className:"bm-card-screenshot-url",children:"paperswithcode.co"})]})]}),n.jsxs("div",{className:"bm-card-head",children:[n.jsx("div",{className:"bm-card-title",children:"SOTA progression"}),n.jsxs("div",{className:"bm-card-actions",children:[A.length>1&&n.jsxs("label",{className:"bm-view-select",children:[n.jsx("span",{className:"bm-view-select-label",children:"View"}),n.jsx("select",{value:b,onChange:d=>l(d.target.value),children:W.map(d=>n.jsx("option",{value:d,children:d},d))})]}),n.jsxs("label",{className:"bm-closed-toggle",title:"Show or hide evaluations of closed-source models",children:[n.jsx(Je,{className:"bm-closed-toggle-switch",checked:!a.hide_closed_source_evals,onCheckedChange:d=>{i(!d)},"aria-label":"Show closed-source models"}),n.jsx("span",{className:"bm-closed-toggle-label",children:"Closed-source"})]}),n.jsx(ct,{targetRef:f,label:"SOTA chart"})]})]}),n.jsx("div",{className:"bm-chart-wrap",children:n.jsx(It,{points:oe,metric:b})}),n.jsxs("div",{className:"bm-chart-foot",children:[n.jsx("span",{className:"legend-dot"}),"All models over time · highlighted dots track the running best · hover for the model · click to open the paper"]})]}),R&&(()=>{var T,j;const d=R.paper_arxiv_id||R.paper_id,g=R.paper_title||(R.paper_arxiv_id?`arXiv:${R.paper_arxiv_id}`:null),h=R.best_metric&&((T=R.metrics)==null?void 0:T[R.best_metric])!==void 0?R.best_metric:b,S=(j=R.metrics)==null?void 0:j[h];return n.jsxs("div",{className:"bm-highlight-banner",role:"status",children:[n.jsx("span",{className:"bm-highlight-dot","aria-hidden":"true"}),n.jsxs("div",{className:"bm-highlight-text",children:[n.jsx("span",{className:"bm-highlight-label",children:"Comparing result"}),n.jsxs("span",{className:"bm-highlight-paper",children:[R.model_name||g||"—",R.harness?` · ${R.harness}`:""]}),n.jsxs("span",{className:"bm-highlight-meta",children:[S!==void 0&&h?n.jsxs(n.Fragment,{children:[h,": ",ne(S),g?" · ":""]}):null,d?n.jsx(me,{to:`/paper/${d}`,children:be(R.paper_title,g)}):be(R.paper_title,g)]})]})]})})(),n.jsxs("div",{className:"bm-card",ref:y,children:[n.jsxs("div",{className:"bm-card-screenshot-header","aria-hidden":"true",children:[n.jsxs("div",{className:"bm-card-screenshot-title",children:[n.jsx("span",{className:"bm-card-screenshot-eyebrow",children:"Benchmark"}),n.jsx("span",{className:"bm-card-screenshot-name",children:_.name})]}),n.jsxs("div",{className:"bm-card-screenshot-brand",children:[n.jsxs("span",{className:"brand",children:[n.jsx("span",{className:"brand-mark"}),n.jsxs("span",{className:"brand-name",children:["Papers ",n.jsx("em",{children:"With Code"})]})]}),n.jsx("span",{className:"bm-card-screenshot-url",children:"paperswithcode.co"})]})]}),n.jsxs("div",{className:"bm-card-head",children:[n.jsx("div",{className:"bm-card-title",children:"Leaderboard"}),n.jsxs("div",{className:"bm-card-actions",children:[A.length>1&&n.jsxs("label",{className:"bm-view-select",children:[n.jsx("span",{className:"bm-view-select-label",children:"View"}),n.jsx("select",{value:b,onChange:d=>l(d.target.value),children:W.map(d=>n.jsx("option",{value:d,children:d},d))})]}),n.jsxs("label",{className:"bm-closed-toggle",title:"Show or hide evaluations of closed-source models",children:[n.jsx(Je,{className:"bm-closed-toggle-switch",checked:!a.hide_closed_source_evals,onCheckedChange:d=>{i(!d)},"aria-label":"Show closed-source models"}),n.jsx("span",{className:"bm-closed-toggle-label",children:"Closed-source"})]}),n.jsx(ct,{targetRef:y,label:"leaderboard"})]})]}),E.isLoading?n.jsx("div",{style:{padding:16},children:Array.from({length:5}).map((d,g)=>n.jsx(xe,{className:"h-10 w-full mb-2"},g))}):Q.length===0?n.jsx("div",{className:"no-results",children:"No evaluations submitted yet."}):n.jsx("div",{className:"bm-table-scroll",children:n.jsxs("table",{className:"bm-table",children:[n.jsx("thead",{children:n.jsxs("tr",{children:[n.jsx("th",{className:"col-rank",children:"Rank"}),n.jsx("th",{className:"col-model",children:"Model"}),Fe&&n.jsx("th",{className:"col-harness",children:"Harness"}),le.map(d=>{const g=d===b;return n.jsx("th",{className:`col-value ${g?"is-active":""}`,"aria-sort":g?K==="↓"?"ascending":"descending":"none",children:n.jsxs("button",{type:"button",className:"bm-metric-header",onClick:()=>l(d),"aria-pressed":g,title:`Sort by ${d}`,children:[d,g?` ${K}`:""]})},d)}),n.jsx("th",{className:"col-paper",children:"Paper"}),n.jsx("th",{className:"col-year",children:"Year"})]})}),n.jsx("tbody",{children:(()=>{let d=null,g=0;return Q.map((h,S)=>{var Ke,Qe;const T=he((Ke=h.metrics)==null?void 0:Ke[b]);let j=null;T!==null&&((d===null||T!==d)&&(g=S+1,d=T),j=g);const ue=h.paper_arxiv_id||h.paper_id,Ge=h.paper_title||(h.paper_arxiv_id?`arXiv:${h.paper_arxiv_id}`:null),ke=lt(h,s);return n.jsxs("tr",{ref:ke?u:void 0,className:ke?"is-highlighted":void 0,children:[n.jsx("td",{className:"col-rank",children:j??"—"}),n.jsxs("td",{className:"col-model",children:[ke&&n.jsx("span",{className:"bm-row-marker","aria-hidden":"true"}),h.hf_model_url?n.jsx("a",{href:h.hf_model_url,target:"_blank",rel:"noopener noreferrer",className:"bm-model-link",title:`Open ${h.model_name||"model"} on Hugging Face`,children:h.model_name||"—"}):h.model_name||"—",h.is_open===!1&&n.jsx(Nt,{}),(h.external??h.is_external)&&n.jsx(Rt,{sourceUrl:h.source_url||h.external_source_url||h.result_url})]}),Fe&&n.jsx("td",{className:"col-harness",children:h.harness||"—"}),le.map(Se=>{var Ye;const Xe=Se===b,ge=(Ye=h.metrics)==null?void 0:Ye[Se];return n.jsx("td",{className:`col-value${Xe?" is-active":""}${Xe&&j===1?" is-best":""}`,children:ge!=null&&ge!==""?ne(ge):"—"},Se)}),n.jsx("td",{className:"col-paper",children:ue?n.jsx(me,{to:`/paper/${ue}`,children:be(h.paper_title,Ge)}):be(h.paper_title,Ge)}),n.jsx("td",{className:"col-year",children:((Qe=h.paper_published_date)==null?void 0:Qe.slice(0,4))||"—"})]},h.id)})})()})]})})]})]})})};export{Jr as default};
|
|
|
|
| 1 |
+
import{u as vt,r as w,j as n,a4 as ne,h as jt,f as _t,a as kt,_ as St,L as me,c as ee}from"./index-DaC9z2lA.js";import{u as te}from"./useQuery-DaHFL0rL.js";import{S as xe}from"./skeleton-DMsDaBre.js";import{S as Je}from"./switch-B7JykEjw.js";import{A as Ct,a as Et}from"./alert-CEb_9u-E.js";import{L as ye}from"./LatexTitle-C6bpusZm.js";import{C as Nt,E as Rt}from"./ExternalSourceEvalBadge-hiSahiUS.js";import{B as Tt}from"./BenchmarkTrendSparkline-BBkCWHyp.js";import{I as $t}from"./components-C8eWDsbC.js";import{s as Mt}from"./safeExternalHref-CkBrsh84.js";import"./index-BPU7_n66.js";import"./katex.min-BSBacQyE.js";import"./hover-card-1A3Ph00K.js";import"./transform-By0Q02j6.js";function Ft(e,t,r){const s=t?(e??[]).filter(c=>c.task_id===t):e??[],a=s.filter(c=>c.is_open===!1),i=a.reduce((c,l)=>c?(l.best_rank??Number.POSITIVE_INFINITY)<(c.best_rank??Number.POSITIVE_INFINITY)?l:c:l,null);return{visible:r?s.filter(c=>c.is_open!==!1):s,hiddenClosed:a,topHiddenClosed:i}}function Ze(e){const t=e.length===7?`${e}-01`:e,r=new Date(t).getTime();return Number.isFinite(r)?r:0}const Ce=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Ee(e){const t=new Date(e);return{year:t.getFullYear(),month:t.getMonth()}}function Lt(e,t){if(e===t){const{year:u,month:p}=Ee(e);return[{timestamp:new Date(u,p,1).getTime(),key:`${u}-${p}`,label:`${Ce[p]} ${u}`}]}const r=Ee(e),s=Ee(t);if(r.year===s.year){const u=s.month-r.month+1;let p=1;const f=12;u>f&&(p=Math.ceil(u/f));const y=[];for(let x=r.month;x<=s.month;x+=p)y.push({timestamp:new Date(r.year,x,1).getTime(),key:`${r.year}-${x}`,label:u<=3?`${Ce[x]} ${r.year}`:Ce[x]});return y}const a=s.year-r.year+1;let i=1;const c=12;a>c&&(i=Math.ceil(a/c));const l=[];for(let u=r.year;u<=s.year;u+=i)l.push({timestamp:new Date(u,0,1).getTime(),key:String(u),label:String(u)});return l}const It=({points:e,metric:t})=>{const r=vt(),[s,a]=w.useState(null),i=880,c=320,l=60,u=30,p=40,f=50,y=e.map(o=>o.value),x=Math.min(...y),U=Math.max(...y)-x||1,ae=i-l-u,L=c-p-f,$=e.map(o=>Ze(o.date)),z=Math.min(...$),I=Math.max(...$),ie=I-z||1,Y=o=>z===I?l+ae/2:l+(o-z)/ie*ae,G=e.map((o,m)=>{const k=Y(Ze(o.date)),v=(o.value-x)/U,M=p+L*(1-v);return{x:k,y:M,data:o,idx:m}}),N=G.filter(o=>o.data.isSota);let O="";if(N.length>=2){O=`M${N[0].x},${N[0].y}`;for(let o=1;o<N.length;o++){const m=N[o-1],k=N[o],v=(m.x+k.x)/2;O+=` C${v},${m.y} ${v},${k.y} ${k.x},${k.y}`}}const H=5.4,fe=8,J=9,A=o=>{const m=o.data.modelName||o.data.paperTitle||"";if(!m)return null;const k=m.length>22?m.slice(0,21)+"…":m,v=k.length*H;let M=o.x-v/2,C=o.x+v/2,V="middle";return M<l?(M=l,C=l+v,V="start"):C>i-u&&(C=i-u,M=C-v,V="end"),{x:V==="start"?l:V==="end"?i-u:o.x,y:o.y-J,text:k,anchor:V,left:M,right:C}},ce=[],b=N.length>0?A(N[N.length-1]):null;let _e=-1/0;for(let o=0;o<N.length-1;o++){const m=A(N[o]);m&&(m.left<_e+fe||b&&m.right>b.left-fe||(_e=m.right,ce.push({x:m.x,y:m.y,text:m.text,anchor:m.anchor})))}b&&ce.push({x:b.x,y:b.y,text:b.text,anchor:b.anchor});const K=Lt(z,I),W=5,le=o=>a(m=>m===o?null:m),oe=o=>{o&&r(`/paper/${o}`)},pe=(o,m)=>{const v=`${o.data.modelName||o.data.paperTitle||"Unknown model"}: ${ne(o.data.value)} on ${o.data.dateLabel}`,M=!!o.data.paperRouteId;return n.jsxs("g",{children:[m,n.jsx("circle",{cx:o.x,cy:o.y,r:"10",fill:"transparent",style:{cursor:M?"pointer":"default",outline:"none"},tabIndex:0,role:M?"link":"img","aria-label":v,onMouseEnter:()=>a(o.idx),onMouseLeave:()=>le(o.idx),onFocus:()=>a(o.idx),onBlur:()=>le(o.idx),onClick:()=>oe(o.data.paperRouteId),onKeyDown:C=>{M&&(C.key==="Enter"||C.key===" ")&&(C.preventDefault(),oe(o.data.paperRouteId))},children:n.jsx("title",{children:v})})]},o.idx)};return n.jsxs("svg",{width:"100%",viewBox:`0 0 ${i} ${c}`,style:{display:"block"},children:[n.jsx("text",{x:l-38,y:p+L/2,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-faint)",textAnchor:"middle",transform:`rotate(-90 ${l-38} ${p+L/2})`,children:t}),Array.from({length:W}).map((o,m)=>{const k=m/(W-1),v=p+L*(1-k),M=x+U*k;return n.jsxs("g",{children:[n.jsx("line",{x1:l,y1:v,x2:i-u,y2:v,stroke:"var(--hairline)",strokeWidth:"1"}),n.jsx("text",{x:l-10,y:v+4,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-faint)",textAnchor:"end",children:ne(M)})]},m)}),K.map(o=>{const m=Y(o.timestamp);return n.jsx("text",{x:m,y:c-f+18,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-soft)",textAnchor:"middle",children:o.label},o.key)}),G.filter(o=>!o.data.isSota).map(o=>{const m=s===o.idx;return pe(o,n.jsx("circle",{cx:o.x,cy:o.y,r:m?3:2,fill:"var(--ink-faint)",opacity:m?1:.45,style:{transition:"r 0.12s ease, opacity 0.12s ease"}}))}),O&&n.jsx("path",{d:O,stroke:"var(--accent)",strokeWidth:"2",fill:"none",strokeLinejoin:"round",strokeLinecap:"round"}),N.map(o=>{const m=s===o.idx;return pe(o,n.jsx("circle",{cx:o.x,cy:o.y,r:m?4.5:3,fill:m?"var(--accent)":"var(--bg-elevated)",stroke:"var(--accent)",strokeWidth:"1.5",style:{transition:"r 0.12s ease, fill 0.12s ease"}}))}),ce.map((o,m)=>n.jsx("text",{x:o.x,y:o.y,fontSize:"9.5",fontFamily:"var(--mono)",fill:"var(--ink-soft)",textAnchor:o.anchor,pointerEvents:"none",style:{paintOrder:"stroke",stroke:"var(--bg-elevated)",strokeWidth:3,strokeLinejoin:"round"},children:o.text},`label-${m}`)),s!==null&&G[s]&&(()=>{const o=G[s],m=o.data.modelName||o.data.paperTitle||"Unknown model",v=`${m.length>40?m.slice(0,39)+"…":m}: ${ne(o.data.value)}`,C=Math.max(120,Math.min(340,v.length*6.6+24)),V=30;let B=o.x-C/2;B<l&&(B=l),B+C>i-u&&(B=i-u-C);const Q=o.y-V-14>=p?o.y-V-12:o.y+12;return n.jsxs("g",{pointerEvents:"none",children:[n.jsx("rect",{x:B,y:Q,width:C,height:V,rx:"6",ry:"6",fill:"var(--bg-elevated)",stroke:"var(--hairline-strong)",strokeWidth:"1",style:{filter:"drop-shadow(0 2px 6px rgba(0,0,0,0.08))"}}),n.jsx("text",{x:B+12,y:Q+19,fontSize:"12",fontFamily:"var(--sans)",fill:"var(--ink)",fontWeight:500,children:v})]})})()]})};function Pt(e,t){if(e.match(/^[a-z]+:\/\//i))return e;if(e.match(/^\/\//))return window.location.protocol+e;if(e.match(/^[a-z]+:/i))return e;const r=document.implementation.createHTMLDocument(),s=r.createElement("base"),a=r.createElement("a");return r.head.appendChild(s),r.body.appendChild(a),t&&(s.href=t),a.href=e,a.href}const At=(()=>{let e=0;const t=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(e+=1,`u${t()}${e}`)})();function q(e){const t=[];for(let r=0,s=e.length;r<s;r++)t.push(e[r]);return t}let re=null;function dt(e={}){return re||(e.includeStyleProperties?(re=e.includeStyleProperties,re):(re=q(window.getComputedStyle(document.documentElement)),re))}function we(e,t){const s=(e.ownerDocument.defaultView||window).getComputedStyle(e).getPropertyValue(t);return s?parseFloat(s.replace("px","")):0}function Dt(e){const t=we(e,"border-left-width"),r=we(e,"border-right-width");return e.clientWidth+t+r}function Bt(e){const t=we(e,"border-top-width"),r=we(e,"border-bottom-width");return e.clientHeight+t+r}function ut(e,t={}){const r=t.width||Dt(e),s=t.height||Bt(e);return{width:r,height:s}}function Ht(){let e,t;try{t=process}catch{}const r=t&&t.env?t.env.devicePixelRatio:null;return r&&(e=parseInt(r,10),Number.isNaN(e)&&(e=1)),e||window.devicePixelRatio||1}const D=16384;function Vt(e){(e.width>D||e.height>D)&&(e.width>D&&e.height>D?e.width>e.height?(e.height*=D/e.width,e.width=D):(e.width*=D/e.height,e.height=D):e.width>D?(e.height*=D/e.width,e.width=D):(e.width*=D/e.height,e.height=D))}function Ot(e,t={}){return e.toBlob?new Promise(r=>{e.toBlob(r,t.type?t.type:"image/png",t.quality?t.quality:1)}):new Promise(r=>{const s=window.atob(e.toDataURL(t.type?t.type:void 0,t.quality?t.quality:void 0).split(",")[1]),a=s.length,i=new Uint8Array(a);for(let c=0;c<a;c+=1)i[c]=s.charCodeAt(c);r(new Blob([i],{type:t.type?t.type:"image/png"}))})}function ve(e){return new Promise((t,r)=>{const s=new Image;s.onload=()=>{s.decode().then(()=>{requestAnimationFrame(()=>t(s))})},s.onerror=r,s.crossOrigin="anonymous",s.decoding="async",s.src=e})}async function Ut(e){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then(t=>`data:image/svg+xml;charset=utf-8,${t}`)}async function Wt(e,t,r){const s="http://www.w3.org/2000/svg",a=document.createElementNS(s,"svg"),i=document.createElementNS(s,"foreignObject");return a.setAttribute("width",`${t}`),a.setAttribute("height",`${r}`),a.setAttribute("viewBox",`0 0 ${t} ${r}`),i.setAttribute("width","100%"),i.setAttribute("height","100%"),i.setAttribute("x","0"),i.setAttribute("y","0"),i.setAttribute("externalResourcesRequired","true"),a.appendChild(i),i.appendChild(e),Ut(a)}const P=(e,t)=>{if(e instanceof t)return!0;const r=Object.getPrototypeOf(e);return r===null?!1:r.constructor.name===t.name||P(r,t)};function qt(e){const t=e.getPropertyValue("content");return`${e.cssText} content: '${t.replace(/'|"/g,"")}';`}function zt(e,t){return dt(t).map(r=>{const s=e.getPropertyValue(r),a=e.getPropertyPriority(r);return`${r}: ${s}${a?" !important":""};`}).join(" ")}function Gt(e,t,r,s){const a=`.${e}:${t}`,i=r.cssText?qt(r):zt(r,s);return document.createTextNode(`${a}{${i}}`)}function et(e,t,r,s){const a=window.getComputedStyle(e,r),i=a.getPropertyValue("content");if(i===""||i==="none")return;const c=At();try{t.className=`${t.className} ${c}`}catch{return}const l=document.createElement("style");l.appendChild(Gt(c,r,a,s)),t.appendChild(l)}function Kt(e,t,r){et(e,t,":before",r),et(e,t,":after",r)}const tt="application/font-woff",rt="image/jpeg",Qt={woff:tt,woff2:tt,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:rt,jpeg:rt,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function Xt(e){const t=/\.([^./]*?)$/g.exec(e);return t?t[1]:""}function $e(e){const t=Xt(e).toLowerCase();return Qt[t]||""}function Yt(e){return e.split(/,/)[1]}function Re(e){return e.search(/^(data:)/)!==-1}function Jt(e,t){return`data:${t};base64,${e}`}async function mt(e,t,r){const s=await fetch(e,t);if(s.status===404)throw new Error(`Resource "${s.url}" not found`);const a=await s.blob();return new Promise((i,c)=>{const l=new FileReader;l.onerror=c,l.onloadend=()=>{try{i(r({res:s,result:l.result}))}catch(u){c(u)}},l.readAsDataURL(a)})}const Ne={};function Zt(e,t,r){let s=e.replace(/\?.*/,"");return r&&(s=e),/ttf|otf|eot|woff2?/i.test(s)&&(s=s.replace(/.*\//,"")),t?`[${t}]${s}`:s}async function Me(e,t,r){const s=Zt(e,t,r.includeQueryParams);if(Ne[s]!=null)return Ne[s];r.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+new Date().getTime());let a;try{const i=await mt(e,r.fetchRequestInit,({res:c,result:l})=>(t||(t=c.headers.get("Content-Type")||""),Yt(l)));a=Jt(i,t)}catch(i){a=r.imagePlaceholder||"";let c=`Failed to fetch resource: ${e}`;i&&(c=typeof i=="string"?i:i.message),c&&console.warn(c)}return Ne[s]=a,a}async function er(e){const t=e.toDataURL();return t==="data:,"?e.cloneNode(!1):ve(t)}async function tr(e,t){if(e.currentSrc){const i=document.createElement("canvas"),c=i.getContext("2d");i.width=e.clientWidth,i.height=e.clientHeight,c==null||c.drawImage(e,0,0,i.width,i.height);const l=i.toDataURL();return ve(l)}const r=e.poster,s=$e(r),a=await Me(r,s,t);return ve(a)}async function rr(e,t){var r;try{if(!((r=e==null?void 0:e.contentDocument)===null||r===void 0)&&r.body)return await je(e.contentDocument.body,t,!0)}catch{}return e.cloneNode(!1)}async function sr(e,t){return P(e,HTMLCanvasElement)?er(e):P(e,HTMLVideoElement)?tr(e,t):P(e,HTMLIFrameElement)?rr(e,t):e.cloneNode(ht(e))}const nr=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SLOT",ht=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SVG";async function ar(e,t,r){var s,a;if(ht(t))return t;let i=[];return nr(e)&&e.assignedNodes?i=q(e.assignedNodes()):P(e,HTMLIFrameElement)&&(!((s=e.contentDocument)===null||s===void 0)&&s.body)?i=q(e.contentDocument.body.childNodes):i=q(((a=e.shadowRoot)!==null&&a!==void 0?a:e).childNodes),i.length===0||P(e,HTMLVideoElement)||await i.reduce((c,l)=>c.then(()=>je(l,r)).then(u=>{u&&t.appendChild(u)}),Promise.resolve()),t}function ir(e,t,r){const s=t.style;if(!s)return;const a=window.getComputedStyle(e);a.cssText?(s.cssText=a.cssText,s.transformOrigin=a.transformOrigin):dt(r).forEach(i=>{let c=a.getPropertyValue(i);i==="font-size"&&c.endsWith("px")&&(c=`${Math.floor(parseFloat(c.substring(0,c.length-2)))-.1}px`),P(e,HTMLIFrameElement)&&i==="display"&&c==="inline"&&(c="block"),i==="d"&&t.getAttribute("d")&&(c=`path(${t.getAttribute("d")})`),s.setProperty(i,c,a.getPropertyPriority(i))})}function cr(e,t){P(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),P(e,HTMLInputElement)&&t.setAttribute("value",e.value)}function lr(e,t){if(P(e,HTMLSelectElement)){const r=t,s=Array.from(r.children).find(a=>e.value===a.getAttribute("value"));s&&s.setAttribute("selected","")}}function or(e,t,r){return P(t,Element)&&(ir(e,t,r),Kt(e,t,r),cr(e,t),lr(e,t)),t}async function dr(e,t){const r=e.querySelectorAll?e.querySelectorAll("use"):[];if(r.length===0)return e;const s={};for(let i=0;i<r.length;i++){const l=r[i].getAttribute("xlink:href");if(l){const u=e.querySelector(l),p=document.querySelector(l);!u&&p&&!s[l]&&(s[l]=await je(p,t,!0))}}const a=Object.values(s);if(a.length){const i="http://www.w3.org/1999/xhtml",c=document.createElementNS(i,"svg");c.setAttribute("xmlns",i),c.style.position="absolute",c.style.width="0",c.style.height="0",c.style.overflow="hidden",c.style.display="none";const l=document.createElementNS(i,"defs");c.appendChild(l);for(let u=0;u<a.length;u++)l.appendChild(a[u]);e.appendChild(c)}return e}async function je(e,t,r){return!r&&t.filter&&!t.filter(e)?null:Promise.resolve(e).then(s=>sr(s,t)).then(s=>ar(e,s,t)).then(s=>or(e,s,t)).then(s=>dr(s,t))}const ft=/url\((['"]?)([^'"]+?)\1\)/g,ur=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,mr=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function hr(e){const t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}function fr(e){const t=[];return e.replace(ft,(r,s,a)=>(t.push(a),r)),t.filter(r=>!Re(r))}async function pr(e,t,r,s,a){try{const i=r?Pt(t,r):t,c=$e(t);let l;return a||(l=await Me(i,c,s)),e.replace(hr(t),`$1${l}$3`)}catch{}return e}function gr(e,{preferredFontFormat:t}){return t?e.replace(mr,r=>{for(;;){const[s,,a]=ur.exec(r)||[];if(!a)return"";if(a===t)return`src: ${s};`}}):e}function pt(e){return e.search(ft)!==-1}async function gt(e,t,r){if(!pt(e))return e;const s=gr(e,r);return fr(s).reduce((i,c)=>i.then(l=>pr(l,c,t,r)),Promise.resolve(s))}async function se(e,t,r){var s;const a=(s=t.style)===null||s===void 0?void 0:s.getPropertyValue(e);if(a){const i=await gt(a,null,r);return t.style.setProperty(e,i,t.style.getPropertyPriority(e)),!0}return!1}async function xr(e,t){await se("background",e,t)||await se("background-image",e,t),await se("mask",e,t)||await se("-webkit-mask",e,t)||await se("mask-image",e,t)||await se("-webkit-mask-image",e,t)}async function br(e,t){const r=P(e,HTMLImageElement);if(!(r&&!Re(e.src))&&!(P(e,SVGImageElement)&&!Re(e.href.baseVal)))return;const s=r?e.src:e.href.baseVal,a=await Me(s,$e(s),t);await new Promise((i,c)=>{e.onload=i,e.onerror=t.onImageErrorHandler?(...u)=>{try{i(t.onImageErrorHandler(...u))}catch(p){c(p)}}:c;const l=e;l.decode&&(l.decode=i),l.loading==="lazy"&&(l.loading="eager"),r?(e.srcset="",e.src=a):e.href.baseVal=a})}async function yr(e,t){const s=q(e.childNodes).map(a=>xt(a,t));await Promise.all(s).then(()=>e)}async function xt(e,t){P(e,Element)&&(await xr(e,t),await br(e,t),await yr(e,t))}function wr(e,t){const{style:r}=e;t.backgroundColor&&(r.backgroundColor=t.backgroundColor),t.width&&(r.width=`${t.width}px`),t.height&&(r.height=`${t.height}px`);const s=t.style;return s!=null&&Object.keys(s).forEach(a=>{r[a]=s[a]}),e}const st={};async function nt(e){let t=st[e];if(t!=null)return t;const s=await(await fetch(e)).text();return t={url:e,cssText:s},st[e]=t,t}async function at(e,t){let r=e.cssText;const s=/url\(["']?([^"')]+)["']?\)/g,i=(r.match(/url\([^)]+\)/g)||[]).map(async c=>{let l=c.replace(s,"$1");return l.startsWith("https://")||(l=new URL(l,e.url).href),mt(l,t.fetchRequestInit,({result:u})=>(r=r.replace(c,`url(${u})`),[c,u]))});return Promise.all(i).then(()=>r)}function it(e){if(e==null)return[];const t=[],r=/(\/\*[\s\S]*?\*\/)/gi;let s=e.replace(r,"");const a=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){const u=a.exec(s);if(u===null)break;t.push(u[0])}s=s.replace(a,"");const i=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,c="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})",l=new RegExp(c,"gi");for(;;){let u=i.exec(s);if(u===null){if(u=l.exec(s),u===null)break;i.lastIndex=l.lastIndex}else l.lastIndex=i.lastIndex;t.push(u[0])}return t}async function vr(e,t){const r=[],s=[];return e.forEach(a=>{if("cssRules"in a)try{q(a.cssRules||[]).forEach((i,c)=>{if(i.type===CSSRule.IMPORT_RULE){let l=c+1;const u=i.href,p=nt(u).then(f=>at(f,t)).then(f=>it(f).forEach(y=>{try{a.insertRule(y,y.startsWith("@import")?l+=1:a.cssRules.length)}catch(x){console.error("Error inserting rule from remote css",{rule:y,error:x})}})).catch(f=>{console.error("Error loading remote css",f.toString())});s.push(p)}})}catch(i){const c=e.find(l=>l.href==null)||document.styleSheets[0];a.href!=null&&s.push(nt(a.href).then(l=>at(l,t)).then(l=>it(l).forEach(u=>{c.insertRule(u,c.cssRules.length)})).catch(l=>{console.error("Error loading remote stylesheet",l)})),console.error("Error inlining remote css file",i)}}),Promise.all(s).then(()=>(e.forEach(a=>{if("cssRules"in a)try{q(a.cssRules||[]).forEach(i=>{r.push(i)})}catch(i){console.error(`Error while reading CSS rules from ${a.href}`,i)}}),r))}function jr(e){return e.filter(t=>t.type===CSSRule.FONT_FACE_RULE).filter(t=>pt(t.style.getPropertyValue("src")))}async function _r(e,t){if(e.ownerDocument==null)throw new Error("Provided element is not within a Document");const r=q(e.ownerDocument.styleSheets),s=await vr(r,t);return jr(s)}function bt(e){return e.trim().replace(/["']/g,"")}function kr(e){const t=new Set;function r(s){(s.style.fontFamily||getComputedStyle(s).fontFamily).split(",").forEach(i=>{t.add(bt(i))}),Array.from(s.children).forEach(i=>{i instanceof HTMLElement&&r(i)})}return r(e),t}async function Sr(e,t){const r=await _r(e,t),s=kr(e);return(await Promise.all(r.filter(i=>s.has(bt(i.style.fontFamily))).map(i=>{const c=i.parentStyleSheet?i.parentStyleSheet.href:null;return gt(i.cssText,c,t)}))).join(`
|
| 2 |
`)}async function Cr(e,t){const r=t.fontEmbedCSS!=null?t.fontEmbedCSS:t.skipFonts?null:await Sr(e,t);if(r){const s=document.createElement("style"),a=document.createTextNode(r);s.appendChild(a),e.firstChild?e.insertBefore(s,e.firstChild):e.appendChild(s)}}async function Er(e,t={}){const{width:r,height:s}=ut(e,t),a=await je(e,t,!0);return await Cr(a,t),await xt(a,t),wr(a,t),await Wt(a,r,s)}async function Nr(e,t={}){const{width:r,height:s}=ut(e,t),a=await Er(e,t),i=await ve(a),c=document.createElement("canvas"),l=c.getContext("2d"),u=t.pixelRatio||Ht(),p=t.canvasWidth||r,f=t.canvasHeight||s;return c.width=p*u,c.height=f*u,t.skipAutoScale||Vt(c),c.style.width=`${p}`,c.style.height=`${f}`,t.backgroundColor&&(l.fillStyle=t.backgroundColor,l.fillRect(0,0,c.width,c.height)),l.drawImage(i,0,0,c.width,c.height),c}async function Rr(e,t={}){const r=await Nr(e,t);return await Ot(r)}const Te="#ffffff";function Tr(){return typeof window>"u"?Te:window.getComputedStyle(document.documentElement).getPropertyValue("--bg-elevated").trim()||Te}function $r(e){if(typeof window>"u")return Te;const t=window.getComputedStyle(e).backgroundColor;return!t||t==="rgba(0, 0, 0, 0)"||t==="transparent"?Tr():t}async function Mr(e){var r,s;if(typeof window>"u"||!((s=(r=window.navigator)==null?void 0:r.clipboard)!=null&&s.write))throw new Error("Clipboard image copy is not supported in this browser.");if(typeof window.ClipboardItem>"u")throw new Error("Clipboard image copy is not supported in this browser.");const t=await Rr(e,{pixelRatio:2,cacheBust:!0,backgroundColor:$r(e)});if(!t)throw new Error("Failed to render screenshot.");await window.navigator.clipboard.write([new window.ClipboardItem({"image/png":t})])}const ct=({targetRef:e,label:t})=>{const{toast:r}=jt(),[s,a]=w.useState("idle"),i=w.useRef(null);w.useEffect(()=>()=>{i.current!==null&&window.clearTimeout(i.current)},[]);const c=w.useCallback(async()=>{const u=e.current;if(u){a("copying"),u.classList.add("is-capturing"),u.offsetHeight,await new Promise(p=>window.requestAnimationFrame(()=>p()));try{await Mr(u),a("copied"),r({title:"Screenshot copied",description:`Image of the ${t} copied to your clipboard.`}),i.current!==null&&window.clearTimeout(i.current),i.current=window.setTimeout(()=>a("idle"),1500)}catch(p){a("idle"),r({title:"Copy failed",description:p instanceof Error&&p.message?p.message:"Could not copy the screenshot to your clipboard.",variant:"destructive"})}finally{u.classList.remove("is-capturing")}}},[e,t,r]),l=s==="copied"?"Copied":s==="copying"?"Copying…":"Copy image";return n.jsxs("button",{type:"button",className:"bm-copy-btn",onClick:c,disabled:s==="copying","aria-label":`Copy ${t} screenshot to clipboard`,title:`Copy ${t} screenshot to clipboard`,children:[n.jsx($t,{name:"copy",size:11}),l]})};function he(e){if(e==null)return null;if(typeof e=="number")return Number.isFinite(e)?e:null;const t=e.includes("±")?e.split("±")[0].trim():e.trim(),r=parseFloat(t);return Number.isFinite(r)?r:null}function Fr(e){return[e.paper_id,e.task_id,e.dataset_id,e.model_name,e.harness??""].join("|")}function Lr(e){const t=new Map;for(const r of e){const s=Fr(r),a=t.get(s);if(!a){t.set(s,{...r,metrics:{...r.metrics||{}},sourceEvaluationIds:[r.id],ranksByMetric:r.best_metric&&r.best_rank!=null?{[r.best_metric]:r.best_rank}:{}});continue}a.metrics={...a.metrics,...r.metrics||{}},a.sourceEvaluationIds.push(r.id),r.best_metric&&r.best_rank!=null&&(a.ranksByMetric[r.best_metric]=r.best_rank)}return Array.from(t.values())}function lt(e,t){return t?e.id===t||e.sourceEvaluationIds.includes(t):!1}function ot(e,t){return e.ranksByMetric[t]??e.best_rank??9999}function Ir(e,t,r){if(e.length===0)return{points:[],sota:0,sotaModel:""};const s=e.map(f=>{var E;const y=he((E=f.metrics)==null?void 0:E[t]),x=f.paper_published_date||"";return{eval:f,value:y,date:x}}).filter(f=>f.value!==null&&!!f.date).sort((f,y)=>f.date.localeCompare(y.date)),a=[];let i=null;for(const f of s){const y=i==null?!0:r==="↓"?f.value<i:f.value>i;y&&(i=f.value),a.push({value:f.value,date:f.date,dateLabel:f.date.slice(0,7),modelName:f.eval.model_name||"",paperTitle:f.eval.paper_title||"",paperRouteId:f.eval.paper_arxiv_id||f.eval.paper_id||null,isSota:y})}const l=e.map(f=>{var y;return{eval:f,value:he((y=f.metrics)==null?void 0:y[t])}}).filter(f=>f.value!==null).sort((f,y)=>r==="↓"?f.value-y.value:y.value-f.value)[0],u=(l==null?void 0:l.value)??0,p=(l==null?void 0:l.eval.model_name)||(l==null?void 0:l.eval.paper_title)||"";return{points:a,sota:u,sotaModel:p}}const Pr=5;function Ar(e){if(!e)return null;const t=e.trim(),r=t.match(/^https?:\/\/(?:www\.)?arxiv\.org\/(?:abs|pdf)\/([^/?#]+)/i);if(r!=null&&r[1])return r[1].replace(/\.pdf$/i,"");const s=t.match(/^(?:https?:\/\/(?:www\.)?paperswithcode\.co)?\/paper\/([^/?#]+)/i);return(s==null?void 0:s[1])??null}function be(e,t){return e?n.jsx(ye,{title:e}):t||"—"}const Jr=()=>{var Le,Ie,Pe,Ae,De,Be,He,Ve,Oe,Ue,We,qe,ze;const{datasetSlug:e}=_t(),[t]=kt(),r=t.get("task")||void 0,s=t.get("eval")||void 0,{preferences:a,setHideClosedSourceEvals:i}=St(),[c,l]=w.useState(void 0),u=w.useRef(null),p=w.useRef(!1),f=w.useRef(null),y=w.useRef(null),x=te({queryKey:["dataset",e,"with-paper",r,a.hide_closed_source_evals?"open":"all"],queryFn:()=>ee.getDatasetBySlug(e,{include_paper:!0,task:r,is_open:a.hide_closed_source_evals?!0:void 0}),enabled:!!e,staleTime:10*60*1e3}),E=te({queryKey:["dataset-evals",(Le=x.data)==null?void 0:Le.id],queryFn:()=>ee.getEvaluationsByDataset(x.data.id),enabled:!!((Ie=x.data)!=null&&Ie.id),staleTime:5*60*1e3}),U=te({queryKey:["dataset-tasks",(Pe=x.data)==null?void 0:Pe.id],queryFn:()=>ee.getDatasetTasks(x.data.id),enabled:!!((Ae=x.data)!=null&&Ae.id),staleTime:10*60*1e3}),ae=te({queryKey:["metric-directions"],queryFn:()=>ee.getMetricDirections(),staleTime:60*60*1e3}),L=w.useMemo(()=>{var d;return!s||!((d=E.data)!=null&&d.length)?null:E.data.find(g=>g.id===s)||null},[s,E.data]),$=w.useMemo(()=>{const d=U.data||[];if(d.length===0)return null;if(L!=null&&L.task_id&&d.some(h=>h.id===L.task_id))return L.task_id;if(r){const h=d.find(S=>S.slug===r);if(h)return h.id}if(d.length===1)return d[0].id;const g=E.data||[];if(g.length>0){const h=new Map;for(const j of g)h.set(j.task_id,(h.get(j.task_id)||0)+1);let S=null,T=-1;for(const j of d){const ue=h.get(j.id)||0;ue>T&&(T=ue,S=j.id)}if(S)return S}return d[0].id},[U.data,E.data,r,L]),z=te({queryKey:["task-benchmark-trends",$,a.hide_closed_source_evals?!0:void 0],queryFn:()=>ee.getTrendingBenchmarks($,{limit:100,min_recent_papers:0,is_open:a.hide_closed_source_evals?!0:void 0}),enabled:!!$&&!!((De=x.data)!=null&&De.id),staleTime:10*60*1e3}),I=w.useMemo(()=>{var d;return(((d=z.data)==null?void 0:d.results)||[]).find(g=>{var h;return g.id===((h=x.data)==null?void 0:h.id)})||null},[z.data,(Be=x.data)==null?void 0:Be.id]),ie=te({queryKey:["leaderboard-metrics",(He=x.data)==null?void 0:He.id,$],queryFn:()=>ee.getLeaderboardMetrics(x.data.id,$),enabled:!!((Ve=x.data)!=null&&Ve.id)&&!!$,staleTime:10*60*1e3}),Y=w.useMemo(()=>Ft(E.data,$,a.hide_closed_source_evals),[E.data,$,a.hide_closed_source_evals]),G=Y.visible,N=Y.hiddenClosed,O=Y.topHiddenClosed,H=w.useMemo(()=>Lr(G),[G]),fe=w.useMemo(()=>{const d=new Set;return H.forEach(g=>{g.best_metric&&d.add(g.best_metric),Object.keys(g.metrics||{}).forEach(h=>d.add(h))}),Array.from(d)},[H]),J=w.useMemo(()=>(ie.data||[]).map(d=>d.metric_name),[ie.data]),A=J.length?J:fe,ce=w.useMemo(()=>{var S;if(H.length===0)return A[0]||"";const d=new Map;for(const T of H)for(const j of Object.keys(T.metrics||{}))J.length&&!A.includes(j)||d.set(j,(d.get(j)||0)+1);let g=null,h=0;for(const[T,j]of d)j>h&&(h=j,g=T);return g||A[0]||((S=H[0])==null?void 0:S.best_metric)||""},[H,A,J]),b=c||(L==null?void 0:L.best_metric)||ce,K=(((Ue=(Oe=ae.data)==null?void 0:Oe.directions)==null?void 0:Ue[b])||"higher_is_better")==="lower_is_better"?"↓":"↑",W=w.useMemo(()=>!b||!A.includes(b)?A:[b,...A.filter(d=>d!==b)],[A,b]),le=w.useMemo(()=>W.length===0?b?[b]:[]:W.slice(0,Pr),[W,b]),{points:oe,sota:pe,sotaModel:o}=w.useMemo(()=>Ir(H,b,K),[H,b,K]),m=(We=x.data)==null?void 0:We.leaderboard_summary,k=E.isSuccess&&U.isSuccess&&ae.isSuccess&&(!$||ie.isSuccess),v=k?b:m==null?void 0:m.metric,M=k?pe:m==null?void 0:m.value,C=k?o:m==null?void 0:m.model_name,V=!k&&!m;w.useEffect(()=>{if(p.current||!s||!E.data||E.data.length===0)return;const d=u.current;d&&(p.current=!0,d.scrollIntoView({behavior:"smooth",block:"start"}))},[s,E.data]);const B=w.useMemo(()=>{const d=U.data||[];return $?d.find(g=>g.id===$)||d[0]||null:d[0]||null},[U.data,$]);if(x.isLoading)return n.jsxs("div",{className:"page",children:[n.jsx(xe,{className:"h-12 w-1/2 mb-6"}),n.jsx(xe,{className:"h-64 w-full"})]});if(x.error||!x.data)return n.jsx("div",{className:"page",children:n.jsx(Ct,{variant:"destructive",children:n.jsx(Et,{children:"Benchmark not found."})})});const _=x.data,Q=H.slice().sort((d,g)=>{var T,j;const h=he((T=d.metrics)==null?void 0:T[b]),S=he((j=g.metrics)==null?void 0:j[b]);return h!==null&&S!==null?K==="↓"?h-S:S-h:h!==null?-1:S!==null?1:ot(d,b)-ot(g,b)}),Fe=!!_.supports_harness,R=s&&Q.find(d=>lt(d,s))||null,F=_.introducing_paper??void 0,de=(F==null?void 0:F.arxiv_id)||(F==null?void 0:F.id)||Ar(_.paper_url),X=(F==null?void 0:F.title)||_.introducing_paper_title||null,Z=((qe=F==null?void 0:F.published)==null?void 0:qe.slice(0,4))||_.introduced_year||null,yt=!!de||!!_.paper_url||!!X,wt=F!=null&&F.arxiv_id||(ze=_.paper_url)!=null&&ze.match(/^https?:\/\/(?:www\.)?arxiv\.org\//i)?`arXiv:${de}`:`Paper ${de}`;return n.jsx("div",{className:"page",children:n.jsxs("div",{className:"bm-page",children:[n.jsxs("div",{className:"breadcrumb",children:[n.jsx(me,{to:"/tasks",children:"Tasks"}),B&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"sep",children:"/"}),n.jsx(me,{to:`/tasks/${B.slug||B.id}`,children:B.name})]}),n.jsx("span",{className:"sep",children:"/"}),n.jsx("span",{style:{color:"var(--accent-text)"},children:_.name})]}),n.jsxs("div",{className:"bm-title-row",children:[n.jsx("h1",{className:"bm-title",children:_.name}),I&&n.jsxs("div",{className:"bm-title-trend","aria-label":`${_.name} reporting trend`,children:[n.jsx(Tt,{history:I.history,benchmarkName:I.name}),n.jsxs("span",{className:"bm-title-trend-summary",children:[n.jsx("strong",{children:I.recent_paper_count})," ",I.recent_paper_count===1?"paper":"papers",I.rate_change==null?I.recent_paper_count>0&&n.jsx("span",{className:"benchmark-trend-change is-new",children:"new"}):n.jsxs("span",{className:`benchmark-trend-change ${I.rate_change>=1?"is-up":"is-down"}`,children:[I.rate_change>=1?"↑":"↓"," ",I.rate_change.toFixed(1),"×"]})]})]})]}),n.jsxs("div",{className:"bm-subtitle",children:[V?n.jsx(xe,{className:"h-5 w-64 bm-summary-skeleton","aria-label":"Loading benchmark summary"}):n.jsxs("span",{children:[v&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"metric-tag",children:v}),n.jsx("span",{style:{color:"var(--hairline-strong)",margin:"0 8px"},children:"·"})]}),C?n.jsxs("span",{children:["Best: ",n.jsx("span",{className:"best-name",children:ne(M)})," by ",n.jsx("span",{className:"best-name",style:{fontStyle:"normal"},children:C})]}):n.jsxs("span",{children:[Q.length," evaluations"]})]}),_.hf_url&&n.jsxs("a",{className:"bm-action-btn",href:_.hf_url,target:"_blank",rel:"noopener noreferrer",children:[n.jsx("span",{"aria-hidden":"true",children:"🤗"})," View on Hugging Face"]})]}),_.description&&n.jsx("p",{className:"bm-description",children:_.description}),a.hide_closed_source_evals&&N.length>0&&n.jsxs("div",{className:"bm-hidden-closed-notice",children:[n.jsxs("span",{children:[N.length," closed-source ",N.length===1?"row is":"rows are"," hidden",O!=null&&O.model_name?n.jsxs(n.Fragment,{children:[", including ",n.jsx("strong",{children:O.model_name})]}):null,"."]}),n.jsx("button",{type:"button",className:"bm-hidden-closed-action",onClick:()=>{i(!1)},children:"Show closed-source"})]}),yt&&n.jsxs("div",{className:"method-source",style:{marginTop:0,marginBottom:18},children:[n.jsx("span",{className:"method-source-label",children:"Source"}),de?n.jsxs(me,{to:`/paper/${de}`,target:"_blank",rel:"noopener noreferrer",className:"method-source-link",children:[n.jsx("span",{className:"method-source-title",children:X?n.jsx(ye,{title:X}):wt}),Z&&n.jsx("span",{className:"method-source-meta",children:Z})]}):_.paper_url?n.jsxs("a",{href:Mt(_.paper_url)??void 0,target:"_blank",rel:"noopener noreferrer",className:"method-source-link",children:[n.jsx("span",{className:"method-source-title",children:X?n.jsx(ye,{title:X}):_.paper_url}),Z&&n.jsx("span",{className:"method-source-meta",children:Z})]}):n.jsxs("div",{className:"method-source-link is-static",children:[n.jsx("span",{className:"method-source-title",children:X?n.jsx(ye,{title:X}):null}),Z&&n.jsx("span",{className:"method-source-meta",children:Z})]})]}),oe.filter(d=>d.isSota).length>=2&&n.jsxs("div",{className:"bm-card",ref:f,children:[n.jsxs("div",{className:"bm-card-screenshot-header","aria-hidden":"true",children:[n.jsxs("div",{className:"bm-card-screenshot-title",children:[n.jsx("span",{className:"bm-card-screenshot-eyebrow",children:"Benchmark"}),n.jsx("span",{className:"bm-card-screenshot-name",children:_.name})]}),n.jsxs("div",{className:"bm-card-screenshot-brand",children:[n.jsxs("span",{className:"brand",children:[n.jsx("span",{className:"brand-mark"}),n.jsxs("span",{className:"brand-name",children:["Papers ",n.jsx("em",{children:"With Code"})]})]}),n.jsx("span",{className:"bm-card-screenshot-url",children:"paperswithcode.co"})]})]}),n.jsxs("div",{className:"bm-card-head",children:[n.jsx("div",{className:"bm-card-title",children:"SOTA progression"}),n.jsxs("div",{className:"bm-card-actions",children:[A.length>1&&n.jsxs("label",{className:"bm-view-select",children:[n.jsx("span",{className:"bm-view-select-label",children:"View"}),n.jsx("select",{value:b,onChange:d=>l(d.target.value),children:W.map(d=>n.jsx("option",{value:d,children:d},d))})]}),n.jsxs("label",{className:"bm-closed-toggle",title:"Show or hide evaluations of closed-source models",children:[n.jsx(Je,{className:"bm-closed-toggle-switch",checked:!a.hide_closed_source_evals,onCheckedChange:d=>{i(!d)},"aria-label":"Show closed-source models"}),n.jsx("span",{className:"bm-closed-toggle-label",children:"Closed-source"})]}),n.jsx(ct,{targetRef:f,label:"SOTA chart"})]})]}),n.jsx("div",{className:"bm-chart-wrap",children:n.jsx(It,{points:oe,metric:b})}),n.jsxs("div",{className:"bm-chart-foot",children:[n.jsx("span",{className:"legend-dot"}),"All models over time · highlighted dots track the running best · hover for the model · click to open the paper"]})]}),R&&(()=>{var T,j;const d=R.paper_arxiv_id||R.paper_id,g=R.paper_title||(R.paper_arxiv_id?`arXiv:${R.paper_arxiv_id}`:null),h=R.best_metric&&((T=R.metrics)==null?void 0:T[R.best_metric])!==void 0?R.best_metric:b,S=(j=R.metrics)==null?void 0:j[h];return n.jsxs("div",{className:"bm-highlight-banner",role:"status",children:[n.jsx("span",{className:"bm-highlight-dot","aria-hidden":"true"}),n.jsxs("div",{className:"bm-highlight-text",children:[n.jsx("span",{className:"bm-highlight-label",children:"Comparing result"}),n.jsxs("span",{className:"bm-highlight-paper",children:[R.model_name||g||"—",R.harness?` · ${R.harness}`:""]}),n.jsxs("span",{className:"bm-highlight-meta",children:[S!==void 0&&h?n.jsxs(n.Fragment,{children:[h,": ",ne(S),g?" · ":""]}):null,d?n.jsx(me,{to:`/paper/${d}`,children:be(R.paper_title,g)}):be(R.paper_title,g)]})]})]})})(),n.jsxs("div",{className:"bm-card",ref:y,children:[n.jsxs("div",{className:"bm-card-screenshot-header","aria-hidden":"true",children:[n.jsxs("div",{className:"bm-card-screenshot-title",children:[n.jsx("span",{className:"bm-card-screenshot-eyebrow",children:"Benchmark"}),n.jsx("span",{className:"bm-card-screenshot-name",children:_.name})]}),n.jsxs("div",{className:"bm-card-screenshot-brand",children:[n.jsxs("span",{className:"brand",children:[n.jsx("span",{className:"brand-mark"}),n.jsxs("span",{className:"brand-name",children:["Papers ",n.jsx("em",{children:"With Code"})]})]}),n.jsx("span",{className:"bm-card-screenshot-url",children:"paperswithcode.co"})]})]}),n.jsxs("div",{className:"bm-card-head",children:[n.jsx("div",{className:"bm-card-title",children:"Leaderboard"}),n.jsxs("div",{className:"bm-card-actions",children:[A.length>1&&n.jsxs("label",{className:"bm-view-select",children:[n.jsx("span",{className:"bm-view-select-label",children:"View"}),n.jsx("select",{value:b,onChange:d=>l(d.target.value),children:W.map(d=>n.jsx("option",{value:d,children:d},d))})]}),n.jsxs("label",{className:"bm-closed-toggle",title:"Show or hide evaluations of closed-source models",children:[n.jsx(Je,{className:"bm-closed-toggle-switch",checked:!a.hide_closed_source_evals,onCheckedChange:d=>{i(!d)},"aria-label":"Show closed-source models"}),n.jsx("span",{className:"bm-closed-toggle-label",children:"Closed-source"})]}),n.jsx(ct,{targetRef:y,label:"leaderboard"})]})]}),E.isLoading?n.jsx("div",{style:{padding:16},children:Array.from({length:5}).map((d,g)=>n.jsx(xe,{className:"h-10 w-full mb-2"},g))}):Q.length===0?n.jsx("div",{className:"no-results",children:"No evaluations submitted yet."}):n.jsx("div",{className:"bm-table-scroll",children:n.jsxs("table",{className:"bm-table",children:[n.jsx("thead",{children:n.jsxs("tr",{children:[n.jsx("th",{className:"col-rank",children:"Rank"}),n.jsx("th",{className:"col-model",children:"Model"}),Fe&&n.jsx("th",{className:"col-harness",children:"Harness"}),le.map(d=>{const g=d===b;return n.jsx("th",{className:`col-value ${g?"is-active":""}`,"aria-sort":g?K==="↓"?"ascending":"descending":"none",children:n.jsxs("button",{type:"button",className:"bm-metric-header",onClick:()=>l(d),"aria-pressed":g,title:`Sort by ${d}`,children:[d,g?` ${K}`:""]})},d)}),n.jsx("th",{className:"col-paper",children:"Paper"}),n.jsx("th",{className:"col-year",children:"Year"})]})}),n.jsx("tbody",{children:(()=>{let d=null,g=0;return Q.map((h,S)=>{var Ke,Qe;const T=he((Ke=h.metrics)==null?void 0:Ke[b]);let j=null;T!==null&&((d===null||T!==d)&&(g=S+1,d=T),j=g);const ue=h.paper_arxiv_id||h.paper_id,Ge=h.paper_title||(h.paper_arxiv_id?`arXiv:${h.paper_arxiv_id}`:null),ke=lt(h,s);return n.jsxs("tr",{ref:ke?u:void 0,className:ke?"is-highlighted":void 0,children:[n.jsx("td",{className:"col-rank",children:j??"—"}),n.jsxs("td",{className:"col-model",children:[ke&&n.jsx("span",{className:"bm-row-marker","aria-hidden":"true"}),h.hf_model_url?n.jsx("a",{href:h.hf_model_url,target:"_blank",rel:"noopener noreferrer",className:"bm-model-link",title:`Open ${h.model_name||"model"} on Hugging Face`,children:h.model_name||"—"}):h.model_name||"—",h.is_open===!1&&n.jsx(Nt,{}),(h.external??h.is_external)&&n.jsx(Rt,{sourceUrl:h.source_url||h.external_source_url||h.result_url})]}),Fe&&n.jsx("td",{className:"col-harness",children:h.harness||"—"}),le.map(Se=>{var Ye;const Xe=Se===b,ge=(Ye=h.metrics)==null?void 0:Ye[Se];return n.jsx("td",{className:`col-value${Xe?" is-active":""}${Xe&&j===1?" is-best":""}`,children:ge!=null&&ge!==""?ne(ge):"—"},Se)}),n.jsx("td",{className:"col-paper",children:ue?n.jsx(me,{to:`/paper/${ue}`,children:be(h.paper_title,Ge)}):be(h.paper_title,Ge)}),n.jsx("td",{className:"col-year",children:((Qe=h.paper_published_date)==null?void 0:Qe.slice(0,4))||"—"})]},h.id)})})()})]})})]})]})})};export{Jr as default};
|
assets/{BenchmarkTrendSparkline-DeOW3cyn.js → BenchmarkTrendSparkline-BBkCWHyp.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{r as C,j as t}from"./index-
|
|
|
|
| 1 |
+
import{r as C,j as t}from"./index-DaC9z2lA.js";const g=112,p=42,o=5,m=5,b=new Intl.DateTimeFormat("en",{month:"short",timeZone:"UTC"}),y=(e,d)=>{const r=new Date(`${e}T00:00:00Z`),n=new Date(`${d}T00:00:00Z`);return r.getUTCMonth()===n.getUTCMonth()?`${b.format(r)} ${r.getUTCDate()}–${n.getUTCDate()}`:`${b.format(r)} ${r.getUTCDate()}–${b.format(n)} ${n.getUTCDate()}`},I=({history:e,benchmarkName:d,interactive:r=!1})=>{const[n,x]=C.useState(null),h=e.map(s=>s.paper_count),M=Math.max(1,...h),f=g-o*2,T=p-m*2,v=h.length>1?f/(h.length-1):0,a=h.map((s,c)=>({x:o+v*c,y:m+T-s/M*T})),$=a.map(({x:s,y:c})=>`${s},${c}`).join(" "),_=a.length?`${o},${p-m} ${$} ${a[a.length-1].x},${p-m}`:"",D=h.reduce((s,c)=>s+c,0),u=49,N=14,i=n==null?null:a[n],j=i?Math.min(g-o-u,Math.max(o,i.x-u/2)):0,k=i?i.y>p/2?i.y-N-3:i.y+3:0;return t.jsxs("svg",{className:`benchmark-trend-sparkline${r?" is-interactive":""}`,viewBox:`0 0 ${g} ${p}`,role:r?"group":"img","aria-label":`${d}: ${D} reporting papers across the displayed trend history`,children:[t.jsxs("title",{children:[d,": ",D," reporting papers across the displayed trend history"]}),t.jsx("line",{className:"benchmark-trend-axis",x1:o,y1:p-m,x2:g-o,y2:p-m}),t.jsx("line",{className:"benchmark-trend-axis",x1:o,y1:m,x2:o,y2:p-m}),_&&t.jsx("polygon",{className:"benchmark-trend-area",points:_}),$&&t.jsx("polyline",{className:"benchmark-trend-line",points:$}),r?a.map(({x:s,y:c},l)=>t.jsxs("g",{className:"benchmark-trend-point",tabIndex:0,role:"img","aria-label":`${y(e[l].start_date,e[l].end_date)}: ${e[l].paper_count} ${e[l].paper_count===1?"paper":"papers"}`,onMouseEnter:()=>x(l),onMouseLeave:()=>x(null),onFocus:()=>x(l),onBlur:()=>x(null),children:[t.jsx("circle",{className:"benchmark-trend-point-hit",cx:s,cy:c,r:"5"}),t.jsx("circle",{className:"benchmark-trend-point-mark",cx:s,cy:c,r:"1.8"})]},`${e[l].start_date}-${e[l].end_date}`)):a.length>0&&t.jsx("circle",{className:"benchmark-trend-dot",cx:a[a.length-1].x,cy:a[a.length-1].y,r:"2.6"}),i&&n!=null&&t.jsxs("g",{className:"benchmark-trend-tooltip",pointerEvents:"none",children:[t.jsx("rect",{x:j,y:k,width:u,height:N,rx:"2"}),t.jsx("text",{x:j+3,y:k+5.4,children:y(e[n].start_date,e[n].end_date)}),t.jsxs("text",{className:"benchmark-trend-tooltip-value",x:j+3,y:k+11,children:[e[n].paper_count," ",e[n].paper_count===1?"paper":"papers"]})]})]})};export{I as B};
|
assets/{ChatMessage-DmNQEAuW.js → ChatMessage-BSE1CBhX.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
import{d as L,r as C,j as e,R as f,C as B}from"./index-
|
| 2 |
* @license lucide-react v0.462.0 - ISC
|
| 3 |
*
|
| 4 |
* This source code is licensed under the ISC license.
|
|
@@ -8,4 +8,4 @@ import{d as L,r as C,j as e,R as f,C as B}from"./index-C7unMYuh.js";import{u as
|
|
| 8 |
*
|
| 9 |
* This source code is licensed under the ISC license.
|
| 10 |
* See the LICENSE file in the root directory of this source tree.
|
| 11 |
-
*/const pe=L("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]),me={text:"",paperMentions:[]},at=({onSend:t,busy:s,placeholder:a,autoFocus:r,draft:n,onDraftChange:o,onStop:i,models:l=[],selectedModel:c,onModelChange:p,disabled:d=!1,describedBy:x,paperMentionsEnabled:v=!1,webSearchAvailable:j=!1,webSearchEnabled:u=!1,onWebSearchChange:w,reasoningEffort:m="low",onReasoningEffortChange:b})=>{const[P,y]=C.useState(me),N=n??P,T=C.useRef(null),[V,Y]=C.useState(0),g=O({draft:N,onChange:h=>{n||y(h),o==null||o(h)},enabled:v,textareaRef:T});C.useEffect(()=>{const h=T.current;h&&(h.style.height="auto",h.style.height=`${Math.min(h.scrollHeight,200)}px`)},[N.text]),C.useEffect(()=>{var h;r&&((h=T.current)==null||h.focus())},[r]);const U=()=>{const h=N.text.length-N.text.trimStart().length,_=N.text.trim();if(!_||s||d)return;const S=h+_.length,X={text:_,paperMentions:N.paperMentions.filter(k=>k.start>=h&&k.end<=S).map(k=>({...k,start:k.start-h,end:k.end-h}))};t(X)};return e.jsxs("div",{className:"chat-composer",children:[e.jsxs("div",{className:"chat-composer-textarea-wrap",children:[e.jsx(q,{text:N.text,mentions:N.paperMentions,scrollTop:V}),e.jsx("textarea",{ref:T,rows:1,value:N.text,placeholder:a||"Ask anything about research…",onChange:h=>g.updateText(h.target.value,h.target.selectionStart),onSelect:h=>g.refresh(h.currentTarget.selectionStart),onClick:h=>g.refresh(h.currentTarget.selectionStart),onScroll:h=>Y(h.currentTarget.scrollTop),onBlur:h=>{var _,S;(S=(_=h.relatedTarget)==null?void 0:_.closest)!=null&&S.call(_,".chat-paper-picker")||window.setTimeout(g.close,0)},onKeyDown:h=>{g.keyDown(h)||h.key==="Enter"&&!h.shiftKey&&!h.nativeEvent.isComposing&&(h.preventDefault(),U())},role:"combobox","aria-expanded":g.open,"aria-controls":g.open?g.pickerId:void 0,"aria-activedescendant":g.open&&g.results.length?`${g.optionIdPrefix}-${g.activeIndex}`:void 0,"aria-autocomplete":"list","aria-describedby":[x,g.message?"chat-paper-mention-message":null].filter(Boolean).join(" ")||void 0}),e.jsx(D,{open:g.open,query:g.query,results:g.results,activeIndex:g.activeIndex,loading:g.loading,error:g.error,onSelect:g.select,id:g.pickerId,optionIdPrefix:g.optionIdPrefix})]}),g.message&&e.jsx("div",{id:"chat-paper-mention-message",className:"chat-paper-mention-message",role:"alert",children:g.message}),e.jsxs("div",{className:"chat-composer-row",children:[e.jsxs("div",{className:"chat-composer-tools",children:[l.length>0&&c&&p&&e.jsx(J,{models:l,selectedModel:c,onModelChange:p,disabled:s}),b&&e.jsx(Q,{value:m,onChange:b,disabled:s}),j&&w&&e.jsx(Z,{enabled:u,onChange:w,disabled:s}),e.jsx("span",{className:"chat-composer-hint",children:"Enter to send · Shift+Enter for newline"})]}),e.jsx("button",{type:"button",className:`chat-send${s||N.text.trim()?" chat-send-on":""}`,onClick:s?i:U,disabled:d||(s?!i:!N.text.trim()),"aria-label":s?"Stop generating":"Send message",children:s?i?e.jsx("span",{"aria-hidden":"true",children:"■"}):e.jsx(F,{light:!0}):e.jsx(ee,{})})]})]})},I=new Map,ge=t=>{if(!t)return Promise.resolve();const s=I.get(t);if(s)return s;const a=new Promise(r=>{const n=new Image;n.onload=()=>{r()},n.onerror=()=>{I.delete(t),r()},n.src=t});return I.set(t,a),a},xe=new Set(["huggingface.co","www.huggingface.co"]),fe=new Set(["api","blog","chat","collections","docs","enterprise","join","login","models","new","organizations","papers","posts","pricing","search","settings","spaces","tasks"]);function je(t){let s;try{s=new URL(t)}catch{return null}if(s.protocol!=="https:"||!xe.has(s.hostname))return null;const a=s.pathname.split("/").filter(Boolean),r=a[0]==="datasets"?"dataset":"model",n=r==="dataset"?a.slice(1):a;if(n.length!==2||r==="model"&&fe.has(n[0])||n.some(p=>!p||p==="."||p===".."))return null;const o=n.join("/"),i=n.map(encodeURIComponent).join("/"),l=r==="dataset"?`datasets/${i}`:i,c=r==="dataset"?"datasets":"models";return{type:r,repoId:o,url:`https://huggingface.co/${l}`,thumbnailUrl:`https://cdn-thumbnails.huggingface.co/social-thumbnails/${c}/${i}.png`}}const ve=()=>typeof window.matchMedia=="function"&&window.matchMedia("(hover: none), (pointer: coarse)").matches,be=({repo:t})=>{const[s,a]=f.useState(!1);return e.jsxs("div",{className:"hf-preview-card",children:[s?e.jsx("div",{className:"hf-preview-fallback","aria-hidden":"true",children:"🤗"}):e.jsx("img",{className:"hf-preview-image","data-testid":"hf-preview-image",src:t.thumbnailUrl,alt:"",loading:"eager",decoding:"async",onError:()=>a(!0)}),e.jsxs("div",{className:"hf-preview-meta",children:[e.jsxs("span",{className:"hf-preview-kind",children:["Hugging Face ",t.type]}),e.jsx("strong",{children:t.repoId}),e.jsx("span",{children:"huggingface.co"})]})]})},ye=({repo:t,children:s})=>{const[a,r]=f.useState(!1),n=f.useRef(null),o=f.useCallback(()=>{ge(t.thumbnailUrl)},[t.thumbnailUrl]);return f.useEffect(()=>{const i=n.current;if(!i||typeof IntersectionObserver>"u")return;const l=new IntersectionObserver(([c])=>{c.isIntersecting&&(o(),l.disconnect())},{rootMargin:"200px"});return l.observe(i),()=>l.disconnect()},[o]),e.jsxs(M,{open:a,onOpenChange:i=>{(!i||!ve())&&r(i)},openDelay:150,closeDelay:100,children:[e.jsx(R,{asChild:!0,children:e.jsx("a",{ref:n,className:"chat-paper-link chat-hf-link",href:t.url,target:"_blank",rel:"noopener noreferrer",onPointerEnter:o,onFocus:o,children:s})}),e.jsx(H,{className:"hf-preview-pop",side:"bottom",align:"start",collisionPadding:12,children:e.jsx(be,{repo:t})})]})},we=()=>typeof window.matchMedia=="function"&&window.matchMedia("(hover: none), (pointer: coarse)").matches,Ne=({repo:t,preview:s,unavailable:a})=>{const[r,n]=f.useState(!1),o=!!(s!=null&&s.avatarUrl)&&!r;return e.jsxs("div",{className:"github-preview-card",children:[o?e.jsx("img",{className:"github-preview-image","data-testid":"github-preview-image",src:s==null?void 0:s.avatarUrl,alt:"",loading:"eager",decoding:"async",onError:()=>n(!0)}):e.jsx("div",{className:"github-preview-fallback","aria-hidden":"true",children:e.jsx($,{})}),e.jsxs("div",{className:"github-preview-meta",children:[e.jsx("span",{className:"github-preview-kind",children:"GitHub repository"}),e.jsx("strong",{children:t.repoId}),(s==null?void 0:s.description)&&e.jsx("span",{className:"github-preview-description",children:s.description}),s?e.jsxs("span",{className:"github-preview-stats",children:[s.language&&e.jsxs(e.Fragment,{children:[s.language," · "]}),"★ ",s.stars.toLocaleString()," · ⑂ ",s.forks.toLocaleString(),s.archived&&e.jsx(e.Fragment,{children:" · Archived"})]}):e.jsx("span",{children:a?"Preview unavailable":"Loading preview…"})]})]})},_e=({repo:t,children:s})=>{const[a,r]=f.useState(!1),n=ae({queryKey:["github-repository-preview",t.repoId.toLowerCase()],queryFn:({signal:o})=>re(t,o),enabled:a,staleTime:30*60*1e3,gcTime:60*60*1e3,retry:!1});return e.jsxs(M,{open:a,onOpenChange:o=>{(!o||!we())&&r(o)},openDelay:150,closeDelay:100,children:[e.jsx(R,{asChild:!0,children:e.jsxs("a",{className:"chat-github-link",href:t.url,target:"_blank",rel:"noopener noreferrer",children:[e.jsx($,{"aria-hidden":"true"}),s]})}),e.jsx(H,{className:"github-preview-pop",side:"bottom",align:"start",collisionPadding:12,children:e.jsx(Ne,{repo:t,preview:n.data,unavailable:n.isError})})]})},ke=()=>typeof window.matchMedia=="function"&&window.matchMedia("(hover: none), (pointer: coarse)").matches;function Ce(t){try{return new URL(t).hostname.replace(/^www\./,"")}catch{return"Web source"}}const Pe=({citation:t})=>{const[s,a]=f.useState(!1),[r,n]=f.useState(!1),o=t.thumbnail_url,i=t.favicon_url;return e.jsxs("div",{className:"web-preview-card",children:[o&&!s&&e.jsx("img",{className:"web-preview-image","data-testid":"web-preview-image",src:o,alt:"",loading:"eager",decoding:"async",referrerPolicy:"no-referrer",onError:()=>a(!0)}),e.jsxs("div",{className:"web-preview-meta",children:[e.jsxs("div",{className:"web-preview-source",children:[i&&!r&&e.jsx("img",{src:i,alt:"",loading:"eager",decoding:"async",referrerPolicy:"no-referrer",onError:()=>n(!0)}),e.jsx("span",{children:Ce(t.url??"")}),t.published&&e.jsxs(e.Fragment,{children:[e.jsx("span",{"aria-hidden":"true",children:"·"}),e.jsx("time",{children:t.published.slice(0,10)})]})]}),e.jsx("strong",{children:t.title}),t.excerpt&&e.jsx("p",{children:t.excerpt.replace(/\s+/g," ").trim()})]})]})},Te=({citation:t,children:s})=>{const[a,r]=f.useState(!1),n=t.url??"";return e.jsxs(M,{open:a,onOpenChange:o=>{(!o||!ke())&&r(o)},openDelay:150,closeDelay:100,children:[e.jsx(R,{asChild:!0,children:e.jsx("a",{href:n,className:"chat-web-citation",target:"_blank",rel:"noopener noreferrer",children:s})}),e.jsx(H,{className:"web-preview-pop",side:"bottom",align:"start",collisionPadding:12,children:e.jsx(Pe,{citation:t})})]})};function Se(t,s,a){if(s)return{routeId:t,title:s.title,arxivId:s.metadata.arxiv_id,source:s.metadata.source,sourceUrl:s.metadata.source_url,thumbnailUrl:s.metadata.thumbnail_url,authors:s.metadata.authors.map(r=>r.name),published:s.metadata.published,conference:s.metadata.conference,citationCount:s.metadata.citation_count,tasks:s.metadata.tasks};if(a)return{routeId:t,title:a.title,arxivId:a.arxiv_id??null,source:a.arxiv_id?"arxiv":"external",sourceUrl:a.source_url,thumbnailUrl:a.thumbnail_url??null,authors:a.authors??[],published:a.published??null,conference:a.conference??null,citationCount:a.citation_count??null,tasks:[]}}const W=({routeId:t,paper:s,citation:a,className:r="chat-paper-link",children:n})=>e.jsx(G,{routeId:t,initialData:Se(t,s,a),className:r,target:"_blank",children:n});function Ie(t){const s=t.lastIndexOf("[");if(s===-1)return t;const a=t.slice(s);return/^\[[^\]]*(\]\(?[^)\s]*)?$/.test(a)?t.slice(0,s):t}const Ee=t=>t.startsWith("paper:")?t:de(t);function Fe(t){try{const s=new URL(t);return s.protocol==="https:"&&(s.hostname==="github.com"||s.hostname==="www.github.com")}catch{return!1}}const E=({text:t,streaming:s,papers:a,citations:r,webCitations:n})=>{const o=s?Ie(t):t;return e.jsx(ce,{remarkPlugins:[le,oe],rehypePlugins:[ie],urlTransform:Ee,components:{a:({href:i,children:l})=>{if(i!=null&&i.startsWith("paper:")){const d=i.slice(6);return!a[d]&&!(r!=null&&r[d])?e.jsx("span",{className:"chat-invalid-citation",children:l}):e.jsx(W,{routeId:d,paper:a[d],citation:r==null?void 0:r[d],children:l})}const c=i?je(i):null;if(c)return e.jsx(ye,{repo:c,children:l});const p=i?ne(i):null;return p?e.jsx(_e,{repo:p,children:l}):i&&Fe(i)?e.jsxs("a",{href:i,className:"chat-github-link",target:"_blank",rel:"noopener noreferrer",children:[e.jsx($,{"aria-hidden":"true"}),l]}):i!=null&&i.startsWith("https://")&&(n!=null&&n[i])?e.jsx(Te,{citation:n[i],children:l}):i!=null&&i.startsWith("https://")?e.jsx("a",{href:i,className:"chat-external-link",target:"_blank",rel:"noopener noreferrer",children:l}):e.jsx("span",{children:l})}},children:o})};function Me(t){if(!t.authors.length)return"";const s=t.authors.slice(0,3).map(a=>a.name).join(", ");return t.authors.length>3?`${s}, et al.`:s}function Re(t){var a;if(t.conference)return t.conference;const s=(a=t.published)==null?void 0:a.slice(0,4);if(t.arxiv_id)return s?`arXiv ${s}`:"arXiv";if(t.source_url)try{return new URL(t.source_url).hostname.replace(/^www\./,"")}catch{}return s??"external"}function He(t,s=240){const a=t.content.trim();return a.length<=s?a:`${a.slice(0,s).trimEnd()}…`}const $e="https://huggingface.co/pro",Ue="https://huggingface.co/docs/inference-providers/pricing",z=()=>e.jsx("span",{className:"chat-caret"}),Le=t=>{var a;if(!t.streaming)return!1;const s=(a=t.blocks)==null?void 0:a.at(-1);return s?s.kind==="reasoning"?!s.active:s.kind==="tool"?s.status!=="running":!1:!0},Oe=t=>{var j,u;const s=t.currentTarget,a=s.ownerDocument,r=(j=a.caretPositionFromPoint)==null?void 0:j.call(a,t.clientX,t.clientY),n=r?null:(u=a.caretRangeFromPoint)==null?void 0:u.call(a,t.clientX,t.clientY),o=(r==null?void 0:r.offsetNode)??(n==null?void 0:n.startContainer),i=(r==null?void 0:r.offset)??(n==null?void 0:n.startOffset);if(!(o instanceof Text)||i===void 0||!s.contains(o))return;const l=o.data,c=/[\p{L}\p{M}\p{N}_'-]/u;let p=Math.min(i,l.length),d=p;for(;p>0&&c.test(l[p-1]);)p-=1;for(;d<l.length&&c.test(l[d]);)d+=1;if(p===d)return;const x=a.getSelection();if(!x)return;const v=a.createRange();v.setStart(o,p),v.setEnd(o,d),x.removeAllRanges(),x.addRange(v)},qe=({text:t,mentions:s})=>{const a=[];let r=0;for(const n of[...s].sort((o,i)=>o.start-i.start)){const o=t.slice(n.start,n.end);n.start<r||n.end>t.length||o!==n.title&&o!==`@${n.title}`||(a.push(t.slice(r,n.start)),a.push(e.jsxs("span",{className:"chat-inline-paper-mention",children:[e.jsx(ue,{size:13,"aria-hidden":"true"}),e.jsx(G,{routeId:n.route_id,className:"chat-inline-paper-link",children:o.startsWith("@")?o.slice(1):o})]},n.key)),r=n.end)}return a.push(t.slice(r)),e.jsx(e.Fragment,{children:a})},De=({block:t,papers:s,citations:a,webCitations:r,onToggle:n})=>t.active?e.jsxs("div",{className:"chat-reason-live",children:[e.jsxs("div",{className:"chat-reason-live-head",children:[e.jsx(F,{})," ",e.jsx("span",{children:"Thinking…"})]}),e.jsxs("div",{className:"chat-reason-live-body chat-answer chat-reason-markdown",children:[e.jsx(E,{text:t.text,streaming:!0,papers:s,citations:a,webCitations:r}),e.jsx(z,{})]})]}):e.jsxs("div",{className:"chat-reason-done",children:[e.jsxs("button",{type:"button",className:"chat-reason-done-head",onClick:n,"aria-expanded":t.open,children:[e.jsx(te,{}),e.jsx("span",{children:"Thought for a few seconds"}),e.jsx(A,{open:t.open})]}),t.open&&e.jsx("div",{className:"chat-reason-done-body chat-answer chat-reason-markdown",children:e.jsx(E,{text:t.text,papers:s,citations:a,webCitations:r})})]}),Ae=({block:t,papers:s,onToggle:a})=>{var d,x,v,j;const r=t.status==="running",n=t.schema_version===2||!!t.content,o=t.status==="error"||t.status==="denied",i=typeof t.args.query=="string"?t.args.query:"",l=typeof t.args.command=="string"?t.args.command:typeof t.args.file_path=="string"?t.args.file_path:i,c=((d=t.content)==null?void 0:d.map(u=>u.text).join(""))??"",p=r?"running…":n?`${t.status} · ${t.took_ms??0} ms`:`${t.hits} results · ${t.took_ms} ms`;return e.jsxs("div",{className:`chat-tool${r?" chat-tool-running":""}${o?" chat-tool-failed":""}`,children:[e.jsxs("button",{type:"button",className:"chat-tool-head",onClick:a,disabled:r,"aria-expanded":r?void 0:t.open,children:[e.jsxs("span",{className:"chat-tool-head-left",children:[r?e.jsx(F,{}):e.jsx(se,{}),e.jsx("code",{className:"chat-tool-name",children:t.name}),e.jsx("span",{className:"chat-tool-query",children:n?l:`("${i}")`})]}),e.jsxs("span",{className:"chat-tool-head-right",children:[e.jsx("span",{className:"chat-tool-status",children:p}),!r&&e.jsx(A,{open:t.open})]})]}),!r&&t.open&&e.jsxs("div",{className:"chat-tool-body",children:[e.jsxs("div",{className:"chat-tool-args",children:[e.jsx("span",{className:"chat-tool-label",children:"arguments"}),e.jsx("pre",{children:JSON.stringify(t.args,null,2)})]}),n?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"chat-tool-output-head",children:[e.jsx("span",{className:"chat-tool-label",children:"result"}),e.jsx("button",{type:"button",className:"chat-tool-copy",onClick:()=>void navigator.clipboard.writeText(c),children:"Copy"})]}),e.jsx("pre",{className:"chat-tool-output",children:e.jsx("code",{children:c})}),((x=t.metadata)==null?void 0:x.output_truncated)&&e.jsx("div",{className:"chat-tool-truncated",children:"Output was truncated."})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"chat-tool-label chat-tool-results-label",children:["returned ",((v=t.results)==null?void 0:v.length)??0," papers"]}),e.jsx("ol",{className:"chat-tool-results",children:(j=t.results)==null?void 0:j.map(u=>e.jsxs("li",{className:"chat-hit",children:[e.jsx("div",{className:"chat-hit-top",children:e.jsx(W,{routeId:u.route_id,paper:s[u.route_id],className:"chat-hit-title",children:u.title})}),e.jsx("div",{className:"chat-hit-meta",children:[Me(u.metadata),Re(u.metadata)].filter(Boolean).join(" · ")}),e.jsxs("div",{className:"chat-hit-snippet",children:[He(u),u.content_truncated&&e.jsx("span",{className:"chat-hit-truncated",children:" (truncated)"})]})]},u.route_id))})]})]})]})},Ge=({block:t,papers:s,citations:a,webCitations:r,streaming:n})=>e.jsxs("div",{className:"chat-answer",children:[e.jsx(E,{text:t.text,streaming:n,papers:s,citations:a,webCitations:r}),n&&!!t.text.trim()&&e.jsx(z,{})]}),K=t=>{const s=f.useRef(null),a=f.useCallback(()=>{const r=s.current;if(!r)return;r.style.height="auto";const n=Math.max(120,window.innerHeight*.4);r.style.height=`${Math.min(r.scrollHeight,n)}px`,r.style.overflowY=r.scrollHeight>n?"auto":"hidden"},[]);return f.useLayoutEffect(()=>{var r,n;(r=s.current)==null||r.focus(),(n=s.current)==null||n.setSelectionRange(t.length,t.length),a()},[a,t.length]),{textareaRef:s,resize:a}},We=({id:t,text:s,editNotice:a,onCancel:r,onResend:n,onResendDraft:o})=>{const[i,l]=f.useState(s),[c,p]=f.useState(!1),{textareaRef:d,resize:x}=K(s);f.useLayoutEffect(x,[x,i]);const v=!!i.trim()&&i.length<=8e3,j=()=>{if(!v||c)return;p(!0),((o==null?void 0:o({text:i,paperMentions:[]}))??(n==null?void 0:n(i))??!1)||p(!1)};return e.jsx("div",{className:"chat-msg chat-msg-user chat-msg-user-editing","data-message-id":t,children:e.jsxs("div",{className:"chat-inline-editor",children:[e.jsx("textarea",{ref:d,className:"chat-inline-editor-textarea","aria-label":"Edit message",value:i,maxLength:8e3,onChange:u=>l(u.target.value),onKeyDown:u=>{u.key==="Escape"?(u.preventDefault(),r==null||r()):u.key==="Enter"&&!u.shiftKey&&!u.nativeEvent.isComposing&&(u.preventDefault(),j())}}),a&&e.jsx("div",{className:"chat-inline-editor-notice",children:a}),e.jsxs("div",{className:"chat-inline-editor-actions",children:[e.jsx("button",{type:"button",onClick:r,children:"Cancel"}),e.jsx("button",{type:"button",className:"chat-inline-editor-send",disabled:!v||c,onClick:j,children:"Send"})]})]})})},ze=({id:t,text:s,paperMentions:a,enabled:r,editNotice:n,onCancel:o,onResend:i,onResendDraft:l})=>{const[c,p]=f.useState({text:s,paperMentions:a}),[d,x]=f.useState(!1),[v,j]=f.useState(0),{textareaRef:u,resize:w}=K(s),m=O({draft:c,onChange:p,enabled:r,textareaRef:u});f.useLayoutEffect(w,[w,c.text]);const b=!!c.text.trim()&&c.text.length<=8e3&&(r||c.paperMentions.length===0),P=()=>{if(!b||d)return;x(!0),((l==null?void 0:l(c))??(i==null?void 0:i(c.text))??!1)||x(!1)};return e.jsx("div",{className:"chat-msg chat-msg-user chat-msg-user-editing","data-message-id":t,children:e.jsxs("div",{className:"chat-inline-editor",children:[e.jsxs("div",{className:"chat-inline-editor-textarea-wrap",children:[e.jsx(q,{text:c.text,mentions:c.paperMentions,scrollTop:v,variant:"editor"}),e.jsx("textarea",{ref:u,className:"chat-inline-editor-textarea","aria-label":"Edit message",value:c.text,maxLength:8e3,role:"combobox","aria-autocomplete":"list","aria-expanded":m.open,"aria-controls":m.open?m.pickerId:void 0,"aria-activedescendant":m.open&&m.results.length?`${m.optionIdPrefix}-${m.activeIndex}`:void 0,onChange:y=>m.updateText(y.target.value,y.target.selectionStart),onSelect:y=>m.refresh(y.currentTarget.selectionStart),onScroll:y=>j(y.currentTarget.scrollTop),onKeyDown:y=>{m.keyDown(y)||(y.key==="Escape"?(y.preventDefault(),o==null||o()):y.key==="Enter"&&!y.shiftKey&&!y.nativeEvent.isComposing&&(y.preventDefault(),P()))}}),e.jsx(D,{open:m.open,query:m.query,results:m.results,activeIndex:m.activeIndex,loading:m.loading,error:m.error,onSelect:m.select,id:m.pickerId,optionIdPrefix:m.optionIdPrefix})]}),!r&&c.paperMentions.length>0&&e.jsx("div",{className:"chat-inline-editor-notice",role:"status",children:"Paper mentions are currently disabled. Remove them before sending."}),n&&e.jsx("div",{className:"chat-inline-editor-notice",children:n}),e.jsxs("div",{className:"chat-inline-editor-actions",children:[e.jsx("button",{type:"button",onClick:o,children:"Cancel"}),e.jsx("button",{type:"button",className:"chat-inline-editor-send",disabled:!b||d,onClick:P,children:"Send"})]})]})})},rt=({id:t,text:s,paperMentions:a=[],paperMentionsEnabled:r=!1,editingAllowed:n=!1,editing:o=!1,editNotice:i,onEdit:l,onCancel:c,onResend:p,onResendDraft:d})=>{const[x,v]=f.useState(!1),j=f.useRef(null);f.useEffect(()=>()=>{j.current!==null&&window.clearTimeout(j.current)},[]);const u=async()=>{var w;if((w=navigator.clipboard)!=null&&w.writeText)try{await navigator.clipboard.writeText(s),v(!0),j.current!==null&&window.clearTimeout(j.current),j.current=window.setTimeout(()=>v(!1),1500)}catch{}};return o?!r&&a.length===0?e.jsx(We,{id:t,text:s,editNotice:i,onCancel:c,onResend:p,onResendDraft:d}):e.jsx(ze,{id:t,text:s,paperMentions:a,enabled:r,editNotice:i,onCancel:c,onResend:p,onResendDraft:d}):e.jsx("div",{className:"chat-msg chat-msg-user","data-message-id":t,children:e.jsxs("div",{className:"chat-user-message-wrap",children:[e.jsx("div",{className:"chat-bubble",onDoubleClick:Oe,children:e.jsx(qe,{text:s,mentions:a})}),e.jsxs("div",{className:"chat-user-actions",children:[e.jsx("button",{type:"button",className:"chat-user-action","aria-label":x?"Message copied":"Copy message",title:x?"Copied":"Copy",onClick:()=>void u(),children:x?e.jsx(B,{"aria-hidden":"true"}):e.jsx(he,{"aria-hidden":"true"})}),n&&e.jsx("button",{type:"button",className:"chat-user-action","aria-label":"Edit message",title:"Edit",onClick:l,children:e.jsx(pe,{"aria-hidden":"true"})})]})]})})},nt=({msg:t,papers:s,onToggleBlock:a,onArchiveOldChats:r,onArchiveOldestChats:n,archivePending:o=null,hfBilling:i=null,openRouterFallbackEnabled:l=!1})=>{var c,p;return e.jsx("div",{className:"chat-msg chat-msg-assistant",children:e.jsxs("div",{className:"chat-msg-blocks",children:[(c=t.blocks)==null?void 0:c.map((d,x)=>{var m;const v=`${t.id}-${x}`,j="citations"in d&&d.citations!==void 0?d.citations:t.citations??[],u=Object.fromEntries(j.filter(b=>(b.kind??"paper")==="paper"&&b.route_id).map(b=>[b.route_id,b])),w=Object.fromEntries(j.filter(b=>b.kind==="web"&&b.url).map(b=>[b.url,b]));return d.kind==="reasoning"?e.jsx(De,{block:d,papers:s,citations:u,webCitations:w,onToggle:()=>a(t.id,x)},v):d.kind==="tool"?e.jsx(Ae,{block:d,papers:s,onToggle:()=>a(t.id,x)},v):e.jsx(Ge,{block:d,papers:s,citations:u,webCitations:w,streaming:!!(t.streaming&&x===(((m=t.blocks)==null?void 0:m.length)??0)-1)},v)}),Le(t)&&e.jsx("div",{className:"chat-waiting",role:"status","aria-live":"polite",children:e.jsx("span",{className:"chat-thinking",children:(((p=t.blocks)==null?void 0:p.length)??0)===0?t.status??"Thinking…":"Thinking…"})}),t.error&&e.jsxs("div",{className:"chat-error",children:[e.jsx("span",{children:t.errorCode==="chat_disabled_interrupted"?"Chat was disabled while this response was running. The partial response is saved. Please try again later.":t.errorCode==="chat_session_quota_exceeded"?t.error:`The assistant hit an error: ${t.error}`}),["hf_inference_billing_required","hf_inference_credential_expired"].includes(t.errorCode??"")&&e.jsx("a",{href:"/settings",children:"Re-sign in with Hugging Face"}),t.errorCode==="hf_inference_billing_exhausted"&&e.jsxs(e.Fragment,{children:[(i==null?void 0:i.account_type)==="Free"&&!i.bill_to?e.jsx("a",{href:$e,target:"_blank",rel:"noreferrer",children:"Upgrade to Hugging Face PRO — $9/month for 20× more included credits"}):e.jsx("a",{href:(i==null?void 0:i.usage_url)??"/settings",target:i?"_blank":void 0,rel:i?"noreferrer":void 0,children:"Review Hugging Face usage and billing"}),e.jsx("a",{href:Ue,target:"_blank",rel:"noreferrer",children:"Inference Providers pricing and billing details"})]}),t.errorCode==="openrouter_monthly_budget_exhausted"&&e.jsxs(e.Fragment,{children:[l?e.jsx("span",{children:"This response started on the shared allowance. Your connected OpenRouter key will be used when you explicitly retry."}):e.jsx("a",{href:"/settings#openrouter-byok",children:"Connect your own OpenRouter key"}),e.jsx("span",{children:"Or select a Hugging Face-backed model and explicitly retry."})]}),t.errorCode==="openrouter_unavailable"&&e.jsxs(e.Fragment,{children:[e.jsx("a",{href:"/settings#openrouter-byok",children:"Bring your own key in Settings"}),e.jsx("a",{href:"https://github.com/huggingface/paperswithcode-feedback",target:"_blank",rel:"noreferrer",children:"File an issue"})]}),t.errorCode==="openrouter_byok_billing_error"&&e.jsx("a",{href:"https://openrouter.ai/settings/credits",target:"_blank",rel:"noreferrer",children:"Review OpenRouter billing"}),["openrouter_byok_credential_invalid","openrouter_byok_rate_limit"].includes(t.errorCode??"")&&e.jsx("a",{href:"/settings#openrouter-byok",children:"Review OpenRouter settings"}),t.errorCode==="chat_session_quota_exceeded"&&(r||n)&&e.jsxs("span",{className:"chat-error-actions",children:[r&&e.jsx("button",{type:"button",disabled:o!==null,onClick:r,children:o==="old"?"Archiving…":"Archive chats older than 30 days"}),n&&e.jsx("button",{type:"button",disabled:o!==null,onClick:n,children:o==="oldest"?"Archiving…":"Archive oldest 50 chats"})]})]}),!t.streaming&&t.finishReason&&t.finishReason!=="success"&&e.jsx("div",{className:"chat-finish-note",children:["tool_limit","max_turns"].includes(t.finishReason)?"The assistant stopped at the execution limit.":`The assistant stopped early (${t.finishReason.replace(/_/g," ")}).`})]})})};export{nt as A,at as C,rt as U};
|
|
|
|
| 1 |
+
import{d as L,r as C,j as e,R as f,C as B}from"./index-DaC9z2lA.js";import{u as O,a as q,b as D,M as J,R as Q,W as Z,p as F,A as ee,F as te,G as A,H as se}from"./chatSessions-CExFukoU.js";import"./katex.min-BSBacQyE.js";import{H as R,a as M,b as H}from"./hover-card-1A3Ph00K.js";import{u as ae}from"./useQuery-DaHFL0rL.js";import{f as re,p as ne}from"./github-C5WYivP7.js";import{G as U}from"./github-B5o86F5s.js";import{r as ie,a as oe,P as G}from"./PaperPreviewLink-Bj5C7FQg.js";import{M as ce,r as le,d as de}from"./index-CNBab3Wv.js";import{F as ue}from"./file-text-C1SK1wkY.js";/**
|
| 2 |
* @license lucide-react v0.462.0 - ISC
|
| 3 |
*
|
| 4 |
* This source code is licensed under the ISC license.
|
|
|
|
| 8 |
*
|
| 9 |
* This source code is licensed under the ISC license.
|
| 10 |
* See the LICENSE file in the root directory of this source tree.
|
| 11 |
+
*/const pe=L("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]),me={text:"",paperMentions:[]},rt=({onSend:t,busy:s,placeholder:a,autoFocus:r,draft:n,onDraftChange:o,onStop:i,models:l=[],selectedModel:c,onModelChange:p,disabled:d=!1,describedBy:x,paperMentionsEnabled:v=!1,webSearchAvailable:j=!1,webSearchEnabled:u=!1,onWebSearchChange:y,reasoningEffort:m="low",onReasoningEffortChange:b})=>{const[T,w]=C.useState(me),N=n??T,P=C.useRef(null),[V,Y]=C.useState(0),g=O({draft:N,onChange:h=>{n||w(h),o==null||o(h)},enabled:v,textareaRef:P});C.useEffect(()=>{const h=P.current;h&&(h.style.height="auto",h.style.height=`${Math.min(h.scrollHeight,200)}px`)},[N.text]),C.useEffect(()=>{var h;r&&((h=P.current)==null||h.focus())},[r]);const $=()=>{const h=N.text.length-N.text.trimStart().length,_=N.text.trim();if(!_||s||d)return;const S=h+_.length,X={text:_,paperMentions:N.paperMentions.filter(k=>k.start>=h&&k.end<=S).map(k=>({...k,start:k.start-h,end:k.end-h}))};t(X)};return e.jsxs("div",{className:"chat-composer",children:[e.jsxs("div",{className:"chat-composer-textarea-wrap",children:[e.jsx(q,{text:N.text,mentions:N.paperMentions,scrollTop:V}),e.jsx("textarea",{ref:P,rows:1,value:N.text,placeholder:a||"Ask anything about research…",onChange:h=>g.updateText(h.target.value,h.target.selectionStart),onSelect:h=>g.refresh(h.currentTarget.selectionStart),onClick:h=>g.refresh(h.currentTarget.selectionStart),onScroll:h=>Y(h.currentTarget.scrollTop),onBlur:h=>{var _,S;(S=(_=h.relatedTarget)==null?void 0:_.closest)!=null&&S.call(_,".chat-paper-picker")||window.setTimeout(g.close,0)},onKeyDown:h=>{g.keyDown(h)||h.key==="Enter"&&!h.shiftKey&&!h.nativeEvent.isComposing&&(h.preventDefault(),$())},role:"combobox","aria-expanded":g.open,"aria-controls":g.open?g.pickerId:void 0,"aria-activedescendant":g.open&&g.results.length?`${g.optionIdPrefix}-${g.activeIndex}`:void 0,"aria-autocomplete":"list","aria-describedby":[x,g.message?"chat-paper-mention-message":null].filter(Boolean).join(" ")||void 0}),e.jsx(D,{open:g.open,query:g.query,results:g.results,activeIndex:g.activeIndex,loading:g.loading,error:g.error,onSelect:g.select,id:g.pickerId,optionIdPrefix:g.optionIdPrefix})]}),g.message&&e.jsx("div",{id:"chat-paper-mention-message",className:"chat-paper-mention-message",role:"alert",children:g.message}),e.jsxs("div",{className:"chat-composer-row",children:[e.jsxs("div",{className:"chat-composer-tools",children:[l.length>0&&c&&p&&e.jsx(J,{models:l,selectedModel:c,onModelChange:p,disabled:s}),b&&e.jsx(Q,{value:m,onChange:b,disabled:s}),j&&y&&e.jsx(Z,{enabled:u,onChange:y,disabled:s}),e.jsx("span",{className:"chat-composer-hint",children:"Enter to send · Shift+Enter for newline"})]}),e.jsx("button",{type:"button",className:`chat-send${s||N.text.trim()?" chat-send-on":""}`,onClick:s?i:$,disabled:d||(s?!i:!N.text.trim()),"aria-label":s?"Stop generating":"Send message",children:s?i?e.jsx("span",{"aria-hidden":"true",children:"■"}):e.jsx(F,{light:!0}):e.jsx(ee,{})})]})]})},I=new Map,ge=t=>{if(!t)return Promise.resolve();const s=I.get(t);if(s)return s;const a=new Promise(r=>{const n=new Image;n.onload=()=>{r()},n.onerror=()=>{I.delete(t),r()},n.src=t});return I.set(t,a),a},xe=new Set(["huggingface.co","www.huggingface.co"]),fe=new Set(["api","blog","chat","collections","docs","enterprise","join","login","models","new","organizations","papers","posts","pricing","search","settings","spaces","tasks"]);function je(t){let s;try{s=new URL(t)}catch{return null}if(s.protocol!=="https:"||!xe.has(s.hostname))return null;const a=s.pathname.split("/").filter(Boolean),r=a[0]==="datasets"?"dataset":"model",n=r==="dataset"?a.slice(1):a;if(n.length!==2||r==="model"&&fe.has(n[0])||n.some(p=>!p||p==="."||p===".."))return null;const o=n.join("/"),i=n.map(encodeURIComponent).join("/"),l=r==="dataset"?`datasets/${i}`:i,c=r==="dataset"?"datasets":"models";return{type:r,repoId:o,url:`https://huggingface.co/${l}`,thumbnailUrl:`https://cdn-thumbnails.huggingface.co/social-thumbnails/${c}/${i}.png`}}const ve=()=>typeof window.matchMedia=="function"&&window.matchMedia("(hover: none), (pointer: coarse)").matches,be=({repo:t})=>{const[s,a]=f.useState(!1);return e.jsxs("div",{className:"hf-preview-card",children:[s?e.jsx("div",{className:"hf-preview-fallback","aria-hidden":"true",children:"🤗"}):e.jsx("img",{className:"hf-preview-image","data-testid":"hf-preview-image",src:t.thumbnailUrl,alt:"",loading:"eager",decoding:"async",onError:()=>a(!0)}),e.jsxs("div",{className:"hf-preview-meta",children:[e.jsxs("span",{className:"hf-preview-kind",children:["Hugging Face ",t.type]}),e.jsx("strong",{children:t.repoId}),e.jsx("span",{children:"huggingface.co"})]})]})},we=({repo:t,children:s})=>{const[a,r]=f.useState(!1),n=f.useRef(null),o=f.useCallback(()=>{ge(t.thumbnailUrl)},[t.thumbnailUrl]);return f.useEffect(()=>{const i=n.current;if(!i||typeof IntersectionObserver>"u")return;const l=new IntersectionObserver(([c])=>{c.isIntersecting&&(o(),l.disconnect())},{rootMargin:"200px"});return l.observe(i),()=>l.disconnect()},[o]),e.jsxs(R,{open:a,onOpenChange:i=>{(!i||!ve())&&r(i)},openDelay:150,closeDelay:100,children:[e.jsx(M,{asChild:!0,children:e.jsx("a",{ref:n,className:"chat-paper-link chat-hf-link",href:t.url,target:"_blank",rel:"noopener noreferrer",onPointerEnter:o,onFocus:o,children:s})}),e.jsx(H,{className:"hf-preview-pop",side:"bottom",align:"start",collisionPadding:12,children:e.jsx(be,{repo:t})})]})},ye=()=>typeof window.matchMedia=="function"&&window.matchMedia("(hover: none), (pointer: coarse)").matches,Ne=({repo:t,preview:s,unavailable:a})=>{const[r,n]=f.useState(!1),o=!!(s!=null&&s.avatarUrl)&&!r;return e.jsxs("div",{className:"github-preview-card",children:[o?e.jsx("img",{className:"github-preview-image","data-testid":"github-preview-image",src:s==null?void 0:s.avatarUrl,alt:"",loading:"eager",decoding:"async",onError:()=>n(!0)}):e.jsx("div",{className:"github-preview-fallback","aria-hidden":"true",children:e.jsx(U,{})}),e.jsxs("div",{className:"github-preview-meta",children:[e.jsx("span",{className:"github-preview-kind",children:"GitHub repository"}),e.jsx("strong",{children:t.repoId}),(s==null?void 0:s.description)&&e.jsx("span",{className:"github-preview-description",children:s.description}),s?e.jsxs("span",{className:"github-preview-stats",children:[s.language&&e.jsxs(e.Fragment,{children:[s.language," · "]}),"★ ",s.stars.toLocaleString()," · ⑂ ",s.forks.toLocaleString(),s.archived&&e.jsx(e.Fragment,{children:" · Archived"})]}):e.jsx("span",{children:a?"Preview unavailable":"Loading preview…"})]})]})},_e=({repo:t,children:s})=>{const[a,r]=f.useState(!1),n=ae({queryKey:["github-repository-preview",t.repoId.toLowerCase()],queryFn:({signal:o})=>re(t,o),enabled:a,staleTime:30*60*1e3,gcTime:60*60*1e3,retry:!1});return e.jsxs(R,{open:a,onOpenChange:o=>{(!o||!ye())&&r(o)},openDelay:150,closeDelay:100,children:[e.jsx(M,{asChild:!0,children:e.jsxs("a",{className:"chat-github-link",href:t.url,target:"_blank",rel:"noopener noreferrer",children:[e.jsx(U,{"aria-hidden":"true"}),s]})}),e.jsx(H,{className:"github-preview-pop",side:"bottom",align:"start",collisionPadding:12,children:e.jsx(Ne,{repo:t,preview:n.data,unavailable:n.isError})})]})},ke=()=>typeof window.matchMedia=="function"&&window.matchMedia("(hover: none), (pointer: coarse)").matches;function Ce(t){try{return new URL(t).hostname.replace(/^www\./,"")}catch{return"Web source"}}const Te=({citation:t})=>{const[s,a]=f.useState(!1),[r,n]=f.useState(!1),o=t.thumbnail_url,i=t.favicon_url;return e.jsxs("div",{className:"web-preview-card",children:[o&&!s&&e.jsx("img",{className:"web-preview-image","data-testid":"web-preview-image",src:o,alt:"",loading:"eager",decoding:"async",referrerPolicy:"no-referrer",onError:()=>a(!0)}),e.jsxs("div",{className:"web-preview-meta",children:[e.jsxs("div",{className:"web-preview-source",children:[i&&!r&&e.jsx("img",{src:i,alt:"",loading:"eager",decoding:"async",referrerPolicy:"no-referrer",onError:()=>n(!0)}),e.jsx("span",{children:Ce(t.url??"")}),t.published&&e.jsxs(e.Fragment,{children:[e.jsx("span",{"aria-hidden":"true",children:"·"}),e.jsx("time",{children:t.published.slice(0,10)})]})]}),e.jsx("strong",{children:t.title}),t.excerpt&&e.jsx("p",{children:t.excerpt.replace(/\s+/g," ").trim()})]})]})},Pe=({citation:t,children:s})=>{const[a,r]=f.useState(!1),n=t.url??"";return e.jsxs(R,{open:a,onOpenChange:o=>{(!o||!ke())&&r(o)},openDelay:150,closeDelay:100,children:[e.jsx(M,{asChild:!0,children:e.jsx("a",{href:n,className:"chat-web-citation",target:"_blank",rel:"noopener noreferrer",children:s})}),e.jsx(H,{className:"web-preview-pop",side:"bottom",align:"start",collisionPadding:12,children:e.jsx(Te,{citation:t})})]})};function Se(t,s,a){if(s)return{routeId:t,title:s.title,arxivId:s.metadata.arxiv_id,source:s.metadata.source,sourceUrl:s.metadata.source_url,thumbnailUrl:s.metadata.thumbnail_url,authors:s.metadata.authors.map(r=>r.name),published:s.metadata.published,conference:s.metadata.conference,citationCount:s.metadata.citation_count,tasks:s.metadata.tasks};if(a)return{routeId:t,title:a.title,arxivId:a.arxiv_id??null,source:a.arxiv_id?"arxiv":"external",sourceUrl:a.source_url,thumbnailUrl:a.thumbnail_url??null,authors:a.authors??[],published:a.published??null,conference:a.conference??null,citationCount:a.citation_count??null,tasks:[]}}const W=({routeId:t,paper:s,citation:a,className:r="chat-paper-link",children:n})=>e.jsx(G,{routeId:t,initialData:Se(t,s,a),className:r,target:"_blank",children:n});function Ie(t){const s=t.lastIndexOf("[");if(s===-1)return t;const a=t.slice(s);return/^\[[^\]]*(\]\(?[^)\s]*)?$/.test(a)?t.slice(0,s):t}const Ee=t=>t.startsWith("paper:")?t:de(t);function Fe(t){try{const s=new URL(t);return s.protocol==="https:"&&(s.hostname==="github.com"||s.hostname==="www.github.com")}catch{return!1}}const E=({text:t,streaming:s,papers:a,citations:r,webCitations:n})=>{const o=s?Ie(t):t;return e.jsx(ce,{remarkPlugins:[le,oe],rehypePlugins:[ie],urlTransform:Ee,components:{a:({href:i,children:l})=>{if(i!=null&&i.startsWith("paper:")){const d=i.slice(6);return!a[d]&&!(r!=null&&r[d])?e.jsx("span",{className:"chat-invalid-citation",children:l}):e.jsx(W,{routeId:d,paper:a[d],citation:r==null?void 0:r[d],children:l})}const c=i?je(i):null;if(c)return e.jsx(we,{repo:c,children:l});const p=i?ne(i):null;return p?e.jsx(_e,{repo:p,children:l}):i&&Fe(i)?e.jsxs("a",{href:i,className:"chat-github-link",target:"_blank",rel:"noopener noreferrer",children:[e.jsx(U,{"aria-hidden":"true"}),l]}):i!=null&&i.startsWith("https://")&&(n!=null&&n[i])?e.jsx(Pe,{citation:n[i],children:l}):i!=null&&i.startsWith("https://")?e.jsx("a",{href:i,className:"chat-external-link",target:"_blank",rel:"noopener noreferrer",children:l}):e.jsx("span",{children:l})}},children:o})};function Re(t){if(!t.authors.length)return"";const s=t.authors.slice(0,3).map(a=>a.name).join(", ");return t.authors.length>3?`${s}, et al.`:s}function Me(t){var a;if(t.conference)return t.conference;const s=(a=t.published)==null?void 0:a.slice(0,4);if(t.arxiv_id)return s?`arXiv ${s}`:"arXiv";if(t.source_url)try{return new URL(t.source_url).hostname.replace(/^www\./,"")}catch{}return s??"external"}function He(t,s=240){const a=t.content.trim();return a.length<=s?a:`${a.slice(0,s).trimEnd()}…`}const Ue="https://huggingface.co/pro",$e="https://huggingface.co/docs/inference-providers/pricing",Le="https://paperswithcode.co/chat",z=()=>e.jsx("span",{className:"chat-caret"}),Oe=t=>{var a;if(!t.streaming)return!1;const s=(a=t.blocks)==null?void 0:a.at(-1);return s?s.kind==="reasoning"?!s.active:s.kind==="tool"?s.status!=="running":!1:!0},qe=t=>{var j,u;const s=t.currentTarget,a=s.ownerDocument,r=(j=a.caretPositionFromPoint)==null?void 0:j.call(a,t.clientX,t.clientY),n=r?null:(u=a.caretRangeFromPoint)==null?void 0:u.call(a,t.clientX,t.clientY),o=(r==null?void 0:r.offsetNode)??(n==null?void 0:n.startContainer),i=(r==null?void 0:r.offset)??(n==null?void 0:n.startOffset);if(!(o instanceof Text)||i===void 0||!s.contains(o))return;const l=o.data,c=/[\p{L}\p{M}\p{N}_'-]/u;let p=Math.min(i,l.length),d=p;for(;p>0&&c.test(l[p-1]);)p-=1;for(;d<l.length&&c.test(l[d]);)d+=1;if(p===d)return;const x=a.getSelection();if(!x)return;const v=a.createRange();v.setStart(o,p),v.setEnd(o,d),x.removeAllRanges(),x.addRange(v)},De=({text:t,mentions:s})=>{const a=[];let r=0;for(const n of[...s].sort((o,i)=>o.start-i.start)){const o=t.slice(n.start,n.end);n.start<r||n.end>t.length||o!==n.title&&o!==`@${n.title}`||(a.push(t.slice(r,n.start)),a.push(e.jsxs("span",{className:"chat-inline-paper-mention",children:[e.jsx(ue,{size:13,"aria-hidden":"true"}),e.jsx(G,{routeId:n.route_id,className:"chat-inline-paper-link",children:o.startsWith("@")?o.slice(1):o})]},n.key)),r=n.end)}return a.push(t.slice(r)),e.jsx(e.Fragment,{children:a})},Ae=({block:t,papers:s,citations:a,webCitations:r,onToggle:n})=>t.active?e.jsxs("div",{className:"chat-reason-live",children:[e.jsxs("div",{className:"chat-reason-live-head",children:[e.jsx(F,{})," ",e.jsx("span",{children:"Thinking…"})]}),e.jsxs("div",{className:"chat-reason-live-body chat-answer chat-reason-markdown",children:[e.jsx(E,{text:t.text,streaming:!0,papers:s,citations:a,webCitations:r}),e.jsx(z,{})]})]}):e.jsxs("div",{className:"chat-reason-done",children:[e.jsxs("button",{type:"button",className:"chat-reason-done-head",onClick:n,"aria-expanded":t.open,children:[e.jsx(te,{}),e.jsx("span",{children:"Thought for a few seconds"}),e.jsx(A,{open:t.open})]}),t.open&&e.jsx("div",{className:"chat-reason-done-body chat-answer chat-reason-markdown",children:e.jsx(E,{text:t.text,papers:s,citations:a,webCitations:r})})]}),Ge=({block:t,papers:s,onToggle:a})=>{var d,x,v,j;const r=t.status==="running",n=t.schema_version===2||!!t.content,o=t.status==="error"||t.status==="denied",i=typeof t.args.query=="string"?t.args.query:"",l=typeof t.args.command=="string"?t.args.command:typeof t.args.file_path=="string"?t.args.file_path:i,c=((d=t.content)==null?void 0:d.map(u=>u.text).join(""))??"",p=r?"running…":n?`${t.status} · ${t.took_ms??0} ms`:`${t.hits} results · ${t.took_ms} ms`;return e.jsxs("div",{className:`chat-tool${r?" chat-tool-running":""}${o?" chat-tool-failed":""}`,children:[e.jsxs("button",{type:"button",className:"chat-tool-head",onClick:a,disabled:r,"aria-expanded":r?void 0:t.open,children:[e.jsxs("span",{className:"chat-tool-head-left",children:[r?e.jsx(F,{}):e.jsx(se,{}),e.jsx("code",{className:"chat-tool-name",children:t.name}),e.jsx("span",{className:"chat-tool-query",children:n?l:`("${i}")`})]}),e.jsxs("span",{className:"chat-tool-head-right",children:[e.jsx("span",{className:"chat-tool-status",children:p}),!r&&e.jsx(A,{open:t.open})]})]}),!r&&t.open&&e.jsxs("div",{className:"chat-tool-body",children:[e.jsxs("div",{className:"chat-tool-args",children:[e.jsx("span",{className:"chat-tool-label",children:"arguments"}),e.jsx("pre",{children:JSON.stringify(t.args,null,2)})]}),n?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"chat-tool-output-head",children:[e.jsx("span",{className:"chat-tool-label",children:"result"}),e.jsx("button",{type:"button",className:"chat-tool-copy",onClick:()=>void navigator.clipboard.writeText(c),children:"Copy"})]}),e.jsx("pre",{className:"chat-tool-output",children:e.jsx("code",{children:c})}),((x=t.metadata)==null?void 0:x.output_truncated)&&e.jsx("div",{className:"chat-tool-truncated",children:"Output was truncated."})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"chat-tool-label chat-tool-results-label",children:["returned ",((v=t.results)==null?void 0:v.length)??0," papers"]}),e.jsx("ol",{className:"chat-tool-results",children:(j=t.results)==null?void 0:j.map(u=>e.jsxs("li",{className:"chat-hit",children:[e.jsx("div",{className:"chat-hit-top",children:e.jsx(W,{routeId:u.route_id,paper:s[u.route_id],className:"chat-hit-title",children:u.title})}),e.jsx("div",{className:"chat-hit-meta",children:[Re(u.metadata),Me(u.metadata)].filter(Boolean).join(" · ")}),e.jsxs("div",{className:"chat-hit-snippet",children:[He(u),u.content_truncated&&e.jsx("span",{className:"chat-hit-truncated",children:" (truncated)"})]})]},u.route_id))})]})]})]})},We=({block:t,papers:s,citations:a,webCitations:r,streaming:n})=>e.jsxs("div",{className:"chat-answer",children:[e.jsx(E,{text:t.text,streaming:n,papers:s,citations:a,webCitations:r}),n&&!!t.text.trim()&&e.jsx(z,{})]}),K=t=>{const s=f.useRef(null),a=f.useCallback(()=>{const r=s.current;if(!r)return;r.style.height="auto";const n=Math.max(120,window.innerHeight*.4);r.style.height=`${Math.min(r.scrollHeight,n)}px`,r.style.overflowY=r.scrollHeight>n?"auto":"hidden"},[]);return f.useLayoutEffect(()=>{var r,n;(r=s.current)==null||r.focus(),(n=s.current)==null||n.setSelectionRange(t.length,t.length),a()},[a,t.length]),{textareaRef:s,resize:a}},ze=({id:t,text:s,editNotice:a,onCancel:r,onResend:n,onResendDraft:o})=>{const[i,l]=f.useState(s),[c,p]=f.useState(!1),{textareaRef:d,resize:x}=K(s);f.useLayoutEffect(x,[x,i]);const v=!!i.trim()&&i.length<=8e3,j=()=>{if(!v||c)return;p(!0),((o==null?void 0:o({text:i,paperMentions:[]}))??(n==null?void 0:n(i))??!1)||p(!1)};return e.jsx("div",{className:"chat-msg chat-msg-user chat-msg-user-editing","data-message-id":t,children:e.jsxs("div",{className:"chat-inline-editor",children:[e.jsx("textarea",{ref:d,className:"chat-inline-editor-textarea","aria-label":"Edit message",value:i,maxLength:8e3,onChange:u=>l(u.target.value),onKeyDown:u=>{u.key==="Escape"?(u.preventDefault(),r==null||r()):u.key==="Enter"&&!u.shiftKey&&!u.nativeEvent.isComposing&&(u.preventDefault(),j())}}),a&&e.jsx("div",{className:"chat-inline-editor-notice",children:a}),e.jsxs("div",{className:"chat-inline-editor-actions",children:[e.jsx("button",{type:"button",onClick:r,children:"Cancel"}),e.jsx("button",{type:"button",className:"chat-inline-editor-send",disabled:!v||c,onClick:j,children:"Send"})]})]})})},Ke=({id:t,text:s,paperMentions:a,enabled:r,editNotice:n,onCancel:o,onResend:i,onResendDraft:l})=>{const[c,p]=f.useState({text:s,paperMentions:a}),[d,x]=f.useState(!1),[v,j]=f.useState(0),{textareaRef:u,resize:y}=K(s),m=O({draft:c,onChange:p,enabled:r,textareaRef:u});f.useLayoutEffect(y,[y,c.text]);const b=!!c.text.trim()&&c.text.length<=8e3&&(r||c.paperMentions.length===0),T=()=>{if(!b||d)return;x(!0),((l==null?void 0:l(c))??(i==null?void 0:i(c.text))??!1)||x(!1)};return e.jsx("div",{className:"chat-msg chat-msg-user chat-msg-user-editing","data-message-id":t,children:e.jsxs("div",{className:"chat-inline-editor",children:[e.jsxs("div",{className:"chat-inline-editor-textarea-wrap",children:[e.jsx(q,{text:c.text,mentions:c.paperMentions,scrollTop:v,variant:"editor"}),e.jsx("textarea",{ref:u,className:"chat-inline-editor-textarea","aria-label":"Edit message",value:c.text,maxLength:8e3,role:"combobox","aria-autocomplete":"list","aria-expanded":m.open,"aria-controls":m.open?m.pickerId:void 0,"aria-activedescendant":m.open&&m.results.length?`${m.optionIdPrefix}-${m.activeIndex}`:void 0,onChange:w=>m.updateText(w.target.value,w.target.selectionStart),onSelect:w=>m.refresh(w.currentTarget.selectionStart),onScroll:w=>j(w.currentTarget.scrollTop),onKeyDown:w=>{m.keyDown(w)||(w.key==="Escape"?(w.preventDefault(),o==null||o()):w.key==="Enter"&&!w.shiftKey&&!w.nativeEvent.isComposing&&(w.preventDefault(),T()))}}),e.jsx(D,{open:m.open,query:m.query,results:m.results,activeIndex:m.activeIndex,loading:m.loading,error:m.error,onSelect:m.select,id:m.pickerId,optionIdPrefix:m.optionIdPrefix})]}),!r&&c.paperMentions.length>0&&e.jsx("div",{className:"chat-inline-editor-notice",role:"status",children:"Paper mentions are currently disabled. Remove them before sending."}),n&&e.jsx("div",{className:"chat-inline-editor-notice",children:n}),e.jsxs("div",{className:"chat-inline-editor-actions",children:[e.jsx("button",{type:"button",onClick:o,children:"Cancel"}),e.jsx("button",{type:"button",className:"chat-inline-editor-send",disabled:!b||d,onClick:T,children:"Send"})]})]})})},nt=({id:t,text:s,paperMentions:a=[],paperMentionsEnabled:r=!1,editingAllowed:n=!1,editing:o=!1,editNotice:i,onEdit:l,onCancel:c,onResend:p,onResendDraft:d})=>{const[x,v]=f.useState(!1),j=f.useRef(null);f.useEffect(()=>()=>{j.current!==null&&window.clearTimeout(j.current)},[]);const u=async()=>{var y;if((y=navigator.clipboard)!=null&&y.writeText)try{await navigator.clipboard.writeText(s),v(!0),j.current!==null&&window.clearTimeout(j.current),j.current=window.setTimeout(()=>v(!1),1500)}catch{}};return o?!r&&a.length===0?e.jsx(ze,{id:t,text:s,editNotice:i,onCancel:c,onResend:p,onResendDraft:d}):e.jsx(Ke,{id:t,text:s,paperMentions:a,enabled:r,editNotice:i,onCancel:c,onResend:p,onResendDraft:d}):e.jsx("div",{className:"chat-msg chat-msg-user","data-message-id":t,children:e.jsxs("div",{className:"chat-user-message-wrap",children:[e.jsx("div",{className:"chat-bubble",onDoubleClick:qe,children:e.jsx(De,{text:s,mentions:a})}),e.jsxs("div",{className:"chat-user-actions",children:[e.jsx("button",{type:"button",className:"chat-user-action","aria-label":x?"Message copied":"Copy message",title:x?"Copied":"Copy",onClick:()=>void u(),children:x?e.jsx(B,{"aria-hidden":"true"}):e.jsx(he,{"aria-hidden":"true"})}),n&&e.jsx("button",{type:"button",className:"chat-user-action","aria-label":"Edit message",title:"Edit",onClick:l,children:e.jsx(pe,{"aria-hidden":"true"})})]})]})})},it=({msg:t,papers:s,onToggleBlock:a,onArchiveOldChats:r,onArchiveOldestChats:n,archivePending:o=null,hfBilling:i=null,openRouterFallbackEnabled:l=!1})=>{var c,p;return e.jsx("div",{className:"chat-msg chat-msg-assistant",children:e.jsxs("div",{className:"chat-msg-blocks",children:[(c=t.blocks)==null?void 0:c.map((d,x)=>{var m;const v=`${t.id}-${x}`,j="citations"in d&&d.citations!==void 0?d.citations:t.citations??[],u=Object.fromEntries(j.filter(b=>(b.kind??"paper")==="paper"&&b.route_id).map(b=>[b.route_id,b])),y=Object.fromEntries(j.filter(b=>b.kind==="web"&&b.url).map(b=>[b.url,b]));return d.kind==="reasoning"?e.jsx(Ae,{block:d,papers:s,citations:u,webCitations:y,onToggle:()=>a(t.id,x)},v):d.kind==="tool"?e.jsx(Ge,{block:d,papers:s,onToggle:()=>a(t.id,x)},v):e.jsx(We,{block:d,papers:s,citations:u,webCitations:y,streaming:!!(t.streaming&&x===(((m=t.blocks)==null?void 0:m.length)??0)-1)},v)}),Oe(t)&&e.jsx("div",{className:"chat-waiting",role:"status","aria-live":"polite",children:e.jsx("span",{className:"chat-thinking",children:(((p=t.blocks)==null?void 0:p.length)??0)===0?t.status??"Thinking…":"Thinking…"})}),t.error&&e.jsxs("div",{className:"chat-error",children:[e.jsx("span",{children:t.errorCode==="chat_disabled_interrupted"?"Chat was disabled while this response was running. The partial response is saved. Please try again later.":t.errorCode==="chat_session_quota_exceeded"?t.error:`The assistant hit an error: ${t.error}`}),["hf_inference_billing_required","hf_inference_credential_expired"].includes(t.errorCode??"")&&e.jsx("a",{href:"/settings",children:"Re-sign in with Hugging Face"}),t.errorCode==="hf_inference_billing_exhausted"&&e.jsxs(e.Fragment,{children:[(i==null?void 0:i.account_type)==="Free"&&!i.bill_to?e.jsx("a",{href:Ue,target:"_blank",rel:"noreferrer",children:"Upgrade to Hugging Face PRO — $9/month for 20× more included credits"}):e.jsx("a",{href:(i==null?void 0:i.usage_url)??"/settings",target:i?"_blank":void 0,rel:i?"noreferrer":void 0,children:"Review Hugging Face usage and billing"}),e.jsx("a",{href:$e,target:"_blank",rel:"noreferrer",children:"Inference Providers pricing and billing details"})]}),t.errorCode==="openrouter_monthly_budget_exhausted"&&e.jsxs(e.Fragment,{children:[l?e.jsx("span",{children:"This response started on the shared allowance. Your connected OpenRouter key will be used when you explicitly retry."}):e.jsx("a",{href:"/settings#openrouter-byok",children:"Connect your own OpenRouter key"}),e.jsx("span",{children:"Or select a Hugging Face-backed model and explicitly retry."})]}),t.errorCode==="openrouter_staging_funding_disabled"&&e.jsx("a",{href:Le,children:"Continue on paperswithcode.co"}),t.errorCode==="openrouter_unavailable"&&e.jsxs(e.Fragment,{children:[e.jsx("a",{href:"/settings#openrouter-byok",children:"Bring your own key in Settings"}),e.jsx("a",{href:"https://github.com/huggingface/paperswithcode-feedback",target:"_blank",rel:"noreferrer",children:"File an issue"})]}),t.errorCode==="openrouter_byok_billing_error"&&e.jsx("a",{href:"https://openrouter.ai/settings/credits",target:"_blank",rel:"noreferrer",children:"Review OpenRouter billing"}),["openrouter_byok_credential_invalid","openrouter_byok_rate_limit"].includes(t.errorCode??"")&&e.jsx("a",{href:"/settings#openrouter-byok",children:"Review OpenRouter settings"}),t.errorCode==="chat_session_quota_exceeded"&&(r||n)&&e.jsxs("span",{className:"chat-error-actions",children:[r&&e.jsx("button",{type:"button",disabled:o!==null,onClick:r,children:o==="old"?"Archiving…":"Archive chats older than 30 days"}),n&&e.jsx("button",{type:"button",disabled:o!==null,onClick:n,children:o==="oldest"?"Archiving…":"Archive oldest 50 chats"})]})]}),!t.streaming&&t.finishReason&&t.finishReason!=="success"&&e.jsx("div",{className:"chat-finish-note",children:["tool_limit","max_turns"].includes(t.finishReason)?"The assistant stopped at the execution limit.":`The assistant stopped early (${t.finishReason.replace(/_/g," ")}).`})]})})};export{it as A,rt as C,nt as U};
|
assets/{ChatView-COMuDw74.js → ChatView-Lg73w4On.js}
RENAMED
|
The diff for this file is too large to render.
See raw diff
|
|
|
assets/{ConferenceDetailView-B-4YlObw.js → ConferenceDetailView-CP3htnO2.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{f as L,r as D,j as e,L as p,c as C}from"./index-
|
|
|
|
| 1 |
+
import{f as L,r as D,j as e,L as p,c as C}from"./index-DaC9z2lA.js";import{u as T}from"./useQuery-DaHFL0rL.js";import{M as F}from"./MarkdownText-CJyCKyp5.js";import{c as B,h as A,d as E}from"./transform-By0Q02j6.js";import{S as f}from"./skeleton-DMsDaBre.js";import{A as P,a as z}from"./alert-CEb_9u-E.js";import{s as M}from"./safeExternalHref-CkBrsh84.js";import"./katex.min-BSBacQyE.js";import"./PaperPreviewLink-Bj5C7FQg.js";import"./index-CNBab3Wv.js";import"./hover-card-1A3Ph00K.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}`},X=()=>{var k,S,b,_,$,w;const{confSlug:a}=L(),t=T({queryKey:["conference-areas-with-tasks",a],queryFn:()=>C.getConferenceAreasWithTasks(a),enabled:!!a,staleTime:10*60*1e3}),i=D.useMemo(()=>{if(!t.data)return[];const r={general:0,vision:1,video:2,language:3,audio:4,other:5},n=o=>r[R(o)]??999;return[...t.data.results].sort((o,l)=>{const d=n(o.name),x=n(l.name);return d!==x?d-x:o.name.localeCompare(l.name)})},[t.data]),s=(k=t.data)==null?void 0:k.conference,c=((S=t.data)==null?void 0:S.total_paper_count)??0,m=((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((r,n)=>r+n.tasks.length,0);if(t.error)return e.jsx("div",{className:"page",children:e.jsx(P,{variant:"destructive",children:e.jsx(z,{children:"Failed to load conference. Please try again."})})});const y=s?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:r=>{var n,o;(o=(n=r.currentTarget.parentElement)==null?void 0:n.parentElement)==null||o.style.setProperty("display","none")}})}),e.jsxs("figcaption",{children:["Figure · ",h??"Conference",s.image_credit&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(F,{className:"task-image-credit",text:s.image_credit})]})]})]})]}),!t.isLoading&&c>0&&e.jsxs("section",{style:{marginTop:48,marginBottom:48},children:[e.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:24,paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},children:[e.jsxs("div",{children:[e.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.02em",marginBottom:4},children:"Browse papers"}),e.jsx("div",{style:{fontFamily:"var(--serif)",fontStyle:"italic",fontSize:13,color:"var(--ink-soft)"},children:"All accepted papers, plus oral, spotlight, outstanding, and best paper finalists."})]}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[c.toLocaleString()," papers"]})]}),e.jsxs("div",{className:"tag-grid",children:[e.jsxs(p,{to:`/conferences/${a}/all`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:"var(--accent)"}}),"All papers"]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[c.toLocaleString()," papers"]})})]}),m>0&&e.jsxs(p,{to:`/conferences/${a}/oral`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:"#fdbb02"}}),"Oral papers"]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[m.toLocaleString()," papers"]})})]}),g>0&&e.jsxs(p,{to:`/conferences/${a}/spotlight`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:"#fdbb02"}}),"Spotlight papers"]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[g.toLocaleString()," papers"]})})]}),u>0&&e.jsxs(p,{to:`/conferences/${a}/outstanding`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:"#c45c26"}}),"Outstanding papers"]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[u.toLocaleString()," papers"]})})]}),j>0&&e.jsxs(p,{to:`/conferences/${a}/best-paper-finalists`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:"#c9a227"}}),"Best paper finalists"]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[j.toLocaleString()," papers"]})})]})]})]}),t.isLoading?e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:32},children:Array.from({length:4}).map((r,n)=>e.jsxs("div",{children:[e.jsx(f,{className:"h-8 w-1/3 mb-4"}),e.jsx("div",{className:"tag-grid",children:Array.from({length:6}).map((o,l)=>e.jsx(f,{className:"h-24"},l))})]},n))}):i.map(r=>{const n=r.tasks;if(n.length===0)return null;const o=n.reduce((l,d)=>l+(d.paper_count||0),0);return e.jsxs("section",{style:{marginBottom:48},children:[e.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:24,paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},children:[e.jsxs("div",{children:[e.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.02em",marginBottom:4},children:r.name}),r.description&&e.jsx("div",{style:{fontFamily:"var(--serif)",fontStyle:"italic",fontSize:13,color:"var(--ink-soft)"},children:r.description})]}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[n.length," ",n.length===1?"task":"tasks"," · ",o.toLocaleString()," papers"]})]}),e.jsx("div",{className:"tag-grid",children:n.map(l=>{const d=l.slug||"",x=B(A(d));return e.jsxs(p,{to:`/conferences/${a}/${d}`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:x.dot}}),E(l.name,d)]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[(l.paper_count??0).toLocaleString()," papers"]})})]},l.id)})})]},r.id)}),v>0&&e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",marginTop:24},children:[v," tasks across ",i.filter(r=>r.tasks.length>0).length," areas."]})]})};export{X as default};
|
assets/{ConferenceTaskView-etOCFSqs.js → ConferenceTaskView-B10PA6ep.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{f as $,a as D,r as f,j as e,L as b,R as W,c as M}from"./index-
|
|
|
|
| 1 |
+
import{f as $,a as D,r as f,j as e,L as b,R as W,c as M}from"./index-DaC9z2lA.js";import{u as z}from"./useQuery-DaHFL0rL.js";import{P as G}from"./components-C8eWDsbC.js";import{u as J,P as X}from"./useIntersectionObserver-D9t6P4Le.js";import{M as h}from"./MarkdownText-CJyCKyp5.js";import{t as Y,d as Z}from"./transform-By0Q02j6.js";import{c as ee}from"./usePapers-BQVvNLjC.js";import{S as se}from"./skeleton-DMsDaBre.js";import{A as ae,a as te}from"./alert-CEb_9u-E.js";import"./LatexTitle-C6bpusZm.js";import"./katex.min-BSBacQyE.js";import"./safeExternalHref-CkBrsh84.js";import"./PaperPreviewLink-Bj5C7FQg.js";import"./index-CNBab3Wv.js";import"./hover-card-1A3Ph00K.js";import"./useInfiniteQuery-DaSt1eU8.js";const re=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],ne=a=>a==="trending"||a==="date_published"||a==="citation_count"?a:"trending",ve=()=>{var F,A,L,O,T,B;const{confSlug:a,taskSlug:n}=$(),[c,j]=D(),y=ne(c.get("order_by")),S=c.get("has_code")==="true",w=c.get("has_hf_artifacts")==="true",I=t=>{const s=new URLSearchParams(c);s.set("order_by",t),j(s)},q=t=>{const s=new URLSearchParams(c);t?s.set("has_code","true"):s.delete("has_code"),j(s)},Q=t=>{const s=new URLSearchParams(c);t?s.set("has_hf_artifacts","true"):s.delete("has_hf_artifacts"),j(s)},k=n==="all",P=n==="oral",N=n==="spotlight",l=n==="outstanding",d=n==="best-paper-finalists",u=l||d,p=k||P||N||l||d,K=p?void 0:n,U=P?"oral":N?"spotlight":l?"outstanding":d?"best_paper_finalist":void 0,m=z({queryKey:["conference",a],queryFn:()=>M.getConference(a),enabled:!!a,staleTime:10*60*1e3}),x=z({queryKey:["task",n],queryFn:()=>M.getTask(n),enabled:!!n&&!p,staleTime:10*60*1e3}),i=ee({conferenceSlug:a||"",taskSlug:K,presentation:U,page_size:12,order_by:y,order_dir:"desc",include_resources:!0,has_code:S,has_hf_artifacts:w,enabled:!!a}),{targetRef:V,isIntersecting:C}=J({rootMargin:"200px"});f.useEffect(()=>{C&&i.hasNextPage&&!i.isFetchingNextPage&&i.fetchNextPage()},[C,i.hasNextPage,i.isFetchingNextPage]),f.useEffect(()=>{window.scrollTo(0,0)},[a,n]);const _=f.useMemo(()=>{var s;return(((s=i.data)==null?void 0:s.pages)??[]).flatMap(o=>o.results)},[i.data]),v=f.useMemo(()=>_.map(Y),[_]),g=k?"All papers":P?"Oral papers":N?"Spotlight papers":l?"Outstanding papers":d?"Best paper finalists":Z(((F=x.data)==null?void 0:F.name)||n||"",((A=x.data)==null?void 0:A.slug)||n),R=((O=(L=i.data)==null?void 0:L.pages[0])==null?void 0:O.count)??((T=m.data)==null?void 0:T.paper_count)??0,r=x.data;return m.error||x.error||i.error?e.jsx("div",{className:"page",children:e.jsx(ae,{variant:"destructive",children:e.jsx(te,{children:"Failed to load conference papers. Please try again."})})}):e.jsxs("div",{className:"page",children:[e.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[e.jsx(b,{to:"/",children:"Home"}),e.jsx("span",{children:" / "}),e.jsx(b,{to:"/conferences",children:"Conferences"}),e.jsx("span",{children:" / "}),e.jsx(b,{to:`/conferences/${a}`,children:((B=m.data)==null?void 0:B.name)??a}),e.jsx("span",{children:" / "}),e.jsx("span",{children:g})]}),e.jsxs("div",{className:!p&&(r!=null&&r.image_url)?"task-hero-grid":void 0,style:{marginTop:16,marginBottom:28},children:[e.jsxs("div",{children:[e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",letterSpacing:"0.1em",marginBottom:8},children:p?"BROWSE PAPERS":"TASK"}),e.jsx("h1",{className:"domain-mega-title",children:g}),l&&a==="iclr-2026"&&e.jsx(h,{className:"task-explainer",text:"ICLR 2026 recognized two Outstanding Papers and one Honorable Mention. [Read the announcement](https://blog.iclr.cc/2026/04/23/announcing-the-iclr-2026-outstanding-papers/)."}),l&&a==="icml-2026"&&e.jsx(h,{className:"task-explainer",text:"ICML 2026 recognized two Outstanding Papers and five Honorable Mentions. [Read the announcement](https://blog.icml.cc/2026/07/05/announcing-the-icml-2026-awards/)."}),d&&a==="cvpr-2026"&&e.jsx(h,{className:"task-explainer",text:"CVPR 2026 recognized fifteen Best Paper Award finalists, including the winners. [Read the announcement](https://x.com/CVPR/status/2062912519522717978)."}),!p&&(r==null?void 0:r.description)&&e.jsx(h,{className:"task-explainer",text:r.description}),m.data&&e.jsxs("div",{className:"task-quickstats",style:{marginTop:12},children:[e.jsxs("span",{children:[e.jsx("span",{className:"num",children:R.toLocaleString()}),"PAPERS"]}),e.jsx("span",{children:m.data.name})]})]}),!p&&(r==null?void 0:r.image_url)&&e.jsxs("figure",{className:"task-figure-card",children:[e.jsx("div",{className:"task-figure-img-wrap",children:e.jsx("img",{className:"task-figure-img",src:r.image_url,alt:`${g} schematic`,onError:t=>{var s,o;(o=(s=t.currentTarget.parentElement)==null?void 0:s.parentElement)==null||o.style.setProperty("display","none")}})}),e.jsxs("figcaption",{children:["Figure · ",g,r.image_credit&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(h,{className:"task-image-credit",text:r.image_credit})]})]})]})]}),e.jsxs("div",{className:"task-section-head",children:[e.jsx("div",{className:"task-section-eyebrow",children:u?"Award papers":"Conference papers · sort below"}),e.jsxs("div",{className:"task-section-title",children:["Papers ",e.jsxs("span",{className:"meta",children:["[",R.toLocaleString(),"]"]})]})]}),e.jsxs("div",{className:"sort-bar",children:[e.jsxs("div",{className:"paper-feed-toolbar-controls",children:[!u&&e.jsx("div",{className:"sort-options",children:re.map(([t,s])=>e.jsx("button",{className:`sort-btn ${y===t?"active":""}`,onClick:()=>I(t),children:s},t))}),e.jsx(X,{hasCode:S,hasHfArtifacts:w,onHasCodeChange:q,onHasHfArtifactsChange:Q,showDivider:!u})]}),!u&&e.jsxs("div",{className:"results-count",children:[v.length," loaded in ",e.jsx("span",{children:g})]})]}),i.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((t,s)=>e.jsx(se,{className:"h-40 w-full"},s))}):v.length===0?e.jsx("div",{className:"no-results",children:"No papers found for this selection."}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:v.map((t,s)=>{var E;const o=(E=_[s])==null?void 0:E.conference_award,H=o==="outstanding"?"Outstanding Paper":o==="honorable_mention"?"Honorable Mention":o==="best_paper_finalist"&&!d?"Best Paper Finalist":null;return e.jsxs(W.Fragment,{children:[H&&e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",letterSpacing:"0.08em",marginBottom:8},children:H}),e.jsx(G,{paper:t,rank:s+1})]},t.id)})}),e.jsx("div",{ref:V,style:{height:1}}),i.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]})};export{ve as default};
|
assets/{ConferencesIndexView-BdyrAqSO.js → ConferencesIndexView-mpxT1Hj4.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{r as u,j as e,L as d,c as p}from"./index-
|
|
|
|
| 1 |
+
import{r as u,j as e,L as d,c as p}from"./index-DaC9z2lA.js";import{u as h}from"./useQuery-DaHFL0rL.js";import{S as m}from"./skeleton-DMsDaBre.js";import{A as f,a as g}from"./alert-CEb_9u-E.js";import{T as x}from"./TaxonomySuggestionTile-kyXt2mVa.js";import"./SignInToEditDialog-C3dp4YGN.js";import"./button-CjgOZ0_U.js";import"./textarea-BEZhS1Pc.js";import"./dialog-1gyncLM1.js";import"./useMutation-DIaWIhRQ.js";import"./loader-circle-C47w3weC.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)"},F=()=>{const r=h({queryKey:["conferences"],queryFn:()=>p.getConferences(),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(f,{variant:"destructive",children:e.jsx(g,{children:"Failed to load conferences. Please try again."})})}):e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["All ",e.jsx("em",{children:"Conferences"})]}),e.jsx("div",{className:"feed-subtitle",children:"Browse accepted papers from major AI conferences, grouped by research area and task."}),e.jsxs("div",{className:"conference-deadlines-link",children:["Find deadlines for upcoming conferences"," ",e.jsx(d,{to:"/ai-deadlines",className:"underline underline-offset-2 hover:text-foreground",children:"here"}),". 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{F as default};
|
assets/{CronDashboard-BrAJ6icl.js → CronDashboard-BaNBXdoV.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
import{d as _,r as m,j as e,v as N,O as Pe,o as Me,n as H,a6 as Ae,Q as Ee,S as De,q as U,P as Ie,t as qe,T as re,L as Je,k as Oe,c as R,g as He,b as We}from"./index-
|
| 2 |
* @license lucide-react v0.462.0 - ISC
|
| 3 |
*
|
| 4 |
* This source code is licensed under the ISC license.
|
|
|
|
| 1 |
+
import{d as _,r as m,j as e,v as N,O as Pe,o as Me,n as H,a6 as Ae,Q as Ee,S as De,q as U,P as Ie,t as qe,T as re,L as Je,k as Oe,c as R,g as He,b as We}from"./index-DaC9z2lA.js";import{u as M}from"./useQuery-DaHFL0rL.js";import{B as w,D as X,f as Be}from"./codexAddEvals-C1rXVNOh.js";import{B as P}from"./button-CjgOZ0_U.js";import{C as Ue}from"./chevron-down-B4Nu78fZ.js";import{F as Y}from"./file-text-C1SK1wkY.js";import{C as J,R as Z,S as ze}from"./shield-alert-D-7Gy6op.js";import{L as S}from"./loader-circle-C47w3weC.js";import{C as K}from"./circle-check-DNZM3-BA.js";import{E as ne}from"./external-link-t3rdCz_l.js";import{u as ee}from"./useMutation-DIaWIhRQ.js";import{u as Ke}from"./useInfiniteQuery-DaSt1eU8.js";/**
|
| 2 |
* @license lucide-react v0.462.0 - ISC
|
| 3 |
*
|
| 4 |
* This source code is licensed under the ISC license.
|
assets/{ExternalSourceEvalBadge-Birx6-ql.js → ExternalSourceEvalBadge-hiSahiUS.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{j as e,L as n}from"./index-
|
|
|
|
| 1 |
+
import{j as e,L as n}from"./index-DaC9z2lA.js";import{H as o,a as l,b as i}from"./hover-card-1A3Ph00K.js";import{s as c}from"./safeExternalHref-CkBrsh84.js";const h=()=>e.jsxs(o,{openDelay:120,closeDelay:120,children:[e.jsx(l,{asChild:!0,children:e.jsx("button",{type:"button",className:"bm-closed-source-tag","aria-label":"Closed-source model",children:"closed"})}),e.jsxs(i,{side:"top",align:"start",className:"w-auto max-w-[260px] p-3 text-sm leading-snug",children:["This is an evaluation of a closed-source model. You can disable viewing these in your"," ",e.jsx(n,{to:"/settings",className:"closed-eval-tooltip-link",children:"settings"}),"."]})]});function d(a){if(!a)return"Evaluation sourced outside this paper";const r=a.toLowerCase();if(r.includes("open-asr-leaderboard"))return"Open ASR Leaderboard";if(r.includes("arcprize.org"))return"ARC Prize Leaderboard";if(r.includes("frontierswe.com"))return"FrontierSWE";if(r.includes("deepswe.datacurve.ai"))return"DeepSWE";try{const s=new URL(a,"https://paperswithcode.co");return s.pathname.startsWith("/paper/")?"Source paper":s.hostname.replace(/^www\./,"")}catch{return a}}const m=({sourceUrl:a})=>{const r=c(a),s=typeof a=="string"&&a.startsWith("/paper/")?a:null,t=d(a);return e.jsxs(o,{openDelay:120,closeDelay:120,children:[e.jsx(l,{asChild:!0,children:e.jsx("button",{type:"button",className:"bm-external-source-tag","aria-label":`Externally sourced evaluation: ${t}`,children:"External"})}),e.jsxs(i,{side:"top",align:"start",className:"w-auto max-w-[280px] p-3 text-sm leading-snug",children:["This score was sourced outside this paper.",s?e.jsxs(e.Fragment,{children:[" ",e.jsx(n,{to:s,target:"_blank",rel:"noopener noreferrer",className:"external-eval-tooltip-link",children:t}),"."]}):r?e.jsxs(e.Fragment,{children:[" ",e.jsx("a",{href:r,target:"_blank",rel:"noopener noreferrer",className:"external-eval-tooltip-link",children:t}),"."]}):e.jsxs(e.Fragment,{children:[" ",t,"."]})]})]})};export{h as C,m as E};
|
assets/{FeedView-DOA64Kf-.js → FeedView-mKlfcK5Q.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{u as F,r as d,i as R,j as e,a as q,L as M,b as $,c as D}from"./index-
|
|
|
|
| 1 |
+
import{u as F,r as d,i as R,j as e,a as q,L as M,b as $,c as D}from"./index-DaC9z2lA.js";import{P as U}from"./components-C8eWDsbC.js";import{u as B,P as K}from"./useIntersectionObserver-D9t6P4Le.js";import{D as W,S as G,P as z,u as Q,a as V,M as X,R as Y,W as J,A as Z,b as ee,q as se,c as ae}from"./chatSessions-CExFukoU.js";import{S}from"./chatPrompts-CDY3UGU1.js";import{t as te,d as O}from"./transform-By0Q02j6.js";import{u as re}from"./usePapers-BQVvNLjC.js";import{P as ie}from"./usePeriodFilter-Dhr6WGmC.js";import{S as v}from"./skeleton-DMsDaBre.js";import{A as ne,a as oe}from"./alert-CEb_9u-E.js";import{u as I}from"./useQuery-DaHFL0rL.js";import"./LatexTitle-C6bpusZm.js";import"./katex.min-BSBacQyE.js";import"./safeExternalHref-CkBrsh84.js";import"./chevron-down-B4Nu78fZ.js";import"./useInfiniteQuery-DaSt1eU8.js";const le=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],ce={Today:"today","This Week":"week","This Month":"month","All Time":"all_time"},de={today:"Today",week:"This Week",month:"This Month",all_time:"All Time"},H=45,me=1800,he=25,pe=350,ue=i=>{const[h,o]=d.useState(S[0].slice(0,1));return d.useEffect(()=>{var j,_;if(!i)return;if((_=(j=window.matchMedia)==null?void 0:j.call(window,"(prefers-reduced-motion: reduce)"))!=null&&_.matches){o(S[0]);return}let p=0,n=1,u=!1,m;o(S[0].slice(0,n));const l=()=>{const g=S[p];if(!u){if(n+=1,o(g.slice(0,n)),n===g.length){u=!0,m=window.setTimeout(l,me);return}m=window.setTimeout(l,H);return}if(n-=1,o(g.slice(0,n)),n===0){u=!1,p=(p+1)%S.length,m=window.setTimeout(l,pe);return}m=window.setTimeout(l,he)};return m=window.setTimeout(l,H),()=>window.clearTimeout(m)},[i]),h},ge=i=>i==="trending"||i==="date_published"||i==="citation_count"?i:"trending",xe=i=>i==="today"||i==="week"||i==="month"||i==="all_time"?i:"all_time",fe=()=>{var w,s,a;const i=F(),h=$()?G:z,[o,p]=d.useState({text:"",paperMentions:[]}),n=o.text,[u,m]=d.useState(0),[l,j]=d.useState(W),_=(w=h.find(r=>r.id===l))==null?void 0:w.provider,[g,k]=d.useState(!1),[x,c]=d.useState("low"),[f,L]=d.useState(!1),A=ue(!n),y=d.useRef(null),E=I({queryKey:["chatAvailability"],queryFn:()=>D.getChatAvailability(),retry:!1,enabled:R()}),N=!!((s=E.data)!=null&&s.web_search_available),b=R()&&((a=E.data)==null?void 0:a.paper_mentions_enabled)!==!1,t=Q({draft:o,onChange:p,enabled:b,textareaRef:y});d.useEffect(()=>{const r=y.current;r&&(r.style.height="auto",r.style.height=`${Math.min(r.scrollHeight,160)}px`)},[n]);const T=async(r=o)=>{if(!(!r.text.trim()||f)){L(!0),se(r,l,{webSearchEnabled:N&&g,reasoningEffort:x});try{const C=await ae(l,x);i(`/chat/${C.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(V,{text:o.text,mentions:o.paperMentions,scrollTop:u,variant:"home"}),e.jsx("textarea",{ref:y,rows:1,value:n,placeholder:A,"aria-label":"Ask the assistant",disabled:f,onChange:r=>t.updateText(r.target.value,r.target.selectionStart),onSelect:r=>t.refresh(r.currentTarget.selectionStart),onClick:r=>t.refresh(r.currentTarget.selectionStart),onScroll:r=>m(r.currentTarget.scrollTop),onBlur:r=>{var P,C;(C=(P=r.relatedTarget)==null?void 0:P.closest)!=null&&C.call(P,".chat-paper-picker")||window.setTimeout(t.close,0)},onKeyDown:r=>{t.keyDown(r)||r.key==="Enter"&&!r.shiftKey&&(r.preventDefault(),T())},role:b?"combobox":void 0,"aria-expanded":b?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":b?"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(X,{models:h,selectedModel:l,onModelChange:j}),e.jsx(Y,{value:x,onChange:c,disabled:f}),N&&e.jsx(J,{enabled:g,onChange:k,disabled:f}),_!=="openrouter"&&e.jsxs("span",{className:"ask-home-hint",children:["Via 🤗"," ",e.jsx("a",{href:"https://huggingface.co/docs/inference-providers/en/index",target:"_blank",rel:"noreferrer",children:"Inference Providers"})]})]}),e.jsx("button",{type:"button",className:`chat-send${n.trim()?" chat-send-on":""}`,onClick:()=>void T(),disabled:!n.trim()||f,"aria-label":"Ask the assistant",children:e.jsx(Z,{})})]}),e.jsx(ee,{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})]})]})},Re=()=>{var N,b,t,T,w;const[i,h]=q(),o=ge(i.get("order_by")),p=xe(i.get("time")),n=i.get("has_code")==="true",u=i.get("has_hf_artifacts")==="true",m=de[p],l=s=>{const a=new URLSearchParams(i);a.set("order_by",s),h(a)},j=s=>{const a=new URLSearchParams(i);a.set("time",ce[s]),h(a)},_=s=>{const a=new URLSearchParams(i);s?a.set("has_code","true"):a.delete("has_code"),h(a)},g=s=>{const a=new URLSearchParams(i);s?a.set("has_hf_artifacts","true"):a.delete("has_hf_artifacts"),h(a)},k=I({queryKey:["top-tasks-sidebar"],queryFn:()=>D.getTopTasks({limit:8}),staleTime:10*60*1e3}),x=I({queryKey:["trending-tasks-sidebar"],queryFn:()=>D.getTrendingTasks({limit:8,level:0}),staleTime:10*60*1e3}),c=re({page_size:30,order_by:o,order_dir:"desc",time:p,include_resources:!0,has_code:n,has_hf_artifacts:u}),f=d.useMemo(()=>{var a;return(((a=c.data)==null?void 0:a.pages.flatMap(r=>r.results))||[]).map(te)},[c.data]),{targetRef:L,isIntersecting:A}=B({rootMargin:"400px"});d.useEffect(()=>{A&&c.hasNextPage&&!c.isFetchingNextPage&&c.fetchNextPage()},[A,c.hasNextPage,c.isFetchingNextPage]);const y=c.isLoading,E=c.error;return e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["Trending ",e.jsx("em",{children:"Research"})]}),e.jsx("div",{className:"feed-subtitle",children:"Curated daily from arXiv and Hugging Face"})]})}),e.jsxs("div",{className:"layout-with-sidebar",children:[e.jsxs("aside",{className:"sidebar",children:[e.jsxs("div",{className:"sidebar-section",children:[e.jsx("div",{className:"sidebar-label",children:"Top Domains"}),k.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((s,a)=>e.jsx(v,{className:"h-5 w-full"},a))}),(N=k.data)==null?void 0:N.map(s=>e.jsxs(M,{to:`/tasks/${s.slug}`,className:"sidebar-link",children:[O(s.name,s.slug),s.paper_count!=null&&e.jsx("span",{className:"count",children:s.paper_count})]},s.id)),e.jsx(M,{to:"/tasks",className:"sidebar-link",style:{marginTop:8,fontStyle:"italic"},children:"all domains →"})]}),e.jsxs("div",{className:"sidebar-section",children:[e.jsx("div",{className:"sidebar-label",children:"Trending Domains"}),x.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((s,a)=>e.jsx(v,{className:"h-5 w-full"},a))}),((t=(b=x.data)==null?void 0:b.results)==null?void 0:t.length)===0&&!x.isLoading&&e.jsx("div",{style:{fontSize:12,color:"var(--ink-faint)"},children:"No domains gaining momentum right now."}),(w=(T=x.data)==null?void 0:T.results)==null?void 0:w.map(s=>e.jsxs(M,{to:`/tasks/${s.slug}`,className:"sidebar-link",children:[O(s.name,s.slug),e.jsxs("span",{className:"count",children:[s.share_lift.toFixed(1),"x"]})]},s.id))]})]}),e.jsxs("div",{children:[R()&&e.jsx(fe,{}),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:le.map(([s,a])=>e.jsx("button",{className:`sort-btn ${o===s?"active":""}`,onClick:()=>l(s),children:a},s))}),e.jsx(K,{hasCode:n,hasHfArtifacts:u,onHasCodeChange:_,onHasHfArtifactsChange:g})]}),e.jsx("div",{className:"sort-options sort-options-time",children:ie.map(s=>e.jsx("button",{className:`sort-btn sort-btn-time ${m===s?"active":""}`,onClick:()=>j(s),children:s},s))})]}),E&&e.jsx(ne,{variant:"destructive",className:"mb-4",children:e.jsx(oe,{children:"Failed to load papers. Please try again."})}),y?e.jsx("div",{className:"paper-list",children:Array.from({length:6}).map((s,a)=>e.jsxs("div",{className:"paper-card",children:[e.jsx("div",{className:"paper-thumb-wrap",children:e.jsx(v,{className:"paper-thumb-skeleton"})}),e.jsxs("div",{className:"paper-body",style:{flex:1,gap:12},children:[e.jsx(v,{className:"h-6 w-3/4"}),e.jsx(v,{className:"h-4 w-1/2"}),e.jsx(v,{className:"h-12 w-full"})]})]},a))}):f.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:f.map((s,a)=>e.jsx(U,{paper:s,rank:a+1},s.id))}),e.jsx("div",{ref:L,style:{height:1}}),c.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]})]})]})};export{fe as AskAssistant,Re as default};
|
assets/{FrameworksIndexView-DAvLjKaR.js → FrameworksIndexView-C3goRh1S.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{u as d,j as e,L as o,R as m,c as p}from"./index-
|
|
|
|
| 1 |
+
import{u as d,j as e,L as o,R as m,c as p}from"./index-DaC9z2lA.js";import{u as h}from"./useQuery-DaHFL0rL.js";import{I as u}from"./components-C8eWDsbC.js";import{c as g,h as f}from"./transform-By0Q02j6.js";import"./LatexTitle-C6bpusZm.js";import"./katex.min-BSBacQyE.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(u,{name:"github",size:13}),"GitHub"]}),r.docs_url&&r.docs_url!==r.github_url&&e.jsx("a",{href:r.docs_url,target:"_blank",rel:"noopener noreferrer",className:"framework-link",children:"Docs"})]})]})},B=()=>{var a;const r=h({queryKey:["framework-catalog"],queryFn:()=>p.getFrameworkCatalog()}),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,B as default};
|
assets/{LatexTitle-DDjP6qv1.js → LatexTitle-C6bpusZm.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{j as o,r as g}from"./index-
|
|
|
|
| 1 |
+
import{j as o,r as g}from"./index-DaC9z2lA.js";import{k as T}from"./katex.min-BSBacQyE.js";const j=new Set([",",";",":","!"," ","quad","qquad","enspace","thinspace"]),C={a:"á",e:"é",i:"í",o:"ó",u:"ú",y:"ý",A:"Á",E:"É",I:"Í",O:"Ó",U:"Ú",Y:"Ý"},M={a:"à",e:"è",i:"ì",o:"ò",u:"ù",A:"À",E:"È",I:"Ì",O:"Ò",U:"Ù"},_={a:"â",e:"ê",i:"î",o:"ô",u:"û",A:"Â",E:"Ê",I:"Î",O:"Ô",U:"Û"},b={a:"ä",e:"ë",i:"ï",o:"ö",u:"ü",y:"ÿ",A:"Ä",E:"Ë",I:"Ï",O:"Ö",U:"Ü",Y:"Ÿ"},O={"'":C,"`":M,"^":_,'"':b,"~":{n:"ñ",N:"Ñ"}},E={ss:"ß",ae:"æ",AE:"Æ",oe:"œ",OE:"Œ",o:"ø",O:"Ø",l:"ł",L:"Ł"};function S(e,s){var n;return((n=O[e])==null?void 0:n[s])??null}function N(e){const s=[];let n=0,i="";const l=()=>{i&&(s.push({type:"text",content:i}),i="")};for(;n<e.length;){if(e[n]==="$"&&e[n+1]==="$"){l();const t=e.indexOf("$$",n+2);if(t===-1){i+=e.slice(n);break}s.push({type:"display",content:e.slice(n+2,t)}),n=t+2;continue}if(e[n]==="$"){l();const t=e.indexOf("$",n+1);if(t===-1){i+=e.slice(n);break}s.push({type:"inline",content:e.slice(n+1,t)}),n=t+1;continue}i+=e[n],n+=1}return l(),s}function d(e,s){if(e[s]!=="{")return null;let n=0;for(let i=s;i<e.length;i+=1)if(e[i]==="{")n+=1;else if(e[i]==="}"&&(n-=1,n===0))return{content:e.slice(s+1,i),end:i+1};return null}function $(e,s){let n=s+1;if(n>=e.length)return{name:"",end:n};if(!/[a-zA-Z]/.test(e[n]))return{name:e[n],end:n+1};const i=n;for(;n<e.length&&/[a-zA-Z]/.test(e[n]);)n+=1;return{name:e.slice(i,n),end:n}}function w(e,s){const n=e[s];if(n!=="^"&&n!=="_"||s+1>=e.length)return null;if(e[s+1]==="{"){const i=d(e,s+1);return i?{end:i.end}:null}return/[A-Za-z0-9+\-=.]/.test(e[s+1])?{end:s+2}:null}function y(e,s){let n=s;if(e[n]==="\\"){const{name:t,end:a}=$(e,n);if(!t)return null;if(n=a,e[n]==="{"){const f=d(e,n);f&&(n=f.end)}}else if(/[A-Za-z0-9]/.test(e[n])){let t=n+1;for(;t<e.length&&/[A-Za-z0-9]/.test(e[t]);)t+=1;if(e[t]!=="^"&&e[t]!=="_")return null;n=t}else return null;const i=s;let l=0;for(;n<e.length;){const t=w(e,n);if(!t)break;l+=1,n=t.end}return l===0?null:{latex:e.slice(i,n),end:n}}function p(e,s){const n=[];let i=0,l=0;const t=()=>`${s}-${l++}`,a=(f,u)=>f==="strong"?o.jsx("strong",{children:u},t()):o.jsx("em",{children:u},t());for(;i<e.length;){if(e[i]==="\\"){const{name:c,end:L}=$(e,i);if(i=L,E[c]){n.push(E[c]);continue}if(c.length===1&&i<e.length&&/[A-Za-z]/.test(e[i])){const r=S(c,e[i]);if(r){n.push(r),i+=1;continue}}if(c==="c"){const r=d(e,i);if((r==null?void 0:r.content.length)===1){const h={c:"ç",C:"Ç"}[r.content];if(h){n.push(h),i=r.end;continue}}}if(c==="textbf"||c==="mathbf"){const r=d(e,i);if(r){i=r.end,n.push(a("strong",p(r.content,t())));continue}}if(c==="emph"||c==="textit"||c==="textsl"||c==="texttt"){const r=d(e,i);if(r){i=r.end,n.push(a("em",p(r.content,t())));continue}}if(c==="color"||c==="textcolor"){const r=d(e,i);if(r){i=r.end;const h=d(e,i);h&&(i=h.end,n.push(...p(h.content,t())));continue}}if(j.has(c)){n.push(" ");continue}if(c==="~"){n.push(" ");continue}const m=d(e,i);if(m){i=m.end,n.push(...p(m.content,t()));continue}n.push(`\\${c}`);continue}if(e[i]==="~"){n.push(" "),i+=1;continue}const f=y(e,i);if(f){n.push(o.jsx(A,{latex:f.latex,display:!1},t())),i=f.end;continue}let u=i;for(;u<e.length&&e[u]!=="\\"&&e[u]!=="~"&&!y(e,u);)u+=1;u>i&&n.push(e.slice(i,u)),i=u}return n}function A({latex:e,display:s}){const n=g.useMemo(()=>{try{return T.renderToString(e.trim(),{displayMode:s,throwOnError:!1})}catch{return null}},[e,s]);return n?o.jsx("span",{className:s?"katex-display":void 0,dangerouslySetInnerHTML:{__html:n}}):o.jsx(o.Fragment,{children:s?`$$${e}$$`:`$${e}$`})}function k(e){const s=N(e),n=[];return s.forEach((i,l)=>{const t=`latex-${l}`;if(i.type==="text"){const a=p(i.content,t);a.length===1?n.push(a[0]):a.length>1&&n.push(o.jsx(g.Fragment,{children:a},t));return}if(i.type==="display"){n.push(o.jsx(A,{latex:i.content,display:!0},t));return}n.push(o.jsx(A,{latex:i.content,display:!1},t))}),n.length===1?n[0]:o.jsx(o.Fragment,{children:n})}const U=({text:e,className:s=""})=>{const n=g.useMemo(()=>k(e),[e]);return o.jsx("span",{className:s,children:n})},X=({title:e,className:s=""})=>o.jsx(U,{text:e,className:s});export{X as L,U as a};
|
assets/{MarkdownText-CsqI5M0J.js → MarkdownText-CJyCKyp5.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{Z as l,j as s,L as u}from"./index-
|
|
|
|
| 1 |
+
import{Z as l,j as s,L as u}from"./index-DaC9z2lA.js";import"./katex.min-BSBacQyE.js";import{r as p,a as m,P as h}from"./PaperPreviewLink-Bj5C7FQg.js";import{M as d,r as w}from"./index-CNBab3Wv.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-CQda1geS.js → MethodDetailView-Fvel90rL.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{j as e,r as P,f as G,a as W,L as D,c as y,ap as Z}from"./index-C7unMYuh.js";import{u as M}from"./useQuery-CwZx3Xa-.js";import{u as V}from"./useInfiniteQuery-CdEhqhV5.js";import{M as X,P as Y}from"./components-o6x7RW1I.js";import{u as J,P as ee}from"./useIntersectionObserver-BzUI-y1K.js";import{r as te,M as O}from"./MarkdownText-CsqI5M0J.js";import{s as se}from"./slug-BpH-Nkvz.js";import{t as ae}from"./transform-CSO4KHDB.js";import{S as A}from"./skeleton-wrT9EggK.js";import{A as re,a as ne}from"./alert-B6VISE3o.js";import{s as ie}from"./safeExternalHref-CkBrsh84.js";import"./LatexTitle-DDjP6qv1.js";import"./katex.min-BSBacQyE.js";import"./PaperPreviewLink-CGM7W6Oy.js";import"./index-CiStg-MU.js";import"./hover-card-Bdza16XA.js";const s={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:r,w:o,h:l,fill:f,stroke:g,label:x,fontSize:c=10,multiline:_})=>e.jsxs("g",{children:[e.jsx("rect",{x:t,y:r,width:o,height:l,rx:"3",ry:"3",fill:f,stroke:g,strokeWidth:"1"}),_?e.jsxs(e.Fragment,{children:[e.jsx("text",{x:t+o/2,y:r+l/2-2,fontSize:c,fontFamily:"var(--sans)",fill:s.ink,textAnchor:"middle",dominantBaseline:"middle",children:_[0]}),e.jsx("text",{x:t+o/2,y:r+l/2+c-1,fontSize:c,fontFamily:"var(--sans)",fill:s.ink,textAnchor:"middle",dominantBaseline:"middle",children:_[1]})]}):e.jsx("text",{x:t+o/2,y:r+l/2,fontSize:c,fontFamily:"var(--sans)",fill:s.ink,textAnchor:"middle",dominantBaseline:"middle",children:x})]}),le=()=>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:s.faint,textAnchor:"middle",children:"Scaled Dot-Product Attention"}),e.jsx(j,{x:140,y:40,w:80,h:26,fill:s.yellow,stroke:s.yellowS,label:"MatMul",fontSize:11}),e.jsx("path",{d:"M180 66 L180 80",stroke:s.ink}),e.jsx(j,{x:140,y:80,w:80,h:26,fill:s.green,stroke:s.greenS,label:"SoftMax",fontSize:11}),e.jsx("path",{d:"M180 106 L180 120",stroke:s.ink}),e.jsx(j,{x:140,y:120,w:80,h:26,fill:s.purple,stroke:s.purpleS,label:"Mask (opt.)",fontSize:11}),e.jsx("path",{d:"M180 146 L180 160",stroke:s.ink}),e.jsx(j,{x:140,y:160,w:80,h:26,fill:s.blue,stroke:s.blueS,label:"Scale ÷√dₖ",fontSize:11}),e.jsx("path",{d:"M180 186 L180 200",stroke:s.ink}),e.jsx(j,{x:140,y:200,w:80,h:26,fill:s.yellow,stroke:s.yellowS,label:"MatMul",fontSize:11}),e.jsx("path",{d:"M156 226 L120 270",stroke:s.ink}),e.jsx("path",{d:"M180 226 L180 270",stroke:s.ink}),e.jsx("path",{d:"M204 226 L240 270",stroke:s.ink}),e.jsx(j,{x:100,y:270,w:40,h:24,fill:s.pink,stroke:s.pinkS,label:"Q",fontSize:13}),e.jsx(j,{x:160,y:270,w:40,h:24,fill:s.pink,stroke:s.pinkS,label:"K",fontSize:13}),e.jsx(j,{x:220,y:270,w:40,h:24,fill:s.pink,stroke:s.pinkS,label:"V",fontSize:13}),e.jsxs("text",{x:"180",y:"330",fontSize:"14",fontFamily:"var(--serif)",fontStyle:"italic",fill:s.ink,textAnchor:"middle",children:["softmax(QK",e.jsx("tspan",{fontSize:"9",baselineShift:"super",children:"⊤"})," / √d) V"]})]}),oe=[["my-skill/",""],["├── SKILL.md","# Required: metadata + instructions"],["├── scripts/","# Optional: executable code"],["├── references/","# Optional: documentation"],["├── assets/","# Optional: templates, resources"],["└── ...","# Any additional files or directories"]],ce=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[e.jsx("text",{x:"180",y:"20",fontSize:"11",fontFamily:"var(--serif)",fontStyle:"italic",fill:s.faint,textAnchor:"middle",children:"Skill package layout"}),e.jsx("rect",{x:"28",y:"48",width:"304",height:"318",rx:"8",fill:"#FFFDF8",stroke:s.faint,strokeWidth:"1"}),oe.map(([t,r],o)=>{const l=92+o*44;return e.jsxs("g",{children:[e.jsx("text",{x:"44",y:l,fontSize:"11",fontFamily:"var(--mono)",fill:s.ink,dominantBaseline:"middle",children:t}),r?e.jsx("text",{x:"138",y:l,fontSize:"8.5",fontFamily:"var(--mono)",fill:s.faint,dominantBaseline:"middle",children:r}):null]},t)})]}),de={attention:le,"agent-skills":ce},me=({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:s.faint,textAnchor:"middle",children:t.name||"method"}),e.jsx(j,{x:80,y:70,w:200,h:50,fill:s.blue,stroke:s.blueS,label:"Input",fontSize:12}),e.jsx("path",{d:"M180 120 L180 150",stroke:s.ink}),e.jsx(j,{x:80,y:150,w:200,h:70,fill:s.orange,stroke:s.orangeS,label:t.name||"transform",fontSize:13}),e.jsx("path",{d:"M180 220 L180 250",stroke:s.ink}),e.jsx(j,{x:80,y:250,w:200,h:50,fill:s.purple,stroke:s.purpleS,label:"Output",fontSize:12})]}),he=({method:t})=>{const r=(t.slug||"").toLowerCase(),o=de[r];if(o)return e.jsx("div",{className:"method-figure-svg method-figure-svg--schematic",children:e.jsx(o,{})});if(t.image_url){const l=r==="transformer"||r==="gpt-4"||r==="gpt-4o"||r==="multi-head-attention"?" method-figure-svg--compact":r==="rpn"?" method-figure-svg--scaled-80":"";return e.jsx("div",{className:`method-figure-svg method-figure-svg--image${l}`,children:e.jsx("img",{className:"method-figure-img",src:t.image_url,alt:`${t.name} figure`})})}return e.jsx("div",{className:"method-figure-svg method-figure-svg--schematic",children:e.jsx(me,{method:t})})},E=720,I=138,u={top:8,right:10,bottom:25,left:36},K=56,pe=new Intl.DateTimeFormat("en",{month:"short",year:"2-digit",timeZone:"UTC"}),xe=new Intl.DateTimeFormat("en",{year:"numeric",timeZone:"UTC"}),T=t=>pe.format(new Date(`${t}T00:00:00Z`)),ue=(t,r)=>{if(t===0)return new Set;const o=t>48?12:t>36?6:t>18?3:2,l=Math.max(1,Math.ceil(K/r)),f=Math.max(o,l),g=t-1,x=new Set([0,g]);for(let c=f;c<g;c+=f)(g-c)*r>=K&&x.add(c);return x},Q=t=>{if(t.coverage_status===void 0||["complete","not_applicable"].includes(t.coverage_status))return null;const r=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"}${r}`},ge=({history:t,methodName:r})=>{const[o,l]=P.useState(null),f=Math.max(1,...t.map(n=>n.paper_count)),g=E-u.left-u.right,x=I-u.top-u.bottom,c=t.length?g/t.length:g,_=Math.max(2,c*.68),d=ue(t.length,c),L=Array.from(new Set([0,Math.ceil(f/2),f])),m=o==null?null:t[o],v=m?Q(m):null;return e.jsxs("div",{className:"method-usage-chart-wrap",children:[e.jsxs("svg",{className:"method-usage-chart",viewBox:`0 0 ${E} ${I}`,role:"group","aria-label":`${r}: papers mentioning this method by publication month`,children:[e.jsxs("title",{children:[r,": papers mentioning this method by publication month"]}),L.map(n=>{const p=u.top+x-n/f*x;return e.jsxs("g",{children:[e.jsx("line",{className:"method-usage-gridline",x1:u.left,x2:E-u.right,y1:p,y2:p}),e.jsx("text",{className:"method-usage-y-label",x:u.left-8,y:p+3,textAnchor:"end",children:n})]},n)}),t.map((n,p)=>{const N=n.paper_count/f*x,w=n.paper_count>0?Math.max(1,N):0,F=u.left+c*p+(c-_)/2,a=u.top+x-w,S=o===p,k=p===t.length-1,b=Q(n);return e.jsxs("g",{className:`method-usage-bar${S?" is-active":""}${k?" is-current":""}`,tabIndex:0,role:"img","aria-label":`${T(n.start_date)}: ${n.paper_count} ${n.paper_count===1?"paper":"papers"}${b?`. ${b}`:""}`,onMouseEnter:()=>l(p),onMouseLeave:()=>l(null),onFocus:()=>l(p),onBlur:()=>l(null),children:[e.jsx("rect",{className:"method-usage-bar-hit",x:u.left+c*p,y:u.top,width:c,height:x}),e.jsx("rect",{className:"method-usage-bar-mark",x:F,y:a,width:_,height:w,rx:"1.5"})]},n.start_date)}),t.map((n,p)=>d.has(p)?e.jsx("text",{className:"method-usage-x-label",x:u.left+c*(p+.5),y:I-11,textAnchor:"middle",children:t.length>48?xe.format(new Date(`${n.start_date}T00:00:00Z`)):T(n.start_date)},n.start_date):null)]}),m&&e.jsxs("div",{className:"method-usage-tooltip",role:"status",children:[e.jsx("strong",{children:T(m.start_date)}),e.jsxs("span",{children:[m.paper_count," ",m.paper_count===1?"paper":"papers",o===t.length-1?" · month to date":""]}),e.jsxs("span",{children:[(m.catalog_share??0).toFixed(2),"% of"," ",(m.catalog_paper_count??0).toLocaleString()," catalog papers"]}),v&&e.jsx("span",{children:v})]})]})},fe=[["trending","trending"],["new","newest"],["cited","most cited"]],U={"on-policy-distillation":["fine-tuning","post-training","rlvr","rlhf","direct-preference-optimization-dpo"],mcp:["agent-skills"],"agent-skills":["mcp"]},Ee=()=>{var B,z,$,H,R,q;const{methodSlug:t}=G(),[r,o]=W(),[l,f]=P.useState("trending"),g=r.get("has_code")==="true",x=r.get("has_hf_artifacts")==="true",c=i=>{const h=new URLSearchParams(r);i?h.set("has_code","true"):h.delete("has_code"),o(h)},_=i=>{const h=new URLSearchParams(r);i?h.set("has_hf_artifacts","true"):h.delete("has_hf_artifacts"),o(h)},d=M({queryKey:["method",t],queryFn:()=>y.getMethod(t),enabled:!!t,staleTime:10*60*1e3}),L=M({queryKey:["areas-all"],queryFn:()=>y.getAreas({page_size:50,ordering:"name"}),enabled:!!((B=d.data)!=null&&B.area_id),staleTime:10*60*1e3}),m=M({queryKey:["method-trend",t],queryFn:()=>y.getMethodTrend(t),enabled:!!t&&!!d.data,staleTime:10*60*1e3}),v=l==="trending"?"trending":l==="cited"?"citation_count":"date_published",n=V({queryKey:["method-papers-infinite",t,v,g,x],queryFn:({pageParam:i=1})=>y.getMethodPapers(t,{page:i,page_size:20,order_by:v,order_dir:"desc",include_resources:!0,has_code:g,has_hf_artifacts:x}),getNextPageParam:i=>i.next_page,initialPageParam:1,enabled:!!t,staleTime:5*60*1e3,placeholderData:Z}),p=M({queryKey:["related-methods",(z=d.data)==null?void 0:z.slug,($=d.data)==null?void 0:$.area_id,(H=d.data)==null?void 0:H.id],queryFn:async()=>{const i=U[d.data.slug];return i?Promise.all(i.map(C=>y.getMethod(C))):(await y.getMethods({area_id:d.data.area_id,exclude_id:d.data.id,ordering:"-paper_count",page_size:8})).results},enabled:!!d.data&&(!!U[d.data.slug]||!!d.data.area_id),staleTime:10*60*1e3}),N=P.useMemo(()=>{var h;return(((h=n.data)==null?void 0:h.pages.flatMap(C=>C.results))||[]).map(ae)},[n.data]),{targetRef:w,isIntersecting:F}=J({rootMargin:"200px"});if(P.useEffect(()=>{F&&n.hasNextPage&&!n.isFetchingNextPage&&n.fetchNextPage()},[F,n.hasNextPage,n.isFetchingNextPage]),d.isLoading)return e.jsxs("div",{className:"page",children:[e.jsx(A,{className:"h-12 w-1/2 mb-4"}),e.jsx(A,{className:"h-64 w-full"})]});if(d.error||!d.data)return e.jsx("div",{className:"page",children:e.jsx(re,{variant:"destructive",children:e.jsx(ne,{children:"Method not found."})})});const a=d.data,S=(R=L.data)==null?void 0:R.results.find(i=>i.id===a.area_id),k=te(a.source_url),b=k?null:ie(a.source_url);return e.jsxs("div",{className:"page",children:[e.jsxs("div",{className:"breadcrumb",children:[e.jsx(D,{to:"/methods",children:"Methods"}),S&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"sep",children:"/"}),e.jsx(D,{to:`/methods#area-${se(S.name)}`,children:S.name})]}),e.jsx("span",{className:"sep",children:"/"}),e.jsx("span",{style:{color:"var(--ink)"},children:a.name})]}),e.jsxs("div",{className:`tag-hero method-hero-grid${a.slug==="grokking"||a.slug==="latent-reasoning"||a.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:a.name}),a.full_name&&a.full_name!==a.name&&e.jsx("div",{style:{fontFamily:"var(--serif)",fontSize:16,fontStyle:"italic",color:"var(--ink-soft)",marginTop:8},children:a.full_name}),a.description&&e.jsx(O,{className:"method-description",text:a.description}),a.source_url&&a.source_title&&e.jsxs("div",{className:"method-source",children:[e.jsx("span",{className:"method-source-label",children:"Source"}),k?e.jsxs(D,{className:"method-source-link",to:k,target:"_blank",rel:"noopener noreferrer",children:[e.jsx("span",{className:"method-source-title",children:a.source_title}),a.introduced_year&&e.jsx("span",{className:"method-source-meta",children:a.introduced_year})]}):b?e.jsxs("a",{className:"method-source-link",href:b,target:"_blank",rel:"noopener noreferrer",children:[e.jsx("span",{className:"method-source-title",children:a.source_title}),a.introduced_year&&e.jsx("span",{className:"method-source-meta",children:a.introduced_year})]}):e.jsxs("div",{className:"method-source-link is-static",children:[e.jsx("span",{className:"method-source-title",children:a.source_title}),a.introduced_year&&e.jsx("span",{className:"method-source-meta",children:a.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:(a.paper_count??0).toLocaleString()})]}),m.data&&e.jsxs("div",{className:"stat",children:[e.jsx("span",{className:"label",children:"Recent mentions"}),e.jsx("span",{className:"value",children:m.data.comparison_complete?e.jsxs(e.Fragment,{children:[m.data.trend_score.toFixed(1),e.jsx("small",{children:"/mo"})]}):"Pending"})]}),a.introduced_year!=null&&e.jsxs("div",{className:"stat",children:[e.jsx("span",{className:"label",children:"Introduced"}),e.jsx("span",{className:"value",children:a.introduced_year})]})]}),m.isLoading?e.jsx(A,{className:"h-36 w-full method-trend-skeleton"}):m.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:m.data.recent_paper_count}),e.jsxs("span",{children:["papers / ",m.data.recent_days,"d"]})]})]}),e.jsx(ge,{history:m.data.history,methodName:a.name})]}):null]}),e.jsxs("figure",{className:"method-figure-card",children:[e.jsx(he,{method:a}),a.image_credit&&e.jsx("figcaption",{children:e.jsx(O,{className:"method-image-credit",text:a.image_credit})})]})]}),(((q=p.data)==null?void 0:q.length)??0)>0&&e.jsxs("div",{className:"filter-row",children:[e.jsx("span",{className:"label",children:"Related methods"}),p.data.map(i=>e.jsx(X,{method:{slug:i.slug,name:i.name}},i.id))]}),e.jsxs("div",{className:"sort-bar",children:[e.jsxs("div",{className:"paper-feed-toolbar-controls",children:[e.jsx("div",{className:"sort-options",children:fe.map(([i,h])=>e.jsx("button",{className:`sort-btn ${l===i?"active":""}`,onClick:()=>f(i),children:h},i))}),e.jsx(ee,{hasCode:g,hasHfArtifacts:x,onHasCodeChange:c,onHasHfArtifactsChange:_})]}),e.jsxs("div",{className:"results-count",children:[N.length," papers mentioning ",a.name]})]}),n.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((i,h)=>e.jsx(A,{className:"h-40 w-full"},h))}):N.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:N.map((i,h)=>e.jsx(Y,{paper:i,rank:h+1},i.id))}),e.jsx("div",{ref:w,style:{height:1}}),n.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]})};export{Ee as default};
|
|
|
|
| 1 |
+
import{j as e,r as P,f as G,a as W,L as D,c as y,ap as Z}from"./index-DaC9z2lA.js";import{u as M}from"./useQuery-DaHFL0rL.js";import{u as V}from"./useInfiniteQuery-DaSt1eU8.js";import{M as X,P as Y}from"./components-C8eWDsbC.js";import{u as J,P as ee}from"./useIntersectionObserver-D9t6P4Le.js";import{r as te,M as O}from"./MarkdownText-CJyCKyp5.js";import{s as se}from"./slug-BpH-Nkvz.js";import{t as ae}from"./transform-By0Q02j6.js";import{S as A}from"./skeleton-DMsDaBre.js";import{A as re,a as ne}from"./alert-CEb_9u-E.js";import{s as ie}from"./safeExternalHref-CkBrsh84.js";import"./LatexTitle-C6bpusZm.js";import"./katex.min-BSBacQyE.js";import"./PaperPreviewLink-Bj5C7FQg.js";import"./index-CNBab3Wv.js";import"./hover-card-1A3Ph00K.js";const s={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:r,w:o,h:l,fill:f,stroke:g,label:x,fontSize:c=10,multiline:_})=>e.jsxs("g",{children:[e.jsx("rect",{x:t,y:r,width:o,height:l,rx:"3",ry:"3",fill:f,stroke:g,strokeWidth:"1"}),_?e.jsxs(e.Fragment,{children:[e.jsx("text",{x:t+o/2,y:r+l/2-2,fontSize:c,fontFamily:"var(--sans)",fill:s.ink,textAnchor:"middle",dominantBaseline:"middle",children:_[0]}),e.jsx("text",{x:t+o/2,y:r+l/2+c-1,fontSize:c,fontFamily:"var(--sans)",fill:s.ink,textAnchor:"middle",dominantBaseline:"middle",children:_[1]})]}):e.jsx("text",{x:t+o/2,y:r+l/2,fontSize:c,fontFamily:"var(--sans)",fill:s.ink,textAnchor:"middle",dominantBaseline:"middle",children:x})]}),le=()=>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:s.faint,textAnchor:"middle",children:"Scaled Dot-Product Attention"}),e.jsx(j,{x:140,y:40,w:80,h:26,fill:s.yellow,stroke:s.yellowS,label:"MatMul",fontSize:11}),e.jsx("path",{d:"M180 66 L180 80",stroke:s.ink}),e.jsx(j,{x:140,y:80,w:80,h:26,fill:s.green,stroke:s.greenS,label:"SoftMax",fontSize:11}),e.jsx("path",{d:"M180 106 L180 120",stroke:s.ink}),e.jsx(j,{x:140,y:120,w:80,h:26,fill:s.purple,stroke:s.purpleS,label:"Mask (opt.)",fontSize:11}),e.jsx("path",{d:"M180 146 L180 160",stroke:s.ink}),e.jsx(j,{x:140,y:160,w:80,h:26,fill:s.blue,stroke:s.blueS,label:"Scale ÷√dₖ",fontSize:11}),e.jsx("path",{d:"M180 186 L180 200",stroke:s.ink}),e.jsx(j,{x:140,y:200,w:80,h:26,fill:s.yellow,stroke:s.yellowS,label:"MatMul",fontSize:11}),e.jsx("path",{d:"M156 226 L120 270",stroke:s.ink}),e.jsx("path",{d:"M180 226 L180 270",stroke:s.ink}),e.jsx("path",{d:"M204 226 L240 270",stroke:s.ink}),e.jsx(j,{x:100,y:270,w:40,h:24,fill:s.pink,stroke:s.pinkS,label:"Q",fontSize:13}),e.jsx(j,{x:160,y:270,w:40,h:24,fill:s.pink,stroke:s.pinkS,label:"K",fontSize:13}),e.jsx(j,{x:220,y:270,w:40,h:24,fill:s.pink,stroke:s.pinkS,label:"V",fontSize:13}),e.jsxs("text",{x:"180",y:"330",fontSize:"14",fontFamily:"var(--serif)",fontStyle:"italic",fill:s.ink,textAnchor:"middle",children:["softmax(QK",e.jsx("tspan",{fontSize:"9",baselineShift:"super",children:"⊤"})," / √d) V"]})]}),oe=[["my-skill/",""],["├── SKILL.md","# Required: metadata + instructions"],["├── scripts/","# Optional: executable code"],["├── references/","# Optional: documentation"],["├── assets/","# Optional: templates, resources"],["└── ...","# Any additional files or directories"]],ce=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[e.jsx("text",{x:"180",y:"20",fontSize:"11",fontFamily:"var(--serif)",fontStyle:"italic",fill:s.faint,textAnchor:"middle",children:"Skill package layout"}),e.jsx("rect",{x:"28",y:"48",width:"304",height:"318",rx:"8",fill:"#FFFDF8",stroke:s.faint,strokeWidth:"1"}),oe.map(([t,r],o)=>{const l=92+o*44;return e.jsxs("g",{children:[e.jsx("text",{x:"44",y:l,fontSize:"11",fontFamily:"var(--mono)",fill:s.ink,dominantBaseline:"middle",children:t}),r?e.jsx("text",{x:"138",y:l,fontSize:"8.5",fontFamily:"var(--mono)",fill:s.faint,dominantBaseline:"middle",children:r}):null]},t)})]}),de={attention:le,"agent-skills":ce},me=({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:s.faint,textAnchor:"middle",children:t.name||"method"}),e.jsx(j,{x:80,y:70,w:200,h:50,fill:s.blue,stroke:s.blueS,label:"Input",fontSize:12}),e.jsx("path",{d:"M180 120 L180 150",stroke:s.ink}),e.jsx(j,{x:80,y:150,w:200,h:70,fill:s.orange,stroke:s.orangeS,label:t.name||"transform",fontSize:13}),e.jsx("path",{d:"M180 220 L180 250",stroke:s.ink}),e.jsx(j,{x:80,y:250,w:200,h:50,fill:s.purple,stroke:s.purpleS,label:"Output",fontSize:12})]}),he=({method:t})=>{const r=(t.slug||"").toLowerCase(),o=de[r];if(o)return e.jsx("div",{className:"method-figure-svg method-figure-svg--schematic",children:e.jsx(o,{})});if(t.image_url){const l=r==="transformer"||r==="gpt-4"||r==="gpt-4o"||r==="multi-head-attention"?" method-figure-svg--compact":r==="rpn"?" method-figure-svg--scaled-80":"";return e.jsx("div",{className:`method-figure-svg method-figure-svg--image${l}`,children:e.jsx("img",{className:"method-figure-img",src:t.image_url,alt:`${t.name} figure`})})}return e.jsx("div",{className:"method-figure-svg method-figure-svg--schematic",children:e.jsx(me,{method:t})})},E=720,I=138,u={top:8,right:10,bottom:25,left:36},K=56,pe=new Intl.DateTimeFormat("en",{month:"short",year:"2-digit",timeZone:"UTC"}),xe=new Intl.DateTimeFormat("en",{year:"numeric",timeZone:"UTC"}),T=t=>pe.format(new Date(`${t}T00:00:00Z`)),ue=(t,r)=>{if(t===0)return new Set;const o=t>48?12:t>36?6:t>18?3:2,l=Math.max(1,Math.ceil(K/r)),f=Math.max(o,l),g=t-1,x=new Set([0,g]);for(let c=f;c<g;c+=f)(g-c)*r>=K&&x.add(c);return x},Q=t=>{if(t.coverage_status===void 0||["complete","not_applicable"].includes(t.coverage_status))return null;const r=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"}${r}`},ge=({history:t,methodName:r})=>{const[o,l]=P.useState(null),f=Math.max(1,...t.map(n=>n.paper_count)),g=E-u.left-u.right,x=I-u.top-u.bottom,c=t.length?g/t.length:g,_=Math.max(2,c*.68),d=ue(t.length,c),L=Array.from(new Set([0,Math.ceil(f/2),f])),m=o==null?null:t[o],v=m?Q(m):null;return e.jsxs("div",{className:"method-usage-chart-wrap",children:[e.jsxs("svg",{className:"method-usage-chart",viewBox:`0 0 ${E} ${I}`,role:"group","aria-label":`${r}: papers mentioning this method by publication month`,children:[e.jsxs("title",{children:[r,": papers mentioning this method by publication month"]}),L.map(n=>{const p=u.top+x-n/f*x;return e.jsxs("g",{children:[e.jsx("line",{className:"method-usage-gridline",x1:u.left,x2:E-u.right,y1:p,y2:p}),e.jsx("text",{className:"method-usage-y-label",x:u.left-8,y:p+3,textAnchor:"end",children:n})]},n)}),t.map((n,p)=>{const N=n.paper_count/f*x,w=n.paper_count>0?Math.max(1,N):0,F=u.left+c*p+(c-_)/2,a=u.top+x-w,S=o===p,k=p===t.length-1,b=Q(n);return e.jsxs("g",{className:`method-usage-bar${S?" is-active":""}${k?" is-current":""}`,tabIndex:0,role:"img","aria-label":`${T(n.start_date)}: ${n.paper_count} ${n.paper_count===1?"paper":"papers"}${b?`. ${b}`:""}`,onMouseEnter:()=>l(p),onMouseLeave:()=>l(null),onFocus:()=>l(p),onBlur:()=>l(null),children:[e.jsx("rect",{className:"method-usage-bar-hit",x:u.left+c*p,y:u.top,width:c,height:x}),e.jsx("rect",{className:"method-usage-bar-mark",x:F,y:a,width:_,height:w,rx:"1.5"})]},n.start_date)}),t.map((n,p)=>d.has(p)?e.jsx("text",{className:"method-usage-x-label",x:u.left+c*(p+.5),y:I-11,textAnchor:"middle",children:t.length>48?xe.format(new Date(`${n.start_date}T00:00:00Z`)):T(n.start_date)},n.start_date):null)]}),m&&e.jsxs("div",{className:"method-usage-tooltip",role:"status",children:[e.jsx("strong",{children:T(m.start_date)}),e.jsxs("span",{children:[m.paper_count," ",m.paper_count===1?"paper":"papers",o===t.length-1?" · month to date":""]}),e.jsxs("span",{children:[(m.catalog_share??0).toFixed(2),"% of"," ",(m.catalog_paper_count??0).toLocaleString()," catalog papers"]}),v&&e.jsx("span",{children:v})]})]})},fe=[["trending","trending"],["new","newest"],["cited","most cited"]],U={"on-policy-distillation":["fine-tuning","post-training","rlvr","rlhf","direct-preference-optimization-dpo"],mcp:["agent-skills"],"agent-skills":["mcp"]},Ee=()=>{var B,z,$,H,R,q;const{methodSlug:t}=G(),[r,o]=W(),[l,f]=P.useState("trending"),g=r.get("has_code")==="true",x=r.get("has_hf_artifacts")==="true",c=i=>{const h=new URLSearchParams(r);i?h.set("has_code","true"):h.delete("has_code"),o(h)},_=i=>{const h=new URLSearchParams(r);i?h.set("has_hf_artifacts","true"):h.delete("has_hf_artifacts"),o(h)},d=M({queryKey:["method",t],queryFn:()=>y.getMethod(t),enabled:!!t,staleTime:10*60*1e3}),L=M({queryKey:["areas-all"],queryFn:()=>y.getAreas({page_size:50,ordering:"name"}),enabled:!!((B=d.data)!=null&&B.area_id),staleTime:10*60*1e3}),m=M({queryKey:["method-trend",t],queryFn:()=>y.getMethodTrend(t),enabled:!!t&&!!d.data,staleTime:10*60*1e3}),v=l==="trending"?"trending":l==="cited"?"citation_count":"date_published",n=V({queryKey:["method-papers-infinite",t,v,g,x],queryFn:({pageParam:i=1})=>y.getMethodPapers(t,{page:i,page_size:20,order_by:v,order_dir:"desc",include_resources:!0,has_code:g,has_hf_artifacts:x}),getNextPageParam:i=>i.next_page,initialPageParam:1,enabled:!!t,staleTime:5*60*1e3,placeholderData:Z}),p=M({queryKey:["related-methods",(z=d.data)==null?void 0:z.slug,($=d.data)==null?void 0:$.area_id,(H=d.data)==null?void 0:H.id],queryFn:async()=>{const i=U[d.data.slug];return i?Promise.all(i.map(C=>y.getMethod(C))):(await y.getMethods({area_id:d.data.area_id,exclude_id:d.data.id,ordering:"-paper_count",page_size:8})).results},enabled:!!d.data&&(!!U[d.data.slug]||!!d.data.area_id),staleTime:10*60*1e3}),N=P.useMemo(()=>{var h;return(((h=n.data)==null?void 0:h.pages.flatMap(C=>C.results))||[]).map(ae)},[n.data]),{targetRef:w,isIntersecting:F}=J({rootMargin:"200px"});if(P.useEffect(()=>{F&&n.hasNextPage&&!n.isFetchingNextPage&&n.fetchNextPage()},[F,n.hasNextPage,n.isFetchingNextPage]),d.isLoading)return e.jsxs("div",{className:"page",children:[e.jsx(A,{className:"h-12 w-1/2 mb-4"}),e.jsx(A,{className:"h-64 w-full"})]});if(d.error||!d.data)return e.jsx("div",{className:"page",children:e.jsx(re,{variant:"destructive",children:e.jsx(ne,{children:"Method not found."})})});const a=d.data,S=(R=L.data)==null?void 0:R.results.find(i=>i.id===a.area_id),k=te(a.source_url),b=k?null:ie(a.source_url);return e.jsxs("div",{className:"page",children:[e.jsxs("div",{className:"breadcrumb",children:[e.jsx(D,{to:"/methods",children:"Methods"}),S&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"sep",children:"/"}),e.jsx(D,{to:`/methods#area-${se(S.name)}`,children:S.name})]}),e.jsx("span",{className:"sep",children:"/"}),e.jsx("span",{style:{color:"var(--ink)"},children:a.name})]}),e.jsxs("div",{className:`tag-hero method-hero-grid${a.slug==="grokking"||a.slug==="latent-reasoning"||a.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:a.name}),a.full_name&&a.full_name!==a.name&&e.jsx("div",{style:{fontFamily:"var(--serif)",fontSize:16,fontStyle:"italic",color:"var(--ink-soft)",marginTop:8},children:a.full_name}),a.description&&e.jsx(O,{className:"method-description",text:a.description}),a.source_url&&a.source_title&&e.jsxs("div",{className:"method-source",children:[e.jsx("span",{className:"method-source-label",children:"Source"}),k?e.jsxs(D,{className:"method-source-link",to:k,target:"_blank",rel:"noopener noreferrer",children:[e.jsx("span",{className:"method-source-title",children:a.source_title}),a.introduced_year&&e.jsx("span",{className:"method-source-meta",children:a.introduced_year})]}):b?e.jsxs("a",{className:"method-source-link",href:b,target:"_blank",rel:"noopener noreferrer",children:[e.jsx("span",{className:"method-source-title",children:a.source_title}),a.introduced_year&&e.jsx("span",{className:"method-source-meta",children:a.introduced_year})]}):e.jsxs("div",{className:"method-source-link is-static",children:[e.jsx("span",{className:"method-source-title",children:a.source_title}),a.introduced_year&&e.jsx("span",{className:"method-source-meta",children:a.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:(a.paper_count??0).toLocaleString()})]}),m.data&&e.jsxs("div",{className:"stat",children:[e.jsx("span",{className:"label",children:"Recent mentions"}),e.jsx("span",{className:"value",children:m.data.comparison_complete?e.jsxs(e.Fragment,{children:[m.data.trend_score.toFixed(1),e.jsx("small",{children:"/mo"})]}):"Pending"})]}),a.introduced_year!=null&&e.jsxs("div",{className:"stat",children:[e.jsx("span",{className:"label",children:"Introduced"}),e.jsx("span",{className:"value",children:a.introduced_year})]})]}),m.isLoading?e.jsx(A,{className:"h-36 w-full method-trend-skeleton"}):m.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:m.data.recent_paper_count}),e.jsxs("span",{children:["papers / ",m.data.recent_days,"d"]})]})]}),e.jsx(ge,{history:m.data.history,methodName:a.name})]}):null]}),e.jsxs("figure",{className:"method-figure-card",children:[e.jsx(he,{method:a}),a.image_credit&&e.jsx("figcaption",{children:e.jsx(O,{className:"method-image-credit",text:a.image_credit})})]})]}),(((q=p.data)==null?void 0:q.length)??0)>0&&e.jsxs("div",{className:"filter-row",children:[e.jsx("span",{className:"label",children:"Related methods"}),p.data.map(i=>e.jsx(X,{method:{slug:i.slug,name:i.name}},i.id))]}),e.jsxs("div",{className:"sort-bar",children:[e.jsxs("div",{className:"paper-feed-toolbar-controls",children:[e.jsx("div",{className:"sort-options",children:fe.map(([i,h])=>e.jsx("button",{className:`sort-btn ${l===i?"active":""}`,onClick:()=>f(i),children:h},i))}),e.jsx(ee,{hasCode:g,hasHfArtifacts:x,onHasCodeChange:c,onHasHfArtifactsChange:_})]}),e.jsxs("div",{className:"results-count",children:[N.length," papers mentioning ",a.name]})]}),n.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((i,h)=>e.jsx(A,{className:"h-40 w-full"},h))}):N.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:N.map((i,h)=>e.jsx(Y,{paper:i,rank:h+1},i.id))}),e.jsx("div",{ref:w,style:{height:1}}),n.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]})};export{Ee as default};
|
assets/{MethodsIndexView-BcVtthMd.js → MethodsIndexView-DfbG_Yly.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
import{d as g,r as d,j as e,L as j,c as m}from"./index-
|
| 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 j,c as m}from"./index-DaC9z2lA.js";import{u as h}from"./useQuery-DaHFL0rL.js";import{s as f}from"./slug-BpH-Nkvz.js";import{S as p}from"./skeleton-DMsDaBre.js";import{A as y,a as v}from"./alert-CEb_9u-E.js";import{T as _}from"./TaxonomySuggestionTile-kyXt2mVa.js";import"./SignInToEditDialog-C3dp4YGN.js";import"./button-CjgOZ0_U.js";import"./textarea-BEZhS1Pc.js";import"./dialog-1gyncLM1.js";import"./useMutation-DIaWIhRQ.js";import"./loader-circle-C47w3weC.js";/**
|
| 2 |
* @license lucide-react v0.462.0 - ISC
|
| 3 |
*
|
| 4 |
* This source code is licensed under the ISC license.
|
assets/{NotFound-BaZxwGyO.js → NotFound-DLqR83St.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{aQ as o,r as a,j as t,L as s}from"./index-
|
|
|
|
| 1 |
+
import{aQ as o,r as a,j as t,L as s}from"./index-DaC9z2lA.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-C1bNEf2-.js → OrganizationContributionGraph-BGN6E-kG.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{r as b,j as o,c as z}from"./index-
|
|
|
|
| 1 |
+
import{r as b,j as o,c as z}from"./index-DaC9z2lA.js";import{u as T}from"./useQuery-DaHFL0rL.js";import{S as w}from"./skeleton-DMsDaBre.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,g)=>e-g),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 g=new Date(e),d=N(g),m=e>=r.getTime()&&e<=i.getTime(),C=m?p.get(d)??0:0;l.push({key:d,date:g,count:C,inRange:m,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(m=>m.inRange&&(e===0||m.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"})]})]})},k=({organizationSlug:n,organizationName:r})=>{const i=T({queryKey:["organization-contributions",n],queryFn:()=>z.getOrganizationContributions(n),staleTime:6e5});return i.isLoading?o.jsx(w,{className:"organization-contributions-skeleton"}):i.data?o.jsx(L,{data:i.data,organizationName:r}):null};export{L as C,k as O};
|
assets/OrganizationDetailView-CXHXpB3J.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
import{f as t,j as r}from"./index-DaC9z2lA.js";import{O as i}from"./OrganizationPaperFeed-2ccVRKtd.js";import m from"./NotFound-DLqR83St.js";import"./useQuery-DaHFL0rL.js";import"./components-C8eWDsbC.js";import"./LatexTitle-C6bpusZm.js";import"./katex.min-BSBacQyE.js";import"./transform-By0Q02j6.js";import"./safeExternalHref-CkBrsh84.js";import"./MarkdownText-CJyCKyp5.js";import"./PaperPreviewLink-Bj5C7FQg.js";import"./index-CNBab3Wv.js";import"./hover-card-1A3Ph00K.js";import"./OrganizationContributionGraph-BGN6E-kG.js";import"./skeleton-DMsDaBre.js";import"./useIntersectionObserver-D9t6P4Le.js";import"./alert-CEb_9u-E.js";import"./searchable-select-Dp0vpkXL.js";import"./button-CjgOZ0_U.js";import"./dialog-1gyncLM1.js";import"./loader-circle-C47w3weC.js";import"./usePapers-BQVvNLjC.js";import"./useInfiniteQuery-DaSt1eU8.js";const V=()=>{const{orgSlug:o}=t();return o?r.jsx(i,{organizationSlug:o}):r.jsx(m,{})};export{V as default};
|
assets/OrganizationDetailView-D4aakPO5.js
DELETED
|
@@ -1 +0,0 @@
|
|
| 1 |
-
import{f as t,j as r}from"./index-C7unMYuh.js";import{O as i}from"./OrganizationPaperFeed-B2CHUmpb.js";import m from"./NotFound-BaZxwGyO.js";import"./useQuery-CwZx3Xa-.js";import"./components-o6x7RW1I.js";import"./LatexTitle-DDjP6qv1.js";import"./katex.min-BSBacQyE.js";import"./transform-CSO4KHDB.js";import"./safeExternalHref-CkBrsh84.js";import"./MarkdownText-CsqI5M0J.js";import"./PaperPreviewLink-CGM7W6Oy.js";import"./index-CiStg-MU.js";import"./hover-card-Bdza16XA.js";import"./OrganizationContributionGraph-C1bNEf2-.js";import"./skeleton-wrT9EggK.js";import"./useIntersectionObserver-BzUI-y1K.js";import"./alert-B6VISE3o.js";import"./searchable-select-B0djBtTm.js";import"./button-BtDGjb5F.js";import"./dialog-DtoDAGsZ.js";import"./loader-circle-CVX003Mk.js";import"./usePapers-D-waihUh.js";import"./useInfiniteQuery-CdEhqhV5.js";const V=()=>{const{orgSlug:o}=t();return o?r.jsx(i,{organizationSlug:o}):r.jsx(m,{})};export{V as default};
|
|
|
|
|
|
assets/{OrganizationPaperFeed-B2CHUmpb.js → OrganizationPaperFeed-2ccVRKtd.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{u as E,a as Q,r as d,j as e,L as w,c as C}from"./index-
|
|
|
|
| 1 |
+
import{u as E,a as Q,r as d,j as e,L as w,c as C}from"./index-DaC9z2lA.js";import{u as A}from"./useQuery-DaHFL0rL.js";import{P as U}from"./components-C8eWDsbC.js";import{M as B}from"./MarkdownText-CJyCKyp5.js";import{O as G}from"./OrganizationContributionGraph-BGN6E-kG.js";import{u as K,P as W}from"./useIntersectionObserver-D9t6P4Le.js";import{A as D,a as Z}from"./alert-CEb_9u-E.js";import{a as z}from"./searchable-select-Dp0vpkXL.js";import{S as $}from"./skeleton-DMsDaBre.js";import{d as J}from"./usePapers-BQVvNLjC.js";import{d as T,t as V}from"./transform-By0Q02j6.js";import X from"./NotFound-DLqR83St.js";const Y=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],ee=n=>n==="date_published"||n==="citation_count"?n:"trending",me=({organizationSlug:n,taskSlug:p})=>{var N,y,v,P,L,F,k,O;const I=E(),[l,h]=Q(),[M,m]=d.useState(!1),u=ee(l.get("order_by")),g=l.get("has_code")==="true",f=l.get("has_hf_artifacts")==="true",_=A({queryKey:["organization",n],queryFn:()=>C.getOrganization(n),staleTime:10*60*1e3}),c=A({queryKey:["organization-areas-with-tasks",n],queryFn:()=>C.getOrganizationAreasWithTasks(n),staleTime:10*60*1e3}),i=J({organizationSlug:n,taskSlug:p,page_size:12,order_by:u,order_dir:"desc",include_resources:!0,has_code:g,has_hf_artifacts:f,enabled:!!n}),{targetRef:H,isIntersecting:x}=K({rootMargin:"200px"});d.useEffect(()=>{x&&i.hasNextPage&&!i.isFetchingNextPage&&i.fetchNextPage()},[x,i.hasNextPage,i.isFetchingNextPage]),d.useEffect(()=>{m(!1)},[n,p]);const j=d.useMemo(()=>{var a;return(((a=c.data)==null?void 0:a.results)??[]).flatMap(r=>r.tasks.filter(t=>!!t.slug).map(t=>({...t,slug:t.slug,label:T(t.name,t.slug)})))},[c.data]),o=j.find(a=>a.slug===p),b=d.useMemo(()=>{var a;return(((a=i.data)==null?void 0:a.pages)??[]).flatMap(r=>r.results.map(V))},[i.data]),s=_.data??((N=c.data)==null?void 0:N.organization),R=((v=(y=i.data)==null?void 0:y.pages[0])==null?void 0:v.count)??0;if(((P=_.error)==null?void 0:P.status)===404||((L=c.error)==null?void 0:L.status)===404||((F=i.error)==null?void 0:F.status)===404)return e.jsx(X,{});if(c.error||i.error)return e.jsx("div",{className:"page",children:e.jsx(D,{variant:"destructive",children:e.jsx(Z,{children:"Failed to load organization papers. Please try again."})})});const q=a=>{const r=a.trim().toLocaleLowerCase();return j.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"}`}))},S=a=>{const r=a==="__all__"?`/orgs/${n}`:`/orgs/${n}/${a}`,t=l.toString();I({pathname:r,search:t?`?${t}`:""})};return e.jsxs("div",{className:"page",children:[e.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[e.jsx(w,{to:"/",children:"Home"}),e.jsx("span",{children:" / "}),e.jsx(w,{to:"/organizations",children:"Organizations"}),e.jsx("span",{children:" / "}),e.jsx("span",{children:(s==null?void 0:s.name)??n}),o&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:" / "}),e.jsx("span",{children:T(o.name,o.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:[s!=null&&s.logo_url&&!M?e.jsx("img",{src:s.logo_url,alt:"",width:58,height:58,onError:()=>m(!0)}):s?e.jsx("span",{className:"organization-logo organization-logo--fallback","aria-hidden":"true",children:s.name.slice(0,1).toUpperCase()}):null,(s==null?void 0:s.name)??e.jsx($,{className:"h-12 w-64"})]}),s&&e.jsxs("div",{className:"feed-subtitle",children:[((k=s.paper_count)==null?void 0:k.toLocaleString())??0," papers",(s.organization_trending_score??0)>0&&s.trending_rank&&e.jsxs(e.Fragment,{children:[" · #",s.trending_rank," trending this month"]})]}),(s==null?void 0:s.description)&&e.jsx(B,{className:"method-description",text:s.description}),s&&e.jsxs("div",{className:"organization-hero-links",children:[s.website_url&&e.jsx("a",{href:s.website_url,target:"_blank",rel:"noreferrer",children:"Website ↗"}),s.hf_url&&e.jsx("a",{href:s.hf_url,target:"_blank",rel:"noreferrer",children:"Hugging Face ↗"}),s.github_url&&e.jsx("a",{href:s.github_url,target:"_blank",rel:"noreferrer",children:"GitHub ↗"})]})]}),s&&e.jsx(G,{organizationSlug:n,organizationName:s.name})]}),e.jsxs("div",{className:"sort-bar",style:{alignItems:"center",gap:16},children:[e.jsx("div",{style:{minWidth:260},children:e.jsx(z,{value:p??"__all__",onChange:S,placeholder:"All tasks",searchPlaceholder:"Search organization tasks...",emptyMessage:"No matching tasks.",ariaLabel:"Filter papers by task",selectedOption:o?{value:o.slug,label:o.label,description:`${o.paper_count.toLocaleString()} ${o.paper_count===1?"paper":"papers"}`}:{value:"__all__",label:"All tasks",description:`${((O=s==null?void 0:s.paper_count)==null?void 0:O.toLocaleString())??0} papers`},queryKey:["organization-task-options",n],queryFn:async a=>{var r;return[{value:"__all__",label:"All tasks",description:`${((r=s==null?void 0:s.paper_count)==null?void 0:r.toLocaleString())??0} papers`},...q(a)]},enabled:!c.isLoading,className:"h-[38px]"})}),e.jsxs("div",{className:"paper-feed-toolbar-controls",children:[e.jsx("div",{className:"sort-options",children:Y.map(([a,r])=>e.jsx("button",{type:"button",className:`sort-btn ${u===a?"active":""}`,onClick:()=>{const t=new URLSearchParams(l);a==="trending"?t.delete("order_by"):t.set("order_by",a),h(t)},children:r},a))}),e.jsx(W,{hasCode:g,hasHfArtifacts:f,onHasCodeChange:a=>{const r=new URLSearchParams(l);a?r.set("has_code","true"):r.delete("has_code"),h(r)},onHasHfArtifactsChange:a=>{const r=new URLSearchParams(l);a?r.set("has_hf_artifacts","true"):r.delete("has_hf_artifacts"),h(r)}})]}),e.jsxs("div",{className:"results-count",children:[R.toLocaleString()," papers"]})]}),i.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((a,r)=>e.jsx($,{className:"h-40 w-full"},r))}):b.length===0?e.jsx("div",{className:"no-results",children:(s==null?void 0:s.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:b.map((a,r)=>e.jsx(U,{paper:a,rank:r+1,showInstitution:!1},a.id))}),e.jsx("div",{ref:H,style:{height:1}}),i.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center"},children:"Loading more…"})]})]})};export{me as O};
|
assets/OrganizationTaskView-Dk93NM4-.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
import{f as i,j as t}from"./index-DaC9z2lA.js";import{O as m}from"./OrganizationPaperFeed-2ccVRKtd.js";import p from"./NotFound-DLqR83St.js";import"./useQuery-DaHFL0rL.js";import"./components-C8eWDsbC.js";import"./LatexTitle-C6bpusZm.js";import"./katex.min-BSBacQyE.js";import"./transform-By0Q02j6.js";import"./safeExternalHref-CkBrsh84.js";import"./MarkdownText-CJyCKyp5.js";import"./PaperPreviewLink-Bj5C7FQg.js";import"./index-CNBab3Wv.js";import"./hover-card-1A3Ph00K.js";import"./OrganizationContributionGraph-BGN6E-kG.js";import"./skeleton-DMsDaBre.js";import"./useIntersectionObserver-D9t6P4Le.js";import"./alert-CEb_9u-E.js";import"./searchable-select-Dp0vpkXL.js";import"./button-CjgOZ0_U.js";import"./dialog-1gyncLM1.js";import"./loader-circle-C47w3weC.js";import"./usePapers-BQVvNLjC.js";import"./useInfiniteQuery-DaSt1eU8.js";const V=()=>{const{orgSlug:o,taskSlug:r}=i();return o&&r?t.jsx(m,{organizationSlug:o,taskSlug:r}):t.jsx(p,{})};export{V as default};
|
assets/OrganizationTaskView-PPqqmwjz.js
DELETED
|
@@ -1 +0,0 @@
|
|
| 1 |
-
import{f as i,j as t}from"./index-C7unMYuh.js";import{O as m}from"./OrganizationPaperFeed-B2CHUmpb.js";import p from"./NotFound-BaZxwGyO.js";import"./useQuery-CwZx3Xa-.js";import"./components-o6x7RW1I.js";import"./LatexTitle-DDjP6qv1.js";import"./katex.min-BSBacQyE.js";import"./transform-CSO4KHDB.js";import"./safeExternalHref-CkBrsh84.js";import"./MarkdownText-CsqI5M0J.js";import"./PaperPreviewLink-CGM7W6Oy.js";import"./index-CiStg-MU.js";import"./hover-card-Bdza16XA.js";import"./OrganizationContributionGraph-C1bNEf2-.js";import"./skeleton-wrT9EggK.js";import"./useIntersectionObserver-BzUI-y1K.js";import"./alert-B6VISE3o.js";import"./searchable-select-B0djBtTm.js";import"./button-BtDGjb5F.js";import"./dialog-DtoDAGsZ.js";import"./loader-circle-CVX003Mk.js";import"./usePapers-D-waihUh.js";import"./useInfiniteQuery-CdEhqhV5.js";const V=()=>{const{orgSlug:o,taskSlug:r}=i();return o&&r?t.jsx(m,{organizationSlug:o,taskSlug:r}):t.jsx(p,{})};export{V as default};
|
|
|
|
|
|
assets/{OrganizationsIndexView-DdW5gXNf.js → OrganizationsIndexView-CnPxrbtB.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{a as u,r as g,j as e,L as x,c as j}from"./index-
|
|
|
|
| 1 |
+
import{a as u,r as g,j as e,L as x,c as j}from"./index-DaC9z2lA.js";import{u as y}from"./useQuery-DaHFL0rL.js";import{A as f,a as _}from"./alert-CEb_9u-E.js";import{S as N}from"./skeleton-DMsDaBre.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)})})},z=()=>{var h;const[n,d]=u(),t=v(n.get("sort")),c=n.get("q")??"",l=y({queryKey:["organizations","featured"],queryFn:()=>j.getOrganizations(!0),staleTime:10*60*1e3}),p=s=>{const a=new URLSearchParams(n),i=s.sort??t,r=s.query??c;i==="trending"?a.delete("sort"):a.set("sort",i),r.trim()?a.set("q",r):a.delete("q"),d(a)},m=g.useMemo(()=>{var i;const s=c.trim().toLocaleLowerCase(),a=(((i=l.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,o)=>(o.paper_count??0)-(r.paper_count??0)||r.name.localeCompare(o.name)||r.slug.localeCompare(o.slug)):t==="name"?[...a].sort((r,o)=>r.name.localeCompare(o.name)||r.slug.localeCompare(o.slug)):a},[l.data,c,t]);return e.jsxs("div",{className:"page organizations-page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["AI ",e.jsx("em",{children:"Organizations"})]}),e.jsx("div",{className:"feed-subtitle",children:"Explore papers from 21 leading AI organizations, ranked by sustained community momentum over the past 30 days."})]})}),e.jsxs("section",{"aria-labelledby":"organizations-heading",children:[e.jsxs("div",{className:"organizations-section-heading",children:[e.jsxs("h2",{id:"organizations-heading",children:[((h=l.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))})]}),l.isLoading?e.jsx("div",{className:"organizations-grid","aria-busy":"true",children:Array.from({length:6}).map((s,a)=>e.jsx(N,{className:"organization-card-skeleton"},a))}):l.error?e.jsx(f,{variant:"destructive",children:e.jsxs(_,{children:["Failed to load organizations."," ",e.jsx("button",{type:"button",onClick:()=>l.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{z as default};
|
assets/{PaperDetailView-DS4g-8pa.js → PaperDetailView-DCH8IJ0V.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
import{d as Nt,m as la,r as h,j as e,P as fs,n as _e,o as gs,p as Ue,q as Te,s as xs,t as Ct,C as je,v as Je,k as he,h as pe,X as Et,w as ve,x as ca,y as bs,z as da,B as ua,D as ma,E as ha,F as pa,G as ss,H as fa,I as ga,J as xa,K as ba,M as ja,g as We,R as Xe,A as jt,c as re,N as js,e as vs,O as va,Q as ya,S as _a,T as ys,U as ka,V as wa,W as Na,Y as Ca,f as Ea,Z as Sa,u as Ia,_ as Pa,L as xe,$ as $a,a0 as Aa,a1 as Ra,a2 as Fa,a3 as Ta,a4 as La,a5 as Ua}from"./index-
|
| 2 |
* @license lucide-react v0.462.0 - ISC
|
| 3 |
*
|
| 4 |
* This source code is licensed under the ISC license.
|
|
|
|
| 1 |
+
import{d as Nt,m as la,r as h,j as e,P as fs,n as _e,o as gs,p as Ue,q as Te,s as xs,t as Ct,C as je,v as Je,k as he,h as pe,X as Et,w as ve,x as ca,y as bs,z as da,B as ua,D as ma,E as ha,F as pa,G as ss,H as fa,I as ga,J as xa,K as ba,M as ja,g as We,R as Xe,A as jt,c as re,N as js,e as vs,O as va,Q as ya,S as _a,T as ys,U as ka,V as wa,W as Na,Y as Ca,f as Ea,Z as Sa,u as Ia,_ as Pa,L as xe,$ as $a,a0 as Aa,a1 as Ra,a2 as Fa,a3 as Ta,a4 as La,a5 as Ua}from"./index-DaC9z2lA.js";import{u as ne}from"./useQuery-DaHFL0rL.js";import{I as J,S as Da,a as Ba,T as Ha,M as Ma}from"./components-C8eWDsbC.js";import{C as za,E as qa}from"./ExternalSourceEvalBadge-hiSahiUS.js";import{L as qe,a as Oa}from"./LatexTitle-C6bpusZm.js";import{s as Ka}from"./transform-By0Q02j6.js";import{f as Ga,D as Qa}from"./latexPlainText-DI8YEXVe.js";import{a as Va}from"./usePapers-BQVvNLjC.js";import{S as Re}from"./skeleton-DMsDaBre.js";import{A as Ja,a as Xa}from"./alert-CEb_9u-E.js";import{B as H}from"./button-CjgOZ0_U.js";import{u as _s}from"./index-BPU7_n66.js";import{I as Z}from"./textarea-BEZhS1Pc.js";import{D as oe,a as le,b as ce,c as de,d as ue,e as me}from"./dialog-1gyncLM1.js";import{u as fe}from"./useMutation-DIaWIhRQ.js";import{S as St,P as Ye,L as ae,a as Wa}from"./SignInToEditDialog-C3dp4YGN.js";import{S as Le,a as as}from"./searchable-select-Dp0vpkXL.js";import{L as ie}from"./loader-circle-C47w3weC.js";import{B as ks,D as Ya,c as Za,g as er,s as tr,a as sr,b as ar,d as rr,i as nr,e as ir}from"./codexAddEvals-C1rXVNOh.js";import{n as ot,g as rs}from"./github-C5WYivP7.js";import{G as ns}from"./github-B5o86F5s.js";import{S as is,s as or}from"./savedPapersAuth-DMg-8mUt.js";import{M as lr,r as cr}from"./index-CNBab3Wv.js";import{s as Ne}from"./safeExternalHref-CkBrsh84.js";import"./hover-card-1A3Ph00K.js";import"./katex.min-BSBacQyE.js";import"./useInfiniteQuery-DaSt1eU8.js";/**
|
| 2 |
* @license lucide-react v0.462.0 - ISC
|
| 3 |
*
|
| 4 |
* This source code is licensed under the ISC license.
|
assets/{PaperPreviewLink-CGM7W6Oy.js → PaperPreviewLink-Bj5C7FQg.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
import{o as F,l as ne,f as v,m as b,a as re,p as I,b as $,n as L,h as ie,s as ae,c as oe,v as se,S as le}from"./index-
|
| 2 |
`,inConstruct:"mathFlowMeta"},{character:"$",after:t?void 0:"\\$",inConstruct:"phrasing"},{character:"$",inConstruct:"mathFlowMeta"},{atBreak:!0,character:"$",after:"\\$"}],handlers:{math:n,inlineMath:r}};function n(o,s,l,a){const u=o.value||"",p=l.createTracker(a),m="$".repeat(Math.max(ne(u,"$")+1,2)),g=l.enter("mathFlow");let x=p.move(m);if(o.meta){const d=l.enter("mathFlowMeta");x+=p.move(l.safe(o.meta,{after:`
|
| 3 |
`,before:x,encode:["$"],...p.current()})),d()}return x+=p.move(`
|
| 4 |
`),u&&(x+=p.move(u+`
|
|
|
|
| 1 |
+
import{o as F,l as ne,f as v,m as b,a as re,p as I,b as $,n as L,h as ie,s as ae,c as oe,v as se,S as le}from"./index-CNBab3Wv.js";import{k as z}from"./katex.min-BSBacQyE.js";import{j as f,R as T,a3 as ce,Z as ue,L as he,aq as pe}from"./index-DaC9z2lA.js";import{u as me}from"./useQuery-DaHFL0rL.js";import{H as fe,a as de,b as ge}from"./hover-card-1A3Ph00K.js";function xe(){return{enter:{mathFlow:e,mathFlowFenceMeta:t,mathText:o},exit:{mathFlow:i,mathFlowFence:r,mathFlowFenceMeta:n,mathFlowValue:l,mathText:s,mathTextData:l}};function e(a){const u={type:"element",tagName:"code",properties:{className:["language-math","math-display"]},children:[]};this.enter({type:"math",meta:null,value:"",data:{hName:"pre",hChildren:[u]}},a)}function t(){this.buffer()}function n(){const a=this.resume(),u=this.stack[this.stack.length-1];F(u.type==="math"),u.meta=a}function r(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)}function i(a){const u=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),p=this.stack[this.stack.length-1];F(p.type==="math"),this.exit(a),p.value=u;const m=p.data.hChildren[0];F(m.type==="element"),F(m.tagName==="code"),m.children.push({type:"text",value:u}),this.data.mathFlowInside=void 0}function o(a){this.enter({type:"inlineMath",value:"",data:{hName:"code",hProperties:{className:["language-math","math-inline"]},hChildren:[]}},a),this.buffer()}function s(a){const u=this.resume(),p=this.stack[this.stack.length-1];F(p.type==="inlineMath"),this.exit(a),p.value=u,p.data.hChildren.push({type:"text",value:u})}function l(a){this.config.enter.data.call(this,a),this.config.exit.data.call(this,a)}}function ye(e){let t=(e||{}).singleDollarTextMath;return t==null&&(t=!0),r.peek=i,{unsafe:[{character:"\r",inConstruct:"mathFlowMeta"},{character:`
|
| 2 |
`,inConstruct:"mathFlowMeta"},{character:"$",after:t?void 0:"\\$",inConstruct:"phrasing"},{character:"$",inConstruct:"mathFlowMeta"},{atBreak:!0,character:"$",after:"\\$"}],handlers:{math:n,inlineMath:r}};function n(o,s,l,a){const u=o.value||"",p=l.createTracker(a),m="$".repeat(Math.max(ne(u,"$")+1,2)),g=l.enter("mathFlow");let x=p.move(m);if(o.meta){const d=l.enter("mathFlowMeta");x+=p.move(l.safe(o.meta,{after:`
|
| 3 |
`,before:x,encode:["$"],...p.current()})),d()}return x+=p.move(`
|
| 4 |
`),u&&(x+=p.move(u+`
|
assets/{PapersListView-Ddb7LWCa.js → PapersListView-DQc01mn9.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{a as q,r as m,A as z,j as e,L as x,c as G}from"./index-
|
|
|
|
| 1 |
+
import{a as q,r as m,A as z,j as e,L as x,c as G}from"./index-DaC9z2lA.js";import{I as E,T as Q,P as U}from"./components-C8eWDsbC.js";import{t as W,d as K}from"./transform-By0Q02j6.js";import{u as V}from"./usePapers-BQVvNLjC.js";import{u as J}from"./useDebounce-B9SirLCm.js";import{P as X}from"./usePeriodFilter-Dhr6WGmC.js";import{u as Y,P as Z}from"./useIntersectionObserver-D9t6P4Le.js";import{S as p}from"./skeleton-DMsDaBre.js";import{A as ee,a as se}from"./alert-CEb_9u-E.js";import{u as ae}from"./useQuery-DaHFL0rL.js";import"./LatexTitle-C6bpusZm.js";import"./katex.min-BSBacQyE.js";import"./safeExternalHref-CkBrsh84.js";import"./useInfiniteQuery-DaSt1eU8.js";const re=[["trending","trending"],["new","newest"],["cited","most cited"]],te=r=>new Intl.NumberFormat("en",{notation:r>=1e3?"compact":"standard",maximumFractionDigits:1}).format(r),ve=()=>{var T,C,A,I,L,R,H;const[r,_]=q(),h=r.get("framework")||void 0,g=r.get("repository")||void 0,n=!!(h||g),u=r.get("search")||"",[b,k]=m.useState(u),l=J(b,300);m.useEffect(()=>k(u),[u]),m.useEffect(()=>{if(l===u)return;const s=new URLSearchParams(r);l?s.set("search",l):s.delete("search"),_(s,{replace:!0})},[l]);const j=r.get("order_by"),N=j==="citation_count"?"cited":j==="trending"||!j&&n?"trending":"new",o=r.get("time"),$=o==="today"?"Today":o==="week"?"This Week":o==="month"?"This Month":"All Time",y=r.get("has_hf_artifacts")==="true",w=!n&&r.get("has_code")==="true",f=(s,i)=>{const d=new URLSearchParams(r);i?d.set(s,i):d.delete(s),_(d)},B=s=>{f("time",s==="Today"?"today":s==="This Week"?"week":s==="This Month"?"month":void 0)},D=s=>{f("order_by",s==="cited"?"citation_count":s==="new"?"date_published":"trending")},t=V({page_size:20,order_by:N==="trending"?"trending":N==="cited"?"citation_count":"date_published",order_dir:"desc",search:l||void 0,time:o==="today"||o==="week"||o==="month"?o:"all_time",include_resources:!0,published_after:r.get("published_after")||void 0,published_before:r.get("published_before")||void 0,conference:r.get("conference")||void 0,latest_only:r.get("latest_only")!=="false",has_code:w,has_hf_artifacts:y,framework:h,repository:g}),P=ae({queryKey:["top-tasks-sidebar"],queryFn:()=>G.getTopTasks({limit:8}),enabled:!n,staleTime:10*60*1e3}),v=m.useMemo(()=>{var i;return(((i=t.data)==null?void 0:i.pages.flatMap(d=>d.results))||[]).map(W)},[t.data]),{targetRef:O,isIntersecting:F}=Y({rootMargin:"200px"});m.useEffect(()=>{F&&t.hasNextPage&&!t.isFetchingNextPage&&t.fetchNextPage()},[F,t.hasNextPage,t.isFetchingNextPage]);const c=((A=(C=(T=t.data)==null?void 0:T.pages)==null?void 0:C[0])==null?void 0:A.count)??0,a=(R=(L=(I=t.data)==null?void 0:I.pages)==null?void 0:L[0])==null?void 0:R.scope,S=h&&t.error instanceof z&&t.error.status===404,M=(a==null?void 0:a.kind)==="framework"?a.framework_name:a==null?void 0:a.repository;return e.jsxs("div",{className:"page",children:[(a==null?void 0:a.kind)==="framework"&&e.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[e.jsx(x,{to:"/",children:"Papers"}),e.jsx("span",{className:"sep",children:"/"}),e.jsx(x,{to:"/frameworks",children:"Frameworks"}),e.jsx("span",{className:"sep",children:"/"}),e.jsx("span",{style:{color:"var(--ink)"},children:a.framework_name})]}),e.jsxs("div",{className:"feed-header",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"feed-title",children:n?e.jsxs(e.Fragment,{children:["Papers implemented by ",e.jsx("em",{children:M||h||g})]}):e.jsxs(e.Fragment,{children:["All ",e.jsx("em",{children:"Papers"})]})}),e.jsx("div",{className:"feed-subtitle",children:n?(a==null?void 0:a.kind)==="framework"?c>0&&`${c.toLocaleString()} papers.`:a!=null&&a.repository?e.jsxs(e.Fragment,{children:["GitHub repository ",e.jsx("strong",{children:a.repository}),". ",c>0&&`${c.toLocaleString()} papers.`]}):"Repository-scoped paper feed.":e.jsxs(e.Fragment,{children:["Search the full corpus. ",c>0&&`${c.toLocaleString()} papers indexed.`]})}),n&&a&&e.jsxs("div",{className:"paper-feed-scope-links",children:[e.jsxs("div",{className:"paper-feed-primary-links",children:[a.github_url&&e.jsxs("a",{href:a.github_url,target:"_blank",rel:"noopener noreferrer",className:a.kind==="framework"?"task-framework-link":"framework-link",children:[e.jsx(E,{name:"github",size:13}),a.kind==="framework"?e.jsxs(e.Fragment,{children:[e.jsx("span",{children:a.repository||"GitHub"}),a.num_stars!=null&&e.jsxs("span",{className:"task-framework-link-stars",children:["★ ",te(a.num_stars)]})]}):"GitHub"]}),a.kind==="framework"&&a.introducing_paper_arxiv_id&&e.jsx(x,{to:`/paper/${a.introducing_paper_arxiv_id}`,className:"framework-link",children:"Introducing paper"})]}),a.kind==="framework"&&a.recommended_tasks&&a.recommended_tasks.length>0&&e.jsx("div",{className:"paper-feed-task-tags",children:a.recommended_tasks.map(s=>s.slug?e.jsx(Q,{slug:s.slug,label:s.name},s.id):null)})]})]}),e.jsx("div",{className:"period-switch",children:X.map(s=>e.jsx("button",{className:`period-btn ${$===s?"active":""}`,onClick:()=>B(s),children:s},s))})]}),e.jsx("div",{className:"papers-search-row",children:e.jsxs("div",{className:"papers-search-input-wrap",children:[e.jsx(E,{name:"search",size:14}),e.jsx("input",{className:"papers-search-input",placeholder:"Search title or abstract…",value:b,onChange:s=>k(s.target.value)})]})}),e.jsxs("div",{className:n?"papers-feed-layout-scoped":"layout-with-sidebar",children:[!n&&e.jsx("aside",{className:"sidebar",children:e.jsxs("div",{className:"sidebar-section",children:[e.jsx("div",{className:"sidebar-label",children:"Top Domains"}),P.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((s,i)=>e.jsx(p,{className:"h-5 w-full"},i))}),(H=P.data)==null?void 0:H.map(s=>e.jsxs(x,{to:`/tasks/${s.slug}`,className:"sidebar-link",children:[K(s.name,s.slug),s.paper_count!=null&&e.jsx("span",{className:"count",children:s.paper_count})]},s.id))]})}),e.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:re.map(([s,i])=>e.jsx("button",{className:`sort-btn ${N===s?"active":""}`,onClick:()=>D(s),children:i},s))}),e.jsx(Z,{hasCode:w,hasHfArtifacts:y,onHasCodeChange:s=>f("has_code",s?"true":void 0),onHasHfArtifactsChange:s=>f("has_hf_artifacts",s?"true":void 0),showHasCode:!n})]}),e.jsxs("div",{className:"results-count",children:[v.length," loaded"]})]}),S?e.jsx("div",{className:"no-results",children:"Framework not found."}):t.error&&e.jsx(ee,{variant:"destructive",className:"mb-4",children:e.jsx(se,{children:"Failed to load papers. Please try again."})}),!S&&(t.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:6}).map((s,i)=>e.jsxs("div",{className:"paper-card",children:[e.jsx(p,{className:"h-[220px] w-[160px]"}),e.jsxs("div",{className:"paper-body",style:{flex:1,gap:12},children:[e.jsx(p,{className:"h-6 w-3/4"}),e.jsx(p,{className:"h-4 w-1/2"}),e.jsx(p,{className:"h-12 w-full"})]})]},i))}):v.length===0?e.jsx("div",{className:"no-results",children:"No matching papers."}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:v.map((s,i)=>e.jsx(U,{paper:s,rank:i+1},s.id))}),e.jsx("div",{ref:O,style:{height:1}}),t.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]}))]})]})]})};export{ve as default};
|
assets/{PrivacyView-DDLtdOSI.js → PrivacyView-PvlIkKNe.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{R as s,j as e}from"./index-
|
|
|
|
| 1 |
+
import{R as s,j as e}from"./index-DaC9z2lA.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-CJ3t0FqM.js → RateLimitsView-DlcTamGX.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{j as e,e as s}from"./index-
|
|
|
|
| 1 |
+
import{j as e,e as s}from"./index-DaC9z2lA.js";import{u as r}from"./useQuery-DaHFL0rL.js";const c=()=>{const i=r({queryKey:["submission-rate-limit-policy"],queryFn:async()=>{const t=await fetch(s("/api/v1/rate-limits"));if(!t.ok)throw new Error("Policy unavailable");return t.json()}}).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{c as default};
|
assets/{SavedPapersView-Ae-ENn8t.js → SavedPapersView-Bue03GOt.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{g as h,A as g,j as e,ab as v,L as x,c as j}from"./index-
|
|
|
|
| 1 |
+
import{g as h,A as g,j as e,ab as v,L as x,c as j}from"./index-DaC9z2lA.js";import{u as b}from"./useQuery-DaHFL0rL.js";import{T as N,P as f}from"./components-C8eWDsbC.js";import{S as r}from"./skeleton-DMsDaBre.js";import{A as k,a as y}from"./alert-CEb_9u-E.js";import{t as w}from"./transform-By0Q02j6.js";import{s as A}from"./savedPapersAuth-DMg-8mUt.js";import"./LatexTitle-C6bpusZm.js";import"./katex.min-BSBacQyE.js";import"./safeExternalHref-CkBrsh84.js";const T=()=>{var d,o;const{user:t,isLoading:u}=h(),a=b({queryKey:["my-bookmarks"],queryFn:()=>j.getMyBookmarks(),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(N,{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{T as default};
|
assets/{SearchOverlay-BGRpRMSP.js → SearchOverlay-DkT7Ygym.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{r as C,u as L,R as T,i as $,j as s,c as m}from"./index-
|
|
|
|
| 1 |
+
import{r as C,u as L,R as T,i as $,j as s,c as m}from"./index-DaC9z2lA.js";import{u as p}from"./useQuery-DaHFL0rL.js";import{L as A}from"./LatexTitle-C6bpusZm.js";import{u as D}from"./useDebounce-B9SirLCm.js";import{c as z,h as M,d as B}from"./transform-By0Q02j6.js";import"./katex.min-BSBacQyE.js";const I=10,H=({open:n,onClose:l})=>{var f,_,F,q,E,P;const v=C.useRef(null),w=L(),[c,R]=T.useState(""),[h,g]=T.useState(1),a=D(c,200),x=$();C.useEffect(()=>{var r;if(!n)return;(r=v.current)==null||r.focus();const e=K=>{K.key==="Escape"&&l()};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[n,l]);const t=p({queryKey:["search-papers",a,h],queryFn:()=>m.searchPapers(a,h,I),enabled:n&&a.length>=2,staleTime:6e4}),k=p({queryKey:["search-tasks",a],queryFn:()=>m.getTasks({q:a,page_size:6}),enabled:n&&a.length>=2,staleTime:6e4}),y=p({queryKey:["search-methods",a],queryFn:()=>m.getMethods({q:a,page_size:6}),enabled:n&&a.length>=2,staleTime:6e4}),N=p({queryKey:["search-benchmarks",a],queryFn:()=>m.getDatasets({q:a,page_size:6}),enabled:n&&a.length>=2,staleTime:6e4});if(!n)return null;const o=((f=k.data)==null?void 0:f.results)||[],d=((_=y.data)==null?void 0:_.results)||[],u=((F=N.data)==null?void 0:F.results)||[],j=((q=t.data)==null?void 0:q.results)||[],Q=t.isFetching||k.isFetching||y.isFetching||N.isFetching,S=o.length||j.length||d.length||u.length,i=e=>{l(),w(e)},b=()=>{const e=c.trim();e&&i(`/chat?q=${encodeURIComponent(e)}`)};return s.jsx("div",{className:"search-overlay",onClick:l,children:s.jsxs("div",{className:"search-modal",onClick:e=>e.stopPropagation(),children:[s.jsx("input",{ref:v,className:"search-modal-input",placeholder:"Search papers, tasks, methods, or benchmarks…",value:c,onChange:e=>{R(e.target.value),g(1)},onKeyDown:e=>{x&&e.key==="Enter"&&(e.preventDefault(),b())}}),s.jsxs("div",{className:"search-results",children:[x&&c.trim()&&s.jsxs("button",{type:"button",className:"search-ask-row",onClick:b,children:[s.jsx("span",{className:"search-ask-chip",children:"assistant"}),s.jsxs("span",{className:"search-ask-text",children:["Ask: “",c.trim(),"”"]}),s.jsx("kbd",{children:"↵"})]}),!a&&s.jsxs("div",{className:"search-empty",children:["Try “diffusion”, “object detection”, or an arXiv id.",x&&s.jsx("span",{className:"search-empty-sub",children:"Press Enter to ask the assistant"})]}),a&&!Q&&!S&&s.jsxs("div",{className:"search-empty",children:['No matches for "',c,'"']}),o.length>0&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"search-section-label",children:["Tasks · ",o.length]}),o.map(e=>{const r=z(M(e.slug||""));return s.jsxs("div",{className:"search-result-tag",onClick:()=>i(`/tasks/${e.slug}`),children:[s.jsx("span",{className:"dot",style:{width:6,height:6,borderRadius:"50%",background:r.dot}}),s.jsx("span",{className:"name",children:B(e.name,e.slug)}),e.paper_count!=null&&s.jsxs("span",{className:"count",children:[e.paper_count," papers"]})]},e.id)})]}),d.length>0&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"search-section-label",children:["Methods · ",d.length]}),d.map(e=>s.jsxs("div",{className:"search-result-tag",onClick:()=>i(`/methods/${e.slug||e.id}`),children:[s.jsx("span",{style:{fontFamily:"var(--mono)",fontWeight:600},children:e.name}),e.paper_count!=null&&s.jsxs("span",{className:"count",children:[e.paper_count," papers"]})]},e.id))]}),u.length>0&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"search-section-label",children:["Benchmarks · ",u.length]}),u.map(e=>s.jsxs("div",{className:"search-result-tag",onClick:()=>i(`/benchmark/${e.slug||e.id}`),children:[s.jsx("span",{className:"name",children:e.name}),e.paper_count!=null&&e.paper_count>0&&s.jsxs("span",{className:"count",children:[e.paper_count," entries"]})]},e.id))]}),j.length>0&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"search-section-label",children:["Papers · page ",h]}),j.map(e=>{var r;return s.jsxs("div",{className:"search-result",onClick:()=>i(`/paper/${e.arxiv_id||e.id}`),children:[s.jsx("div",{className:"search-result-title",children:s.jsx(A,{title:e.title})}),s.jsxs("div",{className:"search-result-meta",children:[s.jsx("span",{children:e.arxiv_id?`arXiv:${e.arxiv_id}`:"External resource"}),((r=e.authors)==null?void 0:r[0])&&s.jsxs(s.Fragment,{children:[s.jsx("span",{children:"·"}),s.jsxs("span",{children:[e.authors[0],e.authors.length>1?" et al.":""]})]}),e.citation_count!=null&&s.jsxs(s.Fragment,{children:[s.jsx("span",{children:"·"}),s.jsxs("span",{children:["↑ ",e.citation_count.toLocaleString()]})]})]})]},e.id)}),(((E=t.data)==null?void 0:E.previous_page)||((P=t.data)==null?void 0:P.next_page))&&s.jsxs("div",{className:"search-paper-pagination",children:[s.jsx("button",{type:"button",disabled:!t.data.previous_page||t.isFetching,onClick:()=>{var e;return g(((e=t.data)==null?void 0:e.previous_page)||1)},children:"Previous"}),s.jsxs("span",{children:["Page ",h]}),s.jsx("button",{type:"button",disabled:!t.data.next_page||t.isFetching,onClick:()=>{var e;(e=t.data)!=null&&e.next_page&&g(t.data.next_page)},children:"Next"})]})]})]})]})})};export{H as default};
|
assets/{SettingsView-0FYS2C_e.js → SettingsView-DybOUVlT.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
import{d as j,g as q,_ as F,at as Y,i as U,R as u,k as $,j as e,ab as x,c as y,A as O}from"./index-
|
| 2 |
* @license lucide-react v0.462.0 - ISC
|
| 3 |
*
|
| 4 |
* This source code is licensed under the ISC license.
|
|
|
|
| 1 |
+
import{d as j,g as q,_ as F,at as Y,i as U,R as u,k as $,j as e,ab as x,c as y,A as O}from"./index-DaC9z2lA.js";import{u as v}from"./useMutation-DIaWIhRQ.js";import{S as E}from"./switch-B7JykEjw.js";import{f as Q,D as W}from"./latexPlainText-DI8YEXVe.js";import{u as B,a as H,r as K,b}from"./openrouter-C3cnHnqw.js";import{E as L}from"./external-link-t3rdCz_l.js";import"./index-BPU7_n66.js";import"./useQuery-DaHFL0rL.js";/**
|
| 2 |
* @license lucide-react v0.462.0 - ISC
|
| 3 |
*
|
| 4 |
* This source code is licensed under the ISC license.
|
assets/{SharedChatView-Cu89k60k.js → SharedChatView-B2BUCU8C.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{f as x,u as f,r as u,j as e,b as g}from"./index-
|
|
|
|
| 1 |
+
import{f as x,u as f,r as u,j as e,b as g}from"./index-DaC9z2lA.js";import{u as j}from"./useQuery-DaHFL0rL.js";import{C as v,U as b,A as y}from"./ChatMessage-BSE1CBhX.js";import{z as p,p as S,B as N,q as k,E as w}from"./chatSessions-CExFukoU.js";import"./katex.min-BSBacQyE.js";import"./hover-card-1A3Ph00K.js";import"./github-C5WYivP7.js";import"./github-B5o86F5s.js";import"./PaperPreviewLink-Bj5C7FQg.js";import"./index-CNBab3Wv.js";import"./file-text-C1SK1wkY.js";import"./chevron-down-B4Nu78fZ.js";const C=({detail:c})=>{const[i,h]=u.useState(()=>N(c)),s=u.useMemo(()=>{const a={};for(const r of i)for(const t of r.blocks??[])if(t.kind==="tool")for(const n of t.results??[])a[n.route_id]=n;return a},[i]),l=(a,r)=>{h(t=>t.map(n=>{var o;return n.id!==a?n:{...n,blocks:(o=n.blocks)==null?void 0:o.map((d,m)=>m===r&&(d.kind==="reasoning"||d.kind==="tool")?{...d,open:!d.open}:d)}}))};return e.jsx("div",{className:"shared-chat-transcript",children:i.map(a=>a.role==="user"?e.jsx(b,{id:a.id,text:a.text??"",paperMentions:a.paperMentions??[]},a.id):e.jsx(y,{msg:a,papers:s,onToggleBlock:l},a.id))})},I=()=>{const{shareId:c=""}=x(),i=f(),h=g(),s=j({queryKey:["shared-chat",c],queryFn:()=>w(c),retry:(r,t)=>!(t instanceof p&&t.status===404)&&r<1});u.useEffect(()=>{const r=document.title,t=document.head.querySelector('meta[name="robots"]'),n=t==null?void 0:t.content,o=t??document.createElement("meta");return o.name="robots",o.content="noindex,nofollow",t||document.head.appendChild(o),document.title="Shared conversation",()=>{document.title=r,t?t.content=n??"":o.remove()}},[]);const l=r=>{k(r,void 0,{autoSend:!1}),i("/chat")},a=s.error instanceof p&&s.error.status===404;return s.isLoading?e.jsxs("div",{className:"shared-chat-state",role:"status",children:[e.jsx(S,{})," Loading shared conversation…"]}):a?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."})]}):s.isError||!s.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 s.refetch(),children:"Try again"})]}):e.jsxs("div",{className:"shared-chat-page",children:[e.jsxs("div",{className:"shared-chat-heading",children:[e.jsx("h1",{children:"Shared conversation"}),h&&e.jsx("span",{className:"chat-staging-badge",children:"Staging"})]}),e.jsxs("div",{className:"shared-chat-content",children:[e.jsx(C,{detail:s.data},s.data.updated_at),s.data.model_label&&e.jsxs("div",{className:"shared-chat-attribution",children:[e.jsxs("span",{children:["Generated with ",s.data.model_label]}),s.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"})]}),s.data.model_provider==="openrouter"&&e.jsxs("span",{children:["Powered by ",e.jsx("a",{href:"https://openrouter.ai/",target:"_blank",rel:"noreferrer",children:"OpenRouter"})]})]}),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."}),h&&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(v,{onSend:r=>l(r.text),placeholder:"Ask a new research question…"})]})]})]})};export{I as default};
|
assets/{SignInToEditDialog-C6Il3E4j.js → SignInToEditDialog-C3dp4YGN.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
import{d as ne,r as a,j as e,a9 as pe,v as xe,aa as fe,h as ve,w as je,X as be,C as ye,ab as Ne}from"./index-
|
| 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,a9 as pe,v as xe,aa as fe,h as ve,w as je,X as be,C as ye,ab as Ne}from"./index-DaC9z2lA.js";import{B as M}from"./button-CjgOZ0_U.js";import{I as c,T as we}from"./textarea-BEZhS1Pc.js";import{D as ie,a as oe,b as le,c as ce,d as de,e as Ie}from"./dialog-1gyncLM1.js";import{u as Se}from"./useMutation-DIaWIhRQ.js";import{L as De}from"./loader-circle-C47w3weC.js";/**
|
| 2 |
* @license lucide-react v0.462.0 - ISC
|
| 3 |
*
|
| 4 |
* This source code is licensed under the ISC license.
|
assets/{StagingAccessRequestView-DgLKCB9C.js → StagingAccessRequestView-DJ_knslP.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{g,R as t,j as e,ab as p,e as j}from"./index-
|
|
|
|
| 1 |
+
import{g,R as t,j as e,ab as p,e as j}from"./index-DaC9z2lA.js";import{C as x}from"./circle-check-DNZM3-BA.js";const b=()=>{const{user:s,isLoading:l}=g(),[o,d]=t.useState(!1),[c,i]=t.useState(!1),[n,u]=t.useState(null),h=async m=>{m.preventDefault(),i(!0),u(null);try{const a=await fetch(j("/api/v1/staging-access-request"),{method:"POST",credentials:"include"});if(!a.ok){const r=await a.json().catch(()=>null);throw new Error((r==null?void 0:r.detail)||"Could not submit your request. Please try again.")}d(!0)}catch(a){u(a instanceof Error?a.message:"Could not submit your request.")}finally{i(!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"]})]}),o?e.jsxs("div",{className:"access-request-success",role:"status",children:[e.jsx(x,{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."})]}),l?e.jsx("p",{className:"access-request-status",role:"status",children:"Checking your Hugging Face account…"}):s?e.jsxs("form",{className:"access-request-form",onSubmit:h,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"}),"."]}),n&&e.jsx("p",{className:"access-request-error",role:"alert",children:n}),e.jsx("button",{className:"access-request-submit",type:"submit",disabled:c,children:c?"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(p,{returnTo:"/request-access",label:"Sign in with Hugging Face",collectEmail:!0})]})]})]})})};export{b as default};
|
assets/{SubmissionsDashboard-Dr-TyZnA.js → SubmissionsDashboard-CO19bZQx.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
var pe=s=>{throw TypeError(s)};var P=(s,t,i)=>t.has(s)||pe("Cannot "+i);var f=(s,t,i)=>(P(s,t,"read from private field"),i?i.call(s):t.get(s)),C=(s,t,i)=>t.has(s)?pe("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(s):t.set(s,i),y=(s,t,i,n)=>(P(s,t,"write to private field"),n?n.call(s,i):t.set(s,i),i),R=(s,t,i)=>(P(s,t,"access private method"),i);import{ay as Oe,az as se,aA as Me,aB as Fe,k as ke,r as T,aC as Ie,d as Qe,j as e,aD as Se,aE as qe,R as w,v as Q,aF as Le,a3 as Ue,g as De,h as Ee,aq as $e,aG as Te,aH as Be,aI as He,aJ as ze,aK as Je,aL as te}from"./index-
|
| 2 |
* @license lucide-react v0.462.0 - ISC
|
| 3 |
*
|
| 4 |
* This source code is licensed under the ISC license.
|
|
|
|
| 1 |
+
var pe=s=>{throw TypeError(s)};var P=(s,t,i)=>t.has(s)||pe("Cannot "+i);var f=(s,t,i)=>(P(s,t,"read from private field"),i?i.call(s):t.get(s)),C=(s,t,i)=>t.has(s)?pe("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(s):t.set(s,i),y=(s,t,i,n)=>(P(s,t,"write to private field"),n?n.call(s,i):t.set(s,i),i),R=(s,t,i)=>(P(s,t,"access private method"),i);import{ay as Oe,az as se,aA as Me,aB as Fe,k as ke,r as T,aC as Ie,d as Qe,j as e,aD as Se,aE as qe,R as w,v as Q,aF as Le,a3 as Ue,g as De,h as Ee,aq as $e,aG as Te,aH as Be,aI as He,aJ as ze,aK as Je,aL as te}from"./index-DaC9z2lA.js";import{Q as Ce,b as Ke,c as Ge,e as We,d as Ye,f as Ve,s as ge,g as Xe,h as Ze,u as xe}from"./useQuery-DaHFL0rL.js";import{u as je}from"./useMutation-DIaWIhRQ.js";import{s as $}from"./safeExternalHref-CkBrsh84.js";import{R as Pe,S as es,C as ss}from"./shield-alert-D-7Gy6op.js";import{L as H}from"./loader-circle-C47w3weC.js";import{C as ts}from"./circle-check-DNZM3-BA.js";function be(s,t){const i=new Set(t);return s.filter(n=>!i.has(n))}function is(s,t,i){const n=s.slice(0);return n[t]=i,n}var U,k,D,L,S,I,z,J,K,G,_,ie,ne,Re,re,ae,le,we,ns=(we=class extends Oe{constructor(t,i,n){super();C(this,_);C(this,U);C(this,k);C(this,D);C(this,L);C(this,S);C(this,I);C(this,z);C(this,J);C(this,K);C(this,G,[]);y(this,U,t),y(this,L,n),y(this,D,[]),y(this,S,[]),y(this,k,[]),this.setQueries(i)}onSubscribe(){this.listeners.size===1&&f(this,S).forEach(t=>{t.subscribe(i=>{R(this,_,ae).call(this,t,i)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,f(this,S).forEach(t=>{t.destroy()})}setQueries(t,i){y(this,D,t),y(this,L,i),se.batch(()=>{const n=f(this,S),r=R(this,_,re).call(this,f(this,D));r.forEach(a=>a.observer.setOptions(a.defaultedQueryOptions));const l=r.map(a=>a.observer),c=l.map(a=>a.getCurrentResult()),d=n.length!==l.length,m=l.some((a,o)=>a!==n[o]),x=d||m,b=x?!0:c.some((a,o)=>{const u=f(this,k)[o];return!u||!Me(a,u)});!x&&!b||(x&&(y(this,G,r),y(this,S,l)),y(this,k,c),this.hasListeners()&&(x&&(be(n,l).forEach(a=>{a.destroy()}),be(l,n).forEach(a=>{a.subscribe(o=>{R(this,_,ae).call(this,a,o)})})),R(this,_,le).call(this)))})}getCurrentResult(){return f(this,k)}getQueries(){return f(this,S).map(t=>t.getCurrentQuery())}getObservers(){return f(this,S)}getOptimisticResult(t,i){const n=R(this,_,re).call(this,t),r=n.map(c=>c.observer.getOptimisticResult(c.defaultedQueryOptions)),l=n.map(c=>c.defaultedQueryOptions.queryHash);return[r,c=>R(this,_,ne).call(this,c??r,i,l),()=>R(this,_,ie).call(this,r,n)]}},U=new WeakMap,k=new WeakMap,D=new WeakMap,L=new WeakMap,S=new WeakMap,I=new WeakMap,z=new WeakMap,J=new WeakMap,K=new WeakMap,G=new WeakMap,_=new WeakSet,ie=function(t,i){return i.map((n,r)=>{const l=t[r];return n.defaultedQueryOptions.notifyOnChangeProps?l:n.observer.trackResult(l,c=>{i.forEach(d=>{d.observer.trackProp(c)})})})},ne=function(t,i,n){if(i){const r=f(this,K),l=n!==void 0&&r!==void 0&&(r.length!==n.length||n.some((c,d)=>c!==r[d]));return(!f(this,I)||f(this,k)!==f(this,J)||l||i!==f(this,z))&&(y(this,z,i),y(this,J,f(this,k)),n!==void 0&&y(this,K,n),y(this,I,Fe(f(this,I),i(t)))),f(this,I)}return t},Re=function(){var t;return((t=f(this,L))==null?void 0:t.combine)!==void 0&&f(this,S).some((i,n)=>{var r;return i.options.suspense&&((r=f(this,k)[n])==null?void 0:r.data)===void 0})},re=function(t){const i=new Map;f(this,S).forEach(r=>{const l=r.options.queryHash;if(!l)return;const c=i.get(l);c?c.push(r):i.set(l,[r])});const n=[];return t.forEach(r=>{var m;const l=f(this,U).defaultQueryOptions(r),d=((m=i.get(l.queryHash))==null?void 0:m.shift())??new Ce(f(this,U),l);n.push({defaultedQueryOptions:l,observer:d})}),n},ae=function(t,i){const n=f(this,S).indexOf(t);n!==-1&&(y(this,k,is(f(this,k),n,i)),R(this,_,le).call(this))},le=function(){var t;if(this.hasListeners()){const i=R(this,_,ie).call(this,f(this,k),f(this,G)),n=R(this,_,Re).call(this),r=f(this,I),l=n?r:R(this,_,ne).call(this,i,(t=f(this,L))==null?void 0:t.combine);(n||r!==l)&&se.batch(()=>{this.listeners.forEach(c=>{c(f(this,k))})})}},we);function X({queries:s,...t},i){const n=ke(),r=Ke(),l=Ge(),c=T.useMemo(()=>s.map(h=>{const j=n.defaultQueryOptions(h);return j._optimisticResults=r?"isRestoring":"optimistic",j}),[s,n,r]);c.forEach(h=>{We(h);const j=n.getQueryCache().get(h.queryHash);Ye(h,l,j)}),Ve(l);const[d]=T.useState(()=>new ns(n,c,t)),[m,x,b]=d.getOptimisticResult(c,t.combine),a=!r&&t.subscribed!==!1;T.useSyncExternalStore(T.useCallback(h=>a?d.subscribe(se.batchCalls(h)):Ie,[d,a]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),T.useEffect(()=>{d.setQueries(c,t)},[c,t,d]);const u=m.some((h,j)=>ge(c[j],h))?m.flatMap((h,j)=>{const E=c[j];if(E&&ge(E,h)){const q=new Ce(n,E);return Xe(E,q,l)}return[]}):[];if(u.length>0)throw Promise.all(u);const p=m.find((h,j)=>{const E=c[j];return E&&Ze({result:h,errorResetBoundary:l,throwOnError:E.throwOnError,query:n.getQueryCache().get(E.queryHash),suspense:E.suspense})});if(p!=null&&p.error)throw p.error;return x(b())}/**
|
| 2 |
* @license lucide-react v0.462.0 - ISC
|
| 3 |
*
|
| 4 |
* This source code is licensed under the ISC license.
|
assets/{SubmitView-Z65qy5QJ.js → SubmitView-a_ZbQmby.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{u as k,k as D,h as C,g as E,R as d,j as e,V as L,au as z}from"./index-
|
|
|
|
| 1 |
+
import{u as k,k as D,h as C,g as E,R as d,j as e,V as L,au as z}from"./index-DaC9z2lA.js";import{u as F}from"./useMutation-DIaWIhRQ.js";import{A as X,a as q}from"./alert-CEb_9u-E.js";import{B as _}from"./button-CjgOZ0_U.js";import{I as g,T as N}from"./textarea-BEZhS1Pc.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 R(n){const i=n.trim();return i?U.test(i)||$.test(i)||O.test(i)?"arxiv":/^https?:\/\//i.test(i)?"external":"arxiv":"empty"}function V(n,i){const a=n.trim();if(R(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(h=>h.trim()).filter(Boolean);return u.length>0&&(o.authors=u),i.datePublished&&(o.date_published=i.datePublished),o}function B(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 W=()=>{const n=k(),i=D(),{toast:a}=C(),{user:s,isLoading:o}=E(),[l,p]=d.useState(""),[u,h]=d.useState(""),[f,S]=d.useState(""),[x,j]=d.useState(""),[b,w]=d.useState(""),[I,y]=d.useState(null);d.useEffect(()=>{const t=sessionStorage.getItem(v);if(t){sessionStorage.removeItem(v);try{const r=JSON.parse(t);p(r.input??""),h(r.title??""),S(r.abstract??""),j(r.authors??""),w(r.datePublished??"")}catch{}}},[]);const m=R(l),A=m==="external",c=F({mutationFn:t=>z(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=>{y(B(t))}}),P=t=>{if(t.preventDefault(),y(null),m==="empty"){y("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:b}));const T=L("/api/v1/auth/hf/login");window.location.assign(`${T}?return_to=${encodeURIComponent(window.location.href)}`);return}const r=V(l,{title:u,abstract:f,authors:x,datePublished:b});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:P,style:{marginTop:28,display:"grid",gap:20},children:[e.jsxs("div",{style:{display:"grid",gap:8},children:[e.jsx("label",{htmlFor:"submit-input",style:{fontWeight:600,fontSize:14},children:"arXiv ID or paper URL"}),e.jsx(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:m==="arxiv"?"Detected: arXiv paper — metadata will be fetched automatically.":m==="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."})]}),A&&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=>h(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(N,{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:b,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(X,{variant:"destructive",children:e.jsx(q,{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{W as default};
|
assets/{TagBrowseView-DWHZnnDd.js → TagBrowseView-B9walqGg.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
import{d as fe,r as h,o as Z,j as e,n as F,a6 as be,q as je,P as Je,t as _e,p as ve,a7 as Xe,R as _,a8 as es,O as ss,v as J,L as A,f as as,u as ts,a as ns,_ as rs,a3 as os,c as xe}from"./index-
|
| 2 |
* @license lucide-react v0.462.0 - ISC
|
| 3 |
*
|
| 4 |
* This source code is licensed under the ISC license.
|
|
|
|
| 1 |
+
import{d as fe,r as h,o as Z,j as e,n as F,a6 as be,q as je,P as Je,t as _e,p as ve,a7 as Xe,R as _,a8 as es,O as ss,v as J,L as A,f as as,u as ts,a as ns,_ as rs,a3 as os,c as xe}from"./index-DaC9z2lA.js";import{u as ge}from"./useQuery-DaHFL0rL.js";import{P as cs,M as is}from"./components-C8eWDsbC.js";import{B as ls}from"./BenchmarkTrendSparkline-BBkCWHyp.js";import{u as ds,P as ms}from"./useIntersectionObserver-D9t6P4Le.js";import{M as Q}from"./MarkdownText-CJyCKyp5.js";import{t as ps,d as V}from"./transform-By0Q02j6.js";import{b as hs}from"./usePapers-BQVvNLjC.js";import{S as U}from"./skeleton-DMsDaBre.js";import{A as us,a as xs}from"./alert-CEb_9u-E.js";import{C as gs}from"./chevron-down-B4Nu78fZ.js";import{G as fs}from"./github-B5o86F5s.js";import"./LatexTitle-C6bpusZm.js";import"./katex.min-BSBacQyE.js";import"./safeExternalHref-CkBrsh84.js";import"./PaperPreviewLink-Bj5C7FQg.js";import"./index-CNBab3Wv.js";import"./hover-card-1A3Ph00K.js";import"./useInfiniteQuery-DaSt1eU8.js";/**
|
| 2 |
* @license lucide-react v0.462.0 - ISC
|
| 3 |
*
|
| 4 |
* This source code is licensed under the ISC license.
|
assets/{TagsIndexView-D_RsuOg8.js → TagsIndexView-wRpQCyWN.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{r as d,j as s,L as p,c as h}from"./index-
|
|
|
|
| 1 |
+
import{r as d,j as s,L as p,c as h}from"./index-DaC9z2lA.js";import{u as g}from"./useQuery-DaHFL0rL.js";import{c as x,h as f,d as u}from"./transform-By0Q02j6.js";import{S as m}from"./skeleton-DMsDaBre.js";import{A as j,a as y}from"./alert-CEb_9u-E.js";import{T as k}from"./TaxonomySuggestionTile-kyXt2mVa.js";import"./SignInToEditDialog-C3dp4YGN.js";import"./button-CjgOZ0_U.js";import"./textarea-BEZhS1Pc.js";import"./dialog-1gyncLM1.js";import"./useMutation-DIaWIhRQ.js";import"./loader-circle-C47w3weC.js";const v=r=>(r==null?void 0:r.trim().toLowerCase().replace(/[\s_]+/g,"-"))??"",D=()=>{const r=g({queryKey:["areas-with-tasks"],queryFn:()=>h.getAreasWithTasks(),staleTime:6e5}),o=d.useMemo(()=>{if(!r.data)return[];const e={general:0,vision:1,video:2,language:3,audio:4,other:5},t=n=>e[v(n)]??999;return[...r.data.results].sort((n,a)=>{const i=t(n.name),l=t(a.name);return i!==l?i-l:n.name.localeCompare(a.name)})},[r.data]),c=d.useMemo(()=>o.reduce((e,t)=>e+t.tasks.length,0),[o]);return r.error?s.jsx("div",{className:"page",children:s.jsx(j,{variant:"destructive",children:s.jsx(y,{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,t)=>s.jsxs("div",{children:[s.jsx(m,{className:"h-8 w-1/3 mb-4"}),s.jsx("div",{className:"tag-grid",children:Array.from({length:6}).map((n,a)=>s.jsx(m,{className:"h-24"},a))})]},t))}):o.map(e=>{const t=e.tasks;if(t.length===0)return null;const n=t.reduce((a,i)=>a+(i.paper_count||0),0);return s.jsxs("section",{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:[t.length," ",t.length===1?"task":"tasks"," · ",n.toLocaleString()," papers"]})]}),s.jsxs("div",{className:"tag-grid",children:[t.map(a=>{const i=a.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(a.name,i)]}),s.jsx("div",{className:"meta",children:s.jsxs("span",{children:[(a.paper_count??0).toLocaleString()," papers"]})})]},a.id)}),s.jsx(k,{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{D as default};
|
assets/{TaxonomySuggestionTile-Cx2TTJKY.js → TaxonomySuggestionTile-kyXt2mVa.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{g as u,r as o,j as e}from"./index-
|
|
|
|
| 1 |
+
import{g as u,r as o,j as e}from"./index-DaC9z2lA.js";import{P as c,S as m,a as p}from"./SignInToEditDialog-C3dp4YGN.js";function h({kind:s}){const{user:a}=u(),[i,n]=o.useState(!1),[l,t]=o.useState(!1),g=`Suggest a new ${s}...`,r=()=>{a?n(!0):t(!0)};return e.jsxs(e.Fragment,{children:[e.jsxs("button",{type:"button",className:"tag-cell taxonomy-suggestion-cell",onClick:r,children:[e.jsxs("div",{className:"name",children:[e.jsx(c,{className:"taxonomy-suggestion-icon","aria-hidden":"true"}),g]}),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-DcIP_oUz.js → TrendsView-D6Dv_5a6.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{c as X,R as G,j as e}from"./index-
|
|
|
|
| 1 |
+
import{c as X,R as G,j as e}from"./index-DaC9z2lA.js";import{u as J}from"./useQuery-DaHFL0rL.js";import{A as q,a as E}from"./alert-CEb_9u-E.js";import{S as P}from"./skeleton-DMsDaBre.js";const m=t=>{const i=/^(\d{4})-(0[1-9]|1[0-2])$/.exec(t);if(!i)return t;const[,r,l]=i;return`${["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][Number(l)-1]} '${r.slice(2)}`},Q=()=>X.getResearchTrends(),f=980,j=400,x=62,R=26,g=30,V=58,u=f-x-R,F=j-g-V,v=g+F,Y=t=>{if(t.length<3)return t.map((r,l)=>`${l?"L":"M"}${r[0]} ${r[1]}`).join(" ");let i=`M${t[0][0]} ${t[0][1]}`;for(let r=0;r<t.length-1;r+=1){const l=t[r-1]??t[r],c=t[r],o=t[r+1],a=t[r+2]??o,y=c[0]+(o[0]-l[0])/6,s=c[1]+(o[1]-l[1])/6,b=o[0]-(a[0]-c[0])/6,d=o[1]-(a[1]-c[1])/6;i+=` C ${y} ${s} ${b} ${d} ${o[0]} ${o[1]}`}return i},W={fontFamily:"var(--mono)",fontSize:12,fill:"var(--ink-faint)"},z={fontFamily:"var(--mono)",fontSize:11,fontWeight:600,letterSpacing:"0.14em",fill:"var(--ink-faint)",textTransform:"uppercase"},C=({id:t,data:i,color:r,yTicks:l,yLabel:c,xLabel:o})=>{const[a,y]=G.useState(null),s=i.length,b=l[l.length-1],d=n=>x+u*(s===1?0:n/(s-1)),p=n=>g+F*(1-n/b);if(s===0)return null;const B=i.map((n,h)=>[d(h),p(n.percent)]),A=Y(B),_=`${A} L ${d(s-1)} ${v} L ${x} ${v} Z`,w=s<=12?1:Math.ceil(s/8),O=n=>{const h=n.currentTarget.getBoundingClientRect(),S=(n.clientX-h.left)/h.width*f,k=s>1?u/(s-1):u,I=Math.max(0,Math.min(s-1,Math.round((S-x)/k)));y(I)},H=`trend-gradient-${t}`;return e.jsxs("figure",{className:"trend-chart",children:[e.jsxs("div",{className:"trend-chart-visual",children:[e.jsxs("svg",{viewBox:`0 0 ${f} ${j}`,width:"100%",role:"img","aria-label":`${c} by ${o.toLowerCase()}, from ${m(i[0].month)} (${i[0].percent}%) to ${m(i[s-1].month)} (${i[s-1].percent}%)`,style:{display:"block",overflow:"visible",cursor:"crosshair"},onPointerMove:O,onPointerLeave:()=>y(null),children:[e.jsx("defs",{children:e.jsxs("linearGradient",{id:H,x1:"0",y1:"0",x2:"0",y2:"1",children:[e.jsx("stop",{offset:"0%",style:{stopColor:r,stopOpacity:.26}}),e.jsx("stop",{offset:"100%",style:{stopColor:r,stopOpacity:.02}})]})}),l.map(n=>e.jsxs("g",{children:[e.jsx("line",{x1:x,x2:f-R,y1:p(n),y2:p(n),stroke:"var(--hairline)",strokeWidth:1}),e.jsxs("text",{x:x-14,y:p(n)+4,textAnchor:"end",style:W,children:[n,"%"]})]},n)),e.jsx("path",{d:_,fill:`url(#${H})`}),e.jsx("path",{d:A,fill:"none",stroke:r,strokeWidth:2,strokeLinejoin:"round",strokeLinecap:"round"}),i.map((n,h)=>{const S=h===s-1,k=h%w===0&&s-1-h>=w/2;return!S&&!k?null:e.jsx("text",{x:d(h),y:v+24,textAnchor:"middle",style:W,children:m(n.month)},n.month)}),e.jsx("text",{x:x+u/2,y:j-4,textAnchor:"middle",style:z,children:o}),e.jsx("text",{transform:`translate(16 ${g+F/2}) rotate(-90)`,textAnchor:"middle",style:z,children:c}),a!=null&&e.jsxs(e.Fragment,{children:[e.jsx("line",{x1:d(a),x2:d(a),y1:g,y2:v,stroke:r,strokeWidth:1,strokeDasharray:"3 4",opacity:.5}),e.jsx("circle",{cx:d(a),cy:p(i[a].percent),r:5,fill:"var(--bg)",stroke:r,strokeWidth:2})]})]}),a!=null&&e.jsxs("div",{style:{position:"absolute",left:`${d(a)/f*100}%`,top:`${p(i[a].percent)/j*100}%`,transform:"translate(-50%, calc(-100% - 14px))",background:"var(--bg-elevated)",border:"1px solid var(--hairline)",borderRadius:6,boxShadow:"0 8px 26px rgba(0,0,0,.13)",padding:"7px 12px",pointerEvents:"none",whiteSpace:"nowrap",zIndex:3},children:[e.jsx("div",{style:{fontFamily:"var(--serif)",fontStyle:"italic",color:"var(--ink-faint)",fontSize:13,marginBottom:2},children:m(i[a].month)}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:7,fontFamily:"var(--mono)",fontWeight:600,fontSize:15,color:"var(--ink)"},children:[e.jsx("span",{style:{width:8,height:8,borderRadius:2,background:r,display:"inline-block"}}),i[a].percent,"%"]})]})]}),e.jsxs("details",{className:"trend-chart-table",children:[e.jsx("summary",{style:{fontFamily:"var(--mono)",fontSize:11,letterSpacing:"0.04em",color:"var(--ink-faint)",cursor:"pointer"},children:"View data table"}),e.jsxs("table",{style:{marginTop:8,borderCollapse:"collapse",fontFamily:"var(--mono)",fontSize:12,color:"var(--ink-soft)"},children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{style:{textAlign:"left",padding:"3px 18px 3px 0"},children:o}),e.jsx("th",{style:{textAlign:"right",padding:"3px 0"},children:c})]})}),e.jsx("tbody",{children:i.map(n=>e.jsxs("tr",{children:[e.jsx("td",{style:{padding:"2px 18px 2px 0"},children:m(n.month)}),e.jsxs("td",{style:{textAlign:"right",padding:"2px 0"},children:[n.percent,"%"]})]},n.month))})]})]})]})},$={maxWidth:960,padding:"48px 0 8px",borderTop:"1px solid var(--hairline)",marginTop:48},T={fontFamily:"var(--serif)",fontSize:34,fontWeight:500,letterSpacing:"-0.02em",margin:"0 0 10px",color:"var(--ink)"},L={fontFamily:"var(--serif)",fontSize:18,lineHeight:1.55,color:"var(--ink-soft)",maxWidth:620,margin:"0 0 8px"},M={fontFamily:"var(--mono)",fontSize:12,fontWeight:600,letterSpacing:"0.14em",textTransform:"uppercase",color:"var(--ink-faint)",marginBottom:8},N={fontFamily:"var(--serif)",fontSize:17,lineHeight:1.6,color:"var(--ink-soft)",margin:0},D={height:320,marginTop:26},te=()=>{const t=J({queryKey:["research-trends"],queryFn:Q,staleTime:36e5});return e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["Research ",e.jsx("em",{children:"Trends"})]}),e.jsx("div",{className:"feed-subtitle",children:"How open science is changing across machine learning — tracked over time from arXiv and the Hugging Face Hub."})]})}),t.error&&e.jsx(q,{variant:"destructive",children:e.jsx(E,{children:"Failed to load research trends. Please try again."})}),e.jsxs("section",{style:$,children:[e.jsx("h2",{style:T,children:"Code Availability"}),e.jsx("p",{style:L,children:"The percentage of published papers that have at least one official code implementation on GitHub."}),e.jsx("div",{style:{marginTop:26},children:t.data?e.jsx(C,{id:"code",data:t.data.code_availability,color:"var(--trend-code)",yTicks:[0,20,40,60,80],yLabel:"Code Availability",xLabel:"Paper Publication Date"}):!t.error&&e.jsx(P,{style:D})})]}),e.jsxs("section",{style:$,children:[e.jsx("h2",{style:T,children:"Papers with Hugging Face artifacts"}),e.jsx("p",{style:L,children:"The percentage of published papers linked to at least one Hugging Face artifact — a model, dataset or Space — making the work directly runnable and reusable."}),e.jsx("div",{style:{marginTop:26},children:t.data?e.jsx(C,{id:"hf",data:t.data.hf_artifacts,color:"var(--trend-hf)",yTicks:[0,10,20,30,40,50],yLabel:"HF Artifact Coverage",xLabel:"Paper Publication Date"}):!t.error&&e.jsx(P,{style:D})})]}),e.jsxs("section",{style:{...$,paddingBottom:72},children:[e.jsx("h2",{style:{...T,fontSize:27},children:"How the data is collected"}),e.jsxs("div",{style:{display:"grid",gap:24,maxWidth:680},children:[e.jsxs("div",{children:[e.jsx("div",{style:M,children:"Code Availability"}),e.jsx("p",{style:N,children:"For every open-access machine learning paper, we check whether an official code implementation is linked on GitHub. The date axis is the paper's publication date."})]}),e.jsxs("div",{children:[e.jsx("div",{style:M,children:"Hugging Face artifacts"}),e.jsx("p",{style:N,children:"We resolve links between papers and the Hugging Face Hub, counting a paper as covered when it references at least one model, dataset or Space. The date axis is the paper's publication date."})]}),e.jsx("p",{style:{fontFamily:"var(--mono)",fontSize:12,lineHeight:1.6,color:"var(--ink-faint)",margin:"8px 0 0",letterSpacing:"0.02em"},children:"Figures use complete publication months. Historical Hugging Face coverage reflects artifacts currently linked in the catalog."})]})]})]})};export{te as default};
|
assets/{UserProfileView-CEuvZ-tI.js → UserProfileView-BwE7555Z.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{f as s,j as e,aP as i,e as o}from"./index-
|
|
|
|
| 1 |
+
import{f as s,j as e,aP as i,e as o}from"./index-DaC9z2lA.js";import{u as d}from"./useQuery-DaHFL0rL.js";import{C as l}from"./OrganizationContributionGraph-BGN6E-kG.js";import"./skeleton-DMsDaBre.js";async function c(t){const a=await fetch(o(`/api/v1/profiles/${encodeURIComponent(t)}`),{credentials:"include"});if(!a.ok)throw new Error("Profile not found");const r=await a.json();if(a.redirected){const n=decodeURIComponent(new URL(a.url).pathname.split("/").pop()||r.username);return{...r,username:n,redirected_from_alias:!0}}return r}const x=()=>{const{username:t=""}=s(),a=d({queryKey:["user-profile",t.toLowerCase()],queryFn:()=>c(t)});return a.isLoading?e.jsx("div",{className:"page",children:"Loading profile…"}):a.data?a.data.redirected_from_alias?e.jsx(i,{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(l,{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{x as default};
|
assets/{alert-B6VISE3o.js → alert-CEb_9u-E.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{r,j as s,v as l,aa as i}from"./index-
|
|
|
|
| 1 |
+
import{r,j as s,v as l,aa as i}from"./index-DaC9z2lA.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=r.forwardRef(({className:e,variant:t,...a},d)=>s.jsx("div",{ref:d,role:"alert",className:l(o({variant:t}),e),...a}));n.displayName="Alert";const v=r.forwardRef(({className:e,...t},a)=>s.jsx("h5",{ref:a,className:l("mb-1 font-medium leading-none tracking-tight",e),...t}));v.displayName="AlertTitle";const c=r.forwardRef(({className:e,...t},a)=>s.jsx("div",{ref:a,className:l("text-sm [&_p]:leading-relaxed",e),...t}));c.displayName="AlertDescription";export{n as A,c as a};
|
assets/{button-BtDGjb5F.js → button-CjgOZ0_U.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{r as i,j as d,ax as u,v as c,aa as f}from"./index-
|
|
|
|
| 1 |
+
import{r as i,j as d,ax as u,v as c,aa as f}from"./index-DaC9z2lA.js";const g=f("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),v=i.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...o},s)=>{const a=n?u:"button";return d.jsx(a,{className:c(g({variant:t,size:r,className:e})),ref:s,...o})});v.displayName="Button";export{v as B};
|
assets/{chatSessions-D7JBHRAl.js → chatSessions-CExFukoU.js}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
-
import{d as Q,j as a,r as C,C as J,R as d,c as F,e as U}from"./index-
|
| 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 ee=Q("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"}]]),ue=({light:e})=>a.jsx("span",{className:`chat-spinner${e?" chat-spinner-light":""}`}),he=({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"})}),de=()=>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"})]}),pe=({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"})]}),fe=()=>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"})}),ge=()=>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"})}),me=()=>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"})]}),ve=()=>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"})}),te=[{provider:"huggingface",label:"Inference Providers"},{provider:"openrouter",label:"OpenRouter"}],ye=({models:e,selectedModel:r,onModelChange:t,disabled:s})=>{var o,i;const n=((o=e.find(u=>u.id===r))==null?void 0:o.label)??`${r} (unavailable)`,c=e.filter(u=>!u.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:n}):a.jsxs("span",{className:`chat-model-picker${s?" is-disabled":""}`,children:[a.jsx("span",{className:"chat-model-picker-sizer","aria-hidden":"true",children:n}),a.jsxs("select",{className:"chat-model-select",value:r,disabled:s,onChange:u=>t(u.target.value),"aria-label":"Research model",children:[!e.some(u=>u.id===r)&&a.jsx("option",{value:r,disabled:!0,children:n}),c.map(u=>a.jsx("option",{value:u.id,children:u.label},u.id)),te.map(({provider:u,label:v})=>{const h=e.filter(p=>p.provider===u);return h.length===0?null:a.jsx("optgroup",{label:v,children:h.map(p=>a.jsx("option",{value:p.id,children:p.label},p.id))},u)})]}),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"})})]})},R=[{value:"low",label:"Low",description:"Faster and more concise"},{value:"high",label:"High",description:"More thorough"},{value:"max",label:"Max",description:"Deepest and slowest"}],xe=({value:e,onChange:r,disabled:t=!1})=>{const[s,n]=C.useState(!1),c=C.useRef(null),o=R.find(i=>i.value===e)??R[0];return C.useEffect(()=>{if(!s)return;const i=v=>{var h;(h=c.current)!=null&&h.contains(v.target)||n(!1)},u=v=>{v.key==="Escape"&&n(!1)};return document.addEventListener("mousedown",i),document.addEventListener("keydown",u),()=>{document.removeEventListener("mousedown",i),document.removeEventListener("keydown",u)}},[s]),C.useEffect(()=>{t&&n(!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: ${o.label}`,"aria-haspopup":"listbox","aria-expanded":s,disabled:t,onClick:()=>n(i=>!i),children:[a.jsx("span",{children:o.label}),a.jsx(X,{size:13,"aria-hidden":"true"})]}),s&&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"}),R.map(i=>a.jsxs("button",{type:"button",className:`chat-effort-option${i.value===e?" is-selected":""}`,role:"option","aria-selected":i.value===e,onClick:()=>{r(i.value),n(!1)},children:[a.jsxs("span",{className:"chat-effort-option-copy",children:[a.jsx("strong",{children:i.label}),a.jsx("small",{children:i.description})]}),i.value===e&&a.jsx(J,{size:15,"aria-hidden":"true"})]},i.value))]})]})},we=({text:e,mentions:r,scrollTop:t=0,variant:s="composer"})=>{const n=[];let c=0;for(const o of[...r].sort((i,u)=>i.start-u.start)){const i=e.slice(o.start,o.end),u=i===o.title||i===`@${o.title}`;o.start<c||o.end>e.length||!u||(n.push(e.slice(c,o.start)),n.push(a.jsx("span",{className:`chat-paper-inline-highlight${o.unavailable?" is-unavailable":""}`,"data-paper-route-id":o.route_id,children:i},o.key)),c=o.end)}return n.push(e.slice(c)),e.endsWith(`
|
| 7 |
-
`)&&n.push(""),a.jsx("div",{"aria-hidden":"true",className:`chat-paper-highlight-layer chat-paper-highlight-layer-${s}`,children:a.jsx("div",{style:{transform:`translateY(-${t}px)`},children:n})})},be=({open:e,query:r,results:t,activeIndex:s,loading:n,error:c,onSelect:o,id:i="chat-paper-picker",optionIdPrefix:u="chat-paper-option"})=>{if(!e)return null;const v=r.trim()?n?"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:i,role:"listbox","aria-label":"Paper results",children:[a.jsx("div",{className:"chat-paper-picker-status",role:"status","aria-live":"polite",children:v}),t.map((h,p)=>{const P=h.arxiv_id||h.id,S=h.arxiv_id||(()=>{try{return h.source_url?new URL(h.source_url).hostname:"External resource"}catch{return"External resource"}})();return a.jsxs("button",{type:"button",id:`${u}-${p}`,role:"option","aria-selected":p===s,className:`chat-paper-option${p===s?" is-active":""}`,onMouseDown:E=>{E.preventDefault(),o(h)},children:[a.jsx("span",{className:"chat-paper-option-title",children:h.title}),a.jsx("span",{className:"chat-paper-option-meta",children:S})]},P)})]})},se=10,re=3;function B(e,r){const s=e.slice(0,r).lastIndexOf("@");if(s<0)return null;const n=s>0?e[s-1]:"";if(n&&/[\p{L}\p{M}\p{N}_@]/u.test(n))return null;const c=e.slice(s+1,r);return/[\n\r@]/.test(c)?null:{start:s,end:r,query:c}}function W(e,r,t){let s=0;for(;s<e.length&&s<r.length&&e[s]===r[s];)s+=1;let n=0;for(;n<e.length-s&&n<r.length-s&&e[e.length-1-n]===r[r.length-1-n];)n+=1;const c=e.length-n,o=r.length-e.length;return t.flatMap(i=>i.end<=s?[i]:i.start>=c?[{...i,start:i.start+o,end:i.end+o}]:[])}function _e({draft:e,onChange:r,enabled:t,textareaRef:s}){var L;const n=`chat-paper-picker-${d.useId().replace(/:/g,"")}`,c=`${n}-option`,[o,i]=d.useState(null),[u,v]=d.useState(""),[h,p]=d.useState(0),[P,S]=d.useState(""),E=d.useRef(new Set);d.useEffect(()=>{t||i(null)},[t]),d.useEffect(()=>{const l=window.setTimeout(()=>v((o==null?void 0:o.query.trim())??""),150);return()=>window.clearTimeout(l)},[o==null?void 0:o.query]);const w=Z({queryKey:["chat-paper-mention-search",u.toLowerCase()],queryFn:({signal:l})=>F.searchPapers(u,1,10,"hybrid",l),enabled:t&&!!o&&u.length>=1,staleTime:3e4,refetchOnWindowFocus:!1,retry:!1}),g=d.useMemo(()=>{var l;return((l=w.data)==null?void 0:l.results)??[]},[(L=w.data)==null?void 0:L.results]);d.useEffect(()=>p(0),[u]),d.useEffect(()=>{var l;(l=document.getElementById(`${c}-${h}`))==null||l.scrollIntoView({block:"nearest"})},[h,c]);const K=d.useCallback(l=>{var y;if(!t){i(null);return}const f=l??((y=s.current)==null?void 0:y.selectionStart)??e.text.length;if(e.paperMentions.some(b=>f>b.start&&f<=b.end)){i(null);return}i(B(e.text,f))},[e.paperMentions,e.text,t,s]),V=d.useCallback((l,f)=>{var k;const y=W(e.text,l,e.paperMentions);r({text:l,paperMentions:y});const x=f??((k=s.current)==null?void 0:k.selectionStart)??l.length;t&&!y.some(j=>x>j.start&&x<=j.end)?i(B(l,x)):i(null)},[e,t,r,s]),D=d.useCallback(l=>{if(!o)return!1;const f=l.arxiv_id||l.id,y=new Set(e.paperMentions.map(_=>_.route_id));if(e.paperMentions.length>=se)return S("A message can contain at most 10 paper mentions."),!1;if(!y.has(f)&&y.size>=re)return S("A message can attach at most 3 distinct papers."),!1;const b=l.title,x=e.text.slice(o.end),k=x.length===0,j=e.text.slice(0,o.start)+b+(k?" ":"")+x,G=W(e.text,j,e.paperMentions),H={key:crypto.randomUUID(),route_id:f,title:l.title,source:l.source==="external"?"external":"arxiv",start:o.start,end:o.start+b.length};return r({text:j,paperMentions:[...G,H].sort((_,T)=>_.start-T.start)}),i(null),S(""),window.requestAnimationFrame(()=>{var T,q;const _=H.end+(k||x.startsWith(" ")?1:0);(T=s.current)==null||T.focus(),(q=s.current)==null||q.setSelectionRange(_,_)}),E.current.has(f)||(E.current.add(f),F.prewarmChatPaperContext(f).catch(()=>{})),!0},[o,e,r,s]),z=d.useCallback(l=>!o||l.nativeEvent.isComposing?!1:l.key==="Tab"?(i(null),!1):l.key==="Escape"?(l.preventDefault(),i(null),!0):l.key==="ArrowDown"||l.key==="ArrowUp"?(l.preventDefault(),g.length&&p(f=>l.key==="ArrowDown"?(f+1)%g.length:(f-1+g.length)%g.length),!0):l.key==="Home"&&g.length?(l.preventDefault(),p(0),!0):l.key==="End"&&g.length?(l.preventDefault(),p(g.length-1),!0):l.key==="Enter"&&!l.shiftKey?(l.preventDefault(),g[h]?D(g[h]):w.isFetching||i(null),!0):!1,[o,h,g,w.isFetching,D]);return{open:!!o,query:(o==null?void 0:o.query)??"",results:g,activeIndex:h,loading:w.isFetching,error:w.isError,message:P,pickerId:n,optionIdPrefix:c,updateText:V,refresh:K,select:D,keyDown:z,close:()=>i(null)}}const Se=({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(ee,{size:15,"aria-hidden":"true"}),a.jsx("span",{children:"Web"})]}),$="pwc:chat-oauth-draft",M="pwc:chat-oauth-model",I="pwc:chat-oauth-auto-send",ne="pwc:chat-oauth-attempted",A="pwc:chat-web-search-enabled",O="pwc:chat-reasoning-effort";function ke(e,r,t={}){const s=typeof e=="string"?e:e.text,n=s.length-s.trimStart().length,c=s.trim();if(!c)return;const o=n+c.length,i={text:c,paperMentions:typeof e=="string"?[]:e.paperMentions.filter(u=>u.start>=n&&u.end<=o).map(u=>({...u,start:u.start-n,end:u.end-n}))};sessionStorage.setItem($,i.paperMentions.length?JSON.stringify(i):c),t.autoSend===!1?sessionStorage.removeItem(I):sessionStorage.setItem(I,"1"),r?sessionStorage.setItem(M,r):sessionStorage.removeItem(M),t.webSearchEnabled?sessionStorage.setItem(A,"1"):sessionStorage.removeItem(A),sessionStorage.setItem(O,t.reasoningEffort??"low")}function je(){var s;if(typeof window>"u"||sessionStorage.getItem(I)!=="1")return null;const e=(s=sessionStorage.getItem($))==null?void 0:s.trim();if(!e)return null;let r={text:e,paperMentions:[]};try{const n=JSON.parse(e);typeof n.text=="string"&&Array.isArray(n.paperMentions)&&(r=n)}catch{}const t=r.text.trim();return t?{prompt:t,draft:{...r,text:t},model:sessionStorage.getItem(M),webSearchEnabled:sessionStorage.getItem(A)==="1",reasoningEffort:["low","high","max"].includes(sessionStorage.getItem(O)??"")?sessionStorage.getItem(O):"low"}:null}function Ee(){sessionStorage.removeItem($),sessionStorage.removeItem(M),sessionStorage.removeItem(I),sessionStorage.removeItem(ne),sessionStorage.removeItem(A),sessionStorage.removeItem(O)}const Y="deepseek-ai/DeepSeek-V4-Flash-0731",Te=[{id:Y,label:"DeepSeek V4 Flash",provider:"openrouter"}],Ce=[{id:Y,label:"DeepSeek V4 Flash",provider:"openrouter"}];async function m(e,r){const t=await fetch(U(e),{credentials:"include",headers:{"Content-Type":"application/json",...r==null?void 0:r.headers},...r});if(!t.ok){const s=await t.json().catch(()=>null),n=s==null?void 0:s.detail;throw new Error((n==null?void 0:n.message)||n||`Chat request failed (${t.status})`)}return t.status===204?void 0:t.json()}class ae extends Error{constructor(r,t){super(r),this.status=t}}async function oe(e){const r=await fetch(U(e),{headers:{Accept:"application/json"}});if(!r.ok){const t=await r.json().catch(()=>null),s=t==null?void 0:t.detail;throw new ae((s==null?void 0:s.message)||s||`Shared conversation request failed (${r.status})`,r.status)}return r.json()}async function Me(){const e=[];let r=null;do{const t=new URLSearchParams({limit:"50"});r&&t.set("cursor",r);const s=await m(`/api/v1/chat/sessions?${t.toString()}`);e.push(...s.items),r=s.next_cursor}while(r&&e.length<100);return e}function Ie(e,r="low"){return m("/api/v1/chat/sessions",{method:"POST",body:JSON.stringify({selected_model:e||null,reasoning_effort:r})})}function Ae(e){return m(`/api/v1/chat/sessions/${e}`)}function Oe(e,r){return m(`/api/v1/chat/sessions/${e}`,{method:"PATCH",body:JSON.stringify(r)})}function Pe(e){return m(`/api/v1/chat/sessions/${e}`,{method:"DELETE"})}function De(){return m("/api/v1/chat/sessions/archive-old",{method:"POST"})}function Re(){return m("/api/v1/chat/sessions/archive-oldest",{method:"POST"})}function Ne(e){return m(`/api/v1/chat/sessions/${e}/cancel`,{method:"POST"})}function $e(e){return m(`/api/v1/chat/sessions/${e}/share`,{method:"POST"})}function Le(e){return oe(`/api/v1/chat/shares/${encodeURIComponent(e)}`)}async function He(){return m("/api/v1/chat/models")}function N(e,r){const t=e.map(s=>s.kind==="reasoning"?{...s,active:!1,open:!1}:s.kind==="tool"?{...s,status:s.status==="running"?"error":s.status,open:r&&(s.status==="error"||s.status==="denied"||s.status==="running")}:{...s,done:!0});return t.filter((s,n)=>{const c=t[n-1];return!(s.kind==="reasoning"&&(c==null?void 0:c.kind)==="reasoning"&&s.text===c.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_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:N(t.display_blocks,!0),followups:t.followups,citations:t.citations,finishReason:t.finish_reason??void 0,streaming:!1}];const s={id:t.id,role:"user",text:t.content,paperMentions:(t.paper_mentions??[]).map(c=>({...c,key:c.occurrence_id})),revision:t.revision,status:t.status,error:t.status==="complete"?void 0:t.error_code||t.status};if(!["error","interrupted"].includes(t.status))return[s];const n=t.status==="interrupted";return[s,{id:`${t.id}-${n?"interrupted":"error"}`,role:"assistant",blocks:N(t.display_blocks,!0),streaming:!1,finishReason:n?"stopped":void 0,error:n?void 0:r(t.error_code),errorCode:n?void 0:t.error_code??void 0}]})}function Fe(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}))}:{id:r.id,role:"assistant",blocks:N(r.display_blocks,!1),citations:r.citations,finishReason:r.finish_reason??void 0,error:r.error??void 0,streaming:!1})}function Be(e){const r=Date.now(),t=new Date().setHours(0,0,0,0),s=[{label:"Today",items:[]},{label:"Previous 7 Days",items:[]},{label:"Previous 30 Days",items:[]},{label:"Older",items:[]}];for(const n of[...e].sort((c,o)=>Date.parse(o.updated_at)-Date.parse(c.updated_at))){const c=Date.parse(n.updated_at),o=r-c;c>=t?s[0].items.push(n):o<7*864e5?s[1].items.push(n):o<30*864e5?s[2].items.push(n):s[3].items.push(n)}return s.filter(n=>n.items.length>0)}export{fe as A,Fe as B,$ as C,Y as D,Le as E,de as F,he as G,pe as H,ye as M,Te as P,xe as R,Ce as S,ve as T,Se as W,we as a,be as b,Ie as c,Ne as d,M as e,O as f,Ae as g,I as h,ne as i,Ee as j,He as k,Me as l,ge as m,me as n,Be as o,ue as p,ke as q,je as r,Oe as s,qe as t,_e as u,Pe as v,$e as w,Re as x,De as y,ae as z};
|
|
|
|
| 1 |
+
import{d as Q,j as a,r as C,C as J,R as d,c as F,e as U}from"./index-DaC9z2lA.js";import{C as X}from"./chevron-down-B4Nu78fZ.js";import{u as Z}from"./useQuery-DaHFL0rL.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 ee=Q("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"}]]),ue=({light:e})=>a.jsx("span",{className:`chat-spinner${e?" chat-spinner-light":""}`}),he=({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"})}),de=()=>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"})]}),pe=({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"})]}),fe=()=>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"})}),ge=()=>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"})}),me=()=>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"})]}),ve=()=>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"})}),te=[{provider:"huggingface",label:"Inference Providers"},{provider:"openrouter",label:"OpenRouter"}],ye=({models:e,selectedModel:r,onModelChange:t,disabled:s})=>{var o,i;const n=((o=e.find(u=>u.id===r))==null?void 0:o.label)??`${r} (unavailable)`,c=e.filter(u=>!u.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:n}):a.jsxs("span",{className:`chat-model-picker${s?" is-disabled":""}`,children:[a.jsx("span",{className:"chat-model-picker-sizer","aria-hidden":"true",children:n}),a.jsxs("select",{className:"chat-model-select",value:r,disabled:s,onChange:u=>t(u.target.value),"aria-label":"Research model",children:[!e.some(u=>u.id===r)&&a.jsx("option",{value:r,disabled:!0,children:n}),c.map(u=>a.jsx("option",{value:u.id,children:u.label},u.id)),te.map(({provider:u,label:v})=>{const h=e.filter(p=>p.provider===u);return h.length===0?null:a.jsx("optgroup",{label:v,children:h.map(p=>a.jsx("option",{value:p.id,children:p.label},p.id))},u)})]}),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"})})]})},R=[{value:"low",label:"Low",description:"Faster and more concise"},{value:"high",label:"High",description:"More thorough"},{value:"max",label:"Max",description:"Deepest and slowest"}],xe=({value:e,onChange:r,disabled:t=!1})=>{const[s,n]=C.useState(!1),c=C.useRef(null),o=R.find(i=>i.value===e)??R[0];return C.useEffect(()=>{if(!s)return;const i=v=>{var h;(h=c.current)!=null&&h.contains(v.target)||n(!1)},u=v=>{v.key==="Escape"&&n(!1)};return document.addEventListener("mousedown",i),document.addEventListener("keydown",u),()=>{document.removeEventListener("mousedown",i),document.removeEventListener("keydown",u)}},[s]),C.useEffect(()=>{t&&n(!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: ${o.label}`,"aria-haspopup":"listbox","aria-expanded":s,disabled:t,onClick:()=>n(i=>!i),children:[a.jsx("span",{children:o.label}),a.jsx(X,{size:13,"aria-hidden":"true"})]}),s&&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"}),R.map(i=>a.jsxs("button",{type:"button",className:`chat-effort-option${i.value===e?" is-selected":""}`,role:"option","aria-selected":i.value===e,onClick:()=>{r(i.value),n(!1)},children:[a.jsxs("span",{className:"chat-effort-option-copy",children:[a.jsx("strong",{children:i.label}),a.jsx("small",{children:i.description})]}),i.value===e&&a.jsx(J,{size:15,"aria-hidden":"true"})]},i.value))]})]})},we=({text:e,mentions:r,scrollTop:t=0,variant:s="composer"})=>{const n=[];let c=0;for(const o of[...r].sort((i,u)=>i.start-u.start)){const i=e.slice(o.start,o.end),u=i===o.title||i===`@${o.title}`;o.start<c||o.end>e.length||!u||(n.push(e.slice(c,o.start)),n.push(a.jsx("span",{className:`chat-paper-inline-highlight${o.unavailable?" is-unavailable":""}`,"data-paper-route-id":o.route_id,children:i},o.key)),c=o.end)}return n.push(e.slice(c)),e.endsWith(`
|
| 7 |
+
`)&&n.push(""),a.jsx("div",{"aria-hidden":"true",className:`chat-paper-highlight-layer chat-paper-highlight-layer-${s}`,children:a.jsx("div",{style:{transform:`translateY(-${t}px)`},children:n})})},_e=({open:e,query:r,results:t,activeIndex:s,loading:n,error:c,onSelect:o,id:i="chat-paper-picker",optionIdPrefix:u="chat-paper-option"})=>{if(!e)return null;const v=r.trim()?n?"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:i,role:"listbox","aria-label":"Paper results",children:[a.jsx("div",{className:"chat-paper-picker-status",role:"status","aria-live":"polite",children:v}),t.map((h,p)=>{const P=h.arxiv_id||h.id,S=h.arxiv_id||(()=>{try{return h.source_url?new URL(h.source_url).hostname:"External resource"}catch{return"External resource"}})();return a.jsxs("button",{type:"button",id:`${u}-${p}`,role:"option","aria-selected":p===s,className:`chat-paper-option${p===s?" is-active":""}`,onMouseDown:E=>{E.preventDefault(),o(h)},children:[a.jsx("span",{className:"chat-paper-option-title",children:h.title}),a.jsx("span",{className:"chat-paper-option-meta",children:S})]},P)})]})},se=10,re=3;function B(e,r){const s=e.slice(0,r).lastIndexOf("@");if(s<0)return null;const n=s>0?e[s-1]:"";if(n&&/[\p{L}\p{M}\p{N}_@]/u.test(n))return null;const c=e.slice(s+1,r);return/[\n\r@]/.test(c)?null:{start:s,end:r,query:c}}function W(e,r,t){let s=0;for(;s<e.length&&s<r.length&&e[s]===r[s];)s+=1;let n=0;for(;n<e.length-s&&n<r.length-s&&e[e.length-1-n]===r[r.length-1-n];)n+=1;const c=e.length-n,o=r.length-e.length;return t.flatMap(i=>i.end<=s?[i]:i.start>=c?[{...i,start:i.start+o,end:i.end+o}]:[])}function be({draft:e,onChange:r,enabled:t,textareaRef:s}){var L;const n=`chat-paper-picker-${d.useId().replace(/:/g,"")}`,c=`${n}-option`,[o,i]=d.useState(null),[u,v]=d.useState(""),[h,p]=d.useState(0),[P,S]=d.useState(""),E=d.useRef(new Set);d.useEffect(()=>{t||i(null)},[t]),d.useEffect(()=>{const l=window.setTimeout(()=>v((o==null?void 0:o.query.trim())??""),150);return()=>window.clearTimeout(l)},[o==null?void 0:o.query]);const w=Z({queryKey:["chat-paper-mention-search",u.toLowerCase()],queryFn:({signal:l})=>F.searchPapers(u,1,10,"hybrid",l),enabled:t&&!!o&&u.length>=1,staleTime:3e4,refetchOnWindowFocus:!1,retry:!1}),g=d.useMemo(()=>{var l;return((l=w.data)==null?void 0:l.results)??[]},[(L=w.data)==null?void 0:L.results]);d.useEffect(()=>p(0),[u]),d.useEffect(()=>{var l;(l=document.getElementById(`${c}-${h}`))==null||l.scrollIntoView({block:"nearest"})},[h,c]);const K=d.useCallback(l=>{var y;if(!t){i(null);return}const f=l??((y=s.current)==null?void 0:y.selectionStart)??e.text.length;if(e.paperMentions.some(_=>f>_.start&&f<=_.end)){i(null);return}i(B(e.text,f))},[e.paperMentions,e.text,t,s]),V=d.useCallback((l,f)=>{var k;const y=W(e.text,l,e.paperMentions);r({text:l,paperMentions:y});const x=f??((k=s.current)==null?void 0:k.selectionStart)??l.length;t&&!y.some(j=>x>j.start&&x<=j.end)?i(B(l,x)):i(null)},[e,t,r,s]),D=d.useCallback(l=>{if(!o)return!1;const f=l.arxiv_id||l.id,y=new Set(e.paperMentions.map(b=>b.route_id));if(e.paperMentions.length>=se)return S("A message can contain at most 10 paper mentions."),!1;if(!y.has(f)&&y.size>=re)return S("A message can attach at most 3 distinct papers."),!1;const _=l.title,x=e.text.slice(o.end),k=x.length===0,j=e.text.slice(0,o.start)+_+(k?" ":"")+x,G=W(e.text,j,e.paperMentions),H={key:crypto.randomUUID(),route_id:f,title:l.title,source:l.source==="external"?"external":"arxiv",start:o.start,end:o.start+_.length};return r({text:j,paperMentions:[...G,H].sort((b,T)=>b.start-T.start)}),i(null),S(""),window.requestAnimationFrame(()=>{var T,q;const b=H.end+(k||x.startsWith(" ")?1:0);(T=s.current)==null||T.focus(),(q=s.current)==null||q.setSelectionRange(b,b)}),E.current.has(f)||(E.current.add(f),F.prewarmChatPaperContext(f).catch(()=>{})),!0},[o,e,r,s]),z=d.useCallback(l=>!o||l.nativeEvent.isComposing?!1:l.key==="Tab"?(i(null),!1):l.key==="Escape"?(l.preventDefault(),i(null),!0):l.key==="ArrowDown"||l.key==="ArrowUp"?(l.preventDefault(),g.length&&p(f=>l.key==="ArrowDown"?(f+1)%g.length:(f-1+g.length)%g.length),!0):l.key==="Home"&&g.length?(l.preventDefault(),p(0),!0):l.key==="End"&&g.length?(l.preventDefault(),p(g.length-1),!0):l.key==="Enter"&&!l.shiftKey?(l.preventDefault(),g[h]?D(g[h]):w.isFetching||i(null),!0):!1,[o,h,g,w.isFetching,D]);return{open:!!o,query:(o==null?void 0:o.query)??"",results:g,activeIndex:h,loading:w.isFetching,error:w.isError,message:P,pickerId:n,optionIdPrefix:c,updateText:V,refresh:K,select:D,keyDown:z,close:()=>i(null)}}const Se=({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(ee,{size:15,"aria-hidden":"true"}),a.jsx("span",{children:"Web"})]}),$="pwc:chat-oauth-draft",M="pwc:chat-oauth-model",I="pwc:chat-oauth-auto-send",ne="pwc:chat-oauth-attempted",A="pwc:chat-web-search-enabled",O="pwc:chat-reasoning-effort";function ke(e,r,t={}){const s=typeof e=="string"?e:e.text,n=s.length-s.trimStart().length,c=s.trim();if(!c)return;const o=n+c.length,i={text:c,paperMentions:typeof e=="string"?[]:e.paperMentions.filter(u=>u.start>=n&&u.end<=o).map(u=>({...u,start:u.start-n,end:u.end-n}))};sessionStorage.setItem($,i.paperMentions.length?JSON.stringify(i):c),t.autoSend===!1?sessionStorage.removeItem(I):sessionStorage.setItem(I,"1"),r?sessionStorage.setItem(M,r):sessionStorage.removeItem(M),t.webSearchEnabled?sessionStorage.setItem(A,"1"):sessionStorage.removeItem(A),sessionStorage.setItem(O,t.reasoningEffort??"low")}function je(){var s;if(typeof window>"u"||sessionStorage.getItem(I)!=="1")return null;const e=(s=sessionStorage.getItem($))==null?void 0:s.trim();if(!e)return null;let r={text:e,paperMentions:[]};try{const n=JSON.parse(e);typeof n.text=="string"&&Array.isArray(n.paperMentions)&&(r=n)}catch{}const t=r.text.trim();return t?{prompt:t,draft:{...r,text:t},model:sessionStorage.getItem(M),webSearchEnabled:sessionStorage.getItem(A)==="1",reasoningEffort:["low","high","max"].includes(sessionStorage.getItem(O)??"")?sessionStorage.getItem(O):"low"}:null}function Ee(){sessionStorage.removeItem($),sessionStorage.removeItem(M),sessionStorage.removeItem(I),sessionStorage.removeItem(ne),sessionStorage.removeItem(A),sessionStorage.removeItem(O)}const Y="deepseek-ai/DeepSeek-V4-Flash-0731",Te=[{id:Y,label:"DeepSeek V4 Flash",provider:"openrouter"}],Ce=[{id:Y,label:"DeepSeek V4 Flash",provider:"openrouter"}];async function m(e,r){const t=await fetch(U(e),{credentials:"include",headers:{"Content-Type":"application/json",...r==null?void 0:r.headers},...r});if(!t.ok){const s=await t.json().catch(()=>null),n=s==null?void 0:s.detail;throw new Error((n==null?void 0:n.message)||n||`Chat request failed (${t.status})`)}return t.status===204?void 0:t.json()}class ae extends Error{constructor(r,t){super(r),this.status=t}}async function oe(e){const r=await fetch(U(e),{headers:{Accept:"application/json"}});if(!r.ok){const t=await r.json().catch(()=>null),s=t==null?void 0:t.detail;throw new ae((s==null?void 0:s.message)||s||`Shared conversation request failed (${r.status})`,r.status)}return r.json()}async function Me(){const e=[];let r=null;do{const t=new URLSearchParams({limit:"50"});r&&t.set("cursor",r);const s=await m(`/api/v1/chat/sessions?${t.toString()}`);e.push(...s.items),r=s.next_cursor}while(r&&e.length<100);return e}function Ie(e,r="low"){return m("/api/v1/chat/sessions",{method:"POST",body:JSON.stringify({selected_model:e||null,reasoning_effort:r})})}function Ae(e){return m(`/api/v1/chat/sessions/${e}`)}function Oe(e,r){return m(`/api/v1/chat/sessions/${e}`,{method:"PATCH",body:JSON.stringify(r)})}function Pe(e){return m(`/api/v1/chat/sessions/${e}`,{method:"DELETE"})}function De(){return m("/api/v1/chat/sessions/archive-old",{method:"POST"})}function Re(){return m("/api/v1/chat/sessions/archive-oldest",{method:"POST"})}function Ne(e){return m(`/api/v1/chat/sessions/${e}/cancel`,{method:"POST"})}function $e(e){return m(`/api/v1/chat/sessions/${e}/share`,{method:"POST"})}function Le(e){return oe(`/api/v1/chat/shares/${encodeURIComponent(e)}`)}async function He(){return m("/api/v1/chat/models")}function N(e,r){const t=e.map(s=>s.kind==="reasoning"?{...s,active:!1,open:!1}:s.kind==="tool"?{...s,status:s.status==="running"?"error":s.status,open:r&&(s.status==="error"||s.status==="denied"||s.status==="running")}:{...s,done:!0});return t.filter((s,n)=>{const c=t[n-1];return!(s.kind==="reasoning"&&(c==null?void 0:c.kind)==="reasoning"&&s.text===c.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:N(t.display_blocks,!0),followups:t.followups,citations:t.citations,finishReason:t.finish_reason??void 0,streaming:!1}];const s={id:t.id,role:"user",text:t.content,paperMentions:(t.paper_mentions??[]).map(c=>({...c,key:c.occurrence_id})),revision:t.revision,status:t.status,error:t.status==="complete"?void 0:t.error_code||t.status};if(!["error","interrupted"].includes(t.status))return[s];const n=t.status==="interrupted";return[s,{id:`${t.id}-${n?"interrupted":"error"}`,role:"assistant",blocks:N(t.display_blocks,!0),streaming:!1,finishReason:n?"stopped":void 0,error:n?void 0:r(t.error_code),errorCode:n?void 0:t.error_code??void 0}]})}function Fe(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}))}:{id:r.id,role:"assistant",blocks:N(r.display_blocks,!1),citations:r.citations,finishReason:r.finish_reason??void 0,error:r.error??void 0,streaming:!1})}function Be(e){const r=Date.now(),t=new Date().setHours(0,0,0,0),s=[{label:"Today",items:[]},{label:"Previous 7 Days",items:[]},{label:"Previous 30 Days",items:[]},{label:"Older",items:[]}];for(const n of[...e].sort((c,o)=>Date.parse(o.updated_at)-Date.parse(c.updated_at))){const c=Date.parse(n.updated_at),o=r-c;c>=t?s[0].items.push(n):o<7*864e5?s[1].items.push(n):o<30*864e5?s[2].items.push(n):s[3].items.push(n)}return s.filter(n=>n.items.length>0)}export{fe as A,Fe as B,$ as C,Y as D,Le as E,de as F,he as G,pe as H,ye as M,Te as P,xe as R,Ce as S,ve as T,Se as W,we as a,_e as b,Ie as c,Ne as d,M as e,O as f,Ae as g,I as h,ne as i,Ee as j,He as k,Me as l,ge as m,me as n,Be as o,ue as p,ke as q,je as r,Oe as s,qe as t,be as u,Pe as v,$e as w,Re as x,De as y,ae as z};
|
assets/{chevron-down-kEL7SG7P.js → chevron-down-B4Nu78fZ.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
import{d as o}from"./index-
|
| 2 |
* @license lucide-react v0.462.0 - ISC
|
| 3 |
*
|
| 4 |
* This source code is licensed under the ISC license.
|
|
|
|
| 1 |
+
import{d as o}from"./index-DaC9z2lA.js";/**
|
| 2 |
* @license lucide-react v0.462.0 - ISC
|
| 3 |
*
|
| 4 |
* This source code is licensed under the ISC license.
|
assets/{circle-check-CY45reoB.js → circle-check-DNZM3-BA.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
import{d as c}from"./index-
|
| 2 |
* @license lucide-react v0.462.0 - ISC
|
| 3 |
*
|
| 4 |
* This source code is licensed under the ISC license.
|
|
|
|
| 1 |
+
import{d as c}from"./index-DaC9z2lA.js";/**
|
| 2 |
* @license lucide-react v0.462.0 - ISC
|
| 3 |
*
|
| 4 |
* This source code is licensed under the ISC license.
|
assets/{codexAddEvals-BTetyjem.js → codexAddEvals-C1rXVNOh.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
import{d as o,j as i,v as c,aa as d,e as n}from"./index-
|
| 2 |
* @license lucide-react v0.462.0 - ISC
|
| 3 |
*
|
| 4 |
* This source code is licensed under the ISC license.
|
|
|
|
| 1 |
+
import{d as o,j as i,v as c,aa as d,e as n}from"./index-DaC9z2lA.js";/**
|
| 2 |
* @license lucide-react v0.462.0 - ISC
|
| 3 |
*
|
| 4 |
* This source code is licensed under the ISC license.
|
assets/{components-o6x7RW1I.js → components-C8eWDsbC.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{k as R,R as p,c as E,j as e,L,u as S}from"./index-C7unMYuh.js";import{L as T,a as P}from"./LatexTitle-DDjP6qv1.js";import{h as Z,d as H,a as B,c as D}from"./transform-CSO4KHDB.js";import{s as C}from"./safeExternalHref-CkBrsh84.js";const G=({slug:t,label:s,onClick:r})=>{const a=S(),x=Z(t),o=D(x),i=c=>{if(c.stopPropagation(),r){r(t);return}a(`/tasks/${t}`)};return e.jsxs("span",{className:"tag-chip",style:{background:o.bg,color:o.text},onClick:i,children:[e.jsx("span",{className:"dot",style:{background:o.dot}}),H(s||B(t),t)]})},O=({method:t,onClick:s})=>{const r=S(),a=t.slug||t.id||"";if(!a)return null;const x=o=>{if(o.stopPropagation(),s){s(a);return}r(`/methods/${a}`)};return e.jsx("span",{className:"method-chip",onClick:x,children:t.name})},$={1:"SOTA 🏆",2:"#2",3:"#3"},F=({units:t,paperHref:s})=>{const r=p.useRef(null),a=p.useRef(null),[x,o]=p.useState(t.length);if(p.useLayoutEffect(()=>{const n=r.current,h=a.current;if(!n||!h||t.length===0)return;const l=f=>(h.textContent=f,h.scrollWidth),M=()=>{const f=n.clientWidth;if(f<=0)return;let d=0,u=0;for(const N of t){const m=l(N.measureText);if(d+m<=f)d+=m,u+=1;else break}if(u<t.length){for(;u>0&&d+l(` · +${t.length-u} more`)>f;)u-=1,d-=l(t[u].measureText);u===0&&(u=1)}o(u)};M();const g=new ResizeObserver(M);return g.observe(n),()=>g.disconnect()},[t]),t.length===0)return null;const i=t.slice(0,Math.max(1,Math.min(x,t.length))),c=t.length-i.length;return e.jsxs("div",{className:"paper-sota",ref:r,children:[e.jsx("span",{ref:a,className:"paper-sota-measure","aria-hidden":"true"}),i.map((n,h)=>e.jsxs(p.Fragment,{children:[n.isGroupStart?e.jsxs(e.Fragment,{children:[h>0&&e.jsx("span",{className:"paper-sota-sep",children:" · "}),e.jsx("span",{className:`paper-sota-label${n.rank===1?" paper-sota-label--sota":""}`,children:$[n.rank]}),e.jsx("span",{className:"paper-sota-on",children:" on "})]}):e.jsx("span",{className:"paper-sota-sep",children:", "}),n.slug?e.jsx(L,{to:`/benchmark/${n.slug}`,className:"paper-sota-name",onClick:l=>l.stopPropagation(),children:n.name}):e.jsx("span",{className:"paper-sota-name",children:n.name})]},`${n.slug||n.name}-${h}`)),c>0&&e.jsxs(L,{to:`${s}#results`,className:"paper-sota-more",onClick:n=>n.stopPropagation(),children:[" · +",c," more"]})]})},I=({ranks:t,paperHref:s,wrap:r=!1})=>{const a=p.useMemo(()=>{const o=[];let i=!0;for(const c of[1,2,3]){const n=t.filter(h=>h.rank===c);n.forEach((h,l)=>{const M=l===0,g=M?`${i?"":" · "}${$[c]} on `:", ";o.push({name:h.name,slug:h.slug,rank:c,isGroupStart:M,measureText:g+h.name})}),n.length>0&&(i=!1)}return o},[t]),x=p.useMemo(()=>[1,2,3].map(o=>t.filter(c=>c.rank===o).map((c,n)=>({name:c.name,slug:c.slug,rank:o,isGroupStart:n===0,measureText:(n===0?`${$[o]} on `:", ")+c.name}))).filter(o=>o.length>0),[t]);return r?x.length===0?null:e.jsx("div",{className:"paper-sota-stack",children:x.map(o=>e.jsx(F,{units:o,paperHref:s},o[0].rank))}):a.length===0?null:e.jsx(F,{units:a,paperHref:s})},K=({name:t,size:s=14})=>{const r={search:e.jsx("path",{d:"M11 11l3 3M7 12.5a5.5 5.5 0 110-11 5.5 5.5 0 010 11z",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round"}),arrowUp:e.jsx("path",{d:"M8 3l5 6H3l5-6z",fill:"currentColor"}),arrowLeft:e.jsx("path",{d:"M9 3l-4 5 4 5",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"}),arrowRight:e.jsx("path",{d:"M7 3l4 5-4 5",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"}),external:e.jsx("path",{d:"M5 3h-2v8h8v-2M9 3h3v3M7 9l5-5",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"}),github:e.jsx("path",{d:"M8 1a7 7 0 00-2.21 13.64c.35.06.48-.15.48-.34v-1.2c-1.95.42-2.36-.94-2.36-.94-.32-.81-.78-1.03-.78-1.03-.64-.43.05-.43.05-.43.7.05 1.07.72 1.07.72.62 1.07 1.64.76 2.04.58.06-.45.24-.76.44-.94-1.55-.18-3.18-.78-3.18-3.46 0-.76.27-1.39.72-1.88-.07-.18-.31-.89.07-1.86 0 0 .59-.19 1.92.72.56-.15 1.16-.23 1.75-.24.59 0 1.19.08 1.75.24 1.33-.9 1.92-.72 1.92-.72.38.97.14 1.68.07 1.86.45.49.72 1.12.72 1.88 0 2.69-1.64 3.28-3.19 3.45.25.22.48.65.48 1.32v1.95c0 .19.13.41.49.34A7 7 0 008 1z",fill:"currentColor"}),citation:e.jsx("path",{d:"M3 4h3v3H3zM4 7v1.5a1.5 1.5 0 01-1.5 1.5M9 4h3v3H9zM10 7v1.5a1.5 1.5 0 01-1.5 1.5",stroke:"currentColor",strokeWidth:"1.2",fill:"none"}),bookmark:e.jsx("path",{d:"M4 2h8v12l-4-3-4 3V2z",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinejoin:"round"}),chart:e.jsx("path",{d:"M2 13h12M3 11l3-4 3 2 4-5",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"}),chat:e.jsx("path",{d:"M3 3h10v7H7l-3 3v-3H3V3z",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinejoin:"round"}),pdf:e.jsx("path",{d:"M5 2h5l3 3v9H5V2z",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinejoin:"round"}),copy:e.jsx("path",{d:"M5 5h7v8H5V5zM3 3h7v2M3 3v8h2",stroke:"currentColor",strokeWidth:"1.2",fill:"none",strokeLinejoin:"round"}),sparkle:e.jsx("path",{d:"M8 2l1.2 3.8L13 7l-3.8 1.2L8 12l-1.2-3.8L3 7l3.8-1.2L8 2z",fill:"currentColor"}),user:e.jsx("path",{d:"M8 8a3 3 0 100-6 3 3 0 000 6zM2 14c0-3 2.5-5 6-5s6 2 6 5",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round"}),globe:e.jsx("path",{d:"M8 1.5a6.5 6.5 0 100 13 6.5 6.5 0 000-13zM1.5 8h13M8 1.5c1.7 1.9 2.6 4.2 2.6 6.5s-.9 4.6-2.6 6.5M8 1.5C6.3 3.4 5.4 5.7 5.4 8s.9 4.6 2.6 6.5",stroke:"currentColor",strokeWidth:"1.2",fill:"none",strokeLinecap:"round"}),menu:e.jsx("path",{d:"M2 4h12M2 8h12M2 12h12",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),close:e.jsx("path",{d:"M3 3l10 10M13 3L3 13",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})};return e.jsx("svg",{className:s===11?"icon-sm":"icon",viewBox:"0 0 16 16",width:s,height:s,children:r[t]})},U=({size:t=16})=>e.jsxs("svg",{className:"hf-logo",width:t,height:t,viewBox:"0 0 95 88",fill:"none","aria-hidden":"true",focusable:"false",children:[e.jsx("path",{fill:"#FFD21E",d:"M47.21 76.5a34.75 34.75 0 1 0 0-69.5 34.75 34.75 0 0 0 0 69.5Z"}),e.jsx("path",{fill:"#FF9D0B",d:"M81.96 41.75a34.75 34.75 0 1 0-69.5 0 34.75 34.75 0 0 0 69.5 0Zm-73.5 0a38.75 38.75 0 1 1 77.5 0 38.75 38.75 0 0 1-77.5 0Z"}),e.jsx("path",{fill:"#3A3B45",d:"M58.5 32.3c1.28.44 1.78 3.06 3.07 2.38a5 5 0 1 0-6.76-2.07c.61 1.15 2.55-.72 3.7-.32ZM34.95 32.3c-1.28.44-1.79 3.06-3.07 2.38a5 5 0 1 1 6.76-2.07c-.61 1.15-2.56-.72-3.7-.32Z"}),e.jsx("path",{fill:"#FF323D",d:"M46.96 56.29c9.83 0 13-8.76 13-13.26 0-2.34-1.57-1.6-4.09-.36-2.33 1.15-5.46 2.74-8.9 2.74-7.19 0-13-6.88-13-2.38s3.16 13.26 13 13.26Z"}),e.jsx("path",{fill:"#3A3B45",fillRule:"evenodd",clipRule:"evenodd",d:"M39.43 54a8.7 8.7 0 0 1 5.3-4.49c.4-.12.81.57 1.24 1.28.4.68.82 1.37 1.24 1.37.45 0 .9-.68 1.33-1.35.45-.7.89-1.38 1.32-1.25a8.61 8.61 0 0 1 5 4.17c3.73-2.94 5.1-7.74 5.1-10.7 0-2.34-1.57-1.6-4.09-.36l-.14.07c-2.31 1.15-5.39 2.67-8.77 2.67s-6.45-1.52-8.77-2.67c-2.6-1.29-4.23-2.1-4.23.29 0 3.05 1.46 8.06 5.47 10.97Z"}),e.jsx("path",{fill:"#FF9D0B",d:"M70.71 37a3.25 3.25 0 1 0 0-6.5 3.25 3.25 0 0 0 0 6.5ZM24.21 37a3.25 3.25 0 1 0 0-6.5 3.25 3.25 0 0 0 0 6.5ZM17.52 48c-1.62 0-3.06.66-4.07 1.87a5.97 5.97 0 0 0-1.33 3.76 7.1 7.1 0 0 0-1.94-.3c-1.55 0-2.95.59-3.94 1.66a5.8 5.8 0 0 0-.8 7 5.3 5.3 0 0 0-1.79 2.82c-.24.9-.48 2.8.8 4.74a5.22 5.22 0 0 0-.37 5.02c1.02 2.32 3.57 4.14 8.52 6.1 3.07 1.22 5.89 2 5.91 2.01a44.33 44.33 0 0 0 10.93 1.6c5.86 0 10.05-1.8 12.46-5.34 3.88-5.69 3.33-10.9-1.7-15.92-2.77-2.78-4.62-6.87-5-7.77-.78-2.66-2.84-5.62-6.25-5.62a5.7 5.7 0 0 0-4.6 2.46c-1-1.26-1.98-2.25-2.86-2.82A7.4 7.4 0 0 0 17.52 48Zm0 4c.51 0 1.14.22 1.82.65 2.14 1.36 6.25 8.43 7.76 11.18.5.92 1.37 1.31 2.14 1.31 1.55 0 2.75-1.53.15-3.48-3.92-2.93-2.55-7.72-.68-8.01.08-.02.17-.02.24-.02 1.7 0 2.45 2.93 2.45 2.93s2.2 5.52 5.98 9.3c3.77 3.77 3.97 6.8 1.22 10.83-1.88 2.75-5.47 3.58-9.16 3.58-3.81 0-7.73-.9-9.92-1.46-.11-.03-13.45-3.8-11.76-7 .28-.54.75-.76 1.34-.76 2.38 0 6.7 3.54 8.57 3.54.41 0 .7-.17.83-.6.79-2.85-12.06-4.05-10.98-8.17.2-.73.71-1.02 1.44-1.02 3.14 0 10.2 5.53 11.68 5.53.11 0 .2-.03.24-.1.74-1.2.33-2.04-4.9-5.2-5.21-3.16-8.88-5.06-6.8-7.33.24-.26.58-.38 1-.38 3.17 0 10.66 6.82 10.66 6.82s2.02 2.1 3.25 2.1c.28 0 .52-.1.68-.38.86-1.46-8.06-8.22-8.56-11.01-.34-1.9.24-2.85 1.31-2.85Z"}),e.jsx("path",{fill:"#FFD21E",d:"M38.6 76.69c2.75-4.04 2.55-7.07-1.22-10.84-3.78-3.77-5.98-9.3-5.98-9.3s-.82-3.2-2.69-2.9c-1.87.3-3.24 5.08.68 8.01 3.91 2.93-.78 4.92-2.29 2.17-1.5-2.75-5.62-9.82-7.76-11.18-2.13-1.35-3.63-.6-3.13 2.2.5 2.79 9.43 9.55 8.56 11-.87 1.47-3.93-1.71-3.93-1.71s-9.57-8.71-11.66-6.44c-2.08 2.27 1.59 4.17 6.8 7.33 5.23 3.16 5.64 4 4.9 5.2-.75 1.2-12.28-8.53-13.36-4.4-1.08 4.11 11.77 5.3 10.98 8.15-.8 2.85-9.06-5.38-10.74-2.18-1.7 3.21 11.65 6.98 11.76 7.01 4.3 1.12 15.25 3.49 19.08-2.12Z"}),e.jsx("path",{fill:"#FF9D0B",d:"M77.4 48c1.62 0 3.07.66 4.07 1.87a5.97 5.97 0 0 1 1.33 3.76 7.1 7.1 0 0 1 1.95-.3c1.55 0 2.95.59 3.94 1.66a5.8 5.8 0 0 1 .8 7 5.3 5.3 0 0 1 1.78 2.82c.24.9.48 2.8-.8 4.74a5.22 5.22 0 0 1 .37 5.02c-1.02 2.32-3.57 4.14-8.51 6.1-3.08 1.22-5.9 2-5.92 2.01a44.33 44.33 0 0 1-10.93 1.6c-5.86 0-10.05-1.8-12.46-5.34-3.88-5.69-3.33-10.9 1.7-15.92 2.78-2.78 4.63-6.87 5.01-7.77.78-2.66 2.83-5.62 6.24-5.62a5.7 5.7 0 0 1 4.6 2.46c1-1.26 1.98-2.25 2.87-2.82A7.4 7.4 0 0 1 77.4 48Zm0 4c-.51 0-1.13.22-1.82.65-2.13 1.36-6.25 8.43-7.76 11.18a2.43 2.43 0 0 1-2.14 1.31c-1.54 0-2.75-1.53-.14-3.48 3.91-2.93 2.54-7.72.67-8.01a1.54 1.54 0 0 0-.24-.02c-1.7 0-2.45 2.93-2.45 2.93s-2.2 5.52-5.97 9.3c-3.78 3.77-3.98 6.8-1.22 10.83 1.87 2.75 5.47 3.58 9.15 3.58 3.82 0 7.73-.9 9.93-1.46.1-.03 13.45-3.8 11.76-7-.29-.54-.75-.76-1.34-.76-2.38 0-6.71 3.54-8.57 3.54-.42 0-.71-.17-.83-.6-.8-2.85 12.05-4.05 10.97-8.17-.19-.73-.7-1.02-1.44-1.02-3.14 0-10.2 5.53-11.68 5.53-.1 0-.19-.03-.23-.1-.74-1.2-.34-2.04 4.88-5.2 5.23-3.16 8.9-5.06 6.8-7.33-.23-.26-.57-.38-.98-.38-3.18 0-10.67 6.82-10.67 6.82s-2.02 2.1-3.24 2.1a.74.74 0 0 1-.68-.38c-.87-1.46 8.05-8.22 8.55-11.01.34-1.9-.24-2.85-1.31-2.85Z"}),e.jsx("path",{fill:"#FFD21E",d:"M56.33 76.69c-2.75-4.04-2.56-7.07 1.22-10.84 3.77-3.77 5.97-9.3 5.97-9.3s.82-3.2 2.7-2.9c1.86.3 3.23 5.08-.68 8.01-3.92 2.93.78 4.92 2.28 2.17 1.51-2.75 5.63-9.82 7.76-11.18 2.13-1.35 3.64-.6 3.13 2.2-.5 2.79-9.42 9.55-8.55 11 .86 1.47 3.92-1.71 3.92-1.71s9.58-8.71 11.66-6.44c2.08 2.27-1.58 4.17-6.8 7.33-5.23 3.16-5.63 4-4.9 5.2.75 1.2 12.28-8.53 13.36-4.4 1.08 4.11-11.76 5.3-10.97 8.15.8 2.85 9.05-5.38 10.74-2.18 1.69 3.21-11.65 6.98-11.76 7.01-4.31 1.12-15.26 3.49-19.08-2.12Z"})]}),_=t=>{let s=2166136261;for(let r=0;r<t.length;r++)s=Math.imul(s^t.charCodeAt(r),16777619);return()=>(s=Math.imul(s^s>>>15,2246822507),s=Math.imul(s^s>>>13,3266489909),s^=s>>>16,(s>>>0)%1e4/1e4)},V=({paperId:t})=>{const s=_(t),r=160,a=220,x=[.85+s()*.1,.55+s()*.25],o=.45+s()*.3,i=[],c=9+Math.floor(s()*3);for(let k=0;k<c;k++)i.push(.55+s()*.4);const n=s()>.3,h=Math.floor(s()*3),l=[],M=6+Math.floor(s()*3);for(let k=0;k<M;k++)l.push(.5+s()*.45);const g="#9A9588",f="#3A352D",d=5,u=(r-d*2-2)/2,N=d,m=d+u+2;let b=d+2;const z=b;b+=6;const W=b+1;b+=5;const A=b;b+=3;const j=b+1;return e.jsx("div",{style:{width:r,height:a,background:"#FDFCF9",border:"1px solid var(--hairline-strong)",borderRadius:2,boxShadow:"0 1px 0 rgba(0,0,0,0.04), 0 4px 8px -4px rgba(0,0,0,0.08)",flexShrink:0,overflow:"hidden",position:"relative"},children:e.jsxs("svg",{width:r,height:a,viewBox:`0 0 ${r} ${a}`,style:{display:"block"},children:[x.map((k,v)=>e.jsx("rect",{x:d+(r-d*2)*(1-k)/2,y:z+v*2.4,width:(r-d*2)*k,height:1.4,fill:f,rx:.3},`t${v}`)),e.jsx("rect",{x:d+(r-d*2)*(1-o)/2,y:W,width:(r-d*2)*o,height:.9,fill:g,opacity:.7,rx:.2}),e.jsx("rect",{x:d,y:A,width:6,height:1,fill:f,opacity:.6}),i.map((k,v)=>{const y=j+v*2.1;return y>a-d-1?null:e.jsx("rect",{x:N,y,width:u*k,height:.8,fill:g,opacity:.55,rx:.2},`l${v}`)}),n&&e.jsxs("g",{children:[e.jsx("rect",{x:m,y:j,width:u,height:14,fill:"#F0EBE0",stroke:g,strokeWidth:.3,opacity:.9}),h===0&&e.jsx("g",{stroke:f,strokeWidth:.4,fill:"none",opacity:.6,children:e.jsx("polyline",{points:`${m+2},${j+11} ${m+6},${j+8} ${m+10},${j+9} ${m+14},${j+5} ${m+18},${j+6} ${m+22},${j+3}`})}),h===1&&e.jsxs("g",{opacity:.55,children:[e.jsx("circle",{cx:m+u/2,cy:j+7,r:3.5,fill:f}),e.jsx("rect",{x:m+2,y:j+11,width:u-4,height:1.5,fill:g})]}),h===2&&e.jsxs("g",{opacity:.55,children:[e.jsx("rect",{x:m+3,y:j+5,width:u-6,height:1,fill:f}),e.jsx("rect",{x:m+6,y:j+8,width:u-12,height:.8,fill:f})]})]}),l.map((k,v)=>{const y=j+(n?16:0)+v*2.1;return y>a-d-1?null:e.jsx("rect",{x:m,y,width:u*k,height:.8,fill:g,opacity:.55,rx:.2},`r${v}`)})]})})},q=({paperId:t,title:s,thumbnailUrl:r,priority:a=!1})=>{const[x,o]=p.useState(!1),[i,c]=p.useState(0),[n,h]=p.useState(a),l=p.useRef(null);p.useEffect(()=>{o(!1),c(0)},[r]);const M=p.useMemo(()=>{if(!r)return null;if(i===0)return r;const g=r.includes("?")?"&":"?";return`${r}${g}retry=${i}`},[r,i]);return p.useEffect(()=>{if(a||n)return;const g=l.current;if(!g)return;const f=new IntersectionObserver(([d])=>{d.isIntersecting&&(h(!0),f.disconnect())},{rootMargin:"250px"});return f.observe(g),()=>f.disconnect()},[a,n]),r&&!x?e.jsx("div",{ref:l,style:{width:160,height:220,background:"#FDFCF9",border:"1px solid var(--hairline-strong)",borderRadius:2,boxShadow:"0 1px 0 rgba(0,0,0,0.04), 0 4px 8px -4px rgba(0,0,0,0.08)",flexShrink:0,overflow:"hidden",position:"relative"},children:(a||n)&&M&&e.jsx("img",{src:M,alt:`Thumbnail for ${s}`,loading:a?"eager":"lazy",decoding:"async",fetchPriority:a?"high":"auto",style:{width:"100%",height:"100%",objectFit:"contain",display:"block"},onError:()=>{if(i<1){c(g=>g+1);return}o(!0)}},M)}):e.jsx(V,{paperId:t})},Y="language-modeling";function w(t){return t?t.toLowerCase().replace(/\(.*?\)/g," ").replace(/[^a-z]+/g," ").replace(/\bllm\b/g," ").replace(/\s+/g," ").trim().replace(/s$/,""):""}function Q(t){return w(t.slug)==="large language model"||w(t.name)==="large language model"}function J(t){return t.tags.includes(Y)?t.methods.filter(s=>!Q(s)):t.methods}const X=({name:t,slug:s,logoUrl:r})=>{const[a,x]=p.useState(!1);return!r||a?null:e.jsx(L,{to:`/orgs/${s}`,className:"paper-organization-logo","aria-label":`View ${t} organization`,title:t,children:e.jsx("img",{src:r,alt:"",onError:()=>x(!0)})})},oe=({paper:t,rank:s,showInstitution:r=!0,onClickTag:a})=>{const x=R(),o=`/paper/${t.id}`,i=p.useCallback(()=>{x.prefetchQuery({queryKey:["paper-arxiv",t.id],queryFn:()=>E.getPaperByArxivId(t.id,!0),staleTime:10*60*1e3})},[t.id,x]),c=t.authors.slice(0,3).join(", "),n=t.authors.length,h=J(t);return e.jsxs("article",{className:"paper-card",children:[s!=null&&e.jsx(L,{to:o,className:"paper-thumb-wrap",onFocus:i,onMouseEnter:i,children:e.jsx(q,{paperId:t.id,title:t.title,thumbnailUrl:t.thumbnailUrl,priority:s<=3})}),e.jsxs("div",{className:"paper-body",children:[e.jsxs("div",{className:"paper-body-main",children:[e.jsxs("h3",{className:"paper-title",children:[e.jsx(L,{to:o,onFocus:i,onMouseEnter:i,children:e.jsx(T,{title:t.title})}),r&&t.organizations.length>0&&e.jsx("span",{className:"paper-organization-logos",children:t.organizations.map(l=>e.jsx(X,{...l},l.slug))})]}),e.jsxs("div",{className:"paper-authors",children:[c,n>3&&e.jsxs("span",{children:[", ","+",n-3," authors"]}),t.date&&e.jsxs(e.Fragment,{children:[n>0?" · ":"",e.jsx("span",{children:t.date})]}),t.citations>0&&e.jsxs(e.Fragment,{children:[n>0||t.date?" · ":"",e.jsxs("span",{children:[t.citations.toLocaleString()," citations"]})]})]}),t.abstract&&e.jsx("p",{className:"paper-abstract",children:e.jsx(P,{text:t.abstract})}),t.sotaRanks.length>0&&e.jsx(I,{ranks:t.sotaRanks,paperHref:o}),(t.tags.length>0||h.length>0)&&e.jsxs("div",{className:"paper-tags paper-tags--clamped",children:[t.tags.map(l=>e.jsx(G,{slug:l,onClick:a},l)),h.map(l=>e.jsx(O,{method:l},l.id||l.slug||l.name))]})]}),(t.githubUrl||t.hfUrl)&&e.jsxs("div",{className:"paper-resources",children:[C(t.githubUrl)&&e.jsxs("a",{className:"paper-resource is-link",href:C(t.githubUrl)??void 0,target:"_blank",rel:"noopener noreferrer","aria-label":"Open GitHub repository",onClick:l=>l.stopPropagation(),children:[e.jsx(K,{name:"github",size:20}),t.velocity24h!=null&&t.velocity24h>0&&e.jsxs("span",{className:"resource-stat",children:[e.jsxs("span",{className:"resource-value",children:[e.jsx("span",{className:"gh-rate-arrow",children:"↑"}),ee(t.velocity24h)]}),e.jsx("span",{className:"resource-label",children:"stars / hr"})]})]}),C(t.hfUrl)&&t.hfKind&&e.jsxs("a",{className:"paper-resource is-link",href:C(t.hfUrl)??void 0,target:"_blank",rel:"noopener noreferrer","aria-label":`Open Hugging Face ${t.hfKind}`,onClick:l=>l.stopPropagation(),children:[e.jsx(U,{size:20}),e.jsxs("span",{className:"resource-stat",children:[e.jsx("span",{className:"resource-value",children:t.hfCount}),e.jsx("span",{className:"resource-label",children:t.hfKind})]})]})]})]})]})};function ee(t){return t.toFixed(1)}export{K as I,O as M,oe as P,I as S,G as T,q as a};
|
|
|
|
| 1 |
+
import{k as R,R as p,c as E,j as e,L,u as S}from"./index-DaC9z2lA.js";import{L as T,a as P}from"./LatexTitle-C6bpusZm.js";import{h as Z,d as H,a as B,c as D}from"./transform-By0Q02j6.js";import{s as C}from"./safeExternalHref-CkBrsh84.js";const G=({slug:t,label:s,onClick:r})=>{const a=S(),x=Z(t),o=D(x),i=c=>{if(c.stopPropagation(),r){r(t);return}a(`/tasks/${t}`)};return e.jsxs("span",{className:"tag-chip",style:{background:o.bg,color:o.text},onClick:i,children:[e.jsx("span",{className:"dot",style:{background:o.dot}}),H(s||B(t),t)]})},O=({method:t,onClick:s})=>{const r=S(),a=t.slug||t.id||"";if(!a)return null;const x=o=>{if(o.stopPropagation(),s){s(a);return}r(`/methods/${a}`)};return e.jsx("span",{className:"method-chip",onClick:x,children:t.name})},$={1:"SOTA 🏆",2:"#2",3:"#3"},F=({units:t,paperHref:s})=>{const r=p.useRef(null),a=p.useRef(null),[x,o]=p.useState(t.length);if(p.useLayoutEffect(()=>{const n=r.current,h=a.current;if(!n||!h||t.length===0)return;const l=f=>(h.textContent=f,h.scrollWidth),M=()=>{const f=n.clientWidth;if(f<=0)return;let d=0,u=0;for(const N of t){const m=l(N.measureText);if(d+m<=f)d+=m,u+=1;else break}if(u<t.length){for(;u>0&&d+l(` · +${t.length-u} more`)>f;)u-=1,d-=l(t[u].measureText);u===0&&(u=1)}o(u)};M();const g=new ResizeObserver(M);return g.observe(n),()=>g.disconnect()},[t]),t.length===0)return null;const i=t.slice(0,Math.max(1,Math.min(x,t.length))),c=t.length-i.length;return e.jsxs("div",{className:"paper-sota",ref:r,children:[e.jsx("span",{ref:a,className:"paper-sota-measure","aria-hidden":"true"}),i.map((n,h)=>e.jsxs(p.Fragment,{children:[n.isGroupStart?e.jsxs(e.Fragment,{children:[h>0&&e.jsx("span",{className:"paper-sota-sep",children:" · "}),e.jsx("span",{className:`paper-sota-label${n.rank===1?" paper-sota-label--sota":""}`,children:$[n.rank]}),e.jsx("span",{className:"paper-sota-on",children:" on "})]}):e.jsx("span",{className:"paper-sota-sep",children:", "}),n.slug?e.jsx(L,{to:`/benchmark/${n.slug}`,className:"paper-sota-name",onClick:l=>l.stopPropagation(),children:n.name}):e.jsx("span",{className:"paper-sota-name",children:n.name})]},`${n.slug||n.name}-${h}`)),c>0&&e.jsxs(L,{to:`${s}#results`,className:"paper-sota-more",onClick:n=>n.stopPropagation(),children:[" · +",c," more"]})]})},I=({ranks:t,paperHref:s,wrap:r=!1})=>{const a=p.useMemo(()=>{const o=[];let i=!0;for(const c of[1,2,3]){const n=t.filter(h=>h.rank===c);n.forEach((h,l)=>{const M=l===0,g=M?`${i?"":" · "}${$[c]} on `:", ";o.push({name:h.name,slug:h.slug,rank:c,isGroupStart:M,measureText:g+h.name})}),n.length>0&&(i=!1)}return o},[t]),x=p.useMemo(()=>[1,2,3].map(o=>t.filter(c=>c.rank===o).map((c,n)=>({name:c.name,slug:c.slug,rank:o,isGroupStart:n===0,measureText:(n===0?`${$[o]} on `:", ")+c.name}))).filter(o=>o.length>0),[t]);return r?x.length===0?null:e.jsx("div",{className:"paper-sota-stack",children:x.map(o=>e.jsx(F,{units:o,paperHref:s},o[0].rank))}):a.length===0?null:e.jsx(F,{units:a,paperHref:s})},K=({name:t,size:s=14})=>{const r={search:e.jsx("path",{d:"M11 11l3 3M7 12.5a5.5 5.5 0 110-11 5.5 5.5 0 010 11z",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round"}),arrowUp:e.jsx("path",{d:"M8 3l5 6H3l5-6z",fill:"currentColor"}),arrowLeft:e.jsx("path",{d:"M9 3l-4 5 4 5",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"}),arrowRight:e.jsx("path",{d:"M7 3l4 5-4 5",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"}),external:e.jsx("path",{d:"M5 3h-2v8h8v-2M9 3h3v3M7 9l5-5",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"}),github:e.jsx("path",{d:"M8 1a7 7 0 00-2.21 13.64c.35.06.48-.15.48-.34v-1.2c-1.95.42-2.36-.94-2.36-.94-.32-.81-.78-1.03-.78-1.03-.64-.43.05-.43.05-.43.7.05 1.07.72 1.07.72.62 1.07 1.64.76 2.04.58.06-.45.24-.76.44-.94-1.55-.18-3.18-.78-3.18-3.46 0-.76.27-1.39.72-1.88-.07-.18-.31-.89.07-1.86 0 0 .59-.19 1.92.72.56-.15 1.16-.23 1.75-.24.59 0 1.19.08 1.75.24 1.33-.9 1.92-.72 1.92-.72.38.97.14 1.68.07 1.86.45.49.72 1.12.72 1.88 0 2.69-1.64 3.28-3.19 3.45.25.22.48.65.48 1.32v1.95c0 .19.13.41.49.34A7 7 0 008 1z",fill:"currentColor"}),citation:e.jsx("path",{d:"M3 4h3v3H3zM4 7v1.5a1.5 1.5 0 01-1.5 1.5M9 4h3v3H9zM10 7v1.5a1.5 1.5 0 01-1.5 1.5",stroke:"currentColor",strokeWidth:"1.2",fill:"none"}),bookmark:e.jsx("path",{d:"M4 2h8v12l-4-3-4 3V2z",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinejoin:"round"}),chart:e.jsx("path",{d:"M2 13h12M3 11l3-4 3 2 4-5",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"}),chat:e.jsx("path",{d:"M3 3h10v7H7l-3 3v-3H3V3z",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinejoin:"round"}),pdf:e.jsx("path",{d:"M5 2h5l3 3v9H5V2z",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinejoin:"round"}),copy:e.jsx("path",{d:"M5 5h7v8H5V5zM3 3h7v2M3 3v8h2",stroke:"currentColor",strokeWidth:"1.2",fill:"none",strokeLinejoin:"round"}),sparkle:e.jsx("path",{d:"M8 2l1.2 3.8L13 7l-3.8 1.2L8 12l-1.2-3.8L3 7l3.8-1.2L8 2z",fill:"currentColor"}),user:e.jsx("path",{d:"M8 8a3 3 0 100-6 3 3 0 000 6zM2 14c0-3 2.5-5 6-5s6 2 6 5",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round"}),globe:e.jsx("path",{d:"M8 1.5a6.5 6.5 0 100 13 6.5 6.5 0 000-13zM1.5 8h13M8 1.5c1.7 1.9 2.6 4.2 2.6 6.5s-.9 4.6-2.6 6.5M8 1.5C6.3 3.4 5.4 5.7 5.4 8s.9 4.6 2.6 6.5",stroke:"currentColor",strokeWidth:"1.2",fill:"none",strokeLinecap:"round"}),menu:e.jsx("path",{d:"M2 4h12M2 8h12M2 12h12",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),close:e.jsx("path",{d:"M3 3l10 10M13 3L3 13",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})};return e.jsx("svg",{className:s===11?"icon-sm":"icon",viewBox:"0 0 16 16",width:s,height:s,children:r[t]})},U=({size:t=16})=>e.jsxs("svg",{className:"hf-logo",width:t,height:t,viewBox:"0 0 95 88",fill:"none","aria-hidden":"true",focusable:"false",children:[e.jsx("path",{fill:"#FFD21E",d:"M47.21 76.5a34.75 34.75 0 1 0 0-69.5 34.75 34.75 0 0 0 0 69.5Z"}),e.jsx("path",{fill:"#FF9D0B",d:"M81.96 41.75a34.75 34.75 0 1 0-69.5 0 34.75 34.75 0 0 0 69.5 0Zm-73.5 0a38.75 38.75 0 1 1 77.5 0 38.75 38.75 0 0 1-77.5 0Z"}),e.jsx("path",{fill:"#3A3B45",d:"M58.5 32.3c1.28.44 1.78 3.06 3.07 2.38a5 5 0 1 0-6.76-2.07c.61 1.15 2.55-.72 3.7-.32ZM34.95 32.3c-1.28.44-1.79 3.06-3.07 2.38a5 5 0 1 1 6.76-2.07c-.61 1.15-2.56-.72-3.7-.32Z"}),e.jsx("path",{fill:"#FF323D",d:"M46.96 56.29c9.83 0 13-8.76 13-13.26 0-2.34-1.57-1.6-4.09-.36-2.33 1.15-5.46 2.74-8.9 2.74-7.19 0-13-6.88-13-2.38s3.16 13.26 13 13.26Z"}),e.jsx("path",{fill:"#3A3B45",fillRule:"evenodd",clipRule:"evenodd",d:"M39.43 54a8.7 8.7 0 0 1 5.3-4.49c.4-.12.81.57 1.24 1.28.4.68.82 1.37 1.24 1.37.45 0 .9-.68 1.33-1.35.45-.7.89-1.38 1.32-1.25a8.61 8.61 0 0 1 5 4.17c3.73-2.94 5.1-7.74 5.1-10.7 0-2.34-1.57-1.6-4.09-.36l-.14.07c-2.31 1.15-5.39 2.67-8.77 2.67s-6.45-1.52-8.77-2.67c-2.6-1.29-4.23-2.1-4.23.29 0 3.05 1.46 8.06 5.47 10.97Z"}),e.jsx("path",{fill:"#FF9D0B",d:"M70.71 37a3.25 3.25 0 1 0 0-6.5 3.25 3.25 0 0 0 0 6.5ZM24.21 37a3.25 3.25 0 1 0 0-6.5 3.25 3.25 0 0 0 0 6.5ZM17.52 48c-1.62 0-3.06.66-4.07 1.87a5.97 5.97 0 0 0-1.33 3.76 7.1 7.1 0 0 0-1.94-.3c-1.55 0-2.95.59-3.94 1.66a5.8 5.8 0 0 0-.8 7 5.3 5.3 0 0 0-1.79 2.82c-.24.9-.48 2.8.8 4.74a5.22 5.22 0 0 0-.37 5.02c1.02 2.32 3.57 4.14 8.52 6.1 3.07 1.22 5.89 2 5.91 2.01a44.33 44.33 0 0 0 10.93 1.6c5.86 0 10.05-1.8 12.46-5.34 3.88-5.69 3.33-10.9-1.7-15.92-2.77-2.78-4.62-6.87-5-7.77-.78-2.66-2.84-5.62-6.25-5.62a5.7 5.7 0 0 0-4.6 2.46c-1-1.26-1.98-2.25-2.86-2.82A7.4 7.4 0 0 0 17.52 48Zm0 4c.51 0 1.14.22 1.82.65 2.14 1.36 6.25 8.43 7.76 11.18.5.92 1.37 1.31 2.14 1.31 1.55 0 2.75-1.53.15-3.48-3.92-2.93-2.55-7.72-.68-8.01.08-.02.17-.02.24-.02 1.7 0 2.45 2.93 2.45 2.93s2.2 5.52 5.98 9.3c3.77 3.77 3.97 6.8 1.22 10.83-1.88 2.75-5.47 3.58-9.16 3.58-3.81 0-7.73-.9-9.92-1.46-.11-.03-13.45-3.8-11.76-7 .28-.54.75-.76 1.34-.76 2.38 0 6.7 3.54 8.57 3.54.41 0 .7-.17.83-.6.79-2.85-12.06-4.05-10.98-8.17.2-.73.71-1.02 1.44-1.02 3.14 0 10.2 5.53 11.68 5.53.11 0 .2-.03.24-.1.74-1.2.33-2.04-4.9-5.2-5.21-3.16-8.88-5.06-6.8-7.33.24-.26.58-.38 1-.38 3.17 0 10.66 6.82 10.66 6.82s2.02 2.1 3.25 2.1c.28 0 .52-.1.68-.38.86-1.46-8.06-8.22-8.56-11.01-.34-1.9.24-2.85 1.31-2.85Z"}),e.jsx("path",{fill:"#FFD21E",d:"M38.6 76.69c2.75-4.04 2.55-7.07-1.22-10.84-3.78-3.77-5.98-9.3-5.98-9.3s-.82-3.2-2.69-2.9c-1.87.3-3.24 5.08.68 8.01 3.91 2.93-.78 4.92-2.29 2.17-1.5-2.75-5.62-9.82-7.76-11.18-2.13-1.35-3.63-.6-3.13 2.2.5 2.79 9.43 9.55 8.56 11-.87 1.47-3.93-1.71-3.93-1.71s-9.57-8.71-11.66-6.44c-2.08 2.27 1.59 4.17 6.8 7.33 5.23 3.16 5.64 4 4.9 5.2-.75 1.2-12.28-8.53-13.36-4.4-1.08 4.11 11.77 5.3 10.98 8.15-.8 2.85-9.06-5.38-10.74-2.18-1.7 3.21 11.65 6.98 11.76 7.01 4.3 1.12 15.25 3.49 19.08-2.12Z"}),e.jsx("path",{fill:"#FF9D0B",d:"M77.4 48c1.62 0 3.07.66 4.07 1.87a5.97 5.97 0 0 1 1.33 3.76 7.1 7.1 0 0 1 1.95-.3c1.55 0 2.95.59 3.94 1.66a5.8 5.8 0 0 1 .8 7 5.3 5.3 0 0 1 1.78 2.82c.24.9.48 2.8-.8 4.74a5.22 5.22 0 0 1 .37 5.02c-1.02 2.32-3.57 4.14-8.51 6.1-3.08 1.22-5.9 2-5.92 2.01a44.33 44.33 0 0 1-10.93 1.6c-5.86 0-10.05-1.8-12.46-5.34-3.88-5.69-3.33-10.9 1.7-15.92 2.78-2.78 4.63-6.87 5.01-7.77.78-2.66 2.83-5.62 6.24-5.62a5.7 5.7 0 0 1 4.6 2.46c1-1.26 1.98-2.25 2.87-2.82A7.4 7.4 0 0 1 77.4 48Zm0 4c-.51 0-1.13.22-1.82.65-2.13 1.36-6.25 8.43-7.76 11.18a2.43 2.43 0 0 1-2.14 1.31c-1.54 0-2.75-1.53-.14-3.48 3.91-2.93 2.54-7.72.67-8.01a1.54 1.54 0 0 0-.24-.02c-1.7 0-2.45 2.93-2.45 2.93s-2.2 5.52-5.97 9.3c-3.78 3.77-3.98 6.8-1.22 10.83 1.87 2.75 5.47 3.58 9.15 3.58 3.82 0 7.73-.9 9.93-1.46.1-.03 13.45-3.8 11.76-7-.29-.54-.75-.76-1.34-.76-2.38 0-6.71 3.54-8.57 3.54-.42 0-.71-.17-.83-.6-.8-2.85 12.05-4.05 10.97-8.17-.19-.73-.7-1.02-1.44-1.02-3.14 0-10.2 5.53-11.68 5.53-.1 0-.19-.03-.23-.1-.74-1.2-.34-2.04 4.88-5.2 5.23-3.16 8.9-5.06 6.8-7.33-.23-.26-.57-.38-.98-.38-3.18 0-10.67 6.82-10.67 6.82s-2.02 2.1-3.24 2.1a.74.74 0 0 1-.68-.38c-.87-1.46 8.05-8.22 8.55-11.01.34-1.9-.24-2.85-1.31-2.85Z"}),e.jsx("path",{fill:"#FFD21E",d:"M56.33 76.69c-2.75-4.04-2.56-7.07 1.22-10.84 3.77-3.77 5.97-9.3 5.97-9.3s.82-3.2 2.7-2.9c1.86.3 3.23 5.08-.68 8.01-3.92 2.93.78 4.92 2.28 2.17 1.51-2.75 5.63-9.82 7.76-11.18 2.13-1.35 3.64-.6 3.13 2.2-.5 2.79-9.42 9.55-8.55 11 .86 1.47 3.92-1.71 3.92-1.71s9.58-8.71 11.66-6.44c2.08 2.27-1.58 4.17-6.8 7.33-5.23 3.16-5.63 4-4.9 5.2.75 1.2 12.28-8.53 13.36-4.4 1.08 4.11-11.76 5.3-10.97 8.15.8 2.85 9.05-5.38 10.74-2.18 1.69 3.21-11.65 6.98-11.76 7.01-4.31 1.12-15.26 3.49-19.08-2.12Z"})]}),_=t=>{let s=2166136261;for(let r=0;r<t.length;r++)s=Math.imul(s^t.charCodeAt(r),16777619);return()=>(s=Math.imul(s^s>>>15,2246822507),s=Math.imul(s^s>>>13,3266489909),s^=s>>>16,(s>>>0)%1e4/1e4)},V=({paperId:t})=>{const s=_(t),r=160,a=220,x=[.85+s()*.1,.55+s()*.25],o=.45+s()*.3,i=[],c=9+Math.floor(s()*3);for(let k=0;k<c;k++)i.push(.55+s()*.4);const n=s()>.3,h=Math.floor(s()*3),l=[],M=6+Math.floor(s()*3);for(let k=0;k<M;k++)l.push(.5+s()*.45);const g="#9A9588",f="#3A352D",d=5,u=(r-d*2-2)/2,N=d,m=d+u+2;let b=d+2;const z=b;b+=6;const W=b+1;b+=5;const A=b;b+=3;const j=b+1;return e.jsx("div",{style:{width:r,height:a,background:"#FDFCF9",border:"1px solid var(--hairline-strong)",borderRadius:2,boxShadow:"0 1px 0 rgba(0,0,0,0.04), 0 4px 8px -4px rgba(0,0,0,0.08)",flexShrink:0,overflow:"hidden",position:"relative"},children:e.jsxs("svg",{width:r,height:a,viewBox:`0 0 ${r} ${a}`,style:{display:"block"},children:[x.map((k,v)=>e.jsx("rect",{x:d+(r-d*2)*(1-k)/2,y:z+v*2.4,width:(r-d*2)*k,height:1.4,fill:f,rx:.3},`t${v}`)),e.jsx("rect",{x:d+(r-d*2)*(1-o)/2,y:W,width:(r-d*2)*o,height:.9,fill:g,opacity:.7,rx:.2}),e.jsx("rect",{x:d,y:A,width:6,height:1,fill:f,opacity:.6}),i.map((k,v)=>{const y=j+v*2.1;return y>a-d-1?null:e.jsx("rect",{x:N,y,width:u*k,height:.8,fill:g,opacity:.55,rx:.2},`l${v}`)}),n&&e.jsxs("g",{children:[e.jsx("rect",{x:m,y:j,width:u,height:14,fill:"#F0EBE0",stroke:g,strokeWidth:.3,opacity:.9}),h===0&&e.jsx("g",{stroke:f,strokeWidth:.4,fill:"none",opacity:.6,children:e.jsx("polyline",{points:`${m+2},${j+11} ${m+6},${j+8} ${m+10},${j+9} ${m+14},${j+5} ${m+18},${j+6} ${m+22},${j+3}`})}),h===1&&e.jsxs("g",{opacity:.55,children:[e.jsx("circle",{cx:m+u/2,cy:j+7,r:3.5,fill:f}),e.jsx("rect",{x:m+2,y:j+11,width:u-4,height:1.5,fill:g})]}),h===2&&e.jsxs("g",{opacity:.55,children:[e.jsx("rect",{x:m+3,y:j+5,width:u-6,height:1,fill:f}),e.jsx("rect",{x:m+6,y:j+8,width:u-12,height:.8,fill:f})]})]}),l.map((k,v)=>{const y=j+(n?16:0)+v*2.1;return y>a-d-1?null:e.jsx("rect",{x:m,y,width:u*k,height:.8,fill:g,opacity:.55,rx:.2},`r${v}`)})]})})},q=({paperId:t,title:s,thumbnailUrl:r,priority:a=!1})=>{const[x,o]=p.useState(!1),[i,c]=p.useState(0),[n,h]=p.useState(a),l=p.useRef(null);p.useEffect(()=>{o(!1),c(0)},[r]);const M=p.useMemo(()=>{if(!r)return null;if(i===0)return r;const g=r.includes("?")?"&":"?";return`${r}${g}retry=${i}`},[r,i]);return p.useEffect(()=>{if(a||n)return;const g=l.current;if(!g)return;const f=new IntersectionObserver(([d])=>{d.isIntersecting&&(h(!0),f.disconnect())},{rootMargin:"250px"});return f.observe(g),()=>f.disconnect()},[a,n]),r&&!x?e.jsx("div",{ref:l,style:{width:160,height:220,background:"#FDFCF9",border:"1px solid var(--hairline-strong)",borderRadius:2,boxShadow:"0 1px 0 rgba(0,0,0,0.04), 0 4px 8px -4px rgba(0,0,0,0.08)",flexShrink:0,overflow:"hidden",position:"relative"},children:(a||n)&&M&&e.jsx("img",{src:M,alt:`Thumbnail for ${s}`,loading:a?"eager":"lazy",decoding:"async",fetchPriority:a?"high":"auto",style:{width:"100%",height:"100%",objectFit:"contain",display:"block"},onError:()=>{if(i<1){c(g=>g+1);return}o(!0)}},M)}):e.jsx(V,{paperId:t})},Y="language-modeling";function w(t){return t?t.toLowerCase().replace(/\(.*?\)/g," ").replace(/[^a-z]+/g," ").replace(/\bllm\b/g," ").replace(/\s+/g," ").trim().replace(/s$/,""):""}function Q(t){return w(t.slug)==="large language model"||w(t.name)==="large language model"}function J(t){return t.tags.includes(Y)?t.methods.filter(s=>!Q(s)):t.methods}const X=({name:t,slug:s,logoUrl:r})=>{const[a,x]=p.useState(!1);return!r||a?null:e.jsx(L,{to:`/orgs/${s}`,className:"paper-organization-logo","aria-label":`View ${t} organization`,title:t,children:e.jsx("img",{src:r,alt:"",onError:()=>x(!0)})})},oe=({paper:t,rank:s,showInstitution:r=!0,onClickTag:a})=>{const x=R(),o=`/paper/${t.id}`,i=p.useCallback(()=>{x.prefetchQuery({queryKey:["paper-arxiv",t.id],queryFn:()=>E.getPaperByArxivId(t.id,!0),staleTime:10*60*1e3})},[t.id,x]),c=t.authors.slice(0,3).join(", "),n=t.authors.length,h=J(t);return e.jsxs("article",{className:"paper-card",children:[s!=null&&e.jsx(L,{to:o,className:"paper-thumb-wrap",onFocus:i,onMouseEnter:i,children:e.jsx(q,{paperId:t.id,title:t.title,thumbnailUrl:t.thumbnailUrl,priority:s<=3})}),e.jsxs("div",{className:"paper-body",children:[e.jsxs("div",{className:"paper-body-main",children:[e.jsxs("h3",{className:"paper-title",children:[e.jsx(L,{to:o,onFocus:i,onMouseEnter:i,children:e.jsx(T,{title:t.title})}),r&&t.organizations.length>0&&e.jsx("span",{className:"paper-organization-logos",children:t.organizations.map(l=>e.jsx(X,{...l},l.slug))})]}),e.jsxs("div",{className:"paper-authors",children:[c,n>3&&e.jsxs("span",{children:[", ","+",n-3," authors"]}),t.date&&e.jsxs(e.Fragment,{children:[n>0?" · ":"",e.jsx("span",{children:t.date})]}),t.citations>0&&e.jsxs(e.Fragment,{children:[n>0||t.date?" · ":"",e.jsxs("span",{children:[t.citations.toLocaleString()," citations"]})]})]}),t.abstract&&e.jsx("p",{className:"paper-abstract",children:e.jsx(P,{text:t.abstract})}),t.sotaRanks.length>0&&e.jsx(I,{ranks:t.sotaRanks,paperHref:o}),(t.tags.length>0||h.length>0)&&e.jsxs("div",{className:"paper-tags paper-tags--clamped",children:[t.tags.map(l=>e.jsx(G,{slug:l,onClick:a},l)),h.map(l=>e.jsx(O,{method:l},l.id||l.slug||l.name))]})]}),(t.githubUrl||t.hfUrl)&&e.jsxs("div",{className:"paper-resources",children:[C(t.githubUrl)&&e.jsxs("a",{className:"paper-resource is-link",href:C(t.githubUrl)??void 0,target:"_blank",rel:"noopener noreferrer","aria-label":"Open GitHub repository",onClick:l=>l.stopPropagation(),children:[e.jsx(K,{name:"github",size:20}),t.velocity24h!=null&&t.velocity24h>0&&e.jsxs("span",{className:"resource-stat",children:[e.jsxs("span",{className:"resource-value",children:[e.jsx("span",{className:"gh-rate-arrow",children:"↑"}),ee(t.velocity24h)]}),e.jsx("span",{className:"resource-label",children:"stars / hr"})]})]}),C(t.hfUrl)&&t.hfKind&&e.jsxs("a",{className:"paper-resource is-link",href:C(t.hfUrl)??void 0,target:"_blank",rel:"noopener noreferrer","aria-label":`Open Hugging Face ${t.hfKind}`,onClick:l=>l.stopPropagation(),children:[e.jsx(U,{size:20}),e.jsxs("span",{className:"resource-stat",children:[e.jsx("span",{className:"resource-value",children:t.hfCount}),e.jsx("span",{className:"resource-label",children:t.hfKind})]})]})]})]})]})};function ee(t){return t.toFixed(1)}export{K as I,O as M,oe as P,I as S,G as T,q as a};
|