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-BatTVfsi.js → AiDeadlinesView-B0a0_cBw.js} +1 -1
- assets/BenchmarkDetailView-CXDMaWq-.js +2 -0
- assets/BenchmarkDetailView-EG8udsA_.js +0 -2
- assets/ClosedSourceEvalBadge-C7AzIzhI.js +0 -1
- assets/{ConferenceDetailView-D-q0JnNP.js → ConferenceDetailView-Bv6W24MH.js} +1 -1
- assets/{ConferenceTaskView-uvijbzui.js → ConferenceTaskView-CAFTNTCU.js} +1 -1
- assets/{ConferencesIndexView-DD8ItJ3B.js → ConferencesIndexView-ifL1qhwF.js} +1 -1
- assets/{CronDashboard-BAsbigmA.js → CronDashboard-BhyN9oNd.js} +1 -1
- assets/ExternalSourceEvalBadge-DGkzBdAp.js +1 -0
- assets/{FeedView-BGmD8u6n.js → FeedView-B_VF1yGc.js} +1 -1
- assets/{LatexTitle-6cIE2SFl.js → LatexTitle-ZG9klHzz.js} +1 -1
- assets/{MarkdownText-paBB6IBj.js → MarkdownText-m_1zRXOr.js} +0 -0
- assets/{MethodDetailView-vFS9-zPD.js → MethodDetailView-Cg9nUPc2.js} +1 -1
- assets/{MethodsIndexView-B1fobXH9.js → MethodsIndexView-Bo3XkphF.js} +1 -1
- assets/{NotFound-CGrh-lYw.js → NotFound-BWVDVznY.js} +1 -1
- assets/{OrganizationDetailView-BIfeDHR-.js → OrganizationDetailView-sc8cNKzl.js} +1 -1
- assets/{OrganizationTaskView-DkoRSwL3.js → OrganizationTaskView-CYrDR1Sl.js} +1 -1
- assets/{OrganizationsIndexView-DD1EhqgD.js → OrganizationsIndexView-DgpZOGfj.js} +1 -1
- assets/PaperDetailView-CFxpyu8J.js +0 -0
- assets/PaperDetailView-r5vGQ_3c.js +0 -47
- assets/{PapersListView-BI6t4bhS.js → PapersListView-BrLhcE2X.js} +1 -1
- assets/{SavedPapersView-yNtcliWs.js → SavedPapersView-TcAeTRzI.js} +1 -1
- assets/{SearchOverlay-Cof7H5n7.js → SearchOverlay-CCtrp8A2.js} +1 -1
- assets/{SettingsView-PAe0SGo2.js → SettingsView-CiMezArS.js} +1 -1
- assets/{SubmissionsDashboard-DZpno1Ux.js → SubmissionsDashboard-CUgo38w4.js} +1 -1
- assets/{SubmitView-UOEKZj2M.js → SubmitView-U9tCiVBg.js} +1 -1
- assets/{TagBrowseView-BnR1Teo9.js → TagBrowseView-BbTXrEUT.js} +2 -2
- assets/{TagsIndexView-vN3AOH1y.js → TagsIndexView-fzL9zmoE.js} +1 -1
- assets/{alert-BVkGa_Tq.js → alert-YjpxGuB-.js} +1 -1
- assets/{badge-C1LTMoIS.js → badge-BrTibTXh.js} +1 -1
- assets/components-B39WD1hZ.js +0 -1
- assets/components-CCZN6YfS.js +1 -0
- assets/{dialog-CfUUYXjw.js → dialog-DHhG_3Ep.js} +1 -1
- assets/{index-DjK_yrbe.js → index-CNvFYqmB.js} +0 -0
- assets/index-DMfE8oql.css +0 -0
- assets/index-j1HqzTQY.css +0 -0
- assets/{index-BlGd3n8Y.js → index-sNVSU2vm.js} +1 -1
- assets/{input-h2dFcLEy.js → input-DO8YPeri.js} +1 -1
- assets/{loader-circle-Cy5Q1yxQ.js → loader-circle-DWcwv_K5.js} +1 -1
- assets/{refresh-cw-BYtfzW19.js → refresh-cw-BeDQ2XgS.js} +1 -1
- assets/{skeleton-_kUFAeFV.js → skeleton-C9NKUBNg.js} +1 -1
- assets/{switch-Bs5IhEGZ.js → switch-j6Z98JHW.js} +1 -1
- assets/{textarea-zriuaL9R.js → textarea-7bEOXz2p.js} +1 -1
- assets/{transform-CH5QAIOs.js → transform-Cbu7h9fT.js} +1 -1
- assets/{useDebounce-C_f5or7w.js → useDebounce-CXMdQN8X.js} +1 -1
- assets/{useInfiniteQuery-FYtFSkZi.js → useInfiniteQuery-Vi6JDeF_.js} +1 -1
- assets/{useIntersectionObserver-BrFBJfJb.js → useIntersectionObserver-jmbd50BD.js} +1 -1
- assets/{useMutation-OcjJF2eh.js → useMutation-Bcfahw68.js} +1 -1
- assets/{usePapers-BcSgGxX-.js → usePapers-CldwRRal.js} +1 -1
- assets/{usePeriodFilter-CfXQTNJ-.js → usePeriodFilter-C6uXOQPx.js} +1 -1
assets/{AiDeadlinesView-BatTVfsi.js → AiDeadlinesView-B0a0_cBw.js}
RENAMED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
-
import{r as x,j as t,a as E}from"./index-
|
| 2 |
`)},C=e=>e.toISOString().replace(/[-:]/g,"").replace(/\.\d{3}/,""),Z=(e,a)=>{const n=new Date(a.deadline_at),r=new Date(n.getTime()+60*60*1e3),o=`${e.short_name||e.name} ${a.label||a.type||"deadline"}`,i=e.venue||[e.city,e.country].filter(Boolean).join(", "),s=`https://calendar.google.com/calendar/render?action=TEMPLATE&text=${encodeURIComponent(o)}&dates=${C(n)}/${C(r)}&details=${encodeURIComponent(R(e,a))}&location=${encodeURIComponent(i)}`;window.open(s,"_blank","noopener,noreferrer")},ee=(e,a)=>{const n=new Date(a.deadline_at),r=new Date(n.getTime()+60*60*1e3),o=`${e.short_name||e.name} ${a.label||a.type||"deadline"}`,i=e.venue||[e.city,e.country].filter(Boolean).join(", "),s=["BEGIN:VCALENDAR","VERSION:2.0","BEGIN:VEVENT",e.url?`URL:${e.url}`:null,`DTSTART:${C(n)}`,`DTEND:${C(r)}`,`SUMMARY:${o}`,`DESCRIPTION:${R(e,a).replace(/\n/g,"\\n")}`,i?`LOCATION:${i}`:null,"END:VEVENT","END:VCALENDAR"].filter(Boolean).join(`
|
| 3 |
`),g=new Blob([s],{type:"text/calendar;charset=utf-8"}),c=document.createElement("a");c.href=URL.createObjectURL(g),c.download=`${(e.short_name||e.name).toLowerCase().replace(/\s+/g,"-")}-deadline.ics`,document.body.appendChild(c),c.click(),document.body.removeChild(c),URL.revokeObjectURL(c.href)},te=({conf:e,open:a,onOpenChange:n})=>{const[r,o]=x.useState(()=>Date.now());x.useEffect(()=>{if(!a)return;o(Date.now());const d=setInterval(()=>o(Date.now()),1e3);return()=>clearInterval(d)},[a]);const i=x.useMemo(()=>e?I(e):[],[e]),s=x.useMemo(()=>e?T(e,r):null,[e,r]),g=e?z(e.start_date,e.end_date):null,c=e?e.venue||[e.city,e.country].filter(Boolean).join(", ")||e.location:null,p=s?new Date(s.deadline_at).getTime():null;return t.jsx(V,{open:a,onOpenChange:n,children:t.jsx(P,{className:"max-w-xl",style:{background:"var(--bg-elevated)",maxHeight:"85vh",overflowY:"auto"},children:e&&t.jsxs(t.Fragment,{children:[t.jsxs(G,{children:[t.jsx(Y,{asChild:!0,children:t.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.01em",margin:0},children:e.short_name?`${e.short_name} ${e.year??""}`.trim():e.name})}),e.short_name&&e.name||e.description?t.jsx(K,{asChild:!0,children:t.jsx("span",{style:{fontFamily:"var(--serif)",fontSize:14,color:"var(--ink-soft)"},children:e.short_name?e.name:e.description})}):null]}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:20,marginTop:4},children:[t.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:24},children:[g&&t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4},children:[t.jsx("span",{style:$,children:"Dates"}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:13,color:"var(--ink-soft)"},children:g})]}),c&&t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4},children:[t.jsx("span",{style:$,children:"Venue"}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:13,color:"var(--ink-soft)"},children:c})]})]}),p!=null&&t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4,padding:"12px 14px",borderRadius:8,background:"var(--bg-subtle)",border:"1px solid var(--hairline)"},children:[t.jsx("span",{style:$,children:"Next deadline in"}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:22,fontWeight:600,color:_(p,r)},children:J(p,r)})]}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[t.jsx("span",{style:$,children:"Important deadlines"}),i.length===0?t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:13,color:"var(--ink-faint)"},children:"No deadlines listed"}):i.map((d,m)=>{const y=new Date(d.deadline_at).getTime(),l=s!=null&&d.deadline_at===s.deadline_at&&d.type===s.type,u=y<=r;return t.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:12,padding:"8px 12px",borderRadius:6,background:l?"var(--accent-soft)":"transparent",border:l?"1px solid var(--hairline-strong)":"1px solid var(--hairline)",opacity:u&&!l?.55:1},children:[t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:2},children:[t.jsxs("span",{style:{fontFamily:"var(--mono)",fontSize:13,color:"var(--ink)",fontWeight:l?600:400},children:[d.label||k(d.type||"deadline"),l&&t.jsx("span",{style:{...$,marginLeft:8},children:"Next"})]}),t.jsxs("span",{style:{fontFamily:"var(--mono)",fontSize:12,color:"var(--ink-faint)"},children:[F(d.deadline_at),d.timezone?` · ${d.timezone}`:""]})]}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:12,fontWeight:600,whiteSpace:"nowrap",color:_(u?null:y,r)},children:X(y,r)})]},`${d.type??"deadline"}-${m}`)})]}),D(e).length>0&&t.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:D(e).map(d=>t.jsx("span",{className:"tag-chip",style:{background:"var(--bg-subtle)",color:"var(--ink-soft)"},children:k(d)},d))}),t.jsxs("div",{style:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:16,paddingTop:12,borderTop:"1px solid var(--hairline)"},children:[e.url&&t.jsx("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",style:{fontFamily:"var(--mono)",fontSize:12,color:"var(--accent-text)"},children:"Visit website ↗"}),s&&t.jsxs("div",{style:{display:"flex",gap:12,marginLeft:"auto"},children:[t.jsx("button",{type:"button",className:"tag-chip",onClick:()=>Z(e,s),style:{background:"var(--bg-subtle)",color:"var(--ink-soft)"},children:"+ Google Calendar"}),t.jsx("button",{type:"button",className:"tag-chip",onClick:()=>ee(e,s),style:{background:"var(--bg-subtle)",color:"var(--ink-soft)"},children:"+ Apple / .ics"})]})]})]})]})})})},M=({id:e,label:a,checked:n,onChange:r})=>t.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,fontFamily:"var(--mono)",fontSize:12,color:"var(--ink-soft)"},children:[t.jsx(B,{id:e,checked:n,onCheckedChange:r}),t.jsx("label",{htmlFor:e,style:{cursor:"pointer"},children:a})]}),ne=({conf:e,now:a,selectedDomains:n,onToggleDomain:r,onOpen:o})=>{const i=T(e,a),s=i??L(e),g=s?new Date(s.deadline_at).getTime():null,c=_(i?g:null,a),p=z(e.start_date,e.end_date),d=[e.city??null,e.country??null].filter(Boolean).join(", ");return t.jsxs("div",{role:"button",tabIndex:0,onClick:()=>o(e),onKeyDown:m=>{(m.key==="Enter"||m.key===" ")&&(m.preventDefault(),o(e))},style:{border:"1px solid var(--hairline)",borderRadius:8,padding:20,background:"var(--bg-elevated)",display:"flex",flexDirection:"column",gap:12,cursor:"pointer"},children:[t.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"baseline",gap:12},children:[t.jsx("h3",{style:{fontFamily:"var(--serif)",fontSize:20,fontWeight:500,letterSpacing:"-0.01em",margin:0},children:e.short_name?`${e.short_name} ${e.year??""}`.trim():e.name}),e.url&&t.jsx("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",onClick:m=>m.stopPropagation(),style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",whiteSpace:"nowrap"},children:"website ↗"})]}),t.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:12,paddingBottom:12,borderBottom:"1px solid var(--hairline)"},children:[t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:2},children:[t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)"},children:(s==null?void 0:s.label)||(s==null?void 0:s.type)||"Deadline"}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:12,color:"var(--ink-soft)"},children:s?`${F(s.deadline_at)}${s.timezone?` · ${s.timezone}`:""}`:"TBD"})]}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:14,fontWeight:600,color:c,whiteSpace:"nowrap"},children:g!=null?Q(g,a):"TBD"})]}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4,fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)"},children:[p&&t.jsx("span",{children:p}),d&&t.jsx("span",{children:d})]}),D(e).length>0&&t.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:D(e).map(m=>{const y=n.has(m);return t.jsx("button",{className:"tag-chip",onClick:l=>{l.stopPropagation(),r(m)},style:{background:y?"var(--ink)":"var(--bg-subtle)",color:y?"var(--bg)":"var(--ink-soft)"},children:k(m)},m)})})]})},ce=()=>{const[e,a]=x.useState(!0),[n,r]=x.useState(!1),[o,i]=x.useState(new Set),[s,g]=x.useState(null),c=x.useMemo(()=>Date.now(),[]),p=A({queryKey:["conference-deadlines"],queryFn:()=>E.getConferenceDeadlines(),staleTime:10*60*1e3}),d=l=>{i(u=>{const h=new Set(u);return h.has(l)?h.delete(l):h.add(l),h})},m=x.useMemo(()=>{var u;const l=new Map;return(u=p.data)==null||u.results.forEach(h=>{D(h).forEach(j=>l.set(j,(l.get(j)??0)+1))}),Array.from(l.entries()).sort((h,j)=>j[1]-h[1]).map(([h])=>h)},[p.data]),y=x.useMemo(()=>{var j;const u=(((j=p.data)==null?void 0:j.results)??[]).filter(f=>!(e&&f.tier!=="a"||o.size>0&&!D(f).some(v=>o.has(v))||!n&&!T(f,c))),h=f=>{const w=T(f,c);if(w)return{group:0,time:new Date(w.deadline_at).getTime()};const v=L(f);return{group:1,time:-(v?new Date(v.deadline_at).getTime():0)}};return[...u].sort((f,w)=>{const v=h(f),N=h(w);return v.group!==N.group?v.group-N.group:v.time-N.time})},[p.data,e,n,o,c]);return p.error?t.jsx("div",{className:"page",children:t.jsx(W,{variant:"destructive",children:t.jsx(O,{children:"Failed to load conference deadlines. Please try again."})})}):t.jsxs("div",{className:"page",children:[t.jsx("div",{className:"feed-header",children:t.jsxs("div",{children:[t.jsxs("h1",{className:"feed-title",children:["AI Conference ",t.jsx("em",{children:"Deadlines"})]}),t.jsx("div",{className:"feed-subtitle",children:"Upcoming submission deadlines for major AI conferences, counting down."})]})}),t.jsxs("div",{style:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:20,padding:"16px 0",borderBottom:"1px solid var(--hairline)",marginBottom:24},children:[t.jsx(M,{id:"top-tier-only",label:"Top tier only",checked:e,onChange:a}),t.jsx(M,{id:"show-past",label:"Show past conferences",checked:n,onChange:r})]}),m.length>0&&t.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:6,marginBottom:24},children:[m.map(l=>{const u=o.has(l);return t.jsx("button",{className:"tag-chip",onClick:()=>d(l),style:{background:u?"var(--ink)":"var(--bg-subtle)",color:u?"var(--bg)":"var(--ink-soft)"},children:k(l)},l)}),o.size>0&&t.jsx("button",{className:"tag-chip",onClick:()=>i(new Set),style:{background:"transparent",color:"var(--ink-faint)"},children:"Clear ✕"})]}),t.jsx("div",{className:"sort-bar",children:t.jsx("div",{className:"results-count",children:p.isLoading?"…":`${y.length} conferences`})}),p.isLoading?t.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(320px, 1fr))",gap:16},children:Array.from({length:6}).map((l,u)=>t.jsx(U,{className:"h-44"},u))}):y.length===0?t.jsxs("div",{className:"no-results",children:["No conferences match these filters",n?".":" — try enabling “Show past conferences”."]}):t.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(320px, 1fr))",gap:16},children:y.map(l=>t.jsx(ne,{conf:l,now:c,selectedDomains:o,onToggleDomain:d,onOpen:g},l.id))}),t.jsx(te,{conf:s,open:s!==null,onOpenChange:l=>{l||g(null)}})]})};export{ce as default};
|
|
|
|
| 1 |
+
import{r as x,j as t,a as E}from"./index-CNvFYqmB.js";import{u as A}from"./useQuery-B6TeiMq1.js";import{S as B}from"./switch-j6Z98JHW.js";import{S as U}from"./skeleton-C9NKUBNg.js";import{A as W,a as O}from"./alert-YjpxGuB-.js";import{D as V,a as P,b as G,c as Y,d as K}from"./dialog-DHhG_3Ep.js";import"./index-sNVSU2vm.js";const b=1e3*60*60*24,S={urgent:"#c0392b",soon:"#b9770e",normal:"#3f7d3f",passed:"var(--ink-faint)"},k=e=>e.split("-").map(a=>a.charAt(0).toUpperCase()+a.slice(1)).join(" "),q=new Set(["machine-learning","computer-vision","natural-language-processing","data-mining","robotics","computer-graphics","human-computer-interaction","web-search","signal-processing","representation-learning","reinforcement-learning","optimization-methods","large-language-models","information-retrieval","speech","mathematics"]),H=e=>e.trim().toLowerCase().replace(/\s+/g,"-"),D=e=>Array.from(new Set((e.tags??[]).map(H).filter(a=>q.has(a)))),F=e=>new Date(e).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),z=(e,a)=>{if(!e)return null;const n=new Date(`${e}T00:00:00`),r=a?new Date(`${a}T00:00:00`):null,o=s=>s.toLocaleDateString("en-US",{month:"long",day:"numeric"}),i=n.getFullYear();return r&&r.getTime()!==n.getTime()?n.getMonth()===r.getMonth()?`${o(n).replace(/\d+$/,"").trim()} ${n.getDate()}–${r.getDate()}, ${i}`:`${o(n)} – ${o(r)}, ${i}`:`${o(n)}, ${i}`},I=e=>[...e.deadlines??[]].sort((a,n)=>new Date(a.deadline_at).getTime()-new Date(n.deadline_at).getTime()),T=(e,a)=>I(e).find(n=>new Date(n.deadline_at).getTime()>a)??null,L=e=>{const a=I(e);return a.length?a[a.length-1]:null},Q=(e,a)=>{const n=e-a;if(n<=0)return"Deadline passed";const r=Math.floor(n/b);if(r>=1){const s=Math.floor((n-r*b)/36e5);return`in ${r}d ${s}h`}const o=Math.floor(n/(1e3*60*60));return o>=1?`in ${o}h`:`in ${Math.max(1,Math.floor(n/(1e3*60)))}m`},J=(e,a)=>{const n=e-a;if(n<=0)return"Deadline passed";const r=Math.floor(n/b),o=Math.floor(n%b/(1e3*60*60)),i=Math.floor(n%(1e3*60*60)/(1e3*60)),s=Math.floor(n%(1e3*60)/1e3);return`${r}d ${o}h ${i}m ${s}s`},_=(e,a)=>{if(e==null)return S.passed;const n=(e-a)/b;return n<=0?S.passed:n<=7?S.urgent:n<=30?S.soon:S.normal},$={fontFamily:"var(--mono)",fontSize:10,letterSpacing:"0.12em",textTransform:"uppercase",color:"var(--ink-faint)"},X=(e,a)=>{const n=Math.ceil((e-a)/b);return n<=0?"passed":`${n} ${n===1?"day":"days"}`},R=(e,a)=>{const n=z(e.start_date,e.end_date),r=e.venue||[e.city,e.country].filter(Boolean).join(", ");return[`${a.label||a.type||"Deadline"} for ${e.name}`,n?`Dates: ${n}`:null,r?`Location: ${r}`:null,e.url?`Website: ${e.url}`:null].filter(Boolean).join(`
|
| 2 |
`)},C=e=>e.toISOString().replace(/[-:]/g,"").replace(/\.\d{3}/,""),Z=(e,a)=>{const n=new Date(a.deadline_at),r=new Date(n.getTime()+60*60*1e3),o=`${e.short_name||e.name} ${a.label||a.type||"deadline"}`,i=e.venue||[e.city,e.country].filter(Boolean).join(", "),s=`https://calendar.google.com/calendar/render?action=TEMPLATE&text=${encodeURIComponent(o)}&dates=${C(n)}/${C(r)}&details=${encodeURIComponent(R(e,a))}&location=${encodeURIComponent(i)}`;window.open(s,"_blank","noopener,noreferrer")},ee=(e,a)=>{const n=new Date(a.deadline_at),r=new Date(n.getTime()+60*60*1e3),o=`${e.short_name||e.name} ${a.label||a.type||"deadline"}`,i=e.venue||[e.city,e.country].filter(Boolean).join(", "),s=["BEGIN:VCALENDAR","VERSION:2.0","BEGIN:VEVENT",e.url?`URL:${e.url}`:null,`DTSTART:${C(n)}`,`DTEND:${C(r)}`,`SUMMARY:${o}`,`DESCRIPTION:${R(e,a).replace(/\n/g,"\\n")}`,i?`LOCATION:${i}`:null,"END:VEVENT","END:VCALENDAR"].filter(Boolean).join(`
|
| 3 |
`),g=new Blob([s],{type:"text/calendar;charset=utf-8"}),c=document.createElement("a");c.href=URL.createObjectURL(g),c.download=`${(e.short_name||e.name).toLowerCase().replace(/\s+/g,"-")}-deadline.ics`,document.body.appendChild(c),c.click(),document.body.removeChild(c),URL.revokeObjectURL(c.href)},te=({conf:e,open:a,onOpenChange:n})=>{const[r,o]=x.useState(()=>Date.now());x.useEffect(()=>{if(!a)return;o(Date.now());const d=setInterval(()=>o(Date.now()),1e3);return()=>clearInterval(d)},[a]);const i=x.useMemo(()=>e?I(e):[],[e]),s=x.useMemo(()=>e?T(e,r):null,[e,r]),g=e?z(e.start_date,e.end_date):null,c=e?e.venue||[e.city,e.country].filter(Boolean).join(", ")||e.location:null,p=s?new Date(s.deadline_at).getTime():null;return t.jsx(V,{open:a,onOpenChange:n,children:t.jsx(P,{className:"max-w-xl",style:{background:"var(--bg-elevated)",maxHeight:"85vh",overflowY:"auto"},children:e&&t.jsxs(t.Fragment,{children:[t.jsxs(G,{children:[t.jsx(Y,{asChild:!0,children:t.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.01em",margin:0},children:e.short_name?`${e.short_name} ${e.year??""}`.trim():e.name})}),e.short_name&&e.name||e.description?t.jsx(K,{asChild:!0,children:t.jsx("span",{style:{fontFamily:"var(--serif)",fontSize:14,color:"var(--ink-soft)"},children:e.short_name?e.name:e.description})}):null]}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:20,marginTop:4},children:[t.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:24},children:[g&&t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4},children:[t.jsx("span",{style:$,children:"Dates"}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:13,color:"var(--ink-soft)"},children:g})]}),c&&t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4},children:[t.jsx("span",{style:$,children:"Venue"}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:13,color:"var(--ink-soft)"},children:c})]})]}),p!=null&&t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4,padding:"12px 14px",borderRadius:8,background:"var(--bg-subtle)",border:"1px solid var(--hairline)"},children:[t.jsx("span",{style:$,children:"Next deadline in"}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:22,fontWeight:600,color:_(p,r)},children:J(p,r)})]}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[t.jsx("span",{style:$,children:"Important deadlines"}),i.length===0?t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:13,color:"var(--ink-faint)"},children:"No deadlines listed"}):i.map((d,m)=>{const y=new Date(d.deadline_at).getTime(),l=s!=null&&d.deadline_at===s.deadline_at&&d.type===s.type,u=y<=r;return t.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:12,padding:"8px 12px",borderRadius:6,background:l?"var(--accent-soft)":"transparent",border:l?"1px solid var(--hairline-strong)":"1px solid var(--hairline)",opacity:u&&!l?.55:1},children:[t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:2},children:[t.jsxs("span",{style:{fontFamily:"var(--mono)",fontSize:13,color:"var(--ink)",fontWeight:l?600:400},children:[d.label||k(d.type||"deadline"),l&&t.jsx("span",{style:{...$,marginLeft:8},children:"Next"})]}),t.jsxs("span",{style:{fontFamily:"var(--mono)",fontSize:12,color:"var(--ink-faint)"},children:[F(d.deadline_at),d.timezone?` · ${d.timezone}`:""]})]}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:12,fontWeight:600,whiteSpace:"nowrap",color:_(u?null:y,r)},children:X(y,r)})]},`${d.type??"deadline"}-${m}`)})]}),D(e).length>0&&t.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:D(e).map(d=>t.jsx("span",{className:"tag-chip",style:{background:"var(--bg-subtle)",color:"var(--ink-soft)"},children:k(d)},d))}),t.jsxs("div",{style:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:16,paddingTop:12,borderTop:"1px solid var(--hairline)"},children:[e.url&&t.jsx("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",style:{fontFamily:"var(--mono)",fontSize:12,color:"var(--accent-text)"},children:"Visit website ↗"}),s&&t.jsxs("div",{style:{display:"flex",gap:12,marginLeft:"auto"},children:[t.jsx("button",{type:"button",className:"tag-chip",onClick:()=>Z(e,s),style:{background:"var(--bg-subtle)",color:"var(--ink-soft)"},children:"+ Google Calendar"}),t.jsx("button",{type:"button",className:"tag-chip",onClick:()=>ee(e,s),style:{background:"var(--bg-subtle)",color:"var(--ink-soft)"},children:"+ Apple / .ics"})]})]})]})]})})})},M=({id:e,label:a,checked:n,onChange:r})=>t.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,fontFamily:"var(--mono)",fontSize:12,color:"var(--ink-soft)"},children:[t.jsx(B,{id:e,checked:n,onCheckedChange:r}),t.jsx("label",{htmlFor:e,style:{cursor:"pointer"},children:a})]}),ne=({conf:e,now:a,selectedDomains:n,onToggleDomain:r,onOpen:o})=>{const i=T(e,a),s=i??L(e),g=s?new Date(s.deadline_at).getTime():null,c=_(i?g:null,a),p=z(e.start_date,e.end_date),d=[e.city??null,e.country??null].filter(Boolean).join(", ");return t.jsxs("div",{role:"button",tabIndex:0,onClick:()=>o(e),onKeyDown:m=>{(m.key==="Enter"||m.key===" ")&&(m.preventDefault(),o(e))},style:{border:"1px solid var(--hairline)",borderRadius:8,padding:20,background:"var(--bg-elevated)",display:"flex",flexDirection:"column",gap:12,cursor:"pointer"},children:[t.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"baseline",gap:12},children:[t.jsx("h3",{style:{fontFamily:"var(--serif)",fontSize:20,fontWeight:500,letterSpacing:"-0.01em",margin:0},children:e.short_name?`${e.short_name} ${e.year??""}`.trim():e.name}),e.url&&t.jsx("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",onClick:m=>m.stopPropagation(),style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",whiteSpace:"nowrap"},children:"website ↗"})]}),t.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:12,paddingBottom:12,borderBottom:"1px solid var(--hairline)"},children:[t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:2},children:[t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)"},children:(s==null?void 0:s.label)||(s==null?void 0:s.type)||"Deadline"}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:12,color:"var(--ink-soft)"},children:s?`${F(s.deadline_at)}${s.timezone?` · ${s.timezone}`:""}`:"TBD"})]}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:14,fontWeight:600,color:c,whiteSpace:"nowrap"},children:g!=null?Q(g,a):"TBD"})]}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4,fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)"},children:[p&&t.jsx("span",{children:p}),d&&t.jsx("span",{children:d})]}),D(e).length>0&&t.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:D(e).map(m=>{const y=n.has(m);return t.jsx("button",{className:"tag-chip",onClick:l=>{l.stopPropagation(),r(m)},style:{background:y?"var(--ink)":"var(--bg-subtle)",color:y?"var(--bg)":"var(--ink-soft)"},children:k(m)},m)})})]})},ce=()=>{const[e,a]=x.useState(!0),[n,r]=x.useState(!1),[o,i]=x.useState(new Set),[s,g]=x.useState(null),c=x.useMemo(()=>Date.now(),[]),p=A({queryKey:["conference-deadlines"],queryFn:()=>E.getConferenceDeadlines(),staleTime:10*60*1e3}),d=l=>{i(u=>{const h=new Set(u);return h.has(l)?h.delete(l):h.add(l),h})},m=x.useMemo(()=>{var u;const l=new Map;return(u=p.data)==null||u.results.forEach(h=>{D(h).forEach(j=>l.set(j,(l.get(j)??0)+1))}),Array.from(l.entries()).sort((h,j)=>j[1]-h[1]).map(([h])=>h)},[p.data]),y=x.useMemo(()=>{var j;const u=(((j=p.data)==null?void 0:j.results)??[]).filter(f=>!(e&&f.tier!=="a"||o.size>0&&!D(f).some(v=>o.has(v))||!n&&!T(f,c))),h=f=>{const w=T(f,c);if(w)return{group:0,time:new Date(w.deadline_at).getTime()};const v=L(f);return{group:1,time:-(v?new Date(v.deadline_at).getTime():0)}};return[...u].sort((f,w)=>{const v=h(f),N=h(w);return v.group!==N.group?v.group-N.group:v.time-N.time})},[p.data,e,n,o,c]);return p.error?t.jsx("div",{className:"page",children:t.jsx(W,{variant:"destructive",children:t.jsx(O,{children:"Failed to load conference deadlines. Please try again."})})}):t.jsxs("div",{className:"page",children:[t.jsx("div",{className:"feed-header",children:t.jsxs("div",{children:[t.jsxs("h1",{className:"feed-title",children:["AI Conference ",t.jsx("em",{children:"Deadlines"})]}),t.jsx("div",{className:"feed-subtitle",children:"Upcoming submission deadlines for major AI conferences, counting down."})]})}),t.jsxs("div",{style:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:20,padding:"16px 0",borderBottom:"1px solid var(--hairline)",marginBottom:24},children:[t.jsx(M,{id:"top-tier-only",label:"Top tier only",checked:e,onChange:a}),t.jsx(M,{id:"show-past",label:"Show past conferences",checked:n,onChange:r})]}),m.length>0&&t.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:6,marginBottom:24},children:[m.map(l=>{const u=o.has(l);return t.jsx("button",{className:"tag-chip",onClick:()=>d(l),style:{background:u?"var(--ink)":"var(--bg-subtle)",color:u?"var(--bg)":"var(--ink-soft)"},children:k(l)},l)}),o.size>0&&t.jsx("button",{className:"tag-chip",onClick:()=>i(new Set),style:{background:"transparent",color:"var(--ink-faint)"},children:"Clear ✕"})]}),t.jsx("div",{className:"sort-bar",children:t.jsx("div",{className:"results-count",children:p.isLoading?"…":`${y.length} conferences`})}),p.isLoading?t.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(320px, 1fr))",gap:16},children:Array.from({length:6}).map((l,u)=>t.jsx(U,{className:"h-44"},u))}):y.length===0?t.jsxs("div",{className:"no-results",children:["No conferences match these filters",n?".":" — try enabling “Show past conferences”."]}):t.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(320px, 1fr))",gap:16},children:y.map(l=>t.jsx(ne,{conf:l,now:c,selectedDomains:o,onToggleDomain:d,onOpen:g},l.id))}),t.jsx(te,{conf:s,open:s!==null,onOpenChange:l=>{l||g(null)}})]})};export{ce as default};
|
assets/BenchmarkDetailView-CXDMaWq-.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import{_ as lt,u as ct,a1 as ot,r as k,j as n,L as re,a7 as Y,n as dt,a0 as ut,a as se}from"./index-CNvFYqmB.js";import{u as ne}from"./useQuery-B6TeiMq1.js";import{S as we}from"./skeleton-C9NKUBNg.js";import{S as Be}from"./switch-j6Z98JHW.js";import{A as mt,a as ht}from"./alert-YjpxGuB-.js";import{L as me}from"./LatexTitle-ZG9klHzz.js";import{I as ft}from"./components-CCZN6YfS.js";import{C as pt,E as gt}from"./ExternalSourceEvalBadge-DGkzBdAp.js";import"./index-sNVSU2vm.js";import"./katex.min-BSBacQyE.js";import"./transform-Cbu7h9fT.js";function xt(e,t){if(e.match(/^[a-z]+:\/\//i))return e;if(e.match(/^\/\//))return window.location.protocol+e;if(e.match(/^[a-z]+:/i))return e;const r=document.implementation.createHTMLDocument(),s=r.createElement("base"),i=r.createElement("a");return r.head.appendChild(s),r.body.appendChild(i),t&&(s.href=t),i.href=e,i.href}const yt=(()=>{let e=0;const t=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(e+=1,`u${t()}${e}`)})();function V(e){const t=[];for(let r=0,s=e.length;r<s;r++)t.push(e[r]);return t}let X=null;function Ye(e={}){return X||(e.includeStyleProperties?(X=e.includeStyleProperties,X):(X=V(window.getComputedStyle(document.documentElement)),X))}function he(e,t){const s=(e.ownerDocument.defaultView||window).getComputedStyle(e).getPropertyValue(t);return s?parseFloat(s.replace("px","")):0}function bt(e){const t=he(e,"border-left-width"),r=he(e,"border-right-width");return e.clientWidth+t+r}function wt(e){const t=he(e,"border-top-width"),r=he(e,"border-bottom-width");return e.clientHeight+t+r}function Ze(e,t={}){const r=t.width||bt(e),s=t.height||wt(e);return{width:r,height:s}}function vt(){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 F=16384;function jt(e){(e.width>F||e.height>F)&&(e.width>F&&e.height>F?e.width>e.height?(e.height*=F/e.width,e.width=F):(e.width*=F/e.height,e.height=F):e.width>F?(e.height*=F/e.width,e.width=F):(e.width*=F/e.height,e.height=F))}function kt(e,t={}){return e.toBlob?new Promise(r=>{e.toBlob(r,t.type?t.type:"image/png",t.quality?t.quality:1)}):new Promise(r=>{const s=window.atob(e.toDataURL(t.type?t.type:void 0,t.quality?t.quality:void 0).split(",")[1]),i=s.length,a=new Uint8Array(i);for(let o=0;o<i;o+=1)a[o]=s.charCodeAt(o);r(new Blob([a],{type:t.type?t.type:"image/png"}))})}function fe(e){return new Promise((t,r)=>{const s=new Image;s.onload=()=>{s.decode().then(()=>{requestAnimationFrame(()=>t(s))})},s.onerror=r,s.crossOrigin="anonymous",s.decoding="async",s.src=e})}async function St(e){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then(t=>`data:image/svg+xml;charset=utf-8,${t}`)}async function _t(e,t,r){const s="http://www.w3.org/2000/svg",i=document.createElementNS(s,"svg"),a=document.createElementNS(s,"foreignObject");return i.setAttribute("width",`${t}`),i.setAttribute("height",`${r}`),i.setAttribute("viewBox",`0 0 ${t} ${r}`),a.setAttribute("width","100%"),a.setAttribute("height","100%"),a.setAttribute("x","0"),a.setAttribute("y","0"),a.setAttribute("externalResourcesRequired","true"),i.appendChild(a),a.appendChild(e),St(i)}const M=(e,t)=>{if(e instanceof t)return!0;const r=Object.getPrototypeOf(e);return r===null?!1:r.constructor.name===t.name||M(r,t)};function Ct(e){const t=e.getPropertyValue("content");return`${e.cssText} content: '${t.replace(/'|"/g,"")}';`}function Et(e,t){return Ye(t).map(r=>{const s=e.getPropertyValue(r),i=e.getPropertyPriority(r);return`${r}: ${s}${i?" !important":""};`}).join(" ")}function Rt(e,t,r,s){const i=`.${e}:${t}`,a=r.cssText?Ct(r):Et(r,s);return document.createTextNode(`${i}{${a}}`)}function He(e,t,r,s){const i=window.getComputedStyle(e,r),a=i.getPropertyValue("content");if(a===""||a==="none")return;const o=yt();try{t.className=`${t.className} ${o}`}catch{return}const c=document.createElement("style");c.appendChild(Rt(o,r,i,s)),t.appendChild(c)}function $t(e,t,r){He(e,t,":before",r),He(e,t,":after",r)}const Ve="application/font-woff",We="image/jpeg",Nt={woff:Ve,woff2:Ve,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:We,jpeg:We,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function Tt(e){const t=/\.([^./]*?)$/g.exec(e);return t?t[1]:""}function _e(e){const t=Tt(e).toLowerCase();return Nt[t]||""}function Mt(e){return e.split(/,/)[1]}function Se(e){return e.search(/^(data:)/)!==-1}function Ft(e,t){return`data:${t};base64,${e}`}async function et(e,t,r){const s=await fetch(e,t);if(s.status===404)throw new Error(`Resource "${s.url}" not found`);const i=await s.blob();return new Promise((a,o)=>{const c=new FileReader;c.onerror=o,c.onloadend=()=>{try{a(r({res:s,result:c.result}))}catch(u){o(u)}},c.readAsDataURL(i)})}const ve={};function Lt(e,t,r){let s=e.replace(/\?.*/,"");return r&&(s=e),/ttf|otf|eot|woff2?/i.test(s)&&(s=s.replace(/.*\//,"")),t?`[${t}]${s}`:s}async function Ce(e,t,r){const s=Lt(e,t,r.includeQueryParams);if(ve[s]!=null)return ve[s];r.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+new Date().getTime());let i;try{const a=await et(e,r.fetchRequestInit,({res:o,result:c})=>(t||(t=o.headers.get("Content-Type")||""),Mt(c)));i=Ft(a,t)}catch(a){i=r.imagePlaceholder||"";let o=`Failed to fetch resource: ${e}`;a&&(o=typeof a=="string"?a:a.message),o&&console.warn(o)}return ve[s]=i,i}async function At(e){const t=e.toDataURL();return t==="data:,"?e.cloneNode(!1):fe(t)}async function Pt(e,t){if(e.currentSrc){const a=document.createElement("canvas"),o=a.getContext("2d");a.width=e.clientWidth,a.height=e.clientHeight,o==null||o.drawImage(e,0,0,a.width,a.height);const c=a.toDataURL();return fe(c)}const r=e.poster,s=_e(r),i=await Ce(r,s,t);return fe(i)}async function It(e,t){var r;try{if(!((r=e==null?void 0:e.contentDocument)===null||r===void 0)&&r.body)return await pe(e.contentDocument.body,t,!0)}catch{}return e.cloneNode(!1)}async function Dt(e,t){return M(e,HTMLCanvasElement)?At(e):M(e,HTMLVideoElement)?Pt(e,t):M(e,HTMLIFrameElement)?It(e,t):e.cloneNode(tt(e))}const Bt=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SLOT",tt=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SVG";async function Ht(e,t,r){var s,i;if(tt(t))return t;let a=[];return Bt(e)&&e.assignedNodes?a=V(e.assignedNodes()):M(e,HTMLIFrameElement)&&(!((s=e.contentDocument)===null||s===void 0)&&s.body)?a=V(e.contentDocument.body.childNodes):a=V(((i=e.shadowRoot)!==null&&i!==void 0?i:e).childNodes),a.length===0||M(e,HTMLVideoElement)||await a.reduce((o,c)=>o.then(()=>pe(c,r)).then(u=>{u&&t.appendChild(u)}),Promise.resolve()),t}function Vt(e,t,r){const s=t.style;if(!s)return;const i=window.getComputedStyle(e);i.cssText?(s.cssText=i.cssText,s.transformOrigin=i.transformOrigin):Ye(r).forEach(a=>{let o=i.getPropertyValue(a);a==="font-size"&&o.endsWith("px")&&(o=`${Math.floor(parseFloat(o.substring(0,o.length-2)))-.1}px`),M(e,HTMLIFrameElement)&&a==="display"&&o==="inline"&&(o="block"),a==="d"&&t.getAttribute("d")&&(o=`path(${t.getAttribute("d")})`),s.setProperty(a,o,i.getPropertyPriority(a))})}function Wt(e,t){M(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),M(e,HTMLInputElement)&&t.setAttribute("value",e.value)}function Ot(e,t){if(M(e,HTMLSelectElement)){const r=t,s=Array.from(r.children).find(i=>e.value===i.getAttribute("value"));s&&s.setAttribute("selected","")}}function Ut(e,t,r){return M(t,Element)&&(Vt(e,t,r),$t(e,t,r),Wt(e,t),Ot(e,t)),t}async function qt(e,t){const r=e.querySelectorAll?e.querySelectorAll("use"):[];if(r.length===0)return e;const s={};for(let a=0;a<r.length;a++){const c=r[a].getAttribute("xlink:href");if(c){const u=e.querySelector(c),g=document.querySelector(c);!u&&g&&!s[c]&&(s[c]=await pe(g,t,!0))}}const i=Object.values(s);if(i.length){const a="http://www.w3.org/1999/xhtml",o=document.createElementNS(a,"svg");o.setAttribute("xmlns",a),o.style.position="absolute",o.style.width="0",o.style.height="0",o.style.overflow="hidden",o.style.display="none";const c=document.createElementNS(a,"defs");o.appendChild(c);for(let u=0;u<i.length;u++)c.appendChild(i[u]);e.appendChild(o)}return e}async function pe(e,t,r){return!r&&t.filter&&!t.filter(e)?null:Promise.resolve(e).then(s=>Dt(s,t)).then(s=>Ht(e,s,t)).then(s=>Ut(e,s,t)).then(s=>qt(s,t))}const rt=/url\((['"]?)([^'"]+?)\1\)/g,zt=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,Gt=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function Kt(e){const t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}function Qt(e){const t=[];return e.replace(rt,(r,s,i)=>(t.push(i),r)),t.filter(r=>!Se(r))}async function Xt(e,t,r,s,i){try{const a=r?xt(t,r):t,o=_e(t);let c;return i||(c=await Ce(a,o,s)),e.replace(Kt(t),`$1${c}$3`)}catch{}return e}function Jt(e,{preferredFontFormat:t}){return t?e.replace(Gt,r=>{for(;;){const[s,,i]=zt.exec(r)||[];if(!i)return"";if(i===t)return`src: ${s};`}}):e}function st(e){return e.search(rt)!==-1}async function nt(e,t,r){if(!st(e))return e;const s=Jt(e,r);return Qt(s).reduce((a,o)=>a.then(c=>Xt(c,o,t,r)),Promise.resolve(s))}async function J(e,t,r){var s;const i=(s=t.style)===null||s===void 0?void 0:s.getPropertyValue(e);if(i){const a=await nt(i,null,r);return t.style.setProperty(e,a,t.style.getPropertyPriority(e)),!0}return!1}async function Yt(e,t){await J("background",e,t)||await J("background-image",e,t),await J("mask",e,t)||await J("-webkit-mask",e,t)||await J("mask-image",e,t)||await J("-webkit-mask-image",e,t)}async function Zt(e,t){const r=M(e,HTMLImageElement);if(!(r&&!Se(e.src))&&!(M(e,SVGImageElement)&&!Se(e.href.baseVal)))return;const s=r?e.src:e.href.baseVal,i=await Ce(s,_e(s),t);await new Promise((a,o)=>{e.onload=a,e.onerror=t.onImageErrorHandler?(...u)=>{try{a(t.onImageErrorHandler(...u))}catch(g){o(g)}}:o;const c=e;c.decode&&(c.decode=a),c.loading==="lazy"&&(c.loading="eager"),r?(e.srcset="",e.src=i):e.href.baseVal=i})}async function er(e,t){const s=V(e.childNodes).map(i=>at(i,t));await Promise.all(s).then(()=>e)}async function at(e,t){M(e,Element)&&(await Yt(e,t),await Zt(e,t),await er(e,t))}function tr(e,t){const{style:r}=e;t.backgroundColor&&(r.backgroundColor=t.backgroundColor),t.width&&(r.width=`${t.width}px`),t.height&&(r.height=`${t.height}px`);const s=t.style;return s!=null&&Object.keys(s).forEach(i=>{r[i]=s[i]}),e}const Oe={};async function Ue(e){let t=Oe[e];if(t!=null)return t;const s=await(await fetch(e)).text();return t={url:e,cssText:s},Oe[e]=t,t}async function qe(e,t){let r=e.cssText;const s=/url\(["']?([^"')]+)["']?\)/g,a=(r.match(/url\([^)]+\)/g)||[]).map(async o=>{let c=o.replace(s,"$1");return c.startsWith("https://")||(c=new URL(c,e.url).href),et(c,t.fetchRequestInit,({result:u})=>(r=r.replace(o,`url(${u})`),[o,u]))});return Promise.all(a).then(()=>r)}function ze(e){if(e==null)return[];const t=[],r=/(\/\*[\s\S]*?\*\/)/gi;let s=e.replace(r,"");const i=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){const u=i.exec(s);if(u===null)break;t.push(u[0])}s=s.replace(i,"");const a=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,o="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})",c=new RegExp(o,"gi");for(;;){let u=a.exec(s);if(u===null){if(u=c.exec(s),u===null)break;a.lastIndex=c.lastIndex}else c.lastIndex=a.lastIndex;t.push(u[0])}return t}async function rr(e,t){const r=[],s=[];return e.forEach(i=>{if("cssRules"in i)try{V(i.cssRules||[]).forEach((a,o)=>{if(a.type===CSSRule.IMPORT_RULE){let c=o+1;const u=a.href,g=Ue(u).then(f=>qe(f,t)).then(f=>ze(f).forEach(w=>{try{i.insertRule(w,w.startsWith("@import")?c+=1:i.cssRules.length)}catch(x){console.error("Error inserting rule from remote css",{rule:w,error:x})}})).catch(f=>{console.error("Error loading remote css",f.toString())});s.push(g)}})}catch(a){const o=e.find(c=>c.href==null)||document.styleSheets[0];i.href!=null&&s.push(Ue(i.href).then(c=>qe(c,t)).then(c=>ze(c).forEach(u=>{o.insertRule(u,o.cssRules.length)})).catch(c=>{console.error("Error loading remote stylesheet",c)})),console.error("Error inlining remote css file",a)}}),Promise.all(s).then(()=>(e.forEach(i=>{if("cssRules"in i)try{V(i.cssRules||[]).forEach(a=>{r.push(a)})}catch(a){console.error(`Error while reading CSS rules from ${i.href}`,a)}}),r))}function sr(e){return e.filter(t=>t.type===CSSRule.FONT_FACE_RULE).filter(t=>st(t.style.getPropertyValue("src")))}async function nr(e,t){if(e.ownerDocument==null)throw new Error("Provided element is not within a Document");const r=V(e.ownerDocument.styleSheets),s=await rr(r,t);return sr(s)}function it(e){return e.trim().replace(/["']/g,"")}function ar(e){const t=new Set;function r(s){(s.style.fontFamily||getComputedStyle(s).fontFamily).split(",").forEach(a=>{t.add(it(a))}),Array.from(s.children).forEach(a=>{a instanceof HTMLElement&&r(a)})}return r(e),t}async function ir(e,t){const r=await nr(e,t),s=ar(e);return(await Promise.all(r.filter(a=>s.has(it(a.style.fontFamily))).map(a=>{const o=a.parentStyleSheet?a.parentStyleSheet.href:null;return nt(a.cssText,o,t)}))).join(`
|
| 2 |
+
`)}async function lr(e,t){const r=t.fontEmbedCSS!=null?t.fontEmbedCSS:t.skipFonts?null:await ir(e,t);if(r){const s=document.createElement("style"),i=document.createTextNode(r);s.appendChild(i),e.firstChild?e.insertBefore(s,e.firstChild):e.appendChild(s)}}async function cr(e,t={}){const{width:r,height:s}=Ze(e,t),i=await pe(e,t,!0);return await lr(i,t),await at(i,t),tr(i,t),await _t(i,r,s)}async function or(e,t={}){const{width:r,height:s}=Ze(e,t),i=await cr(e,t),a=await fe(i),o=document.createElement("canvas"),c=o.getContext("2d"),u=t.pixelRatio||vt(),g=t.canvasWidth||r,f=t.canvasHeight||s;return o.width=g*u,o.height=f*u,t.skipAutoScale||jt(o),o.style.width=`${g}`,o.style.height=`${f}`,t.backgroundColor&&(c.fillStyle=t.backgroundColor,c.fillRect(0,0,o.width,o.height)),c.drawImage(a,0,0,o.width,o.height),o}async function dr(e,t={}){const r=await or(e,t);return await kt(r)}const Ge="#ffffff";function ur(e){if(typeof window>"u")return Ge;const t=window.getComputedStyle(e).backgroundColor;return!t||t==="rgba(0, 0, 0, 0)"||t==="transparent"?Ge: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 dr(e,{pixelRatio:2,cacheBust:!0,backgroundColor:ur(e)});if(!t)throw new Error("Failed to render screenshot.");await window.navigator.clipboard.write([new window.ClipboardItem({"image/png":t})])}const hr=5;function fr(e){if(!e)return null;const t=e.trim(),r=t.match(/^https?:\/\/(?:www\.)?arxiv\.org\/(?:abs|pdf)\/([^/?#]+)/i);if(r!=null&&r[1])return r[1].replace(/\.pdf$/i,"");const s=t.match(/^(?:https?:\/\/(?:www\.)?paperswithcode\.co)?\/paper\/([^/?#]+)/i);return(s==null?void 0:s[1])??null}function ue(e,t){return e?n.jsx(me,{title:e}):t||"—"}function Ke(e){const t=e.length===7?`${e}-01`:e,r=new Date(t).getTime();return Number.isFinite(r)?r:0}const je=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function ke(e){const t=new Date(e);return{year:t.getFullYear(),month:t.getMonth()}}function pr(e,t){if(e===t){const{year:u,month:g}=ke(e);return[{timestamp:new Date(u,g,1).getTime(),key:`${u}-${g}`,label:`${je[g]} ${u}`}]}const r=ke(e),s=ke(t);if(r.year===s.year){const u=s.month-r.month+1;let g=1;const f=12;u>f&&(g=Math.ceil(u/f));const w=[];for(let x=r.month;x<=s.month;x+=g)w.push({timestamp:new Date(r.year,x,1).getTime(),key:`${r.year}-${x}`,label:u<=3?`${je[x]} ${r.year}`:je[x]});return w}const i=s.year-r.year+1;let a=1;const o=12;i>o&&(a=Math.ceil(i/o));const c=[];for(let u=r.year;u<=s.year;u+=a)c.push({timestamp:new Date(u,0,1).getTime(),key:String(u),label:String(u)});return c}const gr=({points:e,metric:t})=>{const r=ut(),[s,i]=k.useState(null),a=880,o=320,c=60,u=30,g=40,f=50,w=e.map(l=>l.value),x=Math.min(...w),W=Math.max(...w)-x||1,ie=a-c-u,T=o-g-f,L=e.map(l=>Ke(l.date)),O=Math.min(...L),G=Math.max(...L),A=G-O||1,le=l=>O===G?c+ie/2:c+(l-O)/A*ie,B=e.map((l,m)=>{const _=le(Ke(l.date)),y=(l.value-x)/W,C=g+T*(1-y);return{x:_,y:C,data:l,idx:m}}),v=B.filter(l=>l.data.isSota);let K="";if(v.length>=2){K=`M${v[0].x},${v[0].y}`;for(let l=1;l<v.length;l++){const m=v[l-1],_=v[l],y=(m.x+_.x)/2;K+=` C${y},${m.y} ${y},${_.y} ${_.x},${_.y}`}}const b=5.4,ge=8,U=9,H=l=>{const m=l.data.modelName||l.data.paperTitle||"";if(!m)return null;const _=m.length>22?m.slice(0,21)+"…":m,y=_.length*b;let C=l.x-y/2,R=l.x+y/2,P="middle";return C<c?(C=c,R=c+y,P="start"):R>a-u&&(R=a-u,C=R-y,P="end"),{x:P==="start"?c:P==="end"?a-u:l.x,y:l.y-U,text:_,anchor:P,left:C,right:R}},Q=[],I=v.length>0?H(v[v.length-1]):null;let ce=-1/0;for(let l=0;l<v.length-1;l++){const m=H(v[l]);m&&(m.left<ce+ge||I&&m.right>I.left-ge||(ce=m.right,Q.push({x:m.x,y:m.y,text:m.text,anchor:m.anchor})))}I&&Q.push({x:I.x,y:I.y,text:I.text,anchor:I.anchor});const oe=pr(O,G),q=5,S=l=>i(m=>m===l?null:m),z=l=>{l&&r(`/paper/${l}`)},Z=(l,m)=>{const y=`${l.data.modelName||l.data.paperTitle||"Unknown model"}: ${Y(l.data.value)} on ${l.data.dateLabel}`,C=!!l.data.paperRouteId;return n.jsxs("g",{children:[m,n.jsx("circle",{cx:l.x,cy:l.y,r:"10",fill:"transparent",style:{cursor:C?"pointer":"default",outline:"none"},tabIndex:0,role:C?"link":"img","aria-label":y,onMouseEnter:()=>i(l.idx),onMouseLeave:()=>S(l.idx),onFocus:()=>i(l.idx),onBlur:()=>S(l.idx),onClick:()=>z(l.data.paperRouteId),onKeyDown:R=>{C&&(R.key==="Enter"||R.key===" ")&&(R.preventDefault(),z(l.data.paperRouteId))},children:n.jsx("title",{children:y})})]},l.idx)};return n.jsxs("svg",{width:"100%",viewBox:`0 0 ${a} ${o}`,style:{display:"block"},children:[n.jsx("text",{x:c-38,y:g+T/2,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-faint)",textAnchor:"middle",transform:`rotate(-90 ${c-38} ${g+T/2})`,children:t}),Array.from({length:q}).map((l,m)=>{const _=m/(q-1),y=g+T*(1-_),C=x+W*_;return n.jsxs("g",{children:[n.jsx("line",{x1:c,y1:y,x2:a-u,y2:y,stroke:"var(--hairline)",strokeWidth:"1"}),n.jsx("text",{x:c-10,y:y+4,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-faint)",textAnchor:"end",children:Y(C)})]},m)}),oe.map(l=>{const m=le(l.timestamp);return n.jsx("text",{x:m,y:o-f+18,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-soft)",textAnchor:"middle",children:l.label},l.key)}),B.filter(l=>!l.data.isSota).map(l=>{const m=s===l.idx;return Z(l,n.jsx("circle",{cx:l.x,cy:l.y,r:m?3:2,fill:"var(--ink-faint)",opacity:m?1:.45,style:{transition:"r 0.12s ease, opacity 0.12s ease"}}))}),K&&n.jsx("path",{d:K,stroke:"var(--accent)",strokeWidth:"2",fill:"none",strokeLinejoin:"round",strokeLinecap:"round"}),v.map(l=>{const m=s===l.idx;return Z(l,n.jsx("circle",{cx:l.x,cy:l.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"}}))}),Q.map((l,m)=>n.jsx("text",{x:l.x,y:l.y,fontSize:"9.5",fontFamily:"var(--mono)",fill:"var(--ink-soft)",textAnchor:l.anchor,pointerEvents:"none",style:{paintOrder:"stroke",stroke:"var(--bg-elevated)",strokeWidth:3,strokeLinejoin:"round"},children:l.text},`label-${m}`)),s!==null&&B[s]&&(()=>{const l=B[s],m=l.data.modelName||l.data.paperTitle||"Unknown model",y=`${m.length>40?m.slice(0,39)+"…":m}: ${Y(l.data.value)}`,R=Math.max(120,Math.min(340,y.length*6.6+24)),P=30;let D=l.x-R/2;D<c&&(D=c),D+R>a-u&&(D=a-u-R);const ee=l.y-P-14>=g?l.y-P-12:l.y+12;return n.jsxs("g",{pointerEvents:"none",children:[n.jsx("rect",{x:D,y:ee,width:R,height:P,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:D+12,y:ee+19,fontSize:"12",fontFamily:"var(--sans)",fill:"var(--ink)",fontWeight:500,children:y})]})})()]})};function ae(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 xr(e){return[e.paper_id,e.task_id,e.dataset_id,e.model_name,e.harness??""].join("|")}function yr(e){const t=new Map;for(const r of e){const s=xr(r),i=t.get(s);if(!i){t.set(s,{...r,metrics:{...r.metrics||{}},sourceEvaluationIds:[r.id],ranksByMetric:r.best_metric&&r.best_rank!=null?{[r.best_metric]:r.best_rank}:{}});continue}i.metrics={...i.metrics,...r.metrics||{}},i.sourceEvaluationIds.push(r.id),r.best_metric&&r.best_rank!=null&&(i.ranksByMetric[r.best_metric]=r.best_rank)}return Array.from(t.values())}function Qe(e,t){return t?e.id===t||e.sourceEvaluationIds.includes(t):!1}function Xe(e,t){return e.ranksByMetric[t]??e.best_rank??9999}function br(e,t,r){if(e.length===0)return{points:[],sota:0,sotaModel:""};const s=e.map(f=>{var N;const w=ae((N=f.metrics)==null?void 0:N[t]),x=f.paper_published_date||"";return{eval:f,value:w,date:x}}).filter(f=>f.value!==null&&!!f.date).sort((f,w)=>f.date.localeCompare(w.date)),i=[];let a=null;for(const f of s){const w=a==null?!0:r==="↓"?f.value<a:f.value>a;w&&(a=f.value),i.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:w})}const c=e.map(f=>{var w;return{eval:f,value:ae((w=f.metrics)==null?void 0:w[t])}}).filter(f=>f.value!==null).sort((f,w)=>r==="↓"?f.value-w.value:w.value-f.value)[0],u=(c==null?void 0:c.value)??0,g=(c==null?void 0:c.eval.model_name)||(c==null?void 0:c.eval.paper_title)||"";return{points:i,sota:u,sotaModel:g}}const Je=({targetRef:e,label:t})=>{const{toast:r}=dt(),[s,i]=k.useState("idle"),a=k.useRef(null);k.useEffect(()=>()=>{a.current!==null&&window.clearTimeout(a.current)},[]);const o=k.useCallback(async()=>{const u=e.current;if(u){i("copying"),u.classList.add("is-capturing"),u.offsetHeight,await new Promise(g=>window.requestAnimationFrame(()=>g()));try{await mr(u),i("copied"),r({title:"Screenshot copied",description:`Image of the ${t} copied to your clipboard.`}),a.current!==null&&window.clearTimeout(a.current),a.current=window.setTimeout(()=>i("idle"),1500)}catch(g){i("idle"),r({title:"Copy failed",description:g instanceof Error&&g.message?g.message:"Could not copy the screenshot to your clipboard.",variant:"destructive"})}finally{u.classList.remove("is-capturing")}}},[e,t,r]),c=s==="copied"?"Copied":s==="copying"?"Copying…":"Copy image";return n.jsxs("button",{type:"button",className:"bm-copy-btn",onClick:o,disabled:s==="copying","aria-label":`Copy ${t} screenshot to clipboard`,title:`Copy ${t} screenshot to clipboard`,children:[n.jsx(ft,{name:"copy",size:11}),c]})},Tr=()=>{var D,xe,ee,Ee,Re,$e,Ne,Te,Me,Fe;const{datasetSlug:e}=lt(),[t]=ct(),r=t.get("task")||void 0,s=t.get("eval")||void 0,{preferences:i,setHideClosedSourceEvals:a}=ot(),[o,c]=k.useState(void 0),u=k.useRef(null),g=k.useRef(!1),f=k.useRef(null),w=k.useRef(null),x=ne({queryKey:["dataset",e,"with-paper"],queryFn:()=>se.getDatasetBySlug(e,{include_paper:!0}),enabled:!!e,staleTime:10*60*1e3}),N=ne({queryKey:["dataset-evals",(D=x.data)==null?void 0:D.id],queryFn:()=>se.getEvaluationsByDataset(x.data.id),enabled:!!((xe=x.data)!=null&&xe.id),staleTime:5*60*1e3}),W=ne({queryKey:["dataset-tasks",(ee=x.data)==null?void 0:ee.id],queryFn:()=>se.getDatasetTasks(x.data.id),enabled:!!((Ee=x.data)!=null&&Ee.id),staleTime:10*60*1e3}),ie=ne({queryKey:["metric-directions"],queryFn:()=>se.getMetricDirections(),staleTime:60*60*1e3}),T=k.useMemo(()=>{var d;return!s||!((d=N.data)!=null&&d.length)?null:N.data.find(p=>p.id===s)||null},[s,N.data]),L=k.useMemo(()=>{const d=W.data||[];if(d.length===0)return null;if(T!=null&&T.task_id&&d.some(h=>h.id===T.task_id))return T.task_id;if(r){const h=d.find(E=>E.slug===r);if(h)return h.id}if(d.length===1)return d[0].id;const p=N.data||[];if(p.length>0){const h=new Map;for(const j of p)h.set(j.task_id,(h.get(j.task_id)||0)+1);let E=null,$=-1;for(const j of d){const te=h.get(j.id)||0;te>$&&($=te,E=j.id)}if(E)return E}return d[0].id},[W.data,N.data,r,T]),O=ne({queryKey:["leaderboard-metrics",(Re=x.data)==null?void 0:Re.id,L],queryFn:()=>se.getLeaderboardMetrics(x.data.id,L),enabled:!!(($e=x.data)!=null&&$e.id)&&!!L,staleTime:10*60*1e3}),G=k.useMemo(()=>{let d=N.data||[];return i.hide_closed_source_evals&&(d=d.filter(p=>p.is_open!==!1)),L?d.filter(p=>p.task_id===L):d},[N.data,L,i.hide_closed_source_evals]),A=k.useMemo(()=>yr(G),[G]),le=k.useMemo(()=>{const d=new Set;return A.forEach(p=>{p.best_metric&&d.add(p.best_metric),Object.keys(p.metrics||{}).forEach(h=>d.add(h))}),Array.from(d)},[A]),B=k.useMemo(()=>(O.data||[]).map(d=>d.metric_name),[O.data]),v=B.length?B:le,K=k.useMemo(()=>{var E;if(A.length===0)return v[0]||"";const d=new Map;for(const $ of A)for(const j of Object.keys($.metrics||{}))B.length&&!v.includes(j)||d.set(j,(d.get(j)||0)+1);let p=null,h=0;for(const[$,j]of d)j>h&&(h=j,p=$);return p||v[0]||((E=A[0])==null?void 0:E.best_metric)||""},[A,v,B]),b=o||(T==null?void 0:T.best_metric)||K,U=(((Te=(Ne=ie.data)==null?void 0:Ne.directions)==null?void 0:Te[b])||"higher_is_better")==="lower_is_better"?"↓":"↑",H=k.useMemo(()=>!b||!v.includes(b)?v:[b,...v.filter(d=>d!==b)],[v,b]),Q=k.useMemo(()=>H.length===0?b?[b]:[]:H.slice(0,hr),[H,b]),{points:I,sota:ce,sotaModel:oe}=k.useMemo(()=>br(A,b,U),[A,b,U]);k.useEffect(()=>{if(g.current||!s||!N.data||N.data.length===0)return;const d=u.current;d&&(g.current=!0,d.scrollIntoView({behavior:"smooth",block:"start"}))},[s,N.data]);const q=k.useMemo(()=>{const d=W.data||[];return L?d.find(p=>p.id===L)||d[0]||null:d[0]||null},[W.data,L]);if(x.isLoading)return n.jsxs("div",{className:"page",children:[n.jsx(we,{className:"h-12 w-1/2 mb-6"}),n.jsx(we,{className:"h-64 w-full"})]});if(x.error||!x.data)return n.jsx("div",{className:"page",children:n.jsx(mt,{variant:"destructive",children:n.jsx(ht,{children:"Benchmark not found."})})});const S=x.data,z=A.slice().sort((d,p)=>{var $,j;const h=ae(($=d.metrics)==null?void 0:$[b]),E=ae((j=p.metrics)==null?void 0:j[b]);return h!==null&&E!==null?U==="↓"?h-E:E-h:h!==null?-1:E!==null?1:Xe(d,b)-Xe(p,b)}),Z=!!S.supports_harness,l=s&&z.find(d=>Qe(d,s))||null,m=S.introducing_paper??void 0,_=(m==null?void 0:m.arxiv_id)||(m==null?void 0:m.id)||fr(S.paper_url),y=(m==null?void 0:m.title)||S.introducing_paper_title||null,C=((Me=m==null?void 0:m.published)==null?void 0:Me.slice(0,4))||S.introduced_year||null,R=!!_||!!S.paper_url||!!y,P=m!=null&&m.arxiv_id||(Fe=S.paper_url)!=null&&Fe.match(/^https?:\/\/(?:www\.)?arxiv\.org\//i)?`arXiv:${_}`:`Paper ${_}`;return n.jsx("div",{className:"page",children:n.jsxs("div",{className:"bm-page",children:[n.jsxs("div",{className:"breadcrumb",children:[n.jsx(re,{to:"/tasks",children:"Tasks"}),q&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"sep",children:"/"}),n.jsx(re,{to:`/tasks/${q.slug||q.id}`,children:q.name})]}),n.jsx("span",{className:"sep",children:"/"}),n.jsx("span",{style:{color:"var(--accent-text)"},children:S.name})]}),n.jsx("h1",{className:"bm-title",children:S.name}),n.jsxs("div",{className:"bm-subtitle",style:{display:"flex",alignItems:"center",gap:16,flexWrap:"wrap"},children:[n.jsxs("span",{children:[b&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"metric-tag",children:b}),n.jsx("span",{style:{color:"var(--hairline-strong)",margin:"0 8px"},children:"·"})]}),oe?n.jsxs("span",{children:["Best: ",n.jsx("span",{className:"best-name",children:Y(ce)})," by ",n.jsx("span",{className:"best-name",style:{fontStyle:"normal"},children:oe})]}):n.jsxs("span",{children:[z.length," evaluations"]})]}),S.hf_url&&n.jsxs("a",{className:"bm-action-btn",href:S.hf_url,target:"_blank",rel:"noopener noreferrer",children:[n.jsx("span",{"aria-hidden":"true",children:"🤗"})," View on Hugging Face"]})]}),S.description&&n.jsx("p",{style:{fontFamily:"var(--serif)",color:"var(--ink-soft)",maxWidth:760,marginBottom:16},children:S.description}),R&&n.jsxs("div",{className:"method-source",style:{marginTop:0,marginBottom:18},children:[n.jsx("span",{className:"method-source-label",children:"Source"}),_?n.jsxs(re,{to:`/paper/${_}`,target:"_blank",rel:"noopener noreferrer",className:"method-source-link",children:[n.jsx("span",{className:"method-source-title",children:y?n.jsx(me,{title:y}):P}),C&&n.jsx("span",{className:"method-source-meta",children:C})]}):S.paper_url?n.jsxs("a",{href:S.paper_url,target:"_blank",rel:"noopener noreferrer",className:"method-source-link",children:[n.jsx("span",{className:"method-source-title",children:y?n.jsx(me,{title:y}):S.paper_url}),C&&n.jsx("span",{className:"method-source-meta",children:C})]}):n.jsxs("div",{className:"method-source-link is-static",children:[n.jsx("span",{className:"method-source-title",children:y?n.jsx(me,{title:y}):null}),C&&n.jsx("span",{className:"method-source-meta",children:C})]})]}),I.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:S.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:[v.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=>c(d.target.value),children:H.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(Be,{className:"bm-closed-toggle-switch",checked:!i.hide_closed_source_evals,onCheckedChange:d=>{a(!d)},"aria-label":"Show closed-source models"}),n.jsx("span",{className:"bm-closed-toggle-label",children:"Closed-source"})]}),n.jsx(Je,{targetRef:f,label:"SOTA chart"})]})]}),n.jsx("div",{className:"bm-chart-wrap",children:n.jsx(gr,{points:I,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"]})]}),l&&(()=>{var $,j;const d=l.paper_arxiv_id||l.paper_id,p=l.paper_title||(l.paper_arxiv_id?`arXiv:${l.paper_arxiv_id}`:null),h=l.best_metric&&(($=l.metrics)==null?void 0:$[l.best_metric])!==void 0?l.best_metric:b,E=(j=l.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:[l.model_name||p||"—",l.harness?` · ${l.harness}`:""]}),n.jsxs("span",{className:"bm-highlight-meta",children:[E!==void 0&&h?n.jsxs(n.Fragment,{children:[h,": ",Y(E),p?" · ":""]}):null,d?n.jsx(re,{to:`/paper/${d}`,children:ue(l.paper_title,p)}):ue(l.paper_title,p)]})]})]})})(),n.jsxs("div",{className:"bm-card",ref:w,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:S.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:[v.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=>c(d.target.value),children:H.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(Be,{className:"bm-closed-toggle-switch",checked:!i.hide_closed_source_evals,onCheckedChange:d=>{a(!d)},"aria-label":"Show closed-source models"}),n.jsx("span",{className:"bm-closed-toggle-label",children:"Closed-source"})]}),n.jsx(Je,{targetRef:w,label:"leaderboard"})]})]}),N.isLoading?n.jsx("div",{style:{padding:16},children:Array.from({length:5}).map((d,p)=>n.jsx(we,{className:"h-10 w-full mb-2"},p))}):z.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"}),Z&&n.jsx("th",{className:"col-harness",children:"Harness"}),Q.map(d=>{const p=d===b;return n.jsx("th",{className:`col-value ${p?"is-active":""}`,"aria-sort":p?U==="↓"?"ascending":"descending":"none",children:n.jsxs("button",{type:"button",className:"bm-metric-header",onClick:()=>c(d),"aria-pressed":p,title:`Sort by ${d}`,children:[d,p?` ${U}`:""]})},d)}),n.jsx("th",{className:"col-paper",children:"Paper"}),n.jsx("th",{className:"col-year",children:"Year"})]})}),n.jsx("tbody",{children:(()=>{let d=null,p=0;return z.map((h,E)=>{var Ae,Pe;const $=ae((Ae=h.metrics)==null?void 0:Ae[b]);let j=null;$!==null&&((d===null||$!==d)&&(p=E+1,d=$),j=p);const te=h.paper_arxiv_id||h.paper_id,Le=h.paper_title||(h.paper_arxiv_id?`arXiv:${h.paper_arxiv_id}`:null),ye=Qe(h,s);return n.jsxs("tr",{ref:ye?u:void 0,className:ye?"is-highlighted":void 0,children:[n.jsx("td",{className:"col-rank",children:j??"—"}),n.jsxs("td",{className:"col-model",children:[ye&&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(pt,{}),(h.external??h.is_external)&&n.jsx(gt,{sourceUrl:h.source_url||h.external_source_url||h.result_url})]}),Z&&n.jsx("td",{className:"col-harness",children:h.harness||"—"}),Q.map(be=>{var De;const Ie=be===b,de=(De=h.metrics)==null?void 0:De[be];return n.jsx("td",{className:`col-value${Ie?" is-active":""}${Ie&&j===1?" is-best":""}`,children:de!=null&&de!==""?Y(de):"—"},be)}),n.jsx("td",{className:"col-paper",children:te?n.jsx(re,{to:`/paper/${te}`,children:ue(h.paper_title,Le)}):ue(h.paper_title,Le)}),n.jsx("td",{className:"col-year",children:((Pe=h.paper_published_date)==null?void 0:Pe.slice(0,4))||"—"})]},h.id)})})()})]})})]})]})})};export{Tr as default};
|
assets/BenchmarkDetailView-EG8udsA_.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
| 1 |
-
import{_ as lt,u as ct,a1 as ot,r as E,j as n,L as ne,a7 as Z,n as dt,a0 as ut,a as ae}from"./index-DjK_yrbe.js";import{u as ie}from"./useQuery-BAGWhwl6.js";import{S as we}from"./skeleton-_kUFAeFV.js";import{S as Be}from"./switch-Bs5IhEGZ.js";import{A as mt,a as ht}from"./alert-BVkGa_Tq.js";import{L as me}from"./LatexTitle-6cIE2SFl.js";import{I as ft}from"./components-B39WD1hZ.js";import{C as pt}from"./ClosedSourceEvalBadge-C7AzIzhI.js";import"./index-BlGd3n8Y.js";import"./katex.min-BSBacQyE.js";import"./transform-CH5QAIOs.js";function gt(e,t){if(e.match(/^[a-z]+:\/\//i))return e;if(e.match(/^\/\//))return window.location.protocol+e;if(e.match(/^[a-z]+:/i))return e;const r=document.implementation.createHTMLDocument(),s=r.createElement("base"),i=r.createElement("a");return r.head.appendChild(s),r.body.appendChild(i),t&&(s.href=t),i.href=e,i.href}const xt=(()=>{let e=0;const t=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(e+=1,`u${t()}${e}`)})();function W(e){const t=[];for(let r=0,s=e.length;r<s;r++)t.push(e[r]);return t}let J=null;function Ye(e={}){return J||(e.includeStyleProperties?(J=e.includeStyleProperties,J):(J=W(window.getComputedStyle(document.documentElement)),J))}function he(e,t){const s=(e.ownerDocument.defaultView||window).getComputedStyle(e).getPropertyValue(t);return s?parseFloat(s.replace("px","")):0}function yt(e){const t=he(e,"border-left-width"),r=he(e,"border-right-width");return e.clientWidth+t+r}function bt(e){const t=he(e,"border-top-width"),r=he(e,"border-bottom-width");return e.clientHeight+t+r}function Ze(e,t={}){const r=t.width||yt(e),s=t.height||bt(e);return{width:r,height:s}}function wt(){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 L=16384;function vt(e){(e.width>L||e.height>L)&&(e.width>L&&e.height>L?e.width>e.height?(e.height*=L/e.width,e.width=L):(e.width*=L/e.height,e.height=L):e.width>L?(e.height*=L/e.width,e.width=L):(e.width*=L/e.height,e.height=L))}function jt(e,t={}){return e.toBlob?new Promise(r=>{e.toBlob(r,t.type?t.type:"image/png",t.quality?t.quality:1)}):new Promise(r=>{const s=window.atob(e.toDataURL(t.type?t.type:void 0,t.quality?t.quality:void 0).split(",")[1]),i=s.length,a=new Uint8Array(i);for(let o=0;o<i;o+=1)a[o]=s.charCodeAt(o);r(new Blob([a],{type:t.type?t.type:"image/png"}))})}function fe(e){return new Promise((t,r)=>{const s=new Image;s.onload=()=>{s.decode().then(()=>{requestAnimationFrame(()=>t(s))})},s.onerror=r,s.crossOrigin="anonymous",s.decoding="async",s.src=e})}async function kt(e){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then(t=>`data:image/svg+xml;charset=utf-8,${t}`)}async function St(e,t,r){const s="http://www.w3.org/2000/svg",i=document.createElementNS(s,"svg"),a=document.createElementNS(s,"foreignObject");return i.setAttribute("width",`${t}`),i.setAttribute("height",`${r}`),i.setAttribute("viewBox",`0 0 ${t} ${r}`),a.setAttribute("width","100%"),a.setAttribute("height","100%"),a.setAttribute("x","0"),a.setAttribute("y","0"),a.setAttribute("externalResourcesRequired","true"),i.appendChild(a),a.appendChild(e),kt(i)}const F=(e,t)=>{if(e instanceof t)return!0;const r=Object.getPrototypeOf(e);return r===null?!1:r.constructor.name===t.name||F(r,t)};function _t(e){const t=e.getPropertyValue("content");return`${e.cssText} content: '${t.replace(/'|"/g,"")}';`}function Ct(e,t){return Ye(t).map(r=>{const s=e.getPropertyValue(r),i=e.getPropertyPriority(r);return`${r}: ${s}${i?" !important":""};`}).join(" ")}function Et(e,t,r,s){const i=`.${e}:${t}`,a=r.cssText?_t(r):Ct(r,s);return document.createTextNode(`${i}{${a}}`)}function He(e,t,r,s){const i=window.getComputedStyle(e,r),a=i.getPropertyValue("content");if(a===""||a==="none")return;const o=xt();try{t.className=`${t.className} ${o}`}catch{return}const c=document.createElement("style");c.appendChild(Et(o,r,i,s)),t.appendChild(c)}function Rt(e,t,r){He(e,t,":before",r),He(e,t,":after",r)}const Ve="application/font-woff",We="image/jpeg",$t={woff:Ve,woff2:Ve,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:We,jpeg:We,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function Nt(e){const t=/\.([^./]*?)$/g.exec(e);return t?t[1]:""}function Ce(e){const t=Nt(e).toLowerCase();return $t[t]||""}function Tt(e){return e.split(/,/)[1]}function _e(e){return e.search(/^(data:)/)!==-1}function Mt(e,t){return`data:${t};base64,${e}`}async function et(e,t,r){const s=await fetch(e,t);if(s.status===404)throw new Error(`Resource "${s.url}" not found`);const i=await s.blob();return new Promise((a,o)=>{const c=new FileReader;c.onerror=o,c.onloadend=()=>{try{a(r({res:s,result:c.result}))}catch(u){o(u)}},c.readAsDataURL(i)})}const ve={};function Ft(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 Ee(e,t,r){const s=Ft(e,t,r.includeQueryParams);if(ve[s]!=null)return ve[s];r.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+new Date().getTime());let i;try{const a=await et(e,r.fetchRequestInit,({res:o,result:c})=>(t||(t=o.headers.get("Content-Type")||""),Tt(c)));i=Mt(a,t)}catch(a){i=r.imagePlaceholder||"";let o=`Failed to fetch resource: ${e}`;a&&(o=typeof a=="string"?a:a.message),o&&console.warn(o)}return ve[s]=i,i}async function Lt(e){const t=e.toDataURL();return t==="data:,"?e.cloneNode(!1):fe(t)}async function At(e,t){if(e.currentSrc){const a=document.createElement("canvas"),o=a.getContext("2d");a.width=e.clientWidth,a.height=e.clientHeight,o==null||o.drawImage(e,0,0,a.width,a.height);const c=a.toDataURL();return fe(c)}const r=e.poster,s=Ce(r),i=await Ee(r,s,t);return fe(i)}async function It(e,t){var r;try{if(!((r=e==null?void 0:e.contentDocument)===null||r===void 0)&&r.body)return await pe(e.contentDocument.body,t,!0)}catch{}return e.cloneNode(!1)}async function Pt(e,t){return F(e,HTMLCanvasElement)?Lt(e):F(e,HTMLVideoElement)?At(e,t):F(e,HTMLIFrameElement)?It(e,t):e.cloneNode(tt(e))}const Dt=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SLOT",tt=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SVG";async function Bt(e,t,r){var s,i;if(tt(t))return t;let a=[];return Dt(e)&&e.assignedNodes?a=W(e.assignedNodes()):F(e,HTMLIFrameElement)&&(!((s=e.contentDocument)===null||s===void 0)&&s.body)?a=W(e.contentDocument.body.childNodes):a=W(((i=e.shadowRoot)!==null&&i!==void 0?i:e).childNodes),a.length===0||F(e,HTMLVideoElement)||await a.reduce((o,c)=>o.then(()=>pe(c,r)).then(u=>{u&&t.appendChild(u)}),Promise.resolve()),t}function Ht(e,t,r){const s=t.style;if(!s)return;const i=window.getComputedStyle(e);i.cssText?(s.cssText=i.cssText,s.transformOrigin=i.transformOrigin):Ye(r).forEach(a=>{let o=i.getPropertyValue(a);a==="font-size"&&o.endsWith("px")&&(o=`${Math.floor(parseFloat(o.substring(0,o.length-2)))-.1}px`),F(e,HTMLIFrameElement)&&a==="display"&&o==="inline"&&(o="block"),a==="d"&&t.getAttribute("d")&&(o=`path(${t.getAttribute("d")})`),s.setProperty(a,o,i.getPropertyPriority(a))})}function Vt(e,t){F(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),F(e,HTMLInputElement)&&t.setAttribute("value",e.value)}function Wt(e,t){if(F(e,HTMLSelectElement)){const r=t,s=Array.from(r.children).find(i=>e.value===i.getAttribute("value"));s&&s.setAttribute("selected","")}}function Ot(e,t,r){return F(t,Element)&&(Ht(e,t,r),Rt(e,t,r),Vt(e,t),Wt(e,t)),t}async function Ut(e,t){const r=e.querySelectorAll?e.querySelectorAll("use"):[];if(r.length===0)return e;const s={};for(let a=0;a<r.length;a++){const c=r[a].getAttribute("xlink:href");if(c){const u=e.querySelector(c),g=document.querySelector(c);!u&&g&&!s[c]&&(s[c]=await pe(g,t,!0))}}const i=Object.values(s);if(i.length){const a="http://www.w3.org/1999/xhtml",o=document.createElementNS(a,"svg");o.setAttribute("xmlns",a),o.style.position="absolute",o.style.width="0",o.style.height="0",o.style.overflow="hidden",o.style.display="none";const c=document.createElementNS(a,"defs");o.appendChild(c);for(let u=0;u<i.length;u++)c.appendChild(i[u]);e.appendChild(o)}return e}async function pe(e,t,r){return!r&&t.filter&&!t.filter(e)?null:Promise.resolve(e).then(s=>Pt(s,t)).then(s=>Bt(e,s,t)).then(s=>Ot(e,s,t)).then(s=>Ut(s,t))}const rt=/url\((['"]?)([^'"]+?)\1\)/g,qt=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,zt=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function Gt(e){const t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}function Kt(e){const t=[];return e.replace(rt,(r,s,i)=>(t.push(i),r)),t.filter(r=>!_e(r))}async function Qt(e,t,r,s,i){try{const a=r?gt(t,r):t,o=Ce(t);let c;return i||(c=await Ee(a,o,s)),e.replace(Gt(t),`$1${c}$3`)}catch{}return e}function Xt(e,{preferredFontFormat:t}){return t?e.replace(zt,r=>{for(;;){const[s,,i]=qt.exec(r)||[];if(!i)return"";if(i===t)return`src: ${s};`}}):e}function st(e){return e.search(rt)!==-1}async function nt(e,t,r){if(!st(e))return e;const s=Xt(e,r);return Kt(s).reduce((a,o)=>a.then(c=>Qt(c,o,t,r)),Promise.resolve(s))}async function Y(e,t,r){var s;const i=(s=t.style)===null||s===void 0?void 0:s.getPropertyValue(e);if(i){const a=await nt(i,null,r);return t.style.setProperty(e,a,t.style.getPropertyPriority(e)),!0}return!1}async function Jt(e,t){await Y("background",e,t)||await Y("background-image",e,t),await Y("mask",e,t)||await Y("-webkit-mask",e,t)||await Y("mask-image",e,t)||await Y("-webkit-mask-image",e,t)}async function Yt(e,t){const r=F(e,HTMLImageElement);if(!(r&&!_e(e.src))&&!(F(e,SVGImageElement)&&!_e(e.href.baseVal)))return;const s=r?e.src:e.href.baseVal,i=await Ee(s,Ce(s),t);await new Promise((a,o)=>{e.onload=a,e.onerror=t.onImageErrorHandler?(...u)=>{try{a(t.onImageErrorHandler(...u))}catch(g){o(g)}}:o;const c=e;c.decode&&(c.decode=a),c.loading==="lazy"&&(c.loading="eager"),r?(e.srcset="",e.src=i):e.href.baseVal=i})}async function Zt(e,t){const s=W(e.childNodes).map(i=>at(i,t));await Promise.all(s).then(()=>e)}async function at(e,t){F(e,Element)&&(await Jt(e,t),await Yt(e,t),await Zt(e,t))}function er(e,t){const{style:r}=e;t.backgroundColor&&(r.backgroundColor=t.backgroundColor),t.width&&(r.width=`${t.width}px`),t.height&&(r.height=`${t.height}px`);const s=t.style;return s!=null&&Object.keys(s).forEach(i=>{r[i]=s[i]}),e}const Oe={};async function Ue(e){let t=Oe[e];if(t!=null)return t;const s=await(await fetch(e)).text();return t={url:e,cssText:s},Oe[e]=t,t}async function qe(e,t){let r=e.cssText;const s=/url\(["']?([^"')]+)["']?\)/g,a=(r.match(/url\([^)]+\)/g)||[]).map(async o=>{let c=o.replace(s,"$1");return c.startsWith("https://")||(c=new URL(c,e.url).href),et(c,t.fetchRequestInit,({result:u})=>(r=r.replace(o,`url(${u})`),[o,u]))});return Promise.all(a).then(()=>r)}function ze(e){if(e==null)return[];const t=[],r=/(\/\*[\s\S]*?\*\/)/gi;let s=e.replace(r,"");const i=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){const u=i.exec(s);if(u===null)break;t.push(u[0])}s=s.replace(i,"");const a=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,o="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})",c=new RegExp(o,"gi");for(;;){let u=a.exec(s);if(u===null){if(u=c.exec(s),u===null)break;a.lastIndex=c.lastIndex}else c.lastIndex=a.lastIndex;t.push(u[0])}return t}async function tr(e,t){const r=[],s=[];return e.forEach(i=>{if("cssRules"in i)try{W(i.cssRules||[]).forEach((a,o)=>{if(a.type===CSSRule.IMPORT_RULE){let c=o+1;const u=a.href,g=Ue(u).then(h=>qe(h,t)).then(h=>ze(h).forEach(v=>{try{i.insertRule(v,v.startsWith("@import")?c+=1:i.cssRules.length)}catch(y){console.error("Error inserting rule from remote css",{rule:v,error:y})}})).catch(h=>{console.error("Error loading remote css",h.toString())});s.push(g)}})}catch(a){const o=e.find(c=>c.href==null)||document.styleSheets[0];i.href!=null&&s.push(Ue(i.href).then(c=>qe(c,t)).then(c=>ze(c).forEach(u=>{o.insertRule(u,o.cssRules.length)})).catch(c=>{console.error("Error loading remote stylesheet",c)})),console.error("Error inlining remote css file",a)}}),Promise.all(s).then(()=>(e.forEach(i=>{if("cssRules"in i)try{W(i.cssRules||[]).forEach(a=>{r.push(a)})}catch(a){console.error(`Error while reading CSS rules from ${i.href}`,a)}}),r))}function rr(e){return e.filter(t=>t.type===CSSRule.FONT_FACE_RULE).filter(t=>st(t.style.getPropertyValue("src")))}async function sr(e,t){if(e.ownerDocument==null)throw new Error("Provided element is not within a Document");const r=W(e.ownerDocument.styleSheets),s=await tr(r,t);return rr(s)}function it(e){return e.trim().replace(/["']/g,"")}function nr(e){const t=new Set;function r(s){(s.style.fontFamily||getComputedStyle(s).fontFamily).split(",").forEach(a=>{t.add(it(a))}),Array.from(s.children).forEach(a=>{a instanceof HTMLElement&&r(a)})}return r(e),t}async function ar(e,t){const r=await sr(e,t),s=nr(e);return(await Promise.all(r.filter(a=>s.has(it(a.style.fontFamily))).map(a=>{const o=a.parentStyleSheet?a.parentStyleSheet.href:null;return nt(a.cssText,o,t)}))).join(`
|
| 2 |
-
`)}async function ir(e,t){const r=t.fontEmbedCSS!=null?t.fontEmbedCSS:t.skipFonts?null:await ar(e,t);if(r){const s=document.createElement("style"),i=document.createTextNode(r);s.appendChild(i),e.firstChild?e.insertBefore(s,e.firstChild):e.appendChild(s)}}async function lr(e,t={}){const{width:r,height:s}=Ze(e,t),i=await pe(e,t,!0);return await ir(i,t),await at(i,t),er(i,t),await St(i,r,s)}async function cr(e,t={}){const{width:r,height:s}=Ze(e,t),i=await lr(e,t),a=await fe(i),o=document.createElement("canvas"),c=o.getContext("2d"),u=t.pixelRatio||wt(),g=t.canvasWidth||r,h=t.canvasHeight||s;return o.width=g*u,o.height=h*u,t.skipAutoScale||vt(o),o.style.width=`${g}`,o.style.height=`${h}`,t.backgroundColor&&(c.fillStyle=t.backgroundColor,c.fillRect(0,0,o.width,o.height)),c.drawImage(a,0,0,o.width,o.height),o}async function or(e,t={}){const r=await cr(e,t);return await jt(r)}const Ge="#ffffff";function dr(e){if(typeof window>"u")return Ge;const t=window.getComputedStyle(e).backgroundColor;return!t||t==="rgba(0, 0, 0, 0)"||t==="transparent"?Ge:t}async function ur(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 or(e,{pixelRatio:2,cacheBust:!0,backgroundColor:dr(e)});if(!t)throw new Error("Failed to render screenshot.");await window.navigator.clipboard.write([new window.ClipboardItem({"image/png":t})])}const je=5;function mr(e){if(!e)return null;const t=e.trim(),r=t.match(/^https?:\/\/(?:www\.)?arxiv\.org\/(?:abs|pdf)\/([^/?#]+)/i);if(r!=null&&r[1])return r[1].replace(/\.pdf$/i,"");const s=t.match(/^(?:https?:\/\/(?:www\.)?paperswithcode\.co)?\/paper\/([^/?#]+)/i);return(s==null?void 0:s[1])??null}function ue(e,t){return e?n.jsx(me,{title:e}):t||"—"}function Ke(e){const t=e.length===7?`${e}-01`:e,r=new Date(t).getTime();return Number.isFinite(r)?r:0}const ke=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Se(e){const t=new Date(e);return{year:t.getFullYear(),month:t.getMonth()}}function hr(e,t){if(e===t){const{year:u,month:g}=Se(e);return[{timestamp:new Date(u,g,1).getTime(),key:`${u}-${g}`,label:`${ke[g]} ${u}`}]}const r=Se(e),s=Se(t);if(r.year===s.year){const u=s.month-r.month+1;let g=1;const h=12;u>h&&(g=Math.ceil(u/h));const v=[];for(let y=r.month;y<=s.month;y+=g)v.push({timestamp:new Date(r.year,y,1).getTime(),key:`${r.year}-${y}`,label:u<=3?`${ke[y]} ${r.year}`:ke[y]});return v}const i=s.year-r.year+1;let a=1;const o=12;i>o&&(a=Math.ceil(i/o));const c=[];for(let u=r.year;u<=s.year;u+=a)c.push({timestamp:new Date(u,0,1).getTime(),key:String(u),label:String(u)});return c}const fr=({points:e,metric:t})=>{const r=ut(),[s,i]=E.useState(null),a=880,o=320,c=60,u=30,g=40,h=50,v=e.map(l=>l.value),y=Math.min(...v),O=Math.max(...v)-y||1,ce=a-c-u,M=o-g-h,A=e.map(l=>Ke(l.date)),U=Math.min(...A),G=Math.max(...A),P=G-U||1,oe=l=>U===G?c+ce/2:c+(l-U)/P*ce,B=e.map((l,m)=>{const k=oe(Ke(l.date)),w=(l.value-y)/O,T=g+M*(1-w);return{x:k,y:T,data:l,idx:m}}),x=B.filter(l=>l.data.isSota);let K="";if(x.length>=2){K=`M${x[0].x},${x[0].y}`;for(let l=1;l<x.length;l++){const m=x[l-1],k=x[l],w=(m.x+k.x)/2;K+=` C${w},${m.y} ${w},${k.y} ${k.x},${k.y}`}}const b=5.4,ge=8,q=9,ee=l=>{const m=l.data.modelName||l.data.paperTitle||"";if(!m)return null;const k=m.length>22?m.slice(0,21)+"…":m,w=k.length*b;let T=l.x-w/2,$=l.x+w/2,I="middle";return T<c?(T=c,$=c+w,I="start"):$>a-u&&($=a-u,T=$-w,I="end"),{x:I==="start"?c:I==="end"?a-u:l.x,y:l.y-q,text:k,anchor:I,left:T,right:$}},Q=[],H=x.length>0?ee(x[x.length-1]):null;let te=-1/0;for(let l=0;l<x.length-1;l++){const m=ee(x[l]);m&&(m.left<te+ge||H&&m.right>H.left-ge||(te=m.right,Q.push({x:m.x,y:m.y,text:m.text,anchor:m.anchor})))}H&&Q.push({x:H.x,y:H.y,text:H.text,anchor:H.anchor});const X=hr(U,G),S=5,z=l=>i(m=>m===l?null:m),re=l=>{l&&r(`/paper/${l}`)},R=(l,m)=>{const w=`${l.data.modelName||l.data.paperTitle||"Unknown model"}: ${Z(l.data.value)} on ${l.data.dateLabel}`,T=!!l.data.paperRouteId;return n.jsxs("g",{children:[m,n.jsx("circle",{cx:l.x,cy:l.y,r:"10",fill:"transparent",style:{cursor:T?"pointer":"default",outline:"none"},tabIndex:0,role:T?"link":"img","aria-label":w,onMouseEnter:()=>i(l.idx),onMouseLeave:()=>z(l.idx),onFocus:()=>i(l.idx),onBlur:()=>z(l.idx),onClick:()=>re(l.data.paperRouteId),onKeyDown:$=>{T&&($.key==="Enter"||$.key===" ")&&($.preventDefault(),re(l.data.paperRouteId))},children:n.jsx("title",{children:w})})]},l.idx)};return n.jsxs("svg",{width:"100%",viewBox:`0 0 ${a} ${o}`,style:{display:"block"},children:[n.jsx("text",{x:c-38,y:g+M/2,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-faint)",textAnchor:"middle",transform:`rotate(-90 ${c-38} ${g+M/2})`,children:t}),Array.from({length:S}).map((l,m)=>{const k=m/(S-1),w=g+M*(1-k),T=y+O*k;return n.jsxs("g",{children:[n.jsx("line",{x1:c,y1:w,x2:a-u,y2:w,stroke:"var(--hairline)",strokeWidth:"1"}),n.jsx("text",{x:c-10,y:w+4,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-faint)",textAnchor:"end",children:Z(T)})]},m)}),X.map(l=>{const m=oe(l.timestamp);return n.jsx("text",{x:m,y:o-h+18,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-soft)",textAnchor:"middle",children:l.label},l.key)}),B.filter(l=>!l.data.isSota).map(l=>{const m=s===l.idx;return R(l,n.jsx("circle",{cx:l.x,cy:l.y,r:m?3:2,fill:"var(--ink-faint)",opacity:m?1:.45,style:{transition:"r 0.12s ease, opacity 0.12s ease"}}))}),K&&n.jsx("path",{d:K,stroke:"var(--accent)",strokeWidth:"2",fill:"none",strokeLinejoin:"round",strokeLinecap:"round"}),x.map(l=>{const m=s===l.idx;return R(l,n.jsx("circle",{cx:l.x,cy:l.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"}}))}),Q.map((l,m)=>n.jsx("text",{x:l.x,y:l.y,fontSize:"9.5",fontFamily:"var(--mono)",fill:"var(--ink-soft)",textAnchor:l.anchor,pointerEvents:"none",style:{paintOrder:"stroke",stroke:"var(--bg-elevated)",strokeWidth:3,strokeLinejoin:"round"},children:l.text},`label-${m}`)),s!==null&&B[s]&&(()=>{const l=B[s],m=l.data.modelName||l.data.paperTitle||"Unknown model",w=`${m.length>40?m.slice(0,39)+"…":m}: ${Z(l.data.value)}`,$=Math.max(120,Math.min(340,w.length*6.6+24)),I=30;let D=l.x-$/2;D<c&&(D=c),D+$>a-u&&(D=a-u-$);const se=l.y-I-14>=g?l.y-I-12:l.y+12;return n.jsxs("g",{pointerEvents:"none",children:[n.jsx("rect",{x:D,y:se,width:$,height:I,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:D+12,y:se+19,fontSize:"12",fontFamily:"var(--sans)",fill:"var(--ink)",fontWeight:500,children:w})]})})()]})};function le(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 pr(e){return[e.paper_id,e.task_id,e.dataset_id,e.model_name,e.harness??""].join("|")}function gr(e){const t=new Map;for(const r of e){const s=pr(r),i=t.get(s);if(!i){t.set(s,{...r,metrics:{...r.metrics||{}},sourceEvaluationIds:[r.id],ranksByMetric:r.best_metric&&r.best_rank!=null?{[r.best_metric]:r.best_rank}:{}});continue}i.metrics={...i.metrics,...r.metrics||{}},i.sourceEvaluationIds.push(r.id),r.best_metric&&r.best_rank!=null&&(i.ranksByMetric[r.best_metric]=r.best_rank)}return Array.from(t.values())}function Qe(e,t){return t?e.id===t||e.sourceEvaluationIds.includes(t):!1}function Xe(e,t){return e.ranksByMetric[t]??e.best_rank??9999}function xr(e,t,r){if(e.length===0)return{points:[],sota:0,sotaModel:""};const s=e.map(h=>{var N;const v=le((N=h.metrics)==null?void 0:N[t]),y=h.paper_published_date||"";return{eval:h,value:v,date:y}}).filter(h=>h.value!==null&&!!h.date).sort((h,v)=>h.date.localeCompare(v.date)),i=[];let a=null;for(const h of s){const v=a==null?!0:r==="↓"?h.value<a:h.value>a;v&&(a=h.value),i.push({value:h.value,date:h.date,dateLabel:h.date.slice(0,7),modelName:h.eval.model_name||"",paperTitle:h.eval.paper_title||"",paperRouteId:h.eval.paper_arxiv_id||h.eval.paper_id||null,isSota:v})}const c=e.map(h=>{var v;return{eval:h,value:le((v=h.metrics)==null?void 0:v[t])}}).filter(h=>h.value!==null).sort((h,v)=>r==="↓"?h.value-v.value:v.value-h.value)[0],u=(c==null?void 0:c.value)??0,g=(c==null?void 0:c.eval.model_name)||(c==null?void 0:c.eval.paper_title)||"";return{points:i,sota:u,sotaModel:g}}const Je=({targetRef:e,label:t})=>{const{toast:r}=dt(),[s,i]=E.useState("idle"),a=E.useRef(null);E.useEffect(()=>()=>{a.current!==null&&window.clearTimeout(a.current)},[]);const o=E.useCallback(async()=>{const u=e.current;if(u){i("copying"),u.classList.add("is-capturing"),u.offsetHeight,await new Promise(g=>window.requestAnimationFrame(()=>g()));try{await ur(u),i("copied"),r({title:"Screenshot copied",description:`Image of the ${t} copied to your clipboard.`}),a.current!==null&&window.clearTimeout(a.current),a.current=window.setTimeout(()=>i("idle"),1500)}catch(g){i("idle"),r({title:"Copy failed",description:g instanceof Error&&g.message?g.message:"Could not copy the screenshot to your clipboard.",variant:"destructive"})}finally{u.classList.remove("is-capturing")}}},[e,t,r]),c=s==="copied"?"Copied":s==="copying"?"Copying…":"Copy image";return n.jsxs("button",{type:"button",className:"bm-copy-btn",onClick:o,disabled:s==="copying","aria-label":`Copy ${t} screenshot to clipboard`,title:`Copy ${t} screenshot to clipboard`,children:[n.jsx(ft,{name:"copy",size:11}),c]})},$r=()=>{var I,D,xe,se,Re,$e,Ne,Te,Me,Fe;const{datasetSlug:e}=lt(),[t]=ct(),r=t.get("task")||void 0,s=t.get("eval")||void 0,{preferences:i,setHideClosedSourceEvals:a}=ot(),[o,c]=E.useState(void 0),u=E.useRef(null),g=E.useRef(!1),h=E.useRef(null),v=E.useRef(null),y=ie({queryKey:["dataset",e,"with-paper"],queryFn:()=>ae.getDatasetBySlug(e,{include_paper:!0}),enabled:!!e,staleTime:10*60*1e3}),N=ie({queryKey:["dataset-evals",(I=y.data)==null?void 0:I.id],queryFn:()=>ae.getEvaluationsByDataset(y.data.id),enabled:!!((D=y.data)!=null&&D.id),staleTime:5*60*1e3}),O=ie({queryKey:["dataset-tasks",(xe=y.data)==null?void 0:xe.id],queryFn:()=>ae.getDatasetTasks(y.data.id),enabled:!!((se=y.data)!=null&&se.id),staleTime:10*60*1e3}),ce=ie({queryKey:["metric-directions"],queryFn:()=>ae.getMetricDirections(),staleTime:60*60*1e3}),M=E.useMemo(()=>{var d;return!s||!((d=N.data)!=null&&d.length)?null:N.data.find(p=>p.id===s)||null},[s,N.data]),A=E.useMemo(()=>{const d=O.data||[];if(d.length===0)return null;if(M!=null&&M.task_id&&d.some(f=>f.id===M.task_id))return M.task_id;if(r){const f=d.find(_=>_.slug===r);if(f)return f.id}if(d.length===1)return d[0].id;const p=N.data||[];if(p.length>0){const f=new Map;for(const j of p)f.set(j.task_id,(f.get(j.task_id)||0)+1);let _=null,C=-1;for(const j of d){const V=f.get(j.id)||0;V>C&&(C=V,_=j.id)}if(_)return _}return d[0].id},[O.data,N.data,r,M]),U=ie({queryKey:["leaderboard-metrics",(Re=y.data)==null?void 0:Re.id,A],queryFn:()=>ae.getLeaderboardMetrics(y.data.id,A),enabled:!!(($e=y.data)!=null&&$e.id)&&!!A,staleTime:10*60*1e3}),G=E.useMemo(()=>{let d=N.data||[];return i.hide_closed_source_evals&&(d=d.filter(p=>p.is_open!==!1)),A?d.filter(p=>p.task_id===A):d},[N.data,A,i.hide_closed_source_evals]),P=E.useMemo(()=>gr(G),[G]),oe=E.useMemo(()=>{const d=new Set;return P.forEach(p=>{p.best_metric&&d.add(p.best_metric),Object.keys(p.metrics||{}).forEach(f=>d.add(f))}),Array.from(d)},[P]),B=E.useMemo(()=>(U.data||[]).map(d=>d.metric_name),[U.data]),x=B.length?B:oe,K=E.useMemo(()=>{var _;if(P.length===0)return x[0]||"";const d=new Map;for(const C of P)for(const j of Object.keys(C.metrics||{}))B.length&&!x.includes(j)||d.set(j,(d.get(j)||0)+1);let p=null,f=0;for(const[C,j]of d)j>f&&(f=j,p=C);return p||x[0]||((_=P[0])==null?void 0:_.best_metric)||""},[P,x,B]),b=o||(M==null?void 0:M.best_metric)||K,q=(((Te=(Ne=ce.data)==null?void 0:Ne.directions)==null?void 0:Te[b])||"higher_is_better")==="lower_is_better"?"↓":"↑",ee=E.useMemo(()=>{if(x.length===0)return b?[b]:[];if(x.length<=je)return x;const d=[],p=b&&x.includes(b),f=p?je-1:je;let _=0;for(const C of x)C!==b&&(_>=f||(d.push(C),_++));if(p){const C=x.findIndex(V=>V===b),j=x.slice(0,C).filter(V=>d.includes(V)).length;d.splice(j,0,b)}return d},[x,b]),{points:Q,sota:H,sotaModel:te}=E.useMemo(()=>xr(P,b,q),[P,b,q]);E.useEffect(()=>{if(g.current||!s||!N.data||N.data.length===0)return;const d=u.current;d&&(g.current=!0,d.scrollIntoView({behavior:"smooth",block:"start"}))},[s,N.data]);const X=E.useMemo(()=>{const d=O.data||[];return A?d.find(p=>p.id===A)||d[0]||null:d[0]||null},[O.data,A]);if(y.isLoading)return n.jsxs("div",{className:"page",children:[n.jsx(we,{className:"h-12 w-1/2 mb-6"}),n.jsx(we,{className:"h-64 w-full"})]});if(y.error||!y.data)return n.jsx("div",{className:"page",children:n.jsx(mt,{variant:"destructive",children:n.jsx(ht,{children:"Benchmark not found."})})});const S=y.data,z=P.slice().sort((d,p)=>{var C,j;const f=le((C=d.metrics)==null?void 0:C[b]),_=le((j=p.metrics)==null?void 0:j[b]);return f!==null&&_!==null?q==="↓"?f-_:_-f:f!==null?-1:_!==null?1:Xe(d,b)-Xe(p,b)}),re=!!S.supports_harness,R=s&&z.find(d=>Qe(d,s))||null,l=S.introducing_paper??void 0,m=(l==null?void 0:l.arxiv_id)||(l==null?void 0:l.id)||mr(S.paper_url),k=(l==null?void 0:l.title)||S.introducing_paper_title||null,w=((Me=l==null?void 0:l.published)==null?void 0:Me.slice(0,4))||S.introduced_year||null,T=!!m||!!S.paper_url||!!k,$=l!=null&&l.arxiv_id||(Fe=S.paper_url)!=null&&Fe.match(/^https?:\/\/(?:www\.)?arxiv\.org\//i)?`arXiv:${m}`:`Paper ${m}`;return n.jsx("div",{className:"page",children:n.jsxs("div",{className:"bm-page",children:[n.jsxs("div",{className:"breadcrumb",children:[n.jsx(ne,{to:"/tasks",children:"Tasks"}),X&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"sep",children:"/"}),n.jsx(ne,{to:`/tasks/${X.slug||X.id}`,children:X.name})]}),n.jsx("span",{className:"sep",children:"/"}),n.jsx("span",{style:{color:"var(--accent-text)"},children:S.name})]}),n.jsx("h1",{className:"bm-title",children:S.name}),n.jsxs("div",{className:"bm-subtitle",style:{display:"flex",alignItems:"center",gap:16,flexWrap:"wrap"},children:[n.jsxs("span",{children:[b&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"metric-tag",children:b}),n.jsx("span",{style:{color:"var(--hairline-strong)",margin:"0 8px"},children:"·"})]}),te?n.jsxs("span",{children:["Best: ",n.jsx("span",{className:"best-name",children:Z(H)})," by ",n.jsx("span",{className:"best-name",style:{fontStyle:"normal"},children:te})]}):n.jsxs("span",{children:[z.length," evaluations"]})]}),S.hf_url&&n.jsxs("a",{className:"bm-action-btn",href:S.hf_url,target:"_blank",rel:"noopener noreferrer",children:[n.jsx("span",{"aria-hidden":"true",children:"🤗"})," View on Hugging Face"]})]}),S.description&&n.jsx("p",{style:{fontFamily:"var(--serif)",color:"var(--ink-soft)",maxWidth:760,marginBottom:16},children:S.description}),T&&n.jsxs("div",{className:"method-source",style:{marginTop:0,marginBottom:18},children:[n.jsx("span",{className:"method-source-label",children:"Source"}),m?n.jsxs(ne,{to:`/paper/${m}`,target:"_blank",rel:"noopener noreferrer",className:"method-source-link",children:[n.jsx("span",{className:"method-source-title",children:k?n.jsx(me,{title:k}):$}),w&&n.jsx("span",{className:"method-source-meta",children:w})]}):S.paper_url?n.jsxs("a",{href:S.paper_url,target:"_blank",rel:"noopener noreferrer",className:"method-source-link",children:[n.jsx("span",{className:"method-source-title",children:k?n.jsx(me,{title:k}):S.paper_url}),w&&n.jsx("span",{className:"method-source-meta",children:w})]}):n.jsxs("div",{className:"method-source-link is-static",children:[n.jsx("span",{className:"method-source-title",children:k?n.jsx(me,{title:k}):null}),w&&n.jsx("span",{className:"method-source-meta",children:w})]})]}),Q.filter(d=>d.isSota).length>=2&&n.jsxs("div",{className:"bm-card",ref:h,children:[n.jsxs("div",{className:"bm-card-screenshot-header","aria-hidden":"true",children:[n.jsxs("div",{className:"bm-card-screenshot-title",children:[n.jsx("span",{className:"bm-card-screenshot-eyebrow",children:"Benchmark"}),n.jsx("span",{className:"bm-card-screenshot-name",children:S.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:[x.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=>c(d.target.value),children:x.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(Be,{className:"bm-closed-toggle-switch",checked:!i.hide_closed_source_evals,onCheckedChange:d=>{a(!d)},"aria-label":"Show closed-source models"}),n.jsx("span",{className:"bm-closed-toggle-label",children:"Closed-source"})]}),n.jsx(Je,{targetRef:h,label:"SOTA chart"})]})]}),n.jsx("div",{className:"bm-chart-wrap",children:n.jsx(fr,{points:Q,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 C,j;const d=R.paper_arxiv_id||R.paper_id,p=R.paper_title||(R.paper_arxiv_id?`arXiv:${R.paper_arxiv_id}`:null),f=R.best_metric&&((C=R.metrics)==null?void 0:C[R.best_metric])!==void 0?R.best_metric:b,_=(j=R.metrics)==null?void 0:j[f];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||p||"—",R.harness?` · ${R.harness}`:""]}),n.jsxs("span",{className:"bm-highlight-meta",children:[_!==void 0&&f?n.jsxs(n.Fragment,{children:[f,": ",Z(_),p?" · ":""]}):null,d?n.jsx(ne,{to:`/paper/${d}`,children:ue(R.paper_title,p)}):ue(R.paper_title,p)]})]})]})})(),n.jsxs("div",{className:"bm-card",ref:v,children:[n.jsxs("div",{className:"bm-card-screenshot-header","aria-hidden":"true",children:[n.jsxs("div",{className:"bm-card-screenshot-title",children:[n.jsx("span",{className:"bm-card-screenshot-eyebrow",children:"Benchmark"}),n.jsx("span",{className:"bm-card-screenshot-name",children:S.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:[x.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=>c(d.target.value),children:x.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(Be,{className:"bm-closed-toggle-switch",checked:!i.hide_closed_source_evals,onCheckedChange:d=>{a(!d)},"aria-label":"Show closed-source models"}),n.jsx("span",{className:"bm-closed-toggle-label",children:"Closed-source"})]}),n.jsx(Je,{targetRef:v,label:"leaderboard"})]})]}),N.isLoading?n.jsx("div",{style:{padding:16},children:Array.from({length:5}).map((d,p)=>n.jsx(we,{className:"h-10 w-full mb-2"},p))}):z.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"}),re&&n.jsx("th",{className:"col-harness",children:"Harness"}),ee.map(d=>{const p=d===b;return n.jsx("th",{className:`col-value ${p?"is-active":""}`,"aria-sort":p?q==="↓"?"ascending":"descending":"none",children:n.jsxs("button",{type:"button",className:"bm-metric-header",onClick:()=>c(d),"aria-pressed":p,title:`Sort by ${d}`,children:[d,p?` ${q}`:""]})},d)}),n.jsx("th",{className:"col-paper",children:"Paper"}),n.jsx("th",{className:"col-year",children:"Year"})]})}),n.jsx("tbody",{children:(()=>{let d=null,p=0;return z.map((f,_)=>{var Ae,Ie;const C=le((Ae=f.metrics)==null?void 0:Ae[b]);let j=null;C!==null&&((d===null||C!==d)&&(p=_+1,d=C),j=p);const V=f.paper_arxiv_id||f.paper_id,Le=f.paper_title||(f.paper_arxiv_id?`arXiv:${f.paper_arxiv_id}`:null),ye=Qe(f,s);return n.jsxs("tr",{ref:ye?u:void 0,className:ye?"is-highlighted":void 0,children:[n.jsx("td",{className:"col-rank",children:j??"—"}),n.jsxs("td",{className:"col-model",children:[ye&&n.jsx("span",{className:"bm-row-marker","aria-hidden":"true"}),f.hf_model_url?n.jsx("a",{href:f.hf_model_url,target:"_blank",rel:"noopener noreferrer",className:"bm-model-link",title:`Open ${f.model_name||"model"} on Hugging Face`,children:f.model_name||"—"}):f.model_name||"—",f.is_open===!1&&n.jsx(pt,{})]}),re&&n.jsx("td",{className:"col-harness",children:f.harness||"—"}),ee.map(be=>{var De;const Pe=be===b,de=(De=f.metrics)==null?void 0:De[be];return n.jsx("td",{className:`col-value${Pe?" is-active":""}${Pe&&j===1?" is-best":""}`,children:de!=null&&de!==""?Z(de):"—"},be)}),n.jsx("td",{className:"col-paper",children:V?n.jsx(ne,{to:`/paper/${V}`,children:ue(f.paper_title,Le)}):ue(f.paper_title,Le)}),n.jsx("td",{className:"col-year",children:((Ie=f.paper_published_date)==null?void 0:Ie.slice(0,4))||"—"})]},f.id)})})()})]})})]})]})})};export{$r as default};
|
|
|
|
|
|
|
|
|
assets/ClosedSourceEvalBadge-C7AzIzhI.js
DELETED
|
@@ -1 +0,0 @@
|
|
| 1 |
-
import{r as a,d as F,j as n,R as I,B as U,b as B,f as d,D as y,P as H,E as $,i as W,e as z,J as K,K as G,M as J,k as V,L as Y}from"./index-DjK_yrbe.js";var E,R="HoverCard",[N]=W(R,[y]),w=y(),[q,S]=N(R),O=e=>{const{__scopeHoverCard:t,children:r,open:i,defaultOpen:s,onOpenChange:c,openDelay:f=700,closeDelay:v=300}=e,l=w(t),C=a.useRef(0),u=a.useRef(0),h=a.useRef(!1),p=a.useRef(!1),[m,o]=F({prop:i,defaultProp:s??!1,onChange:c,caller:R}),x=a.useCallback(()=>{clearTimeout(u.current),C.current=window.setTimeout(()=>o(!0),f)},[f,o]),g=a.useCallback(()=>{clearTimeout(C.current),!h.current&&!p.current&&(u.current=window.setTimeout(()=>o(!1),v))},[v,o]),M=a.useCallback(()=>o(!1),[o]);return a.useEffect(()=>()=>{clearTimeout(C.current),clearTimeout(u.current)},[]),n.jsx(q,{scope:t,open:m,onOpenChange:o,onOpen:x,onClose:g,onDismiss:M,hasSelectionRef:h,isPointerDownOnContentRef:p,children:n.jsx(I,{...l,children:r})})};O.displayName=R;var D="HoverCardTrigger",_=a.forwardRef((e,t)=>{const{__scopeHoverCard:r,...i}=e,s=S(D,r),c=w(r);return n.jsx(U,{asChild:!0,...c,children:n.jsx(B.a,{"data-state":s.open?"open":"closed",...i,ref:t,onPointerEnter:d(e.onPointerEnter,b(s.onOpen)),onPointerLeave:d(e.onPointerLeave,b(s.onClose)),onFocus:d(e.onFocus,s.onOpen),onBlur:d(e.onBlur,s.onClose),onTouchStart:d(e.onTouchStart,f=>f.preventDefault())})})});_.displayName=D;var T="HoverCardPortal",[Q,X]=N(T,{forceMount:void 0}),j=e=>{const{__scopeHoverCard:t,forceMount:r,children:i,container:s}=e,c=S(T,t);return n.jsx(Q,{scope:t,forceMount:r,children:n.jsx(H,{present:r||c.open,children:n.jsx($,{asChild:!0,container:s,children:i})})})};j.displayName=T;var P="HoverCardContent",A=a.forwardRef((e,t)=>{const r=X(P,e.__scopeHoverCard),{forceMount:i=r.forceMount,...s}=e,c=S(P,e.__scopeHoverCard);return n.jsx(H,{present:i||c.open,children:n.jsx(Z,{"data-state":c.open?"open":"closed",...s,onPointerEnter:d(e.onPointerEnter,b(c.onOpen)),onPointerLeave:d(e.onPointerLeave,b(c.onClose)),ref:t})})});A.displayName=P;var Z=a.forwardRef((e,t)=>{const{__scopeHoverCard:r,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:c,onInteractOutside:f,...v}=e,l=S(P,r),C=w(r),u=a.useRef(null),h=z(t,u),[p,m]=a.useState(!1);return a.useEffect(()=>{if(p){const o=document.body;return E=o.style.userSelect||o.style.webkitUserSelect,o.style.userSelect="none",o.style.webkitUserSelect="none",()=>{o.style.userSelect=E,o.style.webkitUserSelect=E}}},[p]),a.useEffect(()=>{if(u.current){const o=()=>{m(!1),l.isPointerDownOnContentRef.current=!1,setTimeout(()=>{var g;((g=document.getSelection())==null?void 0:g.toString())!==""&&(l.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",o),()=>{document.removeEventListener("pointerup",o),l.hasSelectionRef.current=!1,l.isPointerDownOnContentRef.current=!1}}},[l.isPointerDownOnContentRef,l.hasSelectionRef]),a.useEffect(()=>{u.current&&te(u.current).forEach(x=>x.setAttribute("tabindex","-1"))}),n.jsx(K,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:f,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:d(c,o=>{o.preventDefault()}),onDismiss:l.onDismiss,children:n.jsx(G,{...C,...v,onPointerDown:d(v.onPointerDown,o=>{o.currentTarget.contains(o.target)&&m(!0),l.hasSelectionRef.current=!1,l.isPointerDownOnContentRef.current=!0}),ref:h,style:{...v.style,userSelect:p?"text":void 0,WebkitUserSelect:p?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})}),ee="HoverCardArrow",oe=a.forwardRef((e,t)=>{const{__scopeHoverCard:r,...i}=e,s=w(r);return n.jsx(J,{...s,...i,ref:t})});oe.displayName=ee;function b(e){return t=>t.pointerType==="touch"?void 0:e()}function te(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;r.nextNode();)t.push(r.currentNode);return t}var re=O,ne=_,ae=j,L=A;const se=re,ie=ne,k=a.forwardRef(({className:e,align:t="center",sideOffset:r=4,...i},s)=>n.jsx(ae,{children:n.jsx(L,{ref:s,align:t,sideOffset:r,className:V("z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...i})}));k.displayName=L.displayName;const le=()=>n.jsxs(se,{openDelay:120,closeDelay:120,children:[n.jsx(ie,{asChild:!0,children:n.jsx("button",{type:"button",className:"bm-closed-source-tag","aria-label":"Closed-source model",children:"closed"})}),n.jsxs(k,{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"," ",n.jsx(Y,{to:"/settings",className:"closed-eval-tooltip-link",children:"settings"}),"."]})]});export{le as C};
|
|
|
|
|
|
assets/{ConferenceDetailView-D-q0JnNP.js → ConferenceDetailView-Bv6W24MH.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{_ as L,r as D,j as e,L as p,a as C}from"./index-
|
|
|
|
| 1 |
+
import{_ as L,r as D,j as e,L as p,a as C}from"./index-CNvFYqmB.js";import{u as T}from"./useQuery-B6TeiMq1.js";import{M as F}from"./MarkdownText-m_1zRXOr.js";import{e as B,h as A,d as E}from"./transform-Cbu7h9fT.js";import{S as f}from"./skeleton-C9NKUBNg.js";import{A as P,a as z}from"./alert-YjpxGuB-.js";import"./katex.min-BSBacQyE.js";const M=a=>(a==null?void 0:a.trim().toLowerCase().replace(/[\s_]+/g,"-"))??"",R=(a,t)=>{if(!a)return null;const i=new Date(`${a}T00:00:00`),s=t?new Date(`${t}T00:00:00`):null,c=g=>g.toLocaleDateString("en-US",{month:"long",day:"numeric"}),m=i.getFullYear();return s&&s.getTime()!==i.getTime()?i.getMonth()===s.getMonth()?`${c(i).replace(/\d+$/,"").trim()} ${i.getDate()}–${s.getDate()}, ${m}`:`${c(i)} – ${c(s)}, ${m}`:`${c(i)}, ${m}`},H=()=>{var k,S,_,b,$,w;const{confSlug:a}=L(),t=T({queryKey:["conference-areas-with-tasks",a],queryFn:()=>C.getConferenceAreasWithTasks(a),enabled:!!a,staleTime:10*60*1e3}),i=D.useMemo(()=>{if(!t.data)return[];const r={general:0,vision:1,video:2,language:3,audio:4,other:5},n=o=>r[M(o)]??999;return[...t.data.results].sort((o,l)=>{const d=n(o.name),x=n(l.name);return d!==x?d-x:o.name.localeCompare(l.name)})},[t.data]),s=(k=t.data)==null?void 0:k.conference,c=((S=t.data)==null?void 0:S.total_paper_count)??0,m=((_=t.data)==null?void 0:_.oral_paper_count)??0,g=((b=t.data)==null?void 0:b.spotlight_paper_count)??0,u=(($=t.data)==null?void 0:$.outstanding_paper_count)??0,j=((w=t.data)==null?void 0:w.best_paper_finalist_paper_count)??0,v=i.reduce((r,n)=>r+n.tasks.length,0);if(t.error)return e.jsx("div",{className:"page",children:e.jsx(P,{variant:"destructive",children:e.jsx(z,{children:"Failed to load conference. Please try again."})})});const y=s?R(s.start_date,s.end_date):null,N=s?[s.venue,s.location].filter(Boolean).join(", "):null,h=s==null?void 0:s.name;return e.jsxs("div",{className:"page",children:[e.jsxs("div",{className:s!=null&&s.image_url?"task-hero-grid":void 0,children:[e.jsxs("div",{children:[e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",letterSpacing:"0.1em",marginBottom:8},children:"CONFERENCE"}),e.jsx("h1",{className:"feed-title",children:h??e.jsx(f,{className:"h-10 w-64 inline-block"})}),e.jsxs("div",{className:"feed-subtitle",style:{display:"flex",flexDirection:"column",gap:4},children:[y&&e.jsx("span",{children:y}),N&&e.jsx("span",{children:N}),(s==null?void 0:s.url)&&e.jsx("a",{href:s.url,target:"_blank",rel:"noopener noreferrer",style:{color:"var(--accent-text)"},children:s.url.replace(/^https?:\/\//,"")}),(s==null?void 0:s.hf_url)&&e.jsxs("a",{className:"bm-action-btn",href:s.hf_url,target:"_blank",rel:"noopener noreferrer",style:{alignSelf:"flex-start",marginTop:4},children:[e.jsx("span",{"aria-hidden":"true",children:"🤗"})," View on Hugging Face"]})]}),(s==null?void 0:s.description)&&e.jsx(F,{className:"method-description",text:s.description})]}),(s==null?void 0:s.image_url)&&e.jsxs("figure",{className:"task-figure-card",children:[e.jsx("div",{className:"task-figure-img-wrap",children:e.jsx("img",{className:"task-figure-img",src:s.image_url,alt:h?`${h} visual`:"Conference visual",onError:r=>{var n,o;(o=(n=r.currentTarget.parentElement)==null?void 0:n.parentElement)==null||o.style.setProperty("display","none")}})}),e.jsxs("figcaption",{children:["Figure · ",h??"Conference",s.image_credit&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(F,{className:"task-image-credit",text:s.image_credit})]})]})]})]}),!t.isLoading&&c>0&&e.jsxs("section",{style:{marginTop:48,marginBottom:48},children:[e.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:24,paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},children:[e.jsxs("div",{children:[e.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.02em",marginBottom:4},children:"Browse papers"}),e.jsx("div",{style:{fontFamily:"var(--serif)",fontStyle:"italic",fontSize:13,color:"var(--ink-soft)"},children:"All accepted papers, plus oral, spotlight, 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{H as default};
|
assets/{ConferenceTaskView-uvijbzui.js → ConferenceTaskView-CAFTNTCU.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{_ as H,u as K,r as h,j as e,L as P,W as V,a as L}from"./index-
|
|
|
|
| 1 |
+
import{_ as H,u as K,r as h,j as e,L as P,W as V,a as L}from"./index-CNvFYqmB.js";import{u as E}from"./useQuery-B6TeiMq1.js";import{P as $}from"./components-CCZN6YfS.js";import{M as u}from"./MarkdownText-m_1zRXOr.js";import{t as W,d as D}from"./transform-Cbu7h9fT.js";import{c as U}from"./usePapers-CldwRRal.js";import{u as G}from"./useIntersectionObserver-jmbd50BD.js";import{S as J}from"./skeleton-C9NKUBNg.js";import{A as X,a as Y}from"./alert-YjpxGuB-.js";import"./LatexTitle-ZG9klHzz.js";import"./katex.min-BSBacQyE.js";import"./useInfiniteQuery-Vi6JDeF_.js";const Z=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],ee=a=>a==="trending"||a==="date_published"||a==="citation_count"?a:"trending",ge=()=>{var w,F,R,T,A,B;const{confSlug:a,taskSlug:r}=H(),[v,M]=K(),y=ee(v.get("order_by")),q=n=>{const s=new URLSearchParams(v);s.set("order_by",n),M(s)},b=r==="all",x=r==="oral",f=r==="spotlight",d=r==="outstanding",c=r==="best-paper-finalists",_=d||c,l=b||x||f||d||c,z=l?void 0:r,I=x?"oral":f?"spotlight":d?"outstanding":c?"best_paper_finalist":void 0,p=E({queryKey:["conference",a],queryFn:()=>L.getConference(a),enabled:!!a,staleTime:10*60*1e3}),g=E({queryKey:["task",r],queryFn:()=>L.getTask(r),enabled:!!r&&!l,staleTime:10*60*1e3}),i=U({conferenceSlug:a||"",taskSlug:z,presentation:I,page_size:12,order_by:y,order_dir:"desc",include_resources:!0,enabled:!!a}),{targetRef:Q,isIntersecting:S}=G({rootMargin:"200px"});h.useEffect(()=>{S&&i.hasNextPage&&!i.isFetchingNextPage&&i.fetchNextPage()},[S,i.hasNextPage,i.isFetchingNextPage]),h.useEffect(()=>{window.scrollTo(0,0)},[a,r]);const j=h.useMemo(()=>{var s;return(((s=i.data)==null?void 0:s.pages)??[]).flatMap(o=>o.results)},[i.data]),N=h.useMemo(()=>j.map(W),[j]),m=b?"All papers":x?"Oral papers":f?"Spotlight papers":d?"Outstanding papers":c?"Best paper finalists":D(((w=g.data)==null?void 0:w.name)||r||"",((F=g.data)==null?void 0:F.slug)||r),k=((T=(R=i.data)==null?void 0:R.pages[0])==null?void 0:T.count)??((A=p.data)==null?void 0:A.paper_count)??0,t=g.data;return p.error||g.error||i.error?e.jsx("div",{className:"page",children:e.jsx(X,{variant:"destructive",children:e.jsx(Y,{children:"Failed to load conference papers. Please try again."})})}):e.jsxs("div",{className:"page",children:[e.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[e.jsx(P,{to:"/",children:"Home"}),e.jsx("span",{children:" / "}),e.jsx(P,{to:"/conferences",children:"Conferences"}),e.jsx("span",{children:" / "}),e.jsx(P,{to:`/conferences/${a}`,children:((B=p.data)==null?void 0:B.name)??a}),e.jsx("span",{children:" / "}),e.jsx("span",{children:m})]}),e.jsxs("div",{className:!l&&(t!=null&&t.image_url)?"task-hero-grid":void 0,style:{marginTop:16,marginBottom:28},children:[e.jsxs("div",{children:[e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",letterSpacing:"0.1em",marginBottom:8},children:l?"BROWSE PAPERS":"TASK"}),e.jsx("h1",{className:"domain-mega-title",children:m}),d&&e.jsx(u,{className:"task-explainer",text:"ICLR 2026 recognized two Outstanding Papers and one Honorable Mention. [Read the announcement](https://blog.iclr.cc/2026/04/23/announcing-the-iclr-2026-outstanding-papers/)."}),c&&a==="cvpr-2026"&&e.jsx(u,{className:"task-explainer",text:"CVPR 2026 recognized fifteen Best Paper Award finalists, including the winners. [Read the announcement](https://x.com/CVPR/status/2062912519522717978)."}),!l&&(t==null?void 0:t.description)&&e.jsx(u,{className:"task-explainer",text:t.description}),p.data&&e.jsxs("div",{className:"task-quickstats",style:{marginTop:12},children:[e.jsxs("span",{children:[e.jsx("span",{className:"num",children:k.toLocaleString()}),"PAPERS"]}),e.jsx("span",{children:p.data.name})]})]}),!l&&(t==null?void 0:t.image_url)&&e.jsxs("figure",{className:"task-figure-card",children:[e.jsx("div",{className:"task-figure-img-wrap",children:e.jsx("img",{className:"task-figure-img",src:t.image_url,alt:`${m} schematic`,onError:n=>{var s,o;(o=(s=n.currentTarget.parentElement)==null?void 0:s.parentElement)==null||o.style.setProperty("display","none")}})}),e.jsxs("figcaption",{children:["Figure · ",m,t.image_credit&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(u,{className:"task-image-credit",text:t.image_credit})]})]})]})]}),e.jsxs("div",{className:"task-section-head",children:[e.jsx("div",{className:"task-section-eyebrow",children:_?"Award papers":"Conference papers · sort below"}),e.jsxs("div",{className:"task-section-title",children:["Papers ",e.jsxs("span",{className:"meta",children:["[",k.toLocaleString(),"]"]})]})]}),!_&&e.jsxs("div",{className:"sort-bar",children:[e.jsx("div",{className:"sort-options",children:Z.map(([n,s])=>e.jsx("button",{className:`sort-btn ${y===n?"active":""}`,onClick:()=>q(n),children:s},n))}),e.jsxs("div",{className:"results-count",children:[N.length," loaded in ",e.jsx("span",{children:m})]})]}),i.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((n,s)=>e.jsx(J,{className:"h-40 w-full"},s))}):N.length===0?e.jsx("div",{className:"no-results",children:"No papers found for this selection."}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:N.map((n,s)=>{var O;const o=(O=j[s])==null?void 0:O.conference_award,C=o==="outstanding"?"Outstanding Paper":o==="honorable_mention"?"Honorable Mention":o==="best_paper_finalist"&&!c?"Best Paper Finalist":null;return e.jsxs(V.Fragment,{children:[C&&e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",letterSpacing:"0.08em",marginBottom:8},children:C}),e.jsx($,{paper:n,rank:s+1})]},n.id)})}),e.jsx("div",{ref:Q,style:{height:1}}),i.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]})};export{ge as default};
|
assets/{ConferencesIndexView-DD8ItJ3B.js → ConferencesIndexView-ifL1qhwF.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{r as m,j as e,L as u,a as p}from"./index-
|
|
|
|
| 1 |
+
import{r as m,j as e,L as u,a as p}from"./index-CNvFYqmB.js";import{u as h}from"./useQuery-B6TeiMq1.js";import{S as d}from"./skeleton-C9NKUBNg.js";import{A as g,a as f}from"./alert-YjpxGuB-.js";const x=(r,n)=>{if(!r)return null;const t=new Date(`${r}T00:00:00`),s=n?new Date(`${n}T00:00:00`):null,a=l=>l.toLocaleDateString("en-US",{month:"long",day:"numeric"}),i=t.getFullYear();return s&&s.getTime()!==t.getTime()?t.getMonth()===s.getMonth()?`${a(t).replace(/\d+$/,"").trim()} ${t.getDate()}–${s.getDate()}, ${i}`:`${a(t)} – ${a(s)}, ${i}`:`${a(t)}, ${i}`},j=r=>{var t;if(r.year!=null)return r.year;if(r.start_date)return Number(r.start_date.slice(0,4));const n=(t=r.slug.match(/-(\d{4})$/))==null?void 0:t[1];return n?Number(n):0},v=(r,n)=>{if(r.start_date&&n.start_date){const t=r.start_date.localeCompare(n.start_date);if(t!==0)return t}else{if(r.start_date)return-1;if(n.start_date)return 1}return r.name.localeCompare(n.name)},y={display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:24,paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},S=()=>{const r=h({queryKey:["conferences"],queryFn:()=>p.getConferences(),staleTime:6e5}),n=m.useMemo(()=>{var s;if(!((s=r.data)!=null&&s.results))return null;const t={};return r.data.results.forEach(a=>{const i=j(a);(t[i]||(t[i]=[])).push(a)}),Object.values(t).forEach(a=>a.sort(v)),Object.keys(t).map(Number).sort((a,i)=>i-a).map(a=>({year:a,conferences:t[a]}))},[r.data]);return r.error?e.jsx("div",{className:"page",children:e.jsx(g,{variant:"destructive",children:e.jsx(f,{children:"Failed to load conferences. Please try again."})})}):e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["All ",e.jsx("em",{children:"Conferences"})]}),e.jsx("div",{className:"feed-subtitle",children:"Browse accepted papers from major AI conferences, grouped by research area and task."})]})}),r.isLoading?e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:32},children:Array.from({length:2}).map((t,s)=>e.jsxs("div",{children:[e.jsx(d,{className:"h-8 w-24 mb-4"}),e.jsx("div",{className:"tag-grid",children:Array.from({length:3}).map((a,i)=>e.jsx(d,{className:"h-32"},i))})]},s))}):n==null?void 0:n.map(({year:t,conferences:s})=>{const a=s.reduce((l,o)=>l+(o.paper_count??0),0),i=t>0?String(t):"Unknown year";return e.jsxs("section",{style:{marginBottom:48},children:[e.jsxs("div",{style:y,children:[e.jsx("div",{children:e.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.02em",marginBottom:4},children:i})}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[s.length," ",s.length===1?"conference":"conferences"," ·"," ",a.toLocaleString()," papers"]})]}),e.jsx("div",{className:"tag-grid",children:s.map(l=>{const o=x(l.start_date,l.end_date),c=[l.venue,l.location].filter(Boolean).join(", ");return e.jsxs(u,{to:`/conferences/${l.slug}`,className:"tag-cell",children:[e.jsx("div",{className:"name",children:l.name}),e.jsxs("div",{className:"meta",style:{display:"flex",flexDirection:"column",gap:4},children:[o&&e.jsx("span",{children:o}),c&&e.jsx("span",{children:c}),e.jsxs("span",{children:[(l.paper_count??0).toLocaleString()," papers"]})]})]},l.id)})})]},t)})]})};export{S as default};
|
assets/{CronDashboard-BAsbigmA.js → CronDashboard-BhyN9oNd.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
import{c as p,r as l,j as e,k as w,V as Q,ag as Y,ah as G,Z as ee}from"./index-
|
| 2 |
* @license lucide-react v0.462.0 - ISC
|
| 3 |
*
|
| 4 |
* This source code is licensed under the ISC license.
|
|
|
|
| 1 |
+
import{c as p,r as l,j as e,k as w,V as Q,ag as Y,ah as G,Z as ee}from"./index-CNvFYqmB.js";import{u as se}from"./useQuery-B6TeiMq1.js";import{B as N,D as te}from"./badge-BrTibTXh.js";import{B as b,I as ae}from"./input-DO8YPeri.js";import{R as L,C as B,a as U}from"./refresh-cw-BeDQ2XgS.js";import{L as M}from"./loader-circle-DWcwv_K5.js";/**
|
| 2 |
* @license lucide-react v0.462.0 - ISC
|
| 3 |
*
|
| 4 |
* This source code is licensed under the ISC license.
|
assets/ExternalSourceEvalBadge-DGkzBdAp.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
import{r as a,d as B,j as r,R as W,B as $,b as z,f as d,D as N,P as j,E as K,i as G,e as U,J,K as V,M as Y,k as q,L as Q}from"./index-CNvFYqmB.js";var S,P="HoverCard",[H]=G(P,[N]),R=N(),[X,E]=H(P),O=e=>{const{__scopeHoverCard:t,children:n,open:i,defaultOpen:s,onOpenChange:c,openDelay:f=700,closeDelay:v=300}=e,l=R(t),h=a.useRef(0),u=a.useRef(0),m=a.useRef(!1),p=a.useRef(!1),[C,o]=B({prop:i,defaultProp:s??!1,onChange:c,caller:P}),x=a.useCallback(()=>{clearTimeout(u.current),h.current=window.setTimeout(()=>o(!0),f)},[f,o]),g=a.useCallback(()=>{clearTimeout(h.current),!m.current&&!p.current&&(u.current=window.setTimeout(()=>o(!1),v))},[v,o]),I=a.useCallback(()=>o(!1),[o]);return a.useEffect(()=>()=>{clearTimeout(h.current),clearTimeout(u.current)},[]),r.jsx(X,{scope:t,open:C,onOpenChange:o,onOpen:x,onClose:g,onDismiss:I,hasSelectionRef:m,isPointerDownOnContentRef:p,children:r.jsx(W,{...l,children:n})})};O.displayName=P;var D="HoverCardTrigger",_=a.forwardRef((e,t)=>{const{__scopeHoverCard:n,...i}=e,s=E(D,n),c=R(n);return r.jsx($,{asChild:!0,...c,children:r.jsx(z.a,{"data-state":s.open?"open":"closed",...i,ref:t,onPointerEnter:d(e.onPointerEnter,w(s.onOpen)),onPointerLeave:d(e.onPointerLeave,w(s.onClose)),onFocus:d(e.onFocus,s.onOpen),onBlur:d(e.onBlur,s.onClose),onTouchStart:d(e.onTouchStart,f=>f.preventDefault())})})});_.displayName=D;var y="HoverCardPortal",[Z,ee]=H(y,{forceMount:void 0}),L=e=>{const{__scopeHoverCard:t,forceMount:n,children:i,container:s}=e,c=E(y,t);return r.jsx(Z,{scope:t,forceMount:n,children:r.jsx(j,{present:n||c.open,children:r.jsx(K,{asChild:!0,container:s,children:i})})})};L.displayName=y;var b="HoverCardContent",A=a.forwardRef((e,t)=>{const n=ee(b,e.__scopeHoverCard),{forceMount:i=n.forceMount,...s}=e,c=E(b,e.__scopeHoverCard);return r.jsx(j,{present:i||c.open,children:r.jsx(te,{"data-state":c.open?"open":"closed",...s,onPointerEnter:d(e.onPointerEnter,w(c.onOpen)),onPointerLeave:d(e.onPointerLeave,w(c.onClose)),ref:t})})});A.displayName=b;var te=a.forwardRef((e,t)=>{const{__scopeHoverCard:n,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:c,onInteractOutside:f,...v}=e,l=E(b,n),h=R(n),u=a.useRef(null),m=U(t,u),[p,C]=a.useState(!1);return a.useEffect(()=>{if(p){const o=document.body;return S=o.style.userSelect||o.style.webkitUserSelect,o.style.userSelect="none",o.style.webkitUserSelect="none",()=>{o.style.userSelect=S,o.style.webkitUserSelect=S}}},[p]),a.useEffect(()=>{if(u.current){const o=()=>{C(!1),l.isPointerDownOnContentRef.current=!1,setTimeout(()=>{var g;((g=document.getSelection())==null?void 0:g.toString())!==""&&(l.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",o),()=>{document.removeEventListener("pointerup",o),l.hasSelectionRef.current=!1,l.isPointerDownOnContentRef.current=!1}}},[l.isPointerDownOnContentRef,l.hasSelectionRef]),a.useEffect(()=>{u.current&&ne(u.current).forEach(x=>x.setAttribute("tabindex","-1"))}),r.jsx(J,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:f,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:d(c,o=>{o.preventDefault()}),onDismiss:l.onDismiss,children:r.jsx(V,{...h,...v,onPointerDown:d(v.onPointerDown,o=>{o.currentTarget.contains(o.target)&&C(!0),l.hasSelectionRef.current=!1,l.isPointerDownOnContentRef.current=!0}),ref:m,style:{...v.style,userSelect:p?"text":void 0,WebkitUserSelect:p?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})}),re="HoverCardArrow",oe=a.forwardRef((e,t)=>{const{__scopeHoverCard:n,...i}=e,s=R(n);return r.jsx(Y,{...s,...i,ref:t})});oe.displayName=re;function w(e){return t=>t.pointerType==="touch"?void 0:e()}function ne(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;n.nextNode();)t.push(n.currentNode);return t}var ae=O,se=_,ie=L,k=A;const F=ae,M=se,T=a.forwardRef(({className:e,align:t="center",sideOffset:n=4,...i},s)=>r.jsx(ie,{children:r.jsx(k,{ref:s,align:t,sideOffset:n,className:q("z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...i})}));T.displayName=k.displayName;const de=()=>r.jsxs(F,{openDelay:120,closeDelay:120,children:[r.jsx(M,{asChild:!0,children:r.jsx("button",{type:"button",className:"bm-closed-source-tag","aria-label":"Closed-source model",children:"closed"})}),r.jsxs(T,{side:"top",align:"start",className:"w-auto max-w-[260px] p-3 text-sm leading-snug",children:["This is an evaluation of a closed-source model. You can disable viewing these in your"," ",r.jsx(Q,{to:"/settings",className:"closed-eval-tooltip-link",children:"settings"}),"."]})]});function ce(e){if(!e)return"Evaluation sourced outside this paper";const t=e.toLowerCase();if(t.includes("open-asr-leaderboard"))return"Open ASR Leaderboard";if(t.includes("arcprize.org"))return"ARC Prize Leaderboard";if(t.includes("frontierswe.com"))return"FrontierSWE";try{const n=new URL(e,"https://paperswithcode.co");return n.pathname.startsWith("/paper/")?"Source paper":n.hostname.replace(/^www\./,"")}catch{return e}}const ue=({sourceUrl:e})=>{const t=ce(e);return r.jsxs(F,{openDelay:120,closeDelay:120,children:[r.jsx(M,{asChild:!0,children:r.jsx("button",{type:"button",className:"bm-external-source-tag","aria-label":`Externally sourced evaluation: ${t}`,children:"External"})}),r.jsxs(T,{side:"top",align:"start",className:"w-auto max-w-[280px] p-3 text-sm leading-snug",children:["This score was sourced outside this paper.",e?r.jsxs(r.Fragment,{children:[" ",r.jsx("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:"external-eval-tooltip-link",children:t}),"."]}):r.jsxs(r.Fragment,{children:[" ",t,"."]})]})]})};export{de as C,ue as E};
|
assets/{FeedView-BGmD8u6n.js → FeedView-B_VF1yGc.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{u as S,r as N,j as e,L as d,a as y}from"./index-
|
|
|
|
| 1 |
+
import{u as S,r as N,j as e,L as d,a as y}from"./index-CNvFYqmB.js";import{P as I}from"./components-CCZN6YfS.js";import{t as L,d as b}from"./transform-Cbu7h9fT.js";import{u as R}from"./usePapers-CldwRRal.js";import{u as A}from"./useIntersectionObserver-jmbd50BD.js";import{P as D}from"./usePeriodFilter-C6uXOQPx.js";import{S as t}from"./skeleton-C9NKUBNg.js";import{A as E,a as M}from"./alert-YjpxGuB-.js";import{u as T}from"./useQuery-B6TeiMq1.js";import"./LatexTitle-ZG9klHzz.js";import"./katex.min-BSBacQyE.js";import"./useInfiniteQuery-Vi6JDeF_.js";const C=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],W={Today:"today","This Week":"week","This Month":"month","All Time":"all_time"},q={today:"Today",week:"This Week",month:"This Month",all_time:"All Time"},$=i=>i==="trending"||i==="date_published"||i==="citation_count"?i:"trending",B=i=>i==="today"||i==="week"||i==="month"||i==="all_time"?i:"all_time",se=()=>{var x,g,u,j,f;const[i,o]=S(),c=$(i.get("order_by")),m=B(i.get("time")),v=q[m],_=s=>{const a=new URLSearchParams(i);a.set("order_by",s),o(a)},w=s=>{const a=new URLSearchParams(i);a.set("time",W[s]),o(a)},h=T({queryKey:["top-tasks-sidebar"],queryFn:()=>y.getTopTasks({limit:8}),staleTime:10*60*1e3}),n=T({queryKey:["trending-tasks-sidebar"],queryFn:()=>y.getTrendingTasks({limit:8}),staleTime:10*60*1e3}),r=R({page_size:30,order_by:c,order_dir:"desc",time:m,include_resources:!0}),l=N.useMemo(()=>{var a;return(((a=r.data)==null?void 0:a.pages.flatMap(O=>O.results))||[]).map(L)},[r.data]),{targetRef:P,isIntersecting:p}=A({rootMargin:"400px"});N.useEffect(()=>{p&&r.hasNextPage&&!r.isFetchingNextPage&&r.fetchNextPage()},[p,r.hasNextPage,r.isFetchingNextPage]);const k=r.isLoading,F=r.error;return e.jsxs("div",{className:"page",children:[e.jsxs("div",{className:"feed-header",children:[e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["Trending ",e.jsx("em",{children:"Research"})]}),e.jsx("div",{className:"feed-subtitle",children:"Curated daily from arXiv and Hugging Face"})]}),e.jsx("div",{style:{display:"flex",gap:16,alignItems:"center",flexWrap:"wrap"},children:e.jsx("div",{className:"period-switch",children:D.map(s=>e.jsx("button",{className:`period-btn ${v===s?"active":""}`,onClick:()=>w(s),children:s},s))})})]}),e.jsxs("div",{className:"layout-with-sidebar",children:[e.jsxs("aside",{className:"sidebar",children:[e.jsxs("div",{className:"sidebar-section",children:[e.jsx("div",{className:"sidebar-label",children:"Top Domains"}),h.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((s,a)=>e.jsx(t,{className:"h-5 w-full"},a))}),(x=h.data)==null?void 0:x.map(s=>e.jsxs(d,{to:`/tasks/${s.slug}`,className:"sidebar-link",children:[b(s.name,s.slug),s.paper_count!=null&&e.jsx("span",{className:"count",children:s.paper_count})]},s.id)),e.jsx(d,{to:"/tasks",className:"sidebar-link",style:{marginTop:8,fontStyle:"italic"},children:"all domains →"})]}),e.jsxs("div",{className:"sidebar-section",children:[e.jsx("div",{className:"sidebar-label",children:"Trending Domains"}),n.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((s,a)=>e.jsx(t,{className:"h-5 w-full"},a))}),((u=(g=n.data)==null?void 0:g.results)==null?void 0:u.length)===0&&!n.isLoading&&e.jsx("div",{style:{fontSize:12,color:"var(--ink-faint)"},children:"No domains gaining momentum right now."}),(f=(j=n.data)==null?void 0:j.results)==null?void 0:f.map(s=>e.jsxs(d,{to:`/tasks/${s.slug}`,className:"sidebar-link",children:[b(s.name,s.slug),e.jsxs("span",{className:"count",children:[s.share_lift.toFixed(1),"x"]})]},s.id))]})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"sort-bar",children:[e.jsx("div",{className:"sort-options",children:C.map(([s,a])=>e.jsx("button",{className:`sort-btn ${c===s?"active":""}`,onClick:()=>_(s),children:a},s))}),e.jsxs("div",{className:"results-count",children:[l.length," papers"]})]}),F&&e.jsx(E,{variant:"destructive",className:"mb-4",children:e.jsx(M,{children:"Failed to load papers. Please try again."})}),k?e.jsx("div",{className:"paper-list",children:Array.from({length:6}).map((s,a)=>e.jsxs("div",{className:"paper-card",children:[e.jsx("div",{className:"paper-thumb-wrap",children:e.jsx(t,{className:"paper-thumb-skeleton"})}),e.jsxs("div",{className:"paper-body",style:{flex:1,gap:12},children:[e.jsx(t,{className:"h-6 w-3/4"}),e.jsx(t,{className:"h-4 w-1/2"}),e.jsx(t,{className:"h-12 w-full"})]})]},a))}):l.length===0?e.jsx("div",{className:"no-results",children:"No papers in this window."}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:l.map((s,a)=>e.jsx(I,{paper:s,rank:a+1},s.id))}),e.jsx("div",{ref:P,style:{height:1}}),r.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]})]})]})};export{se as default};
|
assets/{LatexTitle-6cIE2SFl.js → LatexTitle-ZG9klHzz.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{j as o,r as g}from"./index-
|
|
|
|
| 1 |
+
import{j as o,r as g}from"./index-CNvFYqmB.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-paBB6IBj.js → MarkdownText-m_1zRXOr.js}
RENAMED
|
The diff for this file is too large to render.
See raw diff
|
|
|
assets/{MethodDetailView-vFS9-zPD.js → MethodDetailView-Cg9nUPc2.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{j as e,_ as E,r as y,L as M,a as g,aa as D}from"./index-DjK_yrbe.js";import{u as F}from"./useQuery-BAGWhwl6.js";import{u as B}from"./useInfiniteQuery-FYtFSkZi.js";import{M as L,P as C}from"./components-B39WD1hZ.js";import{M as b}from"./MarkdownText-paBB6IBj.js";import{t as P}from"./transform-CH5QAIOs.js";import{u as T}from"./useIntersectionObserver-BrFBJfJb.js";import{S as u}from"./skeleton-_kUFAeFV.js";import{A as I,a as R}from"./alert-BVkGa_Tq.js";import"./LatexTitle-6cIE2SFl.js";import"./katex.min-BSBacQyE.js";const t={pink:"#F8D7D9",pinkS:"#D9B0B3",yellow:"#FBEFC2",yellowS:"#C9B97D",orange:"#F8D7B3",orangeS:"#C99466",blue:"#CDE2EE",blueS:"#7FA4BA",purple:"#D4D2EA",purpleS:"#8E8AC0",green:"#CCE2C5",greenS:"#7DA475",ink:"#1A1814",faint:"#8E8678"},o=({x:i,y:s,w:r,h:l,fill:x,stroke:d,label:m,fontSize:h=10,multiline:f})=>e.jsxs("g",{children:[e.jsx("rect",{x:i,y:s,width:r,height:l,rx:"3",ry:"3",fill:x,stroke:d,strokeWidth:"1"}),f?e.jsxs(e.Fragment,{children:[e.jsx("text",{x:i+r/2,y:s+l/2-2,fontSize:h,fontFamily:"var(--sans)",fill:t.ink,textAnchor:"middle",dominantBaseline:"middle",children:f[0]}),e.jsx("text",{x:i+r/2,y:s+l/2+h-1,fontSize:h,fontFamily:"var(--sans)",fill:t.ink,textAnchor:"middle",dominantBaseline:"middle",children:f[1]})]}):e.jsx("text",{x:i+r/2,y:s+l/2,fontSize:h,fontFamily:"var(--sans)",fill:t.ink,textAnchor:"middle",dominantBaseline:"middle",children:m})]}),N=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[e.jsx("text",{x:"180",y:"20",fontSize:"11",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.faint,textAnchor:"middle",children:"Scaled Dot-Product Attention"}),e.jsx(o,{x:140,y:40,w:80,h:26,fill:t.yellow,stroke:t.yellowS,label:"MatMul",fontSize:11}),e.jsx("path",{d:"M180 66 L180 80",stroke:t.ink}),e.jsx(o,{x:140,y:80,w:80,h:26,fill:t.green,stroke:t.greenS,label:"SoftMax",fontSize:11}),e.jsx("path",{d:"M180 106 L180 120",stroke:t.ink}),e.jsx(o,{x:140,y:120,w:80,h:26,fill:t.purple,stroke:t.purpleS,label:"Mask (opt.)",fontSize:11}),e.jsx("path",{d:"M180 146 L180 160",stroke:t.ink}),e.jsx(o,{x:140,y:160,w:80,h:26,fill:t.blue,stroke:t.blueS,label:"Scale ÷√dₖ",fontSize:11}),e.jsx("path",{d:"M180 186 L180 200",stroke:t.ink}),e.jsx(o,{x:140,y:200,w:80,h:26,fill:t.yellow,stroke:t.yellowS,label:"MatMul",fontSize:11}),e.jsx("path",{d:"M156 226 L120 270",stroke:t.ink}),e.jsx("path",{d:"M180 226 L180 270",stroke:t.ink}),e.jsx("path",{d:"M204 226 L240 270",stroke:t.ink}),e.jsx(o,{x:100,y:270,w:40,h:24,fill:t.pink,stroke:t.pinkS,label:"Q",fontSize:13}),e.jsx(o,{x:160,y:270,w:40,h:24,fill:t.pink,stroke:t.pinkS,label:"K",fontSize:13}),e.jsx(o,{x:220,y:270,w:40,h:24,fill:t.pink,stroke:t.pinkS,label:"V",fontSize:13}),e.jsxs("text",{x:"180",y:"330",fontSize:"14",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.ink,textAnchor:"middle",children:["softmax(QK",e.jsx("tspan",{fontSize:"9",baselineShift:"super",children:"⊤"})," / √d) V"]})]}),$=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[[0,1,2,3].map(i=>{const s=30+i*75,r=60-i*8,l=240-i*30;return e.jsx("g",{children:e.jsx("rect",{x:s,y:(420-l)/2,width:r,height:l,rx:"2",fill:[t.blue,t.green,t.orange,t.purple][i],stroke:[t.blueS,t.greenS,t.orangeS,t.purpleS][i],strokeWidth:"1"})},i)}),e.jsx("text",{x:"60",y:"395",fontSize:"9",fontFamily:"var(--mono)",fill:t.faint,textAnchor:"middle",children:"conv"}),e.jsx("text",{x:"135",y:"395",fontSize:"9",fontFamily:"var(--mono)",fill:t.faint,textAnchor:"middle",children:"conv"}),e.jsx("text",{x:"210",y:"395",fontSize:"9",fontFamily:"var(--mono)",fill:t.faint,textAnchor:"middle",children:"conv"}),e.jsx("text",{x:"285",y:"395",fontSize:"9",fontFamily:"var(--mono)",fill:t.faint,textAnchor:"middle",children:"fc"})]}),A=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[[0,1,2,3].map(i=>{const r=60+i*80,l=100-i*12,x=50-i*6;return e.jsx("rect",{x:50,y:r,width:l,height:x,rx:"2",fill:t.blue,stroke:t.blueS,strokeWidth:"1"},`e${i}`)}),e.jsx("rect",{x:"155",y:"320",width:"50",height:"40",rx:"2",fill:t.purple,stroke:t.purpleS}),[0,1,2,3].map(i=>{const r=60+i*80,l=100-i*12,x=50-i*6;return e.jsx("rect",{x:210,y:r,width:l,height:x,rx:"2",fill:t.green,stroke:t.greenS,strokeWidth:"1"},`d${i}`)}),[0,1,2,3].map(i=>{const s=60+i*80+(50-i*6)/2,r=50+(100-i*12);return e.jsx("path",{d:`M${r} ${s} L210 ${s}`,stroke:t.faint,strokeDasharray:"4 3"},`s${i}`)}),e.jsx("text",{x:"100",y:"40",fontSize:"10",fontFamily:"var(--mono)",fill:t.faint,textAnchor:"middle",children:"encoder"}),e.jsx("text",{x:"260",y:"40",fontSize:"10",fontFamily:"var(--mono)",fill:t.faint,textAnchor:"middle",children:"decoder"}),e.jsx("text",{x:"180",y:"395",fontSize:"9",fontFamily:"var(--mono)",fill:t.faint,textAnchor:"middle",children:"skip connections preserve high-res features"})]}),O=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[[0,1,2].map(i=>[0,1,2].map(s=>e.jsx("rect",{x:20+s*40,y:40+i*40,width:"38",height:"38",fill:["#F8D7D9","#FBEFC2","#CDE2EE","#CCE2C5","#D4D2EA","#F8D7B3","#F8D7D9","#FBEFC2","#CDE2EE"][i*3+s],stroke:t.faint},`${i}-${s}`))),e.jsx("rect",{x:"40",y:"245",width:"280",height:"120",rx:"4",fill:"#EFEBE0",stroke:t.faint,strokeDasharray:"3 2"}),e.jsx(o,{x:70,y:258,w:220,h:20,fill:t.yellow,stroke:t.yellowS,label:"Norm"}),e.jsx(o,{x:70,y:282,w:220,h:28,fill:t.orange,stroke:t.orangeS,label:"Multi-Head Attention"}),e.jsx(o,{x:70,y:314,w:220,h:20,fill:t.yellow,stroke:t.yellowS,label:"Norm"}),e.jsx(o,{x:70,y:338,w:220,h:20,fill:t.blue,stroke:t.blueS,label:"MLP"}),e.jsx("text",{x:"180",y:"385",fontSize:"10",fontFamily:"var(--mono)",fill:t.faint,textAnchor:"middle",children:"Transformer Encoder · L×"})]}),_=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[e.jsx("text",{x:"180",y:"50",fontSize:"11",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.faint,textAnchor:"middle",children:"Reverse process: pure noise → sample"}),[0,1,2,3,4,5].map(i=>{const s=25+i*56,r=(5-i)/5;return e.jsxs("g",{children:[e.jsx("rect",{x:s,y:90,width:50,height:50,rx:"3",fill:`oklch(${.85-r*.1} 0.04 250)`,stroke:t.faint}),r<.4&&e.jsx("circle",{cx:s+25,cy:115,r:12-r*16,fill:t.orange,opacity:1-r*1.5})]},i)}),e.jsx("rect",{x:"60",y:"240",width:"240",height:"120",rx:"4",fill:"#FFF9EE",stroke:t.faint}),e.jsx("text",{x:"180",y:"260",fontSize:"11",fontFamily:"var(--mono)",fill:t.faint,textAnchor:"middle",children:"TRAINING OBJECTIVE"}),e.jsx("text",{x:"180",y:"295",fontSize:"14",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.ink,textAnchor:"middle",children:"L = E[‖ε − ε_θ(x_t, t)‖²]"})]}),G=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[e.jsx("text",{x:"180",y:"20",fontSize:"11",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.faint,textAnchor:"middle",children:"Generator vs. Discriminator"}),e.jsx("circle",{cx:"50",cy:"120",r:"22",fill:t.purple,stroke:t.purpleS}),e.jsx("text",{x:"50",y:"125",fontSize:"14",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.ink,textAnchor:"middle",children:"z"}),e.jsx("rect",{x:"110",y:"92",width:"80",height:"56",rx:"3",fill:t.blue,stroke:t.blueS}),e.jsx("text",{x:"150",y:"124",fontSize:"14",fontFamily:"var(--mono)",fill:t.ink,textAnchor:"middle",children:"G"}),e.jsx("rect",{x:"225",y:"100",width:"40",height:"40",rx:"3",fill:t.orange,stroke:t.orangeS}),e.jsx("rect",{x:"225",y:"195",width:"40",height:"40",rx:"3",fill:t.green,stroke:t.greenS}),e.jsx("rect",{x:"290",y:"140",width:"50",height:"50",rx:"3",fill:t.pink,stroke:t.pinkS}),e.jsx("text",{x:"315",y:"170",fontSize:"14",fontFamily:"var(--mono)",fill:t.ink,textAnchor:"middle",children:"D"})]}),q=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[e.jsx("text",{x:"180",y:"20",fontSize:"11",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.faint,textAnchor:"middle",children:"Variational Autoencoder"}),e.jsx("rect",{x:"30",y:"100",width:"40",height:"40",rx:"3",fill:t.green,stroke:t.greenS}),e.jsx("rect",{x:"100",y:"92",width:"60",height:"56",rx:"3",fill:t.blue,stroke:t.blueS}),e.jsx("text",{x:"130",y:"124",fontSize:"11",fontFamily:"var(--mono)",fill:t.ink,textAnchor:"middle",children:"Encoder"}),e.jsx("circle",{cx:"270",cy:"120",r:"14",fill:t.purple,stroke:t.purpleS}),e.jsx("text",{x:"270",y:"124",fontSize:"13",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.ink,textAnchor:"middle",children:"z"}),e.jsx("rect",{x:"100",y:"200",width:"60",height:"56",rx:"3",fill:t.orange,stroke:t.orangeS}),e.jsx("text",{x:"130",y:"232",fontSize:"11",fontFamily:"var(--mono)",fill:t.ink,textAnchor:"middle",children:"Decoder"}),e.jsx("rect",{x:"30",y:"210",width:"40",height:"40",rx:"3",fill:t.pink,stroke:t.pinkS})]}),K=[["my-skill/",""],["├── SKILL.md","# Required: metadata + instructions"],["├── scripts/","# Optional: executable code"],["├── references/","# Optional: documentation"],["├── assets/","# Optional: templates, resources"],["└── ...","# Any additional files or directories"]],Q=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[e.jsx("text",{x:"180",y:"20",fontSize:"11",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.faint,textAnchor:"middle",children:"Skill package layout"}),e.jsx("rect",{x:"28",y:"48",width:"304",height:"318",rx:"8",fill:"#FFFDF8",stroke:t.faint,strokeWidth:"1"}),K.map(([i,s],r)=>{const l=92+r*44;return e.jsxs("g",{children:[e.jsx("text",{x:"44",y:l,fontSize:"11",fontFamily:"var(--mono)",fill:t.ink,dominantBaseline:"middle",children:i}),s?e.jsx("text",{x:"138",y:l,fontSize:"8.5",fontFamily:"var(--mono)",fill:t.faint,dominantBaseline:"middle",children:s}):null]},i)})]}),V={attention:N,"self-attention":N,cnn:$,"u-net":A,unet:A,vit:O,diffusion:_,ddpm:_,gan:G,vae:q,"agent-skills":Q},W=({method:i})=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",children:[e.jsx("text",{x:"180",y:"20",fontSize:"11",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.faint,textAnchor:"middle",children:i.name||"method"}),e.jsx(o,{x:80,y:70,w:200,h:50,fill:t.blue,stroke:t.blueS,label:"Input",fontSize:12}),e.jsx("path",{d:"M180 120 L180 150",stroke:t.ink}),e.jsx(o,{x:80,y:150,w:200,h:70,fill:t.orange,stroke:t.orangeS,label:i.name||"transform",fontSize:13}),e.jsx("path",{d:"M180 220 L180 250",stroke:t.ink}),e.jsx(o,{x:80,y:250,w:200,h:50,fill:t.purple,stroke:t.purpleS,label:"Output",fontSize:12})]}),U=({method:i})=>{const s=(i.slug||"").toLowerCase(),r=V[s];if(r)return e.jsx("div",{className:"method-figure-svg method-figure-svg--schematic",children:e.jsx(r,{})});if(i.image_url){const l=s==="transformer"||s==="gpt-4"||s==="gpt-4o"?" method-figure-svg--compact":s==="rpn"?" method-figure-svg--scaled-80":"";return e.jsx("div",{className:`method-figure-svg method-figure-svg--image${l}`,children:e.jsx("img",{className:"method-figure-img",src:i.image_url,alt:`${i.name} figure`})})}return e.jsx("div",{className:"method-figure-svg method-figure-svg--schematic",children:e.jsx(W,{method:i})})},H=[["trending","trending"],["new","newest"],["cited","most cited"]],z={"on-policy-distillation":["fine-tuning","post-training","rlvr","rlhf","direct-preference-optimization-dpo"],mcp:["agent-skills"],"agent-skills":["mcp"]},ae=()=>{var k,S,v,w;const{methodSlug:i}=E(),[s,r]=y.useState("trending"),l=F({queryKey:["method",i],queryFn:()=>g.getMethod(i),enabled:!!i,staleTime:10*60*1e3}),x=s==="trending"?"trending":s==="cited"?"citation_count":"date_published",d=B({queryKey:["method-papers-infinite",i,x],queryFn:({pageParam:a=1})=>g.getMethodPapers(i,{page:a,page_size:20,order_by:x,order_dir:"desc",include_resources:!0}),getNextPageParam:a=>a.next_page,initialPageParam:1,enabled:!!i,staleTime:5*60*1e3,placeholderData:D}),m=F({queryKey:["related-methods",(k=l.data)==null?void 0:k.slug,(S=l.data)==null?void 0:S.area_id,(v=l.data)==null?void 0:v.id],queryFn:async()=>{const a=z[l.data.slug];return a?Promise.all(a.map(p=>g.getMethod(p))):(await g.getMethods({area_id:l.data.area_id,exclude_id:l.data.id,ordering:"-paper_count",page_size:8})).results},enabled:!!l.data&&(!!z[l.data.slug]||!!l.data.area_id),staleTime:10*60*1e3}),h=y.useMemo(()=>{var c;return(((c=d.data)==null?void 0:c.pages.flatMap(p=>p.results))||[]).map(P)},[d.data]),{targetRef:f,isIntersecting:j}=T({rootMargin:"200px"});if(y.useEffect(()=>{j&&d.hasNextPage&&!d.isFetchingNextPage&&d.fetchNextPage()},[j,d.hasNextPage,d.isFetchingNextPage]),l.isLoading)return e.jsxs("div",{className:"page",children:[e.jsx(u,{className:"h-12 w-1/2 mb-4"}),e.jsx(u,{className:"h-64 w-full"})]});if(l.error||!l.data)return e.jsx("div",{className:"page",children:e.jsx(I,{variant:"destructive",children:e.jsx(R,{children:"Method not found."})})});const n=l.data;return e.jsxs("div",{className:"page",children:[e.jsxs("div",{className:"breadcrumb",children:[e.jsx(M,{to:"/methods",children:"Methods"}),e.jsx("span",{className:"sep",children:"/"}),e.jsx("span",{style:{color:"var(--ink)"},children:n.name})]}),e.jsxs("div",{className:"tag-hero method-hero-grid",children:[e.jsxs("div",{children:[e.jsx("div",{className:"tag-hero-eyebrow",children:"METHOD"}),e.jsx("h1",{className:"tag-hero-title method-hero-title",children:n.name}),n.full_name&&n.full_name!==n.name&&e.jsx("div",{style:{fontFamily:"var(--serif)",fontSize:16,fontStyle:"italic",color:"var(--ink-soft)",marginTop:8},children:n.full_name}),n.description&&e.jsx(b,{className:"method-description",text:n.description}),n.source_url&&n.source_title&&e.jsxs("div",{className:"method-source",children:[e.jsx("span",{className:"method-source-label",children:"Source"}),e.jsxs("a",{className:"method-source-link",href:n.source_url,target:"_blank",rel:"noopener noreferrer",children:[e.jsx("span",{className:"method-source-title",children:n.source_title}),n.introduced_year&&e.jsx("span",{className:"method-source-meta",children:n.introduced_year})]})]}),e.jsxs("div",{className:"tag-hero-meta",children:[e.jsxs("div",{className:"stat",children:[e.jsx("span",{className:"label",children:"Papers using"}),e.jsx("span",{className:"value",children:(n.paper_count??0).toLocaleString()})]}),n.introduced_year!=null&&e.jsxs("div",{className:"stat",children:[e.jsx("span",{className:"label",children:"Introduced"}),e.jsx("span",{className:"value",children:n.introduced_year})]})]})]}),e.jsxs("figure",{className:"method-figure-card",children:[e.jsx(U,{method:n}),n.image_credit&&e.jsx("figcaption",{children:e.jsx(b,{className:"method-image-credit",text:n.image_credit})})]})]}),(((w=m.data)==null?void 0:w.length)??0)>0&&e.jsxs("div",{className:"filter-row",children:[e.jsx("span",{className:"label",children:"Related methods"}),m.data.map(a=>e.jsx(L,{method:{slug:a.slug,name:a.name}},a.id))]}),e.jsxs("div",{className:"sort-bar",children:[e.jsx("div",{className:"sort-options",children:H.map(([a,c])=>e.jsx("button",{className:`sort-btn ${s===a?"active":""}`,onClick:()=>r(a),children:c},a))}),e.jsxs("div",{className:"results-count",children:[h.length," papers using ",n.name]})]}),d.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((a,c)=>e.jsx(u,{className:"h-40 w-full"},c))}):h.length===0?e.jsx("div",{className:"no-results",children:"No papers tagged with this method yet."}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:h.map((a,c)=>e.jsx(C,{paper:a,rank:c+1},a.id))}),e.jsx("div",{ref:f,style:{height:1}}),d.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]})};export{ae as default};
|
|
|
|
| 1 |
+
import{j as e,_ as E,r as y,L as M,a as g,aa as D}from"./index-CNvFYqmB.js";import{u as F}from"./useQuery-B6TeiMq1.js";import{u as B}from"./useInfiniteQuery-Vi6JDeF_.js";import{M as L,P as C}from"./components-CCZN6YfS.js";import{M as b}from"./MarkdownText-m_1zRXOr.js";import{t as P}from"./transform-Cbu7h9fT.js";import{u as T}from"./useIntersectionObserver-jmbd50BD.js";import{S as u}from"./skeleton-C9NKUBNg.js";import{A as I,a as R}from"./alert-YjpxGuB-.js";import"./LatexTitle-ZG9klHzz.js";import"./katex.min-BSBacQyE.js";const t={pink:"#F8D7D9",pinkS:"#D9B0B3",yellow:"#FBEFC2",yellowS:"#C9B97D",orange:"#F8D7B3",orangeS:"#C99466",blue:"#CDE2EE",blueS:"#7FA4BA",purple:"#D4D2EA",purpleS:"#8E8AC0",green:"#CCE2C5",greenS:"#7DA475",ink:"#1A1814",faint:"#8E8678"},o=({x:i,y:s,w:r,h:l,fill:x,stroke:d,label:m,fontSize:h=10,multiline:f})=>e.jsxs("g",{children:[e.jsx("rect",{x:i,y:s,width:r,height:l,rx:"3",ry:"3",fill:x,stroke:d,strokeWidth:"1"}),f?e.jsxs(e.Fragment,{children:[e.jsx("text",{x:i+r/2,y:s+l/2-2,fontSize:h,fontFamily:"var(--sans)",fill:t.ink,textAnchor:"middle",dominantBaseline:"middle",children:f[0]}),e.jsx("text",{x:i+r/2,y:s+l/2+h-1,fontSize:h,fontFamily:"var(--sans)",fill:t.ink,textAnchor:"middle",dominantBaseline:"middle",children:f[1]})]}):e.jsx("text",{x:i+r/2,y:s+l/2,fontSize:h,fontFamily:"var(--sans)",fill:t.ink,textAnchor:"middle",dominantBaseline:"middle",children:m})]}),N=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[e.jsx("text",{x:"180",y:"20",fontSize:"11",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.faint,textAnchor:"middle",children:"Scaled Dot-Product Attention"}),e.jsx(o,{x:140,y:40,w:80,h:26,fill:t.yellow,stroke:t.yellowS,label:"MatMul",fontSize:11}),e.jsx("path",{d:"M180 66 L180 80",stroke:t.ink}),e.jsx(o,{x:140,y:80,w:80,h:26,fill:t.green,stroke:t.greenS,label:"SoftMax",fontSize:11}),e.jsx("path",{d:"M180 106 L180 120",stroke:t.ink}),e.jsx(o,{x:140,y:120,w:80,h:26,fill:t.purple,stroke:t.purpleS,label:"Mask (opt.)",fontSize:11}),e.jsx("path",{d:"M180 146 L180 160",stroke:t.ink}),e.jsx(o,{x:140,y:160,w:80,h:26,fill:t.blue,stroke:t.blueS,label:"Scale ÷√dₖ",fontSize:11}),e.jsx("path",{d:"M180 186 L180 200",stroke:t.ink}),e.jsx(o,{x:140,y:200,w:80,h:26,fill:t.yellow,stroke:t.yellowS,label:"MatMul",fontSize:11}),e.jsx("path",{d:"M156 226 L120 270",stroke:t.ink}),e.jsx("path",{d:"M180 226 L180 270",stroke:t.ink}),e.jsx("path",{d:"M204 226 L240 270",stroke:t.ink}),e.jsx(o,{x:100,y:270,w:40,h:24,fill:t.pink,stroke:t.pinkS,label:"Q",fontSize:13}),e.jsx(o,{x:160,y:270,w:40,h:24,fill:t.pink,stroke:t.pinkS,label:"K",fontSize:13}),e.jsx(o,{x:220,y:270,w:40,h:24,fill:t.pink,stroke:t.pinkS,label:"V",fontSize:13}),e.jsxs("text",{x:"180",y:"330",fontSize:"14",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.ink,textAnchor:"middle",children:["softmax(QK",e.jsx("tspan",{fontSize:"9",baselineShift:"super",children:"⊤"})," / √d) V"]})]}),$=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[[0,1,2,3].map(i=>{const s=30+i*75,r=60-i*8,l=240-i*30;return e.jsx("g",{children:e.jsx("rect",{x:s,y:(420-l)/2,width:r,height:l,rx:"2",fill:[t.blue,t.green,t.orange,t.purple][i],stroke:[t.blueS,t.greenS,t.orangeS,t.purpleS][i],strokeWidth:"1"})},i)}),e.jsx("text",{x:"60",y:"395",fontSize:"9",fontFamily:"var(--mono)",fill:t.faint,textAnchor:"middle",children:"conv"}),e.jsx("text",{x:"135",y:"395",fontSize:"9",fontFamily:"var(--mono)",fill:t.faint,textAnchor:"middle",children:"conv"}),e.jsx("text",{x:"210",y:"395",fontSize:"9",fontFamily:"var(--mono)",fill:t.faint,textAnchor:"middle",children:"conv"}),e.jsx("text",{x:"285",y:"395",fontSize:"9",fontFamily:"var(--mono)",fill:t.faint,textAnchor:"middle",children:"fc"})]}),A=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[[0,1,2,3].map(i=>{const r=60+i*80,l=100-i*12,x=50-i*6;return e.jsx("rect",{x:50,y:r,width:l,height:x,rx:"2",fill:t.blue,stroke:t.blueS,strokeWidth:"1"},`e${i}`)}),e.jsx("rect",{x:"155",y:"320",width:"50",height:"40",rx:"2",fill:t.purple,stroke:t.purpleS}),[0,1,2,3].map(i=>{const r=60+i*80,l=100-i*12,x=50-i*6;return e.jsx("rect",{x:210,y:r,width:l,height:x,rx:"2",fill:t.green,stroke:t.greenS,strokeWidth:"1"},`d${i}`)}),[0,1,2,3].map(i=>{const s=60+i*80+(50-i*6)/2,r=50+(100-i*12);return e.jsx("path",{d:`M${r} ${s} L210 ${s}`,stroke:t.faint,strokeDasharray:"4 3"},`s${i}`)}),e.jsx("text",{x:"100",y:"40",fontSize:"10",fontFamily:"var(--mono)",fill:t.faint,textAnchor:"middle",children:"encoder"}),e.jsx("text",{x:"260",y:"40",fontSize:"10",fontFamily:"var(--mono)",fill:t.faint,textAnchor:"middle",children:"decoder"}),e.jsx("text",{x:"180",y:"395",fontSize:"9",fontFamily:"var(--mono)",fill:t.faint,textAnchor:"middle",children:"skip connections preserve high-res features"})]}),O=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[[0,1,2].map(i=>[0,1,2].map(s=>e.jsx("rect",{x:20+s*40,y:40+i*40,width:"38",height:"38",fill:["#F8D7D9","#FBEFC2","#CDE2EE","#CCE2C5","#D4D2EA","#F8D7B3","#F8D7D9","#FBEFC2","#CDE2EE"][i*3+s],stroke:t.faint},`${i}-${s}`))),e.jsx("rect",{x:"40",y:"245",width:"280",height:"120",rx:"4",fill:"#EFEBE0",stroke:t.faint,strokeDasharray:"3 2"}),e.jsx(o,{x:70,y:258,w:220,h:20,fill:t.yellow,stroke:t.yellowS,label:"Norm"}),e.jsx(o,{x:70,y:282,w:220,h:28,fill:t.orange,stroke:t.orangeS,label:"Multi-Head Attention"}),e.jsx(o,{x:70,y:314,w:220,h:20,fill:t.yellow,stroke:t.yellowS,label:"Norm"}),e.jsx(o,{x:70,y:338,w:220,h:20,fill:t.blue,stroke:t.blueS,label:"MLP"}),e.jsx("text",{x:"180",y:"385",fontSize:"10",fontFamily:"var(--mono)",fill:t.faint,textAnchor:"middle",children:"Transformer Encoder · L×"})]}),_=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[e.jsx("text",{x:"180",y:"50",fontSize:"11",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.faint,textAnchor:"middle",children:"Reverse process: pure noise → sample"}),[0,1,2,3,4,5].map(i=>{const s=25+i*56,r=(5-i)/5;return e.jsxs("g",{children:[e.jsx("rect",{x:s,y:90,width:50,height:50,rx:"3",fill:`oklch(${.85-r*.1} 0.04 250)`,stroke:t.faint}),r<.4&&e.jsx("circle",{cx:s+25,cy:115,r:12-r*16,fill:t.orange,opacity:1-r*1.5})]},i)}),e.jsx("rect",{x:"60",y:"240",width:"240",height:"120",rx:"4",fill:"#FFF9EE",stroke:t.faint}),e.jsx("text",{x:"180",y:"260",fontSize:"11",fontFamily:"var(--mono)",fill:t.faint,textAnchor:"middle",children:"TRAINING OBJECTIVE"}),e.jsx("text",{x:"180",y:"295",fontSize:"14",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.ink,textAnchor:"middle",children:"L = E[‖ε − ε_θ(x_t, t)‖²]"})]}),G=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[e.jsx("text",{x:"180",y:"20",fontSize:"11",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.faint,textAnchor:"middle",children:"Generator vs. Discriminator"}),e.jsx("circle",{cx:"50",cy:"120",r:"22",fill:t.purple,stroke:t.purpleS}),e.jsx("text",{x:"50",y:"125",fontSize:"14",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.ink,textAnchor:"middle",children:"z"}),e.jsx("rect",{x:"110",y:"92",width:"80",height:"56",rx:"3",fill:t.blue,stroke:t.blueS}),e.jsx("text",{x:"150",y:"124",fontSize:"14",fontFamily:"var(--mono)",fill:t.ink,textAnchor:"middle",children:"G"}),e.jsx("rect",{x:"225",y:"100",width:"40",height:"40",rx:"3",fill:t.orange,stroke:t.orangeS}),e.jsx("rect",{x:"225",y:"195",width:"40",height:"40",rx:"3",fill:t.green,stroke:t.greenS}),e.jsx("rect",{x:"290",y:"140",width:"50",height:"50",rx:"3",fill:t.pink,stroke:t.pinkS}),e.jsx("text",{x:"315",y:"170",fontSize:"14",fontFamily:"var(--mono)",fill:t.ink,textAnchor:"middle",children:"D"})]}),q=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[e.jsx("text",{x:"180",y:"20",fontSize:"11",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.faint,textAnchor:"middle",children:"Variational Autoencoder"}),e.jsx("rect",{x:"30",y:"100",width:"40",height:"40",rx:"3",fill:t.green,stroke:t.greenS}),e.jsx("rect",{x:"100",y:"92",width:"60",height:"56",rx:"3",fill:t.blue,stroke:t.blueS}),e.jsx("text",{x:"130",y:"124",fontSize:"11",fontFamily:"var(--mono)",fill:t.ink,textAnchor:"middle",children:"Encoder"}),e.jsx("circle",{cx:"270",cy:"120",r:"14",fill:t.purple,stroke:t.purpleS}),e.jsx("text",{x:"270",y:"124",fontSize:"13",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.ink,textAnchor:"middle",children:"z"}),e.jsx("rect",{x:"100",y:"200",width:"60",height:"56",rx:"3",fill:t.orange,stroke:t.orangeS}),e.jsx("text",{x:"130",y:"232",fontSize:"11",fontFamily:"var(--mono)",fill:t.ink,textAnchor:"middle",children:"Decoder"}),e.jsx("rect",{x:"30",y:"210",width:"40",height:"40",rx:"3",fill:t.pink,stroke:t.pinkS})]}),K=[["my-skill/",""],["├── SKILL.md","# Required: metadata + instructions"],["├── scripts/","# Optional: executable code"],["├── references/","# Optional: documentation"],["├── assets/","# Optional: templates, resources"],["└── ...","# Any additional files or directories"]],Q=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[e.jsx("text",{x:"180",y:"20",fontSize:"11",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.faint,textAnchor:"middle",children:"Skill package layout"}),e.jsx("rect",{x:"28",y:"48",width:"304",height:"318",rx:"8",fill:"#FFFDF8",stroke:t.faint,strokeWidth:"1"}),K.map(([i,s],r)=>{const l=92+r*44;return e.jsxs("g",{children:[e.jsx("text",{x:"44",y:l,fontSize:"11",fontFamily:"var(--mono)",fill:t.ink,dominantBaseline:"middle",children:i}),s?e.jsx("text",{x:"138",y:l,fontSize:"8.5",fontFamily:"var(--mono)",fill:t.faint,dominantBaseline:"middle",children:s}):null]},i)})]}),V={attention:N,"self-attention":N,cnn:$,"u-net":A,unet:A,vit:O,diffusion:_,ddpm:_,gan:G,vae:q,"agent-skills":Q},W=({method:i})=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",children:[e.jsx("text",{x:"180",y:"20",fontSize:"11",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.faint,textAnchor:"middle",children:i.name||"method"}),e.jsx(o,{x:80,y:70,w:200,h:50,fill:t.blue,stroke:t.blueS,label:"Input",fontSize:12}),e.jsx("path",{d:"M180 120 L180 150",stroke:t.ink}),e.jsx(o,{x:80,y:150,w:200,h:70,fill:t.orange,stroke:t.orangeS,label:i.name||"transform",fontSize:13}),e.jsx("path",{d:"M180 220 L180 250",stroke:t.ink}),e.jsx(o,{x:80,y:250,w:200,h:50,fill:t.purple,stroke:t.purpleS,label:"Output",fontSize:12})]}),U=({method:i})=>{const s=(i.slug||"").toLowerCase(),r=V[s];if(r)return e.jsx("div",{className:"method-figure-svg method-figure-svg--schematic",children:e.jsx(r,{})});if(i.image_url){const l=s==="transformer"||s==="gpt-4"||s==="gpt-4o"?" method-figure-svg--compact":s==="rpn"?" method-figure-svg--scaled-80":"";return e.jsx("div",{className:`method-figure-svg method-figure-svg--image${l}`,children:e.jsx("img",{className:"method-figure-img",src:i.image_url,alt:`${i.name} figure`})})}return e.jsx("div",{className:"method-figure-svg method-figure-svg--schematic",children:e.jsx(W,{method:i})})},H=[["trending","trending"],["new","newest"],["cited","most cited"]],z={"on-policy-distillation":["fine-tuning","post-training","rlvr","rlhf","direct-preference-optimization-dpo"],mcp:["agent-skills"],"agent-skills":["mcp"]},ae=()=>{var k,S,v,w;const{methodSlug:i}=E(),[s,r]=y.useState("trending"),l=F({queryKey:["method",i],queryFn:()=>g.getMethod(i),enabled:!!i,staleTime:10*60*1e3}),x=s==="trending"?"trending":s==="cited"?"citation_count":"date_published",d=B({queryKey:["method-papers-infinite",i,x],queryFn:({pageParam:a=1})=>g.getMethodPapers(i,{page:a,page_size:20,order_by:x,order_dir:"desc",include_resources:!0}),getNextPageParam:a=>a.next_page,initialPageParam:1,enabled:!!i,staleTime:5*60*1e3,placeholderData:D}),m=F({queryKey:["related-methods",(k=l.data)==null?void 0:k.slug,(S=l.data)==null?void 0:S.area_id,(v=l.data)==null?void 0:v.id],queryFn:async()=>{const a=z[l.data.slug];return a?Promise.all(a.map(p=>g.getMethod(p))):(await g.getMethods({area_id:l.data.area_id,exclude_id:l.data.id,ordering:"-paper_count",page_size:8})).results},enabled:!!l.data&&(!!z[l.data.slug]||!!l.data.area_id),staleTime:10*60*1e3}),h=y.useMemo(()=>{var c;return(((c=d.data)==null?void 0:c.pages.flatMap(p=>p.results))||[]).map(P)},[d.data]),{targetRef:f,isIntersecting:j}=T({rootMargin:"200px"});if(y.useEffect(()=>{j&&d.hasNextPage&&!d.isFetchingNextPage&&d.fetchNextPage()},[j,d.hasNextPage,d.isFetchingNextPage]),l.isLoading)return e.jsxs("div",{className:"page",children:[e.jsx(u,{className:"h-12 w-1/2 mb-4"}),e.jsx(u,{className:"h-64 w-full"})]});if(l.error||!l.data)return e.jsx("div",{className:"page",children:e.jsx(I,{variant:"destructive",children:e.jsx(R,{children:"Method not found."})})});const n=l.data;return e.jsxs("div",{className:"page",children:[e.jsxs("div",{className:"breadcrumb",children:[e.jsx(M,{to:"/methods",children:"Methods"}),e.jsx("span",{className:"sep",children:"/"}),e.jsx("span",{style:{color:"var(--ink)"},children:n.name})]}),e.jsxs("div",{className:"tag-hero method-hero-grid",children:[e.jsxs("div",{children:[e.jsx("div",{className:"tag-hero-eyebrow",children:"METHOD"}),e.jsx("h1",{className:"tag-hero-title method-hero-title",children:n.name}),n.full_name&&n.full_name!==n.name&&e.jsx("div",{style:{fontFamily:"var(--serif)",fontSize:16,fontStyle:"italic",color:"var(--ink-soft)",marginTop:8},children:n.full_name}),n.description&&e.jsx(b,{className:"method-description",text:n.description}),n.source_url&&n.source_title&&e.jsxs("div",{className:"method-source",children:[e.jsx("span",{className:"method-source-label",children:"Source"}),e.jsxs("a",{className:"method-source-link",href:n.source_url,target:"_blank",rel:"noopener noreferrer",children:[e.jsx("span",{className:"method-source-title",children:n.source_title}),n.introduced_year&&e.jsx("span",{className:"method-source-meta",children:n.introduced_year})]})]}),e.jsxs("div",{className:"tag-hero-meta",children:[e.jsxs("div",{className:"stat",children:[e.jsx("span",{className:"label",children:"Papers using"}),e.jsx("span",{className:"value",children:(n.paper_count??0).toLocaleString()})]}),n.introduced_year!=null&&e.jsxs("div",{className:"stat",children:[e.jsx("span",{className:"label",children:"Introduced"}),e.jsx("span",{className:"value",children:n.introduced_year})]})]})]}),e.jsxs("figure",{className:"method-figure-card",children:[e.jsx(U,{method:n}),n.image_credit&&e.jsx("figcaption",{children:e.jsx(b,{className:"method-image-credit",text:n.image_credit})})]})]}),(((w=m.data)==null?void 0:w.length)??0)>0&&e.jsxs("div",{className:"filter-row",children:[e.jsx("span",{className:"label",children:"Related methods"}),m.data.map(a=>e.jsx(L,{method:{slug:a.slug,name:a.name}},a.id))]}),e.jsxs("div",{className:"sort-bar",children:[e.jsx("div",{className:"sort-options",children:H.map(([a,c])=>e.jsx("button",{className:`sort-btn ${s===a?"active":""}`,onClick:()=>r(a),children:c},a))}),e.jsxs("div",{className:"results-count",children:[h.length," papers using ",n.name]})]}),d.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((a,c)=>e.jsx(u,{className:"h-40 w-full"},c))}):h.length===0?e.jsx("div",{className:"no-results",children:"No papers tagged with this method yet."}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:h.map((a,c)=>e.jsx(C,{paper:a,rank:c+1},a.id))}),e.jsx("div",{ref:f,style:{height:1}}),d.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]})};export{ae as default};
|
assets/{MethodsIndexView-B1fobXH9.js → MethodsIndexView-Bo3XkphF.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{r as u,j as e,L as x,a as c}from"./index-
|
|
|
|
| 1 |
+
import{r as u,j as e,L as x,a as c}from"./index-CNvFYqmB.js";import{u as h}from"./useQuery-B6TeiMq1.js";import{S as m}from"./skeleton-C9NKUBNg.js";import{A as g,a as j}from"./alert-YjpxGuB-.js";const N=()=>{var o,d;const i=h({queryKey:["areas-all"],queryFn:()=>c.getAreas({page_size:50,ordering:"name"}),staleTime:6e5}),n=h({queryKey:["methods-all"],queryFn:async()=>(await c.getMethods({page:1,page_size:500,ordering:"-paper_count"})).results,staleTime:10*60*1e3}),l=u.useMemo(()=>{if(!n.data||!i.data)return null;const a={};return n.data.forEach(r=>{const t=r.area_id??"_unassigned";(a[t]||(a[t]=[])).push(r)}),Object.values(a).forEach(r=>r.sort((t,s)=>(s.paper_count||0)-(t.paper_count||0))),a},[n.data,i.data]);return i.error||n.error?e.jsx("div",{className:"page",children:e.jsx(g,{variant:"destructive",children:e.jsx(j,{children:"Failed to load methods."})})}):e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["Methods ",e.jsx("em",{children:"library"})]}),e.jsx("div",{className:"feed-subtitle",children:"Common techniques used across AI research, with the papers that use them."})]})}),i.isLoading||n.isLoading?e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:32},children:Array.from({length:4}).map((a,r)=>e.jsxs("div",{children:[e.jsx(m,{className:"h-8 w-1/3 mb-4"}),e.jsx("div",{className:"tag-grid",children:Array.from({length:8}).map((t,s)=>e.jsx(m,{className:"h-20"},s))})]},r))}):(d=(o=i.data)==null?void 0:o.results)==null?void 0:d.map(a=>{const r=(l==null?void 0:l[a.id])||[];if(r.length===0)return null;const t=r.reduce((s,p)=>s+(p.paper_count||0),0);return e.jsxs("section",{style:{marginBottom:48},children:[e.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:24,paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},children:[e.jsx("div",{children:e.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.02em",marginBottom:4},children:a.name})}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[r.length," methods · ",t.toLocaleString()," papers"]})]}),e.jsx("div",{className:"tag-grid",children:r.map(s=>e.jsxs(x,{to:`/methods/${s.slug||s.id}`,className:"tag-cell",children:[e.jsx("div",{className:"name",style:{fontFamily:"var(--mono)",fontSize:15},children:s.name}),e.jsxs("div",{className:"meta",children:[e.jsxs("span",{children:[(s.paper_count??0).toLocaleString()," papers"]}),s.introduced_year!=null&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"·"}),e.jsx("span",{children:s.introduced_year})]})]})]},s.id))})]},a.id)})]})};export{N as default};
|
assets/{NotFound-CGrh-lYw.js → NotFound-BWVDVznY.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{aB as o,r as a,j as t,L as s}from"./index-
|
|
|
|
| 1 |
+
import{aB as o,r as a,j as t,L as s}from"./index-CNvFYqmB.js";const r=()=>{const e=o();return a.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",e.pathname)},[e.pathname]),t.jsxs("div",{className:"page",style:{textAlign:"center",paddingTop:96},children:[t.jsx("h1",{className:"detail-title",style:{fontSize:96,marginBottom:8},children:"404"}),t.jsx("p",{style:{fontFamily:"var(--serif)",fontStyle:"italic",color:"var(--ink-soft)",marginBottom:24},children:"That route isn't on the map."}),t.jsx(s,{to:"/",className:"action-btn",children:"Return home"})]})};export{r as default};
|
assets/{OrganizationDetailView-BIfeDHR-.js → OrganizationDetailView-sc8cNKzl.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{_ as j,r as y,j as e,L as f,a as v}from"./index-
|
|
|
|
| 1 |
+
import{_ as j,r as y,j as e,L as f,a as v}from"./index-CNvFYqmB.js";import{u as b}from"./useQuery-B6TeiMq1.js";import{M as k}from"./MarkdownText-m_1zRXOr.js";import{e as N,h as S,d as _}from"./transform-Cbu7h9fT.js";import{S as p}from"./skeleton-C9NKUBNg.js";import{A as w,a as F}from"./alert-YjpxGuB-.js";import A from"./NotFound-BWVDVznY.js";import"./katex.min-BSBacQyE.js";const B=n=>(n==null?void 0:n.trim().toLowerCase().replace(/[\s_]+/g,"-"))??"",$=()=>{var g,x;const{orgSlug:n}=j(),i=b({queryKey:["organization-areas-with-tasks",n],queryFn:()=>v.getOrganizationAreasWithTasks(n),enabled:!!n,staleTime:10*60*1e3}),m=y.useMemo(()=>{if(!i.data)return[];const t={general:0,vision:1,video:2,language:3,audio:4,other:5},r=o=>t[B(o)]??999;return[...i.data.results].sort((o,a)=>{const l=r(o.name),d=r(a.name);return l!==d?l-d:o.name.localeCompare(a.name)})},[i.data]),s=(g=i.data)==null?void 0:g.organization,c=((x=i.data)==null?void 0:x.total_paper_count)??0,h=m.reduce((t,r)=>t+r.tasks.length,0);if(i.error)return i.error.status===404?e.jsx(A,{}):e.jsx("div",{className:"page",children:e.jsx(w,{variant:"destructive",children:e.jsx(F,{children:"Failed to load organization. Please try again."})})});const u=s==null?void 0:s.name;return e.jsxs("div",{className:"page",children:[e.jsxs("div",{children:[e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",letterSpacing:"0.1em",marginBottom:8},children:"ORGANIZATION"}),e.jsxs("h1",{className:"feed-title",style:{display:"flex",alignItems:"center",gap:12},children:[(s==null?void 0:s.logo_url)&&e.jsx("img",{src:s.logo_url,alt:"",style:{height:"0.9em",width:"auto",borderRadius:4,objectFit:"contain"},onError:t=>{t.currentTarget.style.display="none"}}),u??e.jsx(p,{className:"h-10 w-64 inline-block"})]}),e.jsxs("div",{className:"feed-subtitle",style:{display:"flex",flexDirection:"column",gap:4},children:[e.jsxs("span",{children:[c.toLocaleString()," papers"]}),(s==null?void 0:s.website_url)&&e.jsx("a",{href:s.website_url,target:"_blank",rel:"noopener noreferrer",style:{color:"var(--accent-text)"},children:s.website_url.replace(/^https?:\/\//,"").replace(/\/$/,"")}),(s==null?void 0:s.github_url)&&e.jsx("a",{href:s.github_url,target:"_blank",rel:"noopener noreferrer",style:{color:"var(--accent-text)"},children:s.github_url.replace(/^https?:\/\//,"").replace(/\/$/,"")}),(s==null?void 0:s.hf_url)&&e.jsxs("a",{className:"bm-action-btn",href:s.hf_url,target:"_blank",rel:"noopener noreferrer",style:{alignSelf:"flex-start",marginTop:4},children:[e.jsx("span",{"aria-hidden":"true",children:"🤗"})," View on Hugging Face"]})]}),(s==null?void 0:s.description)&&e.jsx(k,{className:"method-description",text:s.description})]}),!i.isLoading&&c>0&&e.jsxs("section",{style:{marginTop:48,marginBottom:48},children:[e.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:24,paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},children:[e.jsxs("div",{children:[e.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.02em",marginBottom:4},children:"Browse papers"}),e.jsx("div",{style:{fontFamily:"var(--serif)",fontStyle:"italic",fontSize:13,color:"var(--ink-soft)"},children:"All papers attributed to this organization."})]}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[c.toLocaleString()," papers"]})]}),e.jsx("div",{className:"tag-grid",children:e.jsxs(f,{to:`/${n}/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"]})})]})})]}),i.isLoading?e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:32},children:Array.from({length:4}).map((t,r)=>e.jsxs("div",{children:[e.jsx(p,{className:"h-8 w-1/3 mb-4"}),e.jsx("div",{className:"tag-grid",children:Array.from({length:6}).map((o,a)=>e.jsx(p,{className:"h-24"},a))})]},r))}):m.map(t=>{const r=t.tasks;if(r.length===0)return null;const o=r.reduce((a,l)=>a+(l.paper_count||0),0);return e.jsxs("section",{style:{marginBottom:48},children:[e.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:24,paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},children:[e.jsxs("div",{children:[e.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.02em",marginBottom:4},children:t.name}),t.description&&e.jsx("div",{style:{fontFamily:"var(--serif)",fontStyle:"italic",fontSize:13,color:"var(--ink-soft)"},children:t.description})]}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[r.length," ",r.length===1?"task":"tasks"," · ",o.toLocaleString()," papers"]})]}),e.jsx("div",{className:"tag-grid",children:r.map(a=>{const l=a.slug||"",d=N(S(l));return e.jsxs(f,{to:`/${n}/${l}`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:d.dot}}),_(a.name,l)]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[(a.paper_count??0).toLocaleString()," papers"]})})]},a.id)})})]},t.id)}),h>0&&e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",marginTop:24},children:[h," tasks across ",m.filter(t=>t.tasks.length>0).length," areas."]})]})};export{$ as default};
|
assets/{OrganizationTaskView-DkoRSwL3.js → OrganizationTaskView-CYrDR1Sl.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{_ as w,u as R,r as m,j as e,L as p,a as b}from"./index-
|
|
|
|
| 1 |
+
import{_ as w,u as R,r as m,j as e,L as p,a as b}from"./index-CNvFYqmB.js";import{u as k}from"./useQuery-B6TeiMq1.js";import{P as B}from"./components-CCZN6YfS.js";import{t as E,d as L}from"./transform-Cbu7h9fT.js";import{d as q}from"./usePapers-CldwRRal.js";import{u as C}from"./useIntersectionObserver-jmbd50BD.js";import{S as I}from"./skeleton-C9NKUBNg.js";import{A as Q,a as K}from"./alert-YjpxGuB-.js";import M from"./NotFound-BWVDVznY.js";import"./LatexTitle-ZG9klHzz.js";import"./katex.min-BSBacQyE.js";import"./useInfiniteQuery-Vi6JDeF_.js";const $=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],D=s=>s==="trending"||s==="date_published"||s==="citation_count"?s:"trending",re=()=>{var j,f,N,y,P,v,S;const{orgSlug:s,taskSlug:n}=w(),[g,_]=R(),h=D(g.get("order_by")),z=t=>{const r=new URLSearchParams(g);r.set("order_by",t),_(r)},o=n==="all",O=o?void 0:n,i=k({queryKey:["organization",s],queryFn:()=>b.getOrganization(s),enabled:!!s,staleTime:10*60*1e3}),c=k({queryKey:["task",n],queryFn:()=>b.getTask(n),enabled:!!n&&!o,staleTime:10*60*1e3}),a=q({organizationSlug:s||"",taskSlug:O,page_size:12,order_by:h,order_dir:"desc",include_resources:!0,enabled:!!s}),{targetRef:T,isIntersecting:u}=C({rootMargin:"200px"});m.useEffect(()=>{u&&a.hasNextPage&&!a.isFetchingNextPage&&a.fetchNextPage()},[u,a.hasNextPage,a.isFetchingNextPage]),m.useEffect(()=>{window.scrollTo(0,0)},[s,n]);const l=m.useMemo(()=>{var r;return(((r=a.data)==null?void 0:r.pages)??[]).flatMap(F=>F.results.map(E))},[a.data]),d=o?"All papers":L(((j=c.data)==null?void 0:j.name)||n||"",((f=c.data)==null?void 0:f.slug)||n),x=((y=(N=a.data)==null?void 0:N.pages[0])==null?void 0:y.count)??((P=i.data)==null?void 0:P.paper_count)??0,A=((v=i.data)==null?void 0:v.name)??s;return i.error||c.error||a.error?((S=i.error)==null?void 0:S.status)===404?e.jsx(M,{}):e.jsx("div",{className:"page",children:e.jsx(Q,{variant:"destructive",children:e.jsx(K,{children:"Failed to load organization papers. Please try again."})})}):e.jsxs("div",{className:"page",children:[e.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[e.jsx(p,{to:"/",children:"Home"}),e.jsx("span",{children:" / "}),e.jsx(p,{to:"/organizations",children:"Organizations"}),e.jsx("span",{children:" / "}),e.jsx(p,{to:`/${s}`,children:A}),e.jsx("span",{children:" / "}),e.jsx("span",{children:d})]}),e.jsxs("div",{style:{marginTop:16,marginBottom:28},children:[e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",letterSpacing:"0.1em",marginBottom:8},children:o?"BROWSE PAPERS":"TASK"}),e.jsx("h1",{className:"domain-mega-title",children:d}),i.data&&e.jsxs("div",{className:"task-quickstats",style:{marginTop:12},children:[e.jsxs("span",{children:[e.jsx("span",{className:"num",children:x.toLocaleString()}),"PAPERS"]}),e.jsx("span",{children:i.data.name})]})]}),e.jsxs("div",{className:"task-section-head",children:[e.jsx("div",{className:"task-section-eyebrow",children:"Organization papers · sort below"}),e.jsxs("div",{className:"task-section-title",children:["Papers ",e.jsxs("span",{className:"meta",children:["[",x.toLocaleString(),"]"]})]})]}),e.jsxs("div",{className:"sort-bar",children:[e.jsx("div",{className:"sort-options",children:$.map(([t,r])=>e.jsx("button",{className:`sort-btn ${h===t?"active":""}`,onClick:()=>z(t),children:r},t))}),e.jsxs("div",{className:"results-count",children:[l.length," loaded in ",e.jsx("span",{children:d})]})]}),a.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((t,r)=>e.jsx(I,{className:"h-40 w-full"},r))}):l.length===0?e.jsx("div",{className:"no-results",children:"No papers found for this selection."}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:l.map((t,r)=>e.jsx(B,{paper:t,rank:r+1},t.id))}),e.jsx("div",{ref:T,style:{height:1}}),a.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]})};export{re as default};
|
assets/{OrganizationsIndexView-DD1EhqgD.js → OrganizationsIndexView-DgpZOGfj.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{j as e,L as l,a as o}from"./index-
|
|
|
|
| 1 |
+
import{j as e,L as l,a as o}from"./index-CNvFYqmB.js";import{u as d}from"./useQuery-B6TeiMq1.js";import{S as c}from"./skeleton-C9NKUBNg.js";import{A as m,a as h}from"./alert-YjpxGuB-.js";const g={display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:24,paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},f=()=>{var n;const t=d({queryKey:["organizations"],queryFn:()=>o.getOrganizations(),staleTime:6e5});if(t.error)return e.jsx("div",{className:"page",children:e.jsx(m,{variant:"destructive",children:e.jsx(h,{children:"Failed to load organizations. Please try again."})})});const i=((n=t.data)==null?void 0:n.results)??[],r=i.reduce((a,s)=>a+(s.paper_count??0),0);return e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["All ",e.jsx("em",{children:"Organizations"})]}),e.jsx("div",{className:"feed-subtitle",children:"Browse research papers grouped by the labs and companies behind them."})]})}),t.isLoading?e.jsx("div",{className:"tag-grid",children:Array.from({length:6}).map((a,s)=>e.jsx(c,{className:"h-24"},s))}):e.jsxs("section",{style:{marginBottom:48},children:[e.jsxs("div",{style:g,children:[e.jsx("div",{children:e.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.02em",marginBottom:4},children:"Organizations"})}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[i.length," ",i.length===1?"organization":"organizations"," ·"," ",r.toLocaleString()," papers"]})]}),e.jsx("div",{className:"tag-grid",children:i.map(a=>e.jsxs(l,{to:`/${a.slug}`,className:"tag-cell",children:[e.jsxs("div",{className:"name",style:{display:"flex",alignItems:"center",gap:10},children:[a.logo_url&&e.jsx("img",{src:a.logo_url,alt:"",width:24,height:24,style:{borderRadius:4,objectFit:"contain",flexShrink:0},onError:s=>{s.currentTarget.style.display="none"}}),a.name]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[(a.paper_count??0).toLocaleString()," papers"]})})]},a.id))})]})]})};export{f as default};
|
assets/PaperDetailView-CFxpyu8J.js
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
assets/PaperDetailView-r5vGQ_3c.js
DELETED
|
@@ -1,47 +0,0 @@
|
|
| 1 |
-
import{c as we,g as xr,r as i,j as e,P as bt,b as ee,d as ms,e as tt,f as ye,h as gr,i as ps,C as oe,k as se,l as vr,m as br,n as de,s as Ne,o as Ce,X as hs,p as jr,q as fs,t as yr,v as _r,w as kr,x as wr,y as Nr,z as Ie,R as Cr,A as _e,B as xs,D as gs,E as Er,F as Sr,G as Pr,H as Rr,I as Ar,J as Ir,K as Fr,M as $r,N as ts,O as Mr,Q as Tr,S as Lr,T as Dr,U as Ur,V as st,W as jt,a as et,Y as vs,Z as bs,_ as Or,$ as Br,a0 as qr,a1 as Hr,L as be,a2 as Kr,a3 as zr,a4 as Qr,a5 as Vr,a6 as Gr,a7 as Wr,a8 as Xr}from"./index-DjK_yrbe.js";import{u as ie}from"./useQuery-BAGWhwl6.js";import{I as te,a as Jr,T as Yr,M as Zr}from"./components-B39WD1hZ.js";import{C as ea}from"./ClosedSourceEvalBadge-C7AzIzhI.js";import{L as We,a as ta}from"./LatexTitle-6cIE2SFl.js";import{c as sa}from"./transform-CH5QAIOs.js";import{f as ra,D as aa}from"./latexPlainText-ChVkH0gY.js";import{a as na}from"./usePapers-BcSgGxX-.js";import{S as De}from"./skeleton-_kUFAeFV.js";import{A as ia,a as oa}from"./alert-BVkGa_Tq.js";import{I as ae,B as Q}from"./input-h2dFcLEy.js";import{u as la}from"./index-BlGd3n8Y.js";import{D as ue,a as me,b as pe,c as he,d as fe,e as Ee,R as ca,P as da,O as ua,C as ma}from"./dialog-CfUUYXjw.js";import{u as xe}from"./useMutation-OcjJF2eh.js";import{T as pa}from"./textarea-zriuaL9R.js";import{L as ne}from"./loader-circle-Cy5Q1yxQ.js";import{B as js,D as ha}from"./badge-C1LTMoIS.js";import"./katex.min-BSBacQyE.js";import"./useInfiniteQuery-FYtFSkZi.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 fa=we("ChevronsUpDown",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]);/**
|
| 7 |
-
* @license lucide-react v0.462.0 - ISC
|
| 8 |
-
*
|
| 9 |
-
* This source code is licensed under the ISC license.
|
| 10 |
-
* See the LICENSE file in the root directory of this source tree.
|
| 11 |
-
*/const ss=we("Github",[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]]);/**
|
| 12 |
-
* @license lucide-react v0.462.0 - ISC
|
| 13 |
-
*
|
| 14 |
-
* This source code is licensed under the ISC license.
|
| 15 |
-
* See the LICENSE file in the root directory of this source tree.
|
| 16 |
-
*/const rs=we("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/**
|
| 17 |
-
* @license lucide-react v0.462.0 - ISC
|
| 18 |
-
*
|
| 19 |
-
* This source code is licensed under the ISC license.
|
| 20 |
-
* See the LICENSE file in the root directory of this source tree.
|
| 21 |
-
*/const yt=we("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
| 22 |
-
* @license lucide-react v0.462.0 - ISC
|
| 23 |
-
*
|
| 24 |
-
* This source code is licensed under the ISC license.
|
| 25 |
-
* See the LICENSE file in the root directory of this source tree.
|
| 26 |
-
*/const Oe=we("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
| 27 |
-
* @license lucide-react v0.462.0 - ISC
|
| 28 |
-
*
|
| 29 |
-
* This source code is licensed under the ISC license.
|
| 30 |
-
* See the LICENSE file in the root directory of this source tree.
|
| 31 |
-
*/const ys=we("Star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]);/**
|
| 32 |
-
* @license lucide-react v0.462.0 - ISC
|
| 33 |
-
*
|
| 34 |
-
* This source code is licensed under the ISC license.
|
| 35 |
-
* See the LICENSE file in the root directory of this source tree.
|
| 36 |
-
*/const _t=we("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);function xa(t,s=!0){return ie({queryKey:["evaluations","paper",t],queryFn:()=>{if(!t)throw new Error("Paper ID is required");return xr(t)},enabled:s&&!!t,staleTime:0,refetchOnMount:"always"})}const _s=t=>t.replace(/v\d+$/,""),ct=(t,s)=>{const a=(t[s]||[]).length;return a<100?{count:a,isLimited:!1}:{count:a,isLimited:!0}},ga=async t=>{try{return(await fetch(`https://huggingface.co/api/papers/${_s(t)}`)).ok}catch{return!1}},va=async t=>{const s=_s(t),[a,d]=await Promise.all([fetch(`https://huggingface.co/api/arxiv/${s}/repos`).then(async u=>u.ok?u.json():(console.warn(`Failed to fetch repos for arXiv:${s}, status: ${u.status}`),null)).catch(u=>(console.warn(`Failed to fetch repos for arXiv:${s}:`,u),null)),ga(s)]);if(!a)return{models:0,datasets:0,spaces:0,isLimited:!1,paperExists:d};const n=ct(a,"models"),l=ct(a,"datasets"),o=ct(a,"spaces");return{models:n.count,datasets:l.count,spaces:o.count,isLimited:n.isLimited||l.isLimited||o.isLimited,paperExists:d}},ba=t=>ie({queryKey:["huggingface-repos",t],queryFn:()=>va(t),enabled:!!t,staleTime:10*60*1e3,retry:1});function ja(){const[t,s]=i.useState(!1),[a,d]=i.useState(!1),[n,l]=i.useState(!1),[o,u]=i.useState(!1),[r,h]=i.useState(!1),[k,_]=i.useState(!1);return{isEditingTasks:t,openTasksDialog:()=>s(!0),closeTasksDialog:()=>s(!1),setIsEditingTasks:s,isEditingMethods:a,openMethodsDialog:()=>d(!0),closeMethodsDialog:()=>d(!1),setIsEditingMethods:d,isEditingRepositories:n,openRepositoriesDialog:()=>l(!0),closeRepositoriesDialog:()=>l(!1),setIsEditingRepositories:l,isEditingProjectPages:o,openProjectPagesDialog:()=>u(!0),closeProjectPagesDialog:()=>u(!1),setIsEditingProjectPages:u,isEditingEvaluations:r,openEvaluationsDialog:()=>h(!0),closeEvaluationsDialog:()=>h(!1),setIsEditingEvaluations:h,isEditingSourceUrl:k,openSourceUrlDialog:()=>_(!0),closeSourceUrlDialog:()=>_(!1),setIsEditingSourceUrl:_}}var rt="Checkbox",[ya]=ps(rt),[_a,kt]=ya(rt);function ka(t){const{__scopeCheckbox:s,checked:a,children:d,defaultChecked:n,disabled:l,form:o,name:u,onCheckedChange:r,required:h,value:k="on",internal_do_not_use_render:_}=t,[N,C]=ms({prop:a,defaultProp:n??!1,onChange:r,caller:rt}),[w,T]=i.useState(null),[P,F]=i.useState(null),$=i.useRef(!1),D=w?!!o||!!w.closest("form"):!0,U={checked:N,disabled:l,setChecked:C,control:w,setControl:T,name:u,form:o,value:k,hasConsumerStoppedPropagationRef:$,required:h,defaultChecked:le(n)?!1:n,isFormControl:D,bubbleInput:P,setBubbleInput:F};return e.jsx(_a,{scope:s,...U,children:wa(_)?_(U):d})}var ks="CheckboxTrigger",ws=i.forwardRef(({__scopeCheckbox:t,onKeyDown:s,onClick:a,...d},n)=>{const{control:l,value:o,disabled:u,checked:r,required:h,setControl:k,setChecked:_,hasConsumerStoppedPropagationRef:N,isFormControl:C,bubbleInput:w}=kt(ks,t),T=tt(n,k),P=i.useRef(r);return i.useEffect(()=>{const F=l==null?void 0:l.form;if(F){const $=()=>_(P.current);return F.addEventListener("reset",$),()=>F.removeEventListener("reset",$)}},[l,_]),e.jsx(ee.button,{type:"button",role:"checkbox","aria-checked":le(r)?"mixed":r,"aria-required":h,"data-state":Ps(r),"data-disabled":u?"":void 0,disabled:u,value:o,...d,ref:T,onKeyDown:ye(s,F=>{F.key==="Enter"&&F.preventDefault()}),onClick:ye(a,F=>{_($=>le($)?!0:!$),w&&C&&(N.current=F.isPropagationStopped(),N.current||F.stopPropagation())})})});ws.displayName=ks;var wt=i.forwardRef((t,s)=>{const{__scopeCheckbox:a,name:d,checked:n,defaultChecked:l,required:o,disabled:u,value:r,onCheckedChange:h,form:k,..._}=t;return e.jsx(ka,{__scopeCheckbox:a,checked:n,defaultChecked:l,disabled:u,required:o,onCheckedChange:h,name:d,form:k,value:r,internal_do_not_use_render:({isFormControl:N})=>e.jsxs(e.Fragment,{children:[e.jsx(ws,{..._,ref:s,__scopeCheckbox:a}),N&&e.jsx(Ss,{__scopeCheckbox:a})]})})});wt.displayName=rt;var Ns="CheckboxIndicator",Cs=i.forwardRef((t,s)=>{const{__scopeCheckbox:a,forceMount:d,...n}=t,l=kt(Ns,a);return e.jsx(bt,{present:d||le(l.checked)||l.checked===!0,children:e.jsx(ee.span,{"data-state":Ps(l.checked),"data-disabled":l.disabled?"":void 0,...n,ref:s,style:{pointerEvents:"none",...t.style}})})});Cs.displayName=Ns;var Es="CheckboxBubbleInput",Ss=i.forwardRef(({__scopeCheckbox:t,...s},a)=>{const{control:d,hasConsumerStoppedPropagationRef:n,checked:l,defaultChecked:o,required:u,disabled:r,name:h,value:k,form:_,bubbleInput:N,setBubbleInput:C}=kt(Es,t),w=tt(a,C),T=la(l),P=gr(d);i.useEffect(()=>{const $=N;if(!$)return;const D=window.HTMLInputElement.prototype,M=Object.getOwnPropertyDescriptor(D,"checked").set,g=!n.current;if(T!==l&&M){const b=new Event("click",{bubbles:g});$.indeterminate=le(l),M.call($,le(l)?!1:l),$.dispatchEvent(b)}},[N,T,l,n]);const F=i.useRef(le(l)?!1:l);return e.jsx(ee.input,{type:"checkbox","aria-hidden":!0,defaultChecked:o??F.current,required:u,disabled:r,name:h,value:k,form:_,...s,tabIndex:-1,ref:w,style:{...s.style,...P,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});Ss.displayName=Es;function wa(t){return typeof t=="function"}function le(t){return t==="indeterminate"}function Ps(t){return le(t)?"indeterminate":t?"checked":"unchecked"}const Nt=i.forwardRef(({className:t,style:s,...a},d)=>e.jsx(wt,{ref:d,className:se("peer h-4 w-4 shrink-0 rounded-sm ring-offset-background data-[state=checked]:!bg-black data-[state=checked]:!text-white focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t),style:{border:"1px solid #000",...s},...a,children:e.jsx(Cs,{className:se("flex items-center justify-center text-current"),children:e.jsx(oe,{className:"h-4 w-4"})})}));Nt.displayName=wt.displayName;function Na(t,s,a){if(!t)return t;const d=n=>n.paper_id!==s||n.paper_title===a?n:{...n,paper_title:a};if(Array.isArray(t)){const n=t.map(d);return n.some((o,u)=>o!==t[u])?n:t}if(Array.isArray(t.results)){const n=t.results.map(d);return n.some((o,u)=>o!==t.results[u])?{...t,results:n}:t}return t}function Be(t,s,a){new Set([...a,s.id,s.arxiv_id].filter(o=>!!o)).forEach(o=>{t.setQueryData(["paper",o],s),t.setQueryData(["paper-arxiv",o],s)}),t.invalidateQueries({queryKey:["papers"],refetchType:"none"}),t.invalidateQueries({queryKey:["papers-infinite"],refetchType:"none"}),t.invalidateQueries({queryKey:["task-papers-infinite"],refetchType:"none"});const n=String(s.id),l=o=>Na(o,n,s.title);t.setQueriesData({queryKey:["evaluations"]},l),t.setQueriesData({queryKey:["dataset-evals"]},l),t.invalidateQueries({queryKey:["evaluations"],refetchType:"none"}),t.invalidateQueries({queryKey:["dataset-evals"],refetchType:"none"})}function $e({isAuthor:t=!1}){return e.jsxs("div",{className:"rounded-md border border-amber-200 bg-amber-50 px-3 py-2 text-xs text-amber-900 dark:border-amber-900 dark:bg-amber-950/40 dark:text-amber-100",children:[e.jsx("p",{className:"font-medium",children:"Your changes will be reviewed by an admin."}),e.jsx("p",{className:"mt-1 leading-snug",children:t?"We can see this paper is yours. While we're in early access an admin still reviews each edit; this will become automatic for authors soon.":"Submissions are queued for review and don't change the paper page until an admin approves them."})]})}var Ca=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ea=Ca.reduce((t,s)=>{const a=vr(`Primitive.${s}`),d=i.forwardRef((n,l)=>{const{asChild:o,...u}=n,r=o?a:s;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),e.jsx(r,{...u,ref:l})});return d.displayName=`Primitive.${s}`,{...t,[s]:d}},{}),Sa="Label",Rs=i.forwardRef((t,s)=>e.jsx(Ea.label,{...t,ref:s,onMouseDown:a=>{var n;a.target.closest("button, input, select, textarea")||((n=t.onMouseDown)==null||n.call(t,a),!a.defaultPrevented&&a.detail>1&&a.preventDefault())}}));Rs.displayName=Sa;var As=Rs;const Pa=br("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),xt=i.forwardRef(({className:t,...s},a)=>e.jsx(As,{ref:a,className:se(Pa(),t),...s}));xt.displayName=As.displayName;const Ra=200,Aa=2e3;function Is({open:t,onOpenChange:s,paperId:a,kind:d}){const[n,l]=i.useState(""),[o,u]=i.useState(""),{toast:r}=de(),h=d==="task"?"task":"method";i.useEffect(()=>{t||(l(""),u(""))},[t]);const k=xe({mutationFn:async()=>Ne({paper_id:parseInt(a),edit_type:d==="task"?"new_task":"new_method",proposed_payload:{name:n.trim(),description:o.trim()}}),onSuccess:()=>{r({title:"Suggestion submitted for review",description:`Thanks! An admin will review your suggested ${h} shortly.`}),s(!1)},onError:N=>{var T;const C=N;let w=C.message||`Failed to submit your ${h} suggestion.`;if(C.response)try{const P=JSON.parse(C.response);typeof(P==null?void 0:P.detail)=="string"?w=P.detail:Array.isArray(P==null?void 0:P.detail)&&((T=P.detail[0])!=null&&T.msg)&&(w=P.detail[0].msg)}catch{w=C.response}r({title:"Could not submit suggestion",description:w,variant:"destructive"})}}),_=n.trim().length>0&&o.trim().length>0;return e.jsx(ue,{open:t,onOpenChange:s,children:e.jsxs(me,{className:"max-w-lg",children:[e.jsxs(pe,{children:[e.jsxs(he,{children:["Suggest a new ",h]}),e.jsxs(fe,{children:["Propose a ",h," that isn't in the list yet. An admin will review your suggestion before it's added."]})]}),e.jsxs("div",{className:"space-y-4 py-2",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(xt,{htmlFor:"suggest-name",children:"Name"}),e.jsx(ae,{id:"suggest-name",value:n,maxLength:Ra,placeholder:d==="task"?"e.g. Long-context Retrieval":"e.g. Rotary Position Embedding",onChange:N=>l(N.target.value)})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(xt,{htmlFor:"suggest-description",children:"Description"}),e.jsx(pa,{id:"suggest-description",value:o,maxLength:Aa,placeholder:`Briefly describe this ${h} and what it covers.`,onChange:N=>u(N.target.value)})]})]}),e.jsxs(Ee,{children:[e.jsx(Q,{variant:"outline",onClick:()=>s(!1),children:"Cancel"}),e.jsx(Q,{onClick:()=>k.mutate(),disabled:k.isPending||!_,children:k.isPending?e.jsxs(e.Fragment,{children:[e.jsx(ne,{className:"w-4 h-4 mr-2 animate-spin"}),"Submitting..."]}):e.jsxs(e.Fragment,{children:[e.jsx(oe,{className:"w-4 h-4 mr-2"}),"Submit suggestion"]})})]})]})})}const Ia=250,Fa=100;function $a({open:t,onOpenChange:s,paperId:a,arxivId:d,initialTaskIds:n,initialTasks:l,onSuccess:o,submitMode:u="direct",isAuthor:r=!1}){const[h,k]=i.useState(n),[_,N]=i.useState(!1),[C,w]=i.useState(""),[T,P]=i.useState(""),[F,$]=i.useState(new Map),D=Ce(),{toast:U}=de(),M=i.useRef(!1);i.useEffect(()=>{if(!t){M.current=!1;return}if(M.current)return;M.current=!0,k(n),w(""),P("");const v=new Map;(l||[]).forEach(S=>{const m=parseInt(S.id);Number.isNaN(m)||v.set(m,S)}),$(v)},[t,n,l]),i.useEffect(()=>{const v=window.setTimeout(()=>{P(C.trim())},Ia);return()=>window.clearTimeout(v)},[C]);const{data:g,isFetching:b}=ie({queryKey:["tasks-search",T],queryFn:()=>fs({page_size:Fa,visible_only:!0,...T?{q:T}:{}}),enabled:t});i.useEffect(()=>{var v;(v=g==null?void 0:g.results)!=null&&v.length&&$(S=>{const m=new Map(S);return g.results.forEach(x=>{const f=parseInt(x.id);Number.isNaN(f)||m.set(f,x)}),m})},[g]);const I=i.useMemo(()=>{const v=(g==null?void 0:g.results)||[],S=new Set,m=[];return h.forEach(x=>{if(S.has(x))return;const f=F.get(x);f&&(m.push(f),S.add(x))}),v.forEach(x=>{const f=parseInt(x.id);Number.isNaN(f)||S.has(f)||(m.push(x),S.add(f))}),m},[g,h,F]),O=xe({mutationFn:async({paperId:v,taskIds:S})=>u==="pending"?(await Ne({paper_id:parseInt(v),edit_type:"tasks",proposed_payload:{task_ids:S}}),null):jr(v,S),onMutate:async({taskIds:v})=>{if(u==="pending")return{snapshots:[]};const S=v.map(f=>F.get(f)).filter(f=>!!f).map(f=>({id:f.id,name:f.name,slug:f.slug})).sort((f,j)=>f.name.localeCompare(j.name)),m=Array.from(new Set([a,d].filter(f=>!!f)));await Promise.all(m.flatMap(f=>[D.cancelQueries({queryKey:["paper",f]}),D.cancelQueries({queryKey:["paper-arxiv",f]})]));const x=[];return m.forEach(f=>{["paper","paper-arxiv"].forEach(j=>{const y=[j,f],L=D.getQueryData(y);x.push({key:y,data:L}),L&&D.setQueryData(y,{...L,tasks:S})})}),U({title:"Tasks updated",description:`Saved ${v.length} task${v.length===1?"":"s"} for this paper.`}),o==null||o(),s(!1),{snapshots:x}},onSuccess:v=>{if(u==="pending"){U({title:"Edit submitted for review",description:"Thanks! An admin will review your proposed task changes shortly."}),o==null||o(),s(!1);return}v&&Be(D,v,[a,d])},onError:(v,S,m)=>{var j,y;(j=m==null?void 0:m.snapshots)==null||j.forEach(({key:L,data:p})=>{D.setQueryData(L,p)});const x=v;let f=x.message||(u==="pending"?"Failed to submit your edit. Please try again.":"Failed to update paper tasks.");if(x.response)try{const L=JSON.parse(x.response);typeof(L==null?void 0:L.detail)=="string"?f=L.detail:Array.isArray(L==null?void 0:L.detail)&&((y=L.detail[0])!=null&&y.msg)&&(f=L.detail[0].msg)}catch{f=x.response}U({title:u==="pending"?"Could not submit edit":"Could not save tasks",description:f,variant:"destructive"})}}),B=()=>{O.mutate({paperId:a,taskIds:h})},K=i.useMemo(()=>{if(h.length!==n.length)return!0;const v=new Set(n);return h.some(S=>!v.has(S))},[h,n]),G=(v,S)=>{k(m=>S?m.includes(v)?m:[...m,v]:m.filter(x=>x!==v))},X=()=>w("");return e.jsxs(ue,{open:t,onOpenChange:s,children:[e.jsxs(me,{className:"max-w-2xl max-h-[600px]",children:[e.jsxs(pe,{children:[e.jsx(he,{children:"Edit Paper Tasks"}),e.jsx(fe,{children:"Select the tasks that this paper addresses. You can select multiple tasks."})]}),u==="pending"&&e.jsx($e,{isAuthor:r}),e.jsxs("div",{className:"relative mb-4",children:[e.jsx(Oe,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),e.jsx(ae,{type:"text",placeholder:"Search tasks...",value:C,onChange:v=>w(v.target.value),className:"pl-9 pr-9"}),C&&e.jsx("button",{type:"button",onClick:X,className:"absolute right-2 top-1/2 -translate-y-1/2 p-1 text-muted-foreground hover:text-foreground","aria-label":"Clear search",children:e.jsx(hs,{className:"w-4 h-4"})})]}),e.jsx("div",{className:"py-4 overflow-y-auto max-h-[400px]",children:I.length>0?e.jsx("div",{className:"space-y-2",children:I.map(v=>{const S=parseInt(v.id),m=h.includes(S);return e.jsxs("div",{className:"flex items-center space-x-2 p-2 hover:bg-muted/50 rounded-md",children:[e.jsx(Nt,{id:`task-${v.id}`,checked:m,onCheckedChange:x=>G(S,x===!0),className:"!border !border-black data-[state=checked]:!bg-black data-[state=checked]:!text-white"}),e.jsxs("label",{htmlFor:`task-${v.id}`,className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 cursor-pointer flex-1",children:[v.name,v.description&&e.jsxs("span",{className:"block text-xs text-muted-foreground font-normal mt-1",children:[v.description.substring(0,100),v.description.length>100?"...":""]})]})]},v.id)})}):b?e.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[e.jsx(ne,{className:"w-8 h-8 mx-auto mb-2 animate-spin"}),e.jsx("p",{children:"Loading tasks..."})]}):e.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[e.jsx(Oe,{className:"w-8 h-8 mx-auto mb-2 opacity-50"}),e.jsx("p",{children:T?`No tasks found matching "${T}"`:"No tasks available"})]})}),e.jsxs(Ee,{children:[e.jsx(Q,{variant:"ghost",className:"sm:mr-auto",onClick:()=>N(!0),children:"Suggest a new task"}),e.jsx(Q,{variant:"outline",onClick:()=>s(!1),children:"Cancel"}),e.jsx(Q,{onClick:B,disabled:O.isPending||!K,children:O.isPending?e.jsxs(e.Fragment,{children:[e.jsx(ne,{className:"w-4 h-4 mr-2 animate-spin"}),u==="pending"?"Submitting...":"Saving..."]}):e.jsxs(e.Fragment,{children:[e.jsx(oe,{className:"w-4 h-4 mr-2"}),u==="pending"?"Submit for review":"Save Changes"]})})]})]}),e.jsx(Is,{open:_,onOpenChange:N,paperId:a,kind:"task"})]})}const Ma=250,Ta=100;function La({open:t,onOpenChange:s,paperId:a,arxivId:d,initialMethodIds:n,initialMethods:l,onSuccess:o,submitMode:u="direct",isAuthor:r=!1}){const[h,k]=i.useState(n),[_,N]=i.useState(!1),[C,w]=i.useState(""),[T,P]=i.useState(""),[F,$]=i.useState(new Map),D=Ce(),{toast:U}=de(),M=i.useRef(!1);i.useEffect(()=>{if(!t){M.current=!1;return}if(M.current)return;M.current=!0,k(n),w(""),P("");const v=new Map;(l||[]).forEach(S=>{const m=parseInt(S.id);Number.isNaN(m)||v.set(m,S)}),$(v)},[t,n,l]),i.useEffect(()=>{const v=window.setTimeout(()=>{P(C.trim())},Ma);return()=>window.clearTimeout(v)},[C]);const{data:g,isFetching:b}=ie({queryKey:["methods-search",T],queryFn:()=>_r({page_size:Ta,...T?{q:T}:{}}),enabled:t});i.useEffect(()=>{var v;(v=g==null?void 0:g.results)!=null&&v.length&&$(S=>{const m=new Map(S);return g.results.forEach(x=>{const f=parseInt(x.id);Number.isNaN(f)||m.set(f,x)}),m})},[g]);const I=i.useMemo(()=>{const v=(g==null?void 0:g.results)||[],S=new Set,m=[];return h.forEach(x=>{if(S.has(x))return;const f=F.get(x);f&&(m.push(f),S.add(x))}),v.forEach(x=>{const f=parseInt(x.id);Number.isNaN(f)||S.has(f)||(m.push(x),S.add(f))}),m},[g,h,F]),O=xe({mutationFn:async({paperId:v,methodIds:S})=>u==="pending"?(await Ne({paper_id:parseInt(v),edit_type:"methods",proposed_payload:{method_ids:S}}),null):yr(v,S),onSuccess:v=>{if(u==="pending"){U({title:"Edit submitted for review",description:"Thanks! An admin will review your proposed method changes shortly."}),o==null||o(),s(!1);return}v&&Be(D,v,[a,d]),U({title:"Methods updated",description:`Saved ${h.length} method${h.length===1?"":"s"} for this paper.`}),o==null||o(),s(!1)},onError:v=>{var x;const S=v;let m=S.message||(u==="pending"?"Failed to submit your edit. Please try again.":"Failed to update paper methods.");if(S.response)try{const f=JSON.parse(S.response);typeof(f==null?void 0:f.detail)=="string"?m=f.detail:Array.isArray(f==null?void 0:f.detail)&&((x=f.detail[0])!=null&&x.msg)&&(m=f.detail[0].msg)}catch{m=S.response}U({title:u==="pending"?"Could not submit edit":"Could not save methods",description:m,variant:"destructive"})}}),B=()=>{O.mutate({paperId:a,methodIds:h})},K=i.useMemo(()=>{if(h.length!==n.length)return!0;const v=new Set(n);return h.some(S=>!v.has(S))},[h,n]),G=(v,S)=>{k(m=>S?m.includes(v)?m:[...m,v]:m.filter(x=>x!==v))},X=()=>w("");return e.jsxs(ue,{open:t,onOpenChange:s,children:[e.jsxs(me,{className:"max-w-2xl max-h-[600px]",children:[e.jsxs(pe,{children:[e.jsx(he,{children:"Edit Paper Methods"}),e.jsx(fe,{children:"Select the methods and techniques used in this paper. You can select multiple methods."})]}),u==="pending"&&e.jsx($e,{isAuthor:r}),e.jsxs("div",{className:"relative mb-4",children:[e.jsx(Oe,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),e.jsx(ae,{type:"text",placeholder:"Search methods...",value:C,onChange:v=>w(v.target.value),className:"pl-9 pr-9"}),C&&e.jsx("button",{type:"button",onClick:X,className:"absolute right-2 top-1/2 -translate-y-1/2 p-1 text-muted-foreground hover:text-foreground","aria-label":"Clear search",children:e.jsx(hs,{className:"w-4 h-4"})})]}),e.jsx("div",{className:"py-4 overflow-y-auto max-h-[400px]",children:I.length>0?e.jsx("div",{className:"space-y-2",children:I.map(v=>{const S=parseInt(v.id),m=h.includes(S);return e.jsxs("div",{className:"flex items-center space-x-2 p-2 hover:bg-muted/50 rounded-md",children:[e.jsx(Nt,{id:`method-${v.id}`,checked:m,onCheckedChange:x=>G(S,x===!0),className:"!border !border-black data-[state=checked]:!bg-black data-[state=checked]:!text-white"}),e.jsxs("label",{htmlFor:`method-${v.id}`,className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 cursor-pointer flex-1",children:[v.name,v.full_name&&v.full_name!==v.name&&e.jsx("span",{className:"block text-xs text-muted-foreground font-normal",children:v.full_name}),v.description&&e.jsxs("span",{className:"block text-xs text-muted-foreground font-normal mt-1",children:[v.description.substring(0,100),v.description.length>100?"...":""]})]})]},v.id)})}):b?e.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[e.jsx(ne,{className:"w-8 h-8 mx-auto mb-2 animate-spin"}),e.jsx("p",{children:"Loading methods..."})]}):e.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[e.jsx(Oe,{className:"w-8 h-8 mx-auto mb-2 opacity-50"}),e.jsx("p",{children:T?`No methods found matching "${T}"`:"No methods available"})]})}),e.jsxs(Ee,{children:[e.jsx(Q,{variant:"ghost",className:"sm:mr-auto",onClick:()=>N(!0),children:"Suggest a new method"}),e.jsx(Q,{variant:"outline",onClick:()=>s(!1),children:"Cancel"}),e.jsx(Q,{onClick:B,disabled:O.isPending||!K,children:O.isPending?e.jsxs(e.Fragment,{children:[e.jsx(ne,{className:"w-4 h-4 mr-2 animate-spin"}),u==="pending"?"Submitting...":"Saving..."]}):e.jsxs(e.Fragment,{children:[e.jsx(oe,{className:"w-4 h-4 mr-2"}),u==="pending"?"Submit for review":"Save Changes"]})})]})]}),e.jsx(Is,{open:_,onOpenChange:N,paperId:a,kind:"method"})]})}function Ue(t){const s=t.trim();if(!s)return null;let a=s;!a.startsWith("http://")&&!a.startsWith("https://")&&(a=`https://${a}`);try{const d=new URL(a);if(d.hostname.toLowerCase()!=="github.com")return null;const n=d.pathname.split("/").filter(Boolean);if(n.length<2)return null;const l=n[0].toLowerCase();let o=n[1].toLowerCase();return o.endsWith(".git")&&(o=o.slice(0,-4)),`https://github.com/${l}/${o}`}catch{return null}}function as(t,s){const a=Ue(t),d=Ue(s);return a&&d?a===d:t.trim()===s.trim()}function Da({open:t,onOpenChange:s,paperId:a,arxivId:d,initialRepositories:n,onSuccess:l,submitMode:o="direct",isAuthor:u=!1}){const[r,h]=i.useState(n),[k,_]=i.useState(""),N=Ce(),{toast:C}=de(),w=i.useRef(!1);i.useEffect(()=>{if(!t){w.current=!1;return}w.current||(w.current=!0,h(n),_(""))},[t,n]);const T=xe({mutationFn:async({paperId:b,repositories:I})=>o==="pending"?(await Ne({paper_id:parseInt(b),edit_type:"repositories",proposed_payload:{repositories:I}}),null):kr(b,I),onSuccess:b=>{if(o==="pending"){C({title:"Edit submitted for review",description:"Thanks! An admin will review your proposed repository changes shortly."}),l==null||l(),s(!1),_("");return}b&&Be(N,b,[a,d]),l==null||l(),s(!1),_("")},onError:b=>{var B;const I=b;let O=I.message||(o==="pending"?"Failed to submit your edit. Please try again.":"Failed to update paper repositories.");if(I.response)try{const K=JSON.parse(I.response);typeof(K==null?void 0:K.detail)=="string"?O=K.detail:Array.isArray(K==null?void 0:K.detail)&&((B=K.detail[0])!=null&&B.msg)&&(O=K.detail[0].msg)}catch{O=I.response}C({title:o==="pending"?"Could not submit edit":"Could not save repositories",description:O,variant:"destructive"})}}),P=b=>{const I=[];for(const O of b){const B=I.find(K=>as(K.url,O.url));if(B)B.is_official=B.is_official||O.is_official;else{const K=Ue(O.url);I.push({url:K??O.url.trim(),is_official:O.is_official})}}return I},F=()=>{const b=k.trim(),I=b?[...r,{url:b,is_official:!1}]:r;return b&&r.some(O=>as(O.url,b))?(alert("This repository URL is already added"),null):P(I)},$=()=>{const b=F();b!==null&&b.length!==r.length&&(h(b),_(""))},D=b=>{h(r.filter(I=>I.url!==b))},U=b=>{h(r.map(I=>I.url===b?{...I,is_official:!I.is_official}:I))},M=()=>{const b=F();b!==null&&T.mutate({paperId:a,repositories:b})},g=i.useMemo(()=>{const b=k.trim(),I=b?[...r,{url:b,is_official:!1}]:r;if(I.length!==n.length)return!0;const O=P(n),B=P(I);if(B.length!==O.length)return!0;const K=new Map(O.map(G=>[Ue(G.url)??G.url.trim(),!!G.is_official]));return B.some(G=>{const X=Ue(G.url)??G.url.trim(),v=K.get(X);return v===void 0||v!==!!G.is_official})},[r,k,n]);return e.jsx(ue,{open:t,onOpenChange:s,children:e.jsxs(me,{className:"max-w-2xl max-h-[600px]",children:[e.jsxs(pe,{children:[e.jsx(he,{children:"Edit Paper Repositories"}),e.jsx(fe,{children:"Add or remove GitHub repository URLs associated with this paper. Mark repositories as official if they are created by the paper authors."})]}),o==="pending"&&e.jsx($e,{isAuthor:u}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("label",{className:"text-sm font-medium",children:"Add Repository URL"}),e.jsxs("div",{className:"flex space-x-2",children:[e.jsx(ae,{type:"url",placeholder:"https://github.com/owner/repo",value:k,onChange:b=>_(b.target.value),onKeyPress:b=>{b.key==="Enter"&&(b.preventDefault(),$())},className:"flex-1"}),e.jsxs(Q,{onClick:$,size:"sm",disabled:!k.trim(),children:[e.jsx(yt,{className:"w-4 h-4 mr-1"}),"Add"]})]})]}),e.jsx("div",{className:"py-4 overflow-y-auto max-h-[350px]",children:r.length>0?e.jsx("div",{className:"space-y-2",children:r.map((b,I)=>e.jsxs("div",{className:"flex items-center space-x-2 p-3 bg-muted/30 rounded-lg hover:bg-muted/50 transition-colors",children:[e.jsx(ss,{className:"w-4 h-4 text-muted-foreground flex-shrink-0"}),e.jsx("div",{className:"flex-1 min-w-0",children:e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx("span",{className:"text-sm font-medium text-paper-blue truncate",children:b.url}),b.is_official&&e.jsx(js,{variant:"secondary",className:"text-xs",children:"Official"})]})}),e.jsxs("div",{className:"flex items-center space-x-1",children:[e.jsxs(Q,{variant:b.is_official?"default":"outline",size:"sm",onClick:()=>U(b.url),className:"h-8 px-2 text-xs",title:b.is_official?"Click to unmark as official (created by paper authors)":"Click to mark as official (created by paper authors)",children:[e.jsx(ys,{className:`w-3.5 h-3.5 mr-1 ${b.is_official?"fill-current":""}`}),b.is_official?"Official":"Mark official"]}),e.jsx(Q,{variant:"ghost",size:"sm",onClick:()=>D(b.url),className:"h-8 px-2 text-destructive hover:text-destructive",title:"Remove repository",children:e.jsx(_t,{className:"w-4 h-4"})})]})]},I))}):e.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[e.jsx(ss,{className:"w-8 h-8 mx-auto mb-2 opacity-50"}),e.jsx("p",{className:"text-sm",children:"No repositories added yet"}),e.jsx("p",{className:"text-xs mt-1",children:"Add a repository URL above to get started"})]})}),e.jsxs(Ee,{children:[e.jsx(Q,{variant:"outline",onClick:()=>s(!1),children:"Cancel"}),e.jsx(Q,{onClick:M,disabled:T.isPending||!g,children:T.isPending?e.jsxs(e.Fragment,{children:[e.jsx(ne,{className:"w-4 h-4 mr-2 animate-spin"}),o==="pending"?"Submitting...":"Saving..."]}):e.jsxs(e.Fragment,{children:[e.jsx(oe,{className:"w-4 h-4 mr-2"}),o==="pending"?"Submit for review":"Save Changes"]})})]})]})})}function Ua({open:t,onOpenChange:s,paperId:a,arxivId:d,initialProjectPages:n,onSuccess:l,submitMode:o="direct",isAuthor:u=!1}){const[r,h]=i.useState(n),[k,_]=i.useState(""),N=Ce(),{toast:C}=de(),w=i.useRef(!1);i.useEffect(()=>{if(!t){w.current=!1;return}w.current||(w.current=!0,h(n),_(""))},[t,n]);const T=xe({mutationFn:async({paperId:g,projectPages:b})=>o==="pending"?(await Ne({paper_id:parseInt(g),edit_type:"project_pages",proposed_payload:{project_pages:b}}),null):wr(g,b),onSuccess:g=>{if(o==="pending"){C({title:"Edit submitted for review",description:"Thanks! An admin will review your proposed project page changes shortly."}),l==null||l(),s(!1),_("");return}g&&Be(N,g,[a,d]),l==null||l(),s(!1),_("")},onError:g=>{var O;const b=g;let I=b.message||(o==="pending"?"Failed to submit your edit. Please try again.":"Failed to update project pages.");if(b.response)try{const B=JSON.parse(b.response);typeof(B==null?void 0:B.detail)=="string"?I=B.detail:Array.isArray(B==null?void 0:B.detail)&&((O=B.detail[0])!=null&&O.msg)&&(I=B.detail[0].msg)}catch{I=b.response}C({title:o==="pending"?"Could not submit edit":"Could not save project pages",description:I,variant:"destructive"})}}),P=()=>{const g=k.trim();return g?r.some(b=>b.url===g)?(alert("This project page URL is already added"),null):[...r,{url:g,is_official:!1}]:r},F=()=>{const g=P();g!==null&&g.length!==r.length&&(h(g),_(""))},$=g=>{h(r.filter(b=>b.url!==g))},D=g=>{h(r.map(b=>b.url===g?{...b,is_official:!b.is_official}:b))},U=()=>{const g=P();g!==null&&T.mutate({paperId:a,projectPages:g})},M=i.useMemo(()=>{const g=k.trim(),b=g?[...r,{url:g,is_official:!1}]:r;if(b.length!==n.length)return!0;const I=new Map(n.map(O=>[O.url.trim(),!!O.is_official]));return b.some(O=>{const B=I.get(O.url.trim());return B===void 0||B!==!!O.is_official})},[r,k,n]);return e.jsx(ue,{open:t,onOpenChange:s,children:e.jsxs(me,{className:"max-w-2xl max-h-[600px]",children:[e.jsxs(pe,{children:[e.jsx(he,{children:"Edit Paper Project Pages"}),e.jsx(fe,{children:"Add or remove project page URLs (e.g. authors' demo or landing pages) associated with this paper. Mark pages as official if they are created by the paper authors."})]}),o==="pending"&&e.jsx($e,{isAuthor:u}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("label",{className:"text-sm font-medium",children:"Add Project Page URL"}),e.jsxs("div",{className:"flex space-x-2",children:[e.jsx(ae,{type:"url",placeholder:"https://example.com/project",value:k,onChange:g=>_(g.target.value),onKeyPress:g=>{g.key==="Enter"&&(g.preventDefault(),F())},className:"flex-1"}),e.jsxs(Q,{onClick:F,size:"sm",disabled:!k.trim(),children:[e.jsx(yt,{className:"w-4 h-4 mr-1"}),"Add"]})]})]}),e.jsx("div",{className:"py-4 overflow-y-auto max-h-[350px]",children:r.length>0?e.jsx("div",{className:"space-y-2",children:r.map((g,b)=>e.jsxs("div",{className:"flex items-center space-x-2 p-3 bg-muted/30 rounded-lg hover:bg-muted/50 transition-colors",children:[e.jsx(rs,{className:"w-4 h-4 text-muted-foreground flex-shrink-0"}),e.jsx("div",{className:"flex-1 min-w-0",children:e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx("span",{className:"text-sm font-medium text-paper-blue truncate",children:g.url}),g.is_official&&e.jsx(js,{variant:"secondary",className:"text-xs",children:"Official"})]})}),e.jsxs("div",{className:"flex items-center space-x-1",children:[e.jsxs(Q,{variant:g.is_official?"default":"outline",size:"sm",onClick:()=>D(g.url),className:"h-8 px-2 text-xs",title:g.is_official?"Click to unmark as official (created by paper authors)":"Click to mark as official (created by paper authors)",children:[e.jsx(ys,{className:`w-3.5 h-3.5 mr-1 ${g.is_official?"fill-current":""}`}),g.is_official?"Official":"Mark official"]}),e.jsx(Q,{variant:"ghost",size:"sm",onClick:()=>$(g.url),className:"h-8 px-2 text-destructive hover:text-destructive",title:"Remove project page",children:e.jsx(_t,{className:"w-4 h-4"})})]})]},b))}):e.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[e.jsx(rs,{className:"w-8 h-8 mx-auto mb-2 opacity-50"}),e.jsx("p",{className:"text-sm",children:"No project pages added yet"}),e.jsx("p",{className:"text-xs mt-1",children:"Add a project page URL above to get started"})]})}),e.jsxs(Ee,{children:[e.jsx(Q,{variant:"outline",onClick:()=>s(!1),children:"Cancel"}),e.jsx(Q,{onClick:U,disabled:T.isPending||!M,children:T.isPending?e.jsxs(e.Fragment,{children:[e.jsx(ne,{className:"w-4 h-4 mr-2 animate-spin"}),o==="pending"?"Submitting...":"Saving..."]}):e.jsxs(e.Fragment,{children:[e.jsx(oe,{className:"w-4 h-4 mr-2"}),o==="pending"?"Submit for review":"Save Changes"]})})]})]})})}function Oa({open:t,onOpenChange:s,paperId:a,arxivId:d,initialUrl:n,onSuccess:l,submitMode:o="direct",isAuthor:u=!1}){const[r,h]=i.useState(n),k=Ce(),{toast:_}=de(),N=i.useRef(!1);i.useEffect(()=>{if(!t){N.current=!1;return}N.current||(N.current=!0,h(n))},[t,n]);const C=xe({mutationFn:async({paperId:$,sourceUrl:D})=>o==="pending"?(await Ne({paper_id:parseInt($),edit_type:"source_url",proposed_payload:{source_url:D}}),null):Nr($,D),onSuccess:$=>{if(o==="pending"){_({title:"Edit submitted for review",description:"Thanks! An admin will review your proposed source URL change shortly."}),l==null||l(),s(!1);return}$&&Be(k,$,[a,d]),l==null||l(),s(!1)},onError:$=>{var M;const D=$;let U=D.message||(o==="pending"?"Failed to submit your edit. Please try again.":"Failed to update source URL.");if(D.response)try{const g=JSON.parse(D.response);typeof(g==null?void 0:g.detail)=="string"?U=g.detail:Array.isArray(g==null?void 0:g.detail)&&((M=g.detail[0])!=null&&M.msg)&&(U=g.detail[0].msg)}catch{U=D.response}_({title:o==="pending"?"Could not submit edit":"Could not save source URL",description:U,variant:"destructive"})}}),w=r.trim(),T=/^https?:\/\//i.test(w),P=w!==(n||"").trim(),F=()=>{T&&C.mutate({paperId:a,sourceUrl:w})};return e.jsx(ue,{open:t,onOpenChange:s,children:e.jsxs(me,{className:"max-w-2xl",children:[e.jsxs(pe,{children:[e.jsx(he,{children:"Edit Source URL"}),e.jsxs(fe,{children:["Update the canonical URL for this external paper. This is the page the ",'"Source page"'," button links to. ArXiv papers cannot edit this field."]})]}),o==="pending"&&e.jsx($e,{isAuthor:u}),e.jsxs("div",{className:"space-y-2 py-2",children:[e.jsx("label",{className:"text-sm font-medium",children:"Source URL"}),e.jsx(ae,{type:"url",placeholder:"https://example.com/paper",value:r,onChange:$=>h($.target.value),onKeyPress:$=>{$.key==="Enter"&&T&&P&&($.preventDefault(),F())}}),!T&&w.length>0&&e.jsx("p",{className:"text-xs text-destructive",children:"URL must start with http:// or https://"})]}),e.jsxs(Ee,{children:[e.jsx(Q,{variant:"outline",onClick:()=>s(!1),children:"Cancel"}),e.jsx(Q,{onClick:F,disabled:C.isPending||!T||!P,children:C.isPending?e.jsxs(e.Fragment,{children:[e.jsx(ne,{className:"w-4 h-4 mr-2 animate-spin"}),o==="pending"?"Submitting...":"Saving..."]}):e.jsxs(e.Fragment,{children:[e.jsx(oe,{className:"w-4 h-4 mr-2"}),o==="pending"?"Submit for review":"Save Changes"]})})]})]})})}function Ba(t){const s=qa(t),a=i.forwardRef((d,n)=>{const{children:l,...o}=d,u=i.Children.toArray(l),r=u.find(Ka);if(r){const h=r.props.children,k=u.map(_=>_===r?i.Children.count(h)>1?i.Children.only(null):i.isValidElement(h)?h.props.children:null:_);return e.jsx(s,{...o,ref:n,children:i.isValidElement(h)?i.cloneElement(h,void 0,k):null})}return e.jsx(s,{...o,ref:n,children:l})});return a.displayName=`${t}.Slot`,a}function qa(t){const s=i.forwardRef((a,d)=>{const{children:n,...l}=a;if(i.isValidElement(n)){const o=Qa(n),u=za(l,n.props);return n.type!==i.Fragment&&(u.ref=d?Ie(d,o):o),i.cloneElement(n,u)}return i.Children.count(n)>1?i.Children.only(null):null});return s.displayName=`${t}.SlotClone`,s}var Ha=Symbol("radix.slottable");function Ka(t){return i.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===Ha}function za(t,s){const a={...s};for(const d in s){const n=t[d],l=s[d];/^on[A-Z]/.test(d)?n&&l?a[d]=(...u)=>{const r=l(...u);return n(...u),r}:n&&(a[d]=n):d==="style"?a[d]={...n,...l}:d==="className"&&(a[d]=[n,l].filter(Boolean).join(" "))}return{...t,...a}}function Qa(t){var d,n;let s=(d=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:d.get,a=s&&"isReactWarning"in s&&s.isReactWarning;return a?t.ref:(s=(n=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:n.get,a=s&&"isReactWarning"in s&&s.isReactWarning,a?t.props.ref:t.props.ref||t.ref)}var at="Popover",[Fs]=ps(at,[gs]),qe=gs(),[Va,ge]=Fs(at),$s=t=>{const{__scopePopover:s,children:a,open:d,defaultOpen:n,onOpenChange:l,modal:o=!1}=t,u=qe(s),r=i.useRef(null),[h,k]=i.useState(!1),[_,N]=ms({prop:d,defaultProp:n??!1,onChange:l,caller:at});return e.jsx(Cr,{...u,children:e.jsx(Va,{scope:s,contentId:_e(),triggerRef:r,open:_,onOpenChange:N,onOpenToggle:i.useCallback(()=>N(C=>!C),[N]),hasCustomAnchor:h,onCustomAnchorAdd:i.useCallback(()=>k(!0),[]),onCustomAnchorRemove:i.useCallback(()=>k(!1),[]),modal:o,children:a})})};$s.displayName=at;var Ms="PopoverAnchor",Ga=i.forwardRef((t,s)=>{const{__scopePopover:a,...d}=t,n=ge(Ms,a),l=qe(a),{onCustomAnchorAdd:o,onCustomAnchorRemove:u}=n;return i.useEffect(()=>(o(),()=>u()),[o,u]),e.jsx(xs,{...l,...d,ref:s})});Ga.displayName=Ms;var Ts="PopoverTrigger",Ls=i.forwardRef((t,s)=>{const{__scopePopover:a,...d}=t,n=ge(Ts,a),l=qe(a),o=tt(s,n.triggerRef),u=e.jsx(ee.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":qs(n.open),...d,ref:o,onClick:ye(t.onClick,n.onOpenToggle)});return n.hasCustomAnchor?u:e.jsx(xs,{asChild:!0,...l,children:u})});Ls.displayName=Ts;var Ct="PopoverPortal",[Wa,Xa]=Fs(Ct,{forceMount:void 0}),Ds=t=>{const{__scopePopover:s,forceMount:a,children:d,container:n}=t,l=ge(Ct,s);return e.jsx(Wa,{scope:s,forceMount:a,children:e.jsx(bt,{present:a||l.open,children:e.jsx(Er,{asChild:!0,container:n,children:d})})})};Ds.displayName=Ct;var Fe="PopoverContent",Us=i.forwardRef((t,s)=>{const a=Xa(Fe,t.__scopePopover),{forceMount:d=a.forceMount,...n}=t,l=ge(Fe,t.__scopePopover);return e.jsx(bt,{present:d||l.open,children:l.modal?e.jsx(Ya,{...n,ref:s}):e.jsx(Za,{...n,ref:s})})});Us.displayName=Fe;var Ja=Ba("PopoverContent.RemoveScroll"),Ya=i.forwardRef((t,s)=>{const a=ge(Fe,t.__scopePopover),d=i.useRef(null),n=tt(s,d),l=i.useRef(!1);return i.useEffect(()=>{const o=d.current;if(o)return Sr(o)},[]),e.jsx(Pr,{as:Ja,allowPinchZoom:!0,children:e.jsx(Os,{...t,ref:n,trapFocus:a.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ye(t.onCloseAutoFocus,o=>{var u;o.preventDefault(),l.current||(u=a.triggerRef.current)==null||u.focus()}),onPointerDownOutside:ye(t.onPointerDownOutside,o=>{const u=o.detail.originalEvent,r=u.button===0&&u.ctrlKey===!0,h=u.button===2||r;l.current=h},{checkForDefaultPrevented:!1}),onFocusOutside:ye(t.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1})})})}),Za=i.forwardRef((t,s)=>{const a=ge(Fe,t.__scopePopover),d=i.useRef(!1),n=i.useRef(!1);return e.jsx(Os,{...t,ref:s,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:l=>{var o,u;(o=t.onCloseAutoFocus)==null||o.call(t,l),l.defaultPrevented||(d.current||(u=a.triggerRef.current)==null||u.focus(),l.preventDefault()),d.current=!1,n.current=!1},onInteractOutside:l=>{var r,h;(r=t.onInteractOutside)==null||r.call(t,l),l.defaultPrevented||(d.current=!0,l.detail.originalEvent.type==="pointerdown"&&(n.current=!0));const o=l.target;((h=a.triggerRef.current)==null?void 0:h.contains(o))&&l.preventDefault(),l.detail.originalEvent.type==="focusin"&&n.current&&l.preventDefault()}})}),Os=i.forwardRef((t,s)=>{const{__scopePopover:a,trapFocus:d,onOpenAutoFocus:n,onCloseAutoFocus:l,disableOutsidePointerEvents:o,onEscapeKeyDown:u,onPointerDownOutside:r,onFocusOutside:h,onInteractOutside:k,..._}=t,N=ge(Fe,a),C=qe(a);return Rr(),e.jsx(Ar,{asChild:!0,loop:!0,trapped:d,onMountAutoFocus:n,onUnmountAutoFocus:l,children:e.jsx(Ir,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:k,onEscapeKeyDown:u,onPointerDownOutside:r,onFocusOutside:h,onDismiss:()=>N.onOpenChange(!1),children:e.jsx(Fr,{"data-state":qs(N.open),role:"dialog",id:N.contentId,...C,..._,ref:s,style:{..._.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),Bs="PopoverClose",en=i.forwardRef((t,s)=>{const{__scopePopover:a,...d}=t,n=ge(Bs,a);return e.jsx(ee.button,{type:"button",...d,ref:s,onClick:ye(t.onClick,()=>n.onOpenChange(!1))})});en.displayName=Bs;var tn="PopoverArrow",sn=i.forwardRef((t,s)=>{const{__scopePopover:a,...d}=t,n=qe(a);return e.jsx($r,{...n,...d,ref:s})});sn.displayName=tn;function qs(t){return t?"open":"closed"}var rn=$s,an=Ls,nn=Ds,Hs=Us;const on=rn,ln=an,Ks=i.forwardRef(({className:t,align:s="center",sideOffset:a=4,...d},n)=>e.jsx(nn,{children:e.jsx(Hs,{ref:n,align:s,sideOffset:a,className:se("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...d})}));Ks.displayName=Hs.displayName;var ns=1,cn=.9,dn=.8,un=.17,dt=.1,ut=.999,mn=.9999,pn=.99,hn=/[\\\/_+.#"@\[\(\{&]/,fn=/[\\\/_+.#"@\[\(\{&]/g,xn=/[\s-]/,zs=/[\s-]/g;function gt(t,s,a,d,n,l,o){if(l===s.length)return n===t.length?ns:pn;var u=`${n},${l}`;if(o[u]!==void 0)return o[u];for(var r=d.charAt(l),h=a.indexOf(r,n),k=0,_,N,C,w;h>=0;)_=gt(t,s,a,d,h+1,l+1,o),_>k&&(h===n?_*=ns:hn.test(t.charAt(h-1))?(_*=dn,C=t.slice(n,h-1).match(fn),C&&n>0&&(_*=Math.pow(ut,C.length))):xn.test(t.charAt(h-1))?(_*=cn,w=t.slice(n,h-1).match(zs),w&&n>0&&(_*=Math.pow(ut,w.length))):(_*=un,n>0&&(_*=Math.pow(ut,h-n))),t.charAt(h)!==s.charAt(l)&&(_*=mn)),(_<dt&&a.charAt(h-1)===d.charAt(l+1)||d.charAt(l+1)===d.charAt(l)&&a.charAt(h-1)!==d.charAt(l))&&(N=gt(t,s,a,d,h+1,l+2,o),N*dt>_&&(_=N*dt)),_>k&&(k=_),h=a.indexOf(r,h+1);return o[u]=k,k}function is(t){return t.toLowerCase().replace(zs," ")}function gn(t,s,a){return t=a&&a.length>0?`${t+" "+a.join(" ")}`:t,gt(t,s,is(t),is(s),0,0,{})}var Le='[cmdk-group=""]',mt='[cmdk-group-items=""]',vn='[cmdk-group-heading=""]',Qs='[cmdk-item=""]',os=`${Qs}:not([aria-disabled="true"])`,vt="cmdk-item-select",Pe="data-value",bn=(t,s,a)=>gn(t,s,a),Vs=i.createContext(void 0),He=()=>i.useContext(Vs),Gs=i.createContext(void 0),Et=()=>i.useContext(Gs),Ws=i.createContext(void 0),Xs=i.forwardRef((t,s)=>{let a=Re(()=>{var p,A;return{search:"",value:(A=(p=t.value)!=null?p:t.defaultValue)!=null?A:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),d=Re(()=>new Set),n=Re(()=>new Map),l=Re(()=>new Map),o=Re(()=>new Set),u=Js(t),{label:r,children:h,value:k,onValueChange:_,filter:N,shouldFilter:C,loop:w,disablePointerSelection:T=!1,vimBindings:P=!0,...F}=t,$=_e(),D=_e(),U=_e(),M=i.useRef(null),g=Rn();ke(()=>{if(k!==void 0){let p=k.trim();a.current.value=p,b.emit()}},[k]),ke(()=>{g(6,X)},[]);let b=i.useMemo(()=>({subscribe:p=>(o.current.add(p),()=>o.current.delete(p)),snapshot:()=>a.current,setState:(p,A,q)=>{var R,H,z,W;if(!Object.is(a.current[p],A)){if(a.current[p]=A,p==="search")G(),B(),g(1,K);else if(p==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let V=document.getElementById(U);V?V.focus():(R=document.getElementById($))==null||R.focus()}if(g(7,()=>{var V;a.current.selectedItemId=(V=v())==null?void 0:V.id,b.emit()}),q||g(5,X),((H=u.current)==null?void 0:H.value)!==void 0){let V=A??"";(W=(z=u.current).onValueChange)==null||W.call(z,V);return}}b.emit()}},emit:()=>{o.current.forEach(p=>p())}}),[]),I=i.useMemo(()=>({value:(p,A,q)=>{var R;A!==((R=l.current.get(p))==null?void 0:R.value)&&(l.current.set(p,{value:A,keywords:q}),a.current.filtered.items.set(p,O(A,q)),g(2,()=>{B(),b.emit()}))},item:(p,A)=>(d.current.add(p),A&&(n.current.has(A)?n.current.get(A).add(p):n.current.set(A,new Set([p]))),g(3,()=>{G(),B(),a.current.value||K(),b.emit()}),()=>{l.current.delete(p),d.current.delete(p),a.current.filtered.items.delete(p);let q=v();g(4,()=>{G(),(q==null?void 0:q.getAttribute("id"))===p&&K(),b.emit()})}),group:p=>(n.current.has(p)||n.current.set(p,new Set),()=>{l.current.delete(p),n.current.delete(p)}),filter:()=>u.current.shouldFilter,label:r||t["aria-label"],getDisablePointerSelection:()=>u.current.disablePointerSelection,listId:$,inputId:U,labelId:D,listInnerRef:M}),[]);function O(p,A){var q,R;let H=(R=(q=u.current)==null?void 0:q.filter)!=null?R:bn;return p?H(p,a.current.search,A):0}function B(){if(!a.current.search||u.current.shouldFilter===!1)return;let p=a.current.filtered.items,A=[];a.current.filtered.groups.forEach(R=>{let H=n.current.get(R),z=0;H.forEach(W=>{let V=p.get(W);z=Math.max(V,z)}),A.push([R,z])});let q=M.current;S().sort((R,H)=>{var z,W;let V=R.getAttribute("id"),Y=H.getAttribute("id");return((z=p.get(Y))!=null?z:0)-((W=p.get(V))!=null?W:0)}).forEach(R=>{let H=R.closest(mt);H?H.appendChild(R.parentElement===H?R:R.closest(`${mt} > *`)):q.appendChild(R.parentElement===q?R:R.closest(`${mt} > *`))}),A.sort((R,H)=>H[1]-R[1]).forEach(R=>{var H;let z=(H=M.current)==null?void 0:H.querySelector(`${Le}[${Pe}="${encodeURIComponent(R[0])}"]`);z==null||z.parentElement.appendChild(z)})}function K(){let p=S().find(q=>q.getAttribute("aria-disabled")!=="true"),A=p==null?void 0:p.getAttribute(Pe);b.setState("value",A||void 0)}function G(){var p,A,q,R;if(!a.current.search||u.current.shouldFilter===!1){a.current.filtered.count=d.current.size;return}a.current.filtered.groups=new Set;let H=0;for(let z of d.current){let W=(A=(p=l.current.get(z))==null?void 0:p.value)!=null?A:"",V=(R=(q=l.current.get(z))==null?void 0:q.keywords)!=null?R:[],Y=O(W,V);a.current.filtered.items.set(z,Y),Y>0&&H++}for(let[z,W]of n.current)for(let V of W)if(a.current.filtered.items.get(V)>0){a.current.filtered.groups.add(z);break}a.current.filtered.count=H}function X(){var p,A,q;let R=v();R&&(((p=R.parentElement)==null?void 0:p.firstChild)===R&&((q=(A=R.closest(Le))==null?void 0:A.querySelector(vn))==null||q.scrollIntoView({block:"nearest"})),R.scrollIntoView({block:"nearest"}))}function v(){var p;return(p=M.current)==null?void 0:p.querySelector(`${Qs}[aria-selected="true"]`)}function S(){var p;return Array.from(((p=M.current)==null?void 0:p.querySelectorAll(os))||[])}function m(p){let A=S()[p];A&&b.setState("value",A.getAttribute(Pe))}function x(p){var A;let q=v(),R=S(),H=R.findIndex(W=>W===q),z=R[H+p];(A=u.current)!=null&&A.loop&&(z=H+p<0?R[R.length-1]:H+p===R.length?R[0]:R[H+p]),z&&b.setState("value",z.getAttribute(Pe))}function f(p){let A=v(),q=A==null?void 0:A.closest(Le),R;for(;q&&!R;)q=p>0?Sn(q,Le):Pn(q,Le),R=q==null?void 0:q.querySelector(os);R?b.setState("value",R.getAttribute(Pe)):x(p)}let j=()=>m(S().length-1),y=p=>{p.preventDefault(),p.metaKey?j():p.altKey?f(1):x(1)},L=p=>{p.preventDefault(),p.metaKey?m(0):p.altKey?f(-1):x(-1)};return i.createElement(ee.div,{ref:s,tabIndex:-1,...F,"cmdk-root":"",onKeyDown:p=>{var A;(A=F.onKeyDown)==null||A.call(F,p);let q=p.nativeEvent.isComposing||p.keyCode===229;if(!(p.defaultPrevented||q))switch(p.key){case"n":case"j":{P&&p.ctrlKey&&y(p);break}case"ArrowDown":{y(p);break}case"p":case"k":{P&&p.ctrlKey&&L(p);break}case"ArrowUp":{L(p);break}case"Home":{p.preventDefault(),m(0);break}case"End":{p.preventDefault(),j();break}case"Enter":{p.preventDefault();let R=v();if(R){let H=new Event(vt);R.dispatchEvent(H)}}}}},i.createElement("label",{"cmdk-label":"",htmlFor:I.inputId,id:I.labelId,style:In},r),nt(t,p=>i.createElement(Gs.Provider,{value:b},i.createElement(Vs.Provider,{value:I},p))))}),jn=i.forwardRef((t,s)=>{var a,d;let n=_e(),l=i.useRef(null),o=i.useContext(Ws),u=He(),r=Js(t),h=(d=(a=r.current)==null?void 0:a.forceMount)!=null?d:o==null?void 0:o.forceMount;ke(()=>{if(!h)return u.item(n,o==null?void 0:o.id)},[h]);let k=Ys(n,l,[t.value,t.children,l],t.keywords),_=Et(),N=ce(g=>g.value&&g.value===k.current),C=ce(g=>h||u.filter()===!1?!0:g.search?g.filtered.items.get(n)>0:!0);i.useEffect(()=>{let g=l.current;if(!(!g||t.disabled))return g.addEventListener(vt,w),()=>g.removeEventListener(vt,w)},[C,t.onSelect,t.disabled]);function w(){var g,b;T(),(b=(g=r.current).onSelect)==null||b.call(g,k.current)}function T(){_.setState("value",k.current,!0)}if(!C)return null;let{disabled:P,value:F,onSelect:$,forceMount:D,keywords:U,...M}=t;return i.createElement(ee.div,{ref:Ie(l,s),...M,id:n,"cmdk-item":"",role:"option","aria-disabled":!!P,"aria-selected":!!N,"data-disabled":!!P,"data-selected":!!N,onPointerMove:P||u.getDisablePointerSelection()?void 0:T,onClick:P?void 0:w},t.children)}),yn=i.forwardRef((t,s)=>{let{heading:a,children:d,forceMount:n,...l}=t,o=_e(),u=i.useRef(null),r=i.useRef(null),h=_e(),k=He(),_=ce(C=>n||k.filter()===!1?!0:C.search?C.filtered.groups.has(o):!0);ke(()=>k.group(o),[]),Ys(o,u,[t.value,t.heading,r]);let N=i.useMemo(()=>({id:o,forceMount:n}),[n]);return i.createElement(ee.div,{ref:Ie(u,s),...l,"cmdk-group":"",role:"presentation",hidden:_?void 0:!0},a&&i.createElement("div",{ref:r,"cmdk-group-heading":"","aria-hidden":!0,id:h},a),nt(t,C=>i.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":a?h:void 0},i.createElement(Ws.Provider,{value:N},C))))}),_n=i.forwardRef((t,s)=>{let{alwaysRender:a,...d}=t,n=i.useRef(null),l=ce(o=>!o.search);return!a&&!l?null:i.createElement(ee.div,{ref:Ie(n,s),...d,"cmdk-separator":"",role:"separator"})}),kn=i.forwardRef((t,s)=>{let{onValueChange:a,...d}=t,n=t.value!=null,l=Et(),o=ce(h=>h.search),u=ce(h=>h.selectedItemId),r=He();return i.useEffect(()=>{t.value!=null&&l.setState("search",t.value)},[t.value]),i.createElement(ee.input,{ref:s,...d,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":r.listId,"aria-labelledby":r.labelId,"aria-activedescendant":u,id:r.inputId,type:"text",value:n?t.value:o,onChange:h=>{n||l.setState("search",h.target.value),a==null||a(h.target.value)}})}),wn=i.forwardRef((t,s)=>{let{children:a,label:d="Suggestions",...n}=t,l=i.useRef(null),o=i.useRef(null),u=ce(h=>h.selectedItemId),r=He();return i.useEffect(()=>{if(o.current&&l.current){let h=o.current,k=l.current,_,N=new ResizeObserver(()=>{_=requestAnimationFrame(()=>{let C=h.offsetHeight;k.style.setProperty("--cmdk-list-height",C.toFixed(1)+"px")})});return N.observe(h),()=>{cancelAnimationFrame(_),N.unobserve(h)}}},[]),i.createElement(ee.div,{ref:Ie(l,s),...n,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":u,"aria-label":d,id:r.listId},nt(t,h=>i.createElement("div",{ref:Ie(o,r.listInnerRef),"cmdk-list-sizer":""},h)))}),Nn=i.forwardRef((t,s)=>{let{open:a,onOpenChange:d,overlayClassName:n,contentClassName:l,container:o,...u}=t;return i.createElement(ca,{open:a,onOpenChange:d},i.createElement(da,{container:o},i.createElement(ua,{"cmdk-overlay":"",className:n}),i.createElement(ma,{"aria-label":t.label,"cmdk-dialog":"",className:l},i.createElement(Xs,{ref:s,...u}))))}),Cn=i.forwardRef((t,s)=>ce(a=>a.filtered.count===0)?i.createElement(ee.div,{ref:s,...t,"cmdk-empty":"",role:"presentation"}):null),En=i.forwardRef((t,s)=>{let{progress:a,children:d,label:n="Loading...",...l}=t;return i.createElement(ee.div,{ref:s,...l,"cmdk-loading":"",role:"progressbar","aria-valuenow":a,"aria-valuemin":0,"aria-valuemax":100,"aria-label":n},nt(t,o=>i.createElement("div",{"aria-hidden":!0},o)))}),Z=Object.assign(Xs,{List:wn,Item:jn,Input:kn,Group:yn,Separator:_n,Dialog:Nn,Empty:Cn,Loading:En});function Sn(t,s){let a=t.nextElementSibling;for(;a;){if(a.matches(s))return a;a=a.nextElementSibling}}function Pn(t,s){let a=t.previousElementSibling;for(;a;){if(a.matches(s))return a;a=a.previousElementSibling}}function Js(t){let s=i.useRef(t);return ke(()=>{s.current=t}),s}var ke=typeof window>"u"?i.useEffect:i.useLayoutEffect;function Re(t){let s=i.useRef();return s.current===void 0&&(s.current=t()),s}function ce(t){let s=Et(),a=()=>t(s.snapshot());return i.useSyncExternalStore(s.subscribe,a,a)}function Ys(t,s,a,d=[]){let n=i.useRef(),l=He();return ke(()=>{var o;let u=(()=>{var h;for(let k of a){if(typeof k=="string")return k.trim();if(typeof k=="object"&&"current"in k)return k.current?(h=k.current.textContent)==null?void 0:h.trim():n.current}})(),r=d.map(h=>h.trim());l.value(t,u,r),(o=s.current)==null||o.setAttribute(Pe,u),n.current=u}),n}var Rn=()=>{let[t,s]=i.useState(),a=Re(()=>new Map);return ke(()=>{a.current.forEach(d=>d()),a.current=new Map},[t]),(d,n)=>{a.current.set(d,n),s({})}};function An(t){let s=t.type;return typeof s=="function"?s(t.props):"render"in s?s.render(t.props):t}function nt({asChild:t,children:s},a){return t&&i.isValidElement(s)?i.cloneElement(An(s),{ref:s.ref},a(s.props.children)):a(s)}var In={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const Zs=i.forwardRef(({className:t,...s},a)=>e.jsx(Z,{ref:a,className:se("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",t),...s}));Zs.displayName=Z.displayName;const er=i.forwardRef(({className:t,...s},a)=>e.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[e.jsx(Oe,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),e.jsx(Z.Input,{ref:a,className:se("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",t),...s})]}));er.displayName=Z.Input.displayName;const tr=i.forwardRef(({className:t,...s},a)=>e.jsx(Z.List,{ref:a,className:se("max-h-[300px] overflow-y-auto overflow-x-hidden",t),...s}));tr.displayName=Z.List.displayName;const sr=i.forwardRef((t,s)=>e.jsx(Z.Empty,{ref:s,className:"py-6 text-center text-sm",...t}));sr.displayName=Z.Empty.displayName;const rr=i.forwardRef(({className:t,...s},a)=>e.jsx(Z.Group,{ref:a,className:se("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",t),...s}));rr.displayName=Z.Group.displayName;const Fn=i.forwardRef(({className:t,...s},a)=>e.jsx(Z.Separator,{ref:a,className:se("-mx-1 h-px bg-border",t),...s}));Fn.displayName=Z.Separator.displayName;const ar=i.forwardRef(({className:t,...s},a)=>e.jsx(Z.Item,{ref:a,className:se("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50",t),...s}));ar.displayName=Z.Item.displayName;const $n=250;function ls({value:t,onChange:s,placeholder:a="Select...",searchPlaceholder:d="Search...",emptyMessage:n="No results found.",disabled:l=!1,selectedOption:o,queryKey:u,queryFn:r,enabled:h=!0,className:k}){const[_,N]=i.useState(!1),[C,w]=i.useState(""),[T,P]=i.useState("");i.useEffect(()=>{const M=window.setTimeout(()=>{P(C.trim())},$n);return()=>window.clearTimeout(M)},[C]),i.useEffect(()=>{_||(w(""),P(""))},[_]);const{data:F=[],isFetching:$}=ie({queryKey:[...u,T],queryFn:()=>r(T),enabled:h&&_}),D=i.useMemo(()=>!t||F.some(M=>M.value===t)?F:(o==null?void 0:o.value)===t?[o,...F]:F,[F,o,t]),U=i.useMemo(()=>{if(!t)return a;const M=D.find(g=>g.value===t)??((o==null?void 0:o.value)===t?o:null);return(M==null?void 0:M.label)??a},[D,a,o,t]);return e.jsxs(on,{open:_,onOpenChange:N,modal:!0,children:[e.jsx(ln,{asChild:!0,children:e.jsxs(Q,{type:"button",variant:"outline",role:"combobox","aria-expanded":_,disabled:l,className:se("h-8 w-full justify-between px-2 text-sm font-normal",!t&&"text-muted-foreground",k),children:[e.jsx("span",{className:"truncate",children:U}),e.jsx(fa,{className:"ml-1 h-3.5 w-3.5 shrink-0 opacity-50"})]})}),e.jsx(Ks,{className:"z-[60] w-[var(--radix-popover-trigger-width)] max-h-[var(--radix-popover-content-available-height)] overflow-hidden p-0",align:"start",collisionPadding:8,onWheel:M=>M.stopPropagation(),children:e.jsxs(Zs,{shouldFilter:!1,className:"h-full",children:[e.jsx(er,{placeholder:d,value:C,onValueChange:w}),e.jsx(tr,{className:"max-h-[min(300px,calc(var(--radix-popover-content-available-height)-2.75rem))] min-h-0 overscroll-contain",children:$?e.jsxs("div",{className:"flex items-center justify-center py-6 text-sm text-muted-foreground",children:[e.jsx(ne,{className:"mr-2 h-4 w-4 animate-spin"}),"Loading..."]}):D.length===0?e.jsx(sr,{children:n}):e.jsx(rr,{children:D.map(M=>e.jsxs(ar,{value:M.value,onSelect:()=>{s(M.value),N(!1)},children:[e.jsx(oe,{className:se("mr-2 h-4 w-4",t===M.value?"opacity-100":"opacity-0")}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("div",{className:"truncate",children:M.label}),M.description?e.jsx("div",{className:"truncate text-xs text-muted-foreground",children:M.description}):null]})]},M.value))})})]})})]})}const pt=100;function Mn(t){return t.map(s=>{const a=s.best_metric||Object.keys(s.metrics)[0],d=s.metrics[a];return{id:s.id,task_id:s.task_id,dataset_id:s.dataset_id,model_name:s.model_name||"",harness:s.harness||"",metric_name:a||"",metric_value:String(d||""),best_rank:s.best_rank?String(s.best_rank):"",num_parameters:s.num_parameters!=null?String(s.num_parameters):"",hf_model_url:s.hf_model_url||"",is_open:s.is_open!==!1,operation:"unchanged"}})}function Tn(t){const s=new Map;return t.forEach(a=>{a.task_id&&a.task_name&&s.set(a.task_id,{id:a.task_id,name:a.task_name,slug:a.task_slug,level:0})}),s}function Ln(t){const s=new Map;return t.forEach(a=>{a.dataset_id&&a.dataset_name&&s.set(a.dataset_id,{id:a.dataset_id,name:a.dataset_name,slug:a.dataset_slug})}),s}function cs(t,s){return`${t}:${s}`}function Xe(t){const s=t.trim();if(s==="")return null;const a=Number(s);return!Number.isFinite(a)||a<0?null:Math.trunc(a)}function Je(t){const s=t.trim();return s===""?null:s}function Dn({open:t,onOpenChange:s,paperId:a,arxivId:d,initialEvaluations:n,onSuccess:l,submitMode:o="direct",isAuthor:u=!1}){const[r,h]=i.useState([]),[k,_]=i.useState(new Map),[N,C]=i.useState(new Map),w=Ce(),{toast:T}=de(),P=i.useRef(!1),F=i.useRef(!1);i.useEffect(()=>{if(!t){P.current=!1,F.current=!1;return}P.current||F.current||n.length!==0&&(P.current=!0,h(Mn(n)),_(Tn(n)),C(Ln(n)))},[t,n]);const $=i.useMemo(()=>Array.from(new Set(r.map(m=>m.task_id).filter(m=>m&&m!==""))),[r]),D=i.useMemo(()=>{const m=new Set;return r.forEach(x=>{x.task_id&&x.dataset_id&&m.add(cs(x.task_id,x.dataset_id))}),Array.from(m)},[r]),U=ie({queryKey:["datasets-by-tasks-for-eval-edit",$,t],queryFn:async()=>{const m={};return await Promise.all($.map(async x=>{try{const f=await ts({task_id:parseInt(x),page_size:pt});m[x]=f.results}catch(f){console.error(`Error fetching datasets for task ${x}:`,f),m[x]=[]}})),m},enabled:t&&$.length>0});i.useEffect(()=>{U.data&&C(m=>{const x=new Map(m);return Object.values(U.data).forEach(f=>{f.forEach(j=>{x.set(j.id,j)})}),x})},[U.data]);const M=ie({queryKey:["leaderboard-metrics-for-eval-edit",D,t],queryFn:async()=>{const m={};return await Promise.all(D.map(async x=>{const[f,j]=x.split(":");try{m[x]=await Dr(j,f)}catch(y){console.error(`Error fetching metrics for leaderboard ${x}:`,y),m[x]=[]}})),m},enabled:t&&D.length>0}),g=async m=>{const x=await fs({page_size:pt,visible_only:!0,...m?{q:m}:{}});return _(f=>{const j=new Map(f);return x.results.forEach(y=>j.set(y.id,y)),j}),x.results.map(f=>{var j;return{value:f.id,label:f.name,description:(j=f.description)==null?void 0:j.slice(0,100)}})},b=m=>async x=>{const f=await ts({task_id:parseInt(m),page_size:pt,...x?{q:x}:{}});return C(j=>{const y=new Map(j);return f.results.forEach(L=>y.set(L.id,L)),y}),f.results.map(j=>({value:j.id,label:j.name,description:j.full_name}))},I=(m,x)=>{if(!m||!x)return!1;const f=N.get(x);return!!(f!=null&&f.supports_harness)},O=(m,x,f)=>{var L;if(!m||!x)return[];const y=(((L=M.data)==null?void 0:L[cs(m,x)])||[]).map(p=>({value:p.metric_name,label:p.metric_name,description:p.metric_direction==="higher_is_better"?"Higher is better":"Lower is better"}));return f&&!y.some(p=>p.value===f)&&y.unshift({value:f,label:`${f} (legacy)`,description:void 0}),y},B=xe({mutationFn:async({paperId:m,evaluations:x})=>{if(o==="pending"){const j=[];for(const y of x){if(y.operation==="delete"&&y.id){j.push({op:"delete",evaluation_id:parseInt(y.id)});continue}const L=I(y.task_id,y.dataset_id);if(y.operation==="create"){const p=Xe(y.num_parameters),A={task_id:parseInt(y.task_id),dataset_id:parseInt(y.dataset_id),metrics:{[y.metric_name]:y.metric_value},best_metric:y.metric_name},q=Je(y.hf_model_url);y.model_name&&(A.model_name=y.model_name),L&&y.harness&&(A.harness=y.harness),y.best_rank&&(A.best_rank=parseInt(y.best_rank)),p!=null&&(A.num_parameters=p),q!=null&&(A.hf_model_url=q),A.is_open=y.is_open,j.push({op:"create",data:A})}else if(y.operation==="update"&&y.id){const p={task_id:parseInt(y.task_id),dataset_id:parseInt(y.dataset_id),model_name:y.model_name||void 0,harness:L&&y.harness||null,metrics:{[y.metric_name]:y.metric_value},best_metric:y.metric_name,best_rank:y.best_rank?parseInt(y.best_rank):void 0,num_parameters:Xe(y.num_parameters),hf_model_url:Je(y.hf_model_url),is_open:y.is_open};j.push({op:"update",evaluation_id:parseInt(y.id),data:p})}}return j.length===0?{submitted:!1}:(await Ne({paper_id:parseInt(m),edit_type:"evaluations",proposed_payload:{operations:j}}),{submitted:!0})}let f=!1;for(const j of x)if(j.operation==="delete"&&j.id){f=!0;try{await Mr(j.id)}catch(y){if((typeof y=="object"&&y!==null&&"status"in y?y.status:void 0)!==404)throw y;console.log(`Evaluation ${j.id} already deleted or not found`)}}else if(j.operation==="create"){f=!0;const y=I(j.task_id,j.dataset_id),L=Xe(j.num_parameters);await Tr({paper_id:parseInt(m),task_id:parseInt(j.task_id),dataset_id:parseInt(j.dataset_id),model_name:j.model_name||void 0,harness:y&&j.harness||void 0,metrics:{[j.metric_name]:j.metric_value},best_metric:j.metric_name,best_rank:j.best_rank?parseInt(j.best_rank):void 0,num_parameters:L??void 0,hf_model_url:Je(j.hf_model_url)??void 0,is_open:j.is_open})}else if(j.operation==="update"&&j.id){f=!0;const y=I(j.task_id,j.dataset_id);await Lr(j.id,{task_id:parseInt(j.task_id),dataset_id:parseInt(j.dataset_id),model_name:j.model_name||void 0,harness:y&&j.harness||null,metrics:{[j.metric_name]:j.metric_value},best_metric:j.metric_name,best_rank:j.best_rank?parseInt(j.best_rank):void 0,num_parameters:Xe(j.num_parameters),hf_model_url:Je(j.hf_model_url),is_open:j.is_open})}return{submitted:f}},onSuccess:m=>{if(o==="pending"){m!=null&&m.submitted?T({title:"Edit submitted for review",description:"Thanks! An admin will review your proposed evaluation changes shortly."}):T({title:"No changes to submit",description:"Your evaluation list matches the existing data."}),l==null||l(),s(!1);return}w.invalidateQueries({queryKey:["paper-arxiv",d]}),w.invalidateQueries({queryKey:["evaluations","paper",a]}),l==null||l(),s(!1)},onError:m=>{var j;const x=m;let f=x.message||(o==="pending"?"Failed to submit your edit. Please try again.":"Failed to update evaluations.");if(x.response)try{const y=JSON.parse(x.response);typeof(y==null?void 0:y.detail)=="string"?f=y.detail:Array.isArray(y==null?void 0:y.detail)&&((j=y.detail[0])!=null&&j.msg)&&(f=y.detail[0].msg)}catch{f=x.response}T({title:o==="pending"?"Could not submit edit":"Could not save evaluations",description:f,variant:"destructive"})}}),K=()=>{F.current=!0,h([...r,{task_id:"",dataset_id:"",model_name:"",harness:"",metric_name:"",metric_value:"",best_rank:"",num_parameters:"",hf_model_url:"",is_open:!0,operation:"create"}])},G=m=>{F.current=!0,r[m].id?h(r.map((f,j)=>j===m?{...f,operation:"delete"}:f)):h(r.filter((f,j)=>j!==m))},X=(m,x,f)=>{F.current=!0,h(r.map((j,y)=>{if(y!==m)return j;const L={...j,[x]:f};return x==="task_id"&&(L.dataset_id="",L.metric_name="",L.harness=""),x==="dataset_id"&&(L.metric_name="",f&&!I(L.task_id,f)&&(L.harness="")),j.operation==="unchanged"&&(L.operation="update"),L}))},v=(m,x)=>{F.current=!0,h(r.map((f,j)=>{if(j!==m)return f;const y={...f,is_open:x};return f.operation==="unchanged"&&(y.operation="update"),y}))},S=()=>{const m=r.filter(x=>x.operation!=="delete"||x.id);B.mutate({paperId:a,evaluations:m})};return e.jsx(ue,{open:t,onOpenChange:s,children:e.jsxs(me,{className:"max-w-6xl max-h-[800px]",children:[e.jsxs(pe,{children:[e.jsx(he,{children:"Edit Evaluation Results"}),e.jsx(fe,{children:"Add, edit, or remove evaluation results for this paper. Each row represents a benchmark result."})]}),o==="pending"&&e.jsx($e,{isAuthor:u}),e.jsxs("div",{className:"py-4 overflow-y-auto max-h-[600px]",children:[r.filter(m=>m.operation!=="delete").length>0?e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full border-collapse",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-border",children:[e.jsx("th",{className:"text-left py-2 px-2 font-medium text-sm min-w-[180px]",children:"Task"}),e.jsx("th",{className:"text-left py-2 px-2 font-medium text-sm min-w-[180px]",children:"Dataset"}),e.jsx("th",{className:"text-left py-2 px-2 font-medium text-sm",children:"Model"}),e.jsx("th",{className:"text-left py-2 px-2 font-medium text-sm",children:"Harness"}),e.jsx("th",{className:"text-left py-2 px-2 font-medium text-sm min-w-[140px]",children:"Metric"}),e.jsx("th",{className:"text-left py-2 px-2 font-medium text-sm",children:"Value"}),e.jsx("th",{className:"text-left py-2 px-2 font-medium text-sm",children:"Parameters"}),e.jsx("th",{className:"text-left py-2 px-2 font-medium text-sm min-w-[200px]",children:"HF model URL"}),e.jsx("th",{className:"text-left py-2 px-2 font-medium text-sm w-20",children:"Open source"}),e.jsx("th",{className:"text-left py-2 px-2 font-medium text-sm w-16",children:"Action"})]})}),e.jsx("tbody",{children:r.map((m,x)=>{if(m.operation==="delete")return null;const f=k.get(m.task_id),j=N.get(m.dataset_id),y=O(m.task_id,m.dataset_id,m.metric_name),L=!!(m.task_id&&m.dataset_id)&&M.isFetching;return e.jsxs("tr",{className:"border-b border-border",children:[e.jsx("td",{className:"py-2 px-2",children:e.jsx(ls,{value:m.task_id,onChange:p=>X(x,"task_id",p),placeholder:"Select task",searchPlaceholder:"Search tasks...",emptyMessage:"No tasks found.",selectedOption:f?{value:f.id,label:f.name}:null,queryKey:["eval-edit-task-search"],queryFn:g,enabled:t})}),e.jsx("td",{className:"py-2 px-2",children:e.jsx(ls,{value:m.dataset_id,onChange:p=>X(x,"dataset_id",p),placeholder:m.task_id?"Select dataset":"Select task first",searchPlaceholder:"Search datasets...",emptyMessage:m.task_id?"No datasets found for this task.":"Select a task first.",disabled:!m.task_id,selectedOption:j?{value:j.id,label:j.name}:null,queryKey:["eval-edit-dataset-search",m.task_id],queryFn:b(m.task_id),enabled:t&&!!m.task_id})}),e.jsx("td",{className:"py-2 px-2",children:e.jsx(ae,{type:"text",className:"w-full text-sm",placeholder:"Model name",value:m.model_name,onChange:p=>X(x,"model_name",p.target.value)})}),e.jsx("td",{className:"py-2 px-2",children:I(m.task_id,m.dataset_id)?e.jsx(ae,{type:"text",className:"w-full text-sm",placeholder:"Claude Code, Terminus, ...",value:m.harness,onChange:p=>X(x,"harness",p.target.value)}):e.jsx("span",{className:"text-xs text-muted-foreground",children:"Not supported"})}),e.jsx("td",{className:"py-2 px-2",children:!m.task_id||!m.dataset_id?e.jsx("span",{className:"text-xs text-muted-foreground",children:"Select task + dataset"}):L?e.jsxs("span",{className:"inline-flex items-center text-xs text-muted-foreground",children:[e.jsx(ne,{className:"mr-1 h-3 w-3 animate-spin"}),"Loading metrics..."]}):y.length>0?e.jsxs("select",{className:"w-full rounded-md border border-border bg-background px-2 py-1 text-sm",value:m.metric_name,onChange:p=>X(x,"metric_name",p.target.value),children:[e.jsx("option",{value:"",children:"Select metric"}),y.map(p=>e.jsx("option",{value:p.value,children:p.label},p.value))]}):e.jsx("span",{className:"text-xs text-muted-foreground",children:"No configured metrics"})}),e.jsx("td",{className:"py-2 px-2",children:e.jsx(ae,{type:"text",className:"w-full text-sm",placeholder:"44.9",value:m.metric_value,onChange:p=>X(x,"metric_value",p.target.value)})}),e.jsx("td",{className:"py-2 px-2",children:e.jsx(ae,{type:"number",min:0,step:1,className:"w-full text-sm",placeholder:"e.g. 7000000000",value:m.num_parameters,onChange:p=>X(x,"num_parameters",p.target.value),title:"Raw model parameter count (e.g. 7000000000 for a 7B model). Leave blank if unknown."})}),e.jsx("td",{className:"py-2 px-2",children:e.jsx(ae,{type:"url",className:"w-full text-sm",placeholder:"https://huggingface.co/org/model",value:m.hf_model_url,onChange:p=>X(x,"hf_model_url",p.target.value),title:"Hugging Face model page for this row (must start with https://huggingface.co/). Leave blank if none."})}),e.jsx("td",{className:"py-2 px-2 text-center",children:e.jsx("input",{type:"checkbox",className:"h-4 w-4 align-middle",checked:m.is_open,onChange:p=>v(x,p.target.checked),title:"Whether the evaluated model is open-source. Uncheck for closed-source models."})}),e.jsx("td",{className:"py-2 px-2",children:e.jsx(Q,{variant:"ghost",size:"sm",onClick:()=>G(x),className:"h-8 w-8 p-0 text-destructive hover:text-destructive",title:"Delete row",children:e.jsx(_t,{className:"w-4 h-4"})})})]},x)})})]})}):e.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[e.jsx(ha,{className:"w-12 h-12 mx-auto mb-3 opacity-30"}),e.jsx("p",{children:"No evaluation results yet"}),e.jsx("p",{className:"text-sm mt-2",children:'Click "Add Row" below to add a new evaluation'})]}),e.jsx("div",{className:"mt-4",children:e.jsxs(Q,{variant:"outline",size:"sm",onClick:K,className:"flex items-center space-x-2",children:[e.jsx(yt,{className:"w-4 h-4"}),e.jsx("span",{children:"Add Row"})]})})]}),e.jsxs(Ee,{children:[e.jsx(Q,{variant:"outline",onClick:()=>s(!1),children:"Cancel"}),e.jsx(Q,{onClick:S,disabled:B.isPending,children:B.isPending?e.jsxs(e.Fragment,{children:[e.jsx(ne,{className:"w-4 h-4 mr-2 animate-spin"}),o==="pending"?"Submitting...":"Saving..."]}):e.jsxs(e.Fragment,{children:[e.jsx(oe,{className:"w-4 h-4 mr-2"}),o==="pending"?"Submit for review":"Save Changes"]})})]})]})})}function Un({open:t,onOpenChange:s,sectionLabel:a,returnTo:d}){return e.jsx(ue,{open:t,onOpenChange:s,children:e.jsxs(me,{className:"max-w-md",children:[e.jsxs(pe,{children:[e.jsxs(he,{children:["Sign in to edit ",a]}),e.jsx(fe,{children:"Anyone can suggest edits to a paper page. Sign in with your Hugging Face account first so an admin can review your submission."})]}),e.jsx("div",{className:"flex justify-center pt-2",children:e.jsx(Ur,{returnTo:d})})]})})}const Ae=["my-bookmark-ids"];function On(){var d,n;const{user:t}=st(),s=ie({queryKey:Ae,queryFn:()=>et.getMyBookmarkIds(),enabled:!!t,staleTime:60*1e3,refetchOnWindowFocus:!1}),a=jt.useMemo(()=>{var l;return new Set(((l=s.data)==null?void 0:l.paper_ids)??[])},[(d=s.data)==null?void 0:d.paper_ids]);return{ids:((n=s.data)==null?void 0:n.paper_ids)??[],idSet:a,isLoading:s.isLoading,isError:s.isError}}function Bn(){const{user:t}=st(),s=Ce(),a=xe({mutationFn:async({paperId:n,isBookmarked:l})=>{l?await et.removeBookmark(n):await et.addBookmark(n)},onMutate:async({paperId:n,isBookmarked:l})=>{await s.cancelQueries({queryKey:Ae});const o=s.getQueryData(Ae),u=typeof n=="string"?Number(n):n,r=(o==null?void 0:o.paper_ids)??[],h=l?r.filter(k=>k!==u):[u,...r.filter(k=>k!==u)];return s.setQueryData(Ae,{paper_ids:h}),{previous:o}},onError:(n,l,o)=>{o!=null&&o.previous&&s.setQueryData(Ae,o.previous)},onSettled:()=>{s.invalidateQueries({queryKey:Ae}),s.invalidateQueries({queryKey:["my-bookmarks"]})}});return{toggle:jt.useCallback((n,l)=>{if(!t){if(vs())return;const o=typeof window<"u"?window.location.pathname+window.location.search:"/";window.location.href=bs(`/api/v1/auth/hf/login?return_to=${encodeURIComponent(o)}`);return}a.mutate({paperId:n,isBookmarked:l})},[a,t]),isPending:a.isPending}}const qn=({paperId:t})=>{const{user:s}=st(),{idSet:a}=On(),{toggle:d,isPending:n}=Bn();if(vs())return null;const l=Number(t),o=!!s&&a.has(l),u=()=>{Number.isFinite(l)&&d(l,o)},r=s&&o?"Saved":"Save",h=s?o?"Remove from saved papers":"Save this paper":"Sign in with Hugging Face to save this paper";return e.jsxs("button",{type:"button",className:`action-btn${o?" is-saved":""}`,onClick:u,disabled:n,"aria-pressed":o,"aria-label":h,title:h,children:[e.jsx(te,{name:"bookmark",size:12}),r]})};function Ye({children:t,showEdit:s=!1,onEdit:a,editAriaLabel:d}){return s?e.jsxs("span",{className:"action-btn-composite",children:[t,e.jsx("button",{type:"button",className:"action-btn-segment action-btn-edit",onClick:a,"aria-label":d,children:"edit"})]}):t}const Hn={tasks:"tasks",methods:"methods",results:"evaluation results",repositories:"GitHub repositories","project-pages":"project pages","source-url":"source URL"},Ze=360,ht=3;function ds(t){if(!t)return"—";try{return new Date(t).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}catch{return"—"}}function us(t){return t>=1e3?`${(t/1e3).toFixed(1)}k`:String(t)}function je(t,s){try{const a=new URL(t),n=a.pathname.replace(/\/$/,"").split("/").filter(Boolean).at(-1);return n?n.replace(/[-_]+/g," "):a.hostname.replace(/^www\./,"")}catch{return s}}const ui=()=>{var Ot,Bt,qt,Ht,Kt,zt,Qt,Vt,Gt,Wt,Xt,Jt;const{arxivId:t}=Or(),s=t?Br(t):"",a=qr(),{toast:d}=de(),{user:n}=st(),l=(n==null?void 0:n.is_admin)??!1,o=!!n,u=!0,{data:r,isLoading:h,error:k,refetch:_}=na(s||"",!!s),[N,C]=i.useState(!1);i.useEffect(()=>{if(!t||t===s)return;const c=window.location.search+window.location.hash;a(`/paper/${s}${c}`,{replace:!0})},[s,a,t]),i.useEffect(()=>{if(r!=null&&r.title)return document.title=ra(r.title),()=>{document.title=aa}},[r==null?void 0:r.title]),i.useEffect(()=>{if(C(!1),!(r!=null&&r.id))return;const c=window.setTimeout(()=>C(!0),0);return()=>window.clearTimeout(c)},[r==null?void 0:r.id]);const{data:w,isLoading:T}=ba(N?r==null?void 0:r.arxiv_id:void 0),{data:P,isLoading:F}=xa(r==null?void 0:r.id,N&&!!(r!=null&&r.id)),{preferences:$}=Hr(),D=i.useMemo(()=>!P||!$.hide_closed_source_evals?P:P.filter(c=>c.is_open!==!1),[P,$.hide_closed_source_evals]),U=i.useMemo(()=>({models:(r==null?void 0:r.hf_models)??[],datasets:(r==null?void 0:r.hf_datasets)??[],spaces:(r==null?void 0:r.hf_spaces)??[]}),[r==null?void 0:r.hf_models,r==null?void 0:r.hf_datasets,r==null?void 0:r.hf_spaces]),M=i.useMemo(()=>{if(!D)return[];const c=new Map;for(const E of D){const J=E.task_id,re=c.get(J);re?re.rows.push(E):c.set(J,{taskId:J,taskName:E.task_name||"—",taskSlug:E.task_slug,rows:[E]})}return Array.from(c.values())},[D]),g=ie({queryKey:["paper-versions",r==null?void 0:r.arxiv_id],queryFn:async()=>{const c=r.arxiv_id.replace(/v\d+$/,""),E=await fetch(bs(`/api/v1/papers/arxiv/${c}/versions`));return E.ok?await E.json():[]},enabled:N&&!!(r!=null&&r.arxiv_id),staleTime:10*60*1e3}),b=ie({queryKey:["related-papers",(Bt=(Ot=r==null?void 0:r.tasks)==null?void 0:Ot[0])==null?void 0:Bt.id],queryFn:()=>et.getTaskPapers(r.tasks[0].id,{page:1,page_size:5,order_by:"citation_count",order_dir:"desc",include_resources:!1}),enabled:N&&!!((Ht=(qt=r==null?void 0:r.tasks)==null?void 0:qt[0])!=null&&Ht.id),staleTime:10*60*1e3,select:c=>c.results.filter(E=>E.id!==(r==null?void 0:r.id)).slice(0,4)}),[I,O]=i.useState(!1),[B,K]=i.useState(!1),[G,X]=i.useState(!1),{isEditingTasks:v,setIsEditingTasks:S,isEditingMethods:m,setIsEditingMethods:x,isEditingRepositories:f,setIsEditingRepositories:j,isEditingProjectPages:y,setIsEditingProjectPages:L,isEditingEvaluations:p,setIsEditingEvaluations:A,isEditingSourceUrl:q,setIsEditingSourceUrl:R}=ja(),[H,z]=i.useState(null),W=i.useMemo(()=>{if(!n||!(r!=null&&r.author_links))return!1;const c=n.username.toLowerCase();return r.author_links.some(E=>!!E.hf_username&&E.hf_username.toLowerCase()===c)},[n,r==null?void 0:r.author_links]),V=l?"direct":"pending",Y=c=>{if(!o){z(c);return}switch(c){case"tasks":S(!0);return;case"methods":x(!0);return;case"results":A(!0);return;case"repositories":j(!0);return;case"project-pages":L(!0);return;case"source-url":R(!0);return}},[St,it]=i.useState("idle"),[Pt,Rt]=i.useState(null),[At,It]=i.useState(null),nr=async()=>{if(s){it("indexing"),Rt(null),It(null);try{await Xr(s),d({title:"Indexed",description:"Paper added to database."}),setTimeout(()=>_(),1200),it("idle")}catch(c){const E=c;let J=E.message||"Failed to index paper";if(E.response)try{J=JSON.parse(E.response).detail||J}catch{J=E.response}Rt(J),(E.status===429||E.status===503)&&It("Try again later after arXiv has lifted the temporary limit."),it("idle")}}},{citationDisplay:ir,citationCopy:Ft}=i.useMemo(()=>{if(!r)return{citationDisplay:"",citationCopy:""};const c=`${r.title.slice(0,60)}${r.title.length>60?"…":""}`,E=`${r.authors[0]||""}${r.authors.length>1?" et al.":""}`,J=r.authors.join(" and "),re=(r.published||"").slice(0,4)||"—",Yt=(Zt,es)=>r.arxiv_id?`@article{${r.arxiv_id.replace(".","")},
|
| 37 |
-
title={{${Zt}}},
|
| 38 |
-
author=${es},
|
| 39 |
-
year={{${re}}},
|
| 40 |
-
eprint={{${r.arxiv_id}}},
|
| 41 |
-
archivePrefix={{arXiv}}
|
| 42 |
-
}`:`@misc{paper${r.id},
|
| 43 |
-
title={{${Zt}}},
|
| 44 |
-
author=${es},
|
| 45 |
-
year={{${re}}},
|
| 46 |
-
url={{${r.source_url||r.url_abs||""}}}
|
| 47 |
-
}`;return{citationDisplay:Yt(c,`{{${E}}}`),citationCopy:Yt(r.title,`{${J}}`)}},[r]),[or,$t]=i.useState(!1),lr=async()=>{if(Ft)try{await navigator.clipboard.writeText(Ft),$t(!0),d({title:"Citation copied",description:"BibTeX entry copied to clipboard."}),window.setTimeout(()=>$t(!1),1500)}catch{d({title:"Copy failed",description:"Could not access the clipboard. Please copy manually.",variant:"destructive"})}};if(h)return e.jsxs("div",{className:"page",children:[e.jsx(De,{className:"h-12 w-3/4 mb-4"}),e.jsx(De,{className:"h-6 w-1/3 mb-8"}),e.jsx(De,{className:"h-64 w-full"})]});if(k||!r)return e.jsxs("div",{className:"page",children:[e.jsxs("div",{className:"breadcrumb",children:[e.jsx(be,{to:"/papers",children:"Papers"}),e.jsx("span",{className:"sep",children:"/"}),e.jsxs("span",{style:{color:"var(--ink)"},children:["arXiv:",s]})]}),e.jsx("h1",{className:"detail-title",children:"Paper not indexed yet"}),e.jsxs("p",{style:{fontFamily:"var(--serif)",color:"var(--ink-soft)",marginTop:16,maxWidth:640},children:["We don't have ",e.jsxs("span",{style:{fontFamily:"var(--mono)"},children:["arXiv:",s]})," in the database. You can index it from arXiv right now."]}),Pt&&e.jsx(ia,{variant:"destructive",className:"mt-4 max-w-xl",children:e.jsxs(oa,{children:[e.jsx("div",{children:Pt}),At&&e.jsx("div",{className:"mt-2",children:At})]})}),e.jsxs("div",{className:"action-row",children:[l&&e.jsxs("button",{className:"action-btn",onClick:nr,disabled:St==="indexing",children:[e.jsx(te,{name:"sparkle",size:12}),St==="indexing"?"Indexing…":"Index from arXiv"]}),e.jsx(Q,{variant:"outline",onClick:()=>a("/papers"),children:"Browse Papers"})]})]});const Mt=g.data||[],Me=sa(r.repositories),ve=[...r.repositories??[]].sort((c,E)=>{const J=c.is_official?1:0,re=E.is_official?1:0;return J!==re?re-J:(E.num_stars||0)-(c.num_stars||0)}),cr=G?ve:ve.slice(0,ht),ot=r.arxiv_id?{isLoading:T,paperHref:`https://huggingface.co/papers/${r.arxiv_id.replace(/v\d+$/,"")}`,rows:[{label:"Models",href:`https://huggingface.co/models?other=arxiv:${r.arxiv_id}`,count:w==null?void 0:w.models,isLimited:w==null?void 0:w.isLimited,links:U.models.map(c=>({href:c,label:je(c,"Model")}))},{label:"Datasets",href:`https://huggingface.co/datasets?other=arxiv:${r.arxiv_id}`,count:w==null?void 0:w.datasets,isLimited:w==null?void 0:w.isLimited,links:U.datasets.map(c=>({href:c,label:je(c,"Dataset")}))},{label:"Spaces",href:`https://huggingface.co/spaces?arxivIds=${r.arxiv_id.replace(/v\d+$/,"")}`,count:w==null?void 0:w.spaces,isLimited:w==null?void 0:w.isLimited,links:U.spaces.map(c=>({href:c,label:je(c,"Space")}))}],footer:`Cite arxiv.org/abs/${r.arxiv_id.replace(/v\d+$/,"")} in a HF README to link it here.`}:{isLoading:!1,paperHref:null,rows:[{label:"Models",href:ft(U.models),count:U.models.length,links:U.models.map(c=>({href:c,label:je(c,"Model")}))},{label:"Datasets",href:ft(U.datasets),count:U.datasets.length,links:U.datasets.map(c=>({href:c,label:je(c,"Dataset")}))},{label:"Spaces",href:ft(U.spaces),count:U.spaces.length,links:U.spaces.map(c=>({href:c,label:je(c,"Space")}))}],footer:null},Tt=r.tldr||null,Lt=r.num_pages||null,Se=r.abstract||"",dr=Se.length>Ze?Se.slice(0,Ze)+"…":Se,ur=I||Se.length<=Ze?Se:dr,Ke=(r.methods||[]).filter(c=>c.source_paper_id===r.id),ze=r.introduced_benchmarks||[],mr=Ke.length>0||ze.length>0,Dt=r.arxiv_id?`arXiv:${r.arxiv_id}`:"External resource",pr=r.source==="external"?"Source page":"arXiv page",Te=((Kt=r.project_pages)==null?void 0:Kt.filter(c=>c.url))??[],hr=(()=>{const c=[];return Ke.length>0&&c.push(Ke.length===1?"this method":"these methods"),ze.length>0&&c.push(ze.length===1?"this benchmark":"these benchmarks"),c.length===0?"":c.length===1?c[0]:c.join(" and ")})(),Qe=r.predecessor_papers||[],Ve=r.successor_papers||[],fr=Qe.length>0||Ve.length>0,Ge=12,lt=r.authors.map((c,E)=>{var J,re;return{name:c,hf_username:((re=(J=r.author_links)==null?void 0:J[E])==null?void 0:re.hf_username)??null}}),Ut=B||lt.length<=Ge?lt:lt.slice(0,Ge);return e.jsxs("div",{className:"page",children:[e.jsxs("div",{className:"breadcrumb",children:[e.jsx(be,{to:"/",children:"Trending"}),e.jsx("span",{className:"sep",children:"/"}),e.jsx("span",{children:Dt})]}),e.jsxs("div",{className:"detail-grid",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"detail-hero",children:[e.jsxs("div",{className:"detail-hero-main",children:[e.jsx("h1",{className:"detail-title",children:e.jsx(We,{title:r.title})}),e.jsxs("div",{className:"detail-meta",children:[e.jsx("span",{children:Dt}),e.jsx("span",{children:"·"}),e.jsxs("span",{children:["Submitted ",ds(r.published)]}),Lt&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"·"}),e.jsxs("span",{children:[Lt," pages"]})]}),r.citation_count!=null&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"·"}),e.jsxs("span",{children:[r.citation_count.toLocaleString()," citations"]})]}),(r.proceeding||r.conference_slug)&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"·"}),r.conference_slug?e.jsx("a",{href:`/conferences/${r.conference_slug}`,target:"_blank",rel:"noopener noreferrer",style:{color:"var(--accent-text)"},children:(r.proceeding||r.conference_name||"").replace(/\s+\d{1,2}$/,"")}):e.jsx("span",{children:r.proceeding.replace(/\s+\d{1,2}$/,"")})]}),Mt.length>1&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"·"}),e.jsx("select",{className:"version-select",value:r.version,onChange:c=>{const E=c.target.value;r.arxiv_id&&a(`/paper/${r.arxiv_id.replace(/v\d+$/,"")}${E?`?version=${E}`:""}`)},children:Mt.map(c=>e.jsxs("option",{value:c.version,children:[c.version," — ",ds(c.published)]},c.version))})]})]}),e.jsxs("div",{className:"detail-authors",children:[Ut.map((c,E)=>e.jsxs(jt.Fragment,{children:[c.hf_username?e.jsx("a",{href:`https://huggingface.co/${c.hf_username}`,target:"_blank",rel:"noopener noreferrer",title:`@${c.hf_username} on Hugging Face`,children:c.name}):e.jsx("a",{children:c.name}),E<Ut.length-1?", ":""]},E)),r.authors.length>Ge&&e.jsx("button",{className:"show-more-authors",onClick:()=>K(c=>!c),style:{marginLeft:8,background:"none",border:"none",cursor:"pointer",color:"var(--accent-text)",fontFamily:"var(--mono)",fontSize:12},children:B?"show fewer":`+${r.authors.length-Ge} more`})]}),e.jsxs("div",{className:"action-row",children:[r.url_pdf&&e.jsxs("a",{className:"action-btn",href:r.url_pdf,target:"_blank",rel:"noopener noreferrer",children:[e.jsx(te,{name:"pdf",size:12})," View PDF"]}),r.url_abs&&e.jsx(Ye,{showEdit:r.source==="external"&&u,onEdit:()=>Y("source-url"),editAriaLabel:"Edit source URL",children:e.jsxs("a",{className:r.source==="external"&&u?"action-btn-segment action-btn-main":"action-btn",href:r.url_abs,target:"_blank",rel:"noopener noreferrer",children:[e.jsx(te,{name:"external",size:12})," ",pr]})}),ot.paperHref&&(w==null?void 0:w.paperExists)&&e.jsxs("a",{className:"bm-action-btn",href:ot.paperHref,target:"_blank",rel:"noopener noreferrer","aria-label":"View on Hugging Face",children:["View on ",e.jsx("span",{"aria-hidden":"true",children:"🤗"})]}),Me.githubUrl&&e.jsx(Ye,{showEdit:u,onEdit:()=>Y("repositories"),editAriaLabel:"Edit code repositories",children:e.jsxs("a",{className:"action-btn-segment action-btn-main",href:Me.githubUrl,target:"_blank",rel:"noopener noreferrer",children:[e.jsx(te,{name:"github",size:12})," Code",Me.github!=null&&e.jsxs("span",{style:{opacity:.7,marginLeft:4},children:["· ",us(Me.github)," ★"]})]})}),Me.githubUrl?null:e.jsxs("button",{type:"button",className:"action-btn",onClick:()=>Y("repositories"),title:"Add GitHub repository",children:[e.jsx(te,{name:"github",size:12})," Add code"]}),Te.length===1?e.jsx(Ye,{showEdit:u,onEdit:()=>Y("project-pages"),editAriaLabel:"Edit project pages",children:e.jsxs("a",{className:"action-btn-segment action-btn-main",href:Te[0].url,target:"_blank",rel:"noopener noreferrer",children:[e.jsx(te,{name:"globe",size:12})," Project page"]})}):null,Te.length>1?e.jsx(Ye,{showEdit:u,onEdit:()=>Y("project-pages"),editAriaLabel:"Edit project pages",children:e.jsxs(Kr,{children:[e.jsx(zr,{asChild:!0,children:e.jsxs("button",{type:"button",className:"action-btn-segment action-btn-main",children:[e.jsx(te,{name:"globe",size:12})," Project page"]})}),e.jsx(Qr,{align:"start",className:"project-page-menu",children:Te.map((c,E)=>e.jsx(Vr,{asChild:!0,children:e.jsx("a",{href:c.url,target:"_blank",rel:"noopener noreferrer",children:je(c.url,`Project page ${E+1}`)})},c.url))})]})}):null,Te.length===0&&o?e.jsxs("button",{type:"button",className:"action-btn",onClick:()=>Y("project-pages"),title:"Add project page",children:[e.jsx(te,{name:"globe",size:12})," Add project page"]}):null,r.conference_url_abs&&e.jsxs("a",{className:"action-btn",href:r.conference_url_abs,target:"_blank",rel:"noopener noreferrer",children:[e.jsx(te,{name:"external",size:12})," Conference"]}),(r.organizations||[]).map(c=>e.jsxs(be,{to:`/${c.slug}`,className:"action-btn",title:c.name,"aria-label":c.name,children:[c.logo_url&&e.jsx("span",{style:{display:"inline-flex",alignItems:"center",justifyContent:"center",height:16,width:16,borderRadius:3,overflow:"hidden"},children:e.jsx("img",{src:c.logo_url,alt:"",style:{height:"150%",width:"150%",objectFit:"contain"},onError:E=>{E.currentTarget.style.display="none"}})}),c.name]},c.id)),e.jsx(qn,{paperId:r.id})]})]}),e.jsx("div",{className:"detail-hero-thumb detail-thumb-wrap",children:e.jsx(Jr,{paperId:r.arxiv_id||r.id,title:r.title,thumbnailUrl:Gr(r.thumbnail_url),priority:!0})})]}),mr&&e.jsxs("div",{className:"introduced-banner",children:[e.jsx("span",{className:"introduced-label",children:"Introduced"}),e.jsxs("div",{className:"introduced-methods",children:[Ke.map(c=>e.jsxs("button",{type:"button",className:"introduced-pill",onClick:()=>a(`/methods/${c.slug||c.id}`),children:[c.name,e.jsx("span",{className:"introduced-arrow",children:"→"})]},`method-${c.id}`)),ze.map(c=>e.jsxs("button",{type:"button",className:"introduced-pill",onClick:()=>a(`/benchmark/${c.slug||c.id}`),children:[c.name,e.jsx("span",{className:"introduced-arrow",children:"→"})]},`benchmark-${c.id}`))]}),e.jsxs("span",{className:"introduced-note",children:["This paper is the canonical source for ",hr,"."]})]}),fr&&e.jsxs("div",{className:"introduced-banner lineage-banner",children:[Ve.length>0&&e.jsxs("div",{className:"lineage-row",children:[e.jsx("span",{className:"introduced-label lineage-label",children:Ve.length===1?"Follow-up paper":"Follow-up papers"}),e.jsx("div",{className:"introduced-methods",children:Ve.map(c=>e.jsxs("button",{type:"button",className:"introduced-pill lineage-pill",onClick:()=>a(`/paper/${c.route_identifier}`),children:[e.jsx(We,{title:c.title}),e.jsx("span",{className:"introduced-arrow",children:"→"})]},`successor-${c.id}`))})]}),Qe.length>0&&e.jsxs("div",{className:"lineage-row",children:[e.jsx("span",{className:"introduced-label lineage-label",children:Qe.length===1?"Predecessor paper":"Predecessor papers"}),e.jsx("div",{className:"introduced-methods",children:Qe.map(c=>e.jsxs("button",{type:"button",className:"introduced-pill lineage-pill",onClick:()=>a(`/paper/${c.route_identifier}`),children:[e.jsx("span",{className:"introduced-arrow lineage-arrow-back",children:"←"}),e.jsx(We,{title:c.title})]},`predecessor-${c.id}`))})]})]}),Tt&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"section-rule",children:e.jsx("span",{children:"TL;DR · AI-generated"})}),e.jsx("div",{className:"tldr-box",children:Tt})]}),e.jsx("div",{className:"section-rule",children:e.jsx("span",{children:"Abstract"})}),e.jsx("p",{className:"abstract-text",style:{marginBottom:8},children:e.jsx(ta,{text:ur})}),Se.length>Ze&&e.jsx("div",{className:"read-full",onClick:()=>O(c=>!c),children:I?"− collapse abstract":"+ read full abstract"}),e.jsxs("div",{className:"section-rule",children:[e.jsx("span",{children:"Tasks"}),e.jsxs("span",{className:"accent",children:[((zt=r.tasks)==null?void 0:zt.length)||0," tagged",e.jsx("button",{type:"button",onClick:()=>Y("tasks"),className:"edit-link",children:"edit"})]})]}),e.jsx("div",{className:"paper-tags",style:{marginBottom:8},children:(r.tasks||[]).map(c=>e.jsx(Yr,{slug:c.slug||"",label:c.name},c.id))}),e.jsxs("div",{className:"section-rule",children:[e.jsx("span",{children:"Methods"}),e.jsxs("span",{className:"accent",children:[((Qt=r.methods)==null?void 0:Qt.length)||0," used",e.jsx("button",{type:"button",onClick:()=>Y("methods"),className:"edit-link",children:"edit"})]})]}),e.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6,marginBottom:8},children:(r.methods||[]).map(c=>e.jsx(Zr,{method:c},c.id))}),e.jsxs("div",{className:"section-rule",children:[e.jsx("span",{children:"Results"}),e.jsxs("span",{className:"accent",children:[(D==null?void 0:D.length)||0," benchmarks",e.jsx("button",{type:"button",onClick:()=>Y("results"),className:"edit-link",children:"edit"})]})]}),F?e.jsx(De,{className:"h-32 w-full"}):M.length>0?M.map(c=>e.jsxs("div",{children:[e.jsxs("div",{className:"section-rule",children:[e.jsx("span",{children:c.taskSlug?e.jsx(be,{to:`/tasks/${c.taskSlug}`,children:c.taskName}):c.taskName}),e.jsxs("span",{className:"accent",children:[c.rows.length," ",c.rows.length===1?"result":"results"]})]}),e.jsxs("table",{className:"results-table",children:[e.jsxs("colgroup",{children:[e.jsx("col",{style:{width:"28%"}}),e.jsx("col",{style:{width:"28%"}}),e.jsx("col",{style:{width:"14%"}}),e.jsx("col",{style:{width:"12%"}}),e.jsx("col",{style:{width:"8%"}}),e.jsx("col",{style:{width:"10%"}})]}),e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Benchmark"}),e.jsx("th",{children:"Model"}),e.jsx("th",{children:"Metric"}),e.jsx("th",{children:"Value"}),e.jsx("th",{children:"Rank"}),e.jsx("th",{})]})}),e.jsx("tbody",{children:c.rows.map(E=>{var J;return e.jsxs("tr",{children:[e.jsx("td",{className:"benchmark",children:E.dataset_slug?e.jsx(be,{to:`/benchmark/${E.dataset_slug}`,children:E.dataset_name||"—"}):E.dataset_name||"—"}),e.jsxs("td",{className:"model",title:E.model_name||void 0,children:[E.hf_model_url?e.jsx("a",{href:E.hf_model_url,target:"_blank",rel:"noopener noreferrer",className:"model-hf-link",title:`Open ${E.model_name||"model"} on Hugging Face`,children:E.model_name||"—"}):E.model_name||"—",E.is_open===!1&&e.jsx(ea,{})]}),e.jsx("td",{className:"metric",children:E.best_metric}),e.jsx("td",{className:"value",children:Wr((J=E.metrics)==null?void 0:J[E.best_metric||""])}),e.jsx("td",{className:"rank",children:E.best_rank!=null?`#${E.best_rank}`:"—"}),e.jsx("td",{className:"compare",children:E.dataset_slug&&e.jsx(be,{to:`/benchmark/${E.dataset_slug}?${[E.task_slug?`task=${encodeURIComponent(E.task_slug)}`:"",`eval=${encodeURIComponent(E.id)}`].filter(Boolean).join("&")}`,children:"Compare →"})})]},E.id)})})]})]},c.taskId)):e.jsx("p",{style:{fontFamily:"var(--mono)",fontSize:12,color:"var(--ink-faint)"},children:"No benchmark results recorded yet."})]}),e.jsxs("aside",{className:"detail-sidebar",children:[e.jsxs("div",{className:"sidebar-card",children:[e.jsxs("div",{className:"sidebar-card-title",children:[e.jsx("span",{children:"GitHub"}),e.jsxs("span",{className:"badge",children:[ve.length," repo",ve.length===1?"":"s",e.jsx("button",{type:"button",onClick:()=>Y("repositories"),className:"edit-link",children:"edit"})]})]}),cr.map(c=>e.jsxs("a",{href:c.url,target:"_blank",rel:"noopener noreferrer",className:"code-line",style:{textDecoration:"none"},children:[e.jsxs("span",{className:"code-line-repo",children:[e.jsx(te,{name:"github",size:12}),e.jsxs("span",{className:"code-line-repo-name",children:[c.owner,"/",c.name]}),c.is_official&&e.jsx("span",{className:"code-line-official",children:"· Official"})]}),e.jsxs("span",{className:"code-line-stars",children:["★ ",us(c.num_stars)]})]},c.id)),ve.length===0&&e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",padding:"6px 0"},children:"No GitHub repositories linked yet."}),ve.length>ht&&e.jsx("button",{type:"button",className:"bench-show-more",onClick:()=>X(c=>!c),children:G?"− show top 3":`+ show ${ve.length-ht} more repos`})]}),e.jsx(Kn,{viewer:ot}),e.jsxs("div",{className:"sidebar-card",children:[e.jsxs("div",{className:"sidebar-card-title",children:[e.jsx("span",{children:"Citation"}),e.jsxs("button",{type:"button",className:"citation-copy-btn",onClick:lr,"aria-label":"Copy citation to clipboard",title:"Copy citation to clipboard",children:[e.jsx(te,{name:"copy",size:11}),or?"Copied":"Copy"]})]}),e.jsx("pre",{style:{fontFamily:"var(--mono)",fontSize:10.5,lineHeight:1.5,color:"var(--ink-soft)",whiteSpace:"pre-wrap",wordBreak:"break-word",margin:0},children:ir})]}),(((Vt=b.data)==null?void 0:Vt.length)??0)>0&&e.jsxs("div",{className:"sidebar-card",children:[e.jsx("div",{className:"sidebar-card-title",children:"Related papers"}),b.data.map(c=>e.jsxs(be,{to:`/paper/${c.arxiv_id||c.id}`,target:"_blank",rel:"noopener noreferrer",className:"related-paper",style:{textDecoration:"none",color:"inherit"},children:[e.jsx("div",{className:"related-title",children:e.jsx(We,{title:c.title})}),e.jsxs("div",{className:"related-meta",children:[e.jsx("span",{children:c.arxiv_id?`arXiv:${c.arxiv_id}`:"External resource"}),c.citation_count!=null&&e.jsxs("span",{children:[c.citation_count.toLocaleString()," cites"]})]})]},c.id))]})]})]}),e.jsx($a,{open:v,onOpenChange:S,paperId:r.id,arxivId:s,initialTaskIds:((Gt=r.tasks)==null?void 0:Gt.map(c=>parseInt(c.id)))||[],initialTasks:r.tasks||[],submitMode:V,isAuthor:W}),e.jsx(La,{open:m,onOpenChange:x,paperId:r.id,arxivId:s,initialMethodIds:((Wt=r.methods)==null?void 0:Wt.map(c=>parseInt(c.id)))||[],initialMethods:r.methods||[],submitMode:V,isAuthor:W}),e.jsx(Da,{open:f,onOpenChange:j,paperId:r.id,arxivId:s,initialRepositories:((Xt=r.repositories)==null?void 0:Xt.map(c=>({url:c.url,is_official:c.is_official||!1})))||[],submitMode:V,isAuthor:W}),e.jsx(Ua,{open:y,onOpenChange:L,paperId:r.id,arxivId:s,initialProjectPages:((Jt=r.project_pages)==null?void 0:Jt.map(c=>({url:c.url,is_official:c.is_official||!1})))||[],submitMode:V,isAuthor:W}),e.jsx(Dn,{open:p,onOpenChange:A,paperId:r.id,arxivId:s,initialEvaluations:P||[],submitMode:V,isAuthor:W}),e.jsx(Oa,{open:q,onOpenChange:R,paperId:r.id,arxivId:s,initialUrl:r.source_url??r.url_abs??"",submitMode:V,isAuthor:W}),e.jsx(Un,{open:H!==null,onOpenChange:c=>{c||z(null)},sectionLabel:H?Hn[H]:"this paper",returnTo:typeof window<"u"?window.location.pathname:"/"})]})},Kn=({viewer:t})=>e.jsxs("div",{className:"sidebar-card",children:[e.jsx("div",{className:"sidebar-card-title",children:t.paperHref?e.jsx("a",{href:t.paperHref,target:"_blank",rel:"noopener noreferrer",style:{color:"inherit",textDecoration:"none"},children:"🤗 Hugging Face"}):e.jsx("span",{children:"🤗 Hugging Face"})}),t.isLoading?e.jsx(De,{className:"h-16 w-full"}):e.jsxs(e.Fragment,{children:[t.rows.map(s=>e.jsx(zn,{...s},s.label)),t.footer&&e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:10,color:"var(--ink-faint)",marginTop:12},children:t.footer})]})]}),zn=({label:t,href:s,count:a,isLimited:d,links:n})=>{const l=((n==null?void 0:n.length)??0)>0,o=e.jsxs("div",{className:"hf-artifact-row-header",children:[e.jsx("span",{children:t}),e.jsx("span",{style:{fontWeight:600,color:a?"var(--ink)":"var(--ink-faint)"},children:a!=null?`${a}${d?"+":""}`:"—"})]});return l?e.jsxs("div",{className:"hf-artifact-row",children:[o,e.jsx("div",{className:"hf-artifact-links",children:n.map(u=>e.jsx("a",{href:u.href,target:"_blank",rel:"noopener noreferrer",children:u.label},u.href))})]}):e.jsx("a",{href:s,target:"_blank",rel:"noopener noreferrer",className:"hf-artifact-row",children:o})};function ft(t){return t[0]??"https://huggingface.co"}export{ui as default};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/{PapersListView-BI6t4bhS.js → PapersListView-BrLhcE2X.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{u as I,r as i,j as e,L as F,a as L}from"./index-
|
|
|
|
| 1 |
+
import{u as I,r as i,j as e,L as F,a as L}from"./index-CNvFYqmB.js";import{I as T,P as C}from"./components-CCZN6YfS.js";import{t as R,d as k}from"./transform-Cbu7h9fT.js";import{u as D}from"./usePapers-CldwRRal.js";import{u as E}from"./useDebounce-CXMdQN8X.js";import{u as O,P as B}from"./usePeriodFilter-C6uXOQPx.js";import{u as $}from"./useIntersectionObserver-jmbd50BD.js";import{S as c}from"./skeleton-C9NKUBNg.js";import{A as z,a as M}from"./alert-YjpxGuB-.js";import{u as q}from"./useQuery-B6TeiMq1.js";import"./LatexTitle-ZG9klHzz.js";import"./katex.min-BSBacQyE.js";import"./useInfiniteQuery-Vi6JDeF_.js";const K=[["trending","trending"],["new","newest"],["cited","most cited"]],te=()=>{var x,g,j,f,N;const[d,v]=I(),o=d.get("search")||"",[p,b]=i.useState(o),t=E(p,300);i.useEffect(()=>{if(t===o)return;const s=new URLSearchParams(d);t?s.set("search",t):s.delete("search"),v(s,{replace:!0})},[t]);const[n,P]=i.useState("new"),{period:y,setPeriod:S,publishedAfter:w}=O("All Time"),a=D({page_size:20,order_by:n==="trending"?"trending":n==="cited"?"citation_count":"date_published",order_dir:"desc",search:t||void 0,published_after:w,include_resources:!0}),m=q({queryKey:["top-tasks-sidebar"],queryFn:()=>L.getTasks({ordering:"-paper_count",page_size:8}),staleTime:10*60*1e3}),l=i.useMemo(()=>{var r;return(((r=a.data)==null?void 0:r.pages.flatMap(A=>A.results))||[]).map(R)},[a.data]),{targetRef:_,isIntersecting:h}=$({rootMargin:"200px"});i.useEffect(()=>{h&&a.hasNextPage&&!a.isFetchingNextPage&&a.fetchNextPage()},[h,a.hasNextPage,a.isFetchingNextPage]);const u=((j=(g=(x=a.data)==null?void 0:x.pages)==null?void 0:g[0])==null?void 0:j.count)??0;return e.jsxs("div",{className:"page",children:[e.jsxs("div",{className:"feed-header",children:[e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["All ",e.jsx("em",{children:"Papers"})]}),e.jsxs("div",{className:"feed-subtitle",children:["Search the full corpus. ",u>0&&`${u.toLocaleString()} papers indexed.`]})]}),e.jsx("div",{className:"period-switch",children:B.map(s=>e.jsx("button",{className:`period-btn ${y===s?"active":""}`,onClick:()=>S(s),children:s},s))})]}),e.jsx("div",{className:"papers-search-row",children:e.jsxs("div",{className:"papers-search-input-wrap",children:[e.jsx(T,{name:"search",size:14}),e.jsx("input",{className:"papers-search-input",placeholder:"Search title or abstract…",value:p,onChange:s=>b(s.target.value)})]})}),e.jsxs("div",{className:"layout-with-sidebar",children:[e.jsx("aside",{className:"sidebar",children:e.jsxs("div",{className:"sidebar-section",children:[e.jsx("div",{className:"sidebar-label",children:"Top Domains"}),m.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((s,r)=>e.jsx(c,{className:"h-5 w-full"},r))}),(N=(f=m.data)==null?void 0:f.results)==null?void 0:N.map(s=>e.jsxs(F,{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.jsx("div",{className:"sort-options",children:K.map(([s,r])=>e.jsx("button",{className:`sort-btn ${n===s?"active":""}`,onClick:()=>P(s),children:r},s))}),e.jsxs("div",{className:"results-count",children:[l.length," loaded"]})]}),a.error&&e.jsx(z,{variant:"destructive",className:"mb-4",children:e.jsx(M,{children:"Failed to load papers. Please try again."})}),a.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:6}).map((s,r)=>e.jsxs("div",{className:"paper-card",children:[e.jsx(c,{className:"h-[220px] w-[160px]"}),e.jsxs("div",{className:"paper-body",style:{flex:1,gap:12},children:[e.jsx(c,{className:"h-6 w-3/4"}),e.jsx(c,{className:"h-4 w-1/2"}),e.jsx(c,{className:"h-12 w-full"})]})]},r))}):l.length===0?e.jsx("div",{className:"no-results",children:"No matching papers."}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:l.map((s,r)=>e.jsx(C,{paper:s,rank:r+1},s.id))}),e.jsx("div",{ref:_,style:{height:1}}),a.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]})]})]})};export{te as default};
|
assets/{SavedPapersView-yNtcliWs.js → SavedPapersView-TcAeTRzI.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{V as o,j as s,U as m,L as p,a as h}from"./index-
|
|
|
|
| 1 |
+
import{V as o,j as s,U as m,L as p,a as h}from"./index-CNvFYqmB.js";import{u as x}from"./useQuery-B6TeiMq1.js";import{T as u,P as j}from"./components-CCZN6YfS.js";import{S as r}from"./skeleton-C9NKUBNg.js";import{A as v,a as N}from"./alert-YjpxGuB-.js";import{t as g}from"./transform-Cbu7h9fT.js";import"./LatexTitle-ZG9klHzz.js";import"./katex.min-BSBacQyE.js";const L=()=>{var l;const{user:d,isLoading:c}=o(),a=x({queryKey:["my-bookmarks"],queryFn:()=>h.getMyBookmarks(),enabled:!!d,staleTime:30*1e3,refetchOnWindowFocus:!1});return c?s.jsxs("div",{className:"page",children:[s.jsx(r,{className:"h-10 w-1/3 mb-4"}),s.jsx(r,{className:"h-6 w-1/2 mb-8"})]}):d?s.jsxs("div",{className:"page",children:[s.jsx("div",{className:"feed-header",children:s.jsxs("div",{children:[s.jsxs("h1",{className:"feed-title",children:["Saved ",s.jsx("em",{children:"Papers"})]}),s.jsx("div",{className:"feed-subtitle",children:(l=a.data)!=null&&l.count?`${a.data.count.toLocaleString()} saved · grouped by domain`:"Your bookmarked papers, grouped by domain."})]})}),a.error&&s.jsx(v,{variant:"destructive",className:"mb-4",children:s.jsx(N,{children:"Failed to load your saved papers. Please try again."})}),a.isLoading?s.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((i,e)=>s.jsxs("div",{className:"paper-card",children:[s.jsx(r,{className:"h-[220px] w-[160px]"}),s.jsxs("div",{className:"paper-body",style:{flex:1,gap:12},children:[s.jsx(r,{className:"h-6 w-3/4"}),s.jsx(r,{className:"h-4 w-1/2"}),s.jsx(r,{className:"h-12 w-full"})]})]},e))}):!a.data||a.data.count===0?s.jsxs("div",{className:"no-results",children:["No saved papers yet."," ",s.jsx(p,{to:"/papers",className:"sidebar-link",style:{display:"inline"},children:"Browse papers →"})]}):a.data.areas.map(i=>s.jsxs("section",{className:"saved-area-section",children:[s.jsx("h2",{className:"saved-area-heading",children:i.name}),i.tasks.map(e=>{const n=e.papers.length;return s.jsxs("div",{className:"saved-task-block",children:[s.jsxs("div",{className:"saved-task-row",children:[e.slug?s.jsx(u,{slug:e.slug,label:e.name}):s.jsx("span",{className:"tag-chip",style:{background:"var(--surface)"},children:e.name}),s.jsxs("span",{className:"saved-task-count",children:[n," ",n===1?"paper":"papers"]})]}),s.jsx("div",{className:"paper-list",children:e.papers.map(t=>s.jsx(j,{paper:g(t),rank:1},t.id))})]},`task-${i.id??"other"}-${e.id??"untagged"}`)})]},`area-${i.id??"other"}`))]}):s.jsxs("div",{className:"page",children:[s.jsx("div",{className:"feed-header",children:s.jsxs("div",{children:[s.jsxs("h1",{className:"feed-title",children:["Saved ",s.jsx("em",{children:"Papers"})]}),s.jsx("div",{className:"feed-subtitle",children:"Sign in with Hugging Face to save papers and revisit them later."})]})}),s.jsx("div",{className:"saved-signin-panel",children:s.jsx(m,{returnTo:"/saved"})})]})};export{L as default};
|
assets/{SearchOverlay-Cof7H5n7.js → SearchOverlay-CCtrp8A2.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{r as f,a0 as w,W as E,j as s,a as d}from"./index-
|
|
|
|
| 1 |
+
import{r as f,a0 as w,W as E,j as s,a as d}from"./index-CNvFYqmB.js";import{u}from"./useQuery-B6TeiMq1.js";import{L as Q}from"./LatexTitle-ZG9klHzz.js";import{u as C}from"./useDebounce-CXMdQN8X.js";import{e as L,h as R,d as K}from"./transform-Cbu7h9fT.js";import"./katex.min-BSBacQyE.js";const D=({open:t,onClose:r})=>{var y,N,k;const p=f.useRef(null),b=w(),[m,F]=E.useState(""),a=C(m,200);f.useEffect(()=>{var n;if(!t)return;(n=p.current)==null||n.focus();const e=T=>{T.key==="Escape"&&r()};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[t,r]);const g=u({queryKey:["search-papers",a],queryFn:()=>d.searchPapers(a,6),enabled:t&&a.length>=2,staleTime:6e4}),x=u({queryKey:["search-tasks",a],queryFn:()=>d.getTasks({q:a,page_size:6}),enabled:t&&a.length>=2,staleTime:6e4}),j=u({queryKey:["search-methods",a],queryFn:()=>d.getMethods({q:a,page_size:6}),enabled:t&&a.length>=2,staleTime:6e4}),v=u({queryKey:["search-benchmarks",a],queryFn:()=>d.getDatasets({q:a,page_size:6,ordering:"-paper_count"}),enabled:t&&a.length>=2,staleTime:6e4});if(!t)return null;const c=((y=x.data)==null?void 0:y.results)||[],l=((N=j.data)==null?void 0:N.results)||[],i=((k=v.data)==null?void 0:k.results)||[],h=g.data||[],_=g.isFetching||x.isFetching||j.isFetching||v.isFetching,q=c.length||h.length||l.length||i.length,o=e=>{r(),b(e)};return s.jsx("div",{className:"search-overlay",onClick:r,children:s.jsxs("div",{className:"search-modal",onClick:e=>e.stopPropagation(),children:[s.jsx("input",{ref:p,className:"search-modal-input",placeholder:"Search papers, tasks, methods, or benchmarks…",value:m,onChange:e=>F(e.target.value)}),s.jsxs("div",{className:"search-results",children:[!a&&s.jsx("div",{className:"search-empty",children:"Try “diffusion”, “object detection”, or an arXiv id."}),a&&!_&&!q&&s.jsxs("div",{className:"search-empty",children:['No matches for "',m,'"']}),c.length>0&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"search-section-label",children:["Tasks · ",c.length]}),c.map(e=>{const n=L(R(e.slug||""));return s.jsxs("div",{className:"search-result-tag",onClick:()=>o(`/tasks/${e.slug}`),children:[s.jsx("span",{className:"dot",style:{width:6,height:6,borderRadius:"50%",background:n.dot}}),s.jsx("span",{className:"name",children:K(e.name,e.slug)}),e.paper_count!=null&&s.jsxs("span",{className:"count",children:[e.paper_count," papers"]})]},e.id)})]}),l.length>0&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"search-section-label",children:["Methods · ",l.length]}),l.map(e=>s.jsxs("div",{className:"search-result-tag",onClick:()=>o(`/methods/${e.slug||e.id}`),children:[s.jsx("span",{style:{fontFamily:"var(--mono)",fontWeight:600},children:e.name}),e.paper_count!=null&&s.jsxs("span",{className:"count",children:[e.paper_count," papers"]})]},e.id))]}),i.length>0&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"search-section-label",children:["Benchmarks · ",i.length]}),i.map(e=>s.jsxs("div",{className:"search-result-tag",onClick:()=>o(`/benchmark/${e.slug||e.id}`),children:[s.jsx("span",{className:"name",children:e.name}),e.paper_count!=null&&e.paper_count>0&&s.jsxs("span",{className:"count",children:[e.paper_count," entries"]})]},e.id))]}),h.length>0&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"search-section-label",children:["Papers · ",h.length]}),h.map(e=>{var n;return s.jsxs("div",{className:"search-result",onClick:()=>o(`/paper/${e.arxiv_id||e.id}`),children:[s.jsx("div",{className:"search-result-title",children:s.jsx(Q,{title:e.title})}),s.jsxs("div",{className:"search-result-meta",children:[s.jsx("span",{children:e.arxiv_id?`arXiv:${e.arxiv_id}`:"External resource"}),((n=e.authors)==null?void 0:n[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)})]})]})]})})};export{D as default};
|
assets/{SettingsView-PAe0SGo2.js → SettingsView-CiMezArS.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{V as r,a1 as o,W as c,j as e,U as l}from"./index-
|
|
|
|
| 1 |
+
import{V as r,a1 as o,W as c,j as e,U as l}from"./index-CNvFYqmB.js";import{S as d}from"./switch-j6Z98JHW.js";import{f as h,D as m}from"./latexPlainText-ChVkH0gY.js";import"./index-sNVSU2vm.js";const j=()=>{const{user:s}=r(),{preferences:t,setHideClosedSourceEvals:a,canPersist:i}=o();return c.useEffect(()=>(document.title=h("Settings"),()=>{document.title=m}),[]),e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsx("h1",{className:"feed-title",children:e.jsx("em",{children:"Settings"})}),e.jsx("div",{className:"feed-subtitle",children:"Control how papers and benchmarks are displayed across the site."})]})}),e.jsxs("section",{className:"settings-section",children:[e.jsx("h2",{className:"settings-section-title",children:"Evaluations"}),e.jsxs("div",{className:"settings-row",children:[e.jsxs("label",{className:"settings-row-text",htmlFor:"hide-closed-source-evals",children:[e.jsx("span",{className:"settings-row-label",children:"Hide closed-source models"}),e.jsx("span",{className:"settings-row-desc",children:"When enabled, evaluations of closed-source models (proprietary APIs and unreleased flagship models) are hidden from benchmark leaderboards and paper result tables."})]}),e.jsx(d,{id:"hide-closed-source-evals",checked:t.hide_closed_source_evals,onCheckedChange:n=>{a(!!n)}})]}),!i&&!s&&e.jsxs("div",{className:"settings-note",children:[e.jsx("span",{children:"You are browsing as a guest, so this choice only applies to the current session. Sign in to save it to your account."}),e.jsx("div",{className:"settings-note-action",children:e.jsx(l,{returnTo:"/settings"})})]})]})]})};export{j as default};
|
assets/{SubmissionsDashboard-DZpno1Ux.js → SubmissionsDashboard-CUgo38w4.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
var he=s=>{throw TypeError(s)};var W=(s,t,i)=>t.has(s)||he("Cannot "+i);var f=(s,t,i)=>(W(s,t,"read from private field"),i?i.call(s):t.get(s)),w=(s,t,i)=>t.has(s)?he("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(s):t.set(s,i),N=(s,t,i,n)=>(W(s,t,"write to private field"),n?n.call(s,i):t.set(s,i),i),E=(s,t,i)=>(W(s,t,"access private method"),i);import{aj as Me,ak as Z,al as Oe,am as Qe,o as ke,r as P,an as qe,c as Se,j as e,ao as we,ap as Fe,W as y,k as O,aq as Ie,V as Le,n as Ee,ar as Ue,as as De,at as Pe,au as Te,av as $e,aw as Be,ax as ee}from"./index-
|
| 2 |
* @license lucide-react v0.462.0 - ISC
|
| 3 |
*
|
| 4 |
* This source code is licensed under the ISC license.
|
|
|
|
| 1 |
+
var he=s=>{throw TypeError(s)};var W=(s,t,i)=>t.has(s)||he("Cannot "+i);var f=(s,t,i)=>(W(s,t,"read from private field"),i?i.call(s):t.get(s)),w=(s,t,i)=>t.has(s)?he("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(s):t.set(s,i),N=(s,t,i,n)=>(W(s,t,"write to private field"),n?n.call(s,i):t.set(s,i),i),E=(s,t,i)=>(W(s,t,"access private method"),i);import{aj as Me,ak as Z,al as Oe,am as Qe,o as ke,r as P,an as qe,c as Se,j as e,ao as we,ap as Fe,W as y,k as O,aq as Ie,V as Le,n as Ee,ar as Ue,as as De,at as Pe,au as Te,av as $e,aw as Be,ax as ee}from"./index-CNvFYqmB.js";import{Q as Ce,b as ze,c as He,e as Ke,d as Je,f as Ve,s as fe,g as Ye,h as Ge,u as pe}from"./useQuery-B6TeiMq1.js";import{u as be}from"./useMutation-Bcfahw68.js";import{R as We,C as Xe,a as Ze}from"./refresh-cw-BeDQ2XgS.js";import{L as T}from"./loader-circle-DWcwv_K5.js";function ge(s,t){const i=new Set(t);return s.filter(n=>!i.has(n))}function es(s,t,i){const n=s.slice(0);return n[t]=i,n}var L,_,U,I,k,M,$,B,z,H,v,se,te,Re,ie,ne,re,_e,ss=(_e=class extends Me{constructor(t,i,n){super();w(this,v);w(this,L);w(this,_);w(this,U);w(this,I);w(this,k);w(this,M);w(this,$);w(this,B);w(this,z);w(this,H,[]);N(this,L,t),N(this,I,n),N(this,U,[]),N(this,k,[]),N(this,_,[]),this.setQueries(i)}onSubscribe(){this.listeners.size===1&&f(this,k).forEach(t=>{t.subscribe(i=>{E(this,v,ne).call(this,t,i)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,f(this,k).forEach(t=>{t.destroy()})}setQueries(t,i){N(this,U,t),N(this,I,i),Z.batch(()=>{const n=f(this,k),r=E(this,v,ie).call(this,f(this,U));r.forEach(a=>a.observer.setOptions(a.defaultedQueryOptions));const o=r.map(a=>a.observer),l=o.map(a=>a.getCurrentResult()),u=n.length!==o.length,h=o.some((a,c)=>a!==n[c]),j=u||h,x=j?!0:l.some((a,c)=>{const d=f(this,_)[c];return!d||!Oe(a,d)});!j&&!x||(j&&(N(this,H,r),N(this,k,o)),N(this,_,l),this.hasListeners()&&(j&&(ge(n,o).forEach(a=>{a.destroy()}),ge(o,n).forEach(a=>{a.subscribe(c=>{E(this,v,ne).call(this,a,c)})})),E(this,v,re).call(this)))})}getCurrentResult(){return f(this,_)}getQueries(){return f(this,k).map(t=>t.getCurrentQuery())}getObservers(){return f(this,k)}getOptimisticResult(t,i){const n=E(this,v,ie).call(this,t),r=n.map(l=>l.observer.getOptimisticResult(l.defaultedQueryOptions)),o=n.map(l=>l.defaultedQueryOptions.queryHash);return[r,l=>E(this,v,te).call(this,l??r,i,o),()=>E(this,v,se).call(this,r,n)]}},L=new WeakMap,_=new WeakMap,U=new WeakMap,I=new WeakMap,k=new WeakMap,M=new WeakMap,$=new WeakMap,B=new WeakMap,z=new WeakMap,H=new WeakMap,v=new WeakSet,se=function(t,i){return i.map((n,r)=>{const o=t[r];return n.defaultedQueryOptions.notifyOnChangeProps?o:n.observer.trackResult(o,l=>{i.forEach(u=>{u.observer.trackProp(l)})})})},te=function(t,i,n){if(i){const r=f(this,z),o=n!==void 0&&r!==void 0&&(r.length!==n.length||n.some((l,u)=>l!==r[u]));return(!f(this,M)||f(this,_)!==f(this,B)||o||i!==f(this,$))&&(N(this,$,i),N(this,B,f(this,_)),n!==void 0&&N(this,z,n),N(this,M,Qe(f(this,M),i(t)))),f(this,M)}return t},Re=function(){var t;return((t=f(this,I))==null?void 0:t.combine)!==void 0&&f(this,k).some((i,n)=>{var r;return i.options.suspense&&((r=f(this,_)[n])==null?void 0:r.data)===void 0})},ie=function(t){const i=new Map;f(this,k).forEach(r=>{const o=r.options.queryHash;if(!o)return;const l=i.get(o);l?l.push(r):i.set(o,[r])});const n=[];return t.forEach(r=>{var h;const o=f(this,L).defaultQueryOptions(r),u=((h=i.get(o.queryHash))==null?void 0:h.shift())??new Ce(f(this,L),o);n.push({defaultedQueryOptions:o,observer:u})}),n},ne=function(t,i){const n=f(this,k).indexOf(t);n!==-1&&(N(this,_,es(f(this,_),n,i)),E(this,v,re).call(this))},re=function(){var t;if(this.hasListeners()){const i=E(this,v,se).call(this,f(this,_),f(this,H)),n=E(this,v,Re).call(this),r=f(this,M),o=n?r:E(this,v,te).call(this,i,(t=f(this,I))==null?void 0:t.combine);(n||r!==o)&&Z.batch(()=>{this.listeners.forEach(l=>{l(f(this,_))})})}},_e);function Y({queries:s,...t},i){const n=ke(),r=ze(),o=He(),l=P.useMemo(()=>s.map(m=>{const p=n.defaultQueryOptions(m);return p._optimisticResults=r?"isRestoring":"optimistic",p}),[s,n,r]);l.forEach(m=>{Ke(m);const p=n.getQueryCache().get(m.queryHash);Je(m,o,p)}),Ve(o);const[u]=P.useState(()=>new ss(n,l,t)),[h,j,x]=u.getOptimisticResult(l,t.combine),a=!r&&t.subscribed!==!1;P.useSyncExternalStore(P.useCallback(m=>a?u.subscribe(Z.batchCalls(m)):qe,[u,a]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),P.useEffect(()=>{u.setQueries(l,t)},[l,t,u]);const d=h.some((m,p)=>fe(l[p],m))?h.flatMap((m,p)=>{const S=l[p];if(S&&fe(S,m)){const q=new Ce(n,S);return Ye(S,q,o)}return[]}):[];if(d.length>0)throw Promise.all(d);const g=h.find((m,p)=>{const S=l[p];return S&&Ge({result:m,errorResetBoundary:o,throwOnError:S.throwOnError,query:n.getQueryCache().get(S.queryHash),suspense:S.suspense})});if(g!=null&&g.error)throw g.error;return j(x())}/**
|
| 2 |
* @license lucide-react v0.462.0 - ISC
|
| 3 |
*
|
| 4 |
* This source code is licensed under the ISC license.
|
assets/{SubmitView-UOEKZj2M.js → SubmitView-U9tCiVBg.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{a0 as R,o as T,n as D,W as n,j as e,af as k}from"./index-
|
|
|
|
| 1 |
+
import{a0 as R,o as T,n as D,W as n,j as e,af as k}from"./index-CNvFYqmB.js";import{u as _}from"./useMutation-Bcfahw68.js";import{A as C,a as w}from"./alert-YjpxGuB-.js";import{I as m,B as v}from"./input-DO8YPeri.js";import{T as z}from"./textarea-7bEOXz2p.js";const E=/^\d{4}\.\d{4,5}(v\d+)?$/i,F=/^[a-z-]+(\.[A-Z]{2})?\/\d{7}$/,X=/^https?:\/\/(?:www\.)?arxiv\.org\//i;function j(r){const t=r.trim();return t?E.test(t)||F.test(t)||X.test(t)?"arxiv":/^https?:\/\//i.test(t)?"external":"arxiv":"empty"}function L(r,t){const i=r.trim();if(j(i)==="arxiv")return/^https?:\/\//i.test(i)?{source_url:i}:{arxiv_id:i};const s={source_url:i},l=t.title.trim();l&&(s.title=l);const u=t.abstract.trim();u&&(s.abstract=u);const o=t.authors.split(/[,\n]/).map(h=>h.trim()).filter(Boolean);return o.length>0&&(s.authors=o),t.datePublished&&(s.date_published=t.datePublished),s}function q(r){const t=r;if(!t)return"Submission failed";if(t.response)try{const i=JSON.parse(t.response);if(typeof i.detail=="string")return i.detail}catch{return t.response}return t.message||"Submission failed"}const V=()=>{const r=R(),t=T(),{toast:i}=D(),[d,s]=n.useState(""),[l,u]=n.useState(""),[o,h]=n.useState(""),[g,S]=n.useState(""),[f,I]=n.useState(""),[y,x]=n.useState(null),p=j(d),b=p==="external",c=_({mutationFn:a=>k(a),onSuccess:a=>{t.invalidateQueries({queryKey:["papers"],refetchType:"none"}),t.invalidateQueries({queryKey:["papers-infinite"],refetchType:"none"}),t.invalidateQueries({queryKey:["trending-papers"],refetchType:"none"}),i({title:a.created?"Paper submitted":"Paper already indexed",description:a.created?"Opening the paper page…":"Opening the existing paper page…"}),r(`/paper/${a.route_identifier}`)},onError:a=>{x(q(a))}}),A=a=>{if(a.preventDefault(),x(null),p==="empty"){x("Enter an arXiv ID or a paper URL to submit.");return}const P=L(d,{title:l,abstract:o,authors:g,datePublished:f});c.mutate(P)};return e.jsxs("div",{className:"page",style:{maxWidth:720},children:[e.jsx("h1",{className:"detail-title",children:"Submit a paper"}),e.jsx("p",{style:{fontFamily:"var(--serif)",color:"var(--ink-soft)",marginTop:12,lineHeight:1.55},children:"Index an arXiv paper or add a non-arXiv paper (blog post, technical report, model release page). Submissions are public and appear in the feed immediately."}),e.jsxs("form",{onSubmit:A,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(m,{id:"submit-input",value:d,onChange:a=>s(a.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:p==="arxiv"?"Detected: arXiv paper — metadata will be fetched automatically.":p==="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."})]}),b&&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(m,{id:"submit-title",value:l,onChange:a=>u(a.target.value),placeholder:"Leave blank to extract automatically"})]}),e.jsxs("div",{style:{display:"grid",gap:8},children:[e.jsx("label",{htmlFor:"submit-abstract",style:{fontSize:13},children:"Abstract or summary"}),e.jsx(z,{id:"submit-abstract",value:o,onChange:a=>h(a.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(m,{id:"submit-authors",value:g,onChange:a=>S(a.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(m,{id:"submit-date",type:"date",value:f,onChange:a=>I(a.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."})]})]}),y&&e.jsx(C,{variant:"destructive",children:e.jsx(w,{children:y})}),e.jsxs("div",{style:{display:"flex",gap:12,alignItems:"center"},children:[e.jsx(v,{type:"submit",disabled:c.isPending,children:c.isPending?b?"Fetching & indexing…":"Indexing…":"Submit paper"}),e.jsx(v,{type:"button",variant:"outline",onClick:()=>r(-1),disabled:c.isPending,children:"Cancel"})]})]})]})};export{V as default};
|
assets/{TagBrowseView-BnR1Teo9.js → TagBrowseView-BbTXrEUT.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
import{c as A,_ as W,a0 as Z,u as G,r as m,j as s,L as p,W as J,a6 as X,a as Y}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{c as A,_ as W,a0 as Z,u as G,r as m,j as s,L as p,W as J,a6 as X,a as Y}f
|
|
| 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 ls=A("Trophy",[["path",{d:"M6 9H4.5a2.5 2.5 0 0 1 0-5H6",key:"17hqa7"}],["path",{d:"M18 9h1.5a2.5 2.5 0 0 0 0-5H18",key:"lmptdp"}],["path",{d:"M4 22h16",key:"57wxv0"}],["path",{d:"M10 14.66V17c0 .55-.47.98-.97 1.21C7.85 18.75 7 20.24 7 22",key:"1nw9bq"}],["path",{d:"M14 14.66V17c0 .55.47.98.97 1.21C16.15 18.75 17 20.24 17 22",key:"1np0yb"}],["path",{d:"M18 2H6v7a6 6 0 0 0 12 0V2Z",key:"u46fv3"}]]),ds=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],os=c=>c==="trending"||c==="date_published"||c==="citation_count"?c:"trending",S=3,ms=c=>[...c].sort((u,x)=>{const g=u.slug==="classic-language-modeling",j=x.slug==="classic-language-modeling";return g!==j?g?1:-1:0}),ys=()=>{var C,B,F,$;const{taskSlug:c}=W(),u=Z(),[x,g]=G(),j=os(x.get("order_by")),I=e=>{const a=new URLSearchParams(x);a.set("order_by",e),g(a)},[_,z]=m.useState(!1),[H,O]=m.useState(()=>new Set),E=(e,a)=>{const n=e||"";return a?`/benchmark/${n}?task=${encodeURIComponent(a)}`:`/benchmark/${n}`},r=ss({queryKey:["task-page",c],queryFn:()=>Y.getTaskPage(c),enabled:!!c,staleTime:10*60*1e3}),v=m.useMemo(()=>{var e;return ms(((e=r.data)==null?void 0:e.children)||[])},[r.data]),f=m.useMemo(()=>{var a;const e=new Map;return(((a=r.data)==null?void 0:a.subtask_benchmarks)||[]).forEach(n=>{e.set(n.subtask_id,n.benchmarks||[])}),e},[r.data]),i=ts({taskId:((B=(C=r.data)==null?void 0:C.task)==null?void 0:B.id)||"",page_size:
|
|
|
|
| 1 |
+
import{c as A,_ as W,a0 as Z,u as G,r as m,j as s,L as p,W as J,a6 as X,a as Y}from"./index-CNvFYqmB.js";import{u as ss}from"./useQuery-B6TeiMq1.js";import{P as es,M as as}from"./components-CCZN6YfS.js";import{M as L}from"./MarkdownText-m_1zRXOr.js";import{t as ns,d as k}from"./transform-Cbu7h9fT.js";import{b as ts}from"./usePapers-CldwRRal.js";import{u as rs}from"./useIntersectionObserver-jmbd50BD.js";import{S as N}from"./skeleton-C9NKUBNg.js";import{A as cs,a as is}from"./alert-YjpxGuB-.js";import"./LatexTitle-ZG9klHzz.js";import"./katex.min-BSBacQyE.js";import"./useInfiniteQuery-Vi6JDeF_.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 ls=A("Trophy",[["path",{d:"M6 9H4.5a2.5 2.5 0 0 1 0-5H6",key:"17hqa7"}],["path",{d:"M18 9h1.5a2.5 2.5 0 0 0 0-5H18",key:"lmptdp"}],["path",{d:"M4 22h16",key:"57wxv0"}],["path",{d:"M10 14.66V17c0 .55-.47.98-.97 1.21C7.85 18.75 7 20.24 7 22",key:"1nw9bq"}],["path",{d:"M14 14.66V17c0 .55.47.98.97 1.21C16.15 18.75 17 20.24 17 22",key:"1np0yb"}],["path",{d:"M18 2H6v7a6 6 0 0 0 12 0V2Z",key:"u46fv3"}]]),ds=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],os=c=>c==="trending"||c==="date_published"||c==="citation_count"?c:"trending",S=3,ms=c=>[...c].sort((u,x)=>{const g=u.slug==="classic-language-modeling",j=x.slug==="classic-language-modeling";return g!==j?g?1:-1:0}),ys=()=>{var C,B,F,$;const{taskSlug:c}=W(),u=Z(),[x,g]=G(),j=os(x.get("order_by")),I=e=>{const a=new URLSearchParams(x);a.set("order_by",e),g(a)},[_,z]=m.useState(!1),[H,O]=m.useState(()=>new Set),E=(e,a)=>{const n=e||"";return a?`/benchmark/${n}?task=${encodeURIComponent(a)}`:`/benchmark/${n}`},r=ss({queryKey:["task-page",c],queryFn:()=>Y.getTaskPage(c),enabled:!!c,staleTime:10*60*1e3}),v=m.useMemo(()=>{var e;return ms(((e=r.data)==null?void 0:e.children)||[])},[r.data]),f=m.useMemo(()=>{var a;const e=new Map;return(((a=r.data)==null?void 0:a.subtask_benchmarks)||[]).forEach(n=>{e.set(n.subtask_id,n.benchmarks||[])}),e},[r.data]),i=ts({taskId:((B=(C=r.data)==null?void 0:C.task)==null?void 0:B.id)||"",page_size:20,order_by:j,order_dir:"desc",include_resources:!0,enabled:!!(($=(F=r.data)==null?void 0:F.task)!=null&&$.id)}),w=m.useMemo(()=>{var a;return(((a=i.data)==null?void 0:a.pages.flatMap(n=>n.results))||[]).map(ns)},[i.data]),y=m.useMemo(()=>{var a;const e={};return(a=i.data)==null||a.pages.forEach(n=>n.results.forEach(h=>(h.methods||[]).forEach(d=>{const l=d.slug||d.id;e[l]||(e[l]={id:d.id,name:d.name,slug:d.slug||"",count:0}),e[l].count++}))),Object.values(e).sort((n,h)=>h.count-n.count).slice(0,8)},[i.data]),{targetRef:V,isIntersecting:P}=rs({rootMargin:"200px"});if(m.useEffect(()=>{P&&i.hasNextPage&&!i.isFetchingNextPage&&i.fetchNextPage()},[P,i.hasNextPage,i.isFetchingNextPage]),r.isLoading)return s.jsxs("div",{className:"page",children:[s.jsx(N,{className:"h-12 w-1/2 mb-4"}),s.jsx(N,{className:"h-6 w-1/3 mb-8"}),s.jsx(N,{className:"h-64 w-full"})]});if(r.error||!r.data)return s.jsx("div",{className:"page",children:s.jsx(cs,{variant:"destructive",children:s.jsx(is,{children:"Task not found."})})});const t=r.data.task,D=r.data.parents||[],b=k(t.name,t.slug),M=(r.data.sisters||[]).filter(e=>e.id!==t.id),o=r.data.benchmarks||[],U=v.some(e=>(f.get(e.id)||[]).length>0),T=o.length>0,q=(()=>{const e=new Set;return o.forEach(a=>e.add(a.id)),f.forEach(a=>a.forEach(n=>e.add(n.id))),e.size})(),K=e=>{O(a=>{const n=new Set(a);return n.has(e)?n.delete(e):n.add(e),n})};return s.jsxs("div",{className:"page",children:[s.jsxs("div",{className:"breadcrumb",children:[s.jsx(p,{to:"/",children:"Papers"}),s.jsx("span",{className:"sep",children:"/"}),s.jsx(p,{to:"/tasks",children:"Tasks"}),[...D].reverse().map(e=>s.jsxs(J.Fragment,{children:[s.jsx("span",{className:"sep",children:"/"}),s.jsx(p,{to:`/tasks/${e.slug||e.id}`,children:k(e.name,e.slug)})]},e.id)),s.jsx("span",{className:"sep",children:"/"}),s.jsx("span",{style:{color:"var(--accent-text)"},children:t.name.toUpperCase()})]}),s.jsxs("div",{className:t.image_url?"task-hero-grid":void 0,children:[s.jsxs("div",{children:[s.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",letterSpacing:"0.1em",marginBottom:8},children:"TASK"}),s.jsx("h1",{className:"domain-mega-title",children:b}),t.description&&s.jsx(L,{className:"task-explainer",text:t.description}),s.jsxs("div",{className:"task-quickstats",children:[s.jsxs("span",{children:[s.jsx("span",{className:"num",children:(t.paper_count??0).toLocaleString()}),"PAPERS"]}),s.jsxs("span",{children:[s.jsx("span",{className:"num",children:q}),"BENCHMARKS"]}),s.jsxs("span",{children:[s.jsxs("span",{className:"num",children:[y.length,"+"]}),"METHODS USED"]})]})]}),t.image_url&&s.jsxs("figure",{className:`task-figure-card${t.slug==="omni-models"?" task-figure-card--compact":""}`,children:[s.jsx("div",{className:"task-figure-img-wrap",children:s.jsx("img",{className:"task-figure-img",src:X(t.image_url)??void 0,alt:`${b} schematic`,onError:e=>{var a,n;(n=(a=e.currentTarget.parentElement)==null?void 0:a.parentElement)==null||n.style.setProperty("display","none")}})}),s.jsxs("figcaption",{children:["Figure · ",b,t.image_credit&&s.jsxs(s.Fragment,{children:[s.jsx("br",{}),s.jsx(L,{className:"task-image-credit",text:t.image_credit})]})]})]})]}),s.jsxs("div",{className:"task-page-grid",style:{marginTop:28},children:[s.jsxs("div",{children:[T&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"task-section-head",children:[s.jsx("div",{className:"task-section-eyebrow",children:"Leaderboards · click any"}),s.jsxs("div",{className:"task-section-title",children:["Benchmarks ",s.jsxs("span",{className:"meta",children:["[",o.length,"]"]})]})]}),(_?o:o.slice(0,5)).map((e,a)=>s.jsxs("div",{className:"bench-row",onClick:()=>u(E(e.slug||e.id,c)),children:[s.jsx("div",{className:"bench-row-num",children:String(a+1).padStart(2,"0")}),s.jsxs("div",{className:"bench-row-main",children:[s.jsx("div",{className:"bench-row-name",children:e.name}),s.jsxs("div",{className:"bench-row-sub",children:[e.featured_rank!=null&&s.jsxs("span",{className:"bench-pin",children:[s.jsx(R,{size:11,className:"bench-pin-icon"})," pinned"]}),e.paper_count!=null&&s.jsxs("span",{children:[s.jsx("strong",{children:e.paper_count})," ENTRIES"]})]})]}),e.best_model_name&&s.jsxs("div",{className:"bench-row-best",children:[s.jsx(ls,{size:13,className:"bench-row-best-icon"}),s.jsx("span",{className:"bench-row-best-name",children:e.best_model_name})]}),s.jsx("div",{className:"bench-row-arrow",children:"→"})]},e.id)),o.length>5&&s.jsx("button",{type:"button",className:"bench-show-more",onClick:()=>z(e=>!e),children:_?"− show top 5":`+ show ${o.length-5} more benchmarks`})]}),U&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"task-section-head",style:T?{marginTop:36}:void 0,children:[s.jsx("div",{className:"task-section-eyebrow",children:"Benchmarks by capability"}),s.jsxs("div",{className:"task-section-title",children:["Subtasks ",s.jsxs("span",{className:"meta",children:["[",v.length,"]"]})]})]}),s.jsx("div",{className:"subtask-grid",children:v.map(e=>{const a=f.get(e.id)||[];if(a.length===0)return null;const n=H.has(e.id),h=n?a:a.slice(0,S),d=a.length-S;return s.jsxs("div",{className:"subtask-section",children:[s.jsxs("div",{className:"subtask-head",children:[s.jsx(p,{to:`/tasks/${e.slug||e.id}`,className:"subtask-head-name",children:k(e.name,e.slug)}),s.jsxs("span",{className:"subtask-head-meta",children:["[",a.length," benchmark",a.length===1?"":"s","]"]})]}),h.map((l,Q)=>s.jsxs("div",{className:"bench-row",onClick:()=>u(E(l.slug||l.id,e.slug||e.id)),children:[s.jsx("div",{className:"bench-row-num",children:String(Q+1).padStart(2,"0")}),s.jsxs("div",{className:"bench-row-main",children:[s.jsx("div",{className:"bench-row-name",children:l.name}),s.jsxs("div",{className:"bench-row-sub",children:[l.featured_rank!=null&&s.jsxs("span",{className:"bench-pin",children:[s.jsx(R,{size:11,className:"bench-pin-icon"})," pinned"]}),l.paper_count!=null&&s.jsxs("span",{children:[s.jsx("strong",{children:l.paper_count})," ENTRIES"]})]})]}),s.jsx("div",{className:"bench-row-arrow",children:"→"})]},l.id)),d>0&&s.jsx("button",{type:"button",className:"bench-show-more",onClick:()=>K(e.id),children:n?`− show top ${S}`:`+ show ${d} more benchmark${d===1?"":"s"}`})]},e.id)})})]}),s.jsxs("div",{className:"task-section-head",style:{marginTop:36},children:[s.jsx("div",{className:"task-section-eyebrow",children:"Top trending · sort below"}),s.jsxs("div",{className:"task-section-title",children:["Papers ",s.jsxs("span",{className:"meta",children:["[",(t.paper_count??0).toLocaleString(),"]"]})]})]}),s.jsxs("div",{className:"sort-bar",children:[s.jsx("div",{className:"sort-options",children:ds.map(([e,a])=>s.jsx("button",{className:`sort-btn ${j===e?"active":""}`,onClick:()=>I(e),children:a},e))}),s.jsxs("div",{className:"results-count",children:[w.length," loaded in ",s.jsx("span",{children:b})]})]}),i.isLoading?s.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((e,a)=>s.jsx(N,{className:"h-40 w-full"},a))}):w.length===0?s.jsx("div",{className:"no-results",children:"No papers in this task yet."}):s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"paper-list",children:w.map((e,a)=>s.jsx(es,{paper:e,rank:a+1},e.id))}),s.jsx("div",{ref:V,style:{height:1}}),i.isFetchingNextPage&&s.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]}),s.jsxs("aside",{className:"task-side",children:[M.length>0&&s.jsxs("div",{className:"side-block",children:[s.jsx("div",{className:"side-block-num",children:"01/"}),s.jsx("div",{className:"side-block-label",children:"Sister Tasks"}),M.slice(0,8).map(e=>s.jsxs(p,{to:`/tasks/${e.slug}`,className:"side-link-row",children:[s.jsx("span",{children:k(e.name,e.slug)}),e.paper_count!=null&&s.jsx("span",{className:"count",children:e.paper_count.toLocaleString()})]},e.id))]}),y.length>0&&s.jsxs("div",{className:"side-block",children:[s.jsx("div",{className:"side-block-num",children:"02/"}),s.jsx("div",{className:"side-block-label",children:"Common Methods"}),y.map(e=>s.jsxs("div",{className:"side-method-row",children:[s.jsx(as,{method:{slug:e.slug,name:e.name}}),s.jsxs("span",{className:"num",children:["·",e.count]})]},e.id))]})]})]})]})};export{ys as default};
|
assets/{TagsIndexView-vN3AOH1y.js → TagsIndexView-fzL9zmoE.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{r as d,j as e,L as h,a as p}from"./index-
|
|
|
|
| 1 |
+
import{r as d,j as e,L as h,a as p}from"./index-CNvFYqmB.js";import{u as g}from"./useQuery-B6TeiMq1.js";import{e as x,h as f,d as u}from"./transform-Cbu7h9fT.js";import{S as m}from"./skeleton-C9NKUBNg.js";import{A as j,a as y}from"./alert-YjpxGuB-.js";const v=r=>(r==null?void 0:r.trim().toLowerCase().replace(/[\s_]+/g,"-"))??"",b=()=>{const r=g({queryKey:["areas-with-tasks"],queryFn:()=>p.getAreasWithTasks(),staleTime:6e5}),o=d.useMemo(()=>{if(!r.data)return[];const s={general:0,vision:1,video:2,language:3,audio:4,other:5},a=n=>s[v(n)]??999;return[...r.data.results].sort((n,t)=>{const i=a(n.name),l=a(t.name);return i!==l?i-l:n.name.localeCompare(t.name)})},[r.data]),c=d.useMemo(()=>o.reduce((s,a)=>s+a.tasks.length,0),[o]);return r.error?e.jsx("div",{className:"page",children:e.jsx(j,{variant:"destructive",children:e.jsx(y,{children:"Failed to load taxonomy. Please try again."})})}):e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["All ",e.jsx("em",{children:"Domains"})]}),e.jsx("div",{className:"feed-subtitle",children:"Browse research by area. Click any task to see trending work."})]})}),r.isLoading?e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:32},children:Array.from({length:4}).map((s,a)=>e.jsxs("div",{children:[e.jsx(m,{className:"h-8 w-1/3 mb-4"}),e.jsx("div",{className:"tag-grid",children:Array.from({length:6}).map((n,t)=>e.jsx(m,{className:"h-24"},t))})]},a))}):o.map(s=>{const a=s.tasks;if(a.length===0)return null;const n=a.reduce((t,i)=>t+(i.paper_count||0),0);return e.jsxs("section",{style:{marginBottom:48},children:[e.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:24,paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},children:[e.jsxs("div",{children:[e.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.02em",marginBottom:4},children:s.name}),s.description&&e.jsx("div",{style:{fontFamily:"var(--serif)",fontStyle:"italic",fontSize:13,color:"var(--ink-soft)"},children:s.description})]}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[a.length," ",a.length===1?"task":"tasks"," · ",n.toLocaleString()," papers"]})]}),e.jsx("div",{className:"tag-grid",children:a.map(t=>{const i=t.slug||"",l=x(f(i));return e.jsxs(h,{to:`/tasks/${i}`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:l.dot}}),u(t.name,i)]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[(t.paper_count??0).toLocaleString()," papers"]})})]},t.id)})})]},s.id)}),c>0&&e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",marginTop:24},children:[c," tasks across ",o.filter(s=>s.tasks.length>0).length," areas."]})]})};export{b as default};
|
assets/{alert-BVkGa_Tq.js → alert-YjpxGuB-.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{r as a,j as s,k as l,m as i}from"./index-
|
|
|
|
| 1 |
+
import{r as a,j as s,k as l,m as i}from"./index-CNvFYqmB.js";const o=i("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),n=a.forwardRef(({className:e,variant:t,...r},d)=>s.jsx("div",{ref:d,role:"alert",className:l(o({variant:t}),e),...r}));n.displayName="Alert";const v=a.forwardRef(({className:e,...t},r)=>s.jsx("h5",{ref:r,className:l("mb-1 font-medium leading-none tracking-tight",e),...t}));v.displayName="AlertTitle";const c=a.forwardRef(({className:e,...t},r)=>s.jsx("div",{ref:r,className:l("text-sm [&_p]:leading-relaxed",e),...t}));c.displayName="AlertDescription";export{n as A,c as a};
|
assets/{badge-C1LTMoIS.js → badge-BrTibTXh.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
import{c as a,j as n,k as s,m 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{c as a,j as n,k as s,m as o}from"./index-CNvFYqmB.js";/**
|
| 2 |
* @license lucide-react v0.462.0 - ISC
|
| 3 |
*
|
| 4 |
* This source code is licensed under the ISC license.
|
assets/components-B39WD1hZ.js
DELETED
|
@@ -1 +0,0 @@
|
|
| 1 |
-
import{o as S,W as k,a as z,j as t,L as C,a0 as w}from"./index-DjK_yrbe.js";import{L as P,a as H}from"./LatexTitle-6cIE2SFl.js";import{h as T,d as A,f as E,e as R}from"./transform-CH5QAIOs.js";const I=({slug:e,label:s,onClick:r})=>{const o=w(),g=T(e),n=R(g),u=x=>{if(x.stopPropagation(),r){r(e);return}o(`/tasks/${e}`)};return t.jsxs("span",{className:"tag-chip",style:{background:n.bg,color:n.text},onClick:u,children:[t.jsx("span",{className:"dot",style:{background:n.dot}}),A(s||E(e),e)]})},K=({method:e,onClick:s})=>{const r=w(),o=e.slug||e.id||"";if(!o)return null;const g=n=>{if(n.stopPropagation(),s){s(o);return}r(`/methods/${o}`)};return t.jsx("span",{className:"method-chip",onClick:g,children:e.name})},B=({name:e,size:s=14})=>{const r={search:t.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:t.jsx("path",{d:"M8 3l5 6H3l5-6z",fill:"currentColor"}),arrowLeft:t.jsx("path",{d:"M9 3l-4 5 4 5",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"}),arrowRight:t.jsx("path",{d:"M7 3l4 5-4 5",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"}),external:t.jsx("path",{d:"M5 3h-2v8h8v-2M9 3h3v3M7 9l5-5",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"}),github:t.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:t.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:t.jsx("path",{d:"M4 2h8v12l-4-3-4 3V2z",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinejoin:"round"}),chart:t.jsx("path",{d:"M2 13h12M3 11l3-4 3 2 4-5",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"}),chat:t.jsx("path",{d:"M3 3h10v7H7l-3 3v-3H3V3z",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinejoin:"round"}),pdf:t.jsx("path",{d:"M5 2h5l3 3v9H5V2z",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinejoin:"round"}),copy:t.jsx("path",{d:"M5 5h7v8H5V5zM3 3h7v2M3 3v8h2",stroke:"currentColor",strokeWidth:"1.2",fill:"none",strokeLinejoin:"round"}),sparkle:t.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:t.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:t.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:t.jsx("path",{d:"M2 4h12M2 8h12M2 12h12",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),close:t.jsx("path",{d:"M3 3l10 10M13 3L3 13",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})};return t.jsx("svg",{className:s===11?"icon-sm":"icon",viewBox:"0 0 16 16",width:s,height:s,children:r[e]})},V=e=>{let s=2166136261;for(let r=0;r<e.length;r++)s=Math.imul(s^e.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)},q=({paperId:e})=>{const s=V(e),r=160,o=220,g=[.85+s()*.1,.55+s()*.25],n=.45+s()*.3,u=[],x=9+Math.floor(s()*3);for(let d=0;d<x;d++)u.push(.55+s()*.4);const l=s()>.3,m=Math.floor(s()*3),y=[],b=6+Math.floor(s()*3);for(let d=0;d<b;d++)y.push(.5+s()*.45);const c="#9A9588",j="#3A352D",i=5,f=(r-i*2-2)/2,$=i,h=i+f+2;let v=i+2;const N=v;v+=6;const W=v+1;v+=5;const F=v;v+=3;const a=v+1;return t.jsx("div",{style:{width:r,height:o,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:t.jsxs("svg",{width:r,height:o,viewBox:`0 0 ${r} ${o}`,style:{display:"block"},children:[g.map((d,p)=>t.jsx("rect",{x:i+(r-i*2)*(1-d)/2,y:N+p*2.4,width:(r-i*2)*d,height:1.4,fill:j,rx:.3},`t${p}`)),t.jsx("rect",{x:i+(r-i*2)*(1-n)/2,y:W,width:(r-i*2)*n,height:.9,fill:c,opacity:.7,rx:.2}),t.jsx("rect",{x:i,y:F,width:6,height:1,fill:j,opacity:.6}),u.map((d,p)=>{const M=a+p*2.1;return M>o-i-1?null:t.jsx("rect",{x:$,y:M,width:f*d,height:.8,fill:c,opacity:.55,rx:.2},`l${p}`)}),l&&t.jsxs("g",{children:[t.jsx("rect",{x:h,y:a,width:f,height:14,fill:"#F0EBE0",stroke:c,strokeWidth:.3,opacity:.9}),m===0&&t.jsx("g",{stroke:j,strokeWidth:.4,fill:"none",opacity:.6,children:t.jsx("polyline",{points:`${h+2},${a+11} ${h+6},${a+8} ${h+10},${a+9} ${h+14},${a+5} ${h+18},${a+6} ${h+22},${a+3}`})}),m===1&&t.jsxs("g",{opacity:.55,children:[t.jsx("circle",{cx:h+f/2,cy:a+7,r:3.5,fill:j}),t.jsx("rect",{x:h+2,y:a+11,width:f-4,height:1.5,fill:c})]}),m===2&&t.jsxs("g",{opacity:.55,children:[t.jsx("rect",{x:h+3,y:a+5,width:f-6,height:1,fill:j}),t.jsx("rect",{x:h+6,y:a+8,width:f-12,height:.8,fill:j})]})]}),y.map((d,p)=>{const M=a+(l?16:0)+p*2.1;return M>o-i-1?null:t.jsx("rect",{x:h,y:M,width:f*d,height:.8,fill:c,opacity:.55,rx:.2},`r${p}`)})]})})},D=({paperId:e,title:s,thumbnailUrl:r,priority:o=!1})=>{const[g,n]=k.useState(!1),[u,x]=k.useState(0),[l,m]=k.useState(o),y=k.useRef(null);k.useEffect(()=>{n(!1),x(0)},[r]);const b=k.useMemo(()=>{if(!r)return null;if(u===0)return r;const c=r.includes("?")?"&":"?";return`${r}${c}retry=${u}`},[r,u]);return k.useEffect(()=>{if(o||l)return;const c=y.current;if(!c)return;const j=new IntersectionObserver(([i])=>{i.isIntersecting&&(m(!0),j.disconnect())},{rootMargin:"250px"});return j.observe(c),()=>j.disconnect()},[o,l]),r&&!g?t.jsx("div",{ref:y,style:{width:160,height:220,background:"#FDFCF9",border:"1px solid var(--hairline-strong)",borderRadius:2,boxShadow:"0 1px 0 rgba(0,0,0,0.04), 0 4px 8px -4px rgba(0,0,0,0.08)",flexShrink:0,overflow:"hidden",position:"relative"},children:l&&b&&t.jsx("img",{src:b,alt:`Thumbnail for ${s}`,loading:o?"eager":"lazy",decoding:"async",fetchPriority:o?"high":"auto",style:{width:"100%",height:"100%",objectFit:"contain",display:"block"},onError:()=>{if(u<1){x(c=>c+1);return}n(!0)}},b)}):t.jsx(q,{paperId:e})},_=({paper:e,rank:s,onClickTag:r})=>{const o=S(),g=`/paper/${e.id}`,n=k.useCallback(()=>{o.prefetchQuery({queryKey:["paper-arxiv",e.id],queryFn:()=>z.getPaperByArxivId(e.id,!0),staleTime:10*60*1e3})},[e.id,o]),u=e.authors.slice(0,3).join(", "),x=e.authors.length;return t.jsxs("article",{className:"paper-card",children:[s!=null&&t.jsx(C,{to:g,className:"paper-thumb-wrap",onFocus:n,onMouseEnter:n,children:t.jsx(D,{paperId:e.id,title:e.title,thumbnailUrl:e.thumbnailUrl,priority:s<=3})}),t.jsxs("div",{className:"paper-body",children:[t.jsxs("div",{className:"paper-body-main",children:[t.jsx("h3",{className:"paper-title",children:t.jsx(C,{to:g,onFocus:n,onMouseEnter:n,children:t.jsx(P,{title:e.title})})}),t.jsxs("div",{className:"paper-authors",children:[u,x>3&&t.jsxs("span",{children:[", ","+",x-3," authors"]}),e.date&&t.jsxs(t.Fragment,{children:[x>0?" · ":"",t.jsx("span",{children:e.date})]}),e.citations>0&&t.jsxs(t.Fragment,{children:[x>0||e.date?" · ":"",t.jsxs("span",{children:[e.citations.toLocaleString()," citations"]})]})]}),e.abstract&&t.jsx("p",{className:"paper-abstract",children:t.jsx(H,{text:e.abstract})}),e.tags.length>0&&t.jsx("div",{className:"paper-tags",children:e.tags.map(l=>t.jsx(I,{slug:l,onClick:r},l))})]}),e.github!=null&&(()=>{const l=t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"gh-stat-block",children:[t.jsxs("div",{className:"gh-value-row",children:[t.jsx(B,{name:"github",size:12}),t.jsx("span",{className:"gh-stars",children:L(e.github)})]}),t.jsx("div",{className:"gh-stars-label",children:"stars"})]}),e.velocity24h!=null&&e.velocity24h>0&&t.jsxs("div",{className:"gh-stat-block",children:[t.jsxs("div",{className:"gh-value-row",children:[t.jsx("span",{className:"gh-rate-arrow",children:"↑"}),t.jsx("span",{className:"gh-rate",children:Y(e.velocity24h)})]}),t.jsx("div",{className:"gh-stars-label",children:"stars / hr"})]})]});return e.githubUrl?t.jsx("a",{className:"paper-github-stats is-link",href:e.githubUrl,target:"_blank",rel:"noopener noreferrer","aria-label":`Open GitHub repository (${L(e.github)} stars)`,onClick:m=>m.stopPropagation(),children:l}):t.jsx("aside",{className:"paper-github-stats",children:l})})()]})]})};function L(e){return e>=1e3?`${(e/1e3).toFixed(1)}k`:String(e)}function Y(e){return e.toFixed(1)}export{B as I,K as M,_ as P,I as T,D as a};
|
|
|
|
|
|
assets/components-CCZN6YfS.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
import{o as A,W as m,a as z,j as e,L,a0 as F}from"./index-CNvFYqmB.js";import{L as Z,a as E}from"./LatexTitle-ZG9klHzz.js";import{h as S,d as H,f as P,e as T}from"./transform-Cbu7h9fT.js";const D=({slug:t,label:s,onClick:r})=>{const o=F(),f=S(t),i=T(f),u=x=>{if(x.stopPropagation(),r){r(t);return}o(`/tasks/${t}`)};return e.jsxs("span",{className:"tag-chip",style:{background:i.bg,color:i.text},onClick:u,children:[e.jsx("span",{className:"dot",style:{background:i.dot}}),H(s||P(t),t)]})},R=({method:t,onClick:s})=>{const r=F(),o=t.slug||t.id||"";if(!o)return null;const f=i=>{if(i.stopPropagation(),s){s(o);return}r(`/methods/${o}`)};return e.jsx("span",{className:"method-chip",onClick:f,children:t.name})},B=({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]})},I=({size:t=16})=>e.jsxs("svg",{className:"hf-logo",width:t,height:t,viewBox:"0 0 95 88",fill:"none","aria-hidden":"true",focusable:"false",children:[e.jsx("path",{fill:"#FFD21E",d:"M47.21 76.5a34.75 34.75 0 1 0 0-69.5 34.75 34.75 0 0 0 0 69.5Z"}),e.jsx("path",{fill:"#FF9D0B",d:"M81.96 41.75a34.75 34.75 0 1 0-69.5 0 34.75 34.75 0 0 0 69.5 0Zm-73.5 0a38.75 38.75 0 1 1 77.5 0 38.75 38.75 0 0 1-77.5 0Z"}),e.jsx("path",{fill:"#3A3B45",d:"M58.5 32.3c1.28.44 1.78 3.06 3.07 2.38a5 5 0 1 0-6.76-2.07c.61 1.15 2.55-.72 3.7-.32ZM34.95 32.3c-1.28.44-1.79 3.06-3.07 2.38a5 5 0 1 1 6.76-2.07c-.61 1.15-2.56-.72-3.7-.32Z"}),e.jsx("path",{fill:"#FF323D",d:"M46.96 56.29c9.83 0 13-8.76 13-13.26 0-2.34-1.57-1.6-4.09-.36-2.33 1.15-5.46 2.74-8.9 2.74-7.19 0-13-6.88-13-2.38s3.16 13.26 13 13.26Z"}),e.jsx("path",{fill:"#3A3B45",fillRule:"evenodd",clipRule:"evenodd",d:"M39.43 54a8.7 8.7 0 0 1 5.3-4.49c.4-.12.81.57 1.24 1.28.4.68.82 1.37 1.24 1.37.45 0 .9-.68 1.33-1.35.45-.7.89-1.38 1.32-1.25a8.61 8.61 0 0 1 5 4.17c3.73-2.94 5.1-7.74 5.1-10.7 0-2.34-1.57-1.6-4.09-.36l-.14.07c-2.31 1.15-5.39 2.67-8.77 2.67s-6.45-1.52-8.77-2.67c-2.6-1.29-4.23-2.1-4.23.29 0 3.05 1.46 8.06 5.47 10.97Z"}),e.jsx("path",{fill:"#FF9D0B",d:"M70.71 37a3.25 3.25 0 1 0 0-6.5 3.25 3.25 0 0 0 0 6.5ZM24.21 37a3.25 3.25 0 1 0 0-6.5 3.25 3.25 0 0 0 0 6.5ZM17.52 48c-1.62 0-3.06.66-4.07 1.87a5.97 5.97 0 0 0-1.33 3.76 7.1 7.1 0 0 0-1.94-.3c-1.55 0-2.95.59-3.94 1.66a5.8 5.8 0 0 0-.8 7 5.3 5.3 0 0 0-1.79 2.82c-.24.9-.48 2.8.8 4.74a5.22 5.22 0 0 0-.37 5.02c1.02 2.32 3.57 4.14 8.52 6.1 3.07 1.22 5.89 2 5.91 2.01a44.33 44.33 0 0 0 10.93 1.6c5.86 0 10.05-1.8 12.46-5.34 3.88-5.69 3.33-10.9-1.7-15.92-2.77-2.78-4.62-6.87-5-7.77-.78-2.66-2.84-5.62-6.25-5.62a5.7 5.7 0 0 0-4.6 2.46c-1-1.26-1.98-2.25-2.86-2.82A7.4 7.4 0 0 0 17.52 48Zm0 4c.51 0 1.14.22 1.82.65 2.14 1.36 6.25 8.43 7.76 11.18.5.92 1.37 1.31 2.14 1.31 1.55 0 2.75-1.53.15-3.48-3.92-2.93-2.55-7.72-.68-8.01.08-.02.17-.02.24-.02 1.7 0 2.45 2.93 2.45 2.93s2.2 5.52 5.98 9.3c3.77 3.77 3.97 6.8 1.22 10.83-1.88 2.75-5.47 3.58-9.16 3.58-3.81 0-7.73-.9-9.92-1.46-.11-.03-13.45-3.8-11.76-7 .28-.54.75-.76 1.34-.76 2.38 0 6.7 3.54 8.57 3.54.41 0 .7-.17.83-.6.79-2.85-12.06-4.05-10.98-8.17.2-.73.71-1.02 1.44-1.02 3.14 0 10.2 5.53 11.68 5.53.11 0 .2-.03.24-.1.74-1.2.33-2.04-4.9-5.2-5.21-3.16-8.88-5.06-6.8-7.33.24-.26.58-.38 1-.38 3.17 0 10.66 6.82 10.66 6.82s2.02 2.1 3.25 2.1c.28 0 .52-.1.68-.38.86-1.46-8.06-8.22-8.56-11.01-.34-1.9.24-2.85 1.31-2.85Z"}),e.jsx("path",{fill:"#FFD21E",d:"M38.6 76.69c2.75-4.04 2.55-7.07-1.22-10.84-3.78-3.77-5.98-9.3-5.98-9.3s-.82-3.2-2.69-2.9c-1.87.3-3.24 5.08.68 8.01 3.91 2.93-.78 4.92-2.29 2.17-1.5-2.75-5.62-9.82-7.76-11.18-2.13-1.35-3.63-.6-3.13 2.2.5 2.79 9.43 9.55 8.56 11-.87 1.47-3.93-1.71-3.93-1.71s-9.57-8.71-11.66-6.44c-2.08 2.27 1.59 4.17 6.8 7.33 5.23 3.16 5.64 4 4.9 5.2-.75 1.2-12.28-8.53-13.36-4.4-1.08 4.11 11.77 5.3 10.98 8.15-.8 2.85-9.06-5.38-10.74-2.18-1.7 3.21 11.65 6.98 11.76 7.01 4.3 1.12 15.25 3.49 19.08-2.12Z"}),e.jsx("path",{fill:"#FF9D0B",d:"M77.4 48c1.62 0 3.07.66 4.07 1.87a5.97 5.97 0 0 1 1.33 3.76 7.1 7.1 0 0 1 1.95-.3c1.55 0 2.95.59 3.94 1.66a5.8 5.8 0 0 1 .8 7 5.3 5.3 0 0 1 1.78 2.82c.24.9.48 2.8-.8 4.74a5.22 5.22 0 0 1 .37 5.02c-1.02 2.32-3.57 4.14-8.51 6.1-3.08 1.22-5.9 2-5.92 2.01a44.33 44.33 0 0 1-10.93 1.6c-5.86 0-10.05-1.8-12.46-5.34-3.88-5.69-3.33-10.9 1.7-15.92 2.78-2.78 4.63-6.87 5.01-7.77.78-2.66 2.83-5.62 6.24-5.62a5.7 5.7 0 0 1 4.6 2.46c1-1.26 1.98-2.25 2.87-2.82A7.4 7.4 0 0 1 77.4 48Zm0 4c-.51 0-1.13.22-1.82.65-2.13 1.36-6.25 8.43-7.76 11.18a2.43 2.43 0 0 1-2.14 1.31c-1.54 0-2.75-1.53-.14-3.48 3.91-2.93 2.54-7.72.67-8.01a1.54 1.54 0 0 0-.24-.02c-1.7 0-2.45 2.93-2.45 2.93s-2.2 5.52-5.97 9.3c-3.78 3.77-3.98 6.8-1.22 10.83 1.87 2.75 5.47 3.58 9.15 3.58 3.82 0 7.73-.9 9.93-1.46.1-.03 13.45-3.8 11.76-7-.29-.54-.75-.76-1.34-.76-2.38 0-6.71 3.54-8.57 3.54-.42 0-.71-.17-.83-.6-.8-2.85 12.05-4.05 10.97-8.17-.19-.73-.7-1.02-1.44-1.02-3.14 0-10.2 5.53-11.68 5.53-.1 0-.19-.03-.23-.1-.74-1.2-.34-2.04 4.88-5.2 5.23-3.16 8.9-5.06 6.8-7.33-.23-.26-.57-.38-.98-.38-3.18 0-10.67 6.82-10.67 6.82s-2.02 2.1-3.24 2.1a.74.74 0 0 1-.68-.38c-.87-1.46 8.05-8.22 8.55-11.01.34-1.9-.24-2.85-1.31-2.85Z"}),e.jsx("path",{fill:"#FFD21E",d:"M56.33 76.69c-2.75-4.04-2.56-7.07 1.22-10.84 3.77-3.77 5.97-9.3 5.97-9.3s.82-3.2 2.7-2.9c1.86.3 3.23 5.08-.68 8.01-3.92 2.93.78 4.92 2.28 2.17 1.51-2.75 5.63-9.82 7.76-11.18 2.13-1.35 3.64-.6 3.13 2.2-.5 2.79-9.42 9.55-8.55 11 .86 1.47 3.92-1.71 3.92-1.71s9.58-8.71 11.66-6.44c2.08 2.27-1.58 4.17-6.8 7.33-5.23 3.16-5.63 4-4.9 5.2.75 1.2 12.28-8.53 13.36-4.4 1.08 4.11-11.76 5.3-10.97 8.15.8 2.85 9.05-5.38 10.74-2.18 1.69 3.21-11.65 6.98-11.76 7.01-4.31 1.12-15.26 3.49-19.08-2.12Z"})]}),K=t=>{let s=2166136261;for(let r=0;r<t.length;r++)s=Math.imul(s^t.charCodeAt(r),16777619);return()=>(s=Math.imul(s^s>>>15,2246822507),s=Math.imul(s^s>>>13,3266489909),s^=s>>>16,(s>>>0)%1e4/1e4)},U=({paperId:t})=>{const s=K(t),r=160,o=220,f=[.85+s()*.1,.55+s()*.25],i=.45+s()*.3,u=[],x=9+Math.floor(s()*3);for(let d=0;d<x;d++)u.push(.55+s()*.4);const j=s()>.3,n=Math.floor(s()*3),v=[],y=6+Math.floor(s()*3);for(let d=0;d<y;d++)v.push(.5+s()*.45);const c="#9A9588",g="#3A352D",l=5,p=(r-l*2-2)/2,w=l,h=l+p+2;let M=l+2;const N=M;M+=6;const $=M+1;M+=5;const W=M;M+=3;const a=M+1;return e.jsx("div",{style:{width:r,height:o,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:o,viewBox:`0 0 ${r} ${o}`,style:{display:"block"},children:[f.map((d,k)=>e.jsx("rect",{x:l+(r-l*2)*(1-d)/2,y:N+k*2.4,width:(r-l*2)*d,height:1.4,fill:g,rx:.3},`t${k}`)),e.jsx("rect",{x:l+(r-l*2)*(1-i)/2,y:$,width:(r-l*2)*i,height:.9,fill:c,opacity:.7,rx:.2}),e.jsx("rect",{x:l,y:W,width:6,height:1,fill:g,opacity:.6}),u.map((d,k)=>{const b=a+k*2.1;return b>o-l-1?null:e.jsx("rect",{x:w,y:b,width:p*d,height:.8,fill:c,opacity:.55,rx:.2},`l${k}`)}),j&&e.jsxs("g",{children:[e.jsx("rect",{x:h,y:a,width:p,height:14,fill:"#F0EBE0",stroke:c,strokeWidth:.3,opacity:.9}),n===0&&e.jsx("g",{stroke:g,strokeWidth:.4,fill:"none",opacity:.6,children:e.jsx("polyline",{points:`${h+2},${a+11} ${h+6},${a+8} ${h+10},${a+9} ${h+14},${a+5} ${h+18},${a+6} ${h+22},${a+3}`})}),n===1&&e.jsxs("g",{opacity:.55,children:[e.jsx("circle",{cx:h+p/2,cy:a+7,r:3.5,fill:g}),e.jsx("rect",{x:h+2,y:a+11,width:p-4,height:1.5,fill:c})]}),n===2&&e.jsxs("g",{opacity:.55,children:[e.jsx("rect",{x:h+3,y:a+5,width:p-6,height:1,fill:g}),e.jsx("rect",{x:h+6,y:a+8,width:p-12,height:.8,fill:g})]})]}),v.map((d,k)=>{const b=a+(j?16:0)+k*2.1;return b>o-l-1?null:e.jsx("rect",{x:h,y:b,width:p*d,height:.8,fill:c,opacity:.55,rx:.2},`r${k}`)})]})})},G=({paperId:t,title:s,thumbnailUrl:r,priority:o=!1})=>{const[f,i]=m.useState(!1),[u,x]=m.useState(0),[j,n]=m.useState(o),v=m.useRef(null);m.useEffect(()=>{i(!1),x(0)},[r]);const y=m.useMemo(()=>{if(!r)return null;if(u===0)return r;const c=r.includes("?")?"&":"?";return`${r}${c}retry=${u}`},[r,u]);return m.useEffect(()=>{if(o||j)return;const c=v.current;if(!c)return;const g=new IntersectionObserver(([l])=>{l.isIntersecting&&(n(!0),g.disconnect())},{rootMargin:"250px"});return g.observe(c),()=>g.disconnect()},[o,j]),r&&!f?e.jsx("div",{ref:v,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:j&&y&&e.jsx("img",{src:y,alt:`Thumbnail for ${s}`,loading:o?"eager":"lazy",decoding:"async",fetchPriority:o?"high":"auto",style:{width:"100%",height:"100%",objectFit:"contain",display:"block"},onError:()=>{if(u<1){x(c=>c+1);return}i(!0)}},y)}):e.jsx(U,{paperId:t})},_="language-modeling";function C(t){return t?t.toLowerCase().replace(/\(.*?\)/g," ").replace(/[^a-z]+/g," ").replace(/\bllm\b/g," ").replace(/\s+/g," ").trim().replace(/s$/,""):""}function O(t){return C(t.slug)==="large language model"||C(t.name)==="large language model"}function V(t){return t.tags.includes(_)?t.methods.filter(s=>!O(s)):t.methods}const X=({paper:t,rank:s,onClickTag:r})=>{const o=A(),f=`/paper/${t.id}`,i=m.useCallback(()=>{o.prefetchQuery({queryKey:["paper-arxiv",t.id],queryFn:()=>z.getPaperByArxivId(t.id,!0),staleTime:10*60*1e3})},[t.id,o]),u=t.authors.slice(0,3).join(", "),x=t.authors.length,j=V(t);return e.jsxs("article",{className:"paper-card",children:[s!=null&&e.jsx(L,{to:f,className:"paper-thumb-wrap",onFocus:i,onMouseEnter:i,children:e.jsx(G,{paperId:t.id,title:t.title,thumbnailUrl:t.thumbnailUrl,priority:s<=3})}),e.jsxs("div",{className:"paper-body",children:[e.jsxs("div",{className:"paper-body-main",children:[e.jsx("h3",{className:"paper-title",children:e.jsx(L,{to:f,onFocus:i,onMouseEnter:i,children:e.jsx(Z,{title:t.title})})}),e.jsxs("div",{className:"paper-authors",children:[u,x>3&&e.jsxs("span",{children:[", ","+",x-3," authors"]}),t.date&&e.jsxs(e.Fragment,{children:[x>0?" · ":"",e.jsx("span",{children:t.date})]}),t.citations>0&&e.jsxs(e.Fragment,{children:[x>0||t.date?" · ":"",e.jsxs("span",{children:[t.citations.toLocaleString()," citations"]})]})]}),t.abstract&&e.jsx("p",{className:"paper-abstract",children:e.jsx(E,{text:t.abstract})}),(t.tags.length>0||j.length>0)&&e.jsxs("div",{className:"paper-tags paper-tags--clamped",children:[t.tags.map(n=>e.jsx(D,{slug:n,onClick:r},n)),j.map(n=>e.jsx(R,{method:n},n.id||n.slug||n.name))]})]}),(t.githubUrl||t.hfUrl)&&e.jsxs("div",{className:"paper-resources",children:[t.githubUrl&&e.jsxs("a",{className:"paper-resource is-link",href:t.githubUrl,target:"_blank",rel:"noopener noreferrer","aria-label":"Open GitHub repository",onClick:n=>n.stopPropagation(),children:[e.jsx(B,{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:"↑"}),q(t.velocity24h)]}),e.jsx("span",{className:"resource-label",children:"stars / hr"})]})]}),t.hfUrl&&t.hfKind&&e.jsxs("a",{className:"paper-resource is-link",href:t.hfUrl,target:"_blank",rel:"noopener noreferrer","aria-label":`Open Hugging Face ${t.hfKind}`,onClick:n=>n.stopPropagation(),children:[e.jsx(I,{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 q(t){return t.toFixed(1)}export{B as I,R as M,X as P,D as T,G as a};
|
assets/{dialog-CfUUYXjw.js → dialog-DHhG_3Ep.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
import{r as s,j as i,z as q,d as J,A as R,P as N,E as K,b as D,f as x,i as U,e as h,F as X,G as Y,H as Q,I as ee,J as te,a9 as oe,X as ne,k as p}from"./index-
|
| 2 |
|
| 3 |
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
| 4 |
|
|
|
|
| 1 |
+
import{r as s,j as i,z as q,d as J,A as R,P as N,E as K,b as D,f as x,i as U,e as h,F as X,G as Y,H as Q,I as ee,J as te,a9 as oe,X as ne,k as p}from"./index-CNvFYqmB.js";function ae(e){const t=re(e),o=s.forwardRef((a,n)=>{const{children:r,...l}=a,c=s.Children.toArray(r),d=c.find(ie);if(d){const u=d.props.children,m=c.map(v=>v===d?s.Children.count(u)>1?s.Children.only(null):s.isValidElement(u)?u.props.children:null:v);return i.jsx(t,{...l,ref:n,children:s.isValidElement(u)?s.cloneElement(u,void 0,m):null})}return i.jsx(t,{...l,ref:n,children:r})});return o.displayName=`${e}.Slot`,o}function re(e){const t=s.forwardRef((o,a)=>{const{children:n,...r}=o;if(s.isValidElement(n)){const l=ce(n),c=le(r,n.props);return n.type!==s.Fragment&&(c.ref=a?q(a,l):l),s.cloneElement(n,c)}return s.Children.count(n)>1?s.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var se=Symbol("radix.slottable");function ie(e){return s.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===se}function le(e,t){const o={...t};for(const a in t){const n=e[a],r=t[a];/^on[A-Z]/.test(a)?n&&r?o[a]=(...c)=>{const d=r(...c);return n(...c),d}:n&&(o[a]=n):a==="style"?o[a]={...n,...r}:a==="className"&&(o[a]=[n,r].filter(Boolean).join(" "))}return{...e,...o}}function ce(e){var a,n;let t=(a=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:a.get,o=t&&"isReactWarning"in t&&t.isReactWarning;return o?e.ref:(t=(n=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:n.get,o=t&&"isReactWarning"in t&&t.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}var C="Dialog",[b]=U(C),[de,f]=b(C),P=e=>{const{__scopeDialog:t,children:o,open:a,defaultOpen:n,onOpenChange:r,modal:l=!0}=e,c=s.useRef(null),d=s.useRef(null),[u,m]=J({prop:a,defaultProp:n??!1,onChange:r,caller:C});return i.jsx(de,{scope:t,triggerRef:c,contentRef:d,contentId:R(),titleId:R(),descriptionId:R(),open:u,onOpenChange:m,onOpenToggle:s.useCallback(()=>m(v=>!v),[m]),modal:l,children:o})};P.displayName=C;var O="DialogTrigger",ue=s.forwardRef((e,t)=>{const{__scopeDialog:o,...a}=e,n=f(O,o),r=h(t,n.triggerRef);return i.jsx(D.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":j(n.open),...a,ref:r,onClick:x(e.onClick,n.onOpenToggle)})});ue.displayName=O;var E="DialogPortal",[fe,I]=b(E,{forceMount:void 0}),A=e=>{const{__scopeDialog:t,forceMount:o,children:a,container:n}=e,r=f(E,t);return i.jsx(fe,{scope:t,forceMount:o,children:s.Children.map(a,l=>i.jsx(N,{present:o||r.open,children:i.jsx(K,{asChild:!0,container:n,children:l})}))})};A.displayName=E;var y="DialogOverlay",w=s.forwardRef((e,t)=>{const o=I(y,e.__scopeDialog),{forceMount:a=o.forceMount,...n}=e,r=f(y,e.__scopeDialog);return r.modal?i.jsx(N,{present:a||r.open,children:i.jsx(pe,{...n,ref:t})}):null});w.displayName=y;var ge=ae("DialogOverlay.RemoveScroll"),pe=s.forwardRef((e,t)=>{const{__scopeDialog:o,...a}=e,n=f(y,o);return i.jsx(Y,{as:ge,allowPinchZoom:!0,shards:[n.contentRef],children:i.jsx(D.div,{"data-state":j(n.open),...a,ref:t,style:{pointerEvents:"auto",...a.style}})})}),g="DialogContent",T=s.forwardRef((e,t)=>{const o=I(g,e.__scopeDialog),{forceMount:a=o.forceMount,...n}=e,r=f(g,e.__scopeDialog);return i.jsx(N,{present:a||r.open,children:r.modal?i.jsx(me,{...n,ref:t}):i.jsx(xe,{...n,ref:t})})});T.displayName=g;var me=s.forwardRef((e,t)=>{const o=f(g,e.__scopeDialog),a=s.useRef(null),n=h(t,o.contentRef,a);return s.useEffect(()=>{const r=a.current;if(r)return X(r)},[]),i.jsx(S,{...e,ref:n,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:x(e.onCloseAutoFocus,r=>{var l;r.preventDefault(),(l=o.triggerRef.current)==null||l.focus()}),onPointerDownOutside:x(e.onPointerDownOutside,r=>{const l=r.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0;(l.button===2||c)&&r.preventDefault()}),onFocusOutside:x(e.onFocusOutside,r=>r.preventDefault())})}),xe=s.forwardRef((e,t)=>{const o=f(g,e.__scopeDialog),a=s.useRef(!1),n=s.useRef(!1);return i.jsx(S,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:r=>{var l,c;(l=e.onCloseAutoFocus)==null||l.call(e,r),r.defaultPrevented||(a.current||(c=o.triggerRef.current)==null||c.focus(),r.preventDefault()),a.current=!1,n.current=!1},onInteractOutside:r=>{var d,u;(d=e.onInteractOutside)==null||d.call(e,r),r.defaultPrevented||(a.current=!0,r.detail.originalEvent.type==="pointerdown"&&(n.current=!0));const l=r.target;((u=o.triggerRef.current)==null?void 0:u.contains(l))&&r.preventDefault(),r.detail.originalEvent.type==="focusin"&&n.current&&r.preventDefault()}})}),S=s.forwardRef((e,t)=>{const{__scopeDialog:o,trapFocus:a,onOpenAutoFocus:n,onCloseAutoFocus:r,...l}=e,c=f(g,o),d=s.useRef(null),u=h(t,d);return Q(),i.jsxs(i.Fragment,{children:[i.jsx(ee,{asChild:!0,loop:!0,trapped:a,onMountAutoFocus:n,onUnmountAutoFocus:r,children:i.jsx(te,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":j(c.open),...l,ref:u,onDismiss:()=>c.onOpenChange(!1)})}),i.jsxs(i.Fragment,{children:[i.jsx(De,{titleId:c.titleId}),i.jsx(ye,{contentRef:d,descriptionId:c.descriptionId})]})]})}),_="DialogTitle",F=s.forwardRef((e,t)=>{const{__scopeDialog:o,...a}=e,n=f(_,o);return i.jsx(D.h2,{id:n.titleId,...a,ref:t})});F.displayName=_;var M="DialogDescription",W=s.forwardRef((e,t)=>{const{__scopeDialog:o,...a}=e,n=f(M,o);return i.jsx(D.p,{id:n.descriptionId,...a,ref:t})});W.displayName=M;var $="DialogClose",k=s.forwardRef((e,t)=>{const{__scopeDialog:o,...a}=e,n=f($,o);return i.jsx(D.button,{type:"button",...a,ref:t,onClick:x(e.onClick,()=>n.onOpenChange(!1))})});k.displayName=$;function j(e){return e?"open":"closed"}var L="DialogTitleWarning",[Ie,G]=oe(L,{contentName:g,titleName:_,docsSlug:"dialog"}),De=({titleId:e})=>{const t=G(L),o=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
| 2 |
|
| 3 |
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
| 4 |
|
assets/{index-DjK_yrbe.js → index-CNvFYqmB.js}
RENAMED
|
The diff for this file is too large to render.
See raw diff
|
|
|
assets/index-DMfE8oql.css
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
assets/index-j1HqzTQY.css
DELETED
|
The diff for this file is too large to render.
See raw diff
|
|
|
assets/{index-BlGd3n8Y.js → index-sNVSU2vm.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{r as u}from"./index-
|
|
|
|
| 1 |
+
import{r as u}from"./index-CNvFYqmB.js";function o(r){const e=u.useRef({value:r,previous:r});return u.useMemo(()=>(e.current.value!==r&&(e.current.previous=e.current.value,e.current.value=r),e.current.previous),[r])}export{o as u};
|
assets/{input-h2dFcLEy.js → input-DO8YPeri.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{r as n,j as s,ai as f,k as i,m as c}from"./index-
|
|
|
|
| 1 |
+
import{r as n,j as s,ai as f,k as i,m as c}from"./index-CNvFYqmB.js";const l=c("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"}}),g=n.forwardRef(({className:e,variant:r,size:t,asChild:o=!1,...a},d)=>{const u=o?f:"button";return s.jsx(u,{className:i(l({variant:r,size:t,className:e})),ref:d,...a})});g.displayName="Button";const b=n.forwardRef(({className:e,type:r,...t},o)=>s.jsx("input",{type:r,className:i("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:o,...t}));b.displayName="Input";export{g as B,b as I};
|
assets/{loader-circle-Cy5Q1yxQ.js → loader-circle-DWcwv_K5.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
import{c as e}from"./index-
|
| 2 |
* @license lucide-react v0.462.0 - ISC
|
| 3 |
*
|
| 4 |
* This source code is licensed under the ISC license.
|
|
|
|
| 1 |
+
import{c as e}from"./index-CNvFYqmB.js";/**
|
| 2 |
* @license lucide-react v0.462.0 - ISC
|
| 3 |
*
|
| 4 |
* This source code is licensed under the ISC license.
|
assets/{refresh-cw-BYtfzW19.js → refresh-cw-BeDQ2XgS.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
import{c as e}from"./index-
|
| 2 |
* @license lucide-react v0.462.0 - ISC
|
| 3 |
*
|
| 4 |
* This source code is licensed under the ISC license.
|
|
|
|
| 1 |
+
import{c as e}from"./index-CNvFYqmB.js";/**
|
| 2 |
* @license lucide-react v0.462.0 - ISC
|
| 3 |
*
|
| 4 |
* This source code is licensed under the ISC license.
|
assets/{skeleton-_kUFAeFV.js → skeleton-C9NKUBNg.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{j as t,k as n}from"./index-
|
|
|
|
| 1 |
+
import{j as t,k as n}from"./index-CNvFYqmB.js";function m({className:e,...s}){return t.jsx("div",{className:n("animate-pulse rounded-md bg-muted",e),...s})}export{m as S};
|
assets/{switch-Bs5IhEGZ.js → switch-j6Z98JHW.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{r as s,e as C,d as I,j as a,b as y,f as M,h as H,i as A,k as x}from"./index-
|
|
|
|
| 1 |
+
import{r as s,e as C,d as I,j as a,b as y,f as M,h as H,i as A,k as x}from"./index-CNvFYqmB.js";import{u as U}from"./index-sNVSU2vm.js";var b="Switch",[q]=A(b),[z,L]=q(b),P=s.forwardRef((t,o)=>{const{__scopeSwitch:e,name:n,checked:r,defaultChecked:m,required:d,disabled:c,value:u="on",onCheckedChange:v,form:i,...w}=t,[l,p]=s.useState(null),k=C(o,h=>p(h)),S=s.useRef(!1),g=l?i||!!l.closest("form"):!0,[f,B]=I({prop:r,defaultProp:m??!1,onChange:v,caller:b});return a.jsxs(z,{scope:e,checked:f,disabled:c,children:[a.jsx(y.button,{type:"button",role:"switch","aria-checked":f,"aria-required":d,"data-state":j(f),"data-disabled":c?"":void 0,disabled:c,value:u,...w,ref:k,onClick:M(t.onClick,h=>{B(T=>!T),g&&(S.current=h.isPropagationStopped(),S.current||h.stopPropagation())})}),g&&a.jsx(N,{control:l,bubbles:!S.current,name:n,value:u,checked:f,required:d,disabled:c,form:i,style:{transform:"translateX(-100%)"}})]})});P.displayName=b;var E="SwitchThumb",R=s.forwardRef((t,o)=>{const{__scopeSwitch:e,...n}=t,r=L(E,e);return a.jsx(y.span,{"data-state":j(r.checked),"data-disabled":r.disabled?"":void 0,...n,ref:o})});R.displayName=E;var O="SwitchBubbleInput",N=s.forwardRef(({__scopeSwitch:t,control:o,checked:e,bubbles:n=!0,...r},m)=>{const d=s.useRef(null),c=C(d,m),u=U(e),v=H(o);return s.useEffect(()=>{const i=d.current;if(!i)return;const w=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(w,"checked").set;if(u!==e&&p){const k=new Event("click",{bubbles:n});p.call(i,e),i.dispatchEvent(k)}},[u,e,n]),a.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:e,...r,tabIndex:-1,ref:c,style:{...r.style,...v,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});N.displayName=O;function j(t){return t?"checked":"unchecked"}var _=P,D=R;const F=s.forwardRef(({className:t,...o},e)=>a.jsx(_,{className:x("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",t),...o,ref:e,children:a.jsx(D,{className:x("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));F.displayName=_.displayName;export{F as S};
|
assets/{textarea-zriuaL9R.js → textarea-7bEOXz2p.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{r as s,j as a,k as t}from"./index-
|
|
|
|
| 1 |
+
import{r as s,j as a,k as t}from"./index-CNvFYqmB.js";const i=s.forwardRef(({className:e,...r},o)=>a.jsx("textarea",{className:t("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:o,...r}));i.displayName="Textarea";export{i as T};
|
assets/{transform-CH5QAIOs.js → transform-Cbu7h9fT.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{a6 as $}from"./index-DjK_yrbe.js";function pe(t){let e=2166136261;const n=t||"";for(let r=0;r<n.length;r++)e=Math.imul(e^n.charCodeAt(r),16777619);return Math.abs(e)%360}function Pe(t){return{bg:`oklch(0.94 0.04 ${t})`,text:`oklch(0.35 0.10 ${t})`,dot:`oklch(0.55 0.12 ${t})`}}function m(t){const e=Object.prototype.toString.call(t);return t instanceof Date||typeof t=="object"&&e==="[object Date]"?new t.constructor(+t):typeof t=="number"||e==="[object Number]"||typeof t=="string"||e==="[object String]"?new Date(t):new Date(NaN)}function b(t,e){return t instanceof Date?new t.constructor(e):new Date(e)}const U=6048e5,V=864e5,I=6e4,R=36e5;let z={};function W(){return z}function v(t,e){var s,u,d,f;const n=W(),r=(e==null?void 0:e.weekStartsOn)??((u=(s=e==null?void 0:e.locale)==null?void 0:s.options)==null?void 0:u.weekStartsOn)??n.weekStartsOn??((f=(d=n.locale)==null?void 0:d.options)==null?void 0:f.weekStartsOn)??0,a=m(t),i=a.getDay(),o=(i<r?7:0)+i-r;return a.setDate(a.getDate()-o),a.setHours(0,0,0,0),a}function T(t){return v(t,{weekStartsOn:1})}function j(t){const e=m(t),n=e.getFullYear(),r=b(t,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const a=T(r),i=b(t,0);i.setFullYear(n,0,4),i.setHours(0,0,0,0);const o=T(i);return e.getTime()>=a.getTime()?n+1:e.getTime()>=o.getTime()?n:n-1}function F(t){const e=m(t);return e.setHours(0,0,0,0),e}function E(t){const e=m(t),n=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return n.setUTCFullYear(e.getFullYear()),+t-+n}function J(t,e){const n=F(t),r=F(e),a=+n-E(n),i=+r-E(r);return Math.round((a-i)/V)}function Z(t){const e=j(t),n=b(t,0);return n.setFullYear(e,0,4),n.setHours(0,0,0,0),T(n)}function K(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}function tt(t){if(!K(t)&&typeof t!="number")return!1;const e=m(t);return!isNaN(Number(e))}function et(t){const e=m(t),n=b(t,0);return n.setFullYear(e.getFullYear(),0,1),n.setHours(0,0,0,0),n}const nt={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},rt=(t,e,n)=>{let r;const a=nt[t];return typeof a=="string"?r=a:e===1?r=a.one:r=a.other.replace("{{count}}",e.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function Y(t){return(e={})=>{const n=e.width?String(e.width):t.defaultWidth;return t.formats[n]||t.formats[t.defaultWidth]}}const at={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},it={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},ot={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},st={date:Y({formats:at,defaultWidth:"full"}),time:Y({formats:it,defaultWidth:"full"}),dateTime:Y({formats:ot,defaultWidth:"full"})},ut={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},ct=(t,e,n,r)=>ut[t];function p(t){return(e,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let a;if(r==="formatting"&&t.formattingValues){const o=t.defaultFormattingWidth||t.defaultWidth,s=n!=null&&n.width?String(n.width):o;a=t.formattingValues[s]||t.formattingValues[o]}else{const o=t.defaultWidth,s=n!=null&&n.width?String(n.width):t.defaultWidth;a=t.values[s]||t.values[o]}const i=t.argumentCallback?t.argumentCallback(e):e;return a[i]}}const dt={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},lt={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},ft={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},ht={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},mt={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},gt={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},wt=(t,e)=>{const n=Number(t),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},yt={ordinalNumber:wt,era:p({values:dt,defaultWidth:"wide"}),quarter:p({values:lt,defaultWidth:"wide",argumentCallback:t=>t-1}),month:p({values:ft,defaultWidth:"wide"}),day:p({values:ht,defaultWidth:"wide"}),dayPeriod:p({values:mt,defaultWidth:"wide",formattingValues:gt,defaultFormattingWidth:"wide"})};function P(t){return(e,n={})=>{const r=n.width,a=r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth],i=e.match(a);if(!i)return null;const o=i[0],s=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],u=Array.isArray(s)?Dt(s,g=>g.test(o)):bt(s,g=>g.test(o));let d;d=t.valueCallback?t.valueCallback(u):u,d=n.valueCallback?n.valueCallback(d):d;const f=e.slice(o.length);return{value:d,rest:f}}}function bt(t,e){for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e(t[n]))return n}function Dt(t,e){for(let n=0;n<t.length;n++)if(e(t[n]))return n}function Mt(t){return(e,n={})=>{const r=e.match(t.matchPattern);if(!r)return null;const a=r[0],i=e.match(t.parsePattern);if(!i)return null;let o=t.valueCallback?t.valueCallback(i[0]):i[0];o=n.valueCallback?n.valueCallback(o):o;const s=e.slice(a.length);return{value:o,rest:s}}}const Ot=/^(\d+)(th|st|nd|rd)?/i,pt=/\d+/i,Pt={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},kt={any:[/^b/i,/^(a|c)/i]},vt={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},xt={any:[/1/i,/2/i,/3/i,/4/i]},Tt={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Wt={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},St={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Yt={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Nt={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Ct={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Ft={ordinalNumber:Mt({matchPattern:Ot,parsePattern:pt,valueCallback:t=>parseInt(t,10)}),era:P({matchPatterns:Pt,defaultMatchWidth:"wide",parsePatterns:kt,defaultParseWidth:"any"}),quarter:P({matchPatterns:vt,defaultMatchWidth:"wide",parsePatterns:xt,defaultParseWidth:"any",valueCallback:t=>t+1}),month:P({matchPatterns:Tt,defaultMatchWidth:"wide",parsePatterns:Wt,defaultParseWidth:"any"}),day:P({matchPatterns:St,defaultMatchWidth:"wide",parsePatterns:Yt,defaultParseWidth:"any"}),dayPeriod:P({matchPatterns:Nt,defaultMatchWidth:"any",parsePatterns:Ct,defaultParseWidth:"any"})},Et={code:"en-US",formatDistance:rt,formatLong:st,formatRelative:ct,localize:yt,match:Ft,options:{weekStartsOn:0,firstWeekContainsDate:1}};function _t(t){const e=m(t);return J(e,et(e))+1}function qt(t){const e=m(t),n=+T(e)-+Z(e);return Math.round(n/U)+1}function A(t,e){var f,g,M,O;const n=m(t),r=n.getFullYear(),a=W(),i=(e==null?void 0:e.firstWeekContainsDate)??((g=(f=e==null?void 0:e.locale)==null?void 0:f.options)==null?void 0:g.firstWeekContainsDate)??a.firstWeekContainsDate??((O=(M=a.locale)==null?void 0:M.options)==null?void 0:O.firstWeekContainsDate)??1,o=b(t,0);o.setFullYear(r+1,0,i),o.setHours(0,0,0,0);const s=v(o,e),u=b(t,0);u.setFullYear(r,0,i),u.setHours(0,0,0,0);const d=v(u,e);return n.getTime()>=s.getTime()?r+1:n.getTime()>=d.getTime()?r:r-1}function Lt(t,e){var s,u,d,f;const n=W(),r=(e==null?void 0:e.firstWeekContainsDate)??((u=(s=e==null?void 0:e.locale)==null?void 0:s.options)==null?void 0:u.firstWeekContainsDate)??n.firstWeekContainsDate??((f=(d=n.locale)==null?void 0:d.options)==null?void 0:f.firstWeekContainsDate)??1,a=A(t,e),i=b(t,0);return i.setFullYear(a,0,r),i.setHours(0,0,0,0),v(i,e)}function Ht(t,e){const n=m(t),r=+v(n,e)-+Lt(n,e);return Math.round(r/U)+1}function c(t,e){const n=t<0?"-":"",r=Math.abs(t).toString().padStart(e,"0");return n+r}const w={y(t,e){const n=t.getFullYear(),r=n>0?n:1-n;return c(e==="yy"?r%100:r,e.length)},M(t,e){const n=t.getMonth();return e==="M"?String(n+1):c(n+1,2)},d(t,e){return c(t.getDate(),e.length)},a(t,e){const n=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(t,e){return c(t.getHours()%12||12,e.length)},H(t,e){return c(t.getHours(),e.length)},m(t,e){return c(t.getMinutes(),e.length)},s(t,e){return c(t.getSeconds(),e.length)},S(t,e){const n=e.length,r=t.getMilliseconds(),a=Math.trunc(r*Math.pow(10,n-3));return c(a,e.length)}},D={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},_={G:function(t,e,n){const r=t.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(t,e,n){if(e==="yo"){const r=t.getFullYear(),a=r>0?r:1-r;return n.ordinalNumber(a,{unit:"year"})}return w.y(t,e)},Y:function(t,e,n,r){const a=A(t,r),i=a>0?a:1-a;if(e==="YY"){const o=i%100;return c(o,2)}return e==="Yo"?n.ordinalNumber(i,{unit:"year"}):c(i,e.length)},R:function(t,e){const n=j(t);return c(n,e.length)},u:function(t,e){const n=t.getFullYear();return c(n,e.length)},Q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return c(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return c(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,e,n){const r=t.getMonth();switch(e){case"M":case"MM":return w.M(t,e);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,n){const r=t.getMonth();switch(e){case"L":return String(r+1);case"LL":return c(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,n,r){const a=Ht(t,r);return e==="wo"?n.ordinalNumber(a,{unit:"week"}):c(a,e.length)},I:function(t,e,n){const r=qt(t);return e==="Io"?n.ordinalNumber(r,{unit:"week"}):c(r,e.length)},d:function(t,e,n){return e==="do"?n.ordinalNumber(t.getDate(),{unit:"date"}):w.d(t,e)},D:function(t,e,n){const r=_t(t);return e==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):c(r,e.length)},E:function(t,e,n){const r=t.getDay();switch(e){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,n,r){const a=t.getDay(),i=(a-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(i);case"ee":return c(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(a,{width:"short",context:"formatting"});case"eeee":default:return n.day(a,{width:"wide",context:"formatting"})}},c:function(t,e,n,r){const a=t.getDay(),i=(a-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(i);case"cc":return c(i,e.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(a,{width:"narrow",context:"standalone"});case"cccccc":return n.day(a,{width:"short",context:"standalone"});case"cccc":default:return n.day(a,{width:"wide",context:"standalone"})}},i:function(t,e,n){const r=t.getDay(),a=r===0?7:r;switch(e){case"i":return String(a);case"ii":return c(a,e.length);case"io":return n.ordinalNumber(a,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,n){const a=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(t,e,n){const r=t.getHours();let a;switch(r===12?a=D.noon:r===0?a=D.midnight:a=r/12>=1?"pm":"am",e){case"b":case"bb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(t,e,n){const r=t.getHours();let a;switch(r>=17?a=D.evening:r>=12?a=D.afternoon:r>=4?a=D.morning:a=D.night,e){case"B":case"BB":case"BBB":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(t,e,n){if(e==="ho"){let r=t.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return w.h(t,e)},H:function(t,e,n){return e==="Ho"?n.ordinalNumber(t.getHours(),{unit:"hour"}):w.H(t,e)},K:function(t,e,n){const r=t.getHours()%12;return e==="Ko"?n.ordinalNumber(r,{unit:"hour"}):c(r,e.length)},k:function(t,e,n){let r=t.getHours();return r===0&&(r=24),e==="ko"?n.ordinalNumber(r,{unit:"hour"}):c(r,e.length)},m:function(t,e,n){return e==="mo"?n.ordinalNumber(t.getMinutes(),{unit:"minute"}):w.m(t,e)},s:function(t,e,n){return e==="so"?n.ordinalNumber(t.getSeconds(),{unit:"second"}):w.s(t,e)},S:function(t,e){return w.S(t,e)},X:function(t,e,n){const r=t.getTimezoneOffset();if(r===0)return"Z";switch(e){case"X":return L(r);case"XXXX":case"XX":return y(r);case"XXXXX":case"XXX":default:return y(r,":")}},x:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"x":return L(r);case"xxxx":case"xx":return y(r);case"xxxxx":case"xxx":default:return y(r,":")}},O:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+q(r,":");case"OOOO":default:return"GMT"+y(r,":")}},z:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+q(r,":");case"zzzz":default:return"GMT"+y(r,":")}},t:function(t,e,n){const r=Math.trunc(t.getTime()/1e3);return c(r,e.length)},T:function(t,e,n){const r=t.getTime();return c(r,e.length)}};function q(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),a=Math.trunc(r/60),i=r%60;return i===0?n+String(a):n+String(a)+e+c(i,2)}function L(t,e){return t%60===0?(t>0?"-":"+")+c(Math.abs(t)/60,2):y(t,e)}function y(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),a=c(Math.trunc(r/60),2),i=c(r%60,2);return n+a+e+i}const H=(t,e)=>{switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},Q=(t,e)=>{switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},Ut=(t,e)=>{const n=t.match(/(P+)(p+)?/)||[],r=n[1],a=n[2];if(!a)return H(t,e);let i;switch(r){case"P":i=e.dateTime({width:"short"});break;case"PP":i=e.dateTime({width:"medium"});break;case"PPP":i=e.dateTime({width:"long"});break;case"PPPP":default:i=e.dateTime({width:"full"});break}return i.replace("{{date}}",H(r,e)).replace("{{time}}",Q(a,e))},It={p:Q,P:Ut},Rt=/^D+$/,jt=/^Y+$/,At=["D","DD","YY","YYYY"];function Qt(t){return Rt.test(t)}function Xt(t){return jt.test(t)}function Bt(t,e,n){const r=Gt(t,e,n);if(console.warn(r),At.includes(t))throw new RangeError(r)}function Gt(t,e,n){const r=t[0]==="Y"?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const $t=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Vt=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,zt=/^'([^]*?)'?$/,Jt=/''/g,Zt=/[a-zA-Z]/;function Kt(t,e,n){var f,g,M,O;const r=W(),a=r.locale??Et,i=r.firstWeekContainsDate??((g=(f=r.locale)==null?void 0:f.options)==null?void 0:g.firstWeekContainsDate)??1,o=r.weekStartsOn??((O=(M=r.locale)==null?void 0:M.options)==null?void 0:O.weekStartsOn)??0,s=m(t);if(!tt(s))throw new RangeError("Invalid time value");let u=e.match(Vt).map(h=>{const l=h[0];if(l==="p"||l==="P"){const S=It[l];return S(h,a.formatLong)}return h}).join("").match($t).map(h=>{if(h==="''")return{isToken:!1,value:"'"};const l=h[0];if(l==="'")return{isToken:!1,value:te(h)};if(_[l])return{isToken:!0,value:h};if(l.match(Zt))throw new RangeError("Format string contains an unescaped latin alphabet character `"+l+"`");return{isToken:!1,value:h}});a.localize.preprocessor&&(u=a.localize.preprocessor(s,u));const d={firstWeekContainsDate:i,weekStartsOn:o,locale:a};return u.map(h=>{if(!h.isToken)return h.value;const l=h.value;(Xt(l)||Qt(l))&&Bt(l,e,String(t));const S=_[l[0]];return S(s,l,a.localize,d)}).join("")}function te(t){const e=t.match(zt);return e?e[1].replace(Jt,"'"):t}function X(t,e){const r=ae(t);let a;if(r.date){const u=ie(r.date,2);a=oe(u.restDateString,u.year)}if(!a||isNaN(a.getTime()))return new Date(NaN);const i=a.getTime();let o=0,s;if(r.time&&(o=se(r.time),isNaN(o)))return new Date(NaN);if(r.timezone){if(s=ue(r.timezone),isNaN(s))return new Date(NaN)}else{const u=new Date(i+o),d=new Date(0);return d.setFullYear(u.getUTCFullYear(),u.getUTCMonth(),u.getUTCDate()),d.setHours(u.getUTCHours(),u.getUTCMinutes(),u.getUTCSeconds(),u.getUTCMilliseconds()),d}return new Date(i+o+s)}const x={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},ee=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,ne=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,re=/^([+-])(\d{2})(?::?(\d{2}))?$/;function ae(t){const e={},n=t.split(x.dateTimeDelimiter);let r;if(n.length>2)return e;if(/:/.test(n[0])?r=n[0]:(e.date=n[0],r=n[1],x.timeZoneDelimiter.test(e.date)&&(e.date=t.split(x.timeZoneDelimiter)[0],r=t.substr(e.date.length,t.length))),r){const a=x.timezone.exec(r);a?(e.time=r.replace(a[1],""),e.timezone=a[1]):e.time=r}return e}function ie(t,e){const n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+e)+"})|(\\d{2}|[+-]\\d{"+(2+e)+"})$)"),r=t.match(n);if(!r)return{year:NaN,restDateString:""};const a=r[1]?parseInt(r[1]):null,i=r[2]?parseInt(r[2]):null;return{year:i===null?a:i*100,restDateString:t.slice((r[1]||r[2]).length)}}function oe(t,e){if(e===null)return new Date(NaN);const n=t.match(ee);if(!n)return new Date(NaN);const r=!!n[4],a=k(n[1]),i=k(n[2])-1,o=k(n[3]),s=k(n[4]),u=k(n[5])-1;if(r)return he(e,s,u)?ce(e,s,u):new Date(NaN);{const d=new Date(0);return!le(e,i,o)||!fe(e,a)?new Date(NaN):(d.setUTCFullYear(e,i,Math.max(a,o)),d)}}function k(t){return t?parseInt(t):1}function se(t){const e=t.match(ne);if(!e)return NaN;const n=N(e[1]),r=N(e[2]),a=N(e[3]);return me(n,r,a)?n*R+r*I+a*1e3:NaN}function N(t){return t&&parseFloat(t.replace(",","."))||0}function ue(t){if(t==="Z")return 0;const e=t.match(re);if(!e)return 0;const n=e[1]==="+"?-1:1,r=parseInt(e[2]),a=e[3]&&parseInt(e[3])||0;return ge(r,a)?n*(r*R+a*I):NaN}function ce(t,e,n){const r=new Date(0);r.setUTCFullYear(t,0,4);const a=r.getUTCDay()||7,i=(e-1)*7+n+1-a;return r.setUTCDate(r.getUTCDate()+i),r}const de=[31,null,31,30,31,30,31,31,30,31,30,31];function B(t){return t%400===0||t%4===0&&t%100!==0}function le(t,e,n){return e>=0&&e<=11&&n>=1&&n<=(de[e]||(B(t)?29:28))}function fe(t,e){return e>=1&&e<=(B(t)?366:365)}function he(t,e,n){return e>=1&&e<=53&&n>=0&&n<=6}function me(t,e,n){return t===24?e===0&&n===0:n>=0&&n<60&&e>=0&&e<60&&t>=0&&t<25}function ge(t,e){return e>=0&&e<=59}function we(t){if(!t||t.length===0)return{github:null,githubUrl:null,velocity24h:null};const e=t.filter(a=>a.is_official),r=[...e.length>0?e:t].sort((a,i)=>(i.num_stars||0)-(a.num_stars||0))[0];return{github:r&&r.num_stars>0?r.num_stars:null,githubUrl:(r==null?void 0:r.url)||null,velocity24h:(r==null?void 0:r.trending_score)??null}}function ye(t){if(!t)return null;try{const e=typeof t=="string"?X(t):t;return Kt(e,"MMM d, yyyy")}catch{return null}}function be(t){if(!t)return null;try{return X(t).getFullYear()}catch{return null}}function ke(t){var i,o;const{github:e,githubUrl:n,velocity24h:r}=we(t.repositories),a=(t.tasks||[]).map(s=>s.slug||"").filter(Boolean);return{id:t.arxiv_id||t.id,dbId:t.id,title:t.title,abstract:t.abstract||"",authors:t.authors||[],tags:a,citations:t.citation_count||0,github:e,githubUrl:n,project:((o=(i=t.project_pages)==null?void 0:i[0])==null?void 0:o.url)||null,date:ye(t.published),publishedIso:t.published||null,year:be(t.published),thumbnailUrl:$(t.thumbnail_url)||null,tldr:t.tldr||null,version:t.version||"v1",velocity24h:r}}function De(t){const e=G.get(t.toLowerCase());if(e)return e;const n=t.toUpperCase();return C.has(n)?n:t.replace(/[-_]+/g," ").replace(/\b\w/g,r=>r.toUpperCase())}const C=new Set(["OCR"]),G=new Map([["3d-generation","3D generation"],["3d-understanding","3D understanding"],["3d-semantic-segmentation","3D semantic segmentation"],["3d-instance-segmentation","3D instance segmentation"],["3d-object-detection","3D object detection"]]);function ve(t,e){const n=t||De(e||""),r=G.get((e==null?void 0:e.toLowerCase())||Me(n));if(r)return r;const a=e==null?void 0:e.toUpperCase(),i=n.toUpperCase();return/^[A-Z0-9][A-Z0-9-]{1,}$/.test(n)||a&&C.has(a)||C.has(i)?i:n.toLowerCase().replace(/\b\w/g,s=>s.toUpperCase())}function Me(t){return t.trim().toLowerCase().replace(/[\s_]+/g,"-")}export{m as a,v as b,we as c,ve as d,Pe as e,De as f,pe as h,F as s,ke as t};
|
|
|
|
| 1 |
+
import{a6 as $}from"./index-CNvFYqmB.js";function ke(t){let e=2166136261;const n=t||"";for(let r=0;r<n.length;r++)e=Math.imul(e^n.charCodeAt(r),16777619);return Math.abs(e)%360}function ve(t){return{bg:`oklch(0.94 0.04 ${t})`,text:`oklch(0.35 0.10 ${t})`,dot:`oklch(0.55 0.12 ${t})`}}function g(t){const e=Object.prototype.toString.call(t);return t instanceof Date||typeof t=="object"&&e==="[object Date]"?new t.constructor(+t):typeof t=="number"||e==="[object Number]"||typeof t=="string"||e==="[object String]"?new Date(t):new Date(NaN)}function b(t,e){return t instanceof Date?new t.constructor(e):new Date(e)}const H=6048e5,z=864e5,I=6e4,A=36e5;let V={};function W(){return V}function v(t,e){var s,u,d,l;const n=W(),r=(e==null?void 0:e.weekStartsOn)??((u=(s=e==null?void 0:e.locale)==null?void 0:s.options)==null?void 0:u.weekStartsOn)??n.weekStartsOn??((l=(d=n.locale)==null?void 0:d.options)==null?void 0:l.weekStartsOn)??0,a=g(t),i=a.getDay(),o=(i<r?7:0)+i-r;return a.setDate(a.getDate()-o),a.setHours(0,0,0,0),a}function T(t){return v(t,{weekStartsOn:1})}function R(t){const e=g(t),n=e.getFullYear(),r=b(t,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const a=T(r),i=b(t,0);i.setFullYear(n,0,4),i.setHours(0,0,0,0);const o=T(i);return e.getTime()>=a.getTime()?n+1:e.getTime()>=o.getTime()?n:n-1}function F(t){const e=g(t);return e.setHours(0,0,0,0),e}function _(t){const e=g(t),n=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return n.setUTCFullYear(e.getFullYear()),+t-+n}function J(t,e){const n=F(t),r=F(e),a=+n-_(n),i=+r-_(r);return Math.round((a-i)/z)}function K(t){const e=R(t),n=b(t,0);return n.setFullYear(e,0,4),n.setHours(0,0,0,0),T(n)}function Z(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}function tt(t){if(!Z(t)&&typeof t!="number")return!1;const e=g(t);return!isNaN(Number(e))}function et(t){const e=g(t),n=b(t,0);return n.setFullYear(e.getFullYear(),0,1),n.setHours(0,0,0,0),n}const nt={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},rt=(t,e,n)=>{let r;const a=nt[t];return typeof a=="string"?r=a:e===1?r=a.one:r=a.other.replace("{{count}}",e.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function Y(t){return(e={})=>{const n=e.width?String(e.width):t.defaultWidth;return t.formats[n]||t.formats[t.defaultWidth]}}const at={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},it={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},ot={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},st={date:Y({formats:at,defaultWidth:"full"}),time:Y({formats:it,defaultWidth:"full"}),dateTime:Y({formats:ot,defaultWidth:"full"})},ut={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},ct=(t,e,n,r)=>ut[t];function P(t){return(e,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let a;if(r==="formatting"&&t.formattingValues){const o=t.defaultFormattingWidth||t.defaultWidth,s=n!=null&&n.width?String(n.width):o;a=t.formattingValues[s]||t.formattingValues[o]}else{const o=t.defaultWidth,s=n!=null&&n.width?String(n.width):t.defaultWidth;a=t.values[s]||t.values[o]}const i=t.argumentCallback?t.argumentCallback(e):e;return a[i]}}const dt={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},lt={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},ft={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},ht={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},mt={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},gt={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},wt=(t,e)=>{const n=Number(t),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},yt={ordinalNumber:wt,era:P({values:dt,defaultWidth:"wide"}),quarter:P({values:lt,defaultWidth:"wide",argumentCallback:t=>t-1}),month:P({values:ft,defaultWidth:"wide"}),day:P({values:ht,defaultWidth:"wide"}),dayPeriod:P({values:mt,defaultWidth:"wide",formattingValues:gt,defaultFormattingWidth:"wide"})};function p(t){return(e,n={})=>{const r=n.width,a=r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth],i=e.match(a);if(!i)return null;const o=i[0],s=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],u=Array.isArray(s)?Dt(s,f=>f.test(o)):bt(s,f=>f.test(o));let d;d=t.valueCallback?t.valueCallback(u):u,d=n.valueCallback?n.valueCallback(d):d;const l=e.slice(o.length);return{value:d,rest:l}}}function bt(t,e){for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e(t[n]))return n}function Dt(t,e){for(let n=0;n<t.length;n++)if(e(t[n]))return n}function Mt(t){return(e,n={})=>{const r=e.match(t.matchPattern);if(!r)return null;const a=r[0],i=e.match(t.parsePattern);if(!i)return null;let o=t.valueCallback?t.valueCallback(i[0]):i[0];o=n.valueCallback?n.valueCallback(o):o;const s=e.slice(a.length);return{value:o,rest:s}}}const Ot=/^(\d+)(th|st|nd|rd)?/i,Pt=/\d+/i,pt={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},kt={any:[/^b/i,/^(a|c)/i]},vt={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},xt={any:[/1/i,/2/i,/3/i,/4/i]},Tt={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Wt={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},St={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Yt={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Nt={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Ct={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Ft={ordinalNumber:Mt({matchPattern:Ot,parsePattern:Pt,valueCallback:t=>parseInt(t,10)}),era:p({matchPatterns:pt,defaultMatchWidth:"wide",parsePatterns:kt,defaultParseWidth:"any"}),quarter:p({matchPatterns:vt,defaultMatchWidth:"wide",parsePatterns:xt,defaultParseWidth:"any",valueCallback:t=>t+1}),month:p({matchPatterns:Tt,defaultMatchWidth:"wide",parsePatterns:Wt,defaultParseWidth:"any"}),day:p({matchPatterns:St,defaultMatchWidth:"wide",parsePatterns:Yt,defaultParseWidth:"any"}),dayPeriod:p({matchPatterns:Nt,defaultMatchWidth:"any",parsePatterns:Ct,defaultParseWidth:"any"})},_t={code:"en-US",formatDistance:rt,formatLong:st,formatRelative:ct,localize:yt,match:Ft,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Et(t){const e=g(t);return J(e,et(e))+1}function qt(t){const e=g(t),n=+T(e)-+K(e);return Math.round(n/H)+1}function j(t,e){var l,f,M,O;const n=g(t),r=n.getFullYear(),a=W(),i=(e==null?void 0:e.firstWeekContainsDate)??((f=(l=e==null?void 0:e.locale)==null?void 0:l.options)==null?void 0:f.firstWeekContainsDate)??a.firstWeekContainsDate??((O=(M=a.locale)==null?void 0:M.options)==null?void 0:O.firstWeekContainsDate)??1,o=b(t,0);o.setFullYear(r+1,0,i),o.setHours(0,0,0,0);const s=v(o,e),u=b(t,0);u.setFullYear(r,0,i),u.setHours(0,0,0,0);const d=v(u,e);return n.getTime()>=s.getTime()?r+1:n.getTime()>=d.getTime()?r:r-1}function Lt(t,e){var s,u,d,l;const n=W(),r=(e==null?void 0:e.firstWeekContainsDate)??((u=(s=e==null?void 0:e.locale)==null?void 0:s.options)==null?void 0:u.firstWeekContainsDate)??n.firstWeekContainsDate??((l=(d=n.locale)==null?void 0:d.options)==null?void 0:l.firstWeekContainsDate)??1,a=j(t,e),i=b(t,0);return i.setFullYear(a,0,r),i.setHours(0,0,0,0),v(i,e)}function Ut(t,e){const n=g(t),r=+v(n,e)-+Lt(n,e);return Math.round(r/H)+1}function c(t,e){const n=t<0?"-":"",r=Math.abs(t).toString().padStart(e,"0");return n+r}const w={y(t,e){const n=t.getFullYear(),r=n>0?n:1-n;return c(e==="yy"?r%100:r,e.length)},M(t,e){const n=t.getMonth();return e==="M"?String(n+1):c(n+1,2)},d(t,e){return c(t.getDate(),e.length)},a(t,e){const n=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(t,e){return c(t.getHours()%12||12,e.length)},H(t,e){return c(t.getHours(),e.length)},m(t,e){return c(t.getMinutes(),e.length)},s(t,e){return c(t.getSeconds(),e.length)},S(t,e){const n=e.length,r=t.getMilliseconds(),a=Math.trunc(r*Math.pow(10,n-3));return c(a,e.length)}},D={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},E={G:function(t,e,n){const r=t.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(t,e,n){if(e==="yo"){const r=t.getFullYear(),a=r>0?r:1-r;return n.ordinalNumber(a,{unit:"year"})}return w.y(t,e)},Y:function(t,e,n,r){const a=j(t,r),i=a>0?a:1-a;if(e==="YY"){const o=i%100;return c(o,2)}return e==="Yo"?n.ordinalNumber(i,{unit:"year"}):c(i,e.length)},R:function(t,e){const n=R(t);return c(n,e.length)},u:function(t,e){const n=t.getFullYear();return c(n,e.length)},Q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return c(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return c(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,e,n){const r=t.getMonth();switch(e){case"M":case"MM":return w.M(t,e);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,n){const r=t.getMonth();switch(e){case"L":return String(r+1);case"LL":return c(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,n,r){const a=Ut(t,r);return e==="wo"?n.ordinalNumber(a,{unit:"week"}):c(a,e.length)},I:function(t,e,n){const r=qt(t);return e==="Io"?n.ordinalNumber(r,{unit:"week"}):c(r,e.length)},d:function(t,e,n){return e==="do"?n.ordinalNumber(t.getDate(),{unit:"date"}):w.d(t,e)},D:function(t,e,n){const r=Et(t);return e==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):c(r,e.length)},E:function(t,e,n){const r=t.getDay();switch(e){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,n,r){const a=t.getDay(),i=(a-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(i);case"ee":return c(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(a,{width:"short",context:"formatting"});case"eeee":default:return n.day(a,{width:"wide",context:"formatting"})}},c:function(t,e,n,r){const a=t.getDay(),i=(a-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(i);case"cc":return c(i,e.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(a,{width:"narrow",context:"standalone"});case"cccccc":return n.day(a,{width:"short",context:"standalone"});case"cccc":default:return n.day(a,{width:"wide",context:"standalone"})}},i:function(t,e,n){const r=t.getDay(),a=r===0?7:r;switch(e){case"i":return String(a);case"ii":return c(a,e.length);case"io":return n.ordinalNumber(a,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,n){const a=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(t,e,n){const r=t.getHours();let a;switch(r===12?a=D.noon:r===0?a=D.midnight:a=r/12>=1?"pm":"am",e){case"b":case"bb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(t,e,n){const r=t.getHours();let a;switch(r>=17?a=D.evening:r>=12?a=D.afternoon:r>=4?a=D.morning:a=D.night,e){case"B":case"BB":case"BBB":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(t,e,n){if(e==="ho"){let r=t.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return w.h(t,e)},H:function(t,e,n){return e==="Ho"?n.ordinalNumber(t.getHours(),{unit:"hour"}):w.H(t,e)},K:function(t,e,n){const r=t.getHours()%12;return e==="Ko"?n.ordinalNumber(r,{unit:"hour"}):c(r,e.length)},k:function(t,e,n){let r=t.getHours();return r===0&&(r=24),e==="ko"?n.ordinalNumber(r,{unit:"hour"}):c(r,e.length)},m:function(t,e,n){return e==="mo"?n.ordinalNumber(t.getMinutes(),{unit:"minute"}):w.m(t,e)},s:function(t,e,n){return e==="so"?n.ordinalNumber(t.getSeconds(),{unit:"second"}):w.s(t,e)},S:function(t,e){return w.S(t,e)},X:function(t,e,n){const r=t.getTimezoneOffset();if(r===0)return"Z";switch(e){case"X":return L(r);case"XXXX":case"XX":return y(r);case"XXXXX":case"XXX":default:return y(r,":")}},x:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"x":return L(r);case"xxxx":case"xx":return y(r);case"xxxxx":case"xxx":default:return y(r,":")}},O:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+q(r,":");case"OOOO":default:return"GMT"+y(r,":")}},z:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+q(r,":");case"zzzz":default:return"GMT"+y(r,":")}},t:function(t,e,n){const r=Math.trunc(t.getTime()/1e3);return c(r,e.length)},T:function(t,e,n){const r=t.getTime();return c(r,e.length)}};function q(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),a=Math.trunc(r/60),i=r%60;return i===0?n+String(a):n+String(a)+e+c(i,2)}function L(t,e){return t%60===0?(t>0?"-":"+")+c(Math.abs(t)/60,2):y(t,e)}function y(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),a=c(Math.trunc(r/60),2),i=c(r%60,2);return n+a+e+i}const U=(t,e)=>{switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},Q=(t,e)=>{switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},Ht=(t,e)=>{const n=t.match(/(P+)(p+)?/)||[],r=n[1],a=n[2];if(!a)return U(t,e);let i;switch(r){case"P":i=e.dateTime({width:"short"});break;case"PP":i=e.dateTime({width:"medium"});break;case"PPP":i=e.dateTime({width:"long"});break;case"PPPP":default:i=e.dateTime({width:"full"});break}return i.replace("{{date}}",U(r,e)).replace("{{time}}",Q(a,e))},It={p:Q,P:Ht},At=/^D+$/,Rt=/^Y+$/,jt=["D","DD","YY","YYYY"];function Qt(t){return At.test(t)}function Xt(t){return Rt.test(t)}function Bt(t,e,n){const r=Gt(t,e,n);if(console.warn(r),jt.includes(t))throw new RangeError(r)}function Gt(t,e,n){const r=t[0]==="Y"?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const $t=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,zt=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Vt=/^'([^]*?)'?$/,Jt=/''/g,Kt=/[a-zA-Z]/;function Zt(t,e,n){var l,f,M,O;const r=W(),a=r.locale??_t,i=r.firstWeekContainsDate??((f=(l=r.locale)==null?void 0:l.options)==null?void 0:f.firstWeekContainsDate)??1,o=r.weekStartsOn??((O=(M=r.locale)==null?void 0:M.options)==null?void 0:O.weekStartsOn)??0,s=g(t);if(!tt(s))throw new RangeError("Invalid time value");let u=e.match(zt).map(m=>{const h=m[0];if(h==="p"||h==="P"){const S=It[h];return S(m,a.formatLong)}return m}).join("").match($t).map(m=>{if(m==="''")return{isToken:!1,value:"'"};const h=m[0];if(h==="'")return{isToken:!1,value:te(m)};if(E[h])return{isToken:!0,value:m};if(h.match(Kt))throw new RangeError("Format string contains an unescaped latin alphabet character `"+h+"`");return{isToken:!1,value:m}});a.localize.preprocessor&&(u=a.localize.preprocessor(s,u));const d={firstWeekContainsDate:i,weekStartsOn:o,locale:a};return u.map(m=>{if(!m.isToken)return m.value;const h=m.value;(Xt(h)||Qt(h))&&Bt(h,e,String(t));const S=E[h[0]];return S(s,h,a.localize,d)}).join("")}function te(t){const e=t.match(Vt);return e?e[1].replace(Jt,"'"):t}function X(t,e){const r=ae(t);let a;if(r.date){const u=ie(r.date,2);a=oe(u.restDateString,u.year)}if(!a||isNaN(a.getTime()))return new Date(NaN);const i=a.getTime();let o=0,s;if(r.time&&(o=se(r.time),isNaN(o)))return new Date(NaN);if(r.timezone){if(s=ue(r.timezone),isNaN(s))return new Date(NaN)}else{const u=new Date(i+o),d=new Date(0);return d.setFullYear(u.getUTCFullYear(),u.getUTCMonth(),u.getUTCDate()),d.setHours(u.getUTCHours(),u.getUTCMinutes(),u.getUTCSeconds(),u.getUTCMilliseconds()),d}return new Date(i+o+s)}const x={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},ee=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,ne=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,re=/^([+-])(\d{2})(?::?(\d{2}))?$/;function ae(t){const e={},n=t.split(x.dateTimeDelimiter);let r;if(n.length>2)return e;if(/:/.test(n[0])?r=n[0]:(e.date=n[0],r=n[1],x.timeZoneDelimiter.test(e.date)&&(e.date=t.split(x.timeZoneDelimiter)[0],r=t.substr(e.date.length,t.length))),r){const a=x.timezone.exec(r);a?(e.time=r.replace(a[1],""),e.timezone=a[1]):e.time=r}return e}function ie(t,e){const n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+e)+"})|(\\d{2}|[+-]\\d{"+(2+e)+"})$)"),r=t.match(n);if(!r)return{year:NaN,restDateString:""};const a=r[1]?parseInt(r[1]):null,i=r[2]?parseInt(r[2]):null;return{year:i===null?a:i*100,restDateString:t.slice((r[1]||r[2]).length)}}function oe(t,e){if(e===null)return new Date(NaN);const n=t.match(ee);if(!n)return new Date(NaN);const r=!!n[4],a=k(n[1]),i=k(n[2])-1,o=k(n[3]),s=k(n[4]),u=k(n[5])-1;if(r)return he(e,s,u)?ce(e,s,u):new Date(NaN);{const d=new Date(0);return!le(e,i,o)||!fe(e,a)?new Date(NaN):(d.setUTCFullYear(e,i,Math.max(a,o)),d)}}function k(t){return t?parseInt(t):1}function se(t){const e=t.match(ne);if(!e)return NaN;const n=N(e[1]),r=N(e[2]),a=N(e[3]);return me(n,r,a)?n*A+r*I+a*1e3:NaN}function N(t){return t&&parseFloat(t.replace(",","."))||0}function ue(t){if(t==="Z")return 0;const e=t.match(re);if(!e)return 0;const n=e[1]==="+"?-1:1,r=parseInt(e[2]),a=e[3]&&parseInt(e[3])||0;return ge(r,a)?n*(r*A+a*I):NaN}function ce(t,e,n){const r=new Date(0);r.setUTCFullYear(t,0,4);const a=r.getUTCDay()||7,i=(e-1)*7+n+1-a;return r.setUTCDate(r.getUTCDate()+i),r}const de=[31,null,31,30,31,30,31,31,30,31,30,31];function B(t){return t%400===0||t%4===0&&t%100!==0}function le(t,e,n){return e>=0&&e<=11&&n>=1&&n<=(de[e]||(B(t)?29:28))}function fe(t,e){return e>=1&&e<=(B(t)?366:365)}function he(t,e,n){return e>=1&&e<=53&&n>=0&&n<=6}function me(t,e,n){return t===24?e===0&&n===0:n>=0&&n<60&&e>=0&&e<60&&t>=0&&t<25}function ge(t,e){return e>=0&&e<=59}const we={model:"models",dataset:"datasets",space:"spaces"};function ye(t){const e=t.hf_artifact_summary;return!e||!e.best_kind||!e.best_url||e.best_count<=0?{hfKind:null,hfCount:0,hfUrl:null}:{hfKind:we[e.best_kind]??null,hfCount:e.best_count,hfUrl:e.best_url}}function be(t){if(!t||t.length===0)return{github:null,githubUrl:null,velocity24h:null};const e=t.filter(a=>a.is_official),r=[...e.length>0?e:t].sort((a,i)=>(i.num_stars||0)-(a.num_stars||0))[0];return{github:r&&r.num_stars>0?r.num_stars:null,githubUrl:(r==null?void 0:r.url)||null,velocity24h:(r==null?void 0:r.trending_score)??null}}function De(t){if(!t)return null;try{const e=typeof t=="string"?X(t):t;return Zt(e,"MMM d, yyyy")}catch{return null}}function Me(t){if(!t)return null;try{return X(t).getFullYear()}catch{return null}}function xe(t){var d,l;const{github:e,githubUrl:n,velocity24h:r}=be(t.repositories),{hfKind:a,hfCount:i,hfUrl:o}=ye(t),s=(t.tasks||[]).map(f=>f.slug||"").filter(Boolean),u=(t.methods||[]).map(f=>({id:f.id,name:f.name,slug:f.slug}));return{id:t.arxiv_id||t.id,dbId:t.id,title:t.title,abstract:t.abstract||"",authors:t.authors||[],tags:s,methods:u,citations:t.citation_count||0,github:e,githubUrl:n,project:((l=(d=t.project_pages)==null?void 0:d[0])==null?void 0:l.url)||null,date:De(t.published),publishedIso:t.published||null,year:Me(t.published),thumbnailUrl:$(t.thumbnail_url)||null,tldr:t.tldr||null,version:t.version||"v1",velocity24h:r,hfKind:a,hfCount:i,hfUrl:o}}function Oe(t){const e=G.get(t.toLowerCase());if(e)return e;const n=t.toUpperCase();return C.has(n)?n:t.replace(/[-_]+/g," ").replace(/\b\w/g,r=>r.toUpperCase())}const C=new Set(["OCR"]),G=new Map([["3d-generation","3D generation"],["3d-understanding","3D understanding"],["3d-semantic-segmentation","3D semantic segmentation"],["3d-instance-segmentation","3D instance segmentation"],["3d-object-detection","3D object detection"]]);function Te(t,e){const n=t||Oe(e||""),r=G.get((e==null?void 0:e.toLowerCase())||Pe(n));if(r)return r;const a=e==null?void 0:e.toUpperCase(),i=n.toUpperCase();return/^[A-Z0-9][A-Z0-9-]{1,}$/.test(n)||a&&C.has(a)||C.has(i)?i:n.toLowerCase().replace(/\b\w/g,s=>s.toUpperCase())}function Pe(t){return t.trim().toLowerCase().replace(/[\s_]+/g,"-")}export{g as a,v as b,be as c,Te as d,ve as e,Oe as f,ke as h,F as s,xe as t};
|
assets/{useDebounce-C_f5or7w.js → useDebounce-CXMdQN8X.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{r as o}from"./index-
|
|
|
|
| 1 |
+
import{r as o}from"./index-CNvFYqmB.js";function s(e,t=300){const[r,u]=o.useState(e);return o.useEffect(()=>{const c=setTimeout(()=>u(e),t);return()=>clearTimeout(c)},[e,t]),r}export{s as u};
|
assets/{useInfiniteQuery-FYtFSkZi.js → useInfiniteQuery-Vi6JDeF_.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{Q as v,a as p}from"./useQuery-
|
|
|
|
| 1 |
+
import{Q as v,a as p}from"./useQuery-B6TeiMq1.js";import{ad as x,ae as b}from"./index-CNvFYqmB.js";var l=class extends v{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type="infinite",super.setOptions(e)}getOptimisticResult(e){return e._type="infinite",super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){var f,P;const{state:s}=e,i=super.createResult(e,t),{isFetching:a,isRefetching:g,isError:c,isRefetchError:d}=i,r=(P=(f=s.fetchMeta)==null?void 0:f.fetchMore)==null?void 0:P.direction,h=c&&r==="forward",n=a&&r==="forward",o=c&&r==="backward",u=a&&r==="backward";return{...i,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:b(t,s.data),hasPreviousPage:x(t,s.data),isFetchNextPageError:h,isFetchingNextPage:n,isFetchPreviousPageError:o,isFetchingPreviousPage:u,isRefetchError:d&&!h&&!o,isRefetching:g&&!n&&!u}}};function w(e,t){return p(e,l)}export{w as u};
|
assets/{useIntersectionObserver-BrFBJfJb.js → useIntersectionObserver-jmbd50BD.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{r}from"./index-
|
|
|
|
| 1 |
+
import{r}from"./index-CNvFYqmB.js";function b(u={}){const{threshold:t=0,rootMargin:n="0px"}=u,[i,s]=r.useState(!1),e=r.useRef(null),f=r.useCallback(c=>{if(e.current&&(e.current.disconnect(),e.current=null),!c){s(!1);return}const o=new IntersectionObserver(([l])=>s(l.isIntersecting),{threshold:t,rootMargin:n});o.observe(c),e.current=o},[t,n]);return r.useEffect(()=>()=>{e.current&&(e.current.disconnect(),e.current=null)},[]),{targetRef:f,isIntersecting:i}}export{b as u};
|
assets/{useMutation-OcjJF2eh.js → useMutation-Bcfahw68.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
var j=i=>{throw TypeError(i)};var E=(i,t,s)=>t.has(i)||j("Cannot "+s);var e=(i,t,s)=>(E(i,t,"read from private field"),s?s.call(i):t.get(i)),b=(i,t,s)=>t.has(i)?j("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(i):t.set(i,s),p=(i,t,s,r)=>(E(i,t,"write to private field"),r?r.call(i,s):t.set(i,s),s),y=(i,t,s)=>(E(i,t,"access private method"),s);import{aj as k,al as U,ay as R,az as q,ak as P,o as A,r as v,an as L,aA as z}from"./index-
|
|
|
|
| 1 |
+
var j=i=>{throw TypeError(i)};var E=(i,t,s)=>t.has(i)||j("Cannot "+s);var e=(i,t,s)=>(E(i,t,"read from private field"),s?s.call(i):t.get(i)),b=(i,t,s)=>t.has(i)?j("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(i):t.set(i,s),p=(i,t,s,r)=>(E(i,t,"write to private field"),r?r.call(i,s):t.set(i,s),s),y=(i,t,s)=>(E(i,t,"access private method"),s);import{aj as k,al as U,ay as R,az as q,ak as P,o as A,r as v,an as L,aA as z}from"./index-CNvFYqmB.js";var a,c,o,h,n,C,S,w,D=(w=class extends k{constructor(t,s){super();b(this,n);b(this,a);b(this,c);b(this,o);b(this,h);p(this,a,t),this.setOptions(s),this.bindMethods(),y(this,n,C).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var r;const s=this.options;this.options=e(this,a).defaultMutationOptions(t),U(this.options,s)||e(this,a).getMutationCache().notify({type:"observerOptionsUpdated",mutation:e(this,o),observer:this}),s!=null&&s.mutationKey&&this.options.mutationKey&&R(s.mutationKey)!==R(this.options.mutationKey)?this.reset():((r=e(this,o))==null?void 0:r.state.status)==="pending"&&e(this,o).setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||(t=e(this,o))==null||t.removeObserver(this)}onMutationUpdate(t){y(this,n,C).call(this),y(this,n,S).call(this,t)}getCurrentResult(){return e(this,c)}reset(){var t;(t=e(this,o))==null||t.removeObserver(this),p(this,o,void 0),y(this,n,C).call(this),y(this,n,S).call(this)}mutate(t,s){var r;return p(this,h,s),(r=e(this,o))==null||r.removeObserver(this),p(this,o,e(this,a).getMutationCache().build(e(this,a),this.options)),e(this,o).addObserver(this),e(this,o).execute(t)}},a=new WeakMap,c=new WeakMap,o=new WeakMap,h=new WeakMap,n=new WeakSet,C=function(){var s;const t=((s=e(this,o))==null?void 0:s.state)??q();p(this,c,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},S=function(t){P.batch(()=>{var s,r,u,f,d,O,x,K;if(e(this,h)&&this.hasListeners()){const m=e(this,c).variables,M=e(this,c).context,g={client:e(this,a),meta:this.options.meta,mutationKey:this.options.mutationKey};if((t==null?void 0:t.type)==="success"){try{(r=(s=e(this,h)).onSuccess)==null||r.call(s,t.data,m,M,g)}catch(l){Promise.reject(l)}try{(f=(u=e(this,h)).onSettled)==null||f.call(u,t.data,null,m,M,g)}catch(l){Promise.reject(l)}}else if((t==null?void 0:t.type)==="error"){try{(O=(d=e(this,h)).onError)==null||O.call(d,t.error,m,M,g)}catch(l){Promise.reject(l)}try{(K=(x=e(this,h)).onSettled)==null||K.call(x,void 0,t.error,m,M,g)}catch(l){Promise.reject(l)}}}this.listeners.forEach(m=>{m(e(this,c))})})},w);function T(i,t){const s=A(),[r]=v.useState(()=>new D(s,i));v.useEffect(()=>{r.setOptions(i)},[r,i]);const u=v.useSyncExternalStore(v.useCallback(d=>r.subscribe(P.batchCalls(d)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),f=v.useCallback((d,O)=>{r.mutate(d,O).catch(L)},[r]);if(u.error&&z(r.options.throwOnError,[u.error]))throw u.error;return{...u,mutate:f,mutateAsync:u.mutate}}export{T as u};
|
assets/{usePapers-BcSgGxX-.js → usePapers-CldwRRal.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{a as d,aa as c}from"./index-
|
|
|
|
| 1 |
+
import{a as d,aa as c}from"./index-CNvFYqmB.js";import{u as P}from"./useQuery-B6TeiMq1.js";import{u as g}from"./useInfiniteQuery-Vi6JDeF_.js";function h(a,e=!0){return P({queryKey:["paper",a],queryFn:()=>d.getPaper(a),enabled:e&&!!a,staleTime:10*60*1e3,refetchOnWindowFocus:!1})}function q(a={}){const{page_size:e=20,search:r,order_by:t="date_published",order_dir:n="desc",time:s,published_after:i,published_before:o,conference:u,latest_only:l=!0,include_resources:p=!1,enabled:_=!0}=a;return g({queryKey:["papers-infinite",{page_size:e,search:r,order_by:t,order_dir:n,time:s,published_after:i,published_before:o,conference:u,latest_only:l,include_resources:p}],queryFn:({pageParam:f=1})=>d.getPapers({page:f,page_size:e,search:r,order_by:t,order_dir:n,time:s,published_after:i,published_before:o,conference:u,latest_only:l,include_resources:p}),getNextPageParam:f=>f.next_page,initialPageParam:1,enabled:_,staleTime:5*60*1e3,placeholderData:c,refetchOnWindowFocus:!1})}function F(a){const{taskId:e,page_size:r=20,order_by:t="date_published",order_dir:n="desc",latest_only:s=!0,include_resources:i=!0,enabled:o=!0}=a;return g({queryKey:["task-papers-infinite",e,{page_size:r,order_by:t,order_dir:n,latest_only:s,include_resources:i}],queryFn:({pageParam:u=1})=>d.getTaskPapers(e,{page:u,page_size:r,order_by:t,order_dir:n,latest_only:s,include_resources:i}),getNextPageParam:u=>u.next_page,initialPageParam:1,enabled:o&&!!e,staleTime:5*60*1e3,placeholderData:c,refetchOnWindowFocus:!1})}function k(a){const{conferenceSlug:e,taskSlug:r,presentation:t,page_size:n=20,order_by:s="date_published",order_dir:i="desc",latest_only:o=!0,include_resources:u=!0,enabled:l=!0}=a;return g({queryKey:["conference-papers-infinite",e,r,t,{page_size:n,order_by:s,order_dir:i,latest_only:o,include_resources:u}],queryFn:({pageParam:p=1})=>d.getConferencePapers(e,{task:r,presentation:t,page:p,page_size:n,order_by:s,order_dir:i,latest_only:o,include_resources:u}),getNextPageParam:p=>p.next_page,initialPageParam:1,enabled:l&&!!e,staleTime:5*60*1e3,placeholderData:c,refetchOnWindowFocus:!1})}function x(a){const{organizationSlug:e,taskSlug:r,page_size:t=20,order_by:n="date_published",order_dir:s="desc",latest_only:i=!0,include_resources:o=!0,enabled:u=!0}=a;return g({queryKey:["organization-papers-infinite",e,r,{page_size:t,order_by:n,order_dir:s,latest_only:i,include_resources:o}],queryFn:({pageParam:l=1})=>d.getOrganizationPapers(e,{task:r,page:l,page_size:t,order_by:n,order_dir:s,latest_only:i,include_resources:o}),getNextPageParam:l=>l.next_page,initialPageParam:1,enabled:u&&!!e,staleTime:5*60*1e3,placeholderData:c,refetchOnWindowFocus:!1})}export{h as a,F as b,k as c,x as d,q as u};
|
assets/{usePeriodFilter-CfXQTNJ-.js → usePeriodFilter-C6uXOQPx.js}
RENAMED
|
@@ -1 +1 @@
|
|
| 1 |
-
import{r}from"./index-
|
|
|
|
| 1 |
+
import{r}from"./index-CNvFYqmB.js";import{a as n,s as f,b as u}from"./transform-Cbu7h9fT.js";function l(s){const t=n(s);return t.setDate(1),t.setHours(0,0,0,0),t}const h=["Today","This Week","This Month","All Time"];function T(s="All Time"){const[t,a]=r.useState(s),i=r.useMemo(()=>{const o=new Date;let e=null;return t==="Today"?e=f(o):t==="This Week"?e=u(o,{weekStartsOn:1}):t==="This Month"&&(e=l(o)),e?e.toISOString():void 0},[t]);return{period:t,setPeriod:a,publishedAfter:i}}export{h as P,T as u};
|